@ckeditor/ckeditor5-revision-history 48.1.0-alpha.7 → 48.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x5275c4(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x36b8e3){super(),this['id']=_0x36b8e3['id']||_0x1ed805(),this['creator']=_0x36b8e3['creator']||null,this['authors']=_0x36b8e3['authors']||[],this['diffData']=_0x36b8e3['diffData']||null,this['toVersion']=_0x36b8e3['toVersion']||0x0,this['fromVersion']=_0x36b8e3['fromVersion']||0x0,this['set']('name',_0x36b8e3['name']||''),this['set']('createdAt',_0x36b8e3['createdAt']||new Date()),this['set']('attributes',_0x36b8e3['attributes']||{});}['setName'](_0x5c65ae){this['_update']({'name':_0x5c65ae});}['setAttribute'](_0x4145d2,_0xb793f2){const _0x4663b9=_0x56b594(this['attributes']);_0x15a2e4(_0x4663b9,_0x4145d2,_0xb793f2),this['_update']({'attributes':_0x4663b9});}['removeAttribute'](_0x5477e4){const _0x5b4db0=_0x56b594(this['attributes']);_0x4e0e2a(_0x5b4db0,_0x5477e4),this['_update']({'attributes':_0x5b4db0});}['_update'](_0x2669ab,_0x47f3fc=!0x1){let _0x1a2261=!0x1;const _0x55e46d={'id':this['id']},_0x1874fc=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x321891 of _0x1874fc){const _0x5a8133=_0x2669ab[_0x321891];void 0x0!==_0x5a8133&&_0x5a8133!==this[_0x321891]&&(this[_0x321891]=_0x5a8133,_0x55e46d[_0x321891]=_0x5a8133,_0x1a2261=!0x0);}_0x1a2261&&(_0x55e46d['authors']&&(_0x55e46d['authorsIds']=_0x55e46d['authors']['map'](_0x332b94=>_0x332b94['id']),delete _0x55e46d['authors']),this['fire']('_update',_0x55e46d,_0x47f3fc));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3e1a0c=>_0x3e1a0c['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class gt extends _0x5d0df7{['_revisions'];static get['requires'](){return[_0x32ab6d];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x57cc9c){super(_0x57cc9c),this['_revisions']=new _0x3df410();}['afterInit'](){!async function(_0x1ad24a){const _0xfbba62=_0x541ea9([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]),_0x5dcf67=0xeb829,_0x3bd825=0x359e09b0,_0x5243a2=0x35998068^_0x3bd825,_0x2dbca8=window[_0x541ea9([0x44,0x61,0x74,0x65])][_0x541ea9([0x6e,0x6f,0x77])](),_0x101bad=_0x1ad24a[_0x541ea9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x183618=new window[(_0x541ea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4eccfb=>{_0x101bad[_0x541ea9([0x6f,0x6e,0x63,0x65])](_0x541ea9([0x72,0x65,0x61,0x64,0x79]),_0x4eccfb);}),_0x5e0a9f={[_0x541ea9([0x6b,0x74,0x79])]:_0x541ea9([0x45,0x43]),[_0x541ea9([0x75,0x73,0x65])]:_0x541ea9([0x73,0x69,0x67]),[_0x541ea9([0x63,0x72,0x76])]:_0x541ea9([0x50,0x2d,0x32,0x35,0x36]),[_0x541ea9([0x78])]:_0x541ea9([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]),[_0x541ea9([0x79])]:_0x541ea9([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]),[_0x541ea9([0x61,0x6c,0x67])]:_0x541ea9([0x45,0x53,0x32,0x35,0x36])},_0x3b7a90=_0x101bad[_0x541ea9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x541ea9([0x67,0x65,0x74])](_0x541ea9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3abb59(){let _0x5dc5b4,_0x1bc6f9=null,_0x309d4a=null;try{if(_0x3b7a90==_0x541ea9([0x47,0x50,0x4c]))return _0x541ea9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5dc5b4=_0x510e3e(),!_0x5dc5b4)return _0x541ea9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5dc5b4[_0x541ea9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x309d4a=_0xcea8ae(_0x5dc5b4[_0x541ea9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5dc5b4[_0x541ea9([0x6a,0x74,0x69])])),await _0x5ccd85()?_0xd5d24c()?_0x3f1756()?_0x541ea9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1b4b2c()?(_0x5dc5b4[_0x541ea9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x541ea9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1bc6f9=_0x5c750f(_0x541ea9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3db7c8()):_0x541ea9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x541ea9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x541ea9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x541ea9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3f1756(){const _0x76da88=[_0x541ea9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x541ea9([0x74,0x72,0x69,0x61,0x6c])][_0x541ea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5dc5b4[_0x541ea9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2dbca8/0x3e8:0xe10*_0x5243a2;return _0x5dc5b4[_0x541ea9([0x65,0x78,0x70])]<_0x76da88;}function _0xd5d24c(){const _0x29cfb3=_0x5dc5b4[_0x541ea9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x29cfb3)return!0x1;if(_0x29cfb3[_0x541ea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x541ea9([0x2a])))return!0x0;if(_0x29cfb3[_0x541ea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x541ea9([0x52,0x48])))return!0x0;if(_0x29cfb3[_0x541ea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x541ea9([0x52,0x52,0x48]))){if(_0x4673cf())return!0x0;if(_0x5013d4()||_0x3d2259())return!0x0;}return!0x1;}function _0x1b4b2c(){const _0x57161f=_0x5dc5b4[_0x541ea9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x57161f||0x0==_0x57161f[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5ed062}=new URL(window[_0x541ea9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x57161f[_0x541ea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ed062))return!0x0;const _0x3a6d98=_0x5ed062[_0x541ea9([0x73,0x70,0x6c,0x69,0x74])](_0x541ea9([0x2e]));return _0x57161f[_0x541ea9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3e1f85=>_0x3e1f85[_0x541ea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x541ea9([0x2a])))[_0x541ea9([0x6d,0x61,0x70])](_0x4e6c75=>_0x4e6c75[_0x541ea9([0x73,0x70,0x6c,0x69,0x74])](_0x541ea9([0x2e])))[_0x541ea9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3166a7=>_0x3166a7[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3a6d98[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x541ea9([0x6d,0x61,0x70])](_0x52e3b4=>Array(_0x3a6d98[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x52e3b4[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x541ea9([0x66,0x69,0x6c,0x6c])](_0x52e3b4[0x0]===_0x541ea9([0x2a])?_0x541ea9([0x2a]):'')[_0x541ea9([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x52e3b4))[_0x541ea9([0x73,0x6f,0x6d,0x65])](_0x1f3309=>_0x3a6d98[_0x541ea9([0x65,0x76,0x65,0x72,0x79])]((_0x1bb8db,_0x3823d8)=>_0x1f3309[_0x3823d8]===_0x1bb8db||_0x1f3309[_0x3823d8]===_0x541ea9([0x2a])));}function _0x3db7c8(){return _0x1bc6f9&&_0x309d4a?new window[(_0x541ea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x19c6d1,_0x2c62a5)=>{_0x1bc6f9[_0x541ea9([0x74,0x68,0x65,0x6e])](_0x19c6d1,_0x2c62a5),_0x309d4a[_0x541ea9([0x74,0x68,0x65,0x6e])](_0x24331c=>{_0x24331c!=_0x541ea9([0x56,0x61,0x6c,0x69,0x64])&&_0x19c6d1(_0x24331c);},_0x2c62a5);}):_0x1bc6f9||_0x309d4a||_0x541ea9([0x56,0x61,0x6c,0x69,0x64]);}}function _0xcea8ae(_0x56db01,_0x59835b){return new window[(_0x541ea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x388e4a=>{if(_0x58d274())return _0x388e4a(_0x541ea9([0x56,0x61,0x6c,0x69,0x64]));_0x5cb413(),_0x101bad[_0x541ea9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x541ea9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4c9ab8=!0x1;const _0x4e3474=_0x1ed805();function _0x51527d(_0x29f20b){return!!_0x29f20b&&(typeof _0x29f20b===_0x541ea9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x29f20b===_0x541ea9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x29f20b[_0x541ea9([0x74,0x68,0x65,0x6e])]===_0x541ea9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x29f20b[_0x541ea9([0x63,0x61,0x74,0x63,0x68])]===_0x541ea9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2ee4fc(_0x44489c){_0x3b93c5(_0x44489c)[_0x541ea9([0x74,0x68,0x65,0x6e])](_0x228cb6=>{if(!_0x228cb6||_0x228cb6[_0x541ea9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x541ea9([0x6f,0x6b]))return _0x541ea9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x16b835(_0x2842bb(_0x4e3474+_0x59835b))!=_0x228cb6[_0x541ea9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x541ea9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x541ea9([0x56,0x61,0x6c,0x69,0x64]);})[_0x541ea9([0x74,0x68,0x65,0x6e])](_0x14f3f5=>(_0x5e0cc7(),_0x14f3f5),()=>{const _0x5a1883=_0x917e1();return null==_0x5a1883?(_0x5e0cc7(),_0x541ea9([0x56,0x61,0x6c,0x69,0x64])):_0x541ea9(_0x2dbca8-_0x5a1883>(0x11928db0^_0x3bd825)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x541ea9([0x74,0x68,0x65,0x6e])](_0x388e4a)[_0x541ea9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x388e4a(_0x541ea9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2b030c=0x35a8e730^_0x3bd825;function _0x5e0cc7(){const _0x3d2e9a=_0x541ea9([0x6c,0x6c,0x63,0x74,0x2d])+_0x16b835(_0x2842bb(_0x56db01)),_0x2dbad0=_0x595772(_0x16b835(window[_0x541ea9([0x4d,0x61,0x74,0x68])][_0x541ea9([0x63,0x65,0x69,0x6c])](_0x2dbca8/_0x2b030c)));window[_0x541ea9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x541ea9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3d2e9a,_0x2dbad0);}function _0x917e1(){const _0x4d4367=_0x541ea9([0x6c,0x6c,0x63,0x74,0x2d])+_0x16b835(_0x2842bb(_0x56db01)),_0x4ac6db=window[_0x541ea9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x541ea9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4d4367);return _0x4ac6db?window[_0x541ea9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x595772(_0x4ac6db),0x10)*_0x2b030c:null;}function _0x3b93c5(_0x1dbf1f){return new window[(_0x541ea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x266565,_0x23a87b)=>{_0x1dbf1f[_0x541ea9([0x74,0x68,0x65,0x6e])](_0x266565,_0x23a87b),window[_0x541ea9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x23a87b,0x359fdd70^_0x3bd825);});}}_0x101bad[_0x541ea9([0x6f,0x6e])](_0x541ea9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x339957,_0x123004)=>{if(_0x123004[0x0]!=_0x56db01)return _0x388e4a(_0x541ea9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x123004[0x1]={..._0x123004[0x1],[_0x541ea9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4e3474};},{[_0x541ea9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x541ea9([0x68,0x69,0x67,0x68])}),_0x101bad[_0x541ea9([0x6f,0x6e])](_0x541ea9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x328700=>{_0x51527d(_0x328700[_0x541ea9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4c9ab8=!0x0,_0x2ee4fc(_0x328700[_0x541ea9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x541ea9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x541ea9([0x6c,0x6f,0x77])}),_0x183618[_0x541ea9([0x74,0x68,0x65,0x6e])](()=>{_0x4c9ab8||_0x388e4a(_0x541ea9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x58d274(){return _0x101bad[_0x541ea9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x541ea9([0x76,0x69,0x65,0x77])][_0x541ea9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x541ea9([0x61,0x75,0x74,0x6f]);}function _0x5cb413(){_0x101bad[_0x541ea9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x541ea9([0x76,0x69,0x65,0x77])][_0x541ea9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x541ea9([0x61,0x75,0x74,0x6f]);}}function _0x5c750f(_0x4bc618){const _0x39c6d1=[new window[(_0x541ea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x282d4e=>setTimeout(_0x282d4e,0x3597377c^_0x3bd825)),_0x183618[_0x541ea9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x541ea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x288a55=>{const _0x1ad419=0x359e09b7^_0x3bd825,_0x1d4182=_0x1ad24a[_0x541ea9([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x413875(){_0x1d4182[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x1ad419&&_0x288a55();}_0x413875(),_0x1d4182[_0x541ea9([0x6f,0x6e])](_0x541ea9([0x61,0x64,0x64]),_0x413875);})),new window[(_0x541ea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b5a3c=>{function _0x2b71c2(){for(const _0x5df4b8 in window)if(window[_0x541ea9([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x541ea9([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x5df4b8))&&window[_0x5df4b8]==_0x5dcf67)return _0x4b5a3c();_0x101bad[_0x541ea9([0x73,0x74,0x61,0x74,0x65])]!=_0x541ea9([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x541ea9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2b71c2,0x359e1a38^_0x3bd825);}_0x2b5b9b(_0x541ea9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x2b71c2();})];return window[_0x541ea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x541ea9([0x72,0x61,0x63,0x65])](_0x39c6d1)[_0x541ea9([0x74,0x68,0x65,0x6e])](()=>_0x4bc618);}async function _0x4f1f66(){if(await _0x183618,_0x2b5b9b(_0x541ea9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x3f2596=_0x1ad24a[_0x541ea9([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x519fd3=_0x1ad24a[_0x541ea9([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])](_0x3f2596[_0x541ea9([0x69,0x64])]),_0x1ace55=_0x3940e4(_0x541ea9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1ace55[_0x541ea9([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x3f2596['id'],_0x519fd3?_0x519fd3['id']:null,!0x0),_0x1ace55[_0x541ea9([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x541ea9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1ace55[_0x541ea9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1ace55[_0x541ea9([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x5dba7d,void(_0x1ace55[_0x541ea9([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x5dba7d);}if(_0x2b5b9b(_0x541ea9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x4849d4=_0x3940e4(_0x541ea9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x4849d4[_0x541ea9([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x541ea9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4849d4[_0x541ea9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4849d4[_0x541ea9([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x5dba7d,_0x4849d4[_0x541ea9([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x5dba7d;}_0x101bad[_0x541ea9([0x6d,0x6f,0x64,0x65,0x6c])][_0x541ea9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5dba7d,_0x101bad[_0x541ea9([0x6d,0x6f,0x64,0x65,0x6c])][_0x541ea9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5dba7d,_0x101bad[_0x541ea9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x541ea9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4673cf(){return _0x2b5b9b(_0x541ea9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3940e4(_0x541ea9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x541ea9([0x73,0x74,0x61,0x74,0x65])]==_0x541ea9([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5013d4(){return _0x2b5b9b(_0x541ea9([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 _0x3d2259(){return _0x2b5b9b(_0x541ea9([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x6466a9(_0x5b9c1b){const _0x4fcc35=_0x31b1dd();_0x101bad[_0x4fcc35]=_0x541ea9([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])+_0x5b9c1b,_0x5b9c1b[_0x541ea9([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x541ea9([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x31b1dd()]=_0x5dcf67),_0x5b9c1b!=_0x541ea9([0x56,0x61,0x6c,0x69,0x64])&&_0x4f1f66();}function _0x31b1dd(){const _0x2879a3=window[_0x541ea9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x541ea9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x541ea9([0x6e,0x6f,0x77])]())[_0x541ea9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x541ea9([0x2e]),'');let _0x5b6fa7=_0x541ea9([0x76]);for(let _0x1443d3=0x0;_0x1443d3<_0x2879a3[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1443d3+=0x2){let _0xa0b7fb=window[_0x541ea9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2879a3[_0x541ea9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1443d3,_0x1443d3+0x2));_0xa0b7fb>=_0xfbba62[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xa0b7fb-=_0xfbba62[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5b6fa7+=_0xfbba62[_0xa0b7fb];}return _0x5b6fa7;}function _0x510e3e(){const _0x5dc58c=_0x3b7a90[_0x541ea9([0x73,0x70,0x6c,0x69,0x74])](_0x541ea9([0x2e]));if(0x3!=_0x5dc58c[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3c05a3(_0x5dc58c[0x1]);function _0x3c05a3(_0x34ba3e){const _0xbc2027=_0x55ff9f(_0x34ba3e);return _0xbc2027&&_0x7912d6()?_0xbc2027:null;function _0x7912d6(){const _0x3d441c=_0xbc2027[_0x541ea9([0x6a,0x74,0x69])],_0x2ddec8=window[_0x541ea9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3d441c[_0x541ea9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3d441c[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1cf44c={..._0xbc2027,[_0x541ea9([0x6a,0x74,0x69])]:_0x3d441c[_0x541ea9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3d441c[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1cf44c[_0x541ea9([0x76,0x63])],_0x2842bb(_0x1cf44c)==_0x2ddec8;}}}async function _0x5ccd85(){let _0x5c85b3=!0x0;try{const _0x1c9e3a=_0x3b7a90[_0x541ea9([0x73,0x70,0x6c,0x69,0x74])](_0x541ea9([0x2e])),[_0x34c86a,_0x443967,_0x142e6b]=_0x1c9e3a;return _0x116b14(_0x34c86a),await _0xef196d(_0x34c86a,_0x443967,_0x142e6b),_0x5c85b3;}catch{return!0x1;}function _0x116b14(_0x194695){const _0x3a1e4a=_0x55ff9f(_0x194695);_0x3a1e4a&&_0x3a1e4a[_0x541ea9([0x61,0x6c,0x67])]==_0x541ea9([0x45,0x53,0x32,0x35,0x36])||(_0x5c85b3=!0x1);}async function _0xef196d(_0x2efce0,_0x17a1b6,_0x242fbb){const _0x673fb4=window[_0x541ea9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x541ea9([0x66,0x72,0x6f,0x6d])](_0x7432c1(_0x242fbb),_0x2af7fd=>_0x2af7fd[_0x541ea9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4dd8f2=new window[(_0x541ea9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x541ea9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2efce0+_0x541ea9([0x2e])+_0x17a1b6),_0x2b27b8=window[_0x541ea9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x541ea9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2b27b8)return;const _0x5a2703=await _0x2b27b8[_0x541ea9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x541ea9([0x6a,0x77,0x6b]),_0x5e0a9f,{[_0x541ea9([0x6e,0x61,0x6d,0x65])]:_0x541ea9([0x45,0x43,0x44,0x53,0x41]),[_0x541ea9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x541ea9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x541ea9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2b27b8[_0x541ea9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x541ea9([0x6e,0x61,0x6d,0x65])]:_0x541ea9([0x45,0x43,0x44,0x53,0x41]),[_0x541ea9([0x68,0x61,0x73,0x68])]:{[_0x541ea9([0x6e,0x61,0x6d,0x65])]:_0x541ea9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5a2703,_0x673fb4,_0x4dd8f2)||(_0x5c85b3=!0x1);}}function _0x55ff9f(_0x33e22a){return _0x33e22a[_0x541ea9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x541ea9([0x65,0x79]))?JSON[_0x541ea9([0x70,0x61,0x72,0x73,0x65])](_0x7432c1(_0x33e22a)):null;}function _0x7432c1(_0x245f16){return window[_0x541ea9([0x61,0x74,0x6f,0x62])](_0x245f16[_0x541ea9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x541ea9([0x2b]))[_0x541ea9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x541ea9([0x2f])));}function _0x2842bb(_0x3144aa){let _0x491f1a=0x1505;function _0x9958a1(_0x2a34c7){for(let _0x5db6bd=0x0;_0x5db6bd<_0x2a34c7[_0x541ea9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5db6bd++){const _0x98cac0=_0x2a34c7[_0x541ea9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5db6bd);_0x491f1a=(_0x491f1a<<0x5)+_0x491f1a+_0x98cac0,_0x491f1a&=_0x491f1a;}}function _0x1e8abe(_0x54ba5a){Array[_0x541ea9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x54ba5a)?_0x54ba5a[_0x541ea9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1e8abe):_0x54ba5a&&typeof _0x54ba5a==_0x541ea9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x541ea9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x54ba5a)[_0x541ea9([0x73,0x6f,0x72,0x74])]()[_0x541ea9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x27b0da,_0xe77b10])=>{_0x9958a1(_0x27b0da),_0x1e8abe(_0xe77b10);}):_0x9958a1(window[_0x541ea9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x54ba5a));}return _0x1e8abe(_0x3144aa),_0x491f1a>>>0x0;}function _0x16b835(_0x38d7cc){return _0x38d7cc[_0x541ea9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x541ea9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x541ea9([0x30]));}function _0x595772(_0x5e3ff8){return _0x5e3ff8[_0x541ea9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x541ea9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x541ea9([0x6a,0x6f,0x69,0x6e])]('');}function _0x2b5b9b(_0x366948){return _0x101bad[_0x541ea9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x541ea9([0x68,0x61,0x73])](_0x366948);}function _0x3940e4(_0x4bd9bb){return _0x101bad[_0x541ea9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x541ea9([0x67,0x65,0x74])](_0x4bd9bb);}function _0x5dba7d(){}function _0x541ea9(_0xc3e4cd){return _0xc3e4cd['map'](_0x3e83b9=>String['fromCharCode'](_0x3e83b9))['join']('');}_0x6466a9(await _0x3abb59());}(this);}['createRevision'](_0x2555eb){const _0x3eb491=this['editor']['plugins']['get']('Users');return new vt({'id':_0x2555eb['id'],'name':_0x2555eb['name'],'creator':_0x2555eb['creatorId']?_0x3eb491['getUser'](_0x2555eb['creatorId']):null,'diffData':_0x2555eb['diffData']||_0x2555eb['data'],'authors':_0x2555eb['authorsIds']['map'](_0x252e4e=>_0x3eb491['getUser'](_0x252e4e)),'createdAt':new Date(_0x2555eb['createdAt']),'attributes':_0x2555eb['attributes'],'fromVersion':_0x2555eb['fromVersion'],'toVersion':_0x2555eb['toVersion']});}['addRevision'](_0x29948f,_0x403eab=0x0){this['_revisions']['add'](_0x29948f,_0x403eab);}['getRevision'](_0x2e7f8c){return this['_revisions']['get'](_0x2e7f8c);}['getRevisions'](_0x6fd25f={'toJSON':!0x1}){const _0x7ef0f2=Array['from'](this['_revisions']);return _0x7ef0f2['reverse'](),_0x6fd25f['toJSON']?_0x7ef0f2['map'](_0x5d2be5=>_0x5d2be5['toJSON']()):_0x7ef0f2;}['getIndex'](_0x492aff){return this['_revisions']['getIndex'](_0x492aff);}['getEarlierVisibleRevision'](_0x509254){const [,_0x49685a]=this['getRevisionsIterator'](_0x509254,{'direction':'earlier'});return _0x49685a;}['getLaterVisibleRevision'](_0x5738d2){const [,_0x577181]=this['getRevisionsIterator'](_0x5738d2,{'direction':'later'});return _0x577181;}['getRevisionsInDiff'](_0x521e18){const _0x11d000=[];for(const _0x5c837f of this['getRevisionsIterator'](_0x521e18['newRevisionId']))if(_0x11d000['push'](_0x5c837f),_0x5c837f['id']===_0x521e18['oldRevisionId'])break;return _0x11d000;}*['getRevisionsIterator'](_0x55ec00,{direction:_0x1f4de2='earlier',filter:_0x4424d4=()=>!0x0}={}){const _0xbf1128='earlier'===_0x1f4de2?0x1:-0x1;let _0x574b54=this['_revisions']['get'](_0x55ec00),_0x3635d3=this['getIndex'](_0x574b54);for(yield _0x574b54;_0x574b54;){if(_0x3635d3+=_0xbf1128,_0x574b54=this['getRevision'](_0x3635d3),!_0x574b54)return;_0x4424d4(_0x574b54)&&(yield _0x574b54);}}}class mt extends _0x5d0df7{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x4e8c54,'c'],[_0x2fa804,'a'],[_0x26d6bb,'e'],[_0x174bfb,'r'],[_0x327184,'u']]);['_typeCharToViewClass']=new Map([['c',_0x4e8c54],['a',_0x2fa804],['e',_0x26d6bb],['r',_0x174bfb],['u',_0x327184]]);async['loadRevisionData'](_0x4072ff,_0x4076cd){if(_0x4072ff['diffData']||!_0x4076cd)return;const _0x2f9ac3=this['editor']['config']['get']('collaboration.channelId'),_0x4e5f08=await _0x4076cd['getRevision']({'channelId':_0x2f9ac3,'revisionId':_0x4072ff['id']});_0x4072ff['diffData']=_0x4e5f08['diffData'];}['getRevisionDocumentData'](_0x2821d9){const _0x35b01b={};for(const _0x4b695f in _0x2821d9['diffData']){if(_0x2821d9['diffData'][_0x4b695f]['attachChange']&&!_0x2821d9['diffData'][_0x4b695f]['attachChange']['isAttached'])continue;const _0x58f090=this['_removeRevisionMarkers'](JSON['parse'](_0x2821d9['diffData'][_0x4b695f]['insertions'])),_0x4fb0c0=this['editor']['editing']['view']['document'],_0x9ee42a=new _0x58e4cd(_0x4fb0c0,_0x58f090['map'](_0x4b51d7=>this['_getViewFromDiffObj'](_0x4b51d7,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x35b01b[_0x4b695f]=this['editor']['data']['processor']['toData'](_0x9ee42a),this['editor']['data']['processor']['useFillerType']('default');}return _0x35b01b;}['getRevisionRootsAttributes'](_0x1acf49){const _0x2ebd58={};for(const _0xa9a45b in _0x1acf49['diffData'])_0x1acf49['diffData'][_0xa9a45b]['attachChange']&&!_0x1acf49['diffData'][_0xa9a45b]['attachChange']['isAttached']||(_0x2ebd58[_0xa9a45b]=_0x1acf49['diffData'][_0xa9a45b]['attributesAfter']||{});return _0x2ebd58;}['_getTypeCharForViewElement'](_0x5d519a){return this['_viewClassToTypeChar']['get'](_0x5d519a['constructor']);}['_getViewFromDiffObj'](_0xdfd5c,_0x1affc5){const _0x330bfb=this['editor']['editing']['view']['document'];if('string'==typeof _0xdfd5c)return new _0x5b98a7(_0x330bfb,_0xdfd5c);{let _0x1674c1,_0x5a8e67;_0x5a8e67='u'==_0xdfd5c['type']||'r'==_0xdfd5c['type']?[]:_0xdfd5c['children']['map'](_0x2b6bda=>this['_getViewFromDiffObj'](_0x2b6bda,_0x1affc5));const _0x4f3e43=this['_typeCharToViewClass']['get'](_0xdfd5c['type'])||_0x3a02ee,_0x2d2d78=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x1674c1=new _0x4f3e43(_0x330bfb,_0xdfd5c['name'],_0xdfd5c['attributes'],_0x5a8e67),'u'==_0xdfd5c['type']&&_0xdfd5c['children'][0x0]){const _0x236dba=_0xdfd5c['children'][0x0];if(_0x1674c1['render']=function(_0x12a629){const _0x26a9d6=_0x12a629['createElement']('div');return _0x26a9d6['innerHTML']=_0x236dba,_0x26a9d6['childNodes'][0x0];},_0x1affc5){const _0x44b750=new _0x58e4cd(_0x330bfb);_0x44b750['_appendChild'](_0x1674c1);const _0x57d20a=Array['from'](_0x2d2d78['viewChildrenToDom'](_0x44b750,{'bind':!0x1})),_0x43b472=_0x2d2d78['domDocument']['createElement']('div');_0x43b472['append'](..._0x57d20a),_0x1674c1=Array['from'](_0x2d2d78['domChildrenToView'](_0x43b472))[0x0];}}else{if('r'==_0xdfd5c['type']&&_0xdfd5c['children'][0x0]){const _0xd02edd=_0xdfd5c['children'][0x0];if(_0x1674c1['render']=function(_0x29e76f){_0x29e76f['innerHTML']=_0xd02edd;},_0x1affc5){const _0x19807f=new _0x58e4cd(_0x330bfb);_0x19807f['_appendChild'](_0x1674c1);const _0x17e960=Array['from'](_0x2d2d78['viewChildrenToDom'](_0x19807f,{'bind':!0x1})),_0x3e03ec=_0x2d2d78['domDocument']['createElement']('div');_0x3e03ec['append'](..._0x17e960);const _0x5661ec=Array['from'](_0x2d2d78['domChildrenToView'](_0x3e03ec));_0x5661ec['length']>0x1?_0x1674c1['_appendChild'](_0x5661ec):_0x1674c1=_0x5661ec[0x0];}}}if(_0xdfd5c['customProperties']){for(const [_0x48f758,_0x54d156]of _0xdfd5c['customProperties'])_0x1674c1['_setCustomProperty'](_0x48f758,_0x54d156);}const _0x4e279c=void 0x0===_0xdfd5c['fillerOffset']?null:_0xdfd5c['fillerOffset'];return null!==_0x4e279c&&(_0x1674c1['getFillerOffset']=()=>_0x4e279c),_0x1674c1;}}['_makeModelFromViewString'](_0x36c750){const _0x3fe570=JSON['parse'](_0x36c750),_0x5c8e1f=this['editor']['editing']['view']['document'],_0x521c42=new _0x58e4cd(_0x5c8e1f,_0x3fe570['map'](_0xd946ef=>this['_getViewFromDiffObj'](_0xd946ef,!0x0)));return this['editor']['data']['toModel'](_0x521c42);}['_removeRevisionMarkers'](_0x1583da){return(_0x1583da=_0x1583da['filter'](_0x8245b3=>!_0x8245b3['name']||'revision-start'!==_0x8245b3['name']&&'revision-end'!==_0x8245b3['name']))['forEach'](_0x4a16a7=>{'string'!=typeof _0x4a16a7&&(_0x4a16a7['children']=this['_removeRevisionMarkers'](_0x4a16a7['children']),_0x4a16a7['attributes']=_0x4a16a7['attributes']['filter'](_0x8d87c3=>!_0x8d87c3[0x0]['startsWith']('data-revision-')));}),_0x1583da;}}function wt(_0x2c567f,_0x204885,_0x3aa24e){const t=_0x2c567f['t'];switch(_0x204885){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'},_0x3aa24e);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3aa24e);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 pt extends _0x5d0df7{['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[_0x32ab6d,gt,mt,_0x27c358];}constructor(_0x20791d){super(_0x20791d),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new _t(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x468f65=_0x1ed805();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x468f65},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 _0x5c644d=this['repository']['getRevision'](0x0),_0x35fb66=_0x5c644d&&null===_0x5c644d['creator']?_0x5c644d:null;if(this['_continueCurrentRevision']=!!_0x35fb66&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4ec3a8=this['_source']['getCurrentRevisionId'](),_0x33e32a=this['repository']['getRevision'](_0x4ec3a8);if(_0x33e32a)this['_startingVersion']=_0x33e32a['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x49a899=this['_source']['history']['_operations']['find'](_0xac68b6=>!_0xac68b6['_isInit']),_0x57f327=_0x49a899?_0x49a899['baseVersion']:this['_source']['history']['version'];_0x5c644d?(_0x5c644d['toVersion']<_0x57f327&&_0x5c644d['_update']({'toVersion':_0x57f327}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x35fb66['id'],this['_startingVersion']=_0x35fb66['fromVersion']):(this['_startingVersion']=_0x5c644d['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x57f327,this['_continueCurrentRevision']=!0x1);}}else _0x35fb66&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x35fb66['toVersion'],this['editor']['model']['document']['history']['version']),_0x35fb66['fromVersion']===_0x35fb66['toVersion']?(0x0!==_0x35fb66['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x35fb66['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x35fb66['id'],this['_startingVersion']=_0x35fb66['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',_0x33fd96=>!_0x33fd96),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x39ad71=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3f60ba;for(const _0x4ec811 in _0x39ad71){const _0x36982b=_0x4ec811,_0x5ef0ea=_0x39ad71[_0x36982b];if('revisionHistoryLicenseKeyValid'==_0x5ef0ea||'revisionHistoryLicenseKeyInvalid'==_0x5ef0ea||'revisionHistoryLicenseKeyExpired'==_0x5ef0ea||'revisionHistoryLicenseKeyDomainLimit'==_0x5ef0ea||'revisionHistoryLicenseKeyNotAllowed'==_0x5ef0ea||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5ef0ea||'revisionHistoryLicenseKeyUsageLimit'==_0x5ef0ea){delete _0x39ad71[_0x36982b],_0x3f60ba=_0x5ef0ea,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x3f60ba&&_0x39ad71['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x3f60ba&&_0x39ad71['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x3f60ba&&_0x39ad71['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x3f60ba&&_0x39ad71['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x3f60ba&&_0x39ad71['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x3f60ba&&_0x39ad71['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x24985e=this['repository']['getRevision'](0x0),_0x5a92a3=await this['getRevisionDocumentData'](_0x24985e),_0x42f7b8=await this['getRevisionRootsAttributes'](_0x24985e);this['_replaceEditorDataWithRevisionData'](_0x5a92a3,_0x42f7b8);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3ff264){this['_source']=_0x3ff264;}async['update'](){const _0x21d51e=await this['_source']['getLatestVersion']();if(_0x21d51e>this['currentRevision']['toVersion']){await this['_loadState']();const _0x25a461=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x21d51e});_0x25a461['authors']=_0x25a461['authorsIds']['map'](_0x4bad01=>this['editor']['plugins']['get']('Users')['getUser'](_0x4bad01)),this['currentRevision']['_update'](_0x25a461);}}async['saveRevision'](_0x3c545d={},_0x59c90e=null){const _0x3ee373=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x59c90e>this['currentRevision']['toVersion']&&(_0x59c90e=null),null===_0x59c90e&&(_0x59c90e=await this['_source']['getLatestVersion']());const _0x533e24=this['_getFromVersion'](_0x59c90e),_0x1ba055=this['buildRevisionData']({'from':_0x533e24,'to':_0x59c90e});if(this['currentRevision']['toVersion']<_0x59c90e){const _0x3eb780=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x59c90e,'to':_0x59c90e});_0x3eb780['authors']=[],_0x3eb780['authorsIds']=[],_0x3eb780['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3eb780,!0x0),delete _0x3eb780['authors'],_0x3ee373['push'](_0x3eb780);}_0x3c545d['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x3c545d['name']=_0x3c545d['name']||null,_0x3c545d['id']=_0x3c545d['id']||_0x1ed805(),_0x3c545d={..._0x3c545d,..._0x1ba055};const _0x2c535e=this['addRevisionData'](_0x3c545d);_0x3ee373['push'](_0x3c545d);const _0x37d990=this['repository']['getIndex'](_0x2c535e);if(0x0!==_0x37d990){const _0x3f662e=this['repository']['getRevision'](_0x37d990-0x1);if(_0x3f662e['fromVersion']!==_0x59c90e){const _0x529e66=this['_revisionDataBuilder']['getData'](_0x59c90e,_0x3f662e['toVersion']),_0x70dbf9={'id':_0x3f662e['id'],'diffData':_0x529e66['diffData'],'authorsIds':_0x529e66['authorsIds'],'authors':_0x529e66['authorsIds']['map'](_0x28e05e=>this['editor']['plugins']['get']('Users')['getUser'](_0x28e05e)),'fromVersion':_0x59c90e};_0x3f662e===this['currentRevision']&&(_0x70dbf9['createdAt']=new Date(_0x3c545d['createdAt']['getTime']()+0xa)),_0x3f662e['_update'](_0x70dbf9,!0x0),delete _0x70dbf9['authors'],_0x3ee373['push'](_0x70dbf9);}}if(this['adapter']){for(const _0x5ddc50 of _0x3ee373)this['_bufferUpdate'](_0x5ddc50['id'],_0x5ddc50,!0x0);this['sendBufferedUpdates']();}return _0x2c535e;}['addRevisionData'](_0x238501){const _0x52fcfa=this['repository']['createRevision'](_0x238501);return this['adapter']&&_0x52fcfa['on']('_update',(_0x257640,_0x561fcc,_0x821c23)=>{_0x821c23||(this['_bufferUpdate'](_0x561fcc['id'],_0x561fcc,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x52fcfa,this['_findInsertionIndex'](_0x52fcfa)),_0x52fcfa;}async['getRevisionDocumentData'](_0x440c5e){return await this['_utils']['loadRevisionData'](_0x440c5e,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x440c5e);}async['getRevisionRootsAttributes'](_0x521ab8){return await this['_utils']['loadRevisionData'](_0x521ab8,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x521ab8);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x37e75a=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x35d219=0x0;_0x35d219<_0x37e75a['length'];_0x35d219++){const _0x224953=_0x37e75a[_0x35d219];let _0x156d73=!0x1;for(const _0x5b6ac6 of Object['keys'](_0x224953))void 0x0===_0x224953[_0x5b6ac6]?delete _0x224953[_0x5b6ac6]:'id'!==_0x5b6ac6&&(_0x156d73=!0x0);_0x156d73||(_0x37e75a[_0x35d219]=null);}if(_0x37e75a=_0x37e75a['filter'](_0x169a74=>null!==_0x169a74),!_0x37e75a['length'])return;for(let _0x6bcbf6=0x0;_0x6bcbf6<_0x37e75a['length'];_0x6bcbf6++){const _0x3b2d13=_0x37e75a[_0x6bcbf6];void 0x0!==_0x3b2d13['fromVersion']&&void 0x0===_0x3b2d13['toVersion']&&(_0x3b2d13['toVersion']=this['repository']['getRevision'](_0x3b2d13['id'])['toVersion']),void 0x0!==_0x3b2d13['toVersion']&&void 0x0===_0x3b2d13['fromVersion']&&(_0x3b2d13['fromVersion']=this['repository']['getRevision'](_0x3b2d13['id'])['fromVersion']);}const _0x568c11=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x37e75a,_0x568c11)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4c966a=>{if(_0x4c966a){for(const _0x3a0f6a of _0x4c966a)this['setRevisionData']({'id':_0x3a0f6a['id'],'createdAt':_0x3a0f6a['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x10d67a=null,from:_0xa6052c=null,to:_0x1cfabe=null}){_0xa6052c=null!==_0xa6052c?_0xa6052c:_0x10d67a['fromVersion'],_0x1cfabe=null!==_0x1cfabe?_0x1cfabe:_0x10d67a['toVersion'];const _0x5b74be=this['_revisionDataBuilder']['getData'](_0xa6052c,_0x1cfabe),_0x54505d={'diffData':_0x5b74be['diffData'],'authorsIds':_0x5b74be['authorsIds'],'fromVersion':_0xa6052c,'toVersion':_0x1cfabe};if(!_0x10d67a||_0x1cfabe!==_0x10d67a['toVersion']){const _0x155082=_0x1cfabe-0x1,_0x2b05da=this['_source']['history']['getOperation'](_0x155082);_0x54505d['createdAt']=_0x2b05da&&_0x2b05da['createdAt']||new Date();}if(this['_loadedStateData']&&_0xa6052c===this['_loadedStateData']['fromVersion']){for(const _0x45db67 of this['_loadedStateData']['authors'])_0x54505d['authorsIds']['includes'](_0x45db67['id'])||_0x54505d['authorsIds']['push'](_0x45db67['id']);}return _0x54505d;}['_bufferUpdate'](_0x534a3b,_0x5c25db,_0xcfd3d){if(this['_bufferedUpdates']['has'](_0x534a3b)){const _0x1d119f=this['_bufferedUpdates']['get'](_0x534a3b);_0x5c25db=_0xcfd3d?{..._0x1d119f,..._0x5c25db}:{..._0x5c25db,..._0x1d119f};}this['_bufferedUpdates']['set'](_0x534a3b,_0x5c25db);}['setRevisionData'](_0x40b2df){const _0x1801b1=this['repository']['getRevision'](_0x40b2df['id']);if(_0x40b2df['createdAt']&&(_0x40b2df['createdAt']=new Date(_0x40b2df['createdAt'])),_0x40b2df['authorsIds']){const _0x479865=this['editor']['plugins']['get']('Users');_0x40b2df['authors']=_0x40b2df['authorsIds']['map'](_0x1b9d3b=>_0x479865['getUser'](_0x1b9d3b));}_0x1801b1['_update'](_0x40b2df,!0x0);}['_createInitialRevision'](_0xf745df){const _0x21e2fb=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x21e2fb)this['_initialRevisionId']=_0x21e2fb['id'];else{const _0x568485=!this['editor']['model']['document']['roots']['find'](_0x32e124=>this['editor']['model']['hasContent'](_0x32e124)),_0x2bc85c=this['editor']['plugins']['get']('Users')['me']['id'],_0x5d0f93=wt(this['editor']['locale'],_0x568485?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0xf745df,'to':_0xf745df,'id':this['_initialRevisionId'],'name':_0x5d0f93,'creatorId':_0x2bc85c});}}['_createCurrentRevision'](_0x33aa09){const _0x377743=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x377743),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x33aa09,'to':_0x33aa09,'id':_0x377743,'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'](_0x20e166,_0xa7e186){const _0x56486f={},_0x4ca1c8={},_0x555a08=this['editor']['config']['get']('roots')||{};for(const [_0x229ae3,_0x50421b]of Object['entries'](_0x555a08))_0x50421b['lazyLoad']||(_0x56486f[_0x229ae3]=_0x50421b['initialData']??'',_0x4ca1c8[_0x229ae3]=_0x50421b['modelAttributes']||{});for(const _0x5a361a of this['editor']['model']['document']['getRootNames']())_0x56486f[_0x5a361a]??='',_0x4ca1c8[_0x5a361a]??={};let _0x5ed86b=!0x1;const _0x392fce=Object['keys'](_0x56486f),_0x41f044=Object['keys'](_0x20e166);for(const _0x5799ce of _0x392fce){if(_0x56486f[_0x5799ce]!==_0x20e166[_0x5799ce]&&''!==_0x56486f[_0x5799ce]['trim']()){_0x5ed86b=!0x0;break;}if(!_0x1188a0(_0x4ca1c8[_0x5799ce],_0xa7e186[_0x5799ce])&&Object['keys'](_0x4ca1c8[_0x5799ce])['length']>0x0){_0x5ed86b=!0x0;break;}}_0x5ed86b||(_0x5ed86b=_0x41f044['some'](_0x5ee8e6=>!this['editor']['model']['document']['getRoot'](_0x5ee8e6))),_0x5ed86b&&_0x3d361f('editor-initial-data-replaced-with-revision-data',{'editorData':_0x56486f,'editorRootsAttributes':_0x4ca1c8,'revisionData':_0x20e166,'revisionRootsAttributes':_0xa7e186});for(const [_0x4e5264,_0x506f0c]of Object['entries'](_0x20e166))this['editor']['config']['set']('roots.'+_0x4e5264+'.initialData',_0x506f0c);for(const [_0x150e6d,_0x5121cc]of Object['entries'](_0xa7e186))this['editor']['config']['set']('roots.'+_0x150e6d+'.modelAttributes',_0x5121cc);}['_addPendingAction'](){if(!this['_pendingAction']){const _0xe641f2=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0xe641f2['add'](wt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4c87ba){const _0x4435f4=this['repository']['getRevisions']();_0x4435f4['reverse']();let _0x363ab1=0x0;for(;_0x363ab1<_0x4435f4['length'];){const _0x2f8d51=_0x4435f4[_0x363ab1];if(_0x2f8d51===this['currentRevision']){_0x363ab1++;continue;}if(_0x2f8d51['id']===this['_initialRevisionId'])break;const _0x540aae=_0x4c87ba['toVersion']-_0x2f8d51['toVersion']||_0x4c87ba['fromVersion']-_0x2f8d51['fromVersion'];if(_0x540aae>0x0)break;if(_0x540aae<0x0)_0x363ab1++;else{if(!_0x4c87ba['creator']&&_0x2f8d51['creator'])break;if(_0x2f8d51['creator']||!_0x4c87ba['creator']){if(_0x4c87ba['createdAt']>_0x2f8d51['createdAt'])break;_0x363ab1++;}else _0x363ab1++;}}return _0x363ab1;}['_getFromVersion'](_0x13efb4){const _0x3812ee=this['repository']['getRevisions']();_0x3812ee['reverse'](),_0x3812ee['shift']();const _0x32dabf=_0x3812ee['find'](_0x531e61=>_0x531e61['toVersion']<=_0x13efb4)['toVersion'];return _0x32dabf<this['_startingVersion']?this['_startingVersion']:_0x32dabf;}['_makeRevision']({name:_0x339999,from:_0x371854,to:_0x45e785,creatorId:_0x539763,id:_0x4e6f10}){const _0x2b3978=this['buildRevisionData']({'from':_0x371854,'to':_0x45e785});_0x2b3978['name']=_0x339999,_0x2b3978['creatorId']=_0x539763,_0x2b3978['id']=_0x4e6f10;const _0x1644f7=this['addRevisionData'](_0x2b3978);return this['adapter']&&this['_bufferUpdate'](_0x2b3978['id'],_0x2b3978,!0x0),_0x1644f7;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class _t{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x461625){this['editor']=_0x461625,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'](_0x5a0f43){this['source']=_0x5a0f43;const _0xa303c3=new Map(),_0x2bc8b=new Map(),_0x430ea0=this['editor']['model']['document']['roots']['map'](_0x273374=>_0x273374['rootName']);for(const _0x6a406e of _0x430ea0){const _0x4a5c06=this['editor']['model']['document']['getRoot'](_0x6a406e),_0x1f1cad=yt(_0x4a5c06);_0xa303c3['set'](_0x6a406e,_0x1f1cad),_0x2bc8b['set'](_0x6a406e,Object['fromEntries'](_0x4a5c06['getAttributes']()));}const _0x4e4de3=Array['from'](this['editor']['model']['markers'])['map'](_0x2ea8b5=>[_0x2ea8b5['name'],_0x2ea8b5['getRange']()]),_0x5bb3d8=this['source']['version'];this['_saveMetaData'](_0x5bb3d8,_0xa303c3,_0x4e4de3,_0x2bc8b),this['_startingRevisionId']=this['_revisionId'];const _0x5d5461=new Map(),_0x456569=new Map();for(const _0x3dc178 of _0x430ea0){const _0x36c3e3=bt(_0x3dc178);_0x5d5461['set'](_0x3dc178,_0x36c3e3),_0x456569['set'](_0x3dc178,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x5d5461,[],_0x456569);}['getData'](_0x234e51,_0x1a39c7){if(this['_lastFrom']===_0x234e51&&this['_lastTo']<=_0x1a39c7)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1a39c7,!0x0);else{if(!this['_savedMetaData']['has'](_0x234e51)){const _0x379e1c=this['_getPreviousFrom'](_0x234e51);this['_calculateMetaData'](_0x379e1c,_0x234e51,!0x1);}this['_calculateMetaData'](_0x234e51,_0x1a39c7,!0x0);}return this['_lastFrom']=_0x234e51,this['_lastTo']=_0x1a39c7,this['_getState']();}['loadState'](_0x577f60){if(!this['_savedMetaData']['has'](_0x577f60['fromVersion'])){const _0x3825a8=this['_getPreviousFrom'](_0x577f60['fromVersion']);this['_calculateMetaData'](_0x3825a8,_0x577f60['fromVersion'],!0x1);}this['_calculateMetaData'](_0x577f60['fromVersion'],_0x577f60['toVersion'],!0x1);const _0x2fb16f=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x577f60['fromVersion'],this['_lastTo']=_0x577f60['toVersion'];for(const _0x2d0964 in _0x577f60['diffData']){const _0x342642=_0x577f60['diffData'][_0x2d0964]['attachChange'],_0x320632=_0x56b594(_0x577f60['diffData'][_0x2d0964]['attributesBefore'])||{},_0x1221ce=_0x2fb16f['_makeModelFromViewString'](_0x577f60['diffData'][_0x2d0964]['deletions']);_0x1221ce['rootName']=_0x2d0964,_0x1221ce['_isAttached']=!_0x342642||!_0x342642['isAttached'],_0x1221ce['isAttached']=()=>_0x1221ce['_isAttached'],this['_baseRoots']['set'](_0x2d0964,_0x1221ce),this['_baseRootsAttributes']['set'](_0x2d0964,_0x320632),_0x342642&&this['_touchedRoots']['set'](_0x2d0964,_0x342642);const _0x332e8a=this['_makeIdsRoot'](_0x1221ce);this['_baseIdsRoots']['set'](_0x2d0964,_0x332e8a);for(const [_0x503cf9,_0x2fbf6c]of _0x1221ce['markers']){if(!_0x503cf9['startsWith']('revision:'))continue;const _0xdf4c00=_0x503cf9['split'](':')[0x2];for(const _0x399daa of _0x2fbf6c['getWalker']({'singleCharacters':!0x0})){const _0x18ea2b=this['_getVidAttributeName'](_0x399daa),_0x3afd37='elementEnd'==_0x399daa['type']?_0x399daa['previousPosition']['path']['slice'](0x0,-0x1):_0x399daa['previousPosition']['path'],_0x185ad8=_0x332e8a['getNodeByPath'](_0x3afd37)['getAttribute'](_0x18ea2b);this['_touched']['set'](_0x185ad8,{'userId':_0xdf4c00});}_0x1221ce['markers']['delete'](_0x503cf9);}}this['_startingRevisionId']=this['_revisionId'];const _0x4bdc7d=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5a2468=>!this['_touched']['has'](_0x5a2468));let _0x52ab2c=0x0;const _0x2496e1=new Map();for(const _0x5e852e in _0x577f60['diffData']){const _0xb8518f=_0x577f60['diffData'][_0x5e852e]['attachChange'],_0x5035b6=_0x56b594(_0x577f60['diffData'][_0x5e852e]['attributesAfter'])||{},_0x2f5c50=_0x2fb16f['_makeModelFromViewString'](_0x577f60['diffData'][_0x5e852e]['insertions']);_0x2f5c50['rootName']=_0x5e852e,_0x2f5c50['_isAttached']=!_0xb8518f||_0xb8518f['isAttached'],_0x2f5c50['isAttached']=()=>_0x2f5c50['_isAttached'],this['_diffRoots']['set'](_0x5e852e,_0x2f5c50),this['_diffRootsAttributes']['set'](_0x5e852e,_0x5035b6);const _0x3f2d6b=this['_makeIdsRoot'](_0x2f5c50,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5e852e,_0x3f2d6b),_0x2496e1['set'](_0x5e852e,_0x2f5c50['isAttached']()?_0x5035b6:{});for(const [_0x1fe0f4,_0x28203d]of _0x2f5c50['markers']){if(!_0x1fe0f4['startsWith']('revision:'))continue;const _0x1f6467=_0x1fe0f4['split'](':')[0x2];for(const _0x231249 of _0x28203d['getWalker']({'singleCharacters':!0x0})){const _0x3501e6=this['_getVidAttributeName'](_0x231249),_0x5534fb=this['_revisionId']++,_0xc3d121='elementEnd'==_0x231249['type']?_0x231249['previousPosition']['path']['slice'](0x0,-0x1):_0x231249['previousPosition']['path'];_0x3f2d6b['getNodeByPath'](_0xc3d121)['_setAttribute'](_0x3501e6,_0x5534fb),this['_touched']['set'](_0x5534fb,{'userId':_0x1f6467});}_0x2f5c50['markers']['delete'](_0x1fe0f4);}for(const _0x3bf1ac of this['editor']['model']['createRangeIn'](_0x2f5c50)['getWalker']({'singleCharacters':!0x0})){const _0x375385=this['_getVidAttributeName'](_0x3bf1ac),_0x294ea4='elementEnd'==_0x3bf1ac['type']?_0x3bf1ac['previousPosition']['path']['slice'](0x0,-0x1):_0x3bf1ac['previousPosition']['path'],_0x3ffc98=_0x3f2d6b['getNodeByPath'](_0x294ea4);_0x3ffc98['getAttribute'](_0x375385)>0x0||_0x3ffc98['_setAttribute'](_0x375385,_0x4bdc7d[_0x52ab2c++]);}for(const [_0x36e0d0,_0x213a2c]of _0x2f5c50['markers'])_0x36e0d0['startsWith']('revision:')||this['_markers']['set'](_0x36e0d0,_0x213a2c);}const {roots:_0x266be7}=this['_savedMetaData']['get'](_0x577f60['fromVersion']),{roots:_0xf699d2}=this['_savedMetaData']['get'](_0x577f60['toVersion']),_0x54c90b=yt(_0x266be7['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x54c90b),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x54c90b,Number['NEGATIVE_INFINITY']));const _0xd92c1b=yt(_0xf699d2['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0xd92c1b),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xd92c1b));const _0x57ecaa=Array['from'](this['_diffRoots'])['map'](([_0x5d0631,_0x1ebd1b])=>[_0x5d0631,yt(_0x1ebd1b)]);this['_saveMetaData'](this['_lastTo'],_0x57ecaa,this['_markers'],_0x2496e1);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x40ab64,_0x49ee53,_0x520f13,_0x2e1e3a){const _0x1a94fe=new Map(_0x49ee53),_0x180ff5=new Map(_0x56b594(_0x2e1e3a)),_0x1af238=new Map();for(const [_0x80dd89,_0x406eb9]of _0x520f13)_0x1af238['set'](_0x80dd89,{'start':_0x406eb9['start']['clone'](),'end':_0x406eb9['end']['clone'](),'rootName':_0x406eb9['root']['rootName']});this['_savedMetaData']['set'](_0x40ab64,{'roots':_0x1a94fe,'markers':_0x1af238,'rootsAttributes':_0x180ff5});}['_removeMetaData'](_0x29010f){this['_savedMetaData']['delete'](_0x29010f);}['_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'](_0x2308fd,_0x2dcc5f=null){let _0x1d48fc=null;_0x2308fd['is']('documentFragment')||(_0x1d48fc=new _0x2a87f2(_0x2308fd['name'],{'vid_start':null===_0x2dcc5f?this['_revisionId']++:_0x2dcc5f++}));const _0xdadea5=[];for(const _0x33fb48 of _0x2308fd['getChildren']())if(_0x33fb48['is']('element')){_0xdadea5['push'](this['_makeIdsRoot'](_0x33fb48,_0x2dcc5f));const _0x16783e=_0xdadea5[_0xdadea5['length']-0x1];null!==_0x2dcc5f&&(_0x2dcc5f=_0x16783e['is']('element','$text')?_0x16783e['getAttribute']('vid')+0x1:_0x16783e['getAttribute']('vid_end')+0x1);}else{for(let _0x4c1b73=0x0;_0x4c1b73<_0x33fb48['offsetSize'];_0x4c1b73++)_0xdadea5['push'](new _0x2a87f2('$text',{'vid':null===_0x2dcc5f?this['_revisionId']++:_0x2dcc5f++}));}if(_0x2308fd['is']('documentFragment')){const _0x109c3a=bt(_0x2308fd['rootName']);return _0x109c3a['_insertChild'](0x0,_0xdadea5),_0x109c3a;}return _0x1d48fc['_setAttribute']('vid_end',null===_0x2dcc5f?this['_revisionId']++:_0x2dcc5f++),_0x1d48fc['_insertChild'](0x0,_0xdadea5),_0x1d48fc;}['_calculateMetaData'](_0x1fb945,_0x2b5936,_0x4f7ae0){this['_reset']();const {roots:_0x9aa54c,markers:_0x4420b3,rootsAttributes:_0x2c3c81}=this['_savedMetaData']['get'](_0x1fb945);this['_baseRoots']=new Map(_0x9aa54c),this['_baseRootsAttributes']=new Map(_0x56b594(_0x2c3c81));for(const [_0x4d1220,_0x3fe85a]of this['_baseRoots'])if('$graveyard'!==_0x4d1220&&(this['_diffRoots']['set'](_0x4d1220,yt(_0x3fe85a)),this['_diffRootsAttributes']=new Map(_0x56b594(_0x2c3c81)),_0x4f7ae0)){const _0x13fa25=this['_revisionId'];this['_idsRoots']['set'](_0x4d1220,this['_makeIdsRoot'](_0x3fe85a)),this['_baseIdsRoots']['set'](_0x4d1220,this['_makeIdsRoot'](_0x3fe85a,_0x13fa25));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',yt(this['_baseRoots']['get']('$graveyard'))),_0x4f7ae0&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0xd2dbd9,_0x1818d3]of _0x4420b3){const _0x57a846=this['_baseRoots']['get'](_0x1818d3['rootName']),_0x215bdd=this['_diffRoots']['get'](_0x1818d3['rootName']),_0x41770c=new _0x3796d6(this['_fixPosition'](_0x1818d3['start'],_0x57a846),this['_fixPosition'](_0x1818d3['end'],_0x57a846)),_0x35b011=this['_fixRange'](_0x41770c,_0x215bdd);_0x57a846['markers']['set'](_0xd2dbd9,_0x41770c),this['_markers']['set'](_0xd2dbd9,_0x35b011);}this['_applyOperations'](_0x1fb945,_0x2b5936,_0x4f7ae0);}['_applyOperations'](_0xf79f47,_0x5c424e,_0x19b9d2){for(const _0x58a085 of this['source']['getOperations'](_0xf79f47,_0x5c424e))this['_handleOperation'](_0x58a085,_0x19b9d2);for(const _0x3d3e90 of this['_diffRoots']['values']())_0x3d3e90['markers']['clear']();for(const [_0xd59f42,_0x4320a0]of this['_markers']){this['_diffRoots']['get'](_0x4320a0['root']['rootName'])['markers']['set'](_0xd59f42,_0x4320a0['clone']());}const _0x4debc2=new Map(),_0x5d7d18=new Map();for(const [_0x332182,_0x200bd0]of this['_diffRoots'])_0x4debc2['set'](_0x332182,yt(_0x200bd0)),_0x5d7d18['set'](_0x332182,this['_diffRootsAttributes']['get'](_0x332182));this['_saveMetaData'](_0x5c424e,_0x4debc2,this['_markers'],_0x5d7d18);}['_getPreviousFrom'](_0x92d294){const _0x198564=Array['from'](this['_savedMetaData']['keys']());_0x198564['sort']((_0x55fef2,_0x3305f2)=>_0x55fef2-_0x3305f2),_0x198564['reverse']();for(const _0x4733ef of _0x198564)if(_0x4733ef<_0x92d294)return _0x4733ef;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x299c44,_0x2ba75e){const _0x2dd2bb=Array['from'](_0x2ba75e['markers'])['map'](([_0x429ad5,_0x545d21])=>[_0x429ad5,this['_fixRange'](_0x545d21,_0x299c44)]);_0x299c44['markers']=new Map(_0x2dd2bb);}['_transformMarkers'](_0x835443){for(const _0x7ec88e of this['_markers']['values']()){const _0x45e0b5=_0x7ec88e['getTransformedByOperation'](_0x835443),_0x1c4989=_0x3796d6['_createFromRanges'](_0x45e0b5);_0x7ec88e['start']=_0x1c4989['start'],_0x7ec88e['end']=_0x1c4989['end'];}}['_handleOperation'](_0x38c54f,_0x528777){if('addRoot'!=_0x38c54f['type']&&'detachRoot'!=_0x38c54f['type']){if('insert'==_0x38c54f['type']){const _0x46fc3d=_0x38c54f['position']['root']['rootName'];this['_diffRoots']['has'](_0x46fc3d)||(this['_diffRoots']['set'](_0x46fc3d,bt(_0x46fc3d,!0x0)),this['_diffRootsAttributes']['set'](_0x46fc3d,{}),_0x528777&&this['_idsRoots']['set'](_0x46fc3d,bt(_0x46fc3d,!0x0)));}else{if('addRootAttribute'==_0x38c54f['type']||'removeRootAttribute'==_0x38c54f['type']||'changeRootAttribute'==_0x38c54f['type'])return void this['_handleRootAttributeOperation'](_0x38c54f);'marker'==_0x38c54f['type']&&this['_handleMarkerOperation'](_0x38c54f);}if('marker'!==_0x38c54f['type']){const _0x53d945=this['_cloneOperation'](_0x38c54f,this['_diffRoots']);_0x53d945['_execute'](),this['_transformMarkers'](_0x53d945);}if(_0x528777)switch(_0x38c54f['type']){case'insert':this['_handleInsertOperation'](_0x38c54f);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x38c54f);break;case'merge':this['_handleMergeOperation'](_0x38c54f);break;case'split':this['_handleSplitOperation'](_0x38c54f);}}else this['_handleRootOperation'](_0x38c54f,_0x528777);}['_cloneOperation'](_0x1cc40c,_0x14516e){const _0xfe5487=_0x1cc40c['clone']();return _0xfe5487['_authorId']=_0x1cc40c['_authorId'],this['_fixOperation'](_0xfe5487,_0x14516e),_0xfe5487;}['_getBaseVids'](_0x9ecc9e){return _0x9ecc9e['map'](_0x3c023a=>{const _0x1ddbd2=this['_getVidAttributeName'](_0x3c023a);return Number(_0x3c023a['item']['getAttribute'](_0x1ddbd2));});}['_generateTape'](_0x66eaba,_0x9142f){if(_0x66eaba['is']('element','$text'))_0x9142f['push']({'item':_0x66eaba,'type':'text'});else{_0x66eaba['is']('element')&&_0x9142f['push']({'item':_0x66eaba,'type':'elementStart'});for(const _0x39902d of _0x66eaba['getChildren']())this['_generateTape'](_0x39902d,_0x9142f);_0x66eaba['is']('element')&&_0x9142f['push']({'item':_0x66eaba,'type':'elementEnd'});}return _0x9142f;}['_getState'](){const _0x1edd0d=new Map(this['_touched']),_0x468737=new Map(_0x1edd0d),_0x3ff126=new Map(),_0x2fa1fc={'insertions':{},'deletions':{}},_0x3cf8d0={'insertions':{},'deletions':{}},_0xd3eb8c=new Map(),_0x344c6b=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x344c6b['delete']('$graveyard');for(const _0x27e0a3 of _0x344c6b){const _0x24faf9=this['_diffRoots']['get'](_0x27e0a3)||bt(_0x27e0a3,!0x1),_0x47c456=this['_baseRoots']['get'](_0x27e0a3)||bt(_0x27e0a3,!0x1);_0x24faf9['isAttached']()||_0x47c456['isAttached']()?(_0x2fa1fc['insertions'][_0x27e0a3]=yt(_0x24faf9),_0x2fa1fc['deletions'][_0x27e0a3]=yt(_0x47c456),this['_copyMarkers'](_0x2fa1fc['deletions'][_0x27e0a3],_0x47c456),this['_copyMarkers'](_0x2fa1fc['insertions'][_0x27e0a3],_0x24faf9),_0x3cf8d0['insertions'][_0x27e0a3]=this['_generateTape'](this['_idsRoots']['get'](_0x27e0a3),[]),_0x3cf8d0['deletions'][_0x27e0a3]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x27e0a3)||bt(_0x27e0a3,!0x1),[])):_0x344c6b['delete'](_0x27e0a3);}for(const _0x1b11b3 of _0x344c6b){const _0x1769e5=_0x3cf8d0['insertions'][_0x1b11b3];for(const _0x5e4c99 of _0x1769e5){const _0x473e8e=this['_getVidAttributeName'](_0x5e4c99),_0x1cb379=_0x5e4c99['item']['getAttribute'](_0x473e8e);_0x468737['delete'](_0x1cb379),_0x1cb379>=this['_startingRevisionId']&&_0x3ff126['set'](_0x1cb379,_0x1edd0d['get'](_0x1cb379));}}for(const _0x234665 of _0x344c6b){const _0x26a227=_0x3cf8d0['insertions'][_0x234665],_0x2eb192=this['_getBaseVids'](_0x3cf8d0['deletions'][_0x234665]);let _0x4a41e9=0x0;for(const _0x5cf387 of _0x26a227){const _0x9be556=this['_getVidAttributeName'](_0x5cf387),_0x415f04=_0x5cf387['item']['getAttribute'](_0x9be556);if(!_0x3ff126['has'](_0x415f04)&&!_0xd3eb8c['has'](_0x415f04)){if(_0x468737['has'](_0x415f04))_0x4a41e9++;else{if(_0x415f04!=_0x2eb192[_0x4a41e9]){const _0x2ae084=_0x1edd0d['get'](_0x415f04)||_0x1edd0d['get'](_0x2eb192[_0x4a41e9]);for(;_0x415f04!=_0x2eb192[_0x4a41e9];)_0x468737['has'](_0x2eb192[_0x4a41e9])||(_0xd3eb8c['set'](_0x2eb192[_0x4a41e9],_0x2ae084),_0x1edd0d['set'](_0x2eb192[_0x4a41e9],_0x2ae084)),_0x4a41e9++;}_0x4a41e9++;}}}}for(const _0x517cff of _0x344c6b){const _0x552816=_0x3cf8d0['insertions'][_0x517cff];for(const _0x474117 of _0x552816){const _0xbb291c=this['_getVidAttributeName'](_0x474117),_0x4d916b=_0x474117['item']['getAttribute'](_0xbb291c);if(_0xd3eb8c['has'](_0x4d916b)){const _0xc200c0=_0xd3eb8c['get'](_0x4d916b);_0x468737['has'](_0x4d916b)||_0x468737['set'](_0x4d916b,{..._0xc200c0}),_0x3ff126['set'](_0x4d916b,{..._0xc200c0});}}}for(const _0x142951 of _0x468737['keys']())_0x142951>=this['_startingRevisionId']&&_0x468737['delete'](_0x142951);const _0x14364f=new Map();for(const _0x1a60d8 of _0x344c6b){let _0x55834d=_0x3cf8d0['insertions'][_0x1a60d8];for(const _0x1918d5 of _0x55834d)if(_0x1918d5['item']['is']('element','tableCell')){const _0x1526bf=this['_getVidAttributeName'](_0x1918d5),_0x5131b1=_0x1918d5['item']['getAttribute'](_0x1526bf);if(_0x3ff126['has'](_0x5131b1)){const _0x5e7935=_0x1918d5['item']['parent']['parent']['getAttribute']('vid_start'),_0x42e2fb=_0x14364f['get'](_0x5e7935)||new Set();_0x42e2fb['add'](_0x3ff126['get'](_0x5131b1)['userId']),_0x14364f['set'](_0x5e7935,_0x42e2fb);}}_0x55834d=_0x3cf8d0['deletions'][_0x1a60d8];for(const _0x207908 of _0x55834d)if(_0x207908['item']['is']('element','tableCell')){const _0x2893c2=this['_getVidAttributeName'](_0x207908),_0x1dd625=_0x207908['item']['getAttribute'](_0x2893c2);if(_0x468737['has'](_0x1dd625)){const _0x49eb2c=_0x207908['item']['parent']['parent']['getAttribute']('vid_start'),_0x584065=_0x14364f['get'](_0x49eb2c)||new Set();_0x584065['add'](_0x468737['get'](_0x1dd625)['userId']),_0x14364f['set'](_0x49eb2c,_0x584065);}}for(const _0x3ab07d of _0x14364f['keys']())(_0x3ff126['has'](_0x3ab07d)||_0x468737['has'](_0x3ab07d))&&_0x14364f['delete'](_0x3ab07d);}for(const _0x3bd76d of _0x344c6b){const _0x35f7e1=_0x3cf8d0['insertions'][_0x3bd76d];let _0x16bada=null,_0xb8d8e5=null;for(const _0x3f7fdc of _0x35f7e1){const _0x49153b=this['_getVidAttributeName'](_0x3f7fdc),_0x42a561=_0x3f7fdc['item']['getAttribute'](_0x49153b),_0x4ffc35=_0x14364f['get'](_0x42a561);_0x4ffc35&&'elementStart'==_0x3f7fdc['type']&&(_0x16bada=Array['from'](_0x4ffc35)[0x0],_0xb8d8e5=_0x3f7fdc['item']['getAttribute']('vid_end')),_0x16bada&&(_0x468737['set'](_0x42a561,{'userId':_0x16bada}),_0x3ff126['set'](_0x42a561,{'userId':_0x16bada})),_0x42a561==_0xb8d8e5&&(_0x16bada=null,_0xb8d8e5=null);}}const _0x1df9ef={},_0x9590de=new Set();for(const _0x374d03 of _0x344c6b){const _0x34bc39=_0x2fa1fc['deletions'][_0x374d03],_0x4b4f5d=_0x2fa1fc['insertions'][_0x374d03];for(const {userId:_0x4ebdb5}of this['_touchedMarkers']['values']())null!==_0x4ebdb5&&_0x9590de['add'](_0x4ebdb5);for(const {userId:_0x1fb214}of this['_touchedRoots']['values']())null!==_0x1fb214&&_0x9590de['add'](_0x1fb214);this['_markChanges'](_0x4b4f5d,_0x3cf8d0['insertions'][_0x374d03],_0x3ff126,'insertion',_0x9590de),this['_markChanges'](_0x34bc39,_0x3cf8d0['deletions'][_0x374d03],_0x468737,'deletion',_0x9590de),_0x1df9ef[_0x374d03]={'insertions':this['_prepareViewToSave'](_0x4b4f5d),'deletions':this['_prepareViewToSave'](_0x34bc39),'attachChange':this['_touchedRoots']['get'](_0x374d03)||null,'attributesBefore':_0x56b594(this['_baseRootsAttributes']['get'](_0x374d03))||{},'attributesAfter':_0x56b594(this['_diffRootsAttributes']['get'](_0x374d03))};}return{'diffData':_0x1df9ef,'authorsIds':Array['from'](_0x9590de)};}['_processRootBeforeSave'](_0x335ce3){for(const [,_0x5dcc48]of _0x335ce3['markers']){const _0x376a81=_0x5dcc48['start']['getAncestors']()['filter'](_0x576302=>'tableCell'==_0x576302['name']);for(const _0x2ded45 of _0x376a81)0x1==_0x2ded45['childCount']&&_0x2ded45['getChild'](0x0)['is']('element','paragraph')&&_0x2ded45['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x56a474){this['_processRootBeforeSave'](_0x56a474);const _0x2d6bae=this['editor']['data']['toView'](_0x56a474,{}),_0x358efa=Array['from'](_0x2d6bae['getChildren']())['map'](_0x281955=>this['_getViewJson'](_0x281955));return JSON['stringify'](_0x358efa);}['_getViewJson'](_0x3db541){if(_0x3db541['is']('$text'))return _0x3db541['data'];{const _0xe69999=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x946f23=_0x3db541,_0x4ae9b4=this['editor']['data']['htmlProcessor']['domConverter'],_0x28f841={'type':_0xe69999['_getTypeCharForViewElement'](_0x946f23),'name':_0x946f23['name'],'attributes':Array['from'](_0x946f23['getAttributes']()),'children':Array['from'](_0x946f23['getChildren']())['map'](_0x4223ec=>this['_getViewJson'](_0x4223ec))};if(_0x3db541['is']('uiElement')&&'$comment'!=_0x3db541['name']){const _0x669be7=_0x3db541['render'](_0x4ae9b4['domDocument'],_0x4ae9b4);_0x28f841['children']['push'](_0x669be7['outerHTML']);}else{if(_0x3db541['is']('rawElement')){const _0x65da06=_0x4ae9b4['domDocument']['createElement'](_0x946f23['name']);_0x3db541['render'](_0x65da06,_0x4ae9b4),_0x28f841['children']['push'](_0x65da06['innerHTML']);}}const _0x5302c1=Array['from'](_0x946f23['getCustomProperties']());_0x5302c1['length']>0x0&&(_0x28f841['customProperties']=_0x5302c1);const _0x410366=_0x946f23['getFillerOffset']();return null!==_0x410366&&(_0x28f841['fillerOffset']=_0x410366),_0x28f841;}}['_markChanges'](_0x41b23e,_0x4fedf0,_0x5e81e5,_0x369828,_0x16d159){let _0x9f2671=null,_0x3470f4=null,_0x303ade=0x0;const _0xed01fc=this['editor']['model'];for(let _0x3ced4c=0x0;_0x3ced4c<_0x4fedf0['length'];_0x3ced4c++){const _0x57a0b4=this['_getVidAttributeName'](_0x4fedf0[_0x3ced4c]),_0xe09eb0=_0x4fedf0[_0x3ced4c]['item']['getAttribute'](_0x57a0b4),_0x433cd7=_0x5e81e5['get'](_0xe09eb0),_0x5e16a8=_0x3ced4c==_0x4fedf0['length']-0x1;(!_0x9f2671&&_0x433cd7&&(_0x9f2671=_0x433cd7,_0x3470f4=_0x4fedf0[_0x3ced4c]),_0x9f2671&&(!_0x433cd7||_0x433cd7['userId']!=_0x9f2671['userId']))&&(_0x486e63(_0x433cd7,Rt(_0x3470f4,_0x41b23e,_0xed01fc),Rt(_0x4fedf0[_0x3ced4c],_0x41b23e,_0xed01fc)),_0x9f2671=_0x433cd7||null,_0x3470f4=_0x433cd7?_0x4fedf0[_0x3ced4c]:null),_0x9f2671&&_0x5e16a8&&_0x486e63(_0x433cd7,Rt(_0x3470f4,_0x41b23e,_0xed01fc),kt(_0x4fedf0[_0x3ced4c],_0x41b23e,_0xed01fc));}function _0x486e63(_0x5b4db9,_0x3d2d6a,_0x2ee9d5){const _0x4e2813=_0x9f2671['userId'],_0x2eb461='revision:'+_0x369828+':'+_0x4e2813+':'+_0x303ade++,_0x29bb8c=_0xed01fc['createRange'](_0x3d2d6a,_0x2ee9d5);_0x41b23e['markers']['set'](_0x2eb461,_0x29bb8c),null!==_0x4e2813&&_0x16d159['add'](_0x4e2813);}}['_getVidAttributeName'](_0x77fa41){switch(_0x77fa41['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x29038f,_0x46e0ce){_0x29038f['baseVersion']=null;for(const _0x29ca79 in _0x29038f){const _0xcb1c31=_0x29038f[_0x29ca79];if(_0xcb1c31 instanceof _0x4bc824){const _0x278c12=_0x46e0ce['get'](_0xcb1c31['root']['rootName']);_0x29038f[_0x29ca79]=this['_fixPosition'](_0xcb1c31,_0x278c12);}if(_0xcb1c31 instanceof _0x3796d6){const _0x568a61=_0x46e0ce['get'](_0xcb1c31['root']['rootName']);_0x29038f[_0x29ca79]=this['_fixRange'](_0xcb1c31,_0x568a61);}'root'===_0x29ca79&&(_0x29038f['root']=_0x46e0ce['get'](_0x29038f['root']['rootName']));}}['_fixRange'](_0x402bb7,_0x4ccd76){return this['editor']['model']['createRange'](this['_fixPosition'](_0x402bb7['start'],_0x4ccd76),this['_fixPosition'](_0x402bb7['end'],_0x4ccd76));}['_fixPosition'](_0x3435e8,_0x24f067){return this['editor']['model']['createPositionFromPath'](_0x24f067,_0x3435e8['path'],_0x3435e8['stickiness']);}['_handleInsertOperation'](_0x20142e){const _0x53a3fc=this['_idsRoots']['get'](_0x20142e['position']['root']['rootName']),_0x4c5f99=this['_fixPosition'](_0x20142e['position'],_0x53a3fc),_0x52926b=null===_0x20142e['_authorId']?null:_0x20142e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3665de=_0x4c5f99['parent'],_0x171ff7=this['_revisionId'],_0x3b77cb=[];for(const _0x482c99 of _0x20142e['nodes'])if(_0x482c99['is']('element'))_0x3b77cb['push'](this['_makeIdsRoot'](_0x482c99));else{for(let _0x47d7dd=0x0;_0x47d7dd<_0x482c99['offsetSize'];_0x47d7dd++)_0x3b77cb['push'](new _0x2a87f2('$text',{'vid':this['_revisionId']++}));}const _0x28fbd0=this['_revisionId'];for(let _0x44a96e=_0x171ff7;_0x44a96e<_0x28fbd0;_0x44a96e++)this['_touched']['set'](_0x44a96e,{'userId':_0x52926b});_0x3665de['_insertChild'](_0x4c5f99['offset'],_0x3b77cb);}['_handleMoveOperation'](_0x136341){(_0x136341=this['_cloneOperation'](_0x136341,this['_idsRoots']))['_execute']();const _0x294087=null===_0x136341['_authorId']?null:_0x136341['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x17656b=_0x136341['getMovedRangeStart'](),_0x52bdac=_0x17656b['parent'],_0x37cd44=_0x17656b['offset'];!function _0x4358dc(_0xdb7e90,_0x581d7c,_0x235d6e,_0x3e099f){for(let _0x59bac5=_0x235d6e;_0x59bac5<_0x3e099f;_0x59bac5++){const _0x25c705=_0x581d7c['getChild'](_0x59bac5);_0x25c705['is']('element','$text')?_0xdb7e90['set'](_0x25c705['getAttribute']('vid'),{'userId':_0x294087}):(_0xdb7e90['set'](_0x25c705['getAttribute']('vid_start'),{'userId':_0x294087}),_0x4358dc(_0xdb7e90,_0x25c705,0x0,_0x25c705['childCount']),_0xdb7e90['set'](_0x25c705['getAttribute']('vid_end'),{'userId':_0x294087}));}}(this['_touched'],_0x52bdac,_0x37cd44,_0x37cd44+_0x136341['howMany']);}['_handleMergeOperation'](_0x15b30f){const _0x5fe862=null===(_0x15b30f=this['_cloneOperation'](_0x15b30f,this['_idsRoots']))['_authorId']?null:_0x15b30f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xed4a86=_0x15b30f['targetPosition']['parent'],_0x300397=_0x15b30f['sourcePosition']['parent'],_0x4300b5=_0xed4a86['getAttribute']('vid_end'),_0x4020d7=_0x300397['getAttribute']('vid_start');_0xed4a86['_setAttribute']('vid_end',_0x300397['getAttribute']('vid_end')),_0x300397['_setAttribute']('vid_end',_0x4300b5),this['_touched']['set'](_0x4020d7,{'userId':_0x5fe862}),this['_touched']['set'](_0x4300b5,{'userId':_0x5fe862}),_0x15b30f['_execute']();}['_handleSplitOperation'](_0x34ca37){const _0x4e6255=null===(_0x34ca37=this['_cloneOperation'](_0x34ca37,this['_idsRoots']))['_authorId']?null:_0x34ca37['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c0877=_0x34ca37['graveyardPosition'],_0x307174=_0x34ca37['splitPosition']['parent'];_0x34ca37['_execute']();const _0x12991b=_0x307174['getAttribute']('vid_end'),_0x3353c3=_0x34ca37['insertionPosition']['nodeAfter'];if(_0x4c0877){const _0x51aff2=_0x3353c3['getAttribute']('vid_end'),_0x13749c=_0x307174['getAttribute']('vid_end');_0x307174['_setAttribute']('vid_end',_0x51aff2),_0x3353c3['_setAttribute']('vid_end',_0x13749c),this['_touched']['set'](_0x307174['getAttribute']('vid_end'),{'userId':_0x4e6255}),this['_touched']['set'](_0x3353c3['getAttribute']('vid_start'),{'userId':_0x4e6255});}else{const _0x439f31=this['_revisionId']++,_0x1fbc94=this['_revisionId']++;_0x307174['_setAttribute']('vid_end',_0x439f31),_0x3353c3['_setAttribute']('vid_start',_0x1fbc94),_0x3353c3['_setAttribute']('vid_end',_0x12991b),this['_touched']['set'](_0x439f31,{'userId':_0x4e6255}),this['_touched']['set'](_0x1fbc94,{'userId':_0x4e6255});}}['_handleMarkerOperation'](_0x1514b4){if(!_0x1514b4['affectsData'])return;const _0x12cbae=(_0x1514b4=this['_cloneOperation'](_0x1514b4,this['_diffRoots']))['oldRange']?_0x1514b4['oldRange']['root']:null,_0xaeefb2=_0x1514b4['newRange']?_0x1514b4['newRange']['root']:null;_0x12cbae&&this['_markers']['delete'](_0x1514b4['name']),_0xaeefb2&&this['_markers']['set'](_0x1514b4['name'],_0x1514b4['newRange']['clone']());const _0x41a03b=null===_0x1514b4['_authorId']?null:_0x1514b4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x21b940=_0x1514b4['name'];if(!this['_touchedMarkers']['has'](_0x21b940))return void this['_touchedMarkers']['set'](_0x21b940,{'range':_0x1514b4['oldRange'],'userId':_0x41a03b});const _0x10a450=this['_touchedMarkers']['get'](_0x21b940),_0x2cb380=_0x10a450['range'],_0x3782c2=_0x1514b4['newRange'];null==_0x2cb380&&null==_0x3782c2||_0x2cb380&&_0x3782c2&&_0x2cb380['isEqual'](_0x3782c2)?this['_touchedMarkers']['delete'](_0x1514b4['name']):_0x10a450['userId']=_0x41a03b;}['_handleRootOperation'](_0x535069,_0x5d6b7b){this['_diffRoots']['has'](_0x535069['rootName'])?this['_diffRoots']['get'](_0x535069['rootName'])['_isAttached']=_0x535069['isAdd']:(this['_diffRoots']['set'](_0x535069['rootName'],bt(_0x535069['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x535069['rootName'],{}),_0x5d6b7b&&this['_idsRoots']['set'](_0x535069['rootName'],bt(_0x535069['rootName'],!0x0)));const _0x1bcf4c=null===_0x535069['_authorId']?null:_0x535069['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xb5d6bb=this['_touchedRoots']['get'](_0x535069['rootName']);_0xb5d6bb&&_0xb5d6bb['userId']===_0x1bcf4c?this['_touchedRoots']['delete'](_0x535069['rootName']):this['_touchedRoots']['set'](_0x535069['rootName'],{'userId':_0x1bcf4c,'isAttached':_0x535069['isAdd']});}['_handleRootAttributeOperation'](_0x165830){const _0x4d141a=this['_diffRootsAttributes']['get'](_0x165830['root']['rootName']);null===_0x165830['newValue']?delete _0x4d141a[_0x165830['key']]:_0x4d141a[_0x165830['key']]=_0x165830['newValue'];}}function yt(_0x1fadc1){const _0x3e00a4=bt(_0x1fadc1['rootName'],_0x1fadc1['isAttached']());for(const _0x3eac1b of _0x1fadc1['getChildren']()){const _0x16c37b=_0x3eac1b['_clone'](!0x0);_0x3e00a4['_appendChild'](_0x16c37b);}return _0x3e00a4;}function bt(_0x1190d0,_0x40c62d=!0x0){const _0x3fd296=new _0x483c92();return _0x3fd296['rootName']=_0x1190d0,_0x3fd296['_isAttached']=_0x40c62d,_0x3fd296['isAttached']=()=>_0x3fd296['_isAttached'],_0x3fd296;}function Rt(_0x101c7d,_0x44a02f,_0x228b2a){const _0x369402='elementEnd'==_0x101c7d['type']?_0x228b2a['createPositionAt'](_0x101c7d['item'],'end'):_0x228b2a['createPositionBefore'](_0x101c7d['item']);return _0x228b2a['createPositionFromPath'](_0x44a02f,_0x369402['path'],_0x369402['stickiness']);}function kt(_0x42befe,_0x4856fc,_0x2f6f16){const _0x20f614='elementStart'==_0x42befe['type']?_0x2f6f16['createPositionAt'](_0x42befe['item'],0x0):_0x2f6f16['createPositionAfter'](_0x42befe['item']);return _0x2f6f16['createPositionFromPath'](_0x4856fc,_0x20f614['path'],_0x20f614['stickiness']);}class At extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x5275c4(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x556a15){super(),this['id']=_0x556a15['id']||_0x1ed805(),this['author']=_0x556a15['author'],this['type']=_0x556a15['type'],this['data']=_0x556a15['data']||{},this['rootName']=_0x556a15['rootName'],this['set']('createdAt',_0x556a15['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class Et{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x40d9ae,_0x4fb683){this['newRevisionId']=_0x40d9ae,this['oldRevisionId']=_0x4fb683,this['changes']=new _0x3df410();}['_setChanges'](_0x4ba26d){for(const _0x4007cf of _0x4ba26d)this['changes']['add'](_0x4007cf);}}class St extends _0x5d0df7{['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[_0x32ab6d,st,gt,mt];}constructor(_0x5f3206){super(_0x5f3206),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',(_0x396fea,_0x2fe373,_0x49581c)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x38ecc7=>{for(const _0x1b3cde of this['editor']['editing']['view']['document']['roots'])_0x49581c?_0x38ecc7['removeClass']('ck-editor__editable__overlay',_0x1b3cde):_0x38ecc7['addClass']('ck-editor__editable__overlay',_0x1b3cde);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x31c504=>null!==_0x31c504),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1513a6,_0x387219,_0x10f286)=>_0x1513a6&&_0x10f286?_0x387219['changes']['getIndex'](_0x10f286):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4e4bc0,_0x299e39)=>_0x4e4bc0?_0x299e39['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](st);}['init'](){const _0x4a1ef4=this['editor'],_0x426253=new Mt(_0x4a1ef4,{'direction':'backward'}),_0x24f4f5=new Mt(_0x4a1ef4,{'direction':'forward'});(_0x4a1ef4['commands']['add']('showPreviousChange',_0x426253),_0x4a1ef4['commands']['add']('showNextChange',_0x24f4f5),_0x4a1ef4['commands']['add']('restoreRevision',new Ct(_0x4a1ef4)),this['on']('change:numberOfChanges',()=>{_0x426253['refresh'](),_0x24f4f5['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4a1ef4['enableReadOnlyMode']('revision-viewer'),_0x4a1ef4['plugins']['has']('WidgetToolbarRepository'))&&_0x4a1ef4['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x49a62c){return await this['_utils']['loadRevisionData'](_0x49a62c,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x49a62c);}async['getRevisionRootsAttributes'](_0x1c6344){return await this['_utils']['loadRevisionData'](_0x1c6344,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1c6344);}async['compare'](_0x10199e,_0x44bff6,_0xd7bbb3=!0x1){if(!this['isEnabled'])return;const _0x10556f=this['diff'],_0x3d31e6=this['repository'],_0x4fbf7e='string'==typeof _0x10199e?_0x3d31e6['getRevision'](_0x10199e):_0x10199e,_0x5e9aca='string'==typeof _0x44bff6?_0x3d31e6['getRevision'](_0x44bff6):_0x44bff6,_0x217b92=_0x4fbf7e['id'],_0x461317=_0x5e9aca?_0x5e9aca['id']:null;if(!_0xd7bbb3&&this['diff']&&this['diff']['newRevisionId']===_0x217b92&&this['diff']['oldRevisionId']===_0x461317)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Et(_0x217b92,_0x461317);const _0x47f636=this['_getRevisionsRange'](_0x4fbf7e,_0x5e9aca,!0x0)['map'](_0x417c6b=>this['_utils']['loadRevisionData'](_0x417c6b,this['adapter']));return _0x47f636['push'](new Promise(_0x3f744d=>{setTimeout(_0x3f744d,0x14);})),Promise['all'](_0x47f636)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x44d66c=this['_getDiff'](_0x217b92,_0x461317);for(const _0x4dba07 of _0x44d66c['changes'])this['_changeIdToChange']['set'](_0x4dba07['id'],_0x4dba07);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xab26e2=>{for(const _0x496483 of this['editor']['model']['document']['getRootNames']())_0xab26e2['detachRoot'](_0x496483);for(const _0x4b774e of Object['keys'](_0x44d66c['model'])){const _0x9af6ff=_0xab26e2['addRoot'](_0x4b774e);for(const _0x3e2294 of Object['keys'](_0x44d66c['attributes'][_0x4b774e]))_0xab26e2['setAttribute'](_0x3e2294,_0x44d66c['attributes'][_0x4b774e][_0x3e2294],_0x9af6ff);_0xab26e2['insert'](_0x44d66c['model'][_0x4b774e],_0x9af6ff,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x44d66c['changes'])),this['isReady']=!0x0;})['catch'](_0x5c8b31=>{console['error'](_0x5c8b31),this['_cleanUp'](),_0x10556f&&(this['diff']=_0x10556f),this['isReady']=!0x0;});}['addRevisionData'](_0x1f3e6d,_0x4f9398){const _0x5843db=this['repository']['createRevision'](_0x1f3e6d);return _0x5843db['on']('_update',(_0x5d61ef,_0x1443b1,_0x8807e7)=>_0x4f9398(_0x1443b1,_0x8807e7,_0x5843db)),this['repository']['addRevision'](_0x5843db),_0x5843db;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x24a0a3=>{for(const _0x44f6b6 of this['editor']['model']['document']['getRootNames']())_0x24a0a3['detachRoot'](_0x44f6b6);});}['_sortAndFilterDiffChanges'](_0x5957e5){const _0x31bf33=[],_0x395e1b=new Map();for(const _0x197930 of this['editor']['model']['document']['getRootNames']()){const _0x6d5b97=this['editor']['editing']['view']['getDomRoot'](_0x197930);if(!_0x6d5b97)continue;const _0x26abbf=_0x6d5b97['getClientRects']()['item'](0x0);_0x26abbf&&(_0x31bf33['push'](_0x197930),_0x395e1b['set'](_0x197930,_0x26abbf));}return _0x31bf33['sort']((_0xea4a1c,_0x1dfe4b)=>{const _0x28dfca=_0x395e1b['get'](_0xea4a1c),_0x2ecb72=_0x395e1b['get'](_0x1dfe4b);return _0x28dfca['y']-_0x2ecb72['y']||_0x28dfca['x']-_0x2ecb72['x'];}),(_0x5957e5=_0x5957e5['filter'](_0x5585f3=>_0x31bf33['includes'](_0x5585f3['rootName'])))['sort']((_0x2f666b,_0x35de21)=>_0x31bf33['indexOf'](_0x2f666b['rootName'])-_0x31bf33['indexOf'](_0x35de21['rootName'])),_0x5957e5;}['_makeTape'](_0x2ea94d){const _0x2fbafd=Array['from'](_0x2ea94d['markers'])['filter'](([_0x4bcddf,_0x17bbba])=>_0x4bcddf['startsWith']('revision:')&&!_0x17bbba['isCollapsed']),_0x1f128e=Array['from'](this['editor']['model']['createRangeIn'](_0x2ea94d)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x2fbafd['length'])for(const _0x39cb65 of _0x1f128e){const [_0x574c86,_0x4ed8a8]=_0x2fbafd[0x0],[,_0x22dc03,_0x2ac728]=_0x574c86['split'](':');if(_0x4ed8a8['end']['isEqual'](_0x39cb65['nextPosition'])&&_0x2fbafd['shift'](),(_0x39cb65['previousPosition']['isEqual'](_0x4ed8a8['start'])||_0x39cb65['previousPosition']['isAfter'](_0x4ed8a8['start']))&&('insertion'==_0x22dc03?_0x39cb65['isAdded']={'userId':_0x2ac728}:'deletion'==_0x22dc03&&(_0x39cb65['isRemoved']={'userId':_0x2ac728})),0x0==_0x2fbafd['length'])break;}return _0x1f128e;}['_refreshStartEndIndex'](_0x23fc5f){const _0x3d4a39=new Map();for(let _0x128333=0x0;_0x128333<_0x23fc5f['length'];_0x128333++)'text'===_0x23fc5f[_0x128333]['type']?(_0x23fc5f[_0x128333]['item']['startIndex']=_0x128333,_0x23fc5f[_0x128333]['item']['endIndex']=_0x128333):('elementStart'===_0x23fc5f[_0x128333]['type']?_0x23fc5f[_0x128333]['item']['startIndex']=_0x128333:'elementEnd'===_0x23fc5f[_0x128333]['type']&&(_0x23fc5f[_0x128333]['item']['endIndex']=_0x128333),_0x3d4a39['set'](_0x23fc5f[_0x128333]['id'],_0x128333));for(const _0x2edfba of _0x3d4a39['values']())'elementStart'===_0x23fc5f[_0x2edfba]['type']?_0x23fc5f[_0x2edfba]['item']['endIndex']=_0x3d4a39['get'](_0x23fc5f[_0x2edfba]['pairId']):'elementEnd'===_0x23fc5f[_0x2edfba]['type']&&(_0x23fc5f[_0x2edfba]['item']['startIndex']=_0x3d4a39['get'](_0x23fc5f[_0x2edfba]['pairId']));}['_processTape'](_0x44674f){for(let _0x5d171e=0x0;_0x5d171e<_0x44674f['length'];_0x5d171e++){if('elementStart'===_0x44674f[_0x5d171e]['type'])_0x44674f[_0x5d171e]['item']['startIndex']=_0x5d171e;else{if('elementEnd'===_0x44674f[_0x5d171e]['type']){_0x44674f[_0x5d171e]['item']['endIndex']=_0x5d171e;const _0x39f6db=_0x44674f[_0x5d171e]['item']['startIndex'];_0x44674f[_0x39f6db]['pairId']=_0x44674f[_0x5d171e]['id'],_0x44674f[_0x5d171e]['pairId']=_0x44674f[_0x39f6db]['id'];}else _0x44674f[_0x5d171e]['item']['startIndex']=_0x5d171e,_0x44674f[_0x5d171e]['item']['endIndex']=_0x5d171e,_0x44674f[_0x5d171e]['pairId']=null;}_0x44674f[_0x5d171e]['markersStart']||(_0x44674f[_0x5d171e]['markersStart']=[],_0x44674f[_0x5d171e]['markersEnd']=[]);}}['_markInsertions'](_0x464732,_0x5789d9){const _0x292d17=_0x464732['filter'](_0x20604d=>!_0x20604d['isAdded']);for(let _0x17c59d=0x0;_0x17c59d<_0x5789d9['length'];_0x17c59d++)_0x5789d9[_0x17c59d]['isAdded']&&(_0x292d17[_0x17c59d]['isAdded']=_0x5789d9[_0x17c59d]['isAdded']);}['_getDiff'](_0x2aaa86,_0x549d1e=null){const _0x4a52cd=this['repository']['getRevision'](_0x2aaa86),_0x3b72e7=_0x549d1e?this['repository']['getRevision'](_0x549d1e):null,_0x2d2857=this['_getRevisionsRange'](_0x4a52cd,_0x3b72e7),_0x30972c=_0x2d2857[_0x2d2857['length']-0x1],_0x51d0d3=new Map(),_0x4cc6fe={'model':{},'attributes':{},'changes':[]},_0x597c40=new Set(),_0x5bbe09=new Map();for(let _0x34778e=_0x2d2857['length']-0x1;_0x34778e>=0x0;_0x34778e--){const _0x9d2127=_0x2d2857[_0x34778e];for(const _0xea5d89 of Object['keys'](_0x9d2127['diffData']))if(_0x9d2127['diffData'][_0xea5d89]['attachChange']){const _0x15ab77=_0x9d2127['diffData'][_0xea5d89]['attachChange'];_0x15ab77['isAttached']?(_0x597c40['add'](_0xea5d89),_0x5bbe09['has'](_0xea5d89)&&_0x5bbe09['get'](_0xea5d89)['userId']==_0x15ab77['userId']?_0x5bbe09['delete'](_0xea5d89):_0x5bbe09['set'](_0xea5d89,_0x15ab77)):_0x5bbe09['has'](_0xea5d89)?(_0x597c40['delete'](_0xea5d89),_0x5bbe09['delete'](_0xea5d89)):(_0x597c40['add'](_0xea5d89),_0x5bbe09['set'](_0xea5d89,_0x15ab77));}else _0x597c40['add'](_0xea5d89);}for(const _0x27a9b6 of _0x597c40){const _0x4981dc=_0x5bbe09['has'](_0x27a9b6)&&!_0x5bbe09['get'](_0x27a9b6)['isAttached'];let _0x5d8957=_0x4981dc?_0x2d2857['length']-0x1:0x0;const _0x3a1011=_0x4981dc?-0x1:0x1;for(;_0x2d2857[_0x5d8957];){const _0x2d0cdc=_0x2d2857[_0x5d8957];if(_0x2d0cdc['diffData'][_0x27a9b6]){const _0x463eb1=_0x4981dc?_0x2d0cdc['diffData'][_0x27a9b6]['attributesBefore']:_0x2d0cdc['diffData'][_0x27a9b6]['attributesAfter'];_0x4cc6fe['attributes'][_0x27a9b6]=_0x463eb1?_0x56b594(_0x463eb1):{};break;}_0x5d8957+=_0x3a1011;}}for(const _0x20768c of _0x2d2857){_0x20768c['model']={};for(const _0x456b7b of _0x20768c['authors'])_0x51d0d3['set'](_0x456b7b['id'],_0x456b7b);for(const _0x489bb9 of _0x597c40){const _0x2200bf=_0x20768c['diffData'][_0x489bb9]?_0x20768c['diffData'][_0x489bb9]['insertions']:'[]',_0x55d0ce=_0x20768c['diffData'][_0x489bb9]?_0x20768c['diffData'][_0x489bb9]['deletions']:'[]';_0x20768c['model'][_0x489bb9]={'insertions':this['_utils']['_makeModelFromViewString'](_0x2200bf),'deletions':this['_utils']['_makeModelFromViewString'](_0x55d0ce)};}}for(const _0x1cd45f of _0x597c40){let _0x15a063=null,_0x25e906=0x0;const _0x728efb=new Map(Array['from'](_0x4a52cd['model'][_0x1cd45f]['insertions']['markers'])['filter'](([_0x5a60b1])=>!_0x5a60b1['startsWith']('revision:')));let _0x30b3cb=0x0;for(const _0x3d2686 of _0x2d2857){const _0x17e0e2=this['_makeTape'](_0x3d2686['model'][_0x1cd45f]['insertions']);_0x3d2686==_0x4a52cd?(_0x15a063=_0x17e0e2,_0x25e906=_0x15a063['length'],_0x15a063['forEach'](_0x33758b=>{_0x33758b['id']=_0x30b3cb++;}),this['_processTape'](_0x15a063)):this['_markInsertions'](_0x15a063,_0x17e0e2);const _0x1f1a57=_0x15a063['filter'](_0x13e8fe=>!_0x13e8fe['isAdded'])['map'](_0x5cef4a=>_0x5cef4a['id']);let _0x4e8f5b=0x0;const _0x3c4741=this['_makeTape'](_0x3d2686['model'][_0x1cd45f]['deletions']);_0x3c4741['forEach'](_0x5c3d55=>{_0x5c3d55['isRemoved']?_0x5c3d55['id']=_0x25e906++:_0x5c3d55['id']=_0x1f1a57[_0x4e8f5b++];}),this['_processTape'](_0x3c4741),this['_setDistance'](_0x15a063,'isAdded'),this['_setDistance'](_0x3c4741,'isRemoved'),_0x3d2686==_0x4a52cd&&this['_markMarkers'](_0x15a063,_0x728efb),_0x15a063=this['_joinTapes'](_0x15a063,_0x3c4741),this['_refreshStartEndIndex'](_0x15a063),this['_setDistance'](_0x15a063,'isRemoved');}_0x15a063=_0x15a063['filter'](_0x95e607=>!(_0x95e607['isAdded']&&_0x95e607['isRemoved']));const _0x2f6190=new Map(_0x30972c['model'][_0x1cd45f]['deletions']['markers']),_0x4ef4d2=new Set(_0x728efb['keys']());for(const _0xe7d1cd of _0x2f6190['keys']())_0x4ef4d2['delete'](_0xe7d1cd);this['_markSuggestions'](_0x15a063,_0x4ef4d2),this['_fixObsoleteTags'](_0x15a063),_0x15a063=this['_removeMissingPairs'](_0x15a063),_0x15a063=this['_markMismatchedRemovedTags'](_0x15a063),_0x15a063=this['_removeUnsupportedChanges'](_0x15a063);const {root:_0x16b8f4,changes:_0x205d42}=this['_makeModelFromTape'](_0x15a063,_0x51d0d3,_0x1cd45f);_0x4cc6fe['model'][_0x1cd45f]=_0x16b8f4;const _0x84d434=_0x5bbe09['get'](_0x1cd45f);if(_0x84d434){const _0x33c950=_0x51d0d3['get'](_0x84d434['userId']),_0x263469=new xt({'author':_0x33c950,'type':_0x84d434['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x1cd45f});_0x205d42['unshift'](_0x263469),_0x4cc6fe['attributes'][_0x1cd45f]['revisionHistoryAttachChange']=_0x263469['id'];}_0x4cc6fe['changes']=_0x4cc6fe['changes']['concat'](_0x205d42);}return _0x4cc6fe;}['_markMarkers'](_0x4abd26,_0x425a7f){for(let _0x11b95f=0x0;_0x11b95f<_0x4abd26['length'];_0x11b95f++)for(const [_0x184c4b,_0x4bc0fc]of _0x425a7f)!_0x4bc0fc['isCollapsed']&&_0x4bc0fc['start']['isEqual'](_0x4abd26[_0x11b95f]['previousPosition'])&&_0x4abd26[_0x11b95f]['markersStart']['push'](_0x184c4b),_0x4bc0fc['end']['isEqual'](_0x4abd26[_0x11b95f]['nextPosition'])&&_0x4abd26[_0x11b95f]['markersEnd']['push'](_0x184c4b);}['_joinTapes'](_0x146ca5,_0x17df26){let _0x486b00=[],_0x5a8b21=0x0,_0x424167=0x0;for(;_0x5a8b21<_0x146ca5['length']||_0x424167<_0x17df26['length'];){const _0x3150d4=_0x146ca5[_0x5a8b21]||{},_0x2e94e5=_0x17df26[_0x424167]||{};if(_0x3150d4['id']==_0x2e94e5['id'])_0x5a8b21++,_0x424167++,_0x486b00['push'](_0x3150d4);else{if(_0x2e94e5['isRemoved']&&_0x3150d4['isAdded']){const {commonTape:_0x280fb6,iEnd:_0x54c98a,jEnd:_0x50a314}=this['_threeWayMerge'](_0x146ca5,_0x5a8b21,_0x17df26,_0x424167);_0x486b00=_0x486b00['concat'](_0x280fb6),_0x5a8b21=_0x54c98a,_0x424167=_0x50a314;}else _0x2e94e5['isRemoved']?(_0x424167++,_0x486b00['push'](_0x2e94e5)):(_0x5a8b21++,_0x486b00['push'](_0x3150d4));}}return _0x486b00;}['_markSuggestions'](_0x478ce3,_0x5de7e2){const _0x368842=[];for(let _0x183e73=0x0;_0x183e73<_0x478ce3['length'];_0x183e73++){for(let _0x3ea14f=0x0;_0x3ea14f<_0x478ce3[_0x183e73]['markersStart']['length'];_0x3ea14f++){const _0x9566ea=_0x478ce3[_0x183e73]['markersStart'][_0x3ea14f];if(!_0x5de7e2['has'](_0x9566ea))continue;const {group:_0xb5bbc1,type:_0x29697c,authorId:_0x5da4e3}=_0x268d09(_0x9566ea);'revision-suggestion'!=_0xb5bbc1||'insertion'!=_0x29697c&&'deletion'!=_0x29697c||(_0x368842['unshift']({'type':_0x29697c,'name':_0x9566ea,'userId':_0x5da4e3}),_0x478ce3[_0x183e73]['markersStart']['splice'](_0x3ea14f,0x1),_0x3ea14f--);}_0x5099f5(_0x478ce3[_0x183e73]);for(let _0x1dffce=0x0;_0x1dffce<_0x478ce3[_0x183e73]['markersEnd']['length'];_0x1dffce++){const _0x448a9a=_0x478ce3[_0x183e73]['markersEnd'][_0x1dffce];if(!_0x5de7e2['has'](_0x448a9a))continue;const {group:_0x2fdf05,type:_0x5582ab}=_0x268d09(_0x448a9a);if('revision-suggestion'!=_0x2fdf05||'insertion'!=_0x5582ab&&'deletion'!=_0x5582ab)continue;_0x478ce3[_0x183e73]['markersEnd']['splice'](_0x1dffce,0x1),_0x1dffce--;const _0x2f88cc=_0x368842['findIndex'](_0x2ad17b=>_0x2ad17b['name']==_0x448a9a);_0x2f88cc>-0x1&&_0x368842['splice'](_0x2f88cc,0x1);}}function _0x268d09(_0x563156){const _0x11245c=_0x563156['split'](':');return{'group':_0x11245c[0x0],'type':_0x11245c[0x1],'subType':_0x11245c['length']>=0x5?_0x11245c[0x2]:null,'id':_0x11245c['length']<0x5?_0x11245c[0x2]:_0x11245c[0x3],'authorId':_0x11245c['length']<0x5?_0x11245c[0x3]:_0x11245c[0x4],'markerCount':0x6==_0x11245c['length']?_0x11245c[0x5]:null};}function _0x5099f5(_0x5901ac){for(let _0x33cbc4=0x0;_0x33cbc4<_0x368842['length'];_0x33cbc4++){if(_0x5901ac['isAdded']&&'insertion'==_0x368842[_0x33cbc4]['type']&&_0x5901ac['isAdded']['userId']==_0x368842[_0x33cbc4]['userId'])return _0x5901ac['isAddSuggestion']=_0x368842[_0x33cbc4],void delete _0x5901ac['isAdded'];if(!_0x5901ac['isAdded']&&!_0x5901ac['isRemoved']&&'deletion'==_0x368842[_0x33cbc4]['type'])return void(_0x5901ac['isRemoveSuggestion']=_0x368842[_0x33cbc4]);}}}['_setDistance'](_0x32f922,_0x1fd70b){let _0x235b0e=0x0,_0x166849=!0x1;const _0x3cd769=new Map();for(const _0x225198 of _0x32f922)_0x225198[_0x1fd70b]?_0x166849&&(_0x235b0e++,_0x166849=!0x1):(_0x235b0e++,_0x166849=!0x0),_0x3cd769['set'](_0x225198['id'],_0x235b0e);for(let _0x27b11e=0x0;_0x27b11e<_0x32f922['length'];_0x27b11e++){if('isRemoved'==_0x1fd70b&&_0x32f922[_0x27b11e]['isAdded']||'isAdded'==_0x1fd70b&&_0x32f922[_0x27b11e]['isRemoved'])continue;if('text'==_0x32f922[_0x27b11e]['type']){_0x32f922[_0x27b11e]['distance']=0x0;continue;}const _0x4f1e7f=_0x3cd769['get'](_0x32f922[_0x27b11e]['pairId']),_0x57bce1=_0x3cd769['get'](_0x32f922[_0x27b11e]['id']);_0x32f922[_0x27b11e]['distance']=_0x4f1e7f-_0x57bce1;}}['_getRevisionsRange'](_0x1de71a,_0x11f792,_0x457fe5=!0x1){const _0x45b986=[];let _0x25a8a2=this['repository']['getIndex'](_0x1de71a),_0x234e5b=this['repository']['getIndex'](_0x11f792);for(-0x1==_0x234e5b&&(_0x234e5b=this['repository']['_revisions']['length'],_0x457fe5=!0x1);_0x25a8a2<_0x234e5b;)_0x45b986['push'](this['repository']['getRevision'](_0x25a8a2)),_0x25a8a2++;return _0x457fe5&&_0x45b986['push'](this['repository']['getRevision'](_0x25a8a2)),_0x45b986;}['_threeWayMerge'](_0xcd0951,_0xafc6c0,_0x5bd736,_0x5c6ea7){const _0x48b474=this['editor']['model']['schema'];let _0xaf36ca=_0xafc6c0;for(;_0xcd0951[_0xaf36ca]&&_0xcd0951[_0xaf36ca]['isAdded'];)_0xaf36ca++;let _0x1c24c2=_0x5c6ea7;for(;_0x5bd736[_0x1c24c2]&&_0x5bd736[_0x1c24c2]['isRemoved'];)_0x1c24c2++;_0x5f32fe(_0xcd0951,_0xafc6c0,_0xaf36ca),_0x5f32fe(_0x5bd736,_0x5c6ea7,_0x1c24c2);const _0x44114c=_0x5bd736['slice'](_0x5c6ea7,_0x1c24c2)['concat'](_0xcd0951['slice'](_0xafc6c0,_0xaf36ca));return _0x44114c['sort']((_0xbc1924,_0xe50465)=>_0xbc1924['side']!=_0xe50465['side']?_0xbc1924['side']-_0xe50465['side']:_0xbc1924['level']!=_0xe50465['level']?_0xbc1924['level']-_0xe50465['level']:_0xbc1924['distance']!=_0xe50465['distance']?_0xe50465['distance']-_0xbc1924['distance']:!!_0xbc1924['isAdded']!=!!_0xe50465['isAdded']?-0x1==_0xbc1924['side']||0x0==_0xbc1924['side']?_0xbc1924['isAdded']?-0x1:0x1:_0xbc1924['isAdded']?0x1:-0x1:_0xbc1924['index']-_0xe50465['index']),{'commonTape':_0x44114c,'iEnd':_0xaf36ca,'jEnd':_0x1c24c2};function _0x5f32fe(_0x5e1a3c,_0xa1567f,_0x486af0){let _0x28af63=-0x1,_0x15895c=Number['POSITIVE_INFINITY'],_0x25bb07=!0x0;for(let _0xdf748d=_0xa1567f;_0xdf748d<_0x486af0;_0xdf748d++)if(_0x48b474['isInline'](_0x5e1a3c[_0xdf748d]['item'])||(_0x25bb07=!0x1),_0x5e1a3c[_0xdf748d]['item']['startIndex']<_0xa1567f&&(_0x28af63=_0xdf748d),_0x5e1a3c[_0xdf748d]['item']['endIndex']>=_0x486af0){_0x15895c=_0xdf748d;break;}_0x25bb07&&(_0x28af63=_0x486af0-0x1);for(let _0x55c23c=_0xa1567f;_0x55c23c<_0x486af0;_0x55c23c++)_0x5e1a3c[_0x55c23c]['side']=_0x55c23c<=_0x28af63?-0x1:_0x55c23c<_0x15895c?0x0:0x1,_0x5e1a3c[_0x55c23c]['index']=_0x55c23c;let _0x23974b=0x0;for(let _0x301164=_0xa1567f;_0x301164<=_0x28af63;_0x301164++)0x0==_0x5e1a3c[_0x301164]['distance']?_0x5e1a3c[_0x301164]['level']=_0x23974b:(_0x23974b++,_0x5e1a3c[_0x301164]['level']=_0x23974b,_0x23974b++);for(let _0xd377ee=_0xa1567f;_0xd377ee<_0x486af0;_0xd377ee++)0x0==_0x5e1a3c[_0xd377ee]['side']&&(_0x5e1a3c[_0xd377ee]['level']=_0x23974b);_0x23974b=0x0;for(let _0xae7e44=_0x486af0-0x1;_0xae7e44>=_0x15895c;_0xae7e44--)0x0==_0x5e1a3c[_0xae7e44]['distance']?_0x5e1a3c[_0xae7e44]['level']=_0x23974b:(_0x23974b--,_0x5e1a3c[_0xae7e44]['level']=_0x23974b,_0x23974b--);}}['_fixObsoleteTags'](_0x8f5139){const _0x37198b=new Map(),_0x4df8e5=this['editor']['model']['schema'];for(let _0x3c734b=0x1;_0x3c734b<_0x8f5139['length'];_0x3c734b++){let _0x3cf3c0,_0x1b7778,_0x3ddafa;const _0x1fa3b6=_0x8f5139[_0x3c734b],_0x4530fd=_0x8f5139[_0x3c734b-0x1];if('text'==_0x1fa3b6['type'])continue;if(_0x1fa3b6['type']!=_0x4530fd['type'])continue;if(!_0x4df8e5['isBlock'](_0x4530fd['item'])||_0x4df8e5['isLimit'](_0x4530fd['item']))continue;if(!_0x4df8e5['isBlock'](_0x1fa3b6['item'])||_0x4df8e5['isLimit'](_0x1fa3b6['item']))continue;if((_0x8f5139[_0x3c734b]['isAdded']||_0x8f5139[_0x3c734b]['isAddSuggestion'])&&_0x8f5139[_0x3c734b-0x1]['isRemoved'])_0x3cf3c0=_0x8f5139[_0x3c734b],_0x1b7778=_0x8f5139[_0x3c734b-0x1],_0x3ddafa=_0x3c734b-0x1;else{if(!_0x8f5139[_0x3c734b]['isRemoved']||!_0x8f5139[_0x3c734b-0x1]['isAdded']&&!_0x8f5139[_0x3c734b-0x1]['isAddSuggestion'])continue;_0x3cf3c0=_0x8f5139[_0x3c734b-0x1],_0x1b7778=_0x8f5139[_0x3c734b],_0x3ddafa=_0x3c734b;}const _0x3fae05=_0x3cf3c0['level']==_0x1b7778['level'],_0xb17c7=Math['abs'](_0x3cf3c0['level'])<Math['abs'](_0x1b7778['level'])&&0x0==_0x1b7778['distance'];(_0x3fae05||_0xb17c7)&&(_0x37198b['set'](_0x1b7778['id'],_0x3cf3c0['id']),_0x8f5139['splice'](_0x3ddafa,0x1),_0x3c734b--,_0x3cf3c0['isAdded']=!0x1);}for(let _0x4cbdb1=0x0;_0x4cbdb1<_0x8f5139['length'];_0x4cbdb1++)_0x37198b['has'](_0x8f5139[_0x4cbdb1]['pairId'])&&(_0x8f5139[_0x4cbdb1]['pairId']=_0x37198b['get'](_0x8f5139[_0x4cbdb1]['pairId']));}['_removeMissingPairs'](_0x2a1eea){const _0x37a73c=new Set(_0x2a1eea['map'](_0x5d870a=>_0x5d870a['id']));for(let _0x5d9767=0x0;_0x5d9767<_0x2a1eea['length'];_0x5d9767++)_0x37a73c['has'](_0x2a1eea[_0x5d9767]['pairId'])||0x0==_0x2a1eea[_0x5d9767]['distance']||(_0x2a1eea[_0x5d9767]['isIncorrect']=!0x0);return _0x2a1eea['filter'](_0x2d63af=>!_0x2d63af['isIncorrect']);}['_markMismatchedRemovedTags'](_0x535ef8){const _0x49b125=new Set();for(let _0x446205=0x0;_0x446205<_0x535ef8['length'];_0x446205++){if(_0x49b125['has'](_0x535ef8[_0x446205]['id'])&&_0x535ef8[_0x446205]['isRemoved']&&(_0x535ef8[_0x446205]['isIncorrect']=!0x0),_0x535ef8[_0x446205]['isIncorrect'])continue;if(0x0==_0x535ef8[_0x446205]['distance'])continue;if('elementStart'!=_0x535ef8[_0x446205]['type'])continue;if(null==_0x535ef8[_0x446205]['pairId'])continue;let _0x25302a=_0x446205+0x1,_0xf78d45=0x0;for(;_0x535ef8[_0x25302a]['id']!=_0x535ef8[_0x446205]['pairId'];)'elementStart'==_0x535ef8[_0x25302a]['type']?_0xf78d45++:'elementEnd'==_0x535ef8[_0x25302a]['type']&&_0xf78d45--,_0x25302a++;if(0x0!=_0xf78d45){if(_0x535ef8[_0x446205]['isRemoved'])_0x535ef8[_0x446205]['isIncorrect']=!0x0;else{for(;_0x25302a!=_0x446205;)_0x535ef8[_0x25302a]['isRemoved']&&0x0!=_0x535ef8[_0x25302a]['distance']&&(_0x535ef8[_0x25302a]['isIncorrect']=!0x0,_0x49b125['add'](_0x535ef8[_0x25302a]['pairId'])),_0x25302a--;}}}return _0x535ef8['filter'](_0xe0da46=>!_0xe0da46['isIncorrect']);}['_removeUnsupportedChanges'](_0x330665){const _0x33ab65=this['editor']['model']['schema'];for(let _0x19d4d9=0x0;_0x19d4d9<_0x330665['length'];_0x19d4d9++){if(!(_0x330665[_0x19d4d9]['isAdded']||_0x330665[_0x19d4d9]['isAddSuggestion']||_0x330665[_0x19d4d9]['isRemoved']||_0x330665[_0x19d4d9]['isRemoveSuggestion']))continue;if(0x0==_0x330665[_0x19d4d9]['distance'])continue;const _0x263dd6=_0x330665[_0x19d4d9]['item'];_0x33ab65['isBlock'](_0x263dd6)||_0x33ab65['isLimit'](_0x263dd6)||(_0x330665[_0x19d4d9]['isAdded']&&delete _0x330665[_0x19d4d9]['isAdded'],_0x330665[_0x19d4d9]['isAddSuggestion']&&delete _0x330665[_0x19d4d9]['isAddSuggestion'],_0x330665[_0x19d4d9]['isRemoveSuggestion']&&delete _0x330665[_0x19d4d9]['isRemoveSuggestion'],_0x330665[_0x19d4d9]['isRemoved']&&(_0x330665[_0x19d4d9]['isIncorrect']=!0x0));}return _0x330665['filter'](_0x4ed6dd=>!_0x4ed6dd['isIncorrect']);}['_makeModelFromTape'](_0x245d7e,_0x5466fd,_0x3d8168){const _0xa91585=new _0x483c92(),_0x319add=[],_0x5662cc=new Map(),_0xcceb9e=this['editor']['model'],_0x16b9a0=_0xcceb9e['schema'],_0x3b3c84=[_0xa91585],_0x139d7a={},_0x2d50ba={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x75ea94=null;const _0x428f41=[0x0];for(let _0x4b1060=0x0;_0x4b1060<_0x245d7e['length'];_0x4b1060++)if('elementStart'===_0x245d7e[_0x4b1060]['type']){_0x245d7e[_0x4b1060]['previousPosition']=_0xcceb9e['createPositionFromPath'](_0xa91585,_0x428f41);const _0x4cedd0=new _0x2a87f2(_0x245d7e[_0x4b1060]['item']['name'],_0x245d7e[_0x4b1060]['item']['getAttributes']());_0x3b3c84[0x0]['_appendChild'](_0x4cedd0),_0x428f41['push'](0x0),_0x3b3c84['unshift'](_0x4cedd0),_0x245d7e[_0x4b1060]['nextPosition']=_0xcceb9e['createPositionFromPath'](_0xa91585,_0x428f41);}else'elementEnd'===_0x245d7e[_0x4b1060]['type']?(_0x3b3c84['shift'](),_0x245d7e[_0x4b1060]['previousPosition']=_0xcceb9e['createPositionFromPath'](_0xa91585,_0x428f41),_0x428f41['pop'](),_0x428f41[_0x428f41['length']-0x1]++,_0x245d7e[_0x4b1060]['nextPosition']=_0xcceb9e['createPositionFromPath'](_0xa91585,_0x428f41)):(_0x245d7e[_0x4b1060]['previousPosition']=_0xcceb9e['createPositionFromPath'](_0xa91585,_0x428f41),_0x75ea94?_0x75ea94['_data']+=_0x245d7e[_0x4b1060]['item']['data']:_0x75ea94=new _0x3b233f(_0x245d7e[_0x4b1060]['item']['data'],_0x245d7e[_0x4b1060]['item']['getAttributes']()),_0x245d7e[_0x4b1060+0x1]&&'text'===_0x245d7e[_0x4b1060+0x1]['type']&&_0x5ddf2a(_0x75ea94,_0x245d7e[_0x4b1060+0x1]['item'])||(_0x3b3c84[0x0]['_appendChild'](_0x75ea94),_0x75ea94=null),_0x428f41[_0x428f41['length']-0x1]+=_0x245d7e[_0x4b1060]['item']['offsetSize'],_0x245d7e[_0x4b1060]['nextPosition']=_0xcceb9e['createPositionFromPath'](_0xa91585,_0x428f41));for(let _0x5ed379=0x0;_0x5ed379<_0x245d7e['length'];_0x5ed379++){const _0x2bf79e=_0x245d7e[_0x5ed379]['previousPosition'],_0x2b7dd5=_0x245d7e[_0x5ed379]['nextPosition'];for(const _0x531dcb of _0x245d7e[_0x5ed379]['markersStart'])_0x5662cc['set'](_0x531dcb,{'start':_0x2bf79e,'end':null});_0x1c91d9('isRemoveSuggestion',_0x5ed379,_0x2bf79e,_0x2b7dd5),_0x1c91d9('isAddSuggestion',_0x5ed379,_0x2bf79e,_0x2b7dd5),_0x1c91d9('isRemoved',_0x5ed379,_0x2bf79e,_0x2b7dd5),_0x1c91d9('isAdded',_0x5ed379,_0x2bf79e,_0x2b7dd5);for(const _0x527c0e of _0x245d7e[_0x5ed379]['markersEnd']){const _0xd51567=_0x5662cc['get'](_0x527c0e);_0xd51567?_0xd51567['end']=_0x2b7dd5:_0x5662cc['set'](_0x527c0e,{'start':_0x2b7dd5,'end':_0x2b7dd5});}}for(const [_0x5a855d,_0xd775d1]of _0x5662cc){const _0x2ece28=this['editor']['model']['createRange'](_0xd775d1['start'],_0xd775d1['end']);_0xa91585['markers']['set'](_0x5a855d,_0x2ece28);}return _0x319add['sort']((_0x4e1c22,_0x4a32c1)=>{const _0x9575f=_0xa91585['markers']['get']('revision:'+_0x4e1c22['id']),_0x36ad38=_0xa91585['markers']['get']('revision:'+_0x4a32c1['id']);return _0x9575f['start']['isBefore'](_0x36ad38['start'])?-0x1:_0x9575f['start']['isAfter'](_0x36ad38['start'])?0x1:_0x9575f['end']['isBefore'](_0x36ad38['end'])?-0x1:_0x9575f['end']['isAfter'](_0x36ad38['end'])?0x1:'add'===_0x4e1c22['type']?-0x1:0x1;}),{'root':_0xa91585,'changes':_0x319add};function _0x1c91d9(_0x56af9e,_0x4d917a,_0x3a4928,_0x57e3e5){const _0x1d4a33=!!_0x245d7e[_0x4d917a][_0x56af9e],_0x26275d=_0x1d4a33?_0x245d7e[_0x4d917a][_0x56af9e]['userId']:null,_0x2a2e31=_0x4d917a===_0x245d7e['length']-0x1,_0x3ec499=_0x2d50ba[_0x56af9e][0x0],_0x359b8b=_0x16b9a0['isObject'](_0x245d7e[_0x4d917a]['item']);!_0x139d7a[_0x56af9e]&&_0x1d4a33?_0x139d7a[_0x56af9e]={'start':_0x3a4928,'tapeItem':_0x245d7e[_0x4d917a],'userId':_0x26275d,'type':_0x56af9e}:_0x139d7a[_0x56af9e]&&!_0x1d4a33?(_0x139d7a[_0x56af9e]['end']=_0x3a4928,_0x519722(_0x139d7a[_0x56af9e]),_0x139d7a[_0x56af9e]=null):_0x139d7a[_0x56af9e]&&_0x1d4a33&&_0x139d7a[_0x56af9e]['userId']!==_0x26275d&&(_0x139d7a[_0x56af9e]['end']=_0x3a4928,_0x3ec499&&_0x3ec499['userId']===_0x139d7a[_0x56af9e]['userId']||_0x519722(_0x139d7a[_0x56af9e]),_0x139d7a[_0x56af9e]={'start':_0x3a4928,'tapeItem':_0x245d7e[_0x4d917a],'userId':_0x26275d,'type':_0x56af9e}),_0x139d7a[_0x56af9e]&&_0x359b8b&&('elementStart'!==_0x245d7e[_0x4d917a]['type']||_0x3ec499&&_0x3ec499['userId']===_0x26275d||_0x2d50ba[_0x56af9e]['unshift']({'userId':_0x26275d,'object':_0x245d7e[_0x4d917a]['item'],'change':_0x139d7a[_0x56af9e]}),'elementEnd'===_0x245d7e[_0x4d917a]['type']&&_0x3ec499&&_0x3ec499['object']===_0x245d7e[_0x4d917a]['item']&&(_0x2d50ba[_0x56af9e]['shift'](),_0x139d7a[_0x56af9e]=_0x3ec499['change'])),_0x139d7a[_0x56af9e]&&_0x2a2e31&&(_0x139d7a[_0x56af9e]['end']=_0x57e3e5,_0x519722(_0x139d7a[_0x56af9e]),_0x139d7a[_0x56af9e]=null);}function _0x519722({start:_0x148c91,end:_0x4102e5,tapeItem:_0x187f23,userId:_0x3d5f14,type:_0x33e502}){const _0x43f2f0=_0x187f23['item'],_0x1a4fd0=_0xcceb9e['schema']['isBlock'](_0x43f2f0)&&!_0xcceb9e['schema']['isLimit'](_0x43f2f0),_0x2c4c41=_0x148c91['nodeAfter']==_0x4102e5['parent']&&_0x4102e5['isAtStart'];if(_0x1a4fd0&&_0x2c4c41)return;const _0x29b4de=_0xcceb9e['createRange'](_0x148c91,_0x4102e5),_0x39d411=_0x5466fd['get'](_0x3d5f14),_0x3bc4cd=new xt({'author':_0x39d411,'type':'isAdded'==_0x33e502||'isAddSuggestion'==_0x33e502?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x33e502||'isRemoveSuggestion'==_0x33e502},'createdAt':new Date(),'rootName':_0x3d8168});_0x319add['push'](_0x3bc4cd),_0xa91585['markers']['set']('revision:'+_0x3bc4cd['id'],_0x29b4de);}function _0x5ddf2a(_0x365a40,_0x245664){const _0x2662c6=_0x365a40['getAttributes'](),_0x24892e=_0x245664['getAttributes']();for(const _0x2f6283 of _0x2662c6){if(_0x2f6283[0x1]!==_0x245664['getAttribute'](_0x2f6283[0x0]))return!0x1;_0x24892e['next']();}return _0x24892e['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x17c9fb=>{const _0x32d6ab=_0x17c9fb['markerName']['split'](':')[0x1],_0x246bef=this['_getChangeFromId'](_0x32d6ab);if(!_0x246bef)return null;const _0x156e47='add'==_0x246bef['type']?'insertion':'deletion',_0x1102c3=['ck-suggestion-marker','ck-suggestion-marker-'+_0x156e47];return _0x246bef['data']['isSuggestion']&&_0x1102c3['push']('ck-suggestion-marker-'+_0x156e47+'-new'),this['activeChange']==_0x246bef&&_0x1102c3['push']('ck-suggestion-marker--active'),{'classes':_0x1102c3,'attributes':{'data-change-id':_0x32d6ab}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x22c214=>{_0x22c214['on']('element:pre',(_0x3d1114,_0x4b5b72,_0x20dd5c)=>{const _0x328633=_0x4b5b72['viewItem']['getChild'](0x0);if(!_0x328633||!_0x328633['is']('element','code'))return;if(!_0x20dd5c['consumable']['consume'](_0x328633,{'attributes':['vid_start','vid_end']}))return;const _0x5ecef1=_0x4b5b72['modelRange']['start']['nodeAfter'];_0x20dd5c['writer']['setAttribute']('vid_start',_0x328633['getAttribute']('vid_start'),_0x5ecef1),_0x20dd5c['writer']['setAttribute']('vid_end',_0x328633['getAttribute']('vid_end'),_0x5ecef1);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1177d7=>{_0x1177d7['on']('element',(_0xcd0ba8,_0x1cc44b,_0x546a09)=>{if(!_0x546a09['consumable']['consume'](_0x1cc44b['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1cc44b['modelRange']['isCollapsed'])return;const _0x4988b6=_0x1cc44b['modelRange']['start']['nodeAfter'];_0x4988b6['hasAttribute']('vid_start')||_0x4988b6['hasAttribute']('vid')||(_0x546a09['writer']['setAttribute']('vid_start',_0x1cc44b['viewItem']['getAttribute']('vid_start'),_0x4988b6),_0x546a09['writer']['setAttribute']('vid_end',_0x1cc44b['viewItem']['getAttribute']('vid_end'),_0x4988b6));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x402b66=>_0x402b66['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x27db92,[,_0x1f652f])=>{['vid_start','vid_end','vid']['includes'](_0x1f652f)&&(_0x27db92['return']=!0x0,_0x27db92['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x52d95e=>{_0x52d95e['on']('attribute:vid',(_0x40c005,_0x4b43ea,_0x1576e9)=>{if('\x20'!=_0x4b43ea['item']['data']||_0x4b43ea['item']['parent']['maxOffset']>0x1)return;if(!_0x1576e9['consumable']['consume'](_0x4b43ea['item'],_0x40c005['name']))return;const _0x57a840=_0x1576e9['writer'],_0x11b4c=_0x1576e9['mapper']['toViewRange'](_0x4b43ea['range']);_0x57a840['wrap'](_0x11b4c,_0x57a840['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x3ded99){const _0x381ff8=_0x3ded99['plugins']['get']('RevisionViewer');return(_0x1265bb,_0x3c48e4,_0x4cdfff)=>{const _0x36cf92=_0x3c48e4['markerName']['split'](':')[0x1],_0x65a387=_0x381ff8['_getChangeFromId'](_0x36cf92);if(!_0x65a387)return null;const _0xa2ad05='add'==_0x65a387['type']?'split':'merge';if(!_0x4cdfff['consumable']['test'](_0x3c48e4['markerRange'],_0x1265bb['name']))return;const _0x111413=_0x3c48e4['markerRange']['getWalker'](),_0x5d1287=_0x3c48e4['markerRange']['start'],_0x2fe00c=_0x3ded99['model']['schema'];let _0x4e2b69=null,_0x1c3324=null,_0x5bf2cd=!0x1,_0x53165c=!0x1;for(const _0x1f832a of _0x111413){const _0x11bcd3=_0x1f832a['item'];_0x5bf2cd=_0x5bf2cd||_0x2fe00c['isContent'](_0x11bcd3);const _0x515d38=_0x4cdfff['mapper']['toViewElement'](_0x11bcd3);if(_0x515d38&&_0x515d38['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1f832a['type']&&(_0x2fe00c['isBlock'](_0x11bcd3)&&!_0x2fe00c['isLimit'](_0x11bcd3)&&(_0x11bcd3['nextSibling']||_0x5d1287['isAtEnd']?_0x4e2b69&&_0x4e2b69['parent']==_0x11bcd3||(_0x4e2b69=_0x11bcd3,_0x3971db(_0x1f832a['previousPosition']),_0x53165c=!0x0):_0x1c3324=_0x1c3324||_0x1f832a['previousPosition']));}function _0x3971db(_0x5f3b34){const _0x463b02=_0x4cdfff['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xa2ad05}),_0x23a7f7=_0x4cdfff['mapper']['toViewPosition'](_0x5f3b34);_0x65a387['data']['isSuggestion']&&_0x4cdfff['writer']['addClass']('ck-suggestion-marker-'+_0xa2ad05+'-new',_0x463b02),_0x381ff8['activeChange']==_0x65a387&&_0x4cdfff['writer']['addClass']('ck-suggestion-marker--active',_0x463b02),_0x4cdfff['writer']['insert'](_0x23a7f7,_0x463b02),_0x4cdfff['mapper']['bindElementToMarker'](_0x463b02,_0x3c48e4['markerName']);}_0x5bf2cd||_0x53165c||!_0x1c3324||_0x3971db(_0x1c3324);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3c5985,_0xf02679,_0x1b8ce4)=>{const _0x531494=_0x1b8ce4['mapper']['markerNameToElements'](_0xf02679['markerName']);if(_0x531494){for(const _0x5ebcc2 of _0x531494)(_0x5ebcc2['hasClass']('ck-suggestion-marker-split')||_0x5ebcc2['hasClass']('ck-suggestion-marker-merge'))&&(_0x1b8ce4['mapper']['unbindElementFromMarkerName'](_0x5ebcc2,_0xf02679['markerName']),_0x1b8ce4['writer']['remove'](_0x5ebcc2));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1323e0,_0x333000,_0x37854e)=>{const _0x5b3c6c=_0x333000['markerName']['split'](':')[0x1],_0x515871=this['_getChangeFromId'](_0x5b3c6c);if(!_0x515871)return null;const _0x5a9808='add'==_0x515871['type']?'split':'merge';if(_0x37854e['consumable']['test'](_0x333000['markerRange'],_0x1323e0['name']))for(const _0x19488e of _0x333000['markerRange']['getItems']()){if(!_0x19488e['is']('element','softBreak'))continue;const _0x488449=_0x37854e['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5a9808}),_0x152954=_0x37854e['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x19488e));_0x515871['data']['isSuggestion']&&_0x37854e['writer']['addClass']('ck-suggestion-marker-'+_0x5a9808+'-new',_0x488449),this['activeChange']==_0x515871&&_0x37854e['writer']['addClass']('ck-suggestion-marker--active',_0x488449),_0x37854e['writer']['insert'](_0x152954,_0x488449),_0x37854e['mapper']['bindElementToMarker'](_0x488449,_0x333000['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3abef5=>{for(const _0xd7194b of this['editor']['model']['document']['getRootNames']()){const _0x4cba1a=this['editor']['model']['document']['getRoot'](_0xd7194b),_0x51b8c0=this['editor']['editing']['view']['document']['getRoot'](_0xd7194b);if(_0x51b8c0){const _0xb25c8c=_0x4cba1a['getAttribute']('revisionHistoryAttachChange');if(_0x3abef5['removeAttribute']('data-change-id',_0x51b8c0),_0x3abef5['removeClass']('ck-revision-history-root-add',_0x51b8c0),_0x3abef5['removeClass']('ck-revision-history-root-remove',_0x51b8c0),_0x3abef5['removeClass']('ck-revision-history-root--active',_0x51b8c0),_0xb25c8c){const _0x3776bf=this['_getChangeFromId'](_0xb25c8c);if(!_0x3776bf)return null;_0x3abef5['setAttribute']('data-change-id',_0xb25c8c,_0x51b8c0),_0x3abef5['addClass']('ck-revision-history-root-'+_0x3776bf['type'],_0x51b8c0),this['activeChange']==_0x3776bf&&_0x3abef5['addClass']('ck-revision-history-root--active',_0x51b8c0);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x517df2=>'revision-comment:'+_0x517df2,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2e6ce6=>'revision-suggestion:'+_0x2e6ce6,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0xc2048e=>({'name':'suggestion:'+_0xc2048e,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x8d5bb=>{const _0x161f18=_0x8d5bb['markerName']['split'](':')[0x1];return'insertion'!=_0x161f18&&'deletion'!=_0x161f18?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x161f18]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ot(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ot(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2cb8c5,_0x19e70c,_0x484807)=>{const _0x3892c9=_0x484807['mapper']['markerNameToElements'](_0x19e70c['markerName']);if(_0x3892c9){for(const _0x23f659 of _0x3892c9)_0x23f659['is']('uiElement')&&(_0x484807['mapper']['unbindElementFromMarkerName'](_0x23f659,_0x19e70c['markerName']),_0x484807['writer']['remove'](_0x23f659));}},{'priority':'high'});}['_getChangeFromId'](_0x59e5f0){return this['_changeIdToChange']['get'](_0x59e5f0);}['_getViewForChange'](_0x5570e2){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x5570e2),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4d63b9,_0x3e2a31,_0x1d3737,_0x1a13b0)=>{_0x1a13b0&&this['_balloon']['remove'](_0x1a13b0),_0x1d3737&&(this['_balloon']['add']({'view':_0x1d3737,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x578671=this['editor']['editing'],_0x5517c3=this['_getChangeFromId'](_0x1d3737['changeId']);let _0x150b06;if(_0x5517c3['data']['isOnRoot']){const _0x424528=_0x578671['view']['getDomRoot'](_0x5517c3['rootName']);_0x150b06=Array['from'](_0x424528['getClientRects']());}else{const _0x3a7120=this['editor']['model']['markers']['get']('revision:'+_0x1d3737['changeId']);_0x150b06=Array['from'](_0x578671['mapper']['markerNameToElements'](_0x3a7120['name']))['map'](_0xb12c40=>_0x578671['view']['domConverter']['mapViewToDom'](_0xb12c40))['map'](_0xf67131=>Array['from'](_0xf67131['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x150b06[0x0];return _0x150b06['find'](_0x3f9683=>_0x3f9683['top']-0x3<=this['_activeViewTarget']['y']&&_0x3f9683['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3f9683['left']-0x3<=this['_activeViewTarget']['x']&&_0x3f9683['right']+0x3>=this['_activeViewTarget']['x'])||_0x150b06[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x299673,_0x76c87b,_0x4f7bfe,_0x327e25)=>{this['activeView']=_0x4f7bfe?this['_getViewForChange'](_0x4f7bfe):null,this['editor']['model']['change'](()=>{const _0x263441=this['editor']['editing'];_0x327e25&&(_0x327e25['data']['isOnRoot']?_0x263441['view']['change'](_0x5a2ec2=>{_0x5a2ec2['removeClass']('ck-revision-history-root--active',_0x263441['view']['document']['getRoot'](_0x327e25['rootName']));}):_0x263441['reconvertMarker']('revision:'+_0x327e25['id'])),_0x4f7bfe&&(_0x4f7bfe['data']['isOnRoot']?_0x263441['view']['change'](_0x2fa045=>{_0x2fa045['addClass']('ck-revision-history-root--active',_0x263441['view']['document']['getRoot'](_0x4f7bfe['rootName']));}):_0x263441['reconvertMarker']('revision:'+_0x4f7bfe['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x233ca9,_0x2ab9ec)=>{if(this['activeChange'])return;const _0x226f1f=this['_findChangeIdFromDomTarget'](_0x2ab9ec['target']),_0x558cdf=this['_changeIdToChange']['get'](_0x226f1f);_0x558cdf?(this['_activeViewTarget']={'x':_0x2ab9ec['domEvent']['x'],'y':_0x2ab9ec['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x558cdf)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2c6254,_0x3ca214)=>{const _0x437c3f=this['_findChangeIdFromDomTarget'](_0x3ca214['target']),_0x505475=this['_changeIdToChange']['get'](_0x437c3f);_0x505475?(this['_activeViewTarget']={'x':_0x3ca214['domEvent']['x'],'y':_0x3ca214['domEvent']['y']},_0x505475===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x505475):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x320073){do{const _0x402ecb=_0x320073['getAttribute']('data-change-id');if(_0x402ecb)return _0x402ecb;_0x320073=_0x320073['parent'];}while(_0x320073);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x4be57d=>{for(const _0x276a3d of this['editor']['model']['markers'])_0x4be57d['removeMarker'](_0x276a3d);});}}function Ot(_0x1a0535,_0xfddcd4){return(_0x1456f5,_0x17fec1,_0x381254)=>{if(!_0x381254['consumable']['test'](_0x17fec1['markerRange'],_0x1456f5['name']))return;const _0x4387bb=_0x17fec1['markerRange']['getWalker'](),_0x3abd15=_0x17fec1['markerRange']['start'],_0x5b65a4=_0x1a0535['model']['schema'];let _0x237d77=null,_0x4ea2bf=null,_0x44675d=!0x1,_0x5b0e70=!0x1;for(const _0x4dfa8c of _0x4387bb){const _0x5ad48e=_0x4dfa8c['item'];_0x44675d=_0x44675d||_0x5b65a4['isContent'](_0x5ad48e);const _0x3840a2=_0x381254['mapper']['toViewElement'](_0x5ad48e);if(_0x3840a2&&_0x3840a2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4dfa8c['type']&&(_0x5b65a4['isBlock'](_0x5ad48e)&&!_0x5b65a4['isLimit'](_0x5ad48e)&&(_0x5ad48e['nextSibling']||_0x3abd15['isAtEnd']?_0x237d77&&_0x237d77['parent']==_0x5ad48e||(_0x237d77=_0x5ad48e,_0x5d5b3f(_0x4dfa8c['previousPosition']),_0x5b0e70=!0x0):_0x4ea2bf=_0x4ea2bf||_0x4dfa8c['previousPosition']));}function _0x5d5b3f(_0x266dea){const _0x4a6592=_0x381254['mapper']['toViewPosition'](_0x266dea),_0xfc633=_0x381254['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xfddcd4});_0x381254['writer']['insert'](_0x4a6592,_0xfc633),_0x381254['mapper']['bindElementToMarker'](_0xfc633,_0x17fec1['markerName']);}_0x44675d||_0x5b0e70||!_0x4ea2bf||_0x5d5b3f(_0x4ea2bf);};}class Ct extends _0x30f298{constructor(_0x2bcbcd){super(_0x2bcbcd);const _0x36b22b=_0x2bcbcd['plugins']['get'](St);this['affectsData']=!0x1,this['listenTo'](_0x36b22b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x36b22b,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0xe1f61c=this['editor'],_0x21983a=_0xe1f61c['plugins']['get'](St),_0x3337ed=_0x21983a['isReady']?_0x21983a['diff']['newRevisionId']:null;_0xe1f61c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3337ed);}['refresh'](){const {isReady:_0x23b997,isEnabled:_0x401dc5,repository:_0x13b50e,diff:_0x2fba2e}=this['editor']['plugins']['get'](St),_0x7a1a92=_0x2fba2e&&_0x13b50e['getLaterVisibleRevision'](_0x2fba2e['newRevisionId']);this['isEnabled']=_0x23b997&&_0x401dc5&&Boolean(_0x7a1a92);}}class Mt extends _0x30f298{['_step'];constructor(_0x85c670,{direction:_0x2a7ded}){super(_0x85c670);const _0x4b3f04=_0x85c670['plugins']['get'](St);this['affectsData']=!0x1,this['_step']='forward'===_0x2a7ded?0x1:-0x1,this['listenTo'](_0x4b3f04,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4b3f04,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x4b3f04,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3a91b7=this['editor'],_0xe71b=_0x3a91b7['plugins']['get'](St),{isNavigationMode:_0x13e417,currentChangeNumber:_0x1135f5}=_0xe71b;let _0x541456;if(_0xe71b['activeChange']=_0x13e417?_0xe71b['diff']['changes']['get'](_0x1135f5+this['_step']):_0xe71b['diff']['changes']['first'],_0xe71b['activeChange']['data']['isOnRoot'])_0x541456=_0x3a91b7['editing']['view']['getDomRoot'](_0xe71b['activeChange']['rootName']);else{const _0x161bae=_0x3a91b7['model']['markers']['get']('revision:'+_0xe71b['activeChange']['id']);_0x541456=_0x35b617(_0x3a91b7['editing'],_0x161bae);}_0x31b275({'target':_0x541456,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x2abe3f,currentChangeNumber:_0x77802a,numberOfChanges:_0x23900a,isReady:_0x3a26b4,isEnabled:_0x50b41d}=this['editor']['plugins']['get'](St);this['isEnabled']=!!(_0x50b41d&&_0x3a26b4&&_0x23900a)&&(!_0x2abe3f||(0x1===this['_step']?_0x77802a<_0x23900a-0x1:_0x77802a>0x0));}}class Dt extends _0x18e693{constructor(_0x86e598){super(_0x86e598);const _0x1f6d73=this['bindTemplate'],_0x160018=new _0x2db7f4(_0x86e598),_0x571c68=new _0x2db7f4(_0x86e598);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',(_0x4d2298,_0xc40435)=>_0x4d2298&&_0xc40435>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2b3a1a,_0x5b84f1,_0x15b89d,_0x14d158)=>{if(!_0x2b3a1a)return wt(_0x86e598,'Loading...');if(!_0x15b89d)return wt(_0x86e598,'No\x20changes');const _0x54d336=wt(_0x86e598,'NUMBER_OF_CHANGES',_0x15b89d);return _0x14d158?wt(_0x86e598,'X_OF_Y_CHANGES',[_0x5b84f1+0x1,_0x15b89d]):_0x54d336;}),_0x160018['set']({'label':wt(_0x86e598,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x112c70}),_0x571c68['set']({'label':wt(_0x86e598,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x51d032}),_0x160018['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x571c68['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x160018['on']('execute',()=>this['fire']('execute','backward')),_0x571c68['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',_0x1f6d73['if']('_isStatusLabelVisible','ck-hidden',_0x538c7d=>!_0x538c7d)]},'children':[{'text':_0x1f6d73['to']('isNavigationMode',_0x551469=>_0x551469?wt(_0x86e598,'EDIT_X_OF_Y_REVISIONS')+':\x20':wt(_0x86e598,'Total')+':\x20')}]},{'text':_0x1f6d73['to']('_statusText')}]},new et(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x160018,_0x571c68]}]});}}const Tt='ck-editor__editable__loading-overlay';class Vt extends _0x5d0df7{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4a850c=this['editor']['editing']['view'];_0x4a850c['change'](_0x3ad94a=>{for(const _0xad4877 of _0x4a850c['document']['roots'])_0x3ad94a['addClass'](Tt,_0xad4877);});}['hide'](){const _0x2dfb72=this['editor']['editing']['view'];_0x2dfb72['change'](_0x3d1631=>{for(const _0x123e5c of _0x2dfb72['document']['roots'])_0x3d1631['removeClass'](Tt,_0x123e5c);});}}class Ht extends _0x5d0df7{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[St,Vt];}['init'](){const _0x5ef179=this['editor'],_0xbdd5d5=_0x5ef179['plugins']['get'](St),_0x46a450=_0x5ef179['plugins']['get'](Vt);_0x5ef179['ui']['componentFactory']['add']('exitToEditing',_0x3ee26b=>{const _0x3cad22=new _0x2db7f4(_0x3ee26b);return _0x3cad22['set']({'label':wt(_0x3ee26b,'Back\x20to\x20editing'),'icon':_0x99b53c,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3cad22,'execute',()=>{_0x5ef179['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3cad22;}),_0x5ef179['ui']['componentFactory']['add']('restoreRevision',_0x31707c=>{const _0x24b19b=new _0x2db7f4(_0x31707c);return _0x24b19b['set']({'label':wt(_0x31707c,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x24b19b['bind']('isEnabled')['to'](_0x5ef179['commands']['get']('restoreRevision')),this['listenTo'](_0x24b19b,'execute',()=>_0x5ef179['execute']('restoreRevision')),_0x24b19b;}),_0x5ef179['ui']['componentFactory']['add']('changesNavigation',_0x4e4495=>{const _0x104816=new Dt(_0x4e4495),_0x17078a=_0x5ef179['commands']['get']('showPreviousChange'),_0x3385a5=_0x5ef179['commands']['get']('showNextChange');return _0x104816['bind']('isBackwardNavigationEnabled')['to'](_0x17078a,'isEnabled'),_0x104816['bind']('isForwardNavigationEnabled')['to'](_0x3385a5,'isEnabled'),_0x104816['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xbdd5d5),this['listenTo'](_0x104816,'execute',(_0x2e0baf,_0x99cb8f)=>{_0x5ef179['execute']('forward'===_0x99cb8f?'showNextChange':'showPreviousChange');}),_0x104816;}),_0x46a450['show'](),_0xbdd5d5['on']('change:isReady',(_0x15045d,_0x56f063,_0x588075)=>{_0x588075?_0x46a450['hide']():_0x46a450['show']();});}}class Pt extends _0x52fa3b{['_resizeObserver']=null;constructor(_0x820772,_0x23ef5d){super(_0x820772,_0x23ef5d);const _0x5ea500=this['bindTemplate'];this['set']({'label':wt(_0x820772,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=wt(_0x820772,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5ea500['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x3a7cf9(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x15950f=this['fieldView']['element'];this['_tooltipString']=_0x15950f['scrollWidth']>_0x15950f['clientWidth']&&_0x15950f['value']||'';}}class Ut extends _0x18e693{constructor(_0x271a46,_0xd7fa04,_0x12b3eb){super(_0x271a46);const _0x39b514=new nt();_0x39b514['set']({'content':_0x5a5ee6,'viewBox':'0\x200\x2011\x2010'});const _0x218e37=['ck','ck-revision-history-sidebar__revision-author'];_0x12b3eb&&_0x218e37['push']('ck-revision-history-sidebar__revision-author_creator');const _0x41a7bf=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':wt(_0x271a46,_0x12b3eb?'Revision\x20creator':'Revision\x20author')},'children':[_0x39b514,_0xd7fa04['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x218e37},'children':_0x41a7bf});}}function Lt(_0x399854,_0x3168e6){const _0x553c51=_0x399854['bindTemplate'],_0xfeac49=_0x399854['locale'],_0x1d10be=_0x25b5c9(_0xfeac49);_0x1d10be['panelPosition']='sw';const _0x16d6ec=function(_0x4b4245,_0x8cf5dd){const _0x2aaa95=function(_0x5c0bea,_0x56b83b){const _0x1d3e63=_0x5c0bea['locale'],_0x412739={'Compare\x20against\x20selected':wt(_0x1d3e63,'Compare\x20against\x20selected'),'Name\x20this\x20revision':wt(_0x1d3e63,'Name\x20this\x20revision'),'Restore\x20this\x20revision':wt(_0x1d3e63,'Restore\x20this\x20revision')};return _0x56b83b['map'](_0x58469d=>{const _0x31ee01=_0x412739[_0x58469d['name']];return _0x31ee01&&_0x31ee01!==_0x58469d['name']&&(_0x58469d['name']=_0x31ee01),_0x58469d;});}(_0x4b4245,_0x8cf5dd),_0x281b9f=new _0x3df410();for(const _0x1a606d of _0x2aaa95){const _0x3bcb16={'type':'button','model':new rt({'label':_0x1a606d['name'],'class':_0x1a606d['class'],'withText':!0x0,'role':'menuitem','_action':_0x1a606d['action']})};_0x3bcb16['model']['bind']('isEnabled')['to'](_0x4b4245,'isActionsDropdownOpen',_0x413a88=>'function'!=typeof _0x1a606d['isEnabled']||(!_0x413a88||_0x1a606d['isEnabled'](_0x4b4245))),_0x281b9f['add'](_0x3bcb16);}return _0x281b9f;}(_0x399854,_0x3168e6);return _0x399854['bind']('isActionsDropdownOpen')['to'](_0x1d10be,'isOpen'),_0x1d10be['buttonView']['set']({'label':wt(_0xfeac49,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x51b04b}),_0x1d10be['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x553c51['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x553c51['to'](_0x98fb15=>_0x98fb15['stopPropagation']())}}),_0x1d10be['on']('execute',_0x11e455=>{_0x399854['isReady']&&'function'==typeof _0x11e455['source']['_action']&&_0x11e455['source']['_action'](_0x399854);}),ot(_0x1d10be,_0x16d6ec,{'role':'menu'}),_0x1d10be['listenTo'](_0x399854,'change:isActionsDropdownOpen',(_0x106de5,_0x20987b,_0x3f5430)=>{if(_0x3f5430)for(const _0x2428fb of _0x1d10be['listView']['items']){const _0x49730c=_0x2428fb['children']['first'],_0x4065f4=_0x3168e6['find'](_0x5bd894=>_0x5bd894['action']===_0x49730c['_action'])['isVisible'];_0x2428fb['isVisible']=void 0x0===_0x4065f4||_0x4065f4(_0x399854);}}),_0x1d10be;}class Ft extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0x222574,uid as _0x34aeba,Collection as _0x25d3ca,logWarning as _0x390dcf,FocusTracker as _0x226e20,KeystrokeHandler as _0x3f5f03,scrollViewportToShowTarget as _0x18a7fa,ResizeObserver as _0x17246d,ElementReplacer as _0x1ba009,CKEditorError as _0xbbc80}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x104e0e,set as _0x561c8d,unset as _0x92fc94,isEqual as _0xe2a0f5}from'es-toolkit/compat';import{Plugin as _0x1f70da,PendingActions as _0x1b6a73,Command as _0x2d8837,ElementApiMixin as _0x4eeeaf,Editor as _0x1b44a5}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x19894b,getMarkerDomElement as _0x15495a,ConfirmMixin as _0x2025b5,sanitizeEditorConfig as _0x1dce1b}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x2e6dc2,ViewAttributeElement as _0x3dfd51,ViewEmptyElement as _0x4e21e0,ViewRawElement as _0x3692ee,ViewUIElement as _0xaecc2,ViewDocumentFragment as _0x47f974,ViewText as _0x40c912,ViewElement as _0x42ef7e,ModelElement as _0x3d8552,ModelRange as _0xdbf5f4,ModelPosition as _0x3b35be,ModelDocumentFragment as _0x596efb,ModelText as _0x2da680}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x242a87,IconChevronUp as _0x1ef2e5,IconChevronDown as _0x437b8e,IconUndo as _0x2aa6fc,IconUser as _0x37026b,IconThreeVerticalDots as _0x2afade}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x55ac9d,View as _0x34ccfc,submitHandler as _0x3fe45e,LabeledFieldView as _0x3ffa9b,createLabeledInputText as _0x4bf2ed,createDropdown as _0x142c0e,ListView as _0xe01deb,ListItemView as _0x41a4b8,ButtonView as _0x95bba8,MenuBarMenuView as _0x512ae0,MenuBarMenuListView as _0x3d2257,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as st,ToolbarSeparatorView as et,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as ut,ToolbarView as lt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as ft}from'luxon';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x222574(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x3e9d47){super(),this['id']=_0x3e9d47['id']||_0x34aeba(),this['creator']=_0x3e9d47['creator']||null,this['authors']=_0x3e9d47['authors']||[],this['diffData']=_0x3e9d47['diffData']||null,this['toVersion']=_0x3e9d47['toVersion']||0x0,this['fromVersion']=_0x3e9d47['fromVersion']||0x0,this['set']('name',_0x3e9d47['name']||''),this['set']('createdAt',_0x3e9d47['createdAt']||new Date()),this['set']('attributes',_0x3e9d47['attributes']||{});}['setName'](_0xdad03){this['_update']({'name':_0xdad03});}['setAttribute'](_0x55ce07,_0x564c6a){const _0x463b57=_0x104e0e(this['attributes']);_0x561c8d(_0x463b57,_0x55ce07,_0x564c6a),this['_update']({'attributes':_0x463b57});}['removeAttribute'](_0x4bf15d){const _0x48db2e=_0x104e0e(this['attributes']);_0x92fc94(_0x48db2e,_0x4bf15d),this['_update']({'attributes':_0x48db2e});}['_update'](_0x328a49,_0x1b0ea4=!0x1){let _0x367786=!0x1;const _0x3ef914={'id':this['id']},_0x2cd7be=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0xcbd9f1 of _0x2cd7be){const _0x280cdf=_0x328a49[_0xcbd9f1];void 0x0!==_0x280cdf&&_0x280cdf!==this[_0xcbd9f1]&&(this[_0xcbd9f1]=_0x280cdf,_0x3ef914[_0xcbd9f1]=_0x280cdf,_0x367786=!0x0);}_0x367786&&(_0x3ef914['authors']&&(_0x3ef914['authorsIds']=_0x3ef914['authors']['map'](_0x5a2203=>_0x5a2203['id']),delete _0x3ef914['authors']),this['fire']('_update',_0x3ef914,_0x1b0ea4));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x306192=>_0x306192['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class gt extends _0x1f70da{['_revisions'];static get['requires'](){return[_0x19894b];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0xf44fd9){super(_0xf44fd9),this['_revisions']=new _0x25d3ca();}['afterInit'](){!async function(_0x219730){const _0x3b729d=_0x5b4f98([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]),_0x5e6ee7=0xeb829,_0x1aef95=0x359e09b0,_0xa486be=0x35998040^_0x1aef95,_0x178931=window[_0x5b4f98([0x44,0x61,0x74,0x65])][_0x5b4f98([0x6e,0x6f,0x77])](),_0x136498=_0x219730[_0x5b4f98([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3a4ca0=new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15f5fd=>{_0x136498[_0x5b4f98([0x6f,0x6e,0x63,0x65])](_0x5b4f98([0x72,0x65,0x61,0x64,0x79]),_0x15f5fd);}),_0x3a61cc={[_0x5b4f98([0x6b,0x74,0x79])]:_0x5b4f98([0x45,0x43]),[_0x5b4f98([0x75,0x73,0x65])]:_0x5b4f98([0x73,0x69,0x67]),[_0x5b4f98([0x63,0x72,0x76])]:_0x5b4f98([0x50,0x2d,0x32,0x35,0x36]),[_0x5b4f98([0x78])]:_0x5b4f98([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]),[_0x5b4f98([0x79])]:_0x5b4f98([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]),[_0x5b4f98([0x61,0x6c,0x67])]:_0x5b4f98([0x45,0x53,0x32,0x35,0x36])},_0x368747=_0x136498[_0x5b4f98([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5b4f98([0x67,0x65,0x74])](_0x5b4f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x486a97(){let _0x33695e,_0x2e86fe=null,_0x1c4bc3=null;try{if(_0x368747==_0x5b4f98([0x47,0x50,0x4c]))return _0x5b4f98([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x33695e=_0x21081b(),!_0x33695e)return _0x5b4f98([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x33695e[_0x5b4f98([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1c4bc3=_0x547ce2(_0x33695e[_0x5b4f98([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x33695e[_0x5b4f98([0x6a,0x74,0x69])])),await _0x47985f()?_0xa6be2f()?_0x289dd9()?_0x5b4f98([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x535688()?(_0x33695e[_0x5b4f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5b4f98([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e86fe=_0x450ec3(_0x5b4f98([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5930bb()):_0x5b4f98([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5b4f98([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5b4f98([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5b4f98([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x289dd9(){const _0x149e64=[_0x5b4f98([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5b4f98([0x74,0x72,0x69,0x61,0x6c])][_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33695e[_0x5b4f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x178931/0x3e8:0xe10*_0xa486be;return _0x33695e[_0x5b4f98([0x65,0x78,0x70])]<_0x149e64;}function _0xa6be2f(){const _0x5811b6=_0x33695e[_0x5b4f98([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x5811b6)return!0x1;if(_0x5811b6[_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b4f98([0x2a])))return!0x0;if(_0x5811b6[_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b4f98([0x52,0x48])))return!0x0;if(_0x5811b6[_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b4f98([0x52,0x52,0x48]))){if(_0x439420())return!0x0;if(_0x24f594()||_0x1d7382())return!0x0;}return!0x1;}function _0x535688(){const _0x587482=_0x33695e[_0x5b4f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x587482||0x0==_0x587482[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1e2832}=new URL(window[_0x5b4f98([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x587482[_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e2832))return!0x0;const _0x47966a=_0x1e2832[_0x5b4f98([0x73,0x70,0x6c,0x69,0x74])](_0x5b4f98([0x2e]));return _0x587482[_0x5b4f98([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xef7c67=>_0xef7c67[_0x5b4f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b4f98([0x2a])))[_0x5b4f98([0x6d,0x61,0x70])](_0x5d7b7d=>_0x5d7b7d[_0x5b4f98([0x73,0x70,0x6c,0x69,0x74])](_0x5b4f98([0x2e])))[_0x5b4f98([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x59c3b9=>_0x59c3b9[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x47966a[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5b4f98([0x6d,0x61,0x70])](_0x267445=>Array(_0x47966a[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x267445[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5b4f98([0x66,0x69,0x6c,0x6c])](_0x267445[0x0]===_0x5b4f98([0x2a])?_0x5b4f98([0x2a]):'')[_0x5b4f98([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x267445))[_0x5b4f98([0x73,0x6f,0x6d,0x65])](_0x1e8e9f=>_0x47966a[_0x5b4f98([0x65,0x76,0x65,0x72,0x79])]((_0x51325f,_0x28aee2)=>_0x1e8e9f[_0x28aee2]===_0x51325f||_0x1e8e9f[_0x28aee2]===_0x5b4f98([0x2a])));}function _0x5930bb(){return _0x2e86fe&&_0x1c4bc3?new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2663a0,_0x153e4e)=>{_0x2e86fe[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x2663a0,_0x153e4e),_0x1c4bc3[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x1d3892=>{_0x1d3892!=_0x5b4f98([0x56,0x61,0x6c,0x69,0x64])&&_0x2663a0(_0x1d3892);},_0x153e4e);}):_0x2e86fe||_0x1c4bc3||_0x5b4f98([0x56,0x61,0x6c,0x69,0x64]);}}function _0x547ce2(_0x37cfb9,_0x14dcb2){return new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x114445=>{if(_0x30b4ef())return _0x114445(_0x5b4f98([0x56,0x61,0x6c,0x69,0x64]));_0x3a35c7(),_0x136498[_0x5b4f98([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5b4f98([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x517da6=!0x1;const _0x2b418e=_0x34aeba();function _0x3404da(_0x27b82f){return!!_0x27b82f&&(typeof _0x27b82f===_0x5b4f98([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x27b82f===_0x5b4f98([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x27b82f[_0x5b4f98([0x74,0x68,0x65,0x6e])]===_0x5b4f98([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x27b82f[_0x5b4f98([0x63,0x61,0x74,0x63,0x68])]===_0x5b4f98([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1b1294(_0x9fa21f){_0x40b848(_0x9fa21f)[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x5b3e93=>{if(!_0x5b3e93||_0x5b3e93[_0x5b4f98([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5b4f98([0x6f,0x6b]))return _0x5b4f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1309d5(_0x28d286(_0x2b418e+_0x14dcb2))!=_0x5b3e93[_0x5b4f98([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5b4f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5b4f98([0x56,0x61,0x6c,0x69,0x64]);})[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x467af8=>(_0x30cb91(),_0x467af8),()=>{const _0xdec6ff=_0x4038ef();return null==_0xdec6ff?(_0x30cb91(),_0x5b4f98([0x56,0x61,0x6c,0x69,0x64])):_0x5b4f98(_0x178931-_0xdec6ff>(0x11928db0^_0x1aef95)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x114445)[_0x5b4f98([0x63,0x61,0x74,0x63,0x68])](()=>{_0x114445(_0x5b4f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x53075e=0x35a8e730^_0x1aef95;function _0x30cb91(){const _0x3e5c88=_0x5b4f98([0x6c,0x6c,0x63,0x74,0x2d])+_0x1309d5(_0x28d286(_0x37cfb9)),_0x4f4922=_0xba71ed(_0x1309d5(window[_0x5b4f98([0x4d,0x61,0x74,0x68])][_0x5b4f98([0x63,0x65,0x69,0x6c])](_0x178931/_0x53075e)));window[_0x5b4f98([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5b4f98([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3e5c88,_0x4f4922);}function _0x4038ef(){const _0x34237b=_0x5b4f98([0x6c,0x6c,0x63,0x74,0x2d])+_0x1309d5(_0x28d286(_0x37cfb9)),_0x4b7c3b=window[_0x5b4f98([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5b4f98([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x34237b);return _0x4b7c3b?window[_0x5b4f98([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xba71ed(_0x4b7c3b),0x10)*_0x53075e:null;}function _0x40b848(_0xf5fb9a){return new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x34e213,_0x172dcd)=>{_0xf5fb9a[_0x5b4f98([0x74,0x68,0x65,0x6e])](_0x34e213,_0x172dcd),window[_0x5b4f98([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x172dcd,0x359fdd70^_0x1aef95);});}}_0x136498[_0x5b4f98([0x6f,0x6e])](_0x5b4f98([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x357196,_0x23f7bb)=>{if(_0x23f7bb[0x0]!=_0x37cfb9)return _0x114445(_0x5b4f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x23f7bb[0x1]={..._0x23f7bb[0x1],[_0x5b4f98([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2b418e};},{[_0x5b4f98([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5b4f98([0x68,0x69,0x67,0x68])}),_0x136498[_0x5b4f98([0x6f,0x6e])](_0x5b4f98([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x315715=>{_0x3404da(_0x315715[_0x5b4f98([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x517da6=!0x0,_0x1b1294(_0x315715[_0x5b4f98([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5b4f98([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5b4f98([0x6c,0x6f,0x77])}),_0x3a4ca0[_0x5b4f98([0x74,0x68,0x65,0x6e])](()=>{_0x517da6||_0x114445(_0x5b4f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x30b4ef(){return _0x136498[_0x5b4f98([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b4f98([0x76,0x69,0x65,0x77])][_0x5b4f98([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5b4f98([0x61,0x75,0x74,0x6f]);}function _0x3a35c7(){_0x136498[_0x5b4f98([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b4f98([0x76,0x69,0x65,0x77])][_0x5b4f98([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5b4f98([0x61,0x75,0x74,0x6f]);}}function _0x450ec3(_0x1d587e){const _0x39ca1e=[new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31535b=>setTimeout(_0x31535b,0x3597377c^_0x1aef95)),_0x3a4ca0[_0x5b4f98([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2d86f2=>{const _0x47c144=0x359e09b7^_0x1aef95,_0x37665f=_0x219730[_0x5b4f98([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x3d05e3(){_0x37665f[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x47c144&&_0x2d86f2();}_0x3d05e3(),_0x37665f[_0x5b4f98([0x6f,0x6e])](_0x5b4f98([0x61,0x64,0x64]),_0x3d05e3);})),new window[(_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35431c=>{function _0x57dd6e(){for(const _0x8dd9fc in window)if(window[_0x5b4f98([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5b4f98([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x8dd9fc))&&window[_0x8dd9fc]==_0x5e6ee7)return _0x35431c();_0x136498[_0x5b4f98([0x73,0x74,0x61,0x74,0x65])]!=_0x5b4f98([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5b4f98([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x57dd6e,0x359e1a38^_0x1aef95);}_0x63b63(_0x5b4f98([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x57dd6e();})];return window[_0x5b4f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5b4f98([0x72,0x61,0x63,0x65])](_0x39ca1e)[_0x5b4f98([0x74,0x68,0x65,0x6e])](()=>_0x1d587e);}async function _0x347fea(){if(await _0x3a4ca0,_0x63b63(_0x5b4f98([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x3d6579=_0x219730[_0x5b4f98([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x4f734a=_0x219730[_0x5b4f98([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])](_0x3d6579[_0x5b4f98([0x69,0x64])]),_0x18580a=_0x376d71(_0x5b4f98([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x18580a[_0x5b4f98([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x3d6579['id'],_0x4f734a?_0x4f734a['id']:null,!0x0),_0x18580a[_0x5b4f98([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5b4f98([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x18580a[_0x5b4f98([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x18580a[_0x5b4f98([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x72b3b0,void(_0x18580a[_0x5b4f98([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x72b3b0);}if(_0x63b63(_0x5b4f98([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1ede15=_0x376d71(_0x5b4f98([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1ede15[_0x5b4f98([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5b4f98([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1ede15[_0x5b4f98([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1ede15[_0x5b4f98([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x72b3b0,_0x1ede15[_0x5b4f98([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x72b3b0;}_0x136498[_0x5b4f98([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b4f98([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x72b3b0,_0x136498[_0x5b4f98([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b4f98([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x72b3b0,_0x136498[_0x5b4f98([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5b4f98([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x439420(){return _0x63b63(_0x5b4f98([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x376d71(_0x5b4f98([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5b4f98([0x73,0x74,0x61,0x74,0x65])]==_0x5b4f98([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x24f594(){return _0x63b63(_0x5b4f98([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 _0x1d7382(){return _0x63b63(_0x5b4f98([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2425d8(_0x2a1909){const _0x31be4b=_0x4b34e4();_0x136498[_0x31be4b]=_0x5b4f98([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])+_0x2a1909,_0x2a1909[_0x5b4f98([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5b4f98([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x4b34e4()]=_0x5e6ee7),_0x2a1909!=_0x5b4f98([0x56,0x61,0x6c,0x69,0x64])&&_0x347fea();}function _0x4b34e4(){const _0x2a5e2a=window[_0x5b4f98([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5b4f98([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5b4f98([0x6e,0x6f,0x77])]())[_0x5b4f98([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5b4f98([0x2e]),'');let _0x31b607=_0x5b4f98([0x76]);for(let _0x2ad52b=0x0;_0x2ad52b<_0x2a5e2a[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2ad52b+=0x2){let _0x101feb=window[_0x5b4f98([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2a5e2a[_0x5b4f98([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2ad52b,_0x2ad52b+0x2));_0x101feb>=_0x3b729d[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x101feb-=_0x3b729d[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x31b607+=_0x3b729d[_0x101feb];}return _0x31b607;}function _0x21081b(){const _0x3e293d=_0x368747[_0x5b4f98([0x73,0x70,0x6c,0x69,0x74])](_0x5b4f98([0x2e]));if(0x3!=_0x3e293d[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x49ba81(_0x3e293d[0x1]);function _0x49ba81(_0x299770){const _0x573564=_0x1e25b0(_0x299770);return _0x573564&&_0x38f9ba()?_0x573564:null;function _0x38f9ba(){const _0x4c809e=_0x573564[_0x5b4f98([0x6a,0x74,0x69])],_0x4377cb=window[_0x5b4f98([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4c809e[_0x5b4f98([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4c809e[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xc0ccae={..._0x573564,[_0x5b4f98([0x6a,0x74,0x69])]:_0x4c809e[_0x5b4f98([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4c809e[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xc0ccae[_0x5b4f98([0x76,0x63])],_0x28d286(_0xc0ccae)==_0x4377cb;}}}async function _0x47985f(){let _0x568b74=!0x0;try{const _0x5e2010=_0x368747[_0x5b4f98([0x73,0x70,0x6c,0x69,0x74])](_0x5b4f98([0x2e])),[_0x195887,_0x48408b,_0x2f5ba8]=_0x5e2010;return _0x1f9000(_0x195887),await _0x18a77e(_0x195887,_0x48408b,_0x2f5ba8),_0x568b74;}catch{return!0x1;}function _0x1f9000(_0x98e646){const _0x83cedc=_0x1e25b0(_0x98e646);_0x83cedc&&_0x83cedc[_0x5b4f98([0x61,0x6c,0x67])]==_0x5b4f98([0x45,0x53,0x32,0x35,0x36])||(_0x568b74=!0x1);}async function _0x18a77e(_0x325712,_0x35f727,_0x320f1a){const _0x162625=window[_0x5b4f98([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5b4f98([0x66,0x72,0x6f,0x6d])](_0x4873e5(_0x320f1a),_0x160b54=>_0x160b54[_0x5b4f98([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1e6c9d=new window[(_0x5b4f98([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5b4f98([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x325712+_0x5b4f98([0x2e])+_0x35f727),_0xe3073f=window[_0x5b4f98([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5b4f98([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xe3073f)return;const _0x5a02f4=await _0xe3073f[_0x5b4f98([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5b4f98([0x6a,0x77,0x6b]),_0x3a61cc,{[_0x5b4f98([0x6e,0x61,0x6d,0x65])]:_0x5b4f98([0x45,0x43,0x44,0x53,0x41]),[_0x5b4f98([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5b4f98([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5b4f98([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xe3073f[_0x5b4f98([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5b4f98([0x6e,0x61,0x6d,0x65])]:_0x5b4f98([0x45,0x43,0x44,0x53,0x41]),[_0x5b4f98([0x68,0x61,0x73,0x68])]:{[_0x5b4f98([0x6e,0x61,0x6d,0x65])]:_0x5b4f98([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5a02f4,_0x162625,_0x1e6c9d)||(_0x568b74=!0x1);}}function _0x1e25b0(_0xfba9fa){return _0xfba9fa[_0x5b4f98([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5b4f98([0x65,0x79]))?JSON[_0x5b4f98([0x70,0x61,0x72,0x73,0x65])](_0x4873e5(_0xfba9fa)):null;}function _0x4873e5(_0x1f5bf3){return window[_0x5b4f98([0x61,0x74,0x6f,0x62])](_0x1f5bf3[_0x5b4f98([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5b4f98([0x2b]))[_0x5b4f98([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5b4f98([0x2f])));}function _0x28d286(_0xe65353){let _0x4bcfe6=0x1505;function _0x578e8f(_0x144268){for(let _0x438ea7=0x0;_0x438ea7<_0x144268[_0x5b4f98([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x438ea7++){const _0x51a2d6=_0x144268[_0x5b4f98([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x438ea7);_0x4bcfe6=(_0x4bcfe6<<0x5)+_0x4bcfe6+_0x51a2d6,_0x4bcfe6&=_0x4bcfe6;}}function _0x5aff36(_0x181090){Array[_0x5b4f98([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x181090)?_0x181090[_0x5b4f98([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5aff36):_0x181090&&typeof _0x181090==_0x5b4f98([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5b4f98([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x181090)[_0x5b4f98([0x73,0x6f,0x72,0x74])]()[_0x5b4f98([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x429f72,_0x59b5c5])=>{_0x578e8f(_0x429f72),_0x5aff36(_0x59b5c5);}):_0x578e8f(window[_0x5b4f98([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x181090));}return _0x5aff36(_0xe65353),_0x4bcfe6>>>0x0;}function _0x1309d5(_0x4c550e){return _0x4c550e[_0x5b4f98([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5b4f98([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5b4f98([0x30]));}function _0xba71ed(_0x21752c){return _0x21752c[_0x5b4f98([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5b4f98([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5b4f98([0x6a,0x6f,0x69,0x6e])]('');}function _0x63b63(_0x1c172f){return _0x136498[_0x5b4f98([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5b4f98([0x68,0x61,0x73])](_0x1c172f);}function _0x376d71(_0x1ed484){return _0x136498[_0x5b4f98([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5b4f98([0x67,0x65,0x74])](_0x1ed484);}function _0x72b3b0(){}function _0x5b4f98(_0x4262fa){return _0x4262fa['map'](_0x399083=>String['fromCharCode'](_0x399083))['join']('');}_0x2425d8(await _0x486a97());}(this);}['createRevision'](_0x3b4a59){const _0x4471e0=this['editor']['plugins']['get']('Users');return new vt({'id':_0x3b4a59['id'],'name':_0x3b4a59['name'],'creator':_0x3b4a59['creatorId']?_0x4471e0['getUser'](_0x3b4a59['creatorId']):null,'diffData':_0x3b4a59['diffData']||_0x3b4a59['data'],'authors':_0x3b4a59['authorsIds']['map'](_0x5167cc=>_0x4471e0['getUser'](_0x5167cc)),'createdAt':new Date(_0x3b4a59['createdAt']),'attributes':_0x3b4a59['attributes'],'fromVersion':_0x3b4a59['fromVersion'],'toVersion':_0x3b4a59['toVersion']});}['addRevision'](_0x62458b,_0x2f5257=0x0){this['_revisions']['add'](_0x62458b,_0x2f5257);}['getRevision'](_0x4b6b2a){return this['_revisions']['get'](_0x4b6b2a);}['getRevisions'](_0x4cb8c3={'toJSON':!0x1}){const _0x4b7fc4=Array['from'](this['_revisions']);return _0x4b7fc4['reverse'](),_0x4cb8c3['toJSON']?_0x4b7fc4['map'](_0xb6f106=>_0xb6f106['toJSON']()):_0x4b7fc4;}['getIndex'](_0x404c1f){return this['_revisions']['getIndex'](_0x404c1f);}['getEarlierVisibleRevision'](_0x5bada8){const [,_0x3e754e]=this['getRevisionsIterator'](_0x5bada8,{'direction':'earlier'});return _0x3e754e;}['getLaterVisibleRevision'](_0x41ce7c){const [,_0x23d898]=this['getRevisionsIterator'](_0x41ce7c,{'direction':'later'});return _0x23d898;}['getRevisionsInDiff'](_0x1d9cf2){const _0x2269b3=[];for(const _0x533267 of this['getRevisionsIterator'](_0x1d9cf2['newRevisionId']))if(_0x2269b3['push'](_0x533267),_0x533267['id']===_0x1d9cf2['oldRevisionId'])break;return _0x2269b3;}*['getRevisionsIterator'](_0xe653ef,{direction:_0x19013a='earlier',filter:_0x1fe5cc=()=>!0x0}={}){const _0x439140='earlier'===_0x19013a?0x1:-0x1;let _0xa858d6=this['_revisions']['get'](_0xe653ef),_0x437ff7=this['getIndex'](_0xa858d6);for(yield _0xa858d6;_0xa858d6;){if(_0x437ff7+=_0x439140,_0xa858d6=this['getRevision'](_0x437ff7),!_0xa858d6)return;_0x1fe5cc(_0xa858d6)&&(yield _0xa858d6);}}}class mt extends _0x1f70da{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2e6dc2,'c'],[_0x3dfd51,'a'],[_0x4e21e0,'e'],[_0x3692ee,'r'],[_0xaecc2,'u']]);['_typeCharToViewClass']=new Map([['c',_0x2e6dc2],['a',_0x3dfd51],['e',_0x4e21e0],['r',_0x3692ee],['u',_0xaecc2]]);async['loadRevisionData'](_0x321524,_0x10b842){if(_0x321524['diffData']||!_0x10b842)return;const _0x5a54a7=this['editor']['config']['get']('collaboration.channelId'),_0x3ec30c=await _0x10b842['getRevision']({'channelId':_0x5a54a7,'revisionId':_0x321524['id']});_0x321524['diffData']=_0x3ec30c['diffData'];}['getRevisionDocumentData'](_0x477677){const _0x10cbe2={};for(const _0x2976a6 in _0x477677['diffData']){if(_0x477677['diffData'][_0x2976a6]['attachChange']&&!_0x477677['diffData'][_0x2976a6]['attachChange']['isAttached'])continue;const _0x43fc2c=this['_removeRevisionMarkers'](JSON['parse'](_0x477677['diffData'][_0x2976a6]['insertions'])),_0x1ab31c=this['editor']['editing']['view']['document'],_0x328ae1=new _0x47f974(_0x1ab31c,_0x43fc2c['map'](_0x2c6255=>this['_getViewFromDiffObj'](_0x2c6255,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x10cbe2[_0x2976a6]=this['editor']['data']['processor']['toData'](_0x328ae1),this['editor']['data']['processor']['useFillerType']('default');}return _0x10cbe2;}['getRevisionRootsAttributes'](_0x46e293){const _0x815b5e={};for(const _0x5b1e55 in _0x46e293['diffData'])_0x46e293['diffData'][_0x5b1e55]['attachChange']&&!_0x46e293['diffData'][_0x5b1e55]['attachChange']['isAttached']||(_0x815b5e[_0x5b1e55]=_0x46e293['diffData'][_0x5b1e55]['attributesAfter']||{});return _0x815b5e;}['_getTypeCharForViewElement'](_0x17396b){return this['_viewClassToTypeChar']['get'](_0x17396b['constructor']);}['_getViewFromDiffObj'](_0x544a08,_0x1aef25){const _0x249ec6=this['editor']['editing']['view']['document'];if('string'==typeof _0x544a08)return new _0x40c912(_0x249ec6,_0x544a08);{let _0x2c499a,_0x173cfb;_0x173cfb='u'==_0x544a08['type']||'r'==_0x544a08['type']?[]:_0x544a08['children']['map'](_0x5816a2=>this['_getViewFromDiffObj'](_0x5816a2,_0x1aef25));const _0x484556=this['_typeCharToViewClass']['get'](_0x544a08['type'])||_0x42ef7e,_0x1d70d8=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2c499a=new _0x484556(_0x249ec6,_0x544a08['name'],_0x544a08['attributes'],_0x173cfb),'u'==_0x544a08['type']&&_0x544a08['children'][0x0]){const _0xb8c221=_0x544a08['children'][0x0];if(_0x2c499a['render']=function(_0xf0a030){const _0x5905e0=_0xf0a030['createElement']('div');return _0x5905e0['innerHTML']=_0xb8c221,_0x5905e0['childNodes'][0x0];},_0x1aef25){const _0x25c0c4=new _0x47f974(_0x249ec6);_0x25c0c4['_appendChild'](_0x2c499a);const _0x5d5f2e=Array['from'](_0x1d70d8['viewChildrenToDom'](_0x25c0c4,{'bind':!0x1})),_0x4833d2=_0x1d70d8['domDocument']['createElement']('div');_0x4833d2['append'](..._0x5d5f2e),_0x2c499a=Array['from'](_0x1d70d8['domChildrenToView'](_0x4833d2))[0x0];}}else{if('r'==_0x544a08['type']&&_0x544a08['children'][0x0]){const _0x5ee63b=_0x544a08['children'][0x0];if(_0x2c499a['render']=function(_0x254264){_0x254264['innerHTML']=_0x5ee63b;},_0x1aef25){const _0x2e21c5=new _0x47f974(_0x249ec6);_0x2e21c5['_appendChild'](_0x2c499a);const _0x2cf86e=Array['from'](_0x1d70d8['viewChildrenToDom'](_0x2e21c5,{'bind':!0x1})),_0x16565c=_0x1d70d8['domDocument']['createElement']('div');_0x16565c['append'](..._0x2cf86e);const _0x458df1=Array['from'](_0x1d70d8['domChildrenToView'](_0x16565c));_0x458df1['length']>0x1?_0x2c499a['_appendChild'](_0x458df1):_0x2c499a=_0x458df1[0x0];}}}if(_0x544a08['customProperties']){for(const [_0x4bdc3c,_0x274eb0]of _0x544a08['customProperties'])_0x2c499a['_setCustomProperty'](_0x4bdc3c,_0x274eb0);}const _0xbbbc9c=void 0x0===_0x544a08['fillerOffset']?null:_0x544a08['fillerOffset'];return null!==_0xbbbc9c&&(_0x2c499a['getFillerOffset']=()=>_0xbbbc9c),_0x2c499a;}}['_makeModelFromViewString'](_0xf2e51f){const _0x21e720=JSON['parse'](_0xf2e51f),_0x5c5c52=this['editor']['editing']['view']['document'],_0x580b4e=new _0x47f974(_0x5c5c52,_0x21e720['map'](_0x46a198=>this['_getViewFromDiffObj'](_0x46a198,!0x0)));return this['editor']['data']['toModel'](_0x580b4e);}['_removeRevisionMarkers'](_0x181431){return(_0x181431=_0x181431['filter'](_0x1cbc9=>!_0x1cbc9['name']||'revision-start'!==_0x1cbc9['name']&&'revision-end'!==_0x1cbc9['name']))['forEach'](_0x2ca49a=>{'string'!=typeof _0x2ca49a&&(_0x2ca49a['children']=this['_removeRevisionMarkers'](_0x2ca49a['children']),_0x2ca49a['attributes']=_0x2ca49a['attributes']['filter'](_0x4e4a2f=>!_0x4e4a2f[0x0]['startsWith']('data-revision-')));}),_0x181431;}}function wt(_0x1cf6c7,_0x23acdf,_0x2943f2){const t=_0x1cf6c7['t'];switch(_0x23acdf){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'},_0x2943f2);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x2943f2);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 pt extends _0x1f70da{['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[_0x19894b,gt,mt,_0x1b6a73];}constructor(_0x3857e4){super(_0x3857e4),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new _t(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x204459=_0x34aeba();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x204459},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 _0x5143c0=this['repository']['getRevision'](0x0),_0x40af87=_0x5143c0&&null===_0x5143c0['creator']?_0x5143c0:null;if(this['_continueCurrentRevision']=!!_0x40af87&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x5007e1=this['_source']['getCurrentRevisionId'](),_0x35e85d=this['repository']['getRevision'](_0x5007e1);if(_0x35e85d)this['_startingVersion']=_0x35e85d['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4941df=this['_source']['history']['_operations']['find'](_0x39358e=>!_0x39358e['_isInit']),_0x4e128c=_0x4941df?_0x4941df['baseVersion']:this['_source']['history']['version'];_0x5143c0?(_0x5143c0['toVersion']<_0x4e128c&&_0x5143c0['_update']({'toVersion':_0x4e128c}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x40af87['id'],this['_startingVersion']=_0x40af87['fromVersion']):(this['_startingVersion']=_0x5143c0['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4e128c,this['_continueCurrentRevision']=!0x1);}}else _0x40af87&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x40af87['toVersion'],this['editor']['model']['document']['history']['version']),_0x40af87['fromVersion']===_0x40af87['toVersion']?(0x0!==_0x40af87['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x40af87['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x40af87['id'],this['_startingVersion']=_0x40af87['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',_0x36d8a9=>!_0x36d8a9),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1e7fe9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3a4f8e;for(const _0x351fe7 in _0x1e7fe9){const _0x1e2b37=_0x351fe7,_0xb7ea5=_0x1e7fe9[_0x1e2b37];if('revisionHistoryLicenseKeyValid'==_0xb7ea5||'revisionHistoryLicenseKeyInvalid'==_0xb7ea5||'revisionHistoryLicenseKeyExpired'==_0xb7ea5||'revisionHistoryLicenseKeyDomainLimit'==_0xb7ea5||'revisionHistoryLicenseKeyNotAllowed'==_0xb7ea5||'revisionHistoryLicenseKeyEvaluationLimit'==_0xb7ea5||'revisionHistoryLicenseKeyUsageLimit'==_0xb7ea5){delete _0x1e7fe9[_0x1e2b37],_0x3a4f8e=_0xb7ea5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x3a4f8e&&_0x1e7fe9['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x20c7b0=this['repository']['getRevision'](0x0),_0x137a95=await this['getRevisionDocumentData'](_0x20c7b0),_0x5bb790=await this['getRevisionRootsAttributes'](_0x20c7b0);this['_replaceEditorDataWithRevisionData'](_0x137a95,_0x5bb790);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x42d9f6){this['_source']=_0x42d9f6;}async['update'](){const _0x5d395e=await this['_source']['getLatestVersion']();if(_0x5d395e>this['currentRevision']['toVersion']){await this['_loadState']();const _0x2635f5=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5d395e});_0x2635f5['authors']=_0x2635f5['authorsIds']['map'](_0x3ea129=>this['editor']['plugins']['get']('Users')['getUser'](_0x3ea129)),this['currentRevision']['_update'](_0x2635f5);}}async['saveRevision'](_0x47ecba={},_0x129c9f=null){const _0x5f50ea=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x129c9f>this['currentRevision']['toVersion']&&(_0x129c9f=null),null===_0x129c9f&&(_0x129c9f=await this['_source']['getLatestVersion']());const _0x42ef04=this['_getFromVersion'](_0x129c9f),_0x25f78b=this['buildRevisionData']({'from':_0x42ef04,'to':_0x129c9f});if(this['currentRevision']['toVersion']<_0x129c9f){const _0x4ae2a7=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x129c9f,'to':_0x129c9f});_0x4ae2a7['authors']=[],_0x4ae2a7['authorsIds']=[],_0x4ae2a7['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4ae2a7,!0x0),delete _0x4ae2a7['authors'],_0x5f50ea['push'](_0x4ae2a7);}_0x47ecba['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x47ecba['name']=_0x47ecba['name']||null,_0x47ecba['id']=_0x47ecba['id']||_0x34aeba(),_0x47ecba={..._0x47ecba,..._0x25f78b};const _0x4e2158=this['addRevisionData'](_0x47ecba);_0x5f50ea['push'](_0x47ecba);const _0x2b3dcf=this['repository']['getIndex'](_0x4e2158);if(0x0!==_0x2b3dcf){const _0x31b17c=this['repository']['getRevision'](_0x2b3dcf-0x1);if(_0x31b17c['fromVersion']!==_0x129c9f){const _0x15f219=this['_revisionDataBuilder']['getData'](_0x129c9f,_0x31b17c['toVersion']),_0x4ade85={'id':_0x31b17c['id'],'diffData':_0x15f219['diffData'],'authorsIds':_0x15f219['authorsIds'],'authors':_0x15f219['authorsIds']['map'](_0x2443ab=>this['editor']['plugins']['get']('Users')['getUser'](_0x2443ab)),'fromVersion':_0x129c9f};_0x31b17c===this['currentRevision']&&(_0x4ade85['createdAt']=new Date(_0x47ecba['createdAt']['getTime']()+0xa)),_0x31b17c['_update'](_0x4ade85,!0x0),delete _0x4ade85['authors'],_0x5f50ea['push'](_0x4ade85);}}if(this['adapter']){for(const _0x4d40fb of _0x5f50ea)this['_bufferUpdate'](_0x4d40fb['id'],_0x4d40fb,!0x0);this['sendBufferedUpdates']();}return _0x4e2158;}['addRevisionData'](_0x739366){const _0x32c790=this['repository']['createRevision'](_0x739366);return this['adapter']&&_0x32c790['on']('_update',(_0x159911,_0x356516,_0x36647b)=>{_0x36647b||(this['_bufferUpdate'](_0x356516['id'],_0x356516,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x32c790,this['_findInsertionIndex'](_0x32c790)),_0x32c790;}async['getRevisionDocumentData'](_0x24c0d6){return await this['_utils']['loadRevisionData'](_0x24c0d6,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x24c0d6);}async['getRevisionRootsAttributes'](_0x42b28e){return await this['_utils']['loadRevisionData'](_0x42b28e,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x42b28e);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x48636e=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1344ff=0x0;_0x1344ff<_0x48636e['length'];_0x1344ff++){const _0x5d2859=_0x48636e[_0x1344ff];let _0x412050=!0x1;for(const _0x3b3370 of Object['keys'](_0x5d2859))void 0x0===_0x5d2859[_0x3b3370]?delete _0x5d2859[_0x3b3370]:'id'!==_0x3b3370&&(_0x412050=!0x0);_0x412050||(_0x48636e[_0x1344ff]=null);}if(_0x48636e=_0x48636e['filter'](_0x249680=>null!==_0x249680),!_0x48636e['length'])return;for(let _0x3efd32=0x0;_0x3efd32<_0x48636e['length'];_0x3efd32++){const _0x4e595c=_0x48636e[_0x3efd32];void 0x0!==_0x4e595c['fromVersion']&&void 0x0===_0x4e595c['toVersion']&&(_0x4e595c['toVersion']=this['repository']['getRevision'](_0x4e595c['id'])['toVersion']),void 0x0!==_0x4e595c['toVersion']&&void 0x0===_0x4e595c['fromVersion']&&(_0x4e595c['fromVersion']=this['repository']['getRevision'](_0x4e595c['id'])['fromVersion']);}const _0x7bbefb=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x48636e,_0x7bbefb)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x26da85=>{if(_0x26da85){for(const _0x42e750 of _0x26da85)this['setRevisionData']({'id':_0x42e750['id'],'createdAt':_0x42e750['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x470d0f=null,from:_0x2455fe=null,to:_0x285e43=null}){_0x2455fe=null!==_0x2455fe?_0x2455fe:_0x470d0f['fromVersion'],_0x285e43=null!==_0x285e43?_0x285e43:_0x470d0f['toVersion'];const _0x16d842=this['_revisionDataBuilder']['getData'](_0x2455fe,_0x285e43),_0x1b0879={'diffData':_0x16d842['diffData'],'authorsIds':_0x16d842['authorsIds'],'fromVersion':_0x2455fe,'toVersion':_0x285e43};if(!_0x470d0f||_0x285e43!==_0x470d0f['toVersion']){const _0x13d12c=_0x285e43-0x1,_0x3adedd=this['_source']['history']['getOperation'](_0x13d12c);_0x1b0879['createdAt']=_0x3adedd&&_0x3adedd['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2455fe===this['_loadedStateData']['fromVersion']){for(const _0x1a4cca of this['_loadedStateData']['authors'])_0x1b0879['authorsIds']['includes'](_0x1a4cca['id'])||_0x1b0879['authorsIds']['push'](_0x1a4cca['id']);}return _0x1b0879;}['_bufferUpdate'](_0x398566,_0x21e85b,_0x183e37){if(this['_bufferedUpdates']['has'](_0x398566)){const _0x59c454=this['_bufferedUpdates']['get'](_0x398566);_0x21e85b=_0x183e37?{..._0x59c454,..._0x21e85b}:{..._0x21e85b,..._0x59c454};}this['_bufferedUpdates']['set'](_0x398566,_0x21e85b);}['setRevisionData'](_0x4fa656){const _0x2efa01=this['repository']['getRevision'](_0x4fa656['id']);if(_0x4fa656['createdAt']&&(_0x4fa656['createdAt']=new Date(_0x4fa656['createdAt'])),_0x4fa656['authorsIds']){const _0x2352a3=this['editor']['plugins']['get']('Users');_0x4fa656['authors']=_0x4fa656['authorsIds']['map'](_0x2d3e2f=>_0x2352a3['getUser'](_0x2d3e2f));}_0x2efa01['_update'](_0x4fa656,!0x0);}['_createInitialRevision'](_0xb26198){const _0x4f8caa=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4f8caa)this['_initialRevisionId']=_0x4f8caa['id'];else{const _0xe28bcb=!this['editor']['model']['document']['roots']['find'](_0x2e0471=>this['editor']['model']['hasContent'](_0x2e0471)),_0x14e24d=this['editor']['plugins']['get']('Users')['me']['id'],_0x37638b=wt(this['editor']['locale'],_0xe28bcb?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0xb26198,'to':_0xb26198,'id':this['_initialRevisionId'],'name':_0x37638b,'creatorId':_0x14e24d});}}['_createCurrentRevision'](_0x41d30a){const _0x46ec63=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x46ec63),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x41d30a,'to':_0x41d30a,'id':_0x46ec63,'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'](_0x49e96b,_0xb64c0a){const _0x78a229={},_0x2f35b1={},_0x468bf9=this['editor']['config']['get']('roots')||{};for(const [_0x15413d,_0x44d6c3]of Object['entries'](_0x468bf9))_0x44d6c3['lazyLoad']||(_0x78a229[_0x15413d]=_0x44d6c3['initialData']??'',_0x2f35b1[_0x15413d]=_0x44d6c3['modelAttributes']||{});for(const _0x48ec64 of this['editor']['model']['document']['getRootNames']())_0x78a229[_0x48ec64]??='',_0x2f35b1[_0x48ec64]??={};let _0x2133e3=!0x1;const _0x2018d8=Object['keys'](_0x78a229),_0x1cd883=Object['keys'](_0x49e96b);for(const _0x4610fb of _0x2018d8){if(_0x78a229[_0x4610fb]!==_0x49e96b[_0x4610fb]&&''!==_0x78a229[_0x4610fb]['trim']()){_0x2133e3=!0x0;break;}if(!_0xe2a0f5(_0x2f35b1[_0x4610fb],_0xb64c0a[_0x4610fb])&&Object['keys'](_0x2f35b1[_0x4610fb])['length']>0x0){_0x2133e3=!0x0;break;}}_0x2133e3||(_0x2133e3=_0x1cd883['some'](_0x49cc39=>!this['editor']['model']['document']['getRoot'](_0x49cc39))),_0x2133e3&&_0x390dcf('editor-initial-data-replaced-with-revision-data',{'editorData':_0x78a229,'editorRootsAttributes':_0x2f35b1,'revisionData':_0x49e96b,'revisionRootsAttributes':_0xb64c0a});for(const [_0x48bc3b,_0x4358d1]of Object['entries'](_0x49e96b))this['editor']['config']['set']('roots.'+_0x48bc3b+'.initialData',_0x4358d1);for(const [_0x3f00ae,_0x4241ff]of Object['entries'](_0xb64c0a))this['editor']['config']['set']('roots.'+_0x3f00ae+'.modelAttributes',_0x4241ff);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x3294f3=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x3294f3['add'](wt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x363689){const _0xc197e8=this['repository']['getRevisions']();_0xc197e8['reverse']();let _0xcc267b=0x0;for(;_0xcc267b<_0xc197e8['length'];){const _0x558f62=_0xc197e8[_0xcc267b];if(_0x558f62===this['currentRevision']){_0xcc267b++;continue;}if(_0x558f62['id']===this['_initialRevisionId'])break;const _0x307c0d=_0x363689['toVersion']-_0x558f62['toVersion']||_0x363689['fromVersion']-_0x558f62['fromVersion'];if(_0x307c0d>0x0)break;if(_0x307c0d<0x0)_0xcc267b++;else{if(!_0x363689['creator']&&_0x558f62['creator'])break;if(_0x558f62['creator']||!_0x363689['creator']){if(_0x363689['createdAt']>_0x558f62['createdAt'])break;_0xcc267b++;}else _0xcc267b++;}}return _0xcc267b;}['_getFromVersion'](_0x3c856c){const _0x4ec4a4=this['repository']['getRevisions']();_0x4ec4a4['reverse'](),_0x4ec4a4['shift']();const _0x4be7fa=_0x4ec4a4['find'](_0xbf9522=>_0xbf9522['toVersion']<=_0x3c856c)['toVersion'];return _0x4be7fa<this['_startingVersion']?this['_startingVersion']:_0x4be7fa;}['_makeRevision']({name:_0x3ff444,from:_0x5cb12a,to:_0x5497c3,creatorId:_0xb75330,id:_0x104341}){const _0x130533=this['buildRevisionData']({'from':_0x5cb12a,'to':_0x5497c3});_0x130533['name']=_0x3ff444,_0x130533['creatorId']=_0xb75330,_0x130533['id']=_0x104341;const _0x305293=this['addRevisionData'](_0x130533);return this['adapter']&&this['_bufferUpdate'](_0x130533['id'],_0x130533,!0x0),_0x305293;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class _t{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x552bc3){this['editor']=_0x552bc3,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'](_0x1dac7a){this['source']=_0x1dac7a;const _0x17a8a1=new Map(),_0x1ac820=new Map(),_0x1256af=this['editor']['model']['document']['roots']['map'](_0x3f4b05=>_0x3f4b05['rootName']);for(const _0x1179ac of _0x1256af){const _0x43011d=this['editor']['model']['document']['getRoot'](_0x1179ac),_0x345827=yt(_0x43011d);_0x17a8a1['set'](_0x1179ac,_0x345827),_0x1ac820['set'](_0x1179ac,Object['fromEntries'](_0x43011d['getAttributes']()));}const _0x46048c=Array['from'](this['editor']['model']['markers'])['map'](_0x1479f4=>[_0x1479f4['name'],_0x1479f4['getRange']()]),_0x4e34a7=this['source']['version'];this['_saveMetaData'](_0x4e34a7,_0x17a8a1,_0x46048c,_0x1ac820),this['_startingRevisionId']=this['_revisionId'];const _0x10d6b7=new Map(),_0x2472fc=new Map();for(const _0x46b929 of _0x1256af){const _0x342af0=bt(_0x46b929);_0x10d6b7['set'](_0x46b929,_0x342af0),_0x2472fc['set'](_0x46b929,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x10d6b7,[],_0x2472fc);}['getData'](_0x4b608b,_0x24451c){if(this['_lastFrom']===_0x4b608b&&this['_lastTo']<=_0x24451c)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x24451c,!0x0);else{if(!this['_savedMetaData']['has'](_0x4b608b)){const _0x1a1258=this['_getPreviousFrom'](_0x4b608b);this['_calculateMetaData'](_0x1a1258,_0x4b608b,!0x1);}this['_calculateMetaData'](_0x4b608b,_0x24451c,!0x0);}return this['_lastFrom']=_0x4b608b,this['_lastTo']=_0x24451c,this['_getState']();}['loadState'](_0x487c23){if(!this['_savedMetaData']['has'](_0x487c23['fromVersion'])){const _0x12a80d=this['_getPreviousFrom'](_0x487c23['fromVersion']);this['_calculateMetaData'](_0x12a80d,_0x487c23['fromVersion'],!0x1);}this['_calculateMetaData'](_0x487c23['fromVersion'],_0x487c23['toVersion'],!0x1);const _0xd59ec2=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x487c23['fromVersion'],this['_lastTo']=_0x487c23['toVersion'];for(const _0xf2ead4 in _0x487c23['diffData']){const _0x2c38d6=_0x487c23['diffData'][_0xf2ead4]['attachChange'],_0x3039f0=_0x104e0e(_0x487c23['diffData'][_0xf2ead4]['attributesBefore'])||{},_0x2dadf7=_0xd59ec2['_makeModelFromViewString'](_0x487c23['diffData'][_0xf2ead4]['deletions']);_0x2dadf7['rootName']=_0xf2ead4,_0x2dadf7['_isAttached']=!_0x2c38d6||!_0x2c38d6['isAttached'],_0x2dadf7['isAttached']=()=>_0x2dadf7['_isAttached'],this['_baseRoots']['set'](_0xf2ead4,_0x2dadf7),this['_baseRootsAttributes']['set'](_0xf2ead4,_0x3039f0),_0x2c38d6&&this['_touchedRoots']['set'](_0xf2ead4,_0x2c38d6);const _0xfd5a3b=this['_makeIdsRoot'](_0x2dadf7);this['_baseIdsRoots']['set'](_0xf2ead4,_0xfd5a3b);for(const [_0x1c0940,_0x4dcaa5]of _0x2dadf7['markers']){if(!_0x1c0940['startsWith']('revision:'))continue;const _0xfd7aed=_0x1c0940['split'](':')[0x2];for(const _0x9b97e6 of _0x4dcaa5['getWalker']({'singleCharacters':!0x0})){const _0x9777b0=this['_getVidAttributeName'](_0x9b97e6),_0x3ca2eb='elementEnd'==_0x9b97e6['type']?_0x9b97e6['previousPosition']['path']['slice'](0x0,-0x1):_0x9b97e6['previousPosition']['path'],_0x285f6c=_0xfd5a3b['getNodeByPath'](_0x3ca2eb)['getAttribute'](_0x9777b0);this['_touched']['set'](_0x285f6c,{'userId':_0xfd7aed});}_0x2dadf7['markers']['delete'](_0x1c0940);}}this['_startingRevisionId']=this['_revisionId'];const _0xfb7523=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3fcb9b=>!this['_touched']['has'](_0x3fcb9b));let _0x2a1af2=0x0;const _0x6e916d=new Map();for(const _0x1f4550 in _0x487c23['diffData']){const _0x2a0949=_0x487c23['diffData'][_0x1f4550]['attachChange'],_0x20c0bb=_0x104e0e(_0x487c23['diffData'][_0x1f4550]['attributesAfter'])||{},_0x5cf002=_0xd59ec2['_makeModelFromViewString'](_0x487c23['diffData'][_0x1f4550]['insertions']);_0x5cf002['rootName']=_0x1f4550,_0x5cf002['_isAttached']=!_0x2a0949||_0x2a0949['isAttached'],_0x5cf002['isAttached']=()=>_0x5cf002['_isAttached'],this['_diffRoots']['set'](_0x1f4550,_0x5cf002),this['_diffRootsAttributes']['set'](_0x1f4550,_0x20c0bb);const _0x485201=this['_makeIdsRoot'](_0x5cf002,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x1f4550,_0x485201),_0x6e916d['set'](_0x1f4550,_0x5cf002['isAttached']()?_0x20c0bb:{});for(const [_0x4574c8,_0x23cec5]of _0x5cf002['markers']){if(!_0x4574c8['startsWith']('revision:'))continue;const _0xedc86e=_0x4574c8['split'](':')[0x2];for(const _0x407add of _0x23cec5['getWalker']({'singleCharacters':!0x0})){const _0x2b7731=this['_getVidAttributeName'](_0x407add),_0x28939f=this['_revisionId']++,_0x2cdedc='elementEnd'==_0x407add['type']?_0x407add['previousPosition']['path']['slice'](0x0,-0x1):_0x407add['previousPosition']['path'];_0x485201['getNodeByPath'](_0x2cdedc)['_setAttribute'](_0x2b7731,_0x28939f),this['_touched']['set'](_0x28939f,{'userId':_0xedc86e});}_0x5cf002['markers']['delete'](_0x4574c8);}for(const _0x5d864a of this['editor']['model']['createRangeIn'](_0x5cf002)['getWalker']({'singleCharacters':!0x0})){const _0x4a0200=this['_getVidAttributeName'](_0x5d864a),_0x4d6416='elementEnd'==_0x5d864a['type']?_0x5d864a['previousPosition']['path']['slice'](0x0,-0x1):_0x5d864a['previousPosition']['path'],_0x151d4b=_0x485201['getNodeByPath'](_0x4d6416);_0x151d4b['getAttribute'](_0x4a0200)>0x0||_0x151d4b['_setAttribute'](_0x4a0200,_0xfb7523[_0x2a1af2++]);}for(const [_0x1bbc6d,_0x137d73]of _0x5cf002['markers'])_0x1bbc6d['startsWith']('revision:')||this['_markers']['set'](_0x1bbc6d,_0x137d73);}const {roots:_0x415b6b}=this['_savedMetaData']['get'](_0x487c23['fromVersion']),{roots:_0x49d7b0}=this['_savedMetaData']['get'](_0x487c23['toVersion']),_0xa57e62=yt(_0x415b6b['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0xa57e62),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xa57e62,Number['NEGATIVE_INFINITY']));const _0x359744=yt(_0x49d7b0['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x359744),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x359744));const _0x55b2b0=Array['from'](this['_diffRoots'])['map'](([_0x4f8a46,_0x28043b])=>[_0x4f8a46,yt(_0x28043b)]);this['_saveMetaData'](this['_lastTo'],_0x55b2b0,this['_markers'],_0x6e916d);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x5c01b5,_0x12f2e6,_0x475cf9,_0x2e30d0){const _0x5d1893=new Map(_0x12f2e6),_0x4236da=new Map(_0x104e0e(_0x2e30d0)),_0x30234a=new Map();for(const [_0x230472,_0x2cb8f2]of _0x475cf9)_0x30234a['set'](_0x230472,{'start':_0x2cb8f2['start']['clone'](),'end':_0x2cb8f2['end']['clone'](),'rootName':_0x2cb8f2['root']['rootName']});this['_savedMetaData']['set'](_0x5c01b5,{'roots':_0x5d1893,'markers':_0x30234a,'rootsAttributes':_0x4236da});}['_removeMetaData'](_0x4c86e5){this['_savedMetaData']['delete'](_0x4c86e5);}['_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'](_0x23a072,_0x51d084=null){let _0x362971=null;_0x23a072['is']('documentFragment')||(_0x362971=new _0x3d8552(_0x23a072['name'],{'vid_start':null===_0x51d084?this['_revisionId']++:_0x51d084++}));const _0x48f5d1=[];for(const _0x30fadd of _0x23a072['getChildren']())if(_0x30fadd['is']('element')){_0x48f5d1['push'](this['_makeIdsRoot'](_0x30fadd,_0x51d084));const _0x39b50b=_0x48f5d1[_0x48f5d1['length']-0x1];null!==_0x51d084&&(_0x51d084=_0x39b50b['is']('element','$text')?_0x39b50b['getAttribute']('vid')+0x1:_0x39b50b['getAttribute']('vid_end')+0x1);}else{for(let _0x1107ae=0x0;_0x1107ae<_0x30fadd['offsetSize'];_0x1107ae++)_0x48f5d1['push'](new _0x3d8552('$text',{'vid':null===_0x51d084?this['_revisionId']++:_0x51d084++}));}if(_0x23a072['is']('documentFragment')){const _0x563fa2=bt(_0x23a072['rootName']);return _0x563fa2['_insertChild'](0x0,_0x48f5d1),_0x563fa2;}return _0x362971['_setAttribute']('vid_end',null===_0x51d084?this['_revisionId']++:_0x51d084++),_0x362971['_insertChild'](0x0,_0x48f5d1),_0x362971;}['_calculateMetaData'](_0x821b3,_0x52966c,_0x40c9d5){this['_reset']();const {roots:_0x5d5d8c,markers:_0x9b5ef3,rootsAttributes:_0x1e7f56}=this['_savedMetaData']['get'](_0x821b3);this['_baseRoots']=new Map(_0x5d5d8c),this['_baseRootsAttributes']=new Map(_0x104e0e(_0x1e7f56));for(const [_0x3e0e25,_0x1116a1]of this['_baseRoots'])if('$graveyard'!==_0x3e0e25&&(this['_diffRoots']['set'](_0x3e0e25,yt(_0x1116a1)),this['_diffRootsAttributes']=new Map(_0x104e0e(_0x1e7f56)),_0x40c9d5)){const _0x549748=this['_revisionId'];this['_idsRoots']['set'](_0x3e0e25,this['_makeIdsRoot'](_0x1116a1)),this['_baseIdsRoots']['set'](_0x3e0e25,this['_makeIdsRoot'](_0x1116a1,_0x549748));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',yt(this['_baseRoots']['get']('$graveyard'))),_0x40c9d5&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x3894c0,_0x37a5d9]of _0x9b5ef3){const _0x224a9a=this['_baseRoots']['get'](_0x37a5d9['rootName']),_0x1e033d=this['_diffRoots']['get'](_0x37a5d9['rootName']),_0x5e6e88=new _0xdbf5f4(this['_fixPosition'](_0x37a5d9['start'],_0x224a9a),this['_fixPosition'](_0x37a5d9['end'],_0x224a9a)),_0x3ad2b7=this['_fixRange'](_0x5e6e88,_0x1e033d);_0x224a9a['markers']['set'](_0x3894c0,_0x5e6e88),this['_markers']['set'](_0x3894c0,_0x3ad2b7);}this['_applyOperations'](_0x821b3,_0x52966c,_0x40c9d5);}['_applyOperations'](_0x561408,_0x223cd3,_0x4d9d04){for(const _0x5ccfe4 of this['source']['getOperations'](_0x561408,_0x223cd3))this['_handleOperation'](_0x5ccfe4,_0x4d9d04);for(const _0x5a1bec of this['_diffRoots']['values']())_0x5a1bec['markers']['clear']();for(const [_0x41bbb5,_0x6aec4e]of this['_markers']){this['_diffRoots']['get'](_0x6aec4e['root']['rootName'])['markers']['set'](_0x41bbb5,_0x6aec4e['clone']());}const _0x5b7a0e=new Map(),_0x56e0df=new Map();for(const [_0x576aa7,_0x23ecc1]of this['_diffRoots'])_0x5b7a0e['set'](_0x576aa7,yt(_0x23ecc1)),_0x56e0df['set'](_0x576aa7,this['_diffRootsAttributes']['get'](_0x576aa7));this['_saveMetaData'](_0x223cd3,_0x5b7a0e,this['_markers'],_0x56e0df);}['_getPreviousFrom'](_0x423470){const _0x2ea014=Array['from'](this['_savedMetaData']['keys']());_0x2ea014['sort']((_0x4fdbf3,_0x3b79d6)=>_0x4fdbf3-_0x3b79d6),_0x2ea014['reverse']();for(const _0x5cda4b of _0x2ea014)if(_0x5cda4b<_0x423470)return _0x5cda4b;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x56d300,_0x35f246){const _0x5a6842=Array['from'](_0x35f246['markers'])['map'](([_0x31966e,_0x45c6c3])=>[_0x31966e,this['_fixRange'](_0x45c6c3,_0x56d300)]);_0x56d300['markers']=new Map(_0x5a6842);}['_transformMarkers'](_0x337338){for(const _0x546631 of this['_markers']['values']()){const _0x16c014=_0x546631['getTransformedByOperation'](_0x337338),_0x42833b=_0xdbf5f4['_createFromRanges'](_0x16c014);_0x546631['start']=_0x42833b['start'],_0x546631['end']=_0x42833b['end'];}}['_handleOperation'](_0x422c3e,_0x2e9691){if('addRoot'!=_0x422c3e['type']&&'detachRoot'!=_0x422c3e['type']){if('insert'==_0x422c3e['type']){const _0x2e89ce=_0x422c3e['position']['root']['rootName'];this['_diffRoots']['has'](_0x2e89ce)||(this['_diffRoots']['set'](_0x2e89ce,bt(_0x2e89ce,!0x0)),this['_diffRootsAttributes']['set'](_0x2e89ce,{}),_0x2e9691&&this['_idsRoots']['set'](_0x2e89ce,bt(_0x2e89ce,!0x0)));}else{if('addRootAttribute'==_0x422c3e['type']||'removeRootAttribute'==_0x422c3e['type']||'changeRootAttribute'==_0x422c3e['type'])return void this['_handleRootAttributeOperation'](_0x422c3e);'marker'==_0x422c3e['type']&&this['_handleMarkerOperation'](_0x422c3e);}if('marker'!==_0x422c3e['type']){const _0x4a291d=this['_cloneOperation'](_0x422c3e,this['_diffRoots']);_0x4a291d['_execute'](),this['_transformMarkers'](_0x4a291d);}if(_0x2e9691)switch(_0x422c3e['type']){case'insert':this['_handleInsertOperation'](_0x422c3e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x422c3e);break;case'merge':this['_handleMergeOperation'](_0x422c3e);break;case'split':this['_handleSplitOperation'](_0x422c3e);}}else this['_handleRootOperation'](_0x422c3e,_0x2e9691);}['_cloneOperation'](_0x2c9cf8,_0x1fdae7){const _0xde8efb=_0x2c9cf8['clone']();return _0xde8efb['_authorId']=_0x2c9cf8['_authorId'],this['_fixOperation'](_0xde8efb,_0x1fdae7),_0xde8efb;}['_getBaseVids'](_0x3ab39d){return _0x3ab39d['map'](_0x12db0f=>{const _0x217974=this['_getVidAttributeName'](_0x12db0f);return Number(_0x12db0f['item']['getAttribute'](_0x217974));});}['_generateTape'](_0x2b7292,_0x5b7a06){if(_0x2b7292['is']('element','$text'))_0x5b7a06['push']({'item':_0x2b7292,'type':'text'});else{_0x2b7292['is']('element')&&_0x5b7a06['push']({'item':_0x2b7292,'type':'elementStart'});for(const _0x2fce0f of _0x2b7292['getChildren']())this['_generateTape'](_0x2fce0f,_0x5b7a06);_0x2b7292['is']('element')&&_0x5b7a06['push']({'item':_0x2b7292,'type':'elementEnd'});}return _0x5b7a06;}['_getState'](){const _0x1db3ea=new Map(this['_touched']),_0x557c64=new Map(_0x1db3ea),_0x3800b7=new Map(),_0x3ae634={'insertions':{},'deletions':{}},_0x16c8f2={'insertions':{},'deletions':{}},_0xfdd736=new Map(),_0x4c3a89=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x4c3a89['delete']('$graveyard');for(const _0xc0c092 of _0x4c3a89){const _0x7468e0=this['_diffRoots']['get'](_0xc0c092)||bt(_0xc0c092,!0x1),_0x25a3d8=this['_baseRoots']['get'](_0xc0c092)||bt(_0xc0c092,!0x1);_0x7468e0['isAttached']()||_0x25a3d8['isAttached']()?(_0x3ae634['insertions'][_0xc0c092]=yt(_0x7468e0),_0x3ae634['deletions'][_0xc0c092]=yt(_0x25a3d8),this['_copyMarkers'](_0x3ae634['deletions'][_0xc0c092],_0x25a3d8),this['_copyMarkers'](_0x3ae634['insertions'][_0xc0c092],_0x7468e0),_0x16c8f2['insertions'][_0xc0c092]=this['_generateTape'](this['_idsRoots']['get'](_0xc0c092),[]),_0x16c8f2['deletions'][_0xc0c092]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xc0c092)||bt(_0xc0c092,!0x1),[])):_0x4c3a89['delete'](_0xc0c092);}for(const _0x2a8b3c of _0x4c3a89){const _0x214b36=_0x16c8f2['insertions'][_0x2a8b3c];for(const _0x3887ef of _0x214b36){const _0x442927=this['_getVidAttributeName'](_0x3887ef),_0x5ae6a3=_0x3887ef['item']['getAttribute'](_0x442927);_0x557c64['delete'](_0x5ae6a3),_0x5ae6a3>=this['_startingRevisionId']&&_0x3800b7['set'](_0x5ae6a3,_0x1db3ea['get'](_0x5ae6a3));}}for(const _0x574fbc of _0x4c3a89){const _0x43a9ed=_0x16c8f2['insertions'][_0x574fbc],_0x46adc8=this['_getBaseVids'](_0x16c8f2['deletions'][_0x574fbc]);let _0xd371f=0x0;for(const _0x2e14a8 of _0x43a9ed){const _0x3159b3=this['_getVidAttributeName'](_0x2e14a8),_0x30ba29=_0x2e14a8['item']['getAttribute'](_0x3159b3);if(!_0x3800b7['has'](_0x30ba29)&&!_0xfdd736['has'](_0x30ba29)){if(_0x557c64['has'](_0x30ba29))_0xd371f++;else{if(_0x30ba29!=_0x46adc8[_0xd371f]){const _0xb90cf4=_0x1db3ea['get'](_0x30ba29)||_0x1db3ea['get'](_0x46adc8[_0xd371f]);for(;_0x30ba29!=_0x46adc8[_0xd371f];)_0x557c64['has'](_0x46adc8[_0xd371f])||(_0xfdd736['set'](_0x46adc8[_0xd371f],_0xb90cf4),_0x1db3ea['set'](_0x46adc8[_0xd371f],_0xb90cf4)),_0xd371f++;}_0xd371f++;}}}}for(const _0x56f71e of _0x4c3a89){const _0x582a23=_0x16c8f2['insertions'][_0x56f71e];for(const _0xd9ff22 of _0x582a23){const _0x2a9d55=this['_getVidAttributeName'](_0xd9ff22),_0x2cb9eb=_0xd9ff22['item']['getAttribute'](_0x2a9d55);if(_0xfdd736['has'](_0x2cb9eb)){const _0x6d1076=_0xfdd736['get'](_0x2cb9eb);_0x557c64['has'](_0x2cb9eb)||_0x557c64['set'](_0x2cb9eb,{..._0x6d1076}),_0x3800b7['set'](_0x2cb9eb,{..._0x6d1076});}}}for(const _0x4f0c05 of _0x557c64['keys']())_0x4f0c05>=this['_startingRevisionId']&&_0x557c64['delete'](_0x4f0c05);const _0x51c7ea=new Map();for(const _0x302498 of _0x4c3a89){let _0x42fbda=_0x16c8f2['insertions'][_0x302498];for(const _0x3191f4 of _0x42fbda)if(_0x3191f4['item']['is']('element','tableCell')){const _0x5167e3=this['_getVidAttributeName'](_0x3191f4),_0x13728c=_0x3191f4['item']['getAttribute'](_0x5167e3);if(_0x3800b7['has'](_0x13728c)){const _0x3cc9e8=_0x3191f4['item']['parent']['parent']['getAttribute']('vid_start'),_0x4df484=_0x51c7ea['get'](_0x3cc9e8)||new Set();_0x4df484['add'](_0x3800b7['get'](_0x13728c)['userId']),_0x51c7ea['set'](_0x3cc9e8,_0x4df484);}}_0x42fbda=_0x16c8f2['deletions'][_0x302498];for(const _0x4a583c of _0x42fbda)if(_0x4a583c['item']['is']('element','tableCell')){const _0x5096bd=this['_getVidAttributeName'](_0x4a583c),_0x390f75=_0x4a583c['item']['getAttribute'](_0x5096bd);if(_0x557c64['has'](_0x390f75)){const _0x4cb719=_0x4a583c['item']['parent']['parent']['getAttribute']('vid_start'),_0xa23fb7=_0x51c7ea['get'](_0x4cb719)||new Set();_0xa23fb7['add'](_0x557c64['get'](_0x390f75)['userId']),_0x51c7ea['set'](_0x4cb719,_0xa23fb7);}}for(const _0x357a1c of _0x51c7ea['keys']())(_0x3800b7['has'](_0x357a1c)||_0x557c64['has'](_0x357a1c))&&_0x51c7ea['delete'](_0x357a1c);}for(const _0x32b817 of _0x4c3a89){const _0x1e13d1=_0x16c8f2['insertions'][_0x32b817];let _0x431eb4=null,_0x57eec0=null;for(const _0x41cea2 of _0x1e13d1){const _0xc09b2d=this['_getVidAttributeName'](_0x41cea2),_0x49593c=_0x41cea2['item']['getAttribute'](_0xc09b2d),_0x267c74=_0x51c7ea['get'](_0x49593c);_0x267c74&&'elementStart'==_0x41cea2['type']&&(_0x431eb4=Array['from'](_0x267c74)[0x0],_0x57eec0=_0x41cea2['item']['getAttribute']('vid_end')),_0x431eb4&&(_0x557c64['set'](_0x49593c,{'userId':_0x431eb4}),_0x3800b7['set'](_0x49593c,{'userId':_0x431eb4})),_0x49593c==_0x57eec0&&(_0x431eb4=null,_0x57eec0=null);}}const _0x735d34={},_0x133366=new Set();for(const _0x7cc4f5 of _0x4c3a89){const _0x2f2589=_0x3ae634['deletions'][_0x7cc4f5],_0xb20c1=_0x3ae634['insertions'][_0x7cc4f5];for(const {userId:_0x3be13d}of this['_touchedMarkers']['values']())null!==_0x3be13d&&_0x133366['add'](_0x3be13d);for(const {userId:_0x22d5a8}of this['_touchedRoots']['values']())null!==_0x22d5a8&&_0x133366['add'](_0x22d5a8);this['_markChanges'](_0xb20c1,_0x16c8f2['insertions'][_0x7cc4f5],_0x3800b7,'insertion',_0x133366),this['_markChanges'](_0x2f2589,_0x16c8f2['deletions'][_0x7cc4f5],_0x557c64,'deletion',_0x133366),_0x735d34[_0x7cc4f5]={'insertions':this['_prepareViewToSave'](_0xb20c1),'deletions':this['_prepareViewToSave'](_0x2f2589),'attachChange':this['_touchedRoots']['get'](_0x7cc4f5)||null,'attributesBefore':_0x104e0e(this['_baseRootsAttributes']['get'](_0x7cc4f5))||{},'attributesAfter':_0x104e0e(this['_diffRootsAttributes']['get'](_0x7cc4f5))};}return{'diffData':_0x735d34,'authorsIds':Array['from'](_0x133366)};}['_processRootBeforeSave'](_0x1741a3){for(const [,_0x31f37a]of _0x1741a3['markers']){const _0x380504=_0x31f37a['start']['getAncestors']()['filter'](_0x374adc=>'tableCell'==_0x374adc['name']);for(const _0x468da4 of _0x380504)0x1==_0x468da4['childCount']&&_0x468da4['getChild'](0x0)['is']('element','paragraph')&&_0x468da4['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x3b8c93){this['_processRootBeforeSave'](_0x3b8c93);const _0x300c9e=this['editor']['data']['toView'](_0x3b8c93,{}),_0x2308e1=Array['from'](_0x300c9e['getChildren']())['map'](_0x2acc7a=>this['_getViewJson'](_0x2acc7a));return JSON['stringify'](_0x2308e1);}['_getViewJson'](_0x1e0aa7){if(_0x1e0aa7['is']('$text'))return _0x1e0aa7['data'];{const _0x3cf544=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x2a16ee=_0x1e0aa7,_0x57d86b=this['editor']['data']['htmlProcessor']['domConverter'],_0x11e492={'type':_0x3cf544['_getTypeCharForViewElement'](_0x2a16ee),'name':_0x2a16ee['name'],'attributes':Array['from'](_0x2a16ee['getAttributes']()),'children':Array['from'](_0x2a16ee['getChildren']())['map'](_0x5be4bf=>this['_getViewJson'](_0x5be4bf))};if(_0x1e0aa7['is']('uiElement')&&'$comment'!=_0x1e0aa7['name']){const _0x4fb797=_0x1e0aa7['render'](_0x57d86b['domDocument'],_0x57d86b);_0x11e492['children']['push'](_0x4fb797['outerHTML']);}else{if(_0x1e0aa7['is']('rawElement')){const _0x4ccf95=_0x57d86b['domDocument']['createElement'](_0x2a16ee['name']);_0x1e0aa7['render'](_0x4ccf95,_0x57d86b),_0x11e492['children']['push'](_0x4ccf95['innerHTML']);}}const _0x45f6cb=Array['from'](_0x2a16ee['getCustomProperties']());_0x45f6cb['length']>0x0&&(_0x11e492['customProperties']=_0x45f6cb);const _0x11a8b7=_0x2a16ee['getFillerOffset']();return null!==_0x11a8b7&&(_0x11e492['fillerOffset']=_0x11a8b7),_0x11e492;}}['_markChanges'](_0x388aa1,_0x152b32,_0x7600a6,_0x95b7dc,_0x3b4979){let _0x490c3f=null,_0x5e11ed=null,_0x3bddbf=0x0;const _0x185498=this['editor']['model'];for(let _0x3bad19=0x0;_0x3bad19<_0x152b32['length'];_0x3bad19++){const _0x7d83cb=this['_getVidAttributeName'](_0x152b32[_0x3bad19]),_0x189273=_0x152b32[_0x3bad19]['item']['getAttribute'](_0x7d83cb),_0x10e232=_0x7600a6['get'](_0x189273),_0x2d5590=_0x3bad19==_0x152b32['length']-0x1;(!_0x490c3f&&_0x10e232&&(_0x490c3f=_0x10e232,_0x5e11ed=_0x152b32[_0x3bad19]),_0x490c3f&&(!_0x10e232||_0x10e232['userId']!=_0x490c3f['userId']))&&(_0x12fcc4(_0x10e232,Rt(_0x5e11ed,_0x388aa1,_0x185498),Rt(_0x152b32[_0x3bad19],_0x388aa1,_0x185498)),_0x490c3f=_0x10e232||null,_0x5e11ed=_0x10e232?_0x152b32[_0x3bad19]:null),_0x490c3f&&_0x2d5590&&_0x12fcc4(_0x10e232,Rt(_0x5e11ed,_0x388aa1,_0x185498),kt(_0x152b32[_0x3bad19],_0x388aa1,_0x185498));}function _0x12fcc4(_0x393dd2,_0x263e44,_0x4c5623){const _0x46659b=_0x490c3f['userId'],_0x436068='revision:'+_0x95b7dc+':'+_0x46659b+':'+_0x3bddbf++,_0x2d5f85=_0x185498['createRange'](_0x263e44,_0x4c5623);_0x388aa1['markers']['set'](_0x436068,_0x2d5f85),null!==_0x46659b&&_0x3b4979['add'](_0x46659b);}}['_getVidAttributeName'](_0x5dbc47){switch(_0x5dbc47['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x9a9d16,_0x436025){_0x9a9d16['baseVersion']=null;for(const _0x15c092 in _0x9a9d16){const _0x173701=_0x9a9d16[_0x15c092];if(_0x173701 instanceof _0x3b35be){const _0x33bd03=_0x436025['get'](_0x173701['root']['rootName']);_0x9a9d16[_0x15c092]=this['_fixPosition'](_0x173701,_0x33bd03);}if(_0x173701 instanceof _0xdbf5f4){const _0x2a48da=_0x436025['get'](_0x173701['root']['rootName']);_0x9a9d16[_0x15c092]=this['_fixRange'](_0x173701,_0x2a48da);}'root'===_0x15c092&&(_0x9a9d16['root']=_0x436025['get'](_0x9a9d16['root']['rootName']));}}['_fixRange'](_0x4ac8ae,_0x4a12a9){return this['editor']['model']['createRange'](this['_fixPosition'](_0x4ac8ae['start'],_0x4a12a9),this['_fixPosition'](_0x4ac8ae['end'],_0x4a12a9));}['_fixPosition'](_0x37810c,_0x1f4eeb){return this['editor']['model']['createPositionFromPath'](_0x1f4eeb,_0x37810c['path'],_0x37810c['stickiness']);}['_handleInsertOperation'](_0x50e546){const _0x31c1dc=this['_idsRoots']['get'](_0x50e546['position']['root']['rootName']),_0x5364bd=this['_fixPosition'](_0x50e546['position'],_0x31c1dc),_0x31b8e8=null===_0x50e546['_authorId']?null:_0x50e546['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2b17db=_0x5364bd['parent'],_0x40869d=this['_revisionId'],_0x2de008=[];for(const _0x1eb661 of _0x50e546['nodes'])if(_0x1eb661['is']('element'))_0x2de008['push'](this['_makeIdsRoot'](_0x1eb661));else{for(let _0xf5592=0x0;_0xf5592<_0x1eb661['offsetSize'];_0xf5592++)_0x2de008['push'](new _0x3d8552('$text',{'vid':this['_revisionId']++}));}const _0xff38=this['_revisionId'];for(let _0x32ef89=_0x40869d;_0x32ef89<_0xff38;_0x32ef89++)this['_touched']['set'](_0x32ef89,{'userId':_0x31b8e8});_0x2b17db['_insertChild'](_0x5364bd['offset'],_0x2de008);}['_handleMoveOperation'](_0x90c08a){(_0x90c08a=this['_cloneOperation'](_0x90c08a,this['_idsRoots']))['_execute']();const _0x4a1632=null===_0x90c08a['_authorId']?null:_0x90c08a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x182ebd=_0x90c08a['getMovedRangeStart'](),_0x352f51=_0x182ebd['parent'],_0x10109e=_0x182ebd['offset'];!function _0x4d4f96(_0x310948,_0x46ddaf,_0x78081,_0x13be76){for(let _0x1b739a=_0x78081;_0x1b739a<_0x13be76;_0x1b739a++){const _0x9fc290=_0x46ddaf['getChild'](_0x1b739a);_0x9fc290['is']('element','$text')?_0x310948['set'](_0x9fc290['getAttribute']('vid'),{'userId':_0x4a1632}):(_0x310948['set'](_0x9fc290['getAttribute']('vid_start'),{'userId':_0x4a1632}),_0x4d4f96(_0x310948,_0x9fc290,0x0,_0x9fc290['childCount']),_0x310948['set'](_0x9fc290['getAttribute']('vid_end'),{'userId':_0x4a1632}));}}(this['_touched'],_0x352f51,_0x10109e,_0x10109e+_0x90c08a['howMany']);}['_handleMergeOperation'](_0x36e331){const _0x5162d2=null===(_0x36e331=this['_cloneOperation'](_0x36e331,this['_idsRoots']))['_authorId']?null:_0x36e331['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1cd886=_0x36e331['targetPosition']['parent'],_0x1b7785=_0x36e331['sourcePosition']['parent'],_0x29a54c=_0x1cd886['getAttribute']('vid_end'),_0x37346b=_0x1b7785['getAttribute']('vid_start');_0x1cd886['_setAttribute']('vid_end',_0x1b7785['getAttribute']('vid_end')),_0x1b7785['_setAttribute']('vid_end',_0x29a54c),this['_touched']['set'](_0x37346b,{'userId':_0x5162d2}),this['_touched']['set'](_0x29a54c,{'userId':_0x5162d2}),_0x36e331['_execute']();}['_handleSplitOperation'](_0xc1814){const _0xd323a3=null===(_0xc1814=this['_cloneOperation'](_0xc1814,this['_idsRoots']))['_authorId']?null:_0xc1814['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x236f47=_0xc1814['graveyardPosition'],_0x2f7e5f=_0xc1814['splitPosition']['parent'];_0xc1814['_execute']();const _0x426ae1=_0x2f7e5f['getAttribute']('vid_end'),_0x26b786=_0xc1814['insertionPosition']['nodeAfter'];if(_0x236f47){const _0x390524=_0x26b786['getAttribute']('vid_end'),_0x86b752=_0x2f7e5f['getAttribute']('vid_end');_0x2f7e5f['_setAttribute']('vid_end',_0x390524),_0x26b786['_setAttribute']('vid_end',_0x86b752),this['_touched']['set'](_0x2f7e5f['getAttribute']('vid_end'),{'userId':_0xd323a3}),this['_touched']['set'](_0x26b786['getAttribute']('vid_start'),{'userId':_0xd323a3});}else{const _0x43bf14=this['_revisionId']++,_0x7a2ea6=this['_revisionId']++;_0x2f7e5f['_setAttribute']('vid_end',_0x43bf14),_0x26b786['_setAttribute']('vid_start',_0x7a2ea6),_0x26b786['_setAttribute']('vid_end',_0x426ae1),this['_touched']['set'](_0x43bf14,{'userId':_0xd323a3}),this['_touched']['set'](_0x7a2ea6,{'userId':_0xd323a3});}}['_handleMarkerOperation'](_0x58a42e){if(!_0x58a42e['affectsData'])return;const _0x42f0ed=(_0x58a42e=this['_cloneOperation'](_0x58a42e,this['_diffRoots']))['oldRange']?_0x58a42e['oldRange']['root']:null,_0x2639f0=_0x58a42e['newRange']?_0x58a42e['newRange']['root']:null;_0x42f0ed&&this['_markers']['delete'](_0x58a42e['name']),_0x2639f0&&this['_markers']['set'](_0x58a42e['name'],_0x58a42e['newRange']['clone']());const _0x57393e=null===_0x58a42e['_authorId']?null:_0x58a42e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x44cbca=_0x58a42e['name'];if(!this['_touchedMarkers']['has'](_0x44cbca))return void this['_touchedMarkers']['set'](_0x44cbca,{'range':_0x58a42e['oldRange'],'userId':_0x57393e});const _0x17c09a=this['_touchedMarkers']['get'](_0x44cbca),_0x3d3bc8=_0x17c09a['range'],_0x335720=_0x58a42e['newRange'];null==_0x3d3bc8&&null==_0x335720||_0x3d3bc8&&_0x335720&&_0x3d3bc8['isEqual'](_0x335720)?this['_touchedMarkers']['delete'](_0x58a42e['name']):_0x17c09a['userId']=_0x57393e;}['_handleRootOperation'](_0x5ad4c4,_0x3de2b5){this['_diffRoots']['has'](_0x5ad4c4['rootName'])?this['_diffRoots']['get'](_0x5ad4c4['rootName'])['_isAttached']=_0x5ad4c4['isAdd']:(this['_diffRoots']['set'](_0x5ad4c4['rootName'],bt(_0x5ad4c4['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x5ad4c4['rootName'],{}),_0x3de2b5&&this['_idsRoots']['set'](_0x5ad4c4['rootName'],bt(_0x5ad4c4['rootName'],!0x0)));const _0x52df16=null===_0x5ad4c4['_authorId']?null:_0x5ad4c4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xb5a44f=this['_touchedRoots']['get'](_0x5ad4c4['rootName']);_0xb5a44f&&_0xb5a44f['userId']===_0x52df16?this['_touchedRoots']['delete'](_0x5ad4c4['rootName']):this['_touchedRoots']['set'](_0x5ad4c4['rootName'],{'userId':_0x52df16,'isAttached':_0x5ad4c4['isAdd']});}['_handleRootAttributeOperation'](_0x350553){const _0x2a1775=this['_diffRootsAttributes']['get'](_0x350553['root']['rootName']);null===_0x350553['newValue']?delete _0x2a1775[_0x350553['key']]:_0x2a1775[_0x350553['key']]=_0x350553['newValue'];}}function yt(_0x577bde){const _0x488b0d=bt(_0x577bde['rootName'],_0x577bde['isAttached']());for(const _0x139e64 of _0x577bde['getChildren']()){const _0x2fb3a6=_0x139e64['_clone'](!0x0);_0x488b0d['_appendChild'](_0x2fb3a6);}return _0x488b0d;}function bt(_0x49765b,_0xf80cd4=!0x0){const _0x21c2b3=new _0x596efb();return _0x21c2b3['rootName']=_0x49765b,_0x21c2b3['_isAttached']=_0xf80cd4,_0x21c2b3['isAttached']=()=>_0x21c2b3['_isAttached'],_0x21c2b3;}function Rt(_0x428f1a,_0x1f0392,_0x40d948){const _0x581a63='elementEnd'==_0x428f1a['type']?_0x40d948['createPositionAt'](_0x428f1a['item'],'end'):_0x40d948['createPositionBefore'](_0x428f1a['item']);return _0x40d948['createPositionFromPath'](_0x1f0392,_0x581a63['path'],_0x581a63['stickiness']);}function kt(_0x49c72d,_0x132480,_0x569a1b){const _0x3225d9='elementStart'==_0x49c72d['type']?_0x569a1b['createPositionAt'](_0x49c72d['item'],0x0):_0x569a1b['createPositionAfter'](_0x49c72d['item']);return _0x569a1b['createPositionFromPath'](_0x132480,_0x3225d9['path'],_0x3225d9['stickiness']);}class At extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x55ac9d(_0x34ccfc){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4bdbb5,_0x1dda03){super(_0x4bdbb5),this['focusTracker']=new _0x226e20(),this['keystrokes']=new _0x3f5f03(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1dda03),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'](),_0x3fe45e({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x3d250a=_0x460cff=>_0x460cff['stopPropagation']();this['keystrokes']['set']('arrowright',_0x3d250a),this['keystrokes']['set']('arrowleft',_0x3d250a),this['keystrokes']['set']('arrowup',_0x3d250a),this['keystrokes']['set']('arrowdown',_0x3d250a);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x38fd7b){this['revisionNameInputView']['fieldView']['element']['value']=_0x38fd7b['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x57e36c){const _0x4b6f08=new _0x3ffa9b(this['locale'],_0x4bf2ed),_0x55a106=_0x4b6f08['fieldView'];_0x55a106['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x29aa84=wt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x57e36c&&(_0x29aa84+='\x20('+wt(this['locale'],'optional')+')'),(_0x4b6f08['label']=_0x29aa84,_0x55a106['on']('input',()=>{this['revisionNameInputValue']=_0x55a106['element']['value']['trim']();}),_0x4b6f08);}}class It extends _0x1f70da{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[pt];}['_saveRevisionFormView'];['init'](){const _0x1bc1c0=this['editor'],_0x34c890=_0x1bc1c0['plugins']['get']('RevisionTracker');_0x1bc1c0['ui']['componentFactory']['add']('revisionHistory',_0x2d40dc=>{const _0x39d88c=_0x142c0e(_0x2d40dc),_0x3eed63=_0x39d88c['panelView']['children'],_0x2d62bd=new _0xe01deb(_0x2d40dc),_0x2c031c=new _0x41a4b8(_0x2d40dc),_0x173e0f=this['_createSaveRevisionButton'](_0x95bba8),_0x542723=new _0x41a4b8(_0x2d40dc),_0x23fd14=this['_createOpenRevisionButton'](_0x95bba8);return _0x39d88c['bind']('isEnabled')['to'](_0x34c890,'isReady',_0x34c890,'isEnabled',_0x1bc1c0,'isReadOnly',(_0x1879f1,_0x4c7b4d,_0x482d78)=>_0x1879f1&&_0x4c7b4d&&!_0x482d78),_0x39d88c['buttonView']['set']({'icon':_0x242a87,'label':wt(_0x2d40dc,'Revision\x20history'),'tooltip':!0x0}),_0x173e0f['set']({'withText':!0x0,'role':'menuitem'}),_0x23fd14['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x23fd14,'execute',()=>{_0x39d88c['isOpen']=!0x1,_0x1bc1c0['editing']['view']['focus']();},{'priority':'low'}),_0x2c031c['children']['add'](_0x173e0f),_0x542723['children']['add'](_0x23fd14),_0x2d62bd['role']='menu',_0x2d62bd['items']['addMany']([_0x2c031c,_0x542723]),_0x3eed63['add'](_0x2d62bd),_0x39d88c;}),_0x1bc1c0['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x4eb20d=this['editor'],_0x2ef0c=_0x4eb20d['locale'],_0x3116c0=_0x4eb20d['plugins']['get']('RevisionTracker'),_0x55e01b=new _0x512ae0(_0x2ef0c),_0x38529c=new _0x3d2257(_0x2ef0c);_0x55e01b['bind']('isEnabled')['to'](_0x3116c0,'isReady',_0x3116c0,'isEnabled',_0x4eb20d,'isReadOnly',(_0x35f170,_0x44ce14,_0x5eaa16)=>_0x35f170&&_0x44ce14&&!_0x5eaa16),_0x55e01b['buttonView']['set']({'icon':_0x242a87,'label':wt(_0x2ef0c,'Revision\x20history')});const _0x29ee6c=new tt(_0x2ef0c,_0x55e01b),_0x4119fc=this['_createSaveRevisionButton'](it);_0x4119fc['delegate']('execute')['to'](_0x55e01b),_0x29ee6c['children']['add'](_0x4119fc),_0x38529c['items']['add'](_0x29ee6c);const _0xe71347=new tt(_0x2ef0c,_0x55e01b),_0x276dd5=this['_createOpenRevisionButton'](it);return _0x276dd5['delegate']('execute')['to'](_0x55e01b),_0xe71347['children']['add'](_0x276dd5),_0x38529c['items']['add'](_0xe71347),_0x55e01b['panelView']['children']['add'](_0x38529c),_0x55e01b;}['_createSaveRevisionButton'](_0x1a9b0e){const _0x76f57=this['editor'],_0x551ced=_0x76f57['plugins']['get']('RevisionTracker'),_0x2c21dd=new _0x1a9b0e(_0x76f57['locale']);return _0x2c21dd['set']({'label':wt(_0x76f57['locale'],'Save\x20current\x20revision')}),_0x2c21dd['bind']('isEnabled')['to'](_0x551ced,'isReady',_0x551ced,'isEnabled',_0x76f57,'isReadOnly',(_0x7b8d7,_0x1d49aa,_0x199da2)=>_0x7b8d7&&_0x1d49aa&&!_0x199da2),this['listenTo'](_0x2c21dd,'execute',()=>{this['_showDialog']();}),_0x2c21dd;}['_createOpenRevisionButton'](_0x250cb5){const _0x50d444=this['editor'],_0x501f60=_0x50d444['plugins']['get']('RevisionTracker'),_0x473577=new _0x250cb5(_0x50d444['locale']);return _0x473577['set']({'label':wt(_0x50d444['locale'],'Open\x20revision\x20history')}),_0x473577['bind']('isEnabled')['to'](_0x501f60,'isReady',_0x50d444,'isReadOnly',(_0x1d8b1f,_0x3a10af)=>_0x1d8b1f&&!_0x3a10af),this['listenTo'](_0x473577,'execute',()=>{_0x50d444['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x473577;}['_showDialog'](){const _0xbf6c0f=this['editor'],_0x2d508c=_0xbf6c0f['locale'],_0x16eaec=_0xbf6c0f['plugins']['get']('Dialog'),_0x5cbb3e=_0xbf6c0f['plugins']['get']('RevisionTracker');function _0xc0d6c3(_0x351109){_0xbf6c0f['config']['get']('revisionHistory.requireRevisionName')&&''===_0x351109['revisionName']?_0x351109['revisionNameInputView']['errorText']=wt(_0x2d508c,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0xbf6c0f['plugins']['get'](pt)['saveRevision']({'name':_0x351109['revisionName']}),_0x16eaec['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xc0d6c3(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x16eaec['show']({'id':'revisionSave','title':wt(_0x2d508c,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':wt(_0xbf6c0f['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x16eaec['hide']()},{'label':wt(_0xbf6c0f['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3fd2cd){_0x3fd2cd['bind']('isEnabled')['to'](_0x5cbb3e,'isReady',_0x5cbb3e,'isEnabled',_0xbf6c0f,'isReadOnly',(_0x2d9127,_0x489935,_0x282dd9)=>_0x2d9127&&_0x489935&&!_0x282dd9);},'onExecute':()=>_0xc0d6c3(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x3881a9=this['editor'],_0x480995=_0x3881a9['locale'];this['_saveRevisionFormView']=new At(_0x480995,_0x3881a9['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Nt extends _0x34ccfc{['changeId'];['_model'];constructor(_0x3eb3e3,_0x5e275e){super(_0x3eb3e3),this['_model']=_0x5e275e,this['changeId']=_0x5e275e['id'];const _0x1aa5c3=this['bindTemplate'],_0x6322ca=wt(_0x3eb3e3,_0x5e275e['data']['isSuggestion']?'Suggested\x20by':'add'==_0x5e275e['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x5e275e['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x1aa5c3['to']('type',_0x1290cb=>'ck-revision-change__'+_0x1290cb)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x6322ca}]},{'text':'\x20'+_0x5e275e['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class xt extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x222574(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x4cdef4){super(),this['id']=_0x4cdef4['id']||_0x34aeba(),this['author']=_0x4cdef4['author'],this['type']=_0x4cdef4['type'],this['data']=_0x4cdef4['data']||{},this['rootName']=_0x4cdef4['rootName'],this['set']('createdAt',_0x4cdef4['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class Et{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x27a9b1,_0x1d5c08){this['newRevisionId']=_0x27a9b1,this['oldRevisionId']=_0x1d5c08,this['changes']=new _0x25d3ca();}['_setChanges'](_0xc84eb4){for(const _0x47c62f of _0xc84eb4)this['changes']['add'](_0x47c62f);}}class St extends _0x1f70da{['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[_0x19894b,st,gt,mt];}constructor(_0x125873){super(_0x125873),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',(_0x330bd4,_0x2a943a,_0x590ac4)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0xa6465b=>{for(const _0x5b1f08 of this['editor']['editing']['view']['document']['roots'])_0x590ac4?_0xa6465b['removeClass']('ck-editor__editable__overlay',_0x5b1f08):_0xa6465b['addClass']('ck-editor__editable__overlay',_0x5b1f08);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x108485=>null!==_0x108485),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x4d6a69,_0x396d0d,_0x42819d)=>_0x4d6a69&&_0x42819d?_0x396d0d['changes']['getIndex'](_0x42819d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1f7bcf,_0x9b50cc)=>_0x1f7bcf?_0x9b50cc['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](st);}['init'](){const _0x433a02=this['editor'],_0x72fdb5=new Mt(_0x433a02,{'direction':'backward'}),_0x114a21=new Mt(_0x433a02,{'direction':'forward'});(_0x433a02['commands']['add']('showPreviousChange',_0x72fdb5),_0x433a02['commands']['add']('showNextChange',_0x114a21),_0x433a02['commands']['add']('restoreRevision',new Ct(_0x433a02)),this['on']('change:numberOfChanges',()=>{_0x72fdb5['refresh'](),_0x114a21['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x433a02['enableReadOnlyMode']('revision-viewer'),_0x433a02['plugins']['has']('WidgetToolbarRepository'))&&_0x433a02['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x13fea5){return await this['_utils']['loadRevisionData'](_0x13fea5,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x13fea5);}async['getRevisionRootsAttributes'](_0xbf471e){return await this['_utils']['loadRevisionData'](_0xbf471e,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xbf471e);}async['compare'](_0x5d2e84,_0x349d3a,_0x46c768=!0x1){if(!this['isEnabled'])return;const _0x573b85=this['diff'],_0x29ec56=this['repository'],_0x155df8='string'==typeof _0x5d2e84?_0x29ec56['getRevision'](_0x5d2e84):_0x5d2e84,_0x2bdc78='string'==typeof _0x349d3a?_0x29ec56['getRevision'](_0x349d3a):_0x349d3a,_0xb799ed=_0x155df8['id'],_0x3d9889=_0x2bdc78?_0x2bdc78['id']:null;if(!_0x46c768&&this['diff']&&this['diff']['newRevisionId']===_0xb799ed&&this['diff']['oldRevisionId']===_0x3d9889)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Et(_0xb799ed,_0x3d9889);const _0x1eb614=this['_getRevisionsRange'](_0x155df8,_0x2bdc78,!0x0)['map'](_0x4ff183=>this['_utils']['loadRevisionData'](_0x4ff183,this['adapter']));return _0x1eb614['push'](new Promise(_0x253bee=>{setTimeout(_0x253bee,0x14);})),Promise['all'](_0x1eb614)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x1ddfaf=this['_getDiff'](_0xb799ed,_0x3d9889);for(const _0x1cf6b2 of _0x1ddfaf['changes'])this['_changeIdToChange']['set'](_0x1cf6b2['id'],_0x1cf6b2);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x54811b=>{for(const _0x489364 of this['editor']['model']['document']['getRootNames']())_0x54811b['detachRoot'](_0x489364);for(const _0x557049 of Object['keys'](_0x1ddfaf['model'])){const _0x3fd95d=_0x54811b['addRoot'](_0x557049);for(const _0x29021d of Object['keys'](_0x1ddfaf['attributes'][_0x557049]))_0x54811b['setAttribute'](_0x29021d,_0x1ddfaf['attributes'][_0x557049][_0x29021d],_0x3fd95d);_0x54811b['insert'](_0x1ddfaf['model'][_0x557049],_0x3fd95d,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x1ddfaf['changes'])),this['isReady']=!0x0;})['catch'](_0x3ad90c=>{console['error'](_0x3ad90c),this['_cleanUp'](),_0x573b85&&(this['diff']=_0x573b85),this['isReady']=!0x0;});}['addRevisionData'](_0x5d9d17,_0x56fac1){const _0x2b6c11=this['repository']['createRevision'](_0x5d9d17);return _0x2b6c11['on']('_update',(_0x2c9a80,_0x86c7e0,_0x47884e)=>_0x56fac1(_0x86c7e0,_0x47884e,_0x2b6c11)),this['repository']['addRevision'](_0x2b6c11),_0x2b6c11;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2aee21=>{for(const _0x1ca7e0 of this['editor']['model']['document']['getRootNames']())_0x2aee21['detachRoot'](_0x1ca7e0);});}['_sortAndFilterDiffChanges'](_0x35bbf7){const _0x81e98e=[],_0x13445b=new Map();for(const _0x3a11f4 of this['editor']['model']['document']['getRootNames']()){const _0xeb21ef=this['editor']['editing']['view']['getDomRoot'](_0x3a11f4);if(!_0xeb21ef)continue;const _0x8efdec=_0xeb21ef['getClientRects']()['item'](0x0);_0x8efdec&&(_0x81e98e['push'](_0x3a11f4),_0x13445b['set'](_0x3a11f4,_0x8efdec));}return _0x81e98e['sort']((_0x147acf,_0x299a07)=>{const _0x57b7f0=_0x13445b['get'](_0x147acf),_0x1a463b=_0x13445b['get'](_0x299a07);return _0x57b7f0['y']-_0x1a463b['y']||_0x57b7f0['x']-_0x1a463b['x'];}),(_0x35bbf7=_0x35bbf7['filter'](_0x5172f4=>_0x81e98e['includes'](_0x5172f4['rootName'])))['sort']((_0x5bb3d9,_0x335b41)=>_0x81e98e['indexOf'](_0x5bb3d9['rootName'])-_0x81e98e['indexOf'](_0x335b41['rootName'])),_0x35bbf7;}['_makeTape'](_0x563053){const _0x40fb1d=Array['from'](_0x563053['markers'])['filter'](([_0x2c5bee,_0x434d6a])=>_0x2c5bee['startsWith']('revision:')&&!_0x434d6a['isCollapsed']),_0x54cb30=Array['from'](this['editor']['model']['createRangeIn'](_0x563053)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x40fb1d['length'])for(const _0x22d5b3 of _0x54cb30){const [_0x214f97,_0x4ee32b]=_0x40fb1d[0x0],[,_0x41e31a,_0x554a95]=_0x214f97['split'](':');if(_0x4ee32b['end']['isEqual'](_0x22d5b3['nextPosition'])&&_0x40fb1d['shift'](),(_0x22d5b3['previousPosition']['isEqual'](_0x4ee32b['start'])||_0x22d5b3['previousPosition']['isAfter'](_0x4ee32b['start']))&&('insertion'==_0x41e31a?_0x22d5b3['isAdded']={'userId':_0x554a95}:'deletion'==_0x41e31a&&(_0x22d5b3['isRemoved']={'userId':_0x554a95})),0x0==_0x40fb1d['length'])break;}return _0x54cb30;}['_refreshStartEndIndex'](_0x10fdd4){const _0x3be5f8=new Map();for(let _0xeac2e1=0x0;_0xeac2e1<_0x10fdd4['length'];_0xeac2e1++)'text'===_0x10fdd4[_0xeac2e1]['type']?(_0x10fdd4[_0xeac2e1]['item']['startIndex']=_0xeac2e1,_0x10fdd4[_0xeac2e1]['item']['endIndex']=_0xeac2e1):('elementStart'===_0x10fdd4[_0xeac2e1]['type']?_0x10fdd4[_0xeac2e1]['item']['startIndex']=_0xeac2e1:'elementEnd'===_0x10fdd4[_0xeac2e1]['type']&&(_0x10fdd4[_0xeac2e1]['item']['endIndex']=_0xeac2e1),_0x3be5f8['set'](_0x10fdd4[_0xeac2e1]['id'],_0xeac2e1));for(const _0x614f7a of _0x3be5f8['values']())'elementStart'===_0x10fdd4[_0x614f7a]['type']?_0x10fdd4[_0x614f7a]['item']['endIndex']=_0x3be5f8['get'](_0x10fdd4[_0x614f7a]['pairId']):'elementEnd'===_0x10fdd4[_0x614f7a]['type']&&(_0x10fdd4[_0x614f7a]['item']['startIndex']=_0x3be5f8['get'](_0x10fdd4[_0x614f7a]['pairId']));}['_processTape'](_0x56dc62){for(let _0x1fea79=0x0;_0x1fea79<_0x56dc62['length'];_0x1fea79++){if('elementStart'===_0x56dc62[_0x1fea79]['type'])_0x56dc62[_0x1fea79]['item']['startIndex']=_0x1fea79;else{if('elementEnd'===_0x56dc62[_0x1fea79]['type']){_0x56dc62[_0x1fea79]['item']['endIndex']=_0x1fea79;const _0x59eb53=_0x56dc62[_0x1fea79]['item']['startIndex'];_0x56dc62[_0x59eb53]['pairId']=_0x56dc62[_0x1fea79]['id'],_0x56dc62[_0x1fea79]['pairId']=_0x56dc62[_0x59eb53]['id'];}else _0x56dc62[_0x1fea79]['item']['startIndex']=_0x1fea79,_0x56dc62[_0x1fea79]['item']['endIndex']=_0x1fea79,_0x56dc62[_0x1fea79]['pairId']=null;}_0x56dc62[_0x1fea79]['markersStart']||(_0x56dc62[_0x1fea79]['markersStart']=[],_0x56dc62[_0x1fea79]['markersEnd']=[]);}}['_markInsertions'](_0x1f142f,_0x3584a6){const _0x11cd6a=_0x1f142f['filter'](_0x58d534=>!_0x58d534['isAdded']);for(let _0xddf66e=0x0;_0xddf66e<_0x3584a6['length'];_0xddf66e++)_0x3584a6[_0xddf66e]['isAdded']&&(_0x11cd6a[_0xddf66e]['isAdded']=_0x3584a6[_0xddf66e]['isAdded']);}['_getDiff'](_0x13145e,_0x251739=null){const _0x2b2f8e=this['repository']['getRevision'](_0x13145e),_0x1b91df=_0x251739?this['repository']['getRevision'](_0x251739):null,_0x201a73=this['_getRevisionsRange'](_0x2b2f8e,_0x1b91df),_0x3f9085=_0x201a73[_0x201a73['length']-0x1],_0x2278c3=new Map(),_0x43e6e4={'model':{},'attributes':{},'changes':[]},_0x299cfe=new Set(),_0x59d0f2=new Map();for(let _0x4db08f=_0x201a73['length']-0x1;_0x4db08f>=0x0;_0x4db08f--){const _0xaafa98=_0x201a73[_0x4db08f];for(const _0xaa2e74 of Object['keys'](_0xaafa98['diffData']))if(_0xaafa98['diffData'][_0xaa2e74]['attachChange']){const _0x526b7a=_0xaafa98['diffData'][_0xaa2e74]['attachChange'];_0x526b7a['isAttached']?(_0x299cfe['add'](_0xaa2e74),_0x59d0f2['has'](_0xaa2e74)&&_0x59d0f2['get'](_0xaa2e74)['userId']==_0x526b7a['userId']?_0x59d0f2['delete'](_0xaa2e74):_0x59d0f2['set'](_0xaa2e74,_0x526b7a)):_0x59d0f2['has'](_0xaa2e74)?(_0x299cfe['delete'](_0xaa2e74),_0x59d0f2['delete'](_0xaa2e74)):(_0x299cfe['add'](_0xaa2e74),_0x59d0f2['set'](_0xaa2e74,_0x526b7a));}else _0x299cfe['add'](_0xaa2e74);}for(const _0x4551d2 of _0x299cfe){const _0x59ff28=_0x59d0f2['has'](_0x4551d2)&&!_0x59d0f2['get'](_0x4551d2)['isAttached'];let _0x485b57=_0x59ff28?_0x201a73['length']-0x1:0x0;const _0x114155=_0x59ff28?-0x1:0x1;for(;_0x201a73[_0x485b57];){const _0x5c6b2e=_0x201a73[_0x485b57];if(_0x5c6b2e['diffData'][_0x4551d2]){const _0x51ba04=_0x59ff28?_0x5c6b2e['diffData'][_0x4551d2]['attributesBefore']:_0x5c6b2e['diffData'][_0x4551d2]['attributesAfter'];_0x43e6e4['attributes'][_0x4551d2]=_0x51ba04?_0x104e0e(_0x51ba04):{};break;}_0x485b57+=_0x114155;}}for(const _0x12aa0e of _0x201a73){_0x12aa0e['model']={};for(const _0x470339 of _0x12aa0e['authors'])_0x2278c3['set'](_0x470339['id'],_0x470339);for(const _0x4b957 of _0x299cfe){const _0x114ab6=_0x12aa0e['diffData'][_0x4b957]?_0x12aa0e['diffData'][_0x4b957]['insertions']:'[]',_0x351b9f=_0x12aa0e['diffData'][_0x4b957]?_0x12aa0e['diffData'][_0x4b957]['deletions']:'[]';_0x12aa0e['model'][_0x4b957]={'insertions':this['_utils']['_makeModelFromViewString'](_0x114ab6),'deletions':this['_utils']['_makeModelFromViewString'](_0x351b9f)};}}for(const _0x587c30 of _0x299cfe){let _0x42b99e=null,_0x55ae90=0x0;const _0x33b002=new Map(Array['from'](_0x2b2f8e['model'][_0x587c30]['insertions']['markers'])['filter'](([_0x3800ad])=>!_0x3800ad['startsWith']('revision:')));let _0x3a278e=0x0;for(const _0x329d60 of _0x201a73){const _0x48ccee=this['_makeTape'](_0x329d60['model'][_0x587c30]['insertions']);_0x329d60==_0x2b2f8e?(_0x42b99e=_0x48ccee,_0x55ae90=_0x42b99e['length'],_0x42b99e['forEach'](_0x5d4ccb=>{_0x5d4ccb['id']=_0x3a278e++;}),this['_processTape'](_0x42b99e)):this['_markInsertions'](_0x42b99e,_0x48ccee);const _0xc9c8d2=_0x42b99e['filter'](_0x5d8d3d=>!_0x5d8d3d['isAdded'])['map'](_0x3f2f1e=>_0x3f2f1e['id']);let _0x15b0b4=0x0;const _0x3a673a=this['_makeTape'](_0x329d60['model'][_0x587c30]['deletions']);_0x3a673a['forEach'](_0x56d1c3=>{_0x56d1c3['isRemoved']?_0x56d1c3['id']=_0x55ae90++:_0x56d1c3['id']=_0xc9c8d2[_0x15b0b4++];}),this['_processTape'](_0x3a673a),this['_setDistance'](_0x42b99e,'isAdded'),this['_setDistance'](_0x3a673a,'isRemoved'),_0x329d60==_0x2b2f8e&&this['_markMarkers'](_0x42b99e,_0x33b002),_0x42b99e=this['_joinTapes'](_0x42b99e,_0x3a673a),this['_refreshStartEndIndex'](_0x42b99e),this['_setDistance'](_0x42b99e,'isRemoved');}_0x42b99e=_0x42b99e['filter'](_0x153a9a=>!(_0x153a9a['isAdded']&&_0x153a9a['isRemoved']));const _0x5908c0=new Map(_0x3f9085['model'][_0x587c30]['deletions']['markers']),_0x361dcf=new Set(_0x33b002['keys']());for(const _0x3a9dde of _0x5908c0['keys']())_0x361dcf['delete'](_0x3a9dde);this['_markSuggestions'](_0x42b99e,_0x361dcf),this['_fixObsoleteTags'](_0x42b99e),_0x42b99e=this['_removeMissingPairs'](_0x42b99e),_0x42b99e=this['_markMismatchedRemovedTags'](_0x42b99e),_0x42b99e=this['_removeUnsupportedChanges'](_0x42b99e);const {root:_0x28a408,changes:_0x363fcb}=this['_makeModelFromTape'](_0x42b99e,_0x2278c3,_0x587c30);_0x43e6e4['model'][_0x587c30]=_0x28a408;const _0x2b2720=_0x59d0f2['get'](_0x587c30);if(_0x2b2720){const _0x3f67e7=_0x2278c3['get'](_0x2b2720['userId']),_0x497ada=new xt({'author':_0x3f67e7,'type':_0x2b2720['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x587c30});_0x363fcb['unshift'](_0x497ada),_0x43e6e4['attributes'][_0x587c30]['revisionHistoryAttachChange']=_0x497ada['id'];}_0x43e6e4['changes']=_0x43e6e4['changes']['concat'](_0x363fcb);}return _0x43e6e4;}['_markMarkers'](_0x46df51,_0x3e2796){for(let _0x1cf4e1=0x0;_0x1cf4e1<_0x46df51['length'];_0x1cf4e1++)for(const [_0x5b818,_0x27bef2]of _0x3e2796)!_0x27bef2['isCollapsed']&&_0x27bef2['start']['isEqual'](_0x46df51[_0x1cf4e1]['previousPosition'])&&_0x46df51[_0x1cf4e1]['markersStart']['push'](_0x5b818),_0x27bef2['end']['isEqual'](_0x46df51[_0x1cf4e1]['nextPosition'])&&_0x46df51[_0x1cf4e1]['markersEnd']['push'](_0x5b818);}['_joinTapes'](_0x1ca3e5,_0x5e5d91){let _0x58b7c8=[],_0x30a770=0x0,_0x4fbcf1=0x0;for(;_0x30a770<_0x1ca3e5['length']||_0x4fbcf1<_0x5e5d91['length'];){const _0x38fd65=_0x1ca3e5[_0x30a770]||{},_0x4b1ead=_0x5e5d91[_0x4fbcf1]||{};if(_0x38fd65['id']==_0x4b1ead['id'])_0x30a770++,_0x4fbcf1++,_0x58b7c8['push'](_0x38fd65);else{if(_0x4b1ead['isRemoved']&&_0x38fd65['isAdded']){const {commonTape:_0x588220,iEnd:_0x8823c8,jEnd:_0x4d8051}=this['_threeWayMerge'](_0x1ca3e5,_0x30a770,_0x5e5d91,_0x4fbcf1);_0x58b7c8=_0x58b7c8['concat'](_0x588220),_0x30a770=_0x8823c8,_0x4fbcf1=_0x4d8051;}else _0x4b1ead['isRemoved']?(_0x4fbcf1++,_0x58b7c8['push'](_0x4b1ead)):(_0x30a770++,_0x58b7c8['push'](_0x38fd65));}}return _0x58b7c8;}['_markSuggestions'](_0x2e82c1,_0x35c177){const _0x2047c9=[];for(let _0x4b6f9f=0x0;_0x4b6f9f<_0x2e82c1['length'];_0x4b6f9f++){for(let _0x52d649=0x0;_0x52d649<_0x2e82c1[_0x4b6f9f]['markersStart']['length'];_0x52d649++){const _0x11668f=_0x2e82c1[_0x4b6f9f]['markersStart'][_0x52d649];if(!_0x35c177['has'](_0x11668f))continue;const {group:_0x45e41c,type:_0x377b57,authorId:_0x361dcc}=_0x3a0c69(_0x11668f);'revision-suggestion'!=_0x45e41c||'insertion'!=_0x377b57&&'deletion'!=_0x377b57||(_0x2047c9['unshift']({'type':_0x377b57,'name':_0x11668f,'userId':_0x361dcc}),_0x2e82c1[_0x4b6f9f]['markersStart']['splice'](_0x52d649,0x1),_0x52d649--);}_0x3ad53f(_0x2e82c1[_0x4b6f9f]);for(let _0x34345f=0x0;_0x34345f<_0x2e82c1[_0x4b6f9f]['markersEnd']['length'];_0x34345f++){const _0x5a2f24=_0x2e82c1[_0x4b6f9f]['markersEnd'][_0x34345f];if(!_0x35c177['has'](_0x5a2f24))continue;const {group:_0x5f3835,type:_0xd4ec46}=_0x3a0c69(_0x5a2f24);if('revision-suggestion'!=_0x5f3835||'insertion'!=_0xd4ec46&&'deletion'!=_0xd4ec46)continue;_0x2e82c1[_0x4b6f9f]['markersEnd']['splice'](_0x34345f,0x1),_0x34345f--;const _0x5724f6=_0x2047c9['findIndex'](_0x464f36=>_0x464f36['name']==_0x5a2f24);_0x5724f6>-0x1&&_0x2047c9['splice'](_0x5724f6,0x1);}}function _0x3a0c69(_0x3d1ada){const _0x2dde9c=_0x3d1ada['split'](':');return{'group':_0x2dde9c[0x0],'type':_0x2dde9c[0x1],'subType':_0x2dde9c['length']>=0x5?_0x2dde9c[0x2]:null,'id':_0x2dde9c['length']<0x5?_0x2dde9c[0x2]:_0x2dde9c[0x3],'authorId':_0x2dde9c['length']<0x5?_0x2dde9c[0x3]:_0x2dde9c[0x4],'markerCount':0x6==_0x2dde9c['length']?_0x2dde9c[0x5]:null};}function _0x3ad53f(_0x453131){for(let _0x2bbbb4=0x0;_0x2bbbb4<_0x2047c9['length'];_0x2bbbb4++){if(_0x453131['isAdded']&&'insertion'==_0x2047c9[_0x2bbbb4]['type']&&_0x453131['isAdded']['userId']==_0x2047c9[_0x2bbbb4]['userId'])return _0x453131['isAddSuggestion']=_0x2047c9[_0x2bbbb4],void delete _0x453131['isAdded'];if(!_0x453131['isAdded']&&!_0x453131['isRemoved']&&'deletion'==_0x2047c9[_0x2bbbb4]['type'])return void(_0x453131['isRemoveSuggestion']=_0x2047c9[_0x2bbbb4]);}}}['_setDistance'](_0x19efb0,_0x15b4f4){let _0x53cda3=0x0,_0xd0f2e2=!0x1;const _0x3ca6a8=new Map();for(const _0x29509f of _0x19efb0)_0x29509f[_0x15b4f4]?_0xd0f2e2&&(_0x53cda3++,_0xd0f2e2=!0x1):(_0x53cda3++,_0xd0f2e2=!0x0),_0x3ca6a8['set'](_0x29509f['id'],_0x53cda3);for(let _0x423b55=0x0;_0x423b55<_0x19efb0['length'];_0x423b55++){if('isRemoved'==_0x15b4f4&&_0x19efb0[_0x423b55]['isAdded']||'isAdded'==_0x15b4f4&&_0x19efb0[_0x423b55]['isRemoved'])continue;if('text'==_0x19efb0[_0x423b55]['type']){_0x19efb0[_0x423b55]['distance']=0x0;continue;}const _0x438d24=_0x3ca6a8['get'](_0x19efb0[_0x423b55]['pairId']),_0x4aa10f=_0x3ca6a8['get'](_0x19efb0[_0x423b55]['id']);_0x19efb0[_0x423b55]['distance']=_0x438d24-_0x4aa10f;}}['_getRevisionsRange'](_0x1aa1f9,_0x5695fb,_0x3f69e0=!0x1){const _0x284726=[];let _0x53b1ec=this['repository']['getIndex'](_0x1aa1f9),_0x495eb6=this['repository']['getIndex'](_0x5695fb);for(-0x1==_0x495eb6&&(_0x495eb6=this['repository']['_revisions']['length'],_0x3f69e0=!0x1);_0x53b1ec<_0x495eb6;)_0x284726['push'](this['repository']['getRevision'](_0x53b1ec)),_0x53b1ec++;return _0x3f69e0&&_0x284726['push'](this['repository']['getRevision'](_0x53b1ec)),_0x284726;}['_threeWayMerge'](_0x4b820a,_0x528dd2,_0x8a91db,_0x217f84){const _0x321133=this['editor']['model']['schema'];let _0x2ff7f6=_0x528dd2;for(;_0x4b820a[_0x2ff7f6]&&_0x4b820a[_0x2ff7f6]['isAdded'];)_0x2ff7f6++;let _0x53e148=_0x217f84;for(;_0x8a91db[_0x53e148]&&_0x8a91db[_0x53e148]['isRemoved'];)_0x53e148++;_0x2e7f8b(_0x4b820a,_0x528dd2,_0x2ff7f6),_0x2e7f8b(_0x8a91db,_0x217f84,_0x53e148);const _0x3bf42b=_0x8a91db['slice'](_0x217f84,_0x53e148)['concat'](_0x4b820a['slice'](_0x528dd2,_0x2ff7f6));return _0x3bf42b['sort']((_0x2be3ab,_0x5632d2)=>_0x2be3ab['side']!=_0x5632d2['side']?_0x2be3ab['side']-_0x5632d2['side']:_0x2be3ab['level']!=_0x5632d2['level']?_0x2be3ab['level']-_0x5632d2['level']:_0x2be3ab['distance']!=_0x5632d2['distance']?_0x5632d2['distance']-_0x2be3ab['distance']:!!_0x2be3ab['isAdded']!=!!_0x5632d2['isAdded']?-0x1==_0x2be3ab['side']||0x0==_0x2be3ab['side']?_0x2be3ab['isAdded']?-0x1:0x1:_0x2be3ab['isAdded']?0x1:-0x1:_0x2be3ab['index']-_0x5632d2['index']),{'commonTape':_0x3bf42b,'iEnd':_0x2ff7f6,'jEnd':_0x53e148};function _0x2e7f8b(_0x3a4f8d,_0x3186b2,_0x108468){let _0x48ded3=-0x1,_0x26e279=Number['POSITIVE_INFINITY'],_0x15347c=!0x0;for(let _0x2ee948=_0x3186b2;_0x2ee948<_0x108468;_0x2ee948++)if(_0x321133['isInline'](_0x3a4f8d[_0x2ee948]['item'])||(_0x15347c=!0x1),_0x3a4f8d[_0x2ee948]['item']['startIndex']<_0x3186b2&&(_0x48ded3=_0x2ee948),_0x3a4f8d[_0x2ee948]['item']['endIndex']>=_0x108468){_0x26e279=_0x2ee948;break;}_0x15347c&&(_0x48ded3=_0x108468-0x1);for(let _0x6efa1d=_0x3186b2;_0x6efa1d<_0x108468;_0x6efa1d++)_0x3a4f8d[_0x6efa1d]['side']=_0x6efa1d<=_0x48ded3?-0x1:_0x6efa1d<_0x26e279?0x0:0x1,_0x3a4f8d[_0x6efa1d]['index']=_0x6efa1d;let _0x4fe5b8=0x0;for(let _0x2bcf88=_0x3186b2;_0x2bcf88<=_0x48ded3;_0x2bcf88++)0x0==_0x3a4f8d[_0x2bcf88]['distance']?_0x3a4f8d[_0x2bcf88]['level']=_0x4fe5b8:(_0x4fe5b8++,_0x3a4f8d[_0x2bcf88]['level']=_0x4fe5b8,_0x4fe5b8++);for(let _0x25a20b=_0x3186b2;_0x25a20b<_0x108468;_0x25a20b++)0x0==_0x3a4f8d[_0x25a20b]['side']&&(_0x3a4f8d[_0x25a20b]['level']=_0x4fe5b8);_0x4fe5b8=0x0;for(let _0x1ab3bc=_0x108468-0x1;_0x1ab3bc>=_0x26e279;_0x1ab3bc--)0x0==_0x3a4f8d[_0x1ab3bc]['distance']?_0x3a4f8d[_0x1ab3bc]['level']=_0x4fe5b8:(_0x4fe5b8--,_0x3a4f8d[_0x1ab3bc]['level']=_0x4fe5b8,_0x4fe5b8--);}}['_fixObsoleteTags'](_0x446c83){const _0x500ae2=new Map(),_0x29ea64=this['editor']['model']['schema'];for(let _0x45b7d6=0x1;_0x45b7d6<_0x446c83['length'];_0x45b7d6++){let _0x5a1981,_0x53da7e,_0x5dbfa6;const _0x52e66b=_0x446c83[_0x45b7d6],_0x38d8eb=_0x446c83[_0x45b7d6-0x1];if('text'==_0x52e66b['type'])continue;if(_0x52e66b['type']!=_0x38d8eb['type'])continue;if(!_0x29ea64['isBlock'](_0x38d8eb['item'])||_0x29ea64['isLimit'](_0x38d8eb['item']))continue;if(!_0x29ea64['isBlock'](_0x52e66b['item'])||_0x29ea64['isLimit'](_0x52e66b['item']))continue;if((_0x446c83[_0x45b7d6]['isAdded']||_0x446c83[_0x45b7d6]['isAddSuggestion'])&&_0x446c83[_0x45b7d6-0x1]['isRemoved'])_0x5a1981=_0x446c83[_0x45b7d6],_0x53da7e=_0x446c83[_0x45b7d6-0x1],_0x5dbfa6=_0x45b7d6-0x1;else{if(!_0x446c83[_0x45b7d6]['isRemoved']||!_0x446c83[_0x45b7d6-0x1]['isAdded']&&!_0x446c83[_0x45b7d6-0x1]['isAddSuggestion'])continue;_0x5a1981=_0x446c83[_0x45b7d6-0x1],_0x53da7e=_0x446c83[_0x45b7d6],_0x5dbfa6=_0x45b7d6;}const _0x39530e=_0x5a1981['level']==_0x53da7e['level'],_0x3c2384=Math['abs'](_0x5a1981['level'])<Math['abs'](_0x53da7e['level'])&&0x0==_0x53da7e['distance'];(_0x39530e||_0x3c2384)&&(_0x500ae2['set'](_0x53da7e['id'],_0x5a1981['id']),_0x446c83['splice'](_0x5dbfa6,0x1),_0x45b7d6--,_0x5a1981['isAdded']=!0x1);}for(let _0x2d83fc=0x0;_0x2d83fc<_0x446c83['length'];_0x2d83fc++)_0x500ae2['has'](_0x446c83[_0x2d83fc]['pairId'])&&(_0x446c83[_0x2d83fc]['pairId']=_0x500ae2['get'](_0x446c83[_0x2d83fc]['pairId']));}['_removeMissingPairs'](_0x42a59b){const _0x45617b=new Set(_0x42a59b['map'](_0x261e58=>_0x261e58['id']));for(let _0x5be610=0x0;_0x5be610<_0x42a59b['length'];_0x5be610++)_0x45617b['has'](_0x42a59b[_0x5be610]['pairId'])||0x0==_0x42a59b[_0x5be610]['distance']||(_0x42a59b[_0x5be610]['isIncorrect']=!0x0);return _0x42a59b['filter'](_0x24095e=>!_0x24095e['isIncorrect']);}['_markMismatchedRemovedTags'](_0x41e64d){const _0x5a91c2=new Set();for(let _0x5257d1=0x0;_0x5257d1<_0x41e64d['length'];_0x5257d1++){if(_0x5a91c2['has'](_0x41e64d[_0x5257d1]['id'])&&_0x41e64d[_0x5257d1]['isRemoved']&&(_0x41e64d[_0x5257d1]['isIncorrect']=!0x0),_0x41e64d[_0x5257d1]['isIncorrect'])continue;if(0x0==_0x41e64d[_0x5257d1]['distance'])continue;if('elementStart'!=_0x41e64d[_0x5257d1]['type'])continue;if(null==_0x41e64d[_0x5257d1]['pairId'])continue;let _0x1ce4eb=_0x5257d1+0x1,_0x3b6506=0x0;for(;_0x41e64d[_0x1ce4eb]['id']!=_0x41e64d[_0x5257d1]['pairId'];)'elementStart'==_0x41e64d[_0x1ce4eb]['type']?_0x3b6506++:'elementEnd'==_0x41e64d[_0x1ce4eb]['type']&&_0x3b6506--,_0x1ce4eb++;if(0x0!=_0x3b6506){if(_0x41e64d[_0x5257d1]['isRemoved'])_0x41e64d[_0x5257d1]['isIncorrect']=!0x0;else{for(;_0x1ce4eb!=_0x5257d1;)_0x41e64d[_0x1ce4eb]['isRemoved']&&0x0!=_0x41e64d[_0x1ce4eb]['distance']&&(_0x41e64d[_0x1ce4eb]['isIncorrect']=!0x0,_0x5a91c2['add'](_0x41e64d[_0x1ce4eb]['pairId'])),_0x1ce4eb--;}}}return _0x41e64d['filter'](_0x305819=>!_0x305819['isIncorrect']);}['_removeUnsupportedChanges'](_0x1b2078){const _0x2731a6=this['editor']['model']['schema'];for(let _0x3f40a0=0x0;_0x3f40a0<_0x1b2078['length'];_0x3f40a0++){if(!(_0x1b2078[_0x3f40a0]['isAdded']||_0x1b2078[_0x3f40a0]['isAddSuggestion']||_0x1b2078[_0x3f40a0]['isRemoved']||_0x1b2078[_0x3f40a0]['isRemoveSuggestion']))continue;if(0x0==_0x1b2078[_0x3f40a0]['distance'])continue;const _0x28dffb=_0x1b2078[_0x3f40a0]['item'];_0x2731a6['isBlock'](_0x28dffb)||_0x2731a6['isLimit'](_0x28dffb)||(_0x1b2078[_0x3f40a0]['isAdded']&&delete _0x1b2078[_0x3f40a0]['isAdded'],_0x1b2078[_0x3f40a0]['isAddSuggestion']&&delete _0x1b2078[_0x3f40a0]['isAddSuggestion'],_0x1b2078[_0x3f40a0]['isRemoveSuggestion']&&delete _0x1b2078[_0x3f40a0]['isRemoveSuggestion'],_0x1b2078[_0x3f40a0]['isRemoved']&&(_0x1b2078[_0x3f40a0]['isIncorrect']=!0x0));}return _0x1b2078['filter'](_0x3311d1=>!_0x3311d1['isIncorrect']);}['_makeModelFromTape'](_0x305e74,_0x2834ea,_0x58e973){const _0x457fb9=new _0x596efb(),_0x5efeb7=[],_0x528b77=new Map(),_0x34360b=this['editor']['model'],_0xdca137=_0x34360b['schema'],_0x14075e=[_0x457fb9],_0x1c615b={},_0x599271={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x330d51=null;const _0x1e417b=[0x0];for(let _0x576da4=0x0;_0x576da4<_0x305e74['length'];_0x576da4++)if('elementStart'===_0x305e74[_0x576da4]['type']){_0x305e74[_0x576da4]['previousPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b);const _0x3b28cc=new _0x3d8552(_0x305e74[_0x576da4]['item']['name'],_0x305e74[_0x576da4]['item']['getAttributes']());_0x14075e[0x0]['_appendChild'](_0x3b28cc),_0x1e417b['push'](0x0),_0x14075e['unshift'](_0x3b28cc),_0x305e74[_0x576da4]['nextPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b);}else'elementEnd'===_0x305e74[_0x576da4]['type']?(_0x14075e['shift'](),_0x305e74[_0x576da4]['previousPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b),_0x1e417b['pop'](),_0x1e417b[_0x1e417b['length']-0x1]++,_0x305e74[_0x576da4]['nextPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b)):(_0x305e74[_0x576da4]['previousPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b),_0x330d51?_0x330d51['_data']+=_0x305e74[_0x576da4]['item']['data']:_0x330d51=new _0x2da680(_0x305e74[_0x576da4]['item']['data'],_0x305e74[_0x576da4]['item']['getAttributes']()),_0x305e74[_0x576da4+0x1]&&'text'===_0x305e74[_0x576da4+0x1]['type']&&_0x107236(_0x330d51,_0x305e74[_0x576da4+0x1]['item'])||(_0x14075e[0x0]['_appendChild'](_0x330d51),_0x330d51=null),_0x1e417b[_0x1e417b['length']-0x1]+=_0x305e74[_0x576da4]['item']['offsetSize'],_0x305e74[_0x576da4]['nextPosition']=_0x34360b['createPositionFromPath'](_0x457fb9,_0x1e417b));for(let _0x23d081=0x0;_0x23d081<_0x305e74['length'];_0x23d081++){const _0x15e465=_0x305e74[_0x23d081]['previousPosition'],_0x2dca89=_0x305e74[_0x23d081]['nextPosition'];for(const _0x582bab of _0x305e74[_0x23d081]['markersStart'])_0x528b77['set'](_0x582bab,{'start':_0x15e465,'end':null});_0x34df88('isRemoveSuggestion',_0x23d081,_0x15e465,_0x2dca89),_0x34df88('isAddSuggestion',_0x23d081,_0x15e465,_0x2dca89),_0x34df88('isRemoved',_0x23d081,_0x15e465,_0x2dca89),_0x34df88('isAdded',_0x23d081,_0x15e465,_0x2dca89);for(const _0x55d394 of _0x305e74[_0x23d081]['markersEnd']){const _0x36cf5b=_0x528b77['get'](_0x55d394);_0x36cf5b?_0x36cf5b['end']=_0x2dca89:_0x528b77['set'](_0x55d394,{'start':_0x2dca89,'end':_0x2dca89});}}for(const [_0x1dae9b,_0x1c79d0]of _0x528b77){const _0x26bbea=this['editor']['model']['createRange'](_0x1c79d0['start'],_0x1c79d0['end']);_0x457fb9['markers']['set'](_0x1dae9b,_0x26bbea);}return _0x5efeb7['sort']((_0xe87190,_0x1d89e4)=>{const _0x575e44=_0x457fb9['markers']['get']('revision:'+_0xe87190['id']),_0x324b4d=_0x457fb9['markers']['get']('revision:'+_0x1d89e4['id']);return _0x575e44['start']['isBefore'](_0x324b4d['start'])?-0x1:_0x575e44['start']['isAfter'](_0x324b4d['start'])?0x1:_0x575e44['end']['isBefore'](_0x324b4d['end'])?-0x1:_0x575e44['end']['isAfter'](_0x324b4d['end'])?0x1:'add'===_0xe87190['type']?-0x1:0x1;}),{'root':_0x457fb9,'changes':_0x5efeb7};function _0x34df88(_0x36a5f0,_0xde3079,_0x508b10,_0x42fe20){const _0x597378=!!_0x305e74[_0xde3079][_0x36a5f0],_0x46707a=_0x597378?_0x305e74[_0xde3079][_0x36a5f0]['userId']:null,_0x568fcc=_0xde3079===_0x305e74['length']-0x1,_0x4266af=_0x599271[_0x36a5f0][0x0],_0x502392=_0xdca137['isObject'](_0x305e74[_0xde3079]['item']);!_0x1c615b[_0x36a5f0]&&_0x597378?_0x1c615b[_0x36a5f0]={'start':_0x508b10,'tapeItem':_0x305e74[_0xde3079],'userId':_0x46707a,'type':_0x36a5f0}:_0x1c615b[_0x36a5f0]&&!_0x597378?(_0x1c615b[_0x36a5f0]['end']=_0x508b10,_0x273b61(_0x1c615b[_0x36a5f0]),_0x1c615b[_0x36a5f0]=null):_0x1c615b[_0x36a5f0]&&_0x597378&&_0x1c615b[_0x36a5f0]['userId']!==_0x46707a&&(_0x1c615b[_0x36a5f0]['end']=_0x508b10,_0x4266af&&_0x4266af['userId']===_0x1c615b[_0x36a5f0]['userId']||_0x273b61(_0x1c615b[_0x36a5f0]),_0x1c615b[_0x36a5f0]={'start':_0x508b10,'tapeItem':_0x305e74[_0xde3079],'userId':_0x46707a,'type':_0x36a5f0}),_0x1c615b[_0x36a5f0]&&_0x502392&&('elementStart'!==_0x305e74[_0xde3079]['type']||_0x4266af&&_0x4266af['userId']===_0x46707a||_0x599271[_0x36a5f0]['unshift']({'userId':_0x46707a,'object':_0x305e74[_0xde3079]['item'],'change':_0x1c615b[_0x36a5f0]}),'elementEnd'===_0x305e74[_0xde3079]['type']&&_0x4266af&&_0x4266af['object']===_0x305e74[_0xde3079]['item']&&(_0x599271[_0x36a5f0]['shift'](),_0x1c615b[_0x36a5f0]=_0x4266af['change'])),_0x1c615b[_0x36a5f0]&&_0x568fcc&&(_0x1c615b[_0x36a5f0]['end']=_0x42fe20,_0x273b61(_0x1c615b[_0x36a5f0]),_0x1c615b[_0x36a5f0]=null);}function _0x273b61({start:_0x5e3e1b,end:_0xda188e,tapeItem:_0x52e461,userId:_0x20ed14,type:_0x230d8d}){const _0x30daca=_0x52e461['item'],_0x14f814=_0x34360b['schema']['isBlock'](_0x30daca)&&!_0x34360b['schema']['isLimit'](_0x30daca),_0x1b4849=_0x5e3e1b['nodeAfter']==_0xda188e['parent']&&_0xda188e['isAtStart'];if(_0x14f814&&_0x1b4849)return;const _0x10488e=_0x34360b['createRange'](_0x5e3e1b,_0xda188e),_0x3884c0=_0x2834ea['get'](_0x20ed14),_0x287b7a=new xt({'author':_0x3884c0,'type':'isAdded'==_0x230d8d||'isAddSuggestion'==_0x230d8d?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x230d8d||'isRemoveSuggestion'==_0x230d8d},'createdAt':new Date(),'rootName':_0x58e973});_0x5efeb7['push'](_0x287b7a),_0x457fb9['markers']['set']('revision:'+_0x287b7a['id'],_0x10488e);}function _0x107236(_0x27142e,_0x5a70bf){const _0x1bd756=_0x27142e['getAttributes'](),_0xa3919=_0x5a70bf['getAttributes']();for(const _0x43914d of _0x1bd756){if(_0x43914d[0x1]!==_0x5a70bf['getAttribute'](_0x43914d[0x0]))return!0x1;_0xa3919['next']();}return _0xa3919['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x48c724=>{const _0x422a2e=_0x48c724['markerName']['split'](':')[0x1],_0x1633a0=this['_getChangeFromId'](_0x422a2e);if(!_0x1633a0)return null;const _0x367c99='add'==_0x1633a0['type']?'insertion':'deletion',_0x3cf5a5=['ck-suggestion-marker','ck-suggestion-marker-'+_0x367c99];return _0x1633a0['data']['isSuggestion']&&_0x3cf5a5['push']('ck-suggestion-marker-'+_0x367c99+'-new'),this['activeChange']==_0x1633a0&&_0x3cf5a5['push']('ck-suggestion-marker--active'),{'classes':_0x3cf5a5,'attributes':{'data-change-id':_0x422a2e}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x4b0e61=>{_0x4b0e61['on']('element:pre',(_0x3dd7cf,_0xac49bc,_0x3e0bc4)=>{const _0x269d67=_0xac49bc['viewItem']['getChild'](0x0);if(!_0x269d67||!_0x269d67['is']('element','code'))return;if(!_0x3e0bc4['consumable']['consume'](_0x269d67,{'attributes':['vid_start','vid_end']}))return;const _0x1afcec=_0xac49bc['modelRange']['start']['nodeAfter'];_0x3e0bc4['writer']['setAttribute']('vid_start',_0x269d67['getAttribute']('vid_start'),_0x1afcec),_0x3e0bc4['writer']['setAttribute']('vid_end',_0x269d67['getAttribute']('vid_end'),_0x1afcec);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3f3476=>{_0x3f3476['on']('element',(_0x2185d2,_0x1baa14,_0x5acd47)=>{if(!_0x5acd47['consumable']['consume'](_0x1baa14['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1baa14['modelRange']['isCollapsed'])return;const _0x1ba5e2=_0x1baa14['modelRange']['start']['nodeAfter'];_0x1ba5e2['hasAttribute']('vid_start')||_0x1ba5e2['hasAttribute']('vid')||(_0x5acd47['writer']['setAttribute']('vid_start',_0x1baa14['viewItem']['getAttribute']('vid_start'),_0x1ba5e2),_0x5acd47['writer']['setAttribute']('vid_end',_0x1baa14['viewItem']['getAttribute']('vid_end'),_0x1ba5e2));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x3e6bef=>_0x3e6bef['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x1f6ac8,[,_0x453b83])=>{['vid_start','vid_end','vid']['includes'](_0x453b83)&&(_0x1f6ac8['return']=!0x0,_0x1f6ac8['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x31c443=>{_0x31c443['on']('attribute:vid',(_0xc69e5e,_0x1d8152,_0x549ddb)=>{if('\x20'!=_0x1d8152['item']['data']||_0x1d8152['item']['parent']['maxOffset']>0x1)return;if(!_0x549ddb['consumable']['consume'](_0x1d8152['item'],_0xc69e5e['name']))return;const _0xec9c8a=_0x549ddb['writer'],_0x4e30ad=_0x549ddb['mapper']['toViewRange'](_0x1d8152['range']);_0xec9c8a['wrap'](_0x4e30ad,_0xec9c8a['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4afd1a){const _0x150e4b=_0x4afd1a['plugins']['get']('RevisionViewer');return(_0x5a5561,_0x4d09a9,_0x5541b8)=>{const _0x18cbef=_0x4d09a9['markerName']['split'](':')[0x1],_0x4fc06f=_0x150e4b['_getChangeFromId'](_0x18cbef);if(!_0x4fc06f)return null;const _0x59bf78='add'==_0x4fc06f['type']?'split':'merge';if(!_0x5541b8['consumable']['test'](_0x4d09a9['markerRange'],_0x5a5561['name']))return;const _0x2734a4=_0x4d09a9['markerRange']['getWalker'](),_0x1c484f=_0x4d09a9['markerRange']['start'],_0x4ff2c6=_0x4afd1a['model']['schema'];let _0x5e56fc=null,_0x1afacc=null,_0x2b53cc=!0x1,_0x48f719=!0x1;for(const _0x2c566a of _0x2734a4){const _0x2f5ed9=_0x2c566a['item'];_0x2b53cc=_0x2b53cc||_0x4ff2c6['isContent'](_0x2f5ed9);const _0x2cb572=_0x5541b8['mapper']['toViewElement'](_0x2f5ed9);if(_0x2cb572&&_0x2cb572['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2c566a['type']&&(_0x4ff2c6['isBlock'](_0x2f5ed9)&&!_0x4ff2c6['isLimit'](_0x2f5ed9)&&(_0x2f5ed9['nextSibling']||_0x1c484f['isAtEnd']?_0x5e56fc&&_0x5e56fc['parent']==_0x2f5ed9||(_0x5e56fc=_0x2f5ed9,_0x515bfe(_0x2c566a['previousPosition']),_0x48f719=!0x0):_0x1afacc=_0x1afacc||_0x2c566a['previousPosition']));}function _0x515bfe(_0x2d42ad){const _0x1f28f=_0x5541b8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x59bf78}),_0x4e824c=_0x5541b8['mapper']['toViewPosition'](_0x2d42ad);_0x4fc06f['data']['isSuggestion']&&_0x5541b8['writer']['addClass']('ck-suggestion-marker-'+_0x59bf78+'-new',_0x1f28f),_0x150e4b['activeChange']==_0x4fc06f&&_0x5541b8['writer']['addClass']('ck-suggestion-marker--active',_0x1f28f),_0x5541b8['writer']['insert'](_0x4e824c,_0x1f28f),_0x5541b8['mapper']['bindElementToMarker'](_0x1f28f,_0x4d09a9['markerName']);}_0x2b53cc||_0x48f719||!_0x1afacc||_0x515bfe(_0x1afacc);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x7b3308,_0x22924b,_0x3686bf)=>{const _0x2d8a3f=_0x3686bf['mapper']['markerNameToElements'](_0x22924b['markerName']);if(_0x2d8a3f){for(const _0x422306 of _0x2d8a3f)(_0x422306['hasClass']('ck-suggestion-marker-split')||_0x422306['hasClass']('ck-suggestion-marker-merge'))&&(_0x3686bf['mapper']['unbindElementFromMarkerName'](_0x422306,_0x22924b['markerName']),_0x3686bf['writer']['remove'](_0x422306));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x499acb,_0x3b2a7f,_0x38c3f3)=>{const _0x173c57=_0x3b2a7f['markerName']['split'](':')[0x1],_0x11c6e0=this['_getChangeFromId'](_0x173c57);if(!_0x11c6e0)return null;const _0x5e30cd='add'==_0x11c6e0['type']?'split':'merge';if(_0x38c3f3['consumable']['test'](_0x3b2a7f['markerRange'],_0x499acb['name']))for(const _0xad3bbd of _0x3b2a7f['markerRange']['getItems']()){if(!_0xad3bbd['is']('element','softBreak'))continue;const _0x5ad9d1=_0x38c3f3['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5e30cd}),_0x1d7cd9=_0x38c3f3['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0xad3bbd));_0x11c6e0['data']['isSuggestion']&&_0x38c3f3['writer']['addClass']('ck-suggestion-marker-'+_0x5e30cd+'-new',_0x5ad9d1),this['activeChange']==_0x11c6e0&&_0x38c3f3['writer']['addClass']('ck-suggestion-marker--active',_0x5ad9d1),_0x38c3f3['writer']['insert'](_0x1d7cd9,_0x5ad9d1),_0x38c3f3['mapper']['bindElementToMarker'](_0x5ad9d1,_0x3b2a7f['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x557e72=>{for(const _0x161f51 of this['editor']['model']['document']['getRootNames']()){const _0xdab4fb=this['editor']['model']['document']['getRoot'](_0x161f51),_0x2224e2=this['editor']['editing']['view']['document']['getRoot'](_0x161f51);if(_0x2224e2){const _0x31e2ba=_0xdab4fb['getAttribute']('revisionHistoryAttachChange');if(_0x557e72['removeAttribute']('data-change-id',_0x2224e2),_0x557e72['removeClass']('ck-revision-history-root-add',_0x2224e2),_0x557e72['removeClass']('ck-revision-history-root-remove',_0x2224e2),_0x557e72['removeClass']('ck-revision-history-root--active',_0x2224e2),_0x31e2ba){const _0x438985=this['_getChangeFromId'](_0x31e2ba);if(!_0x438985)return null;_0x557e72['setAttribute']('data-change-id',_0x31e2ba,_0x2224e2),_0x557e72['addClass']('ck-revision-history-root-'+_0x438985['type'],_0x2224e2),this['activeChange']==_0x438985&&_0x557e72['addClass']('ck-revision-history-root--active',_0x2224e2);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3aa64d=>'revision-comment:'+_0x3aa64d,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5da479=>'revision-suggestion:'+_0x5da479,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3a70e9=>({'name':'suggestion:'+_0x3a70e9,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x118153=>{const _0x3873f5=_0x118153['markerName']['split'](':')[0x1];return'insertion'!=_0x3873f5&&'deletion'!=_0x3873f5?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3873f5]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ot(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ot(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x30e92e,_0x5d7f5a,_0x19a98d)=>{const _0x22977b=_0x19a98d['mapper']['markerNameToElements'](_0x5d7f5a['markerName']);if(_0x22977b){for(const _0x3be71f of _0x22977b)_0x3be71f['is']('uiElement')&&(_0x19a98d['mapper']['unbindElementFromMarkerName'](_0x3be71f,_0x5d7f5a['markerName']),_0x19a98d['writer']['remove'](_0x3be71f));}},{'priority':'high'});}['_getChangeFromId'](_0x928381){return this['_changeIdToChange']['get'](_0x928381);}['_getViewForChange'](_0xe63dd0){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0xe63dd0),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x36c79a,_0x43a70e,_0x5e2e4f,_0x5bf577)=>{_0x5bf577&&this['_balloon']['remove'](_0x5bf577),_0x5e2e4f&&(this['_balloon']['add']({'view':_0x5e2e4f,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x35609d=this['editor']['editing'],_0x4feb9f=this['_getChangeFromId'](_0x5e2e4f['changeId']);let _0x44af78;if(_0x4feb9f['data']['isOnRoot']){const _0x16632f=_0x35609d['view']['getDomRoot'](_0x4feb9f['rootName']);_0x44af78=Array['from'](_0x16632f['getClientRects']());}else{const _0x55d556=this['editor']['model']['markers']['get']('revision:'+_0x5e2e4f['changeId']);_0x44af78=Array['from'](_0x35609d['mapper']['markerNameToElements'](_0x55d556['name']))['map'](_0x132f62=>_0x35609d['view']['domConverter']['mapViewToDom'](_0x132f62))['map'](_0x5dd100=>Array['from'](_0x5dd100['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x44af78[0x0];return _0x44af78['find'](_0x3dab2e=>_0x3dab2e['top']-0x3<=this['_activeViewTarget']['y']&&_0x3dab2e['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3dab2e['left']-0x3<=this['_activeViewTarget']['x']&&_0x3dab2e['right']+0x3>=this['_activeViewTarget']['x'])||_0x44af78[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x261792,_0x425131,_0x25a674,_0x4e1744)=>{this['activeView']=_0x25a674?this['_getViewForChange'](_0x25a674):null,this['editor']['model']['change'](()=>{const _0x293bd8=this['editor']['editing'];_0x4e1744&&(_0x4e1744['data']['isOnRoot']?_0x293bd8['view']['change'](_0x4500da=>{_0x4500da['removeClass']('ck-revision-history-root--active',_0x293bd8['view']['document']['getRoot'](_0x4e1744['rootName']));}):_0x293bd8['reconvertMarker']('revision:'+_0x4e1744['id'])),_0x25a674&&(_0x25a674['data']['isOnRoot']?_0x293bd8['view']['change'](_0x2cbafe=>{_0x2cbafe['addClass']('ck-revision-history-root--active',_0x293bd8['view']['document']['getRoot'](_0x25a674['rootName']));}):_0x293bd8['reconvertMarker']('revision:'+_0x25a674['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x4199f4,_0x22e5f2)=>{if(this['activeChange'])return;const _0x3a784d=this['_findChangeIdFromDomTarget'](_0x22e5f2['target']),_0xaea23a=this['_changeIdToChange']['get'](_0x3a784d);_0xaea23a?(this['_activeViewTarget']={'x':_0x22e5f2['domEvent']['x'],'y':_0x22e5f2['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0xaea23a)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4cd3c4,_0x141d47)=>{const _0xf81e8d=this['_findChangeIdFromDomTarget'](_0x141d47['target']),_0x29757b=this['_changeIdToChange']['get'](_0xf81e8d);_0x29757b?(this['_activeViewTarget']={'x':_0x141d47['domEvent']['x'],'y':_0x141d47['domEvent']['y']},_0x29757b===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x29757b):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x48f677){do{const _0x364a00=_0x48f677['getAttribute']('data-change-id');if(_0x364a00)return _0x364a00;_0x48f677=_0x48f677['parent'];}while(_0x48f677);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x569d5b=>{for(const _0x470097 of this['editor']['model']['markers'])_0x569d5b['removeMarker'](_0x470097);});}}function Ot(_0x287a35,_0x36de96){return(_0x33de9e,_0x5db6aa,_0x317623)=>{if(!_0x317623['consumable']['test'](_0x5db6aa['markerRange'],_0x33de9e['name']))return;const _0x4f91f4=_0x5db6aa['markerRange']['getWalker'](),_0x40c80f=_0x5db6aa['markerRange']['start'],_0x4b63c9=_0x287a35['model']['schema'];let _0x1699a0=null,_0x18e856=null,_0x39825e=!0x1,_0x19fc20=!0x1;for(const _0x105440 of _0x4f91f4){const _0x463aef=_0x105440['item'];_0x39825e=_0x39825e||_0x4b63c9['isContent'](_0x463aef);const _0x4db07a=_0x317623['mapper']['toViewElement'](_0x463aef);if(_0x4db07a&&_0x4db07a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x105440['type']&&(_0x4b63c9['isBlock'](_0x463aef)&&!_0x4b63c9['isLimit'](_0x463aef)&&(_0x463aef['nextSibling']||_0x40c80f['isAtEnd']?_0x1699a0&&_0x1699a0['parent']==_0x463aef||(_0x1699a0=_0x463aef,_0x5c3a27(_0x105440['previousPosition']),_0x19fc20=!0x0):_0x18e856=_0x18e856||_0x105440['previousPosition']));}function _0x5c3a27(_0x7da0f3){const _0x3dd117=_0x317623['mapper']['toViewPosition'](_0x7da0f3),_0x2ed2d2=_0x317623['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x36de96});_0x317623['writer']['insert'](_0x3dd117,_0x2ed2d2),_0x317623['mapper']['bindElementToMarker'](_0x2ed2d2,_0x5db6aa['markerName']);}_0x39825e||_0x19fc20||!_0x18e856||_0x5c3a27(_0x18e856);};}class Ct extends _0x2d8837{constructor(_0x464048){super(_0x464048);const _0x56ede3=_0x464048['plugins']['get'](St);this['affectsData']=!0x1,this['listenTo'](_0x56ede3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x56ede3,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5e8cfb=this['editor'],_0x26e92f=_0x5e8cfb['plugins']['get'](St),_0x4d0db5=_0x26e92f['isReady']?_0x26e92f['diff']['newRevisionId']:null;_0x5e8cfb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4d0db5);}['refresh'](){const {isReady:_0x155697,isEnabled:_0x244edd,repository:_0x48821c,diff:_0x47d2a4}=this['editor']['plugins']['get'](St),_0x3e2fcd=_0x47d2a4&&_0x48821c['getLaterVisibleRevision'](_0x47d2a4['newRevisionId']);this['isEnabled']=_0x155697&&_0x244edd&&Boolean(_0x3e2fcd);}}class Mt extends _0x2d8837{['_step'];constructor(_0x510f77,{direction:_0x9bce4f}){super(_0x510f77);const _0x48ca81=_0x510f77['plugins']['get'](St);this['affectsData']=!0x1,this['_step']='forward'===_0x9bce4f?0x1:-0x1,this['listenTo'](_0x48ca81,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x48ca81,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x48ca81,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x530d6f=this['editor'],_0x5dd860=_0x530d6f['plugins']['get'](St),{isNavigationMode:_0x3461be,currentChangeNumber:_0x49b304}=_0x5dd860;let _0xb526f9;if(_0x5dd860['activeChange']=_0x3461be?_0x5dd860['diff']['changes']['get'](_0x49b304+this['_step']):_0x5dd860['diff']['changes']['first'],_0x5dd860['activeChange']['data']['isOnRoot'])_0xb526f9=_0x530d6f['editing']['view']['getDomRoot'](_0x5dd860['activeChange']['rootName']);else{const _0x464d69=_0x530d6f['model']['markers']['get']('revision:'+_0x5dd860['activeChange']['id']);_0xb526f9=_0x15495a(_0x530d6f['editing'],_0x464d69);}_0x18a7fa({'target':_0xb526f9,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4ba715,currentChangeNumber:_0x17f57b,numberOfChanges:_0x4b67c9,isReady:_0x55f0c6,isEnabled:_0x262790}=this['editor']['plugins']['get'](St);this['isEnabled']=!!(_0x262790&&_0x55f0c6&&_0x4b67c9)&&(!_0x4ba715||(0x1===this['_step']?_0x17f57b<_0x4b67c9-0x1:_0x17f57b>0x0));}}class Dt extends _0x34ccfc{constructor(_0x344733){super(_0x344733);const _0x3fc5ba=this['bindTemplate'],_0x2a1c6b=new _0x95bba8(_0x344733),_0x4c4c2a=new _0x95bba8(_0x344733);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',(_0x4a375c,_0x49f7b6)=>_0x4a375c&&_0x49f7b6>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4aebc4,_0x2b2f42,_0x29cfb3,_0x19e1b7)=>{if(!_0x4aebc4)return wt(_0x344733,'Loading...');if(!_0x29cfb3)return wt(_0x344733,'No\x20changes');const _0x2c784c=wt(_0x344733,'NUMBER_OF_CHANGES',_0x29cfb3);return _0x19e1b7?wt(_0x344733,'X_OF_Y_CHANGES',[_0x2b2f42+0x1,_0x29cfb3]):_0x2c784c;}),_0x2a1c6b['set']({'label':wt(_0x344733,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1ef2e5}),_0x4c4c2a['set']({'label':wt(_0x344733,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x437b8e}),_0x2a1c6b['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4c4c2a['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2a1c6b['on']('execute',()=>this['fire']('execute','backward')),_0x4c4c2a['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',_0x3fc5ba['if']('_isStatusLabelVisible','ck-hidden',_0x4cd788=>!_0x4cd788)]},'children':[{'text':_0x3fc5ba['to']('isNavigationMode',_0x54a928=>_0x54a928?wt(_0x344733,'EDIT_X_OF_Y_REVISIONS')+':\x20':wt(_0x344733,'Total')+':\x20')}]},{'text':_0x3fc5ba['to']('_statusText')}]},new et(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2a1c6b,_0x4c4c2a]}]});}}const Tt='ck-editor__editable__loading-overlay';class Vt extends _0x1f70da{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5b224e=this['editor']['editing']['view'];_0x5b224e['change'](_0x49f550=>{for(const _0x928b33 of _0x5b224e['document']['roots'])_0x49f550['addClass'](Tt,_0x928b33);});}['hide'](){const _0x23e828=this['editor']['editing']['view'];_0x23e828['change'](_0x403ae6=>{for(const _0x5cf6d0 of _0x23e828['document']['roots'])_0x403ae6['removeClass'](Tt,_0x5cf6d0);});}}class Ht extends _0x1f70da{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[St,Vt];}['init'](){const _0x408332=this['editor'],_0x54ada2=_0x408332['plugins']['get'](St),_0x13887f=_0x408332['plugins']['get'](Vt);_0x408332['ui']['componentFactory']['add']('exitToEditing',_0x5cb91e=>{const _0x121da5=new _0x95bba8(_0x5cb91e);return _0x121da5['set']({'label':wt(_0x5cb91e,'Back\x20to\x20editing'),'icon':_0x2aa6fc,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x121da5,'execute',()=>{_0x408332['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x121da5;}),_0x408332['ui']['componentFactory']['add']('restoreRevision',_0xec6ee0=>{const _0x662105=new _0x95bba8(_0xec6ee0);return _0x662105['set']({'label':wt(_0xec6ee0,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x662105['bind']('isEnabled')['to'](_0x408332['commands']['get']('restoreRevision')),this['listenTo'](_0x662105,'execute',()=>_0x408332['execute']('restoreRevision')),_0x662105;}),_0x408332['ui']['componentFactory']['add']('changesNavigation',_0x56a9cd=>{const _0x1af74b=new Dt(_0x56a9cd),_0x51b52a=_0x408332['commands']['get']('showPreviousChange'),_0x8c09c5=_0x408332['commands']['get']('showNextChange');return _0x1af74b['bind']('isBackwardNavigationEnabled')['to'](_0x51b52a,'isEnabled'),_0x1af74b['bind']('isForwardNavigationEnabled')['to'](_0x8c09c5,'isEnabled'),_0x1af74b['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x54ada2),this['listenTo'](_0x1af74b,'execute',(_0xb9c60c,_0x2ca22e)=>{_0x408332['execute']('forward'===_0x2ca22e?'showNextChange':'showPreviousChange');}),_0x1af74b;}),_0x13887f['show'](),_0x54ada2['on']('change:isReady',(_0x27c726,_0x5c1ca5,_0x52fa74)=>{_0x52fa74?_0x13887f['hide']():_0x13887f['show']();});}}class Pt extends _0x3ffa9b{['_resizeObserver']=null;constructor(_0x5d4cc4,_0x935531){super(_0x5d4cc4,_0x935531);const _0x30fb9f=this['bindTemplate'];this['set']({'label':wt(_0x5d4cc4,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=wt(_0x5d4cc4,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x30fb9f['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x17246d(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x1cc652=this['fieldView']['element'];this['_tooltipString']=_0x1cc652['scrollWidth']>_0x1cc652['clientWidth']&&_0x1cc652['value']||'';}}class Ut extends _0x34ccfc{constructor(_0x17e13c,_0x138289,_0x55aeb4){super(_0x17e13c);const _0x22a61a=new nt();_0x22a61a['set']({'content':_0x37026b,'viewBox':'0\x200\x2011\x2010'});const _0x29458e=['ck','ck-revision-history-sidebar__revision-author'];_0x55aeb4&&_0x29458e['push']('ck-revision-history-sidebar__revision-author_creator');const _0x5a3379=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':wt(_0x17e13c,_0x55aeb4?'Revision\x20creator':'Revision\x20author')},'children':[_0x22a61a,_0x138289['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x29458e},'children':_0x5a3379});}}function Lt(_0x2ca8cd,_0x5cae0f){const _0x55b01e=_0x2ca8cd['bindTemplate'],_0x46967=_0x2ca8cd['locale'],_0x2d6482=_0x142c0e(_0x46967);_0x2d6482['panelPosition']='sw';const _0x559212=function(_0x210215,_0x5f3246){const _0x5e6c40=function(_0x52dabe,_0x143732){const _0x2e6aa6=_0x52dabe['locale'],_0x51b7fe={'Compare\x20against\x20selected':wt(_0x2e6aa6,'Compare\x20against\x20selected'),'Name\x20this\x20revision':wt(_0x2e6aa6,'Name\x20this\x20revision'),'Restore\x20this\x20revision':wt(_0x2e6aa6,'Restore\x20this\x20revision')};return _0x143732['map'](_0x47bbc1=>{const _0x1e4ad0=_0x51b7fe[_0x47bbc1['name']];return _0x1e4ad0&&_0x1e4ad0!==_0x47bbc1['name']&&(_0x47bbc1['name']=_0x1e4ad0),_0x47bbc1;});}(_0x210215,_0x5f3246),_0x1cd6eb=new _0x25d3ca();for(const _0x16dc13 of _0x5e6c40){const _0x15d194={'type':'button','model':new rt({'label':_0x16dc13['name'],'class':_0x16dc13['class'],'withText':!0x0,'role':'menuitem','_action':_0x16dc13['action']})};_0x15d194['model']['bind']('isEnabled')['to'](_0x210215,'isActionsDropdownOpen',_0x123150=>'function'!=typeof _0x16dc13['isEnabled']||(!_0x123150||_0x16dc13['isEnabled'](_0x210215))),_0x1cd6eb['add'](_0x15d194);}return _0x1cd6eb;}(_0x2ca8cd,_0x5cae0f);return _0x2ca8cd['bind']('isActionsDropdownOpen')['to'](_0x2d6482,'isOpen'),_0x2d6482['buttonView']['set']({'label':wt(_0x46967,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2afade}),_0x2d6482['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x55b01e['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x55b01e['to'](_0x215903=>_0x215903['stopPropagation']())}}),_0x2d6482['on']('execute',_0x23b870=>{_0x2ca8cd['isReady']&&'function'==typeof _0x23b870['source']['_action']&&_0x23b870['source']['_action'](_0x2ca8cd);}),ot(_0x2d6482,_0x559212,{'role':'menu'}),_0x2d6482['listenTo'](_0x2ca8cd,'change:isActionsDropdownOpen',(_0x459c0c,_0x54556b,_0x5d7983)=>{if(_0x5d7983)for(const _0x349357 of _0x2d6482['listView']['items']){const _0xcd6000=_0x349357['children']['first'],_0x5976f0=_0x5cae0f['find'](_0x5462be=>_0x5462be['action']===_0xcd6000['_action'])['isVisible'];_0x349357['isVisible']=void 0x0===_0x5976f0||_0x5976f0(_0x2ca8cd);}}),_0x2d6482;}class Ft extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x2025b5(_0x34ccfc){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x47ca9f,_0xa77dce,_0xd8a8c3,_0x3a8b29){super(_0x47ca9f);const _0x431d19=this['bindTemplate'],_0x2615f8=function(_0x5e0557,_0x418084){const _0x4dfc75=Array['from'](_0x418084['authors'])['filter'](_0x5acda9=>_0x5acda9!=_0x418084['creator']);return _0x418084['creator']&&_0x4dfc75['unshift'](_0x418084['creator']),_0x4dfc75['map'](_0x3aebe3=>new Ut(_0x5e0557,_0x3aebe3,_0x3aebe3==_0x418084['creator']));}(_0x47ca9f,_0xa77dce);this['id']=_0xa77dce['id'],this['_revision']=_0xa77dce,this['_requireRevisionName']=_0x3a8b29,this['bind']('name','createdAt')['to'](_0xa77dce),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x45d58b=>{return _0x2a731c=_0x47ca9f['uiLanguage'],(_0x565f46=_0x45d58b)['toLocaleDateString'](_0x2a731c,{'month':'long','day':'numeric'})+',\x20'+_0x565f46['toLocaleTimeString'](_0x2a731c,{'hour':'numeric','minute':'numeric'});var _0x2a731c,_0x565f46;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Pt(_0x47ca9f,_0x4bf2ed),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4ee787=>_0x4ee787||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x2748a4,_0x47dcbd)=>_0x2748a4&&_0x47dcbd),this['revisionActionsView']=_0xd8a8c3&&_0xd8a8c3['length']?Lt(this,_0xd8a8c3):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x431d19['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x431d19['if']('isEnabled','ck-disabled',_0x746ee2=>!_0x746ee2),_0x431d19['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x431d19['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x431d19['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':_0x431d19['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':_0x2615f8}]},this['revisionActionsView']],'on':{'click':_0x431d19['to'](_0x4b9fd6=>{_0x4b9fd6['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x5e1f4b=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x5e1f4b,'change',()=>{this['_requireRevisionName']&&!_0x5e1f4b['value']||this['fire']('setName',{'id':this['id'],'name':_0x5e1f4b['value']}),_0x5e1f4b['value']||(_0x5e1f4b['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function $t(_0x1be376,_0x42f27a){const _0x1752b1=ft['fromJSDate'](_0x1be376)['setLocale'](_0x42f27a),_0x25b615=ft['local'](),_0xf3679d=_0x25b615['minus']({'days':0x1})['startOf']('day');let _0x33a35d,_0x1b57a0;return _0x1752b1['hasSame'](_0x25b615,'day')?(_0x33a35d=_0x1752b1['startOf']('day')['toJSDate'](),_0x1b57a0=_0x1752b1['toRelativeCalendar']()):_0x1752b1['hasSame'](_0xf3679d,'day')?(_0x33a35d=_0xf3679d['toJSDate'](),_0x1b57a0=_0x1752b1['toRelativeCalendar']()):_0x1752b1['hasSame'](_0x25b615,'week')?(_0x33a35d=_0x1752b1['startOf']('week')['toJSDate'](),_0x1b57a0=_0x1752b1['weekdayLong']||''):_0x1752b1['hasSame'](_0x25b615,'year')?(_0x33a35d=_0x1752b1['startOf']('month')['toJSDate'](),_0x1b57a0=_0x1752b1['monthLong']||''):(_0x33a35d=_0x1752b1['startOf']('year')['toJSDate'](),_0x1b57a0=String(_0x1752b1['year'])),{'startDate':_0x33a35d,'localizedPeriodName':_0x1b57a0};}class jt extends _0x34ccfc{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4af1d4,_0x5a13e4,_0x55c696,_0x4bcfc1){super(_0x4af1d4);const _0x1a253c=$t(_0x5a13e4,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5a13e4,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x55c696,this['_requireRevisionName']=_0x4bcfc1,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':_0x1a253c}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x3f4e9f){const _0x5c714f=new Ft(this['locale'],_0x3f4e9f,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x5c714f);}['removeRevision'](_0x5d8a5e){const _0x3878b1=this['revisionViews']['find'](_0xc1fd58=>_0xc1fd58['id']===_0x5d8a5e['id']);this['revisionViews']['remove'](_0x3878b1);}}class Bt extends _0x34ccfc{constructor(_0x39336d){super(_0x39336d);const _0x2298fe=new nt();_0x2298fe['content']=_0x242a87,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x2298fe,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[wt(_0x39336d,'Revision\x20history')]}]});}}class Kt extends _0x34ccfc{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x326257,_0x5f0e40,_0x7b221f,_0x1f375c){super(_0x326257);const _0x4fa4d3=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x5f0e40,this['_revisionActions']=_0x7b221f,this['_requireRevisionName']=_0x1f375c,this['on']('select',(_0x365105,_0x22b427)=>{this['fire']('revisionSelected',_0x22b427);}),this['on']('setName',(_0x47f900,_0x406db9)=>{this['fire']('revisionSetName',_0x406db9);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Bt(_0x326257),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4fa4d3['if']('isEnabled','ck-disabled',_0x4947e8=>!_0x4947e8)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x2a2aec of this['_revisions'])this['_addRevision'](_0x2a2aec);this['_revisions']['on']('add',(_0xaa8781,_0x2b0a01)=>{this['_addRevision'](_0x2b0a01);}),this['_revisions']['on']('remove',(_0xfc7e73,_0x3738d1)=>{this['_removeRevision'](_0x3738d1);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2082d2=>_0x2082d2['revisionViews']['map'](_0x17a1a5=>_0x17a1a5))['flat']();}['selectRevision'](_0x13ba1b){for(const _0x336b56 of this['revisionViews'])_0x13ba1b&&_0x13ba1b['id']===_0x336b56['id']?_0x336b56['select']():_0x336b56['deselect']();}['highlightRevisions'](_0x27ead0){for(const _0x419c1e of this['revisionViews'])_0x27ead0['some'](({id:_0x552bb4})=>_0x552bb4===_0x419c1e['id'])?_0x419c1e['highlight']():_0x419c1e['unhighlight']();}['_addRevision'](_0x5dff25){const _0x28953b=$t(_0x5dff25['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x2beb5d=this['_getTimePeriodViewByStartDate'](_0x28953b);_0x2beb5d||(_0x2beb5d=new jt(this['locale'],_0x28953b,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x2beb5d)),_0x2beb5d['addRevision'](_0x5dff25);}['_removeRevision'](_0x496250){const _0x2d3bb1=$t(_0x496250['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x2d3bb1)['removeRevision'](_0x496250);}['_getTimePeriodViewByStartDate'](_0x2140b8){return this['timePeriodViews']['find'](_0x29cd19=>_0x29cd19['startDate']['getTime']()===_0x2140b8['getTime']());}}class qt extends _0x1f70da{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
Gt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[St];}constructor(
|
|
30
|
-
_0x2e8885(_0x4d3154){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x151c54,_0x2ef63e){super(_0x2ef63e),this['sourceElement']=_0x151c54,this['model']['document']['createRoot']();const _0x401989=new Yt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Jt(this,_0x401989);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x4b31b5,_0x56cd36){const _0x1b1c75=new this(_0x4b31b5,_0x56cd36);return await _0x1b1c75['initPlugins'](),await _0x1b1c75['ui']['init'](_0x4b31b5),await _0x1b1c75['data']['init'](_0x1b1c75['config']['get']('initialData')||''),_0x1b1c75['fire']('ready'),_0x1b1c75;}}const Xt=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class zt extends _0x5d0df7{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4193aa){function _0x547360(_0x5c2dc3){return _0x5c2dc3['map'](_0x5867d6=>String['fromCharCode'](_0x5867d6))['join']('');}super(_0x4193aa),this['result']='end',_0x4193aa[_0x547360([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x547360([0x76,0x69,0x65,0x77])][_0x547360([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x547360([0x61,0x75,0x74,0x6f]),_0x4193aa[_0x547360([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x547360([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x547360([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x547360([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x547360([0x6f,0x6b])});}}class Qt extends _0x5d0df7{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[pt,It];}constructor(_0x36a05a){if(super(_0x36a05a),!this['editor']['config']['get']('revisionHistory'))throw new _0x218ef0('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x70844=>this['_showRevisionViewer']({..._0x70844,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x52e0b8=>this['_closeRevisionViewer'](_0x52e0b8)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4a454a=>this['_restoreRevision'](_0x4a454a)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2af19b){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2af19b;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x1b19b3){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1b19b3);}['getRevision'](_0x29d091){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x29d091);}['getRevisions'](_0x55c9fc){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x55c9fc||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x207085=this['editor'],_0x5e3127=_0x54426d(_0x207085,Xt),_0x3ac947=_0x207085['plugins']['get']('RevisionTracker'),_0x3f98ed=_0x207085['plugins']['get'](_0x32ab6d)['users'];return _0x5e3127['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5e3127['lazyRoots'],(_0x5e3127['plugins']['push'](zt,St,Ht,class extends _0x5d0df7{static get['requires'](){return[St,_0x32ab6d];}['init'](){const _0x271819=this['editor']['plugins']['get'](_0x32ab6d);for(const _0x2226e8 of _0x3f98ed)_0x2226e8['isAnonymous']||_0x271819['getUser'](_0x2226e8['id'])||_0x271819['addUser'](_0x2226e8);const _0x14c084=_0x3ac947['repository']['getRevisions']();let _0x1e05c5=null;const _0x380929=this['editor']['plugins']['get']('RevisionViewer');_0x380929['adapter']=_0x3ac947['adapter'],_0x380929['bind']('isEnabled')['to'](_0x3ac947),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x207085,'isReadOnly',_0x34f450=>!_0x34f450);for(const _0x1bfa13 of _0x14c084){const _0x56f62a=null===_0x1bfa13['creator'];if(_0x56f62a&&_0x1bfa13['toVersion']===_0x1bfa13['fromVersion'])continue;const _0x413589=_0x1bfa13['toJSON']();_0x380929['addRevisionData'](_0x413589,(_0x4c9384,_0x44d41c,_0x396796)=>{if(_0x56f62a){if(_0x1e05c5)_0x1e05c5['_update'](_0x4c9384,_0x44d41c);else{if(!_0x44d41c){const _0x45178b=_0x396796['toJSON']();_0x45178b['id']=_0x1ed805(),_0x3ac947['saveRevision'](_0x45178b,_0x396796['toVersion'])['then'](_0x27c48f=>{_0x1e05c5=_0x27c48f;});}}}else _0x1bfa13['_update'](_0x4c9384,_0x44d41c);});}}},qt),_0x5e3127);}['_enhanceShowRevisionViewerCallback'](){const _0x517ee4=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x44947e=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x1abe08=this['editor']['plugins']['get']('Autosave');await _0x1abe08['save']();}else await _0x44947e['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x4fa0ec=this['editor']['plugins']['get']('Dialog');_0x4fa0ec['isOpen']&&_0x4fa0ec['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x41cb41=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3b5b39 of _0x41cb41)_0x3b5b39['class']=_0x3b5b39['class']?_0x3b5b39['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0xd5f287=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0xd5f287&&_0xd5f287['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4b37ef=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4b37ef&&_0x4b37ef['setAttribute']('tabindex','-1');}}const _0x174a93=this['_getRevisionViewerEditorConfig']();return _0x517ee4(_0x174a93)['then'](_0x41bdf7=>{return(this['_viewerEditor']=_0x41bdf7,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'),_0x41bdf7);})['catch'](_0x5db102=>(console['error'](_0x5db102),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x37b929=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 _0x5acebf=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0xe3f2e4 of _0x5acebf)_0xe3f2e4['class']='ck-tab-panel_disabled'===_0xe3f2e4['class']?'':_0xe3f2e4['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0xbef8ed=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0xbef8ed&&_0xbef8ed['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x5cc69f=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x5cc69f&&_0x5cc69f['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x37b929(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x545565=this['editor']['plugins']['get']('Annotations');_0x545565['refreshVisibility'](),_0x545565['refreshPositioning']();}});});}['_showRevisionViewer'](_0x3eb50a){const _0x474f03=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x309bf3=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x28fd2e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return Wt['create'](_0x28fd2e,_0x3eb50a)['then'](_0x3d5b64=>(_0x309bf3['style']['display']='block',_0x474f03['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3d5b64));}['_closeRevisionViewer'](_0x4f382c){const _0x1650dc=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x1650dc['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x4f382c['destroy']();}async['_restoreRevision'](_0x2d223e){const _0x37d235=this['editor'],_0x1d4074=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x518df4=_0x37d235['plugins']['get']('RevisionTracker'),_0x44050c=_0x37d235['plugins']['get']('RevisionHistoryUtils'),_0x38b353=_0x1d4074['repository']['getRevision'](_0x2d223e);let _0xc63974,_0x1178e4,_0x52d520;try{await _0x44050c['loadRevisionData'](_0x38b353,this['adapter']),_0xc63974=_0x44050c['getRevisionDocumentData'](_0x38b353),_0x1178e4=_0x44050c['getRevisionRootsAttributes'](_0x38b353);}catch(_0x19c5b4){return void console['error'](_0x19c5b4);}_0x37d235['model']['change'](_0x2fb189=>{for(const _0x37ab58 of Array['from'](_0x37d235['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2fb189['removeMarker'](_0x37ab58);}),_0x1d4074['isReady']=!0x1,_0x37d235['model']['enqueueChange'](_0x4cf9c3=>{_0x4cf9c3['setSelection'](null),_0x4cf9c3['removeSelectionAttribute'](_0x37d235['model']['document']['selection']['getAttributeKeys']());const _0x455d26=Object['keys'](_0xc63974);for(const _0x4c1440 of _0x37d235['model']['document']['roots'])'$graveyard'!=_0x4c1440['rootName']&&_0x4c1440['isAttached']()&&!_0x455d26['includes'](_0x4c1440['rootName'])&&_0x4cf9c3['detachRoot'](_0x4c1440);for(const _0x5cdf96 of _0x455d26){let _0x4c4787=_0x37d235['model']['document']['getRoot'](_0x5cdf96);_0x4c4787&&_0x4c4787['isAttached']()||(_0x4c4787=_0x4cf9c3['addRoot'](_0x5cdf96));const _0x4b2b7a=_0x1178e4[_0x5cdf96],_0x57a308=Object['keys'](_0x4b2b7a),_0x32fbaf=_0xc63974[_0x5cdf96];for(const _0x5dbba9 of _0x4c4787['getAttributeKeys']())_0x57a308['includes'](_0x5dbba9)||_0x4cf9c3['removeAttribute'](_0x5dbba9,_0x4c4787);for(const _0xebe283 of _0x57a308)_0x4cf9c3['setAttribute'](_0xebe283,_0x1178e4[_0x5cdf96][_0xebe283],_0x4c4787);_0x4cf9c3['remove'](_0x4cf9c3['createRangeIn'](_0x4c4787)),_0x4cf9c3['insert'](_0x37d235['data']['parse'](_0x32fbaf,_0x4c4787),_0x4c4787,0x0);}});const _0x4eb865=wt(_0x37d235['locale'],'Restored');if(_0x38b353['name'])_0x52d520=-0x1==_0x38b353['name']['indexOf'](_0x4eb865)?_0x4eb865+':\x20'+_0x38b353['name']:_0x38b353['name'];else _0x52d520=_0x4eb865+':\x20'+(_0x38b353['createdAt']['toLocaleDateString'](_0x37d235['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x38b353['createdAt']['toLocaleTimeString'](_0x37d235['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x518df4['saveRevision']({'name':_0x52d520}),_0x1d4074['isReady']=!0x0,_0x37d235['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{Ct as RestoreRevisionCommand,vt as Revision,Qt as RevisionHistory,It as RevisionHistoryUI,mt as RevisionHistoryUtils,pt as RevisionTracker,St as RevisionViewer,Wt as RevisionViewerEditor,zt as RevisionViewerIntegration,Vt as RevisionViewerLoadingOverlay,Ht as RevisionViewerUI,gt as RevisionsRepository,qt as RevisionsSidebar,Mt as ShowChangeCommand};
|
|
29
|
+
Gt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[St];}constructor(_0x44e411){super(_0x44e411),this['_revisionViewer']=_0x44e411['plugins']['get'](St),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x253ab5=this['_revisionsRepository']['_revisions'],_0x468dfc=this['_createRevisionActions'](),_0x6f267a=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Kt(this['editor']['locale'],_0x253ab5,_0x468dfc,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',(_0x4c5c53,_0x4fa8a0)=>{_0x4fa8a0['revisionViews']['on']('add',(_0x1755da,_0x35e023)=>{_0x35e023['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)),_0x6f267a['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x5f401a=this['_revisionsRepository']['getRevision'](0x0);if(_0x5f401a){const _0x481eeb=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5f401a['id']);this['_revisionViewer']['compare'](_0x5f401a,_0x481eeb);}}['_handleRevisionSelected'](_0x136d05,_0x3d59fe){const _0x4a0b15=this['_revisionsRepository']['getRevision'](_0x3d59fe['id']),_0xfdfe0b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4a0b15['id']);this['_revisionViewer']['compare'](_0x4a0b15,_0xfdfe0b);}['_handleRevisionSetName'](_0x525ed6,_0x5a65b3){this['_revisionsRepository']['getRevision'](_0x5a65b3['id'])['setName'](_0x5a65b3['name']);}['_handleDiffChange'](_0x5c9082,_0x48cd53,_0x3fc4f0){const _0x3db946=this['_revisionsRepository']['getRevisionsInDiff'](_0x3fc4f0);_0x3db946['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x3db946),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x3db946[0x0]));}['_createRevisionActions'](){const _0x46111b=this['editor'],_0x2f1aae=qt['availableRevisionActions'],_0x5ac429=_0x46111b['config']['get']('revisionHistory.revisionActions')||qt['defaultRevisionActions'];if(_0x5ac429['length'])return _0x5ac429['map'](_0x192fc0=>{const _0x44f1ed='string'==typeof _0x192fc0?Object['assign']({},_0x2f1aae[_0x192fc0]):_0x192fc0;return _0x44f1ed['action']=_0x44f1ed['action']['bind'](this,_0x46111b),_0x44f1ed['isVisible']&&(_0x44f1ed['isVisible']=_0x44f1ed['isVisible']['bind'](this,_0x46111b)),_0x44f1ed;});}}function Gt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4d08ae},_0x281aee)=>{const _0x329e72=_0x4d08ae['get'](St),_0x2093a3=_0x329e72['repository'];let _0x2bfe23=_0x329e72['diff']['newRevisionId'],_0x2f38b9=_0x281aee['id'];_0x2093a3['getIndex'](_0x2bfe23)>_0x2093a3['getIndex'](_0x2f38b9)&&([_0x2bfe23,_0x2f38b9]=[_0x2f38b9,_0x2bfe23]),_0x329e72['compare'](_0x2bfe23,_0x2f38b9);},'isVisible':({plugins:_0x41d2ab},_0x5f48e9)=>{const _0x46188d=_0x41d2ab['get'](St);return!(_0x46188d['repository']['getRevisionsInDiff'](_0x46188d['diff'])['length']>0x2)&&!_0x5f48e9['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x18186e,{id:_0x49f164})=>{_0x18186e['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x49f164);},'isVisible':({plugins:_0x506ee2},_0x310052)=>!!_0x506ee2['get'](St)['repository']['getLaterVisibleRevision'](_0x310052['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x59a063},{id:_0x17a791,revisionNameView:_0x291a3e})=>{const _0x2711c1=_0x59a063['get'](St),_0x1ef243=_0x2711c1['repository']['getEarlierVisibleRevision'](_0x17a791);_0x2711c1['compare'](_0x17a791,_0x1ef243),_0x291a3e['focus'](),_0x291a3e['fieldView']['select']();}}};}class Jt extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x4370f4,_0x4d32db){super(_0x4370f4),this['_view']=_0x4d32db,this['_toolbarConfig']=ht(_0x4370f4['config']['get']('toolbar')),this['_elementReplacer']=new _0x1ba009();}get['element'](){return this['view']['element'];}['init'](_0x43d110){const _0x196330=this['editor'],_0x24f946=this['view'],_0x256c5d=_0x196330['editing']['view'],_0x3b7ec1=_0x24f946['editable'],_0x476237=_0x256c5d['document']['getRoot']();_0x3b7ec1['name']=_0x476237['rootName'],_0x24f946['render']();const _0x116902=_0x3b7ec1['element'];this['setEditableElement'](_0x3b7ec1['name'],_0x116902),_0x24f946['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x256c5d['attachDomRoot'](_0x116902),this['_elementReplacer']['replace'](_0x43d110,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x26a6d2=this['view'],_0x595b3e=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x595b3e['detachDomRoot'](_0x26a6d2['editable']['name']),_0x26a6d2['destroy']();}['_initToolbar'](){const _0x271c03=this['view'];_0x271c03['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x271c03['stickyPanel']['limiterElement']=_0x271c03['element'],_0x271c03['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0xefc035})=>_0xefc035),_0x271c03['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x271c03['toolbar']);}}class Yt extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x40e8cf,_0x15327f,_0x47574f={}){super(_0x40e8cf),this['stickyPanel']=new ut(_0x40e8cf),this['toolbar']=new lt(_0x40e8cf,{'shouldGroupWhenFull':_0x47574f['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x40e8cf,_0x15327f);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class Wt extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x4eeeaf(_0x1b44a5){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x42e757,_0xa66a4d){super(_0xa66a4d),this['sourceElement']=_0x42e757,this['model']['document']['createRoot']();const _0x58f1c5=new Yt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Jt(this,_0x58f1c5);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x180d0e,_0x1c61e6){const _0x9c53c7=new this(_0x180d0e,_0x1c61e6);return await _0x9c53c7['initPlugins'](),await _0x9c53c7['ui']['init'](_0x180d0e),await _0x9c53c7['data']['init'](_0x9c53c7['config']['get']('initialData')||''),_0x9c53c7['fire']('ready'),_0x9c53c7;}}const Xt=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class zt extends _0x1f70da{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f9438){function _0x55eea4(_0x2ea3d4){return _0x2ea3d4['map'](_0x50f4ba=>String['fromCharCode'](_0x50f4ba))['join']('');}super(_0x3f9438),this['result']='end',_0x3f9438[_0x55eea4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x55eea4([0x76,0x69,0x65,0x77])][_0x55eea4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x55eea4([0x61,0x75,0x74,0x6f]),_0x3f9438[_0x55eea4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x55eea4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x55eea4([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x55eea4([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x55eea4([0x6f,0x6b])});}}class Qt extends _0x1f70da{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[pt,It];}constructor(_0xeee159){if(super(_0xeee159),!this['editor']['config']['get']('revisionHistory'))throw new _0xbbc80('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x17074e=>this['_showRevisionViewer']({..._0x17074e,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x49166b=>this['_closeRevisionViewer'](_0x49166b)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3055df=>this['_restoreRevision'](_0x3055df)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x56dd5a){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x56dd5a;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x4167ef){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4167ef);}['getRevision'](_0x13d43e){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x13d43e);}['getRevisions'](_0x27f2a0){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x27f2a0||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4e059b=this['editor'],_0x577c4a=_0x1dce1b(_0x4e059b,Xt),_0x4e3e17=_0x4e059b['plugins']['get']('RevisionTracker'),_0x2453f7=_0x4e059b['plugins']['get'](_0x19894b)['users'];return _0x577c4a['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x577c4a['lazyRoots'],(_0x577c4a['plugins']['push'](zt,St,Ht,class extends _0x1f70da{static get['requires'](){return[St,_0x19894b];}['init'](){const _0x340dd5=this['editor']['plugins']['get'](_0x19894b);for(const _0x55981f of _0x2453f7)_0x55981f['isAnonymous']||_0x340dd5['getUser'](_0x55981f['id'])||_0x340dd5['addUser'](_0x55981f);const _0x3cf0b7=_0x4e3e17['repository']['getRevisions']();let _0x2a0c6a=null;const _0x55c3fa=this['editor']['plugins']['get']('RevisionViewer');_0x55c3fa['adapter']=_0x4e3e17['adapter'],_0x55c3fa['bind']('isEnabled')['to'](_0x4e3e17),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4e059b,'isReadOnly',_0x3d1fe0=>!_0x3d1fe0);for(const _0x23f3b6 of _0x3cf0b7){const _0x1441d9=null===_0x23f3b6['creator'];if(_0x1441d9&&_0x23f3b6['toVersion']===_0x23f3b6['fromVersion'])continue;const _0x484bdc=_0x23f3b6['toJSON']();_0x55c3fa['addRevisionData'](_0x484bdc,(_0x262783,_0x5c6f95,_0xa171db)=>{if(_0x1441d9){if(_0x2a0c6a)_0x2a0c6a['_update'](_0x262783,_0x5c6f95);else{if(!_0x5c6f95){const _0x14a165=_0xa171db['toJSON']();_0x14a165['id']=_0x34aeba(),_0x4e3e17['saveRevision'](_0x14a165,_0xa171db['toVersion'])['then'](_0xeec48b=>{_0x2a0c6a=_0xeec48b;});}}}else _0x23f3b6['_update'](_0x262783,_0x5c6f95);});}}},qt),_0x577c4a);}['_enhanceShowRevisionViewerCallback'](){const _0x12112d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x16cc34=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x485ac8=this['editor']['plugins']['get']('Autosave');await _0x485ac8['save']();}else await _0x16cc34['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1295d8=this['editor']['plugins']['get']('Dialog');_0x1295d8['isOpen']&&_0x1295d8['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x391469=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x519171 of _0x391469)_0x519171['class']=_0x519171['class']?_0x519171['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x6a4bf8=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x6a4bf8&&_0x6a4bf8['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3f4a9b=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3f4a9b&&_0x3f4a9b['setAttribute']('tabindex','-1');}}const _0x3b6603=this['_getRevisionViewerEditorConfig']();return _0x12112d(_0x3b6603)['then'](_0x2970a7=>{return(this['_viewerEditor']=_0x2970a7,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'),_0x2970a7);})['catch'](_0x440f46=>(console['error'](_0x440f46),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4a7da5=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 _0xc049bb=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0xc0b88 of _0xc049bb)_0xc0b88['class']='ck-tab-panel_disabled'===_0xc0b88['class']?'':_0xc0b88['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x406865=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x406865&&_0x406865['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xe75e85=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xe75e85&&_0xe75e85['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4a7da5(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3bf42c=this['editor']['plugins']['get']('Annotations');_0x3bf42c['refreshVisibility'](),_0x3bf42c['refreshPositioning']();}});});}['_showRevisionViewer'](_0x5a44a1){const _0x21a711=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2804fe=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x383ca3=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return Wt['create'](_0x383ca3,_0x5a44a1)['then'](_0x1373f5=>(_0x2804fe['style']['display']='block',_0x21a711['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1373f5));}['_closeRevisionViewer'](_0x297bc1){const _0x21bc3c=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x21bc3c['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x297bc1['destroy']();}async['_restoreRevision'](_0x3cd971){const _0x4a6182=this['editor'],_0x3b1079=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3066d6=_0x4a6182['plugins']['get']('RevisionTracker'),_0x534d19=_0x4a6182['plugins']['get']('RevisionHistoryUtils'),_0x39fa22=_0x3b1079['repository']['getRevision'](_0x3cd971);let _0x48d593,_0x2d8def,_0x3ea122;try{await _0x534d19['loadRevisionData'](_0x39fa22,this['adapter']),_0x48d593=_0x534d19['getRevisionDocumentData'](_0x39fa22),_0x2d8def=_0x534d19['getRevisionRootsAttributes'](_0x39fa22);}catch(_0x103e39){return void console['error'](_0x103e39);}_0x4a6182['model']['change'](_0x1701d8=>{for(const _0x3c9d5e of Array['from'](_0x4a6182['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1701d8['removeMarker'](_0x3c9d5e);}),_0x3b1079['isReady']=!0x1,_0x4a6182['model']['enqueueChange'](_0x2c30ea=>{_0x2c30ea['setSelection'](null),_0x2c30ea['removeSelectionAttribute'](_0x4a6182['model']['document']['selection']['getAttributeKeys']());const _0x3be8c6=Object['keys'](_0x48d593);for(const _0x16707a of _0x4a6182['model']['document']['roots'])'$graveyard'!=_0x16707a['rootName']&&_0x16707a['isAttached']()&&!_0x3be8c6['includes'](_0x16707a['rootName'])&&_0x2c30ea['detachRoot'](_0x16707a);for(const _0x4b9d3b of _0x3be8c6){let _0x3379af=_0x4a6182['model']['document']['getRoot'](_0x4b9d3b);_0x3379af&&_0x3379af['isAttached']()||(_0x3379af=_0x2c30ea['addRoot'](_0x4b9d3b));const _0xc47669=_0x2d8def[_0x4b9d3b],_0x53f782=Object['keys'](_0xc47669),_0x4ba5f5=_0x48d593[_0x4b9d3b];for(const _0x26e4f5 of _0x3379af['getAttributeKeys']())_0x53f782['includes'](_0x26e4f5)||_0x2c30ea['removeAttribute'](_0x26e4f5,_0x3379af);for(const _0xd472fe of _0x53f782)_0x2c30ea['setAttribute'](_0xd472fe,_0x2d8def[_0x4b9d3b][_0xd472fe],_0x3379af);_0x2c30ea['remove'](_0x2c30ea['createRangeIn'](_0x3379af)),_0x2c30ea['insert'](_0x4a6182['data']['parse'](_0x4ba5f5,_0x3379af),_0x3379af,0x0);}});const _0x312f84=wt(_0x4a6182['locale'],'Restored');if(_0x39fa22['name'])_0x3ea122=-0x1==_0x39fa22['name']['indexOf'](_0x312f84)?_0x312f84+':\x20'+_0x39fa22['name']:_0x39fa22['name'];else _0x3ea122=_0x312f84+':\x20'+(_0x39fa22['createdAt']['toLocaleDateString'](_0x4a6182['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x39fa22['createdAt']['toLocaleTimeString'](_0x4a6182['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3066d6['saveRevision']({'name':_0x3ea122}),_0x3b1079['isReady']=!0x0,_0x4a6182['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{Ct as RestoreRevisionCommand,vt as Revision,Qt as RevisionHistory,It as RevisionHistoryUI,mt as RevisionHistoryUtils,pt as RevisionTracker,St as RevisionViewer,Wt as RevisionViewerEditor,zt as RevisionViewerIntegration,Vt as RevisionViewerLoadingOverlay,Ht as RevisionViewerUI,gt as RevisionsRepository,qt as RevisionsSidebar,Mt as ShowChangeCommand};
|