@ckeditor/ckeditor5-revision-history 45.2.1-alpha.5 → 45.2.1-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/dist/index.js +6 -6
- package/package.json +11 -11
- package/src/revisionsrepository.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x2cbbee(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x99c33f){super(),this['id']=_0x99c33f['id']||_0xb8234b(),this['creator']=_0x99c33f['creator']||null,this['authors']=_0x99c33f['authors']||[],this['diffData']=_0x99c33f['diffData']||null,this['toVersion']=_0x99c33f['toVersion']||0x0,this['fromVersion']=_0x99c33f['fromVersion']||0x0,this['set']('name',_0x99c33f['name']||''),this['set']('createdAt',_0x99c33f['createdAt']||new Date()),this['set']('attributes',_0x99c33f['attributes']||{});}['setName'](_0x186e77){this['_update']({'name':_0x186e77});}['setAttribute'](_0x425ad0,_0x116c12){const _0x328c91=_0x7e9748(this['attributes']);_0x43ab20(_0x328c91,_0x425ad0,_0x116c12),this['_update']({'attributes':_0x328c91});}['removeAttribute'](_0x239403){const _0x599527=_0x7e9748(this['attributes']);_0x17feab(_0x599527,_0x239403),this['_update']({'attributes':_0x599527});}['_update'](_0x265a54,_0x2d3da1=!0x1){let _0x126316=!0x1;const _0x27d877={'id':this['id']},_0x2ab4e0=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4edd90 of _0x2ab4e0){const _0x58d575=_0x265a54[_0x4edd90];void 0x0!==_0x58d575&&_0x58d575!==this[_0x4edd90]&&(this[_0x4edd90]=_0x58d575,_0x27d877[_0x4edd90]=_0x58d575,_0x126316=!0x0);}_0x126316&&(_0x27d877['authors']&&(_0x27d877['authorsIds']=_0x27d877['authors']['map'](_0x153a9c=>_0x153a9c['id']),delete _0x27d877['authors']),this['fire']('_update',_0x27d877,_0x2d3da1));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3ffb2e=>_0x3ffb2e['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x4de1c4{['_revisions'];static get['requires'](){return[_0x2ad73a];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5977b1){super(_0x5977b1),this['_revisions']=new _0x5e3e8a();}['afterInit'](){!async function(_0x340d8a){const _0x237884=_0x4d6d31([0x77,0x59,0x72,0x51,0x39,0x33,0x6d,0x32,0x5a,0x34,0x35,0x54,0x53,0x6c,0x79,0x65,0x52,0x6f,0x64,0x78,0x6b,0x44,0x67,0x57,0x47,0x42,0x56,0x62,0x4a,0x30,0x36,0x61,0x6a,0x6e,0x31,0x69,0x4f,0x58,0x4d,0x74,0x76,0x63,0x66,0x43,0x49,0x37,0x71,0x50,0x73,0x7a,0x48,0x55,0x45,0x4c,0x75,0x68,0x46,0x4b,0x38,0x41,0x70,0x4e]),_0x4c9bac=0xeb829,_0x6886ff=0x3860e5d0,_0x566851=0x38678ee0^_0x6886ff,_0x2f38d9=window[_0x4d6d31([0x44,0x61,0x74,0x65])][_0x4d6d31([0x6e,0x6f,0x77])](),_0xa56e50=_0x340d8a[_0x4d6d31([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xc3ae87=new window[(_0x4d6d31([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1638a6=>{_0xa56e50[_0x4d6d31([0x6f,0x6e,0x63,0x65])](_0x4d6d31([0x72,0x65,0x61,0x64,0x79]),_0x1638a6);}),_0x423109={[_0x4d6d31([0x6b,0x74,0x79])]:_0x4d6d31([0x45,0x43]),[_0x4d6d31([0x75,0x73,0x65])]:_0x4d6d31([0x73,0x69,0x67]),[_0x4d6d31([0x63,0x72,0x76])]:_0x4d6d31([0x50,0x2d,0x32,0x35,0x36]),[_0x4d6d31([0x78])]:_0x4d6d31([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]),[_0x4d6d31([0x79])]:_0x4d6d31([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]),[_0x4d6d31([0x61,0x6c,0x67])]:_0x4d6d31([0x45,0x53,0x32,0x35,0x36])},_0x17860e=_0xa56e50[_0x4d6d31([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4d6d31([0x67,0x65,0x74])](_0x4d6d31([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x452232(){let _0x4f45d5,_0x573f7d=null,_0x4330aa=null;try{if(_0x17860e==_0x4d6d31([0x47,0x50,0x4c]))return _0x4d6d31([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4f45d5=_0x428a52(),!_0x4f45d5)return _0x4d6d31([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4f45d5[_0x4d6d31([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4330aa=_0x25b75f(_0x4f45d5[_0x4d6d31([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4f45d5[_0x4d6d31([0x6a,0x74,0x69])])),await _0x14ddcc()?_0x1e89f8()?_0x25ed3d()?_0x4d6d31([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2e8c14()?(_0x4f45d5[_0x4d6d31([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4d6d31([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x573f7d=_0x28139d(_0x4d6d31([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4f45d5[_0x4d6d31([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4d6d31([0x74,0x72,0x69,0x61,0x6c])&&(_0x573f7d=_0x28139d(_0x4d6d31([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5eecf7()):_0x4d6d31([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4d6d31([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4d6d31([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4d6d31([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x25ed3d(){const _0x35ec1c=[_0x4d6d31([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4d6d31([0x74,0x72,0x69,0x61,0x6c])][_0x4d6d31([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f45d5[_0x4d6d31([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2f38d9/0x3e8:0xe10*_0x566851;return _0x4f45d5[_0x4d6d31([0x65,0x78,0x70])]<_0x35ec1c;}function _0x1e89f8(){const _0x21d62f=_0x4f45d5[_0x4d6d31([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x21d62f)return!0x1;if(_0x21d62f[_0x4d6d31([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d6d31([0x2a])))return!0x0;if(_0x21d62f[_0x4d6d31([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d6d31([0x52,0x48])))return!0x0;if(_0x21d62f[_0x4d6d31([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d6d31([0x52,0x52,0x48]))){if(_0x1eed24())return!0x0;if(_0x384308()||_0xe4ae9a())return!0x0;}return!0x1;}function _0x2e8c14(){const _0x6f8bff=_0x4f45d5[_0x4d6d31([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x6f8bff||0x0==_0x6f8bff[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x573722}=new URL(window[_0x4d6d31([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x6f8bff[_0x4d6d31([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x573722))return!0x0;const _0x9133b4=_0x573722[_0x4d6d31([0x73,0x70,0x6c,0x69,0x74])](_0x4d6d31([0x2e]));return _0x6f8bff[_0x4d6d31([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1ecf68=>_0x1ecf68[_0x4d6d31([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d6d31([0x2a])))[_0x4d6d31([0x6d,0x61,0x70])](_0x4468a5=>_0x4468a5[_0x4d6d31([0x73,0x70,0x6c,0x69,0x74])](_0x4d6d31([0x2e])))[_0x4d6d31([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3f1d53=>_0x3f1d53[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x9133b4[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4d6d31([0x6d,0x61,0x70])](_0x1dcf94=>Array(_0x9133b4[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1dcf94[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4d6d31([0x66,0x69,0x6c,0x6c])](_0x1dcf94[0x0]===_0x4d6d31([0x2a])?_0x4d6d31([0x2a]):'')[_0x4d6d31([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1dcf94))[_0x4d6d31([0x73,0x6f,0x6d,0x65])](_0x52eb1e=>_0x9133b4[_0x4d6d31([0x65,0x76,0x65,0x72,0x79])]((_0x6f423,_0x2caced)=>_0x52eb1e[_0x2caced]===_0x6f423||_0x52eb1e[_0x2caced]===_0x4d6d31([0x2a])));}function _0x5eecf7(){return _0x573f7d&&_0x4330aa?new window[(_0x4d6d31([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x208879,_0x4eb238)=>{_0x573f7d[_0x4d6d31([0x74,0x68,0x65,0x6e])](_0x208879,_0x4eb238),_0x4330aa[_0x4d6d31([0x74,0x68,0x65,0x6e])](_0x1ea407=>{_0x1ea407!=_0x4d6d31([0x56,0x61,0x6c,0x69,0x64])&&_0x208879(_0x1ea407);},_0x4eb238);}):_0x573f7d||_0x4330aa||_0x4d6d31([0x56,0x61,0x6c,0x69,0x64]);}}function _0x25b75f(_0x24c710,_0x58c48f){return new window[(_0x4d6d31([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5a7e5a=>{if(_0x10fb88())return _0x5a7e5a(_0x4d6d31([0x56,0x61,0x6c,0x69,0x64]));_0x57e6ef(),_0xa56e50[_0x4d6d31([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4d6d31([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xaedd95=!0x1;const _0x5e511e=_0xb8234b();function _0x20b72b(_0x117696){return!!_0x117696&&(typeof _0x117696===_0x4d6d31([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x117696===_0x4d6d31([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x117696[_0x4d6d31([0x74,0x68,0x65,0x6e])]===_0x4d6d31([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x117696[_0x4d6d31([0x63,0x61,0x74,0x63,0x68])]===_0x4d6d31([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xd40e7d(_0x4877d3){_0x1a65bd(_0x4877d3)[_0x4d6d31([0x74,0x68,0x65,0x6e])](_0x31cff9=>{if(!_0x31cff9||_0x31cff9[_0x4d6d31([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4d6d31([0x6f,0x6b]))return _0x4d6d31([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x318f90(_0x32f493(_0x5e511e+_0x58c48f))!=_0x31cff9[_0x4d6d31([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4d6d31([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4d6d31([0x56,0x61,0x6c,0x69,0x64]);})[_0x4d6d31([0x74,0x68,0x65,0x6e])](_0x5d296b=>(_0x769249(),_0x5d296b),()=>{const _0x15da9b=_0x62b91c();return null==_0x15da9b?(_0x769249(),_0x4d6d31([0x56,0x61,0x6c,0x69,0x64])):_0x4d6d31(_0x2f38d9-_0x15da9b>(0x1c6c61d0^_0x6886ff)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4d6d31([0x74,0x68,0x65,0x6e])](_0x5a7e5a)[_0x4d6d31([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5a7e5a(_0x4d6d31([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x46399f=0x38560b50^_0x6886ff;function _0x769249(){const _0x563037=_0x4d6d31([0x6c,0x6c,0x63,0x74,0x2d])+_0x318f90(_0x32f493(_0x24c710)),_0x28e86b=_0x575892(_0x318f90(window[_0x4d6d31([0x4d,0x61,0x74,0x68])][_0x4d6d31([0x63,0x65,0x69,0x6c])](_0x2f38d9/_0x46399f)));window[_0x4d6d31([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4d6d31([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x563037,_0x28e86b);}function _0x62b91c(){const _0xb76276=_0x4d6d31([0x6c,0x6c,0x63,0x74,0x2d])+_0x318f90(_0x32f493(_0x24c710)),_0x431638=window[_0x4d6d31([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4d6d31([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xb76276);return _0x431638?window[_0x4d6d31([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x575892(_0x431638),0x10)*_0x46399f:null;}function _0x1a65bd(_0x85f653){return new window[(_0x4d6d31([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xfa00c3,_0x461010)=>{_0x85f653[_0x4d6d31([0x74,0x68,0x65,0x6e])](_0xfa00c3,_0x461010),window[_0x4d6d31([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x461010,0x38613110^_0x6886ff);});}}_0xa56e50[_0x4d6d31([0x6f,0x6e])](_0x4d6d31([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x414c1f,_0x703509)=>{if(_0x703509[0x0]!=_0x24c710)return _0x5a7e5a(_0x4d6d31([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x703509[0x1]={..._0x703509[0x1],[_0x4d6d31([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5e511e};},{[_0x4d6d31([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4d6d31([0x68,0x69,0x67,0x68])}),_0xa56e50[_0x4d6d31([0x6f,0x6e])](_0x4d6d31([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x45533a=>{_0x20b72b(_0x45533a[_0x4d6d31([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xaedd95=!0x0,_0xd40e7d(_0x45533a[_0x4d6d31([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4d6d31([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4d6d31([0x6c,0x6f,0x77])}),_0xc3ae87[_0x4d6d31([0x74,0x68,0x65,0x6e])](()=>{_0xaedd95||_0x5a7e5a(_0x4d6d31([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x10fb88(){return _0xa56e50[_0x4d6d31([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d6d31([0x76,0x69,0x65,0x77])][_0x4d6d31([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4d6d31([0x61,0x75,0x74,0x6f]);}function _0x57e6ef(){_0xa56e50[_0x4d6d31([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d6d31([0x76,0x69,0x65,0x77])][_0x4d6d31([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4d6d31([0x61,0x75,0x74,0x6f]);}}function _0x28139d(_0x32896f){const _0x33d44d=[new window[(_0x4d6d31([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3fd4d3=>setTimeout(_0x3fd4d3,0x3869db1c^_0x6886ff)),_0xc3ae87[_0x4d6d31([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4d6d31([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a541b=>{const _0x2de11d=0x3860e5d7^_0x6886ff,_0x162ab5=_0x340d8a[_0x4d6d31([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x53d843(){_0x162ab5[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x2de11d&&_0x3a541b();}_0x53d843(),_0x162ab5[_0x4d6d31([0x6f,0x6e])](_0x4d6d31([0x61,0x64,0x64]),_0x53d843);})),new window[(_0x4d6d31([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f5cc0=>{function _0x30330e(){for(const _0x58fd13 in window)if(window[_0x4d6d31([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4d6d31([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x58fd13))&&window[_0x58fd13]==_0x4c9bac)return _0x2f5cc0();_0xa56e50[_0x4d6d31([0x73,0x74,0x61,0x74,0x65])]!=_0x4d6d31([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4d6d31([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x30330e,0x3860f658^_0x6886ff);}_0x49d273(_0x4d6d31([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x30330e();})];return window[_0x4d6d31([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4d6d31([0x72,0x61,0x63,0x65])](_0x33d44d)[_0x4d6d31([0x74,0x68,0x65,0x6e])](()=>_0x32896f);}async function _0x420c18(){if(await _0xc3ae87,_0x49d273(_0x4d6d31([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x50e545=_0x340d8a[_0x4d6d31([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x14572e=_0x340d8a[_0x4d6d31([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])](_0x50e545[_0x4d6d31([0x69,0x64])]),_0x38eafb=_0x2ca74a(_0x4d6d31([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x38eafb[_0x4d6d31([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x50e545['id'],_0x14572e?_0x14572e['id']:null,!0x0),_0x38eafb[_0x4d6d31([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4d6d31([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x38eafb[_0x4d6d31([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x38eafb[_0x4d6d31([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x34c823,void(_0x38eafb[_0x4d6d31([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x34c823);}if(_0x49d273(_0x4d6d31([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x21d0b2=_0x2ca74a(_0x4d6d31([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x21d0b2[_0x4d6d31([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4d6d31([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x21d0b2[_0x4d6d31([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x21d0b2[_0x4d6d31([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x34c823,_0x21d0b2[_0x4d6d31([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x34c823;}_0xa56e50[_0x4d6d31([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d6d31([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x34c823,_0xa56e50[_0x4d6d31([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d6d31([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x34c823,_0xa56e50[_0x4d6d31([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4d6d31([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1eed24(){return _0x49d273(_0x4d6d31([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2ca74a(_0x4d6d31([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4d6d31([0x73,0x74,0x61,0x74,0x65])]==_0x4d6d31([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x384308(){return _0x49d273(_0x4d6d31([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 _0xe4ae9a(){return _0x49d273(_0x4d6d31([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2ec66a(_0x41a4d8){const _0x4482c3=_0x3ed1dd();_0xa56e50[_0x4482c3]=_0x4d6d31([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])+_0x41a4d8,_0x41a4d8[_0x4d6d31([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4d6d31([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x3ed1dd()]=_0x4c9bac),_0x41a4d8!=_0x4d6d31([0x56,0x61,0x6c,0x69,0x64])&&_0x420c18();}function _0x3ed1dd(){const _0x11ef83=window[_0x4d6d31([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4d6d31([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4d6d31([0x6e,0x6f,0x77])]())[_0x4d6d31([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4d6d31([0x2e]),'');let _0x55c22c=_0x4d6d31([0x77]);for(let _0x40b076=0x0;_0x40b076<_0x11ef83[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x40b076+=0x2){let _0x28883c=window[_0x4d6d31([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x11ef83[_0x4d6d31([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x40b076,_0x40b076+0x2));_0x28883c>=_0x237884[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x28883c-=_0x237884[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x55c22c+=_0x237884[_0x28883c];}return _0x55c22c;}function _0x428a52(){const _0x5b3cba=_0x17860e[_0x4d6d31([0x73,0x70,0x6c,0x69,0x74])](_0x4d6d31([0x2e]));if(0x3!=_0x5b3cba[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3aba66(_0x5b3cba[0x1]);function _0x3aba66(_0x500a81){const _0x36a9bf=_0x42c4ab(_0x500a81);return _0x36a9bf&&_0x19ccc9()?_0x36a9bf:null;function _0x19ccc9(){const _0x2bc4fe=_0x36a9bf[_0x4d6d31([0x6a,0x74,0x69])],_0x56ddbc=window[_0x4d6d31([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2bc4fe[_0x4d6d31([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2bc4fe[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4ee50b={..._0x36a9bf,[_0x4d6d31([0x6a,0x74,0x69])]:_0x2bc4fe[_0x4d6d31([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2bc4fe[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4ee50b[_0x4d6d31([0x76,0x63])],_0x32f493(_0x4ee50b)==_0x56ddbc;}}}async function _0x14ddcc(){let _0x5f3f0c=!0x0;try{const _0x1b2be1=_0x17860e[_0x4d6d31([0x73,0x70,0x6c,0x69,0x74])](_0x4d6d31([0x2e])),[_0xb14323,_0x5cd2ca,_0x1aa5c7]=_0x1b2be1;return _0x285ca1(_0xb14323),await _0x46cdd3(_0xb14323,_0x5cd2ca,_0x1aa5c7),_0x5f3f0c;}catch{return!0x1;}function _0x285ca1(_0x3006b5){const _0x494862=_0x42c4ab(_0x3006b5);_0x494862&&_0x494862[_0x4d6d31([0x61,0x6c,0x67])]==_0x4d6d31([0x45,0x53,0x32,0x35,0x36])||(_0x5f3f0c=!0x1);}async function _0x46cdd3(_0x38edd5,_0x229050,_0x2244b7){const _0x5f1a96=window[_0x4d6d31([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4d6d31([0x66,0x72,0x6f,0x6d])](_0x4b9f2e(_0x2244b7),_0x180e21=>_0x180e21[_0x4d6d31([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4addd=new window[(_0x4d6d31([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4d6d31([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x38edd5+_0x4d6d31([0x2e])+_0x229050),_0x26b8e6=window[_0x4d6d31([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4d6d31([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x26b8e6)return;const _0x245043=await _0x26b8e6[_0x4d6d31([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4d6d31([0x6a,0x77,0x6b]),_0x423109,{[_0x4d6d31([0x6e,0x61,0x6d,0x65])]:_0x4d6d31([0x45,0x43,0x44,0x53,0x41]),[_0x4d6d31([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4d6d31([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4d6d31([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x26b8e6[_0x4d6d31([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4d6d31([0x6e,0x61,0x6d,0x65])]:_0x4d6d31([0x45,0x43,0x44,0x53,0x41]),[_0x4d6d31([0x68,0x61,0x73,0x68])]:{[_0x4d6d31([0x6e,0x61,0x6d,0x65])]:_0x4d6d31([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x245043,_0x5f1a96,_0x4addd)||(_0x5f3f0c=!0x1);}}function _0x42c4ab(_0x2c5bc3){return _0x2c5bc3[_0x4d6d31([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4d6d31([0x65,0x79]))?JSON[_0x4d6d31([0x70,0x61,0x72,0x73,0x65])](_0x4b9f2e(_0x2c5bc3)):null;}function _0x4b9f2e(_0x29db61){return window[_0x4d6d31([0x61,0x74,0x6f,0x62])](_0x29db61[_0x4d6d31([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4d6d31([0x2b]))[_0x4d6d31([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4d6d31([0x2f])));}function _0x32f493(_0x423420){let _0x3b12cd=0x1505;function _0x43ccb0(_0x194334){for(let _0xf47062=0x0;_0xf47062<_0x194334[_0x4d6d31([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xf47062++){const _0x19564c=_0x194334[_0x4d6d31([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xf47062);_0x3b12cd=(_0x3b12cd<<0x5)+_0x3b12cd+_0x19564c,_0x3b12cd&=_0x3b12cd;}}function _0x266ce2(_0x466fee){Array[_0x4d6d31([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x466fee)?_0x466fee[_0x4d6d31([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x266ce2):_0x466fee&&typeof _0x466fee==_0x4d6d31([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4d6d31([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x466fee)[_0x4d6d31([0x73,0x6f,0x72,0x74])]()[_0x4d6d31([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2a4715,_0x4ac4f1])=>{_0x43ccb0(_0x2a4715),_0x266ce2(_0x4ac4f1);}):_0x43ccb0(window[_0x4d6d31([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x466fee));}return _0x266ce2(_0x423420),_0x3b12cd>>>0x0;}function _0x318f90(_0x657fdd){return _0x657fdd[_0x4d6d31([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4d6d31([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4d6d31([0x30]));}function _0x575892(_0xb7b785){return _0xb7b785[_0x4d6d31([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4d6d31([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4d6d31([0x6a,0x6f,0x69,0x6e])]('');}function _0x49d273(_0x549a36){return _0xa56e50[_0x4d6d31([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4d6d31([0x68,0x61,0x73])](_0x549a36);}function _0x2ca74a(_0x4dc46e){return _0xa56e50[_0x4d6d31([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4d6d31([0x67,0x65,0x74])](_0x4dc46e);}function _0x34c823(){}function _0x4d6d31(_0xb1f44){return _0xb1f44['map'](_0x1b2f5b=>String['fromCharCode'](_0x1b2f5b))['join']('');}_0x2ec66a(await _0x452232());}(this);}['createRevision'](_0x32e90e){const _0x43b905=this['editor']['plugins']['get']('Users');return new h({'id':_0x32e90e['id'],'name':_0x32e90e['name'],'creator':_0x32e90e['creatorId']?_0x43b905['getUser'](_0x32e90e['creatorId']):null,'diffData':_0x32e90e['diffData']||_0x32e90e['data'],'authors':_0x32e90e['authorsIds']['map'](_0x49152c=>_0x43b905['getUser'](_0x49152c)),'createdAt':new Date(_0x32e90e['createdAt']),'attributes':_0x32e90e['attributes'],'fromVersion':_0x32e90e['fromVersion'],'toVersion':_0x32e90e['toVersion']});}['addRevision'](_0x1a477b,_0x4e197e=0x0){this['_revisions']['add'](_0x1a477b,_0x4e197e);}['getRevision'](_0x3e8e0d){return this['_revisions']['get'](_0x3e8e0d);}['getRevisions'](_0x39023f={'toJSON':!0x1}){const _0x45985a=Array['from'](this['_revisions']);return _0x45985a['reverse'](),_0x39023f['toJSON']?_0x45985a['map'](_0x4399f1=>_0x4399f1['toJSON']()):_0x45985a;}['getIndex'](_0x44b90c){return this['_revisions']['getIndex'](_0x44b90c);}['getEarlierVisibleRevision'](_0x29d951){const [,_0x1dedee]=this['getRevisionsIterator'](_0x29d951,{'direction':'earlier'});return _0x1dedee;}['getLaterVisibleRevision'](_0x25a88e){const [,_0x53b53e]=this['getRevisionsIterator'](_0x25a88e,{'direction':'later'});return _0x53b53e;}['getRevisionsInDiff'](_0x5c61a9){const _0x563c71=[];for(const _0x819fee of this['getRevisionsIterator'](_0x5c61a9['newRevisionId']))if(_0x563c71['push'](_0x819fee),_0x819fee['id']===_0x5c61a9['oldRevisionId'])break;return _0x563c71;}*['getRevisionsIterator'](_0x47e904,{direction:_0x5543fb='earlier',filter:_0x3f3e49=()=>!0x0}={}){const _0x3154f6='earlier'===_0x5543fb?0x1:-0x1;let _0x27fe87=this['_revisions']['get'](_0x47e904),_0x5358e2=this['getIndex'](_0x27fe87);for(yield _0x27fe87;_0x27fe87;){if(_0x5358e2+=_0x3154f6,_0x27fe87=this['getRevision'](_0x5358e2),!_0x27fe87)return;_0x3f3e49(_0x27fe87)&&(yield _0x27fe87);}}}class V extends _0x4de1c4{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x4f67b4,'c'],[_0xa17d80,'a'],[_0x2aadf9,'e'],[_0x48afd8,'r'],[_0x45b7ff,'u']]);['_typeCharToViewClass']=new Map([['c',_0x4f67b4],['a',_0xa17d80],['e',_0x2aadf9],['r',_0x48afd8],['u',_0x45b7ff]]);async['loadRevisionData'](_0x474f48,_0x3b7225){if(_0x474f48['diffData']||!_0x3b7225)return;const _0x1d486f=this['editor']['config']['get']('collaboration.channelId'),_0x4ca3f6=await _0x3b7225['getRevision']({'channelId':_0x1d486f,'revisionId':_0x474f48['id']});_0x474f48['diffData']=_0x4ca3f6['diffData'];}['getRevisionDocumentData'](_0x4ee17c){const _0x142a0c={};for(const _0x3b7bb6 in _0x4ee17c['diffData']){if(_0x4ee17c['diffData'][_0x3b7bb6]['attachChange']&&!_0x4ee17c['diffData'][_0x3b7bb6]['attachChange']['isAttached'])continue;const _0x49a0cb=this['_removeRevisionMarkers'](JSON['parse'](_0x4ee17c['diffData'][_0x3b7bb6]['insertions'])),_0x48380d=this['editor']['editing']['view']['document'],_0x311d86=new _0x15f8a7(_0x48380d,_0x49a0cb['map'](_0x13f744=>this['_getViewFromDiffObj'](_0x13f744,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x142a0c[_0x3b7bb6]=this['editor']['data']['processor']['toData'](_0x311d86),this['editor']['data']['processor']['useFillerType']('default');}return _0x142a0c;}['getRevisionRootsAttributes'](_0x3beb78){const _0x138f58={};for(const _0x2f4729 in _0x3beb78['diffData'])_0x3beb78['diffData'][_0x2f4729]['attachChange']&&!_0x3beb78['diffData'][_0x2f4729]['attachChange']['isAttached']||(_0x138f58[_0x2f4729]=_0x3beb78['diffData'][_0x2f4729]['attributesAfter']||{});return _0x138f58;}['_getTypeCharForViewElement'](_0x529e1d){return this['_viewClassToTypeChar']['get'](_0x529e1d['constructor']);}['_getViewFromDiffObj'](_0x22d780,_0x49cbd2){const _0x15910a=this['editor']['editing']['view']['document'];if('string'==typeof _0x22d780)return new _0x235f66(_0x15910a,_0x22d780);{let _0x10ef62,_0x292618;_0x292618='u'==_0x22d780['type']||'r'==_0x22d780['type']?[]:_0x22d780['children']['map'](_0x3215f2=>this['_getViewFromDiffObj'](_0x3215f2,_0x49cbd2));const _0x4b9815=this['_typeCharToViewClass']['get'](_0x22d780['type'])||_0x54a0af,_0x183afd=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x10ef62=new _0x4b9815(_0x15910a,_0x22d780['name'],_0x22d780['attributes'],_0x292618),'u'==_0x22d780['type']&&_0x22d780['children'][0x0]){const _0x1d6d34=_0x22d780['children'][0x0];if(_0x10ef62['render']=function(_0x5d02d6){const _0x2ad616=_0x5d02d6['createElement']('div');return _0x2ad616['innerHTML']=_0x1d6d34,_0x2ad616['childNodes'][0x0];},_0x49cbd2){const _0x5902e4=new _0x15f8a7(_0x15910a);_0x5902e4['_appendChild'](_0x10ef62);const _0x593065=Array['from'](_0x183afd['viewChildrenToDom'](_0x5902e4,{'bind':!0x1})),_0x38b20c=_0x183afd['domDocument']['createElement']('div');_0x38b20c['append'](..._0x593065),_0x10ef62=Array['from'](_0x183afd['domChildrenToView'](_0x38b20c))[0x0];}}else{if('r'==_0x22d780['type']&&_0x22d780['children'][0x0]){const _0x1ce5d7=_0x22d780['children'][0x0];if(_0x10ef62['render']=function(_0x112db1){_0x112db1['innerHTML']=_0x1ce5d7;},_0x49cbd2){const _0x164a7f=new _0x15f8a7(_0x15910a);_0x164a7f['_appendChild'](_0x10ef62);const _0x1a80f6=Array['from'](_0x183afd['viewChildrenToDom'](_0x164a7f,{'bind':!0x1})),_0x134040=_0x183afd['domDocument']['createElement']('div');_0x134040['append'](..._0x1a80f6);const _0x1c1408=Array['from'](_0x183afd['domChildrenToView'](_0x134040));_0x1c1408['length']>0x1?_0x10ef62['_appendChild'](_0x1c1408):_0x10ef62=_0x1c1408[0x0];}}}if(_0x22d780['customProperties']){for(const [_0x3c9747,_0x45a60f]of _0x22d780['customProperties'])_0x10ef62['_setCustomProperty'](_0x3c9747,_0x45a60f);}const _0x18b8bd=void 0x0===_0x22d780['fillerOffset']?null:_0x22d780['fillerOffset'];return null!==_0x18b8bd&&(_0x10ef62['getFillerOffset']=()=>_0x18b8bd),_0x10ef62;}}['_makeModelFromViewString'](_0x151249){const _0x47d9ce=JSON['parse'](_0x151249),_0x4f69f5=this['editor']['editing']['view']['document'],_0x310e03=new _0x15f8a7(_0x4f69f5,_0x47d9ce['map'](_0x423530=>this['_getViewFromDiffObj'](_0x423530,!0x0)));return this['editor']['data']['toModel'](_0x310e03);}['_removeRevisionMarkers'](_0x4bed1a){return(_0x4bed1a=_0x4bed1a['filter'](_0x257e10=>!_0x257e10['name']||'revision-start'!==_0x257e10['name']&&'revision-end'!==_0x257e10['name']))['forEach'](_0x56e260=>{'string'!=typeof _0x56e260&&(_0x56e260['children']=this['_removeRevisionMarkers'](_0x56e260['children']),_0x56e260['attributes']=_0x56e260['attributes']['filter'](_0x261e0e=>!_0x261e0e[0x0]['startsWith']('data-revision-')));}),_0x4bed1a;}}function g(_0x106c3c,_0x27086f,_0xc834d3){const t=_0x106c3c['t'];switch(_0x27086f){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'},_0xc834d3);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xc834d3);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class u extends _0x4de1c4{['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[_0x2ad73a,I,V,_0x3c8ad2];}constructor(_0x212223){super(_0x212223),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x4febae=_0xb8234b();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x4febae},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 _0x4e9f32=this['repository']['getRevision'](0x0),_0x4eae96=_0x4e9f32&&null===_0x4e9f32['creator']?_0x4e9f32:null;if(this['_continueCurrentRevision']=!!_0x4eae96&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x599c65=this['_source']['getCurrentRevisionId'](),_0x3a76f3=this['repository']['getRevision'](_0x599c65);if(_0x3a76f3)this['_startingVersion']=_0x3a76f3['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x48f0b9=this['_source']['history']['_operations']['find'](_0x1645b5=>!_0x1645b5['_isInit']),_0x4eae64=_0x48f0b9?_0x48f0b9['baseVersion']:this['_source']['history']['version'];_0x4e9f32?(_0x4e9f32['toVersion']<_0x4eae64&&_0x4e9f32['_update']({'toVersion':_0x4eae64}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x4eae96['id'],this['_startingVersion']=_0x4eae96['fromVersion']):(this['_startingVersion']=_0x4e9f32['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4eae64,this['_continueCurrentRevision']=!0x1);}}else _0x4eae96&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x4eae96['toVersion'],this['editor']['model']['document']['history']['version']),_0x4eae96['fromVersion']===_0x4eae96['toVersion']?(0x0!==_0x4eae96['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x4eae96['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x4eae96['id'],this['_startingVersion']=_0x4eae96['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',_0x51e922=>!_0x51e922),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x47d6d5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2b42d9;for(const _0x23344b in _0x47d6d5){const _0x462ff9=_0x23344b,_0x891108=_0x47d6d5[_0x462ff9];if('revisionHistoryLicenseKeyValid'==_0x891108||'revisionHistoryLicenseKeyInvalid'==_0x891108||'revisionHistoryLicenseKeyExpired'==_0x891108||'revisionHistoryLicenseKeyDomainLimit'==_0x891108||'revisionHistoryLicenseKeyNotAllowed'==_0x891108||'revisionHistoryLicenseKeyEvaluationLimit'==_0x891108||'revisionHistoryLicenseKeyTrialLimit'==_0x891108||'revisionHistoryLicenseKeyUsageLimit'==_0x891108){delete _0x47d6d5[_0x462ff9],_0x2b42d9=_0x891108,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2b42d9&&_0x47d6d5['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2b42d9&&_0x47d6d5['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2b42d9&&_0x47d6d5['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2b42d9&&_0x47d6d5['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2b42d9&&_0x47d6d5['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x2b42d9&&_0x47d6d5['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2b42d9&&_0x47d6d5['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x10aa80=this['repository']['getRevision'](0x0),_0x1c6727=await this['getRevisionDocumentData'](_0x10aa80),_0x5c925e=await this['getRevisionRootsAttributes'](_0x10aa80);this['_replaceEditorDataWithRevisionData'](_0x1c6727,_0x5c925e);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x584ce9){this['_source']=_0x584ce9;}async['update'](){const _0x4d4334=await this['_source']['getLatestVersion']();if(_0x4d4334>this['currentRevision']['toVersion']){await this['_loadState']();const _0x33b107=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4d4334});_0x33b107['authors']=_0x33b107['authorsIds']['map'](_0x13f177=>this['editor']['plugins']['get']('Users')['getUser'](_0x13f177)),this['currentRevision']['_update'](_0x33b107);}}async['saveRevision'](_0x300b9d={},_0x387fa1=null){const _0x628588=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x387fa1>this['currentRevision']['toVersion']&&(_0x387fa1=null),null===_0x387fa1&&(_0x387fa1=await this['_source']['getLatestVersion']());const _0x325e5a=this['_getFromVersion'](_0x387fa1),_0x3ff59f=this['buildRevisionData']({'from':_0x325e5a,'to':_0x387fa1});if(this['currentRevision']['toVersion']<_0x387fa1){const _0x277e1e=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x387fa1,'to':_0x387fa1});_0x277e1e['authors']=[],_0x277e1e['authorsIds']=[],_0x277e1e['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x277e1e,!0x0),delete _0x277e1e['authors'],_0x628588['push'](_0x277e1e);}_0x300b9d['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x300b9d['name']=_0x300b9d['name']||null,_0x300b9d['id']=_0x300b9d['id']||_0xb8234b(),_0x300b9d={..._0x300b9d,..._0x3ff59f};const _0x164934=this['addRevisionData'](_0x300b9d);_0x628588['push'](_0x300b9d);const _0x1d6032=this['repository']['getIndex'](_0x164934);if(0x0!==_0x1d6032){const _0x69dcde=this['repository']['getRevision'](_0x1d6032-0x1);if(_0x69dcde['fromVersion']!==_0x387fa1){const _0x4f1425=this['_revisionDataBuilder']['getData'](_0x387fa1,_0x69dcde['toVersion']),_0xa228ed={'id':_0x69dcde['id'],'diffData':_0x4f1425['diffData'],'authorsIds':_0x4f1425['authorsIds'],'authors':_0x4f1425['authorsIds']['map'](_0x400a79=>this['editor']['plugins']['get']('Users')['getUser'](_0x400a79)),'fromVersion':_0x387fa1};_0x69dcde===this['currentRevision']&&(_0xa228ed['createdAt']=new Date(_0x300b9d['createdAt']['getTime']()+0xa)),_0x69dcde['_update'](_0xa228ed,!0x0),delete _0xa228ed['authors'],_0x628588['push'](_0xa228ed);}}if(this['adapter']){for(const _0x44e77b of _0x628588)this['_bufferUpdate'](_0x44e77b['id'],_0x44e77b,!0x0);this['sendBufferedUpdates']();}return _0x164934;}['addRevisionData'](_0x4291fa){const _0x431b0=this['repository']['createRevision'](_0x4291fa);return this['adapter']&&_0x431b0['on']('_update',(_0x266489,_0x13a35d,_0x18673b)=>{_0x18673b||(this['_bufferUpdate'](_0x13a35d['id'],_0x13a35d,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x431b0,this['_findInsertionIndex'](_0x431b0)),_0x431b0;}async['getRevisionDocumentData'](_0x239a81){return await this['_utils']['loadRevisionData'](_0x239a81,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x239a81);}async['getRevisionRootsAttributes'](_0x3a4282){return await this['_utils']['loadRevisionData'](_0x3a4282,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3a4282);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0xfeea5f=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1ae370=0x0;_0x1ae370<_0xfeea5f['length'];_0x1ae370++){const _0x2d4b3f=_0xfeea5f[_0x1ae370];let _0xf68bec=!0x1;for(const _0x37721e of Object['keys'](_0x2d4b3f))void 0x0===_0x2d4b3f[_0x37721e]?delete _0x2d4b3f[_0x37721e]:'id'!==_0x37721e&&(_0xf68bec=!0x0);_0xf68bec||(_0xfeea5f[_0x1ae370]=null);}if(_0xfeea5f=_0xfeea5f['filter'](_0x54bd04=>null!==_0x54bd04),!_0xfeea5f['length'])return;for(let _0x5d8dbd=0x0;_0x5d8dbd<_0xfeea5f['length'];_0x5d8dbd++){const _0x157d16=_0xfeea5f[_0x5d8dbd];void 0x0!==_0x157d16['fromVersion']&&void 0x0===_0x157d16['toVersion']&&(_0x157d16['toVersion']=this['repository']['getRevision'](_0x157d16['id'])['toVersion']),void 0x0!==_0x157d16['toVersion']&&void 0x0===_0x157d16['fromVersion']&&(_0x157d16['fromVersion']=this['repository']['getRevision'](_0x157d16['id'])['fromVersion']);}const _0x4d05cc=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0xfeea5f,_0x4d05cc)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x205ce9=>{if(_0x205ce9){for(const _0x4b1097 of _0x205ce9)this['setRevisionData']({'id':_0x4b1097['id'],'createdAt':_0x4b1097['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0xc919b3=null,from:_0x27dc09=null,to:_0x8d0d04=null}){_0x27dc09=null!==_0x27dc09?_0x27dc09:_0xc919b3['fromVersion'],_0x8d0d04=null!==_0x8d0d04?_0x8d0d04:_0xc919b3['toVersion'];const _0x37cfbd=this['_revisionDataBuilder']['getData'](_0x27dc09,_0x8d0d04),_0xefade9={'diffData':_0x37cfbd['diffData'],'authorsIds':_0x37cfbd['authorsIds'],'fromVersion':_0x27dc09,'toVersion':_0x8d0d04};if(!_0xc919b3||_0x8d0d04!==_0xc919b3['toVersion']){const _0x651d9b=_0x8d0d04-0x1,_0xc81771=this['_source']['history']['getOperation'](_0x651d9b);_0xefade9['createdAt']=_0xc81771&&_0xc81771['createdAt']||new Date();}if(this['_loadedStateData']&&_0x27dc09===this['_loadedStateData']['fromVersion']){for(const _0x5cdcfb of this['_loadedStateData']['authors'])_0xefade9['authorsIds']['includes'](_0x5cdcfb['id'])||_0xefade9['authorsIds']['push'](_0x5cdcfb['id']);}return _0xefade9;}['_bufferUpdate'](_0x29f77e,_0x4843d3,_0x1e6f10){if(this['_bufferedUpdates']['has'](_0x29f77e)){const _0x2df8e7=this['_bufferedUpdates']['get'](_0x29f77e);_0x4843d3=_0x1e6f10?{..._0x2df8e7,..._0x4843d3}:{..._0x4843d3,..._0x2df8e7};}this['_bufferedUpdates']['set'](_0x29f77e,_0x4843d3);}['setRevisionData'](_0x504721){const _0x4771a8=this['repository']['getRevision'](_0x504721['id']);if(_0x504721['createdAt']&&(_0x504721['createdAt']=new Date(_0x504721['createdAt'])),_0x504721['authorsIds']){const _0x5e45e0=this['editor']['plugins']['get']('Users');_0x504721['authors']=_0x504721['authorsIds']['map'](_0x4c7b00=>_0x5e45e0['getUser'](_0x4c7b00));}_0x4771a8['_update'](_0x504721,!0x0);}['_createInitialRevision'](_0x58bedc){const _0x58a7e5=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x58a7e5)this['_initialRevisionId']=_0x58a7e5['id'];else{const _0xfe91aa=!this['editor']['model']['document']['roots']['find'](_0x1e83a5=>this['editor']['model']['hasContent'](_0x1e83a5)),_0x4dda6b=this['editor']['plugins']['get']('Users')['me']['id'],_0x14a91c=g(this['editor']['locale'],_0xfe91aa?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x58bedc,'to':_0x58bedc,'id':this['_initialRevisionId'],'name':_0x14a91c,'creatorId':_0x4dda6b});}}['_createCurrentRevision'](_0x7bc779){const _0x3a0dbb=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x3a0dbb),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x7bc779,'to':_0x7bc779,'id':_0x3a0dbb,'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'](_0x1cc940,_0x1774da){let _0xd36236=this['editor']['config']['get']('initialData'),_0x536b5f=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0xd36236){_0xd36236={};for(const _0x25d12e of this['editor']['model']['document']['getRootNames']())_0xd36236[_0x25d12e]='';}if('string'==typeof _0xd36236&&(_0xd36236={'main':_0xd36236}),void 0x0===_0x536b5f){_0x536b5f={};for(const _0x3f9c5e of this['editor']['model']['document']['getRootNames']())_0x536b5f[_0x3f9c5e]={};}let _0xf51b=!0x1;const _0x469e2c=Object['keys'](_0xd36236),_0x1bb6c7=Object['keys'](_0x1cc940);for(const _0x3a38ec of _0x469e2c){if(_0xd36236[_0x3a38ec]!==_0x1cc940[_0x3a38ec]&&''!==_0xd36236[_0x3a38ec]['trim']()){_0xf51b=!0x0;break;}if(!_0x44e39c(_0x536b5f[_0x3a38ec],_0x1774da[_0x3a38ec])&&Object['keys'](_0x536b5f[_0x3a38ec])['length']>0x0){_0xf51b=!0x0;break;}}_0xf51b||(_0xf51b=_0x1bb6c7['some'](_0x7598ba=>!this['editor']['model']['document']['getRoot'](_0x7598ba))),_0xf51b&&_0x1bc517('editor-initial-data-replaced-with-revision-data',{'editorData':_0xd36236,'editorRootsAttributes':_0x536b5f,'revisionData':_0x1cc940,'revisionRootsAttributes':_0x1774da}),this['editor']['config']['set']('initialData',_0x1cc940),this['editor']['config']['set']('rootsAttributes',_0x1774da);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x553b04=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x553b04['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x272996){const _0x5031a2=this['repository']['getRevisions']();_0x5031a2['reverse']();let _0x35a39f=0x0;for(;_0x35a39f<_0x5031a2['length'];){const _0x2be81c=_0x5031a2[_0x35a39f];if(_0x2be81c===this['currentRevision']){_0x35a39f++;continue;}if(_0x2be81c['id']===this['_initialRevisionId'])break;const _0x4dd911=_0x272996['toVersion']-_0x2be81c['toVersion']||_0x272996['fromVersion']-_0x2be81c['fromVersion'];if(_0x4dd911>0x0)break;if(_0x4dd911<0x0)_0x35a39f++;else{if(!_0x272996['creator']&&_0x2be81c['creator'])break;if(_0x2be81c['creator']||!_0x272996['creator']){if(_0x272996['createdAt']>_0x2be81c['createdAt'])break;_0x35a39f++;}else _0x35a39f++;}}return _0x35a39f;}['_getFromVersion'](_0x58a25b){const _0x18915d=this['repository']['getRevisions']();_0x18915d['reverse'](),_0x18915d['shift']();const _0x7f172b=_0x18915d['find'](_0x1fa574=>_0x1fa574['toVersion']<=_0x58a25b)['toVersion'];return _0x7f172b<this['_startingVersion']?this['_startingVersion']:_0x7f172b;}['_makeRevision']({name:_0x46f3db,from:_0x1c53dd,to:_0x3aea09,creatorId:_0x4e993f,id:_0x20285a}){const _0x2ed50e=this['buildRevisionData']({'from':_0x1c53dd,'to':_0x3aea09});_0x2ed50e['name']=_0x46f3db,_0x2ed50e['creatorId']=_0x4e993f,_0x2ed50e['id']=_0x20285a;const _0x3afb31=this['addRevisionData'](_0x2ed50e);return this['adapter']&&this['_bufferUpdate'](_0x2ed50e['id'],_0x2ed50e,!0x0),_0x3afb31;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x3484da){this['editor']=_0x3484da,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'](_0x13f3fb){this['source']=_0x13f3fb;const _0x4257b5=new Map(),_0x3c27bb=new Map(),_0x16e692=this['editor']['model']['document']['roots']['map'](_0x395e79=>_0x395e79['rootName']);for(const _0x4fa90f of _0x16e692){const _0x5d12c8=this['editor']['model']['document']['getRoot'](_0x4fa90f),_0x2fca2f=N(_0x5d12c8);_0x4257b5['set'](_0x4fa90f,_0x2fca2f),_0x3c27bb['set'](_0x4fa90f,Object['fromEntries'](_0x5d12c8['getAttributes']()));}const _0x362dff=Array['from'](this['editor']['model']['markers'])['map'](_0x443571=>[_0x443571['name'],_0x443571['getRange']()]),_0x5bd785=this['source']['version'];this['_saveMetaData'](_0x5bd785,_0x4257b5,_0x362dff,_0x3c27bb),this['_startingRevisionId']=this['_revisionId'];const _0x4b7eeb=new Map(),_0x155737=new Map();for(const _0x246771 of _0x16e692){const _0xda52f0=P(_0x246771);_0x4b7eeb['set'](_0x246771,_0xda52f0),_0x155737['set'](_0x246771,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x4b7eeb,[],_0x155737);}['getData'](_0x29379d,_0x78f4b8){if(this['_lastFrom']===_0x29379d&&this['_lastTo']<=_0x78f4b8)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x78f4b8,!0x0);else{if(!this['_savedMetaData']['has'](_0x29379d)){const _0x5476a4=this['_getPreviousFrom'](_0x29379d);this['_calculateMetaData'](_0x5476a4,_0x29379d,!0x1);}this['_calculateMetaData'](_0x29379d,_0x78f4b8,!0x0);}return this['_lastFrom']=_0x29379d,this['_lastTo']=_0x78f4b8,this['_getState']();}['loadState'](_0x1ad685){const _0xe2bc47=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x1ad685['fromVersion'],this['_lastTo']=_0x1ad685['toVersion'];for(const _0x2b5a5e in _0x1ad685['diffData']){const _0xb0d6eb=_0x1ad685['diffData'][_0x2b5a5e]['attachChange'],_0x5973b4=_0x7e9748(_0x1ad685['diffData'][_0x2b5a5e]['attributesBefore'])||{},_0x177b44=_0xe2bc47['_makeModelFromViewString'](_0x1ad685['diffData'][_0x2b5a5e]['deletions']);_0x177b44['rootName']=_0x2b5a5e,_0x177b44['_isAttached']=!_0xb0d6eb||!_0xb0d6eb['isAttached'],_0x177b44['isAttached']=()=>_0x177b44['_isAttached'],this['_baseRoots']['set'](_0x2b5a5e,_0x177b44),this['_baseRootsAttributes']['set'](_0x2b5a5e,_0x5973b4),_0xb0d6eb&&this['_touchedRoots']['set'](_0x2b5a5e,_0xb0d6eb);const _0x3a3609=this['_makeIdsRoot'](_0x177b44);this['_baseIdsRoots']['set'](_0x2b5a5e,_0x3a3609);for(const [_0x411faf,_0x2c8a96]of _0x177b44['markers']){if(!_0x411faf['startsWith']('revision:'))continue;const _0x3b48b5=_0x411faf['split'](':')[0x2];for(const _0x1a425a of _0x2c8a96['getWalker']({'singleCharacters':!0x0})){const _0x4b8de8=this['_getVidAttributeName'](_0x1a425a),_0x191a5f='elementEnd'==_0x1a425a['type']?_0x1a425a['previousPosition']['path']['slice'](0x0,-0x1):_0x1a425a['previousPosition']['path'],_0x11ede6=_0x3a3609['getNodeByPath'](_0x191a5f)['getAttribute'](_0x4b8de8);this['_touched']['set'](_0x11ede6,{'userId':_0x3b48b5});}}}this['_startingRevisionId']=this['_revisionId'];const _0x59d881=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x31a3c0=>!this['_touched']['has'](_0x31a3c0));let _0x4d943e=0x0;const _0x53433b=new Map();for(const _0x3d2787 in _0x1ad685['diffData']){const _0x2d6eaa=_0x1ad685['diffData'][_0x3d2787]['attachChange'],_0x209b78=_0x7e9748(_0x1ad685['diffData'][_0x3d2787]['attributesAfter'])||{},_0x454c43=_0xe2bc47['_makeModelFromViewString'](_0x1ad685['diffData'][_0x3d2787]['insertions']);_0x454c43['rootName']=_0x3d2787,_0x454c43['_isAttached']=!_0x2d6eaa||_0x2d6eaa['isAttached'],_0x454c43['isAttached']=()=>_0x454c43['_isAttached'],this['_diffRoots']['set'](_0x3d2787,_0x454c43),this['_diffRootsAttributes']['set'](_0x3d2787,_0x209b78);const _0x1243b4=this['_makeIdsRoot'](_0x454c43,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x3d2787,_0x1243b4),_0x53433b['set'](_0x3d2787,_0x454c43['isAttached']()?_0x209b78:{});for(const [_0x3ddec0,_0x527dba]of _0x454c43['markers']){if(!_0x3ddec0['startsWith']('revision:'))continue;const _0xe3d5ae=_0x3ddec0['split'](':')[0x2];for(const _0x55c8a7 of _0x527dba['getWalker']({'singleCharacters':!0x0})){const _0x3f8b6b=this['_getVidAttributeName'](_0x55c8a7),_0x586f8f=this['_revisionId']++,_0x349670='elementEnd'==_0x55c8a7['type']?_0x55c8a7['previousPosition']['path']['slice'](0x0,-0x1):_0x55c8a7['previousPosition']['path'];_0x1243b4['getNodeByPath'](_0x349670)['_setAttribute'](_0x3f8b6b,_0x586f8f),this['_touched']['set'](_0x586f8f,{'userId':_0xe3d5ae});}}for(const _0x2b1a09 of this['editor']['model']['createRangeIn'](_0x454c43)['getWalker']({'singleCharacters':!0x0})){const _0x57cbff=this['_getVidAttributeName'](_0x2b1a09),_0x1f2c1e='elementEnd'==_0x2b1a09['type']?_0x2b1a09['previousPosition']['path']['slice'](0x0,-0x1):_0x2b1a09['previousPosition']['path'],_0x1da778=_0x1243b4['getNodeByPath'](_0x1f2c1e);_0x1da778['getAttribute'](_0x57cbff)>0x0||_0x1da778['_setAttribute'](_0x57cbff,_0x59d881[_0x4d943e++]);}for(const [_0x585042,_0x414a5d]of _0x454c43['markers'])_0x585042['startsWith']('revision:')||this['_markers']['set'](_0x585042,_0x414a5d);}const _0x298293=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x298293),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x298293,0x1));const _0x37ceb6=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x37ceb6),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x37ceb6,0x1));const _0x273efe=Array['from'](this['_diffRoots'])['map'](([_0x51f405,_0x30ac7c])=>[_0x51f405,N(_0x30ac7c)]);this['_saveMetaData'](this['_lastTo'],_0x273efe,this['_markers'],_0x53433b);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x52733c,_0x3f97e5,_0x206023,_0x3c2c0c){const _0x49c35c=new Map(_0x3f97e5),_0x55e8bb=new Map(_0x7e9748(_0x3c2c0c)),_0x282d45=new Map();for(const [_0x1b937e,_0x581bb9]of _0x206023)_0x282d45['set'](_0x1b937e,{'start':_0x581bb9['start']['clone'](),'end':_0x581bb9['end']['clone'](),'rootName':_0x581bb9['root']['rootName']});this['_savedMetaData']['set'](_0x52733c,{'roots':_0x49c35c,'markers':_0x282d45,'rootsAttributes':_0x55e8bb});}['_removeMetaData'](_0x59f191){this['_savedMetaData']['delete'](_0x59f191);}['_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'](_0xd708ed,_0x19d387=null){let _0x4af5bc=null;_0xd708ed['is']('documentFragment')||(_0x4af5bc=new ut(_0xd708ed['name'],{'vid_start':null===_0x19d387?this['_revisionId']++:_0x19d387++}));const _0x1d55f1=[];for(const _0x365624 of _0xd708ed['getChildren']())if(_0x365624['is']('element')){_0x1d55f1['push'](this['_makeIdsRoot'](_0x365624,_0x19d387));const _0x4d37c3=_0x1d55f1[_0x1d55f1['length']-0x1];null!==_0x19d387&&(_0x19d387=_0x4d37c3['is']('element','$text')?_0x4d37c3['getAttribute']('vid')+0x1:_0x4d37c3['getAttribute']('vid_end')+0x1);}else{for(let _0x76c3ed=0x0;_0x76c3ed<_0x365624['offsetSize'];_0x76c3ed++)_0x1d55f1['push'](new ut('$text',{'vid':null===_0x19d387?this['_revisionId']++:_0x19d387++}));}if(_0xd708ed['is']('documentFragment')){const _0x120e74=P(_0xd708ed['rootName']);return _0x120e74['_insertChild'](0x0,_0x1d55f1),_0x120e74;}return _0x4af5bc['_setAttribute']('vid_end',null===_0x19d387?this['_revisionId']++:_0x19d387++),_0x4af5bc['_insertChild'](0x0,_0x1d55f1),_0x4af5bc;}['_calculateMetaData'](_0x6806c9,_0x4995b8,_0x5c0f97){this['_reset']();const {roots:_0x368b67,markers:_0x21577d,rootsAttributes:_0x22e38d}=this['_savedMetaData']['get'](_0x6806c9);this['_baseRoots']=new Map(_0x368b67),this['_baseRootsAttributes']=new Map(_0x7e9748(_0x22e38d));for(const [_0x3f84b0,_0x1178aa]of this['_baseRoots'])if('$graveyard'!==_0x3f84b0&&(this['_diffRoots']['set'](_0x3f84b0,N(_0x1178aa)),this['_diffRootsAttributes']=new Map(_0x7e9748(_0x22e38d)),_0x5c0f97)){const _0x43e2ae=this['_revisionId'];this['_idsRoots']['set'](_0x3f84b0,this['_makeIdsRoot'](_0x1178aa)),this['_baseIdsRoots']['set'](_0x3f84b0,this['_makeIdsRoot'](_0x1178aa,_0x43e2ae));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x5c0f97&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2b3513,_0x207830]of _0x21577d){const _0x43c8f4=this['_baseRoots']['get'](_0x207830['rootName']),_0x435109=this['_diffRoots']['get'](_0x207830['rootName']),_0x1c0dab=new ft(this['_fixPosition'](_0x207830['start'],_0x43c8f4),this['_fixPosition'](_0x207830['end'],_0x43c8f4)),_0x5c3eab=this['_fixRange'](_0x1c0dab,_0x435109);_0x43c8f4['markers']['set'](_0x2b3513,_0x1c0dab),this['_markers']['set'](_0x2b3513,_0x5c3eab);}this['_applyOperations'](_0x6806c9,_0x4995b8,_0x5c0f97);}['_applyOperations'](_0x4774f3,_0x309426,_0x791bf5){for(const _0x28d08a of this['source']['getOperations'](_0x4774f3,_0x309426))this['_handleOperation'](_0x28d08a,_0x791bf5);for(const _0xb4303d of this['_diffRoots']['values']())_0xb4303d['markers']['clear']();for(const [_0x5e411d,_0x21603a]of this['_markers']){this['_diffRoots']['get'](_0x21603a['root']['rootName'])['markers']['set'](_0x5e411d,_0x21603a['clone']());}const _0x369630=new Map(),_0x5f8da1=new Map();for(const [_0x7de0e1,_0x1030e4]of this['_diffRoots'])_0x369630['set'](_0x7de0e1,N(_0x1030e4)),_0x5f8da1['set'](_0x7de0e1,this['_diffRootsAttributes']['get'](_0x7de0e1));this['_saveMetaData'](_0x309426,_0x369630,this['_markers'],_0x5f8da1);}['_getPreviousFrom'](_0x2dcfd1){const _0x410375=Array['from'](this['_savedMetaData']['keys']());_0x410375['sort']((_0x59cc0f,_0x28090b)=>_0x59cc0f-_0x28090b),_0x410375['reverse']();for(const _0x5b4e8c of _0x410375)if(_0x5b4e8c<_0x2dcfd1)return _0x5b4e8c;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1c2b0a,_0x2388b6){const _0x1d9f6a=Array['from'](_0x2388b6['markers'])['map'](([_0x5b5a21,_0x34e9b3])=>[_0x5b5a21,this['_fixRange'](_0x34e9b3,_0x1c2b0a)]);_0x1c2b0a['markers']=new Map(_0x1d9f6a);}['_transformMarkers'](_0x5b1e3a){for(const _0x375a6b of this['_markers']['values']()){const _0x400dbb=_0x375a6b['getTransformedByOperation'](_0x5b1e3a),_0x1adb43=ft['_createFromRanges'](_0x400dbb);_0x375a6b['start']=_0x1adb43['start'],_0x375a6b['end']=_0x1adb43['end'];}}['_handleOperation'](_0x3f57a3,_0x53286a){if('addRoot'!=_0x3f57a3['type']&&'detachRoot'!=_0x3f57a3['type']){if('insert'==_0x3f57a3['type']){const _0x412556=_0x3f57a3['position']['root']['rootName'];this['_diffRoots']['has'](_0x412556)||(this['_diffRoots']['set'](_0x412556,P(_0x412556,!0x0)),this['_diffRootsAttributes']['set'](_0x412556,{}),_0x53286a&&this['_idsRoots']['set'](_0x412556,P(_0x412556,!0x0)));}else{if('addRootAttribute'==_0x3f57a3['type']||'removeRootAttribute'==_0x3f57a3['type']||'changeRootAttribute'==_0x3f57a3['type'])return void this['_handleRootAttributeOperation'](_0x3f57a3);'marker'==_0x3f57a3['type']&&this['_handleMarkerOperation'](_0x3f57a3);}if('marker'!==_0x3f57a3['type']){const _0x33432f=this['_cloneOperation'](_0x3f57a3,this['_diffRoots']);_0x33432f['_execute'](),this['_transformMarkers'](_0x33432f);}if(_0x53286a)switch(_0x3f57a3['type']){case'insert':this['_handleInsertOperation'](_0x3f57a3);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x3f57a3);break;case'merge':this['_handleMergeOperation'](_0x3f57a3);break;case'split':this['_handleSplitOperation'](_0x3f57a3);}}else this['_handleRootOperation'](_0x3f57a3,_0x53286a);}['_cloneOperation'](_0x107166,_0x4f3fda){const _0x9167d3=_0x107166['clone']();return _0x9167d3['_authorId']=_0x107166['_authorId'],this['_fixOperation'](_0x9167d3,_0x4f3fda),_0x9167d3;}['_getBaseVids'](_0x3853e0){return _0x3853e0['map'](_0x2b3552=>{const _0x7a6eb5=this['_getVidAttributeName'](_0x2b3552);return Number(_0x2b3552['item']['getAttribute'](_0x7a6eb5));});}['_generateTape'](_0x2d1dbc,_0x45f6e0){if(_0x2d1dbc['is']('element','$text'))_0x45f6e0['push']({'item':_0x2d1dbc,'type':'text'});else{_0x2d1dbc['is']('element')&&_0x45f6e0['push']({'item':_0x2d1dbc,'type':'elementStart'});for(const _0x28deed of _0x2d1dbc['getChildren']())this['_generateTape'](_0x28deed,_0x45f6e0);_0x2d1dbc['is']('element')&&_0x45f6e0['push']({'item':_0x2d1dbc,'type':'elementEnd'});}return _0x45f6e0;}['_getState'](){const _0x3d6c35=new Map(this['_touched']),_0x393e99=new Map(_0x3d6c35),_0x4c6c2c=new Map(),_0x56ddcc={'insertions':{},'deletions':{}},_0x545298={'insertions':{},'deletions':{}},_0xa19295=new Map(),_0x58c972=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x58c972['delete']('$graveyard');for(const _0x374382 of _0x58c972){const _0x1a5dd7=this['_diffRoots']['get'](_0x374382)||P(_0x374382,!0x1),_0x191165=this['_baseRoots']['get'](_0x374382)||P(_0x374382,!0x1);_0x1a5dd7['isAttached']()||_0x191165['isAttached']()?(_0x56ddcc['insertions'][_0x374382]=N(_0x1a5dd7),_0x56ddcc['deletions'][_0x374382]=N(_0x191165),this['_copyMarkers'](_0x56ddcc['deletions'][_0x374382],_0x191165),this['_copyMarkers'](_0x56ddcc['insertions'][_0x374382],_0x1a5dd7),_0x545298['insertions'][_0x374382]=this['_generateTape'](this['_idsRoots']['get'](_0x374382),[]),_0x545298['deletions'][_0x374382]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x374382)||P(_0x374382,!0x1),[])):_0x58c972['delete'](_0x374382);}for(const _0x33cfe1 of _0x58c972){const _0x53508f=_0x545298['insertions'][_0x33cfe1];for(const _0x1e6ba8 of _0x53508f){const _0x5188ec=this['_getVidAttributeName'](_0x1e6ba8),_0x2aa2d7=_0x1e6ba8['item']['getAttribute'](_0x5188ec);_0x393e99['delete'](_0x2aa2d7),_0x2aa2d7>=this['_startingRevisionId']&&_0x4c6c2c['set'](_0x2aa2d7,_0x3d6c35['get'](_0x2aa2d7));}}for(const _0x624444 of _0x58c972){const _0x489d36=_0x545298['insertions'][_0x624444],_0x59229a=this['_getBaseVids'](_0x545298['deletions'][_0x624444]);let _0x435ae7=0x0;for(const _0x125e9f of _0x489d36){const _0x5626a7=this['_getVidAttributeName'](_0x125e9f),_0x53a72e=_0x125e9f['item']['getAttribute'](_0x5626a7);if(!_0x4c6c2c['has'](_0x53a72e)&&!_0xa19295['has'](_0x53a72e)){if(_0x393e99['has'](_0x53a72e))_0x435ae7++;else{if(_0x53a72e!=_0x59229a[_0x435ae7]){const _0x5a7fa1=_0x3d6c35['get'](_0x53a72e)||_0x3d6c35['get'](_0x59229a[_0x435ae7]);for(;_0x53a72e!=_0x59229a[_0x435ae7];)_0x393e99['has'](_0x59229a[_0x435ae7])||(_0xa19295['set'](_0x59229a[_0x435ae7],_0x5a7fa1),_0x3d6c35['set'](_0x59229a[_0x435ae7],_0x5a7fa1)),_0x435ae7++;}_0x435ae7++;}}}}for(const _0x14ace5 of _0x58c972){const _0x53a0d7=_0x545298['insertions'][_0x14ace5];for(const _0x55964f of _0x53a0d7){const _0x13709a=this['_getVidAttributeName'](_0x55964f),_0x284d48=_0x55964f['item']['getAttribute'](_0x13709a);if(_0xa19295['has'](_0x284d48)){const _0x4dcf27=_0xa19295['get'](_0x284d48);_0x393e99['has'](_0x284d48)||_0x393e99['set'](_0x284d48,{..._0x4dcf27}),_0x4c6c2c['set'](_0x284d48,{..._0x4dcf27});}}}for(const _0x1cb7c6 of _0x393e99['keys']())_0x1cb7c6>=this['_startingRevisionId']&&_0x393e99['delete'](_0x1cb7c6);const _0x5c6d8b=new Map();for(const _0x28796b of _0x58c972){let _0x506c22=_0x545298['insertions'][_0x28796b];for(const _0x58010f of _0x506c22)if(_0x58010f['item']['is']('element','tableCell')){const _0x5e1884=this['_getVidAttributeName'](_0x58010f),_0x31ed9e=_0x58010f['item']['getAttribute'](_0x5e1884);if(_0x4c6c2c['has'](_0x31ed9e)){const _0x275636=_0x58010f['item']['parent']['parent']['getAttribute']('vid_start'),_0x2fdb91=_0x5c6d8b['get'](_0x275636)||new Set();_0x2fdb91['add'](_0x4c6c2c['get'](_0x31ed9e)['userId']),_0x5c6d8b['set'](_0x275636,_0x2fdb91);}}_0x506c22=_0x545298['deletions'][_0x28796b];for(const _0x3afad6 of _0x506c22)if(_0x3afad6['item']['is']('element','tableCell')){const _0x2d56c9=this['_getVidAttributeName'](_0x3afad6),_0x3f4624=_0x3afad6['item']['getAttribute'](_0x2d56c9);if(_0x393e99['has'](_0x3f4624)){const _0x4e742a=_0x3afad6['item']['parent']['parent']['getAttribute']('vid_start'),_0x5220c4=_0x5c6d8b['get'](_0x4e742a)||new Set();_0x5220c4['add'](_0x393e99['get'](_0x3f4624)['userId']),_0x5c6d8b['set'](_0x4e742a,_0x5220c4);}}for(const _0x11f653 of _0x5c6d8b['keys']())(_0x4c6c2c['has'](_0x11f653)||_0x393e99['has'](_0x11f653))&&_0x5c6d8b['delete'](_0x11f653);}for(const _0x188f90 of _0x58c972){const _0x3731e4=_0x545298['insertions'][_0x188f90];let _0x3b9f2b=null,_0x11cc04=null;for(const _0x47343b of _0x3731e4){const _0x4ac56d=this['_getVidAttributeName'](_0x47343b),_0x254dcc=_0x47343b['item']['getAttribute'](_0x4ac56d),_0x1a1208=_0x5c6d8b['get'](_0x254dcc);_0x1a1208&&'elementStart'==_0x47343b['type']&&(_0x3b9f2b=Array['from'](_0x1a1208)[0x0],_0x11cc04=_0x47343b['item']['getAttribute']('vid_end')),_0x3b9f2b&&(_0x393e99['set'](_0x254dcc,{'userId':_0x3b9f2b}),_0x4c6c2c['set'](_0x254dcc,{'userId':_0x3b9f2b})),_0x254dcc==_0x11cc04&&(_0x3b9f2b=null,_0x11cc04=null);}}const _0x591b83={},_0x241122=new Set();for(const _0x4e5631 of _0x58c972){const _0x552219=_0x56ddcc['deletions'][_0x4e5631],_0x249390=_0x56ddcc['insertions'][_0x4e5631];for(const {userId:_0x3f12ad}of this['_touchedMarkers']['values']())null!==_0x3f12ad&&_0x241122['add'](_0x3f12ad);for(const {userId:_0x43737f}of this['_touchedRoots']['values']())null!==_0x43737f&&_0x241122['add'](_0x43737f);this['_markChanges'](_0x249390,_0x545298['insertions'][_0x4e5631],_0x4c6c2c,'insertion',_0x241122),this['_markChanges'](_0x552219,_0x545298['deletions'][_0x4e5631],_0x393e99,'deletion',_0x241122),_0x591b83[_0x4e5631]={'insertions':this['_prepareViewToSave'](_0x249390),'deletions':this['_prepareViewToSave'](_0x552219),'attachChange':this['_touchedRoots']['get'](_0x4e5631)||null,'attributesBefore':_0x7e9748(this['_baseRootsAttributes']['get'](_0x4e5631))||{},'attributesAfter':_0x7e9748(this['_diffRootsAttributes']['get'](_0x4e5631))};}return{'diffData':_0x591b83,'authorsIds':Array['from'](_0x241122)};}['_processRootBeforeSave'](_0x10e25b){for(const [,_0x152998]of _0x10e25b['markers']){const _0x50b7f4=_0x152998['start']['getAncestors']()['filter'](_0x113dc3=>'tableCell'==_0x113dc3['name']);for(const _0x5a648d of _0x50b7f4)0x1==_0x5a648d['childCount']&&_0x5a648d['getChild'](0x0)['is']('element','paragraph')&&_0x5a648d['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4f95ea){this['_processRootBeforeSave'](_0x4f95ea);const _0x303e6a=this['editor']['data']['toView'](_0x4f95ea,{}),_0x273487=Array['from'](_0x303e6a['getChildren']())['map'](_0x5866c0=>this['_getViewJson'](_0x5866c0));return JSON['stringify'](_0x273487);}['_getViewJson'](_0xf4e103){if(_0xf4e103['is']('$text'))return _0xf4e103['data'];{const _0x2e6ecd=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x39c38b=_0xf4e103,_0x4a1906=this['editor']['data']['htmlProcessor']['domConverter'],_0x17f15f={'type':_0x2e6ecd['_getTypeCharForViewElement'](_0x39c38b),'name':_0x39c38b['name'],'attributes':Array['from'](_0x39c38b['getAttributes']()),'children':Array['from'](_0x39c38b['getChildren']())['map'](_0x4f771d=>this['_getViewJson'](_0x4f771d))};if(_0xf4e103['is']('uiElement')&&'$comment'!=_0xf4e103['name']){const _0x477caa=_0xf4e103['render'](_0x4a1906['domDocument'],_0x4a1906);_0x17f15f['children']['push'](_0x477caa['outerHTML']);}else{if(_0xf4e103['is']('rawElement')){const _0x2c0ec6=_0x4a1906['domDocument']['createElement'](_0x39c38b['name']);_0xf4e103['render'](_0x2c0ec6,_0x4a1906),_0x17f15f['children']['push'](_0x2c0ec6['innerHTML']);}}const _0xa684c3=Array['from'](_0x39c38b['getCustomProperties']());_0xa684c3['length']>0x0&&(_0x17f15f['customProperties']=_0xa684c3);const _0x2e105c=_0x39c38b['getFillerOffset']();return null!==_0x2e105c&&(_0x17f15f['fillerOffset']=_0x2e105c),_0x17f15f;}}['_markChanges'](_0x1d534b,_0x23beb2,_0x130c69,_0x4a2265,_0x5cc4a9){let _0x459721=null,_0x60795c=null,_0x4f05ad=0x0;const _0x1e784e=this['editor']['model'];for(let _0x5ec434=0x0;_0x5ec434<_0x23beb2['length'];_0x5ec434++){const _0x1ac3d3=this['_getVidAttributeName'](_0x23beb2[_0x5ec434]),_0x3ff4f0=_0x23beb2[_0x5ec434]['item']['getAttribute'](_0x1ac3d3),_0x1c178e=_0x130c69['get'](_0x3ff4f0),_0x418351=_0x5ec434==_0x23beb2['length']-0x1;(!_0x459721&&_0x1c178e&&(_0x459721=_0x1c178e,_0x60795c=_0x23beb2[_0x5ec434]),_0x459721&&(!_0x1c178e||_0x1c178e['userId']!=_0x459721['userId']))&&(_0x3e5c88(_0x1c178e,F(_0x60795c,_0x1d534b,_0x1e784e),F(_0x23beb2[_0x5ec434],_0x1d534b,_0x1e784e)),_0x459721=_0x1c178e||null,_0x60795c=_0x1c178e?_0x23beb2[_0x5ec434]:null),_0x459721&&_0x418351&&_0x3e5c88(_0x1c178e,F(_0x60795c,_0x1d534b,_0x1e784e),B(_0x23beb2[_0x5ec434],_0x1d534b,_0x1e784e));}function _0x3e5c88(_0x58d420,_0x5b1dc5,_0x129ae5){const _0x3e6213=_0x459721['userId'],_0x3b148d='revision:'+_0x4a2265+':'+_0x3e6213+':'+_0x4f05ad++,_0xedba0=_0x1e784e['createRange'](_0x5b1dc5,_0x129ae5);_0x1d534b['markers']['set'](_0x3b148d,_0xedba0),null!==_0x3e6213&&_0x5cc4a9['add'](_0x3e6213);}}['_getVidAttributeName'](_0x1d7929){switch(_0x1d7929['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x4a98dd,_0x292c4c){_0x4a98dd['baseVersion']=null;for(const _0x2f96f3 in _0x4a98dd){const _0x58ae37=_0x4a98dd[_0x2f96f3];if(_0x58ae37 instanceof vt){const _0x13c399=_0x292c4c['get'](_0x58ae37['root']['rootName']);_0x4a98dd[_0x2f96f3]=this['_fixPosition'](_0x58ae37,_0x13c399);}if(_0x58ae37 instanceof ft){const _0x40d178=_0x292c4c['get'](_0x58ae37['root']['rootName']);_0x4a98dd[_0x2f96f3]=this['_fixRange'](_0x58ae37,_0x40d178);}'root'===_0x2f96f3&&(_0x4a98dd['root']=_0x292c4c['get'](_0x4a98dd['root']['rootName']));}}['_fixRange'](_0x1c7d51,_0x5a12ed){return this['editor']['model']['createRange'](this['_fixPosition'](_0x1c7d51['start'],_0x5a12ed),this['_fixPosition'](_0x1c7d51['end'],_0x5a12ed));}['_fixPosition'](_0x1f16ca,_0x207b45){return this['editor']['model']['createPositionFromPath'](_0x207b45,_0x1f16ca['path'],_0x1f16ca['stickiness']);}['_handleInsertOperation'](_0x575e48){const _0x2aaa52=this['_idsRoots']['get'](_0x575e48['position']['root']['rootName']),_0x46bab8=this['_fixPosition'](_0x575e48['position'],_0x2aaa52),_0xbe595f=null===_0x575e48['_authorId']?null:_0x575e48['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x283c15=_0x46bab8['parent'],_0x20f15d=this['_revisionId'],_0x2d05ec=[];for(const _0xb4f3cb of _0x575e48['nodes'])if(_0xb4f3cb['is']('element'))_0x2d05ec['push'](this['_makeIdsRoot'](_0xb4f3cb));else{for(let _0x19d53f=0x0;_0x19d53f<_0xb4f3cb['offsetSize'];_0x19d53f++)_0x2d05ec['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x4e9208=this['_revisionId'];for(let _0x58b10e=_0x20f15d;_0x58b10e<_0x4e9208;_0x58b10e++)this['_touched']['set'](_0x58b10e,{'userId':_0xbe595f});_0x283c15['_insertChild'](_0x46bab8['offset'],_0x2d05ec);}['_handleMoveOperation'](_0x21adef){(_0x21adef=this['_cloneOperation'](_0x21adef,this['_idsRoots']))['_execute']();const _0x531d9f=null===_0x21adef['_authorId']?null:_0x21adef['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x508f31=_0x21adef['getMovedRangeStart'](),_0x38cc8b=_0x508f31['parent'],_0x21e464=_0x508f31['offset'];!function _0xb32fb1(_0x22cfd0,_0x584054,_0x20ab95,_0x528018){for(let _0x362aba=_0x20ab95;_0x362aba<_0x528018;_0x362aba++){const _0x24a04f=_0x584054['getChild'](_0x362aba);_0x24a04f['is']('element','$text')?_0x22cfd0['set'](_0x24a04f['getAttribute']('vid'),{'userId':_0x531d9f}):(_0x22cfd0['set'](_0x24a04f['getAttribute']('vid_start'),{'userId':_0x531d9f}),_0xb32fb1(_0x22cfd0,_0x24a04f,0x0,_0x24a04f['childCount']),_0x22cfd0['set'](_0x24a04f['getAttribute']('vid_end'),{'userId':_0x531d9f}));}}(this['_touched'],_0x38cc8b,_0x21e464,_0x21e464+_0x21adef['howMany']);}['_handleMergeOperation'](_0x4539a3){const _0x46fc6f=null===(_0x4539a3=this['_cloneOperation'](_0x4539a3,this['_idsRoots']))['_authorId']?null:_0x4539a3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x23ce4f=_0x4539a3['targetPosition']['parent'],_0x141e0e=_0x4539a3['sourcePosition']['parent'],_0x50652d=_0x23ce4f['getAttribute']('vid_end'),_0x17bef7=_0x141e0e['getAttribute']('vid_start');_0x23ce4f['_setAttribute']('vid_end',_0x141e0e['getAttribute']('vid_end')),_0x141e0e['_setAttribute']('vid_end',_0x50652d),this['_touched']['set'](_0x17bef7,{'userId':_0x46fc6f}),this['_touched']['set'](_0x50652d,{'userId':_0x46fc6f}),_0x4539a3['_execute']();}['_handleSplitOperation'](_0x169d46){const _0x448214=null===(_0x169d46=this['_cloneOperation'](_0x169d46,this['_idsRoots']))['_authorId']?null:_0x169d46['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4155af=_0x169d46['graveyardPosition'],_0x245f1f=_0x169d46['splitPosition']['parent'];_0x169d46['_execute']();const _0x4644b9=_0x245f1f['getAttribute']('vid_end'),_0x358e40=_0x169d46['insertionPosition']['nodeAfter'];if(_0x4155af){const _0xdae389=_0x358e40['getAttribute']('vid_end'),_0x18ca6a=_0x245f1f['getAttribute']('vid_end');_0x245f1f['_setAttribute']('vid_end',_0xdae389),_0x358e40['_setAttribute']('vid_end',_0x18ca6a),this['_touched']['set'](_0x245f1f['getAttribute']('vid_end'),{'userId':_0x448214}),this['_touched']['set'](_0x358e40['getAttribute']('vid_start'),{'userId':_0x448214});}else{const _0x1a95db=this['_revisionId']++,_0x5254a3=this['_revisionId']++;_0x245f1f['_setAttribute']('vid_end',_0x1a95db),_0x358e40['_setAttribute']('vid_start',_0x5254a3),_0x358e40['_setAttribute']('vid_end',_0x4644b9),this['_touched']['set'](_0x1a95db,{'userId':_0x448214}),this['_touched']['set'](_0x5254a3,{'userId':_0x448214});}}['_handleMarkerOperation'](_0x170af5){if(!_0x170af5['affectsData'])return;const _0x24ea06=(_0x170af5=this['_cloneOperation'](_0x170af5,this['_diffRoots']))['oldRange']?_0x170af5['oldRange']['root']:null,_0x4a6ee5=_0x170af5['newRange']?_0x170af5['newRange']['root']:null;_0x24ea06&&this['_markers']['delete'](_0x170af5['name']),_0x4a6ee5&&this['_markers']['set'](_0x170af5['name'],_0x170af5['newRange']['clone']());const _0x2cbaab=null===_0x170af5['_authorId']?null:_0x170af5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4ae603=_0x170af5['name'];if(!this['_touchedMarkers']['has'](_0x4ae603))return void this['_touchedMarkers']['set'](_0x4ae603,{'range':_0x170af5['oldRange'],'userId':_0x2cbaab});const _0x1e6dc7=this['_touchedMarkers']['get'](_0x4ae603),_0x5df561=_0x1e6dc7['range'],_0x47b730=_0x170af5['newRange'];null==_0x5df561&&null==_0x47b730||_0x5df561&&_0x47b730&&_0x5df561['isEqual'](_0x47b730)?this['_touchedMarkers']['delete'](_0x170af5['name']):_0x1e6dc7['userId']=_0x2cbaab;}['_handleRootOperation'](_0x407341,_0x3c3b0f){this['_diffRoots']['has'](_0x407341['rootName'])?this['_diffRoots']['get'](_0x407341['rootName'])['_isAttached']=_0x407341['isAdd']:(this['_diffRoots']['set'](_0x407341['rootName'],P(_0x407341['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x407341['rootName'],{}),_0x3c3b0f&&this['_idsRoots']['set'](_0x407341['rootName'],P(_0x407341['rootName'],!0x0)));const _0x5b9a65=null===_0x407341['_authorId']?null:_0x407341['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x49cbd9=this['_touchedRoots']['get'](_0x407341['rootName']);_0x49cbd9&&_0x49cbd9['userId']===_0x5b9a65?this['_touchedRoots']['delete'](_0x407341['rootName']):this['_touchedRoots']['set'](_0x407341['rootName'],{'userId':_0x5b9a65,'isAttached':_0x407341['isAdd']});}['_handleRootAttributeOperation'](_0x30a66d){const _0x2bd200=this['_diffRootsAttributes']['get'](_0x30a66d['root']['rootName']);null===_0x30a66d['newValue']?delete _0x2bd200[_0x30a66d['key']]:_0x2bd200[_0x30a66d['key']]=_0x30a66d['newValue'];}}function N(_0x27905f){const _0x41c055=P(_0x27905f['rootName'],_0x27905f['isAttached']());for(const _0x338aa8 of _0x27905f['getChildren']()){const _0xa6dbc=_0x338aa8['_clone'](!0x0);_0x41c055['_appendChild'](_0xa6dbc);}return _0x41c055;}function P(_0x5c7e4b,_0x273730=!0x0){const _0x460b7e=new gt();return _0x460b7e['rootName']=_0x5c7e4b,_0x460b7e['_isAttached']=_0x273730,_0x460b7e['isAttached']=()=>_0x460b7e['_isAttached'],_0x460b7e;}function F(_0x180988,_0x20b821,_0x23993a){const _0x320320='elementEnd'==_0x180988['type']?_0x23993a['createPositionAt'](_0x180988['item'],'end'):_0x23993a['createPositionBefore'](_0x180988['item']);return _0x23993a['createPositionFromPath'](_0x20b821,_0x320320['path'],_0x320320['stickiness']);}function B(_0x313a2e,_0xfb0799,_0x356a62){const _0x543c4c='elementStart'==_0x313a2e['type']?_0x356a62['createPositionAt'](_0x313a2e['item'],0x0):_0x356a62['createPositionAfter'](_0x313a2e['item']);return _0x356a62['createPositionFromPath'](_0xfb0799,_0x543c4c['path'],_0x543c4c['stickiness']);}class os extends _0x4ce89f{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x453109,_0x47e375){super(_0x453109),this['focusTracker']=new _0x2e2350(),this['keystrokes']=new _0x3fdd6e(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x47e375),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x4b75d0({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x14239b=_0xaf5873=>_0xaf5873['stopPropagation']();this['keystrokes']['set']('arrowright',_0x14239b),this['keystrokes']['set']('arrowleft',_0x14239b),this['keystrokes']['set']('arrowup',_0x14239b),this['keystrokes']['set']('arrowdown',_0x14239b);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2e8c17){this['revisionNameInputView']['fieldView']['element']['value']=_0x2e8c17['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x1339b8){const _0x508472=new nt(this['locale'],ti),_0x5241a7=_0x508472['fieldView'];_0x5241a7['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x28953d=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x1339b8&&(_0x28953d+='\x20('+g(this['locale'],'optional')+')'),(_0x508472['label']=_0x28953d,_0x5241a7['on']('input',()=>{this['revisionNameInputValue']=_0x5241a7['element']['value']['trim']();}),_0x508472);}}class f extends _0x4de1c4{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x506278=this['editor'],_0x1d465c=_0x506278['plugins']['get']('RevisionTracker');_0x506278['ui']['componentFactory']['add']('revisionHistory',_0x4b8cda=>{const _0x19f4e8=_0x4bf195(_0x4b8cda),_0x5646ff=_0x19f4e8['panelView']['children'],_0x164003=new _0x3d093c(_0x4b8cda),_0x53aa59=new te(_0x4b8cda),_0x171666=new _0x55e2cf(_0x4b8cda),_0x28ce13=new te(_0x4b8cda),_0xc1a30=new _0x55e2cf(_0x4b8cda);return _0x19f4e8['bind']('isEnabled')['to'](_0x1d465c,'isReady',_0x1d465c,'isEnabled',_0x506278,'isReadOnly',(_0x265bde,_0x2ef0cd,_0x47779f)=>_0x265bde&&_0x2ef0cd&&!_0x47779f),_0x19f4e8['buttonView']['set']({'icon':_0x4860b4,'label':g(_0x4b8cda,'Revision\x20history'),'tooltip':!0x0}),_0x171666['set']({'label':g(_0x4b8cda,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x171666['bind']('isEnabled')['to'](_0x1d465c,'isReady',_0x1d465c,'isEnabled',_0x506278,'isReadOnly',(_0x44b4bd,_0x16b20e,_0x2533ba)=>_0x44b4bd&&_0x16b20e&&!_0x2533ba),_0x171666['on']('execute',()=>this['_showDialog']()),_0xc1a30['set']({'label':g(_0x4b8cda,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0xc1a30['bind']('isEnabled')['to'](_0x1d465c,'isReady',_0x506278,'isReadOnly',(_0x47ffcc,_0x18030d)=>_0x47ffcc&&!_0x18030d),_0xc1a30['on']('execute',()=>{_0x506278['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x19f4e8['isOpen']=!0x1,_0x506278['editing']['view']['focus']();}),_0x53aa59['children']['add'](_0x171666),_0x28ce13['children']['add'](_0xc1a30),_0x164003['role']='menu',_0x164003['items']['addMany']([_0x53aa59,_0x28ce13]),_0x5646ff['add'](_0x164003),_0x19f4e8;}),_0x506278['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x191e79=this['editor'],_0x5e56cd=_0x191e79['locale'],_0x2a973f=new _0x31677e(_0x5e56cd),_0x339ad6=new _0x1fa962(_0x5e56cd);_0x2a973f['buttonView']['set']({'icon':_0x4860b4,'label':g(_0x5e56cd,'Revision\x20history')});const _0x1ccfd6=new _0x37ea3d(_0x5e56cd,_0x2a973f),_0x59db8a=new _0x462384(_0x5e56cd);_0x59db8a['set']({'label':g(_0x5e56cd,'Save\x20current\x20revision')}),_0x59db8a['delegate']('execute')['to'](_0x2a973f),_0x59db8a['on']('execute',()=>{this['_showDialog']();}),_0x1ccfd6['children']['add'](_0x59db8a),_0x339ad6['items']['add'](_0x1ccfd6);const _0x2423d3=new _0x37ea3d(_0x5e56cd,_0x2a973f),_0x3c5a78=new _0x462384(_0x5e56cd);return _0x3c5a78['set']({'label':g(_0x5e56cd,'Open\x20revision\x20history')}),_0x3c5a78['delegate']('execute')['to'](_0x2a973f),_0x3c5a78['on']('execute',()=>{_0x191e79['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x2423d3['children']['add'](_0x3c5a78),_0x339ad6['items']['add'](_0x2423d3),_0x2a973f['panelView']['children']['add'](_0x339ad6),_0x2a973f;}['_showDialog'](){const _0x205dfa=this['editor'],_0x4f36f=_0x205dfa['locale'],_0x5a9bef=_0x205dfa['plugins']['get']('Dialog'),_0x37627d=_0x205dfa['plugins']['get']('RevisionTracker');function _0x5856a2(_0x4f5b1b){_0x205dfa['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4f5b1b['revisionName']?_0x4f5b1b['revisionNameInputView']['errorText']=g(_0x4f36f,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x205dfa['plugins']['get'](u)['saveRevision']({'name':_0x4f5b1b['revisionName']}),_0x5a9bef['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5856a2(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x5a9bef['show']({'id':'revisionSave','title':g(_0x4f36f,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x205dfa['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x5a9bef['hide']()},{'label':g(_0x205dfa['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x1e367f){_0x1e367f['bind']('isEnabled')['to'](_0x37627d,'isReady',_0x37627d,'isEnabled',_0x205dfa,'isReadOnly',(_0xa7894d,_0x5c1434,_0x5b26f3)=>_0xa7894d&&_0x5c1434&&!_0x5b26f3);},'onExecute':()=>_0x5856a2(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x494136=this['editor'],_0x91080d=_0x494136['locale'];this['_saveRevisionFormView']=new os(_0x91080d,_0x494136['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x4ce89f{['changeId'];['_model'];constructor(_0x3b4dfe,_0x38b8f9){super(_0x3b4dfe),this['_model']=_0x38b8f9,this['changeId']=_0x38b8f9['id'];const _0x3706f7=this['bindTemplate'],_0xed1aac=g(_0x3b4dfe,_0x38b8f9['data']['isSuggestion']?'Suggested\x20by':'add'==_0x38b8f9['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x38b8f9['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x3706f7['to']('type',_0x3a5a6a=>'ck-revision-change__'+_0x3a5a6a)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0xed1aac}]},{'text':'\x20'+_0x38b8f9['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x2cbbee(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x212cbb){super(),this['id']=_0x212cbb['id']||_0xb8234b(),this['author']=_0x212cbb['author'],this['type']=_0x212cbb['type'],this['data']=_0x212cbb['data']||{},this['rootName']=_0x212cbb['rootName'],this['set']('createdAt',_0x212cbb['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x3d2ea9,_0x59b7ca){this['newRevisionId']=_0x3d2ea9,this['oldRevisionId']=_0x59b7ca,this['changes']=new _0x5e3e8a();}['_setChanges'](_0x507a55){for(const _0x39b732 of _0x507a55)this['changes']['add'](_0x39b732);}}class m extends _0x4de1c4{['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[_0x2ad73a,_0x35d9ea,I,V];}constructor(_0x354fda){super(_0x354fda),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',(_0x5656ca,_0x92efd,_0xf4aced)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2df5f3=>{for(const _0x343bbf of this['editor']['editing']['view']['document']['roots'])_0xf4aced?_0x2df5f3['removeClass']('ck-editor__editable__overlay',_0x343bbf):_0x2df5f3['addClass']('ck-editor__editable__overlay',_0x343bbf);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x44d15a=>null!==_0x44d15a),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5b8400,_0x4804c4,_0x74777f)=>_0x5b8400&&_0x74777f?_0x4804c4['changes']['getIndex'](_0x74777f):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x54ae94,_0x2837bd)=>_0x54ae94?_0x2837bd['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x35d9ea);}['init'](){const _0x1320bf=this['editor'],_0xe0d16f=new pt(_0x1320bf,{'direction':'backward'}),_0x188b90=new pt(_0x1320bf,{'direction':'forward'});(_0x1320bf['commands']['add']('showPreviousChange',_0xe0d16f),_0x1320bf['commands']['add']('showNextChange',_0x188b90),_0x1320bf['commands']['add']('restoreRevision',new wt(_0x1320bf)),this['on']('change:numberOfChanges',()=>{_0xe0d16f['refresh'](),_0x188b90['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1320bf['enableReadOnlyMode']('revision-viewer'),_0x1320bf['plugins']['has']('WidgetToolbarRepository'))&&_0x1320bf['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x907301){return await this['_utils']['loadRevisionData'](_0x907301,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x907301);}async['getRevisionRootsAttributes'](_0x3920d9){return await this['_utils']['loadRevisionData'](_0x3920d9,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3920d9);}async['compare'](_0x5cb147,_0x116247,_0x420741=!0x1){if(!this['isEnabled'])return;const _0x143e72=this['diff'],_0x30d1c9=this['repository'],_0x40d9b8='string'==typeof _0x5cb147?_0x30d1c9['getRevision'](_0x5cb147):_0x5cb147,_0x54bec0='string'==typeof _0x116247?_0x30d1c9['getRevision'](_0x116247):_0x116247,_0x34d51a=_0x40d9b8['id'],_0x4ff6d1=_0x54bec0?_0x54bec0['id']:null;if(!_0x420741&&this['diff']&&this['diff']['newRevisionId']===_0x34d51a&&this['diff']['oldRevisionId']===_0x4ff6d1)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x34d51a,_0x4ff6d1);const _0x395c06=this['_getRevisionsRange'](_0x40d9b8,_0x54bec0,!0x0)['map'](_0x340b6e=>this['_utils']['loadRevisionData'](_0x340b6e,this['adapter']));return _0x395c06['push'](new Promise(_0x391f66=>{setTimeout(_0x391f66,0x14);})),Promise['all'](_0x395c06)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0xa1742e=this['_getDiff'](_0x34d51a,_0x4ff6d1);for(const _0x4bf7bf of _0xa1742e['changes'])this['_changeIdToChange']['set'](_0x4bf7bf['id'],_0x4bf7bf);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2b53f1=>{for(const _0xcd0c14 of this['editor']['model']['document']['getRootNames']())_0x2b53f1['detachRoot'](_0xcd0c14);for(const _0x504bf5 of Object['keys'](_0xa1742e['model'])){const _0x274763=_0x2b53f1['addRoot'](_0x504bf5);for(const _0x2952fa of Object['keys'](_0xa1742e['attributes'][_0x504bf5]))_0x2b53f1['setAttribute'](_0x2952fa,_0xa1742e['attributes'][_0x504bf5][_0x2952fa],_0x274763);_0x2b53f1['insert'](_0xa1742e['model'][_0x504bf5],_0x274763,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0xa1742e['changes'])),this['isReady']=!0x0;})['catch'](_0x4851bf=>{console['error'](_0x4851bf),this['_cleanUp'](),_0x143e72&&(this['diff']=_0x143e72),this['isReady']=!0x0;});}['addRevisionData'](_0x295c89,_0x4b86c4){const _0x274578=this['repository']['createRevision'](_0x295c89);return _0x274578['on']('_update',(_0x211064,_0x596fde,_0x474839)=>_0x4b86c4(_0x596fde,_0x474839,_0x274578)),this['repository']['addRevision'](_0x274578),_0x274578;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x39d5c5=>{for(const _0x15d8d3 of this['editor']['model']['document']['getRootNames']())_0x39d5c5['detachRoot'](_0x15d8d3);});}['_sortAndFilterDiffChanges'](_0x1be690){const _0x188edd=[],_0x2e292e=new Map();for(const _0x303782 of this['editor']['model']['document']['getRootNames']()){const _0xe7f022=this['editor']['editing']['view']['getDomRoot'](_0x303782);if(!_0xe7f022)continue;const _0x503ccb=_0xe7f022['getClientRects']()['item'](0x0);_0x503ccb&&(_0x188edd['push'](_0x303782),_0x2e292e['set'](_0x303782,_0x503ccb));}return _0x188edd['sort']((_0x4583f1,_0x14a161)=>{const _0x4b56bf=_0x2e292e['get'](_0x4583f1),_0x54c2fc=_0x2e292e['get'](_0x14a161);return _0x4b56bf['y']-_0x54c2fc['y']||_0x4b56bf['x']-_0x54c2fc['x'];}),(_0x1be690=_0x1be690['filter'](_0x2bac3b=>_0x188edd['includes'](_0x2bac3b['rootName'])))['sort']((_0x27dea6,_0x3f3fff)=>_0x188edd['indexOf'](_0x27dea6['rootName'])-_0x188edd['indexOf'](_0x3f3fff['rootName'])),_0x1be690;}['_makeTape'](_0x316196){const _0x46105a=Array['from'](_0x316196['markers'])['filter'](([_0x48d6a4,_0x529e1b])=>_0x48d6a4['startsWith']('revision:')&&!_0x529e1b['isCollapsed']),_0x49d29a=Array['from'](this['editor']['model']['createRangeIn'](_0x316196)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x46105a['length'])for(const _0xbbc7d5 of _0x49d29a){const [_0x4e4345,_0x205513]=_0x46105a[0x0],[,_0x54205a,_0x172c05]=_0x4e4345['split'](':');if(_0x205513['end']['isEqual'](_0xbbc7d5['nextPosition'])&&_0x46105a['shift'](),(_0xbbc7d5['previousPosition']['isEqual'](_0x205513['start'])||_0xbbc7d5['previousPosition']['isAfter'](_0x205513['start']))&&('insertion'==_0x54205a?_0xbbc7d5['isAdded']={'userId':_0x172c05}:'deletion'==_0x54205a&&(_0xbbc7d5['isRemoved']={'userId':_0x172c05})),0x0==_0x46105a['length'])break;}return _0x49d29a;}['_refreshStartEndIndex'](_0x19bf4a){const _0x3e54e2=new Map();for(let _0x271ae0=0x0;_0x271ae0<_0x19bf4a['length'];_0x271ae0++)'text'===_0x19bf4a[_0x271ae0]['type']?(_0x19bf4a[_0x271ae0]['item']['startIndex']=_0x271ae0,_0x19bf4a[_0x271ae0]['item']['endIndex']=_0x271ae0):('elementStart'===_0x19bf4a[_0x271ae0]['type']?_0x19bf4a[_0x271ae0]['item']['startIndex']=_0x271ae0:'elementEnd'===_0x19bf4a[_0x271ae0]['type']&&(_0x19bf4a[_0x271ae0]['item']['endIndex']=_0x271ae0),_0x3e54e2['set'](_0x19bf4a[_0x271ae0]['id'],_0x271ae0));for(const _0x4e6b15 of _0x3e54e2['values']())'elementStart'===_0x19bf4a[_0x4e6b15]['type']?_0x19bf4a[_0x4e6b15]['item']['endIndex']=_0x3e54e2['get'](_0x19bf4a[_0x4e6b15]['pairId']):'elementEnd'===_0x19bf4a[_0x4e6b15]['type']&&(_0x19bf4a[_0x4e6b15]['item']['startIndex']=_0x3e54e2['get'](_0x19bf4a[_0x4e6b15]['pairId']));}['_processTape'](_0x1827a8){for(let _0x53c90f=0x0;_0x53c90f<_0x1827a8['length'];_0x53c90f++){if('elementStart'===_0x1827a8[_0x53c90f]['type'])_0x1827a8[_0x53c90f]['item']['startIndex']=_0x53c90f;else{if('elementEnd'===_0x1827a8[_0x53c90f]['type']){_0x1827a8[_0x53c90f]['item']['endIndex']=_0x53c90f;const _0x1e4739=_0x1827a8[_0x53c90f]['item']['startIndex'];_0x1827a8[_0x1e4739]['pairId']=_0x1827a8[_0x53c90f]['id'],_0x1827a8[_0x53c90f]['pairId']=_0x1827a8[_0x1e4739]['id'];}else _0x1827a8[_0x53c90f]['item']['startIndex']=_0x53c90f,_0x1827a8[_0x53c90f]['item']['endIndex']=_0x53c90f,_0x1827a8[_0x53c90f]['pairId']=null;}_0x1827a8[_0x53c90f]['markersStart']||(_0x1827a8[_0x53c90f]['markersStart']=[],_0x1827a8[_0x53c90f]['markersEnd']=[]);}}['_markInsertions'](_0x29716e,_0x58ef36){const _0x5b6423=_0x29716e['filter'](_0x37843b=>!_0x37843b['isAdded']);for(let _0xda5d9e=0x0;_0xda5d9e<_0x58ef36['length'];_0xda5d9e++)_0x58ef36[_0xda5d9e]['isAdded']&&(_0x5b6423[_0xda5d9e]['isAdded']=_0x58ef36[_0xda5d9e]['isAdded']);}['_getDiff'](_0x4e89c1,_0x5748cd=null){const _0x14d2ac=this['repository']['getRevision'](_0x4e89c1),_0x5c64ee=_0x5748cd?this['repository']['getRevision'](_0x5748cd):null,_0x472cde=this['_getRevisionsRange'](_0x14d2ac,_0x5c64ee),_0x54f16f=_0x472cde[_0x472cde['length']-0x1],_0x50e11c=new Map(),_0xd6506c={'model':{},'attributes':{},'changes':[]},_0x4e4981=new Set(),_0x50cf29=new Map();for(let _0x2c30be=_0x472cde['length']-0x1;_0x2c30be>=0x0;_0x2c30be--){const _0x1edb5d=_0x472cde[_0x2c30be];for(const _0x9b2676 of Object['keys'](_0x1edb5d['diffData']))if(_0x1edb5d['diffData'][_0x9b2676]['attachChange']){const _0x41c4bd=_0x1edb5d['diffData'][_0x9b2676]['attachChange'];_0x41c4bd['isAttached']?(_0x4e4981['add'](_0x9b2676),_0x50cf29['has'](_0x9b2676)&&_0x50cf29['get'](_0x9b2676)['userId']==_0x41c4bd['userId']?_0x50cf29['delete'](_0x9b2676):_0x50cf29['set'](_0x9b2676,_0x41c4bd)):_0x50cf29['has'](_0x9b2676)?(_0x4e4981['delete'](_0x9b2676),_0x50cf29['delete'](_0x9b2676)):(_0x4e4981['add'](_0x9b2676),_0x50cf29['set'](_0x9b2676,_0x41c4bd));}else _0x4e4981['add'](_0x9b2676);}for(const _0x538eb5 of _0x4e4981){const _0x4e49c8=_0x50cf29['has'](_0x538eb5)&&!_0x50cf29['get'](_0x538eb5)['isAttached'];let _0x2bdf41=_0x4e49c8?_0x472cde['length']-0x1:0x0;const _0x404fc2=_0x4e49c8?-0x1:0x1;for(;_0x472cde[_0x2bdf41];){const _0x5c5907=_0x472cde[_0x2bdf41];if(_0x5c5907['diffData'][_0x538eb5]){const _0x5d16b5=_0x4e49c8?_0x5c5907['diffData'][_0x538eb5]['attributesBefore']:_0x5c5907['diffData'][_0x538eb5]['attributesAfter'];_0xd6506c['attributes'][_0x538eb5]=_0x5d16b5?_0x7e9748(_0x5d16b5):{};break;}_0x2bdf41+=_0x404fc2;}}for(const _0x2397fa of _0x472cde){_0x2397fa['model']={};for(const _0x3dcbaf of _0x2397fa['authors'])_0x50e11c['set'](_0x3dcbaf['id'],_0x3dcbaf);for(const _0x52606a of _0x4e4981){const _0x3db54e=_0x2397fa['diffData'][_0x52606a]?_0x2397fa['diffData'][_0x52606a]['insertions']:'[]',_0x1cb4e7=_0x2397fa['diffData'][_0x52606a]?_0x2397fa['diffData'][_0x52606a]['deletions']:'[]';_0x2397fa['model'][_0x52606a]={'insertions':this['_utils']['_makeModelFromViewString'](_0x3db54e),'deletions':this['_utils']['_makeModelFromViewString'](_0x1cb4e7)};}}for(const _0x4b5777 of _0x4e4981){let _0x28bfba=null,_0x55e316=0x0;const _0x528f8a=new Map(Array['from'](_0x14d2ac['model'][_0x4b5777]['insertions']['markers'])['filter'](([_0xf992c6])=>!_0xf992c6['startsWith']('revision:')));let _0x444061=0x0;for(const _0x252985 of _0x472cde){const _0x3e36d3=this['_makeTape'](_0x252985['model'][_0x4b5777]['insertions']);_0x252985==_0x14d2ac?(_0x28bfba=_0x3e36d3,_0x55e316=_0x28bfba['length'],_0x28bfba['forEach'](_0x16dea0=>{_0x16dea0['id']=_0x444061++;}),this['_processTape'](_0x28bfba)):this['_markInsertions'](_0x28bfba,_0x3e36d3);const _0x1d59ae=_0x28bfba['filter'](_0x549039=>!_0x549039['isAdded'])['map'](_0x146c74=>_0x146c74['id']);let _0x1bac91=0x0;const _0x37ffa3=this['_makeTape'](_0x252985['model'][_0x4b5777]['deletions']);_0x37ffa3['forEach'](_0x556d8e=>{_0x556d8e['isRemoved']?_0x556d8e['id']=_0x55e316++:_0x556d8e['id']=_0x1d59ae[_0x1bac91++];}),this['_processTape'](_0x37ffa3),this['_setDistance'](_0x28bfba,'isAdded'),this['_setDistance'](_0x37ffa3,'isRemoved'),_0x252985==_0x14d2ac&&this['_markMarkers'](_0x28bfba,_0x528f8a),_0x28bfba=this['_joinTapes'](_0x28bfba,_0x37ffa3),this['_refreshStartEndIndex'](_0x28bfba),this['_setDistance'](_0x28bfba,'isRemoved');}_0x28bfba=_0x28bfba['filter'](_0x40c04=>!(_0x40c04['isAdded']&&_0x40c04['isRemoved']));const _0x55c30c=new Map(_0x54f16f['model'][_0x4b5777]['deletions']['markers']),_0xfadda2=new Set(_0x528f8a['keys']());for(const _0x46c7d4 of _0x55c30c['keys']())_0xfadda2['delete'](_0x46c7d4);this['_markSuggestions'](_0x28bfba,_0xfadda2),this['_fixObsoleteTags'](_0x28bfba),_0x28bfba=this['_removeMissingPairs'](_0x28bfba),_0x28bfba=this['_markMismatchedRemovedTags'](_0x28bfba),_0x28bfba=this['_removeUnsupportedChanges'](_0x28bfba);const {root:_0x3e4228,changes:_0x160b6c}=this['_makeModelFromTape'](_0x28bfba,_0x50e11c,_0x4b5777);_0xd6506c['model'][_0x4b5777]=_0x3e4228;const _0x325973=_0x50cf29['get'](_0x4b5777);if(_0x325973){const _0x3339f7=_0x50e11c['get'](_0x325973['userId']),_0x162a76=new r({'author':_0x3339f7,'type':_0x325973['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4b5777});_0x160b6c['unshift'](_0x162a76),_0xd6506c['attributes'][_0x4b5777]['revisionHistoryAttachChange']=_0x162a76['id'];}_0xd6506c['changes']=_0xd6506c['changes']['concat'](_0x160b6c);}return _0xd6506c;}['_markMarkers'](_0x5a66e8,_0x580a11){for(let _0x4c652a=0x0;_0x4c652a<_0x5a66e8['length'];_0x4c652a++)for(const [_0x56d039,_0x1af3cb]of _0x580a11)!_0x1af3cb['isCollapsed']&&_0x1af3cb['start']['isEqual'](_0x5a66e8[_0x4c652a]['previousPosition'])&&_0x5a66e8[_0x4c652a]['markersStart']['push'](_0x56d039),_0x1af3cb['end']['isEqual'](_0x5a66e8[_0x4c652a]['nextPosition'])&&_0x5a66e8[_0x4c652a]['markersEnd']['push'](_0x56d039);}['_joinTapes'](_0x3531d5,_0x19b6e7){let _0x55b624=[],_0x525eb9=0x0,_0xc6fe27=0x0;for(;_0x525eb9<_0x3531d5['length']||_0xc6fe27<_0x19b6e7['length'];){const _0x4b217c=_0x3531d5[_0x525eb9]||{},_0x1ded05=_0x19b6e7[_0xc6fe27]||{};if(_0x4b217c['id']==_0x1ded05['id'])_0x525eb9++,_0xc6fe27++,_0x55b624['push'](_0x4b217c);else{if(_0x1ded05['isRemoved']&&_0x4b217c['isAdded']){const {commonTape:_0x1ea40d,iEnd:_0x3c29e6,jEnd:_0x4f03bb}=this['_threeWayMerge'](_0x3531d5,_0x525eb9,_0x19b6e7,_0xc6fe27);_0x55b624=_0x55b624['concat'](_0x1ea40d),_0x525eb9=_0x3c29e6,_0xc6fe27=_0x4f03bb;}else _0x1ded05['isRemoved']?(_0xc6fe27++,_0x55b624['push'](_0x1ded05)):(_0x525eb9++,_0x55b624['push'](_0x4b217c));}}return _0x55b624;}['_markSuggestions'](_0x5315c2,_0x282f6){const _0x1ce3b8=[];for(let _0x5f49cf=0x0;_0x5f49cf<_0x5315c2['length'];_0x5f49cf++){for(let _0x466cd0=0x0;_0x466cd0<_0x5315c2[_0x5f49cf]['markersStart']['length'];_0x466cd0++){const _0x3b7a61=_0x5315c2[_0x5f49cf]['markersStart'][_0x466cd0];if(!_0x282f6['has'](_0x3b7a61))continue;const {group:_0x5db0cf,type:_0x4384a7,authorId:_0x13c0de}=_0x474c7f(_0x3b7a61);'revision-suggestion'!=_0x5db0cf||'insertion'!=_0x4384a7&&'deletion'!=_0x4384a7||(_0x1ce3b8['unshift']({'type':_0x4384a7,'name':_0x3b7a61,'userId':_0x13c0de}),_0x5315c2[_0x5f49cf]['markersStart']['splice'](_0x466cd0,0x1),_0x466cd0--);}_0x25ed5e(_0x5315c2[_0x5f49cf]);for(let _0x50abb4=0x0;_0x50abb4<_0x5315c2[_0x5f49cf]['markersEnd']['length'];_0x50abb4++){const _0x130fa4=_0x5315c2[_0x5f49cf]['markersEnd'][_0x50abb4];if(!_0x282f6['has'](_0x130fa4))continue;const {group:_0x3d76f5,type:_0x327844}=_0x474c7f(_0x130fa4);if('revision-suggestion'!=_0x3d76f5||'insertion'!=_0x327844&&'deletion'!=_0x327844)continue;_0x5315c2[_0x5f49cf]['markersEnd']['splice'](_0x50abb4,0x1),_0x50abb4--;const _0x2798ae=_0x1ce3b8['findIndex'](_0x333a7f=>_0x333a7f['name']==_0x130fa4);_0x2798ae>-0x1&&_0x1ce3b8['splice'](_0x2798ae,0x1);}}function _0x474c7f(_0x3b76b9){const _0x2ad8b8=_0x3b76b9['split'](':');return{'group':_0x2ad8b8[0x0],'type':_0x2ad8b8[0x1],'subType':_0x2ad8b8['length']>=0x5?_0x2ad8b8[0x2]:null,'id':_0x2ad8b8['length']<0x5?_0x2ad8b8[0x2]:_0x2ad8b8[0x3],'authorId':_0x2ad8b8['length']<0x5?_0x2ad8b8[0x3]:_0x2ad8b8[0x4],'markerCount':0x6==_0x2ad8b8['length']?_0x2ad8b8[0x5]:null};}function _0x25ed5e(_0x583e2f){for(let _0x7a12b8=0x0;_0x7a12b8<_0x1ce3b8['length'];_0x7a12b8++){if(_0x583e2f['isAdded']&&'insertion'==_0x1ce3b8[_0x7a12b8]['type']&&_0x583e2f['isAdded']['userId']==_0x1ce3b8[_0x7a12b8]['userId'])return _0x583e2f['isAddSuggestion']=_0x1ce3b8[_0x7a12b8],void delete _0x583e2f['isAdded'];if(!_0x583e2f['isAdded']&&!_0x583e2f['isRemoved']&&'deletion'==_0x1ce3b8[_0x7a12b8]['type'])return void(_0x583e2f['isRemoveSuggestion']=_0x1ce3b8[_0x7a12b8]);}}}['_setDistance'](_0x1b3b5e,_0x3e1f66){let _0x37540=0x0,_0x1218f2=!0x1;const _0x108b65=new Map();for(const _0x281064 of _0x1b3b5e)_0x281064[_0x3e1f66]?_0x1218f2&&(_0x37540++,_0x1218f2=!0x1):(_0x37540++,_0x1218f2=!0x0),_0x108b65['set'](_0x281064['id'],_0x37540);for(let _0x2b58d6=0x0;_0x2b58d6<_0x1b3b5e['length'];_0x2b58d6++){if('isRemoved'==_0x3e1f66&&_0x1b3b5e[_0x2b58d6]['isAdded']||'isAdded'==_0x3e1f66&&_0x1b3b5e[_0x2b58d6]['isRemoved'])continue;if('text'==_0x1b3b5e[_0x2b58d6]['type']){_0x1b3b5e[_0x2b58d6]['distance']=0x0;continue;}const _0x27c4b0=_0x108b65['get'](_0x1b3b5e[_0x2b58d6]['pairId']),_0x25e4b3=_0x108b65['get'](_0x1b3b5e[_0x2b58d6]['id']);_0x1b3b5e[_0x2b58d6]['distance']=_0x27c4b0-_0x25e4b3;}}['_getRevisionsRange'](_0x599371,_0x1dcb1c,_0x3e637e=!0x1){const _0x4b1772=[];let _0x2a9385=this['repository']['getIndex'](_0x599371),_0x3cc275=this['repository']['getIndex'](_0x1dcb1c);for(-0x1==_0x3cc275&&(_0x3cc275=this['repository']['_revisions']['length'],_0x3e637e=!0x1);_0x2a9385<_0x3cc275;)_0x4b1772['push'](this['repository']['getRevision'](_0x2a9385)),_0x2a9385++;return _0x3e637e&&_0x4b1772['push'](this['repository']['getRevision'](_0x2a9385)),_0x4b1772;}['_threeWayMerge'](_0x3dc3dc,_0x141c67,_0x14b288,_0x74d06c){const _0x545a99=this['editor']['model']['schema'];let _0x129764=_0x141c67;for(;_0x3dc3dc[_0x129764]&&_0x3dc3dc[_0x129764]['isAdded'];)_0x129764++;let _0xdcc459=_0x74d06c;for(;_0x14b288[_0xdcc459]&&_0x14b288[_0xdcc459]['isRemoved'];)_0xdcc459++;_0x4dd2a3(_0x3dc3dc,_0x141c67,_0x129764),_0x4dd2a3(_0x14b288,_0x74d06c,_0xdcc459);const _0x300234=_0x14b288['slice'](_0x74d06c,_0xdcc459)['concat'](_0x3dc3dc['slice'](_0x141c67,_0x129764));return _0x300234['sort']((_0x3e9ad9,_0x18ae91)=>_0x3e9ad9['side']!=_0x18ae91['side']?_0x3e9ad9['side']-_0x18ae91['side']:_0x3e9ad9['level']!=_0x18ae91['level']?_0x3e9ad9['level']-_0x18ae91['level']:_0x3e9ad9['distance']!=_0x18ae91['distance']?_0x18ae91['distance']-_0x3e9ad9['distance']:!!_0x3e9ad9['isAdded']!=!!_0x18ae91['isAdded']?-0x1==_0x3e9ad9['side']||0x0==_0x3e9ad9['side']?_0x3e9ad9['isAdded']?-0x1:0x1:_0x3e9ad9['isAdded']?0x1:-0x1:_0x3e9ad9['index']-_0x18ae91['index']),{'commonTape':_0x300234,'iEnd':_0x129764,'jEnd':_0xdcc459};function _0x4dd2a3(_0x88a350,_0x3f8e61,_0x44ba9d){let _0x234d53=-0x1,_0x1a4d62=Number['POSITIVE_INFINITY'],_0x390cc8=!0x0;for(let _0xb9b701=_0x3f8e61;_0xb9b701<_0x44ba9d;_0xb9b701++)if(_0x545a99['isInline'](_0x88a350[_0xb9b701]['item'])||(_0x390cc8=!0x1),_0x88a350[_0xb9b701]['item']['startIndex']<_0x3f8e61&&(_0x234d53=_0xb9b701),_0x88a350[_0xb9b701]['item']['endIndex']>=_0x44ba9d){_0x1a4d62=_0xb9b701;break;}_0x390cc8&&(_0x234d53=_0x44ba9d-0x1);for(let _0x2a1b98=_0x3f8e61;_0x2a1b98<_0x44ba9d;_0x2a1b98++)_0x88a350[_0x2a1b98]['side']=_0x2a1b98<=_0x234d53?-0x1:_0x2a1b98<_0x1a4d62?0x0:0x1,_0x88a350[_0x2a1b98]['index']=_0x2a1b98;let _0x2ed2c9=0x0;for(let _0x5b9540=_0x3f8e61;_0x5b9540<=_0x234d53;_0x5b9540++)0x0==_0x88a350[_0x5b9540]['distance']?_0x88a350[_0x5b9540]['level']=_0x2ed2c9:(_0x2ed2c9++,_0x88a350[_0x5b9540]['level']=_0x2ed2c9,_0x2ed2c9++);for(let _0x357ad4=_0x3f8e61;_0x357ad4<_0x44ba9d;_0x357ad4++)0x0==_0x88a350[_0x357ad4]['side']&&(_0x88a350[_0x357ad4]['level']=_0x2ed2c9);_0x2ed2c9=0x0;for(let _0x16d2d0=_0x44ba9d-0x1;_0x16d2d0>=_0x1a4d62;_0x16d2d0--)0x0==_0x88a350[_0x16d2d0]['distance']?_0x88a350[_0x16d2d0]['level']=_0x2ed2c9:(_0x2ed2c9--,_0x88a350[_0x16d2d0]['level']=_0x2ed2c9,_0x2ed2c9--);}}['_fixObsoleteTags'](_0x187c30){const _0x51cd3c=new Map(),_0x51a9b2=this['editor']['model']['schema'];for(let _0x1a8ee2=0x1;_0x1a8ee2<_0x187c30['length'];_0x1a8ee2++){let _0x159263,_0x2044a0,_0x14bd2;const _0x298660=_0x187c30[_0x1a8ee2],_0x5bc44e=_0x187c30[_0x1a8ee2-0x1];if('text'==_0x298660['type'])continue;if(_0x298660['type']!=_0x5bc44e['type'])continue;if(!_0x51a9b2['isBlock'](_0x5bc44e['item'])||_0x51a9b2['isLimit'](_0x5bc44e['item']))continue;if(!_0x51a9b2['isBlock'](_0x298660['item'])||_0x51a9b2['isLimit'](_0x298660['item']))continue;if((_0x187c30[_0x1a8ee2]['isAdded']||_0x187c30[_0x1a8ee2]['isAddSuggestion'])&&_0x187c30[_0x1a8ee2-0x1]['isRemoved'])_0x159263=_0x187c30[_0x1a8ee2],_0x2044a0=_0x187c30[_0x1a8ee2-0x1],_0x14bd2=_0x1a8ee2-0x1;else{if(!_0x187c30[_0x1a8ee2]['isRemoved']||!_0x187c30[_0x1a8ee2-0x1]['isAdded']&&!_0x187c30[_0x1a8ee2-0x1]['isAddSuggestion'])continue;_0x159263=_0x187c30[_0x1a8ee2-0x1],_0x2044a0=_0x187c30[_0x1a8ee2],_0x14bd2=_0x1a8ee2;}const _0x8bece9=_0x159263['level']==_0x2044a0['level'],_0x256f48=Math['abs'](_0x159263['level'])<Math['abs'](_0x2044a0['level'])&&0x0==_0x2044a0['distance'];(_0x8bece9||_0x256f48)&&(_0x51cd3c['set'](_0x2044a0['id'],_0x159263['id']),_0x187c30['splice'](_0x14bd2,0x1),_0x1a8ee2--,_0x159263['isAdded']=!0x1);}for(let _0x8e1066=0x0;_0x8e1066<_0x187c30['length'];_0x8e1066++)_0x51cd3c['has'](_0x187c30[_0x8e1066]['pairId'])&&(_0x187c30[_0x8e1066]['pairId']=_0x51cd3c['get'](_0x187c30[_0x8e1066]['pairId']));}['_removeMissingPairs'](_0x2f6347){const _0x4d5fe9=new Set(_0x2f6347['map'](_0x540efd=>_0x540efd['id']));for(let _0x315279=0x0;_0x315279<_0x2f6347['length'];_0x315279++)_0x4d5fe9['has'](_0x2f6347[_0x315279]['pairId'])||0x0==_0x2f6347[_0x315279]['distance']||(_0x2f6347[_0x315279]['isIncorrect']=!0x0);return _0x2f6347['filter'](_0x197289=>!_0x197289['isIncorrect']);}['_markMismatchedRemovedTags'](_0x12f3c9){const _0x4b809e=new Set();for(let _0x555a70=0x0;_0x555a70<_0x12f3c9['length'];_0x555a70++){if(_0x4b809e['has'](_0x12f3c9[_0x555a70]['id'])&&_0x12f3c9[_0x555a70]['isRemoved']&&(_0x12f3c9[_0x555a70]['isIncorrect']=!0x0),_0x12f3c9[_0x555a70]['isIncorrect'])continue;if(0x0==_0x12f3c9[_0x555a70]['distance'])continue;if('elementStart'!=_0x12f3c9[_0x555a70]['type'])continue;if(null==_0x12f3c9[_0x555a70]['pairId'])continue;let _0x1a1162=_0x555a70+0x1,_0x16f9e0=0x0;for(;_0x12f3c9[_0x1a1162]['id']!=_0x12f3c9[_0x555a70]['pairId'];)'elementStart'==_0x12f3c9[_0x1a1162]['type']?_0x16f9e0++:'elementEnd'==_0x12f3c9[_0x1a1162]['type']&&_0x16f9e0--,_0x1a1162++;if(0x0!=_0x16f9e0){if(_0x12f3c9[_0x555a70]['isRemoved'])_0x12f3c9[_0x555a70]['isIncorrect']=!0x0;else{for(;_0x1a1162!=_0x555a70;)_0x12f3c9[_0x1a1162]['isRemoved']&&0x0!=_0x12f3c9[_0x1a1162]['distance']&&(_0x12f3c9[_0x1a1162]['isIncorrect']=!0x0,_0x4b809e['add'](_0x12f3c9[_0x1a1162]['pairId'])),_0x1a1162--;}}}return _0x12f3c9['filter'](_0x3f75d2=>!_0x3f75d2['isIncorrect']);}['_removeUnsupportedChanges'](_0x58f103){const _0x1ebaa7=this['editor']['model']['schema'];for(let _0xe45bd5=0x0;_0xe45bd5<_0x58f103['length'];_0xe45bd5++){if(!(_0x58f103[_0xe45bd5]['isAdded']||_0x58f103[_0xe45bd5]['isAddSuggestion']||_0x58f103[_0xe45bd5]['isRemoved']||_0x58f103[_0xe45bd5]['isRemoveSuggestion']))continue;if(0x0==_0x58f103[_0xe45bd5]['distance'])continue;const _0x2cc176=_0x58f103[_0xe45bd5]['item'];_0x1ebaa7['isBlock'](_0x2cc176)||_0x1ebaa7['isLimit'](_0x2cc176)||(_0x58f103[_0xe45bd5]['isAdded']&&delete _0x58f103[_0xe45bd5]['isAdded'],_0x58f103[_0xe45bd5]['isAddSuggestion']&&delete _0x58f103[_0xe45bd5]['isAddSuggestion'],_0x58f103[_0xe45bd5]['isRemoveSuggestion']&&delete _0x58f103[_0xe45bd5]['isRemoveSuggestion'],_0x58f103[_0xe45bd5]['isRemoved']&&(_0x58f103[_0xe45bd5]['isIncorrect']=!0x0));}return _0x58f103['filter'](_0x20de5e=>!_0x20de5e['isIncorrect']);}['_makeModelFromTape'](_0x3c8e48,_0x3e12ad,_0x4b1578){const _0x150bb7=new gt(),_0x579904=[],_0x1c32af=new Map(),_0x269dd4=this['editor']['model'],_0x186fc6=_0x269dd4['schema'],_0x525444=[_0x150bb7],_0x397665={},_0x445f21={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0xd5288e=null;const _0x4158a3=[0x0];for(let _0x141ca3=0x0;_0x141ca3<_0x3c8e48['length'];_0x141ca3++)if('elementStart'===_0x3c8e48[_0x141ca3]['type']){_0x3c8e48[_0x141ca3]['previousPosition']=_0x269dd4['createPositionFromPath'](_0x150bb7,_0x4158a3);const _0x5e2659=new ut(_0x3c8e48[_0x141ca3]['item']['name'],_0x3c8e48[_0x141ca3]['item']['getAttributes']());_0x525444[0x0]['_appendChild'](_0x5e2659),_0x4158a3['push'](0x0),_0x525444['unshift'](_0x5e2659),_0x3c8e48[_0x141ca3]['nextPosition']=_0x269dd4['createPositionFromPath'](_0x150bb7,_0x4158a3);}else'elementEnd'===_0x3c8e48[_0x141ca3]['type']?(_0x525444['shift'](),_0x3c8e48[_0x141ca3]['previousPosition']=_0x269dd4['createPositionFromPath'](_0x150bb7,_0x4158a3),_0x4158a3['pop'](),_0x4158a3[_0x4158a3['length']-0x1]++,_0x3c8e48[_0x141ca3]['nextPosition']=_0x269dd4['createPositionFromPath'](_0x150bb7,_0x4158a3)):(_0x3c8e48[_0x141ca3]['previousPosition']=_0x269dd4['createPositionFromPath'](_0x150bb7,_0x4158a3),_0xd5288e?_0xd5288e['_data']+=_0x3c8e48[_0x141ca3]['item']['data']:_0xd5288e=new mt(_0x3c8e48[_0x141ca3]['item']['data'],_0x3c8e48[_0x141ca3]['item']['getAttributes']()),_0x3c8e48[_0x141ca3+0x1]&&'text'===_0x3c8e48[_0x141ca3+0x1]['type']&&_0x1920f8(_0xd5288e,_0x3c8e48[_0x141ca3+0x1]['item'])||(_0x525444[0x0]['_appendChild'](_0xd5288e),_0xd5288e=null),_0x4158a3[_0x4158a3['length']-0x1]+=_0x3c8e48[_0x141ca3]['item']['offsetSize'],_0x3c8e48[_0x141ca3]['nextPosition']=_0x269dd4['createPositionFromPath'](_0x150bb7,_0x4158a3));for(let _0x1cf320=0x0;_0x1cf320<_0x3c8e48['length'];_0x1cf320++){const _0x224701=_0x3c8e48[_0x1cf320]['previousPosition'],_0x213385=_0x3c8e48[_0x1cf320]['nextPosition'];for(const _0x30c6a2 of _0x3c8e48[_0x1cf320]['markersStart'])_0x1c32af['set'](_0x30c6a2,{'start':_0x224701,'end':null});_0x36ec3e('isRemoveSuggestion',_0x1cf320,_0x224701,_0x213385),_0x36ec3e('isAddSuggestion',_0x1cf320,_0x224701,_0x213385),_0x36ec3e('isRemoved',_0x1cf320,_0x224701,_0x213385),_0x36ec3e('isAdded',_0x1cf320,_0x224701,_0x213385);for(const _0x12a237 of _0x3c8e48[_0x1cf320]['markersEnd']){const _0x264d77=_0x1c32af['get'](_0x12a237);_0x264d77?_0x264d77['end']=_0x213385:_0x1c32af['set'](_0x12a237,{'start':_0x213385,'end':_0x213385});}}for(const [_0x3763ce,_0x6adc52]of _0x1c32af){const _0x3a389a=this['editor']['model']['createRange'](_0x6adc52['start'],_0x6adc52['end']);_0x150bb7['markers']['set'](_0x3763ce,_0x3a389a);}return _0x579904['sort']((_0x5ac4e4,_0x31658a)=>{const _0x2c50c3=_0x150bb7['markers']['get']('revision:'+_0x5ac4e4['id']),_0x13b55b=_0x150bb7['markers']['get']('revision:'+_0x31658a['id']);return _0x2c50c3['start']['isBefore'](_0x13b55b['start'])?-0x1:_0x2c50c3['start']['isAfter'](_0x13b55b['start'])?0x1:_0x2c50c3['end']['isBefore'](_0x13b55b['end'])?-0x1:_0x2c50c3['end']['isAfter'](_0x13b55b['end'])?0x1:'add'===_0x5ac4e4['type']?-0x1:0x1;}),{'root':_0x150bb7,'changes':_0x579904};function _0x36ec3e(_0x4bd8d7,_0x24d0ed,_0x4607b8,_0x2aaf58){const _0x21b3f8=!!_0x3c8e48[_0x24d0ed][_0x4bd8d7],_0x5a4a9e=_0x21b3f8?_0x3c8e48[_0x24d0ed][_0x4bd8d7]['userId']:null,_0x524e48=_0x24d0ed===_0x3c8e48['length']-0x1,_0x38d620=_0x445f21[_0x4bd8d7][0x0],_0x28d698=_0x186fc6['isObject'](_0x3c8e48[_0x24d0ed]['item']);!_0x397665[_0x4bd8d7]&&_0x21b3f8?_0x397665[_0x4bd8d7]={'start':_0x4607b8,'tapeItem':_0x3c8e48[_0x24d0ed],'userId':_0x5a4a9e,'type':_0x4bd8d7}:_0x397665[_0x4bd8d7]&&!_0x21b3f8?(_0x397665[_0x4bd8d7]['end']=_0x4607b8,_0x2cc4e2(_0x397665[_0x4bd8d7]),_0x397665[_0x4bd8d7]=null):_0x397665[_0x4bd8d7]&&_0x21b3f8&&_0x397665[_0x4bd8d7]['userId']!==_0x5a4a9e&&(_0x397665[_0x4bd8d7]['end']=_0x4607b8,_0x38d620&&_0x38d620['userId']===_0x397665[_0x4bd8d7]['userId']||_0x2cc4e2(_0x397665[_0x4bd8d7]),_0x397665[_0x4bd8d7]={'start':_0x4607b8,'tapeItem':_0x3c8e48[_0x24d0ed],'userId':_0x5a4a9e,'type':_0x4bd8d7}),_0x397665[_0x4bd8d7]&&_0x28d698&&('elementStart'!==_0x3c8e48[_0x24d0ed]['type']||_0x38d620&&_0x38d620['userId']===_0x5a4a9e||_0x445f21[_0x4bd8d7]['unshift']({'userId':_0x5a4a9e,'object':_0x3c8e48[_0x24d0ed]['item'],'change':_0x397665[_0x4bd8d7]}),'elementEnd'===_0x3c8e48[_0x24d0ed]['type']&&_0x38d620&&_0x38d620['object']===_0x3c8e48[_0x24d0ed]['item']&&(_0x445f21[_0x4bd8d7]['shift'](),_0x397665[_0x4bd8d7]=_0x38d620['change'])),_0x397665[_0x4bd8d7]&&_0x524e48&&(_0x397665[_0x4bd8d7]['end']=_0x2aaf58,_0x2cc4e2(_0x397665[_0x4bd8d7]),_0x397665[_0x4bd8d7]=null);}function _0x2cc4e2({start:_0x9d729f,end:_0x8b0bda,tapeItem:_0x59fe29,userId:_0x36cd3c,type:_0x104adc}){const _0xe998a9=_0x59fe29['item'],_0x29cd08=_0x269dd4['schema']['isBlock'](_0xe998a9)&&!_0x269dd4['schema']['isLimit'](_0xe998a9),_0x118bb7=_0x9d729f['nodeAfter']==_0x8b0bda['parent']&&_0x8b0bda['isAtStart'];if(_0x29cd08&&_0x118bb7)return;const _0xfd9609=_0x269dd4['createRange'](_0x9d729f,_0x8b0bda),_0x427af1=_0x3e12ad['get'](_0x36cd3c),_0x4100bb=new r({'author':_0x427af1,'type':'isAdded'==_0x104adc||'isAddSuggestion'==_0x104adc?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x104adc||'isRemoveSuggestion'==_0x104adc},'createdAt':new Date(),'rootName':_0x4b1578});_0x579904['push'](_0x4100bb),_0x150bb7['markers']['set']('revision:'+_0x4100bb['id'],_0xfd9609);}function _0x1920f8(_0x1c40c7,_0x31d416){const _0x3649df=_0x1c40c7['getAttributes'](),_0x14bb85=_0x31d416['getAttributes']();for(const _0x25479c of _0x3649df){if(_0x25479c[0x1]!==_0x31d416['getAttribute'](_0x25479c[0x0]))return!0x1;_0x14bb85['next']();}return _0x14bb85['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1ba6e2=>{const _0x260bc8=_0x1ba6e2['markerName']['split'](':')[0x1],_0x831711=this['_getChangeFromId'](_0x260bc8);if(!_0x831711)return null;const _0x209871='add'==_0x831711['type']?'insertion':'deletion',_0x5947ac=['ck-suggestion-marker','ck-suggestion-marker-'+_0x209871];return _0x831711['data']['isSuggestion']&&_0x5947ac['push']('ck-suggestion-marker-'+_0x209871+'-new'),this['activeChange']==_0x831711&&_0x5947ac['push']('ck-suggestion-marker--active'),{'classes':_0x5947ac,'attributes':{'data-change-id':_0x260bc8}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x8afbb=>{_0x8afbb['on']('element:pre',(_0x4867bd,_0xcbafec,_0x5de78f)=>{const _0x3edfe6=_0xcbafec['viewItem']['getChild'](0x0);if(!_0x3edfe6||!_0x3edfe6['is']('element','code'))return;if(!_0x5de78f['consumable']['consume'](_0x3edfe6,{'attributes':['vid_start','vid_end']}))return;const _0x1862bd=_0xcbafec['modelRange']['start']['nodeAfter'];_0x5de78f['writer']['setAttribute']('vid_start',_0x3edfe6['getAttribute']('vid_start'),_0x1862bd),_0x5de78f['writer']['setAttribute']('vid_end',_0x3edfe6['getAttribute']('vid_end'),_0x1862bd);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1eaf51=>{_0x1eaf51['on']('element',(_0x1f74e3,_0x52528,_0x2d0933)=>{if(!_0x2d0933['consumable']['consume'](_0x52528['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x52528['modelRange']['isCollapsed'])return;const _0x16e02c=_0x52528['modelRange']['start']['nodeAfter'];_0x16e02c['hasAttribute']('vid_start')||_0x16e02c['hasAttribute']('vid')||(_0x2d0933['writer']['setAttribute']('vid_start',_0x52528['viewItem']['getAttribute']('vid_start'),_0x16e02c),_0x2d0933['writer']['setAttribute']('vid_end',_0x52528['viewItem']['getAttribute']('vid_end'),_0x16e02c));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xd5b98e=>_0xd5b98e['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x2abf15,[,_0x3ca4c0])=>{['vid_start','vid_end','vid']['includes'](_0x3ca4c0)&&(_0x2abf15['return']=!0x0,_0x2abf15['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5e828d=>{_0x5e828d['on']('attribute:vid',(_0x52e7bc,_0x25d388,_0x38c082)=>{if('\x20'!=_0x25d388['item']['data']||_0x25d388['item']['parent']['maxOffset']>0x1)return;if(!_0x38c082['consumable']['consume'](_0x25d388['item'],_0x52e7bc['name']))return;const _0x30f315=_0x38c082['writer'],_0x14c269=_0x38c082['mapper']['toViewRange'](_0x25d388['range']);_0x30f315['wrap'](_0x14c269,_0x30f315['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x278ee1){const _0x30a593=_0x278ee1['plugins']['get']('RevisionViewer');return(_0x52e380,_0x1e8a96,_0x2564ea)=>{const _0x2ef6ce=_0x1e8a96['markerName']['split'](':')[0x1],_0x34dd66=_0x30a593['_getChangeFromId'](_0x2ef6ce);if(!_0x34dd66)return null;const _0x58a2eb='add'==_0x34dd66['type']?'split':'merge';if(!_0x2564ea['consumable']['test'](_0x1e8a96['markerRange'],_0x52e380['name']))return;const _0x4c4523=_0x1e8a96['markerRange']['getWalker'](),_0x3774ca=_0x1e8a96['markerRange']['start'],_0x493092=_0x278ee1['model']['schema'];let _0x1158b2=null,_0x296860=null,_0x2a38fa=!0x1,_0x508e76=!0x1;for(const _0x511521 of _0x4c4523){const _0x30e7fe=_0x511521['item'];_0x2a38fa=_0x2a38fa||_0x493092['isContent'](_0x30e7fe);const _0x43cc0f=_0x2564ea['mapper']['toViewElement'](_0x30e7fe);if(_0x43cc0f&&_0x43cc0f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x511521['type']&&(_0x493092['isBlock'](_0x30e7fe)&&!_0x493092['isLimit'](_0x30e7fe)&&(_0x30e7fe['nextSibling']||_0x3774ca['isAtEnd']?_0x1158b2&&_0x1158b2['parent']==_0x30e7fe||(_0x1158b2=_0x30e7fe,_0x4d631c(_0x511521['previousPosition']),_0x508e76=!0x0):_0x296860=_0x296860||_0x511521['previousPosition']));}function _0x4d631c(_0x2d7e23){const _0x55131a=_0x2564ea['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x58a2eb}),_0x3c5141=_0x2564ea['mapper']['toViewPosition'](_0x2d7e23);_0x34dd66['data']['isSuggestion']&&_0x2564ea['writer']['addClass']('ck-suggestion-marker-'+_0x58a2eb+'-new',_0x55131a),_0x30a593['activeChange']==_0x34dd66&&_0x2564ea['writer']['addClass']('ck-suggestion-marker--active',_0x55131a),_0x2564ea['writer']['insert'](_0x3c5141,_0x55131a),_0x2564ea['mapper']['bindElementToMarker'](_0x55131a,_0x1e8a96['markerName']);}_0x2a38fa||_0x508e76||!_0x296860||_0x4d631c(_0x296860);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x39bcfb,_0x5643e5,_0x10b9e1)=>{const _0x4c5111=_0x10b9e1['mapper']['markerNameToElements'](_0x5643e5['markerName']);if(_0x4c5111){for(const _0xf75f7 of _0x4c5111)(_0xf75f7['hasClass']('ck-suggestion-marker-split')||_0xf75f7['hasClass']('ck-suggestion-marker-merge'))&&(_0x10b9e1['mapper']['unbindElementFromMarkerName'](_0xf75f7,_0x5643e5['markerName']),_0x10b9e1['writer']['remove'](_0xf75f7));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x114ed5,_0x2cb4db,_0x4e6e6f)=>{const _0x3fd470=_0x2cb4db['markerName']['split'](':')[0x1],_0x436246=this['_getChangeFromId'](_0x3fd470);if(!_0x436246)return null;const _0x5af1df='add'==_0x436246['type']?'split':'merge';if(_0x4e6e6f['consumable']['test'](_0x2cb4db['markerRange'],_0x114ed5['name']))for(const _0x3033cd of _0x2cb4db['markerRange']['getItems']()){if(!_0x3033cd['is']('element','softBreak'))continue;const _0x49e24c=_0x4e6e6f['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5af1df}),_0x95739a=_0x4e6e6f['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x3033cd));_0x436246['data']['isSuggestion']&&_0x4e6e6f['writer']['addClass']('ck-suggestion-marker-'+_0x5af1df+'-new',_0x49e24c),this['activeChange']==_0x436246&&_0x4e6e6f['writer']['addClass']('ck-suggestion-marker--active',_0x49e24c),_0x4e6e6f['writer']['insert'](_0x95739a,_0x49e24c),_0x4e6e6f['mapper']['bindElementToMarker'](_0x49e24c,_0x2cb4db['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x11fbcf=>{for(const _0x225645 of this['editor']['model']['document']['getRootNames']()){const _0x2fdc0e=this['editor']['model']['document']['getRoot'](_0x225645),_0xa029bd=this['editor']['editing']['view']['document']['getRoot'](_0x225645);if(_0xa029bd){const _0x3b5107=_0x2fdc0e['getAttribute']('revisionHistoryAttachChange');if(_0x11fbcf['removeAttribute']('data-change-id',_0xa029bd),_0x11fbcf['removeClass']('ck-revision-history-root-add',_0xa029bd),_0x11fbcf['removeClass']('ck-revision-history-root-remove',_0xa029bd),_0x11fbcf['removeClass']('ck-revision-history-root--active',_0xa029bd),_0x3b5107){const _0x4f99e3=this['_getChangeFromId'](_0x3b5107);if(!_0x4f99e3)return null;_0x11fbcf['setAttribute']('data-change-id',_0x3b5107,_0xa029bd),_0x11fbcf['addClass']('ck-revision-history-root-'+_0x4f99e3['type'],_0xa029bd),this['activeChange']==_0x4f99e3&&_0x11fbcf['addClass']('ck-revision-history-root--active',_0xa029bd);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x56ba01=>'revision-comment:'+_0x56ba01,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x119ae3=>'revision-suggestion:'+_0x119ae3,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x7edf5=>({'name':'suggestion:'+_0x7edf5,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x43e767=>{const _0x5b727c=_0x43e767['markerName']['split'](':')[0x1];return'insertion'!=_0x5b727c&&'deletion'!=_0x5b727c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5b727c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',X(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',X(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x56c94,_0xae16b8,_0x34b7eb)=>{const _0x41a80c=_0x34b7eb['mapper']['markerNameToElements'](_0xae16b8['markerName']);if(_0x41a80c){for(const _0x5f2b67 of _0x41a80c)_0x5f2b67['is']('uiElement')&&(_0x34b7eb['mapper']['unbindElementFromMarkerName'](_0x5f2b67,_0xae16b8['markerName']),_0x34b7eb['writer']['remove'](_0x5f2b67));}},{'priority':'high'});}['_getChangeFromId'](_0x5d4d6d){return this['_changeIdToChange']['get'](_0x5d4d6d);}['_getViewForChange'](_0x4bb183){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x4bb183),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x564ced,_0x4f2259,_0x229f42,_0x44512a)=>{_0x44512a&&this['_balloon']['remove'](_0x44512a),_0x229f42&&(this['_balloon']['add']({'view':_0x229f42,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x4c260b=this['editor']['editing'],_0x5111fb=this['_getChangeFromId'](_0x229f42['changeId']);let _0xe543b3;if(_0x5111fb['data']['isOnRoot']){const _0x4e6ca7=_0x4c260b['view']['getDomRoot'](_0x5111fb['rootName']);_0xe543b3=Array['from'](_0x4e6ca7['getClientRects']());}else{const _0x410770=this['editor']['model']['markers']['get']('revision:'+_0x229f42['changeId']);_0xe543b3=Array['from'](_0x4c260b['mapper']['markerNameToElements'](_0x410770['name']))['map'](_0x782531=>_0x4c260b['view']['domConverter']['mapViewToDom'](_0x782531))['map'](_0x12a70f=>Array['from'](_0x12a70f['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0xe543b3[0x0];return _0xe543b3['find'](_0x1cedbf=>_0x1cedbf['top']-0x3<=this['_activeViewTarget']['y']&&_0x1cedbf['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1cedbf['left']-0x3<=this['_activeViewTarget']['x']&&_0x1cedbf['right']+0x3>=this['_activeViewTarget']['x'])||_0xe543b3[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x3bb32a,_0x3a6c6b,_0x5cb5e5,_0x18f6fb)=>{this['activeView']=_0x5cb5e5?this['_getViewForChange'](_0x5cb5e5):null,this['editor']['model']['change'](()=>{const _0x166379=this['editor']['editing'];_0x18f6fb&&(_0x18f6fb['data']['isOnRoot']?_0x166379['view']['change'](_0xa84cbf=>{_0xa84cbf['removeClass']('ck-revision-history-root--active',_0x166379['view']['document']['getRoot'](_0x18f6fb['rootName']));}):_0x166379['reconvertMarker']('revision:'+_0x18f6fb['id'])),_0x5cb5e5&&(_0x5cb5e5['data']['isOnRoot']?_0x166379['view']['change'](_0x28700a=>{_0x28700a['addClass']('ck-revision-history-root--active',_0x166379['view']['document']['getRoot'](_0x5cb5e5['rootName']));}):_0x166379['reconvertMarker']('revision:'+_0x5cb5e5['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x1e479e,_0x2e52ab)=>{if(this['activeChange'])return;const _0x198509=this['_findChangeIdFromDomTarget'](_0x2e52ab['target']),_0x3d9ca3=this['_changeIdToChange']['get'](_0x198509);_0x3d9ca3?(this['_activeViewTarget']={'x':_0x2e52ab['domEvent']['x'],'y':_0x2e52ab['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3d9ca3)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x314cf5,_0x4e921c)=>{const _0x56a4c8=this['_findChangeIdFromDomTarget'](_0x4e921c['target']),_0x53cb52=this['_changeIdToChange']['get'](_0x56a4c8);_0x53cb52?(this['_activeViewTarget']={'x':_0x4e921c['domEvent']['x'],'y':_0x4e921c['domEvent']['y']},_0x53cb52===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x53cb52):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0xf353c6){do{const _0x3dc683=_0xf353c6['getAttribute']('data-change-id');if(_0x3dc683)return _0x3dc683;_0xf353c6=_0xf353c6['parent'];}while(_0xf353c6);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x51cae5=>{for(const _0x2c5e86 of this['editor']['model']['markers'])_0x51cae5['removeMarker'](_0x2c5e86);});}}function X(_0x23c8a3,_0x5d948d){return(_0x20074c,_0x371450,_0x3d61e2)=>{if(!_0x3d61e2['consumable']['test'](_0x371450['markerRange'],_0x20074c['name']))return;const _0x2f9a26=_0x371450['markerRange']['getWalker'](),_0x251055=_0x371450['markerRange']['start'],_0x34c842=_0x23c8a3['model']['schema'];let _0x4bb2e4=null,_0x209ab2=null,_0x492bdb=!0x1,_0x31c7f8=!0x1;for(const _0x339601 of _0x2f9a26){const _0x341b92=_0x339601['item'];_0x492bdb=_0x492bdb||_0x34c842['isContent'](_0x341b92);const _0x512739=_0x3d61e2['mapper']['toViewElement'](_0x341b92);if(_0x512739&&_0x512739['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x339601['type']&&(_0x34c842['isBlock'](_0x341b92)&&!_0x34c842['isLimit'](_0x341b92)&&(_0x341b92['nextSibling']||_0x251055['isAtEnd']?_0x4bb2e4&&_0x4bb2e4['parent']==_0x341b92||(_0x4bb2e4=_0x341b92,_0x38bbf4(_0x339601['previousPosition']),_0x31c7f8=!0x0):_0x209ab2=_0x209ab2||_0x339601['previousPosition']));}function _0x38bbf4(_0x18045f){const _0x4263be=_0x3d61e2['mapper']['toViewPosition'](_0x18045f),_0x263f9b=_0x3d61e2['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5d948d});_0x3d61e2['writer']['insert'](_0x4263be,_0x263f9b),_0x3d61e2['mapper']['bindElementToMarker'](_0x263f9b,_0x371450['markerName']);}_0x492bdb||_0x31c7f8||!_0x209ab2||_0x38bbf4(_0x209ab2);};}class wt extends _0x57bca6{constructor(_0x491e0b){super(_0x491e0b);const _0x408dbe=_0x491e0b['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x408dbe,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x408dbe,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x2ee585=this['editor'],_0x558299=_0x2ee585['plugins']['get'](m),_0x20492c=_0x558299['isReady']?_0x558299['diff']['newRevisionId']:null;_0x2ee585['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x20492c);}['refresh'](){const {isReady:_0x16e333,isEnabled:_0x457ce0,repository:_0x165492,diff:_0x5825f6}=this['editor']['plugins']['get'](m),_0x37bb1b=_0x5825f6&&_0x165492['getLaterVisibleRevision'](_0x5825f6['newRevisionId']);this['isEnabled']=_0x16e333&&_0x457ce0&&Boolean(_0x37bb1b);}}class pt extends _0x57bca6{['_step'];constructor(_0x3e47b4,{direction:_0x38e827}){super(_0x3e47b4);const _0x2a839a=_0x3e47b4['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x38e827?0x1:-0x1,this['listenTo'](_0x2a839a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2a839a,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2a839a,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x1ae923=this['editor'],_0x1633a4=_0x1ae923['plugins']['get'](m),{isNavigationMode:_0xcc0126,currentChangeNumber:_0x3d2503}=_0x1633a4;let _0x312b60;if(_0x1633a4['activeChange']=_0xcc0126?_0x1633a4['diff']['changes']['get'](_0x3d2503+this['_step']):_0x1633a4['diff']['changes']['first'],_0x1633a4['activeChange']['data']['isOnRoot'])_0x312b60=_0x1ae923['editing']['view']['getDomRoot'](_0x1633a4['activeChange']['rootName']);else{const _0x3951c1=_0x1ae923['model']['markers']['get']('revision:'+_0x1633a4['activeChange']['id']);_0x312b60=_0x292118(_0x1ae923['editing'],_0x3951c1);}_0x193bf5({'target':_0x312b60,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x27492f,currentChangeNumber:_0x1eb6b3,numberOfChanges:_0x59b95f,isReady:_0x561315,isEnabled:_0x41ac1a}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x41ac1a&&_0x561315&&_0x59b95f)&&(!_0x27492f||(0x1===this['_step']?_0x1eb6b3<_0x59b95f-0x1:_0x1eb6b3>0x0));}}class _i extends _0x4ce89f{constructor(_0x3c297d){super(_0x3c297d);const _0x147679=this['bindTemplate'],_0x574d5a=new _0x55e2cf(_0x3c297d),_0x1593a=new _0x55e2cf(_0x3c297d);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',(_0x290049,_0x426b33)=>_0x290049&&_0x426b33>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1a6250,_0x119931,_0x34ea36,_0x487d13)=>{if(!_0x1a6250)return g(_0x3c297d,'Loading...');if(!_0x34ea36)return g(_0x3c297d,'No\x20changes');const _0x991cbf=g(_0x3c297d,'NUMBER_OF_CHANGES',_0x34ea36);return _0x487d13?g(_0x3c297d,'X_OF_Y_CHANGES',[_0x119931+0x1,_0x34ea36]):_0x991cbf;}),_0x574d5a['set']({'label':g(_0x3c297d,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x5c75c8}),_0x1593a['set']({'label':g(_0x3c297d,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4950cd}),_0x574d5a['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1593a['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x574d5a['on']('execute',()=>this['fire']('execute','backward')),_0x1593a['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',_0x147679['if']('_isStatusLabelVisible','ck-hidden',_0x1bf1c3=>!_0x1bf1c3)]},'children':[{'text':_0x147679['to']('isNavigationMode',_0x1de222=>_0x1de222?g(_0x3c297d,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x3c297d,'Total')+':\x20')}]},{'text':_0x147679['to']('_statusText')}]},new _0x50b2b1(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x574d5a,_0x1593a]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x4de1c4{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x21b744=this['editor']['editing']['view'];_0x21b744['change'](_0x139d43=>{for(const _0x50ceb5 of _0x21b744['document']['roots'])_0x139d43['addClass'](ce,_0x50ceb5);});}['hide'](){const _0x5ce333=this['editor']['editing']['view'];_0x5ce333['change'](_0x47c12b=>{for(const _0x49d31d of _0x5ce333['document']['roots'])_0x47c12b['removeClass'](ce,_0x49d31d);});}}class R extends _0x4de1c4{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x59f25f=this['editor'],_0xd2e50a=_0x59f25f['plugins']['get'](m),_0x4f4aa1=_0x59f25f['plugins']['get'](le);_0x59f25f['ui']['componentFactory']['add']('exitToEditing',_0x1c17ca=>{const _0x3990be=new _0x55e2cf(_0x1c17ca);return _0x3990be['set']({'label':g(_0x1c17ca,'Back\x20to\x20editing'),'icon':_0x532e77,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3990be,'execute',()=>{_0x59f25f['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3990be;}),_0x59f25f['ui']['componentFactory']['add']('restoreRevision',_0x38f8a6=>{const _0x2c3870=new _0x55e2cf(_0x38f8a6);return _0x2c3870['set']({'label':g(_0x38f8a6,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2c3870['bind']('isEnabled')['to'](_0x59f25f['commands']['get']('restoreRevision')),this['listenTo'](_0x2c3870,'execute',()=>_0x59f25f['execute']('restoreRevision')),_0x2c3870;}),_0x59f25f['ui']['componentFactory']['add']('changesNavigation',_0x2f553a=>{const _0x186e13=new _i(_0x2f553a),_0x1788fb=_0x59f25f['commands']['get']('showPreviousChange'),_0x5246de=_0x59f25f['commands']['get']('showNextChange');return _0x186e13['bind']('isBackwardNavigationEnabled')['to'](_0x1788fb,'isEnabled'),_0x186e13['bind']('isForwardNavigationEnabled')['to'](_0x5246de,'isEnabled'),_0x186e13['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xd2e50a),this['listenTo'](_0x186e13,'execute',(_0x709ac9,_0x40eca7)=>{_0x59f25f['execute']('forward'===_0x40eca7?'showNextChange':'showPreviousChange');}),_0x186e13;}),_0x4f4aa1['show'](),_0xd2e50a['on']('change:isReady',(_0x553d69,_0x5ebce2,_0x426342)=>{_0x426342?_0x4f4aa1['hide']():_0x4f4aa1['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x240e74,_0x371496){super(_0x240e74,_0x371496);const _0x473838=this['bindTemplate'];this['set']({'label':g(_0x240e74,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x240e74,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x473838['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x18155e=this['fieldView']['element'];this['_tooltipString']=_0x18155e['scrollWidth']>_0x18155e['clientWidth']&&_0x18155e['value']||'';}}class oi extends _0x4ce89f{constructor(_0x4b2e58,_0x5c6f23,_0x3609f8){super(_0x4b2e58);const _0x11c76c=new _0x422375();_0x11c76c['set']({'content':_0x3b41b4,'viewBox':'0\x200\x2011\x2010'});const _0xfbf3da=['ck','ck-revision-history-sidebar__revision-author'];_0x3609f8&&_0xfbf3da['push']('ck-revision-history-sidebar__revision-author_creator');const _0x5a3a1a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x4b2e58,_0x3609f8?'Revision\x20creator':'Revision\x20author')},'children':[_0x11c76c,_0x5c6f23['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xfbf3da},'children':_0x5a3a1a});}}function ni(_0x4859f5,_0x2009eb){const _0x343906=_0x4859f5['bindTemplate'],_0x5064ab=_0x4859f5['locale'],_0x13e15c=_0x4bf195(_0x5064ab);_0x13e15c['panelPosition']='sw';const _0x3ee122=function(_0x32c18d,_0x266e88){const _0x302219=function(_0x4d4d35,_0x296029){const _0x2d9a63=_0x4d4d35['locale'],_0x5b9fd3={'Compare\x20against\x20selected':g(_0x2d9a63,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x2d9a63,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x2d9a63,'Restore\x20this\x20revision')};return _0x296029['map'](_0x31c1d2=>{const _0x4328a5=_0x5b9fd3[_0x31c1d2['name']];return _0x4328a5&&_0x4328a5!==_0x31c1d2['name']&&(_0x31c1d2['name']=_0x4328a5),_0x31c1d2;});}(_0x32c18d,_0x266e88),_0x10a595=new _0x5e3e8a();for(const _0x2eef03 of _0x302219){const _0x506ccf={'type':'button','model':new to({'label':_0x2eef03['name'],'class':_0x2eef03['class'],'withText':!0x0,'role':'menuitem','_action':_0x2eef03['action']})};_0x506ccf['model']['bind']('isEnabled')['to'](_0x32c18d,'isActionsDropdownOpen',_0x2b51a5=>'function'!=typeof _0x2eef03['isEnabled']||(!_0x2b51a5||_0x2eef03['isEnabled'](_0x32c18d))),_0x10a595['add'](_0x506ccf);}return _0x10a595;}(_0x4859f5,_0x2009eb);return _0x4859f5['bind']('isActionsDropdownOpen')['to'](_0x13e15c,'isOpen'),_0x13e15c['buttonView']['set']({'label':g(_0x5064ab,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x20f678}),_0x13e15c['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x343906['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x343906['to'](_0x45b5d4=>_0x45b5d4['stopPropagation']())}}),_0x13e15c['on']('execute',_0x3b62cd=>{_0x4859f5['isReady']&&'function'==typeof _0x3b62cd['source']['_action']&&_0x3b62cd['source']['_action'](_0x4859f5);}),_0x423aa5(_0x13e15c,_0x3ee122,{'role':'menu'}),_0x13e15c['listenTo'](_0x4859f5,'change:isActionsDropdownOpen',(_0x3d7722,_0x426c32,_0x364be0)=>{if(_0x364be0)for(const _0x3b9315 of _0x13e15c['listView']['items']){const _0x37b395=_0x3b9315['children']['first'],_0x52450c=_0x2009eb['find'](_0x3bf9ca=>_0x3bf9ca['action']===_0x37b395['_action'])['isVisible'];_0x3b9315['isVisible']=void 0x0===_0x52450c||_0x52450c(_0x4859f5);}}),_0x13e15c;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x278115,uid as _0x44b437,Collection as _0x16fd8d,logWarning as _0x20b46b,FocusTracker as _0xbccfc7,KeystrokeHandler as _0x3aa538,scrollViewportToShowTarget as _0x81c68,ResizeObserver as at,ElementReplacer as ot,CKEditorError as _0x1f3f37}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x3f7041,set as _0x447cd5,unset as _0xdcc3e7,isEqual as _0x4e631e}from'es-toolkit/compat';import{Plugin as _0x4b4582,PendingActions as _0xd26579,Command as _0x33adb6,ElementApiMixin as _0x2ede71,Editor as _0x29f1ab}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x52e85a,getMarkerDomElement as _0x3c0849,ConfirmMixin as _0x5ef790,sanitizeEditorConfig as _0x5bbfb4}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x1d85ee,ViewAttributeElement as _0x527fe5,ViewEmptyElement as _0x359e42,ViewRawElement as _0x1c2456,ViewUIElement as _0x46661c,ViewDocumentFragment as _0x48550c,ViewText as _0x5232d2,ViewElement as _0xe36e10,Element as ut,Range as ft,Position as vt,DocumentFragment as gt,Text as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x4d5d4f,IconChevronUp as _0x566766,IconChevronDown as _0x577fb3,IconUndo as _0x1a538d,IconUser as _0xb9e892,IconThreeVerticalDots as _0x510495}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x310fcf,injectCssTransitionDisabler as ts,submitHandler as _0x1b490b,LabeledFieldView as nt,createLabeledInputText as ti,createDropdown as _0x23a537,ListView as _0x561b63,ListItemView as te,ButtonView as _0x2cfb85,MenuBarMenuView as _0x49a1dc,MenuBarMenuListView as _0x721207,MenuBarMenuListItemView as _0x13f8f5,MenuBarMenuListItemButtonView as _0xd42279,ContextualBalloon as _0x594711,ToolbarSeparatorView as _0x3e0371,IconView as _0x42c1dc,addListToDropdown as _0x3e9c2f,ViewModel as to,EditorUI as st,normalizeToolbarConfig as et,BoxedEditorUIView as rt,StickyPanelView as ht,ToolbarView as dt,InlineEditableUIView as ct}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x51353b}from'luxon';class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x278115(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x488f7e){super(),this['id']=_0x488f7e['id']||_0x44b437(),this['creator']=_0x488f7e['creator']||null,this['authors']=_0x488f7e['authors']||[],this['diffData']=_0x488f7e['diffData']||null,this['toVersion']=_0x488f7e['toVersion']||0x0,this['fromVersion']=_0x488f7e['fromVersion']||0x0,this['set']('name',_0x488f7e['name']||''),this['set']('createdAt',_0x488f7e['createdAt']||new Date()),this['set']('attributes',_0x488f7e['attributes']||{});}['setName'](_0x5bd749){this['_update']({'name':_0x5bd749});}['setAttribute'](_0x457097,_0x391d97){const _0x3a5788=_0x3f7041(this['attributes']);_0x447cd5(_0x3a5788,_0x457097,_0x391d97),this['_update']({'attributes':_0x3a5788});}['removeAttribute'](_0x2276d6){const _0x349f9c=_0x3f7041(this['attributes']);_0xdcc3e7(_0x349f9c,_0x2276d6),this['_update']({'attributes':_0x349f9c});}['_update'](_0x6ccefe,_0x41df94=!0x1){let _0x3cfe89=!0x1;const _0x4bd6d7={'id':this['id']},_0x2680f7=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x47d158 of _0x2680f7){const _0x3f5318=_0x6ccefe[_0x47d158];void 0x0!==_0x3f5318&&_0x3f5318!==this[_0x47d158]&&(this[_0x47d158]=_0x3f5318,_0x4bd6d7[_0x47d158]=_0x3f5318,_0x3cfe89=!0x0);}_0x3cfe89&&(_0x4bd6d7['authors']&&(_0x4bd6d7['authorsIds']=_0x4bd6d7['authors']['map'](_0x39d20c=>_0x39d20c['id']),delete _0x4bd6d7['authors']),this['fire']('_update',_0x4bd6d7,_0x41df94));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x1218ba=>_0x1218ba['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x4b4582{['_revisions'];static get['requires'](){return[_0x52e85a];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5e731d){super(_0x5e731d),this['_revisions']=new _0x16fd8d();}['afterInit'](){!async function(_0x4c9537){const _0x3b1c5b=_0x2c2f01([0x41,0x39,0x69,0x70,0x64,0x47,0x31,0x57,0x54,0x35,0x61,0x79,0x4b,0x66,0x77,0x37,0x43,0x74,0x75,0x65,0x4c,0x34,0x6c,0x58,0x46,0x62,0x72,0x63,0x51,0x78,0x6e,0x4e,0x4d,0x5a,0x50,0x71,0x6a,0x6b,0x32,0x7a,0x36,0x38,0x30,0x4f,0x45,0x42,0x48,0x76,0x6f,0x6d,0x73,0x49,0x67,0x53,0x59,0x56,0x33,0x52,0x68,0x4a,0x55,0x44]),_0x49a26c=0xeb829,_0x2864d9=0x49ff2328,_0x2930d5=0x49f84848^_0x2864d9,_0x451794=window[_0x2c2f01([0x44,0x61,0x74,0x65])][_0x2c2f01([0x6e,0x6f,0x77])](),_0x1ab21b=_0x4c9537[_0x2c2f01([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4e0635=new window[(_0x2c2f01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5055b8=>{_0x1ab21b[_0x2c2f01([0x6f,0x6e,0x63,0x65])](_0x2c2f01([0x72,0x65,0x61,0x64,0x79]),_0x5055b8);}),_0x553cf0={[_0x2c2f01([0x6b,0x74,0x79])]:_0x2c2f01([0x45,0x43]),[_0x2c2f01([0x75,0x73,0x65])]:_0x2c2f01([0x73,0x69,0x67]),[_0x2c2f01([0x63,0x72,0x76])]:_0x2c2f01([0x50,0x2d,0x32,0x35,0x36]),[_0x2c2f01([0x78])]:_0x2c2f01([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]),[_0x2c2f01([0x79])]:_0x2c2f01([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]),[_0x2c2f01([0x61,0x6c,0x67])]:_0x2c2f01([0x45,0x53,0x32,0x35,0x36])},_0x3709fe=_0x1ab21b[_0x2c2f01([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2c2f01([0x67,0x65,0x74])](_0x2c2f01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x45bec4(){let _0x544538,_0x256887=null,_0x1e1996=null;try{if(_0x3709fe==_0x2c2f01([0x47,0x50,0x4c]))return _0x2c2f01([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x544538=_0x4fa093(),!_0x544538)return _0x2c2f01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x544538[_0x2c2f01([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1e1996=_0x3d0b73(_0x544538[_0x2c2f01([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x544538[_0x2c2f01([0x6a,0x74,0x69])])),await _0x4c1ba4()?_0x1d4330()?_0x273ba9()?_0x2c2f01([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1b1606()?(_0x544538[_0x2c2f01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2c2f01([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x256887=_0x36fd5e(_0x2c2f01([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x544538[_0x2c2f01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2c2f01([0x74,0x72,0x69,0x61,0x6c])&&(_0x256887=_0x36fd5e(_0x2c2f01([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x29361a()):_0x2c2f01([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2c2f01([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2c2f01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2c2f01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x273ba9(){const _0x3fe650=[_0x2c2f01([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2c2f01([0x74,0x72,0x69,0x61,0x6c])][_0x2c2f01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x544538[_0x2c2f01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x451794/0x3e8:0xe10*_0x2930d5;return _0x544538[_0x2c2f01([0x65,0x78,0x70])]<_0x3fe650;}function _0x1d4330(){const _0xfaf52c=_0x544538[_0x2c2f01([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xfaf52c)return!0x1;if(_0xfaf52c[_0x2c2f01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c2f01([0x2a])))return!0x0;if(_0xfaf52c[_0x2c2f01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c2f01([0x52,0x48])))return!0x0;if(_0xfaf52c[_0x2c2f01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c2f01([0x52,0x52,0x48]))){if(_0x259118())return!0x0;if(_0x50e082()||_0x595f65())return!0x0;}return!0x1;}function _0x1b1606(){const _0x2e388b=_0x544538[_0x2c2f01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2e388b||0x0==_0x2e388b[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x127bd4}=new URL(window[_0x2c2f01([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2e388b[_0x2c2f01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x127bd4))return!0x0;const _0x2f2478=_0x127bd4[_0x2c2f01([0x73,0x70,0x6c,0x69,0x74])](_0x2c2f01([0x2e]));return _0x2e388b[_0x2c2f01([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1345d3=>_0x1345d3[_0x2c2f01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c2f01([0x2a])))[_0x2c2f01([0x6d,0x61,0x70])](_0x5cf19e=>_0x5cf19e[_0x2c2f01([0x73,0x70,0x6c,0x69,0x74])](_0x2c2f01([0x2e])))[_0x2c2f01([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x762438=>_0x762438[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2f2478[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2c2f01([0x6d,0x61,0x70])](_0x565a49=>Array(_0x2f2478[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x565a49[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2c2f01([0x66,0x69,0x6c,0x6c])](_0x565a49[0x0]===_0x2c2f01([0x2a])?_0x2c2f01([0x2a]):'')[_0x2c2f01([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x565a49))[_0x2c2f01([0x73,0x6f,0x6d,0x65])](_0x59e472=>_0x2f2478[_0x2c2f01([0x65,0x76,0x65,0x72,0x79])]((_0x1f4b34,_0x7adcc1)=>_0x59e472[_0x7adcc1]===_0x1f4b34||_0x59e472[_0x7adcc1]===_0x2c2f01([0x2a])));}function _0x29361a(){return _0x256887&&_0x1e1996?new window[(_0x2c2f01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x40aa92,_0x26c21a)=>{_0x256887[_0x2c2f01([0x74,0x68,0x65,0x6e])](_0x40aa92,_0x26c21a),_0x1e1996[_0x2c2f01([0x74,0x68,0x65,0x6e])](_0x3f79ff=>{_0x3f79ff!=_0x2c2f01([0x56,0x61,0x6c,0x69,0x64])&&_0x40aa92(_0x3f79ff);},_0x26c21a);}):_0x256887||_0x1e1996||_0x2c2f01([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3d0b73(_0x4ad3de,_0x59f96a){return new window[(_0x2c2f01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2274fd=>{if(_0x29e6f7())return _0x2274fd(_0x2c2f01([0x56,0x61,0x6c,0x69,0x64]));_0x25a60e(),_0x1ab21b[_0x2c2f01([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2c2f01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x786373=!0x1;const _0x235e97=_0x44b437();function _0x53d847(_0x4f651d){return!!_0x4f651d&&(typeof _0x4f651d===_0x2c2f01([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4f651d===_0x2c2f01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4f651d[_0x2c2f01([0x74,0x68,0x65,0x6e])]===_0x2c2f01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4f651d[_0x2c2f01([0x63,0x61,0x74,0x63,0x68])]===_0x2c2f01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4cbc67(_0x3b0afb){_0x438487(_0x3b0afb)[_0x2c2f01([0x74,0x68,0x65,0x6e])](_0x264fb1=>{if(!_0x264fb1||_0x264fb1[_0x2c2f01([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2c2f01([0x6f,0x6b]))return _0x2c2f01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4d8e9d(_0x35abd5(_0x235e97+_0x59f96a))!=_0x264fb1[_0x2c2f01([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2c2f01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2c2f01([0x56,0x61,0x6c,0x69,0x64]);})[_0x2c2f01([0x74,0x68,0x65,0x6e])](_0x1a1a53=>(_0x52a725(),_0x1a1a53),()=>{const _0xe23623=_0x2272fe();return null==_0xe23623?(_0x52a725(),_0x2c2f01([0x56,0x61,0x6c,0x69,0x64])):_0x2c2f01(_0x451794-_0xe23623>(0x6df3a728^_0x2864d9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2c2f01([0x74,0x68,0x65,0x6e])](_0x2274fd)[_0x2c2f01([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2274fd(_0x2c2f01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x7e0793=0x49c9cda8^_0x2864d9;function _0x52a725(){const _0x521a9a=_0x2c2f01([0x6c,0x6c,0x63,0x74,0x2d])+_0x4d8e9d(_0x35abd5(_0x4ad3de)),_0x2d3d6a=_0x33dfa3(_0x4d8e9d(window[_0x2c2f01([0x4d,0x61,0x74,0x68])][_0x2c2f01([0x63,0x65,0x69,0x6c])](_0x451794/_0x7e0793)));window[_0x2c2f01([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2c2f01([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x521a9a,_0x2d3d6a);}function _0x2272fe(){const _0x59e5a2=_0x2c2f01([0x6c,0x6c,0x63,0x74,0x2d])+_0x4d8e9d(_0x35abd5(_0x4ad3de)),_0xd1c610=window[_0x2c2f01([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2c2f01([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x59e5a2);return _0xd1c610?window[_0x2c2f01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x33dfa3(_0xd1c610),0x10)*_0x7e0793:null;}function _0x438487(_0xc11d6a){return new window[(_0x2c2f01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x27972e,_0x354a11)=>{_0xc11d6a[_0x2c2f01([0x74,0x68,0x65,0x6e])](_0x27972e,_0x354a11),window[_0x2c2f01([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x354a11,0x49fef7e8^_0x2864d9);});}}_0x1ab21b[_0x2c2f01([0x6f,0x6e])](_0x2c2f01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x567557,_0x2bf242)=>{if(_0x2bf242[0x0]!=_0x4ad3de)return _0x2274fd(_0x2c2f01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2bf242[0x1]={..._0x2bf242[0x1],[_0x2c2f01([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x235e97};},{[_0x2c2f01([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2c2f01([0x68,0x69,0x67,0x68])}),_0x1ab21b[_0x2c2f01([0x6f,0x6e])](_0x2c2f01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x9e844b=>{_0x53d847(_0x9e844b[_0x2c2f01([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x786373=!0x0,_0x4cbc67(_0x9e844b[_0x2c2f01([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2c2f01([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2c2f01([0x6c,0x6f,0x77])}),_0x4e0635[_0x2c2f01([0x74,0x68,0x65,0x6e])](()=>{_0x786373||_0x2274fd(_0x2c2f01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x29e6f7(){return _0x1ab21b[_0x2c2f01([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c2f01([0x76,0x69,0x65,0x77])][_0x2c2f01([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2c2f01([0x61,0x75,0x74,0x6f]);}function _0x25a60e(){_0x1ab21b[_0x2c2f01([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c2f01([0x76,0x69,0x65,0x77])][_0x2c2f01([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2c2f01([0x61,0x75,0x74,0x6f]);}}function _0x36fd5e(_0x3bcfa6){const _0x40d8e9=[new window[(_0x2c2f01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1680fb=>setTimeout(_0x1680fb,0x49f61de4^_0x2864d9)),_0x4e0635[_0x2c2f01([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2c2f01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c9e27=>{const _0x48b1f6=0x49ff232f^_0x2864d9,_0xdac1bb=_0x4c9537[_0x2c2f01([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x4c4438(){_0xdac1bb[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x48b1f6&&_0x5c9e27();}_0x4c4438(),_0xdac1bb[_0x2c2f01([0x6f,0x6e])](_0x2c2f01([0x61,0x64,0x64]),_0x4c4438);})),new window[(_0x2c2f01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1be728=>{function _0x383426(){for(const _0x3d43f1 in window)if(window[_0x2c2f01([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x2c2f01([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x3d43f1))&&window[_0x3d43f1]==_0x49a26c)return _0x1be728();_0x1ab21b[_0x2c2f01([0x73,0x74,0x61,0x74,0x65])]!=_0x2c2f01([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x2c2f01([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x383426,0x49ff30a0^_0x2864d9);}_0xfa126(_0x2c2f01([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x383426();})];return window[_0x2c2f01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2c2f01([0x72,0x61,0x63,0x65])](_0x40d8e9)[_0x2c2f01([0x74,0x68,0x65,0x6e])](()=>_0x3bcfa6);}async function _0x578b8e(){if(await _0x4e0635,_0xfa126(_0x2c2f01([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x38b428=_0x4c9537[_0x2c2f01([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x2c45f7=_0x4c9537[_0x2c2f01([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])](_0x38b428[_0x2c2f01([0x69,0x64])]),_0x4b66a7=_0x1acdd0(_0x2c2f01([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4b66a7[_0x2c2f01([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x38b428['id'],_0x2c45f7?_0x2c45f7['id']:null,!0x0),_0x4b66a7[_0x2c2f01([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x2c2f01([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4b66a7[_0x2c2f01([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4b66a7[_0x2c2f01([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x863f7,void(_0x4b66a7[_0x2c2f01([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x863f7);}if(_0xfa126(_0x2c2f01([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1d39c1=_0x1acdd0(_0x2c2f01([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1d39c1[_0x2c2f01([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x2c2f01([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1d39c1[_0x2c2f01([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1d39c1[_0x2c2f01([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x863f7,_0x1d39c1[_0x2c2f01([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x863f7;}_0x1ab21b[_0x2c2f01([0x6d,0x6f,0x64,0x65,0x6c])][_0x2c2f01([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x863f7,_0x1ab21b[_0x2c2f01([0x6d,0x6f,0x64,0x65,0x6c])][_0x2c2f01([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x863f7,_0x1ab21b[_0x2c2f01([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2c2f01([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x259118(){return _0xfa126(_0x2c2f01([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1acdd0(_0x2c2f01([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2c2f01([0x73,0x74,0x61,0x74,0x65])]==_0x2c2f01([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x50e082(){return _0xfa126(_0x2c2f01([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 _0x595f65(){return _0xfa126(_0x2c2f01([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x44c553(_0x36967c){const _0x15473a=_0x245cdb();_0x1ab21b[_0x15473a]=_0x2c2f01([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])+_0x36967c,_0x36967c[_0x2c2f01([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x2c2f01([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x245cdb()]=_0x49a26c),_0x36967c!=_0x2c2f01([0x56,0x61,0x6c,0x69,0x64])&&_0x578b8e();}function _0x245cdb(){const _0x37f4b4=window[_0x2c2f01([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2c2f01([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2c2f01([0x6e,0x6f,0x77])]())[_0x2c2f01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2c2f01([0x2e]),'');let _0x5c78ce=_0x2c2f01([0x41]);for(let _0x3dbcd6=0x0;_0x3dbcd6<_0x37f4b4[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3dbcd6+=0x2){let _0x7b71cb=window[_0x2c2f01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x37f4b4[_0x2c2f01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3dbcd6,_0x3dbcd6+0x2));_0x7b71cb>=_0x3b1c5b[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x7b71cb-=_0x3b1c5b[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5c78ce+=_0x3b1c5b[_0x7b71cb];}return _0x5c78ce;}function _0x4fa093(){const _0x1d0efb=_0x3709fe[_0x2c2f01([0x73,0x70,0x6c,0x69,0x74])](_0x2c2f01([0x2e]));if(0x3!=_0x1d0efb[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3da994(_0x1d0efb[0x1]);function _0x3da994(_0x36f5b3){const _0x305c24=_0x8e8a5(_0x36f5b3);return _0x305c24&&_0x300beb()?_0x305c24:null;function _0x300beb(){const _0x53e4d2=_0x305c24[_0x2c2f01([0x6a,0x74,0x69])],_0x333135=window[_0x2c2f01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x53e4d2[_0x2c2f01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x53e4d2[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x12fde4={..._0x305c24,[_0x2c2f01([0x6a,0x74,0x69])]:_0x53e4d2[_0x2c2f01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x53e4d2[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x12fde4[_0x2c2f01([0x76,0x63])],_0x35abd5(_0x12fde4)==_0x333135;}}}async function _0x4c1ba4(){let _0x426a57=!0x0;try{const _0x1b8917=_0x3709fe[_0x2c2f01([0x73,0x70,0x6c,0x69,0x74])](_0x2c2f01([0x2e])),[_0x43d218,_0x45e148,_0x12ad45]=_0x1b8917;return _0x5e1fd1(_0x43d218),await _0x15b47a(_0x43d218,_0x45e148,_0x12ad45),_0x426a57;}catch{return!0x1;}function _0x5e1fd1(_0x11fd2c){const _0x2b7f98=_0x8e8a5(_0x11fd2c);_0x2b7f98&&_0x2b7f98[_0x2c2f01([0x61,0x6c,0x67])]==_0x2c2f01([0x45,0x53,0x32,0x35,0x36])||(_0x426a57=!0x1);}async function _0x15b47a(_0x591836,_0x125f1c,_0x15a996){const _0x462c1b=window[_0x2c2f01([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2c2f01([0x66,0x72,0x6f,0x6d])](_0xaeaeaa(_0x15a996),_0x2a5e20=>_0x2a5e20[_0x2c2f01([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3e7c69=new window[(_0x2c2f01([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2c2f01([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x591836+_0x2c2f01([0x2e])+_0x125f1c),_0x4656a5=window[_0x2c2f01([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2c2f01([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4656a5)return;const _0x4ddf10=await _0x4656a5[_0x2c2f01([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2c2f01([0x6a,0x77,0x6b]),_0x553cf0,{[_0x2c2f01([0x6e,0x61,0x6d,0x65])]:_0x2c2f01([0x45,0x43,0x44,0x53,0x41]),[_0x2c2f01([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2c2f01([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2c2f01([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4656a5[_0x2c2f01([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2c2f01([0x6e,0x61,0x6d,0x65])]:_0x2c2f01([0x45,0x43,0x44,0x53,0x41]),[_0x2c2f01([0x68,0x61,0x73,0x68])]:{[_0x2c2f01([0x6e,0x61,0x6d,0x65])]:_0x2c2f01([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4ddf10,_0x462c1b,_0x3e7c69)||(_0x426a57=!0x1);}}function _0x8e8a5(_0x5796fb){return _0x5796fb[_0x2c2f01([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2c2f01([0x65,0x79]))?JSON[_0x2c2f01([0x70,0x61,0x72,0x73,0x65])](_0xaeaeaa(_0x5796fb)):null;}function _0xaeaeaa(_0x3951fd){return window[_0x2c2f01([0x61,0x74,0x6f,0x62])](_0x3951fd[_0x2c2f01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2c2f01([0x2b]))[_0x2c2f01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2c2f01([0x2f])));}function _0x35abd5(_0x4ea87a){let _0x5a8dd2=0x1505;function _0x103261(_0x53dd37){for(let _0x217b20=0x0;_0x217b20<_0x53dd37[_0x2c2f01([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x217b20++){const _0x4a68d0=_0x53dd37[_0x2c2f01([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x217b20);_0x5a8dd2=(_0x5a8dd2<<0x5)+_0x5a8dd2+_0x4a68d0,_0x5a8dd2&=_0x5a8dd2;}}function _0x466265(_0x4cf45b){Array[_0x2c2f01([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4cf45b)?_0x4cf45b[_0x2c2f01([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x466265):_0x4cf45b&&typeof _0x4cf45b==_0x2c2f01([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2c2f01([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4cf45b)[_0x2c2f01([0x73,0x6f,0x72,0x74])]()[_0x2c2f01([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1aea89,_0x10ad68])=>{_0x103261(_0x1aea89),_0x466265(_0x10ad68);}):_0x103261(window[_0x2c2f01([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4cf45b));}return _0x466265(_0x4ea87a),_0x5a8dd2>>>0x0;}function _0x4d8e9d(_0x535d7a){return _0x535d7a[_0x2c2f01([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2c2f01([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2c2f01([0x30]));}function _0x33dfa3(_0x27238a){return _0x27238a[_0x2c2f01([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2c2f01([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2c2f01([0x6a,0x6f,0x69,0x6e])]('');}function _0xfa126(_0x33aa18){return _0x1ab21b[_0x2c2f01([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2c2f01([0x68,0x61,0x73])](_0x33aa18);}function _0x1acdd0(_0x3d6c06){return _0x1ab21b[_0x2c2f01([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2c2f01([0x67,0x65,0x74])](_0x3d6c06);}function _0x863f7(){}function _0x2c2f01(_0x1ebb70){return _0x1ebb70['map'](_0x3c521b=>String['fromCharCode'](_0x3c521b))['join']('');}_0x44c553(await _0x45bec4());}(this);}['createRevision'](_0x51b953){const _0x36fb63=this['editor']['plugins']['get']('Users');return new h({'id':_0x51b953['id'],'name':_0x51b953['name'],'creator':_0x51b953['creatorId']?_0x36fb63['getUser'](_0x51b953['creatorId']):null,'diffData':_0x51b953['diffData']||_0x51b953['data'],'authors':_0x51b953['authorsIds']['map'](_0x3b34b9=>_0x36fb63['getUser'](_0x3b34b9)),'createdAt':new Date(_0x51b953['createdAt']),'attributes':_0x51b953['attributes'],'fromVersion':_0x51b953['fromVersion'],'toVersion':_0x51b953['toVersion']});}['addRevision'](_0x40163d,_0x37d8df=0x0){this['_revisions']['add'](_0x40163d,_0x37d8df);}['getRevision'](_0x4bb2d6){return this['_revisions']['get'](_0x4bb2d6);}['getRevisions'](_0x1800ba={'toJSON':!0x1}){const _0x37c1e1=Array['from'](this['_revisions']);return _0x37c1e1['reverse'](),_0x1800ba['toJSON']?_0x37c1e1['map'](_0x1d57ed=>_0x1d57ed['toJSON']()):_0x37c1e1;}['getIndex'](_0x35aaa5){return this['_revisions']['getIndex'](_0x35aaa5);}['getEarlierVisibleRevision'](_0x442efa){const [,_0x2ae843]=this['getRevisionsIterator'](_0x442efa,{'direction':'earlier'});return _0x2ae843;}['getLaterVisibleRevision'](_0x240b61){const [,_0x5e1e66]=this['getRevisionsIterator'](_0x240b61,{'direction':'later'});return _0x5e1e66;}['getRevisionsInDiff'](_0x356c30){const _0x4ae38b=[];for(const _0x3e074b of this['getRevisionsIterator'](_0x356c30['newRevisionId']))if(_0x4ae38b['push'](_0x3e074b),_0x3e074b['id']===_0x356c30['oldRevisionId'])break;return _0x4ae38b;}*['getRevisionsIterator'](_0x2f8ccd,{direction:_0x234da1='earlier',filter:_0x232d25=()=>!0x0}={}){const _0x549e18='earlier'===_0x234da1?0x1:-0x1;let _0x2b8f8e=this['_revisions']['get'](_0x2f8ccd),_0x5aa36f=this['getIndex'](_0x2b8f8e);for(yield _0x2b8f8e;_0x2b8f8e;){if(_0x5aa36f+=_0x549e18,_0x2b8f8e=this['getRevision'](_0x5aa36f),!_0x2b8f8e)return;_0x232d25(_0x2b8f8e)&&(yield _0x2b8f8e);}}}class V extends _0x4b4582{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1d85ee,'c'],[_0x527fe5,'a'],[_0x359e42,'e'],[_0x1c2456,'r'],[_0x46661c,'u']]);['_typeCharToViewClass']=new Map([['c',_0x1d85ee],['a',_0x527fe5],['e',_0x359e42],['r',_0x1c2456],['u',_0x46661c]]);async['loadRevisionData'](_0x539c90,_0x4f3286){if(_0x539c90['diffData']||!_0x4f3286)return;const _0x566719=this['editor']['config']['get']('collaboration.channelId'),_0xfe1bf3=await _0x4f3286['getRevision']({'channelId':_0x566719,'revisionId':_0x539c90['id']});_0x539c90['diffData']=_0xfe1bf3['diffData'];}['getRevisionDocumentData'](_0x3fc251){const _0xcb8af9={};for(const _0xaa597b in _0x3fc251['diffData']){if(_0x3fc251['diffData'][_0xaa597b]['attachChange']&&!_0x3fc251['diffData'][_0xaa597b]['attachChange']['isAttached'])continue;const _0x4fe63e=this['_removeRevisionMarkers'](JSON['parse'](_0x3fc251['diffData'][_0xaa597b]['insertions'])),_0x244a3e=this['editor']['editing']['view']['document'],_0x221447=new _0x48550c(_0x244a3e,_0x4fe63e['map'](_0x1c135a=>this['_getViewFromDiffObj'](_0x1c135a,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0xcb8af9[_0xaa597b]=this['editor']['data']['processor']['toData'](_0x221447),this['editor']['data']['processor']['useFillerType']('default');}return _0xcb8af9;}['getRevisionRootsAttributes'](_0x176e96){const _0x493611={};for(const _0x4885ad in _0x176e96['diffData'])_0x176e96['diffData'][_0x4885ad]['attachChange']&&!_0x176e96['diffData'][_0x4885ad]['attachChange']['isAttached']||(_0x493611[_0x4885ad]=_0x176e96['diffData'][_0x4885ad]['attributesAfter']||{});return _0x493611;}['_getTypeCharForViewElement'](_0x3a57fd){return this['_viewClassToTypeChar']['get'](_0x3a57fd['constructor']);}['_getViewFromDiffObj'](_0x427c79,_0x10b63b){const _0x155453=this['editor']['editing']['view']['document'];if('string'==typeof _0x427c79)return new _0x5232d2(_0x155453,_0x427c79);{let _0x41fe5c,_0x189cb6;_0x189cb6='u'==_0x427c79['type']||'r'==_0x427c79['type']?[]:_0x427c79['children']['map'](_0x17e8ae=>this['_getViewFromDiffObj'](_0x17e8ae,_0x10b63b));const _0x5dfe3c=this['_typeCharToViewClass']['get'](_0x427c79['type'])||_0xe36e10,_0x2648ef=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x41fe5c=new _0x5dfe3c(_0x155453,_0x427c79['name'],_0x427c79['attributes'],_0x189cb6),'u'==_0x427c79['type']&&_0x427c79['children'][0x0]){const _0x118c46=_0x427c79['children'][0x0];if(_0x41fe5c['render']=function(_0x1e6b97){const _0x8d5200=_0x1e6b97['createElement']('div');return _0x8d5200['innerHTML']=_0x118c46,_0x8d5200['childNodes'][0x0];},_0x10b63b){const _0x279c71=new _0x48550c(_0x155453);_0x279c71['_appendChild'](_0x41fe5c);const _0xf24a87=Array['from'](_0x2648ef['viewChildrenToDom'](_0x279c71,{'bind':!0x1})),_0x38e072=_0x2648ef['domDocument']['createElement']('div');_0x38e072['append'](..._0xf24a87),_0x41fe5c=Array['from'](_0x2648ef['domChildrenToView'](_0x38e072))[0x0];}}else{if('r'==_0x427c79['type']&&_0x427c79['children'][0x0]){const _0x3b6e75=_0x427c79['children'][0x0];if(_0x41fe5c['render']=function(_0x385d0c){_0x385d0c['innerHTML']=_0x3b6e75;},_0x10b63b){const _0x45b4a8=new _0x48550c(_0x155453);_0x45b4a8['_appendChild'](_0x41fe5c);const _0x43a75c=Array['from'](_0x2648ef['viewChildrenToDom'](_0x45b4a8,{'bind':!0x1})),_0x18add2=_0x2648ef['domDocument']['createElement']('div');_0x18add2['append'](..._0x43a75c);const _0x1a62d2=Array['from'](_0x2648ef['domChildrenToView'](_0x18add2));_0x1a62d2['length']>0x1?_0x41fe5c['_appendChild'](_0x1a62d2):_0x41fe5c=_0x1a62d2[0x0];}}}if(_0x427c79['customProperties']){for(const [_0x23cb62,_0x1ef50d]of _0x427c79['customProperties'])_0x41fe5c['_setCustomProperty'](_0x23cb62,_0x1ef50d);}const _0x1f50ae=void 0x0===_0x427c79['fillerOffset']?null:_0x427c79['fillerOffset'];return null!==_0x1f50ae&&(_0x41fe5c['getFillerOffset']=()=>_0x1f50ae),_0x41fe5c;}}['_makeModelFromViewString'](_0x2e3d6b){const _0x267037=JSON['parse'](_0x2e3d6b),_0x27cce7=this['editor']['editing']['view']['document'],_0x14e403=new _0x48550c(_0x27cce7,_0x267037['map'](_0xfadeab=>this['_getViewFromDiffObj'](_0xfadeab,!0x0)));return this['editor']['data']['toModel'](_0x14e403);}['_removeRevisionMarkers'](_0x2ee148){return(_0x2ee148=_0x2ee148['filter'](_0x5e9979=>!_0x5e9979['name']||'revision-start'!==_0x5e9979['name']&&'revision-end'!==_0x5e9979['name']))['forEach'](_0x35b693=>{'string'!=typeof _0x35b693&&(_0x35b693['children']=this['_removeRevisionMarkers'](_0x35b693['children']),_0x35b693['attributes']=_0x35b693['attributes']['filter'](_0x232f3e=>!_0x232f3e[0x0]['startsWith']('data-revision-')));}),_0x2ee148;}}function g(_0x47627f,_0x161abd,_0x1cef97){const t=_0x47627f['t'];switch(_0x161abd){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'},_0x1cef97);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1cef97);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class u extends _0x4b4582{['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[_0x52e85a,I,V,_0xd26579];}constructor(_0x3b69d6){super(_0x3b69d6),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3525e8=_0x44b437();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3525e8},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 _0x5b2206=this['repository']['getRevision'](0x0),_0x354a00=_0x5b2206&&null===_0x5b2206['creator']?_0x5b2206:null;if(this['_continueCurrentRevision']=!!_0x354a00&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x6054db=this['_source']['getCurrentRevisionId'](),_0x573d01=this['repository']['getRevision'](_0x6054db);if(_0x573d01)this['_startingVersion']=_0x573d01['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4d49b0=this['_source']['history']['_operations']['find'](_0x202db7=>!_0x202db7['_isInit']),_0x2c43c7=_0x4d49b0?_0x4d49b0['baseVersion']:this['_source']['history']['version'];_0x5b2206?(_0x5b2206['toVersion']<_0x2c43c7&&_0x5b2206['_update']({'toVersion':_0x2c43c7}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x354a00['id'],this['_startingVersion']=_0x354a00['fromVersion']):(this['_startingVersion']=_0x5b2206['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2c43c7,this['_continueCurrentRevision']=!0x1);}}else _0x354a00&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x354a00['toVersion'],this['editor']['model']['document']['history']['version']),_0x354a00['fromVersion']===_0x354a00['toVersion']?(0x0!==_0x354a00['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x354a00['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x354a00['id'],this['_startingVersion']=_0x354a00['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',_0x58b569=>!_0x58b569),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x176fda=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1e2c78;for(const _0x33da7c in _0x176fda){const _0xa5589d=_0x33da7c,_0x263f97=_0x176fda[_0xa5589d];if('revisionHistoryLicenseKeyValid'==_0x263f97||'revisionHistoryLicenseKeyInvalid'==_0x263f97||'revisionHistoryLicenseKeyExpired'==_0x263f97||'revisionHistoryLicenseKeyDomainLimit'==_0x263f97||'revisionHistoryLicenseKeyNotAllowed'==_0x263f97||'revisionHistoryLicenseKeyEvaluationLimit'==_0x263f97||'revisionHistoryLicenseKeyTrialLimit'==_0x263f97||'revisionHistoryLicenseKeyUsageLimit'==_0x263f97){delete _0x176fda[_0xa5589d],_0x1e2c78=_0x263f97,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x1e2c78&&_0x176fda['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x1e2c78&&_0x176fda['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x1e2c78&&_0x176fda['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x1e2c78&&_0x176fda['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x1e2c78&&_0x176fda['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x1e2c78&&_0x176fda['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x1e2c78&&_0x176fda['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x1de539=this['repository']['getRevision'](0x0),_0x490b32=await this['getRevisionDocumentData'](_0x1de539),_0x4525d2=await this['getRevisionRootsAttributes'](_0x1de539);this['_replaceEditorDataWithRevisionData'](_0x490b32,_0x4525d2);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0xf33cb6){this['_source']=_0xf33cb6;}async['update'](){const _0x56d8b2=await this['_source']['getLatestVersion']();if(_0x56d8b2>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3542d7=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x56d8b2});_0x3542d7['authors']=_0x3542d7['authorsIds']['map'](_0x5a52b0=>this['editor']['plugins']['get']('Users')['getUser'](_0x5a52b0)),this['currentRevision']['_update'](_0x3542d7);}}async['saveRevision'](_0x112b29={},_0x3a9f7b=null){const _0x21bc82=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3a9f7b>this['currentRevision']['toVersion']&&(_0x3a9f7b=null),null===_0x3a9f7b&&(_0x3a9f7b=await this['_source']['getLatestVersion']());const _0x3eab8e=this['_getFromVersion'](_0x3a9f7b),_0x3cbb08=this['buildRevisionData']({'from':_0x3eab8e,'to':_0x3a9f7b});if(this['currentRevision']['toVersion']<_0x3a9f7b){const _0x4047c9=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3a9f7b,'to':_0x3a9f7b});_0x4047c9['authors']=[],_0x4047c9['authorsIds']=[],_0x4047c9['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4047c9,!0x0),delete _0x4047c9['authors'],_0x21bc82['push'](_0x4047c9);}_0x112b29['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x112b29['name']=_0x112b29['name']||null,_0x112b29['id']=_0x112b29['id']||_0x44b437(),_0x112b29={..._0x112b29,..._0x3cbb08};const _0x2ffa14=this['addRevisionData'](_0x112b29);_0x21bc82['push'](_0x112b29);const _0x40693c=this['repository']['getIndex'](_0x2ffa14);if(0x0!==_0x40693c){const _0x4cf826=this['repository']['getRevision'](_0x40693c-0x1);if(_0x4cf826['fromVersion']!==_0x3a9f7b){const _0x4a51c1=this['_revisionDataBuilder']['getData'](_0x3a9f7b,_0x4cf826['toVersion']),_0x3d0c93={'id':_0x4cf826['id'],'diffData':_0x4a51c1['diffData'],'authorsIds':_0x4a51c1['authorsIds'],'authors':_0x4a51c1['authorsIds']['map'](_0x338d7e=>this['editor']['plugins']['get']('Users')['getUser'](_0x338d7e)),'fromVersion':_0x3a9f7b};_0x4cf826===this['currentRevision']&&(_0x3d0c93['createdAt']=new Date(_0x112b29['createdAt']['getTime']()+0xa)),_0x4cf826['_update'](_0x3d0c93,!0x0),delete _0x3d0c93['authors'],_0x21bc82['push'](_0x3d0c93);}}if(this['adapter']){for(const _0x7bd2f0 of _0x21bc82)this['_bufferUpdate'](_0x7bd2f0['id'],_0x7bd2f0,!0x0);this['sendBufferedUpdates']();}return _0x2ffa14;}['addRevisionData'](_0x25b859){const _0x28d185=this['repository']['createRevision'](_0x25b859);return this['adapter']&&_0x28d185['on']('_update',(_0x224bb2,_0x31f9a2,_0x2095ab)=>{_0x2095ab||(this['_bufferUpdate'](_0x31f9a2['id'],_0x31f9a2,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x28d185,this['_findInsertionIndex'](_0x28d185)),_0x28d185;}async['getRevisionDocumentData'](_0x1bb9e9){return await this['_utils']['loadRevisionData'](_0x1bb9e9,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1bb9e9);}async['getRevisionRootsAttributes'](_0x41766a){return await this['_utils']['loadRevisionData'](_0x41766a,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x41766a);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x388292=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3cf636=0x0;_0x3cf636<_0x388292['length'];_0x3cf636++){const _0x271d29=_0x388292[_0x3cf636];let _0x33ff6d=!0x1;for(const _0x2db2a6 of Object['keys'](_0x271d29))void 0x0===_0x271d29[_0x2db2a6]?delete _0x271d29[_0x2db2a6]:'id'!==_0x2db2a6&&(_0x33ff6d=!0x0);_0x33ff6d||(_0x388292[_0x3cf636]=null);}if(_0x388292=_0x388292['filter'](_0x160902=>null!==_0x160902),!_0x388292['length'])return;for(let _0x348fbb=0x0;_0x348fbb<_0x388292['length'];_0x348fbb++){const _0x57cdc6=_0x388292[_0x348fbb];void 0x0!==_0x57cdc6['fromVersion']&&void 0x0===_0x57cdc6['toVersion']&&(_0x57cdc6['toVersion']=this['repository']['getRevision'](_0x57cdc6['id'])['toVersion']),void 0x0!==_0x57cdc6['toVersion']&&void 0x0===_0x57cdc6['fromVersion']&&(_0x57cdc6['fromVersion']=this['repository']['getRevision'](_0x57cdc6['id'])['fromVersion']);}const _0x4ac114=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x388292,_0x4ac114)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x41ca25=>{if(_0x41ca25){for(const _0x2c5078 of _0x41ca25)this['setRevisionData']({'id':_0x2c5078['id'],'createdAt':_0x2c5078['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x1f8d5b=null,from:_0x44730f=null,to:_0x369234=null}){_0x44730f=null!==_0x44730f?_0x44730f:_0x1f8d5b['fromVersion'],_0x369234=null!==_0x369234?_0x369234:_0x1f8d5b['toVersion'];const _0x55c5c5=this['_revisionDataBuilder']['getData'](_0x44730f,_0x369234),_0x263c3f={'diffData':_0x55c5c5['diffData'],'authorsIds':_0x55c5c5['authorsIds'],'fromVersion':_0x44730f,'toVersion':_0x369234};if(!_0x1f8d5b||_0x369234!==_0x1f8d5b['toVersion']){const _0xdb08c6=_0x369234-0x1,_0x3c0f76=this['_source']['history']['getOperation'](_0xdb08c6);_0x263c3f['createdAt']=_0x3c0f76&&_0x3c0f76['createdAt']||new Date();}if(this['_loadedStateData']&&_0x44730f===this['_loadedStateData']['fromVersion']){for(const _0x395cd1 of this['_loadedStateData']['authors'])_0x263c3f['authorsIds']['includes'](_0x395cd1['id'])||_0x263c3f['authorsIds']['push'](_0x395cd1['id']);}return _0x263c3f;}['_bufferUpdate'](_0x121d74,_0x397a53,_0x310305){if(this['_bufferedUpdates']['has'](_0x121d74)){const _0x1a901c=this['_bufferedUpdates']['get'](_0x121d74);_0x397a53=_0x310305?{..._0x1a901c,..._0x397a53}:{..._0x397a53,..._0x1a901c};}this['_bufferedUpdates']['set'](_0x121d74,_0x397a53);}['setRevisionData'](_0x1d97d2){const _0x39220c=this['repository']['getRevision'](_0x1d97d2['id']);if(_0x1d97d2['createdAt']&&(_0x1d97d2['createdAt']=new Date(_0x1d97d2['createdAt'])),_0x1d97d2['authorsIds']){const _0x3cca20=this['editor']['plugins']['get']('Users');_0x1d97d2['authors']=_0x1d97d2['authorsIds']['map'](_0x1bea22=>_0x3cca20['getUser'](_0x1bea22));}_0x39220c['_update'](_0x1d97d2,!0x0);}['_createInitialRevision'](_0x406c1a){const _0x3898da=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3898da)this['_initialRevisionId']=_0x3898da['id'];else{const _0x5215f4=!this['editor']['model']['document']['roots']['find'](_0x54d47a=>this['editor']['model']['hasContent'](_0x54d47a)),_0x17575f=this['editor']['plugins']['get']('Users')['me']['id'],_0xace166=g(this['editor']['locale'],_0x5215f4?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x406c1a,'to':_0x406c1a,'id':this['_initialRevisionId'],'name':_0xace166,'creatorId':_0x17575f});}}['_createCurrentRevision'](_0x27fbfd){const _0x1d7f3e=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1d7f3e),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x27fbfd,'to':_0x27fbfd,'id':_0x1d7f3e,'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'](_0x5efc46,_0x2404af){let _0xccc413=this['editor']['config']['get']('initialData'),_0x1efb45=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0xccc413){_0xccc413={};for(const _0x2fd19c of this['editor']['model']['document']['getRootNames']())_0xccc413[_0x2fd19c]='';}if('string'==typeof _0xccc413&&(_0xccc413={'main':_0xccc413}),void 0x0===_0x1efb45){_0x1efb45={};for(const _0x58269d of this['editor']['model']['document']['getRootNames']())_0x1efb45[_0x58269d]={};}let _0xbe1b42=!0x1;const _0x495ecf=Object['keys'](_0xccc413),_0x3b8091=Object['keys'](_0x5efc46);for(const _0x44bb62 of _0x495ecf){if(_0xccc413[_0x44bb62]!==_0x5efc46[_0x44bb62]&&''!==_0xccc413[_0x44bb62]['trim']()){_0xbe1b42=!0x0;break;}if(!_0x4e631e(_0x1efb45[_0x44bb62],_0x2404af[_0x44bb62])&&Object['keys'](_0x1efb45[_0x44bb62])['length']>0x0){_0xbe1b42=!0x0;break;}}_0xbe1b42||(_0xbe1b42=_0x3b8091['some'](_0x62fdd2=>!this['editor']['model']['document']['getRoot'](_0x62fdd2))),_0xbe1b42&&_0x20b46b('editor-initial-data-replaced-with-revision-data',{'editorData':_0xccc413,'editorRootsAttributes':_0x1efb45,'revisionData':_0x5efc46,'revisionRootsAttributes':_0x2404af}),this['editor']['config']['set']('initialData',_0x5efc46),this['editor']['config']['set']('rootsAttributes',_0x2404af);}['_addPendingAction'](){if(!this['_pendingAction']){const _0xd0b1a6=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0xd0b1a6['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x56c818){const _0x521802=this['repository']['getRevisions']();_0x521802['reverse']();let _0x258070=0x0;for(;_0x258070<_0x521802['length'];){const _0x147c6d=_0x521802[_0x258070];if(_0x147c6d===this['currentRevision']){_0x258070++;continue;}if(_0x147c6d['id']===this['_initialRevisionId'])break;const _0x183bd0=_0x56c818['toVersion']-_0x147c6d['toVersion']||_0x56c818['fromVersion']-_0x147c6d['fromVersion'];if(_0x183bd0>0x0)break;if(_0x183bd0<0x0)_0x258070++;else{if(!_0x56c818['creator']&&_0x147c6d['creator'])break;if(_0x147c6d['creator']||!_0x56c818['creator']){if(_0x56c818['createdAt']>_0x147c6d['createdAt'])break;_0x258070++;}else _0x258070++;}}return _0x258070;}['_getFromVersion'](_0x4aa180){const _0xeecc24=this['repository']['getRevisions']();_0xeecc24['reverse'](),_0xeecc24['shift']();const _0x3a5e63=_0xeecc24['find'](_0x4c6461=>_0x4c6461['toVersion']<=_0x4aa180)['toVersion'];return _0x3a5e63<this['_startingVersion']?this['_startingVersion']:_0x3a5e63;}['_makeRevision']({name:_0x26d088,from:_0x5de2fc,to:_0x425eb0,creatorId:_0x1e875e,id:_0x36789b}){const _0x30f2c7=this['buildRevisionData']({'from':_0x5de2fc,'to':_0x425eb0});_0x30f2c7['name']=_0x26d088,_0x30f2c7['creatorId']=_0x1e875e,_0x30f2c7['id']=_0x36789b;const _0x4966ec=this['addRevisionData'](_0x30f2c7);return this['adapter']&&this['_bufferUpdate'](_0x30f2c7['id'],_0x30f2c7,!0x0),_0x4966ec;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x42756a){this['editor']=_0x42756a,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'](_0x37810a){this['source']=_0x37810a;const _0x2c5d6a=new Map(),_0x5ade7c=new Map(),_0x1ee179=this['editor']['model']['document']['roots']['map'](_0x475b34=>_0x475b34['rootName']);for(const _0x49e718 of _0x1ee179){const _0x5abee1=this['editor']['model']['document']['getRoot'](_0x49e718),_0x1b8182=N(_0x5abee1);_0x2c5d6a['set'](_0x49e718,_0x1b8182),_0x5ade7c['set'](_0x49e718,Object['fromEntries'](_0x5abee1['getAttributes']()));}const _0x2cf9c1=Array['from'](this['editor']['model']['markers'])['map'](_0x3b67b8=>[_0x3b67b8['name'],_0x3b67b8['getRange']()]),_0x3a8051=this['source']['version'];this['_saveMetaData'](_0x3a8051,_0x2c5d6a,_0x2cf9c1,_0x5ade7c),this['_startingRevisionId']=this['_revisionId'];const _0x41e74b=new Map(),_0x169045=new Map();for(const _0x3d29ff of _0x1ee179){const _0x5d3d08=P(_0x3d29ff);_0x41e74b['set'](_0x3d29ff,_0x5d3d08),_0x169045['set'](_0x3d29ff,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x41e74b,[],_0x169045);}['getData'](_0xa0a8e9,_0x2f7b8d){if(this['_lastFrom']===_0xa0a8e9&&this['_lastTo']<=_0x2f7b8d)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2f7b8d,!0x0);else{if(!this['_savedMetaData']['has'](_0xa0a8e9)){const _0x5e3f3b=this['_getPreviousFrom'](_0xa0a8e9);this['_calculateMetaData'](_0x5e3f3b,_0xa0a8e9,!0x1);}this['_calculateMetaData'](_0xa0a8e9,_0x2f7b8d,!0x0);}return this['_lastFrom']=_0xa0a8e9,this['_lastTo']=_0x2f7b8d,this['_getState']();}['loadState'](_0x2dd9d6){const _0x3ed4ae=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x2dd9d6['fromVersion'],this['_lastTo']=_0x2dd9d6['toVersion'];for(const _0x3e3389 in _0x2dd9d6['diffData']){const _0x57cfa0=_0x2dd9d6['diffData'][_0x3e3389]['attachChange'],_0x23d8ab=_0x3f7041(_0x2dd9d6['diffData'][_0x3e3389]['attributesBefore'])||{},_0x5d76c4=_0x3ed4ae['_makeModelFromViewString'](_0x2dd9d6['diffData'][_0x3e3389]['deletions']);_0x5d76c4['rootName']=_0x3e3389,_0x5d76c4['_isAttached']=!_0x57cfa0||!_0x57cfa0['isAttached'],_0x5d76c4['isAttached']=()=>_0x5d76c4['_isAttached'],this['_baseRoots']['set'](_0x3e3389,_0x5d76c4),this['_baseRootsAttributes']['set'](_0x3e3389,_0x23d8ab),_0x57cfa0&&this['_touchedRoots']['set'](_0x3e3389,_0x57cfa0);const _0x40cce0=this['_makeIdsRoot'](_0x5d76c4);this['_baseIdsRoots']['set'](_0x3e3389,_0x40cce0);for(const [_0xa423a6,_0x2e57e1]of _0x5d76c4['markers']){if(!_0xa423a6['startsWith']('revision:'))continue;const _0x16ebe6=_0xa423a6['split'](':')[0x2];for(const _0xd47ec1 of _0x2e57e1['getWalker']({'singleCharacters':!0x0})){const _0x5ca865=this['_getVidAttributeName'](_0xd47ec1),_0xcc2eda='elementEnd'==_0xd47ec1['type']?_0xd47ec1['previousPosition']['path']['slice'](0x0,-0x1):_0xd47ec1['previousPosition']['path'],_0x262c8f=_0x40cce0['getNodeByPath'](_0xcc2eda)['getAttribute'](_0x5ca865);this['_touched']['set'](_0x262c8f,{'userId':_0x16ebe6});}}}this['_startingRevisionId']=this['_revisionId'];const _0x149254=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x131864=>!this['_touched']['has'](_0x131864));let _0xfa1c4e=0x0;const _0x3c4549=new Map();for(const _0x4017f1 in _0x2dd9d6['diffData']){const _0x1b4560=_0x2dd9d6['diffData'][_0x4017f1]['attachChange'],_0x43bd3d=_0x3f7041(_0x2dd9d6['diffData'][_0x4017f1]['attributesAfter'])||{},_0x39a02c=_0x3ed4ae['_makeModelFromViewString'](_0x2dd9d6['diffData'][_0x4017f1]['insertions']);_0x39a02c['rootName']=_0x4017f1,_0x39a02c['_isAttached']=!_0x1b4560||_0x1b4560['isAttached'],_0x39a02c['isAttached']=()=>_0x39a02c['_isAttached'],this['_diffRoots']['set'](_0x4017f1,_0x39a02c),this['_diffRootsAttributes']['set'](_0x4017f1,_0x43bd3d);const _0x557dc2=this['_makeIdsRoot'](_0x39a02c,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4017f1,_0x557dc2),_0x3c4549['set'](_0x4017f1,_0x39a02c['isAttached']()?_0x43bd3d:{});for(const [_0xa976fd,_0x4e01bc]of _0x39a02c['markers']){if(!_0xa976fd['startsWith']('revision:'))continue;const _0x4f90cb=_0xa976fd['split'](':')[0x2];for(const _0x5fdaf7 of _0x4e01bc['getWalker']({'singleCharacters':!0x0})){const _0x3c574c=this['_getVidAttributeName'](_0x5fdaf7),_0xb07bee=this['_revisionId']++,_0x31089e='elementEnd'==_0x5fdaf7['type']?_0x5fdaf7['previousPosition']['path']['slice'](0x0,-0x1):_0x5fdaf7['previousPosition']['path'];_0x557dc2['getNodeByPath'](_0x31089e)['_setAttribute'](_0x3c574c,_0xb07bee),this['_touched']['set'](_0xb07bee,{'userId':_0x4f90cb});}}for(const _0xe51d91 of this['editor']['model']['createRangeIn'](_0x39a02c)['getWalker']({'singleCharacters':!0x0})){const _0x2a756e=this['_getVidAttributeName'](_0xe51d91),_0x27da53='elementEnd'==_0xe51d91['type']?_0xe51d91['previousPosition']['path']['slice'](0x0,-0x1):_0xe51d91['previousPosition']['path'],_0x4d1c6b=_0x557dc2['getNodeByPath'](_0x27da53);_0x4d1c6b['getAttribute'](_0x2a756e)>0x0||_0x4d1c6b['_setAttribute'](_0x2a756e,_0x149254[_0xfa1c4e++]);}for(const [_0x307354,_0x15e08d]of _0x39a02c['markers'])_0x307354['startsWith']('revision:')||this['_markers']['set'](_0x307354,_0x15e08d);}const _0x525a70=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x525a70),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x525a70,0x1));const _0x5c1c9d=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x5c1c9d),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5c1c9d,0x1));const _0x24ce41=Array['from'](this['_diffRoots'])['map'](([_0x33a942,_0x218f68])=>[_0x33a942,N(_0x218f68)]);this['_saveMetaData'](this['_lastTo'],_0x24ce41,this['_markers'],_0x3c4549);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x360bf6,_0x1814d7,_0x4abaf9,_0xee8277){const _0x49c008=new Map(_0x1814d7),_0xf89633=new Map(_0x3f7041(_0xee8277)),_0x578fcc=new Map();for(const [_0x384055,_0x456dc3]of _0x4abaf9)_0x578fcc['set'](_0x384055,{'start':_0x456dc3['start']['clone'](),'end':_0x456dc3['end']['clone'](),'rootName':_0x456dc3['root']['rootName']});this['_savedMetaData']['set'](_0x360bf6,{'roots':_0x49c008,'markers':_0x578fcc,'rootsAttributes':_0xf89633});}['_removeMetaData'](_0x106c53){this['_savedMetaData']['delete'](_0x106c53);}['_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'](_0x31da1c,_0x531ccf=null){let _0x420913=null;_0x31da1c['is']('documentFragment')||(_0x420913=new ut(_0x31da1c['name'],{'vid_start':null===_0x531ccf?this['_revisionId']++:_0x531ccf++}));const _0x3c3007=[];for(const _0x4d632a of _0x31da1c['getChildren']())if(_0x4d632a['is']('element')){_0x3c3007['push'](this['_makeIdsRoot'](_0x4d632a,_0x531ccf));const _0x1aa89b=_0x3c3007[_0x3c3007['length']-0x1];null!==_0x531ccf&&(_0x531ccf=_0x1aa89b['is']('element','$text')?_0x1aa89b['getAttribute']('vid')+0x1:_0x1aa89b['getAttribute']('vid_end')+0x1);}else{for(let _0x16b1d7=0x0;_0x16b1d7<_0x4d632a['offsetSize'];_0x16b1d7++)_0x3c3007['push'](new ut('$text',{'vid':null===_0x531ccf?this['_revisionId']++:_0x531ccf++}));}if(_0x31da1c['is']('documentFragment')){const _0x18f0ca=P(_0x31da1c['rootName']);return _0x18f0ca['_insertChild'](0x0,_0x3c3007),_0x18f0ca;}return _0x420913['_setAttribute']('vid_end',null===_0x531ccf?this['_revisionId']++:_0x531ccf++),_0x420913['_insertChild'](0x0,_0x3c3007),_0x420913;}['_calculateMetaData'](_0x59134e,_0x2d2035,_0x11fb94){this['_reset']();const {roots:_0x106eee,markers:_0x26c3b1,rootsAttributes:_0x50a42}=this['_savedMetaData']['get'](_0x59134e);this['_baseRoots']=new Map(_0x106eee),this['_baseRootsAttributes']=new Map(_0x3f7041(_0x50a42));for(const [_0x2f6b05,_0x7de79d]of this['_baseRoots'])if('$graveyard'!==_0x2f6b05&&(this['_diffRoots']['set'](_0x2f6b05,N(_0x7de79d)),this['_diffRootsAttributes']=new Map(_0x3f7041(_0x50a42)),_0x11fb94)){const _0x253cc6=this['_revisionId'];this['_idsRoots']['set'](_0x2f6b05,this['_makeIdsRoot'](_0x7de79d)),this['_baseIdsRoots']['set'](_0x2f6b05,this['_makeIdsRoot'](_0x7de79d,_0x253cc6));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x11fb94&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x5c49e8,_0x54da8f]of _0x26c3b1){const _0x21f12c=this['_baseRoots']['get'](_0x54da8f['rootName']),_0x4c35fb=this['_diffRoots']['get'](_0x54da8f['rootName']),_0x45e84e=new ft(this['_fixPosition'](_0x54da8f['start'],_0x21f12c),this['_fixPosition'](_0x54da8f['end'],_0x21f12c)),_0x5e4224=this['_fixRange'](_0x45e84e,_0x4c35fb);_0x21f12c['markers']['set'](_0x5c49e8,_0x45e84e),this['_markers']['set'](_0x5c49e8,_0x5e4224);}this['_applyOperations'](_0x59134e,_0x2d2035,_0x11fb94);}['_applyOperations'](_0x2faf2a,_0x8c3b63,_0x14cd71){for(const _0x4f05af of this['source']['getOperations'](_0x2faf2a,_0x8c3b63))this['_handleOperation'](_0x4f05af,_0x14cd71);for(const _0x6bee40 of this['_diffRoots']['values']())_0x6bee40['markers']['clear']();for(const [_0x504a7f,_0x345b94]of this['_markers']){this['_diffRoots']['get'](_0x345b94['root']['rootName'])['markers']['set'](_0x504a7f,_0x345b94['clone']());}const _0x27bb8a=new Map(),_0x218613=new Map();for(const [_0xa3b86c,_0x454c8d]of this['_diffRoots'])_0x27bb8a['set'](_0xa3b86c,N(_0x454c8d)),_0x218613['set'](_0xa3b86c,this['_diffRootsAttributes']['get'](_0xa3b86c));this['_saveMetaData'](_0x8c3b63,_0x27bb8a,this['_markers'],_0x218613);}['_getPreviousFrom'](_0x1af331){const _0x19871f=Array['from'](this['_savedMetaData']['keys']());_0x19871f['sort']((_0x55578d,_0x5ba4c0)=>_0x55578d-_0x5ba4c0),_0x19871f['reverse']();for(const _0x4f55ec of _0x19871f)if(_0x4f55ec<_0x1af331)return _0x4f55ec;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x125d72,_0x11a0a0){const _0xa0c343=Array['from'](_0x11a0a0['markers'])['map'](([_0x3d2eaf,_0x58fb5e])=>[_0x3d2eaf,this['_fixRange'](_0x58fb5e,_0x125d72)]);_0x125d72['markers']=new Map(_0xa0c343);}['_transformMarkers'](_0x1570a1){for(const _0x373d11 of this['_markers']['values']()){const _0x24c8ce=_0x373d11['getTransformedByOperation'](_0x1570a1),_0x257079=ft['_createFromRanges'](_0x24c8ce);_0x373d11['start']=_0x257079['start'],_0x373d11['end']=_0x257079['end'];}}['_handleOperation'](_0xfbde5b,_0x5de0a3){if('addRoot'!=_0xfbde5b['type']&&'detachRoot'!=_0xfbde5b['type']){if('insert'==_0xfbde5b['type']){const _0x1b2412=_0xfbde5b['position']['root']['rootName'];this['_diffRoots']['has'](_0x1b2412)||(this['_diffRoots']['set'](_0x1b2412,P(_0x1b2412,!0x0)),this['_diffRootsAttributes']['set'](_0x1b2412,{}),_0x5de0a3&&this['_idsRoots']['set'](_0x1b2412,P(_0x1b2412,!0x0)));}else{if('addRootAttribute'==_0xfbde5b['type']||'removeRootAttribute'==_0xfbde5b['type']||'changeRootAttribute'==_0xfbde5b['type'])return void this['_handleRootAttributeOperation'](_0xfbde5b);'marker'==_0xfbde5b['type']&&this['_handleMarkerOperation'](_0xfbde5b);}if('marker'!==_0xfbde5b['type']){const _0x9a52f8=this['_cloneOperation'](_0xfbde5b,this['_diffRoots']);_0x9a52f8['_execute'](),this['_transformMarkers'](_0x9a52f8);}if(_0x5de0a3)switch(_0xfbde5b['type']){case'insert':this['_handleInsertOperation'](_0xfbde5b);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xfbde5b);break;case'merge':this['_handleMergeOperation'](_0xfbde5b);break;case'split':this['_handleSplitOperation'](_0xfbde5b);}}else this['_handleRootOperation'](_0xfbde5b,_0x5de0a3);}['_cloneOperation'](_0x2ef35b,_0x390bed){const _0x457f74=_0x2ef35b['clone']();return _0x457f74['_authorId']=_0x2ef35b['_authorId'],this['_fixOperation'](_0x457f74,_0x390bed),_0x457f74;}['_getBaseVids'](_0x2be1bc){return _0x2be1bc['map'](_0x1171d2=>{const _0x357214=this['_getVidAttributeName'](_0x1171d2);return Number(_0x1171d2['item']['getAttribute'](_0x357214));});}['_generateTape'](_0xfa3533,_0x3e5d28){if(_0xfa3533['is']('element','$text'))_0x3e5d28['push']({'item':_0xfa3533,'type':'text'});else{_0xfa3533['is']('element')&&_0x3e5d28['push']({'item':_0xfa3533,'type':'elementStart'});for(const _0x337158 of _0xfa3533['getChildren']())this['_generateTape'](_0x337158,_0x3e5d28);_0xfa3533['is']('element')&&_0x3e5d28['push']({'item':_0xfa3533,'type':'elementEnd'});}return _0x3e5d28;}['_getState'](){const _0x328dd1=new Map(this['_touched']),_0x48f0a9=new Map(_0x328dd1),_0xfab99b=new Map(),_0x4d62e1={'insertions':{},'deletions':{}},_0x240456={'insertions':{},'deletions':{}},_0x55de9b=new Map(),_0x54ed93=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x54ed93['delete']('$graveyard');for(const _0x5af9b9 of _0x54ed93){const _0x3f53dd=this['_diffRoots']['get'](_0x5af9b9)||P(_0x5af9b9,!0x1),_0x1b62a9=this['_baseRoots']['get'](_0x5af9b9)||P(_0x5af9b9,!0x1);_0x3f53dd['isAttached']()||_0x1b62a9['isAttached']()?(_0x4d62e1['insertions'][_0x5af9b9]=N(_0x3f53dd),_0x4d62e1['deletions'][_0x5af9b9]=N(_0x1b62a9),this['_copyMarkers'](_0x4d62e1['deletions'][_0x5af9b9],_0x1b62a9),this['_copyMarkers'](_0x4d62e1['insertions'][_0x5af9b9],_0x3f53dd),_0x240456['insertions'][_0x5af9b9]=this['_generateTape'](this['_idsRoots']['get'](_0x5af9b9),[]),_0x240456['deletions'][_0x5af9b9]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x5af9b9)||P(_0x5af9b9,!0x1),[])):_0x54ed93['delete'](_0x5af9b9);}for(const _0x41192c of _0x54ed93){const _0x40c3f7=_0x240456['insertions'][_0x41192c];for(const _0x5729a0 of _0x40c3f7){const _0x2910c1=this['_getVidAttributeName'](_0x5729a0),_0x3c1428=_0x5729a0['item']['getAttribute'](_0x2910c1);_0x48f0a9['delete'](_0x3c1428),_0x3c1428>=this['_startingRevisionId']&&_0xfab99b['set'](_0x3c1428,_0x328dd1['get'](_0x3c1428));}}for(const _0x43953d of _0x54ed93){const _0x2e394a=_0x240456['insertions'][_0x43953d],_0x3d3e02=this['_getBaseVids'](_0x240456['deletions'][_0x43953d]);let _0x465b34=0x0;for(const _0x806654 of _0x2e394a){const _0x35781c=this['_getVidAttributeName'](_0x806654),_0x2300af=_0x806654['item']['getAttribute'](_0x35781c);if(!_0xfab99b['has'](_0x2300af)&&!_0x55de9b['has'](_0x2300af)){if(_0x48f0a9['has'](_0x2300af))_0x465b34++;else{if(_0x2300af!=_0x3d3e02[_0x465b34]){const _0x399a03=_0x328dd1['get'](_0x2300af)||_0x328dd1['get'](_0x3d3e02[_0x465b34]);for(;_0x2300af!=_0x3d3e02[_0x465b34];)_0x48f0a9['has'](_0x3d3e02[_0x465b34])||(_0x55de9b['set'](_0x3d3e02[_0x465b34],_0x399a03),_0x328dd1['set'](_0x3d3e02[_0x465b34],_0x399a03)),_0x465b34++;}_0x465b34++;}}}}for(const _0x2a3e9d of _0x54ed93){const _0xe1f908=_0x240456['insertions'][_0x2a3e9d];for(const _0xf28af3 of _0xe1f908){const _0x535586=this['_getVidAttributeName'](_0xf28af3),_0x1fb17e=_0xf28af3['item']['getAttribute'](_0x535586);if(_0x55de9b['has'](_0x1fb17e)){const _0x55aff0=_0x55de9b['get'](_0x1fb17e);_0x48f0a9['has'](_0x1fb17e)||_0x48f0a9['set'](_0x1fb17e,{..._0x55aff0}),_0xfab99b['set'](_0x1fb17e,{..._0x55aff0});}}}for(const _0x4eba5d of _0x48f0a9['keys']())_0x4eba5d>=this['_startingRevisionId']&&_0x48f0a9['delete'](_0x4eba5d);const _0x4e9ed1=new Map();for(const _0x2e551e of _0x54ed93){let _0x5d86e4=_0x240456['insertions'][_0x2e551e];for(const _0x285899 of _0x5d86e4)if(_0x285899['item']['is']('element','tableCell')){const _0x393e44=this['_getVidAttributeName'](_0x285899),_0x11a2c2=_0x285899['item']['getAttribute'](_0x393e44);if(_0xfab99b['has'](_0x11a2c2)){const _0x1ea01b=_0x285899['item']['parent']['parent']['getAttribute']('vid_start'),_0x1587ef=_0x4e9ed1['get'](_0x1ea01b)||new Set();_0x1587ef['add'](_0xfab99b['get'](_0x11a2c2)['userId']),_0x4e9ed1['set'](_0x1ea01b,_0x1587ef);}}_0x5d86e4=_0x240456['deletions'][_0x2e551e];for(const _0x3c833b of _0x5d86e4)if(_0x3c833b['item']['is']('element','tableCell')){const _0x2a2782=this['_getVidAttributeName'](_0x3c833b),_0x248039=_0x3c833b['item']['getAttribute'](_0x2a2782);if(_0x48f0a9['has'](_0x248039)){const _0x2bc5e5=_0x3c833b['item']['parent']['parent']['getAttribute']('vid_start'),_0x2d853c=_0x4e9ed1['get'](_0x2bc5e5)||new Set();_0x2d853c['add'](_0x48f0a9['get'](_0x248039)['userId']),_0x4e9ed1['set'](_0x2bc5e5,_0x2d853c);}}for(const _0x127b89 of _0x4e9ed1['keys']())(_0xfab99b['has'](_0x127b89)||_0x48f0a9['has'](_0x127b89))&&_0x4e9ed1['delete'](_0x127b89);}for(const _0x52e3d5 of _0x54ed93){const _0x47160f=_0x240456['insertions'][_0x52e3d5];let _0x5ebb5c=null,_0x5e6806=null;for(const _0x4af5a2 of _0x47160f){const _0x4e614a=this['_getVidAttributeName'](_0x4af5a2),_0x50345f=_0x4af5a2['item']['getAttribute'](_0x4e614a),_0x16bd2c=_0x4e9ed1['get'](_0x50345f);_0x16bd2c&&'elementStart'==_0x4af5a2['type']&&(_0x5ebb5c=Array['from'](_0x16bd2c)[0x0],_0x5e6806=_0x4af5a2['item']['getAttribute']('vid_end')),_0x5ebb5c&&(_0x48f0a9['set'](_0x50345f,{'userId':_0x5ebb5c}),_0xfab99b['set'](_0x50345f,{'userId':_0x5ebb5c})),_0x50345f==_0x5e6806&&(_0x5ebb5c=null,_0x5e6806=null);}}const _0x59d4f3={},_0x5b6a16=new Set();for(const _0x20c93a of _0x54ed93){const _0x523765=_0x4d62e1['deletions'][_0x20c93a],_0x580dc9=_0x4d62e1['insertions'][_0x20c93a];for(const {userId:_0x275d49}of this['_touchedMarkers']['values']())null!==_0x275d49&&_0x5b6a16['add'](_0x275d49);for(const {userId:_0x12c4d7}of this['_touchedRoots']['values']())null!==_0x12c4d7&&_0x5b6a16['add'](_0x12c4d7);this['_markChanges'](_0x580dc9,_0x240456['insertions'][_0x20c93a],_0xfab99b,'insertion',_0x5b6a16),this['_markChanges'](_0x523765,_0x240456['deletions'][_0x20c93a],_0x48f0a9,'deletion',_0x5b6a16),_0x59d4f3[_0x20c93a]={'insertions':this['_prepareViewToSave'](_0x580dc9),'deletions':this['_prepareViewToSave'](_0x523765),'attachChange':this['_touchedRoots']['get'](_0x20c93a)||null,'attributesBefore':_0x3f7041(this['_baseRootsAttributes']['get'](_0x20c93a))||{},'attributesAfter':_0x3f7041(this['_diffRootsAttributes']['get'](_0x20c93a))};}return{'diffData':_0x59d4f3,'authorsIds':Array['from'](_0x5b6a16)};}['_processRootBeforeSave'](_0x5dd63f){for(const [,_0x1a15cb]of _0x5dd63f['markers']){const _0x3bab2f=_0x1a15cb['start']['getAncestors']()['filter'](_0x388f39=>'tableCell'==_0x388f39['name']);for(const _0x3c9dff of _0x3bab2f)0x1==_0x3c9dff['childCount']&&_0x3c9dff['getChild'](0x0)['is']('element','paragraph')&&_0x3c9dff['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x2a4982){this['_processRootBeforeSave'](_0x2a4982);const _0x1af794=this['editor']['data']['toView'](_0x2a4982,{}),_0x5e9ef2=Array['from'](_0x1af794['getChildren']())['map'](_0x435edc=>this['_getViewJson'](_0x435edc));return JSON['stringify'](_0x5e9ef2);}['_getViewJson'](_0x5e7f64){if(_0x5e7f64['is']('$text'))return _0x5e7f64['data'];{const _0x1a751c=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0xa2cd75=_0x5e7f64,_0x3a548d=this['editor']['data']['htmlProcessor']['domConverter'],_0x488c1c={'type':_0x1a751c['_getTypeCharForViewElement'](_0xa2cd75),'name':_0xa2cd75['name'],'attributes':Array['from'](_0xa2cd75['getAttributes']()),'children':Array['from'](_0xa2cd75['getChildren']())['map'](_0x37ece5=>this['_getViewJson'](_0x37ece5))};if(_0x5e7f64['is']('uiElement')&&'$comment'!=_0x5e7f64['name']){const _0x50022e=_0x5e7f64['render'](_0x3a548d['domDocument'],_0x3a548d);_0x488c1c['children']['push'](_0x50022e['outerHTML']);}else{if(_0x5e7f64['is']('rawElement')){const _0x75dfa1=_0x3a548d['domDocument']['createElement'](_0xa2cd75['name']);_0x5e7f64['render'](_0x75dfa1,_0x3a548d),_0x488c1c['children']['push'](_0x75dfa1['innerHTML']);}}const _0x271242=Array['from'](_0xa2cd75['getCustomProperties']());_0x271242['length']>0x0&&(_0x488c1c['customProperties']=_0x271242);const _0x4e8941=_0xa2cd75['getFillerOffset']();return null!==_0x4e8941&&(_0x488c1c['fillerOffset']=_0x4e8941),_0x488c1c;}}['_markChanges'](_0x3f522b,_0x198bf1,_0x303d45,_0x3e9df5,_0x476159){let _0x3b652d=null,_0x53a619=null,_0x45e50f=0x0;const _0x23cb5a=this['editor']['model'];for(let _0xf114d2=0x0;_0xf114d2<_0x198bf1['length'];_0xf114d2++){const _0x12f1c6=this['_getVidAttributeName'](_0x198bf1[_0xf114d2]),_0x1ad59c=_0x198bf1[_0xf114d2]['item']['getAttribute'](_0x12f1c6),_0x131c98=_0x303d45['get'](_0x1ad59c),_0x1ced04=_0xf114d2==_0x198bf1['length']-0x1;(!_0x3b652d&&_0x131c98&&(_0x3b652d=_0x131c98,_0x53a619=_0x198bf1[_0xf114d2]),_0x3b652d&&(!_0x131c98||_0x131c98['userId']!=_0x3b652d['userId']))&&(_0x232108(_0x131c98,F(_0x53a619,_0x3f522b,_0x23cb5a),F(_0x198bf1[_0xf114d2],_0x3f522b,_0x23cb5a)),_0x3b652d=_0x131c98||null,_0x53a619=_0x131c98?_0x198bf1[_0xf114d2]:null),_0x3b652d&&_0x1ced04&&_0x232108(_0x131c98,F(_0x53a619,_0x3f522b,_0x23cb5a),B(_0x198bf1[_0xf114d2],_0x3f522b,_0x23cb5a));}function _0x232108(_0x291021,_0x46356a,_0x2799cb){const _0x15396d=_0x3b652d['userId'],_0x1ffa43='revision:'+_0x3e9df5+':'+_0x15396d+':'+_0x45e50f++,_0x39bd9e=_0x23cb5a['createRange'](_0x46356a,_0x2799cb);_0x3f522b['markers']['set'](_0x1ffa43,_0x39bd9e),null!==_0x15396d&&_0x476159['add'](_0x15396d);}}['_getVidAttributeName'](_0x41c868){switch(_0x41c868['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x555a21,_0x432a08){_0x555a21['baseVersion']=null;for(const _0x57141b in _0x555a21){const _0x373a6c=_0x555a21[_0x57141b];if(_0x373a6c instanceof vt){const _0x261053=_0x432a08['get'](_0x373a6c['root']['rootName']);_0x555a21[_0x57141b]=this['_fixPosition'](_0x373a6c,_0x261053);}if(_0x373a6c instanceof ft){const _0x56e5a9=_0x432a08['get'](_0x373a6c['root']['rootName']);_0x555a21[_0x57141b]=this['_fixRange'](_0x373a6c,_0x56e5a9);}'root'===_0x57141b&&(_0x555a21['root']=_0x432a08['get'](_0x555a21['root']['rootName']));}}['_fixRange'](_0x42b046,_0x59958c){return this['editor']['model']['createRange'](this['_fixPosition'](_0x42b046['start'],_0x59958c),this['_fixPosition'](_0x42b046['end'],_0x59958c));}['_fixPosition'](_0x172693,_0x143e67){return this['editor']['model']['createPositionFromPath'](_0x143e67,_0x172693['path'],_0x172693['stickiness']);}['_handleInsertOperation'](_0x401327){const _0x97224a=this['_idsRoots']['get'](_0x401327['position']['root']['rootName']),_0x39547e=this['_fixPosition'](_0x401327['position'],_0x97224a),_0x16cdb9=null===_0x401327['_authorId']?null:_0x401327['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x477e00=_0x39547e['parent'],_0x277890=this['_revisionId'],_0x4ed5ac=[];for(const _0x54ca6c of _0x401327['nodes'])if(_0x54ca6c['is']('element'))_0x4ed5ac['push'](this['_makeIdsRoot'](_0x54ca6c));else{for(let _0x4e18d1=0x0;_0x4e18d1<_0x54ca6c['offsetSize'];_0x4e18d1++)_0x4ed5ac['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x2e5442=this['_revisionId'];for(let _0x5037d6=_0x277890;_0x5037d6<_0x2e5442;_0x5037d6++)this['_touched']['set'](_0x5037d6,{'userId':_0x16cdb9});_0x477e00['_insertChild'](_0x39547e['offset'],_0x4ed5ac);}['_handleMoveOperation'](_0x132479){(_0x132479=this['_cloneOperation'](_0x132479,this['_idsRoots']))['_execute']();const _0x5b9e46=null===_0x132479['_authorId']?null:_0x132479['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4210b5=_0x132479['getMovedRangeStart'](),_0x4ab030=_0x4210b5['parent'],_0x3df005=_0x4210b5['offset'];!function _0x22df94(_0x570100,_0x43cb53,_0x10b812,_0x216839){for(let _0x114f97=_0x10b812;_0x114f97<_0x216839;_0x114f97++){const _0x533cc9=_0x43cb53['getChild'](_0x114f97);_0x533cc9['is']('element','$text')?_0x570100['set'](_0x533cc9['getAttribute']('vid'),{'userId':_0x5b9e46}):(_0x570100['set'](_0x533cc9['getAttribute']('vid_start'),{'userId':_0x5b9e46}),_0x22df94(_0x570100,_0x533cc9,0x0,_0x533cc9['childCount']),_0x570100['set'](_0x533cc9['getAttribute']('vid_end'),{'userId':_0x5b9e46}));}}(this['_touched'],_0x4ab030,_0x3df005,_0x3df005+_0x132479['howMany']);}['_handleMergeOperation'](_0x2faea2){const _0x4efe07=null===(_0x2faea2=this['_cloneOperation'](_0x2faea2,this['_idsRoots']))['_authorId']?null:_0x2faea2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x454d70=_0x2faea2['targetPosition']['parent'],_0x120772=_0x2faea2['sourcePosition']['parent'],_0xe5bb45=_0x454d70['getAttribute']('vid_end'),_0x1f12a1=_0x120772['getAttribute']('vid_start');_0x454d70['_setAttribute']('vid_end',_0x120772['getAttribute']('vid_end')),_0x120772['_setAttribute']('vid_end',_0xe5bb45),this['_touched']['set'](_0x1f12a1,{'userId':_0x4efe07}),this['_touched']['set'](_0xe5bb45,{'userId':_0x4efe07}),_0x2faea2['_execute']();}['_handleSplitOperation'](_0x3fc7c5){const _0x44e1f4=null===(_0x3fc7c5=this['_cloneOperation'](_0x3fc7c5,this['_idsRoots']))['_authorId']?null:_0x3fc7c5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4fab3f=_0x3fc7c5['graveyardPosition'],_0x1db002=_0x3fc7c5['splitPosition']['parent'];_0x3fc7c5['_execute']();const _0x105e4a=_0x1db002['getAttribute']('vid_end'),_0x1facd7=_0x3fc7c5['insertionPosition']['nodeAfter'];if(_0x4fab3f){const _0x3c2e47=_0x1facd7['getAttribute']('vid_end'),_0x3b9849=_0x1db002['getAttribute']('vid_end');_0x1db002['_setAttribute']('vid_end',_0x3c2e47),_0x1facd7['_setAttribute']('vid_end',_0x3b9849),this['_touched']['set'](_0x1db002['getAttribute']('vid_end'),{'userId':_0x44e1f4}),this['_touched']['set'](_0x1facd7['getAttribute']('vid_start'),{'userId':_0x44e1f4});}else{const _0x1d1531=this['_revisionId']++,_0x2105f1=this['_revisionId']++;_0x1db002['_setAttribute']('vid_end',_0x1d1531),_0x1facd7['_setAttribute']('vid_start',_0x2105f1),_0x1facd7['_setAttribute']('vid_end',_0x105e4a),this['_touched']['set'](_0x1d1531,{'userId':_0x44e1f4}),this['_touched']['set'](_0x2105f1,{'userId':_0x44e1f4});}}['_handleMarkerOperation'](_0x2d4966){if(!_0x2d4966['affectsData'])return;const _0x42aaf6=(_0x2d4966=this['_cloneOperation'](_0x2d4966,this['_diffRoots']))['oldRange']?_0x2d4966['oldRange']['root']:null,_0x23c6fa=_0x2d4966['newRange']?_0x2d4966['newRange']['root']:null;_0x42aaf6&&this['_markers']['delete'](_0x2d4966['name']),_0x23c6fa&&this['_markers']['set'](_0x2d4966['name'],_0x2d4966['newRange']['clone']());const _0x33e655=null===_0x2d4966['_authorId']?null:_0x2d4966['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x582c34=_0x2d4966['name'];if(!this['_touchedMarkers']['has'](_0x582c34))return void this['_touchedMarkers']['set'](_0x582c34,{'range':_0x2d4966['oldRange'],'userId':_0x33e655});const _0x19ad47=this['_touchedMarkers']['get'](_0x582c34),_0x4a0704=_0x19ad47['range'],_0x399d68=_0x2d4966['newRange'];null==_0x4a0704&&null==_0x399d68||_0x4a0704&&_0x399d68&&_0x4a0704['isEqual'](_0x399d68)?this['_touchedMarkers']['delete'](_0x2d4966['name']):_0x19ad47['userId']=_0x33e655;}['_handleRootOperation'](_0x22991b,_0xe4b4e1){this['_diffRoots']['has'](_0x22991b['rootName'])?this['_diffRoots']['get'](_0x22991b['rootName'])['_isAttached']=_0x22991b['isAdd']:(this['_diffRoots']['set'](_0x22991b['rootName'],P(_0x22991b['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x22991b['rootName'],{}),_0xe4b4e1&&this['_idsRoots']['set'](_0x22991b['rootName'],P(_0x22991b['rootName'],!0x0)));const _0x5edd02=null===_0x22991b['_authorId']?null:_0x22991b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xd2e16=this['_touchedRoots']['get'](_0x22991b['rootName']);_0xd2e16&&_0xd2e16['userId']===_0x5edd02?this['_touchedRoots']['delete'](_0x22991b['rootName']):this['_touchedRoots']['set'](_0x22991b['rootName'],{'userId':_0x5edd02,'isAttached':_0x22991b['isAdd']});}['_handleRootAttributeOperation'](_0x272e6b){const _0x18bfda=this['_diffRootsAttributes']['get'](_0x272e6b['root']['rootName']);null===_0x272e6b['newValue']?delete _0x18bfda[_0x272e6b['key']]:_0x18bfda[_0x272e6b['key']]=_0x272e6b['newValue'];}}function N(_0x247712){const _0x58166f=P(_0x247712['rootName'],_0x247712['isAttached']());for(const _0x232638 of _0x247712['getChildren']()){const _0x384dea=_0x232638['_clone'](!0x0);_0x58166f['_appendChild'](_0x384dea);}return _0x58166f;}function P(_0x2b81aa,_0x1e06a5=!0x0){const _0x3629b6=new gt();return _0x3629b6['rootName']=_0x2b81aa,_0x3629b6['_isAttached']=_0x1e06a5,_0x3629b6['isAttached']=()=>_0x3629b6['_isAttached'],_0x3629b6;}function F(_0x3892f5,_0x3c5aad,_0x39accd){const _0xac8a0f='elementEnd'==_0x3892f5['type']?_0x39accd['createPositionAt'](_0x3892f5['item'],'end'):_0x39accd['createPositionBefore'](_0x3892f5['item']);return _0x39accd['createPositionFromPath'](_0x3c5aad,_0xac8a0f['path'],_0xac8a0f['stickiness']);}function B(_0x10b2e1,_0x4995a5,_0x5175ea){const _0x79a54b='elementStart'==_0x10b2e1['type']?_0x5175ea['createPositionAt'](_0x10b2e1['item'],0x0):_0x5175ea['createPositionAfter'](_0x10b2e1['item']);return _0x5175ea['createPositionFromPath'](_0x4995a5,_0x79a54b['path'],_0x79a54b['stickiness']);}class os extends _0x310fcf{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x56a8ea,_0x212360){super(_0x56a8ea),this['focusTracker']=new _0xbccfc7(),this['keystrokes']=new _0x3aa538(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x212360),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x1b490b({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x273e1c=_0x341157=>_0x341157['stopPropagation']();this['keystrokes']['set']('arrowright',_0x273e1c),this['keystrokes']['set']('arrowleft',_0x273e1c),this['keystrokes']['set']('arrowup',_0x273e1c),this['keystrokes']['set']('arrowdown',_0x273e1c);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x88a7f1){this['revisionNameInputView']['fieldView']['element']['value']=_0x88a7f1['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x286688){const _0x825d73=new nt(this['locale'],ti),_0x4bc4f0=_0x825d73['fieldView'];_0x4bc4f0['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x13c4fe=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x286688&&(_0x13c4fe+='\x20('+g(this['locale'],'optional')+')'),(_0x825d73['label']=_0x13c4fe,_0x4bc4f0['on']('input',()=>{this['revisionNameInputValue']=_0x4bc4f0['element']['value']['trim']();}),_0x825d73);}}class f extends _0x4b4582{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x20903c=this['editor'],_0x3ad99d=_0x20903c['plugins']['get']('RevisionTracker');_0x20903c['ui']['componentFactory']['add']('revisionHistory',_0x18594f=>{const _0x336f26=_0x23a537(_0x18594f),_0x4d691f=_0x336f26['panelView']['children'],_0xc8c214=new _0x561b63(_0x18594f),_0x1b848c=new te(_0x18594f),_0x994ba9=new _0x2cfb85(_0x18594f),_0x46c348=new te(_0x18594f),_0x5d0f23=new _0x2cfb85(_0x18594f);return _0x336f26['bind']('isEnabled')['to'](_0x3ad99d,'isReady',_0x3ad99d,'isEnabled',_0x20903c,'isReadOnly',(_0x113efd,_0x6c1f49,_0x4c6c3c)=>_0x113efd&&_0x6c1f49&&!_0x4c6c3c),_0x336f26['buttonView']['set']({'icon':_0x4d5d4f,'label':g(_0x18594f,'Revision\x20history'),'tooltip':!0x0}),_0x994ba9['set']({'label':g(_0x18594f,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x994ba9['bind']('isEnabled')['to'](_0x3ad99d,'isReady',_0x3ad99d,'isEnabled',_0x20903c,'isReadOnly',(_0x46f896,_0x4c4d05,_0x3f8699)=>_0x46f896&&_0x4c4d05&&!_0x3f8699),_0x994ba9['on']('execute',()=>this['_showDialog']()),_0x5d0f23['set']({'label':g(_0x18594f,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x5d0f23['bind']('isEnabled')['to'](_0x3ad99d,'isReady',_0x20903c,'isReadOnly',(_0x1848e9,_0x5c5812)=>_0x1848e9&&!_0x5c5812),_0x5d0f23['on']('execute',()=>{_0x20903c['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x336f26['isOpen']=!0x1,_0x20903c['editing']['view']['focus']();}),_0x1b848c['children']['add'](_0x994ba9),_0x46c348['children']['add'](_0x5d0f23),_0xc8c214['role']='menu',_0xc8c214['items']['addMany']([_0x1b848c,_0x46c348]),_0x4d691f['add'](_0xc8c214),_0x336f26;}),_0x20903c['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x449f0e=this['editor'],_0x1f5713=_0x449f0e['locale'],_0x10d3d1=new _0x49a1dc(_0x1f5713),_0x4ae197=new _0x721207(_0x1f5713);_0x10d3d1['buttonView']['set']({'icon':_0x4d5d4f,'label':g(_0x1f5713,'Revision\x20history')});const _0x467529=new _0x13f8f5(_0x1f5713,_0x10d3d1),_0x58227e=new _0xd42279(_0x1f5713);_0x58227e['set']({'label':g(_0x1f5713,'Save\x20current\x20revision')}),_0x58227e['delegate']('execute')['to'](_0x10d3d1),_0x58227e['on']('execute',()=>{this['_showDialog']();}),_0x467529['children']['add'](_0x58227e),_0x4ae197['items']['add'](_0x467529);const _0x189db5=new _0x13f8f5(_0x1f5713,_0x10d3d1),_0x596629=new _0xd42279(_0x1f5713);return _0x596629['set']({'label':g(_0x1f5713,'Open\x20revision\x20history')}),_0x596629['delegate']('execute')['to'](_0x10d3d1),_0x596629['on']('execute',()=>{_0x449f0e['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x189db5['children']['add'](_0x596629),_0x4ae197['items']['add'](_0x189db5),_0x10d3d1['panelView']['children']['add'](_0x4ae197),_0x10d3d1;}['_showDialog'](){const _0xd2f191=this['editor'],_0x2366a2=_0xd2f191['locale'],_0x4eecac=_0xd2f191['plugins']['get']('Dialog'),_0x2529f6=_0xd2f191['plugins']['get']('RevisionTracker');function _0x415de0(_0x28ab85){_0xd2f191['config']['get']('revisionHistory.requireRevisionName')&&''===_0x28ab85['revisionName']?_0x28ab85['revisionNameInputView']['errorText']=g(_0x2366a2,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0xd2f191['plugins']['get'](u)['saveRevision']({'name':_0x28ab85['revisionName']}),_0x4eecac['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x415de0(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x4eecac['show']({'id':'revisionSave','title':g(_0x2366a2,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0xd2f191['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x4eecac['hide']()},{'label':g(_0xd2f191['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x8ac8){_0x8ac8['bind']('isEnabled')['to'](_0x2529f6,'isReady',_0x2529f6,'isEnabled',_0xd2f191,'isReadOnly',(_0x40c8d0,_0x385e6e,_0x2a03cb)=>_0x40c8d0&&_0x385e6e&&!_0x2a03cb);},'onExecute':()=>_0x415de0(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2094cd=this['editor'],_0xf3076f=_0x2094cd['locale'];this['_saveRevisionFormView']=new os(_0xf3076f,_0x2094cd['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x310fcf{['changeId'];['_model'];constructor(_0x141a6d,_0x3b3315){super(_0x141a6d),this['_model']=_0x3b3315,this['changeId']=_0x3b3315['id'];const _0x3e93e0=this['bindTemplate'],_0x4feea6=g(_0x141a6d,_0x3b3315['data']['isSuggestion']?'Suggested\x20by':'add'==_0x3b3315['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x3b3315['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x3e93e0['to']('type',_0x4a9978=>'ck-revision-change__'+_0x4a9978)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x4feea6}]},{'text':'\x20'+_0x3b3315['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x278115(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x944da2){super(),this['id']=_0x944da2['id']||_0x44b437(),this['author']=_0x944da2['author'],this['type']=_0x944da2['type'],this['data']=_0x944da2['data']||{},this['rootName']=_0x944da2['rootName'],this['set']('createdAt',_0x944da2['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x577c0e,_0x3198d9){this['newRevisionId']=_0x577c0e,this['oldRevisionId']=_0x3198d9,this['changes']=new _0x16fd8d();}['_setChanges'](_0xd690f){for(const _0x460f6c of _0xd690f)this['changes']['add'](_0x460f6c);}}class m extends _0x4b4582{['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[_0x52e85a,_0x594711,I,V];}constructor(_0x460c92){super(_0x460c92),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',(_0x5b13eb,_0x5d8581,_0x2e6ee5)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x34ae6=>{for(const _0x2285bf of this['editor']['editing']['view']['document']['roots'])_0x2e6ee5?_0x34ae6['removeClass']('ck-editor__editable__overlay',_0x2285bf):_0x34ae6['addClass']('ck-editor__editable__overlay',_0x2285bf);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x1a9534=>null!==_0x1a9534),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x39ad73,_0x4dac72,_0x59a2e9)=>_0x39ad73&&_0x59a2e9?_0x4dac72['changes']['getIndex'](_0x59a2e9):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x325248,_0x4a8153)=>_0x325248?_0x4a8153['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x594711);}['init'](){const _0x5a4a06=this['editor'],_0x16b573=new pt(_0x5a4a06,{'direction':'backward'}),_0x1ec8c7=new pt(_0x5a4a06,{'direction':'forward'});(_0x5a4a06['commands']['add']('showPreviousChange',_0x16b573),_0x5a4a06['commands']['add']('showNextChange',_0x1ec8c7),_0x5a4a06['commands']['add']('restoreRevision',new wt(_0x5a4a06)),this['on']('change:numberOfChanges',()=>{_0x16b573['refresh'](),_0x1ec8c7['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5a4a06['enableReadOnlyMode']('revision-viewer'),_0x5a4a06['plugins']['has']('WidgetToolbarRepository'))&&_0x5a4a06['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0xc97c8b){return await this['_utils']['loadRevisionData'](_0xc97c8b,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xc97c8b);}async['getRevisionRootsAttributes'](_0x2a4479){return await this['_utils']['loadRevisionData'](_0x2a4479,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2a4479);}async['compare'](_0x495c50,_0x26d5ff,_0x91ffe=!0x1){if(!this['isEnabled'])return;const _0x9c3478=this['diff'],_0x398e64=this['repository'],_0x347574='string'==typeof _0x495c50?_0x398e64['getRevision'](_0x495c50):_0x495c50,_0x400178='string'==typeof _0x26d5ff?_0x398e64['getRevision'](_0x26d5ff):_0x26d5ff,_0x48f064=_0x347574['id'],_0x1eefa2=_0x400178?_0x400178['id']:null;if(!_0x91ffe&&this['diff']&&this['diff']['newRevisionId']===_0x48f064&&this['diff']['oldRevisionId']===_0x1eefa2)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x48f064,_0x1eefa2);const _0x3c62c3=this['_getRevisionsRange'](_0x347574,_0x400178,!0x0)['map'](_0x34d6b3=>this['_utils']['loadRevisionData'](_0x34d6b3,this['adapter']));return _0x3c62c3['push'](new Promise(_0x3dc3dd=>{setTimeout(_0x3dc3dd,0x14);})),Promise['all'](_0x3c62c3)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x50f6bb=this['_getDiff'](_0x48f064,_0x1eefa2);for(const _0x397821 of _0x50f6bb['changes'])this['_changeIdToChange']['set'](_0x397821['id'],_0x397821);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x31d286=>{for(const _0x481788 of this['editor']['model']['document']['getRootNames']())_0x31d286['detachRoot'](_0x481788);for(const _0x3eee07 of Object['keys'](_0x50f6bb['model'])){const _0x453c2f=_0x31d286['addRoot'](_0x3eee07);for(const _0x4f3d35 of Object['keys'](_0x50f6bb['attributes'][_0x3eee07]))_0x31d286['setAttribute'](_0x4f3d35,_0x50f6bb['attributes'][_0x3eee07][_0x4f3d35],_0x453c2f);_0x31d286['insert'](_0x50f6bb['model'][_0x3eee07],_0x453c2f,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x50f6bb['changes'])),this['isReady']=!0x0;})['catch'](_0x44638c=>{console['error'](_0x44638c),this['_cleanUp'](),_0x9c3478&&(this['diff']=_0x9c3478),this['isReady']=!0x0;});}['addRevisionData'](_0x58596c,_0x104383){const _0x12cb04=this['repository']['createRevision'](_0x58596c);return _0x12cb04['on']('_update',(_0x18203b,_0xd6a92e,_0x193010)=>_0x104383(_0xd6a92e,_0x193010,_0x12cb04)),this['repository']['addRevision'](_0x12cb04),_0x12cb04;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3a6348=>{for(const _0x34cf1d of this['editor']['model']['document']['getRootNames']())_0x3a6348['detachRoot'](_0x34cf1d);});}['_sortAndFilterDiffChanges'](_0x76b49c){const _0x2dff37=[],_0x22c73c=new Map();for(const _0x2beffb of this['editor']['model']['document']['getRootNames']()){const _0x128246=this['editor']['editing']['view']['getDomRoot'](_0x2beffb);if(!_0x128246)continue;const _0x56df1a=_0x128246['getClientRects']()['item'](0x0);_0x56df1a&&(_0x2dff37['push'](_0x2beffb),_0x22c73c['set'](_0x2beffb,_0x56df1a));}return _0x2dff37['sort']((_0x2ef2b9,_0x26c892)=>{const _0x479b10=_0x22c73c['get'](_0x2ef2b9),_0x521f32=_0x22c73c['get'](_0x26c892);return _0x479b10['y']-_0x521f32['y']||_0x479b10['x']-_0x521f32['x'];}),(_0x76b49c=_0x76b49c['filter'](_0x32a69d=>_0x2dff37['includes'](_0x32a69d['rootName'])))['sort']((_0x2ee0f5,_0x48ee31)=>_0x2dff37['indexOf'](_0x2ee0f5['rootName'])-_0x2dff37['indexOf'](_0x48ee31['rootName'])),_0x76b49c;}['_makeTape'](_0x386caf){const _0x3e10f8=Array['from'](_0x386caf['markers'])['filter'](([_0xfc8910,_0x423c63])=>_0xfc8910['startsWith']('revision:')&&!_0x423c63['isCollapsed']),_0x3b4b52=Array['from'](this['editor']['model']['createRangeIn'](_0x386caf)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3e10f8['length'])for(const _0x4a1c12 of _0x3b4b52){const [_0x27ab62,_0x190c9f]=_0x3e10f8[0x0],[,_0x400e49,_0x2b018d]=_0x27ab62['split'](':');if(_0x190c9f['end']['isEqual'](_0x4a1c12['nextPosition'])&&_0x3e10f8['shift'](),(_0x4a1c12['previousPosition']['isEqual'](_0x190c9f['start'])||_0x4a1c12['previousPosition']['isAfter'](_0x190c9f['start']))&&('insertion'==_0x400e49?_0x4a1c12['isAdded']={'userId':_0x2b018d}:'deletion'==_0x400e49&&(_0x4a1c12['isRemoved']={'userId':_0x2b018d})),0x0==_0x3e10f8['length'])break;}return _0x3b4b52;}['_refreshStartEndIndex'](_0x190a2f){const _0x79d703=new Map();for(let _0x10b5a3=0x0;_0x10b5a3<_0x190a2f['length'];_0x10b5a3++)'text'===_0x190a2f[_0x10b5a3]['type']?(_0x190a2f[_0x10b5a3]['item']['startIndex']=_0x10b5a3,_0x190a2f[_0x10b5a3]['item']['endIndex']=_0x10b5a3):('elementStart'===_0x190a2f[_0x10b5a3]['type']?_0x190a2f[_0x10b5a3]['item']['startIndex']=_0x10b5a3:'elementEnd'===_0x190a2f[_0x10b5a3]['type']&&(_0x190a2f[_0x10b5a3]['item']['endIndex']=_0x10b5a3),_0x79d703['set'](_0x190a2f[_0x10b5a3]['id'],_0x10b5a3));for(const _0x27d225 of _0x79d703['values']())'elementStart'===_0x190a2f[_0x27d225]['type']?_0x190a2f[_0x27d225]['item']['endIndex']=_0x79d703['get'](_0x190a2f[_0x27d225]['pairId']):'elementEnd'===_0x190a2f[_0x27d225]['type']&&(_0x190a2f[_0x27d225]['item']['startIndex']=_0x79d703['get'](_0x190a2f[_0x27d225]['pairId']));}['_processTape'](_0x2a3b5d){for(let _0x5ae0ce=0x0;_0x5ae0ce<_0x2a3b5d['length'];_0x5ae0ce++){if('elementStart'===_0x2a3b5d[_0x5ae0ce]['type'])_0x2a3b5d[_0x5ae0ce]['item']['startIndex']=_0x5ae0ce;else{if('elementEnd'===_0x2a3b5d[_0x5ae0ce]['type']){_0x2a3b5d[_0x5ae0ce]['item']['endIndex']=_0x5ae0ce;const _0x46909a=_0x2a3b5d[_0x5ae0ce]['item']['startIndex'];_0x2a3b5d[_0x46909a]['pairId']=_0x2a3b5d[_0x5ae0ce]['id'],_0x2a3b5d[_0x5ae0ce]['pairId']=_0x2a3b5d[_0x46909a]['id'];}else _0x2a3b5d[_0x5ae0ce]['item']['startIndex']=_0x5ae0ce,_0x2a3b5d[_0x5ae0ce]['item']['endIndex']=_0x5ae0ce,_0x2a3b5d[_0x5ae0ce]['pairId']=null;}_0x2a3b5d[_0x5ae0ce]['markersStart']||(_0x2a3b5d[_0x5ae0ce]['markersStart']=[],_0x2a3b5d[_0x5ae0ce]['markersEnd']=[]);}}['_markInsertions'](_0x56e004,_0x5b2df7){const _0x27f8b2=_0x56e004['filter'](_0x16a0a1=>!_0x16a0a1['isAdded']);for(let _0x42dfa8=0x0;_0x42dfa8<_0x5b2df7['length'];_0x42dfa8++)_0x5b2df7[_0x42dfa8]['isAdded']&&(_0x27f8b2[_0x42dfa8]['isAdded']=_0x5b2df7[_0x42dfa8]['isAdded']);}['_getDiff'](_0x2b56e2,_0x1b878b=null){const _0x2b8670=this['repository']['getRevision'](_0x2b56e2),_0x443612=_0x1b878b?this['repository']['getRevision'](_0x1b878b):null,_0x2e33d0=this['_getRevisionsRange'](_0x2b8670,_0x443612),_0x310fcc=_0x2e33d0[_0x2e33d0['length']-0x1],_0x550eb9=new Map(),_0x4be2db={'model':{},'attributes':{},'changes':[]},_0x25384d=new Set(),_0x499656=new Map();for(let _0x1dded7=_0x2e33d0['length']-0x1;_0x1dded7>=0x0;_0x1dded7--){const _0x495f8b=_0x2e33d0[_0x1dded7];for(const _0x22fff6 of Object['keys'](_0x495f8b['diffData']))if(_0x495f8b['diffData'][_0x22fff6]['attachChange']){const _0x2175a5=_0x495f8b['diffData'][_0x22fff6]['attachChange'];_0x2175a5['isAttached']?(_0x25384d['add'](_0x22fff6),_0x499656['has'](_0x22fff6)&&_0x499656['get'](_0x22fff6)['userId']==_0x2175a5['userId']?_0x499656['delete'](_0x22fff6):_0x499656['set'](_0x22fff6,_0x2175a5)):_0x499656['has'](_0x22fff6)?(_0x25384d['delete'](_0x22fff6),_0x499656['delete'](_0x22fff6)):(_0x25384d['add'](_0x22fff6),_0x499656['set'](_0x22fff6,_0x2175a5));}else _0x25384d['add'](_0x22fff6);}for(const _0x537134 of _0x25384d){const _0x558d97=_0x499656['has'](_0x537134)&&!_0x499656['get'](_0x537134)['isAttached'];let _0x15a67e=_0x558d97?_0x2e33d0['length']-0x1:0x0;const _0x5afa2c=_0x558d97?-0x1:0x1;for(;_0x2e33d0[_0x15a67e];){const _0x2fa9c9=_0x2e33d0[_0x15a67e];if(_0x2fa9c9['diffData'][_0x537134]){const _0x340ad8=_0x558d97?_0x2fa9c9['diffData'][_0x537134]['attributesBefore']:_0x2fa9c9['diffData'][_0x537134]['attributesAfter'];_0x4be2db['attributes'][_0x537134]=_0x340ad8?_0x3f7041(_0x340ad8):{};break;}_0x15a67e+=_0x5afa2c;}}for(const _0x2479f6 of _0x2e33d0){_0x2479f6['model']={};for(const _0x339fc7 of _0x2479f6['authors'])_0x550eb9['set'](_0x339fc7['id'],_0x339fc7);for(const _0x5345df of _0x25384d){const _0x40333e=_0x2479f6['diffData'][_0x5345df]?_0x2479f6['diffData'][_0x5345df]['insertions']:'[]',_0x128fbc=_0x2479f6['diffData'][_0x5345df]?_0x2479f6['diffData'][_0x5345df]['deletions']:'[]';_0x2479f6['model'][_0x5345df]={'insertions':this['_utils']['_makeModelFromViewString'](_0x40333e),'deletions':this['_utils']['_makeModelFromViewString'](_0x128fbc)};}}for(const _0x4f6c45 of _0x25384d){let _0x2de5bd=null,_0x3ab7d0=0x0;const _0x475289=new Map(Array['from'](_0x2b8670['model'][_0x4f6c45]['insertions']['markers'])['filter'](([_0x1737a7])=>!_0x1737a7['startsWith']('revision:')));let _0x17f4a3=0x0;for(const _0x32681f of _0x2e33d0){const _0x1cbcd1=this['_makeTape'](_0x32681f['model'][_0x4f6c45]['insertions']);_0x32681f==_0x2b8670?(_0x2de5bd=_0x1cbcd1,_0x3ab7d0=_0x2de5bd['length'],_0x2de5bd['forEach'](_0x349159=>{_0x349159['id']=_0x17f4a3++;}),this['_processTape'](_0x2de5bd)):this['_markInsertions'](_0x2de5bd,_0x1cbcd1);const _0x1b3853=_0x2de5bd['filter'](_0x1dff5a=>!_0x1dff5a['isAdded'])['map'](_0x3d9f58=>_0x3d9f58['id']);let _0x4dd003=0x0;const _0x3c7299=this['_makeTape'](_0x32681f['model'][_0x4f6c45]['deletions']);_0x3c7299['forEach'](_0x44222c=>{_0x44222c['isRemoved']?_0x44222c['id']=_0x3ab7d0++:_0x44222c['id']=_0x1b3853[_0x4dd003++];}),this['_processTape'](_0x3c7299),this['_setDistance'](_0x2de5bd,'isAdded'),this['_setDistance'](_0x3c7299,'isRemoved'),_0x32681f==_0x2b8670&&this['_markMarkers'](_0x2de5bd,_0x475289),_0x2de5bd=this['_joinTapes'](_0x2de5bd,_0x3c7299),this['_refreshStartEndIndex'](_0x2de5bd),this['_setDistance'](_0x2de5bd,'isRemoved');}_0x2de5bd=_0x2de5bd['filter'](_0x389ded=>!(_0x389ded['isAdded']&&_0x389ded['isRemoved']));const _0xeb37a5=new Map(_0x310fcc['model'][_0x4f6c45]['deletions']['markers']),_0x4e68b1=new Set(_0x475289['keys']());for(const _0x3013ac of _0xeb37a5['keys']())_0x4e68b1['delete'](_0x3013ac);this['_markSuggestions'](_0x2de5bd,_0x4e68b1),this['_fixObsoleteTags'](_0x2de5bd),_0x2de5bd=this['_removeMissingPairs'](_0x2de5bd),_0x2de5bd=this['_markMismatchedRemovedTags'](_0x2de5bd),_0x2de5bd=this['_removeUnsupportedChanges'](_0x2de5bd);const {root:_0x5392d9,changes:_0x3167d4}=this['_makeModelFromTape'](_0x2de5bd,_0x550eb9,_0x4f6c45);_0x4be2db['model'][_0x4f6c45]=_0x5392d9;const _0x141ec3=_0x499656['get'](_0x4f6c45);if(_0x141ec3){const _0x377176=_0x550eb9['get'](_0x141ec3['userId']),_0x37ec06=new r({'author':_0x377176,'type':_0x141ec3['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4f6c45});_0x3167d4['unshift'](_0x37ec06),_0x4be2db['attributes'][_0x4f6c45]['revisionHistoryAttachChange']=_0x37ec06['id'];}_0x4be2db['changes']=_0x4be2db['changes']['concat'](_0x3167d4);}return _0x4be2db;}['_markMarkers'](_0x2c4fcb,_0x54fc35){for(let _0x4c0734=0x0;_0x4c0734<_0x2c4fcb['length'];_0x4c0734++)for(const [_0x24c6ce,_0x166839]of _0x54fc35)!_0x166839['isCollapsed']&&_0x166839['start']['isEqual'](_0x2c4fcb[_0x4c0734]['previousPosition'])&&_0x2c4fcb[_0x4c0734]['markersStart']['push'](_0x24c6ce),_0x166839['end']['isEqual'](_0x2c4fcb[_0x4c0734]['nextPosition'])&&_0x2c4fcb[_0x4c0734]['markersEnd']['push'](_0x24c6ce);}['_joinTapes'](_0x41793e,_0x48f28d){let _0x1daa8c=[],_0x39c086=0x0,_0x228ccb=0x0;for(;_0x39c086<_0x41793e['length']||_0x228ccb<_0x48f28d['length'];){const _0x32d929=_0x41793e[_0x39c086]||{},_0x470895=_0x48f28d[_0x228ccb]||{};if(_0x32d929['id']==_0x470895['id'])_0x39c086++,_0x228ccb++,_0x1daa8c['push'](_0x32d929);else{if(_0x470895['isRemoved']&&_0x32d929['isAdded']){const {commonTape:_0x4a7b53,iEnd:_0x2a0179,jEnd:_0x1086f8}=this['_threeWayMerge'](_0x41793e,_0x39c086,_0x48f28d,_0x228ccb);_0x1daa8c=_0x1daa8c['concat'](_0x4a7b53),_0x39c086=_0x2a0179,_0x228ccb=_0x1086f8;}else _0x470895['isRemoved']?(_0x228ccb++,_0x1daa8c['push'](_0x470895)):(_0x39c086++,_0x1daa8c['push'](_0x32d929));}}return _0x1daa8c;}['_markSuggestions'](_0x499ec8,_0x54d98d){const _0x58e68b=[];for(let _0x5bbf4a=0x0;_0x5bbf4a<_0x499ec8['length'];_0x5bbf4a++){for(let _0x233fab=0x0;_0x233fab<_0x499ec8[_0x5bbf4a]['markersStart']['length'];_0x233fab++){const _0x3cd60e=_0x499ec8[_0x5bbf4a]['markersStart'][_0x233fab];if(!_0x54d98d['has'](_0x3cd60e))continue;const {group:_0x51edcb,type:_0x530799,authorId:_0x41cb4d}=_0x5ae8eb(_0x3cd60e);'revision-suggestion'!=_0x51edcb||'insertion'!=_0x530799&&'deletion'!=_0x530799||(_0x58e68b['unshift']({'type':_0x530799,'name':_0x3cd60e,'userId':_0x41cb4d}),_0x499ec8[_0x5bbf4a]['markersStart']['splice'](_0x233fab,0x1),_0x233fab--);}_0xf79472(_0x499ec8[_0x5bbf4a]);for(let _0x3ac9c5=0x0;_0x3ac9c5<_0x499ec8[_0x5bbf4a]['markersEnd']['length'];_0x3ac9c5++){const _0x2b70bb=_0x499ec8[_0x5bbf4a]['markersEnd'][_0x3ac9c5];if(!_0x54d98d['has'](_0x2b70bb))continue;const {group:_0x2ed520,type:_0xdf0466}=_0x5ae8eb(_0x2b70bb);if('revision-suggestion'!=_0x2ed520||'insertion'!=_0xdf0466&&'deletion'!=_0xdf0466)continue;_0x499ec8[_0x5bbf4a]['markersEnd']['splice'](_0x3ac9c5,0x1),_0x3ac9c5--;const _0x371daa=_0x58e68b['findIndex'](_0x143411=>_0x143411['name']==_0x2b70bb);_0x371daa>-0x1&&_0x58e68b['splice'](_0x371daa,0x1);}}function _0x5ae8eb(_0x90feb7){const _0x26edb5=_0x90feb7['split'](':');return{'group':_0x26edb5[0x0],'type':_0x26edb5[0x1],'subType':_0x26edb5['length']>=0x5?_0x26edb5[0x2]:null,'id':_0x26edb5['length']<0x5?_0x26edb5[0x2]:_0x26edb5[0x3],'authorId':_0x26edb5['length']<0x5?_0x26edb5[0x3]:_0x26edb5[0x4],'markerCount':0x6==_0x26edb5['length']?_0x26edb5[0x5]:null};}function _0xf79472(_0x278645){for(let _0xf1648=0x0;_0xf1648<_0x58e68b['length'];_0xf1648++){if(_0x278645['isAdded']&&'insertion'==_0x58e68b[_0xf1648]['type']&&_0x278645['isAdded']['userId']==_0x58e68b[_0xf1648]['userId'])return _0x278645['isAddSuggestion']=_0x58e68b[_0xf1648],void delete _0x278645['isAdded'];if(!_0x278645['isAdded']&&!_0x278645['isRemoved']&&'deletion'==_0x58e68b[_0xf1648]['type'])return void(_0x278645['isRemoveSuggestion']=_0x58e68b[_0xf1648]);}}}['_setDistance'](_0x2cc250,_0x5104bb){let _0x1a98e1=0x0,_0x37b231=!0x1;const _0x220e71=new Map();for(const _0x2f3025 of _0x2cc250)_0x2f3025[_0x5104bb]?_0x37b231&&(_0x1a98e1++,_0x37b231=!0x1):(_0x1a98e1++,_0x37b231=!0x0),_0x220e71['set'](_0x2f3025['id'],_0x1a98e1);for(let _0xc456a6=0x0;_0xc456a6<_0x2cc250['length'];_0xc456a6++){if('isRemoved'==_0x5104bb&&_0x2cc250[_0xc456a6]['isAdded']||'isAdded'==_0x5104bb&&_0x2cc250[_0xc456a6]['isRemoved'])continue;if('text'==_0x2cc250[_0xc456a6]['type']){_0x2cc250[_0xc456a6]['distance']=0x0;continue;}const _0x4b647b=_0x220e71['get'](_0x2cc250[_0xc456a6]['pairId']),_0x1e7ddf=_0x220e71['get'](_0x2cc250[_0xc456a6]['id']);_0x2cc250[_0xc456a6]['distance']=_0x4b647b-_0x1e7ddf;}}['_getRevisionsRange'](_0x4561b4,_0x11ea06,_0x1b493e=!0x1){const _0x222711=[];let _0x4d4aca=this['repository']['getIndex'](_0x4561b4),_0xb2c474=this['repository']['getIndex'](_0x11ea06);for(-0x1==_0xb2c474&&(_0xb2c474=this['repository']['_revisions']['length'],_0x1b493e=!0x1);_0x4d4aca<_0xb2c474;)_0x222711['push'](this['repository']['getRevision'](_0x4d4aca)),_0x4d4aca++;return _0x1b493e&&_0x222711['push'](this['repository']['getRevision'](_0x4d4aca)),_0x222711;}['_threeWayMerge'](_0x427a01,_0x1addcb,_0x367acb,_0x1ccdb9){const _0x146f15=this['editor']['model']['schema'];let _0x46b007=_0x1addcb;for(;_0x427a01[_0x46b007]&&_0x427a01[_0x46b007]['isAdded'];)_0x46b007++;let _0x2d8166=_0x1ccdb9;for(;_0x367acb[_0x2d8166]&&_0x367acb[_0x2d8166]['isRemoved'];)_0x2d8166++;_0x490c6b(_0x427a01,_0x1addcb,_0x46b007),_0x490c6b(_0x367acb,_0x1ccdb9,_0x2d8166);const _0x52b5a6=_0x367acb['slice'](_0x1ccdb9,_0x2d8166)['concat'](_0x427a01['slice'](_0x1addcb,_0x46b007));return _0x52b5a6['sort']((_0x8aeb22,_0x9487c1)=>_0x8aeb22['side']!=_0x9487c1['side']?_0x8aeb22['side']-_0x9487c1['side']:_0x8aeb22['level']!=_0x9487c1['level']?_0x8aeb22['level']-_0x9487c1['level']:_0x8aeb22['distance']!=_0x9487c1['distance']?_0x9487c1['distance']-_0x8aeb22['distance']:!!_0x8aeb22['isAdded']!=!!_0x9487c1['isAdded']?-0x1==_0x8aeb22['side']||0x0==_0x8aeb22['side']?_0x8aeb22['isAdded']?-0x1:0x1:_0x8aeb22['isAdded']?0x1:-0x1:_0x8aeb22['index']-_0x9487c1['index']),{'commonTape':_0x52b5a6,'iEnd':_0x46b007,'jEnd':_0x2d8166};function _0x490c6b(_0x2e474d,_0xb35b59,_0x513fdb){let _0x27deab=-0x1,_0x5b20cf=Number['POSITIVE_INFINITY'],_0x395011=!0x0;for(let _0x5151ad=_0xb35b59;_0x5151ad<_0x513fdb;_0x5151ad++)if(_0x146f15['isInline'](_0x2e474d[_0x5151ad]['item'])||(_0x395011=!0x1),_0x2e474d[_0x5151ad]['item']['startIndex']<_0xb35b59&&(_0x27deab=_0x5151ad),_0x2e474d[_0x5151ad]['item']['endIndex']>=_0x513fdb){_0x5b20cf=_0x5151ad;break;}_0x395011&&(_0x27deab=_0x513fdb-0x1);for(let _0xcbae53=_0xb35b59;_0xcbae53<_0x513fdb;_0xcbae53++)_0x2e474d[_0xcbae53]['side']=_0xcbae53<=_0x27deab?-0x1:_0xcbae53<_0x5b20cf?0x0:0x1,_0x2e474d[_0xcbae53]['index']=_0xcbae53;let _0x3e2cfc=0x0;for(let _0x2b2f23=_0xb35b59;_0x2b2f23<=_0x27deab;_0x2b2f23++)0x0==_0x2e474d[_0x2b2f23]['distance']?_0x2e474d[_0x2b2f23]['level']=_0x3e2cfc:(_0x3e2cfc++,_0x2e474d[_0x2b2f23]['level']=_0x3e2cfc,_0x3e2cfc++);for(let _0x4afd3c=_0xb35b59;_0x4afd3c<_0x513fdb;_0x4afd3c++)0x0==_0x2e474d[_0x4afd3c]['side']&&(_0x2e474d[_0x4afd3c]['level']=_0x3e2cfc);_0x3e2cfc=0x0;for(let _0x308307=_0x513fdb-0x1;_0x308307>=_0x5b20cf;_0x308307--)0x0==_0x2e474d[_0x308307]['distance']?_0x2e474d[_0x308307]['level']=_0x3e2cfc:(_0x3e2cfc--,_0x2e474d[_0x308307]['level']=_0x3e2cfc,_0x3e2cfc--);}}['_fixObsoleteTags'](_0x1b351a){const _0x23a31e=new Map(),_0x52b04a=this['editor']['model']['schema'];for(let _0x3916d1=0x1;_0x3916d1<_0x1b351a['length'];_0x3916d1++){let _0x517497,_0x5b9ea6,_0x5e4e02;const _0x2d62a3=_0x1b351a[_0x3916d1],_0x530b39=_0x1b351a[_0x3916d1-0x1];if('text'==_0x2d62a3['type'])continue;if(_0x2d62a3['type']!=_0x530b39['type'])continue;if(!_0x52b04a['isBlock'](_0x530b39['item'])||_0x52b04a['isLimit'](_0x530b39['item']))continue;if(!_0x52b04a['isBlock'](_0x2d62a3['item'])||_0x52b04a['isLimit'](_0x2d62a3['item']))continue;if((_0x1b351a[_0x3916d1]['isAdded']||_0x1b351a[_0x3916d1]['isAddSuggestion'])&&_0x1b351a[_0x3916d1-0x1]['isRemoved'])_0x517497=_0x1b351a[_0x3916d1],_0x5b9ea6=_0x1b351a[_0x3916d1-0x1],_0x5e4e02=_0x3916d1-0x1;else{if(!_0x1b351a[_0x3916d1]['isRemoved']||!_0x1b351a[_0x3916d1-0x1]['isAdded']&&!_0x1b351a[_0x3916d1-0x1]['isAddSuggestion'])continue;_0x517497=_0x1b351a[_0x3916d1-0x1],_0x5b9ea6=_0x1b351a[_0x3916d1],_0x5e4e02=_0x3916d1;}const _0x295aea=_0x517497['level']==_0x5b9ea6['level'],_0x4676cf=Math['abs'](_0x517497['level'])<Math['abs'](_0x5b9ea6['level'])&&0x0==_0x5b9ea6['distance'];(_0x295aea||_0x4676cf)&&(_0x23a31e['set'](_0x5b9ea6['id'],_0x517497['id']),_0x1b351a['splice'](_0x5e4e02,0x1),_0x3916d1--,_0x517497['isAdded']=!0x1);}for(let _0x2e8db2=0x0;_0x2e8db2<_0x1b351a['length'];_0x2e8db2++)_0x23a31e['has'](_0x1b351a[_0x2e8db2]['pairId'])&&(_0x1b351a[_0x2e8db2]['pairId']=_0x23a31e['get'](_0x1b351a[_0x2e8db2]['pairId']));}['_removeMissingPairs'](_0x2793d8){const _0x4a0d34=new Set(_0x2793d8['map'](_0x5537d0=>_0x5537d0['id']));for(let _0x12f3ce=0x0;_0x12f3ce<_0x2793d8['length'];_0x12f3ce++)_0x4a0d34['has'](_0x2793d8[_0x12f3ce]['pairId'])||0x0==_0x2793d8[_0x12f3ce]['distance']||(_0x2793d8[_0x12f3ce]['isIncorrect']=!0x0);return _0x2793d8['filter'](_0x246f79=>!_0x246f79['isIncorrect']);}['_markMismatchedRemovedTags'](_0x44e6f2){const _0x4f2ee2=new Set();for(let _0x5e5bfc=0x0;_0x5e5bfc<_0x44e6f2['length'];_0x5e5bfc++){if(_0x4f2ee2['has'](_0x44e6f2[_0x5e5bfc]['id'])&&_0x44e6f2[_0x5e5bfc]['isRemoved']&&(_0x44e6f2[_0x5e5bfc]['isIncorrect']=!0x0),_0x44e6f2[_0x5e5bfc]['isIncorrect'])continue;if(0x0==_0x44e6f2[_0x5e5bfc]['distance'])continue;if('elementStart'!=_0x44e6f2[_0x5e5bfc]['type'])continue;if(null==_0x44e6f2[_0x5e5bfc]['pairId'])continue;let _0x4d8cbb=_0x5e5bfc+0x1,_0x7ae45f=0x0;for(;_0x44e6f2[_0x4d8cbb]['id']!=_0x44e6f2[_0x5e5bfc]['pairId'];)'elementStart'==_0x44e6f2[_0x4d8cbb]['type']?_0x7ae45f++:'elementEnd'==_0x44e6f2[_0x4d8cbb]['type']&&_0x7ae45f--,_0x4d8cbb++;if(0x0!=_0x7ae45f){if(_0x44e6f2[_0x5e5bfc]['isRemoved'])_0x44e6f2[_0x5e5bfc]['isIncorrect']=!0x0;else{for(;_0x4d8cbb!=_0x5e5bfc;)_0x44e6f2[_0x4d8cbb]['isRemoved']&&0x0!=_0x44e6f2[_0x4d8cbb]['distance']&&(_0x44e6f2[_0x4d8cbb]['isIncorrect']=!0x0,_0x4f2ee2['add'](_0x44e6f2[_0x4d8cbb]['pairId'])),_0x4d8cbb--;}}}return _0x44e6f2['filter'](_0x2afaf1=>!_0x2afaf1['isIncorrect']);}['_removeUnsupportedChanges'](_0x302fce){const _0x1da98a=this['editor']['model']['schema'];for(let _0x425de1=0x0;_0x425de1<_0x302fce['length'];_0x425de1++){if(!(_0x302fce[_0x425de1]['isAdded']||_0x302fce[_0x425de1]['isAddSuggestion']||_0x302fce[_0x425de1]['isRemoved']||_0x302fce[_0x425de1]['isRemoveSuggestion']))continue;if(0x0==_0x302fce[_0x425de1]['distance'])continue;const _0x16b855=_0x302fce[_0x425de1]['item'];_0x1da98a['isBlock'](_0x16b855)||_0x1da98a['isLimit'](_0x16b855)||(_0x302fce[_0x425de1]['isAdded']&&delete _0x302fce[_0x425de1]['isAdded'],_0x302fce[_0x425de1]['isAddSuggestion']&&delete _0x302fce[_0x425de1]['isAddSuggestion'],_0x302fce[_0x425de1]['isRemoveSuggestion']&&delete _0x302fce[_0x425de1]['isRemoveSuggestion'],_0x302fce[_0x425de1]['isRemoved']&&(_0x302fce[_0x425de1]['isIncorrect']=!0x0));}return _0x302fce['filter'](_0x1b7288=>!_0x1b7288['isIncorrect']);}['_makeModelFromTape'](_0x49c037,_0x193a43,_0x5b2cba){const _0x21cea4=new gt(),_0x4615ce=[],_0x25547f=new Map(),_0x342c2b=this['editor']['model'],_0x28d1ae=_0x342c2b['schema'],_0x193954=[_0x21cea4],_0x52977d={},_0x21696b={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4d00c4=null;const _0x43e15e=[0x0];for(let _0x5d8652=0x0;_0x5d8652<_0x49c037['length'];_0x5d8652++)if('elementStart'===_0x49c037[_0x5d8652]['type']){_0x49c037[_0x5d8652]['previousPosition']=_0x342c2b['createPositionFromPath'](_0x21cea4,_0x43e15e);const _0x20f6e6=new ut(_0x49c037[_0x5d8652]['item']['name'],_0x49c037[_0x5d8652]['item']['getAttributes']());_0x193954[0x0]['_appendChild'](_0x20f6e6),_0x43e15e['push'](0x0),_0x193954['unshift'](_0x20f6e6),_0x49c037[_0x5d8652]['nextPosition']=_0x342c2b['createPositionFromPath'](_0x21cea4,_0x43e15e);}else'elementEnd'===_0x49c037[_0x5d8652]['type']?(_0x193954['shift'](),_0x49c037[_0x5d8652]['previousPosition']=_0x342c2b['createPositionFromPath'](_0x21cea4,_0x43e15e),_0x43e15e['pop'](),_0x43e15e[_0x43e15e['length']-0x1]++,_0x49c037[_0x5d8652]['nextPosition']=_0x342c2b['createPositionFromPath'](_0x21cea4,_0x43e15e)):(_0x49c037[_0x5d8652]['previousPosition']=_0x342c2b['createPositionFromPath'](_0x21cea4,_0x43e15e),_0x4d00c4?_0x4d00c4['_data']+=_0x49c037[_0x5d8652]['item']['data']:_0x4d00c4=new mt(_0x49c037[_0x5d8652]['item']['data'],_0x49c037[_0x5d8652]['item']['getAttributes']()),_0x49c037[_0x5d8652+0x1]&&'text'===_0x49c037[_0x5d8652+0x1]['type']&&_0x244414(_0x4d00c4,_0x49c037[_0x5d8652+0x1]['item'])||(_0x193954[0x0]['_appendChild'](_0x4d00c4),_0x4d00c4=null),_0x43e15e[_0x43e15e['length']-0x1]+=_0x49c037[_0x5d8652]['item']['offsetSize'],_0x49c037[_0x5d8652]['nextPosition']=_0x342c2b['createPositionFromPath'](_0x21cea4,_0x43e15e));for(let _0x4f7a0f=0x0;_0x4f7a0f<_0x49c037['length'];_0x4f7a0f++){const _0xe5d4bf=_0x49c037[_0x4f7a0f]['previousPosition'],_0x197f31=_0x49c037[_0x4f7a0f]['nextPosition'];for(const _0x2693f1 of _0x49c037[_0x4f7a0f]['markersStart'])_0x25547f['set'](_0x2693f1,{'start':_0xe5d4bf,'end':null});_0x5982d2('isRemoveSuggestion',_0x4f7a0f,_0xe5d4bf,_0x197f31),_0x5982d2('isAddSuggestion',_0x4f7a0f,_0xe5d4bf,_0x197f31),_0x5982d2('isRemoved',_0x4f7a0f,_0xe5d4bf,_0x197f31),_0x5982d2('isAdded',_0x4f7a0f,_0xe5d4bf,_0x197f31);for(const _0x21d486 of _0x49c037[_0x4f7a0f]['markersEnd']){const _0x3d7337=_0x25547f['get'](_0x21d486);_0x3d7337?_0x3d7337['end']=_0x197f31:_0x25547f['set'](_0x21d486,{'start':_0x197f31,'end':_0x197f31});}}for(const [_0x32e90d,_0x54c2d1]of _0x25547f){const _0x1fb86d=this['editor']['model']['createRange'](_0x54c2d1['start'],_0x54c2d1['end']);_0x21cea4['markers']['set'](_0x32e90d,_0x1fb86d);}return _0x4615ce['sort']((_0x477286,_0x16ee15)=>{const _0x5ac563=_0x21cea4['markers']['get']('revision:'+_0x477286['id']),_0x1bba63=_0x21cea4['markers']['get']('revision:'+_0x16ee15['id']);return _0x5ac563['start']['isBefore'](_0x1bba63['start'])?-0x1:_0x5ac563['start']['isAfter'](_0x1bba63['start'])?0x1:_0x5ac563['end']['isBefore'](_0x1bba63['end'])?-0x1:_0x5ac563['end']['isAfter'](_0x1bba63['end'])?0x1:'add'===_0x477286['type']?-0x1:0x1;}),{'root':_0x21cea4,'changes':_0x4615ce};function _0x5982d2(_0x43a376,_0xb62b65,_0x1f9a35,_0x18fb48){const _0x159ada=!!_0x49c037[_0xb62b65][_0x43a376],_0x5771fb=_0x159ada?_0x49c037[_0xb62b65][_0x43a376]['userId']:null,_0x208184=_0xb62b65===_0x49c037['length']-0x1,_0x422aeb=_0x21696b[_0x43a376][0x0],_0x284b51=_0x28d1ae['isObject'](_0x49c037[_0xb62b65]['item']);!_0x52977d[_0x43a376]&&_0x159ada?_0x52977d[_0x43a376]={'start':_0x1f9a35,'tapeItem':_0x49c037[_0xb62b65],'userId':_0x5771fb,'type':_0x43a376}:_0x52977d[_0x43a376]&&!_0x159ada?(_0x52977d[_0x43a376]['end']=_0x1f9a35,_0x28a6e6(_0x52977d[_0x43a376]),_0x52977d[_0x43a376]=null):_0x52977d[_0x43a376]&&_0x159ada&&_0x52977d[_0x43a376]['userId']!==_0x5771fb&&(_0x52977d[_0x43a376]['end']=_0x1f9a35,_0x422aeb&&_0x422aeb['userId']===_0x52977d[_0x43a376]['userId']||_0x28a6e6(_0x52977d[_0x43a376]),_0x52977d[_0x43a376]={'start':_0x1f9a35,'tapeItem':_0x49c037[_0xb62b65],'userId':_0x5771fb,'type':_0x43a376}),_0x52977d[_0x43a376]&&_0x284b51&&('elementStart'!==_0x49c037[_0xb62b65]['type']||_0x422aeb&&_0x422aeb['userId']===_0x5771fb||_0x21696b[_0x43a376]['unshift']({'userId':_0x5771fb,'object':_0x49c037[_0xb62b65]['item'],'change':_0x52977d[_0x43a376]}),'elementEnd'===_0x49c037[_0xb62b65]['type']&&_0x422aeb&&_0x422aeb['object']===_0x49c037[_0xb62b65]['item']&&(_0x21696b[_0x43a376]['shift'](),_0x52977d[_0x43a376]=_0x422aeb['change'])),_0x52977d[_0x43a376]&&_0x208184&&(_0x52977d[_0x43a376]['end']=_0x18fb48,_0x28a6e6(_0x52977d[_0x43a376]),_0x52977d[_0x43a376]=null);}function _0x28a6e6({start:_0x2c621a,end:_0x4204cf,tapeItem:_0x1dfcc9,userId:_0x2b90d8,type:_0x2b29a4}){const _0x1b920b=_0x1dfcc9['item'],_0x33f673=_0x342c2b['schema']['isBlock'](_0x1b920b)&&!_0x342c2b['schema']['isLimit'](_0x1b920b),_0x25b0ea=_0x2c621a['nodeAfter']==_0x4204cf['parent']&&_0x4204cf['isAtStart'];if(_0x33f673&&_0x25b0ea)return;const _0x1151b0=_0x342c2b['createRange'](_0x2c621a,_0x4204cf),_0x930fc0=_0x193a43['get'](_0x2b90d8),_0x11fa0b=new r({'author':_0x930fc0,'type':'isAdded'==_0x2b29a4||'isAddSuggestion'==_0x2b29a4?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2b29a4||'isRemoveSuggestion'==_0x2b29a4},'createdAt':new Date(),'rootName':_0x5b2cba});_0x4615ce['push'](_0x11fa0b),_0x21cea4['markers']['set']('revision:'+_0x11fa0b['id'],_0x1151b0);}function _0x244414(_0x460a58,_0x45187f){const _0x3bb1f5=_0x460a58['getAttributes'](),_0x25c945=_0x45187f['getAttributes']();for(const _0x53133c of _0x3bb1f5){if(_0x53133c[0x1]!==_0x45187f['getAttribute'](_0x53133c[0x0]))return!0x1;_0x25c945['next']();}return _0x25c945['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x5df35f=>{const _0x7dde71=_0x5df35f['markerName']['split'](':')[0x1],_0x25368a=this['_getChangeFromId'](_0x7dde71);if(!_0x25368a)return null;const _0x577b50='add'==_0x25368a['type']?'insertion':'deletion',_0x2a82c8=['ck-suggestion-marker','ck-suggestion-marker-'+_0x577b50];return _0x25368a['data']['isSuggestion']&&_0x2a82c8['push']('ck-suggestion-marker-'+_0x577b50+'-new'),this['activeChange']==_0x25368a&&_0x2a82c8['push']('ck-suggestion-marker--active'),{'classes':_0x2a82c8,'attributes':{'data-change-id':_0x7dde71}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x159d4b=>{_0x159d4b['on']('element:pre',(_0xb34039,_0x5d0c00,_0x188c39)=>{const _0x4b25bf=_0x5d0c00['viewItem']['getChild'](0x0);if(!_0x4b25bf||!_0x4b25bf['is']('element','code'))return;if(!_0x188c39['consumable']['consume'](_0x4b25bf,{'attributes':['vid_start','vid_end']}))return;const _0x108050=_0x5d0c00['modelRange']['start']['nodeAfter'];_0x188c39['writer']['setAttribute']('vid_start',_0x4b25bf['getAttribute']('vid_start'),_0x108050),_0x188c39['writer']['setAttribute']('vid_end',_0x4b25bf['getAttribute']('vid_end'),_0x108050);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x326a8c=>{_0x326a8c['on']('element',(_0x1d3ad6,_0x5db1c3,_0x571a15)=>{if(!_0x571a15['consumable']['consume'](_0x5db1c3['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x5db1c3['modelRange']['isCollapsed'])return;const _0x80e062=_0x5db1c3['modelRange']['start']['nodeAfter'];_0x80e062['hasAttribute']('vid_start')||_0x80e062['hasAttribute']('vid')||(_0x571a15['writer']['setAttribute']('vid_start',_0x5db1c3['viewItem']['getAttribute']('vid_start'),_0x80e062),_0x571a15['writer']['setAttribute']('vid_end',_0x5db1c3['viewItem']['getAttribute']('vid_end'),_0x80e062));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x394ff7=>_0x394ff7['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x48e5bb,[,_0x93b422])=>{['vid_start','vid_end','vid']['includes'](_0x93b422)&&(_0x48e5bb['return']=!0x0,_0x48e5bb['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2e05f3=>{_0x2e05f3['on']('attribute:vid',(_0x34d850,_0x3405df,_0x20f99f)=>{if('\x20'!=_0x3405df['item']['data']||_0x3405df['item']['parent']['maxOffset']>0x1)return;if(!_0x20f99f['consumable']['consume'](_0x3405df['item'],_0x34d850['name']))return;const _0x57a15e=_0x20f99f['writer'],_0xae955d=_0x20f99f['mapper']['toViewRange'](_0x3405df['range']);_0x57a15e['wrap'](_0xae955d,_0x57a15e['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x3ef0d4){const _0x1f175f=_0x3ef0d4['plugins']['get']('RevisionViewer');return(_0x14e03c,_0x5e9299,_0x483bb6)=>{const _0x5dc1b5=_0x5e9299['markerName']['split'](':')[0x1],_0x110744=_0x1f175f['_getChangeFromId'](_0x5dc1b5);if(!_0x110744)return null;const _0x268b9c='add'==_0x110744['type']?'split':'merge';if(!_0x483bb6['consumable']['test'](_0x5e9299['markerRange'],_0x14e03c['name']))return;const _0x2a8952=_0x5e9299['markerRange']['getWalker'](),_0x3d89a7=_0x5e9299['markerRange']['start'],_0x94e55f=_0x3ef0d4['model']['schema'];let _0x298f2e=null,_0x36349d=null,_0x1a80c8=!0x1,_0x139d58=!0x1;for(const _0x224d18 of _0x2a8952){const _0x269fdd=_0x224d18['item'];_0x1a80c8=_0x1a80c8||_0x94e55f['isContent'](_0x269fdd);const _0xbe37a1=_0x483bb6['mapper']['toViewElement'](_0x269fdd);if(_0xbe37a1&&_0xbe37a1['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x224d18['type']&&(_0x94e55f['isBlock'](_0x269fdd)&&!_0x94e55f['isLimit'](_0x269fdd)&&(_0x269fdd['nextSibling']||_0x3d89a7['isAtEnd']?_0x298f2e&&_0x298f2e['parent']==_0x269fdd||(_0x298f2e=_0x269fdd,_0x5af71c(_0x224d18['previousPosition']),_0x139d58=!0x0):_0x36349d=_0x36349d||_0x224d18['previousPosition']));}function _0x5af71c(_0xa977f6){const _0x236e41=_0x483bb6['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x268b9c}),_0x36ca3f=_0x483bb6['mapper']['toViewPosition'](_0xa977f6);_0x110744['data']['isSuggestion']&&_0x483bb6['writer']['addClass']('ck-suggestion-marker-'+_0x268b9c+'-new',_0x236e41),_0x1f175f['activeChange']==_0x110744&&_0x483bb6['writer']['addClass']('ck-suggestion-marker--active',_0x236e41),_0x483bb6['writer']['insert'](_0x36ca3f,_0x236e41),_0x483bb6['mapper']['bindElementToMarker'](_0x236e41,_0x5e9299['markerName']);}_0x1a80c8||_0x139d58||!_0x36349d||_0x5af71c(_0x36349d);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x22af0f,_0x4d1cb2,_0x3f19c7)=>{const _0x17cdf9=_0x3f19c7['mapper']['markerNameToElements'](_0x4d1cb2['markerName']);if(_0x17cdf9){for(const _0x102c42 of _0x17cdf9)(_0x102c42['hasClass']('ck-suggestion-marker-split')||_0x102c42['hasClass']('ck-suggestion-marker-merge'))&&(_0x3f19c7['mapper']['unbindElementFromMarkerName'](_0x102c42,_0x4d1cb2['markerName']),_0x3f19c7['writer']['remove'](_0x102c42));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x19b3de,_0x42a971,_0xbf9b44)=>{const _0x55a0ac=_0x42a971['markerName']['split'](':')[0x1],_0x470d9f=this['_getChangeFromId'](_0x55a0ac);if(!_0x470d9f)return null;const _0x259947='add'==_0x470d9f['type']?'split':'merge';if(_0xbf9b44['consumable']['test'](_0x42a971['markerRange'],_0x19b3de['name']))for(const _0x346cc8 of _0x42a971['markerRange']['getItems']()){if(!_0x346cc8['is']('element','softBreak'))continue;const _0x5f0338=_0xbf9b44['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x259947}),_0x3c4567=_0xbf9b44['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x346cc8));_0x470d9f['data']['isSuggestion']&&_0xbf9b44['writer']['addClass']('ck-suggestion-marker-'+_0x259947+'-new',_0x5f0338),this['activeChange']==_0x470d9f&&_0xbf9b44['writer']['addClass']('ck-suggestion-marker--active',_0x5f0338),_0xbf9b44['writer']['insert'](_0x3c4567,_0x5f0338),_0xbf9b44['mapper']['bindElementToMarker'](_0x5f0338,_0x42a971['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x5b33d0=>{for(const _0x547396 of this['editor']['model']['document']['getRootNames']()){const _0x4fdc93=this['editor']['model']['document']['getRoot'](_0x547396),_0x44a094=this['editor']['editing']['view']['document']['getRoot'](_0x547396);if(_0x44a094){const _0x4f8e31=_0x4fdc93['getAttribute']('revisionHistoryAttachChange');if(_0x5b33d0['removeAttribute']('data-change-id',_0x44a094),_0x5b33d0['removeClass']('ck-revision-history-root-add',_0x44a094),_0x5b33d0['removeClass']('ck-revision-history-root-remove',_0x44a094),_0x5b33d0['removeClass']('ck-revision-history-root--active',_0x44a094),_0x4f8e31){const _0xdfbf48=this['_getChangeFromId'](_0x4f8e31);if(!_0xdfbf48)return null;_0x5b33d0['setAttribute']('data-change-id',_0x4f8e31,_0x44a094),_0x5b33d0['addClass']('ck-revision-history-root-'+_0xdfbf48['type'],_0x44a094),this['activeChange']==_0xdfbf48&&_0x5b33d0['addClass']('ck-revision-history-root--active',_0x44a094);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3ccc1d=>'revision-comment:'+_0x3ccc1d,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3dc644=>'revision-suggestion:'+_0x3dc644,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x10c737=>({'name':'suggestion:'+_0x10c737,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3d5999=>{const _0x528cc5=_0x3d5999['markerName']['split'](':')[0x1];return'insertion'!=_0x528cc5&&'deletion'!=_0x528cc5?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x528cc5]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',X(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',X(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3e6ccf,_0x50754c,_0x3d2e46)=>{const _0x2884c2=_0x3d2e46['mapper']['markerNameToElements'](_0x50754c['markerName']);if(_0x2884c2){for(const _0x28ee3e of _0x2884c2)_0x28ee3e['is']('uiElement')&&(_0x3d2e46['mapper']['unbindElementFromMarkerName'](_0x28ee3e,_0x50754c['markerName']),_0x3d2e46['writer']['remove'](_0x28ee3e));}},{'priority':'high'});}['_getChangeFromId'](_0x5c83b2){return this['_changeIdToChange']['get'](_0x5c83b2);}['_getViewForChange'](_0x9bad5d){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x9bad5d),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x29c984,_0x379f3b,_0x3bb033,_0x2fb82e)=>{_0x2fb82e&&this['_balloon']['remove'](_0x2fb82e),_0x3bb033&&(this['_balloon']['add']({'view':_0x3bb033,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x4082c9=this['editor']['editing'],_0x4f3bbe=this['_getChangeFromId'](_0x3bb033['changeId']);let _0x2e720f;if(_0x4f3bbe['data']['isOnRoot']){const _0x2fc8b8=_0x4082c9['view']['getDomRoot'](_0x4f3bbe['rootName']);_0x2e720f=Array['from'](_0x2fc8b8['getClientRects']());}else{const _0x46bc5c=this['editor']['model']['markers']['get']('revision:'+_0x3bb033['changeId']);_0x2e720f=Array['from'](_0x4082c9['mapper']['markerNameToElements'](_0x46bc5c['name']))['map'](_0x2bbb41=>_0x4082c9['view']['domConverter']['mapViewToDom'](_0x2bbb41))['map'](_0x4a441b=>Array['from'](_0x4a441b['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x2e720f[0x0];return _0x2e720f['find'](_0x459ab9=>_0x459ab9['top']-0x3<=this['_activeViewTarget']['y']&&_0x459ab9['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x459ab9['left']-0x3<=this['_activeViewTarget']['x']&&_0x459ab9['right']+0x3>=this['_activeViewTarget']['x'])||_0x2e720f[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x42f0d0,_0x3b0627,_0x46f1bc,_0x45aead)=>{this['activeView']=_0x46f1bc?this['_getViewForChange'](_0x46f1bc):null,this['editor']['model']['change'](()=>{const _0x2f8eeb=this['editor']['editing'];_0x45aead&&(_0x45aead['data']['isOnRoot']?_0x2f8eeb['view']['change'](_0x55a210=>{_0x55a210['removeClass']('ck-revision-history-root--active',_0x2f8eeb['view']['document']['getRoot'](_0x45aead['rootName']));}):_0x2f8eeb['reconvertMarker']('revision:'+_0x45aead['id'])),_0x46f1bc&&(_0x46f1bc['data']['isOnRoot']?_0x2f8eeb['view']['change'](_0x467c1a=>{_0x467c1a['addClass']('ck-revision-history-root--active',_0x2f8eeb['view']['document']['getRoot'](_0x46f1bc['rootName']));}):_0x2f8eeb['reconvertMarker']('revision:'+_0x46f1bc['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x25b6da,_0x4e5b67)=>{if(this['activeChange'])return;const _0x5a71d7=this['_findChangeIdFromDomTarget'](_0x4e5b67['target']),_0x5d21b8=this['_changeIdToChange']['get'](_0x5a71d7);_0x5d21b8?(this['_activeViewTarget']={'x':_0x4e5b67['domEvent']['x'],'y':_0x4e5b67['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x5d21b8)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x5cd738,_0x180636)=>{const _0x29a8d2=this['_findChangeIdFromDomTarget'](_0x180636['target']),_0x294803=this['_changeIdToChange']['get'](_0x29a8d2);_0x294803?(this['_activeViewTarget']={'x':_0x180636['domEvent']['x'],'y':_0x180636['domEvent']['y']},_0x294803===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x294803):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0xe0d7e){do{const _0x53cd5b=_0xe0d7e['getAttribute']('data-change-id');if(_0x53cd5b)return _0x53cd5b;_0xe0d7e=_0xe0d7e['parent'];}while(_0xe0d7e);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0xab7d2c=>{for(const _0x4adab3 of this['editor']['model']['markers'])_0xab7d2c['removeMarker'](_0x4adab3);});}}function X(_0x2258e0,_0x2954f3){return(_0x24d964,_0x1b6c46,_0x2576b9)=>{if(!_0x2576b9['consumable']['test'](_0x1b6c46['markerRange'],_0x24d964['name']))return;const _0x27e801=_0x1b6c46['markerRange']['getWalker'](),_0x5226a1=_0x1b6c46['markerRange']['start'],_0x213da4=_0x2258e0['model']['schema'];let _0x1ca36c=null,_0x2677c8=null,_0x2799d9=!0x1,_0x3b0206=!0x1;for(const _0x317133 of _0x27e801){const _0x7d153d=_0x317133['item'];_0x2799d9=_0x2799d9||_0x213da4['isContent'](_0x7d153d);const _0x430c6e=_0x2576b9['mapper']['toViewElement'](_0x7d153d);if(_0x430c6e&&_0x430c6e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x317133['type']&&(_0x213da4['isBlock'](_0x7d153d)&&!_0x213da4['isLimit'](_0x7d153d)&&(_0x7d153d['nextSibling']||_0x5226a1['isAtEnd']?_0x1ca36c&&_0x1ca36c['parent']==_0x7d153d||(_0x1ca36c=_0x7d153d,_0x3d9cec(_0x317133['previousPosition']),_0x3b0206=!0x0):_0x2677c8=_0x2677c8||_0x317133['previousPosition']));}function _0x3d9cec(_0x59a9fc){const _0x956004=_0x2576b9['mapper']['toViewPosition'](_0x59a9fc),_0x5b9dd4=_0x2576b9['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2954f3});_0x2576b9['writer']['insert'](_0x956004,_0x5b9dd4),_0x2576b9['mapper']['bindElementToMarker'](_0x5b9dd4,_0x1b6c46['markerName']);}_0x2799d9||_0x3b0206||!_0x2677c8||_0x3d9cec(_0x2677c8);};}class wt extends _0x33adb6{constructor(_0x53d8e5){super(_0x53d8e5);const _0x57aec0=_0x53d8e5['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x57aec0,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x57aec0,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4a9d32=this['editor'],_0x4a388d=_0x4a9d32['plugins']['get'](m),_0x374659=_0x4a388d['isReady']?_0x4a388d['diff']['newRevisionId']:null;_0x4a9d32['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x374659);}['refresh'](){const {isReady:_0x42a418,isEnabled:_0x4cf200,repository:_0x529734,diff:_0x50381a}=this['editor']['plugins']['get'](m),_0x4f17e6=_0x50381a&&_0x529734['getLaterVisibleRevision'](_0x50381a['newRevisionId']);this['isEnabled']=_0x42a418&&_0x4cf200&&Boolean(_0x4f17e6);}}class pt extends _0x33adb6{['_step'];constructor(_0x3a230f,{direction:_0x1b1588}){super(_0x3a230f);const _0x46508f=_0x3a230f['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x1b1588?0x1:-0x1,this['listenTo'](_0x46508f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x46508f,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x46508f,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x508c56=this['editor'],_0x39655d=_0x508c56['plugins']['get'](m),{isNavigationMode:_0x49b04b,currentChangeNumber:_0x1350da}=_0x39655d;let _0x10dacc;if(_0x39655d['activeChange']=_0x49b04b?_0x39655d['diff']['changes']['get'](_0x1350da+this['_step']):_0x39655d['diff']['changes']['first'],_0x39655d['activeChange']['data']['isOnRoot'])_0x10dacc=_0x508c56['editing']['view']['getDomRoot'](_0x39655d['activeChange']['rootName']);else{const _0x1f96f9=_0x508c56['model']['markers']['get']('revision:'+_0x39655d['activeChange']['id']);_0x10dacc=_0x3c0849(_0x508c56['editing'],_0x1f96f9);}_0x81c68({'target':_0x10dacc,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x17920e,currentChangeNumber:_0x7d449,numberOfChanges:_0x429b5d,isReady:_0x59ef81,isEnabled:_0xd099d3}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0xd099d3&&_0x59ef81&&_0x429b5d)&&(!_0x17920e||(0x1===this['_step']?_0x7d449<_0x429b5d-0x1:_0x7d449>0x0));}}class _i extends _0x310fcf{constructor(_0x168bcc){super(_0x168bcc);const _0x2c191c=this['bindTemplate'],_0x123c0e=new _0x2cfb85(_0x168bcc),_0x5bf8e5=new _0x2cfb85(_0x168bcc);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',(_0x438a5f,_0x557799)=>_0x438a5f&&_0x557799>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0xc16723,_0x15607c,_0x25de0c,_0x4de630)=>{if(!_0xc16723)return g(_0x168bcc,'Loading...');if(!_0x25de0c)return g(_0x168bcc,'No\x20changes');const _0x5d15dc=g(_0x168bcc,'NUMBER_OF_CHANGES',_0x25de0c);return _0x4de630?g(_0x168bcc,'X_OF_Y_CHANGES',[_0x15607c+0x1,_0x25de0c]):_0x5d15dc;}),_0x123c0e['set']({'label':g(_0x168bcc,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x566766}),_0x5bf8e5['set']({'label':g(_0x168bcc,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x577fb3}),_0x123c0e['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5bf8e5['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x123c0e['on']('execute',()=>this['fire']('execute','backward')),_0x5bf8e5['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',_0x2c191c['if']('_isStatusLabelVisible','ck-hidden',_0x53dce5=>!_0x53dce5)]},'children':[{'text':_0x2c191c['to']('isNavigationMode',_0x5525e9=>_0x5525e9?g(_0x168bcc,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x168bcc,'Total')+':\x20')}]},{'text':_0x2c191c['to']('_statusText')}]},new _0x3e0371(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x123c0e,_0x5bf8e5]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x4b4582{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x440b1d=this['editor']['editing']['view'];_0x440b1d['change'](_0x38d208=>{for(const _0x3af436 of _0x440b1d['document']['roots'])_0x38d208['addClass'](ce,_0x3af436);});}['hide'](){const _0x45e2b7=this['editor']['editing']['view'];_0x45e2b7['change'](_0x1e76f5=>{for(const _0x292615 of _0x45e2b7['document']['roots'])_0x1e76f5['removeClass'](ce,_0x292615);});}}class R extends _0x4b4582{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x49d4cf=this['editor'],_0x3e97c1=_0x49d4cf['plugins']['get'](m),_0x30628d=_0x49d4cf['plugins']['get'](le);_0x49d4cf['ui']['componentFactory']['add']('exitToEditing',_0x2b3711=>{const _0x3f311a=new _0x2cfb85(_0x2b3711);return _0x3f311a['set']({'label':g(_0x2b3711,'Back\x20to\x20editing'),'icon':_0x1a538d,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3f311a,'execute',()=>{_0x49d4cf['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3f311a;}),_0x49d4cf['ui']['componentFactory']['add']('restoreRevision',_0x329c9e=>{const _0x1cdf1f=new _0x2cfb85(_0x329c9e);return _0x1cdf1f['set']({'label':g(_0x329c9e,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1cdf1f['bind']('isEnabled')['to'](_0x49d4cf['commands']['get']('restoreRevision')),this['listenTo'](_0x1cdf1f,'execute',()=>_0x49d4cf['execute']('restoreRevision')),_0x1cdf1f;}),_0x49d4cf['ui']['componentFactory']['add']('changesNavigation',_0x27f9f9=>{const _0x44e353=new _i(_0x27f9f9),_0x3d943f=_0x49d4cf['commands']['get']('showPreviousChange'),_0x5db13d=_0x49d4cf['commands']['get']('showNextChange');return _0x44e353['bind']('isBackwardNavigationEnabled')['to'](_0x3d943f,'isEnabled'),_0x44e353['bind']('isForwardNavigationEnabled')['to'](_0x5db13d,'isEnabled'),_0x44e353['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3e97c1),this['listenTo'](_0x44e353,'execute',(_0x40d438,_0x1ca07e)=>{_0x49d4cf['execute']('forward'===_0x1ca07e?'showNextChange':'showPreviousChange');}),_0x44e353;}),_0x30628d['show'](),_0x3e97c1['on']('change:isReady',(_0x3e45a2,_0x55e014,_0x370591)=>{_0x370591?_0x30628d['hide']():_0x30628d['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x4c0cd3,_0x3bf96f){super(_0x4c0cd3,_0x3bf96f);const _0x5e252c=this['bindTemplate'];this['set']({'label':g(_0x4c0cd3,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x4c0cd3,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5e252c['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x2a38cc=this['fieldView']['element'];this['_tooltipString']=_0x2a38cc['scrollWidth']>_0x2a38cc['clientWidth']&&_0x2a38cc['value']||'';}}class oi extends _0x310fcf{constructor(_0x4fafe8,_0x43d44f,_0x1bdd77){super(_0x4fafe8);const _0x41510f=new _0x42c1dc();_0x41510f['set']({'content':_0xb9e892,'viewBox':'0\x200\x2011\x2010'});const _0xd46d3b=['ck','ck-revision-history-sidebar__revision-author'];_0x1bdd77&&_0xd46d3b['push']('ck-revision-history-sidebar__revision-author_creator');const _0x2df717=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x4fafe8,_0x1bdd77?'Revision\x20creator':'Revision\x20author')},'children':[_0x41510f,_0x43d44f['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xd46d3b},'children':_0x2df717});}}function ni(_0x5efeb1,_0x5626b2){const _0x58ace9=_0x5efeb1['bindTemplate'],_0x3a6634=_0x5efeb1['locale'],_0xc3d1e1=_0x23a537(_0x3a6634);_0xc3d1e1['panelPosition']='sw';const _0x3db7bd=function(_0x1372d2,_0x43f262){const _0xaea6ea=function(_0x361874,_0x2557b5){const _0x16de27=_0x361874['locale'],_0x8b028f={'Compare\x20against\x20selected':g(_0x16de27,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x16de27,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x16de27,'Restore\x20this\x20revision')};return _0x2557b5['map'](_0xa0b44a=>{const _0x5a224f=_0x8b028f[_0xa0b44a['name']];return _0x5a224f&&_0x5a224f!==_0xa0b44a['name']&&(_0xa0b44a['name']=_0x5a224f),_0xa0b44a;});}(_0x1372d2,_0x43f262),_0x385c21=new _0x16fd8d();for(const _0x5e0669 of _0xaea6ea){const _0x1b1523={'type':'button','model':new to({'label':_0x5e0669['name'],'class':_0x5e0669['class'],'withText':!0x0,'role':'menuitem','_action':_0x5e0669['action']})};_0x1b1523['model']['bind']('isEnabled')['to'](_0x1372d2,'isActionsDropdownOpen',_0x1e2a21=>'function'!=typeof _0x5e0669['isEnabled']||(!_0x1e2a21||_0x5e0669['isEnabled'](_0x1372d2))),_0x385c21['add'](_0x1b1523);}return _0x385c21;}(_0x5efeb1,_0x5626b2);return _0x5efeb1['bind']('isActionsDropdownOpen')['to'](_0xc3d1e1,'isOpen'),_0xc3d1e1['buttonView']['set']({'label':g(_0x3a6634,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x510495}),_0xc3d1e1['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x58ace9['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x58ace9['to'](_0x3862df=>_0x3862df['stopPropagation']())}}),_0xc3d1e1['on']('execute',_0x476071=>{_0x5efeb1['isReady']&&'function'==typeof _0x476071['source']['_action']&&_0x476071['source']['_action'](_0x5efeb1);}),_0x3e9c2f(_0xc3d1e1,_0x3db7bd,{'role':'menu'}),_0xc3d1e1['listenTo'](_0x5efeb1,'change:isActionsDropdownOpen',(_0xc44d34,_0x203f5e,_0x48bf87)=>{if(_0x48bf87)for(const _0x1037e2 of _0xc3d1e1['listView']['items']){const _0x5c569e=_0x1037e2['children']['first'],_0xd14226=_0x5626b2['find'](_0x15d691=>_0x15d691['action']===_0x5c569e['_action'])['isVisible'];_0x1037e2['isVisible']=void 0x0===_0xd14226||_0xd14226(_0x5efeb1);}}),_0xc3d1e1;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x5ef790(_0x310fcf){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x1b392f,_0x18a2b5,_0x5381c5,_0x233422){super(_0x1b392f);const _0x44a518=this['bindTemplate'],_0x419080=function(_0x9e1f10,_0x34a281){const _0x118c24=Array['from'](_0x34a281['authors'])['filter'](_0x3b07d7=>_0x3b07d7!=_0x34a281['creator']);return _0x34a281['creator']&&_0x118c24['unshift'](_0x34a281['creator']),_0x118c24['map'](_0x2d094a=>new oi(_0x9e1f10,_0x2d094a,_0x2d094a==_0x34a281['creator']));}(_0x1b392f,_0x18a2b5);this['id']=_0x18a2b5['id'],this['_revision']=_0x18a2b5,this['_requireRevisionName']=_0x233422,this['bind']('name','createdAt')['to'](_0x18a2b5),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x194249=>{return _0x18a04b=_0x1b392f['uiLanguage'],(_0x546a6a=_0x194249)['toLocaleDateString'](_0x18a04b,{'month':'long','day':'numeric'})+',\x20'+_0x546a6a['toLocaleTimeString'](_0x18a04b,{'hour':'numeric','minute':'numeric'});var _0x18a04b,_0x546a6a;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new lt(_0x1b392f,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x39f006=>_0x39f006||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x21b101,_0x48c1c4)=>_0x21b101&&_0x48c1c4),this['revisionActionsView']=_0x5381c5&&_0x5381c5['length']?ni(this,_0x5381c5):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x44a518['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x44a518['if']('isEnabled','ck-disabled',_0x42272a=>!_0x42272a),_0x44a518['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x44a518['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x44a518['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':_0x44a518['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':_0x419080}]},this['revisionActionsView']],'on':{'click':_0x44a518['to'](_0x57437f=>{_0x57437f['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x1ee196=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x1ee196,'change',()=>{this['_requireRevisionName']&&!_0x1ee196['value']||this['fire']('setName',{'id':this['id'],'name':_0x1ee196['value']}),_0x1ee196['value']||(_0x1ee196['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function vi(_0xf73de6,_0x5404e7){const _0x2c63dc=_0x51353b['fromJSDate'](_0xf73de6)['setLocale'](_0x5404e7),_0x4b3e7a=_0x51353b['local'](),_0x5af61b=_0x4b3e7a['minus']({'days':0x1})['startOf']('day');let _0x5cfd39,_0x573d6d;return _0x2c63dc['hasSame'](_0x4b3e7a,'day')?(_0x5cfd39=_0x2c63dc['startOf']('day')['toJSDate'](),_0x573d6d=_0x2c63dc['toRelativeCalendar']()):_0x2c63dc['hasSame'](_0x5af61b,'day')?(_0x5cfd39=_0x5af61b['toJSDate'](),_0x573d6d=_0x2c63dc['toRelativeCalendar']()):_0x2c63dc['hasSame'](_0x4b3e7a,'week')?(_0x5cfd39=_0x2c63dc['startOf']('week')['toJSDate'](),_0x573d6d=_0x2c63dc['weekdayLong']||''):_0x2c63dc['hasSame'](_0x4b3e7a,'year')?(_0x5cfd39=_0x2c63dc['startOf']('month')['toJSDate'](),_0x573d6d=_0x2c63dc['monthLong']||''):(_0x5cfd39=_0x2c63dc['startOf']('year')['toJSDate'](),_0x573d6d=String(_0x2c63dc['year'])),{'startDate':_0x5cfd39,'localizedPeriodName':_0x573d6d};}class mi extends _0x310fcf{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x262220,_0x4a3f33,_0x23894c,_0x1f9e7a){super(_0x262220);const _0x2a8585=vi(_0x4a3f33,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4a3f33,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x23894c,this['_requireRevisionName']=_0x1f9e7a,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':_0x2a8585}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2b076b){const _0x3d6ad7=new ai(this['locale'],_0x2b076b,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x3d6ad7);}['removeRevision'](_0xca9446){const _0x5213cc=this['revisionViews']['find'](_0xf25eb2=>_0xf25eb2['id']===_0xca9446['id']);this['revisionViews']['remove'](_0x5213cc);}}class as extends _0x310fcf{constructor(_0x422b52){super(_0x422b52);const _0x23534a=new _0x42c1dc();_0x23534a['content']=_0x4d5d4f,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x23534a,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x422b52,'Revision\x20history')]}]});}}class di extends _0x310fcf{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2f1ff3,_0x257e2e,_0x3b84c1,_0x4d3cb9){super(_0x2f1ff3);const _0x1e618a=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x257e2e,this['_revisionActions']=_0x3b84c1,this['_requireRevisionName']=_0x4d3cb9,this['on']('select',(_0x3625b4,_0x5a2d02)=>{this['fire']('revisionSelected',_0x5a2d02);}),this['on']('setName',(_0x503017,_0xfbe87a)=>{this['fire']('revisionSetName',_0xfbe87a);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x2f1ff3),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x1e618a['if']('isEnabled','ck-disabled',_0x559200=>!_0x559200)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x471f6b of this['_revisions'])this['_addRevision'](_0x471f6b);this['_revisions']['on']('add',(_0x5d3a9d,_0x5aef79)=>{this['_addRevision'](_0x5aef79);}),this['_revisions']['on']('remove',(_0xdf49d3,_0x310268)=>{this['_removeRevision'](_0x310268);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x5645fa=>_0x5645fa['revisionViews']['map'](_0x19acb3=>_0x19acb3))['flat']();}['selectRevision'](_0x41f6ab){for(const _0x28aeca of this['revisionViews'])_0x41f6ab&&_0x41f6ab['id']===_0x28aeca['id']?_0x28aeca['select']():_0x28aeca['deselect']();}['highlightRevisions'](_0x393cc2){for(const _0x2a35cb of this['revisionViews'])_0x393cc2['some'](({id:_0x4075c2})=>_0x4075c2===_0x2a35cb['id'])?_0x2a35cb['highlight']():_0x2a35cb['unhighlight']();}['_addRevision'](_0x272be6){const _0x5b43f1=vi(_0x272be6['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x34c913=this['timePeriodViews']['get'](0x0);_0x34c913&&_0x34c913['startDate']['getTime']()===_0x5b43f1['getTime']()||(_0x34c913=new mi(this['locale'],_0x5b43f1,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x34c913)),_0x34c913['addRevision'](_0x272be6);}['_removeRevision'](_0x5d382b){const _0x2aff48=vi(_0x5d382b['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x2aff48)['removeRevision'](_0x5d382b);}['_getTimePeriodViewByStartDate'](_0x4b433b){return this['timePeriodViews']['find'](_0x610851=>_0x610851['startDate']['getTime']()===_0x4b433b['getTime']());}}class d extends _0x4b4582{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
_t();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(
|
|
29
|
-
_0x1e2a6c(_0x138488){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x3035a0,_0x28dff1){super(_0x28dff1),this['sourceElement']=_0x3035a0,this['model']['document']['createRoot']();const _0x16dc7c=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x16dc7c);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x76a3bc,_0x2ea4ea){const _0x464703=new this(_0x76a3bc,_0x2ea4ea);return await _0x464703['initPlugins'](),await _0x464703['ui']['init'](_0x76a3bc),await _0x464703['data']['init'](_0x464703['config']['get']('initialData')||''),_0x464703['fire']('ready'),_0x464703;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x4de1c4{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f061d){function _0x17f396(_0x112579){return _0x112579['map'](_0x4603a5=>String['fromCharCode'](_0x4603a5))['join']('');}super(_0x3f061d),this['result']='end',_0x3f061d[_0x17f396([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x17f396([0x76,0x69,0x65,0x77])][_0x17f396([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x17f396([0x61,0x75,0x74,0x6f]),_0x3f061d[_0x17f396([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x17f396([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x17f396([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x17f396([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x17f396([0x6f,0x6b])});}}class k extends _0x4de1c4{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x53af62){if(super(_0x53af62),!this['editor']['config']['get']('revisionHistory'))throw new _0x3dc61d('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xdbb98c=>this['_showRevisionViewer']({..._0xdbb98c,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x7646f1=>this['_closeRevisionViewer'](_0x7646f1)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xd0b3db=>this['_restoreRevision'](_0xd0b3db)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x1dc2db){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x1dc2db;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3dda2a){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3dda2a);}['getRevision'](_0x117c58){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x117c58);}['getRevisions'](_0x56a622){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x56a622||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x2d8e1c=this['editor'],_0x1da2ce=_0x1344d7(_0x2d8e1c,p),_0x153084=_0x2d8e1c['plugins']['get']('RevisionTracker'),_0xe55e9c=_0x2d8e1c['plugins']['get']('Users')['users'];return _0x1da2ce['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1da2ce['lazyRoots'],(_0x1da2ce['plugins']['push'](yt,m,R,class extends _0x4de1c4{static get['requires'](){return[m,'Users'];}['init'](){const _0x4f875e=this['editor']['plugins']['get']('Users');for(const _0x5f0de3 of _0xe55e9c)_0x5f0de3['isAnonymous']||_0x4f875e['getUser'](_0x5f0de3['id'])||_0x4f875e['addUser'](_0x5f0de3);const _0x30fdbc=_0x153084['repository']['getRevisions']();let _0x366f2c=null;const _0x230d64=this['editor']['plugins']['get']('RevisionViewer');_0x230d64['adapter']=_0x153084['adapter'],_0x230d64['bind']('isEnabled')['to'](_0x153084),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x2d8e1c,'isReadOnly',_0x1dcc99=>!_0x1dcc99);for(const _0x312d2c of _0x30fdbc){const _0x5d002c=null===_0x312d2c['creator'];if(_0x5d002c&&_0x312d2c['toVersion']===_0x312d2c['fromVersion'])continue;const _0x39998c=_0x312d2c['toJSON']();_0x230d64['addRevisionData'](_0x39998c,(_0x351eaa,_0x29b19b,_0x270e65)=>{if(_0x5d002c){if(_0x366f2c)_0x366f2c['_update'](_0x351eaa,_0x29b19b);else{if(!_0x29b19b){const _0x32e806=_0x270e65['toJSON']();_0x32e806['id']=_0xb8234b(),_0x153084['saveRevision'](_0x32e806,_0x270e65['toVersion'])['then'](_0x2675b3=>{_0x366f2c=_0x2675b3;});}}}else _0x312d2c['_update'](_0x351eaa,_0x29b19b);});}}},d),_0x1da2ce);}['_enhanceShowRevisionViewerCallback'](){const _0x105e71=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x100976=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x59b8ac=this['editor']['plugins']['get']('Autosave');await _0x59b8ac['save']();}else await _0x100976['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x44e771=this['editor']['plugins']['get']('Dialog');_0x44e771['isOpen']&&_0x44e771['hide']();}const _0x459022=this['_getRevisionViewerEditorConfig']();return _0x105e71(_0x459022)['then'](_0x7b1db9=>{return(this['_viewerEditor']=_0x7b1db9,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'),_0x7b1db9);})['catch'](_0x9c7c0d=>(console['error'](_0x9c7c0d),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1c5eb3=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x1c5eb3(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x501efb=this['editor']['plugins']['get']('Annotations');_0x501efb['refreshVisibility'](),_0x501efb['refreshPositioning']();}})));}['_showRevisionViewer'](_0xeb8c01){const _0x5f4494=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x22e663=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x163506=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x163506,_0xeb8c01)['then'](_0x49cf85=>(_0x22e663['style']['display']='block',_0x5f4494['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x49cf85));}['_closeRevisionViewer'](_0x249637){const _0x4ace66=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x4ace66['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x249637['destroy']();}async['_restoreRevision'](_0x280eb4){const _0x5eeb59=this['editor'],_0x2802f4=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x1dd2d0=_0x5eeb59['plugins']['get']('RevisionTracker'),_0x151d96=_0x5eeb59['plugins']['get']('RevisionHistoryUtils'),_0x13a5a0=_0x2802f4['repository']['getRevision'](_0x280eb4);let _0x430c18,_0x4fda89,_0xb4da37;try{await _0x151d96['loadRevisionData'](_0x13a5a0,this['adapter']),_0x430c18=_0x151d96['getRevisionDocumentData'](_0x13a5a0),_0x4fda89=_0x151d96['getRevisionRootsAttributes'](_0x13a5a0);}catch(_0x261bfc){return void console['error'](_0x261bfc);}_0x5eeb59['model']['change'](_0x13d38d=>{for(const _0x9ae611 of Array['from'](_0x5eeb59['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x13d38d['removeMarker'](_0x9ae611);}),_0x2802f4['isReady']=!0x1,_0x5eeb59['model']['enqueueChange'](_0x44f39a=>{_0x44f39a['setSelection'](null),_0x44f39a['removeSelectionAttribute'](_0x5eeb59['model']['document']['selection']['getAttributeKeys']());const _0x219382=Object['keys'](_0x430c18);for(const _0x4e9353 of _0x5eeb59['model']['document']['roots'])'$graveyard'!=_0x4e9353['rootName']&&_0x4e9353['isAttached']()&&!_0x219382['includes'](_0x4e9353['rootName'])&&_0x44f39a['detachRoot'](_0x4e9353);for(const _0x5e1955 of _0x219382){let _0x2608c4=_0x5eeb59['model']['document']['getRoot'](_0x5e1955);_0x2608c4&&_0x2608c4['isAttached']()||(_0x2608c4=_0x44f39a['addRoot'](_0x5e1955));const _0x58c6db=_0x4fda89[_0x5e1955],_0x15f81c=Object['keys'](_0x58c6db),_0x14f7e6=_0x430c18[_0x5e1955];for(const _0x269b28 of _0x2608c4['getAttributeKeys']())_0x15f81c['includes'](_0x269b28)||_0x44f39a['removeAttribute'](_0x269b28,_0x2608c4);for(const _0x5c4c4c of _0x15f81c)_0x44f39a['setAttribute'](_0x5c4c4c,_0x4fda89[_0x5e1955][_0x5c4c4c],_0x2608c4);_0x44f39a['remove'](_0x44f39a['createRangeIn'](_0x2608c4)),_0x44f39a['insert'](_0x5eeb59['data']['parse'](_0x14f7e6,_0x2608c4),_0x2608c4,0x0);}});const _0x37f929=g(_0x5eeb59['locale'],'Restored');if(_0x13a5a0['name'])_0xb4da37=-0x1==_0x13a5a0['name']['indexOf'](_0x37f929)?_0x37f929+':\x20'+_0x13a5a0['name']:_0x13a5a0['name'];else _0xb4da37=_0x37f929+':\x20'+(_0x13a5a0['createdAt']['toLocaleDateString'](_0x5eeb59['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x13a5a0['createdAt']['toLocaleTimeString'](_0x5eeb59['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x1dd2d0['saveRevision']({'name':_0xb4da37}),_0x2802f4['isReady']=!0x0,_0x5eeb59['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,V as RevisionHistoryUtils,u as RevisionTracker,m as RevisionViewer,w as RevisionViewerEditor,le as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};
|
|
28
|
+
_t();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(_0x4fb7c7){super(_0x4fb7c7),this['_revisionViewer']=_0x4fb7c7['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x487fdc=this['_revisionsRepository']['_revisions'],_0x3fa4f8=this['_createRevisionActions'](),_0x185e4a=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x487fdc,_0x3fa4f8,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',(_0x2ddedc,_0x2503db)=>{_0x2503db['revisionViews']['on']('add',(_0x1c36d4,_0x34fd35)=>{_0x34fd35['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)),_0x185e4a['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x333b03=this['_revisionsRepository']['getRevision'](0x0);if(_0x333b03){const _0x3aff5e=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x333b03['id']);this['_revisionViewer']['compare'](_0x333b03,_0x3aff5e);}}['_handleRevisionSelected'](_0x1ca9b8,_0x3fc4d2){const _0x42eb94=this['_revisionsRepository']['getRevision'](_0x3fc4d2['id']),_0x3c61a1=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x42eb94['id']);this['_revisionViewer']['compare'](_0x42eb94,_0x3c61a1);}['_handleRevisionSetName'](_0x51527e,_0xaa644d){this['_revisionsRepository']['getRevision'](_0xaa644d['id'])['setName'](_0xaa644d['name']);}['_handleDiffChange'](_0x449b2f,_0x56d0c9,_0x1dfd6d){const _0x5be3de=this['_revisionsRepository']['getRevisionsInDiff'](_0x1dfd6d);_0x5be3de['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x5be3de),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x5be3de[0x0]));}['_createRevisionActions'](){const _0x300a4f=this['editor'],_0x2a3281=d['availableRevisionActions'],_0x1d00ea=_0x300a4f['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x1d00ea['length'])return _0x1d00ea['map'](_0x654ada=>{const _0x28e506='string'==typeof _0x654ada?Object['assign']({},_0x2a3281[_0x654ada]):_0x654ada;return _0x28e506['action']=_0x28e506['action']['bind'](this,_0x300a4f),_0x28e506['isVisible']&&(_0x28e506['isVisible']=_0x28e506['isVisible']['bind'](this,_0x300a4f)),_0x28e506;});}}function _t(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x20af74},_0x552971)=>{const _0x4be340=_0x20af74['get'](m),_0x3dc230=_0x4be340['repository'];let _0x4b2729=_0x4be340['diff']['newRevisionId'],_0x2ea8ed=_0x552971['id'];_0x3dc230['getIndex'](_0x4b2729)>_0x3dc230['getIndex'](_0x2ea8ed)&&([_0x4b2729,_0x2ea8ed]=[_0x2ea8ed,_0x4b2729]),_0x4be340['compare'](_0x4b2729,_0x2ea8ed);},'isVisible':({plugins:_0x5528f7},_0x1d1756)=>{const _0x5383ed=_0x5528f7['get'](m);return!(_0x5383ed['repository']['getRevisionsInDiff'](_0x5383ed['diff'])['length']>0x2)&&!_0x1d1756['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x3a23a6,{id:_0x541a2e})=>{_0x3a23a6['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x541a2e);},'isVisible':({plugins:_0x1944a5},_0x3823d4)=>!!_0x1944a5['get'](m)['repository']['getLaterVisibleRevision'](_0x3823d4['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x23ad68},{id:_0x212857,revisionNameView:_0x4b30b8})=>{const _0x9fa356=_0x23ad68['get'](m),_0x43174c=_0x9fa356['repository']['getEarlierVisibleRevision'](_0x212857);_0x9fa356['compare'](_0x212857,_0x43174c),_0x4b30b8['focus'](),_0x4b30b8['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x178a1b,_0x242b9b){super(_0x178a1b),this['_view']=_0x242b9b,this['_toolbarConfig']=et(_0x178a1b['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x1c5e6e){const _0x595fff=this['editor'],_0x458a1b=this['view'],_0x4a87e9=_0x595fff['editing']['view'],_0x3ad5c3=_0x458a1b['editable'],_0xfeafd8=_0x4a87e9['document']['getRoot']();_0x3ad5c3['name']=_0xfeafd8['rootName'],_0x458a1b['render']();const _0x30e3df=_0x3ad5c3['element'];this['setEditableElement'](_0x3ad5c3['name'],_0x30e3df),_0x458a1b['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4a87e9['attachDomRoot'](_0x30e3df),this['_elementReplacer']['replace'](_0x1c5e6e,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x1485a0=this['view'],_0x3287c3=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x3287c3['detachDomRoot'](_0x1485a0['editable']['name']),_0x1485a0['destroy']();}['_initToolbar'](){const _0x27365b=this['view'];_0x27365b['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x27365b['stickyPanel']['limiterElement']=_0x27365b['element'],_0x27365b['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x107867})=>_0x107867),_0x27365b['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x27365b['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x44c301,_0x4a75ad,_0x1d59d8={}){super(_0x44c301),this['stickyPanel']=new ht(_0x44c301),this['toolbar']=new dt(_0x44c301,{'shouldGroupWhenFull':_0x1d59d8['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x44c301,_0x4a75ad);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class w extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x2ede71(_0x29f1ab){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2386eb,_0x9b1177){super(_0x9b1177),this['sourceElement']=_0x2386eb,this['model']['document']['createRoot']();const _0x5920ac=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x5920ac);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x5a2c85,_0x448239){const _0x2de67f=new this(_0x5a2c85,_0x448239);return await _0x2de67f['initPlugins'](),await _0x2de67f['ui']['init'](_0x5a2c85),await _0x2de67f['data']['init'](_0x2de67f['config']['get']('initialData')||''),_0x2de67f['fire']('ready'),_0x2de67f;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x4b4582{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f0603){function _0x46972c(_0x461e29){return _0x461e29['map'](_0x20f2ee=>String['fromCharCode'](_0x20f2ee))['join']('');}super(_0x1f0603),this['result']='end',_0x1f0603[_0x46972c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x46972c([0x76,0x69,0x65,0x77])][_0x46972c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x46972c([0x61,0x75,0x74,0x6f]),_0x1f0603[_0x46972c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x46972c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x46972c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x46972c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x46972c([0x6f,0x6b])});}}class k extends _0x4b4582{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x5f26f5){if(super(_0x5f26f5),!this['editor']['config']['get']('revisionHistory'))throw new _0x1f3f37('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x19fe3a=>this['_showRevisionViewer']({..._0x19fe3a,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x54d485=>this['_closeRevisionViewer'](_0x54d485)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x464e8e=>this['_restoreRevision'](_0x464e8e)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x3497cb){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3497cb;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0xb8f1){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0xb8f1);}['getRevision'](_0x62a812){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x62a812);}['getRevisions'](_0x36a37f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x36a37f||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x3c9104=this['editor'],_0x51656e=_0x5bbfb4(_0x3c9104,p),_0x559510=_0x3c9104['plugins']['get']('RevisionTracker'),_0x2e4ad7=_0x3c9104['plugins']['get']('Users')['users'];return _0x51656e['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x51656e['lazyRoots'],(_0x51656e['plugins']['push'](yt,m,R,class extends _0x4b4582{static get['requires'](){return[m,'Users'];}['init'](){const _0x279886=this['editor']['plugins']['get']('Users');for(const _0x48d474 of _0x2e4ad7)_0x48d474['isAnonymous']||_0x279886['getUser'](_0x48d474['id'])||_0x279886['addUser'](_0x48d474);const _0x12d030=_0x559510['repository']['getRevisions']();let _0xc348b8=null;const _0x3903aa=this['editor']['plugins']['get']('RevisionViewer');_0x3903aa['adapter']=_0x559510['adapter'],_0x3903aa['bind']('isEnabled')['to'](_0x559510),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x3c9104,'isReadOnly',_0xe6a309=>!_0xe6a309);for(const _0x57fa88 of _0x12d030){const _0x55a6f1=null===_0x57fa88['creator'];if(_0x55a6f1&&_0x57fa88['toVersion']===_0x57fa88['fromVersion'])continue;const _0x14a5ce=_0x57fa88['toJSON']();_0x3903aa['addRevisionData'](_0x14a5ce,(_0x3f589d,_0x3c7fcd,_0x33b3ae)=>{if(_0x55a6f1){if(_0xc348b8)_0xc348b8['_update'](_0x3f589d,_0x3c7fcd);else{if(!_0x3c7fcd){const _0x1e51ea=_0x33b3ae['toJSON']();_0x1e51ea['id']=_0x44b437(),_0x559510['saveRevision'](_0x1e51ea,_0x33b3ae['toVersion'])['then'](_0x560d85=>{_0xc348b8=_0x560d85;});}}}else _0x57fa88['_update'](_0x3f589d,_0x3c7fcd);});}}},d),_0x51656e);}['_enhanceShowRevisionViewerCallback'](){const _0x1d16d8=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x562d19=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x544d63=this['editor']['plugins']['get']('Autosave');await _0x544d63['save']();}else await _0x562d19['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x4543ce=this['editor']['plugins']['get']('Dialog');_0x4543ce['isOpen']&&_0x4543ce['hide']();}const _0x120ea5=this['_getRevisionViewerEditorConfig']();return _0x1d16d8(_0x120ea5)['then'](_0x2112e1=>{return(this['_viewerEditor']=_0x2112e1,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'),_0x2112e1);})['catch'](_0x4be28d=>(console['error'](_0x4be28d),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x2105ba=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x2105ba(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4e9018=this['editor']['plugins']['get']('Annotations');_0x4e9018['refreshVisibility'](),_0x4e9018['refreshPositioning']();}})));}['_showRevisionViewer'](_0x4c9bd7){const _0x396330=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x3e813b=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x16cbf7=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x16cbf7,_0x4c9bd7)['then'](_0x580401=>(_0x3e813b['style']['display']='block',_0x396330['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x580401));}['_closeRevisionViewer'](_0x4f191c){const _0x55ca31=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x55ca31['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x4f191c['destroy']();}async['_restoreRevision'](_0x56e99e){const _0x516892=this['editor'],_0x14b2ec=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x56f073=_0x516892['plugins']['get']('RevisionTracker'),_0x47ec1f=_0x516892['plugins']['get']('RevisionHistoryUtils'),_0x341a01=_0x14b2ec['repository']['getRevision'](_0x56e99e);let _0x4d0eb6,_0x597d3a,_0xd65954;try{await _0x47ec1f['loadRevisionData'](_0x341a01,this['adapter']),_0x4d0eb6=_0x47ec1f['getRevisionDocumentData'](_0x341a01),_0x597d3a=_0x47ec1f['getRevisionRootsAttributes'](_0x341a01);}catch(_0x5629e3){return void console['error'](_0x5629e3);}_0x516892['model']['change'](_0xa97e7e=>{for(const _0x47f71e of Array['from'](_0x516892['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xa97e7e['removeMarker'](_0x47f71e);}),_0x14b2ec['isReady']=!0x1,_0x516892['model']['enqueueChange'](_0x187ddd=>{_0x187ddd['setSelection'](null),_0x187ddd['removeSelectionAttribute'](_0x516892['model']['document']['selection']['getAttributeKeys']());const _0x42c61a=Object['keys'](_0x4d0eb6);for(const _0x441bd1 of _0x516892['model']['document']['roots'])'$graveyard'!=_0x441bd1['rootName']&&_0x441bd1['isAttached']()&&!_0x42c61a['includes'](_0x441bd1['rootName'])&&_0x187ddd['detachRoot'](_0x441bd1);for(const _0x466aff of _0x42c61a){let _0x744c0=_0x516892['model']['document']['getRoot'](_0x466aff);_0x744c0&&_0x744c0['isAttached']()||(_0x744c0=_0x187ddd['addRoot'](_0x466aff));const _0x1523c0=_0x597d3a[_0x466aff],_0x55b03a=Object['keys'](_0x1523c0),_0x3aaafe=_0x4d0eb6[_0x466aff];for(const _0x55787c of _0x744c0['getAttributeKeys']())_0x55b03a['includes'](_0x55787c)||_0x187ddd['removeAttribute'](_0x55787c,_0x744c0);for(const _0x59f675 of _0x55b03a)_0x187ddd['setAttribute'](_0x59f675,_0x597d3a[_0x466aff][_0x59f675],_0x744c0);_0x187ddd['remove'](_0x187ddd['createRangeIn'](_0x744c0)),_0x187ddd['insert'](_0x516892['data']['parse'](_0x3aaafe,_0x744c0),_0x744c0,0x0);}});const _0x6b761f=g(_0x516892['locale'],'Restored');if(_0x341a01['name'])_0xd65954=-0x1==_0x341a01['name']['indexOf'](_0x6b761f)?_0x6b761f+':\x20'+_0x341a01['name']:_0x341a01['name'];else _0xd65954=_0x6b761f+':\x20'+(_0x341a01['createdAt']['toLocaleDateString'](_0x516892['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x341a01['createdAt']['toLocaleTimeString'](_0x516892['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x56f073['saveRevision']({'name':_0xd65954}),_0x14b2ec['isReady']=!0x0,_0x516892['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,V as RevisionHistoryUtils,u as RevisionTracker,m as RevisionViewer,w as RevisionViewerEditor,le as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};
|