@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250501.0 → 0.0.0-nightly-20250502.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
-
_0x191d9e(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1db6ae){super(),this['id']=_0x1db6ae['id']||_0x978a72(),this['creator']=_0x1db6ae['creator']||null,this['authors']=_0x1db6ae['authors']||[],this['diffData']=_0x1db6ae['diffData']||null,this['toVersion']=_0x1db6ae['toVersion']||0x0,this['fromVersion']=_0x1db6ae['fromVersion']||0x0,this['set']('name',_0x1db6ae['name']||''),this['set']('createdAt',_0x1db6ae['createdAt']||new Date()),this['set']('attributes',_0x1db6ae['attributes']||{});}['setName'](_0x168afa){this['_update']({'name':_0x168afa});}['setAttribute'](_0x2bb14c,_0x3efeac){const _0x1608ee=_0x22538e(this['attributes']);_0x1bbec6(_0x1608ee,_0x2bb14c,_0x3efeac),this['_update']({'attributes':_0x1608ee});}['removeAttribute'](_0x37df0e){const _0x21d9e3=_0x22538e(this['attributes']);_0x208d55(_0x21d9e3,_0x37df0e),this['_update']({'attributes':_0x21d9e3});}['_update'](_0x4c98dc,_0x174186=!0x1){let _0x12b45b=!0x1;const _0x233251={'id':this['id']},_0x355943=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x5821b3 of _0x355943){const _0x546638=_0x4c98dc[_0x5821b3];void 0x0!==_0x546638&&_0x546638!==this[_0x5821b3]&&(this[_0x5821b3]=_0x546638,_0x233251[_0x5821b3]=_0x546638,_0x12b45b=!0x0);}_0x12b45b&&(_0x233251['authors']&&(_0x233251['authorsIds']=_0x233251['authors']['map'](_0x1daa55=>_0x1daa55['id']),delete _0x233251['authors']),this['fire']('_update',_0x233251,_0x174186));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4d5797=>_0x4d5797['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x123d7e{['_revisions'];static get['requires'](){return[_0x202ba3];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x127d3d){super(_0x127d3d),this['_revisions']=new _0x44fedb();}['afterInit'](){!async function(_0x5ce630){const _0x4bf5ac=_0x4368e2([0x32,0x65,0x43,0x41,0x54,0x6a,0x78,0x63,0x53,0x57,0x58,0x77,0x39,0x49,0x4a,0x73,0x42,0x6c,0x45,0x5a,0x47,0x70,0x59,0x6d,0x6e,0x61,0x6f,0x62,0x76,0x44,0x35,0x79,0x72,0x51,0x68,0x48,0x74,0x66,0x75,0x37,0x38,0x71,0x4f,0x4e,0x34,0x4b,0x55,0x46,0x67,0x6b,0x36,0x50,0x56,0x64,0x69,0x33,0x52,0x31,0x7a,0x4d,0x4c,0x30]),_0x22008f=0xeb829,_0x22b810=0x459b7a3d,_0x895d4b=0x459c1ca5^_0x22b810,_0x1acb80=window[_0x4368e2([0x44,0x61,0x74,0x65])][_0x4368e2([0x6e,0x6f,0x77])](),_0x333967=_0x5ce630[_0x4368e2([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x31e261=new window[(_0x4368e2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc8dc4=>{_0x333967[_0x4368e2([0x6f,0x6e,0x63,0x65])](_0x4368e2([0x72,0x65,0x61,0x64,0x79]),_0xc8dc4);}),_0x28dd5b={[_0x4368e2([0x6b,0x74,0x79])]:_0x4368e2([0x45,0x43]),[_0x4368e2([0x75,0x73,0x65])]:_0x4368e2([0x73,0x69,0x67]),[_0x4368e2([0x63,0x72,0x76])]:_0x4368e2([0x50,0x2d,0x32,0x35,0x36]),[_0x4368e2([0x78])]:_0x4368e2([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]),[_0x4368e2([0x79])]:_0x4368e2([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]),[_0x4368e2([0x61,0x6c,0x67])]:_0x4368e2([0x45,0x53,0x32,0x35,0x36])},_0x3c8ca5=_0x333967[_0x4368e2([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4368e2([0x67,0x65,0x74])](_0x4368e2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x34021c(){let _0x2eccfd,_0x55ac6b=null,_0x1afd8d=null;try{if(_0x3c8ca5==_0x4368e2([0x47,0x50,0x4c]))return _0x4368e2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2eccfd=_0x13b7b1(),!_0x2eccfd)return _0x4368e2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2eccfd[_0x4368e2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1afd8d=_0x4ffe2a(_0x2eccfd[_0x4368e2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2eccfd[_0x4368e2([0x6a,0x74,0x69])])),await _0x2de44a()?_0x589418()?_0x4a38fd()?_0x4368e2([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2e2d1e()?(_0x2eccfd[_0x4368e2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4368e2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x55ac6b=_0x2004b1(_0x4368e2([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2eccfd[_0x4368e2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4368e2([0x74,0x72,0x69,0x61,0x6c])&&(_0x55ac6b=_0x2004b1(_0x4368e2([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x143ce3()):_0x4368e2([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4368e2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4368e2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x12e657){return _0x4368e2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4a38fd(){const _0x2ab179=[_0x4368e2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4368e2([0x74,0x72,0x69,0x61,0x6c])][_0x4368e2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2eccfd[_0x4368e2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1acb80/0x3e8:0xe10*_0x895d4b;return _0x2eccfd[_0x4368e2([0x65,0x78,0x70])]<_0x2ab179;}function _0x589418(){const _0x40e027=_0x2eccfd[_0x4368e2([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x40e027)return!0x1;if(_0x40e027[_0x4368e2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4368e2([0x2a])))return!0x0;if(_0x40e027[_0x4368e2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4368e2([0x52,0x48])))return!0x0;if(_0x40e027[_0x4368e2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4368e2([0x52,0x52,0x48]))){if(_0x27ef6b())return!0x0;if(_0x260fb8()||_0xf10c58())return!0x0;}return!0x1;}function _0x2e2d1e(){const _0x2a7b2=_0x2eccfd[_0x4368e2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2a7b2||0x0==_0x2a7b2[_0x4368e2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x77dad4}=new URL(window[_0x4368e2([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2a7b2[_0x4368e2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x77dad4))return!0x0;const _0x2e4543=_0x77dad4[_0x4368e2([0x73,0x70,0x6c,0x69,0x74])](_0x4368e2([0x2e]));return _0x2a7b2[_0x4368e2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1b4d81=>_0x1b4d81[_0x4368e2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4368e2([0x2a])))[_0x4368e2([0x6d,0x61,0x70])](_0x102f81=>_0x102f81[_0x4368e2([0x73,0x70,0x6c,0x69,0x74])](_0x4368e2([0x2e])))[_0x4368e2([0x73,0x6f,0x6d,0x65])](_0x55e322=>_0x2e4543[_0x4368e2([0x65,0x76,0x65,0x72,0x79])]((_0x262c37,_0x36a0dc)=>_0x55e322[_0x36a0dc]===_0x262c37||_0x55e322[_0x36a0dc]===_0x4368e2([0x2a])));}function _0x143ce3(){return _0x55ac6b&&_0x1afd8d?new window[(_0x4368e2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x387edc,_0x3b6d7a)=>{_0x55ac6b[_0x4368e2([0x74,0x68,0x65,0x6e])](_0x387edc,_0x3b6d7a),_0x1afd8d[_0x4368e2([0x74,0x68,0x65,0x6e])](_0xc8a08c=>{_0xc8a08c!=_0x4368e2([0x56,0x61,0x6c,0x69,0x64])&&_0x387edc(_0xc8a08c);},_0x3b6d7a);}):_0x55ac6b||_0x1afd8d||_0x4368e2([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4ffe2a(_0x575936,_0x3a4136){return new window[(_0x4368e2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x34ea17=>{if(_0x26b384())return _0x34ea17(_0x4368e2([0x56,0x61,0x6c,0x69,0x64]));_0x2acae0(),_0x333967[_0x4368e2([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4368e2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x9ad26c=!0x1;const _0x6080f6=_0x978a72();function _0x1ad03(_0x2b13ba){return!!_0x2b13ba&&(typeof _0x2b13ba===_0x4368e2([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2b13ba===_0x4368e2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2b13ba[_0x4368e2([0x74,0x68,0x65,0x6e])]===_0x4368e2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2b13ba[_0x4368e2([0x63,0x61,0x74,0x63,0x68])]===_0x4368e2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3cd221(_0x352f8c){_0xae8c81(_0x352f8c)[_0x4368e2([0x74,0x68,0x65,0x6e])](_0x17e56d=>{if(!_0x17e56d||_0x17e56d[_0x4368e2([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4368e2([0x6f,0x6b]))return _0x4368e2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xeb9a84(_0x2b1a7b(_0x6080f6+_0x3a4136))!=_0x17e56d[_0x4368e2([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4368e2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4368e2([0x56,0x61,0x6c,0x69,0x64]);})[_0x4368e2([0x74,0x68,0x65,0x6e])](_0x12a284=>(_0x5e8f98(),_0x12a284),()=>{const _0x38c017=_0x1ed2cf();return null==_0x38c017?(_0x5e8f98(),_0x4368e2([0x56,0x61,0x6c,0x69,0x64])):_0x4368e2(_0x1acb80-_0x38c017>(0x6197fe3d^_0x22b810)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4368e2([0x74,0x68,0x65,0x6e])](_0x34ea17)[_0x4368e2([0x63,0x61,0x74,0x63,0x68])](()=>{_0x34ea17(_0x4368e2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2f7688=0x45ad94bd^_0x22b810;function _0x5e8f98(){const _0x1c01a3=_0x4368e2([0x6c,0x6c,0x63,0x74,0x2d])+_0xeb9a84(_0x2b1a7b(_0x575936)),_0x14df05=_0x2aba9a(_0xeb9a84(window[_0x4368e2([0x4d,0x61,0x74,0x68])][_0x4368e2([0x63,0x65,0x69,0x6c])](_0x1acb80/_0x2f7688)));window[_0x4368e2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4368e2([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1c01a3,_0x14df05);}function _0x1ed2cf(){const _0x2d6676=_0x4368e2([0x6c,0x6c,0x63,0x74,0x2d])+_0xeb9a84(_0x2b1a7b(_0x575936)),_0x518a55=window[_0x4368e2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4368e2([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2d6676);return _0x518a55?window[_0x4368e2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2aba9a(_0x518a55),0x10)*_0x2f7688:null;}function _0xae8c81(_0x1d1f7d){return new window[(_0x4368e2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5af35e,_0x3b82d6)=>{_0x1d1f7d[_0x4368e2([0x74,0x68,0x65,0x6e])](_0x5af35e,_0x3b82d6),window[_0x4368e2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3b82d6,0x459aaefd^_0x22b810);});}}_0x333967[_0x4368e2([0x6f,0x6e])](_0x4368e2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4ce491,_0x3ebc3e)=>{if(_0x3ebc3e[0x0]!=_0x575936)return _0x34ea17(_0x4368e2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3ebc3e[0x1]={..._0x3ebc3e[0x1],[_0x4368e2([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x6080f6};},{[_0x4368e2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4368e2([0x68,0x69,0x67,0x68])}),_0x333967[_0x4368e2([0x6f,0x6e])](_0x4368e2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3ff9e6=>{_0x1ad03(_0x3ff9e6[_0x4368e2([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x9ad26c=!0x0,_0x3cd221(_0x3ff9e6[_0x4368e2([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4368e2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4368e2([0x6c,0x6f,0x77])}),_0x31e261[_0x4368e2([0x74,0x68,0x65,0x6e])](()=>{_0x9ad26c||_0x34ea17(_0x4368e2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x26b384(){return _0x333967[_0x4368e2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4368e2([0x76,0x69,0x65,0x77])][_0x4368e2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4368e2([0x61,0x75,0x74,0x6f]);}function _0x2acae0(){_0x333967[_0x4368e2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4368e2([0x76,0x69,0x65,0x77])][_0x4368e2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4368e2([0x61,0x75,0x74,0x6f]);}}function _0x2004b1(_0x54239d){const _0x27ac02=[new window[(_0x4368e2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20814d=>setTimeout(_0x20814d,0x459244f1^_0x22b810)),_0x31e261[_0x4368e2([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4368e2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x39078e=>{const _0x31d2bc=0x459b7a3a^_0x22b810,_0x1878d2=_0x5ce630[_0x4368e2([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x570e4e(){_0x1878d2[_0x4368e2([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x31d2bc&&_0x39078e();}_0x570e4e(),_0x1878d2[_0x4368e2([0x6f,0x6e])](_0x4368e2([0x61,0x64,0x64]),_0x570e4e);})),new window[(_0x4368e2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x30f85a=>{function _0x21b82e(){for(const _0x49111e in window)if(window[_0x4368e2([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4368e2([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x49111e))&&window[_0x49111e]==_0x22008f)return _0x30f85a();_0x333967[_0x4368e2([0x73,0x74,0x61,0x74,0x65])]!=_0x4368e2([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4368e2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x21b82e,0x459b69b5^_0x22b810);}_0x66b580(_0x4368e2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x21b82e();})];return window[_0x4368e2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4368e2([0x72,0x61,0x63,0x65])](_0x27ac02)[_0x4368e2([0x74,0x68,0x65,0x6e])](()=>_0x54239d);}async function _0x1caaeb(){if(await _0x31e261,_0x66b580(_0x4368e2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x4d4c12=_0x5ce630[_0x4368e2([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x5efd84=_0x5ce630[_0x4368e2([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])](_0x4d4c12[_0x4368e2([0x69,0x64])]),_0x798211=_0x1861dd(_0x4368e2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x798211[_0x4368e2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x4d4c12['id'],_0x5efd84?_0x5efd84['id']:null,!0x0),_0x798211[_0x4368e2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4368e2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x798211[_0x4368e2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x798211[_0x4368e2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x11c841,void(_0x798211[_0x4368e2([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x11c841);}if(_0x66b580(_0x4368e2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x201885=_0x1861dd(_0x4368e2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x201885[_0x4368e2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4368e2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x201885[_0x4368e2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x201885[_0x4368e2([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x11c841,_0x201885[_0x4368e2([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x11c841;}_0x333967[_0x4368e2([0x6d,0x6f,0x64,0x65,0x6c])][_0x4368e2([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x11c841,_0x333967[_0x4368e2([0x6d,0x6f,0x64,0x65,0x6c])][_0x4368e2([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x11c841,_0x333967[_0x4368e2([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4368e2([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x27ef6b(){return _0x66b580(_0x4368e2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1861dd(_0x4368e2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4368e2([0x73,0x74,0x61,0x74,0x65])]==_0x4368e2([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x260fb8(){return _0x66b580(_0x4368e2([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 _0xf10c58(){return _0x66b580(_0x4368e2([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2d94cc(_0x49da85){const _0x24a4b9=_0x5854ba();_0x333967[_0x24a4b9]=_0x4368e2([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])+_0x49da85,_0x49da85[_0x4368e2([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4368e2([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x5854ba()]=_0x22008f),_0x49da85!=_0x4368e2([0x56,0x61,0x6c,0x69,0x64])&&_0x1caaeb();}function _0x5854ba(){const _0x24c14c=window[_0x4368e2([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4368e2([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4368e2([0x6e,0x6f,0x77])]())[_0x4368e2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4368e2([0x2e]),'');let _0x5085b6=_0x4368e2([0x65]);for(let _0x42e4b6=0x0;_0x42e4b6<_0x24c14c[_0x4368e2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x42e4b6+=0x2){let _0x5ea155=window[_0x4368e2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x24c14c[_0x4368e2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x42e4b6,_0x42e4b6+0x2));_0x5ea155>=_0x4bf5ac[_0x4368e2([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5ea155-=_0x4bf5ac[_0x4368e2([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5085b6+=_0x4bf5ac[_0x5ea155];}return _0x5085b6;}function _0x13b7b1(){const _0x140127=_0x3c8ca5[_0x4368e2([0x73,0x70,0x6c,0x69,0x74])](_0x4368e2([0x2e]));if(0x3!=_0x140127[_0x4368e2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x55a99d(_0x140127[0x1]);function _0x55a99d(_0x32b40f){const _0x2995ea=_0x306920(_0x32b40f);return _0x2995ea&&_0x2193be()?_0x2995ea:null;function _0x2193be(){const _0x50144f=_0x2995ea[_0x4368e2([0x6a,0x74,0x69])],_0x4a87a9=window[_0x4368e2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x50144f[_0x4368e2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x50144f[_0x4368e2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xa23973={..._0x2995ea,[_0x4368e2([0x6a,0x74,0x69])]:_0x50144f[_0x4368e2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x50144f[_0x4368e2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xa23973[_0x4368e2([0x76,0x63])],_0x2b1a7b(_0xa23973)==_0x4a87a9;}}}async function _0x2de44a(){let _0x3c60a2=!0x0;try{const _0x3dc452=_0x3c8ca5[_0x4368e2([0x73,0x70,0x6c,0x69,0x74])](_0x4368e2([0x2e])),[_0x434172,_0x47bd9f,_0x1b4e58]=_0x3dc452;return _0x5ed95c(_0x434172),await _0x129522(_0x434172,_0x47bd9f,_0x1b4e58),_0x3c60a2;}catch(_0x3f4bf2){return!0x1;}function _0x5ed95c(_0x271554){const _0xcd00a1=_0x306920(_0x271554);_0xcd00a1&&_0xcd00a1[_0x4368e2([0x61,0x6c,0x67])]==_0x4368e2([0x45,0x53,0x32,0x35,0x36])||(_0x3c60a2=!0x1);}async function _0x129522(_0x11fb47,_0x211334,_0x1f0de6){const _0x59ae45=window[_0x4368e2([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4368e2([0x66,0x72,0x6f,0x6d])](_0x12ec69(_0x1f0de6),_0x456032=>_0x456032[_0x4368e2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4abad0=new window[(_0x4368e2([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4368e2([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x11fb47+_0x4368e2([0x2e])+_0x211334),_0xe1e2b8=window[_0x4368e2([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4368e2([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xe1e2b8)return;const _0x2b8770=await _0xe1e2b8[_0x4368e2([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4368e2([0x6a,0x77,0x6b]),_0x28dd5b,{[_0x4368e2([0x6e,0x61,0x6d,0x65])]:_0x4368e2([0x45,0x43,0x44,0x53,0x41]),[_0x4368e2([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4368e2([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4368e2([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xe1e2b8[_0x4368e2([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4368e2([0x6e,0x61,0x6d,0x65])]:_0x4368e2([0x45,0x43,0x44,0x53,0x41]),[_0x4368e2([0x68,0x61,0x73,0x68])]:{[_0x4368e2([0x6e,0x61,0x6d,0x65])]:_0x4368e2([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2b8770,_0x59ae45,_0x4abad0)||(_0x3c60a2=!0x1);}}function _0x306920(_0x2a7089){return _0x2a7089[_0x4368e2([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4368e2([0x65,0x79]))?JSON[_0x4368e2([0x70,0x61,0x72,0x73,0x65])](_0x12ec69(_0x2a7089)):null;}function _0x12ec69(_0x3d505a){return window[_0x4368e2([0x61,0x74,0x6f,0x62])](_0x3d505a[_0x4368e2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4368e2([0x2b]))[_0x4368e2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4368e2([0x2f])));}function _0x2b1a7b(_0x59f505){let _0x5b1238=0x1505;function _0x49c3d8(_0x144d61){for(let _0x510f16=0x0;_0x510f16<_0x144d61[_0x4368e2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x510f16++){const _0x24b2a0=_0x144d61[_0x4368e2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x510f16);_0x5b1238=(_0x5b1238<<0x5)+_0x5b1238+_0x24b2a0,_0x5b1238&=_0x5b1238;}}function _0x165633(_0x41c1a7){Array[_0x4368e2([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x41c1a7)?_0x41c1a7[_0x4368e2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x165633):_0x41c1a7&&typeof _0x41c1a7==_0x4368e2([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4368e2([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x41c1a7)[_0x4368e2([0x73,0x6f,0x72,0x74])]()[_0x4368e2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x247952,_0x5189ee])=>{_0x49c3d8(_0x247952),_0x165633(_0x5189ee);}):_0x49c3d8(window[_0x4368e2([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x41c1a7));}return _0x165633(_0x59f505),_0x5b1238>>>0x0;}function _0xeb9a84(_0x2a3024){return _0x2a3024[_0x4368e2([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4368e2([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4368e2([0x30]));}function _0x2aba9a(_0x3af388){return _0x3af388[_0x4368e2([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4368e2([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4368e2([0x6a,0x6f,0x69,0x6e])]('');}function _0x66b580(_0x213912){return _0x333967[_0x4368e2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4368e2([0x68,0x61,0x73])](_0x213912);}function _0x1861dd(_0x1c80da){return _0x333967[_0x4368e2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4368e2([0x67,0x65,0x74])](_0x1c80da);}function _0x11c841(){}function _0x4368e2(_0x2b8640){return _0x2b8640['map'](_0x40e365=>String['fromCharCode'](_0x40e365))['join']('');}_0x2d94cc(await _0x34021c());}(this);}['createRevision'](_0x36d90b){const _0x1adb3d=this['editor']['plugins']['get']('Users');return new h({'id':_0x36d90b['id'],'name':_0x36d90b['name'],'creator':_0x36d90b['creatorId']?_0x1adb3d['getUser'](_0x36d90b['creatorId']):null,'diffData':_0x36d90b['diffData']||_0x36d90b['data'],'authors':_0x36d90b['authorsIds']['map'](_0x3750be=>_0x1adb3d['getUser'](_0x3750be)),'createdAt':new Date(_0x36d90b['createdAt']),'attributes':_0x36d90b['attributes'],'fromVersion':_0x36d90b['fromVersion'],'toVersion':_0x36d90b['toVersion']});}['addRevision'](_0x2cf820,_0x51dfdb=0x0){this['_revisions']['add'](_0x2cf820,_0x51dfdb);}['getRevision'](_0x42fcbc){return this['_revisions']['get'](_0x42fcbc);}['getRevisions'](_0x360e15={'toJSON':!0x1}){const _0x21bafb=Array['from'](this['_revisions']);return _0x21bafb['reverse'](),_0x360e15['toJSON']?_0x21bafb['map'](_0x57d4b3=>_0x57d4b3['toJSON']()):_0x21bafb;}['getIndex'](_0x4d4280){return this['_revisions']['getIndex'](_0x4d4280);}['getEarlierVisibleRevision'](_0x1eb205){const [,_0x2f6a6f]=this['getRevisionsIterator'](_0x1eb205,{'direction':'earlier'});return _0x2f6a6f;}['getLaterVisibleRevision'](_0x368350){const [,_0x1ac84c]=this['getRevisionsIterator'](_0x368350,{'direction':'later'});return _0x1ac84c;}['getRevisionsInDiff'](_0xf41146){const _0x475748=[];for(const _0x2f80e9 of this['getRevisionsIterator'](_0xf41146['newRevisionId']))if(_0x475748['push'](_0x2f80e9),_0x2f80e9['id']===_0xf41146['oldRevisionId'])break;return _0x475748;}*['getRevisionsIterator'](_0x12dbbf,{direction:_0x1ea9a0='earlier',filter:_0x1475d8=()=>!0x0}={}){const _0xb9b470='earlier'===_0x1ea9a0?0x1:-0x1;let _0x56cadf=this['_revisions']['get'](_0x12dbbf),_0x890f7b=this['getIndex'](_0x56cadf);for(yield _0x56cadf;_0x56cadf;){if(_0x890f7b+=_0xb9b470,_0x56cadf=this['getRevision'](_0x890f7b),!_0x56cadf)return;_0x1475d8(_0x56cadf)&&(yield _0x56cadf);}}}class V extends _0x123d7e{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x42e4b0,'c'],[_0x3c9823,'a'],[_0x46f8fa,'e'],[_0x18dbde,'r'],[_0x5c42ea,'u']]);['_typeCharToViewClass']=new Map([['c',_0x42e4b0],['a',_0x3c9823],['e',_0x46f8fa],['r',_0x18dbde],['u',_0x5c42ea]]);async['loadRevisionData'](_0x8ed50f,_0x36a4f4){if(_0x8ed50f['diffData']||!_0x36a4f4)return;const _0x486789=this['editor']['config']['get']('collaboration.channelId'),_0x533cef=await _0x36a4f4['getRevision']({'channelId':_0x486789,'revisionId':_0x8ed50f['id']});_0x8ed50f['diffData']=_0x533cef['diffData'];}['getRevisionDocumentData'](_0x4e3ea1){const _0x12b381={};for(const _0x22b104 in _0x4e3ea1['diffData']){if(_0x4e3ea1['diffData'][_0x22b104]['attachChange']&&!_0x4e3ea1['diffData'][_0x22b104]['attachChange']['isAttached'])continue;const _0x48436d=this['_removeRevisionMarkers'](JSON['parse'](_0x4e3ea1['diffData'][_0x22b104]['insertions'])),_0x5b6f01=this['editor']['editing']['view']['document'],_0x478944=new _0x225d1a(_0x5b6f01,_0x48436d['map'](_0x4028b5=>this['_getViewFromDiffObj'](_0x4028b5,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x12b381[_0x22b104]=this['editor']['data']['processor']['toData'](_0x478944),this['editor']['data']['processor']['useFillerType']('default');}return _0x12b381;}['getRevisionRootsAttributes'](_0x57cf76){const _0x574869={};for(const _0x5696bf in _0x57cf76['diffData'])_0x57cf76['diffData'][_0x5696bf]['attachChange']&&!_0x57cf76['diffData'][_0x5696bf]['attachChange']['isAttached']||(_0x574869[_0x5696bf]=_0x57cf76['diffData'][_0x5696bf]['attributesAfter']||{});return _0x574869;}['_getTypeCharForViewElement'](_0x30b142){return this['_viewClassToTypeChar']['get'](_0x30b142['constructor']);}['_getViewFromDiffObj'](_0x4b21b1,_0x59d278){const _0x25ce97=this['editor']['editing']['view']['document'];if('string'==typeof _0x4b21b1)return new _0x267c94(_0x25ce97,_0x4b21b1);{let _0x3aa552,_0x49c0f8;_0x49c0f8='u'==_0x4b21b1['type']||'r'==_0x4b21b1['type']?[]:_0x4b21b1['children']['map'](_0x3de878=>this['_getViewFromDiffObj'](_0x3de878,_0x59d278));const _0x59d34d=this['_typeCharToViewClass']['get'](_0x4b21b1['type'])||_0x431481,_0x143b0a=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x3aa552=new _0x59d34d(_0x25ce97,_0x4b21b1['name'],_0x4b21b1['attributes'],_0x49c0f8),'u'==_0x4b21b1['type']&&_0x4b21b1['children'][0x0]){const _0x115aed=_0x4b21b1['children'][0x0];if(_0x3aa552['render']=function(_0x53c556){const _0x4c1b45=_0x53c556['createElement']('div');return _0x4c1b45['innerHTML']=_0x115aed,_0x4c1b45['childNodes'][0x0];},_0x59d278){const _0x3c418a=new _0x225d1a(_0x25ce97);_0x3c418a['_appendChild'](_0x3aa552);const _0x52a50c=Array['from'](_0x143b0a['viewChildrenToDom'](_0x3c418a,{'bind':!0x1})),_0x4eeb9c=_0x143b0a['domDocument']['createElement']('div');_0x4eeb9c['append'](..._0x52a50c),_0x3aa552=Array['from'](_0x143b0a['domChildrenToView'](_0x4eeb9c))[0x0];}}else{if('r'==_0x4b21b1['type']&&_0x4b21b1['children'][0x0]){const _0xa5776b=_0x4b21b1['children'][0x0];if(_0x3aa552['render']=function(_0x3fb779){_0x3fb779['innerHTML']=_0xa5776b;},_0x59d278){const _0x495711=new _0x225d1a(_0x25ce97);_0x495711['_appendChild'](_0x3aa552);const _0x596e4c=Array['from'](_0x143b0a['viewChildrenToDom'](_0x495711,{'bind':!0x1})),_0x5ebac5=_0x143b0a['domDocument']['createElement']('div');_0x5ebac5['append'](..._0x596e4c);const _0x5a7536=Array['from'](_0x143b0a['domChildrenToView'](_0x5ebac5));_0x5a7536['length']>0x1?_0x3aa552['_appendChild'](_0x5a7536):_0x3aa552=_0x5a7536[0x0];}}}if(_0x4b21b1['customProperties']){for(const [_0x5b1273,_0x4de31b]of _0x4b21b1['customProperties'])_0x3aa552['_setCustomProperty'](_0x5b1273,_0x4de31b);}const _0x4529f9=void 0x0===_0x4b21b1['fillerOffset']?null:_0x4b21b1['fillerOffset'];return null!==_0x4529f9&&(_0x3aa552['getFillerOffset']=()=>_0x4529f9),_0x3aa552;}}['_makeModelFromViewString'](_0x1aa45d){const _0x397ad2=JSON['parse'](_0x1aa45d),_0x12c687=this['editor']['editing']['view']['document'],_0x52e238=new _0x225d1a(_0x12c687,_0x397ad2['map'](_0x326414=>this['_getViewFromDiffObj'](_0x326414,!0x0)));return this['editor']['data']['toModel'](_0x52e238);}['_removeRevisionMarkers'](_0x2c3629){return(_0x2c3629=_0x2c3629['filter'](_0x5b1e39=>!_0x5b1e39['name']||'revision-start'!==_0x5b1e39['name']&&'revision-end'!==_0x5b1e39['name']))['forEach'](_0x1b6646=>{'string'!=typeof _0x1b6646&&(_0x1b6646['children']=this['_removeRevisionMarkers'](_0x1b6646['children']),_0x1b6646['attributes']=_0x1b6646['attributes']['filter'](_0x2b2621=>!_0x2b2621[0x0]['startsWith']('data-revision-')));}),_0x2c3629;}}function g(_0x3cba54,_0x274622,_0x4c7aed){const t=_0x3cba54['t'];switch(_0x274622){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'},_0x4c7aed);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x4c7aed);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 _0x123d7e{['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[_0x202ba3,I,V,_0x45dfd3];}constructor(_0x21fda7){super(_0x21fda7),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 _0x225005=_0x978a72();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x225005},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 _0x23a2ec=this['repository']['getRevision'](0x0),_0x349331=_0x23a2ec&&null===_0x23a2ec['creator']?_0x23a2ec:null;if(this['_continueCurrentRevision']=!!_0x349331&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x40b572=this['_source']['getCurrentRevisionId'](),_0x429c61=this['repository']['getRevision'](_0x40b572);if(_0x429c61)this['_startingVersion']=_0x429c61['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x51e28f=this['_source']['history']['_operations']['find'](_0x519701=>!_0x519701['_isInit']),_0x4d7970=_0x51e28f?_0x51e28f['baseVersion']:this['_source']['history']['version'];_0x23a2ec?(_0x23a2ec['toVersion']<_0x4d7970&&_0x23a2ec['_update']({'toVersion':_0x4d7970}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x349331['id'],this['_startingVersion']=_0x349331['fromVersion']):(this['_startingVersion']=_0x23a2ec['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4d7970,this['_continueCurrentRevision']=!0x1);}}else _0x349331&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x349331['toVersion'],this['editor']['model']['document']['history']['version']),_0x349331['fromVersion']===_0x349331['toVersion']?(0x0!==_0x349331['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x349331['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x349331['id'],this['_startingVersion']=_0x349331['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',_0x42764a=>!_0x42764a),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x227f10=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x437245;for(const _0x51b9e2 in _0x227f10){const _0x28e045=_0x51b9e2,_0x1be779=_0x227f10[_0x28e045];if('revisionHistoryLicenseKeyValid'==_0x1be779||'revisionHistoryLicenseKeyInvalid'==_0x1be779||'revisionHistoryLicenseKeyExpired'==_0x1be779||'revisionHistoryLicenseKeyDomainLimit'==_0x1be779||'revisionHistoryLicenseKeyNotAllowed'==_0x1be779||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1be779||'revisionHistoryLicenseKeyTrialLimit'==_0x1be779||'revisionHistoryLicenseKeyUsageLimit'==_0x1be779){delete _0x227f10[_0x28e045],_0x437245=_0x1be779,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x437245&&_0x227f10['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x437245&&_0x227f10['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x437245&&_0x227f10['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x437245&&_0x227f10['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x437245&&_0x227f10['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x437245&&_0x227f10['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x437245&&_0x227f10['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x514ab4=this['repository']['getRevision'](0x0),_0xc2d6e9=await this['getRevisionDocumentData'](_0x514ab4),_0x2c33d9=await this['getRevisionRootsAttributes'](_0x514ab4);this['_replaceEditorDataWithRevisionData'](_0xc2d6e9,_0x2c33d9);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3d6ce1){this['_source']=_0x3d6ce1;}async['update'](){const _0x29843c=await this['_source']['getLatestVersion']();if(_0x29843c>this['currentRevision']['toVersion']){await this['_loadState']();const _0x12e662=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x29843c});_0x12e662['authors']=_0x12e662['authorsIds']['map'](_0x505b8d=>this['editor']['plugins']['get']('Users')['getUser'](_0x505b8d)),this['currentRevision']['_update'](_0x12e662);}}async['saveRevision'](_0x251985={},_0x4f585c=null){const _0x290693=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x4f585c>this['currentRevision']['toVersion']&&(_0x4f585c=null),null===_0x4f585c&&(_0x4f585c=await this['_source']['getLatestVersion']());const _0x199dc0=this['_getFromVersion'](_0x4f585c),_0x221903=this['buildRevisionData']({'from':_0x199dc0,'to':_0x4f585c});if(this['currentRevision']['toVersion']<_0x4f585c){const _0x2d632f=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x4f585c,'to':_0x4f585c});_0x2d632f['authors']=[],_0x2d632f['authorsIds']=[],_0x2d632f['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2d632f,!0x0),delete _0x2d632f['authors'],_0x290693['push'](_0x2d632f);}_0x251985['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x251985['name']=_0x251985['name']||null,_0x251985['id']=_0x251985['id']||_0x978a72(),_0x251985={..._0x251985,..._0x221903};const _0x7f27a=this['addRevisionData'](_0x251985);_0x290693['push'](_0x251985);const _0x2d345f=this['repository']['getIndex'](_0x7f27a);if(0x0!==_0x2d345f){const _0x3ac16c=this['repository']['getRevision'](_0x2d345f-0x1);if(_0x3ac16c['fromVersion']!==_0x4f585c){const _0x17df46=this['_revisionDataBuilder']['getData'](_0x4f585c,_0x3ac16c['toVersion']),_0x318f2b={'id':_0x3ac16c['id'],'diffData':_0x17df46['diffData'],'authorsIds':_0x17df46['authorsIds'],'authors':_0x17df46['authorsIds']['map'](_0x39dd1d=>this['editor']['plugins']['get']('Users')['getUser'](_0x39dd1d)),'fromVersion':_0x4f585c};_0x3ac16c===this['currentRevision']&&(_0x318f2b['createdAt']=new Date(_0x251985['createdAt']['getTime']()+0xa)),_0x3ac16c['_update'](_0x318f2b,!0x0),delete _0x318f2b['authors'],_0x290693['push'](_0x318f2b);}}if(this['adapter']){for(const _0x30a4d5 of _0x290693)this['_bufferUpdate'](_0x30a4d5['id'],_0x30a4d5,!0x0);this['sendBufferedUpdates']();}return _0x7f27a;}['addRevisionData'](_0x4a5a01){const _0x112a78=this['repository']['createRevision'](_0x4a5a01);return this['adapter']&&_0x112a78['on']('_update',(_0x249139,_0x34601a,_0x5a92b0)=>{_0x5a92b0||(this['_bufferUpdate'](_0x34601a['id'],_0x34601a,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x112a78,this['_findInsertionIndex'](_0x112a78)),_0x112a78;}async['getRevisionDocumentData'](_0x48b4e8){return await this['_utils']['loadRevisionData'](_0x48b4e8,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x48b4e8);}async['getRevisionRootsAttributes'](_0x4652a3){return await this['_utils']['loadRevisionData'](_0x4652a3,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4652a3);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x36eb4e=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0xa5ef34=0x0;_0xa5ef34<_0x36eb4e['length'];_0xa5ef34++){const _0xbfbe2f=_0x36eb4e[_0xa5ef34];let _0x2ccb13=!0x1;for(const _0x2952a3 of Object['keys'](_0xbfbe2f))void 0x0===_0xbfbe2f[_0x2952a3]?delete _0xbfbe2f[_0x2952a3]:'id'!==_0x2952a3&&(_0x2ccb13=!0x0);_0x2ccb13||(_0x36eb4e[_0xa5ef34]=null);}if(_0x36eb4e=_0x36eb4e['filter'](_0x2d5e1d=>null!==_0x2d5e1d),!_0x36eb4e['length'])return;for(let _0x5336c3=0x0;_0x5336c3<_0x36eb4e['length'];_0x5336c3++){const _0xe9ccda=_0x36eb4e[_0x5336c3];void 0x0!==_0xe9ccda['fromVersion']&&void 0x0===_0xe9ccda['toVersion']&&(_0xe9ccda['toVersion']=this['repository']['getRevision'](_0xe9ccda['id'])['toVersion']),void 0x0!==_0xe9ccda['toVersion']&&void 0x0===_0xe9ccda['fromVersion']&&(_0xe9ccda['fromVersion']=this['repository']['getRevision'](_0xe9ccda['id'])['fromVersion']);}const _0x2fa6b0=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x36eb4e,_0x2fa6b0)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x101597=>{if(_0x101597){for(const _0x24132f of _0x101597)this['setRevisionData']({'id':_0x24132f['id'],'createdAt':_0x24132f['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x8ab652=null,from:_0x4718c2=null,to:_0x5ed008=null}){_0x4718c2=null!==_0x4718c2?_0x4718c2:_0x8ab652['fromVersion'],_0x5ed008=null!==_0x5ed008?_0x5ed008:_0x8ab652['toVersion'];const _0x32ea93=this['_revisionDataBuilder']['getData'](_0x4718c2,_0x5ed008),_0x56c29d={'diffData':_0x32ea93['diffData'],'authorsIds':_0x32ea93['authorsIds'],'fromVersion':_0x4718c2,'toVersion':_0x5ed008};if(!_0x8ab652||_0x5ed008!==_0x8ab652['toVersion']){const _0x1be8fb=_0x5ed008-0x1,_0xaa542a=this['_source']['history']['getOperation'](_0x1be8fb);_0x56c29d['createdAt']=_0xaa542a&&_0xaa542a['createdAt']||new Date();}if(this['_loadedStateData']&&_0x4718c2===this['_loadedStateData']['fromVersion']){for(const _0x138a1b of this['_loadedStateData']['authors'])_0x56c29d['authorsIds']['includes'](_0x138a1b['id'])||_0x56c29d['authorsIds']['push'](_0x138a1b['id']);}return _0x56c29d;}['_bufferUpdate'](_0x28fef7,_0x58c8ea,_0x1856b5){if(this['_bufferedUpdates']['has'](_0x28fef7)){const _0x22d9f4=this['_bufferedUpdates']['get'](_0x28fef7);_0x58c8ea=_0x1856b5?{..._0x22d9f4,..._0x58c8ea}:{..._0x58c8ea,..._0x22d9f4};}this['_bufferedUpdates']['set'](_0x28fef7,_0x58c8ea);}['setRevisionData'](_0x2d55c3){const _0x2564a5=this['repository']['getRevision'](_0x2d55c3['id']);if(_0x2d55c3['createdAt']&&(_0x2d55c3['createdAt']=new Date(_0x2d55c3['createdAt'])),_0x2d55c3['authorsIds']){const _0x879995=this['editor']['plugins']['get']('Users');_0x2d55c3['authors']=_0x2d55c3['authorsIds']['map'](_0x4d0432=>_0x879995['getUser'](_0x4d0432));}_0x2564a5['_update'](_0x2d55c3,!0x0);}['_createInitialRevision'](_0x505da7){const _0x1ef68a=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1ef68a)this['_initialRevisionId']=_0x1ef68a['id'];else{const _0x3c1cca=!this['editor']['model']['document']['roots']['find'](_0x1db580=>this['editor']['model']['hasContent'](_0x1db580)),_0x40d4c3=this['editor']['plugins']['get']('Users')['me']['id'],_0x155497=g(this['editor']['locale'],_0x3c1cca?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x505da7,'to':_0x505da7,'id':this['_initialRevisionId'],'name':_0x155497,'creatorId':_0x40d4c3});}}['_createCurrentRevision'](_0x2d92b1){const _0x1b498c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1b498c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2d92b1,'to':_0x2d92b1,'id':_0x1b498c,'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'](_0x167b81,_0x2ac490){let _0x2a0c35=this['editor']['config']['get']('initialData'),_0xede67b=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x2a0c35){_0x2a0c35={};for(const _0x3bcd89 of this['editor']['model']['document']['getRootNames']())_0x2a0c35[_0x3bcd89]='';}if('string'==typeof _0x2a0c35&&(_0x2a0c35={'main':_0x2a0c35}),void 0x0===_0xede67b){_0xede67b={};for(const _0xbaa99d of this['editor']['model']['document']['getRootNames']())_0xede67b[_0xbaa99d]={};}let _0x5314c1=!0x1;const _0x21ad84=Object['keys'](_0x2a0c35),_0x347b0c=Object['keys'](_0x167b81);for(const _0x370345 of _0x21ad84){if(_0x2a0c35[_0x370345]!==_0x167b81[_0x370345]&&''!==_0x2a0c35[_0x370345]['trim']()){_0x5314c1=!0x0;break;}if(!_0x306e54(_0xede67b[_0x370345],_0x2ac490[_0x370345])&&Object['keys'](_0xede67b[_0x370345])['length']>0x0){_0x5314c1=!0x0;break;}}_0x5314c1||(_0x5314c1=_0x347b0c['some'](_0x4a8eb2=>!this['editor']['model']['document']['getRoot'](_0x4a8eb2))),_0x5314c1&&_0x2f2542('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2a0c35,'editorRootsAttributes':_0xede67b,'revisionData':_0x167b81,'revisionRootsAttributes':_0x2ac490}),this['editor']['config']['set']('initialData',_0x167b81),this['editor']['config']['set']('rootsAttributes',_0x2ac490);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x4e44a5=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4e44a5['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x579f1f){const _0x3c058f=this['repository']['getRevisions']();_0x3c058f['reverse']();let _0x315b06=0x0;for(;_0x315b06<_0x3c058f['length'];){const _0x539ab0=_0x3c058f[_0x315b06];if(_0x539ab0===this['currentRevision']){_0x315b06++;continue;}if(_0x539ab0['id']===this['_initialRevisionId'])break;const _0x1d1ca7=_0x579f1f['toVersion']-_0x539ab0['toVersion']||_0x579f1f['fromVersion']-_0x539ab0['fromVersion'];if(_0x1d1ca7>0x0)break;if(_0x1d1ca7<0x0)_0x315b06++;else{if(!_0x579f1f['creator']&&_0x539ab0['creator'])break;if(_0x539ab0['creator']||!_0x579f1f['creator']){if(_0x579f1f['createdAt']>_0x539ab0['createdAt'])break;_0x315b06++;}else _0x315b06++;}}return _0x315b06;}['_getFromVersion'](_0x32ccca){const _0x312f80=this['repository']['getRevisions']();_0x312f80['reverse'](),_0x312f80['shift']();const _0x116b06=_0x312f80['find'](_0x51f51b=>_0x51f51b['toVersion']<=_0x32ccca)['toVersion'];return _0x116b06<this['_startingVersion']?this['_startingVersion']:_0x116b06;}['_makeRevision']({name:_0x2f5f3e,from:_0x4be29f,to:_0x25b4b0,creatorId:_0x5e0059,id:_0xea0094}){const _0x29c29a=this['buildRevisionData']({'from':_0x4be29f,'to':_0x25b4b0});_0x29c29a['name']=_0x2f5f3e,_0x29c29a['creatorId']=_0x5e0059,_0x29c29a['id']=_0xea0094;const _0x477301=this['addRevisionData'](_0x29c29a);return this['adapter']&&this['_bufferUpdate'](_0x29c29a['id'],_0x29c29a,!0x0),_0x477301;}['_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(_0x17f3ad){this['editor']=_0x17f3ad,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'](_0xbb07d4){this['source']=_0xbb07d4;const _0x1d15c7=new Map(),_0x584584=new Map(),_0x16f17a=this['editor']['model']['document']['roots']['map'](_0x253bd1=>_0x253bd1['rootName']);for(const _0x6227af of _0x16f17a){const _0x1e05ee=this['editor']['model']['document']['getRoot'](_0x6227af),_0x1f01f5=N(_0x1e05ee);_0x1d15c7['set'](_0x6227af,_0x1f01f5),_0x584584['set'](_0x6227af,Object['fromEntries'](_0x1e05ee['getAttributes']()));}const _0x533da2=Array['from'](this['editor']['model']['markers'])['map'](_0x572ca6=>[_0x572ca6['name'],_0x572ca6['getRange']()]),_0xb67a57=this['source']['version'];this['_saveMetaData'](_0xb67a57,_0x1d15c7,_0x533da2,_0x584584),this['_startingRevisionId']=this['_revisionId'];const _0xef3b01=new Map(),_0x3b84b7=new Map();for(const _0x1740f1 of _0x16f17a){const _0x58383c=P(_0x1740f1);_0xef3b01['set'](_0x1740f1,_0x58383c),_0x3b84b7['set'](_0x1740f1,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0xef3b01,[],_0x3b84b7);}['getData'](_0x2b2141,_0x3ed669){if(this['_lastFrom']===_0x2b2141&&this['_lastTo']<=_0x3ed669)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3ed669,!0x0);else{if(!this['_savedMetaData']['has'](_0x2b2141)){const _0x1e3ca7=this['_getPreviousFrom'](_0x2b2141);this['_calculateMetaData'](_0x1e3ca7,_0x2b2141,!0x1);}this['_calculateMetaData'](_0x2b2141,_0x3ed669,!0x0);}return this['_lastFrom']=_0x2b2141,this['_lastTo']=_0x3ed669,this['_getState']();}['loadState'](_0x5ab758){const _0x123b93=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5ab758['fromVersion'],this['_lastTo']=_0x5ab758['toVersion'];for(const _0x34a419 in _0x5ab758['diffData']){const _0x535360=_0x5ab758['diffData'][_0x34a419]['attachChange'],_0x3729fa=_0x22538e(_0x5ab758['diffData'][_0x34a419]['attributesBefore'])||{},_0x135fad=_0x123b93['_makeModelFromViewString'](_0x5ab758['diffData'][_0x34a419]['deletions']);_0x135fad['rootName']=_0x34a419,_0x135fad['_isAttached']=!_0x535360||!_0x535360['isAttached'],_0x135fad['isAttached']=()=>_0x135fad['_isAttached'],this['_baseRoots']['set'](_0x34a419,_0x135fad),this['_baseRootsAttributes']['set'](_0x34a419,_0x3729fa),_0x535360&&this['_touchedRoots']['set'](_0x34a419,_0x535360);const _0x58069e=this['_makeIdsRoot'](_0x135fad);this['_baseIdsRoots']['set'](_0x34a419,_0x58069e);for(const [_0x931355,_0x3a8bc6]of _0x135fad['markers']){if(!_0x931355['startsWith']('revision:'))continue;const _0x25fe48=_0x931355['split'](':')[0x2];for(const _0x438b43 of _0x3a8bc6['getWalker']({'singleCharacters':!0x0})){const _0x46516c=this['_getVidAttributeName'](_0x438b43),_0x2e46c1='elementEnd'==_0x438b43['type']?_0x438b43['previousPosition']['path']['slice'](0x0,-0x1):_0x438b43['previousPosition']['path'],_0x5a113e=_0x58069e['getNodeByPath'](_0x2e46c1)['getAttribute'](_0x46516c);this['_touched']['set'](_0x5a113e,{'userId':_0x25fe48});}}}this['_startingRevisionId']=this['_revisionId'];const _0x3d2dc3=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x332130=>!this['_touched']['has'](_0x332130));let _0x864798=0x0;const _0x25af42=new Map();for(const _0x4237e7 in _0x5ab758['diffData']){const _0x240ca5=_0x5ab758['diffData'][_0x4237e7]['attachChange'],_0x27266a=_0x22538e(_0x5ab758['diffData'][_0x4237e7]['attributesAfter'])||{},_0x2ee68b=_0x123b93['_makeModelFromViewString'](_0x5ab758['diffData'][_0x4237e7]['insertions']);_0x2ee68b['rootName']=_0x4237e7,_0x2ee68b['_isAttached']=!_0x240ca5||_0x240ca5['isAttached'],_0x2ee68b['isAttached']=()=>_0x2ee68b['_isAttached'],this['_diffRoots']['set'](_0x4237e7,_0x2ee68b),this['_diffRootsAttributes']['set'](_0x4237e7,_0x27266a);const _0x3311aa=this['_makeIdsRoot'](_0x2ee68b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4237e7,_0x3311aa),_0x25af42['set'](_0x4237e7,_0x2ee68b['isAttached']()?_0x27266a:{});for(const [_0x30d38a,_0x5b954b]of _0x2ee68b['markers']){if(!_0x30d38a['startsWith']('revision:'))continue;const _0x459bac=_0x30d38a['split'](':')[0x2];for(const _0x3524df of _0x5b954b['getWalker']({'singleCharacters':!0x0})){const _0x1d145e=this['_getVidAttributeName'](_0x3524df),_0x411e76=this['_revisionId']++,_0x98340b='elementEnd'==_0x3524df['type']?_0x3524df['previousPosition']['path']['slice'](0x0,-0x1):_0x3524df['previousPosition']['path'];_0x3311aa['getNodeByPath'](_0x98340b)['_setAttribute'](_0x1d145e,_0x411e76),this['_touched']['set'](_0x411e76,{'userId':_0x459bac});}}for(const _0x180193 of this['editor']['model']['createRangeIn'](_0x2ee68b)['getWalker']({'singleCharacters':!0x0})){const _0x28d3f6=this['_getVidAttributeName'](_0x180193),_0x516645='elementEnd'==_0x180193['type']?_0x180193['previousPosition']['path']['slice'](0x0,-0x1):_0x180193['previousPosition']['path'],_0x1d5d44=_0x3311aa['getNodeByPath'](_0x516645);_0x1d5d44['getAttribute'](_0x28d3f6)>0x0||_0x1d5d44['_setAttribute'](_0x28d3f6,_0x3d2dc3[_0x864798++]);}for(const [_0x4031e7,_0x51d110]of _0x2ee68b['markers'])_0x4031e7['startsWith']('revision:')||this['_markers']['set'](_0x4031e7,_0x51d110);}const _0x55c2bc=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x55c2bc),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x55c2bc,0x1));const _0x269acd=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x269acd),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x269acd,0x1));const _0x351c7c=Array['from'](this['_diffRoots'])['map'](([_0xabe458,_0x570be6])=>[_0xabe458,N(_0x570be6)]);this['_saveMetaData'](this['_lastTo'],_0x351c7c,this['_markers'],_0x25af42);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x3aed5a,_0x438f36,_0x2ef245,_0x5bbca4){const _0x4087df=new Map(_0x438f36),_0x2271e5=new Map(_0x22538e(_0x5bbca4)),_0x1b1a9e=new Map();for(const [_0x14cf94,_0x284d71]of _0x2ef245)_0x1b1a9e['set'](_0x14cf94,{'start':_0x284d71['start']['clone'](),'end':_0x284d71['end']['clone'](),'rootName':_0x284d71['root']['rootName']});this['_savedMetaData']['set'](_0x3aed5a,{'roots':_0x4087df,'markers':_0x1b1a9e,'rootsAttributes':_0x2271e5});}['_removeMetaData'](_0x52ebf7){this['_savedMetaData']['delete'](_0x52ebf7);}['_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'](_0x24814b,_0x1774bd=null){let _0x229d81=null;_0x24814b['is']('documentFragment')||(_0x229d81=new ut(_0x24814b['name'],{'vid_start':null===_0x1774bd?this['_revisionId']++:_0x1774bd++}));const _0x4c9638=[];for(const _0x1e159c of _0x24814b['getChildren']())if(_0x1e159c['is']('element')){_0x4c9638['push'](this['_makeIdsRoot'](_0x1e159c,_0x1774bd));const _0x91bc98=_0x4c9638[_0x4c9638['length']-0x1];null!==_0x1774bd&&(_0x1774bd=_0x91bc98['is']('element','$text')?_0x91bc98['getAttribute']('vid')+0x1:_0x91bc98['getAttribute']('vid_end')+0x1);}else{for(let _0xd0a158=0x0;_0xd0a158<_0x1e159c['offsetSize'];_0xd0a158++)_0x4c9638['push'](new ut('$text',{'vid':null===_0x1774bd?this['_revisionId']++:_0x1774bd++}));}if(_0x24814b['is']('documentFragment')){const _0x53cf3a=P(_0x24814b['rootName']);return _0x53cf3a['_insertChild'](0x0,_0x4c9638),_0x53cf3a;}return _0x229d81['_setAttribute']('vid_end',null===_0x1774bd?this['_revisionId']++:_0x1774bd++),_0x229d81['_insertChild'](0x0,_0x4c9638),_0x229d81;}['_calculateMetaData'](_0x52f63d,_0x5a753a,_0x36e74c){this['_reset']();const {roots:_0x1f222d,markers:_0x1b8737,rootsAttributes:_0x925aa7}=this['_savedMetaData']['get'](_0x52f63d);this['_baseRoots']=new Map(_0x1f222d),this['_baseRootsAttributes']=new Map(_0x22538e(_0x925aa7));for(const [_0x3a5ae4,_0x2d5972]of this['_baseRoots'])if('$graveyard'!==_0x3a5ae4&&(this['_diffRoots']['set'](_0x3a5ae4,N(_0x2d5972)),this['_diffRootsAttributes']=new Map(_0x22538e(_0x925aa7)),_0x36e74c)){const _0x4f94ee=this['_revisionId'];this['_idsRoots']['set'](_0x3a5ae4,this['_makeIdsRoot'](_0x2d5972)),this['_baseIdsRoots']['set'](_0x3a5ae4,this['_makeIdsRoot'](_0x2d5972,_0x4f94ee));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x36e74c&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x16fc9a,_0x5e6640]of _0x1b8737){const _0x53cd95=this['_baseRoots']['get'](_0x5e6640['rootName']),_0x23cc9f=this['_diffRoots']['get'](_0x5e6640['rootName']),_0x4112bc=new lt(this['_fixPosition'](_0x5e6640['start'],_0x53cd95),this['_fixPosition'](_0x5e6640['end'],_0x53cd95)),_0x1789f3=this['_fixRange'](_0x4112bc,_0x23cc9f);_0x53cd95['markers']['set'](_0x16fc9a,_0x4112bc),this['_markers']['set'](_0x16fc9a,_0x1789f3);}this['_applyOperations'](_0x52f63d,_0x5a753a,_0x36e74c);}['_applyOperations'](_0x1638a7,_0x2e92b2,_0x19441c){for(const _0x150bb2 of this['source']['getOperations'](_0x1638a7,_0x2e92b2))this['_handleOperation'](_0x150bb2,_0x19441c);for(const _0x4d536b of this['_diffRoots']['values']())_0x4d536b['markers']['clear']();for(const [_0x15f1fe,_0x1283fe]of this['_markers']){this['_diffRoots']['get'](_0x1283fe['root']['rootName'])['markers']['set'](_0x15f1fe,_0x1283fe['clone']());}const _0x83d136=new Map(),_0x4a3f08=new Map();for(const [_0x522d40,_0x33e3f1]of this['_diffRoots'])_0x83d136['set'](_0x522d40,N(_0x33e3f1)),_0x4a3f08['set'](_0x522d40,this['_diffRootsAttributes']['get'](_0x522d40));this['_saveMetaData'](_0x2e92b2,_0x83d136,this['_markers'],_0x4a3f08);}['_getPreviousFrom'](_0x30bfe6){const _0x455482=Array['from'](this['_savedMetaData']['keys']());_0x455482['sort']((_0x4cf673,_0x423f31)=>_0x4cf673-_0x423f31),_0x455482['reverse']();for(const _0x3f7031 of _0x455482)if(_0x3f7031<_0x30bfe6)return _0x3f7031;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2b98a6,_0x28ffbc){const _0xaa91a4=Array['from'](_0x28ffbc['markers'])['map'](([_0x44937d,_0x180b63])=>[_0x44937d,this['_fixRange'](_0x180b63,_0x2b98a6)]);_0x2b98a6['markers']=new Map(_0xaa91a4);}['_transformMarkers'](_0x52bf52){for(const _0x43eb4e of this['_markers']['values']()){const _0x3df000=_0x43eb4e['getTransformedByOperation'](_0x52bf52),_0x7dd8e4=lt['_createFromRanges'](_0x3df000);_0x43eb4e['start']=_0x7dd8e4['start'],_0x43eb4e['end']=_0x7dd8e4['end'];}}['_handleOperation'](_0x34ad35,_0x5cdd0e){if('addRoot'!=_0x34ad35['type']&&'detachRoot'!=_0x34ad35['type']){if('insert'==_0x34ad35['type']){const _0xe32c66=_0x34ad35['position']['root']['rootName'];this['_diffRoots']['has'](_0xe32c66)||(this['_diffRoots']['set'](_0xe32c66,P(_0xe32c66,!0x0)),this['_diffRootsAttributes']['set'](_0xe32c66,{}),_0x5cdd0e&&this['_idsRoots']['set'](_0xe32c66,P(_0xe32c66,!0x0)));}else{if('addRootAttribute'==_0x34ad35['type']||'removeRootAttribute'==_0x34ad35['type']||'changeRootAttribute'==_0x34ad35['type'])return void this['_handleRootAttributeOperation'](_0x34ad35);'marker'==_0x34ad35['type']&&this['_handleMarkerOperation'](_0x34ad35);}if('marker'!==_0x34ad35['type']){const _0x3cd2ae=this['_cloneOperation'](_0x34ad35,this['_diffRoots']);_0x3cd2ae['_execute'](),this['_transformMarkers'](_0x3cd2ae);}if(_0x5cdd0e)switch(_0x34ad35['type']){case'insert':this['_handleInsertOperation'](_0x34ad35);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x34ad35);break;case'merge':this['_handleMergeOperation'](_0x34ad35);break;case'split':this['_handleSplitOperation'](_0x34ad35);}}else this['_handleRootOperation'](_0x34ad35,_0x5cdd0e);}['_cloneOperation'](_0x59b76f,_0x22d9e1){const _0x17f7bd=_0x59b76f['clone']();return _0x17f7bd['_authorId']=_0x59b76f['_authorId'],this['_fixOperation'](_0x17f7bd,_0x22d9e1),_0x17f7bd;}['_getBaseVids'](_0x1bac24){return _0x1bac24['map'](_0x431bde=>{const _0x4dbc6c=this['_getVidAttributeName'](_0x431bde);return Number(_0x431bde['item']['getAttribute'](_0x4dbc6c));});}['_generateTape'](_0x56cef8,_0x3684aa){if(_0x56cef8['is']('element','$text'))_0x3684aa['push']({'item':_0x56cef8,'type':'text'});else{_0x56cef8['is']('element')&&_0x3684aa['push']({'item':_0x56cef8,'type':'elementStart'});for(const _0x3433fe of _0x56cef8['getChildren']())this['_generateTape'](_0x3433fe,_0x3684aa);_0x56cef8['is']('element')&&_0x3684aa['push']({'item':_0x56cef8,'type':'elementEnd'});}return _0x3684aa;}['_getState'](){const _0x41c553=new Map(this['_touched']),_0x5783b7=new Map(_0x41c553),_0x6a82cb=new Map(),_0x58724e={'insertions':{},'deletions':{}},_0x5299fc={'insertions':{},'deletions':{}},_0x45a493=new Map(),_0x145bb9=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x145bb9['delete']('$graveyard');for(const _0x448463 of _0x145bb9){const _0x5cb8bc=this['_diffRoots']['get'](_0x448463)||P(_0x448463,!0x1),_0x137bac=this['_baseRoots']['get'](_0x448463)||P(_0x448463,!0x1);_0x5cb8bc['isAttached']()||_0x137bac['isAttached']()?(_0x58724e['insertions'][_0x448463]=N(_0x5cb8bc),_0x58724e['deletions'][_0x448463]=N(_0x137bac),this['_copyMarkers'](_0x58724e['deletions'][_0x448463],_0x137bac),this['_copyMarkers'](_0x58724e['insertions'][_0x448463],_0x5cb8bc),_0x5299fc['insertions'][_0x448463]=this['_generateTape'](this['_idsRoots']['get'](_0x448463),[]),_0x5299fc['deletions'][_0x448463]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x448463)||P(_0x448463,!0x1),[])):_0x145bb9['delete'](_0x448463);}for(const _0x3ebf79 of _0x145bb9){const _0x13f8dc=_0x5299fc['insertions'][_0x3ebf79];for(const _0x36aea5 of _0x13f8dc){const _0x461c11=this['_getVidAttributeName'](_0x36aea5),_0x4f69d8=_0x36aea5['item']['getAttribute'](_0x461c11);_0x5783b7['delete'](_0x4f69d8),_0x4f69d8>=this['_startingRevisionId']&&_0x6a82cb['set'](_0x4f69d8,_0x41c553['get'](_0x4f69d8));}}for(const _0x547d30 of _0x145bb9){const _0x223665=_0x5299fc['insertions'][_0x547d30],_0x412fe2=this['_getBaseVids'](_0x5299fc['deletions'][_0x547d30]);let _0x406674=0x0;for(const _0x41d5ee of _0x223665){const _0x4d7ed8=this['_getVidAttributeName'](_0x41d5ee),_0x1ba635=_0x41d5ee['item']['getAttribute'](_0x4d7ed8);if(!_0x6a82cb['has'](_0x1ba635)&&!_0x45a493['has'](_0x1ba635)){if(_0x5783b7['has'](_0x1ba635))_0x406674++;else{if(_0x1ba635!=_0x412fe2[_0x406674]){const _0x4ac1f2=_0x41c553['get'](_0x1ba635)||_0x41c553['get'](_0x412fe2[_0x406674]);for(;_0x1ba635!=_0x412fe2[_0x406674];)_0x5783b7['has'](_0x412fe2[_0x406674])||(_0x45a493['set'](_0x412fe2[_0x406674],_0x4ac1f2),_0x41c553['set'](_0x412fe2[_0x406674],_0x4ac1f2)),_0x406674++;}_0x406674++;}}}}for(const _0x8b5ce9 of _0x145bb9){const _0x319c63=_0x5299fc['insertions'][_0x8b5ce9];for(const _0x10dc59 of _0x319c63){const _0x27f439=this['_getVidAttributeName'](_0x10dc59),_0x1fbf9f=_0x10dc59['item']['getAttribute'](_0x27f439);if(_0x45a493['has'](_0x1fbf9f)){const _0xe0bf3c=_0x45a493['get'](_0x1fbf9f);_0x5783b7['has'](_0x1fbf9f)||_0x5783b7['set'](_0x1fbf9f,{..._0xe0bf3c}),_0x6a82cb['set'](_0x1fbf9f,{..._0xe0bf3c});}}}for(const _0x274913 of _0x5783b7['keys']())_0x274913>=this['_startingRevisionId']&&_0x5783b7['delete'](_0x274913);const _0x4a12cc=new Map();for(const _0x2a32ee of _0x145bb9){let _0x4ef790=_0x5299fc['insertions'][_0x2a32ee];for(const _0x245bc0 of _0x4ef790)if(_0x245bc0['item']['is']('element','tableCell')){const _0x2a92a7=this['_getVidAttributeName'](_0x245bc0),_0x1bfa76=_0x245bc0['item']['getAttribute'](_0x2a92a7);if(_0x6a82cb['has'](_0x1bfa76)){const _0x2a3d62=_0x245bc0['item']['parent']['parent']['getAttribute']('vid_start'),_0x37e359=_0x4a12cc['get'](_0x2a3d62)||new Set();_0x37e359['add'](_0x6a82cb['get'](_0x1bfa76)['userId']),_0x4a12cc['set'](_0x2a3d62,_0x37e359);}}_0x4ef790=_0x5299fc['deletions'][_0x2a32ee];for(const _0x254847 of _0x4ef790)if(_0x254847['item']['is']('element','tableCell')){const _0x21a53e=this['_getVidAttributeName'](_0x254847),_0x541baa=_0x254847['item']['getAttribute'](_0x21a53e);if(_0x5783b7['has'](_0x541baa)){const _0x49c384=_0x254847['item']['parent']['parent']['getAttribute']('vid_start'),_0x52129d=_0x4a12cc['get'](_0x49c384)||new Set();_0x52129d['add'](_0x5783b7['get'](_0x541baa)['userId']),_0x4a12cc['set'](_0x49c384,_0x52129d);}}for(const _0x5e5ab0 of _0x4a12cc['keys']())(_0x6a82cb['has'](_0x5e5ab0)||_0x5783b7['has'](_0x5e5ab0))&&_0x4a12cc['delete'](_0x5e5ab0);}for(const _0x5b95e6 of _0x145bb9){const _0x45a427=_0x5299fc['insertions'][_0x5b95e6];let _0x2b50ec=null,_0x4f68a6=null;for(const _0x75c9dd of _0x45a427){const _0x32e926=this['_getVidAttributeName'](_0x75c9dd),_0x183124=_0x75c9dd['item']['getAttribute'](_0x32e926),_0x59e05f=_0x4a12cc['get'](_0x183124);_0x59e05f&&'elementStart'==_0x75c9dd['type']&&(_0x2b50ec=Array['from'](_0x59e05f)[0x0],_0x4f68a6=_0x75c9dd['item']['getAttribute']('vid_end')),_0x2b50ec&&(_0x5783b7['set'](_0x183124,{'userId':_0x2b50ec}),_0x6a82cb['set'](_0x183124,{'userId':_0x2b50ec})),_0x183124==_0x4f68a6&&(_0x2b50ec=null,_0x4f68a6=null);}}const _0x2799d0={},_0x269937=new Set();for(const _0x36cf2e of _0x145bb9){const _0x5cff1d=_0x58724e['deletions'][_0x36cf2e],_0x47efd8=_0x58724e['insertions'][_0x36cf2e];for(const {userId:_0x473a27}of this['_touchedMarkers']['values']())null!==_0x473a27&&_0x269937['add'](_0x473a27);for(const {userId:_0xbe4fdc}of this['_touchedRoots']['values']())null!==_0xbe4fdc&&_0x269937['add'](_0xbe4fdc);this['_markChanges'](_0x47efd8,_0x5299fc['insertions'][_0x36cf2e],_0x6a82cb,'insertion',_0x269937),this['_markChanges'](_0x5cff1d,_0x5299fc['deletions'][_0x36cf2e],_0x5783b7,'deletion',_0x269937),_0x2799d0[_0x36cf2e]={'insertions':this['_prepareViewToSave'](_0x47efd8),'deletions':this['_prepareViewToSave'](_0x5cff1d),'attachChange':this['_touchedRoots']['get'](_0x36cf2e)||null,'attributesBefore':_0x22538e(this['_baseRootsAttributes']['get'](_0x36cf2e))||{},'attributesAfter':_0x22538e(this['_diffRootsAttributes']['get'](_0x36cf2e))};}return{'diffData':_0x2799d0,'authorsIds':Array['from'](_0x269937)};}['_processRootBeforeSave'](_0x2e8ee6){for(const [,_0x3bd54f]of _0x2e8ee6['markers']){const _0x2e335f=_0x3bd54f['start']['getAncestors']()['filter'](_0x317ee7=>'tableCell'==_0x317ee7['name']);for(const _0x4c963e of _0x2e335f)0x1==_0x4c963e['childCount']&&_0x4c963e['getChild'](0x0)['is']('element','paragraph')&&_0x4c963e['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x23591a){this['_processRootBeforeSave'](_0x23591a);const _0x4756b0=this['editor']['data']['toView'](_0x23591a,{}),_0x5af298=Array['from'](_0x4756b0['getChildren']())['map'](_0x28e5e7=>this['_getViewJson'](_0x28e5e7));return JSON['stringify'](_0x5af298);}['_getViewJson'](_0x540738){if(_0x540738['is']('$text'))return _0x540738['data'];{const _0x5a628b=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x29012b=_0x540738,_0x1b47d6=this['editor']['data']['htmlProcessor']['domConverter'],_0xdba2fb={'type':_0x5a628b['_getTypeCharForViewElement'](_0x29012b),'name':_0x29012b['name'],'attributes':Array['from'](_0x29012b['getAttributes']()),'children':Array['from'](_0x29012b['getChildren']())['map'](_0x9f6291=>this['_getViewJson'](_0x9f6291))};if(_0x540738['is']('uiElement')&&'$comment'!=_0x540738['name']){const _0x8a4871=_0x540738['render'](_0x1b47d6['domDocument'],_0x1b47d6);_0xdba2fb['children']['push'](_0x8a4871['outerHTML']);}else{if(_0x540738['is']('rawElement')){const _0x1a7c92=_0x1b47d6['domDocument']['createElement'](_0x29012b['name']);_0x540738['render'](_0x1a7c92,_0x1b47d6),_0xdba2fb['children']['push'](_0x1a7c92['innerHTML']);}}const _0x21c72f=Array['from'](_0x29012b['getCustomProperties']());_0x21c72f['length']>0x0&&(_0xdba2fb['customProperties']=_0x21c72f);const _0x1d4546=_0x29012b['getFillerOffset']();return null!==_0x1d4546&&(_0xdba2fb['fillerOffset']=_0x1d4546),_0xdba2fb;}}['_markChanges'](_0x2f71ff,_0x4a16f4,_0x476cdc,_0x160a06,_0x541645){let _0x2d3a38=null,_0x59ce2f=null,_0x14d597=0x0;const _0x13d65b=this['editor']['model'];for(let _0x4cebd4=0x0;_0x4cebd4<_0x4a16f4['length'];_0x4cebd4++){const _0x3c14f6=this['_getVidAttributeName'](_0x4a16f4[_0x4cebd4]),_0x16769b=_0x4a16f4[_0x4cebd4]['item']['getAttribute'](_0x3c14f6),_0x3379b1=_0x476cdc['get'](_0x16769b),_0x4e389f=_0x4cebd4==_0x4a16f4['length']-0x1;(!_0x2d3a38&&_0x3379b1&&(_0x2d3a38=_0x3379b1,_0x59ce2f=_0x4a16f4[_0x4cebd4]),_0x2d3a38&&(!_0x3379b1||_0x3379b1['userId']!=_0x2d3a38['userId']))&&(_0x219fd3(_0x3379b1,F(_0x59ce2f,_0x2f71ff,_0x13d65b),F(_0x4a16f4[_0x4cebd4],_0x2f71ff,_0x13d65b)),_0x2d3a38=_0x3379b1||null,_0x59ce2f=_0x3379b1?_0x4a16f4[_0x4cebd4]:null),_0x2d3a38&&_0x4e389f&&_0x219fd3(_0x3379b1,F(_0x59ce2f,_0x2f71ff,_0x13d65b),B(_0x4a16f4[_0x4cebd4],_0x2f71ff,_0x13d65b));}function _0x219fd3(_0x288787,_0x13aee1,_0x58c52e){const _0x31492d=_0x2d3a38['userId'],_0x5856a6='revision:'+_0x160a06+':'+_0x31492d+':'+_0x14d597++,_0x221311=_0x13d65b['createRange'](_0x13aee1,_0x58c52e);_0x2f71ff['markers']['set'](_0x5856a6,_0x221311),null!==_0x31492d&&_0x541645['add'](_0x31492d);}}['_getVidAttributeName'](_0xca84d2){switch(_0xca84d2['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x16d897,_0x4471d7){_0x16d897['baseVersion']=null;for(const _0x13558b in _0x16d897){const _0x4e3bad=_0x16d897[_0x13558b];if(_0x4e3bad instanceof ft){const _0x1240e6=_0x4471d7['get'](_0x4e3bad['root']['rootName']);_0x16d897[_0x13558b]=this['_fixPosition'](_0x4e3bad,_0x1240e6);}if(_0x4e3bad instanceof lt){const _0x164c50=_0x4471d7['get'](_0x4e3bad['root']['rootName']);_0x16d897[_0x13558b]=this['_fixRange'](_0x4e3bad,_0x164c50);}'root'===_0x13558b&&(_0x16d897['root']=_0x4471d7['get'](_0x16d897['root']['rootName']));}}['_fixRange'](_0x4d122b,_0x4b1d37){return this['editor']['model']['createRange'](this['_fixPosition'](_0x4d122b['start'],_0x4b1d37),this['_fixPosition'](_0x4d122b['end'],_0x4b1d37));}['_fixPosition'](_0x5e33df,_0x1cebd9){return this['editor']['model']['createPositionFromPath'](_0x1cebd9,_0x5e33df['path'],_0x5e33df['stickiness']);}['_handleInsertOperation'](_0x665a54){const _0x4e0c47=this['_idsRoots']['get'](_0x665a54['position']['root']['rootName']),_0x16a163=this['_fixPosition'](_0x665a54['position'],_0x4e0c47),_0xa9d28e=null===_0x665a54['_authorId']?null:_0x665a54['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x415897=_0x16a163['parent'],_0x25f2e5=this['_revisionId'],_0x1e388b=[];for(const _0x5d3e50 of _0x665a54['nodes'])if(_0x5d3e50['is']('element'))_0x1e388b['push'](this['_makeIdsRoot'](_0x5d3e50));else{for(let _0x227b3d=0x0;_0x227b3d<_0x5d3e50['offsetSize'];_0x227b3d++)_0x1e388b['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x2106eb=this['_revisionId'];for(let _0x330c3b=_0x25f2e5;_0x330c3b<_0x2106eb;_0x330c3b++)this['_touched']['set'](_0x330c3b,{'userId':_0xa9d28e});_0x415897['_insertChild'](_0x16a163['offset'],_0x1e388b);}['_handleMoveOperation'](_0x1362c1){(_0x1362c1=this['_cloneOperation'](_0x1362c1,this['_idsRoots']))['_execute']();const _0x51667c=null===_0x1362c1['_authorId']?null:_0x1362c1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c9197=_0x1362c1['getMovedRangeStart'](),_0x1e6be2=_0x4c9197['parent'],_0x574969=_0x4c9197['offset'];!function _0x5771b4(_0x167f5d,_0x38707e,_0x505aaf,_0xa34eb2){for(let _0x37714d=_0x505aaf;_0x37714d<_0xa34eb2;_0x37714d++){const _0x2076ba=_0x38707e['getChild'](_0x37714d);_0x2076ba['is']('element','$text')?_0x167f5d['set'](_0x2076ba['getAttribute']('vid'),{'userId':_0x51667c}):(_0x167f5d['set'](_0x2076ba['getAttribute']('vid_start'),{'userId':_0x51667c}),_0x5771b4(_0x167f5d,_0x2076ba,0x0,_0x2076ba['childCount']),_0x167f5d['set'](_0x2076ba['getAttribute']('vid_end'),{'userId':_0x51667c}));}}(this['_touched'],_0x1e6be2,_0x574969,_0x574969+_0x1362c1['howMany']);}['_handleMergeOperation'](_0x1c3625){const _0x3a59b9=null===(_0x1c3625=this['_cloneOperation'](_0x1c3625,this['_idsRoots']))['_authorId']?null:_0x1c3625['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4de6b6=_0x1c3625['targetPosition']['parent'],_0x3bb672=_0x1c3625['sourcePosition']['parent'],_0x5a7d20=_0x4de6b6['getAttribute']('vid_end'),_0x298f53=_0x3bb672['getAttribute']('vid_start');_0x4de6b6['_setAttribute']('vid_end',_0x3bb672['getAttribute']('vid_end')),_0x3bb672['_setAttribute']('vid_end',_0x5a7d20),this['_touched']['set'](_0x298f53,{'userId':_0x3a59b9}),this['_touched']['set'](_0x5a7d20,{'userId':_0x3a59b9}),_0x1c3625['_execute']();}['_handleSplitOperation'](_0x3fd720){const _0x8ba34f=null===(_0x3fd720=this['_cloneOperation'](_0x3fd720,this['_idsRoots']))['_authorId']?null:_0x3fd720['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3dc08e=_0x3fd720['graveyardPosition'],_0x37a6eb=_0x3fd720['splitPosition']['parent'];_0x3fd720['_execute']();const _0x7e3fd2=_0x37a6eb['getAttribute']('vid_end'),_0x145e9c=_0x3fd720['insertionPosition']['nodeAfter'];if(_0x3dc08e){const _0x463452=_0x145e9c['getAttribute']('vid_end'),_0x5cfaaf=_0x37a6eb['getAttribute']('vid_end');_0x37a6eb['_setAttribute']('vid_end',_0x463452),_0x145e9c['_setAttribute']('vid_end',_0x5cfaaf),this['_touched']['set'](_0x37a6eb['getAttribute']('vid_end'),{'userId':_0x8ba34f}),this['_touched']['set'](_0x145e9c['getAttribute']('vid_start'),{'userId':_0x8ba34f});}else{const _0x318494=this['_revisionId']++,_0x167b13=this['_revisionId']++;_0x37a6eb['_setAttribute']('vid_end',_0x318494),_0x145e9c['_setAttribute']('vid_start',_0x167b13),_0x145e9c['_setAttribute']('vid_end',_0x7e3fd2),this['_touched']['set'](_0x318494,{'userId':_0x8ba34f}),this['_touched']['set'](_0x167b13,{'userId':_0x8ba34f});}}['_handleMarkerOperation'](_0x136ce6){if(!_0x136ce6['affectsData'])return;const _0x389913=(_0x136ce6=this['_cloneOperation'](_0x136ce6,this['_diffRoots']))['oldRange']?_0x136ce6['oldRange']['root']:null,_0x36c414=_0x136ce6['newRange']?_0x136ce6['newRange']['root']:null;_0x389913&&this['_markers']['delete'](_0x136ce6['name']),_0x36c414&&this['_markers']['set'](_0x136ce6['name'],_0x136ce6['newRange']['clone']());const _0x3c24f2=null===_0x136ce6['_authorId']?null:_0x136ce6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xd79c4a=_0x136ce6['name'];if(!this['_touchedMarkers']['has'](_0xd79c4a))return void this['_touchedMarkers']['set'](_0xd79c4a,{'range':_0x136ce6['oldRange'],'userId':_0x3c24f2});const _0xe3a4e9=this['_touchedMarkers']['get'](_0xd79c4a),_0x126ed9=_0xe3a4e9['range'],_0x28df52=_0x136ce6['newRange'];null==_0x126ed9&&null==_0x28df52||_0x126ed9&&_0x28df52&&_0x126ed9['isEqual'](_0x28df52)?this['_touchedMarkers']['delete'](_0x136ce6['name']):_0xe3a4e9['userId']=_0x3c24f2;}['_handleRootOperation'](_0x3426a1,_0x5ba224){this['_diffRoots']['has'](_0x3426a1['rootName'])?this['_diffRoots']['get'](_0x3426a1['rootName'])['_isAttached']=_0x3426a1['isAdd']:(this['_diffRoots']['set'](_0x3426a1['rootName'],P(_0x3426a1['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3426a1['rootName'],{}),_0x5ba224&&this['_idsRoots']['set'](_0x3426a1['rootName'],P(_0x3426a1['rootName'],!0x0)));const _0x1573ac=null===_0x3426a1['_authorId']?null:_0x3426a1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4649d6=this['_touchedRoots']['get'](_0x3426a1['rootName']);_0x4649d6&&_0x4649d6['userId']===_0x1573ac?this['_touchedRoots']['delete'](_0x3426a1['rootName']):this['_touchedRoots']['set'](_0x3426a1['rootName'],{'userId':_0x1573ac,'isAttached':_0x3426a1['isAdd']});}['_handleRootAttributeOperation'](_0x455b20){const _0x6e9368=this['_diffRootsAttributes']['get'](_0x455b20['root']['rootName']);null===_0x455b20['newValue']?delete _0x6e9368[_0x455b20['key']]:_0x6e9368[_0x455b20['key']]=_0x455b20['newValue'];}}function N(_0x38166b){const _0x4de0fa=P(_0x38166b['rootName'],_0x38166b['isAttached']());for(const _0x261bae of _0x38166b['getChildren']()){const _0x503180=_0x261bae['_clone'](!0x0);_0x4de0fa['_appendChild'](_0x503180);}return _0x4de0fa;}function P(_0x42d1d1,_0x959e3e=!0x0){const _0x201ca6=new vt();return _0x201ca6['rootName']=_0x42d1d1,_0x201ca6['_isAttached']=_0x959e3e,_0x201ca6['isAttached']=()=>_0x201ca6['_isAttached'],_0x201ca6;}function F(_0x16c564,_0x4d0306,_0x58157a){const _0x1ee968='elementEnd'==_0x16c564['type']?_0x58157a['createPositionAt'](_0x16c564['item'],'end'):_0x58157a['createPositionBefore'](_0x16c564['item']);return _0x58157a['createPositionFromPath'](_0x4d0306,_0x1ee968['path'],_0x1ee968['stickiness']);}function B(_0xd673bd,_0x122f9a,_0x477675){const _0x1f5504='elementStart'==_0xd673bd['type']?_0x477675['createPositionAt'](_0xd673bd['item'],0x0):_0x477675['createPositionAfter'](_0xd673bd['item']);return _0x477675['createPositionFromPath'](_0x122f9a,_0x1f5504['path'],_0x1f5504['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x41eed0,_0x5867a0){super(_0x41eed0),this['focusTracker']=new _0x5d407f(),this['keystrokes']=new _0x1969e0(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x5867a0),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x3970f1(this);}['render'](){super['render'](),_0x2ef604({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x53d6b6=_0x59bbf2=>_0x59bbf2['stopPropagation']();this['keystrokes']['set']('arrowright',_0x53d6b6),this['keystrokes']['set']('arrowleft',_0x53d6b6),this['keystrokes']['set']('arrowup',_0x53d6b6),this['keystrokes']['set']('arrowdown',_0x53d6b6);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x31ba0c){this['revisionNameInputView']['fieldView']['element']['value']=_0x31ba0c['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x541c1c){const _0xc4d6c7=new _0xb76ef9(this['locale'],_0x5833e5),_0x2382c7=_0xc4d6c7['fieldView'];_0x2382c7['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x2c3572=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x541c1c&&(_0x2c3572+='\x20('+g(this['locale'],'optional')+')'),(_0xc4d6c7['label']=_0x2c3572,_0x2382c7['on']('input',()=>{this['revisionNameInputValue']=_0x2382c7['element']['value']['trim']();}),_0xc4d6c7);}}class f extends _0x123d7e{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x28f693=this['editor'],_0x28ffc7=_0x28f693['plugins']['get']('RevisionTracker');_0x28f693['ui']['componentFactory']['add']('revisionHistory',_0xc71fa0=>{const _0x12624e=_0x46c8d6(_0xc71fa0),_0xce7df4=_0x12624e['panelView']['children'],_0x42abae=new _0x4780a3(_0xc71fa0),_0x41b6a2=new _0x105f97(_0xc71fa0),_0x1f30e6=new te(_0xc71fa0),_0x441b52=new _0x105f97(_0xc71fa0),_0xbf94f=new te(_0xc71fa0);return _0x12624e['bind']('isEnabled')['to'](_0x28ffc7,'isReady',_0x28ffc7,'isEnabled',_0x28f693,'isReadOnly',(_0x58e744,_0x2c88f7,_0x56e5f4)=>_0x58e744&&_0x2c88f7&&!_0x56e5f4),_0x12624e['buttonView']['set']({'icon':_0x324db6,'label':g(_0xc71fa0,'Revision\x20history'),'tooltip':!0x0}),_0x1f30e6['set']({'label':g(_0xc71fa0,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x1f30e6['bind']('isEnabled')['to'](_0x28ffc7,'isReady',_0x28ffc7,'isEnabled',_0x28f693,'isReadOnly',(_0x211179,_0x2dba90,_0x276537)=>_0x211179&&_0x2dba90&&!_0x276537),_0x1f30e6['on']('execute',()=>this['_showDialog']()),_0xbf94f['set']({'label':g(_0xc71fa0,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0xbf94f['bind']('isEnabled')['to'](_0x28ffc7,'isReady',_0x28f693,'isReadOnly',(_0x37e93f,_0x599ab2)=>_0x37e93f&&!_0x599ab2),_0xbf94f['on']('execute',()=>{_0x28f693['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x12624e['isOpen']=!0x1,_0x28f693['editing']['view']['focus']();}),_0x41b6a2['children']['add'](_0x1f30e6),_0x441b52['children']['add'](_0xbf94f),_0x42abae['role']='menu',_0x42abae['items']['addMany']([_0x41b6a2,_0x441b52]),_0xce7df4['add'](_0x42abae),_0x12624e;}),_0x28f693['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x3074cb=this['editor'],_0x536d60=_0x3074cb['locale'],_0x1529ac=new _0x253393(_0x536d60),_0xa49159=new _0x258021(_0x536d60);_0x1529ac['buttonView']['set']({'icon':_0x324db6,'label':g(_0x536d60,'Revision\x20history')});const _0x4ff115=new _0x336be4(_0x536d60,_0x1529ac),_0xf4f8da=new _0x51d7e6(_0x536d60);_0xf4f8da['set']({'label':g(_0x536d60,'Save\x20current\x20revision')}),_0xf4f8da['delegate']('execute')['to'](_0x1529ac),_0xf4f8da['on']('execute',()=>{this['_showDialog']();}),_0x4ff115['children']['add'](_0xf4f8da),_0xa49159['items']['add'](_0x4ff115);const _0x34baa4=new _0x336be4(_0x536d60,_0x1529ac),_0x7d1ef4=new _0x51d7e6(_0x536d60);return _0x7d1ef4['set']({'label':g(_0x536d60,'Open\x20revision\x20history')}),_0x7d1ef4['delegate']('execute')['to'](_0x1529ac),_0x7d1ef4['on']('execute',()=>{_0x3074cb['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x34baa4['children']['add'](_0x7d1ef4),_0xa49159['items']['add'](_0x34baa4),_0x1529ac['panelView']['children']['add'](_0xa49159),_0x1529ac;}['_showDialog'](){const _0x46c7dd=this['editor'],_0x56befb=_0x46c7dd['locale'],_0x5c827e=_0x46c7dd['plugins']['get']('Dialog'),_0x4fe43d=_0x46c7dd['plugins']['get']('RevisionTracker');function _0x5ed483(_0x58b9b8){_0x46c7dd['config']['get']('revisionHistory.requireRevisionName')&&''===_0x58b9b8['revisionName']?_0x58b9b8['revisionNameInputView']['errorText']=g(_0x56befb,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x46c7dd['plugins']['get'](u)['saveRevision']({'name':_0x58b9b8['revisionName']}),_0x5c827e['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5ed483(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x5c827e['show']({'id':'revisionSave','title':g(_0x56befb,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x46c7dd['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x5c827e['hide']()},{'label':g(_0x46c7dd['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4aab5f){_0x4aab5f['bind']('isEnabled')['to'](_0x4fe43d,'isReady',_0x4fe43d,'isEnabled',_0x46c7dd,'isReadOnly',(_0x42e50a,_0x41b4f2,_0x18c4c9)=>_0x42e50a&&_0x41b4f2&&!_0x18c4c9);},'onExecute':()=>_0x5ed483(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x129f04=this['editor'],_0x10649c=_0x129f04['locale'];this['_saveRevisionFormView']=new hs(_0x10649c,_0x129f04['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends ts{['changeId'];['_model'];constructor(_0x2fd551,_0xdd3805){super(_0x2fd551),this['_model']=_0xdd3805,this['changeId']=_0xdd3805['id'];const _0x4fff60=this['bindTemplate'],_0x399380=g(_0x2fd551,_0xdd3805['data']['isSuggestion']?'Suggested\x20by':'add'==_0xdd3805['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0xdd3805['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x4fff60['to']('type',_0x3d4b26=>'ck-revision-change__'+_0x3d4b26)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x399380}]},{'text':'\x20'+_0xdd3805['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x191d9e(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0xa9ba94){super(),this['id']=_0xa9ba94['id']||_0x978a72(),this['author']=_0xa9ba94['author'],this['type']=_0xa9ba94['type'],this['data']=_0xa9ba94['data']||{},this['rootName']=_0xa9ba94['rootName'],this['set']('createdAt',_0xa9ba94['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(_0x4abca8,_0x41b305){this['newRevisionId']=_0x4abca8,this['oldRevisionId']=_0x41b305,this['changes']=new _0x44fedb();}['_setChanges'](_0x2ad9c3){for(const _0x156c3e of _0x2ad9c3)this['changes']['add'](_0x156c3e);}}class m extends _0x123d7e{['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[_0x202ba3,_0x3451c0,I,V];}constructor(_0xdf6cd5){super(_0xdf6cd5),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',(_0x5ba596,_0x1376aa,_0x5d05d2)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x486590=>{for(const _0x27f630 of this['editor']['editing']['view']['document']['roots'])_0x5d05d2?_0x486590['removeClass']('ck-editor__editable__overlay',_0x27f630):_0x486590['addClass']('ck-editor__editable__overlay',_0x27f630);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x92bc34=>null!==_0x92bc34),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0xb1ee1f,_0x34a11a,_0xb365e2)=>_0xb1ee1f&&_0xb365e2?_0x34a11a['changes']['getIndex'](_0xb365e2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4e5698,_0x4e3a34)=>_0x4e5698?_0x4e3a34['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3451c0);}['init'](){const _0x250aa8=this['editor'],_0x312373=new wt(_0x250aa8,{'direction':'backward'}),_0xa06aa9=new wt(_0x250aa8,{'direction':'forward'});(_0x250aa8['commands']['add']('showPreviousChange',_0x312373),_0x250aa8['commands']['add']('showNextChange',_0xa06aa9),_0x250aa8['commands']['add']('restoreRevision',new mt(_0x250aa8)),this['on']('change:numberOfChanges',()=>{_0x312373['refresh'](),_0xa06aa9['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x250aa8['enableReadOnlyMode']('revision-viewer'),_0x250aa8['plugins']['has']('WidgetToolbarRepository'))&&_0x250aa8['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x51a60c){return await this['_utils']['loadRevisionData'](_0x51a60c,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x51a60c);}async['getRevisionRootsAttributes'](_0x3ed747){return await this['_utils']['loadRevisionData'](_0x3ed747,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3ed747);}async['compare'](_0x2f7338,_0x1b45f6,_0x1e91bf=!0x1){if(!this['isEnabled'])return;const _0x5e6711=this['diff'],_0x4bc0b6=this['repository'],_0x44ffe7='string'==typeof _0x2f7338?_0x4bc0b6['getRevision'](_0x2f7338):_0x2f7338,_0x1cd042='string'==typeof _0x1b45f6?_0x4bc0b6['getRevision'](_0x1b45f6):_0x1b45f6,_0x2230d7=_0x44ffe7['id'],_0x3aab70=_0x1cd042?_0x1cd042['id']:null;if(!_0x1e91bf&&this['diff']&&this['diff']['newRevisionId']===_0x2230d7&&this['diff']['oldRevisionId']===_0x3aab70)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x2230d7,_0x3aab70);const _0x4dcf11=this['_getRevisionsRange'](_0x44ffe7,_0x1cd042,!0x0)['map'](_0x5abbd5=>this['_utils']['loadRevisionData'](_0x5abbd5,this['adapter']));return _0x4dcf11['push'](new Promise(_0x3d2bd5=>{setTimeout(_0x3d2bd5,0x14);})),Promise['all'](_0x4dcf11)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0xf4e98f=this['_getDiff'](_0x2230d7,_0x3aab70);for(const _0x161379 of _0xf4e98f['changes'])this['_changeIdToChange']['set'](_0x161379['id'],_0x161379);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2558ec=>{for(const _0xc5dff2 of this['editor']['model']['document']['getRootNames']())_0x2558ec['detachRoot'](_0xc5dff2);for(const _0x3afec7 of Object['keys'](_0xf4e98f['model'])){const _0x290a90=_0x2558ec['addRoot'](_0x3afec7);for(const _0x542bc0 of Object['keys'](_0xf4e98f['attributes'][_0x3afec7]))_0x2558ec['setAttribute'](_0x542bc0,_0xf4e98f['attributes'][_0x3afec7][_0x542bc0],_0x290a90);_0x2558ec['insert'](_0xf4e98f['model'][_0x3afec7],_0x290a90,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0xf4e98f['changes'])),this['isReady']=!0x0;})['catch'](_0x33cfa7=>{console['error'](_0x33cfa7),this['_cleanUp'](),_0x5e6711&&(this['diff']=_0x5e6711),this['isReady']=!0x0;});}['addRevisionData'](_0x211de7,_0x36ab56){const _0x1716d5=this['repository']['createRevision'](_0x211de7);return _0x1716d5['on']('_update',(_0x3f3384,_0x1012d4,_0x410554)=>_0x36ab56(_0x1012d4,_0x410554,_0x1716d5)),this['repository']['addRevision'](_0x1716d5),_0x1716d5;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x54265b=>{for(const _0x7faa63 of this['editor']['model']['document']['getRootNames']())_0x54265b['detachRoot'](_0x7faa63);});}['_sortAndFilterDiffChanges'](_0x207dee){const _0x3602ef=[],_0x3a05e8=new Map();for(const _0x2c76a2 of this['editor']['model']['document']['getRootNames']()){const _0x5dd246=this['editor']['editing']['view']['getDomRoot'](_0x2c76a2);if(!_0x5dd246)continue;const _0x4f2a7e=_0x5dd246['getClientRects']()['item'](0x0);_0x4f2a7e&&(_0x3602ef['push'](_0x2c76a2),_0x3a05e8['set'](_0x2c76a2,_0x4f2a7e));}return _0x3602ef['sort']((_0x3e60c5,_0xebedc4)=>{const _0x2b888b=_0x3a05e8['get'](_0x3e60c5),_0x4a84d6=_0x3a05e8['get'](_0xebedc4);return _0x2b888b['y']-_0x4a84d6['y']||_0x2b888b['x']-_0x4a84d6['x'];}),(_0x207dee=_0x207dee['filter'](_0x5dfb47=>_0x3602ef['includes'](_0x5dfb47['rootName'])))['sort']((_0x361fec,_0x8fe7c3)=>_0x3602ef['indexOf'](_0x361fec['rootName'])-_0x3602ef['indexOf'](_0x8fe7c3['rootName'])),_0x207dee;}['_makeTape'](_0x18219f){const _0x54e061=Array['from'](_0x18219f['markers'])['filter'](([_0x1652a8,_0x304044])=>_0x1652a8['startsWith']('revision:')&&!_0x304044['isCollapsed']),_0x393aa6=Array['from'](this['editor']['model']['createRangeIn'](_0x18219f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x54e061['length'])for(const _0x256191 of _0x393aa6){const [_0x2bce11,_0x5532e1]=_0x54e061[0x0],[,_0x3f77a4,_0x15f070]=_0x2bce11['split'](':');if(_0x5532e1['end']['isEqual'](_0x256191['nextPosition'])&&_0x54e061['shift'](),(_0x256191['previousPosition']['isEqual'](_0x5532e1['start'])||_0x256191['previousPosition']['isAfter'](_0x5532e1['start']))&&('insertion'==_0x3f77a4?_0x256191['isAdded']={'userId':_0x15f070}:'deletion'==_0x3f77a4&&(_0x256191['isRemoved']={'userId':_0x15f070})),0x0==_0x54e061['length'])break;}return _0x393aa6;}['_refreshStartEndIndex'](_0x344fca){const _0x5f5613=new Map();for(let _0x43b085=0x0;_0x43b085<_0x344fca['length'];_0x43b085++)'text'===_0x344fca[_0x43b085]['type']?(_0x344fca[_0x43b085]['item']['startIndex']=_0x43b085,_0x344fca[_0x43b085]['item']['endIndex']=_0x43b085):('elementStart'===_0x344fca[_0x43b085]['type']?_0x344fca[_0x43b085]['item']['startIndex']=_0x43b085:'elementEnd'===_0x344fca[_0x43b085]['type']&&(_0x344fca[_0x43b085]['item']['endIndex']=_0x43b085),_0x5f5613['set'](_0x344fca[_0x43b085]['id'],_0x43b085));for(const _0x43c880 of _0x5f5613['values']())'elementStart'===_0x344fca[_0x43c880]['type']?_0x344fca[_0x43c880]['item']['endIndex']=_0x5f5613['get'](_0x344fca[_0x43c880]['pairId']):'elementEnd'===_0x344fca[_0x43c880]['type']&&(_0x344fca[_0x43c880]['item']['startIndex']=_0x5f5613['get'](_0x344fca[_0x43c880]['pairId']));}['_processTape'](_0x2c3bab){for(let _0x2ed631=0x0;_0x2ed631<_0x2c3bab['length'];_0x2ed631++){if('elementStart'===_0x2c3bab[_0x2ed631]['type'])_0x2c3bab[_0x2ed631]['item']['startIndex']=_0x2ed631;else{if('elementEnd'===_0x2c3bab[_0x2ed631]['type']){_0x2c3bab[_0x2ed631]['item']['endIndex']=_0x2ed631;const _0xf930da=_0x2c3bab[_0x2ed631]['item']['startIndex'];_0x2c3bab[_0xf930da]['pairId']=_0x2c3bab[_0x2ed631]['id'],_0x2c3bab[_0x2ed631]['pairId']=_0x2c3bab[_0xf930da]['id'];}else _0x2c3bab[_0x2ed631]['item']['startIndex']=_0x2ed631,_0x2c3bab[_0x2ed631]['item']['endIndex']=_0x2ed631,_0x2c3bab[_0x2ed631]['pairId']=null;}_0x2c3bab[_0x2ed631]['markersStart']||(_0x2c3bab[_0x2ed631]['markersStart']=[],_0x2c3bab[_0x2ed631]['markersEnd']=[]);}}['_markInsertions'](_0x2089b6,_0x57d638){const _0x1e3411=_0x2089b6['filter'](_0x395a79=>!_0x395a79['isAdded']);for(let _0x1d658a=0x0;_0x1d658a<_0x57d638['length'];_0x1d658a++)_0x57d638[_0x1d658a]['isAdded']&&(_0x1e3411[_0x1d658a]['isAdded']=_0x57d638[_0x1d658a]['isAdded']);}['_getDiff'](_0x28409e,_0x17370c=null){const _0x159ca1=this['repository']['getRevision'](_0x28409e),_0x51ed0e=_0x17370c?this['repository']['getRevision'](_0x17370c):null,_0x583323=this['_getRevisionsRange'](_0x159ca1,_0x51ed0e),_0xd6bab5=_0x583323[_0x583323['length']-0x1],_0x1ea79e=new Map(),_0x5a6e2b={'model':{},'attributes':{},'changes':[]},_0x3a83c=new Set(),_0x47cc98=new Map();for(let _0x18abe5=_0x583323['length']-0x1;_0x18abe5>=0x0;_0x18abe5--){const _0x151fa3=_0x583323[_0x18abe5];for(const _0x2e6386 of Object['keys'](_0x151fa3['diffData']))if(_0x151fa3['diffData'][_0x2e6386]['attachChange']){const _0x729d59=_0x151fa3['diffData'][_0x2e6386]['attachChange'];_0x729d59['isAttached']?(_0x3a83c['add'](_0x2e6386),_0x47cc98['has'](_0x2e6386)&&_0x47cc98['get'](_0x2e6386)['userId']==_0x729d59['userId']?_0x47cc98['delete'](_0x2e6386):_0x47cc98['set'](_0x2e6386,_0x729d59)):_0x47cc98['has'](_0x2e6386)?(_0x3a83c['delete'](_0x2e6386),_0x47cc98['delete'](_0x2e6386)):(_0x3a83c['add'](_0x2e6386),_0x47cc98['set'](_0x2e6386,_0x729d59));}else _0x3a83c['add'](_0x2e6386);}for(const _0xd5ac06 of _0x3a83c){const _0x35c4ca=_0x47cc98['has'](_0xd5ac06)&&!_0x47cc98['get'](_0xd5ac06)['isAttached'];let _0x3dab18=_0x35c4ca?_0x583323['length']-0x1:0x0;const _0x32fd23=_0x35c4ca?-0x1:0x1;for(;_0x583323[_0x3dab18];){const _0xe48612=_0x583323[_0x3dab18];if(_0xe48612['diffData'][_0xd5ac06]){const _0x566839=_0x35c4ca?_0xe48612['diffData'][_0xd5ac06]['attributesBefore']:_0xe48612['diffData'][_0xd5ac06]['attributesAfter'];_0x5a6e2b['attributes'][_0xd5ac06]=_0x566839?_0x22538e(_0x566839):{};break;}_0x3dab18+=_0x32fd23;}}for(const _0x126390 of _0x583323){_0x126390['model']={};for(const _0x1a2d5c of _0x126390['authors'])_0x1ea79e['set'](_0x1a2d5c['id'],_0x1a2d5c);for(const _0x4f10b8 of _0x3a83c){const _0x19c9f0=_0x126390['diffData'][_0x4f10b8]?_0x126390['diffData'][_0x4f10b8]['insertions']:'[]',_0x8fa4fe=_0x126390['diffData'][_0x4f10b8]?_0x126390['diffData'][_0x4f10b8]['deletions']:'[]';_0x126390['model'][_0x4f10b8]={'insertions':this['_utils']['_makeModelFromViewString'](_0x19c9f0),'deletions':this['_utils']['_makeModelFromViewString'](_0x8fa4fe)};}}for(const _0x5d32b4 of _0x3a83c){let _0x507d7d=null,_0x139f39=0x0;const _0x2786e7=new Map(Array['from'](_0x159ca1['model'][_0x5d32b4]['insertions']['markers'])['filter'](([_0x24d42b])=>!_0x24d42b['startsWith']('revision:')));let _0x1e8cf8=0x0;for(const _0x1d3f1b of _0x583323){const _0x500446=this['_makeTape'](_0x1d3f1b['model'][_0x5d32b4]['insertions']);_0x1d3f1b==_0x159ca1?(_0x507d7d=_0x500446,_0x139f39=_0x507d7d['length'],_0x507d7d['forEach'](_0x26d12f=>{_0x26d12f['id']=_0x1e8cf8++;}),this['_processTape'](_0x507d7d)):this['_markInsertions'](_0x507d7d,_0x500446);const _0x295bcd=_0x507d7d['filter'](_0x3a8328=>!_0x3a8328['isAdded'])['map'](_0x4a9575=>_0x4a9575['id']);let _0x122893=0x0;const _0x5087b2=this['_makeTape'](_0x1d3f1b['model'][_0x5d32b4]['deletions']);_0x5087b2['forEach'](_0x5ed140=>{_0x5ed140['isRemoved']?_0x5ed140['id']=_0x139f39++:_0x5ed140['id']=_0x295bcd[_0x122893++];}),this['_processTape'](_0x5087b2),this['_setDistance'](_0x507d7d,'isAdded'),this['_setDistance'](_0x5087b2,'isRemoved'),_0x1d3f1b==_0x159ca1&&this['_markMarkers'](_0x507d7d,_0x2786e7),_0x507d7d=this['_joinTapes'](_0x507d7d,_0x5087b2),this['_refreshStartEndIndex'](_0x507d7d),this['_setDistance'](_0x507d7d,'isRemoved');}_0x507d7d=_0x507d7d['filter'](_0x40c735=>!(_0x40c735['isAdded']&&_0x40c735['isRemoved']));const _0x221f87=new Map(_0xd6bab5['model'][_0x5d32b4]['deletions']['markers']),_0x281d7b=new Set(_0x2786e7['keys']());for(const _0x245b15 of _0x221f87['keys']())_0x281d7b['delete'](_0x245b15);this['_markSuggestions'](_0x507d7d,_0x281d7b),this['_fixObsoleteTags'](_0x507d7d),_0x507d7d=this['_removeMissingPairs'](_0x507d7d),_0x507d7d=this['_markMismatchedRemovedTags'](_0x507d7d),_0x507d7d=this['_removeUnsupportedChanges'](_0x507d7d);const {root:_0x3a248c,changes:_0x325fc4}=this['_makeModelFromTape'](_0x507d7d,_0x1ea79e,_0x5d32b4);_0x5a6e2b['model'][_0x5d32b4]=_0x3a248c;const _0x3678e7=_0x47cc98['get'](_0x5d32b4);if(_0x3678e7){const _0x53c07f=_0x1ea79e['get'](_0x3678e7['userId']),_0x2aab26=new r({'author':_0x53c07f,'type':_0x3678e7['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5d32b4});_0x325fc4['unshift'](_0x2aab26),_0x5a6e2b['attributes'][_0x5d32b4]['revisionHistoryAttachChange']=_0x2aab26['id'];}_0x5a6e2b['changes']=_0x5a6e2b['changes']['concat'](_0x325fc4);}return _0x5a6e2b;}['_markMarkers'](_0x491319,_0x58cc64){for(let _0x14a533=0x0;_0x14a533<_0x491319['length'];_0x14a533++)for(const [_0x17ba91,_0x32e09f]of _0x58cc64)!_0x32e09f['isCollapsed']&&_0x32e09f['start']['isEqual'](_0x491319[_0x14a533]['previousPosition'])&&_0x491319[_0x14a533]['markersStart']['push'](_0x17ba91),_0x32e09f['end']['isEqual'](_0x491319[_0x14a533]['nextPosition'])&&_0x491319[_0x14a533]['markersEnd']['push'](_0x17ba91);}['_joinTapes'](_0x33331d,_0x161ba8){let _0x3401fa=[],_0x3ec779=0x0,_0xd76f2e=0x0;for(;_0x3ec779<_0x33331d['length']||_0xd76f2e<_0x161ba8['length'];){const _0x8e7ed5=_0x33331d[_0x3ec779]||{},_0x105ad9=_0x161ba8[_0xd76f2e]||{};if(_0x8e7ed5['id']==_0x105ad9['id'])_0x3ec779++,_0xd76f2e++,_0x3401fa['push'](_0x8e7ed5);else{if(_0x105ad9['isRemoved']&&_0x8e7ed5['isAdded']){const {commonTape:_0x3c7f0d,iEnd:_0x39e794,jEnd:_0xb7c445}=this['_threeWayMerge'](_0x33331d,_0x3ec779,_0x161ba8,_0xd76f2e);_0x3401fa=_0x3401fa['concat'](_0x3c7f0d),_0x3ec779=_0x39e794,_0xd76f2e=_0xb7c445;}else _0x105ad9['isRemoved']?(_0xd76f2e++,_0x3401fa['push'](_0x105ad9)):(_0x3ec779++,_0x3401fa['push'](_0x8e7ed5));}}return _0x3401fa;}['_markSuggestions'](_0x3a9a61,_0x44c28b){const _0x20ddad=[];for(let _0x2fa96b=0x0;_0x2fa96b<_0x3a9a61['length'];_0x2fa96b++){for(let _0x2bf789=0x0;_0x2bf789<_0x3a9a61[_0x2fa96b]['markersStart']['length'];_0x2bf789++){const _0x28d068=_0x3a9a61[_0x2fa96b]['markersStart'][_0x2bf789];if(!_0x44c28b['has'](_0x28d068))continue;const {group:_0x350fb1,type:_0x2d573f,authorId:_0x5c7edf}=_0x311f1f(_0x28d068);'revision-suggestion'!=_0x350fb1||'insertion'!=_0x2d573f&&'deletion'!=_0x2d573f||(_0x20ddad['unshift']({'type':_0x2d573f,'name':_0x28d068,'userId':_0x5c7edf}),_0x3a9a61[_0x2fa96b]['markersStart']['splice'](_0x2bf789,0x1),_0x2bf789--);}_0x47a0f3(_0x3a9a61[_0x2fa96b]);for(let _0x288875=0x0;_0x288875<_0x3a9a61[_0x2fa96b]['markersEnd']['length'];_0x288875++){const _0x45d1d8=_0x3a9a61[_0x2fa96b]['markersEnd'][_0x288875];if(!_0x44c28b['has'](_0x45d1d8))continue;const {group:_0x1db810,type:_0x9b599}=_0x311f1f(_0x45d1d8);if('revision-suggestion'!=_0x1db810||'insertion'!=_0x9b599&&'deletion'!=_0x9b599)continue;_0x3a9a61[_0x2fa96b]['markersEnd']['splice'](_0x288875,0x1),_0x288875--;const _0x59cd71=_0x20ddad['findIndex'](_0x3b9c37=>_0x3b9c37['name']==_0x45d1d8);_0x59cd71>-0x1&&_0x20ddad['splice'](_0x59cd71,0x1);}}function _0x311f1f(_0x92cfd7){const _0x35628e=_0x92cfd7['split'](':');return{'group':_0x35628e[0x0],'type':_0x35628e[0x1],'subType':_0x35628e['length']>=0x5?_0x35628e[0x2]:null,'id':_0x35628e['length']<0x5?_0x35628e[0x2]:_0x35628e[0x3],'authorId':_0x35628e['length']<0x5?_0x35628e[0x3]:_0x35628e[0x4],'markerCount':0x6==_0x35628e['length']?_0x35628e[0x5]:null};}function _0x47a0f3(_0x5918ba){for(let _0x13a6fe=0x0;_0x13a6fe<_0x20ddad['length'];_0x13a6fe++){if(_0x5918ba['isAdded']&&'insertion'==_0x20ddad[_0x13a6fe]['type'])return _0x5918ba['isAddSuggestion']=_0x20ddad[_0x13a6fe],void delete _0x5918ba['isAdded'];if(!_0x5918ba['isAdded']&&!_0x5918ba['isRemoved']&&'deletion'==_0x20ddad[_0x13a6fe]['type'])return void(_0x5918ba['isRemoveSuggestion']=_0x20ddad[_0x13a6fe]);}}}['_setDistance'](_0xe0ce5e,_0x3ae84c){let _0x5f10fa=0x0,_0x2c93cc=!0x1;const _0x179a23=new Map();for(const _0x195ddc of _0xe0ce5e)_0x195ddc[_0x3ae84c]?_0x2c93cc&&(_0x5f10fa++,_0x2c93cc=!0x1):(_0x5f10fa++,_0x2c93cc=!0x0),_0x179a23['set'](_0x195ddc['id'],_0x5f10fa);for(let _0x12d21b=0x0;_0x12d21b<_0xe0ce5e['length'];_0x12d21b++){if('isRemoved'==_0x3ae84c&&_0xe0ce5e[_0x12d21b]['isAdded']||'isAdded'==_0x3ae84c&&_0xe0ce5e[_0x12d21b]['isRemoved'])continue;if('text'==_0xe0ce5e[_0x12d21b]['type']){_0xe0ce5e[_0x12d21b]['distance']=0x0;continue;}const _0x1f2118=_0x179a23['get'](_0xe0ce5e[_0x12d21b]['pairId']),_0xd4a56=_0x179a23['get'](_0xe0ce5e[_0x12d21b]['id']);_0xe0ce5e[_0x12d21b]['distance']=_0x1f2118-_0xd4a56;}}['_getRevisionsRange'](_0x351a06,_0x25a3cc,_0x2ab6dd=!0x1){const _0x4d501b=[];let _0x12949d=this['repository']['getIndex'](_0x351a06),_0x23f803=this['repository']['getIndex'](_0x25a3cc);for(-0x1==_0x23f803&&(_0x23f803=this['repository']['_revisions']['length'],_0x2ab6dd=!0x1);_0x12949d<_0x23f803;)_0x4d501b['push'](this['repository']['getRevision'](_0x12949d)),_0x12949d++;return _0x2ab6dd&&_0x4d501b['push'](this['repository']['getRevision'](_0x12949d)),_0x4d501b;}['_threeWayMerge'](_0x78aa14,_0x50125c,_0x5d56c8,_0x312955){const _0x5684be=this['editor']['model']['schema'];let _0x292752=_0x50125c;for(;_0x78aa14[_0x292752]&&_0x78aa14[_0x292752]['isAdded'];)_0x292752++;let _0x10bb09=_0x312955;for(;_0x5d56c8[_0x10bb09]&&_0x5d56c8[_0x10bb09]['isRemoved'];)_0x10bb09++;_0x5b10f4(_0x78aa14,_0x50125c,_0x292752),_0x5b10f4(_0x5d56c8,_0x312955,_0x10bb09);const _0x2dfe87=_0x5d56c8['slice'](_0x312955,_0x10bb09)['concat'](_0x78aa14['slice'](_0x50125c,_0x292752));return _0x2dfe87['sort']((_0x47ae67,_0x2b016c)=>_0x47ae67['side']!=_0x2b016c['side']?_0x47ae67['side']-_0x2b016c['side']:_0x47ae67['level']!=_0x2b016c['level']?_0x47ae67['level']-_0x2b016c['level']:_0x47ae67['distance']!=_0x2b016c['distance']?_0x2b016c['distance']-_0x47ae67['distance']:!!_0x47ae67['isAdded']!=!!_0x2b016c['isAdded']?-0x1==_0x47ae67['side']||0x0==_0x47ae67['side']?_0x47ae67['isAdded']?-0x1:0x1:_0x47ae67['isAdded']?0x1:-0x1:_0x47ae67['index']-_0x2b016c['index']),{'commonTape':_0x2dfe87,'iEnd':_0x292752,'jEnd':_0x10bb09};function _0x5b10f4(_0x2985eb,_0x45d0f8,_0x5e7502){let _0x564dfb=-0x1,_0x3bb33a=Number['POSITIVE_INFINITY'],_0x44abaf=!0x0;for(let _0x4063c0=_0x45d0f8;_0x4063c0<_0x5e7502;_0x4063c0++)if(_0x5684be['isInline'](_0x2985eb[_0x4063c0]['item'])||(_0x44abaf=!0x1),_0x2985eb[_0x4063c0]['item']['startIndex']<_0x45d0f8&&(_0x564dfb=_0x4063c0),_0x2985eb[_0x4063c0]['item']['endIndex']>=_0x5e7502){_0x3bb33a=_0x4063c0;break;}_0x44abaf&&(_0x564dfb=_0x5e7502-0x1);for(let _0x55e054=_0x45d0f8;_0x55e054<_0x5e7502;_0x55e054++)_0x2985eb[_0x55e054]['side']=_0x55e054<=_0x564dfb?-0x1:_0x55e054<_0x3bb33a?0x0:0x1,_0x2985eb[_0x55e054]['index']=_0x55e054;let _0x5d5235=0x0;for(let _0x3939e3=_0x45d0f8;_0x3939e3<=_0x564dfb;_0x3939e3++)0x0==_0x2985eb[_0x3939e3]['distance']?_0x2985eb[_0x3939e3]['level']=_0x5d5235:(_0x5d5235++,_0x2985eb[_0x3939e3]['level']=_0x5d5235,_0x5d5235++);for(let _0x233b0b=_0x45d0f8;_0x233b0b<_0x5e7502;_0x233b0b++)0x0==_0x2985eb[_0x233b0b]['side']&&(_0x2985eb[_0x233b0b]['level']=_0x5d5235);_0x5d5235=0x0;for(let _0x4bc0e1=_0x5e7502-0x1;_0x4bc0e1>=_0x3bb33a;_0x4bc0e1--)0x0==_0x2985eb[_0x4bc0e1]['distance']?_0x2985eb[_0x4bc0e1]['level']=_0x5d5235:(_0x5d5235--,_0x2985eb[_0x4bc0e1]['level']=_0x5d5235,_0x5d5235--);}}['_fixObsoleteTags'](_0x40e2ce){const _0x33c285=new Map(),_0x58489d=this['editor']['model']['schema'];for(let _0x5e2e5a=0x1;_0x5e2e5a<_0x40e2ce['length'];_0x5e2e5a++){let _0x19343d,_0x2b835c,_0x211878;const _0x2bab38=_0x40e2ce[_0x5e2e5a],_0x375e06=_0x40e2ce[_0x5e2e5a-0x1];if('text'==_0x2bab38['type'])continue;if(_0x2bab38['type']!=_0x375e06['type'])continue;if(!_0x58489d['isBlock'](_0x375e06['item'])||_0x58489d['isLimit'](_0x375e06['item']))continue;if(!_0x58489d['isBlock'](_0x2bab38['item'])||_0x58489d['isLimit'](_0x2bab38['item']))continue;if((_0x40e2ce[_0x5e2e5a]['isAdded']||_0x40e2ce[_0x5e2e5a]['isAddSuggestion'])&&_0x40e2ce[_0x5e2e5a-0x1]['isRemoved'])_0x19343d=_0x40e2ce[_0x5e2e5a],_0x2b835c=_0x40e2ce[_0x5e2e5a-0x1],_0x211878=_0x5e2e5a-0x1;else{if(!_0x40e2ce[_0x5e2e5a]['isRemoved']||!_0x40e2ce[_0x5e2e5a-0x1]['isAdded']&&!_0x40e2ce[_0x5e2e5a-0x1]['isAddSuggestion'])continue;_0x19343d=_0x40e2ce[_0x5e2e5a-0x1],_0x2b835c=_0x40e2ce[_0x5e2e5a],_0x211878=_0x5e2e5a;}const _0x4a047e=_0x19343d['level']==_0x2b835c['level'],_0x2ef5a8=Math['abs'](_0x19343d['level'])<Math['abs'](_0x2b835c['level'])&&0x0==_0x2b835c['distance'];(_0x4a047e||_0x2ef5a8)&&(_0x33c285['set'](_0x2b835c['id'],_0x19343d['id']),_0x40e2ce['splice'](_0x211878,0x1),_0x5e2e5a--,_0x19343d['isAdded']=!0x1);}for(let _0x278932=0x0;_0x278932<_0x40e2ce['length'];_0x278932++)_0x33c285['has'](_0x40e2ce[_0x278932]['pairId'])&&(_0x40e2ce[_0x278932]['pairId']=_0x33c285['get'](_0x40e2ce[_0x278932]['pairId']));}['_removeMissingPairs'](_0x34b227){const _0x1f721a=new Set(_0x34b227['map'](_0x20673c=>_0x20673c['id']));for(let _0xb9fe1f=0x0;_0xb9fe1f<_0x34b227['length'];_0xb9fe1f++)_0x1f721a['has'](_0x34b227[_0xb9fe1f]['pairId'])||0x0==_0x34b227[_0xb9fe1f]['distance']||(_0x34b227[_0xb9fe1f]['isIncorrect']=!0x0);return _0x34b227['filter'](_0x52e5fa=>!_0x52e5fa['isIncorrect']);}['_markMismatchedRemovedTags'](_0xd1e08c){const _0x3a4482=new Set();for(let _0x25e994=0x0;_0x25e994<_0xd1e08c['length'];_0x25e994++){if(_0x3a4482['has'](_0xd1e08c[_0x25e994]['id'])&&_0xd1e08c[_0x25e994]['isRemoved']&&(_0xd1e08c[_0x25e994]['isIncorrect']=!0x0),_0xd1e08c[_0x25e994]['isIncorrect'])continue;if(0x0==_0xd1e08c[_0x25e994]['distance'])continue;if('elementStart'!=_0xd1e08c[_0x25e994]['type'])continue;if(null==_0xd1e08c[_0x25e994]['pairId'])continue;let _0x3b40b6=_0x25e994+0x1,_0x3e692d=0x0;for(;_0xd1e08c[_0x3b40b6]['id']!=_0xd1e08c[_0x25e994]['pairId'];)'elementStart'==_0xd1e08c[_0x3b40b6]['type']?_0x3e692d++:'elementEnd'==_0xd1e08c[_0x3b40b6]['type']&&_0x3e692d--,_0x3b40b6++;if(0x0!=_0x3e692d){if(_0xd1e08c[_0x25e994]['isRemoved'])_0xd1e08c[_0x25e994]['isIncorrect']=!0x0;else{for(;_0x3b40b6!=_0x25e994;)_0xd1e08c[_0x3b40b6]['isRemoved']&&0x0!=_0xd1e08c[_0x3b40b6]['distance']&&(_0xd1e08c[_0x3b40b6]['isIncorrect']=!0x0,_0x3a4482['add'](_0xd1e08c[_0x3b40b6]['pairId'])),_0x3b40b6--;}}}return _0xd1e08c['filter'](_0x48d7d1=>!_0x48d7d1['isIncorrect']);}['_removeUnsupportedChanges'](_0x498cff){const _0x3c6b02=this['editor']['model']['schema'];for(let _0x220b1f=0x0;_0x220b1f<_0x498cff['length'];_0x220b1f++){if(!(_0x498cff[_0x220b1f]['isAdded']||_0x498cff[_0x220b1f]['isAddSuggestion']||_0x498cff[_0x220b1f]['isRemoved']||_0x498cff[_0x220b1f]['isRemoveSuggestion']))continue;if(0x0==_0x498cff[_0x220b1f]['distance'])continue;const _0x269e35=_0x498cff[_0x220b1f]['item'];_0x3c6b02['isBlock'](_0x269e35)||_0x3c6b02['isLimit'](_0x269e35)||(_0x498cff[_0x220b1f]['isAdded']&&delete _0x498cff[_0x220b1f]['isAdded'],_0x498cff[_0x220b1f]['isAddSuggestion']&&delete _0x498cff[_0x220b1f]['isAddSuggestion'],_0x498cff[_0x220b1f]['isRemoveSuggestion']&&delete _0x498cff[_0x220b1f]['isRemoveSuggestion'],_0x498cff[_0x220b1f]['isRemoved']&&(_0x498cff[_0x220b1f]['isIncorrect']=!0x0));}return _0x498cff['filter'](_0x2ef893=>!_0x2ef893['isIncorrect']);}['_makeModelFromTape'](_0x179a69,_0x43ee73,_0x130652){const _0x5638fe=new vt(),_0x41d356=[],_0x302aa4=new Map(),_0x3bf048=this['editor']['model'],_0x2abcd4=_0x3bf048['schema'],_0x4f0f47=[_0x5638fe],_0x47933c={},_0x560d74={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x16eba8=null;const _0x35ea36=[0x0];for(let _0x37050f=0x0;_0x37050f<_0x179a69['length'];_0x37050f++)if('elementStart'===_0x179a69[_0x37050f]['type']){_0x179a69[_0x37050f]['previousPosition']=_0x3bf048['createPositionFromPath'](_0x5638fe,_0x35ea36);const _0x20030b=new ut(_0x179a69[_0x37050f]['item']['name'],_0x179a69[_0x37050f]['item']['getAttributes']());_0x4f0f47[0x0]['_appendChild'](_0x20030b),_0x35ea36['push'](0x0),_0x4f0f47['unshift'](_0x20030b),_0x179a69[_0x37050f]['nextPosition']=_0x3bf048['createPositionFromPath'](_0x5638fe,_0x35ea36);}else'elementEnd'===_0x179a69[_0x37050f]['type']?(_0x4f0f47['shift'](),_0x179a69[_0x37050f]['previousPosition']=_0x3bf048['createPositionFromPath'](_0x5638fe,_0x35ea36),_0x35ea36['pop'](),_0x35ea36[_0x35ea36['length']-0x1]++,_0x179a69[_0x37050f]['nextPosition']=_0x3bf048['createPositionFromPath'](_0x5638fe,_0x35ea36)):(_0x179a69[_0x37050f]['previousPosition']=_0x3bf048['createPositionFromPath'](_0x5638fe,_0x35ea36),_0x16eba8?_0x16eba8['_data']+=_0x179a69[_0x37050f]['item']['data']:_0x16eba8=new gt(_0x179a69[_0x37050f]['item']['data'],_0x179a69[_0x37050f]['item']['getAttributes']()),_0x179a69[_0x37050f+0x1]&&'text'===_0x179a69[_0x37050f+0x1]['type']&&_0x3352ef(_0x16eba8,_0x179a69[_0x37050f+0x1]['item'])||(_0x4f0f47[0x0]['_appendChild'](_0x16eba8),_0x16eba8=null),_0x35ea36[_0x35ea36['length']-0x1]+=_0x179a69[_0x37050f]['item']['offsetSize'],_0x179a69[_0x37050f]['nextPosition']=_0x3bf048['createPositionFromPath'](_0x5638fe,_0x35ea36));for(let _0x50037e=0x0;_0x50037e<_0x179a69['length'];_0x50037e++){const _0x473f82=_0x179a69[_0x50037e]['previousPosition'],_0x1f43d2=_0x179a69[_0x50037e]['nextPosition'];for(const _0x258776 of _0x179a69[_0x50037e]['markersStart'])_0x302aa4['set'](_0x258776,{'start':_0x473f82,'end':null});_0x3dfb41('isRemoveSuggestion',_0x50037e,_0x473f82,_0x1f43d2),_0x3dfb41('isAddSuggestion',_0x50037e,_0x473f82,_0x1f43d2),_0x3dfb41('isRemoved',_0x50037e,_0x473f82,_0x1f43d2),_0x3dfb41('isAdded',_0x50037e,_0x473f82,_0x1f43d2);for(const _0x5f206a of _0x179a69[_0x50037e]['markersEnd']){const _0x168add=_0x302aa4['get'](_0x5f206a);_0x168add?_0x168add['end']=_0x1f43d2:_0x302aa4['set'](_0x5f206a,{'start':_0x1f43d2,'end':_0x1f43d2});}}for(const [_0x1b5b65,_0x5bb3c7]of _0x302aa4){const _0x306891=this['editor']['model']['createRange'](_0x5bb3c7['start'],_0x5bb3c7['end']);_0x5638fe['markers']['set'](_0x1b5b65,_0x306891);}return _0x41d356['sort']((_0xff1f73,_0x2f6f9e)=>{const _0x375aa3=_0x5638fe['markers']['get']('revision:'+_0xff1f73['id']),_0x59dc2d=_0x5638fe['markers']['get']('revision:'+_0x2f6f9e['id']);return _0x375aa3['start']['isBefore'](_0x59dc2d['start'])?-0x1:_0x375aa3['start']['isAfter'](_0x59dc2d['start'])?0x1:_0x375aa3['end']['isBefore'](_0x59dc2d['end'])?-0x1:_0x375aa3['end']['isAfter'](_0x59dc2d['end'])?0x1:'add'===_0xff1f73['type']?-0x1:0x1;}),{'root':_0x5638fe,'changes':_0x41d356};function _0x3dfb41(_0x21499d,_0x47a497,_0x40e4a3,_0x2d9c78){const _0x2fb520=!!_0x179a69[_0x47a497][_0x21499d],_0x582e95=_0x2fb520?_0x179a69[_0x47a497][_0x21499d]['userId']:null,_0x51fdca=_0x47a497===_0x179a69['length']-0x1,_0x1dbbc3=_0x560d74[_0x21499d][0x0],_0x4dd40c=_0x2abcd4['isObject'](_0x179a69[_0x47a497]['item']);!_0x47933c[_0x21499d]&&_0x2fb520?_0x47933c[_0x21499d]={'start':_0x40e4a3,'tapeItem':_0x179a69[_0x47a497],'userId':_0x582e95,'type':_0x21499d}:_0x47933c[_0x21499d]&&!_0x2fb520?(_0x47933c[_0x21499d]['end']=_0x40e4a3,_0x1263b2(_0x47933c[_0x21499d]),_0x47933c[_0x21499d]=null):_0x47933c[_0x21499d]&&_0x2fb520&&_0x47933c[_0x21499d]['userId']!==_0x582e95&&(_0x47933c[_0x21499d]['end']=_0x40e4a3,_0x1dbbc3&&_0x1dbbc3['userId']===_0x47933c[_0x21499d]['userId']||_0x1263b2(_0x47933c[_0x21499d]),_0x47933c[_0x21499d]={'start':_0x40e4a3,'tapeItem':_0x179a69[_0x47a497],'userId':_0x582e95,'type':_0x21499d}),_0x47933c[_0x21499d]&&_0x4dd40c&&('elementStart'!==_0x179a69[_0x47a497]['type']||_0x1dbbc3&&_0x1dbbc3['userId']===_0x582e95||_0x560d74[_0x21499d]['unshift']({'userId':_0x582e95,'object':_0x179a69[_0x47a497]['item'],'change':_0x47933c[_0x21499d]}),'elementEnd'===_0x179a69[_0x47a497]['type']&&_0x1dbbc3&&_0x1dbbc3['object']===_0x179a69[_0x47a497]['item']&&(_0x560d74[_0x21499d]['shift'](),_0x47933c[_0x21499d]=_0x1dbbc3['change'])),_0x47933c[_0x21499d]&&_0x51fdca&&(_0x47933c[_0x21499d]['end']=_0x2d9c78,_0x1263b2(_0x47933c[_0x21499d]),_0x47933c[_0x21499d]=null);}function _0x1263b2({start:_0x5089f5,end:_0x1f07f3,tapeItem:_0x439f79,userId:_0x1efc22,type:_0x14c12b}){const _0x538e74=_0x439f79['item'],_0x1fef6f=_0x3bf048['schema']['isBlock'](_0x538e74)&&!_0x3bf048['schema']['isLimit'](_0x538e74),_0xd62c98=_0x5089f5['nodeAfter']==_0x1f07f3['parent']&&_0x1f07f3['isAtStart'];if(_0x1fef6f&&_0xd62c98)return;const _0x27c2b9=_0x3bf048['createRange'](_0x5089f5,_0x1f07f3),_0x6aecda=_0x43ee73['get'](_0x1efc22),_0x1d676a=new r({'author':_0x6aecda,'type':'isAdded'==_0x14c12b||'isAddSuggestion'==_0x14c12b?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x14c12b||'isRemoveSuggestion'==_0x14c12b},'createdAt':new Date(),'rootName':_0x130652});_0x41d356['push'](_0x1d676a),_0x5638fe['markers']['set']('revision:'+_0x1d676a['id'],_0x27c2b9);}function _0x3352ef(_0x49d09e,_0x5bdd43){const _0x5bb499=_0x49d09e['getAttributes'](),_0x579609=_0x5bdd43['getAttributes']();for(const _0x594f18 of _0x5bb499){if(_0x594f18[0x1]!==_0x5bdd43['getAttribute'](_0x594f18[0x0]))return!0x1;_0x579609['next']();}return _0x579609['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x70bf53=>{const _0x9e37a3=_0x70bf53['markerName']['split'](':')[0x1],_0x227405=this['_getChangeFromId'](_0x9e37a3);if(!_0x227405)return null;const _0x4f03aa='add'==_0x227405['type']?'insertion':'deletion',_0x488546=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4f03aa];return _0x227405['data']['isSuggestion']&&_0x488546['push']('ck-suggestion-marker-'+_0x4f03aa+'-new'),this['activeChange']==_0x227405&&_0x488546['push']('ck-suggestion-marker--active'),{'classes':_0x488546,'attributes':{'data-change-id':_0x9e37a3}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x3ac72a=>{_0x3ac72a['on']('element:pre',(_0x5df475,_0x401b8e,_0x4f49e5)=>{const _0x332db4=_0x401b8e['viewItem']['getChild'](0x0);if(!_0x332db4||!_0x332db4['is']('element','code'))return;if(!_0x4f49e5['consumable']['consume'](_0x332db4,{'attributes':['vid_start','vid_end']}))return;const _0x39f899=_0x401b8e['modelRange']['start']['nodeAfter'];_0x4f49e5['writer']['setAttribute']('vid_start',_0x332db4['getAttribute']('vid_start'),_0x39f899),_0x4f49e5['writer']['setAttribute']('vid_end',_0x332db4['getAttribute']('vid_end'),_0x39f899);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x11d9bc=>{_0x11d9bc['on']('element',(_0x5b1ef8,_0x2707ac,_0x413579)=>{if(!_0x413579['consumable']['consume'](_0x2707ac['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x2707ac['modelRange']['isCollapsed'])return;const _0x2148c7=_0x2707ac['modelRange']['start']['nodeAfter'];_0x2148c7['hasAttribute']('vid_start')||_0x2148c7['hasAttribute']('vid')||(_0x413579['writer']['setAttribute']('vid_start',_0x2707ac['viewItem']['getAttribute']('vid_start'),_0x2148c7),_0x413579['writer']['setAttribute']('vid_end',_0x2707ac['viewItem']['getAttribute']('vid_end'),_0x2148c7));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x4d1d71=>_0x4d1d71['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x389b89,[,_0x4347bb])=>{['vid_start','vid_end','vid']['includes'](_0x4347bb)&&(_0x389b89['return']=!0x0,_0x389b89['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3e4c98=>{_0x3e4c98['on']('attribute:vid',(_0x17d23d,_0xc7c833,_0xa57451)=>{if('\x20'!=_0xc7c833['item']['data']||_0xc7c833['item']['parent']['maxOffset']>0x1)return;if(!_0xa57451['consumable']['consume'](_0xc7c833['item'],_0x17d23d['name']))return;const _0x20b8d8=_0xa57451['writer'],_0x2ca001=_0xa57451['mapper']['toViewRange'](_0xc7c833['range']);_0x20b8d8['wrap'](_0x2ca001,_0x20b8d8['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x5a18e4){const _0x2a92fa=_0x5a18e4['plugins']['get']('RevisionViewer');return(_0x3ee0b8,_0x444ac6,_0x7b3e13)=>{const _0x293f73=_0x444ac6['markerName']['split'](':')[0x1],_0xf24809=_0x2a92fa['_getChangeFromId'](_0x293f73);if(!_0xf24809)return null;const _0x54ca84='add'==_0xf24809['type']?'split':'merge';if(!_0x7b3e13['consumable']['test'](_0x444ac6['markerRange'],_0x3ee0b8['name']))return;const _0x36bf3b=_0x444ac6['markerRange']['getWalker'](),_0x420642=_0x444ac6['markerRange']['start'],_0x3a8d67=_0x5a18e4['model']['schema'];let _0x27581a=null,_0x138b9d=null,_0x2aab7b=!0x1,_0x2e87de=!0x1;for(const _0x1402cd of _0x36bf3b){const _0xe630d=_0x1402cd['item'];_0x2aab7b=_0x2aab7b||_0x3a8d67['isContent'](_0xe630d);const _0x5ceb1c=_0x7b3e13['mapper']['toViewElement'](_0xe630d);if(_0x5ceb1c&&_0x5ceb1c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1402cd['type']&&(_0x3a8d67['isBlock'](_0xe630d)&&!_0x3a8d67['isLimit'](_0xe630d)&&(_0xe630d['nextSibling']||_0x420642['isAtEnd']?_0x27581a&&_0x27581a['parent']==_0xe630d||(_0x27581a=_0xe630d,_0x35f83a(_0x1402cd['previousPosition']),_0x2e87de=!0x0):_0x138b9d=_0x138b9d||_0x1402cd['previousPosition']));}function _0x35f83a(_0x1704ec){const _0x33b3b8=_0x7b3e13['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x54ca84}),_0x48b3a6=_0x7b3e13['mapper']['toViewPosition'](_0x1704ec);_0xf24809['data']['isSuggestion']&&_0x7b3e13['writer']['addClass']('ck-suggestion-marker-'+_0x54ca84+'-new',_0x33b3b8),_0x2a92fa['activeChange']==_0xf24809&&_0x7b3e13['writer']['addClass']('ck-suggestion-marker--active',_0x33b3b8),_0x7b3e13['writer']['insert'](_0x48b3a6,_0x33b3b8),_0x7b3e13['mapper']['bindElementToMarker'](_0x33b3b8,_0x444ac6['markerName']);}_0x2aab7b||_0x2e87de||!_0x138b9d||_0x35f83a(_0x138b9d);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2ddf1a,_0x319fc8,_0x5142b9)=>{const _0x42d021=_0x5142b9['mapper']['markerNameToElements'](_0x319fc8['markerName']);if(_0x42d021){for(const _0x48f0db of _0x42d021)(_0x48f0db['hasClass']('ck-suggestion-marker-split')||_0x48f0db['hasClass']('ck-suggestion-marker-merge'))&&(_0x5142b9['mapper']['unbindElementFromMarkerName'](_0x48f0db,_0x319fc8['markerName']),_0x5142b9['writer']['remove'](_0x48f0db));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x525b58,_0x542d4d,_0x548f55)=>{const _0x116a4e=_0x542d4d['markerName']['split'](':')[0x1],_0x739c2f=this['_getChangeFromId'](_0x116a4e);if(!_0x739c2f)return null;const _0x422c4e='add'==_0x739c2f['type']?'split':'merge';if(_0x548f55['consumable']['test'](_0x542d4d['markerRange'],_0x525b58['name']))for(const _0x3323cc of _0x542d4d['markerRange']['getItems']()){if(!_0x3323cc['is']('element','softBreak'))continue;const _0x421ddb=_0x548f55['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x422c4e}),_0x1e8cea=_0x548f55['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x3323cc));_0x739c2f['data']['isSuggestion']&&_0x548f55['writer']['addClass']('ck-suggestion-marker-'+_0x422c4e+'-new',_0x421ddb),this['activeChange']==_0x739c2f&&_0x548f55['writer']['addClass']('ck-suggestion-marker--active',_0x421ddb),_0x548f55['writer']['insert'](_0x1e8cea,_0x421ddb),_0x548f55['mapper']['bindElementToMarker'](_0x421ddb,_0x542d4d['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x29a89e=>{for(const _0x28958b of this['editor']['model']['document']['getRootNames']()){const _0x21f6ff=this['editor']['model']['document']['getRoot'](_0x28958b),_0xe76a29=this['editor']['editing']['view']['document']['getRoot'](_0x28958b);if(_0xe76a29){const _0x3bc363=_0x21f6ff['getAttribute']('revisionHistoryAttachChange');if(_0x29a89e['removeAttribute']('data-change-id',_0xe76a29),_0x29a89e['removeClass']('ck-revision-history-root-add',_0xe76a29),_0x29a89e['removeClass']('ck-revision-history-root-remove',_0xe76a29),_0x29a89e['removeClass']('ck-revision-history-root--active',_0xe76a29),_0x3bc363){const _0x15fbd4=this['_getChangeFromId'](_0x3bc363);if(!_0x15fbd4)return null;_0x29a89e['setAttribute']('data-change-id',_0x3bc363,_0xe76a29),_0x29a89e['addClass']('ck-revision-history-root-'+_0x15fbd4['type'],_0xe76a29),this['activeChange']==_0x15fbd4&&_0x29a89e['addClass']('ck-revision-history-root--active',_0xe76a29);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1d0bb7=>'revision-comment:'+_0x1d0bb7,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x239762=>'revision-suggestion:'+_0x239762,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x19c942=>({'name':'suggestion:'+_0x19c942,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x5a2781=>{const _0x2dc479=_0x5a2781['markerName']['split'](':')[0x1];return'insertion'!=_0x2dc479&&'deletion'!=_0x2dc479?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2dc479]};}}),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',(_0x1b0f47,_0x3d4133,_0x3657ae)=>{const _0x4a46c0=_0x3657ae['mapper']['markerNameToElements'](_0x3d4133['markerName']);if(_0x4a46c0){for(const _0x399071 of _0x4a46c0)_0x399071['is']('uiElement')&&(_0x3657ae['mapper']['unbindElementFromMarkerName'](_0x399071,_0x3d4133['markerName']),_0x3657ae['writer']['remove'](_0x399071));}},{'priority':'high'});}['_getChangeFromId'](_0x518c82){return this['_changeIdToChange']['get'](_0x518c82);}['_getViewForChange'](_0x2d50fc){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x2d50fc),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4a51ff,_0xb8ed64,_0x57c236,_0x7ca5b7)=>{_0x7ca5b7&&this['_balloon']['remove'](_0x7ca5b7),_0x57c236&&(this['_balloon']['add']({'view':_0x57c236,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2bdef9=this['editor']['editing'],_0x38bfa8=this['_getChangeFromId'](_0x57c236['changeId']);let _0xd2df79;if(_0x38bfa8['data']['isOnRoot']){const _0x472db6=_0x2bdef9['view']['getDomRoot'](_0x38bfa8['rootName']);_0xd2df79=Array['from'](_0x472db6['getClientRects']());}else{const _0x5875b3=this['editor']['model']['markers']['get']('revision:'+_0x57c236['changeId']);_0xd2df79=Array['from'](_0x2bdef9['mapper']['markerNameToElements'](_0x5875b3['name']))['map'](_0x2c7748=>_0x2bdef9['view']['domConverter']['mapViewToDom'](_0x2c7748))['map'](_0x2f3938=>Array['from'](_0x2f3938['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0xd2df79[0x0];return _0xd2df79['find'](_0x33bfc8=>_0x33bfc8['top']-0x3<=this['_activeViewTarget']['y']&&_0x33bfc8['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x33bfc8['left']-0x3<=this['_activeViewTarget']['x']&&_0x33bfc8['right']+0x3>=this['_activeViewTarget']['x'])||_0xd2df79[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x382eb2,_0x397a53,_0x416395,_0x5e6585)=>{this['activeView']=_0x416395?this['_getViewForChange'](_0x416395):null,this['editor']['model']['change'](()=>{const _0x2ae300=this['editor']['editing'];_0x5e6585&&(_0x5e6585['data']['isOnRoot']?_0x2ae300['view']['change'](_0x52c0be=>{_0x52c0be['removeClass']('ck-revision-history-root--active',_0x2ae300['view']['document']['getRoot'](_0x5e6585['rootName']));}):_0x2ae300['reconvertMarker']('revision:'+_0x5e6585['id'])),_0x416395&&(_0x416395['data']['isOnRoot']?_0x2ae300['view']['change'](_0x5c6578=>{_0x5c6578['addClass']('ck-revision-history-root--active',_0x2ae300['view']['document']['getRoot'](_0x416395['rootName']));}):_0x2ae300['reconvertMarker']('revision:'+_0x416395['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x140303,_0x3ea5b7)=>{if(this['activeChange'])return;const _0x32ecd5=this['_findChangeIdFromDomTarget'](_0x3ea5b7['target']),_0x40fff2=this['_changeIdToChange']['get'](_0x32ecd5);_0x40fff2?(this['_activeViewTarget']={'x':_0x3ea5b7['domEvent']['x'],'y':_0x3ea5b7['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x40fff2)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x57a9b9,_0x3a6296)=>{const _0x20a3cf=this['_findChangeIdFromDomTarget'](_0x3a6296['target']),_0x130ce9=this['_changeIdToChange']['get'](_0x20a3cf);_0x130ce9?(this['_activeViewTarget']={'x':_0x3a6296['domEvent']['x'],'y':_0x3a6296['domEvent']['y']},_0x130ce9===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x130ce9):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x2feb69){do{const _0xebe3c8=_0x2feb69['getAttribute']('data-change-id');if(_0xebe3c8)return _0xebe3c8;_0x2feb69=_0x2feb69['parent'];}while(_0x2feb69);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0xb1d14f=>{for(const _0x4abdd7 of this['editor']['model']['markers'])_0xb1d14f['removeMarker'](_0x4abdd7);});}}function X(_0x408be7,_0x5194b6){return(_0x3567ec,_0x1a2130,_0x4afcf7)=>{if(!_0x4afcf7['consumable']['test'](_0x1a2130['markerRange'],_0x3567ec['name']))return;const _0xaf7d55=_0x1a2130['markerRange']['getWalker'](),_0xfd8bb5=_0x1a2130['markerRange']['start'],_0x5d12ac=_0x408be7['model']['schema'];let _0x360689=null,_0x4783ac=null,_0x197d2e=!0x1,_0x2925f3=!0x1;for(const _0x2bbbd0 of _0xaf7d55){const _0x5990cb=_0x2bbbd0['item'];_0x197d2e=_0x197d2e||_0x5d12ac['isContent'](_0x5990cb);const _0x135253=_0x4afcf7['mapper']['toViewElement'](_0x5990cb);if(_0x135253&&_0x135253['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2bbbd0['type']&&(_0x5d12ac['isBlock'](_0x5990cb)&&!_0x5d12ac['isLimit'](_0x5990cb)&&(_0x5990cb['nextSibling']||_0xfd8bb5['isAtEnd']?_0x360689&&_0x360689['parent']==_0x5990cb||(_0x360689=_0x5990cb,_0x3e30a7(_0x2bbbd0['previousPosition']),_0x2925f3=!0x0):_0x4783ac=_0x4783ac||_0x2bbbd0['previousPosition']));}function _0x3e30a7(_0x100b40){const _0x2b14e0=_0x4afcf7['mapper']['toViewPosition'](_0x100b40),_0x8eb3ad=_0x4afcf7['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5194b6});_0x4afcf7['writer']['insert'](_0x2b14e0,_0x8eb3ad),_0x4afcf7['mapper']['bindElementToMarker'](_0x8eb3ad,_0x1a2130['markerName']);}_0x197d2e||_0x2925f3||!_0x4783ac||_0x3e30a7(_0x4783ac);};}class mt extends _0x19df04{constructor(_0x4b15dd){super(_0x4b15dd);const _0x4b6608=_0x4b15dd['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x4b6608,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4b6608,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3e4c48=this['editor'],_0x526cd8=_0x3e4c48['plugins']['get'](m),_0x453978=_0x526cd8['isReady']?_0x526cd8['diff']['newRevisionId']:null;_0x3e4c48['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x453978);}['refresh'](){const {isReady:_0x42d5fb,isEnabled:_0x55821c,repository:_0x435639,diff:_0x3a8405}=this['editor']['plugins']['get'](m),_0x4ed2dd=_0x3a8405&&_0x435639['getLaterVisibleRevision'](_0x3a8405['newRevisionId']);this['isEnabled']=_0x42d5fb&&_0x55821c&&Boolean(_0x4ed2dd);}}class wt extends _0x19df04{['_step'];constructor(_0x33eedf,{direction:_0x127bd6}){super(_0x33eedf);const _0x6af34a=_0x33eedf['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x127bd6?0x1:-0x1,this['listenTo'](_0x6af34a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x6af34a,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x6af34a,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x5904dd=this['editor'],_0x131a55=_0x5904dd['plugins']['get'](m),{isNavigationMode:_0x1b4428,currentChangeNumber:_0x26e389}=_0x131a55;let _0x5becc3;if(_0x131a55['activeChange']=_0x1b4428?_0x131a55['diff']['changes']['get'](_0x26e389+this['_step']):_0x131a55['diff']['changes']['first'],_0x131a55['activeChange']['data']['isOnRoot'])_0x5becc3=_0x5904dd['editing']['view']['getDomRoot'](_0x131a55['activeChange']['rootName']);else{const _0x1d671e=_0x5904dd['model']['markers']['get']('revision:'+_0x131a55['activeChange']['id']);_0x5becc3=_0x312542(_0x5904dd['editing'],_0x1d671e);}_0x4cc5d8({'target':_0x5becc3,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x47cf12,currentChangeNumber:_0x534bb4,numberOfChanges:_0x2e8b25,isReady:_0x4e57f0,isEnabled:_0x188dfb}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x188dfb&&_0x4e57f0&&_0x2e8b25)&&(!_0x47cf12||(0x1===this['_step']?_0x534bb4<_0x2e8b25-0x1:_0x534bb4>0x0));}}class _i extends ts{constructor(_0x56fd7a){super(_0x56fd7a);const _0x4397af=this['bindTemplate'],_0x58fe78=new te(_0x56fd7a),_0x5201ee=new te(_0x56fd7a);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',(_0x546e18,_0x23645d)=>_0x546e18&&_0x23645d>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4d8305,_0x4209ae,_0x592084,_0x35e831)=>{if(!_0x4d8305)return g(_0x56fd7a,'Loading...');if(!_0x592084)return g(_0x56fd7a,'No\x20changes');const _0x589f88=g(_0x56fd7a,'NUMBER_OF_CHANGES',_0x592084);return _0x35e831?g(_0x56fd7a,'X_OF_Y_CHANGES',[_0x4209ae+0x1,_0x592084]):_0x589f88;}),_0x58fe78['set']({'label':g(_0x56fd7a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1b3728}),_0x5201ee['set']({'label':g(_0x56fd7a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x57f286}),_0x58fe78['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5201ee['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x58fe78['on']('execute',()=>this['fire']('execute','backward')),_0x5201ee['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',_0x4397af['if']('_isStatusLabelVisible','ck-hidden',_0x2882f2=>!_0x2882f2)]},'children':[{'text':_0x4397af['to']('isNavigationMode',_0x46163d=>_0x46163d?g(_0x56fd7a,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x56fd7a,'Total')+':\x20')}]},{'text':_0x4397af['to']('_statusText')}]},new _0x4a501d(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x58fe78,_0x5201ee]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x123d7e{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4fb120=this['editor']['editing']['view'];_0x4fb120['change'](_0x3b736a=>{for(const _0xec48a8 of _0x4fb120['document']['roots'])_0x3b736a['addClass'](le,_0xec48a8);});}['hide'](){const _0x549fdc=this['editor']['editing']['view'];_0x549fdc['change'](_0x38d2d1=>{for(const _0x2b2bc3 of _0x549fdc['document']['roots'])_0x38d2d1['removeClass'](le,_0x2b2bc3);});}}class R extends _0x123d7e{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,ge];}['init'](){const _0x4a36c=this['editor'],_0x3d7a0d=_0x4a36c['plugins']['get'](m),_0x433b3b=_0x4a36c['plugins']['get'](ge);_0x4a36c['ui']['componentFactory']['add']('exitToEditing',_0x29f1b3=>{const _0x511ec4=new te(_0x29f1b3);return _0x511ec4['set']({'label':g(_0x29f1b3,'Back\x20to\x20editing'),'icon':_0x3cc288,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x511ec4,'execute',()=>{_0x4a36c['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x511ec4;}),_0x4a36c['ui']['componentFactory']['add']('restoreRevision',_0x108fc0=>{const _0x672597=new te(_0x108fc0);return _0x672597['set']({'label':g(_0x108fc0,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x672597['bind']('isEnabled')['to'](_0x4a36c['commands']['get']('restoreRevision')),this['listenTo'](_0x672597,'execute',()=>_0x4a36c['execute']('restoreRevision')),_0x672597;}),_0x4a36c['ui']['componentFactory']['add']('changesNavigation',_0x40d2ee=>{const _0x17a248=new _i(_0x40d2ee),_0xec3e95=_0x4a36c['commands']['get']('showPreviousChange'),_0x4b9d2a=_0x4a36c['commands']['get']('showNextChange');return _0x17a248['bind']('isBackwardNavigationEnabled')['to'](_0xec3e95,'isEnabled'),_0x17a248['bind']('isForwardNavigationEnabled')['to'](_0x4b9d2a,'isEnabled'),_0x17a248['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3d7a0d),this['listenTo'](_0x17a248,'execute',(_0x4b76ac,_0x17d545)=>{_0x4a36c['execute']('forward'===_0x17d545?'showNextChange':'showPreviousChange');}),_0x17a248;}),_0x433b3b['show'](),_0x3d7a0d['on']('change:isReady',(_0x341d82,_0x589d1b,_0x457d29)=>{_0x457d29?_0x433b3b['hide']():_0x433b3b['show']();});}}class at extends _0xb76ef9{['_resizeObserver']=null;constructor(_0x582ee5,_0x393d0d){super(_0x582ee5,_0x393d0d);const _0x5ede6b=this['bindTemplate'];this['set']({'label':g(_0x582ee5,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x582ee5,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5ede6b['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new nt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x1e4308=this['fieldView']['element'];this['_tooltipString']=_0x1e4308['scrollWidth']>_0x1e4308['clientWidth']&&_0x1e4308['value']||'';}}class si extends ts{constructor(_0x174079,_0x116bfa,_0x31822b){super(_0x174079);const _0x1531b1=new _0x89e6d0();_0x1531b1['set']({'content':_0x33af0d,'viewBox':'0\x200\x2011\x2010'});const _0x4626a0=['ck','ck-revision-history-sidebar__revision-author'];_0x31822b&&_0x4626a0['push']('ck-revision-history-sidebar__revision-author_creator');const _0x401fd3=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x174079,_0x31822b?'Revision\x20creator':'Revision\x20author')},'children':[_0x1531b1,_0x116bfa['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4626a0},'children':_0x401fd3});}}function oi(_0x326e22,_0xca3085){const _0x25769b=_0x326e22['bindTemplate'],_0x2c9094=_0x326e22['locale'],_0x3ac1ff=_0x46c8d6(_0x2c9094);_0x3ac1ff['panelPosition']='sw';const _0x441809=function(_0x12a068,_0x616f44){const _0xe0400a=function(_0x22910f,_0x11c03c){const _0x550949=_0x22910f['locale'],_0x2f51fe={'Compare\x20against\x20selected':g(_0x550949,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x550949,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x550949,'Restore\x20this\x20revision')};return _0x11c03c['map'](_0xee4215=>{const _0x9ef0b9=_0x2f51fe[_0xee4215['name']];return _0x9ef0b9&&_0x9ef0b9!==_0xee4215['name']&&(_0xee4215['name']=_0x9ef0b9),_0xee4215;});}(_0x12a068,_0x616f44),_0x1e94c5=new _0x44fedb();for(const _0x1ea980 of _0xe0400a){const _0x2948d7={'type':'button','model':new to({'label':_0x1ea980['name'],'class':_0x1ea980['class'],'withText':!0x0,'role':'menuitem','_action':_0x1ea980['action']})};_0x2948d7['model']['bind']('isEnabled')['to'](_0x12a068,'isActionsDropdownOpen',_0x36effc=>'function'!=typeof _0x1ea980['isEnabled']||(!_0x36effc||_0x1ea980['isEnabled'](_0x12a068))),_0x1e94c5['add'](_0x2948d7);}return _0x1e94c5;}(_0x326e22,_0xca3085);return _0x326e22['bind']('isActionsDropdownOpen')['to'](_0x3ac1ff,'isOpen'),_0x3ac1ff['buttonView']['set']({'label':g(_0x2c9094,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0xd1d7da}),_0x3ac1ff['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x25769b['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x25769b['to'](_0xd816a6=>_0xd816a6['stopPropagation']())}}),_0x3ac1ff['on']('execute',_0x2906d1=>{_0x326e22['isReady']&&'function'==typeof _0x2906d1['source']['_action']&&_0x2906d1['source']['_action'](_0x326e22);}),_0x3c14c2(_0x3ac1ff,_0x441809,{'role':'menu'}),_0x3ac1ff['listenTo'](_0x326e22,'change:isActionsDropdownOpen',(_0x136bc3,_0x3046d2,_0x490278)=>{if(_0x490278)for(const _0x149df1 of _0x3ac1ff['listView']['items']){const _0xc49a2a=_0x149df1['children']['first'],_0x444266=_0xca3085['find'](_0x2d8cf3=>_0x2d8cf3['action']===_0xc49a2a['_action'])['isVisible'];_0x149df1['isVisible']=void 0x0===_0x444266||_0x444266(_0x326e22);}}),_0x3ac1ff;}class hi extends/* #__PURE__ -- @preserve */
|
|
26
|
-
ti(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(
|
|
23
|
+
import{ObservableMixin as _0x2158f4,uid as _0x1636c5,Collection as _0x5a41bf,logWarning as _0x5dabb2,FocusTracker as _0x5cd71e,KeystrokeHandler as _0xd25a25,scrollViewportToShowTarget as _0x27b7ac,ResizeObserver as nt,ElementReplacer as ot,CKEditorError as _0x10c13b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x1420b2,set as _0x254fc5,unset as _0x33b26e,isEqual as _0x25e12}from'es-toolkit/compat';import{Plugin as _0x15b8d5,PendingActions as _0x3e2953,Command as _0x521b2e,ElementApiMixin as _0x35fb1a,Editor as _0x3836ac}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x6c5adc,getMarkerDomElement as _0x1891bd,ConfirmMixin as ti,sanitizeEditorConfig as _0x339560}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x36aeb9,ViewAttributeElement as _0xd219c9,ViewEmptyElement as _0x31545f,ViewRawElement as _0x543058,ViewUIElement as _0x526fb1,ViewDocumentFragment as _0x1480f4,ViewText as _0x3c932f,ViewElement as _0x447dd3,Element as ut,Range as lt,Position as ft,DocumentFragment as vt,Text as gt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x588fdb,IconChevronUp as _0x12f6d1,IconChevronDown as _0x48747f,IconUndo as _0x1610eb,IconUser as _0x40ab77,IconThreeVerticalDots as _0x2df2a8}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as ts,injectCssTransitionDisabler as _0x306a94,submitHandler as _0x1fdb69,LabeledFieldView as _0xdb2a4e,createLabeledInputText as _0x4ed94f,createDropdown as _0x44a305,ListView as _0x2a4e60,ListItemView as _0x3138f2,ButtonView as te,MenuBarMenuView as _0x2e0d1,MenuBarMenuListView as _0x1afedd,MenuBarMenuListItemView as _0xb046b3,MenuBarMenuListItemButtonView as _0xa818ba,ContextualBalloon as _0x1ac534,ToolbarSeparatorView as _0x17fd43,IconView as _0x1ef3e7,addListToDropdown as _0x2ed9c7,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 _0x1fba7b}from'luxon';class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2158f4(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x43e51b){super(),this['id']=_0x43e51b['id']||_0x1636c5(),this['creator']=_0x43e51b['creator']||null,this['authors']=_0x43e51b['authors']||[],this['diffData']=_0x43e51b['diffData']||null,this['toVersion']=_0x43e51b['toVersion']||0x0,this['fromVersion']=_0x43e51b['fromVersion']||0x0,this['set']('name',_0x43e51b['name']||''),this['set']('createdAt',_0x43e51b['createdAt']||new Date()),this['set']('attributes',_0x43e51b['attributes']||{});}['setName'](_0x15f561){this['_update']({'name':_0x15f561});}['setAttribute'](_0xae86d3,_0x3ed720){const _0x1a5820=_0x1420b2(this['attributes']);_0x254fc5(_0x1a5820,_0xae86d3,_0x3ed720),this['_update']({'attributes':_0x1a5820});}['removeAttribute'](_0x23112a){const _0x26f6ea=_0x1420b2(this['attributes']);_0x33b26e(_0x26f6ea,_0x23112a),this['_update']({'attributes':_0x26f6ea});}['_update'](_0x47d85f,_0x1dcc59=!0x1){let _0x5ba83f=!0x1;const _0x5837e0={'id':this['id']},_0x1e49e0=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4bbec8 of _0x1e49e0){const _0x21eec7=_0x47d85f[_0x4bbec8];void 0x0!==_0x21eec7&&_0x21eec7!==this[_0x4bbec8]&&(this[_0x4bbec8]=_0x21eec7,_0x5837e0[_0x4bbec8]=_0x21eec7,_0x5ba83f=!0x0);}_0x5ba83f&&(_0x5837e0['authors']&&(_0x5837e0['authorsIds']=_0x5837e0['authors']['map'](_0xe65a41=>_0xe65a41['id']),delete _0x5837e0['authors']),this['fire']('_update',_0x5837e0,_0x1dcc59));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x1f4d38=>_0x1f4d38['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x15b8d5{['_revisions'];static get['requires'](){return[_0x6c5adc];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x32ad50){super(_0x32ad50),this['_revisions']=new _0x5a41bf();}['afterInit'](){!async function(_0x528dfb){const _0x25a85a=_0x12cd22([0x67,0x30,0x66,0x6f,0x74,0x43,0x55,0x49,0x4d,0x73,0x6d,0x71,0x6e,0x33,0x4f,0x4e,0x4c,0x57,0x62,0x32,0x6c,0x46,0x72,0x48,0x79,0x78,0x64,0x42,0x37,0x75,0x54,0x36,0x4b,0x69,0x6b,0x39,0x68,0x52,0x63,0x35,0x56,0x65,0x5a,0x34,0x38,0x59,0x7a,0x47,0x61,0x51,0x4a,0x45,0x58,0x53,0x31,0x50,0x70,0x76,0x41,0x44,0x77,0x6a]),_0x583013=0xeb829,_0x1a7e1e=0x338e6384,_0x4d7afb=0x33890534^_0x1a7e1e,_0x3c64a8=window[_0x12cd22([0x44,0x61,0x74,0x65])][_0x12cd22([0x6e,0x6f,0x77])](),_0x3d507d=_0x528dfb[_0x12cd22([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x16e93a=new window[(_0x12cd22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d2519=>{_0x3d507d[_0x12cd22([0x6f,0x6e,0x63,0x65])](_0x12cd22([0x72,0x65,0x61,0x64,0x79]),_0x5d2519);}),_0x541e6f={[_0x12cd22([0x6b,0x74,0x79])]:_0x12cd22([0x45,0x43]),[_0x12cd22([0x75,0x73,0x65])]:_0x12cd22([0x73,0x69,0x67]),[_0x12cd22([0x63,0x72,0x76])]:_0x12cd22([0x50,0x2d,0x32,0x35,0x36]),[_0x12cd22([0x78])]:_0x12cd22([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]),[_0x12cd22([0x79])]:_0x12cd22([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]),[_0x12cd22([0x61,0x6c,0x67])]:_0x12cd22([0x45,0x53,0x32,0x35,0x36])},_0x2b8e6b=_0x3d507d[_0x12cd22([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x12cd22([0x67,0x65,0x74])](_0x12cd22([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x45545b(){let _0xccddf2,_0x2f929f=null,_0x1e2f16=null;try{if(_0x2b8e6b==_0x12cd22([0x47,0x50,0x4c]))return _0x12cd22([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xccddf2=_0x1165dc(),!_0xccddf2)return _0x12cd22([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xccddf2[_0x12cd22([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1e2f16=_0x14b149(_0xccddf2[_0x12cd22([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xccddf2[_0x12cd22([0x6a,0x74,0x69])])),await _0x297347()?_0xa6e788()?_0x3528c4()?_0x12cd22([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x19a727()?(_0xccddf2[_0x12cd22([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12cd22([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2f929f=_0x4c1688(_0x12cd22([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xccddf2[_0x12cd22([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12cd22([0x74,0x72,0x69,0x61,0x6c])&&(_0x2f929f=_0x4c1688(_0x12cd22([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x8b06bf()):_0x12cd22([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x12cd22([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x12cd22([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x36635f){return _0x12cd22([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3528c4(){const _0x2caccf=[_0x12cd22([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x12cd22([0x74,0x72,0x69,0x61,0x6c])][_0x12cd22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xccddf2[_0x12cd22([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3c64a8/0x3e8:0xe10*_0x4d7afb;return _0xccddf2[_0x12cd22([0x65,0x78,0x70])]<_0x2caccf;}function _0xa6e788(){const _0x46dc5c=_0xccddf2[_0x12cd22([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x46dc5c)return!0x1;if(_0x46dc5c[_0x12cd22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12cd22([0x2a])))return!0x0;if(_0x46dc5c[_0x12cd22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12cd22([0x52,0x48])))return!0x0;if(_0x46dc5c[_0x12cd22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12cd22([0x52,0x52,0x48]))){if(_0x42e81a())return!0x0;if(_0x2182db()||_0x522328())return!0x0;}return!0x1;}function _0x19a727(){const _0x3ca170=_0xccddf2[_0x12cd22([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3ca170||0x0==_0x3ca170[_0x12cd22([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x42f4fd}=new URL(window[_0x12cd22([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3ca170[_0x12cd22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42f4fd))return!0x0;const _0x164de2=_0x42f4fd[_0x12cd22([0x73,0x70,0x6c,0x69,0x74])](_0x12cd22([0x2e]));return _0x3ca170[_0x12cd22([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x11247e=>_0x11247e[_0x12cd22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12cd22([0x2a])))[_0x12cd22([0x6d,0x61,0x70])](_0x1bb2b0=>_0x1bb2b0[_0x12cd22([0x73,0x70,0x6c,0x69,0x74])](_0x12cd22([0x2e])))[_0x12cd22([0x73,0x6f,0x6d,0x65])](_0x4c4bea=>_0x164de2[_0x12cd22([0x65,0x76,0x65,0x72,0x79])]((_0x4beaf0,_0x5812c3)=>_0x4c4bea[_0x5812c3]===_0x4beaf0||_0x4c4bea[_0x5812c3]===_0x12cd22([0x2a])));}function _0x8b06bf(){return _0x2f929f&&_0x1e2f16?new window[(_0x12cd22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x303826,_0x3cd262)=>{_0x2f929f[_0x12cd22([0x74,0x68,0x65,0x6e])](_0x303826,_0x3cd262),_0x1e2f16[_0x12cd22([0x74,0x68,0x65,0x6e])](_0x231871=>{_0x231871!=_0x12cd22([0x56,0x61,0x6c,0x69,0x64])&&_0x303826(_0x231871);},_0x3cd262);}):_0x2f929f||_0x1e2f16||_0x12cd22([0x56,0x61,0x6c,0x69,0x64]);}}function _0x14b149(_0x4a4a53,_0x2b9a3c){return new window[(_0x12cd22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3fe749=>{if(_0xa0b718())return _0x3fe749(_0x12cd22([0x56,0x61,0x6c,0x69,0x64]));_0x2add17(),_0x3d507d[_0x12cd22([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x12cd22([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1ae75b=!0x1;const _0x40c1f6=_0x1636c5();function _0x5e376e(_0x6913bd){return!!_0x6913bd&&(typeof _0x6913bd===_0x12cd22([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x6913bd===_0x12cd22([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x6913bd[_0x12cd22([0x74,0x68,0x65,0x6e])]===_0x12cd22([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x6913bd[_0x12cd22([0x63,0x61,0x74,0x63,0x68])]===_0x12cd22([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4ffab9(_0x24c661){_0x145e2b(_0x24c661)[_0x12cd22([0x74,0x68,0x65,0x6e])](_0x5e7c5=>{if(!_0x5e7c5||_0x5e7c5[_0x12cd22([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x12cd22([0x6f,0x6b]))return _0x12cd22([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4fb9ef(_0x200766(_0x40c1f6+_0x2b9a3c))!=_0x5e7c5[_0x12cd22([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x12cd22([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x12cd22([0x56,0x61,0x6c,0x69,0x64]);})[_0x12cd22([0x74,0x68,0x65,0x6e])](_0x458e99=>(_0x463052(),_0x458e99),()=>{const _0x34f0b2=_0x4b4139();return null==_0x34f0b2?(_0x463052(),_0x12cd22([0x56,0x61,0x6c,0x69,0x64])):_0x12cd22(_0x3c64a8-_0x34f0b2>(0x1782e784^_0x1a7e1e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x12cd22([0x74,0x68,0x65,0x6e])](_0x3fe749)[_0x12cd22([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3fe749(_0x12cd22([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5945e6=0x33b88d04^_0x1a7e1e;function _0x463052(){const _0x1b500e=_0x12cd22([0x6c,0x6c,0x63,0x74,0x2d])+_0x4fb9ef(_0x200766(_0x4a4a53)),_0x489e44=_0x307c90(_0x4fb9ef(window[_0x12cd22([0x4d,0x61,0x74,0x68])][_0x12cd22([0x63,0x65,0x69,0x6c])](_0x3c64a8/_0x5945e6)));window[_0x12cd22([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12cd22([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1b500e,_0x489e44);}function _0x4b4139(){const _0x26f8db=_0x12cd22([0x6c,0x6c,0x63,0x74,0x2d])+_0x4fb9ef(_0x200766(_0x4a4a53)),_0x129b31=window[_0x12cd22([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12cd22([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x26f8db);return _0x129b31?window[_0x12cd22([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x307c90(_0x129b31),0x10)*_0x5945e6:null;}function _0x145e2b(_0x49daa9){return new window[(_0x12cd22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x28754b,_0x3c95de)=>{_0x49daa9[_0x12cd22([0x74,0x68,0x65,0x6e])](_0x28754b,_0x3c95de),window[_0x12cd22([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3c95de,0x338fb744^_0x1a7e1e);});}}_0x3d507d[_0x12cd22([0x6f,0x6e])](_0x12cd22([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x403553,_0x4b7e8c)=>{if(_0x4b7e8c[0x0]!=_0x4a4a53)return _0x3fe749(_0x12cd22([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4b7e8c[0x1]={..._0x4b7e8c[0x1],[_0x12cd22([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x40c1f6};},{[_0x12cd22([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12cd22([0x68,0x69,0x67,0x68])}),_0x3d507d[_0x12cd22([0x6f,0x6e])](_0x12cd22([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1d5cc7=>{_0x5e376e(_0x1d5cc7[_0x12cd22([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1ae75b=!0x0,_0x4ffab9(_0x1d5cc7[_0x12cd22([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x12cd22([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12cd22([0x6c,0x6f,0x77])}),_0x16e93a[_0x12cd22([0x74,0x68,0x65,0x6e])](()=>{_0x1ae75b||_0x3fe749(_0x12cd22([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xa0b718(){return _0x3d507d[_0x12cd22([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12cd22([0x76,0x69,0x65,0x77])][_0x12cd22([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x12cd22([0x61,0x75,0x74,0x6f]);}function _0x2add17(){_0x3d507d[_0x12cd22([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12cd22([0x76,0x69,0x65,0x77])][_0x12cd22([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x12cd22([0x61,0x75,0x74,0x6f]);}}function _0x4c1688(_0x1210c6){const _0xcf8e97=[new window[(_0x12cd22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x37bd12=>setTimeout(_0x37bd12,0x33875d48^_0x1a7e1e)),_0x16e93a[_0x12cd22([0x74,0x68,0x65,0x6e])](()=>new window[(_0x12cd22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x258f47=>{const _0x83d95d=0x338e6383^_0x1a7e1e,_0x2a81c7=_0x528dfb[_0x12cd22([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x440b36(){_0x2a81c7[_0x12cd22([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x83d95d&&_0x258f47();}_0x440b36(),_0x2a81c7[_0x12cd22([0x6f,0x6e])](_0x12cd22([0x61,0x64,0x64]),_0x440b36);})),new window[(_0x12cd22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x132d2b=>{function _0x2b50cf(){for(const _0x5e941b in window)if(window[_0x12cd22([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x12cd22([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x5e941b))&&window[_0x5e941b]==_0x583013)return _0x132d2b();_0x3d507d[_0x12cd22([0x73,0x74,0x61,0x74,0x65])]!=_0x12cd22([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x12cd22([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2b50cf,0x338e700c^_0x1a7e1e);}_0x4fdae5(_0x12cd22([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x2b50cf();})];return window[_0x12cd22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x12cd22([0x72,0x61,0x63,0x65])](_0xcf8e97)[_0x12cd22([0x74,0x68,0x65,0x6e])](()=>_0x1210c6);}async function _0x289d22(){if(await _0x16e93a,_0x4fdae5(_0x12cd22([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x39462f=_0x528dfb[_0x12cd22([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x3a0284=_0x528dfb[_0x12cd22([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])](_0x39462f[_0x12cd22([0x69,0x64])]),_0x12b203=_0x5786a4(_0x12cd22([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x12b203[_0x12cd22([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x39462f['id'],_0x3a0284?_0x3a0284['id']:null,!0x0),_0x12b203[_0x12cd22([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x12cd22([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x12b203[_0x12cd22([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x12b203[_0x12cd22([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x357214,void(_0x12b203[_0x12cd22([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x357214);}if(_0x4fdae5(_0x12cd22([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x348b2c=_0x5786a4(_0x12cd22([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x348b2c[_0x12cd22([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x12cd22([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x348b2c[_0x12cd22([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x348b2c[_0x12cd22([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x357214,_0x348b2c[_0x12cd22([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x357214;}_0x3d507d[_0x12cd22([0x6d,0x6f,0x64,0x65,0x6c])][_0x12cd22([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x357214,_0x3d507d[_0x12cd22([0x6d,0x6f,0x64,0x65,0x6c])][_0x12cd22([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x357214,_0x3d507d[_0x12cd22([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x12cd22([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x42e81a(){return _0x4fdae5(_0x12cd22([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5786a4(_0x12cd22([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x12cd22([0x73,0x74,0x61,0x74,0x65])]==_0x12cd22([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2182db(){return _0x4fdae5(_0x12cd22([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 _0x522328(){return _0x4fdae5(_0x12cd22([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4d3a6e(_0x29c7f7){const _0x4c9af8=_0x5ed84d();_0x3d507d[_0x4c9af8]=_0x12cd22([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])+_0x29c7f7,_0x29c7f7[_0x12cd22([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x12cd22([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x5ed84d()]=_0x583013),_0x29c7f7!=_0x12cd22([0x56,0x61,0x6c,0x69,0x64])&&_0x289d22();}function _0x5ed84d(){const _0x355077=window[_0x12cd22([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x12cd22([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x12cd22([0x6e,0x6f,0x77])]())[_0x12cd22([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x12cd22([0x2e]),'');let _0x42ccbb=_0x12cd22([0x67]);for(let _0x52c4ac=0x0;_0x52c4ac<_0x355077[_0x12cd22([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x52c4ac+=0x2){let _0x465664=window[_0x12cd22([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x355077[_0x12cd22([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x52c4ac,_0x52c4ac+0x2));_0x465664>=_0x25a85a[_0x12cd22([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x465664-=_0x25a85a[_0x12cd22([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x42ccbb+=_0x25a85a[_0x465664];}return _0x42ccbb;}function _0x1165dc(){const _0xe0b4c9=_0x2b8e6b[_0x12cd22([0x73,0x70,0x6c,0x69,0x74])](_0x12cd22([0x2e]));if(0x3!=_0xe0b4c9[_0x12cd22([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xd950e1(_0xe0b4c9[0x1]);function _0xd950e1(_0x385541){const _0x5da3dd=_0x146775(_0x385541);return _0x5da3dd&&_0x33d5a9()?_0x5da3dd:null;function _0x33d5a9(){const _0x6bc0c5=_0x5da3dd[_0x12cd22([0x6a,0x74,0x69])],_0x31a425=window[_0x12cd22([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x6bc0c5[_0x12cd22([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x6bc0c5[_0x12cd22([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4d5254={..._0x5da3dd,[_0x12cd22([0x6a,0x74,0x69])]:_0x6bc0c5[_0x12cd22([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x6bc0c5[_0x12cd22([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4d5254[_0x12cd22([0x76,0x63])],_0x200766(_0x4d5254)==_0x31a425;}}}async function _0x297347(){let _0x4e920e=!0x0;try{const _0x1a3ac4=_0x2b8e6b[_0x12cd22([0x73,0x70,0x6c,0x69,0x74])](_0x12cd22([0x2e])),[_0x266965,_0x3b0230,_0x11064a]=_0x1a3ac4;return _0x597619(_0x266965),await _0x15111d(_0x266965,_0x3b0230,_0x11064a),_0x4e920e;}catch(_0x4ea0a8){return!0x1;}function _0x597619(_0x1aa13f){const _0x10df3d=_0x146775(_0x1aa13f);_0x10df3d&&_0x10df3d[_0x12cd22([0x61,0x6c,0x67])]==_0x12cd22([0x45,0x53,0x32,0x35,0x36])||(_0x4e920e=!0x1);}async function _0x15111d(_0x3ba524,_0x5142c9,_0x1a084a){const _0x43230d=window[_0x12cd22([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x12cd22([0x66,0x72,0x6f,0x6d])](_0x411167(_0x1a084a),_0x4c1c18=>_0x4c1c18[_0x12cd22([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1feba3=new window[(_0x12cd22([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x12cd22([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3ba524+_0x12cd22([0x2e])+_0x5142c9),_0x4fec0f=window[_0x12cd22([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x12cd22([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4fec0f)return;const _0x1a5422=await _0x4fec0f[_0x12cd22([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x12cd22([0x6a,0x77,0x6b]),_0x541e6f,{[_0x12cd22([0x6e,0x61,0x6d,0x65])]:_0x12cd22([0x45,0x43,0x44,0x53,0x41]),[_0x12cd22([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x12cd22([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x12cd22([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4fec0f[_0x12cd22([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x12cd22([0x6e,0x61,0x6d,0x65])]:_0x12cd22([0x45,0x43,0x44,0x53,0x41]),[_0x12cd22([0x68,0x61,0x73,0x68])]:{[_0x12cd22([0x6e,0x61,0x6d,0x65])]:_0x12cd22([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1a5422,_0x43230d,_0x1feba3)||(_0x4e920e=!0x1);}}function _0x146775(_0x385630){return _0x385630[_0x12cd22([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x12cd22([0x65,0x79]))?JSON[_0x12cd22([0x70,0x61,0x72,0x73,0x65])](_0x411167(_0x385630)):null;}function _0x411167(_0x468eb4){return window[_0x12cd22([0x61,0x74,0x6f,0x62])](_0x468eb4[_0x12cd22([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x12cd22([0x2b]))[_0x12cd22([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x12cd22([0x2f])));}function _0x200766(_0x28e642){let _0x300c98=0x1505;function _0x1e9ac4(_0x1f9a23){for(let _0x40629b=0x0;_0x40629b<_0x1f9a23[_0x12cd22([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x40629b++){const _0x357636=_0x1f9a23[_0x12cd22([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x40629b);_0x300c98=(_0x300c98<<0x5)+_0x300c98+_0x357636,_0x300c98&=_0x300c98;}}function _0x1e3f42(_0x3a9a1b){Array[_0x12cd22([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3a9a1b)?_0x3a9a1b[_0x12cd22([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1e3f42):_0x3a9a1b&&typeof _0x3a9a1b==_0x12cd22([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x12cd22([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3a9a1b)[_0x12cd22([0x73,0x6f,0x72,0x74])]()[_0x12cd22([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5cbb85,_0x2e7dff])=>{_0x1e9ac4(_0x5cbb85),_0x1e3f42(_0x2e7dff);}):_0x1e9ac4(window[_0x12cd22([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3a9a1b));}return _0x1e3f42(_0x28e642),_0x300c98>>>0x0;}function _0x4fb9ef(_0x10322d){return _0x10322d[_0x12cd22([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x12cd22([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x12cd22([0x30]));}function _0x307c90(_0x51bbe4){return _0x51bbe4[_0x12cd22([0x73,0x70,0x6c,0x69,0x74])]('')[_0x12cd22([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x12cd22([0x6a,0x6f,0x69,0x6e])]('');}function _0x4fdae5(_0x59a0d8){return _0x3d507d[_0x12cd22([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x12cd22([0x68,0x61,0x73])](_0x59a0d8);}function _0x5786a4(_0x32d316){return _0x3d507d[_0x12cd22([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x12cd22([0x67,0x65,0x74])](_0x32d316);}function _0x357214(){}function _0x12cd22(_0x11b638){return _0x11b638['map'](_0x36d8a5=>String['fromCharCode'](_0x36d8a5))['join']('');}_0x4d3a6e(await _0x45545b());}(this);}['createRevision'](_0x59e64f){const _0x102ff3=this['editor']['plugins']['get']('Users');return new h({'id':_0x59e64f['id'],'name':_0x59e64f['name'],'creator':_0x59e64f['creatorId']?_0x102ff3['getUser'](_0x59e64f['creatorId']):null,'diffData':_0x59e64f['diffData']||_0x59e64f['data'],'authors':_0x59e64f['authorsIds']['map'](_0x510a00=>_0x102ff3['getUser'](_0x510a00)),'createdAt':new Date(_0x59e64f['createdAt']),'attributes':_0x59e64f['attributes'],'fromVersion':_0x59e64f['fromVersion'],'toVersion':_0x59e64f['toVersion']});}['addRevision'](_0x34fd6e,_0x44f922=0x0){this['_revisions']['add'](_0x34fd6e,_0x44f922);}['getRevision'](_0x135be3){return this['_revisions']['get'](_0x135be3);}['getRevisions'](_0x4f00d9={'toJSON':!0x1}){const _0x18db28=Array['from'](this['_revisions']);return _0x18db28['reverse'](),_0x4f00d9['toJSON']?_0x18db28['map'](_0x500bdf=>_0x500bdf['toJSON']()):_0x18db28;}['getIndex'](_0x6af368){return this['_revisions']['getIndex'](_0x6af368);}['getEarlierVisibleRevision'](_0x2b60d2){const [,_0x106755]=this['getRevisionsIterator'](_0x2b60d2,{'direction':'earlier'});return _0x106755;}['getLaterVisibleRevision'](_0x32770f){const [,_0x45af9e]=this['getRevisionsIterator'](_0x32770f,{'direction':'later'});return _0x45af9e;}['getRevisionsInDiff'](_0x3c7d25){const _0x40bc87=[];for(const _0x17c51a of this['getRevisionsIterator'](_0x3c7d25['newRevisionId']))if(_0x40bc87['push'](_0x17c51a),_0x17c51a['id']===_0x3c7d25['oldRevisionId'])break;return _0x40bc87;}*['getRevisionsIterator'](_0x3ce412,{direction:_0x5596b5='earlier',filter:_0x1a3287=()=>!0x0}={}){const _0x43d619='earlier'===_0x5596b5?0x1:-0x1;let _0x5141d3=this['_revisions']['get'](_0x3ce412),_0x5bbab3=this['getIndex'](_0x5141d3);for(yield _0x5141d3;_0x5141d3;){if(_0x5bbab3+=_0x43d619,_0x5141d3=this['getRevision'](_0x5bbab3),!_0x5141d3)return;_0x1a3287(_0x5141d3)&&(yield _0x5141d3);}}}class V extends _0x15b8d5{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x36aeb9,'c'],[_0xd219c9,'a'],[_0x31545f,'e'],[_0x543058,'r'],[_0x526fb1,'u']]);['_typeCharToViewClass']=new Map([['c',_0x36aeb9],['a',_0xd219c9],['e',_0x31545f],['r',_0x543058],['u',_0x526fb1]]);async['loadRevisionData'](_0x481f0b,_0x4f5c63){if(_0x481f0b['diffData']||!_0x4f5c63)return;const _0x332051=this['editor']['config']['get']('collaboration.channelId'),_0x181bbe=await _0x4f5c63['getRevision']({'channelId':_0x332051,'revisionId':_0x481f0b['id']});_0x481f0b['diffData']=_0x181bbe['diffData'];}['getRevisionDocumentData'](_0x3168d8){const _0x276a6a={};for(const _0x2e7a42 in _0x3168d8['diffData']){if(_0x3168d8['diffData'][_0x2e7a42]['attachChange']&&!_0x3168d8['diffData'][_0x2e7a42]['attachChange']['isAttached'])continue;const _0x137318=this['_removeRevisionMarkers'](JSON['parse'](_0x3168d8['diffData'][_0x2e7a42]['insertions'])),_0x498285=this['editor']['editing']['view']['document'],_0x4214ff=new _0x1480f4(_0x498285,_0x137318['map'](_0x2c38a6=>this['_getViewFromDiffObj'](_0x2c38a6,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x276a6a[_0x2e7a42]=this['editor']['data']['processor']['toData'](_0x4214ff),this['editor']['data']['processor']['useFillerType']('default');}return _0x276a6a;}['getRevisionRootsAttributes'](_0x53ec71){const _0x51ab99={};for(const _0x41987e in _0x53ec71['diffData'])_0x53ec71['diffData'][_0x41987e]['attachChange']&&!_0x53ec71['diffData'][_0x41987e]['attachChange']['isAttached']||(_0x51ab99[_0x41987e]=_0x53ec71['diffData'][_0x41987e]['attributesAfter']||{});return _0x51ab99;}['_getTypeCharForViewElement'](_0x2556aa){return this['_viewClassToTypeChar']['get'](_0x2556aa['constructor']);}['_getViewFromDiffObj'](_0xb6d8fd,_0x4dd7dd){const _0x265b03=this['editor']['editing']['view']['document'];if('string'==typeof _0xb6d8fd)return new _0x3c932f(_0x265b03,_0xb6d8fd);{let _0x439e70,_0x2f424c;_0x2f424c='u'==_0xb6d8fd['type']||'r'==_0xb6d8fd['type']?[]:_0xb6d8fd['children']['map'](_0x74a6b3=>this['_getViewFromDiffObj'](_0x74a6b3,_0x4dd7dd));const _0x1c2369=this['_typeCharToViewClass']['get'](_0xb6d8fd['type'])||_0x447dd3,_0x1a5de8=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x439e70=new _0x1c2369(_0x265b03,_0xb6d8fd['name'],_0xb6d8fd['attributes'],_0x2f424c),'u'==_0xb6d8fd['type']&&_0xb6d8fd['children'][0x0]){const _0x42bf75=_0xb6d8fd['children'][0x0];if(_0x439e70['render']=function(_0x1ec5a4){const _0x2efedd=_0x1ec5a4['createElement']('div');return _0x2efedd['innerHTML']=_0x42bf75,_0x2efedd['childNodes'][0x0];},_0x4dd7dd){const _0x332e58=new _0x1480f4(_0x265b03);_0x332e58['_appendChild'](_0x439e70);const _0x3842c1=Array['from'](_0x1a5de8['viewChildrenToDom'](_0x332e58,{'bind':!0x1})),_0x2e7fa4=_0x1a5de8['domDocument']['createElement']('div');_0x2e7fa4['append'](..._0x3842c1),_0x439e70=Array['from'](_0x1a5de8['domChildrenToView'](_0x2e7fa4))[0x0];}}else{if('r'==_0xb6d8fd['type']&&_0xb6d8fd['children'][0x0]){const _0x377b70=_0xb6d8fd['children'][0x0];if(_0x439e70['render']=function(_0x4dd004){_0x4dd004['innerHTML']=_0x377b70;},_0x4dd7dd){const _0x4b4af6=new _0x1480f4(_0x265b03);_0x4b4af6['_appendChild'](_0x439e70);const _0x2f62e5=Array['from'](_0x1a5de8['viewChildrenToDom'](_0x4b4af6,{'bind':!0x1})),_0x2c00cf=_0x1a5de8['domDocument']['createElement']('div');_0x2c00cf['append'](..._0x2f62e5);const _0x3030db=Array['from'](_0x1a5de8['domChildrenToView'](_0x2c00cf));_0x3030db['length']>0x1?_0x439e70['_appendChild'](_0x3030db):_0x439e70=_0x3030db[0x0];}}}if(_0xb6d8fd['customProperties']){for(const [_0x9b9ffb,_0x5cf333]of _0xb6d8fd['customProperties'])_0x439e70['_setCustomProperty'](_0x9b9ffb,_0x5cf333);}const _0x23497e=void 0x0===_0xb6d8fd['fillerOffset']?null:_0xb6d8fd['fillerOffset'];return null!==_0x23497e&&(_0x439e70['getFillerOffset']=()=>_0x23497e),_0x439e70;}}['_makeModelFromViewString'](_0x3e8559){const _0x2318da=JSON['parse'](_0x3e8559),_0x39a7dd=this['editor']['editing']['view']['document'],_0x28d9f1=new _0x1480f4(_0x39a7dd,_0x2318da['map'](_0x3bb865=>this['_getViewFromDiffObj'](_0x3bb865,!0x0)));return this['editor']['data']['toModel'](_0x28d9f1);}['_removeRevisionMarkers'](_0x16736f){return(_0x16736f=_0x16736f['filter'](_0x45d1c8=>!_0x45d1c8['name']||'revision-start'!==_0x45d1c8['name']&&'revision-end'!==_0x45d1c8['name']))['forEach'](_0xaca89=>{'string'!=typeof _0xaca89&&(_0xaca89['children']=this['_removeRevisionMarkers'](_0xaca89['children']),_0xaca89['attributes']=_0xaca89['attributes']['filter'](_0x26fdc4=>!_0x26fdc4[0x0]['startsWith']('data-revision-')));}),_0x16736f;}}function g(_0x231af3,_0x383620,_0x483a9a){const t=_0x231af3['t'];switch(_0x383620){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'},_0x483a9a);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x483a9a);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 _0x15b8d5{['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[_0x6c5adc,I,V,_0x3e2953];}constructor(_0x14f147){super(_0x14f147),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 _0x202d3e=_0x1636c5();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x202d3e},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 _0x4fe0b5=this['repository']['getRevision'](0x0),_0x5d9bdd=_0x4fe0b5&&null===_0x4fe0b5['creator']?_0x4fe0b5:null;if(this['_continueCurrentRevision']=!!_0x5d9bdd&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x3d3dd4=this['_source']['getCurrentRevisionId'](),_0x4ce573=this['repository']['getRevision'](_0x3d3dd4);if(_0x4ce573)this['_startingVersion']=_0x4ce573['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x415001=this['_source']['history']['_operations']['find'](_0x1ed67f=>!_0x1ed67f['_isInit']),_0x281d0f=_0x415001?_0x415001['baseVersion']:this['_source']['history']['version'];_0x4fe0b5?(_0x4fe0b5['toVersion']<_0x281d0f&&_0x4fe0b5['_update']({'toVersion':_0x281d0f}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5d9bdd['id'],this['_startingVersion']=_0x5d9bdd['fromVersion']):(this['_startingVersion']=_0x4fe0b5['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x281d0f,this['_continueCurrentRevision']=!0x1);}}else _0x5d9bdd&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5d9bdd['toVersion'],this['editor']['model']['document']['history']['version']),_0x5d9bdd['fromVersion']===_0x5d9bdd['toVersion']?(0x0!==_0x5d9bdd['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5d9bdd['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5d9bdd['id'],this['_startingVersion']=_0x5d9bdd['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',_0x1449cf=>!_0x1449cf),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2ec9c4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2ee081;for(const _0xaba5d1 in _0x2ec9c4){const _0x3a952b=_0xaba5d1,_0x4c0800=_0x2ec9c4[_0x3a952b];if('revisionHistoryLicenseKeyValid'==_0x4c0800||'revisionHistoryLicenseKeyInvalid'==_0x4c0800||'revisionHistoryLicenseKeyExpired'==_0x4c0800||'revisionHistoryLicenseKeyDomainLimit'==_0x4c0800||'revisionHistoryLicenseKeyNotAllowed'==_0x4c0800||'revisionHistoryLicenseKeyEvaluationLimit'==_0x4c0800||'revisionHistoryLicenseKeyTrialLimit'==_0x4c0800||'revisionHistoryLicenseKeyUsageLimit'==_0x4c0800){delete _0x2ec9c4[_0x3a952b],_0x2ee081=_0x4c0800,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2ee081&&_0x2ec9c4['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2ee081&&_0x2ec9c4['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2ee081&&_0x2ec9c4['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2ee081&&_0x2ec9c4['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2ee081&&_0x2ec9c4['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x2ee081&&_0x2ec9c4['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2ee081&&_0x2ec9c4['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x136711=this['repository']['getRevision'](0x0),_0xea49f4=await this['getRevisionDocumentData'](_0x136711),_0x4d639b=await this['getRevisionRootsAttributes'](_0x136711);this['_replaceEditorDataWithRevisionData'](_0xea49f4,_0x4d639b);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0xad48e){this['_source']=_0xad48e;}async['update'](){const _0x347bd1=await this['_source']['getLatestVersion']();if(_0x347bd1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3939c7=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x347bd1});_0x3939c7['authors']=_0x3939c7['authorsIds']['map'](_0x2335ad=>this['editor']['plugins']['get']('Users')['getUser'](_0x2335ad)),this['currentRevision']['_update'](_0x3939c7);}}async['saveRevision'](_0x58e840={},_0x16bfb7=null){const _0x4551a8=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x16bfb7>this['currentRevision']['toVersion']&&(_0x16bfb7=null),null===_0x16bfb7&&(_0x16bfb7=await this['_source']['getLatestVersion']());const _0x41772a=this['_getFromVersion'](_0x16bfb7),_0x2ee0e8=this['buildRevisionData']({'from':_0x41772a,'to':_0x16bfb7});if(this['currentRevision']['toVersion']<_0x16bfb7){const _0x58cbb7=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x16bfb7,'to':_0x16bfb7});_0x58cbb7['authors']=[],_0x58cbb7['authorsIds']=[],_0x58cbb7['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x58cbb7,!0x0),delete _0x58cbb7['authors'],_0x4551a8['push'](_0x58cbb7);}_0x58e840['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x58e840['name']=_0x58e840['name']||null,_0x58e840['id']=_0x58e840['id']||_0x1636c5(),_0x58e840={..._0x58e840,..._0x2ee0e8};const _0x350e8f=this['addRevisionData'](_0x58e840);_0x4551a8['push'](_0x58e840);const _0x29eb93=this['repository']['getIndex'](_0x350e8f);if(0x0!==_0x29eb93){const _0x47d7b1=this['repository']['getRevision'](_0x29eb93-0x1);if(_0x47d7b1['fromVersion']!==_0x16bfb7){const _0x191938=this['_revisionDataBuilder']['getData'](_0x16bfb7,_0x47d7b1['toVersion']),_0x5cef73={'id':_0x47d7b1['id'],'diffData':_0x191938['diffData'],'authorsIds':_0x191938['authorsIds'],'authors':_0x191938['authorsIds']['map'](_0x2de85d=>this['editor']['plugins']['get']('Users')['getUser'](_0x2de85d)),'fromVersion':_0x16bfb7};_0x47d7b1===this['currentRevision']&&(_0x5cef73['createdAt']=new Date(_0x58e840['createdAt']['getTime']()+0xa)),_0x47d7b1['_update'](_0x5cef73,!0x0),delete _0x5cef73['authors'],_0x4551a8['push'](_0x5cef73);}}if(this['adapter']){for(const _0x551dd3 of _0x4551a8)this['_bufferUpdate'](_0x551dd3['id'],_0x551dd3,!0x0);this['sendBufferedUpdates']();}return _0x350e8f;}['addRevisionData'](_0x2a7a34){const _0x4a9925=this['repository']['createRevision'](_0x2a7a34);return this['adapter']&&_0x4a9925['on']('_update',(_0x19934d,_0x38990b,_0x398a9c)=>{_0x398a9c||(this['_bufferUpdate'](_0x38990b['id'],_0x38990b,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4a9925,this['_findInsertionIndex'](_0x4a9925)),_0x4a9925;}async['getRevisionDocumentData'](_0x332471){return await this['_utils']['loadRevisionData'](_0x332471,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x332471);}async['getRevisionRootsAttributes'](_0x2fcdaa){return await this['_utils']['loadRevisionData'](_0x2fcdaa,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2fcdaa);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x44c578=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1a201f=0x0;_0x1a201f<_0x44c578['length'];_0x1a201f++){const _0x41c467=_0x44c578[_0x1a201f];let _0x4ee270=!0x1;for(const _0x2014f3 of Object['keys'](_0x41c467))void 0x0===_0x41c467[_0x2014f3]?delete _0x41c467[_0x2014f3]:'id'!==_0x2014f3&&(_0x4ee270=!0x0);_0x4ee270||(_0x44c578[_0x1a201f]=null);}if(_0x44c578=_0x44c578['filter'](_0x5552ef=>null!==_0x5552ef),!_0x44c578['length'])return;for(let _0x5b6708=0x0;_0x5b6708<_0x44c578['length'];_0x5b6708++){const _0x1772b1=_0x44c578[_0x5b6708];void 0x0!==_0x1772b1['fromVersion']&&void 0x0===_0x1772b1['toVersion']&&(_0x1772b1['toVersion']=this['repository']['getRevision'](_0x1772b1['id'])['toVersion']),void 0x0!==_0x1772b1['toVersion']&&void 0x0===_0x1772b1['fromVersion']&&(_0x1772b1['fromVersion']=this['repository']['getRevision'](_0x1772b1['id'])['fromVersion']);}const _0x398b9e=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x44c578,_0x398b9e)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x177489=>{if(_0x177489){for(const _0x5d5e41 of _0x177489)this['setRevisionData']({'id':_0x5d5e41['id'],'createdAt':_0x5d5e41['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x2c07c3=null,from:_0x1be1c2=null,to:_0x162cce=null}){_0x1be1c2=null!==_0x1be1c2?_0x1be1c2:_0x2c07c3['fromVersion'],_0x162cce=null!==_0x162cce?_0x162cce:_0x2c07c3['toVersion'];const _0x4c9648=this['_revisionDataBuilder']['getData'](_0x1be1c2,_0x162cce),_0x51e147={'diffData':_0x4c9648['diffData'],'authorsIds':_0x4c9648['authorsIds'],'fromVersion':_0x1be1c2,'toVersion':_0x162cce};if(!_0x2c07c3||_0x162cce!==_0x2c07c3['toVersion']){const _0xf4d86b=_0x162cce-0x1,_0x12b654=this['_source']['history']['getOperation'](_0xf4d86b);_0x51e147['createdAt']=_0x12b654&&_0x12b654['createdAt']||new Date();}if(this['_loadedStateData']&&_0x1be1c2===this['_loadedStateData']['fromVersion']){for(const _0x5c158f of this['_loadedStateData']['authors'])_0x51e147['authorsIds']['includes'](_0x5c158f['id'])||_0x51e147['authorsIds']['push'](_0x5c158f['id']);}return _0x51e147;}['_bufferUpdate'](_0x31eee2,_0x55ff98,_0x1ccafd){if(this['_bufferedUpdates']['has'](_0x31eee2)){const _0x2b7518=this['_bufferedUpdates']['get'](_0x31eee2);_0x55ff98=_0x1ccafd?{..._0x2b7518,..._0x55ff98}:{..._0x55ff98,..._0x2b7518};}this['_bufferedUpdates']['set'](_0x31eee2,_0x55ff98);}['setRevisionData'](_0x1da04a){const _0x47aaa6=this['repository']['getRevision'](_0x1da04a['id']);if(_0x1da04a['createdAt']&&(_0x1da04a['createdAt']=new Date(_0x1da04a['createdAt'])),_0x1da04a['authorsIds']){const _0x168c32=this['editor']['plugins']['get']('Users');_0x1da04a['authors']=_0x1da04a['authorsIds']['map'](_0x5e30ac=>_0x168c32['getUser'](_0x5e30ac));}_0x47aaa6['_update'](_0x1da04a,!0x0);}['_createInitialRevision'](_0x496ddd){const _0x82eb6d=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x82eb6d)this['_initialRevisionId']=_0x82eb6d['id'];else{const _0x2db6b1=!this['editor']['model']['document']['roots']['find'](_0x4b4ef9=>this['editor']['model']['hasContent'](_0x4b4ef9)),_0x3db1b9=this['editor']['plugins']['get']('Users')['me']['id'],_0x397142=g(this['editor']['locale'],_0x2db6b1?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x496ddd,'to':_0x496ddd,'id':this['_initialRevisionId'],'name':_0x397142,'creatorId':_0x3db1b9});}}['_createCurrentRevision'](_0x3bdea3){const _0x5e5477=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x5e5477),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x3bdea3,'to':_0x3bdea3,'id':_0x5e5477,'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'](_0x131584,_0x56d0b3){let _0x4e6c7b=this['editor']['config']['get']('initialData'),_0x271b68=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x4e6c7b){_0x4e6c7b={};for(const _0x182b83 of this['editor']['model']['document']['getRootNames']())_0x4e6c7b[_0x182b83]='';}if('string'==typeof _0x4e6c7b&&(_0x4e6c7b={'main':_0x4e6c7b}),void 0x0===_0x271b68){_0x271b68={};for(const _0x1a5770 of this['editor']['model']['document']['getRootNames']())_0x271b68[_0x1a5770]={};}let _0x1bd402=!0x1;const _0x4d6440=Object['keys'](_0x4e6c7b),_0x308543=Object['keys'](_0x131584);for(const _0x268eb1 of _0x4d6440){if(_0x4e6c7b[_0x268eb1]!==_0x131584[_0x268eb1]&&''!==_0x4e6c7b[_0x268eb1]['trim']()){_0x1bd402=!0x0;break;}if(!_0x25e12(_0x271b68[_0x268eb1],_0x56d0b3[_0x268eb1])&&Object['keys'](_0x271b68[_0x268eb1])['length']>0x0){_0x1bd402=!0x0;break;}}_0x1bd402||(_0x1bd402=_0x308543['some'](_0x9e64c2=>!this['editor']['model']['document']['getRoot'](_0x9e64c2))),_0x1bd402&&_0x5dabb2('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4e6c7b,'editorRootsAttributes':_0x271b68,'revisionData':_0x131584,'revisionRootsAttributes':_0x56d0b3}),this['editor']['config']['set']('initialData',_0x131584),this['editor']['config']['set']('rootsAttributes',_0x56d0b3);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x516f25=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x516f25['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x31a6f3){const _0x528790=this['repository']['getRevisions']();_0x528790['reverse']();let _0x2fc5a3=0x0;for(;_0x2fc5a3<_0x528790['length'];){const _0x14bc9f=_0x528790[_0x2fc5a3];if(_0x14bc9f===this['currentRevision']){_0x2fc5a3++;continue;}if(_0x14bc9f['id']===this['_initialRevisionId'])break;const _0x3cb62d=_0x31a6f3['toVersion']-_0x14bc9f['toVersion']||_0x31a6f3['fromVersion']-_0x14bc9f['fromVersion'];if(_0x3cb62d>0x0)break;if(_0x3cb62d<0x0)_0x2fc5a3++;else{if(!_0x31a6f3['creator']&&_0x14bc9f['creator'])break;if(_0x14bc9f['creator']||!_0x31a6f3['creator']){if(_0x31a6f3['createdAt']>_0x14bc9f['createdAt'])break;_0x2fc5a3++;}else _0x2fc5a3++;}}return _0x2fc5a3;}['_getFromVersion'](_0x14765c){const _0x4eee73=this['repository']['getRevisions']();_0x4eee73['reverse'](),_0x4eee73['shift']();const _0x3aef6e=_0x4eee73['find'](_0x2e2ead=>_0x2e2ead['toVersion']<=_0x14765c)['toVersion'];return _0x3aef6e<this['_startingVersion']?this['_startingVersion']:_0x3aef6e;}['_makeRevision']({name:_0x5e3ac7,from:_0xc4fc9c,to:_0x5663f6,creatorId:_0x4fcafb,id:_0x43d9b4}){const _0x278a0b=this['buildRevisionData']({'from':_0xc4fc9c,'to':_0x5663f6});_0x278a0b['name']=_0x5e3ac7,_0x278a0b['creatorId']=_0x4fcafb,_0x278a0b['id']=_0x43d9b4;const _0x47c390=this['addRevisionData'](_0x278a0b);return this['adapter']&&this['_bufferUpdate'](_0x278a0b['id'],_0x278a0b,!0x0),_0x47c390;}['_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(_0x183a1c){this['editor']=_0x183a1c,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'](_0x4ba1e0){this['source']=_0x4ba1e0;const _0x33433f=new Map(),_0x5b231b=new Map(),_0x47c823=this['editor']['model']['document']['roots']['map'](_0x1447d1=>_0x1447d1['rootName']);for(const _0x285e39 of _0x47c823){const _0x14c9f4=this['editor']['model']['document']['getRoot'](_0x285e39),_0x13948f=N(_0x14c9f4);_0x33433f['set'](_0x285e39,_0x13948f),_0x5b231b['set'](_0x285e39,Object['fromEntries'](_0x14c9f4['getAttributes']()));}const _0x2657cf=Array['from'](this['editor']['model']['markers'])['map'](_0x1f8dcc=>[_0x1f8dcc['name'],_0x1f8dcc['getRange']()]),_0x24f3bb=this['source']['version'];this['_saveMetaData'](_0x24f3bb,_0x33433f,_0x2657cf,_0x5b231b),this['_startingRevisionId']=this['_revisionId'];const _0x193ca1=new Map(),_0x253f53=new Map();for(const _0xde964f of _0x47c823){const _0x1bb40a=P(_0xde964f);_0x193ca1['set'](_0xde964f,_0x1bb40a),_0x253f53['set'](_0xde964f,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x193ca1,[],_0x253f53);}['getData'](_0x4ba876,_0x4bc623){if(this['_lastFrom']===_0x4ba876&&this['_lastTo']<=_0x4bc623)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x4bc623,!0x0);else{if(!this['_savedMetaData']['has'](_0x4ba876)){const _0xf25543=this['_getPreviousFrom'](_0x4ba876);this['_calculateMetaData'](_0xf25543,_0x4ba876,!0x1);}this['_calculateMetaData'](_0x4ba876,_0x4bc623,!0x0);}return this['_lastFrom']=_0x4ba876,this['_lastTo']=_0x4bc623,this['_getState']();}['loadState'](_0x5195c2){const _0x4d2617=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5195c2['fromVersion'],this['_lastTo']=_0x5195c2['toVersion'];for(const _0x426417 in _0x5195c2['diffData']){const _0x1851bf=_0x5195c2['diffData'][_0x426417]['attachChange'],_0x55e4fc=_0x1420b2(_0x5195c2['diffData'][_0x426417]['attributesBefore'])||{},_0x3fd678=_0x4d2617['_makeModelFromViewString'](_0x5195c2['diffData'][_0x426417]['deletions']);_0x3fd678['rootName']=_0x426417,_0x3fd678['_isAttached']=!_0x1851bf||!_0x1851bf['isAttached'],_0x3fd678['isAttached']=()=>_0x3fd678['_isAttached'],this['_baseRoots']['set'](_0x426417,_0x3fd678),this['_baseRootsAttributes']['set'](_0x426417,_0x55e4fc),_0x1851bf&&this['_touchedRoots']['set'](_0x426417,_0x1851bf);const _0x3f5b73=this['_makeIdsRoot'](_0x3fd678);this['_baseIdsRoots']['set'](_0x426417,_0x3f5b73);for(const [_0x276359,_0x14dd22]of _0x3fd678['markers']){if(!_0x276359['startsWith']('revision:'))continue;const _0x31e540=_0x276359['split'](':')[0x2];for(const _0x5b26bb of _0x14dd22['getWalker']({'singleCharacters':!0x0})){const _0x305ca7=this['_getVidAttributeName'](_0x5b26bb),_0x496138='elementEnd'==_0x5b26bb['type']?_0x5b26bb['previousPosition']['path']['slice'](0x0,-0x1):_0x5b26bb['previousPosition']['path'],_0x1734a4=_0x3f5b73['getNodeByPath'](_0x496138)['getAttribute'](_0x305ca7);this['_touched']['set'](_0x1734a4,{'userId':_0x31e540});}}}this['_startingRevisionId']=this['_revisionId'];const _0x463dfe=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2288e9=>!this['_touched']['has'](_0x2288e9));let _0x3b8275=0x0;const _0x55a92f=new Map();for(const _0x487c62 in _0x5195c2['diffData']){const _0x2f7e9b=_0x5195c2['diffData'][_0x487c62]['attachChange'],_0x56099c=_0x1420b2(_0x5195c2['diffData'][_0x487c62]['attributesAfter'])||{},_0x3e74ea=_0x4d2617['_makeModelFromViewString'](_0x5195c2['diffData'][_0x487c62]['insertions']);_0x3e74ea['rootName']=_0x487c62,_0x3e74ea['_isAttached']=!_0x2f7e9b||_0x2f7e9b['isAttached'],_0x3e74ea['isAttached']=()=>_0x3e74ea['_isAttached'],this['_diffRoots']['set'](_0x487c62,_0x3e74ea),this['_diffRootsAttributes']['set'](_0x487c62,_0x56099c);const _0xf51557=this['_makeIdsRoot'](_0x3e74ea,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x487c62,_0xf51557),_0x55a92f['set'](_0x487c62,_0x3e74ea['isAttached']()?_0x56099c:{});for(const [_0x225f58,_0x173a14]of _0x3e74ea['markers']){if(!_0x225f58['startsWith']('revision:'))continue;const _0x38eb2a=_0x225f58['split'](':')[0x2];for(const _0x42c9b6 of _0x173a14['getWalker']({'singleCharacters':!0x0})){const _0x4e8f34=this['_getVidAttributeName'](_0x42c9b6),_0x1126b9=this['_revisionId']++,_0x34c9cf='elementEnd'==_0x42c9b6['type']?_0x42c9b6['previousPosition']['path']['slice'](0x0,-0x1):_0x42c9b6['previousPosition']['path'];_0xf51557['getNodeByPath'](_0x34c9cf)['_setAttribute'](_0x4e8f34,_0x1126b9),this['_touched']['set'](_0x1126b9,{'userId':_0x38eb2a});}}for(const _0x5fabc5 of this['editor']['model']['createRangeIn'](_0x3e74ea)['getWalker']({'singleCharacters':!0x0})){const _0x507f02=this['_getVidAttributeName'](_0x5fabc5),_0x48d60e='elementEnd'==_0x5fabc5['type']?_0x5fabc5['previousPosition']['path']['slice'](0x0,-0x1):_0x5fabc5['previousPosition']['path'],_0x44a40a=_0xf51557['getNodeByPath'](_0x48d60e);_0x44a40a['getAttribute'](_0x507f02)>0x0||_0x44a40a['_setAttribute'](_0x507f02,_0x463dfe[_0x3b8275++]);}for(const [_0x5da28f,_0x4d0b91]of _0x3e74ea['markers'])_0x5da28f['startsWith']('revision:')||this['_markers']['set'](_0x5da28f,_0x4d0b91);}const _0x5e3439=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x5e3439),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5e3439,0x1));const _0x2e5984=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x2e5984),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2e5984,0x1));const _0x13df38=Array['from'](this['_diffRoots'])['map'](([_0x57a980,_0x2135d8])=>[_0x57a980,N(_0x2135d8)]);this['_saveMetaData'](this['_lastTo'],_0x13df38,this['_markers'],_0x55a92f);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x3eeec4,_0x5b4d8d,_0x32de84,_0x3f55d8){const _0x450f11=new Map(_0x5b4d8d),_0x4438bd=new Map(_0x1420b2(_0x3f55d8)),_0x55eec2=new Map();for(const [_0x38d26d,_0x58bf12]of _0x32de84)_0x55eec2['set'](_0x38d26d,{'start':_0x58bf12['start']['clone'](),'end':_0x58bf12['end']['clone'](),'rootName':_0x58bf12['root']['rootName']});this['_savedMetaData']['set'](_0x3eeec4,{'roots':_0x450f11,'markers':_0x55eec2,'rootsAttributes':_0x4438bd});}['_removeMetaData'](_0x15118c){this['_savedMetaData']['delete'](_0x15118c);}['_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'](_0x1c62d0,_0x5c38be=null){let _0x8249e5=null;_0x1c62d0['is']('documentFragment')||(_0x8249e5=new ut(_0x1c62d0['name'],{'vid_start':null===_0x5c38be?this['_revisionId']++:_0x5c38be++}));const _0x5aa8a1=[];for(const _0x3b0b6d of _0x1c62d0['getChildren']())if(_0x3b0b6d['is']('element')){_0x5aa8a1['push'](this['_makeIdsRoot'](_0x3b0b6d,_0x5c38be));const _0x15cf97=_0x5aa8a1[_0x5aa8a1['length']-0x1];null!==_0x5c38be&&(_0x5c38be=_0x15cf97['is']('element','$text')?_0x15cf97['getAttribute']('vid')+0x1:_0x15cf97['getAttribute']('vid_end')+0x1);}else{for(let _0x5b3867=0x0;_0x5b3867<_0x3b0b6d['offsetSize'];_0x5b3867++)_0x5aa8a1['push'](new ut('$text',{'vid':null===_0x5c38be?this['_revisionId']++:_0x5c38be++}));}if(_0x1c62d0['is']('documentFragment')){const _0x348ede=P(_0x1c62d0['rootName']);return _0x348ede['_insertChild'](0x0,_0x5aa8a1),_0x348ede;}return _0x8249e5['_setAttribute']('vid_end',null===_0x5c38be?this['_revisionId']++:_0x5c38be++),_0x8249e5['_insertChild'](0x0,_0x5aa8a1),_0x8249e5;}['_calculateMetaData'](_0x53335f,_0xd0c43a,_0x328c25){this['_reset']();const {roots:_0x21817b,markers:_0x36dacb,rootsAttributes:_0x260ca8}=this['_savedMetaData']['get'](_0x53335f);this['_baseRoots']=new Map(_0x21817b),this['_baseRootsAttributes']=new Map(_0x1420b2(_0x260ca8));for(const [_0x1819fb,_0x2cf019]of this['_baseRoots'])if('$graveyard'!==_0x1819fb&&(this['_diffRoots']['set'](_0x1819fb,N(_0x2cf019)),this['_diffRootsAttributes']=new Map(_0x1420b2(_0x260ca8)),_0x328c25)){const _0x3c54d7=this['_revisionId'];this['_idsRoots']['set'](_0x1819fb,this['_makeIdsRoot'](_0x2cf019)),this['_baseIdsRoots']['set'](_0x1819fb,this['_makeIdsRoot'](_0x2cf019,_0x3c54d7));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x328c25&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4f0ba8,_0x16a237]of _0x36dacb){const _0x3e6ee4=this['_baseRoots']['get'](_0x16a237['rootName']),_0x38364e=this['_diffRoots']['get'](_0x16a237['rootName']),_0x334f18=new lt(this['_fixPosition'](_0x16a237['start'],_0x3e6ee4),this['_fixPosition'](_0x16a237['end'],_0x3e6ee4)),_0x21d33a=this['_fixRange'](_0x334f18,_0x38364e);_0x3e6ee4['markers']['set'](_0x4f0ba8,_0x334f18),this['_markers']['set'](_0x4f0ba8,_0x21d33a);}this['_applyOperations'](_0x53335f,_0xd0c43a,_0x328c25);}['_applyOperations'](_0xa78099,_0x514d84,_0x4ea36b){for(const _0x555553 of this['source']['getOperations'](_0xa78099,_0x514d84))this['_handleOperation'](_0x555553,_0x4ea36b);for(const _0x22955f of this['_diffRoots']['values']())_0x22955f['markers']['clear']();for(const [_0x1f7eee,_0x557f95]of this['_markers']){this['_diffRoots']['get'](_0x557f95['root']['rootName'])['markers']['set'](_0x1f7eee,_0x557f95['clone']());}const _0x45f4e1=new Map(),_0x21690f=new Map();for(const [_0x566f8d,_0x257d79]of this['_diffRoots'])_0x45f4e1['set'](_0x566f8d,N(_0x257d79)),_0x21690f['set'](_0x566f8d,this['_diffRootsAttributes']['get'](_0x566f8d));this['_saveMetaData'](_0x514d84,_0x45f4e1,this['_markers'],_0x21690f);}['_getPreviousFrom'](_0xd4f357){const _0x55ec36=Array['from'](this['_savedMetaData']['keys']());_0x55ec36['sort']((_0x51dc9a,_0x2c0d34)=>_0x51dc9a-_0x2c0d34),_0x55ec36['reverse']();for(const _0x316ab9 of _0x55ec36)if(_0x316ab9<_0xd4f357)return _0x316ab9;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4084ff,_0x292374){const _0x1d7d9d=Array['from'](_0x292374['markers'])['map'](([_0x20e551,_0x2672bf])=>[_0x20e551,this['_fixRange'](_0x2672bf,_0x4084ff)]);_0x4084ff['markers']=new Map(_0x1d7d9d);}['_transformMarkers'](_0x4dcd00){for(const _0x460a27 of this['_markers']['values']()){const _0x742d1b=_0x460a27['getTransformedByOperation'](_0x4dcd00),_0x57e206=lt['_createFromRanges'](_0x742d1b);_0x460a27['start']=_0x57e206['start'],_0x460a27['end']=_0x57e206['end'];}}['_handleOperation'](_0x38af70,_0x32eafa){if('addRoot'!=_0x38af70['type']&&'detachRoot'!=_0x38af70['type']){if('insert'==_0x38af70['type']){const _0x2143b5=_0x38af70['position']['root']['rootName'];this['_diffRoots']['has'](_0x2143b5)||(this['_diffRoots']['set'](_0x2143b5,P(_0x2143b5,!0x0)),this['_diffRootsAttributes']['set'](_0x2143b5,{}),_0x32eafa&&this['_idsRoots']['set'](_0x2143b5,P(_0x2143b5,!0x0)));}else{if('addRootAttribute'==_0x38af70['type']||'removeRootAttribute'==_0x38af70['type']||'changeRootAttribute'==_0x38af70['type'])return void this['_handleRootAttributeOperation'](_0x38af70);'marker'==_0x38af70['type']&&this['_handleMarkerOperation'](_0x38af70);}if('marker'!==_0x38af70['type']){const _0x9c445b=this['_cloneOperation'](_0x38af70,this['_diffRoots']);_0x9c445b['_execute'](),this['_transformMarkers'](_0x9c445b);}if(_0x32eafa)switch(_0x38af70['type']){case'insert':this['_handleInsertOperation'](_0x38af70);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x38af70);break;case'merge':this['_handleMergeOperation'](_0x38af70);break;case'split':this['_handleSplitOperation'](_0x38af70);}}else this['_handleRootOperation'](_0x38af70,_0x32eafa);}['_cloneOperation'](_0x3c8485,_0x36c310){const _0x12d202=_0x3c8485['clone']();return _0x12d202['_authorId']=_0x3c8485['_authorId'],this['_fixOperation'](_0x12d202,_0x36c310),_0x12d202;}['_getBaseVids'](_0x57e9ce){return _0x57e9ce['map'](_0x5b405d=>{const _0x19330c=this['_getVidAttributeName'](_0x5b405d);return Number(_0x5b405d['item']['getAttribute'](_0x19330c));});}['_generateTape'](_0x1d736d,_0x1d1a98){if(_0x1d736d['is']('element','$text'))_0x1d1a98['push']({'item':_0x1d736d,'type':'text'});else{_0x1d736d['is']('element')&&_0x1d1a98['push']({'item':_0x1d736d,'type':'elementStart'});for(const _0xb83944 of _0x1d736d['getChildren']())this['_generateTape'](_0xb83944,_0x1d1a98);_0x1d736d['is']('element')&&_0x1d1a98['push']({'item':_0x1d736d,'type':'elementEnd'});}return _0x1d1a98;}['_getState'](){const _0xb7bd72=new Map(this['_touched']),_0x3ce62f=new Map(_0xb7bd72),_0x289897=new Map(),_0x388eb0={'insertions':{},'deletions':{}},_0x2d627e={'insertions':{},'deletions':{}},_0x36061e=new Map(),_0xe387a1=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0xe387a1['delete']('$graveyard');for(const _0xd3d641 of _0xe387a1){const _0x2a7e66=this['_diffRoots']['get'](_0xd3d641)||P(_0xd3d641,!0x1),_0x49ffa1=this['_baseRoots']['get'](_0xd3d641)||P(_0xd3d641,!0x1);_0x2a7e66['isAttached']()||_0x49ffa1['isAttached']()?(_0x388eb0['insertions'][_0xd3d641]=N(_0x2a7e66),_0x388eb0['deletions'][_0xd3d641]=N(_0x49ffa1),this['_copyMarkers'](_0x388eb0['deletions'][_0xd3d641],_0x49ffa1),this['_copyMarkers'](_0x388eb0['insertions'][_0xd3d641],_0x2a7e66),_0x2d627e['insertions'][_0xd3d641]=this['_generateTape'](this['_idsRoots']['get'](_0xd3d641),[]),_0x2d627e['deletions'][_0xd3d641]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xd3d641)||P(_0xd3d641,!0x1),[])):_0xe387a1['delete'](_0xd3d641);}for(const _0x233bf9 of _0xe387a1){const _0x50d2e0=_0x2d627e['insertions'][_0x233bf9];for(const _0x1b6fc0 of _0x50d2e0){const _0x836383=this['_getVidAttributeName'](_0x1b6fc0),_0x52d9e1=_0x1b6fc0['item']['getAttribute'](_0x836383);_0x3ce62f['delete'](_0x52d9e1),_0x52d9e1>=this['_startingRevisionId']&&_0x289897['set'](_0x52d9e1,_0xb7bd72['get'](_0x52d9e1));}}for(const _0x453ea9 of _0xe387a1){const _0x389871=_0x2d627e['insertions'][_0x453ea9],_0xefa1b1=this['_getBaseVids'](_0x2d627e['deletions'][_0x453ea9]);let _0x38d44a=0x0;for(const _0x16bf49 of _0x389871){const _0x10a351=this['_getVidAttributeName'](_0x16bf49),_0x486ea3=_0x16bf49['item']['getAttribute'](_0x10a351);if(!_0x289897['has'](_0x486ea3)&&!_0x36061e['has'](_0x486ea3)){if(_0x3ce62f['has'](_0x486ea3))_0x38d44a++;else{if(_0x486ea3!=_0xefa1b1[_0x38d44a]){const _0x5ebc6d=_0xb7bd72['get'](_0x486ea3)||_0xb7bd72['get'](_0xefa1b1[_0x38d44a]);for(;_0x486ea3!=_0xefa1b1[_0x38d44a];)_0x3ce62f['has'](_0xefa1b1[_0x38d44a])||(_0x36061e['set'](_0xefa1b1[_0x38d44a],_0x5ebc6d),_0xb7bd72['set'](_0xefa1b1[_0x38d44a],_0x5ebc6d)),_0x38d44a++;}_0x38d44a++;}}}}for(const _0x5f9992 of _0xe387a1){const _0x18024d=_0x2d627e['insertions'][_0x5f9992];for(const _0x546889 of _0x18024d){const _0x120c27=this['_getVidAttributeName'](_0x546889),_0x12f607=_0x546889['item']['getAttribute'](_0x120c27);if(_0x36061e['has'](_0x12f607)){const _0x56b688=_0x36061e['get'](_0x12f607);_0x3ce62f['has'](_0x12f607)||_0x3ce62f['set'](_0x12f607,{..._0x56b688}),_0x289897['set'](_0x12f607,{..._0x56b688});}}}for(const _0x4e85b9 of _0x3ce62f['keys']())_0x4e85b9>=this['_startingRevisionId']&&_0x3ce62f['delete'](_0x4e85b9);const _0x36de38=new Map();for(const _0x39d8f2 of _0xe387a1){let _0x109850=_0x2d627e['insertions'][_0x39d8f2];for(const _0x9d6bb6 of _0x109850)if(_0x9d6bb6['item']['is']('element','tableCell')){const _0x5e23be=this['_getVidAttributeName'](_0x9d6bb6),_0x9f1a12=_0x9d6bb6['item']['getAttribute'](_0x5e23be);if(_0x289897['has'](_0x9f1a12)){const _0x32ea89=_0x9d6bb6['item']['parent']['parent']['getAttribute']('vid_start'),_0x2a8495=_0x36de38['get'](_0x32ea89)||new Set();_0x2a8495['add'](_0x289897['get'](_0x9f1a12)['userId']),_0x36de38['set'](_0x32ea89,_0x2a8495);}}_0x109850=_0x2d627e['deletions'][_0x39d8f2];for(const _0x128610 of _0x109850)if(_0x128610['item']['is']('element','tableCell')){const _0x3aad44=this['_getVidAttributeName'](_0x128610),_0x446a7a=_0x128610['item']['getAttribute'](_0x3aad44);if(_0x3ce62f['has'](_0x446a7a)){const _0x294197=_0x128610['item']['parent']['parent']['getAttribute']('vid_start'),_0x4249ba=_0x36de38['get'](_0x294197)||new Set();_0x4249ba['add'](_0x3ce62f['get'](_0x446a7a)['userId']),_0x36de38['set'](_0x294197,_0x4249ba);}}for(const _0x3bb36a of _0x36de38['keys']())(_0x289897['has'](_0x3bb36a)||_0x3ce62f['has'](_0x3bb36a))&&_0x36de38['delete'](_0x3bb36a);}for(const _0x5d37ce of _0xe387a1){const _0x52370f=_0x2d627e['insertions'][_0x5d37ce];let _0x347b76=null,_0x49b853=null;for(const _0x9c2e60 of _0x52370f){const _0x2521e0=this['_getVidAttributeName'](_0x9c2e60),_0x220e75=_0x9c2e60['item']['getAttribute'](_0x2521e0),_0x1d4bcd=_0x36de38['get'](_0x220e75);_0x1d4bcd&&'elementStart'==_0x9c2e60['type']&&(_0x347b76=Array['from'](_0x1d4bcd)[0x0],_0x49b853=_0x9c2e60['item']['getAttribute']('vid_end')),_0x347b76&&(_0x3ce62f['set'](_0x220e75,{'userId':_0x347b76}),_0x289897['set'](_0x220e75,{'userId':_0x347b76})),_0x220e75==_0x49b853&&(_0x347b76=null,_0x49b853=null);}}const _0x179c2b={},_0x46ba4c=new Set();for(const _0x6078d9 of _0xe387a1){const _0x6327e3=_0x388eb0['deletions'][_0x6078d9],_0x1fc5ba=_0x388eb0['insertions'][_0x6078d9];for(const {userId:_0x21db7c}of this['_touchedMarkers']['values']())null!==_0x21db7c&&_0x46ba4c['add'](_0x21db7c);for(const {userId:_0x5e2ad9}of this['_touchedRoots']['values']())null!==_0x5e2ad9&&_0x46ba4c['add'](_0x5e2ad9);this['_markChanges'](_0x1fc5ba,_0x2d627e['insertions'][_0x6078d9],_0x289897,'insertion',_0x46ba4c),this['_markChanges'](_0x6327e3,_0x2d627e['deletions'][_0x6078d9],_0x3ce62f,'deletion',_0x46ba4c),_0x179c2b[_0x6078d9]={'insertions':this['_prepareViewToSave'](_0x1fc5ba),'deletions':this['_prepareViewToSave'](_0x6327e3),'attachChange':this['_touchedRoots']['get'](_0x6078d9)||null,'attributesBefore':_0x1420b2(this['_baseRootsAttributes']['get'](_0x6078d9))||{},'attributesAfter':_0x1420b2(this['_diffRootsAttributes']['get'](_0x6078d9))};}return{'diffData':_0x179c2b,'authorsIds':Array['from'](_0x46ba4c)};}['_processRootBeforeSave'](_0x333827){for(const [,_0x3d2756]of _0x333827['markers']){const _0x30603e=_0x3d2756['start']['getAncestors']()['filter'](_0x28ef72=>'tableCell'==_0x28ef72['name']);for(const _0x210748 of _0x30603e)0x1==_0x210748['childCount']&&_0x210748['getChild'](0x0)['is']('element','paragraph')&&_0x210748['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x11d418){this['_processRootBeforeSave'](_0x11d418);const _0x1edcbd=this['editor']['data']['toView'](_0x11d418,{}),_0x30334c=Array['from'](_0x1edcbd['getChildren']())['map'](_0x3beb75=>this['_getViewJson'](_0x3beb75));return JSON['stringify'](_0x30334c);}['_getViewJson'](_0x373194){if(_0x373194['is']('$text'))return _0x373194['data'];{const _0x2fcc63=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x576d79=_0x373194,_0x566507=this['editor']['data']['htmlProcessor']['domConverter'],_0x16fa2e={'type':_0x2fcc63['_getTypeCharForViewElement'](_0x576d79),'name':_0x576d79['name'],'attributes':Array['from'](_0x576d79['getAttributes']()),'children':Array['from'](_0x576d79['getChildren']())['map'](_0x148641=>this['_getViewJson'](_0x148641))};if(_0x373194['is']('uiElement')&&'$comment'!=_0x373194['name']){const _0x42b697=_0x373194['render'](_0x566507['domDocument'],_0x566507);_0x16fa2e['children']['push'](_0x42b697['outerHTML']);}else{if(_0x373194['is']('rawElement')){const _0xa8ce5b=_0x566507['domDocument']['createElement'](_0x576d79['name']);_0x373194['render'](_0xa8ce5b,_0x566507),_0x16fa2e['children']['push'](_0xa8ce5b['innerHTML']);}}const _0x362bff=Array['from'](_0x576d79['getCustomProperties']());_0x362bff['length']>0x0&&(_0x16fa2e['customProperties']=_0x362bff);const _0x1afb47=_0x576d79['getFillerOffset']();return null!==_0x1afb47&&(_0x16fa2e['fillerOffset']=_0x1afb47),_0x16fa2e;}}['_markChanges'](_0x3618eb,_0x313897,_0x116dc0,_0x30d0eb,_0x58962c){let _0x158f93=null,_0x41d34d=null,_0x45c65c=0x0;const _0x2f85c6=this['editor']['model'];for(let _0x35546e=0x0;_0x35546e<_0x313897['length'];_0x35546e++){const _0x1c9a6d=this['_getVidAttributeName'](_0x313897[_0x35546e]),_0x5da433=_0x313897[_0x35546e]['item']['getAttribute'](_0x1c9a6d),_0x116573=_0x116dc0['get'](_0x5da433),_0x33418b=_0x35546e==_0x313897['length']-0x1;(!_0x158f93&&_0x116573&&(_0x158f93=_0x116573,_0x41d34d=_0x313897[_0x35546e]),_0x158f93&&(!_0x116573||_0x116573['userId']!=_0x158f93['userId']))&&(_0x456d94(_0x116573,F(_0x41d34d,_0x3618eb,_0x2f85c6),F(_0x313897[_0x35546e],_0x3618eb,_0x2f85c6)),_0x158f93=_0x116573||null,_0x41d34d=_0x116573?_0x313897[_0x35546e]:null),_0x158f93&&_0x33418b&&_0x456d94(_0x116573,F(_0x41d34d,_0x3618eb,_0x2f85c6),B(_0x313897[_0x35546e],_0x3618eb,_0x2f85c6));}function _0x456d94(_0x1725f0,_0x3ab813,_0x5475a7){const _0x2307da=_0x158f93['userId'],_0x4c0949='revision:'+_0x30d0eb+':'+_0x2307da+':'+_0x45c65c++,_0x35fdcf=_0x2f85c6['createRange'](_0x3ab813,_0x5475a7);_0x3618eb['markers']['set'](_0x4c0949,_0x35fdcf),null!==_0x2307da&&_0x58962c['add'](_0x2307da);}}['_getVidAttributeName'](_0x1800b3){switch(_0x1800b3['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x584e63,_0x5e241f){_0x584e63['baseVersion']=null;for(const _0x3174be in _0x584e63){const _0x560eb2=_0x584e63[_0x3174be];if(_0x560eb2 instanceof ft){const _0x16bf04=_0x5e241f['get'](_0x560eb2['root']['rootName']);_0x584e63[_0x3174be]=this['_fixPosition'](_0x560eb2,_0x16bf04);}if(_0x560eb2 instanceof lt){const _0x349f58=_0x5e241f['get'](_0x560eb2['root']['rootName']);_0x584e63[_0x3174be]=this['_fixRange'](_0x560eb2,_0x349f58);}'root'===_0x3174be&&(_0x584e63['root']=_0x5e241f['get'](_0x584e63['root']['rootName']));}}['_fixRange'](_0x2213d7,_0x30dcc9){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2213d7['start'],_0x30dcc9),this['_fixPosition'](_0x2213d7['end'],_0x30dcc9));}['_fixPosition'](_0x246ef7,_0x3bdaed){return this['editor']['model']['createPositionFromPath'](_0x3bdaed,_0x246ef7['path'],_0x246ef7['stickiness']);}['_handleInsertOperation'](_0x3e313f){const _0x15a159=this['_idsRoots']['get'](_0x3e313f['position']['root']['rootName']),_0x3d9ae6=this['_fixPosition'](_0x3e313f['position'],_0x15a159),_0x1b76c6=null===_0x3e313f['_authorId']?null:_0x3e313f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x52166e=_0x3d9ae6['parent'],_0x231b13=this['_revisionId'],_0x5b4a1d=[];for(const _0x2a2c55 of _0x3e313f['nodes'])if(_0x2a2c55['is']('element'))_0x5b4a1d['push'](this['_makeIdsRoot'](_0x2a2c55));else{for(let _0x284fd2=0x0;_0x284fd2<_0x2a2c55['offsetSize'];_0x284fd2++)_0x5b4a1d['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x4b0909=this['_revisionId'];for(let _0x22fce6=_0x231b13;_0x22fce6<_0x4b0909;_0x22fce6++)this['_touched']['set'](_0x22fce6,{'userId':_0x1b76c6});_0x52166e['_insertChild'](_0x3d9ae6['offset'],_0x5b4a1d);}['_handleMoveOperation'](_0x327de2){(_0x327de2=this['_cloneOperation'](_0x327de2,this['_idsRoots']))['_execute']();const _0x245243=null===_0x327de2['_authorId']?null:_0x327de2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4b9a5c=_0x327de2['getMovedRangeStart'](),_0x4fa057=_0x4b9a5c['parent'],_0x4c7cac=_0x4b9a5c['offset'];!function _0x32d1d8(_0x4315a2,_0xc6202,_0x26f98a,_0x5a50d4){for(let _0x5d6ff2=_0x26f98a;_0x5d6ff2<_0x5a50d4;_0x5d6ff2++){const _0x3daea5=_0xc6202['getChild'](_0x5d6ff2);_0x3daea5['is']('element','$text')?_0x4315a2['set'](_0x3daea5['getAttribute']('vid'),{'userId':_0x245243}):(_0x4315a2['set'](_0x3daea5['getAttribute']('vid_start'),{'userId':_0x245243}),_0x32d1d8(_0x4315a2,_0x3daea5,0x0,_0x3daea5['childCount']),_0x4315a2['set'](_0x3daea5['getAttribute']('vid_end'),{'userId':_0x245243}));}}(this['_touched'],_0x4fa057,_0x4c7cac,_0x4c7cac+_0x327de2['howMany']);}['_handleMergeOperation'](_0x3edae0){const _0xeb8ea9=null===(_0x3edae0=this['_cloneOperation'](_0x3edae0,this['_idsRoots']))['_authorId']?null:_0x3edae0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4b3307=_0x3edae0['targetPosition']['parent'],_0x5bd8e3=_0x3edae0['sourcePosition']['parent'],_0x9f872e=_0x4b3307['getAttribute']('vid_end'),_0x4ccbc5=_0x5bd8e3['getAttribute']('vid_start');_0x4b3307['_setAttribute']('vid_end',_0x5bd8e3['getAttribute']('vid_end')),_0x5bd8e3['_setAttribute']('vid_end',_0x9f872e),this['_touched']['set'](_0x4ccbc5,{'userId':_0xeb8ea9}),this['_touched']['set'](_0x9f872e,{'userId':_0xeb8ea9}),_0x3edae0['_execute']();}['_handleSplitOperation'](_0x230e00){const _0x171562=null===(_0x230e00=this['_cloneOperation'](_0x230e00,this['_idsRoots']))['_authorId']?null:_0x230e00['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2afe7a=_0x230e00['graveyardPosition'],_0x4c304c=_0x230e00['splitPosition']['parent'];_0x230e00['_execute']();const _0x4c98f3=_0x4c304c['getAttribute']('vid_end'),_0x42a474=_0x230e00['insertionPosition']['nodeAfter'];if(_0x2afe7a){const _0x114d35=_0x42a474['getAttribute']('vid_end'),_0x5b3480=_0x4c304c['getAttribute']('vid_end');_0x4c304c['_setAttribute']('vid_end',_0x114d35),_0x42a474['_setAttribute']('vid_end',_0x5b3480),this['_touched']['set'](_0x4c304c['getAttribute']('vid_end'),{'userId':_0x171562}),this['_touched']['set'](_0x42a474['getAttribute']('vid_start'),{'userId':_0x171562});}else{const _0x3bdbea=this['_revisionId']++,_0x3f95a1=this['_revisionId']++;_0x4c304c['_setAttribute']('vid_end',_0x3bdbea),_0x42a474['_setAttribute']('vid_start',_0x3f95a1),_0x42a474['_setAttribute']('vid_end',_0x4c98f3),this['_touched']['set'](_0x3bdbea,{'userId':_0x171562}),this['_touched']['set'](_0x3f95a1,{'userId':_0x171562});}}['_handleMarkerOperation'](_0x32fa42){if(!_0x32fa42['affectsData'])return;const _0x3ca5b4=(_0x32fa42=this['_cloneOperation'](_0x32fa42,this['_diffRoots']))['oldRange']?_0x32fa42['oldRange']['root']:null,_0x1f146d=_0x32fa42['newRange']?_0x32fa42['newRange']['root']:null;_0x3ca5b4&&this['_markers']['delete'](_0x32fa42['name']),_0x1f146d&&this['_markers']['set'](_0x32fa42['name'],_0x32fa42['newRange']['clone']());const _0x41e067=null===_0x32fa42['_authorId']?null:_0x32fa42['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1ca4a7=_0x32fa42['name'];if(!this['_touchedMarkers']['has'](_0x1ca4a7))return void this['_touchedMarkers']['set'](_0x1ca4a7,{'range':_0x32fa42['oldRange'],'userId':_0x41e067});const _0x1d0ab8=this['_touchedMarkers']['get'](_0x1ca4a7),_0x5d650e=_0x1d0ab8['range'],_0x1becc6=_0x32fa42['newRange'];null==_0x5d650e&&null==_0x1becc6||_0x5d650e&&_0x1becc6&&_0x5d650e['isEqual'](_0x1becc6)?this['_touchedMarkers']['delete'](_0x32fa42['name']):_0x1d0ab8['userId']=_0x41e067;}['_handleRootOperation'](_0x2eabb9,_0x43cd3b){this['_diffRoots']['has'](_0x2eabb9['rootName'])?this['_diffRoots']['get'](_0x2eabb9['rootName'])['_isAttached']=_0x2eabb9['isAdd']:(this['_diffRoots']['set'](_0x2eabb9['rootName'],P(_0x2eabb9['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x2eabb9['rootName'],{}),_0x43cd3b&&this['_idsRoots']['set'](_0x2eabb9['rootName'],P(_0x2eabb9['rootName'],!0x0)));const _0x49ffb6=null===_0x2eabb9['_authorId']?null:_0x2eabb9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2d5ef9=this['_touchedRoots']['get'](_0x2eabb9['rootName']);_0x2d5ef9&&_0x2d5ef9['userId']===_0x49ffb6?this['_touchedRoots']['delete'](_0x2eabb9['rootName']):this['_touchedRoots']['set'](_0x2eabb9['rootName'],{'userId':_0x49ffb6,'isAttached':_0x2eabb9['isAdd']});}['_handleRootAttributeOperation'](_0x3c9284){const _0x2c8a2f=this['_diffRootsAttributes']['get'](_0x3c9284['root']['rootName']);null===_0x3c9284['newValue']?delete _0x2c8a2f[_0x3c9284['key']]:_0x2c8a2f[_0x3c9284['key']]=_0x3c9284['newValue'];}}function N(_0x179202){const _0x2c61d3=P(_0x179202['rootName'],_0x179202['isAttached']());for(const _0x20be6c of _0x179202['getChildren']()){const _0x5c01ce=_0x20be6c['_clone'](!0x0);_0x2c61d3['_appendChild'](_0x5c01ce);}return _0x2c61d3;}function P(_0x45c680,_0x40a353=!0x0){const _0x1abdd6=new vt();return _0x1abdd6['rootName']=_0x45c680,_0x1abdd6['_isAttached']=_0x40a353,_0x1abdd6['isAttached']=()=>_0x1abdd6['_isAttached'],_0x1abdd6;}function F(_0x146bc6,_0x4af098,_0xb9d6){const _0x3897bb='elementEnd'==_0x146bc6['type']?_0xb9d6['createPositionAt'](_0x146bc6['item'],'end'):_0xb9d6['createPositionBefore'](_0x146bc6['item']);return _0xb9d6['createPositionFromPath'](_0x4af098,_0x3897bb['path'],_0x3897bb['stickiness']);}function B(_0x9ef72d,_0x8eea0b,_0x52ba06){const _0x1d3dfe='elementStart'==_0x9ef72d['type']?_0x52ba06['createPositionAt'](_0x9ef72d['item'],0x0):_0x52ba06['createPositionAfter'](_0x9ef72d['item']);return _0x52ba06['createPositionFromPath'](_0x8eea0b,_0x1d3dfe['path'],_0x1d3dfe['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x40ca89,_0x4613b9){super(_0x40ca89),this['focusTracker']=new _0x5cd71e(),this['keystrokes']=new _0xd25a25(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x4613b9),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x306a94(this);}['render'](){super['render'](),_0x1fdb69({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x579945=_0x1d8f6d=>_0x1d8f6d['stopPropagation']();this['keystrokes']['set']('arrowright',_0x579945),this['keystrokes']['set']('arrowleft',_0x579945),this['keystrokes']['set']('arrowup',_0x579945),this['keystrokes']['set']('arrowdown',_0x579945);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x490c2c){this['revisionNameInputView']['fieldView']['element']['value']=_0x490c2c['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x27248f){const _0xf0795c=new _0xdb2a4e(this['locale'],_0x4ed94f),_0x790e2e=_0xf0795c['fieldView'];_0x790e2e['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1fb67b=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x27248f&&(_0x1fb67b+='\x20('+g(this['locale'],'optional')+')'),(_0xf0795c['label']=_0x1fb67b,_0x790e2e['on']('input',()=>{this['revisionNameInputValue']=_0x790e2e['element']['value']['trim']();}),_0xf0795c);}}class f extends _0x15b8d5{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x39af41=this['editor'],_0x38dd37=_0x39af41['plugins']['get']('RevisionTracker');_0x39af41['ui']['componentFactory']['add']('revisionHistory',_0x4d14bf=>{const _0x16a3df=_0x44a305(_0x4d14bf),_0xef7fbd=_0x16a3df['panelView']['children'],_0x57ea2e=new _0x2a4e60(_0x4d14bf),_0x4c4b4c=new _0x3138f2(_0x4d14bf),_0x546d2e=new te(_0x4d14bf),_0x357bec=new _0x3138f2(_0x4d14bf),_0x513188=new te(_0x4d14bf);return _0x16a3df['bind']('isEnabled')['to'](_0x38dd37,'isReady',_0x38dd37,'isEnabled',_0x39af41,'isReadOnly',(_0xf79a3a,_0x43a4dc,_0x1c43ae)=>_0xf79a3a&&_0x43a4dc&&!_0x1c43ae),_0x16a3df['buttonView']['set']({'icon':_0x588fdb,'label':g(_0x4d14bf,'Revision\x20history'),'tooltip':!0x0}),_0x546d2e['set']({'label':g(_0x4d14bf,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x546d2e['bind']('isEnabled')['to'](_0x38dd37,'isReady',_0x38dd37,'isEnabled',_0x39af41,'isReadOnly',(_0x5a16ea,_0x27f6a6,_0xd0d814)=>_0x5a16ea&&_0x27f6a6&&!_0xd0d814),_0x546d2e['on']('execute',()=>this['_showDialog']()),_0x513188['set']({'label':g(_0x4d14bf,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x513188['bind']('isEnabled')['to'](_0x38dd37,'isReady',_0x39af41,'isReadOnly',(_0x19c4b9,_0x236492)=>_0x19c4b9&&!_0x236492),_0x513188['on']('execute',()=>{_0x39af41['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x16a3df['isOpen']=!0x1,_0x39af41['editing']['view']['focus']();}),_0x4c4b4c['children']['add'](_0x546d2e),_0x357bec['children']['add'](_0x513188),_0x57ea2e['role']='menu',_0x57ea2e['items']['addMany']([_0x4c4b4c,_0x357bec]),_0xef7fbd['add'](_0x57ea2e),_0x16a3df;}),_0x39af41['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x13f0b9=this['editor'],_0x51aff2=_0x13f0b9['locale'],_0x3d9470=new _0x2e0d1(_0x51aff2),_0x21472b=new _0x1afedd(_0x51aff2);_0x3d9470['buttonView']['set']({'icon':_0x588fdb,'label':g(_0x51aff2,'Revision\x20history')});const _0xb6ff16=new _0xb046b3(_0x51aff2,_0x3d9470),_0x3aab73=new _0xa818ba(_0x51aff2);_0x3aab73['set']({'label':g(_0x51aff2,'Save\x20current\x20revision')}),_0x3aab73['delegate']('execute')['to'](_0x3d9470),_0x3aab73['on']('execute',()=>{this['_showDialog']();}),_0xb6ff16['children']['add'](_0x3aab73),_0x21472b['items']['add'](_0xb6ff16);const _0x39d578=new _0xb046b3(_0x51aff2,_0x3d9470),_0x4a282d=new _0xa818ba(_0x51aff2);return _0x4a282d['set']({'label':g(_0x51aff2,'Open\x20revision\x20history')}),_0x4a282d['delegate']('execute')['to'](_0x3d9470),_0x4a282d['on']('execute',()=>{_0x13f0b9['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x39d578['children']['add'](_0x4a282d),_0x21472b['items']['add'](_0x39d578),_0x3d9470['panelView']['children']['add'](_0x21472b),_0x3d9470;}['_showDialog'](){const _0xd8c514=this['editor'],_0x21a639=_0xd8c514['locale'],_0x4b8a5b=_0xd8c514['plugins']['get']('Dialog'),_0x332556=_0xd8c514['plugins']['get']('RevisionTracker');function _0xa65e43(_0x3f06dd){_0xd8c514['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3f06dd['revisionName']?_0x3f06dd['revisionNameInputView']['errorText']=g(_0x21a639,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0xd8c514['plugins']['get'](u)['saveRevision']({'name':_0x3f06dd['revisionName']}),_0x4b8a5b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xa65e43(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x4b8a5b['show']({'id':'revisionSave','title':g(_0x21a639,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0xd8c514['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x4b8a5b['hide']()},{'label':g(_0xd8c514['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0xdcbf98){_0xdcbf98['bind']('isEnabled')['to'](_0x332556,'isReady',_0x332556,'isEnabled',_0xd8c514,'isReadOnly',(_0x367f08,_0x431214,_0x484d38)=>_0x367f08&&_0x431214&&!_0x484d38);},'onExecute':()=>_0xa65e43(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x35a8a1=this['editor'],_0x49bac5=_0x35a8a1['locale'];this['_saveRevisionFormView']=new hs(_0x49bac5,_0x35a8a1['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends ts{['changeId'];['_model'];constructor(_0x41a63f,_0x57eb79){super(_0x41a63f),this['_model']=_0x57eb79,this['changeId']=_0x57eb79['id'];const _0x3fd652=this['bindTemplate'],_0x29a0e7=g(_0x41a63f,_0x57eb79['data']['isSuggestion']?'Suggested\x20by':'add'==_0x57eb79['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x57eb79['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x3fd652['to']('type',_0x579c4a=>'ck-revision-change__'+_0x579c4a)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x29a0e7}]},{'text':'\x20'+_0x57eb79['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x2158f4(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0xd3a4be){super(),this['id']=_0xd3a4be['id']||_0x1636c5(),this['author']=_0xd3a4be['author'],this['type']=_0xd3a4be['type'],this['data']=_0xd3a4be['data']||{},this['rootName']=_0xd3a4be['rootName'],this['set']('createdAt',_0xd3a4be['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(_0x1bfcb6,_0x1dc35e){this['newRevisionId']=_0x1bfcb6,this['oldRevisionId']=_0x1dc35e,this['changes']=new _0x5a41bf();}['_setChanges'](_0x355caf){for(const _0x3f9b0d of _0x355caf)this['changes']['add'](_0x3f9b0d);}}class m extends _0x15b8d5{['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[_0x6c5adc,_0x1ac534,I,V];}constructor(_0x2cd631){super(_0x2cd631),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',(_0x63e3f0,_0x568ba9,_0x169e8f)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4e9522=>{for(const _0x56c505 of this['editor']['editing']['view']['document']['roots'])_0x169e8f?_0x4e9522['removeClass']('ck-editor__editable__overlay',_0x56c505):_0x4e9522['addClass']('ck-editor__editable__overlay',_0x56c505);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x162919=>null!==_0x162919),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x134954,_0x43e7e4,_0x2c2071)=>_0x134954&&_0x2c2071?_0x43e7e4['changes']['getIndex'](_0x2c2071):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x273872,_0x31a8e0)=>_0x273872?_0x31a8e0['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1ac534);}['init'](){const _0x47d739=this['editor'],_0x3a5013=new wt(_0x47d739,{'direction':'backward'}),_0x1c61c7=new wt(_0x47d739,{'direction':'forward'});(_0x47d739['commands']['add']('showPreviousChange',_0x3a5013),_0x47d739['commands']['add']('showNextChange',_0x1c61c7),_0x47d739['commands']['add']('restoreRevision',new mt(_0x47d739)),this['on']('change:numberOfChanges',()=>{_0x3a5013['refresh'](),_0x1c61c7['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x47d739['enableReadOnlyMode']('revision-viewer'),_0x47d739['plugins']['has']('WidgetToolbarRepository'))&&_0x47d739['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x2b3a94){return await this['_utils']['loadRevisionData'](_0x2b3a94,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2b3a94);}async['getRevisionRootsAttributes'](_0x421f74){return await this['_utils']['loadRevisionData'](_0x421f74,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x421f74);}async['compare'](_0x4a4be5,_0x56cb46,_0x46061c=!0x1){if(!this['isEnabled'])return;const _0x22fc59=this['diff'],_0x34496a=this['repository'],_0x207d11='string'==typeof _0x4a4be5?_0x34496a['getRevision'](_0x4a4be5):_0x4a4be5,_0x79a9b6='string'==typeof _0x56cb46?_0x34496a['getRevision'](_0x56cb46):_0x56cb46,_0x2599f7=_0x207d11['id'],_0x4af1c7=_0x79a9b6?_0x79a9b6['id']:null;if(!_0x46061c&&this['diff']&&this['diff']['newRevisionId']===_0x2599f7&&this['diff']['oldRevisionId']===_0x4af1c7)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x2599f7,_0x4af1c7);const _0x36bfe3=this['_getRevisionsRange'](_0x207d11,_0x79a9b6,!0x0)['map'](_0x379021=>this['_utils']['loadRevisionData'](_0x379021,this['adapter']));return _0x36bfe3['push'](new Promise(_0x58a0a2=>{setTimeout(_0x58a0a2,0x14);})),Promise['all'](_0x36bfe3)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x3a6854=this['_getDiff'](_0x2599f7,_0x4af1c7);for(const _0x18dd11 of _0x3a6854['changes'])this['_changeIdToChange']['set'](_0x18dd11['id'],_0x18dd11);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x22cb9a=>{for(const _0x15f8dd of this['editor']['model']['document']['getRootNames']())_0x22cb9a['detachRoot'](_0x15f8dd);for(const _0x5ab15f of Object['keys'](_0x3a6854['model'])){const _0x344a26=_0x22cb9a['addRoot'](_0x5ab15f);for(const _0x30fcd7 of Object['keys'](_0x3a6854['attributes'][_0x5ab15f]))_0x22cb9a['setAttribute'](_0x30fcd7,_0x3a6854['attributes'][_0x5ab15f][_0x30fcd7],_0x344a26);_0x22cb9a['insert'](_0x3a6854['model'][_0x5ab15f],_0x344a26,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x3a6854['changes'])),this['isReady']=!0x0;})['catch'](_0x331bf3=>{console['error'](_0x331bf3),this['_cleanUp'](),_0x22fc59&&(this['diff']=_0x22fc59),this['isReady']=!0x0;});}['addRevisionData'](_0x2603cb,_0x1bd4c3){const _0x2248a8=this['repository']['createRevision'](_0x2603cb);return _0x2248a8['on']('_update',(_0x412151,_0x4dcaf1,_0x5ff455)=>_0x1bd4c3(_0x4dcaf1,_0x5ff455,_0x2248a8)),this['repository']['addRevision'](_0x2248a8),_0x2248a8;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x16d073=>{for(const _0x343d0f of this['editor']['model']['document']['getRootNames']())_0x16d073['detachRoot'](_0x343d0f);});}['_sortAndFilterDiffChanges'](_0x49e23d){const _0x23b026=[],_0x33eeb9=new Map();for(const _0x1ec165 of this['editor']['model']['document']['getRootNames']()){const _0x213eba=this['editor']['editing']['view']['getDomRoot'](_0x1ec165);if(!_0x213eba)continue;const _0x2990b5=_0x213eba['getClientRects']()['item'](0x0);_0x2990b5&&(_0x23b026['push'](_0x1ec165),_0x33eeb9['set'](_0x1ec165,_0x2990b5));}return _0x23b026['sort']((_0x4db8c6,_0x37608d)=>{const _0x909b6a=_0x33eeb9['get'](_0x4db8c6),_0x20cf1f=_0x33eeb9['get'](_0x37608d);return _0x909b6a['y']-_0x20cf1f['y']||_0x909b6a['x']-_0x20cf1f['x'];}),(_0x49e23d=_0x49e23d['filter'](_0x4e31f9=>_0x23b026['includes'](_0x4e31f9['rootName'])))['sort']((_0x447c25,_0x3910d8)=>_0x23b026['indexOf'](_0x447c25['rootName'])-_0x23b026['indexOf'](_0x3910d8['rootName'])),_0x49e23d;}['_makeTape'](_0x1cb7b1){const _0x1e5031=Array['from'](_0x1cb7b1['markers'])['filter'](([_0x1fca2f,_0x1cf9d6])=>_0x1fca2f['startsWith']('revision:')&&!_0x1cf9d6['isCollapsed']),_0x17400d=Array['from'](this['editor']['model']['createRangeIn'](_0x1cb7b1)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1e5031['length'])for(const _0x46c976 of _0x17400d){const [_0x9fd538,_0x2a132e]=_0x1e5031[0x0],[,_0x3aca0d,_0x2b46f4]=_0x9fd538['split'](':');if(_0x2a132e['end']['isEqual'](_0x46c976['nextPosition'])&&_0x1e5031['shift'](),(_0x46c976['previousPosition']['isEqual'](_0x2a132e['start'])||_0x46c976['previousPosition']['isAfter'](_0x2a132e['start']))&&('insertion'==_0x3aca0d?_0x46c976['isAdded']={'userId':_0x2b46f4}:'deletion'==_0x3aca0d&&(_0x46c976['isRemoved']={'userId':_0x2b46f4})),0x0==_0x1e5031['length'])break;}return _0x17400d;}['_refreshStartEndIndex'](_0x457949){const _0x6d601a=new Map();for(let _0x4c0494=0x0;_0x4c0494<_0x457949['length'];_0x4c0494++)'text'===_0x457949[_0x4c0494]['type']?(_0x457949[_0x4c0494]['item']['startIndex']=_0x4c0494,_0x457949[_0x4c0494]['item']['endIndex']=_0x4c0494):('elementStart'===_0x457949[_0x4c0494]['type']?_0x457949[_0x4c0494]['item']['startIndex']=_0x4c0494:'elementEnd'===_0x457949[_0x4c0494]['type']&&(_0x457949[_0x4c0494]['item']['endIndex']=_0x4c0494),_0x6d601a['set'](_0x457949[_0x4c0494]['id'],_0x4c0494));for(const _0x180f0d of _0x6d601a['values']())'elementStart'===_0x457949[_0x180f0d]['type']?_0x457949[_0x180f0d]['item']['endIndex']=_0x6d601a['get'](_0x457949[_0x180f0d]['pairId']):'elementEnd'===_0x457949[_0x180f0d]['type']&&(_0x457949[_0x180f0d]['item']['startIndex']=_0x6d601a['get'](_0x457949[_0x180f0d]['pairId']));}['_processTape'](_0x1182d4){for(let _0x2c5d29=0x0;_0x2c5d29<_0x1182d4['length'];_0x2c5d29++){if('elementStart'===_0x1182d4[_0x2c5d29]['type'])_0x1182d4[_0x2c5d29]['item']['startIndex']=_0x2c5d29;else{if('elementEnd'===_0x1182d4[_0x2c5d29]['type']){_0x1182d4[_0x2c5d29]['item']['endIndex']=_0x2c5d29;const _0x70f7a4=_0x1182d4[_0x2c5d29]['item']['startIndex'];_0x1182d4[_0x70f7a4]['pairId']=_0x1182d4[_0x2c5d29]['id'],_0x1182d4[_0x2c5d29]['pairId']=_0x1182d4[_0x70f7a4]['id'];}else _0x1182d4[_0x2c5d29]['item']['startIndex']=_0x2c5d29,_0x1182d4[_0x2c5d29]['item']['endIndex']=_0x2c5d29,_0x1182d4[_0x2c5d29]['pairId']=null;}_0x1182d4[_0x2c5d29]['markersStart']||(_0x1182d4[_0x2c5d29]['markersStart']=[],_0x1182d4[_0x2c5d29]['markersEnd']=[]);}}['_markInsertions'](_0x331767,_0x2067d7){const _0x189829=_0x331767['filter'](_0x1f5844=>!_0x1f5844['isAdded']);for(let _0x40361e=0x0;_0x40361e<_0x2067d7['length'];_0x40361e++)_0x2067d7[_0x40361e]['isAdded']&&(_0x189829[_0x40361e]['isAdded']=_0x2067d7[_0x40361e]['isAdded']);}['_getDiff'](_0x4c23a2,_0x1c0398=null){const _0x30f4a5=this['repository']['getRevision'](_0x4c23a2),_0x28d915=_0x1c0398?this['repository']['getRevision'](_0x1c0398):null,_0x584aee=this['_getRevisionsRange'](_0x30f4a5,_0x28d915),_0x52fdbc=_0x584aee[_0x584aee['length']-0x1],_0x5d4aa4=new Map(),_0x52e0bc={'model':{},'attributes':{},'changes':[]},_0x1a7273=new Set(),_0x45da10=new Map();for(let _0x155bae=_0x584aee['length']-0x1;_0x155bae>=0x0;_0x155bae--){const _0x5d21dd=_0x584aee[_0x155bae];for(const _0x1bb6d3 of Object['keys'](_0x5d21dd['diffData']))if(_0x5d21dd['diffData'][_0x1bb6d3]['attachChange']){const _0x3dcfe3=_0x5d21dd['diffData'][_0x1bb6d3]['attachChange'];_0x3dcfe3['isAttached']?(_0x1a7273['add'](_0x1bb6d3),_0x45da10['has'](_0x1bb6d3)&&_0x45da10['get'](_0x1bb6d3)['userId']==_0x3dcfe3['userId']?_0x45da10['delete'](_0x1bb6d3):_0x45da10['set'](_0x1bb6d3,_0x3dcfe3)):_0x45da10['has'](_0x1bb6d3)?(_0x1a7273['delete'](_0x1bb6d3),_0x45da10['delete'](_0x1bb6d3)):(_0x1a7273['add'](_0x1bb6d3),_0x45da10['set'](_0x1bb6d3,_0x3dcfe3));}else _0x1a7273['add'](_0x1bb6d3);}for(const _0x4438ee of _0x1a7273){const _0x50f949=_0x45da10['has'](_0x4438ee)&&!_0x45da10['get'](_0x4438ee)['isAttached'];let _0x101203=_0x50f949?_0x584aee['length']-0x1:0x0;const _0x5e7ee0=_0x50f949?-0x1:0x1;for(;_0x584aee[_0x101203];){const _0x13ee04=_0x584aee[_0x101203];if(_0x13ee04['diffData'][_0x4438ee]){const _0x37616e=_0x50f949?_0x13ee04['diffData'][_0x4438ee]['attributesBefore']:_0x13ee04['diffData'][_0x4438ee]['attributesAfter'];_0x52e0bc['attributes'][_0x4438ee]=_0x37616e?_0x1420b2(_0x37616e):{};break;}_0x101203+=_0x5e7ee0;}}for(const _0x4034a8 of _0x584aee){_0x4034a8['model']={};for(const _0x5ef604 of _0x4034a8['authors'])_0x5d4aa4['set'](_0x5ef604['id'],_0x5ef604);for(const _0x199863 of _0x1a7273){const _0x4dc4dd=_0x4034a8['diffData'][_0x199863]?_0x4034a8['diffData'][_0x199863]['insertions']:'[]',_0x486e95=_0x4034a8['diffData'][_0x199863]?_0x4034a8['diffData'][_0x199863]['deletions']:'[]';_0x4034a8['model'][_0x199863]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4dc4dd),'deletions':this['_utils']['_makeModelFromViewString'](_0x486e95)};}}for(const _0x1c054d of _0x1a7273){let _0x259868=null,_0x963f64=0x0;const _0x440bb1=new Map(Array['from'](_0x30f4a5['model'][_0x1c054d]['insertions']['markers'])['filter'](([_0x536f63])=>!_0x536f63['startsWith']('revision:')));let _0x430d30=0x0;for(const _0xb8d13d of _0x584aee){const _0x595fc0=this['_makeTape'](_0xb8d13d['model'][_0x1c054d]['insertions']);_0xb8d13d==_0x30f4a5?(_0x259868=_0x595fc0,_0x963f64=_0x259868['length'],_0x259868['forEach'](_0xa9a0e5=>{_0xa9a0e5['id']=_0x430d30++;}),this['_processTape'](_0x259868)):this['_markInsertions'](_0x259868,_0x595fc0);const _0x31cf60=_0x259868['filter'](_0x4a9ea2=>!_0x4a9ea2['isAdded'])['map'](_0x2304d2=>_0x2304d2['id']);let _0x4a6042=0x0;const _0x50586f=this['_makeTape'](_0xb8d13d['model'][_0x1c054d]['deletions']);_0x50586f['forEach'](_0x11cd60=>{_0x11cd60['isRemoved']?_0x11cd60['id']=_0x963f64++:_0x11cd60['id']=_0x31cf60[_0x4a6042++];}),this['_processTape'](_0x50586f),this['_setDistance'](_0x259868,'isAdded'),this['_setDistance'](_0x50586f,'isRemoved'),_0xb8d13d==_0x30f4a5&&this['_markMarkers'](_0x259868,_0x440bb1),_0x259868=this['_joinTapes'](_0x259868,_0x50586f),this['_refreshStartEndIndex'](_0x259868),this['_setDistance'](_0x259868,'isRemoved');}_0x259868=_0x259868['filter'](_0x506d1c=>!(_0x506d1c['isAdded']&&_0x506d1c['isRemoved']));const _0x44d98a=new Map(_0x52fdbc['model'][_0x1c054d]['deletions']['markers']),_0x1ecb13=new Set(_0x440bb1['keys']());for(const _0x355d67 of _0x44d98a['keys']())_0x1ecb13['delete'](_0x355d67);this['_markSuggestions'](_0x259868,_0x1ecb13),this['_fixObsoleteTags'](_0x259868),_0x259868=this['_removeMissingPairs'](_0x259868),_0x259868=this['_markMismatchedRemovedTags'](_0x259868),_0x259868=this['_removeUnsupportedChanges'](_0x259868);const {root:_0x1d0689,changes:_0x3063e9}=this['_makeModelFromTape'](_0x259868,_0x5d4aa4,_0x1c054d);_0x52e0bc['model'][_0x1c054d]=_0x1d0689;const _0x532807=_0x45da10['get'](_0x1c054d);if(_0x532807){const _0xbe6e35=_0x5d4aa4['get'](_0x532807['userId']),_0x54cec6=new r({'author':_0xbe6e35,'type':_0x532807['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x1c054d});_0x3063e9['unshift'](_0x54cec6),_0x52e0bc['attributes'][_0x1c054d]['revisionHistoryAttachChange']=_0x54cec6['id'];}_0x52e0bc['changes']=_0x52e0bc['changes']['concat'](_0x3063e9);}return _0x52e0bc;}['_markMarkers'](_0x31c636,_0x1ced33){for(let _0x425082=0x0;_0x425082<_0x31c636['length'];_0x425082++)for(const [_0x37c0ba,_0xbca8fb]of _0x1ced33)!_0xbca8fb['isCollapsed']&&_0xbca8fb['start']['isEqual'](_0x31c636[_0x425082]['previousPosition'])&&_0x31c636[_0x425082]['markersStart']['push'](_0x37c0ba),_0xbca8fb['end']['isEqual'](_0x31c636[_0x425082]['nextPosition'])&&_0x31c636[_0x425082]['markersEnd']['push'](_0x37c0ba);}['_joinTapes'](_0x196a21,_0x5a36b9){let _0x403fdb=[],_0x45e80a=0x0,_0x424cb8=0x0;for(;_0x45e80a<_0x196a21['length']||_0x424cb8<_0x5a36b9['length'];){const _0x16f52b=_0x196a21[_0x45e80a]||{},_0x5890a1=_0x5a36b9[_0x424cb8]||{};if(_0x16f52b['id']==_0x5890a1['id'])_0x45e80a++,_0x424cb8++,_0x403fdb['push'](_0x16f52b);else{if(_0x5890a1['isRemoved']&&_0x16f52b['isAdded']){const {commonTape:_0x9edb5f,iEnd:_0x19ce26,jEnd:_0x194c90}=this['_threeWayMerge'](_0x196a21,_0x45e80a,_0x5a36b9,_0x424cb8);_0x403fdb=_0x403fdb['concat'](_0x9edb5f),_0x45e80a=_0x19ce26,_0x424cb8=_0x194c90;}else _0x5890a1['isRemoved']?(_0x424cb8++,_0x403fdb['push'](_0x5890a1)):(_0x45e80a++,_0x403fdb['push'](_0x16f52b));}}return _0x403fdb;}['_markSuggestions'](_0x5e380a,_0x37eacd){const _0x2df624=[];for(let _0x2c199f=0x0;_0x2c199f<_0x5e380a['length'];_0x2c199f++){for(let _0x204b86=0x0;_0x204b86<_0x5e380a[_0x2c199f]['markersStart']['length'];_0x204b86++){const _0x13fb6e=_0x5e380a[_0x2c199f]['markersStart'][_0x204b86];if(!_0x37eacd['has'](_0x13fb6e))continue;const {group:_0x596fed,type:_0xdb9155,authorId:_0xfe39d0}=_0x4d31c1(_0x13fb6e);'revision-suggestion'!=_0x596fed||'insertion'!=_0xdb9155&&'deletion'!=_0xdb9155||(_0x2df624['unshift']({'type':_0xdb9155,'name':_0x13fb6e,'userId':_0xfe39d0}),_0x5e380a[_0x2c199f]['markersStart']['splice'](_0x204b86,0x1),_0x204b86--);}_0x1358cd(_0x5e380a[_0x2c199f]);for(let _0x4d9a23=0x0;_0x4d9a23<_0x5e380a[_0x2c199f]['markersEnd']['length'];_0x4d9a23++){const _0x3e20a3=_0x5e380a[_0x2c199f]['markersEnd'][_0x4d9a23];if(!_0x37eacd['has'](_0x3e20a3))continue;const {group:_0x4c2c04,type:_0x3f6ef5}=_0x4d31c1(_0x3e20a3);if('revision-suggestion'!=_0x4c2c04||'insertion'!=_0x3f6ef5&&'deletion'!=_0x3f6ef5)continue;_0x5e380a[_0x2c199f]['markersEnd']['splice'](_0x4d9a23,0x1),_0x4d9a23--;const _0x27ea27=_0x2df624['findIndex'](_0x76e0b4=>_0x76e0b4['name']==_0x3e20a3);_0x27ea27>-0x1&&_0x2df624['splice'](_0x27ea27,0x1);}}function _0x4d31c1(_0x32ccb3){const _0xce7355=_0x32ccb3['split'](':');return{'group':_0xce7355[0x0],'type':_0xce7355[0x1],'subType':_0xce7355['length']>=0x5?_0xce7355[0x2]:null,'id':_0xce7355['length']<0x5?_0xce7355[0x2]:_0xce7355[0x3],'authorId':_0xce7355['length']<0x5?_0xce7355[0x3]:_0xce7355[0x4],'markerCount':0x6==_0xce7355['length']?_0xce7355[0x5]:null};}function _0x1358cd(_0x4e3a26){for(let _0x692a2a=0x0;_0x692a2a<_0x2df624['length'];_0x692a2a++){if(_0x4e3a26['isAdded']&&'insertion'==_0x2df624[_0x692a2a]['type'])return _0x4e3a26['isAddSuggestion']=_0x2df624[_0x692a2a],void delete _0x4e3a26['isAdded'];if(!_0x4e3a26['isAdded']&&!_0x4e3a26['isRemoved']&&'deletion'==_0x2df624[_0x692a2a]['type'])return void(_0x4e3a26['isRemoveSuggestion']=_0x2df624[_0x692a2a]);}}}['_setDistance'](_0x2f7498,_0x4a4350){let _0x413336=0x0,_0x42cd55=!0x1;const _0x99bb80=new Map();for(const _0x5b2899 of _0x2f7498)_0x5b2899[_0x4a4350]?_0x42cd55&&(_0x413336++,_0x42cd55=!0x1):(_0x413336++,_0x42cd55=!0x0),_0x99bb80['set'](_0x5b2899['id'],_0x413336);for(let _0x52bd89=0x0;_0x52bd89<_0x2f7498['length'];_0x52bd89++){if('isRemoved'==_0x4a4350&&_0x2f7498[_0x52bd89]['isAdded']||'isAdded'==_0x4a4350&&_0x2f7498[_0x52bd89]['isRemoved'])continue;if('text'==_0x2f7498[_0x52bd89]['type']){_0x2f7498[_0x52bd89]['distance']=0x0;continue;}const _0x319f6c=_0x99bb80['get'](_0x2f7498[_0x52bd89]['pairId']),_0x11ce5a=_0x99bb80['get'](_0x2f7498[_0x52bd89]['id']);_0x2f7498[_0x52bd89]['distance']=_0x319f6c-_0x11ce5a;}}['_getRevisionsRange'](_0x12c15e,_0x2a8004,_0x224035=!0x1){const _0xc515a9=[];let _0x383e6a=this['repository']['getIndex'](_0x12c15e),_0x30c224=this['repository']['getIndex'](_0x2a8004);for(-0x1==_0x30c224&&(_0x30c224=this['repository']['_revisions']['length'],_0x224035=!0x1);_0x383e6a<_0x30c224;)_0xc515a9['push'](this['repository']['getRevision'](_0x383e6a)),_0x383e6a++;return _0x224035&&_0xc515a9['push'](this['repository']['getRevision'](_0x383e6a)),_0xc515a9;}['_threeWayMerge'](_0x1f749a,_0x4eddcd,_0x1958bd,_0x36ae28){const _0x549c9a=this['editor']['model']['schema'];let _0x2cb151=_0x4eddcd;for(;_0x1f749a[_0x2cb151]&&_0x1f749a[_0x2cb151]['isAdded'];)_0x2cb151++;let _0x1ad108=_0x36ae28;for(;_0x1958bd[_0x1ad108]&&_0x1958bd[_0x1ad108]['isRemoved'];)_0x1ad108++;_0x47f7a1(_0x1f749a,_0x4eddcd,_0x2cb151),_0x47f7a1(_0x1958bd,_0x36ae28,_0x1ad108);const _0x669d24=_0x1958bd['slice'](_0x36ae28,_0x1ad108)['concat'](_0x1f749a['slice'](_0x4eddcd,_0x2cb151));return _0x669d24['sort']((_0x167b17,_0x27c067)=>_0x167b17['side']!=_0x27c067['side']?_0x167b17['side']-_0x27c067['side']:_0x167b17['level']!=_0x27c067['level']?_0x167b17['level']-_0x27c067['level']:_0x167b17['distance']!=_0x27c067['distance']?_0x27c067['distance']-_0x167b17['distance']:!!_0x167b17['isAdded']!=!!_0x27c067['isAdded']?-0x1==_0x167b17['side']||0x0==_0x167b17['side']?_0x167b17['isAdded']?-0x1:0x1:_0x167b17['isAdded']?0x1:-0x1:_0x167b17['index']-_0x27c067['index']),{'commonTape':_0x669d24,'iEnd':_0x2cb151,'jEnd':_0x1ad108};function _0x47f7a1(_0x5b1a3d,_0x3e9e2d,_0x49fbd6){let _0x55d0a0=-0x1,_0x452b29=Number['POSITIVE_INFINITY'],_0x2b0d10=!0x0;for(let _0x1771e4=_0x3e9e2d;_0x1771e4<_0x49fbd6;_0x1771e4++)if(_0x549c9a['isInline'](_0x5b1a3d[_0x1771e4]['item'])||(_0x2b0d10=!0x1),_0x5b1a3d[_0x1771e4]['item']['startIndex']<_0x3e9e2d&&(_0x55d0a0=_0x1771e4),_0x5b1a3d[_0x1771e4]['item']['endIndex']>=_0x49fbd6){_0x452b29=_0x1771e4;break;}_0x2b0d10&&(_0x55d0a0=_0x49fbd6-0x1);for(let _0x396675=_0x3e9e2d;_0x396675<_0x49fbd6;_0x396675++)_0x5b1a3d[_0x396675]['side']=_0x396675<=_0x55d0a0?-0x1:_0x396675<_0x452b29?0x0:0x1,_0x5b1a3d[_0x396675]['index']=_0x396675;let _0x737d0c=0x0;for(let _0x55a78d=_0x3e9e2d;_0x55a78d<=_0x55d0a0;_0x55a78d++)0x0==_0x5b1a3d[_0x55a78d]['distance']?_0x5b1a3d[_0x55a78d]['level']=_0x737d0c:(_0x737d0c++,_0x5b1a3d[_0x55a78d]['level']=_0x737d0c,_0x737d0c++);for(let _0x2ff6ac=_0x3e9e2d;_0x2ff6ac<_0x49fbd6;_0x2ff6ac++)0x0==_0x5b1a3d[_0x2ff6ac]['side']&&(_0x5b1a3d[_0x2ff6ac]['level']=_0x737d0c);_0x737d0c=0x0;for(let _0x12ec5f=_0x49fbd6-0x1;_0x12ec5f>=_0x452b29;_0x12ec5f--)0x0==_0x5b1a3d[_0x12ec5f]['distance']?_0x5b1a3d[_0x12ec5f]['level']=_0x737d0c:(_0x737d0c--,_0x5b1a3d[_0x12ec5f]['level']=_0x737d0c,_0x737d0c--);}}['_fixObsoleteTags'](_0x494310){const _0xb25197=new Map(),_0xd09aaa=this['editor']['model']['schema'];for(let _0x1583b9=0x1;_0x1583b9<_0x494310['length'];_0x1583b9++){let _0x55a5a3,_0x40815d,_0x534d36;const _0x35ed16=_0x494310[_0x1583b9],_0x4e132d=_0x494310[_0x1583b9-0x1];if('text'==_0x35ed16['type'])continue;if(_0x35ed16['type']!=_0x4e132d['type'])continue;if(!_0xd09aaa['isBlock'](_0x4e132d['item'])||_0xd09aaa['isLimit'](_0x4e132d['item']))continue;if(!_0xd09aaa['isBlock'](_0x35ed16['item'])||_0xd09aaa['isLimit'](_0x35ed16['item']))continue;if((_0x494310[_0x1583b9]['isAdded']||_0x494310[_0x1583b9]['isAddSuggestion'])&&_0x494310[_0x1583b9-0x1]['isRemoved'])_0x55a5a3=_0x494310[_0x1583b9],_0x40815d=_0x494310[_0x1583b9-0x1],_0x534d36=_0x1583b9-0x1;else{if(!_0x494310[_0x1583b9]['isRemoved']||!_0x494310[_0x1583b9-0x1]['isAdded']&&!_0x494310[_0x1583b9-0x1]['isAddSuggestion'])continue;_0x55a5a3=_0x494310[_0x1583b9-0x1],_0x40815d=_0x494310[_0x1583b9],_0x534d36=_0x1583b9;}const _0x159ffb=_0x55a5a3['level']==_0x40815d['level'],_0x20d106=Math['abs'](_0x55a5a3['level'])<Math['abs'](_0x40815d['level'])&&0x0==_0x40815d['distance'];(_0x159ffb||_0x20d106)&&(_0xb25197['set'](_0x40815d['id'],_0x55a5a3['id']),_0x494310['splice'](_0x534d36,0x1),_0x1583b9--,_0x55a5a3['isAdded']=!0x1);}for(let _0x3f77e8=0x0;_0x3f77e8<_0x494310['length'];_0x3f77e8++)_0xb25197['has'](_0x494310[_0x3f77e8]['pairId'])&&(_0x494310[_0x3f77e8]['pairId']=_0xb25197['get'](_0x494310[_0x3f77e8]['pairId']));}['_removeMissingPairs'](_0x33a71f){const _0x37c300=new Set(_0x33a71f['map'](_0x3ccbe9=>_0x3ccbe9['id']));for(let _0x15e74e=0x0;_0x15e74e<_0x33a71f['length'];_0x15e74e++)_0x37c300['has'](_0x33a71f[_0x15e74e]['pairId'])||0x0==_0x33a71f[_0x15e74e]['distance']||(_0x33a71f[_0x15e74e]['isIncorrect']=!0x0);return _0x33a71f['filter'](_0x4a8a90=>!_0x4a8a90['isIncorrect']);}['_markMismatchedRemovedTags'](_0x1f95e1){const _0x26bb4d=new Set();for(let _0x28b6bd=0x0;_0x28b6bd<_0x1f95e1['length'];_0x28b6bd++){if(_0x26bb4d['has'](_0x1f95e1[_0x28b6bd]['id'])&&_0x1f95e1[_0x28b6bd]['isRemoved']&&(_0x1f95e1[_0x28b6bd]['isIncorrect']=!0x0),_0x1f95e1[_0x28b6bd]['isIncorrect'])continue;if(0x0==_0x1f95e1[_0x28b6bd]['distance'])continue;if('elementStart'!=_0x1f95e1[_0x28b6bd]['type'])continue;if(null==_0x1f95e1[_0x28b6bd]['pairId'])continue;let _0xc2f351=_0x28b6bd+0x1,_0x4629c3=0x0;for(;_0x1f95e1[_0xc2f351]['id']!=_0x1f95e1[_0x28b6bd]['pairId'];)'elementStart'==_0x1f95e1[_0xc2f351]['type']?_0x4629c3++:'elementEnd'==_0x1f95e1[_0xc2f351]['type']&&_0x4629c3--,_0xc2f351++;if(0x0!=_0x4629c3){if(_0x1f95e1[_0x28b6bd]['isRemoved'])_0x1f95e1[_0x28b6bd]['isIncorrect']=!0x0;else{for(;_0xc2f351!=_0x28b6bd;)_0x1f95e1[_0xc2f351]['isRemoved']&&0x0!=_0x1f95e1[_0xc2f351]['distance']&&(_0x1f95e1[_0xc2f351]['isIncorrect']=!0x0,_0x26bb4d['add'](_0x1f95e1[_0xc2f351]['pairId'])),_0xc2f351--;}}}return _0x1f95e1['filter'](_0x1d1d92=>!_0x1d1d92['isIncorrect']);}['_removeUnsupportedChanges'](_0x575501){const _0x371757=this['editor']['model']['schema'];for(let _0xfc8f46=0x0;_0xfc8f46<_0x575501['length'];_0xfc8f46++){if(!(_0x575501[_0xfc8f46]['isAdded']||_0x575501[_0xfc8f46]['isAddSuggestion']||_0x575501[_0xfc8f46]['isRemoved']||_0x575501[_0xfc8f46]['isRemoveSuggestion']))continue;if(0x0==_0x575501[_0xfc8f46]['distance'])continue;const _0x18b17c=_0x575501[_0xfc8f46]['item'];_0x371757['isBlock'](_0x18b17c)||_0x371757['isLimit'](_0x18b17c)||(_0x575501[_0xfc8f46]['isAdded']&&delete _0x575501[_0xfc8f46]['isAdded'],_0x575501[_0xfc8f46]['isAddSuggestion']&&delete _0x575501[_0xfc8f46]['isAddSuggestion'],_0x575501[_0xfc8f46]['isRemoveSuggestion']&&delete _0x575501[_0xfc8f46]['isRemoveSuggestion'],_0x575501[_0xfc8f46]['isRemoved']&&(_0x575501[_0xfc8f46]['isIncorrect']=!0x0));}return _0x575501['filter'](_0x545d57=>!_0x545d57['isIncorrect']);}['_makeModelFromTape'](_0xc0845c,_0x22c673,_0x3e9662){const _0x2cd679=new vt(),_0x1398ab=[],_0xbfc738=new Map(),_0xa1fff7=this['editor']['model'],_0x5114cb=_0xa1fff7['schema'],_0x5356d9=[_0x2cd679],_0x4faca5={},_0x349436={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x2b1408=null;const _0x2b50e8=[0x0];for(let _0xe2d5b9=0x0;_0xe2d5b9<_0xc0845c['length'];_0xe2d5b9++)if('elementStart'===_0xc0845c[_0xe2d5b9]['type']){_0xc0845c[_0xe2d5b9]['previousPosition']=_0xa1fff7['createPositionFromPath'](_0x2cd679,_0x2b50e8);const _0x477d7d=new ut(_0xc0845c[_0xe2d5b9]['item']['name'],_0xc0845c[_0xe2d5b9]['item']['getAttributes']());_0x5356d9[0x0]['_appendChild'](_0x477d7d),_0x2b50e8['push'](0x0),_0x5356d9['unshift'](_0x477d7d),_0xc0845c[_0xe2d5b9]['nextPosition']=_0xa1fff7['createPositionFromPath'](_0x2cd679,_0x2b50e8);}else'elementEnd'===_0xc0845c[_0xe2d5b9]['type']?(_0x5356d9['shift'](),_0xc0845c[_0xe2d5b9]['previousPosition']=_0xa1fff7['createPositionFromPath'](_0x2cd679,_0x2b50e8),_0x2b50e8['pop'](),_0x2b50e8[_0x2b50e8['length']-0x1]++,_0xc0845c[_0xe2d5b9]['nextPosition']=_0xa1fff7['createPositionFromPath'](_0x2cd679,_0x2b50e8)):(_0xc0845c[_0xe2d5b9]['previousPosition']=_0xa1fff7['createPositionFromPath'](_0x2cd679,_0x2b50e8),_0x2b1408?_0x2b1408['_data']+=_0xc0845c[_0xe2d5b9]['item']['data']:_0x2b1408=new gt(_0xc0845c[_0xe2d5b9]['item']['data'],_0xc0845c[_0xe2d5b9]['item']['getAttributes']()),_0xc0845c[_0xe2d5b9+0x1]&&'text'===_0xc0845c[_0xe2d5b9+0x1]['type']&&_0x555d2c(_0x2b1408,_0xc0845c[_0xe2d5b9+0x1]['item'])||(_0x5356d9[0x0]['_appendChild'](_0x2b1408),_0x2b1408=null),_0x2b50e8[_0x2b50e8['length']-0x1]+=_0xc0845c[_0xe2d5b9]['item']['offsetSize'],_0xc0845c[_0xe2d5b9]['nextPosition']=_0xa1fff7['createPositionFromPath'](_0x2cd679,_0x2b50e8));for(let _0x254978=0x0;_0x254978<_0xc0845c['length'];_0x254978++){const _0x1abb49=_0xc0845c[_0x254978]['previousPosition'],_0x4435ad=_0xc0845c[_0x254978]['nextPosition'];for(const _0x83caba of _0xc0845c[_0x254978]['markersStart'])_0xbfc738['set'](_0x83caba,{'start':_0x1abb49,'end':null});_0x214b76('isRemoveSuggestion',_0x254978,_0x1abb49,_0x4435ad),_0x214b76('isAddSuggestion',_0x254978,_0x1abb49,_0x4435ad),_0x214b76('isRemoved',_0x254978,_0x1abb49,_0x4435ad),_0x214b76('isAdded',_0x254978,_0x1abb49,_0x4435ad);for(const _0xbe7170 of _0xc0845c[_0x254978]['markersEnd']){const _0xd2fa87=_0xbfc738['get'](_0xbe7170);_0xd2fa87?_0xd2fa87['end']=_0x4435ad:_0xbfc738['set'](_0xbe7170,{'start':_0x4435ad,'end':_0x4435ad});}}for(const [_0x442dbb,_0x140040]of _0xbfc738){const _0x44d5df=this['editor']['model']['createRange'](_0x140040['start'],_0x140040['end']);_0x2cd679['markers']['set'](_0x442dbb,_0x44d5df);}return _0x1398ab['sort']((_0x5738c3,_0x71f466)=>{const _0x17072e=_0x2cd679['markers']['get']('revision:'+_0x5738c3['id']),_0x2e23f9=_0x2cd679['markers']['get']('revision:'+_0x71f466['id']);return _0x17072e['start']['isBefore'](_0x2e23f9['start'])?-0x1:_0x17072e['start']['isAfter'](_0x2e23f9['start'])?0x1:_0x17072e['end']['isBefore'](_0x2e23f9['end'])?-0x1:_0x17072e['end']['isAfter'](_0x2e23f9['end'])?0x1:'add'===_0x5738c3['type']?-0x1:0x1;}),{'root':_0x2cd679,'changes':_0x1398ab};function _0x214b76(_0x2fb17d,_0x362fa5,_0x51321d,_0x538d3f){const _0x3ff9dc=!!_0xc0845c[_0x362fa5][_0x2fb17d],_0x2e6581=_0x3ff9dc?_0xc0845c[_0x362fa5][_0x2fb17d]['userId']:null,_0x5c153f=_0x362fa5===_0xc0845c['length']-0x1,_0x82748f=_0x349436[_0x2fb17d][0x0],_0x1eb2fe=_0x5114cb['isObject'](_0xc0845c[_0x362fa5]['item']);!_0x4faca5[_0x2fb17d]&&_0x3ff9dc?_0x4faca5[_0x2fb17d]={'start':_0x51321d,'tapeItem':_0xc0845c[_0x362fa5],'userId':_0x2e6581,'type':_0x2fb17d}:_0x4faca5[_0x2fb17d]&&!_0x3ff9dc?(_0x4faca5[_0x2fb17d]['end']=_0x51321d,_0x21aa65(_0x4faca5[_0x2fb17d]),_0x4faca5[_0x2fb17d]=null):_0x4faca5[_0x2fb17d]&&_0x3ff9dc&&_0x4faca5[_0x2fb17d]['userId']!==_0x2e6581&&(_0x4faca5[_0x2fb17d]['end']=_0x51321d,_0x82748f&&_0x82748f['userId']===_0x4faca5[_0x2fb17d]['userId']||_0x21aa65(_0x4faca5[_0x2fb17d]),_0x4faca5[_0x2fb17d]={'start':_0x51321d,'tapeItem':_0xc0845c[_0x362fa5],'userId':_0x2e6581,'type':_0x2fb17d}),_0x4faca5[_0x2fb17d]&&_0x1eb2fe&&('elementStart'!==_0xc0845c[_0x362fa5]['type']||_0x82748f&&_0x82748f['userId']===_0x2e6581||_0x349436[_0x2fb17d]['unshift']({'userId':_0x2e6581,'object':_0xc0845c[_0x362fa5]['item'],'change':_0x4faca5[_0x2fb17d]}),'elementEnd'===_0xc0845c[_0x362fa5]['type']&&_0x82748f&&_0x82748f['object']===_0xc0845c[_0x362fa5]['item']&&(_0x349436[_0x2fb17d]['shift'](),_0x4faca5[_0x2fb17d]=_0x82748f['change'])),_0x4faca5[_0x2fb17d]&&_0x5c153f&&(_0x4faca5[_0x2fb17d]['end']=_0x538d3f,_0x21aa65(_0x4faca5[_0x2fb17d]),_0x4faca5[_0x2fb17d]=null);}function _0x21aa65({start:_0x4b2d2f,end:_0x3de389,tapeItem:_0x309ab2,userId:_0x41975e,type:_0xb4e642}){const _0x2eab93=_0x309ab2['item'],_0x547e3f=_0xa1fff7['schema']['isBlock'](_0x2eab93)&&!_0xa1fff7['schema']['isLimit'](_0x2eab93),_0x33fc8a=_0x4b2d2f['nodeAfter']==_0x3de389['parent']&&_0x3de389['isAtStart'];if(_0x547e3f&&_0x33fc8a)return;const _0x1c1488=_0xa1fff7['createRange'](_0x4b2d2f,_0x3de389),_0x11c5eb=_0x22c673['get'](_0x41975e),_0x2c17ca=new r({'author':_0x11c5eb,'type':'isAdded'==_0xb4e642||'isAddSuggestion'==_0xb4e642?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0xb4e642||'isRemoveSuggestion'==_0xb4e642},'createdAt':new Date(),'rootName':_0x3e9662});_0x1398ab['push'](_0x2c17ca),_0x2cd679['markers']['set']('revision:'+_0x2c17ca['id'],_0x1c1488);}function _0x555d2c(_0x12263a,_0x20af4c){const _0x5e0b4=_0x12263a['getAttributes'](),_0x48ad70=_0x20af4c['getAttributes']();for(const _0x2d546e of _0x5e0b4){if(_0x2d546e[0x1]!==_0x20af4c['getAttribute'](_0x2d546e[0x0]))return!0x1;_0x48ad70['next']();}return _0x48ad70['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x5d7cff=>{const _0x40ae8c=_0x5d7cff['markerName']['split'](':')[0x1],_0x5c5aad=this['_getChangeFromId'](_0x40ae8c);if(!_0x5c5aad)return null;const _0x2d3d5f='add'==_0x5c5aad['type']?'insertion':'deletion',_0x1638ad=['ck-suggestion-marker','ck-suggestion-marker-'+_0x2d3d5f];return _0x5c5aad['data']['isSuggestion']&&_0x1638ad['push']('ck-suggestion-marker-'+_0x2d3d5f+'-new'),this['activeChange']==_0x5c5aad&&_0x1638ad['push']('ck-suggestion-marker--active'),{'classes':_0x1638ad,'attributes':{'data-change-id':_0x40ae8c}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xcccbf4=>{_0xcccbf4['on']('element:pre',(_0x491e36,_0x21c6ee,_0x8d18bd)=>{const _0x6eff1e=_0x21c6ee['viewItem']['getChild'](0x0);if(!_0x6eff1e||!_0x6eff1e['is']('element','code'))return;if(!_0x8d18bd['consumable']['consume'](_0x6eff1e,{'attributes':['vid_start','vid_end']}))return;const _0x334e73=_0x21c6ee['modelRange']['start']['nodeAfter'];_0x8d18bd['writer']['setAttribute']('vid_start',_0x6eff1e['getAttribute']('vid_start'),_0x334e73),_0x8d18bd['writer']['setAttribute']('vid_end',_0x6eff1e['getAttribute']('vid_end'),_0x334e73);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x4d108b=>{_0x4d108b['on']('element',(_0x79a166,_0x5ed794,_0x31e321)=>{if(!_0x31e321['consumable']['consume'](_0x5ed794['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x5ed794['modelRange']['isCollapsed'])return;const _0x30d618=_0x5ed794['modelRange']['start']['nodeAfter'];_0x30d618['hasAttribute']('vid_start')||_0x30d618['hasAttribute']('vid')||(_0x31e321['writer']['setAttribute']('vid_start',_0x5ed794['viewItem']['getAttribute']('vid_start'),_0x30d618),_0x31e321['writer']['setAttribute']('vid_end',_0x5ed794['viewItem']['getAttribute']('vid_end'),_0x30d618));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xa1a75d=>_0xa1a75d['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x45c0b3,[,_0x15e182])=>{['vid_start','vid_end','vid']['includes'](_0x15e182)&&(_0x45c0b3['return']=!0x0,_0x45c0b3['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x21e096=>{_0x21e096['on']('attribute:vid',(_0x39242d,_0x495f7f,_0x5a532a)=>{if('\x20'!=_0x495f7f['item']['data']||_0x495f7f['item']['parent']['maxOffset']>0x1)return;if(!_0x5a532a['consumable']['consume'](_0x495f7f['item'],_0x39242d['name']))return;const _0x37b55c=_0x5a532a['writer'],_0x4c40fa=_0x5a532a['mapper']['toViewRange'](_0x495f7f['range']);_0x37b55c['wrap'](_0x4c40fa,_0x37b55c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x398c40){const _0x5df945=_0x398c40['plugins']['get']('RevisionViewer');return(_0x57bbca,_0x56378b,_0x5b7d76)=>{const _0x58a2d5=_0x56378b['markerName']['split'](':')[0x1],_0x5617c0=_0x5df945['_getChangeFromId'](_0x58a2d5);if(!_0x5617c0)return null;const _0xd7d2df='add'==_0x5617c0['type']?'split':'merge';if(!_0x5b7d76['consumable']['test'](_0x56378b['markerRange'],_0x57bbca['name']))return;const _0x363fe7=_0x56378b['markerRange']['getWalker'](),_0x293df2=_0x56378b['markerRange']['start'],_0x34bc9f=_0x398c40['model']['schema'];let _0x55b9a9=null,_0x5c8627=null,_0x46aee8=!0x1,_0x1cacef=!0x1;for(const _0x4575fe of _0x363fe7){const _0x113581=_0x4575fe['item'];_0x46aee8=_0x46aee8||_0x34bc9f['isContent'](_0x113581);const _0x56db1d=_0x5b7d76['mapper']['toViewElement'](_0x113581);if(_0x56db1d&&_0x56db1d['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4575fe['type']&&(_0x34bc9f['isBlock'](_0x113581)&&!_0x34bc9f['isLimit'](_0x113581)&&(_0x113581['nextSibling']||_0x293df2['isAtEnd']?_0x55b9a9&&_0x55b9a9['parent']==_0x113581||(_0x55b9a9=_0x113581,_0x59cfa9(_0x4575fe['previousPosition']),_0x1cacef=!0x0):_0x5c8627=_0x5c8627||_0x4575fe['previousPosition']));}function _0x59cfa9(_0x57f3f4){const _0x1ed768=_0x5b7d76['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xd7d2df}),_0x30dce2=_0x5b7d76['mapper']['toViewPosition'](_0x57f3f4);_0x5617c0['data']['isSuggestion']&&_0x5b7d76['writer']['addClass']('ck-suggestion-marker-'+_0xd7d2df+'-new',_0x1ed768),_0x5df945['activeChange']==_0x5617c0&&_0x5b7d76['writer']['addClass']('ck-suggestion-marker--active',_0x1ed768),_0x5b7d76['writer']['insert'](_0x30dce2,_0x1ed768),_0x5b7d76['mapper']['bindElementToMarker'](_0x1ed768,_0x56378b['markerName']);}_0x46aee8||_0x1cacef||!_0x5c8627||_0x59cfa9(_0x5c8627);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3fa181,_0x54fc06,_0x2083c2)=>{const _0x4569fd=_0x2083c2['mapper']['markerNameToElements'](_0x54fc06['markerName']);if(_0x4569fd){for(const _0x4062b7 of _0x4569fd)(_0x4062b7['hasClass']('ck-suggestion-marker-split')||_0x4062b7['hasClass']('ck-suggestion-marker-merge'))&&(_0x2083c2['mapper']['unbindElementFromMarkerName'](_0x4062b7,_0x54fc06['markerName']),_0x2083c2['writer']['remove'](_0x4062b7));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x2a9ee4,_0x2ade26,_0x3e5f70)=>{const _0x55cf8b=_0x2ade26['markerName']['split'](':')[0x1],_0xd587c7=this['_getChangeFromId'](_0x55cf8b);if(!_0xd587c7)return null;const _0x4713dc='add'==_0xd587c7['type']?'split':'merge';if(_0x3e5f70['consumable']['test'](_0x2ade26['markerRange'],_0x2a9ee4['name']))for(const _0x330e8f of _0x2ade26['markerRange']['getItems']()){if(!_0x330e8f['is']('element','softBreak'))continue;const _0x5e9ddc=_0x3e5f70['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4713dc}),_0x5ba834=_0x3e5f70['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x330e8f));_0xd587c7['data']['isSuggestion']&&_0x3e5f70['writer']['addClass']('ck-suggestion-marker-'+_0x4713dc+'-new',_0x5e9ddc),this['activeChange']==_0xd587c7&&_0x3e5f70['writer']['addClass']('ck-suggestion-marker--active',_0x5e9ddc),_0x3e5f70['writer']['insert'](_0x5ba834,_0x5e9ddc),_0x3e5f70['mapper']['bindElementToMarker'](_0x5e9ddc,_0x2ade26['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x42557e=>{for(const _0x2e5fce of this['editor']['model']['document']['getRootNames']()){const _0x3bda33=this['editor']['model']['document']['getRoot'](_0x2e5fce),_0x165298=this['editor']['editing']['view']['document']['getRoot'](_0x2e5fce);if(_0x165298){const _0x576f90=_0x3bda33['getAttribute']('revisionHistoryAttachChange');if(_0x42557e['removeAttribute']('data-change-id',_0x165298),_0x42557e['removeClass']('ck-revision-history-root-add',_0x165298),_0x42557e['removeClass']('ck-revision-history-root-remove',_0x165298),_0x42557e['removeClass']('ck-revision-history-root--active',_0x165298),_0x576f90){const _0x4bf778=this['_getChangeFromId'](_0x576f90);if(!_0x4bf778)return null;_0x42557e['setAttribute']('data-change-id',_0x576f90,_0x165298),_0x42557e['addClass']('ck-revision-history-root-'+_0x4bf778['type'],_0x165298),this['activeChange']==_0x4bf778&&_0x42557e['addClass']('ck-revision-history-root--active',_0x165298);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4cd091=>'revision-comment:'+_0x4cd091,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x95b464=>'revision-suggestion:'+_0x95b464,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x9e7474=>({'name':'suggestion:'+_0x9e7474,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x36fa67=>{const _0x253c54=_0x36fa67['markerName']['split'](':')[0x1];return'insertion'!=_0x253c54&&'deletion'!=_0x253c54?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x253c54]};}}),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',(_0x20eae1,_0x24584e,_0xc0fe6)=>{const _0x3a82a4=_0xc0fe6['mapper']['markerNameToElements'](_0x24584e['markerName']);if(_0x3a82a4){for(const _0x346bbc of _0x3a82a4)_0x346bbc['is']('uiElement')&&(_0xc0fe6['mapper']['unbindElementFromMarkerName'](_0x346bbc,_0x24584e['markerName']),_0xc0fe6['writer']['remove'](_0x346bbc));}},{'priority':'high'});}['_getChangeFromId'](_0x4ca756){return this['_changeIdToChange']['get'](_0x4ca756);}['_getViewForChange'](_0x2f2ac3){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x2f2ac3),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x37f7c1,_0x512b64,_0x7da8d1,_0x2876e8)=>{_0x2876e8&&this['_balloon']['remove'](_0x2876e8),_0x7da8d1&&(this['_balloon']['add']({'view':_0x7da8d1,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x404589=this['editor']['editing'],_0x11a70e=this['_getChangeFromId'](_0x7da8d1['changeId']);let _0x44623f;if(_0x11a70e['data']['isOnRoot']){const _0x244f91=_0x404589['view']['getDomRoot'](_0x11a70e['rootName']);_0x44623f=Array['from'](_0x244f91['getClientRects']());}else{const _0x1b0d98=this['editor']['model']['markers']['get']('revision:'+_0x7da8d1['changeId']);_0x44623f=Array['from'](_0x404589['mapper']['markerNameToElements'](_0x1b0d98['name']))['map'](_0x36928f=>_0x404589['view']['domConverter']['mapViewToDom'](_0x36928f))['map'](_0x3c0f84=>Array['from'](_0x3c0f84['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x44623f[0x0];return _0x44623f['find'](_0x101b7f=>_0x101b7f['top']-0x3<=this['_activeViewTarget']['y']&&_0x101b7f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x101b7f['left']-0x3<=this['_activeViewTarget']['x']&&_0x101b7f['right']+0x3>=this['_activeViewTarget']['x'])||_0x44623f[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2638ac,_0x22591b,_0x28dfae,_0x5203c6)=>{this['activeView']=_0x28dfae?this['_getViewForChange'](_0x28dfae):null,this['editor']['model']['change'](()=>{const _0x405565=this['editor']['editing'];_0x5203c6&&(_0x5203c6['data']['isOnRoot']?_0x405565['view']['change'](_0x22c573=>{_0x22c573['removeClass']('ck-revision-history-root--active',_0x405565['view']['document']['getRoot'](_0x5203c6['rootName']));}):_0x405565['reconvertMarker']('revision:'+_0x5203c6['id'])),_0x28dfae&&(_0x28dfae['data']['isOnRoot']?_0x405565['view']['change'](_0x45b654=>{_0x45b654['addClass']('ck-revision-history-root--active',_0x405565['view']['document']['getRoot'](_0x28dfae['rootName']));}):_0x405565['reconvertMarker']('revision:'+_0x28dfae['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x252b3e,_0x20ff6d)=>{if(this['activeChange'])return;const _0x1c1714=this['_findChangeIdFromDomTarget'](_0x20ff6d['target']),_0x4e4d69=this['_changeIdToChange']['get'](_0x1c1714);_0x4e4d69?(this['_activeViewTarget']={'x':_0x20ff6d['domEvent']['x'],'y':_0x20ff6d['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x4e4d69)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x28383f,_0x2c0fc4)=>{const _0x65678e=this['_findChangeIdFromDomTarget'](_0x2c0fc4['target']),_0x962d1a=this['_changeIdToChange']['get'](_0x65678e);_0x962d1a?(this['_activeViewTarget']={'x':_0x2c0fc4['domEvent']['x'],'y':_0x2c0fc4['domEvent']['y']},_0x962d1a===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x962d1a):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0xaba9cf){do{const _0x521fd2=_0xaba9cf['getAttribute']('data-change-id');if(_0x521fd2)return _0x521fd2;_0xaba9cf=_0xaba9cf['parent'];}while(_0xaba9cf);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x510e92=>{for(const _0x13a507 of this['editor']['model']['markers'])_0x510e92['removeMarker'](_0x13a507);});}}function X(_0x4ee340,_0x1a7455){return(_0x38bb2f,_0x5e58d0,_0x1cf208)=>{if(!_0x1cf208['consumable']['test'](_0x5e58d0['markerRange'],_0x38bb2f['name']))return;const _0x11a68c=_0x5e58d0['markerRange']['getWalker'](),_0x153a62=_0x5e58d0['markerRange']['start'],_0x452630=_0x4ee340['model']['schema'];let _0x14e4ae=null,_0x3052b1=null,_0x461bf5=!0x1,_0x5616ce=!0x1;for(const _0x92f807 of _0x11a68c){const _0x29d20d=_0x92f807['item'];_0x461bf5=_0x461bf5||_0x452630['isContent'](_0x29d20d);const _0x15c41e=_0x1cf208['mapper']['toViewElement'](_0x29d20d);if(_0x15c41e&&_0x15c41e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x92f807['type']&&(_0x452630['isBlock'](_0x29d20d)&&!_0x452630['isLimit'](_0x29d20d)&&(_0x29d20d['nextSibling']||_0x153a62['isAtEnd']?_0x14e4ae&&_0x14e4ae['parent']==_0x29d20d||(_0x14e4ae=_0x29d20d,_0x1d115d(_0x92f807['previousPosition']),_0x5616ce=!0x0):_0x3052b1=_0x3052b1||_0x92f807['previousPosition']));}function _0x1d115d(_0x305469){const _0x292d97=_0x1cf208['mapper']['toViewPosition'](_0x305469),_0x51644d=_0x1cf208['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1a7455});_0x1cf208['writer']['insert'](_0x292d97,_0x51644d),_0x1cf208['mapper']['bindElementToMarker'](_0x51644d,_0x5e58d0['markerName']);}_0x461bf5||_0x5616ce||!_0x3052b1||_0x1d115d(_0x3052b1);};}class mt extends _0x521b2e{constructor(_0x57ec4b){super(_0x57ec4b);const _0x11b9f3=_0x57ec4b['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x11b9f3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x11b9f3,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3e8fc0=this['editor'],_0x5be75c=_0x3e8fc0['plugins']['get'](m),_0x33c474=_0x5be75c['isReady']?_0x5be75c['diff']['newRevisionId']:null;_0x3e8fc0['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x33c474);}['refresh'](){const {isReady:_0x164181,isEnabled:_0x4adebe,repository:_0x172770,diff:_0x2dfaa6}=this['editor']['plugins']['get'](m),_0x36c308=_0x2dfaa6&&_0x172770['getLaterVisibleRevision'](_0x2dfaa6['newRevisionId']);this['isEnabled']=_0x164181&&_0x4adebe&&Boolean(_0x36c308);}}class wt extends _0x521b2e{['_step'];constructor(_0x37dd2d,{direction:_0x1f44c1}){super(_0x37dd2d);const _0x301a79=_0x37dd2d['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x1f44c1?0x1:-0x1,this['listenTo'](_0x301a79,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x301a79,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x301a79,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x647a50=this['editor'],_0x150382=_0x647a50['plugins']['get'](m),{isNavigationMode:_0x23cea8,currentChangeNumber:_0x72ec4}=_0x150382;let _0x969919;if(_0x150382['activeChange']=_0x23cea8?_0x150382['diff']['changes']['get'](_0x72ec4+this['_step']):_0x150382['diff']['changes']['first'],_0x150382['activeChange']['data']['isOnRoot'])_0x969919=_0x647a50['editing']['view']['getDomRoot'](_0x150382['activeChange']['rootName']);else{const _0xee56cb=_0x647a50['model']['markers']['get']('revision:'+_0x150382['activeChange']['id']);_0x969919=_0x1891bd(_0x647a50['editing'],_0xee56cb);}_0x27b7ac({'target':_0x969919,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x587634,currentChangeNumber:_0x401cc5,numberOfChanges:_0x17e3e8,isReady:_0x4d53e5,isEnabled:_0x1591dd}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x1591dd&&_0x4d53e5&&_0x17e3e8)&&(!_0x587634||(0x1===this['_step']?_0x401cc5<_0x17e3e8-0x1:_0x401cc5>0x0));}}class _i extends ts{constructor(_0x5a62a7){super(_0x5a62a7);const _0x127e4d=this['bindTemplate'],_0x25f1da=new te(_0x5a62a7),_0x2eb825=new te(_0x5a62a7);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',(_0x2933d0,_0x46fac7)=>_0x2933d0&&_0x46fac7>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x12e268,_0x2b8d30,_0x5cfb2a,_0x560b83)=>{if(!_0x12e268)return g(_0x5a62a7,'Loading...');if(!_0x5cfb2a)return g(_0x5a62a7,'No\x20changes');const _0x153aa4=g(_0x5a62a7,'NUMBER_OF_CHANGES',_0x5cfb2a);return _0x560b83?g(_0x5a62a7,'X_OF_Y_CHANGES',[_0x2b8d30+0x1,_0x5cfb2a]):_0x153aa4;}),_0x25f1da['set']({'label':g(_0x5a62a7,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x12f6d1}),_0x2eb825['set']({'label':g(_0x5a62a7,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x48747f}),_0x25f1da['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x2eb825['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x25f1da['on']('execute',()=>this['fire']('execute','backward')),_0x2eb825['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',_0x127e4d['if']('_isStatusLabelVisible','ck-hidden',_0x3f7080=>!_0x3f7080)]},'children':[{'text':_0x127e4d['to']('isNavigationMode',_0x3fa7ca=>_0x3fa7ca?g(_0x5a62a7,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x5a62a7,'Total')+':\x20')}]},{'text':_0x127e4d['to']('_statusText')}]},new _0x17fd43(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x25f1da,_0x2eb825]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x15b8d5{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x457857=this['editor']['editing']['view'];_0x457857['change'](_0x3b2861=>{for(const _0x20fc72 of _0x457857['document']['roots'])_0x3b2861['addClass'](le,_0x20fc72);});}['hide'](){const _0x51d47f=this['editor']['editing']['view'];_0x51d47f['change'](_0x4f0400=>{for(const _0x378907 of _0x51d47f['document']['roots'])_0x4f0400['removeClass'](le,_0x378907);});}}class R extends _0x15b8d5{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,ge];}['init'](){const _0x3c0288=this['editor'],_0x1c3084=_0x3c0288['plugins']['get'](m),_0x40e103=_0x3c0288['plugins']['get'](ge);_0x3c0288['ui']['componentFactory']['add']('exitToEditing',_0xd480c7=>{const _0xb59405=new te(_0xd480c7);return _0xb59405['set']({'label':g(_0xd480c7,'Back\x20to\x20editing'),'icon':_0x1610eb,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xb59405,'execute',()=>{_0x3c0288['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xb59405;}),_0x3c0288['ui']['componentFactory']['add']('restoreRevision',_0x13dfbd=>{const _0x170563=new te(_0x13dfbd);return _0x170563['set']({'label':g(_0x13dfbd,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x170563['bind']('isEnabled')['to'](_0x3c0288['commands']['get']('restoreRevision')),this['listenTo'](_0x170563,'execute',()=>_0x3c0288['execute']('restoreRevision')),_0x170563;}),_0x3c0288['ui']['componentFactory']['add']('changesNavigation',_0x4ab362=>{const _0x4dd0d6=new _i(_0x4ab362),_0x13e909=_0x3c0288['commands']['get']('showPreviousChange'),_0x556c98=_0x3c0288['commands']['get']('showNextChange');return _0x4dd0d6['bind']('isBackwardNavigationEnabled')['to'](_0x13e909,'isEnabled'),_0x4dd0d6['bind']('isForwardNavigationEnabled')['to'](_0x556c98,'isEnabled'),_0x4dd0d6['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x1c3084),this['listenTo'](_0x4dd0d6,'execute',(_0x544a0a,_0x3334fa)=>{_0x3c0288['execute']('forward'===_0x3334fa?'showNextChange':'showPreviousChange');}),_0x4dd0d6;}),_0x40e103['show'](),_0x1c3084['on']('change:isReady',(_0x2159df,_0x560752,_0x578ca8)=>{_0x578ca8?_0x40e103['hide']():_0x40e103['show']();});}}class at extends _0xdb2a4e{['_resizeObserver']=null;constructor(_0x504cf0,_0x2c6f1d){super(_0x504cf0,_0x2c6f1d);const _0x3d11bc=this['bindTemplate'];this['set']({'label':g(_0x504cf0,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x504cf0,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3d11bc['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new nt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x38a14a=this['fieldView']['element'];this['_tooltipString']=_0x38a14a['scrollWidth']>_0x38a14a['clientWidth']&&_0x38a14a['value']||'';}}class si extends ts{constructor(_0xd9c7ea,_0x2ed6b9,_0x4a4740){super(_0xd9c7ea);const _0x1e5ded=new _0x1ef3e7();_0x1e5ded['set']({'content':_0x40ab77,'viewBox':'0\x200\x2011\x2010'});const _0xce963f=['ck','ck-revision-history-sidebar__revision-author'];_0x4a4740&&_0xce963f['push']('ck-revision-history-sidebar__revision-author_creator');const _0x10a9cd=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0xd9c7ea,_0x4a4740?'Revision\x20creator':'Revision\x20author')},'children':[_0x1e5ded,_0x2ed6b9['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xce963f},'children':_0x10a9cd});}}function oi(_0x529ae6,_0x2b2729){const _0x372884=_0x529ae6['bindTemplate'],_0x29f90c=_0x529ae6['locale'],_0x41f35e=_0x44a305(_0x29f90c);_0x41f35e['panelPosition']='sw';const _0x7bd0dd=function(_0x20925a,_0x39dca8){const _0x2c7af1=function(_0x124f3e,_0x35a457){const _0x5a9c21=_0x124f3e['locale'],_0x8553d1={'Compare\x20against\x20selected':g(_0x5a9c21,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x5a9c21,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x5a9c21,'Restore\x20this\x20revision')};return _0x35a457['map'](_0x13d1af=>{const _0x22990d=_0x8553d1[_0x13d1af['name']];return _0x22990d&&_0x22990d!==_0x13d1af['name']&&(_0x13d1af['name']=_0x22990d),_0x13d1af;});}(_0x20925a,_0x39dca8),_0x4456e8=new _0x5a41bf();for(const _0xb0b4d of _0x2c7af1){const _0x34aaff={'type':'button','model':new to({'label':_0xb0b4d['name'],'class':_0xb0b4d['class'],'withText':!0x0,'role':'menuitem','_action':_0xb0b4d['action']})};_0x34aaff['model']['bind']('isEnabled')['to'](_0x20925a,'isActionsDropdownOpen',_0x3b7584=>'function'!=typeof _0xb0b4d['isEnabled']||(!_0x3b7584||_0xb0b4d['isEnabled'](_0x20925a))),_0x4456e8['add'](_0x34aaff);}return _0x4456e8;}(_0x529ae6,_0x2b2729);return _0x529ae6['bind']('isActionsDropdownOpen')['to'](_0x41f35e,'isOpen'),_0x41f35e['buttonView']['set']({'label':g(_0x29f90c,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2df2a8}),_0x41f35e['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x372884['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x372884['to'](_0x38893f=>_0x38893f['stopPropagation']())}}),_0x41f35e['on']('execute',_0x1ddb11=>{_0x529ae6['isReady']&&'function'==typeof _0x1ddb11['source']['_action']&&_0x1ddb11['source']['_action'](_0x529ae6);}),_0x2ed9c7(_0x41f35e,_0x7bd0dd,{'role':'menu'}),_0x41f35e['listenTo'](_0x529ae6,'change:isActionsDropdownOpen',(_0x30f690,_0x36228d,_0x302f0f)=>{if(_0x302f0f)for(const _0x2e09af of _0x41f35e['listView']['items']){const _0x2de944=_0x2e09af['children']['first'],_0x45a264=_0x2b2729['find'](_0x23b209=>_0x23b209['action']===_0x2de944['_action'])['isVisible'];_0x2e09af['isVisible']=void 0x0===_0x45a264||_0x45a264(_0x529ae6);}}),_0x41f35e;}class hi extends/* #__PURE__ -- @preserve */
|
|
26
|
+
ti(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x5c988b,_0x4adf58,_0x243a6f,_0x231b16){super(_0x5c988b);const _0x3b953b=this['bindTemplate'],_0x4de937=function(_0x48ff18,_0x3e084f){const _0x3999b8=Array['from'](_0x3e084f['authors'])['filter'](_0x49d845=>_0x49d845!=_0x3e084f['creator']);return _0x3e084f['creator']&&_0x3999b8['unshift'](_0x3e084f['creator']),_0x3999b8['map'](_0x19f421=>new si(_0x48ff18,_0x19f421,_0x19f421==_0x3e084f['creator']));}(_0x5c988b,_0x4adf58);this['id']=_0x4adf58['id'],this['_revision']=_0x4adf58,this['_requireRevisionName']=_0x231b16,this['bind']('name','createdAt')['to'](_0x4adf58),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2ca680=>{return _0x5259e2=_0x5c988b['uiLanguage'],(_0x341850=_0x2ca680)['toLocaleDateString'](_0x5259e2,{'month':'long','day':'numeric'})+',\x20'+_0x341850['toLocaleTimeString'](_0x5259e2,{'hour':'numeric','minute':'numeric'});var _0x5259e2,_0x341850;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new at(_0x5c988b,_0x4ed94f),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x37be76=>_0x37be76||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x235587,_0x48cb97)=>_0x235587&&_0x48cb97),this['revisionActionsView']=_0x243a6f&&_0x243a6f['length']?oi(this,_0x243a6f):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x3b953b['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x3b953b['if']('isEnabled','ck-disabled',_0x2d0669=>!_0x2d0669),_0x3b953b['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x3b953b['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x3b953b['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':_0x3b953b['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':_0x4de937}]},this['revisionActionsView']],'on':{'click':_0x3b953b['to'](_0x61289a=>{_0x61289a['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x1fc0c2=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x1fc0c2,'change',()=>{this['_requireRevisionName']&&!_0x1fc0c2['value']||this['fire']('setName',{'id':this['id'],'name':_0x1fc0c2['value']}),_0x1fc0c2['value']||(_0x1fc0c2['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ai(_0x47786b,_0x47d763){const _0x52c3d0=_0x1fba7b['fromJSDate'](_0x47786b)['setLocale'](_0x47d763),_0x3d55b4=_0x1fba7b['local'](),_0x4b05a3=_0x3d55b4['minus']({'days':0x1})['startOf']('day');let _0xdd619f,_0x4940fd;return _0x52c3d0['hasSame'](_0x3d55b4,'day')?(_0xdd619f=_0x52c3d0['startOf']('day')['toJSDate'](),_0x4940fd=_0x52c3d0['toRelativeCalendar']()):_0x52c3d0['hasSame'](_0x4b05a3,'day')?(_0xdd619f=_0x4b05a3['toJSDate'](),_0x4940fd=_0x52c3d0['toRelativeCalendar']()):_0x52c3d0['hasSame'](_0x3d55b4,'week')?(_0xdd619f=_0x52c3d0['startOf']('week')['toJSDate'](),_0x4940fd=_0x52c3d0['weekdayLong']||''):_0x52c3d0['hasSame'](_0x3d55b4,'year')?(_0xdd619f=_0x52c3d0['startOf']('month')['toJSDate'](),_0x4940fd=_0x52c3d0['monthLong']||''):(_0xdd619f=_0x52c3d0['startOf']('year')['toJSDate'](),_0x4940fd=String(_0x52c3d0['year'])),{'startDate':_0xdd619f,'localizedPeriodName':_0x4940fd};}class di extends ts{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4b97d6,_0x54f93e,_0xfa5d83,_0x8b58aa){super(_0x4b97d6);const _0x5887c7=ai(_0x54f93e,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x54f93e,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0xfa5d83,this['_requireRevisionName']=_0x8b58aa,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':_0x5887c7}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1b6ae3){const _0x4faabe=new hi(this['locale'],_0x1b6ae3,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4faabe);}['removeRevision'](_0x4f63d6){const _0x2997cf=this['revisionViews']['find'](_0x81cfc2=>_0x81cfc2['id']===_0x4f63d6['id']);this['revisionViews']['remove'](_0x2997cf);}}class as extends ts{constructor(_0x4f7e36){super(_0x4f7e36);const _0x279cad=new _0x1ef3e7();_0x279cad['content']=_0x588fdb,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x279cad,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x4f7e36,'Revision\x20history')]}]});}}class ni extends ts{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x18d0e2,_0x10902e,_0x5f37ce,_0x485dc6){super(_0x18d0e2);const _0x2f8f65=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x10902e,this['_revisionActions']=_0x5f37ce,this['_requireRevisionName']=_0x485dc6,this['on']('select',(_0x598491,_0x5521e2)=>{this['fire']('revisionSelected',_0x5521e2);}),this['on']('setName',(_0x38861a,_0x3b497d)=>{this['fire']('revisionSetName',_0x3b497d);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x18d0e2),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x2f8f65['if']('isEnabled','ck-disabled',_0x4f3067=>!_0x4f3067)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x908d98 of this['_revisions'])this['_addRevision'](_0x908d98);this['_revisions']['on']('add',(_0x45d60b,_0x572396)=>{this['_addRevision'](_0x572396);}),this['_revisions']['on']('remove',(_0x6796c7,_0x25ca44)=>{this['_removeRevision'](_0x25ca44);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x130c8e=>_0x130c8e['revisionViews']['map'](_0x3f8c71=>_0x3f8c71))['flat']();}['selectRevision'](_0x1ae1b1){for(const _0x5b782f of this['revisionViews'])_0x1ae1b1&&_0x1ae1b1['id']===_0x5b782f['id']?_0x5b782f['select']():_0x5b782f['deselect']();}['highlightRevisions'](_0x58dfbd){for(const _0x5ece6d of this['revisionViews'])_0x58dfbd['some'](({id:_0x5e3033})=>_0x5e3033===_0x5ece6d['id'])?_0x5ece6d['highlight']():_0x5ece6d['unhighlight']();}['_addRevision'](_0x2beda6){const _0x4165eb=ai(_0x2beda6['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x3be574=this['timePeriodViews']['get'](0x0);_0x3be574&&_0x3be574['startDate']['getTime']()===_0x4165eb['getTime']()||(_0x3be574=new di(this['locale'],_0x4165eb,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x3be574)),_0x3be574['addRevision'](_0x2beda6);}['_removeRevision'](_0x5775d0){const _0x58ebbe=ai(_0x5775d0['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x58ebbe)['removeRevision'](_0x5775d0);}['_getTimePeriodViewByStartDate'](_0x34b04b){return this['timePeriodViews']['find'](_0x23a1b7=>_0x23a1b7['startDate']['getTime']()===_0x34b04b['getTime']());}}class d extends _0x15b8d5{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
pt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(
|
|
29
|
-
_0x158b74(_0x568e99){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5ad812,_0x583ad2){super(_0x583ad2),this['sourceElement']=_0x5ad812,this['model']['document']['createRoot']();const _0x4ce43c=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x4ce43c);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x5d7df2,_0x144d8a){const _0x4ccdc2=new this(_0x5d7df2,_0x144d8a);return await _0x4ccdc2['initPlugins'](),await _0x4ccdc2['ui']['init'](_0x5d7df2),await _0x4ccdc2['data']['init'](_0x4ccdc2['config']['get']('initialData')||''),_0x4ccdc2['fire']('ready'),_0x4ccdc2;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class _t extends _0x123d7e{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11bd58){function _0x344db0(_0x349f06){return _0x349f06['map'](_0x4ca492=>String['fromCharCode'](_0x4ca492))['join']('');}super(_0x11bd58),this['result']='end',_0x11bd58[_0x344db0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x344db0([0x76,0x69,0x65,0x77])][_0x344db0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x344db0([0x61,0x75,0x74,0x6f]),_0x11bd58[_0x344db0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x344db0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x344db0([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x344db0([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x344db0([0x6f,0x6b])});}}class k extends _0x123d7e{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x30b807){if(super(_0x30b807),!this['editor']['config']['get']('revisionHistory'))throw new _0x277f88('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x1b9534=>this['_showRevisionViewer']({..._0x1b9534,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x149ec0=>this['_closeRevisionViewer'](_0x149ec0)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x221b5f=>this['_restoreRevision'](_0x221b5f)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x3a9c6){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3a9c6;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x4de4da){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4de4da);}['getRevision'](_0x342f9a){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x342f9a);}['getRevisions'](_0x16d0e8){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x16d0e8||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x426c52=this['editor'],_0xef6b62=_0x2d7a6b(_0x426c52,p),_0x4dd212=_0x426c52['plugins']['get']('RevisionTracker'),_0x278fe1=_0x426c52['plugins']['get']('Users')['users'];return _0xef6b62['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0xef6b62['lazyRoots'],(_0xef6b62['plugins']['push'](_t,m,R,class extends _0x123d7e{static get['requires'](){return[m,'Users'];}['init'](){const _0x111489=this['editor']['plugins']['get']('Users');for(const _0x5f3025 of _0x278fe1)_0x5f3025['isAnonymous']||_0x111489['getUser'](_0x5f3025['id'])||_0x111489['addUser'](_0x5f3025);const _0x3f5f27=_0x4dd212['repository']['getRevisions']();let _0x2871da=null;const _0x5ea4fc=this['editor']['plugins']['get']('RevisionViewer');_0x5ea4fc['adapter']=_0x4dd212['adapter'],_0x5ea4fc['bind']('isEnabled')['to'](_0x4dd212),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x426c52,'isReadOnly',_0xc8e519=>!_0xc8e519);for(const _0x221c96 of _0x3f5f27){const _0x4f3f56=null===_0x221c96['creator'];if(_0x4f3f56&&_0x221c96['toVersion']===_0x221c96['fromVersion'])continue;const _0x4813c3=_0x221c96['toJSON']();_0x5ea4fc['addRevisionData'](_0x4813c3,(_0x2f9e30,_0x527b30,_0x1ddb99)=>{if(_0x4f3f56){if(_0x2871da)_0x2871da['_update'](_0x2f9e30,_0x527b30);else{if(!_0x527b30){const _0xebfa07=_0x1ddb99['toJSON']();_0xebfa07['id']=_0x978a72(),_0x4dd212['saveRevision'](_0xebfa07,_0x1ddb99['toVersion'])['then'](_0x30a217=>{_0x2871da=_0x30a217;});}}}else _0x221c96['_update'](_0x2f9e30,_0x527b30);});}}},d),_0xef6b62);}['_enhanceShowRevisionViewerCallback'](){const _0x14cdc8=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x2f3b40=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x1804ab=this['editor']['plugins']['get']('Autosave');await _0x1804ab['save']();}else await _0x2f3b40['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x343220=this['editor']['plugins']['get']('Dialog');_0x343220['isOpen']&&_0x343220['hide']();}const _0x1a8566=this['_getRevisionViewerEditorConfig']();return _0x14cdc8(_0x1a8566)['then'](_0x3801fd=>{return(this['_viewerEditor']=_0x3801fd,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'),_0x3801fd);})['catch'](_0x472114=>(console['error'](_0x472114),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xaa3530=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'](),_0xaa3530(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x1ac648=this['editor']['plugins']['get']('Annotations');_0x1ac648['refreshVisibility'](),_0x1ac648['refreshPositioning']();}})));}['_showRevisionViewer'](_0x188a63){const _0x579e02=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x582b58=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3f3e1b=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x3f3e1b,_0x188a63)['then'](_0x2fd7ac=>(_0x582b58['style']['display']='block',_0x579e02['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2fd7ac));}['_closeRevisionViewer'](_0x2ee613){const _0x4f6a2e=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x4f6a2e['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x2ee613['destroy']();}async['_restoreRevision'](_0x55008b){const _0x621c7c=this['editor'],_0x2f3b27=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x1d675a=_0x621c7c['plugins']['get']('RevisionTracker'),_0x167236=_0x621c7c['plugins']['get']('RevisionHistoryUtils'),_0x45e8cc=_0x2f3b27['repository']['getRevision'](_0x55008b);let _0x5cacc9,_0x585a63,_0x27f1ef;try{await _0x167236['loadRevisionData'](_0x45e8cc,this['adapter']),_0x5cacc9=_0x167236['getRevisionDocumentData'](_0x45e8cc),_0x585a63=_0x167236['getRevisionRootsAttributes'](_0x45e8cc);}catch(_0x28e1ef){return void console['error'](_0x28e1ef);}_0x621c7c['model']['change'](_0x2d5288=>{for(const _0x22c035 of Array['from'](_0x621c7c['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2d5288['removeMarker'](_0x22c035);}),_0x2f3b27['isReady']=!0x1,_0x621c7c['model']['enqueueChange'](_0x2ec454=>{_0x2ec454['setSelection'](null),_0x2ec454['removeSelectionAttribute'](_0x621c7c['model']['document']['selection']['getAttributeKeys']());const _0x5ec7e6=Object['keys'](_0x5cacc9);for(const _0xd97471 of _0x621c7c['model']['document']['roots'])'$graveyard'!=_0xd97471['rootName']&&_0xd97471['isAttached']()&&!_0x5ec7e6['includes'](_0xd97471['rootName'])&&_0x2ec454['detachRoot'](_0xd97471);for(const _0x57def8 of _0x5ec7e6){let _0x278ab9=_0x621c7c['model']['document']['getRoot'](_0x57def8);_0x278ab9&&_0x278ab9['isAttached']()||(_0x278ab9=_0x2ec454['addRoot'](_0x57def8));const _0x2b51ba=_0x585a63[_0x57def8],_0x2c7b57=Object['keys'](_0x2b51ba),_0x33a7b3=_0x5cacc9[_0x57def8];for(const _0x3a8d15 of _0x278ab9['getAttributeKeys']())_0x2c7b57['includes'](_0x3a8d15)||_0x2ec454['removeAttribute'](_0x3a8d15,_0x278ab9);for(const _0x44904c of _0x2c7b57)_0x2ec454['setAttribute'](_0x44904c,_0x585a63[_0x57def8][_0x44904c],_0x278ab9);_0x2ec454['remove'](_0x2ec454['createRangeIn'](_0x278ab9)),_0x2ec454['insert'](_0x621c7c['data']['parse'](_0x33a7b3,_0x278ab9),_0x278ab9,0x0);}});const _0x519713=g(_0x621c7c['locale'],'Restored');if(_0x45e8cc['name'])_0x27f1ef=-0x1==_0x45e8cc['name']['indexOf'](_0x519713)?_0x519713+':\x20'+_0x45e8cc['name']:_0x45e8cc['name'];else _0x27f1ef=_0x519713+':\x20'+(_0x45e8cc['createdAt']['toLocaleDateString'](_0x621c7c['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x45e8cc['createdAt']['toLocaleTimeString'](_0x621c7c['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x1d675a['saveRevision']({'name':_0x27f1ef}),_0x2f3b27['isReady']=!0x0,_0x621c7c['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,ge as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};
|
|
28
|
+
pt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(_0x1a050b){super(_0x1a050b),this['_revisionViewer']=_0x1a050b['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1c439a=this['_revisionsRepository']['_revisions'],_0x1a1bb7=this['_createRevisionActions'](),_0xfc19b8=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ni(this['editor']['locale'],_0x1c439a,_0x1a1bb7,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',(_0x3cd933,_0x8ad500)=>{_0x8ad500['revisionViews']['on']('add',(_0xf07806,_0x25d6f5)=>{_0x25d6f5['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)),_0xfc19b8['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x17e511=this['_revisionsRepository']['getRevision'](0x0);if(_0x17e511){const _0x2f9509=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x17e511['id']);this['_revisionViewer']['compare'](_0x17e511,_0x2f9509);}}['_handleRevisionSelected'](_0x390205,_0x5750f7){const _0x448516=this['_revisionsRepository']['getRevision'](_0x5750f7['id']),_0x535546=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x448516['id']);this['_revisionViewer']['compare'](_0x448516,_0x535546);}['_handleRevisionSetName'](_0x336389,_0x4a16f6){this['_revisionsRepository']['getRevision'](_0x4a16f6['id'])['setName'](_0x4a16f6['name']);}['_handleDiffChange'](_0x1426bd,_0x4aa070,_0x261b86){const _0x5baf8a=this['_revisionsRepository']['getRevisionsInDiff'](_0x261b86);_0x5baf8a['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x5baf8a),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x5baf8a[0x0]));}['_createRevisionActions'](){const _0x79478e=this['editor'],_0xdd4711=d['availableRevisionActions'],_0x5f4bc6=_0x79478e['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x5f4bc6['length'])return _0x5f4bc6['map'](_0x3b755f=>{const _0x1765f9='string'==typeof _0x3b755f?Object['assign']({},_0xdd4711[_0x3b755f]):_0x3b755f;return _0x1765f9['action']=_0x1765f9['action']['bind'](this,_0x79478e),_0x1765f9['isVisible']&&(_0x1765f9['isVisible']=_0x1765f9['isVisible']['bind'](this,_0x79478e)),_0x1765f9;});}}function pt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x65d560},_0x258540)=>{const _0xbef2ae=_0x65d560['get'](m),_0x467bd8=_0xbef2ae['repository'];let _0x92f4b7=_0xbef2ae['diff']['newRevisionId'],_0x1984c1=_0x258540['id'];_0x467bd8['getIndex'](_0x92f4b7)>_0x467bd8['getIndex'](_0x1984c1)&&([_0x92f4b7,_0x1984c1]=[_0x1984c1,_0x92f4b7]),_0xbef2ae['compare'](_0x92f4b7,_0x1984c1);},'isVisible':({plugins:_0x515b48},_0x4a1d65)=>{const _0x48f54e=_0x515b48['get'](m);return!(_0x48f54e['repository']['getRevisionsInDiff'](_0x48f54e['diff'])['length']>0x2)&&!_0x4a1d65['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4a62e6,{id:_0x1dec0c})=>{_0x4a62e6['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1dec0c);},'isVisible':({plugins:_0x2f5ba7},_0x6cbc19)=>!!_0x2f5ba7['get'](m)['repository']['getLaterVisibleRevision'](_0x6cbc19['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4f5cf5},{id:_0x5c28d8,revisionNameView:_0x5e0a92})=>{const _0x1aea61=_0x4f5cf5['get'](m),_0x1fe389=_0x1aea61['repository']['getEarlierVisibleRevision'](_0x5c28d8);_0x1aea61['compare'](_0x5c28d8,_0x1fe389),_0x5e0a92['focus'](),_0x5e0a92['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x2102a3,_0x149a84){super(_0x2102a3),this['_view']=_0x149a84,this['_toolbarConfig']=et(_0x2102a3['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x58823c){const _0x5d96a4=this['editor'],_0x22ee8d=this['view'],_0x3ac76c=_0x5d96a4['editing']['view'],_0x263ed4=_0x22ee8d['editable'],_0x493cae=_0x3ac76c['document']['getRoot']();_0x263ed4['name']=_0x493cae['rootName'],_0x22ee8d['render']();const _0x3f338e=_0x263ed4['element'];this['setEditableElement'](_0x263ed4['name'],_0x3f338e),_0x22ee8d['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3ac76c['attachDomRoot'](_0x3f338e),this['_elementReplacer']['replace'](_0x58823c,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0xf90fd7=this['view'],_0x25b944=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x25b944['detachDomRoot'](_0xf90fd7['editable']['name']),_0xf90fd7['destroy']();}['_initToolbar'](){const _0x349b2c=this['view'];_0x349b2c['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x349b2c['stickyPanel']['limiterElement']=_0x349b2c['element'],_0x349b2c['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x467515})=>_0x467515),_0x349b2c['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x349b2c['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0xf0d7e,_0x41e409,_0x3c83e2={}){super(_0xf0d7e),this['stickyPanel']=new ht(_0xf0d7e),this['toolbar']=new dt(_0xf0d7e,{'shouldGroupWhenFull':_0x3c83e2['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0xf0d7e,_0x41e409);}['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
|
+
_0x35fb1a(_0x3836ac){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x497642,_0x3f8a05){super(_0x3f8a05),this['sourceElement']=_0x497642,this['model']['document']['createRoot']();const _0x35629a=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x35629a);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0xf9cfa,_0x2b3e7c){const _0x8464cc=new this(_0xf9cfa,_0x2b3e7c);return await _0x8464cc['initPlugins'](),await _0x8464cc['ui']['init'](_0xf9cfa),await _0x8464cc['data']['init'](_0x8464cc['config']['get']('initialData')||''),_0x8464cc['fire']('ready'),_0x8464cc;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class _t extends _0x15b8d5{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53c28a){function _0x44ea8e(_0x4a4378){return _0x4a4378['map'](_0x2e1de5=>String['fromCharCode'](_0x2e1de5))['join']('');}super(_0x53c28a),this['result']='end',_0x53c28a[_0x44ea8e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x44ea8e([0x76,0x69,0x65,0x77])][_0x44ea8e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x44ea8e([0x61,0x75,0x74,0x6f]),_0x53c28a[_0x44ea8e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x44ea8e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x44ea8e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x44ea8e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x44ea8e([0x6f,0x6b])});}}class k extends _0x15b8d5{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x3c1ecd){if(super(_0x3c1ecd),!this['editor']['config']['get']('revisionHistory'))throw new _0x10c13b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x45053a=>this['_showRevisionViewer']({..._0x45053a,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x3b76b4=>this['_closeRevisionViewer'](_0x3b76b4)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xa2641f=>this['_restoreRevision'](_0xa2641f)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x3e223e){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3e223e;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0xde57d3){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0xde57d3);}['getRevision'](_0x2f7f31){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x2f7f31);}['getRevisions'](_0x1e4df9){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1e4df9||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x340015=this['editor'],_0x2f4bcb=_0x339560(_0x340015,p),_0x30b7d8=_0x340015['plugins']['get']('RevisionTracker'),_0x2fc631=_0x340015['plugins']['get']('Users')['users'];return _0x2f4bcb['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2f4bcb['lazyRoots'],(_0x2f4bcb['plugins']['push'](_t,m,R,class extends _0x15b8d5{static get['requires'](){return[m,'Users'];}['init'](){const _0x1803ca=this['editor']['plugins']['get']('Users');for(const _0x47404c of _0x2fc631)_0x47404c['isAnonymous']||_0x1803ca['getUser'](_0x47404c['id'])||_0x1803ca['addUser'](_0x47404c);const _0x4c8290=_0x30b7d8['repository']['getRevisions']();let _0x16e17=null;const _0x28318b=this['editor']['plugins']['get']('RevisionViewer');_0x28318b['adapter']=_0x30b7d8['adapter'],_0x28318b['bind']('isEnabled')['to'](_0x30b7d8),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x340015,'isReadOnly',_0x201e8c=>!_0x201e8c);for(const _0x33de68 of _0x4c8290){const _0x38612d=null===_0x33de68['creator'];if(_0x38612d&&_0x33de68['toVersion']===_0x33de68['fromVersion'])continue;const _0x5037dd=_0x33de68['toJSON']();_0x28318b['addRevisionData'](_0x5037dd,(_0x2d3134,_0x1e7a2f,_0x385c00)=>{if(_0x38612d){if(_0x16e17)_0x16e17['_update'](_0x2d3134,_0x1e7a2f);else{if(!_0x1e7a2f){const _0x3a8814=_0x385c00['toJSON']();_0x3a8814['id']=_0x1636c5(),_0x30b7d8['saveRevision'](_0x3a8814,_0x385c00['toVersion'])['then'](_0xd70b07=>{_0x16e17=_0xd70b07;});}}}else _0x33de68['_update'](_0x2d3134,_0x1e7a2f);});}}},d),_0x2f4bcb);}['_enhanceShowRevisionViewerCallback'](){const _0xfeb67d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xa8ead3=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x5e5e5f=this['editor']['plugins']['get']('Autosave');await _0x5e5e5f['save']();}else await _0xa8ead3['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x529d06=this['editor']['plugins']['get']('Dialog');_0x529d06['isOpen']&&_0x529d06['hide']();}const _0xaaa628=this['_getRevisionViewerEditorConfig']();return _0xfeb67d(_0xaaa628)['then'](_0x514eaa=>{return(this['_viewerEditor']=_0x514eaa,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'),_0x514eaa);})['catch'](_0x17d47b=>(console['error'](_0x17d47b),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4e5950=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'](),_0x4e5950(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2d9838=this['editor']['plugins']['get']('Annotations');_0x2d9838['refreshVisibility'](),_0x2d9838['refreshPositioning']();}})));}['_showRevisionViewer'](_0x16f17a){const _0xc4003e=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x179714=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x155ee1=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x155ee1,_0x16f17a)['then'](_0x2e3798=>(_0x179714['style']['display']='block',_0xc4003e['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2e3798));}['_closeRevisionViewer'](_0xe1ea20){const _0x4da8f4=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x4da8f4['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xe1ea20['destroy']();}async['_restoreRevision'](_0x174ba0){const _0x2d1107=this['editor'],_0x17be4f=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x5098b5=_0x2d1107['plugins']['get']('RevisionTracker'),_0x458f40=_0x2d1107['plugins']['get']('RevisionHistoryUtils'),_0x59f1b4=_0x17be4f['repository']['getRevision'](_0x174ba0);let _0x2d4799,_0x3d039e,_0x13a7af;try{await _0x458f40['loadRevisionData'](_0x59f1b4,this['adapter']),_0x2d4799=_0x458f40['getRevisionDocumentData'](_0x59f1b4),_0x3d039e=_0x458f40['getRevisionRootsAttributes'](_0x59f1b4);}catch(_0x4b9269){return void console['error'](_0x4b9269);}_0x2d1107['model']['change'](_0x432c1e=>{for(const _0xc64b06 of Array['from'](_0x2d1107['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x432c1e['removeMarker'](_0xc64b06);}),_0x17be4f['isReady']=!0x1,_0x2d1107['model']['enqueueChange'](_0x194a19=>{_0x194a19['setSelection'](null),_0x194a19['removeSelectionAttribute'](_0x2d1107['model']['document']['selection']['getAttributeKeys']());const _0x407b08=Object['keys'](_0x2d4799);for(const _0x3f169b of _0x2d1107['model']['document']['roots'])'$graveyard'!=_0x3f169b['rootName']&&_0x3f169b['isAttached']()&&!_0x407b08['includes'](_0x3f169b['rootName'])&&_0x194a19['detachRoot'](_0x3f169b);for(const _0x150574 of _0x407b08){let _0x40cd62=_0x2d1107['model']['document']['getRoot'](_0x150574);_0x40cd62&&_0x40cd62['isAttached']()||(_0x40cd62=_0x194a19['addRoot'](_0x150574));const _0x1b2462=_0x3d039e[_0x150574],_0x1796e9=Object['keys'](_0x1b2462),_0x2d7f1f=_0x2d4799[_0x150574];for(const _0x19a82c of _0x40cd62['getAttributeKeys']())_0x1796e9['includes'](_0x19a82c)||_0x194a19['removeAttribute'](_0x19a82c,_0x40cd62);for(const _0x1fc001 of _0x1796e9)_0x194a19['setAttribute'](_0x1fc001,_0x3d039e[_0x150574][_0x1fc001],_0x40cd62);_0x194a19['remove'](_0x194a19['createRangeIn'](_0x40cd62)),_0x194a19['insert'](_0x2d1107['data']['parse'](_0x2d7f1f,_0x40cd62),_0x40cd62,0x0);}});const _0x314855=g(_0x2d1107['locale'],'Restored');if(_0x59f1b4['name'])_0x13a7af=-0x1==_0x59f1b4['name']['indexOf'](_0x314855)?_0x314855+':\x20'+_0x59f1b4['name']:_0x59f1b4['name'];else _0x13a7af=_0x314855+':\x20'+(_0x59f1b4['createdAt']['toLocaleDateString'](_0x2d1107['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x59f1b4['createdAt']['toLocaleTimeString'](_0x2d1107['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x5098b5['saveRevision']({'name':_0x13a7af}),_0x17be4f['isReady']=!0x0,_0x2d1107['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,ge as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};
|