@ckeditor/ckeditor5-revision-history 48.2.0-alpha.4 → 48.2.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x3f7e8f(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1fa759){super(),this['id']=_0x1fa759['id']||_0x13bc90(),this['creator']=_0x1fa759['creator']||null,this['authors']=_0x1fa759['authors']||[],this['diffData']=_0x1fa759['diffData']||null,this['toVersion']=_0x1fa759['toVersion']||0x0,this['fromVersion']=_0x1fa759['fromVersion']||0x0,this['set']('name',_0x1fa759['name']||''),this['set']('createdAt',_0x1fa759['createdAt']||new Date()),this['set']('attributes',_0x1fa759['attributes']||{});}['setName'](_0x2b8584){this['_update']({'name':_0x2b8584});}['setAttribute'](_0x4e7589,_0x19bc6b){const _0x46f420=_0x2a882c(this['attributes']);_0x407876(_0x46f420,_0x4e7589,_0x19bc6b),this['_update']({'attributes':_0x46f420});}['removeAttribute'](_0x42b65b){const _0x59a0d6=_0x2a882c(this['attributes']);_0x23291e(_0x59a0d6,_0x42b65b),this['_update']({'attributes':_0x59a0d6});}['_update'](_0x1256e9,_0x5eb184=!0x1){let _0x24aef4=!0x1;const _0x12ff43={'id':this['id']},_0x430317=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x199072 of _0x430317){const _0x301fc3=_0x1256e9[_0x199072];void 0x0!==_0x301fc3&&_0x301fc3!==this[_0x199072]&&(this[_0x199072]=_0x301fc3,_0x12ff43[_0x199072]=_0x301fc3,_0x24aef4=!0x0);}_0x24aef4&&(_0x12ff43['authors']&&(_0x12ff43['authorsIds']=_0x12ff43['authors']['map'](_0x24a95f=>_0x24a95f['id']),delete _0x12ff43['authors']),this['fire']('_update',_0x12ff43,_0x5eb184));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2a36b2=>_0x2a36b2['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x20daab{['_revisions'];static get['requires'](){return[_0xf95694];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x101366){super(_0x101366),this['_revisions']=new _0x2d3a61();}['afterInit'](){!async function(_0x30b789){const _0x3cb577=_0x35ba46([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x574bd2=0xeb829,_0x21dbc2=0x359e09b0,_0x300ddf=0x35998210^_0x21dbc2,_0xb9adeb=window[_0x35ba46([0x44,0x61,0x74,0x65])][_0x35ba46([0x6e,0x6f,0x77])](),_0x552209=_0x30b789[_0x35ba46([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1a03e2=new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4a67b1=>{_0x552209[_0x35ba46([0x6f,0x6e,0x63,0x65])](_0x35ba46([0x72,0x65,0x61,0x64,0x79]),_0x4a67b1);}),_0x273ecf={[_0x35ba46([0x6b,0x74,0x79])]:_0x35ba46([0x45,0x43]),[_0x35ba46([0x75,0x73,0x65])]:_0x35ba46([0x73,0x69,0x67]),[_0x35ba46([0x63,0x72,0x76])]:_0x35ba46([0x50,0x2d,0x32,0x35,0x36]),[_0x35ba46([0x78])]:_0x35ba46([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]),[_0x35ba46([0x79])]:_0x35ba46([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]),[_0x35ba46([0x61,0x6c,0x67])]:_0x35ba46([0x45,0x53,0x32,0x35,0x36])},_0x32bd4d=_0x552209[_0x35ba46([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x35ba46([0x67,0x65,0x74])](_0x35ba46([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x316ea0(){let _0xfeb1d5,_0x50c404=null,_0x49656a=null;try{if(_0x32bd4d==_0x35ba46([0x47,0x50,0x4c]))return _0x35ba46([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xfeb1d5=_0x3b459e(),!_0xfeb1d5)return _0x35ba46([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xfeb1d5[_0x35ba46([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x49656a=_0x38a572(_0xfeb1d5[_0x35ba46([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xfeb1d5[_0x35ba46([0x6a,0x74,0x69])])),await _0x57cad8()?_0xc03bdc()?_0x136a75()?_0x35ba46([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x598029()?(_0xfeb1d5[_0x35ba46([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x35ba46([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x50c404=_0x5159a0(_0x35ba46([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5a737d()):_0x35ba46([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x35ba46([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x35ba46([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x35ba46([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x136a75(){const _0x21f12c=[_0x35ba46([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x35ba46([0x74,0x72,0x69,0x61,0x6c])][_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xfeb1d5[_0x35ba46([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xb9adeb/0x3e8:0xe10*_0x300ddf;return _0xfeb1d5[_0x35ba46([0x65,0x78,0x70])]<_0x21f12c;}function _0xc03bdc(){const _0x177c35=_0xfeb1d5[_0x35ba46([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x177c35)return!0x1;if(_0x177c35[_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35ba46([0x2a])))return!0x0;if(_0x177c35[_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35ba46([0x52,0x48])))return!0x0;if(_0x177c35[_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35ba46([0x52,0x52,0x48]))){if(_0x13e881())return!0x0;if(_0x3b2a32()||_0x2e6b80())return!0x0;}return!0x1;}function _0x598029(){const _0x3028b7=_0xfeb1d5[_0x35ba46([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3028b7||0x0==_0x3028b7[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x548336}=new URL(window[_0x35ba46([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3028b7[_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x548336))return!0x0;const _0xc9b9cf=_0x548336[_0x35ba46([0x73,0x70,0x6c,0x69,0x74])](_0x35ba46([0x2e]));return _0x3028b7[_0x35ba46([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4e9cfb=>_0x4e9cfb[_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35ba46([0x2a])))[_0x35ba46([0x6d,0x61,0x70])](_0x13ad5c=>_0x13ad5c[_0x35ba46([0x73,0x70,0x6c,0x69,0x74])](_0x35ba46([0x2e])))[_0x35ba46([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b128d=>_0x5b128d[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xc9b9cf[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x35ba46([0x6d,0x61,0x70])](_0x3bbf9a=>Array(_0xc9b9cf[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3bbf9a[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x35ba46([0x66,0x69,0x6c,0x6c])](_0x3bbf9a[0x0]===_0x35ba46([0x2a])?_0x35ba46([0x2a]):'')[_0x35ba46([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3bbf9a))[_0x35ba46([0x73,0x6f,0x6d,0x65])](_0x4d4f14=>_0xc9b9cf[_0x35ba46([0x65,0x76,0x65,0x72,0x79])]((_0x48d300,_0x50a4d2)=>_0x4d4f14[_0x50a4d2]===_0x48d300||_0x4d4f14[_0x50a4d2]===_0x35ba46([0x2a])));}function _0x5a737d(){return _0x50c404&&_0x49656a?new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x243eaf,_0x1371eb)=>{_0x50c404[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x243eaf,_0x1371eb),_0x49656a[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x1adcbd=>{_0x1adcbd!=_0x35ba46([0x56,0x61,0x6c,0x69,0x64])&&_0x243eaf(_0x1adcbd);},_0x1371eb);}):_0x50c404||_0x49656a||_0x35ba46([0x56,0x61,0x6c,0x69,0x64]);}}function _0x38a572(_0x169452,_0x5aab95){return new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x149137=>{if(_0x2ae996())return _0x149137(_0x35ba46([0x56,0x61,0x6c,0x69,0x64]));_0xb30fd8(),_0x552209[_0x35ba46([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x35ba46([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x11af57=!0x1;const _0x1e5758=_0x13bc90();function _0xbcbae(_0x308e7e){return!!_0x308e7e&&(typeof _0x308e7e===_0x35ba46([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x308e7e===_0x35ba46([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x308e7e[_0x35ba46([0x74,0x68,0x65,0x6e])]===_0x35ba46([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x308e7e[_0x35ba46([0x63,0x61,0x74,0x63,0x68])]===_0x35ba46([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x462000(_0x5d1ac5){_0x3714f1(_0x5d1ac5)[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x35f4b7=>{if(!_0x35f4b7||_0x35f4b7[_0x35ba46([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x35ba46([0x6f,0x6b]))return _0x35ba46([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1cbb92(_0x2b834b(_0x1e5758+_0x5aab95))!=_0x35f4b7[_0x35ba46([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x35ba46([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x35ba46([0x56,0x61,0x6c,0x69,0x64]);})[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x11c269=>(_0x163431(),_0x11c269),()=>{const _0x3efc2a=_0x5a5ef1();return null==_0x3efc2a?(_0x163431(),_0x35ba46([0x56,0x61,0x6c,0x69,0x64])):_0x35ba46(_0xb9adeb-_0x3efc2a>(0x11928db0^_0x21dbc2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x149137)[_0x35ba46([0x63,0x61,0x74,0x63,0x68])](()=>{_0x149137(_0x35ba46([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x19d123=0x35a8e730^_0x21dbc2;function _0x163431(){const _0x7b0266=_0x35ba46([0x6c,0x6c,0x63,0x74,0x2d])+_0x1cbb92(_0x2b834b(_0x169452)),_0x2360f7=_0x41ce1b(_0x1cbb92(window[_0x35ba46([0x4d,0x61,0x74,0x68])][_0x35ba46([0x63,0x65,0x69,0x6c])](_0xb9adeb/_0x19d123)));window[_0x35ba46([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x35ba46([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x7b0266,_0x2360f7);}function _0x5a5ef1(){const _0x24ce51=_0x35ba46([0x6c,0x6c,0x63,0x74,0x2d])+_0x1cbb92(_0x2b834b(_0x169452)),_0x322c49=window[_0x35ba46([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x35ba46([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x24ce51);return _0x322c49?window[_0x35ba46([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x41ce1b(_0x322c49),0x10)*_0x19d123:null;}function _0x3714f1(_0x40459a){return new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5bd2d7,_0xa1b6b3)=>{_0x40459a[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x5bd2d7,_0xa1b6b3),window[_0x35ba46([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xa1b6b3,0x359fdd70^_0x21dbc2);});}}_0x552209[_0x35ba46([0x6f,0x6e])](_0x35ba46([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5c9ab6,_0x86cc64)=>{if(_0x86cc64[0x0]!=_0x169452)return _0x149137(_0x35ba46([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x86cc64[0x1]={..._0x86cc64[0x1],[_0x35ba46([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1e5758};},{[_0x35ba46([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x35ba46([0x68,0x69,0x67,0x68])}),_0x552209[_0x35ba46([0x6f,0x6e])](_0x35ba46([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x303c07=>{_0xbcbae(_0x303c07[_0x35ba46([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x11af57=!0x0,_0x462000(_0x303c07[_0x35ba46([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x35ba46([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x35ba46([0x6c,0x6f,0x77])}),_0x1a03e2[_0x35ba46([0x74,0x68,0x65,0x6e])](()=>{_0x11af57||_0x149137(_0x35ba46([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2ae996(){return _0x552209[_0x35ba46([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x35ba46([0x76,0x69,0x65,0x77])][_0x35ba46([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x35ba46([0x61,0x75,0x74,0x6f]);}function _0xb30fd8(){_0x552209[_0x35ba46([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x35ba46([0x76,0x69,0x65,0x77])][_0x35ba46([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x35ba46([0x61,0x75,0x74,0x6f]);}}function _0x5159a0(_0x294eca){const _0x22a79c=[new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xdc6d02=>setTimeout(_0xdc6d02,0x3597377c^_0x21dbc2)),_0x1a03e2[_0x35ba46([0x74,0x68,0x65,0x6e])](()=>new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e2b27=>{const _0x568505=0x359e09b7^_0x21dbc2,_0x224b07=_0x30b789[_0x35ba46([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x5f45fd(){_0x224b07[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x568505&&_0x5e2b27();}_0x5f45fd(),_0x224b07[_0x35ba46([0x6f,0x6e])](_0x35ba46([0x61,0x64,0x64]),_0x5f45fd);})),new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d5b78=>{function _0xe13dae(){for(const _0x1fa544 in window)if(window[_0x35ba46([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x35ba46([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1fa544))&&window[_0x1fa544]==_0x574bd2)return _0x3d5b78();_0x552209[_0x35ba46([0x73,0x74,0x61,0x74,0x65])]!=_0x35ba46([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x35ba46([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xe13dae,0x359e1a38^_0x21dbc2);}_0x25c932(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0xe13dae();})];return window[_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x35ba46([0x72,0x61,0x63,0x65])](_0x22a79c)[_0x35ba46([0x74,0x68,0x65,0x6e])](()=>_0x294eca);}async function _0x2fd58c(){if(await _0x1a03e2,_0x25c932(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x46d478=_0x30b789[_0x35ba46([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x5ad2a5=_0x30b789[_0x35ba46([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])](_0x46d478[_0x35ba46([0x69,0x64])]),_0x4dcd27=_0x201a2c(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4dcd27[_0x35ba46([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x46d478['id'],_0x5ad2a5?_0x5ad2a5['id']:null,!0x0),_0x4dcd27[_0x35ba46([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x35ba46([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4dcd27[_0x35ba46([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4dcd27[_0x35ba46([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x28a084,void(_0x4dcd27[_0x35ba46([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x28a084);}if(_0x25c932(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x424f92=_0x201a2c(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x424f92[_0x35ba46([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x35ba46([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x424f92[_0x35ba46([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x424f92[_0x35ba46([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x28a084,_0x424f92[_0x35ba46([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x28a084;}_0x552209[_0x35ba46([0x6d,0x6f,0x64,0x65,0x6c])][_0x35ba46([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x28a084,_0x552209[_0x35ba46([0x6d,0x6f,0x64,0x65,0x6c])][_0x35ba46([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x28a084,_0x552209[_0x35ba46([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x35ba46([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x13e881(){return _0x25c932(_0x35ba46([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x201a2c(_0x35ba46([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x35ba46([0x73,0x74,0x61,0x74,0x65])]==_0x35ba46([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3b2a32(){return _0x25c932(_0x35ba46([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 _0x2e6b80(){return _0x25c932(_0x35ba46([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xa100c9(_0x18f149){const _0x1aaa73=_0x443e54();_0x552209[_0x1aaa73]=_0x35ba46([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])+_0x18f149,_0x18f149[_0x35ba46([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x35ba46([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x443e54()]=_0x574bd2),_0x18f149!=_0x35ba46([0x56,0x61,0x6c,0x69,0x64])&&_0x2fd58c();}function _0x443e54(){const _0x5d6fe0=window[_0x35ba46([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x35ba46([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x35ba46([0x6e,0x6f,0x77])]())[_0x35ba46([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x35ba46([0x2e]),'');let _0x135e89=_0x35ba46([0x76]);for(let _0x38b2b8=0x0;_0x38b2b8<_0x5d6fe0[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x38b2b8+=0x2){let _0x41a08c=window[_0x35ba46([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d6fe0[_0x35ba46([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x38b2b8,_0x38b2b8+0x2));_0x41a08c>=_0x3cb577[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x41a08c-=_0x3cb577[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x135e89+=_0x3cb577[_0x41a08c];}return _0x135e89;}function _0x3b459e(){const _0x3b5ace=_0x32bd4d[_0x35ba46([0x73,0x70,0x6c,0x69,0x74])](_0x35ba46([0x2e]));if(0x3!=_0x3b5ace[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3f8797(_0x3b5ace[0x1]);function _0x3f8797(_0x531761){const _0x57aad4=_0x398ecb(_0x531761);return _0x57aad4&&_0x4cad37()?_0x57aad4:null;function _0x4cad37(){const _0x2930fe=_0x57aad4[_0x35ba46([0x6a,0x74,0x69])],_0xc2f5f1=window[_0x35ba46([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2930fe[_0x35ba46([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2930fe[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x15c7ed={..._0x57aad4,[_0x35ba46([0x6a,0x74,0x69])]:_0x2930fe[_0x35ba46([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2930fe[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x15c7ed[_0x35ba46([0x76,0x63])],_0x2b834b(_0x15c7ed)==_0xc2f5f1;}}}async function _0x57cad8(){let _0x14c435=!0x0;try{const _0x7ed29d=_0x32bd4d[_0x35ba46([0x73,0x70,0x6c,0x69,0x74])](_0x35ba46([0x2e])),[_0x19ac06,_0x28fe60,_0x89d667]=_0x7ed29d;return _0x58c19d(_0x19ac06),await _0x1ca3bf(_0x19ac06,_0x28fe60,_0x89d667),_0x14c435;}catch{return!0x1;}function _0x58c19d(_0x5942a0){const _0x5ce3cf=_0x398ecb(_0x5942a0);_0x5ce3cf&&_0x5ce3cf[_0x35ba46([0x61,0x6c,0x67])]==_0x35ba46([0x45,0x53,0x32,0x35,0x36])||(_0x14c435=!0x1);}async function _0x1ca3bf(_0x58b3c7,_0x1beaff,_0x23f525){const _0x10db89=window[_0x35ba46([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x35ba46([0x66,0x72,0x6f,0x6d])](_0x485449(_0x23f525),_0x300d07=>_0x300d07[_0x35ba46([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x429161=new window[(_0x35ba46([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x35ba46([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x58b3c7+_0x35ba46([0x2e])+_0x1beaff),_0x1af728=window[_0x35ba46([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x35ba46([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1af728)return;const _0x6393f9=await _0x1af728[_0x35ba46([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x35ba46([0x6a,0x77,0x6b]),_0x273ecf,{[_0x35ba46([0x6e,0x61,0x6d,0x65])]:_0x35ba46([0x45,0x43,0x44,0x53,0x41]),[_0x35ba46([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x35ba46([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x35ba46([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1af728[_0x35ba46([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x35ba46([0x6e,0x61,0x6d,0x65])]:_0x35ba46([0x45,0x43,0x44,0x53,0x41]),[_0x35ba46([0x68,0x61,0x73,0x68])]:{[_0x35ba46([0x6e,0x61,0x6d,0x65])]:_0x35ba46([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x6393f9,_0x10db89,_0x429161)||(_0x14c435=!0x1);}}function _0x398ecb(_0x2dce29){return _0x2dce29[_0x35ba46([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x35ba46([0x65,0x79]))?JSON[_0x35ba46([0x70,0x61,0x72,0x73,0x65])](_0x485449(_0x2dce29)):null;}function _0x485449(_0x29e253){return window[_0x35ba46([0x61,0x74,0x6f,0x62])](_0x29e253[_0x35ba46([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x35ba46([0x2b]))[_0x35ba46([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x35ba46([0x2f])));}function _0x2b834b(_0xf8e63){let _0x46314b=0x1505;function _0x4d07bc(_0x907ca3){for(let _0x18647e=0x0;_0x18647e<_0x907ca3[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x18647e++){const _0x1d89ea=_0x907ca3[_0x35ba46([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x18647e);_0x46314b=(_0x46314b<<0x5)+_0x46314b+_0x1d89ea,_0x46314b&=_0x46314b;}}function _0x183f90(_0x2b27a4){Array[_0x35ba46([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2b27a4)?_0x2b27a4[_0x35ba46([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x183f90):_0x2b27a4&&typeof _0x2b27a4==_0x35ba46([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x35ba46([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2b27a4)[_0x35ba46([0x73,0x6f,0x72,0x74])]()[_0x35ba46([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1a596c,_0x4b9008])=>{_0x4d07bc(_0x1a596c),_0x183f90(_0x4b9008);}):_0x4d07bc(window[_0x35ba46([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2b27a4));}return _0x183f90(_0xf8e63),_0x46314b>>>0x0;}function _0x1cbb92(_0x3816b7){return _0x3816b7[_0x35ba46([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x35ba46([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x35ba46([0x30]));}function _0x41ce1b(_0x345a4a){return _0x345a4a[_0x35ba46([0x73,0x70,0x6c,0x69,0x74])]('')[_0x35ba46([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x35ba46([0x6a,0x6f,0x69,0x6e])]('');}function _0x25c932(_0x393fbe){return _0x552209[_0x35ba46([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x35ba46([0x68,0x61,0x73])](_0x393fbe);}function _0x201a2c(_0x57a7f8){return _0x552209[_0x35ba46([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x35ba46([0x67,0x65,0x74])](_0x57a7f8);}function _0x28a084(){}function _0x35ba46(_0x4c487b){return _0x4c487b['map'](_0x117ccc=>String['fromCharCode'](_0x117ccc))['join']('');}_0xa100c9(await _0x316ea0());}(this);}['createRevision'](_0x525a61){const _0x3d03c0=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x525a61['id'],'name':_0x525a61['name'],'creator':_0x525a61['creatorId']?_0x3d03c0['getUser'](_0x525a61['creatorId']):null,'diffData':_0x525a61['diffData']||_0x525a61['data'],'authors':_0x525a61['authorsIds']['map'](_0x2c8ece=>_0x3d03c0['getUser'](_0x2c8ece)),'createdAt':new Date(_0x525a61['createdAt']),'attributes':_0x525a61['attributes'],'fromVersion':_0x525a61['fromVersion'],'toVersion':_0x525a61['toVersion']});}['addRevision'](_0x5e5462,_0x4ea53e=0x0){this['_revisions']['add'](_0x5e5462,_0x4ea53e);}['getRevision'](_0x541d08){return this['_revisions']['get'](_0x541d08);}['getRevisions'](_0x310612={'toJSON':!0x1}){const _0x41c7ef=Array['from'](this['_revisions']);return _0x41c7ef['reverse'](),_0x310612['toJSON']?_0x41c7ef['map'](_0x26b6b5=>_0x26b6b5['toJSON']()):_0x41c7ef;}['getIndex'](_0x2b9ad3){return this['_revisions']['getIndex'](_0x2b9ad3);}['getEarlierVisibleRevision'](_0x421149){const [,_0x36d430]=this['getRevisionsIterator'](_0x421149,{'direction':'earlier'});return _0x36d430;}['getLaterVisibleRevision'](_0xbe609c){const [,_0x42277e]=this['getRevisionsIterator'](_0xbe609c,{'direction':'later'});return _0x42277e;}['getRevisionsInDiff'](_0x42b364){const _0x25117a=[];for(const _0x3c6bdc of this['getRevisionsIterator'](_0x42b364['newRevisionId']))if(_0x25117a['push'](_0x3c6bdc),_0x3c6bdc['id']===_0x42b364['oldRevisionId'])break;return _0x25117a;}*['getRevisionsIterator'](_0x13cc6b,{direction:_0x2ce234='earlier',filter:_0x47e085=()=>!0x0}={}){const _0x286619='earlier'===_0x2ce234?0x1:-0x1;let _0x5f38bd=this['_revisions']['get'](_0x13cc6b),_0x5d6bf6=this['getIndex'](_0x5f38bd);for(yield _0x5f38bd;_0x5f38bd;){if(_0x5d6bf6+=_0x286619,_0x5f38bd=this['getRevision'](_0x5d6bf6),!_0x5f38bd)return;_0x47e085(_0x5f38bd)&&(yield _0x5f38bd);}}}class RevisionHistoryUtils extends _0x20daab{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x175b4f,'c'],[_0x1abd8e,'a'],[_0x581a07,'e'],[_0x5b2cfd,'r'],[_0x47a5a3,'u']]);['_typeCharToViewClass']=new Map([['c',_0x175b4f],['a',_0x1abd8e],['e',_0x581a07],['r',_0x5b2cfd],['u',_0x47a5a3]]);async['loadRevisionData'](_0xc87762,_0xfe643b){if(_0xc87762['diffData']||!_0xfe643b)return;const _0x38e916=this['editor']['config']['get']('collaboration.channelId'),_0x37a965=await _0xfe643b['getRevision']({'channelId':_0x38e916,'revisionId':_0xc87762['id']});_0xc87762['diffData']=_0x37a965['diffData'];}['getRevisionDocumentData'](_0x30ef81){const _0x1705a5={};for(const _0x221b3e in _0x30ef81['diffData']){if(_0x30ef81['diffData'][_0x221b3e]['attachChange']&&!_0x30ef81['diffData'][_0x221b3e]['attachChange']['isAttached'])continue;const _0x5f2734=this['_removeRevisionMarkers'](JSON['parse'](_0x30ef81['diffData'][_0x221b3e]['insertions'])),_0xf9e022=this['editor']['editing']['view']['document'],_0x37a232=new _0x4cca8f(_0xf9e022,_0x5f2734['map'](_0x3b9622=>this['_getViewFromDiffObj'](_0x3b9622,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1705a5[_0x221b3e]=this['editor']['data']['processor']['toData'](_0x37a232),this['editor']['data']['processor']['useFillerType']('default');}return _0x1705a5;}['getRevisionRootsAttributes'](_0x1e1f7e){const _0x2bec7b={};for(const _0x4f9739 in _0x1e1f7e['diffData'])_0x1e1f7e['diffData'][_0x4f9739]['attachChange']&&!_0x1e1f7e['diffData'][_0x4f9739]['attachChange']['isAttached']||(_0x2bec7b[_0x4f9739]=_0x1e1f7e['diffData'][_0x4f9739]['attributesAfter']||{});return _0x2bec7b;}['getRevisionRootsModelElements'](_0x5b027a){const _0x281d6c={};for(const _0x362a69 in _0x5b027a['diffData']){if(_0x5b027a['diffData'][_0x362a69]['attachChange']&&!_0x5b027a['diffData'][_0x362a69]['attachChange']['isAttached'])continue;const _0x3e614d=_0x5b027a['diffData'][_0x362a69]['rootElementName'];_0x3e614d&&(_0x281d6c[_0x362a69]=_0x3e614d);}return _0x281d6c;}['_getTypeCharForViewElement'](_0x3b97c2){return this['_viewClassToTypeChar']['get'](_0x3b97c2['constructor']);}['_getViewFromDiffObj'](_0x30f588,_0x35c76a){const _0x451495=this['editor']['editing']['view']['document'];if('string'==typeof _0x30f588)return new _0x1b99a8(_0x451495,_0x30f588);{let _0x4bc67c,_0x4556c3;_0x4556c3='u'==_0x30f588['type']||'r'==_0x30f588['type']?[]:_0x30f588['children']['map'](_0x40810d=>this['_getViewFromDiffObj'](_0x40810d,_0x35c76a));const _0x2c80f2=this['_typeCharToViewClass']['get'](_0x30f588['type'])||_0x9bdf37,_0x2a0ee9=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x4bc67c=new _0x2c80f2(_0x451495,_0x30f588['name'],_0x30f588['attributes'],_0x4556c3),'u'==_0x30f588['type']&&_0x30f588['children'][0x0]){const _0x45790d=_0x30f588['children'][0x0];if(_0x4bc67c['render']=function(_0xdc17ac){const _0x1e4305=_0xdc17ac['createElement']('div');return _0x1e4305['innerHTML']=_0x45790d,_0x1e4305['childNodes'][0x0];},_0x35c76a){const _0x4e15a6=new _0x4cca8f(_0x451495);_0x4e15a6['_appendChild'](_0x4bc67c);const _0x5d8a0a=Array['from'](_0x2a0ee9['viewChildrenToDom'](_0x4e15a6,{'bind':!0x1})),_0x44b5f3=_0x2a0ee9['domDocument']['createElement']('div');_0x44b5f3['append'](..._0x5d8a0a),_0x4bc67c=Array['from'](_0x2a0ee9['domChildrenToView'](_0x44b5f3))[0x0];}}else{if('r'==_0x30f588['type']&&_0x30f588['children'][0x0]){const _0x2c3a11=_0x30f588['children'][0x0];if(_0x4bc67c['render']=function(_0x2c1507){_0x2c1507['innerHTML']=_0x2c3a11;},_0x35c76a){const _0x278e47=new _0x4cca8f(_0x451495);_0x278e47['_appendChild'](_0x4bc67c);const _0x54d3df=Array['from'](_0x2a0ee9['viewChildrenToDom'](_0x278e47,{'bind':!0x1})),_0x50b116=_0x2a0ee9['domDocument']['createElement']('div');_0x50b116['append'](..._0x54d3df);const _0x15c8a0=Array['from'](_0x2a0ee9['domChildrenToView'](_0x50b116));_0x15c8a0['length']>0x1?_0x4bc67c['_appendChild'](_0x15c8a0):_0x4bc67c=_0x15c8a0[0x0];}}}if(_0x30f588['customProperties']){for(const [_0x5de405,_0x4ab31f]of _0x30f588['customProperties'])_0x4bc67c['_setCustomProperty'](_0x5de405,_0x4ab31f);}const _0x3adb64=void 0x0===_0x30f588['fillerOffset']?null:_0x30f588['fillerOffset'];return null!==_0x3adb64&&(_0x4bc67c['getFillerOffset']=()=>_0x3adb64),_0x4bc67c;}}['_makeModelFromViewString'](_0x440f83,_0x7ac001){const _0x29aa86=JSON['parse'](_0x440f83),_0x256528=this['editor']['editing']['view']['document'],_0x50b06a=new _0x4cca8f(_0x256528,_0x29aa86['map'](_0x5c65fc=>this['_getViewFromDiffObj'](_0x5c65fc,!0x0))),_0x26441e=this['editor']['data']['toModel'](_0x50b06a,_0x7ac001);return _0x26441e['name']=_0x7ac001,_0x26441e;}['_removeRevisionMarkers'](_0x2066c6){return(_0x2066c6=_0x2066c6['filter'](_0x1ed0d7=>!_0x1ed0d7['name']||'revision-start'!==_0x1ed0d7['name']&&'revision-end'!==_0x1ed0d7['name']))['forEach'](_0x97af5a=>{'string'!=typeof _0x97af5a&&(_0x97af5a['children']=this['_removeRevisionMarkers'](_0x97af5a['children']),_0x97af5a['attributes']=_0x97af5a['attributes']['filter'](_0x4bd72f=>!_0x4bd72f[0x0]['startsWith']('data-revision-')));}),_0x2066c6;}}function ft(_0x1aca6f,_0x9eeadf,_0x15cb52){const t=_0x1aca6f['t'];switch(_0x9eeadf){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'},_0x15cb52);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x15cb52);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x20daab{['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[_0xf95694,RevisionsRepository,RevisionHistoryUtils,_0xd00ec3];}constructor(_0x5089f2){super(_0x5089f2),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x21ea53=_0x13bc90();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x21ea53},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 _0x1a20e8=this['repository']['getRevision'](0x0),_0x1df43a=_0x1a20e8&&null===_0x1a20e8['creator']?_0x1a20e8:null;if(this['_continueCurrentRevision']=!!_0x1df43a&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x3c1de1=this['_source']['getCurrentRevisionId'](),_0x4d5dcc=this['repository']['getRevision'](_0x3c1de1);if(_0x4d5dcc)this['_startingVersion']=_0x4d5dcc['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3730d6=this['_source']['history']['_operations']['find'](_0x4299aa=>!_0x4299aa['_isInit']),_0xf8f66=_0x3730d6?_0x3730d6['baseVersion']:this['_source']['history']['version'];_0x1a20e8?(_0x1a20e8['toVersion']<_0xf8f66&&_0x1a20e8['_update']({'toVersion':_0xf8f66}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x1df43a['id'],this['_startingVersion']=_0x1df43a['fromVersion']):(this['_startingVersion']=_0x1a20e8['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0xf8f66,this['_continueCurrentRevision']=!0x1);}}else _0x1df43a&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x1df43a['toVersion'],this['editor']['model']['document']['history']['version']),_0x1df43a['fromVersion']===_0x1df43a['toVersion']?(0x0!==_0x1df43a['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x1df43a['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x1df43a['id'],this['_startingVersion']=_0x1df43a['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',_0x121681=>!_0x121681),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x178c75=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x617065;for(const _0x19721a in _0x178c75){const _0x114c3f=_0x19721a,_0x2e26ae=_0x178c75[_0x114c3f];if('revisionHistoryLicenseKeyValid'==_0x2e26ae||'revisionHistoryLicenseKeyInvalid'==_0x2e26ae||'revisionHistoryLicenseKeyExpired'==_0x2e26ae||'revisionHistoryLicenseKeyDomainLimit'==_0x2e26ae||'revisionHistoryLicenseKeyNotAllowed'==_0x2e26ae||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2e26ae||'revisionHistoryLicenseKeyUsageLimit'==_0x2e26ae){delete _0x178c75[_0x114c3f],_0x617065=_0x2e26ae,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x617065&&_0x178c75['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x617065&&_0x178c75['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x617065&&_0x178c75['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x617065&&_0x178c75['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x617065&&_0x178c75['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x617065&&_0x178c75['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x25cf8b=this['repository']['getRevision'](0x0),_0x5f044c=await this['getRevisionDocumentData'](_0x25cf8b),_0xa3ea60=await this['getRevisionRootsAttributes'](_0x25cf8b),_0x4d84e1=this['_utils']['getRevisionRootsModelElements'](_0x25cf8b);this['_replaceEditorDataWithRevisionData'](_0x5f044c,_0xa3ea60,_0x4d84e1);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x1a0332){this['_source']=_0x1a0332;}async['update'](){const _0x1a98e0=await this['_source']['getLatestVersion']();if(_0x1a98e0>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1d48c5=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1a98e0});_0x1d48c5['authors']=_0x1d48c5['authorsIds']['map'](_0x31b169=>this['editor']['plugins']['get']('Users')['getUser'](_0x31b169)),this['currentRevision']['_update'](_0x1d48c5);}}async['saveRevision'](_0x41776a={},_0x598047=null){const _0x4ddd15=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x598047>this['currentRevision']['toVersion']&&(_0x598047=null),null===_0x598047&&(_0x598047=await this['_source']['getLatestVersion']());const _0x1c2b9f=this['_getFromVersion'](_0x598047),_0x495012=this['buildRevisionData']({'from':_0x1c2b9f,'to':_0x598047});if(this['currentRevision']['toVersion']<_0x598047){const _0x59f0fa=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x598047,'to':_0x598047});_0x59f0fa['authors']=[],_0x59f0fa['authorsIds']=[],_0x59f0fa['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x59f0fa,!0x0),delete _0x59f0fa['authors'],_0x4ddd15['push'](_0x59f0fa);}_0x41776a['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x41776a['name']=_0x41776a['name']||null,_0x41776a['id']=_0x41776a['id']||_0x13bc90(),_0x41776a={..._0x41776a,..._0x495012};const _0x214008=this['addRevisionData'](_0x41776a);_0x4ddd15['push'](_0x41776a);const _0x21d823=this['repository']['getIndex'](_0x214008);if(0x0!==_0x21d823){const _0x44c472=this['repository']['getRevision'](_0x21d823-0x1);if(_0x44c472['fromVersion']!==_0x598047){const _0x524ffe=this['_revisionDataBuilder']['getData'](_0x598047,_0x44c472['toVersion']),_0x1b3572={'id':_0x44c472['id'],'diffData':_0x524ffe['diffData'],'authorsIds':_0x524ffe['authorsIds'],'authors':_0x524ffe['authorsIds']['map'](_0x4ca5b8=>this['editor']['plugins']['get']('Users')['getUser'](_0x4ca5b8)),'fromVersion':_0x598047};_0x44c472===this['currentRevision']&&(_0x1b3572['createdAt']=new Date(_0x41776a['createdAt']['getTime']()+0xa)),_0x44c472['_update'](_0x1b3572,!0x0),delete _0x1b3572['authors'],_0x4ddd15['push'](_0x1b3572);}}if(this['adapter']){for(const _0x444ce7 of _0x4ddd15)this['_bufferUpdate'](_0x444ce7['id'],_0x444ce7,!0x0);this['sendBufferedUpdates']();}return _0x214008;}['addRevisionData'](_0x456f3e){const _0x4ccad8=this['repository']['createRevision'](_0x456f3e);return this['adapter']&&_0x4ccad8['on']('_update',(_0xc4357e,_0x9c31c6,_0x5e79db)=>{_0x5e79db||(this['_bufferUpdate'](_0x9c31c6['id'],_0x9c31c6,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4ccad8,this['_findInsertionIndex'](_0x4ccad8)),_0x4ccad8;}async['getRevisionDocumentData'](_0x54f789){return await this['_utils']['loadRevisionData'](_0x54f789,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x54f789);}async['getRevisionRootsAttributes'](_0x42c1f7){return await this['_utils']['loadRevisionData'](_0x42c1f7,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x42c1f7);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x227d98=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x6b18b0=0x0;_0x6b18b0<_0x227d98['length'];_0x6b18b0++){const _0x21c048=_0x227d98[_0x6b18b0];let _0x1e353f=!0x1;for(const _0x272008 of Object['keys'](_0x21c048))void 0x0===_0x21c048[_0x272008]?delete _0x21c048[_0x272008]:'id'!==_0x272008&&(_0x1e353f=!0x0);_0x1e353f||(_0x227d98[_0x6b18b0]=null);}if(_0x227d98=_0x227d98['filter'](_0x1217c2=>null!==_0x1217c2),!_0x227d98['length'])return;for(let _0x215f8a=0x0;_0x215f8a<_0x227d98['length'];_0x215f8a++){const _0x84429f=_0x227d98[_0x215f8a];void 0x0!==_0x84429f['fromVersion']&&void 0x0===_0x84429f['toVersion']&&(_0x84429f['toVersion']=this['repository']['getRevision'](_0x84429f['id'])['toVersion']),void 0x0!==_0x84429f['toVersion']&&void 0x0===_0x84429f['fromVersion']&&(_0x84429f['fromVersion']=this['repository']['getRevision'](_0x84429f['id'])['fromVersion']);}const _0x51e7ce=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x227d98,_0x51e7ce)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x2d21ca=>{if(_0x2d21ca){for(const _0x242a89 of _0x2d21ca)this['setRevisionData']({'id':_0x242a89['id'],'createdAt':_0x242a89['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x37ab80=null,from:_0x500bdc=null,to:_0x5ccb5c=null}){_0x500bdc=null!==_0x500bdc?_0x500bdc:_0x37ab80['fromVersion'],_0x5ccb5c=null!==_0x5ccb5c?_0x5ccb5c:_0x37ab80['toVersion'];const _0x3a4018=this['_revisionDataBuilder']['getData'](_0x500bdc,_0x5ccb5c),_0x2f3a56={'diffData':_0x3a4018['diffData'],'authorsIds':_0x3a4018['authorsIds'],'fromVersion':_0x500bdc,'toVersion':_0x5ccb5c};if(!_0x37ab80||_0x5ccb5c!==_0x37ab80['toVersion']){const _0x2f0071=_0x5ccb5c-0x1,_0x345193=this['_source']['history']['getOperation'](_0x2f0071);_0x2f3a56['createdAt']=_0x345193&&_0x345193['createdAt']||new Date();}if(this['_loadedStateData']&&_0x500bdc===this['_loadedStateData']['fromVersion']){for(const _0x1c928b of this['_loadedStateData']['authors'])_0x2f3a56['authorsIds']['includes'](_0x1c928b['id'])||_0x2f3a56['authorsIds']['push'](_0x1c928b['id']);}return _0x2f3a56;}['_bufferUpdate'](_0x1ceb54,_0x5b4263,_0x106aa3){if(this['_bufferedUpdates']['has'](_0x1ceb54)){const _0x3b49e5=this['_bufferedUpdates']['get'](_0x1ceb54);_0x5b4263=_0x106aa3?{..._0x3b49e5,..._0x5b4263}:{..._0x5b4263,..._0x3b49e5};}this['_bufferedUpdates']['set'](_0x1ceb54,_0x5b4263);}['setRevisionData'](_0x5cab84){const _0x4ff828=this['repository']['getRevision'](_0x5cab84['id']);if(_0x5cab84['createdAt']&&(_0x5cab84['createdAt']=new Date(_0x5cab84['createdAt'])),_0x5cab84['authorsIds']){const _0x583386=this['editor']['plugins']['get']('Users');_0x5cab84['authors']=_0x5cab84['authorsIds']['map'](_0x55b3d8=>_0x583386['getUser'](_0x55b3d8));}_0x4ff828['_update'](_0x5cab84,!0x0);}['_createInitialRevision'](_0x1a6e76){const _0x5e16c9=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5e16c9)this['_initialRevisionId']=_0x5e16c9['id'];else{const _0x3e5a55=!this['editor']['model']['document']['roots']['find'](_0x2935fc=>this['editor']['model']['hasContent'](_0x2935fc)),_0x48bee7=this['editor']['plugins']['get']('Users')['me']['id'],_0x14a612=ft(this['editor']['locale'],_0x3e5a55?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x1a6e76,'to':_0x1a6e76,'id':this['_initialRevisionId'],'name':_0x14a612,'creatorId':_0x48bee7});}}['_createCurrentRevision'](_0x249dd1){const _0x475c8d=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x475c8d),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x249dd1,'to':_0x249dd1,'id':_0x475c8d,'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'](_0x2133ad,_0x4ee9a8,_0x1eb431){const _0x51b8eb={},_0x211155={},_0x1fef80={},_0x2fe858=this['editor']['config']['get']('roots')||{};for(const [_0x1a9889,_0xf03ce1]of Object['entries'](_0x2fe858))_0xf03ce1['lazyLoad']||(_0x51b8eb[_0x1a9889]=_0xf03ce1['initialData']??'',_0x211155[_0x1a9889]=_0xf03ce1['modelAttributes']||{},_0xf03ce1['modelElement']&&(_0x1fef80[_0x1a9889]=_0xf03ce1['modelElement']));for(const _0x500e51 of this['editor']['model']['document']['getRootNames']())_0x51b8eb[_0x500e51]??='',_0x211155[_0x500e51]??={};let _0x10bc17=!0x1;const _0x13c63c=Object['keys'](_0x51b8eb),_0x13c6aa=Object['keys'](_0x2133ad);for(const _0x4b8a6f of _0x13c63c){if(_0x51b8eb[_0x4b8a6f]!==_0x2133ad[_0x4b8a6f]&&''!==_0x51b8eb[_0x4b8a6f]['trim']()){_0x10bc17=!0x0;break;}if(!_0x1d7c60(_0x211155[_0x4b8a6f],_0x4ee9a8[_0x4b8a6f])&&Object['keys'](_0x211155[_0x4b8a6f])['length']>0x0){_0x10bc17=!0x0;break;}const _0x42e002=_0x1fef80[_0x4b8a6f],_0x29ff48=_0x1eb431[_0x4b8a6f];if(_0x42e002&&_0x29ff48&&_0x42e002!==_0x29ff48){_0x10bc17=!0x0;break;}}_0x10bc17||(_0x10bc17=_0x13c6aa['some'](_0xb6952d=>!this['editor']['model']['document']['getRoot'](_0xb6952d))),_0x10bc17&&_0x14e875('editor-initial-data-replaced-with-revision-data',{'editorData':_0x51b8eb,'editorRootsAttributes':_0x211155,'editorRootsModelElements':_0x1fef80,'revisionData':_0x2133ad,'revisionRootsAttributes':_0x4ee9a8,'revisionRootsModelElements':_0x1eb431});for(const [_0x4cb667,_0x463e42]of Object['entries'](_0x2133ad))this['editor']['config']['set']('roots.'+_0x4cb667+'.initialData',_0x463e42);for(const [_0x4974a2,_0x4286d3]of Object['entries'](_0x4ee9a8))this['editor']['config']['set']('roots.'+_0x4974a2+'.modelAttributes',_0x4286d3);const _0x332988=this['editor']['model']['document'];for(const [_0x36e8af,_0x5b8dd9]of Object['entries'](_0x1eb431)){this['editor']['config']['set']('roots.'+_0x36e8af+'.modelElement',_0x5b8dd9);const _0x1f06c1=_0x332988['getRoot'](_0x36e8af);_0x1f06c1&&_0x1f06c1['name']!==_0x5b8dd9&&(_0x332988['roots']['remove'](_0x36e8af),_0x332988['createRoot'](_0x5b8dd9,_0x36e8af));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x2033fa=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2033fa['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x297ba0){const _0x5ec7e3=this['repository']['getRevisions']();_0x5ec7e3['reverse']();let _0x1a5876=0x0;for(;_0x1a5876<_0x5ec7e3['length'];){const _0x20a059=_0x5ec7e3[_0x1a5876];if(_0x20a059===this['currentRevision']){_0x1a5876++;continue;}if(_0x20a059['id']===this['_initialRevisionId'])break;const _0x40adae=_0x297ba0['toVersion']-_0x20a059['toVersion']||_0x297ba0['fromVersion']-_0x20a059['fromVersion'];if(_0x40adae>0x0)break;if(_0x40adae<0x0)_0x1a5876++;else{if(!_0x297ba0['creator']&&_0x20a059['creator'])break;if(_0x20a059['creator']||!_0x297ba0['creator']){if(_0x297ba0['createdAt']>_0x20a059['createdAt'])break;_0x1a5876++;}else _0x1a5876++;}}return _0x1a5876;}['_getFromVersion'](_0x3f65bc){const _0x4ddca4=this['repository']['getRevisions']();_0x4ddca4['reverse'](),_0x4ddca4['shift']();const _0x3c3dd7=_0x4ddca4['find'](_0x9c1401=>_0x9c1401['toVersion']<=_0x3f65bc)['toVersion'];return _0x3c3dd7<this['_startingVersion']?this['_startingVersion']:_0x3c3dd7;}['_makeRevision']({name:_0x11d45d,from:_0x58e8c3,to:_0x23aba2,creatorId:_0x40fec8,id:_0x395f6c}){const _0x5c1990=this['buildRevisionData']({'from':_0x58e8c3,'to':_0x23aba2});_0x5c1990['name']=_0x11d45d,_0x5c1990['creatorId']=_0x40fec8,_0x5c1990['id']=_0x395f6c;const _0x3f8287=this['addRevisionData'](_0x5c1990);return this['adapter']&&this['_bufferUpdate'](_0x5c1990['id'],_0x5c1990,!0x0),_0x3f8287;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x1c263a){this['editor']=_0x1c263a,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'](_0x3e465e){this['source']=_0x3e465e;const _0x530776=new Map(),_0x4cf606=new Map(),_0x129de8=this['editor']['model']['document']['roots']['map'](_0x311b0c=>_0x311b0c['rootName']);for(const _0x33164f of _0x129de8){const _0x292d1a=this['editor']['model']['document']['getRoot'](_0x33164f),_0x27a151=gt(_0x292d1a);_0x530776['set'](_0x33164f,_0x27a151),_0x4cf606['set'](_0x33164f,Object['fromEntries'](_0x292d1a['getAttributes']()));}const _0x25906d=Array['from'](this['editor']['model']['markers'])['map'](_0x4008f9=>[_0x4008f9['name'],_0x4008f9['getRange']()]),_0x48b68a=this['source']['version'];this['_saveMetaData'](_0x48b68a,_0x530776,_0x25906d,_0x4cf606),this['_startingRevisionId']=this['_revisionId'];const _0x1b19a7=new Map(),_0x31916d=new Map();for(const _0x4ee08c of _0x129de8){const _0x5e4314=wt(_0x4ee08c,this['editor']['model']['document']['getRoot'](_0x4ee08c)['name']);_0x1b19a7['set'](_0x4ee08c,_0x5e4314),_0x31916d['set'](_0x4ee08c,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1b19a7,[],_0x31916d);}['getData'](_0x2bdfee,_0x1a7cb9){if(this['_lastFrom']===_0x2bdfee&&this['_lastTo']<=_0x1a7cb9)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1a7cb9,!0x0);else{if(!this['_savedMetaData']['has'](_0x2bdfee)){const _0x47146f=this['_getPreviousFrom'](_0x2bdfee);this['_calculateMetaData'](_0x47146f,_0x2bdfee,!0x1);}this['_calculateMetaData'](_0x2bdfee,_0x1a7cb9,!0x0);}return this['_lastFrom']=_0x2bdfee,this['_lastTo']=_0x1a7cb9,this['_getState']();}['loadState'](_0x628564){if(!this['_savedMetaData']['has'](_0x628564['fromVersion'])){const _0x533e46=this['_getPreviousFrom'](_0x628564['fromVersion']);this['_calculateMetaData'](_0x533e46,_0x628564['fromVersion'],!0x1);}this['_calculateMetaData'](_0x628564['fromVersion'],_0x628564['toVersion'],!0x1);const _0x1038da=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x628564['fromVersion'],this['_lastTo']=_0x628564['toVersion'];for(const _0x11b504 in _0x628564['diffData']){const _0xcf5bf1=_0x628564['diffData'][_0x11b504]['attachChange'],_0x594d4f=_0x2a882c(_0x628564['diffData'][_0x11b504]['attributesBefore'])||{},_0x3d2749=_0x628564['diffData'][_0x11b504],_0x9b1917=_0x1038da['_makeModelFromViewString'](_0x3d2749['deletions'],_0x3d2749['rootElementName']||'$root');_0x9b1917['rootName']=_0x11b504,_0x9b1917['_isAttached']=!_0xcf5bf1||!_0xcf5bf1['isAttached'],_0x9b1917['isAttached']=()=>_0x9b1917['_isAttached'],this['_baseRoots']['set'](_0x11b504,_0x9b1917),this['_baseRootsAttributes']['set'](_0x11b504,_0x594d4f),_0xcf5bf1&&this['_touchedRoots']['set'](_0x11b504,_0xcf5bf1);const _0x1a240d=this['_makeIdsRoot'](_0x9b1917);this['_baseIdsRoots']['set'](_0x11b504,_0x1a240d);for(const [_0x4196be,_0xe5d5ab]of _0x9b1917['markers']){if(!_0x4196be['startsWith']('revision:'))continue;const _0x36d2cf=_0x4196be['split'](':')[0x2];for(const _0x5aac88 of _0xe5d5ab['getWalker']({'singleCharacters':!0x0})){const _0x3be32f=this['_getVidAttributeName'](_0x5aac88),_0x2aa1e8='elementEnd'==_0x5aac88['type']?_0x5aac88['previousPosition']['path']['slice'](0x0,-0x1):_0x5aac88['previousPosition']['path'],_0x2c90e2=_0x1a240d['getNodeByPath'](_0x2aa1e8)['getAttribute'](_0x3be32f);this['_touched']['set'](_0x2c90e2,{'userId':_0x36d2cf});}_0x9b1917['markers']['delete'](_0x4196be);}}this['_startingRevisionId']=this['_revisionId'];const _0x25fe8e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4c8640=>!this['_touched']['has'](_0x4c8640));let _0x33d899=0x0;const _0x2bfdc5=new Map();for(const _0x429592 in _0x628564['diffData']){const _0x435a59=_0x628564['diffData'][_0x429592]['attachChange'],_0x512916=_0x2a882c(_0x628564['diffData'][_0x429592]['attributesAfter'])||{},_0x42472f=_0x628564['diffData'][_0x429592],_0x2414fe=_0x1038da['_makeModelFromViewString'](_0x42472f['insertions'],_0x42472f['rootElementName']||'$root');_0x2414fe['rootName']=_0x429592,_0x2414fe['_isAttached']=!_0x435a59||_0x435a59['isAttached'],_0x2414fe['isAttached']=()=>_0x2414fe['_isAttached'],this['_diffRoots']['set'](_0x429592,_0x2414fe),this['_diffRootsAttributes']['set'](_0x429592,_0x512916);const _0x3b336a=this['_makeIdsRoot'](_0x2414fe,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x429592,_0x3b336a),_0x2bfdc5['set'](_0x429592,_0x2414fe['isAttached']()?_0x512916:{});for(const [_0x408803,_0x7a08f]of _0x2414fe['markers']){if(!_0x408803['startsWith']('revision:'))continue;const _0x2cbb5f=_0x408803['split'](':')[0x2];for(const _0x4c8d92 of _0x7a08f['getWalker']({'singleCharacters':!0x0})){const _0xe97920=this['_getVidAttributeName'](_0x4c8d92),_0x3d0a2a=this['_revisionId']++,_0xe5609e='elementEnd'==_0x4c8d92['type']?_0x4c8d92['previousPosition']['path']['slice'](0x0,-0x1):_0x4c8d92['previousPosition']['path'];_0x3b336a['getNodeByPath'](_0xe5609e)['_setAttribute'](_0xe97920,_0x3d0a2a),this['_touched']['set'](_0x3d0a2a,{'userId':_0x2cbb5f});}_0x2414fe['markers']['delete'](_0x408803);}for(const _0x354e15 of this['editor']['model']['createRangeIn'](_0x2414fe)['getWalker']({'singleCharacters':!0x0})){const _0x301592=this['_getVidAttributeName'](_0x354e15),_0x284eb6='elementEnd'==_0x354e15['type']?_0x354e15['previousPosition']['path']['slice'](0x0,-0x1):_0x354e15['previousPosition']['path'],_0x16a012=_0x3b336a['getNodeByPath'](_0x284eb6);_0x16a012['getAttribute'](_0x301592)>0x0||_0x16a012['_setAttribute'](_0x301592,_0x25fe8e[_0x33d899++]);}for(const [_0x1496a5,_0x19404f]of _0x2414fe['markers'])_0x1496a5['startsWith']('revision:')||this['_markers']['set'](_0x1496a5,_0x19404f);}const {roots:_0x374842}=this['_savedMetaData']['get'](_0x628564['fromVersion']),{roots:_0x2c3334}=this['_savedMetaData']['get'](_0x628564['toVersion']),_0x2b0117=gt(_0x374842['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x2b0117),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2b0117,Number['NEGATIVE_INFINITY']));const _0x1e93c4=gt(_0x2c3334['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x1e93c4),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1e93c4));const _0x4e174e=Array['from'](this['_diffRoots'])['map'](([_0x54bb91,_0x36d605])=>[_0x54bb91,gt(_0x36d605)]);this['_saveMetaData'](this['_lastTo'],_0x4e174e,this['_markers'],_0x2bfdc5);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x2be200,_0x38c631,_0x42c73c,_0x4487d9){const _0x13cf67=new Map(_0x38c631),_0x4b93b4=new Map(_0x2a882c(_0x4487d9)),_0xa8e890=new Map();for(const [_0x5b08da,_0x189e11]of _0x42c73c)_0xa8e890['set'](_0x5b08da,{'start':_0x189e11['start']['clone'](),'end':_0x189e11['end']['clone'](),'rootName':_0x189e11['root']['rootName']});this['_savedMetaData']['set'](_0x2be200,{'roots':_0x13cf67,'markers':_0xa8e890,'rootsAttributes':_0x4b93b4});}['_removeMetaData'](_0x584f06){this['_savedMetaData']['delete'](_0x584f06);}['_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'](_0x35dbd9,_0x36258e=null){let _0x285074=null;_0x35dbd9['is']('documentFragment')||(_0x285074=new _0x587783(_0x35dbd9['name'],{'vid_start':null===_0x36258e?this['_revisionId']++:_0x36258e++}));const _0x30cc9b=[];for(const _0x314b65 of _0x35dbd9['getChildren']())if(_0x314b65['is']('element')){_0x30cc9b['push'](this['_makeIdsRoot'](_0x314b65,_0x36258e));const _0x4b1f8c=_0x30cc9b[_0x30cc9b['length']-0x1];null!==_0x36258e&&(_0x36258e=_0x4b1f8c['is']('element','$text')?_0x4b1f8c['getAttribute']('vid')+0x1:_0x4b1f8c['getAttribute']('vid_end')+0x1);}else{for(let _0x139a3b=0x0;_0x139a3b<_0x314b65['offsetSize'];_0x139a3b++)_0x30cc9b['push'](new _0x587783('$text',{'vid':null===_0x36258e?this['_revisionId']++:_0x36258e++}));}if(_0x35dbd9['is']('documentFragment')){const _0x5ef243=wt(_0x35dbd9['rootName'],_0x35dbd9['name']);return _0x5ef243['_insertChild'](0x0,_0x30cc9b),_0x5ef243;}return _0x285074['_setAttribute']('vid_end',null===_0x36258e?this['_revisionId']++:_0x36258e++),_0x285074['_insertChild'](0x0,_0x30cc9b),_0x285074;}['_calculateMetaData'](_0xa7c43a,_0x559923,_0x22a040){this['_reset']();const {roots:_0x5c9588,markers:_0x2d6877,rootsAttributes:_0xaae097}=this['_savedMetaData']['get'](_0xa7c43a);this['_baseRoots']=new Map(_0x5c9588),this['_baseRootsAttributes']=new Map(_0x2a882c(_0xaae097));for(const [_0x435a77,_0x39e830]of this['_baseRoots'])if('$graveyard'!==_0x435a77&&(this['_diffRoots']['set'](_0x435a77,gt(_0x39e830)),this['_diffRootsAttributes']=new Map(_0x2a882c(_0xaae097)),_0x22a040)){const _0x1ce0f1=this['_revisionId'];this['_idsRoots']['set'](_0x435a77,this['_makeIdsRoot'](_0x39e830)),this['_baseIdsRoots']['set'](_0x435a77,this['_makeIdsRoot'](_0x39e830,_0x1ce0f1));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x22a040&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2e551f,_0x306dcf]of _0x2d6877){const _0x5297ce=this['_baseRoots']['get'](_0x306dcf['rootName']),_0x526f0f=this['_diffRoots']['get'](_0x306dcf['rootName']),_0x3fd4fa=new _0x1f7a25(this['_fixPosition'](_0x306dcf['start'],_0x5297ce),this['_fixPosition'](_0x306dcf['end'],_0x5297ce)),_0x10618f=this['_fixRange'](_0x3fd4fa,_0x526f0f);_0x5297ce['markers']['set'](_0x2e551f,_0x3fd4fa),this['_markers']['set'](_0x2e551f,_0x10618f);}this['_applyOperations'](_0xa7c43a,_0x559923,_0x22a040);}['_applyOperations'](_0x319b7e,_0x182cbe,_0x2c8953){for(const _0x2efdb8 of this['source']['getOperations'](_0x319b7e,_0x182cbe))this['_handleOperation'](_0x2efdb8,_0x2c8953);for(const _0x597fbf of this['_diffRoots']['values']())_0x597fbf['markers']['clear']();for(const [_0x2e1e56,_0x52399a]of this['_markers']){this['_diffRoots']['get'](_0x52399a['root']['rootName'])['markers']['set'](_0x2e1e56,_0x52399a['clone']());}const _0x57ee16=new Map(),_0xa0b869=new Map();for(const [_0x3d8a42,_0x150bb7]of this['_diffRoots'])_0x57ee16['set'](_0x3d8a42,gt(_0x150bb7)),_0xa0b869['set'](_0x3d8a42,this['_diffRootsAttributes']['get'](_0x3d8a42));this['_saveMetaData'](_0x182cbe,_0x57ee16,this['_markers'],_0xa0b869);}['_getPreviousFrom'](_0x4ebf8e){const _0x75bb8d=Array['from'](this['_savedMetaData']['keys']());_0x75bb8d['sort']((_0x4524a1,_0x40d6a0)=>_0x4524a1-_0x40d6a0),_0x75bb8d['reverse']();for(const _0x28ce5b of _0x75bb8d)if(_0x28ce5b<_0x4ebf8e)return _0x28ce5b;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x29e39e,_0x4f082c){const _0x3c1f7c=Array['from'](_0x4f082c['markers'])['map'](([_0x4ea2ac,_0xb165a6])=>[_0x4ea2ac,this['_fixRange'](_0xb165a6,_0x29e39e)]);_0x29e39e['markers']=new Map(_0x3c1f7c);}['_transformMarkers'](_0x1ff449){for(const _0x2f8bbe of this['_markers']['values']()){const _0x209080=_0x2f8bbe['getTransformedByOperation'](_0x1ff449),_0x5c343e=_0x1f7a25['_createFromRanges'](_0x209080);_0x2f8bbe['start']=_0x5c343e['start'],_0x2f8bbe['end']=_0x5c343e['end'];}}['_handleOperation'](_0x3dc95b,_0x5c79e1){if('addRoot'!=_0x3dc95b['type']&&'detachRoot'!=_0x3dc95b['type']){if('insert'==_0x3dc95b['type']){const _0x4a724f=_0x3dc95b['position']['root'],_0x238c27=_0x4a724f['rootName'],_0x432c47=_0x4a724f['name'];this['_diffRoots']['has'](_0x238c27)||(this['_diffRoots']['set'](_0x238c27,wt(_0x238c27,_0x432c47,!0x0)),this['_diffRootsAttributes']['set'](_0x238c27,{}),_0x5c79e1&&this['_idsRoots']['set'](_0x238c27,wt(_0x238c27,_0x432c47,!0x0)));}else{if('addRootAttribute'==_0x3dc95b['type']||'removeRootAttribute'==_0x3dc95b['type']||'changeRootAttribute'==_0x3dc95b['type'])return void this['_handleRootAttributeOperation'](_0x3dc95b);'marker'==_0x3dc95b['type']&&this['_handleMarkerOperation'](_0x3dc95b);}if('marker'!==_0x3dc95b['type']){const _0x50c078=this['_cloneOperation'](_0x3dc95b,this['_diffRoots']);_0x50c078['_execute'](),this['_transformMarkers'](_0x50c078);}if(_0x5c79e1)switch(_0x3dc95b['type']){case'insert':this['_handleInsertOperation'](_0x3dc95b);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x3dc95b);break;case'merge':this['_handleMergeOperation'](_0x3dc95b);break;case'split':this['_handleSplitOperation'](_0x3dc95b);}}else this['_handleRootOperation'](_0x3dc95b,_0x5c79e1);}['_cloneOperation'](_0x286c46,_0x5094b8){const _0x32932e=_0x286c46['clone']();return _0x32932e['_authorId']=_0x286c46['_authorId'],this['_fixOperation'](_0x32932e,_0x5094b8),_0x32932e;}['_getBaseVids'](_0x30929d){return _0x30929d['map'](_0x31acd5=>{const _0x10b7bf=this['_getVidAttributeName'](_0x31acd5);return Number(_0x31acd5['item']['getAttribute'](_0x10b7bf));});}['_generateTape'](_0x2ed277,_0x58f62a){if(_0x2ed277['is']('element','$text'))_0x58f62a['push']({'item':_0x2ed277,'type':'text'});else{_0x2ed277['is']('element')&&_0x58f62a['push']({'item':_0x2ed277,'type':'elementStart'});for(const _0x5bf436 of _0x2ed277['getChildren']())this['_generateTape'](_0x5bf436,_0x58f62a);_0x2ed277['is']('element')&&_0x58f62a['push']({'item':_0x2ed277,'type':'elementEnd'});}return _0x58f62a;}['_getState'](){const _0x2f8b4f=new Map(this['_touched']),_0x20a362=new Map(_0x2f8b4f),_0x35ef76=new Map(),_0x3555cf={'insertions':{},'deletions':{}},_0x403c26={'insertions':{},'deletions':{}},_0x123e3c=new Map(),_0x448140=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1ed4e7=new Map();_0x448140['delete']('$graveyard');for(const _0xcd7db8 of _0x448140){const _0x1f9544=(this['_diffRoots']['get'](_0xcd7db8)??this['_baseRoots']['get'](_0xcd7db8))['name'],_0x5c70ef=this['_diffRoots']['get'](_0xcd7db8)||wt(_0xcd7db8,_0x1f9544,!0x1),_0x597cb6=this['_baseRoots']['get'](_0xcd7db8)||wt(_0xcd7db8,_0x1f9544,!0x1);_0x5c70ef['isAttached']()||_0x597cb6['isAttached']()?(_0x1ed4e7['set'](_0xcd7db8,_0x1f9544),_0x3555cf['insertions'][_0xcd7db8]=gt(_0x5c70ef),_0x3555cf['deletions'][_0xcd7db8]=gt(_0x597cb6),this['_copyMarkers'](_0x3555cf['deletions'][_0xcd7db8],_0x597cb6),this['_copyMarkers'](_0x3555cf['insertions'][_0xcd7db8],_0x5c70ef),_0x403c26['insertions'][_0xcd7db8]=this['_generateTape'](this['_idsRoots']['get'](_0xcd7db8),[]),_0x403c26['deletions'][_0xcd7db8]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xcd7db8)||wt(_0xcd7db8,_0x1f9544,!0x1),[])):_0x448140['delete'](_0xcd7db8);}for(const _0x197b42 of _0x448140){const _0x14159d=_0x403c26['insertions'][_0x197b42];for(const _0x15cdfe of _0x14159d){const _0xd53a30=this['_getVidAttributeName'](_0x15cdfe),_0x4854dd=_0x15cdfe['item']['getAttribute'](_0xd53a30);_0x20a362['delete'](_0x4854dd),_0x4854dd>=this['_startingRevisionId']&&_0x35ef76['set'](_0x4854dd,_0x2f8b4f['get'](_0x4854dd));}}for(const _0x2d645f of _0x448140){const _0x58185d=_0x403c26['insertions'][_0x2d645f],_0x114f90=this['_getBaseVids'](_0x403c26['deletions'][_0x2d645f]);let _0x18d5a3=0x0;for(const _0x445d32 of _0x58185d){const _0x28b543=this['_getVidAttributeName'](_0x445d32),_0x31240a=_0x445d32['item']['getAttribute'](_0x28b543);if(!_0x35ef76['has'](_0x31240a)&&!_0x123e3c['has'](_0x31240a)){if(_0x20a362['has'](_0x31240a))_0x18d5a3++;else{if(_0x31240a!=_0x114f90[_0x18d5a3]){const _0x364f92=_0x2f8b4f['get'](_0x31240a)||_0x2f8b4f['get'](_0x114f90[_0x18d5a3]);for(;_0x31240a!=_0x114f90[_0x18d5a3];)_0x20a362['has'](_0x114f90[_0x18d5a3])||(_0x123e3c['set'](_0x114f90[_0x18d5a3],_0x364f92),_0x2f8b4f['set'](_0x114f90[_0x18d5a3],_0x364f92)),_0x18d5a3++;}_0x18d5a3++;}}}}for(const _0x16699b of _0x448140){const _0x5970c9=_0x403c26['insertions'][_0x16699b];for(const _0x1784ac of _0x5970c9){const _0x21568b=this['_getVidAttributeName'](_0x1784ac),_0x5d8b35=_0x1784ac['item']['getAttribute'](_0x21568b);if(_0x123e3c['has'](_0x5d8b35)){const _0x252fd8=_0x123e3c['get'](_0x5d8b35);_0x20a362['has'](_0x5d8b35)||_0x20a362['set'](_0x5d8b35,{..._0x252fd8}),_0x35ef76['set'](_0x5d8b35,{..._0x252fd8});}}}for(const _0x5e9911 of _0x20a362['keys']())_0x5e9911>=this['_startingRevisionId']&&_0x20a362['delete'](_0x5e9911);const _0xa5f7e2=new Map();for(const _0xfb69df of _0x448140){let _0x28664c=_0x403c26['insertions'][_0xfb69df];for(const _0x4adb66 of _0x28664c)if(_0x4adb66['item']['is']('element','tableCell')){const _0x38e0af=this['_getVidAttributeName'](_0x4adb66),_0x142291=_0x4adb66['item']['getAttribute'](_0x38e0af);if(_0x35ef76['has'](_0x142291)){const _0x1f6727=_0x4adb66['item']['parent']['parent']['getAttribute']('vid_start'),_0x3bca19=_0xa5f7e2['get'](_0x1f6727)||new Set();_0x3bca19['add'](_0x35ef76['get'](_0x142291)['userId']),_0xa5f7e2['set'](_0x1f6727,_0x3bca19);}}_0x28664c=_0x403c26['deletions'][_0xfb69df];for(const _0x4280e5 of _0x28664c)if(_0x4280e5['item']['is']('element','tableCell')){const _0x23890a=this['_getVidAttributeName'](_0x4280e5),_0x18c7f3=_0x4280e5['item']['getAttribute'](_0x23890a);if(_0x20a362['has'](_0x18c7f3)){const _0x21fc86=_0x4280e5['item']['parent']['parent']['getAttribute']('vid_start'),_0x249817=_0xa5f7e2['get'](_0x21fc86)||new Set();_0x249817['add'](_0x20a362['get'](_0x18c7f3)['userId']),_0xa5f7e2['set'](_0x21fc86,_0x249817);}}for(const _0x38e9ae of _0xa5f7e2['keys']())(_0x35ef76['has'](_0x38e9ae)||_0x20a362['has'](_0x38e9ae))&&_0xa5f7e2['delete'](_0x38e9ae);}for(const _0x3caae5 of _0x448140){const _0x103ce0=_0x403c26['insertions'][_0x3caae5];let _0x2eaa1f=null,_0x33a6a4=null;for(const _0x4adc30 of _0x103ce0){const _0x2b3871=this['_getVidAttributeName'](_0x4adc30),_0x408e8a=_0x4adc30['item']['getAttribute'](_0x2b3871),_0x5b2a9b=_0xa5f7e2['get'](_0x408e8a);_0x5b2a9b&&'elementStart'==_0x4adc30['type']&&(_0x2eaa1f=Array['from'](_0x5b2a9b)[0x0],_0x33a6a4=_0x4adc30['item']['getAttribute']('vid_end')),_0x2eaa1f&&(_0x20a362['set'](_0x408e8a,{'userId':_0x2eaa1f}),_0x35ef76['set'](_0x408e8a,{'userId':_0x2eaa1f})),_0x408e8a==_0x33a6a4&&(_0x2eaa1f=null,_0x33a6a4=null);}}const _0x460927={},_0x15cd4d=new Set();for(const _0x28c80a of _0x448140){const _0x4aada9=_0x3555cf['deletions'][_0x28c80a],_0xb66f95=_0x3555cf['insertions'][_0x28c80a];for(const {userId:_0x2a0055}of this['_touchedMarkers']['values']())null!==_0x2a0055&&_0x15cd4d['add'](_0x2a0055);for(const {userId:_0x2f0508}of this['_touchedRoots']['values']())null!==_0x2f0508&&_0x15cd4d['add'](_0x2f0508);this['_markChanges'](_0xb66f95,_0x403c26['insertions'][_0x28c80a],_0x35ef76,'insertion',_0x15cd4d),this['_markChanges'](_0x4aada9,_0x403c26['deletions'][_0x28c80a],_0x20a362,'deletion',_0x15cd4d),_0x460927[_0x28c80a]={'insertions':this['_prepareViewToSave'](_0xb66f95),'deletions':this['_prepareViewToSave'](_0x4aada9),'attachChange':this['_touchedRoots']['get'](_0x28c80a)||null,'attributesBefore':_0x2a882c(this['_baseRootsAttributes']['get'](_0x28c80a))||{},'attributesAfter':_0x2a882c(this['_diffRootsAttributes']['get'](_0x28c80a)),'rootElementName':_0x1ed4e7['get'](_0x28c80a)};}return{'diffData':_0x460927,'authorsIds':Array['from'](_0x15cd4d)};}['_processRootBeforeSave'](_0xbabb9c){for(const [,_0x6fe52]of _0xbabb9c['markers']){const _0x4e57af=_0x6fe52['start']['getAncestors']()['filter'](_0xdd3b22=>'tableCell'==_0xdd3b22['name']);for(const _0x52fbb3 of _0x4e57af)0x1==_0x52fbb3['childCount']&&_0x52fbb3['getChild'](0x0)['is']('element','paragraph')&&_0x52fbb3['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4267c3){this['_processRootBeforeSave'](_0x4267c3);const _0x137c36=this['editor']['data']['toView'](_0x4267c3,{}),_0x1c790a=Array['from'](_0x137c36['getChildren']())['map'](_0x278707=>this['_getViewJson'](_0x278707));return JSON['stringify'](_0x1c790a);}['_getViewJson'](_0x2b5047){if(_0x2b5047['is']('$text'))return _0x2b5047['data'];{const _0x4b64d7=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x3ab233=_0x2b5047,_0x20bab7=this['editor']['data']['htmlProcessor']['domConverter'],_0x26526d={'type':_0x4b64d7['_getTypeCharForViewElement'](_0x3ab233),'name':_0x3ab233['name'],'attributes':Array['from'](_0x3ab233['getAttributes']()),'children':Array['from'](_0x3ab233['getChildren']())['map'](_0x560351=>this['_getViewJson'](_0x560351))};if(_0x2b5047['is']('uiElement')&&'$comment'!=_0x2b5047['name']){const _0x47ec99=_0x2b5047['render'](_0x20bab7['domDocument'],_0x20bab7);_0x26526d['children']['push'](_0x47ec99['outerHTML']);}else{if(_0x2b5047['is']('rawElement')){const _0x17c4ab=_0x20bab7['domDocument']['createElement'](_0x3ab233['name']);_0x2b5047['render'](_0x17c4ab,_0x20bab7),_0x26526d['children']['push'](_0x17c4ab['innerHTML']);}}const _0x417131=Array['from'](_0x3ab233['getCustomProperties']());_0x417131['length']>0x0&&(_0x26526d['customProperties']=_0x417131);const _0x4b3374=_0x3ab233['getFillerOffset']();return null!==_0x4b3374&&(_0x26526d['fillerOffset']=_0x4b3374),_0x26526d;}}['_markChanges'](_0x27ad2f,_0x2b9c51,_0x2b0e67,_0x3dfad5,_0x5809fc){let _0x4d1c7d=null,_0x66f6e1=null,_0x382351=0x0;const _0x123767=this['editor']['model'];for(let _0x1e3d8d=0x0;_0x1e3d8d<_0x2b9c51['length'];_0x1e3d8d++){const _0x353076=this['_getVidAttributeName'](_0x2b9c51[_0x1e3d8d]),_0x24d4eb=_0x2b9c51[_0x1e3d8d]['item']['getAttribute'](_0x353076),_0x1e5d98=_0x2b0e67['get'](_0x24d4eb),_0x70e410=_0x1e3d8d==_0x2b9c51['length']-0x1;(!_0x4d1c7d&&_0x1e5d98&&(_0x4d1c7d=_0x1e5d98,_0x66f6e1=_0x2b9c51[_0x1e3d8d]),_0x4d1c7d&&(!_0x1e5d98||_0x1e5d98['userId']!=_0x4d1c7d['userId']))&&(_0x399bf9(_0x1e5d98,mt(_0x66f6e1,_0x27ad2f,_0x123767),mt(_0x2b9c51[_0x1e3d8d],_0x27ad2f,_0x123767)),_0x4d1c7d=_0x1e5d98||null,_0x66f6e1=_0x1e5d98?_0x2b9c51[_0x1e3d8d]:null),_0x4d1c7d&&_0x70e410&&_0x399bf9(_0x1e5d98,mt(_0x66f6e1,_0x27ad2f,_0x123767),pt(_0x2b9c51[_0x1e3d8d],_0x27ad2f,_0x123767));}function _0x399bf9(_0x83a1c0,_0x18d501,_0x23a995){const _0x1f510f=_0x4d1c7d['userId'],_0x56693f='revision:'+_0x3dfad5+':'+_0x1f510f+':'+_0x382351++,_0x4b5b5a=_0x123767['createRange'](_0x18d501,_0x23a995);_0x27ad2f['markers']['set'](_0x56693f,_0x4b5b5a),null!==_0x1f510f&&_0x5809fc['add'](_0x1f510f);}}['_getVidAttributeName'](_0x28ca54){switch(_0x28ca54['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x579043,_0x50e545){_0x579043['baseVersion']=null;for(const _0x47987b in _0x579043){const _0x44e2c8=_0x579043[_0x47987b];if(_0x44e2c8 instanceof _0x12b3d0){const _0x39e38c=_0x50e545['get'](_0x44e2c8['root']['rootName']);_0x579043[_0x47987b]=this['_fixPosition'](_0x44e2c8,_0x39e38c);}if(_0x44e2c8 instanceof _0x1f7a25){const _0x5ca462=_0x50e545['get'](_0x44e2c8['root']['rootName']);_0x579043[_0x47987b]=this['_fixRange'](_0x44e2c8,_0x5ca462);}'root'===_0x47987b&&(_0x579043['root']=_0x50e545['get'](_0x579043['root']['rootName']));}}['_fixRange'](_0xcad17c,_0x5cbd99){return this['editor']['model']['createRange'](this['_fixPosition'](_0xcad17c['start'],_0x5cbd99),this['_fixPosition'](_0xcad17c['end'],_0x5cbd99));}['_fixPosition'](_0x412f6a,_0x416721){return this['editor']['model']['createPositionFromPath'](_0x416721,_0x412f6a['path'],_0x412f6a['stickiness']);}['_handleInsertOperation'](_0x3ea382){const _0x47c219=this['_idsRoots']['get'](_0x3ea382['position']['root']['rootName']),_0x380c46=this['_fixPosition'](_0x3ea382['position'],_0x47c219),_0x456d65=null===_0x3ea382['_authorId']?null:_0x3ea382['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x329ad5=_0x380c46['parent'],_0x36f1ff=this['_revisionId'],_0x38781d=[];for(const _0x1bdfc0 of _0x3ea382['nodes'])if(_0x1bdfc0['is']('element'))_0x38781d['push'](this['_makeIdsRoot'](_0x1bdfc0));else{for(let _0x22551e=0x0;_0x22551e<_0x1bdfc0['offsetSize'];_0x22551e++)_0x38781d['push'](new _0x587783('$text',{'vid':this['_revisionId']++}));}const _0x149796=this['_revisionId'];for(let _0xeebfa5=_0x36f1ff;_0xeebfa5<_0x149796;_0xeebfa5++)this['_touched']['set'](_0xeebfa5,{'userId':_0x456d65});_0x329ad5['_insertChild'](_0x380c46['offset'],_0x38781d);}['_handleMoveOperation'](_0x86da6c){(_0x86da6c=this['_cloneOperation'](_0x86da6c,this['_idsRoots']))['_execute']();const _0x4d1c5d=null===_0x86da6c['_authorId']?null:_0x86da6c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x161300=_0x86da6c['getMovedRangeStart'](),_0x14cce1=_0x161300['parent'],_0x48c757=_0x161300['offset'];!function _0x30568f(_0x349292,_0x3d124e,_0x1d35a4,_0x489dc8){for(let _0x544c10=_0x1d35a4;_0x544c10<_0x489dc8;_0x544c10++){const _0x3d7c49=_0x3d124e['getChild'](_0x544c10);_0x3d7c49['is']('element','$text')?_0x349292['set'](_0x3d7c49['getAttribute']('vid'),{'userId':_0x4d1c5d}):(_0x349292['set'](_0x3d7c49['getAttribute']('vid_start'),{'userId':_0x4d1c5d}),_0x30568f(_0x349292,_0x3d7c49,0x0,_0x3d7c49['childCount']),_0x349292['set'](_0x3d7c49['getAttribute']('vid_end'),{'userId':_0x4d1c5d}));}}(this['_touched'],_0x14cce1,_0x48c757,_0x48c757+_0x86da6c['howMany']);}['_handleMergeOperation'](_0x99c0bf){const _0x220c64=null===(_0x99c0bf=this['_cloneOperation'](_0x99c0bf,this['_idsRoots']))['_authorId']?null:_0x99c0bf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2219c2=_0x99c0bf['targetPosition']['parent'],_0x1e7e61=_0x99c0bf['sourcePosition']['parent'],_0x1afdc1=_0x2219c2['getAttribute']('vid_end'),_0x31996f=_0x1e7e61['getAttribute']('vid_start');_0x2219c2['_setAttribute']('vid_end',_0x1e7e61['getAttribute']('vid_end')),_0x1e7e61['_setAttribute']('vid_end',_0x1afdc1),this['_touched']['set'](_0x31996f,{'userId':_0x220c64}),this['_touched']['set'](_0x1afdc1,{'userId':_0x220c64}),_0x99c0bf['_execute']();}['_handleSplitOperation'](_0xd4c577){const _0x4bfc3f=null===(_0xd4c577=this['_cloneOperation'](_0xd4c577,this['_idsRoots']))['_authorId']?null:_0xd4c577['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x460995=_0xd4c577['graveyardPosition'],_0x2b726a=_0xd4c577['splitPosition']['parent'];_0xd4c577['_execute']();const _0x23e325=_0x2b726a['getAttribute']('vid_end'),_0x43208b=_0xd4c577['insertionPosition']['nodeAfter'];if(_0x460995){const _0x22c797=_0x43208b['getAttribute']('vid_end'),_0x52ab19=_0x2b726a['getAttribute']('vid_end');_0x2b726a['_setAttribute']('vid_end',_0x22c797),_0x43208b['_setAttribute']('vid_end',_0x52ab19),this['_touched']['set'](_0x2b726a['getAttribute']('vid_end'),{'userId':_0x4bfc3f}),this['_touched']['set'](_0x43208b['getAttribute']('vid_start'),{'userId':_0x4bfc3f});}else{const _0x1f5d4a=this['_revisionId']++,_0x10f7c9=this['_revisionId']++;_0x2b726a['_setAttribute']('vid_end',_0x1f5d4a),_0x43208b['_setAttribute']('vid_start',_0x10f7c9),_0x43208b['_setAttribute']('vid_end',_0x23e325),this['_touched']['set'](_0x1f5d4a,{'userId':_0x4bfc3f}),this['_touched']['set'](_0x10f7c9,{'userId':_0x4bfc3f});}}['_handleMarkerOperation'](_0x49894d){if(!_0x49894d['affectsData'])return;const _0x7cb63a=(_0x49894d=this['_cloneOperation'](_0x49894d,this['_diffRoots']))['oldRange']?_0x49894d['oldRange']['root']:null,_0x493b2f=_0x49894d['newRange']?_0x49894d['newRange']['root']:null;_0x7cb63a&&this['_markers']['delete'](_0x49894d['name']),_0x493b2f&&this['_markers']['set'](_0x49894d['name'],_0x49894d['newRange']['clone']());const _0xf645b4=null===_0x49894d['_authorId']?null:_0x49894d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x59b868=_0x49894d['name'];if(!this['_touchedMarkers']['has'](_0x59b868))return void this['_touchedMarkers']['set'](_0x59b868,{'range':_0x49894d['oldRange'],'userId':_0xf645b4});const _0x36b082=this['_touchedMarkers']['get'](_0x59b868),_0x4d6d01=_0x36b082['range'],_0x28d913=_0x49894d['newRange'];null==_0x4d6d01&&null==_0x28d913||_0x4d6d01&&_0x28d913&&_0x4d6d01['isEqual'](_0x28d913)?this['_touchedMarkers']['delete'](_0x49894d['name']):_0x36b082['userId']=_0xf645b4;}['_handleRootOperation'](_0x223e11,_0x322966){this['_diffRoots']['has'](_0x223e11['rootName'])?this['_diffRoots']['get'](_0x223e11['rootName'])['_isAttached']=_0x223e11['isAdd']:(this['_diffRoots']['set'](_0x223e11['rootName'],wt(_0x223e11['rootName'],_0x223e11['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x223e11['rootName'],{}),_0x322966&&this['_idsRoots']['set'](_0x223e11['rootName'],wt(_0x223e11['rootName'],_0x223e11['elementName'],!0x0)));const _0x22da36=null===_0x223e11['_authorId']?null:_0x223e11['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5c54fb=this['_touchedRoots']['get'](_0x223e11['rootName']);_0x5c54fb&&_0x5c54fb['userId']===_0x22da36?this['_touchedRoots']['delete'](_0x223e11['rootName']):this['_touchedRoots']['set'](_0x223e11['rootName'],{'userId':_0x22da36,'isAttached':_0x223e11['isAdd']});}['_handleRootAttributeOperation'](_0x203cf1){const _0x27d31f=this['_diffRootsAttributes']['get'](_0x203cf1['root']['rootName']);null===_0x203cf1['newValue']?delete _0x27d31f[_0x203cf1['key']]:_0x27d31f[_0x203cf1['key']]=_0x203cf1['newValue'];}}function gt(_0x1d39e4){const _0x707dc=wt(_0x1d39e4['rootName'],_0x1d39e4['name'],_0x1d39e4['isAttached']());for(const _0x361225 of _0x1d39e4['getChildren']()){const _0x53c9e8=_0x361225['_clone'](!0x0);_0x707dc['_appendChild'](_0x53c9e8);}return _0x707dc;}function wt(_0x3856bf,_0x244a8e,_0x5e67ab=!0x0){const _0x4cfc46=new _0x23d676();return _0x4cfc46['rootName']=_0x3856bf,_0x4cfc46['name']=_0x244a8e,_0x4cfc46['_isAttached']=_0x5e67ab,_0x4cfc46['isAttached']=()=>_0x4cfc46['_isAttached'],_0x4cfc46;}function mt(_0x2743bb,_0xcf64a9,_0x433d7c){const _0x1e4862='elementEnd'==_0x2743bb['type']?_0x433d7c['createPositionAt'](_0x2743bb['item'],'end'):_0x433d7c['createPositionBefore'](_0x2743bb['item']);return _0x433d7c['createPositionFromPath'](_0xcf64a9,_0x1e4862['path'],_0x1e4862['stickiness']);}function pt(_0x3e2eff,_0x4b96e7,_0x4e9c1a){const _0x4e3a86='elementStart'==_0x3e2eff['type']?_0x4e9c1a['createPositionAt'](_0x3e2eff['item'],0x0):_0x4e9c1a['createPositionAfter'](_0x3e2eff['item']);return _0x4e9c1a['createPositionFromPath'](_0x4b96e7,_0x4e3a86['path'],_0x4e3a86['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x3f7e8f(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x34127f){super(),this['id']=_0x34127f['id']||_0x13bc90(),this['author']=_0x34127f['author'],this['type']=_0x34127f['type'],this['data']=_0x34127f['data']||{},this['rootName']=_0x34127f['rootName'],this['set']('createdAt',_0x34127f['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x47c701,_0x1ae1b9){this['newRevisionId']=_0x47c701,this['oldRevisionId']=_0x1ae1b9,this['changes']=new _0x2d3a61();}['_setChanges'](_0x559bda){for(const _0x392257 of _0x559bda)this['changes']['add'](_0x392257);}}class RevisionViewer extends _0x20daab{['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[_0xf95694,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x391f33){super(_0x391f33),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',(_0x2d59e2,_0x9e6559,_0x3d44ef)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x278385=>{for(const _0x1cf5ee of this['editor']['editing']['view']['document']['roots'])_0x3d44ef?_0x278385['removeClass']('ck-editor__editable__overlay',_0x1cf5ee):_0x278385['addClass']('ck-editor__editable__overlay',_0x1cf5ee);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4c2acc=>null!==_0x4c2acc),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1ee4bd,_0x58fa57,_0x3b033a)=>_0x1ee4bd&&_0x3b033a?_0x58fa57['changes']['getIndex'](_0x3b033a):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x5345cb,_0x30c86e)=>_0x5345cb?_0x30c86e['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x1cf6a4=this['editor'],_0x4117d2=new ShowChangeCommand(_0x1cf6a4,{'direction':'backward'}),_0x950f2b=new ShowChangeCommand(_0x1cf6a4,{'direction':'forward'});(_0x1cf6a4['commands']['add']('showPreviousChange',_0x4117d2),_0x1cf6a4['commands']['add']('showNextChange',_0x950f2b),_0x1cf6a4['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x1cf6a4)),this['on']('change:numberOfChanges',()=>{_0x4117d2['refresh'](),_0x950f2b['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1cf6a4['enableReadOnlyMode']('revision-viewer'),_0x1cf6a4['plugins']['has']('WidgetToolbarRepository'))&&_0x1cf6a4['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x541d17){return await this['_utils']['loadRevisionData'](_0x541d17,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x541d17);}async['getRevisionRootsAttributes'](_0x167c7a){return await this['_utils']['loadRevisionData'](_0x167c7a,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x167c7a);}async['compare'](_0x2bece5,_0x17e1a3,_0x2c48be=!0x1){if(!this['isEnabled'])return;const _0x5af92f=this['diff'],_0x38debd=this['repository'],_0x1db981='string'==typeof _0x2bece5?_0x38debd['getRevision'](_0x2bece5):_0x2bece5,_0x43e17c='string'==typeof _0x17e1a3?_0x38debd['getRevision'](_0x17e1a3):_0x17e1a3,_0x1a7a91=_0x1db981['id'],_0x3fc422=_0x43e17c?_0x43e17c['id']:null;if(!_0x2c48be&&this['diff']&&this['diff']['newRevisionId']===_0x1a7a91&&this['diff']['oldRevisionId']===_0x3fc422)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x1a7a91,_0x3fc422);const _0x2fd95f=this['_getRevisionsRange'](_0x1db981,_0x43e17c,!0x0)['map'](_0x2c6edd=>this['_utils']['loadRevisionData'](_0x2c6edd,this['adapter']));return _0x2fd95f['push'](new Promise(_0x1046ae=>{setTimeout(_0x1046ae,0x14);})),Promise['all'](_0x2fd95f)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x54735a=this['_getDiff'](_0x1a7a91,_0x3fc422);for(const _0x466043 of _0x54735a['changes'])this['_changeIdToChange']['set'](_0x466043['id'],_0x466043);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x16b827=>{for(const _0x37aa0c of this['editor']['model']['document']['getRootNames']())_0x16b827['detachRoot'](_0x37aa0c);for(const _0x320edc of Object['keys'](_0x54735a['model'])){const _0x49bf49=_0x54735a['model'][_0x320edc]['name'],_0x225a71=_0x16b827['addRoot'](_0x320edc,_0x49bf49);for(const _0x1ad17d of Object['keys'](_0x54735a['attributes'][_0x320edc]))_0x16b827['setAttribute'](_0x1ad17d,_0x54735a['attributes'][_0x320edc][_0x1ad17d],_0x225a71);_0x16b827['insert'](_0x54735a['model'][_0x320edc],_0x225a71,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x54735a['changes'])),this['isReady']=!0x0;})['catch'](_0xb44239=>{console['error'](_0xb44239),this['_cleanUp'](),_0x5af92f&&(this['diff']=_0x5af92f),this['isReady']=!0x0;});}['addRevisionData'](_0x475358,_0x4fb2fa){const _0x92ce6d=this['repository']['createRevision'](_0x475358);return _0x92ce6d['on']('_update',(_0x77418c,_0x1ed8e0,_0x7c7f93)=>_0x4fb2fa(_0x1ed8e0,_0x7c7f93,_0x92ce6d)),this['repository']['addRevision'](_0x92ce6d),_0x92ce6d;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x33ceab=>{for(const _0x332e19 of this['editor']['model']['document']['getRootNames']())_0x33ceab['detachRoot'](_0x332e19);});}['_sortAndFilterDiffChanges'](_0x4f531b){const _0x14a691=[],_0x637281=new Map();for(const _0x1c2184 of this['editor']['model']['document']['getRootNames']()){const _0x4dd561=this['editor']['editing']['view']['getDomRoot'](_0x1c2184);if(!_0x4dd561)continue;const _0x24f7ca=_0x4dd561['getClientRects']()['item'](0x0);_0x24f7ca&&(_0x14a691['push'](_0x1c2184),_0x637281['set'](_0x1c2184,_0x24f7ca));}return _0x14a691['sort']((_0x15c751,_0x3f269c)=>{const _0x4bf4d2=_0x637281['get'](_0x15c751),_0x51fef5=_0x637281['get'](_0x3f269c);return _0x4bf4d2['y']-_0x51fef5['y']||_0x4bf4d2['x']-_0x51fef5['x'];}),(_0x4f531b=_0x4f531b['filter'](_0x508cb5=>_0x14a691['includes'](_0x508cb5['rootName'])))['sort']((_0x393445,_0x551429)=>_0x14a691['indexOf'](_0x393445['rootName'])-_0x14a691['indexOf'](_0x551429['rootName'])),_0x4f531b;}['_makeTape'](_0x3627a0){const _0x377108=Array['from'](_0x3627a0['markers'])['filter'](([_0xcd574d,_0x3d82a7])=>_0xcd574d['startsWith']('revision:')&&!_0x3d82a7['isCollapsed']),_0x4f8f42=Array['from'](this['editor']['model']['createRangeIn'](_0x3627a0)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x377108['length'])for(const _0x3dc63c of _0x4f8f42){const [_0xfbd2c1,_0x61f5bc]=_0x377108[0x0],[,_0x4d5fec,_0x3fc200]=_0xfbd2c1['split'](':');if(_0x61f5bc['end']['isEqual'](_0x3dc63c['nextPosition'])&&_0x377108['shift'](),(_0x3dc63c['previousPosition']['isEqual'](_0x61f5bc['start'])||_0x3dc63c['previousPosition']['isAfter'](_0x61f5bc['start']))&&('insertion'==_0x4d5fec?_0x3dc63c['isAdded']={'userId':_0x3fc200}:'deletion'==_0x4d5fec&&(_0x3dc63c['isRemoved']={'userId':_0x3fc200})),0x0==_0x377108['length'])break;}return _0x4f8f42;}['_refreshStartEndIndex'](_0x346a0d){const _0x31a1c1=new Map();for(let _0x43e26c=0x0;_0x43e26c<_0x346a0d['length'];_0x43e26c++)'text'===_0x346a0d[_0x43e26c]['type']?(_0x346a0d[_0x43e26c]['item']['startIndex']=_0x43e26c,_0x346a0d[_0x43e26c]['item']['endIndex']=_0x43e26c):('elementStart'===_0x346a0d[_0x43e26c]['type']?_0x346a0d[_0x43e26c]['item']['startIndex']=_0x43e26c:'elementEnd'===_0x346a0d[_0x43e26c]['type']&&(_0x346a0d[_0x43e26c]['item']['endIndex']=_0x43e26c),_0x31a1c1['set'](_0x346a0d[_0x43e26c]['id'],_0x43e26c));for(const _0x4a260c of _0x31a1c1['values']())'elementStart'===_0x346a0d[_0x4a260c]['type']?_0x346a0d[_0x4a260c]['item']['endIndex']=_0x31a1c1['get'](_0x346a0d[_0x4a260c]['pairId']):'elementEnd'===_0x346a0d[_0x4a260c]['type']&&(_0x346a0d[_0x4a260c]['item']['startIndex']=_0x31a1c1['get'](_0x346a0d[_0x4a260c]['pairId']));}['_processTape'](_0x5d847a){for(let _0x47cb4e=0x0;_0x47cb4e<_0x5d847a['length'];_0x47cb4e++){if('elementStart'===_0x5d847a[_0x47cb4e]['type'])_0x5d847a[_0x47cb4e]['item']['startIndex']=_0x47cb4e;else{if('elementEnd'===_0x5d847a[_0x47cb4e]['type']){_0x5d847a[_0x47cb4e]['item']['endIndex']=_0x47cb4e;const _0x429db4=_0x5d847a[_0x47cb4e]['item']['startIndex'];_0x5d847a[_0x429db4]['pairId']=_0x5d847a[_0x47cb4e]['id'],_0x5d847a[_0x47cb4e]['pairId']=_0x5d847a[_0x429db4]['id'];}else _0x5d847a[_0x47cb4e]['item']['startIndex']=_0x47cb4e,_0x5d847a[_0x47cb4e]['item']['endIndex']=_0x47cb4e,_0x5d847a[_0x47cb4e]['pairId']=null;}_0x5d847a[_0x47cb4e]['markersStart']||(_0x5d847a[_0x47cb4e]['markersStart']=[],_0x5d847a[_0x47cb4e]['markersEnd']=[]);}}['_markInsertions'](_0x11c314,_0x5d4dde){const _0x258ac5=_0x11c314['filter'](_0x3a69b5=>!_0x3a69b5['isAdded']);for(let _0xe8c734=0x0;_0xe8c734<_0x5d4dde['length'];_0xe8c734++)_0x5d4dde[_0xe8c734]['isAdded']&&(_0x258ac5[_0xe8c734]['isAdded']=_0x5d4dde[_0xe8c734]['isAdded']);}['_getDiff'](_0x11e822,_0x49b7c5=null){const _0x2fade0=this['repository']['getRevision'](_0x11e822),_0x220d1f=_0x49b7c5?this['repository']['getRevision'](_0x49b7c5):null,_0x58834c=this['_getRevisionsRange'](_0x2fade0,_0x220d1f),_0x180972=_0x58834c[_0x58834c['length']-0x1],_0x591dec=new Map(),_0x1d8f90={'model':{},'attributes':{},'changes':[]},_0x1dc77b=new Set(),_0x4180b7=new Map();for(let _0x47b90c=_0x58834c['length']-0x1;_0x47b90c>=0x0;_0x47b90c--){const _0x1ba615=_0x58834c[_0x47b90c];for(const _0x2ee4e7 of Object['keys'](_0x1ba615['diffData']))if(_0x1ba615['diffData'][_0x2ee4e7]['attachChange']){const _0xaa97e7=_0x1ba615['diffData'][_0x2ee4e7]['attachChange'];_0xaa97e7['isAttached']?(_0x1dc77b['add'](_0x2ee4e7),_0x4180b7['has'](_0x2ee4e7)&&_0x4180b7['get'](_0x2ee4e7)['userId']==_0xaa97e7['userId']?_0x4180b7['delete'](_0x2ee4e7):_0x4180b7['set'](_0x2ee4e7,_0xaa97e7)):_0x4180b7['has'](_0x2ee4e7)?(_0x1dc77b['delete'](_0x2ee4e7),_0x4180b7['delete'](_0x2ee4e7)):(_0x1dc77b['add'](_0x2ee4e7),_0x4180b7['set'](_0x2ee4e7,_0xaa97e7));}else _0x1dc77b['add'](_0x2ee4e7);}for(const _0x534ede of _0x1dc77b){const _0x5db505=_0x4180b7['has'](_0x534ede)&&!_0x4180b7['get'](_0x534ede)['isAttached'];let _0x5e087e=_0x5db505?_0x58834c['length']-0x1:0x0;const _0x326b41=_0x5db505?-0x1:0x1;for(;_0x58834c[_0x5e087e];){const _0x56d8dc=_0x58834c[_0x5e087e];if(_0x56d8dc['diffData'][_0x534ede]){const _0x25c5c1=_0x5db505?_0x56d8dc['diffData'][_0x534ede]['attributesBefore']:_0x56d8dc['diffData'][_0x534ede]['attributesAfter'];_0x1d8f90['attributes'][_0x534ede]=_0x25c5c1?_0x2a882c(_0x25c5c1):{};break;}_0x5e087e+=_0x326b41;}}for(const _0x1d22e9 of _0x58834c){_0x1d22e9['model']={};for(const _0x581b70 of _0x1d22e9['authors'])_0x591dec['set'](_0x581b70['id'],_0x581b70);for(const _0x156748 of _0x1dc77b){const _0x1eee4d=_0x1d22e9['diffData'][_0x156748]?_0x1d22e9['diffData'][_0x156748]['insertions']:'[]',_0x37f495=_0x1d22e9['diffData'][_0x156748]?_0x1d22e9['diffData'][_0x156748]['deletions']:'[]',_0x272119=_0x1d22e9['diffData'][_0x156748]?.['rootElementName']||'$root';_0x1d22e9['model'][_0x156748]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1eee4d,_0x272119),'deletions':this['_utils']['_makeModelFromViewString'](_0x37f495,_0x272119)};}}for(const _0x54096c of _0x1dc77b){let _0x34c52e=null,_0x447cab=0x0;const _0x1c168f=_0x58834c['map'](_0x10cb0c=>_0x10cb0c['diffData'][_0x54096c]?.['rootElementName'])['find'](_0x275fe8=>void 0x0!==_0x275fe8)||'$root',_0x5392da=new Map(Array['from'](_0x2fade0['model'][_0x54096c]['insertions']['markers'])['filter'](([_0x459b5e])=>!_0x459b5e['startsWith']('revision:')));let _0x1921f6=0x0;for(const _0x145650 of _0x58834c){const _0x5046a4=this['_makeTape'](_0x145650['model'][_0x54096c]['insertions']);_0x145650==_0x2fade0?(_0x34c52e=_0x5046a4,_0x447cab=_0x34c52e['length'],_0x34c52e['forEach'](_0x205a86=>{_0x205a86['id']=_0x1921f6++;}),this['_processTape'](_0x34c52e)):this['_markInsertions'](_0x34c52e,_0x5046a4);const _0x387c83=_0x34c52e['filter'](_0x498631=>!_0x498631['isAdded'])['map'](_0xcd10f9=>_0xcd10f9['id']);let _0x4b0c0c=0x0;const _0xc38869=this['_makeTape'](_0x145650['model'][_0x54096c]['deletions']);_0xc38869['forEach'](_0x1a8e61=>{_0x1a8e61['isRemoved']?_0x1a8e61['id']=_0x447cab++:_0x1a8e61['id']=_0x387c83[_0x4b0c0c++];}),this['_processTape'](_0xc38869),this['_setDistance'](_0x34c52e,'isAdded'),this['_setDistance'](_0xc38869,'isRemoved'),_0x145650==_0x2fade0&&this['_markMarkers'](_0x34c52e,_0x5392da),_0x34c52e=this['_joinTapes'](_0x34c52e,_0xc38869),this['_refreshStartEndIndex'](_0x34c52e),this['_setDistance'](_0x34c52e,'isRemoved');}_0x34c52e=_0x34c52e['filter'](_0x4994e1=>!(_0x4994e1['isAdded']&&_0x4994e1['isRemoved']));const _0x55d263=new Map(_0x180972['model'][_0x54096c]['deletions']['markers']),_0x38d55a=new Set(_0x5392da['keys']());for(const _0x50210d of _0x55d263['keys']())_0x38d55a['delete'](_0x50210d);this['_markSuggestions'](_0x34c52e,_0x38d55a),this['_fixObsoleteTags'](_0x34c52e),_0x34c52e=this['_removeMissingPairs'](_0x34c52e),_0x34c52e=this['_markMismatchedRemovedTags'](_0x34c52e),_0x34c52e=this['_removeUnsupportedChanges'](_0x34c52e);const {root:_0x5d3391,changes:_0x219d8a}=this['_makeModelFromTape'](_0x34c52e,_0x591dec,_0x54096c,_0x1c168f);_0x1d8f90['model'][_0x54096c]=_0x5d3391;const _0x4699d6=_0x4180b7['get'](_0x54096c);if(_0x4699d6){const _0x5bfe7b=_0x591dec['get'](_0x4699d6['userId']),_0x39fb5f=new ChangeItem({'author':_0x5bfe7b,'type':_0x4699d6['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x54096c});_0x219d8a['unshift'](_0x39fb5f),_0x1d8f90['attributes'][_0x54096c]['revisionHistoryAttachChange']=_0x39fb5f['id'];}_0x1d8f90['changes']=_0x1d8f90['changes']['concat'](_0x219d8a);}return _0x1d8f90;}['_markMarkers'](_0x424fd6,_0x19c819){for(let _0x366e4e=0x0;_0x366e4e<_0x424fd6['length'];_0x366e4e++)for(const [_0x3a8f38,_0x67a64e]of _0x19c819)!_0x67a64e['isCollapsed']&&_0x67a64e['start']['isEqual'](_0x424fd6[_0x366e4e]['previousPosition'])&&_0x424fd6[_0x366e4e]['markersStart']['push'](_0x3a8f38),_0x67a64e['end']['isEqual'](_0x424fd6[_0x366e4e]['nextPosition'])&&_0x424fd6[_0x366e4e]['markersEnd']['push'](_0x3a8f38);}['_joinTapes'](_0x316f3b,_0x1829d3){let _0x817ac5=[],_0x5f2a21=0x0,_0x527cc6=0x0;for(;_0x5f2a21<_0x316f3b['length']||_0x527cc6<_0x1829d3['length'];){const _0x2bb29=_0x316f3b[_0x5f2a21]||{},_0x4c65d0=_0x1829d3[_0x527cc6]||{};if(_0x2bb29['id']==_0x4c65d0['id'])_0x5f2a21++,_0x527cc6++,_0x817ac5['push'](_0x2bb29);else{if(_0x4c65d0['isRemoved']&&_0x2bb29['isAdded']){const {commonTape:_0x38d69c,iEnd:_0x1a51cd,jEnd:_0x5644aa}=this['_threeWayMerge'](_0x316f3b,_0x5f2a21,_0x1829d3,_0x527cc6);_0x817ac5=_0x817ac5['concat'](_0x38d69c),_0x5f2a21=_0x1a51cd,_0x527cc6=_0x5644aa;}else _0x4c65d0['isRemoved']?(_0x527cc6++,_0x817ac5['push'](_0x4c65d0)):(_0x5f2a21++,_0x817ac5['push'](_0x2bb29));}}return _0x817ac5;}['_markSuggestions'](_0x53c2ef,_0x1b7d3c){const _0x518c89=[];for(let _0x314a48=0x0;_0x314a48<_0x53c2ef['length'];_0x314a48++){for(let _0x116c5b=0x0;_0x116c5b<_0x53c2ef[_0x314a48]['markersStart']['length'];_0x116c5b++){const _0xd0f5fd=_0x53c2ef[_0x314a48]['markersStart'][_0x116c5b];if(!_0x1b7d3c['has'](_0xd0f5fd))continue;const {group:_0x49a8f4,type:_0xb8180a,authorId:_0x4a227e}=_0x390ae7(_0xd0f5fd);'revision-suggestion'!=_0x49a8f4||'insertion'!=_0xb8180a&&'deletion'!=_0xb8180a||(_0x518c89['unshift']({'type':_0xb8180a,'name':_0xd0f5fd,'userId':_0x4a227e}),_0x53c2ef[_0x314a48]['markersStart']['splice'](_0x116c5b,0x1),_0x116c5b--);}_0x2cad87(_0x53c2ef[_0x314a48]);for(let _0x17bbc2=0x0;_0x17bbc2<_0x53c2ef[_0x314a48]['markersEnd']['length'];_0x17bbc2++){const _0x47b3f7=_0x53c2ef[_0x314a48]['markersEnd'][_0x17bbc2];if(!_0x1b7d3c['has'](_0x47b3f7))continue;const {group:_0x3d07bf,type:_0x4a927d}=_0x390ae7(_0x47b3f7);if('revision-suggestion'!=_0x3d07bf||'insertion'!=_0x4a927d&&'deletion'!=_0x4a927d)continue;_0x53c2ef[_0x314a48]['markersEnd']['splice'](_0x17bbc2,0x1),_0x17bbc2--;const _0x2b7049=_0x518c89['findIndex'](_0x462550=>_0x462550['name']==_0x47b3f7);_0x2b7049>-0x1&&_0x518c89['splice'](_0x2b7049,0x1);}}function _0x390ae7(_0x383c2a){const _0x5ae59b=_0x383c2a['split'](':');return{'group':_0x5ae59b[0x0],'type':_0x5ae59b[0x1],'subType':_0x5ae59b['length']>=0x5?_0x5ae59b[0x2]:null,'id':_0x5ae59b['length']<0x5?_0x5ae59b[0x2]:_0x5ae59b[0x3],'authorId':_0x5ae59b['length']<0x5?_0x5ae59b[0x3]:_0x5ae59b[0x4],'markerCount':0x6==_0x5ae59b['length']?_0x5ae59b[0x5]:null};}function _0x2cad87(_0x55f873){for(let _0x25ec66=0x0;_0x25ec66<_0x518c89['length'];_0x25ec66++){if(_0x55f873['isAdded']&&'insertion'==_0x518c89[_0x25ec66]['type']&&_0x55f873['isAdded']['userId']==_0x518c89[_0x25ec66]['userId'])return _0x55f873['isAddSuggestion']=_0x518c89[_0x25ec66],void delete _0x55f873['isAdded'];if(!_0x55f873['isAdded']&&!_0x55f873['isRemoved']&&'deletion'==_0x518c89[_0x25ec66]['type'])return void(_0x55f873['isRemoveSuggestion']=_0x518c89[_0x25ec66]);}}}['_setDistance'](_0x2c9e01,_0x5bfc67){let _0x2a60ac=0x0,_0x5afe80=!0x1;const _0x1ac61f=new Map();for(const _0x4b71f6 of _0x2c9e01)_0x4b71f6[_0x5bfc67]?_0x5afe80&&(_0x2a60ac++,_0x5afe80=!0x1):(_0x2a60ac++,_0x5afe80=!0x0),_0x1ac61f['set'](_0x4b71f6['id'],_0x2a60ac);for(let _0x538851=0x0;_0x538851<_0x2c9e01['length'];_0x538851++){if('isRemoved'==_0x5bfc67&&_0x2c9e01[_0x538851]['isAdded']||'isAdded'==_0x5bfc67&&_0x2c9e01[_0x538851]['isRemoved'])continue;if('text'==_0x2c9e01[_0x538851]['type']){_0x2c9e01[_0x538851]['distance']=0x0;continue;}const _0x4d9aeb=_0x1ac61f['get'](_0x2c9e01[_0x538851]['pairId']),_0x2af103=_0x1ac61f['get'](_0x2c9e01[_0x538851]['id']);_0x2c9e01[_0x538851]['distance']=_0x4d9aeb-_0x2af103;}}['_getRevisionsRange'](_0x3541bb,_0x1119d2,_0x302283=!0x1){const _0x1c13c4=[];let _0x408abb=this['repository']['getIndex'](_0x3541bb),_0x31a6dc=this['repository']['getIndex'](_0x1119d2);for(-0x1==_0x31a6dc&&(_0x31a6dc=this['repository']['_revisions']['length'],_0x302283=!0x1);_0x408abb<_0x31a6dc;)_0x1c13c4['push'](this['repository']['getRevision'](_0x408abb)),_0x408abb++;return _0x302283&&_0x1c13c4['push'](this['repository']['getRevision'](_0x408abb)),_0x1c13c4;}['_threeWayMerge'](_0x49c735,_0x46d073,_0x62c0b1,_0x22d355){const _0x1760b3=this['editor']['model']['schema'];let _0x55bb6c=_0x46d073;for(;_0x49c735[_0x55bb6c]&&_0x49c735[_0x55bb6c]['isAdded'];)_0x55bb6c++;let _0x4de1c9=_0x22d355;for(;_0x62c0b1[_0x4de1c9]&&_0x62c0b1[_0x4de1c9]['isRemoved'];)_0x4de1c9++;_0x501d65(_0x49c735,_0x46d073,_0x55bb6c),_0x501d65(_0x62c0b1,_0x22d355,_0x4de1c9);const _0x1996e8=_0x62c0b1['slice'](_0x22d355,_0x4de1c9)['concat'](_0x49c735['slice'](_0x46d073,_0x55bb6c));return _0x1996e8['sort']((_0x238fd5,_0x324a)=>_0x238fd5['side']!=_0x324a['side']?_0x238fd5['side']-_0x324a['side']:_0x238fd5['level']!=_0x324a['level']?_0x238fd5['level']-_0x324a['level']:_0x238fd5['distance']!=_0x324a['distance']?_0x324a['distance']-_0x238fd5['distance']:!!_0x238fd5['isAdded']!=!!_0x324a['isAdded']?-0x1==_0x238fd5['side']||0x0==_0x238fd5['side']?_0x238fd5['isAdded']?-0x1:0x1:_0x238fd5['isAdded']?0x1:-0x1:_0x238fd5['index']-_0x324a['index']),{'commonTape':_0x1996e8,'iEnd':_0x55bb6c,'jEnd':_0x4de1c9};function _0x501d65(_0x465717,_0x1c2da5,_0x3aa5d1){let _0x555c54=-0x1,_0x47a460=Number['POSITIVE_INFINITY'],_0x12598a=!0x0;for(let _0x3fd3bc=_0x1c2da5;_0x3fd3bc<_0x3aa5d1;_0x3fd3bc++)if(_0x1760b3['isInline'](_0x465717[_0x3fd3bc]['item'])||(_0x12598a=!0x1),_0x465717[_0x3fd3bc]['item']['startIndex']<_0x1c2da5&&(_0x555c54=_0x3fd3bc),_0x465717[_0x3fd3bc]['item']['endIndex']>=_0x3aa5d1){_0x47a460=_0x3fd3bc;break;}_0x12598a&&(_0x555c54=_0x3aa5d1-0x1);for(let _0xd57910=_0x1c2da5;_0xd57910<_0x3aa5d1;_0xd57910++)_0x465717[_0xd57910]['side']=_0xd57910<=_0x555c54?-0x1:_0xd57910<_0x47a460?0x0:0x1,_0x465717[_0xd57910]['index']=_0xd57910;let _0x569346=0x0;for(let _0x5f4434=_0x1c2da5;_0x5f4434<=_0x555c54;_0x5f4434++)0x0==_0x465717[_0x5f4434]['distance']?_0x465717[_0x5f4434]['level']=_0x569346:(_0x569346++,_0x465717[_0x5f4434]['level']=_0x569346,_0x569346++);for(let _0x2e8214=_0x1c2da5;_0x2e8214<_0x3aa5d1;_0x2e8214++)0x0==_0x465717[_0x2e8214]['side']&&(_0x465717[_0x2e8214]['level']=_0x569346);_0x569346=0x0;for(let _0x24744b=_0x3aa5d1-0x1;_0x24744b>=_0x47a460;_0x24744b--)0x0==_0x465717[_0x24744b]['distance']?_0x465717[_0x24744b]['level']=_0x569346:(_0x569346--,_0x465717[_0x24744b]['level']=_0x569346,_0x569346--);}}['_fixObsoleteTags'](_0x434dba){const _0xacc756=new Map(),_0x285126=this['editor']['model']['schema'];for(let _0x1084de=0x1;_0x1084de<_0x434dba['length'];_0x1084de++){let _0xc284b2,_0x3f597b,_0x1ab0ae;const _0x185257=_0x434dba[_0x1084de],_0x26b372=_0x434dba[_0x1084de-0x1];if('text'==_0x185257['type'])continue;if(_0x185257['type']!=_0x26b372['type'])continue;if(!_0x285126['isBlock'](_0x26b372['item'])||_0x285126['isLimit'](_0x26b372['item']))continue;if(!_0x285126['isBlock'](_0x185257['item'])||_0x285126['isLimit'](_0x185257['item']))continue;if((_0x434dba[_0x1084de]['isAdded']||_0x434dba[_0x1084de]['isAddSuggestion'])&&_0x434dba[_0x1084de-0x1]['isRemoved'])_0xc284b2=_0x434dba[_0x1084de],_0x3f597b=_0x434dba[_0x1084de-0x1],_0x1ab0ae=_0x1084de-0x1;else{if(!_0x434dba[_0x1084de]['isRemoved']||!_0x434dba[_0x1084de-0x1]['isAdded']&&!_0x434dba[_0x1084de-0x1]['isAddSuggestion'])continue;_0xc284b2=_0x434dba[_0x1084de-0x1],_0x3f597b=_0x434dba[_0x1084de],_0x1ab0ae=_0x1084de;}const _0x4c7b31=_0xc284b2['level']==_0x3f597b['level'],_0xa3517=Math['abs'](_0xc284b2['level'])<Math['abs'](_0x3f597b['level'])&&0x0==_0x3f597b['distance'];(_0x4c7b31||_0xa3517)&&(_0xacc756['set'](_0x3f597b['id'],_0xc284b2['id']),_0x434dba['splice'](_0x1ab0ae,0x1),_0x1084de--,_0xc284b2['isAdded']=!0x1);}for(let _0xbd0aa7=0x0;_0xbd0aa7<_0x434dba['length'];_0xbd0aa7++)_0xacc756['has'](_0x434dba[_0xbd0aa7]['pairId'])&&(_0x434dba[_0xbd0aa7]['pairId']=_0xacc756['get'](_0x434dba[_0xbd0aa7]['pairId']));}['_removeMissingPairs'](_0x22e652){const _0x3a40a1=new Set(_0x22e652['map'](_0x2fe2f6=>_0x2fe2f6['id']));for(let _0x35acb7=0x0;_0x35acb7<_0x22e652['length'];_0x35acb7++)_0x3a40a1['has'](_0x22e652[_0x35acb7]['pairId'])||0x0==_0x22e652[_0x35acb7]['distance']||(_0x22e652[_0x35acb7]['isIncorrect']=!0x0);return _0x22e652['filter'](_0x522325=>!_0x522325['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3e2ce4){const _0x3b466d=new Set();for(let _0x3cdac9=0x0;_0x3cdac9<_0x3e2ce4['length'];_0x3cdac9++){if(_0x3b466d['has'](_0x3e2ce4[_0x3cdac9]['id'])&&_0x3e2ce4[_0x3cdac9]['isRemoved']&&(_0x3e2ce4[_0x3cdac9]['isIncorrect']=!0x0),_0x3e2ce4[_0x3cdac9]['isIncorrect'])continue;if(0x0==_0x3e2ce4[_0x3cdac9]['distance'])continue;if('elementStart'!=_0x3e2ce4[_0x3cdac9]['type'])continue;if(null==_0x3e2ce4[_0x3cdac9]['pairId'])continue;let _0x15d0aa=_0x3cdac9+0x1,_0x10baab=0x0;for(;_0x3e2ce4[_0x15d0aa]['id']!=_0x3e2ce4[_0x3cdac9]['pairId'];)'elementStart'==_0x3e2ce4[_0x15d0aa]['type']?_0x10baab++:'elementEnd'==_0x3e2ce4[_0x15d0aa]['type']&&_0x10baab--,_0x15d0aa++;if(0x0!=_0x10baab){if(_0x3e2ce4[_0x3cdac9]['isRemoved'])_0x3e2ce4[_0x3cdac9]['isIncorrect']=!0x0;else{for(;_0x15d0aa!=_0x3cdac9;)_0x3e2ce4[_0x15d0aa]['isRemoved']&&0x0!=_0x3e2ce4[_0x15d0aa]['distance']&&(_0x3e2ce4[_0x15d0aa]['isIncorrect']=!0x0,_0x3b466d['add'](_0x3e2ce4[_0x15d0aa]['pairId'])),_0x15d0aa--;}}}return _0x3e2ce4['filter'](_0x425695=>!_0x425695['isIncorrect']);}['_removeUnsupportedChanges'](_0x484ae7){const _0x1a50b2=this['editor']['model']['schema'];for(let _0xc1e3a9=0x0;_0xc1e3a9<_0x484ae7['length'];_0xc1e3a9++){if(!(_0x484ae7[_0xc1e3a9]['isAdded']||_0x484ae7[_0xc1e3a9]['isAddSuggestion']||_0x484ae7[_0xc1e3a9]['isRemoved']||_0x484ae7[_0xc1e3a9]['isRemoveSuggestion']))continue;if(0x0==_0x484ae7[_0xc1e3a9]['distance'])continue;const _0x816de7=_0x484ae7[_0xc1e3a9]['item'];_0x1a50b2['isBlock'](_0x816de7)||_0x1a50b2['isLimit'](_0x816de7)||(_0x484ae7[_0xc1e3a9]['isAdded']&&delete _0x484ae7[_0xc1e3a9]['isAdded'],_0x484ae7[_0xc1e3a9]['isAddSuggestion']&&delete _0x484ae7[_0xc1e3a9]['isAddSuggestion'],_0x484ae7[_0xc1e3a9]['isRemoveSuggestion']&&delete _0x484ae7[_0xc1e3a9]['isRemoveSuggestion'],_0x484ae7[_0xc1e3a9]['isRemoved']&&(_0x484ae7[_0xc1e3a9]['isIncorrect']=!0x0));}return _0x484ae7['filter'](_0x2eba5c=>!_0x2eba5c['isIncorrect']);}['_makeModelFromTape'](_0x512cb8,_0x296ad5,_0x5e4c0c,_0x33085c){const _0x447183=new _0x23d676(),_0x55ca=[],_0x88e2ba=new Map(),_0x46e61e=this['editor']['model'],_0x1634a2=_0x46e61e['schema'],_0x560e68=[_0x447183],_0x4c06cf={},_0x915353={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x447183['name']=_0x33085c;let _0x1051d8=null;const _0x2ead49=[0x0];for(let _0x52fc1c=0x0;_0x52fc1c<_0x512cb8['length'];_0x52fc1c++)if('elementStart'===_0x512cb8[_0x52fc1c]['type']){_0x512cb8[_0x52fc1c]['previousPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49);const _0x13740c=new _0x587783(_0x512cb8[_0x52fc1c]['item']['name'],_0x512cb8[_0x52fc1c]['item']['getAttributes']());_0x560e68[0x0]['_appendChild'](_0x13740c),_0x2ead49['push'](0x0),_0x560e68['unshift'](_0x13740c),_0x512cb8[_0x52fc1c]['nextPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49);}else'elementEnd'===_0x512cb8[_0x52fc1c]['type']?(_0x560e68['shift'](),_0x512cb8[_0x52fc1c]['previousPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49),_0x2ead49['pop'](),_0x2ead49[_0x2ead49['length']-0x1]++,_0x512cb8[_0x52fc1c]['nextPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49)):(_0x512cb8[_0x52fc1c]['previousPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49),_0x1051d8?_0x1051d8['_data']+=_0x512cb8[_0x52fc1c]['item']['data']:_0x1051d8=new _0xfa86cb(_0x512cb8[_0x52fc1c]['item']['data'],_0x512cb8[_0x52fc1c]['item']['getAttributes']()),_0x512cb8[_0x52fc1c+0x1]&&'text'===_0x512cb8[_0x52fc1c+0x1]['type']&&_0x1b5500(_0x1051d8,_0x512cb8[_0x52fc1c+0x1]['item'])||(_0x560e68[0x0]['_appendChild'](_0x1051d8),_0x1051d8=null),_0x2ead49[_0x2ead49['length']-0x1]+=_0x512cb8[_0x52fc1c]['item']['offsetSize'],_0x512cb8[_0x52fc1c]['nextPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49));for(let _0x170440=0x0;_0x170440<_0x512cb8['length'];_0x170440++){const _0x481ab7=_0x512cb8[_0x170440]['previousPosition'],_0x23d9a7=_0x512cb8[_0x170440]['nextPosition'];for(const _0x21abb2 of _0x512cb8[_0x170440]['markersStart'])_0x88e2ba['set'](_0x21abb2,{'start':_0x481ab7,'end':null});_0x1d7d1b('isRemoveSuggestion',_0x170440,_0x481ab7,_0x23d9a7),_0x1d7d1b('isAddSuggestion',_0x170440,_0x481ab7,_0x23d9a7),_0x1d7d1b('isRemoved',_0x170440,_0x481ab7,_0x23d9a7),_0x1d7d1b('isAdded',_0x170440,_0x481ab7,_0x23d9a7);for(const _0x2e527a of _0x512cb8[_0x170440]['markersEnd']){const _0x46aeb3=_0x88e2ba['get'](_0x2e527a);_0x46aeb3?_0x46aeb3['end']=_0x23d9a7:_0x88e2ba['set'](_0x2e527a,{'start':_0x23d9a7,'end':_0x23d9a7});}}for(const [_0x485655,_0x4968f8]of _0x88e2ba){const _0x7f6257=this['editor']['model']['createRange'](_0x4968f8['start'],_0x4968f8['end']);_0x447183['markers']['set'](_0x485655,_0x7f6257);}return _0x55ca['sort']((_0x3b201d,_0x65eeb0)=>{const _0x1b9ec1=_0x447183['markers']['get']('revision:'+_0x3b201d['id']),_0x109a8d=_0x447183['markers']['get']('revision:'+_0x65eeb0['id']);return _0x1b9ec1['start']['isBefore'](_0x109a8d['start'])?-0x1:_0x1b9ec1['start']['isAfter'](_0x109a8d['start'])?0x1:_0x1b9ec1['end']['isBefore'](_0x109a8d['end'])?-0x1:_0x1b9ec1['end']['isAfter'](_0x109a8d['end'])?0x1:'add'===_0x3b201d['type']?-0x1:0x1;}),{'root':_0x447183,'changes':_0x55ca};function _0x1d7d1b(_0x23539b,_0x367ce3,_0x2c4d7d,_0xb30bcd){const _0x5a6c88=!!_0x512cb8[_0x367ce3][_0x23539b],_0x4738ab=_0x5a6c88?_0x512cb8[_0x367ce3][_0x23539b]['userId']:null,_0x59d7d5=_0x367ce3===_0x512cb8['length']-0x1,_0x3e785a=_0x915353[_0x23539b][0x0],_0x4c1dab=_0x1634a2['isObject'](_0x512cb8[_0x367ce3]['item']);!_0x4c06cf[_0x23539b]&&_0x5a6c88?_0x4c06cf[_0x23539b]={'start':_0x2c4d7d,'tapeItem':_0x512cb8[_0x367ce3],'userId':_0x4738ab,'type':_0x23539b}:_0x4c06cf[_0x23539b]&&!_0x5a6c88?(_0x4c06cf[_0x23539b]['end']=_0x2c4d7d,_0x430ec2(_0x4c06cf[_0x23539b]),_0x4c06cf[_0x23539b]=null):_0x4c06cf[_0x23539b]&&_0x5a6c88&&_0x4c06cf[_0x23539b]['userId']!==_0x4738ab&&(_0x4c06cf[_0x23539b]['end']=_0x2c4d7d,_0x3e785a&&_0x3e785a['userId']===_0x4c06cf[_0x23539b]['userId']||_0x430ec2(_0x4c06cf[_0x23539b]),_0x4c06cf[_0x23539b]={'start':_0x2c4d7d,'tapeItem':_0x512cb8[_0x367ce3],'userId':_0x4738ab,'type':_0x23539b}),_0x4c06cf[_0x23539b]&&_0x4c1dab&&('elementStart'!==_0x512cb8[_0x367ce3]['type']||_0x3e785a&&_0x3e785a['userId']===_0x4738ab||_0x915353[_0x23539b]['unshift']({'userId':_0x4738ab,'object':_0x512cb8[_0x367ce3]['item'],'change':_0x4c06cf[_0x23539b]}),'elementEnd'===_0x512cb8[_0x367ce3]['type']&&_0x3e785a&&_0x3e785a['object']===_0x512cb8[_0x367ce3]['item']&&(_0x915353[_0x23539b]['shift'](),_0x4c06cf[_0x23539b]=_0x3e785a['change'])),_0x4c06cf[_0x23539b]&&_0x59d7d5&&(_0x4c06cf[_0x23539b]['end']=_0xb30bcd,_0x430ec2(_0x4c06cf[_0x23539b]),_0x4c06cf[_0x23539b]=null);}function _0x430ec2({start:_0x3bf8fe,end:_0x2293b4,tapeItem:_0x5406e8,userId:_0x17cc0b,type:_0x557592}){const _0x3550ec=_0x5406e8['item'],_0x521602=_0x46e61e['schema']['isBlock'](_0x3550ec)&&!_0x46e61e['schema']['isLimit'](_0x3550ec),_0x3d905a=_0x3bf8fe['nodeAfter']==_0x2293b4['parent']&&_0x2293b4['isAtStart'];if(_0x521602&&_0x3d905a)return;const _0x250cb5=_0x46e61e['createRange'](_0x3bf8fe,_0x2293b4),_0x4a795b=_0x296ad5['get'](_0x17cc0b),_0x40458e=new ChangeItem({'author':_0x4a795b,'type':'isAdded'==_0x557592||'isAddSuggestion'==_0x557592?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x557592||'isRemoveSuggestion'==_0x557592},'createdAt':new Date(),'rootName':_0x5e4c0c});_0x55ca['push'](_0x40458e),_0x447183['markers']['set']('revision:'+_0x40458e['id'],_0x250cb5);}function _0x1b5500(_0x18e188,_0x369f55){const _0x505896=_0x18e188['getAttributes'](),_0x29138c=_0x369f55['getAttributes']();for(const _0x5bf152 of _0x505896){if(_0x5bf152[0x1]!==_0x369f55['getAttribute'](_0x5bf152[0x0]))return!0x1;_0x29138c['next']();}return _0x29138c['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x12be95=>{const _0x5d2834=_0x12be95['markerName']['split'](':')[0x1],_0x3843d7=this['_getChangeFromId'](_0x5d2834);if(!_0x3843d7)return null;const _0x4e5834='add'==_0x3843d7['type']?'insertion':'deletion',_0x57eae7=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4e5834];return _0x3843d7['data']['isSuggestion']&&_0x57eae7['push']('ck-suggestion-marker-'+_0x4e5834+'-new'),this['activeChange']==_0x3843d7&&_0x57eae7['push']('ck-suggestion-marker--active'),{'classes':_0x57eae7,'attributes':{'data-change-id':_0x5d2834}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x41f25d=>{_0x41f25d['on']('element:pre',(_0x3c8178,_0x10bc1e,_0x4b12e8)=>{const _0x2dff85=_0x10bc1e['viewItem']['getChild'](0x0);if(!_0x2dff85||!_0x2dff85['is']('element','code'))return;if(!_0x4b12e8['consumable']['consume'](_0x2dff85,{'attributes':['vid_start','vid_end']}))return;const _0x295a6e=_0x10bc1e['modelRange']['start']['nodeAfter'];_0x4b12e8['writer']['setAttribute']('vid_start',_0x2dff85['getAttribute']('vid_start'),_0x295a6e),_0x4b12e8['writer']['setAttribute']('vid_end',_0x2dff85['getAttribute']('vid_end'),_0x295a6e);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x456730=>{_0x456730['on']('element',(_0x4568ab,_0xf11c58,_0x384e63)=>{if(!_0x384e63['consumable']['consume'](_0xf11c58['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0xf11c58['modelRange']['isCollapsed'])return;const _0x4ebe5b=_0xf11c58['modelRange']['start']['nodeAfter'];_0x4ebe5b['hasAttribute']('vid_start')||_0x4ebe5b['hasAttribute']('vid')||(_0x384e63['writer']['setAttribute']('vid_start',_0xf11c58['viewItem']['getAttribute']('vid_start'),_0x4ebe5b),_0x384e63['writer']['setAttribute']('vid_end',_0xf11c58['viewItem']['getAttribute']('vid_end'),_0x4ebe5b));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x3e7b99=>_0x3e7b99['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x330405,[,_0xf142aa])=>{['vid_start','vid_end','vid']['includes'](_0xf142aa)&&(_0x330405['return']=!0x0,_0x330405['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x336d35=>{_0x336d35['on']('attribute:vid',(_0x8321b6,_0x594d22,_0x205866)=>{if('\x20'!=_0x594d22['item']['data']||_0x594d22['item']['parent']['maxOffset']>0x1)return;if(!_0x205866['consumable']['consume'](_0x594d22['item'],_0x8321b6['name']))return;const _0x4d4140=_0x205866['writer'],_0x21ae0f=_0x205866['mapper']['toViewRange'](_0x594d22['range']);_0x4d4140['wrap'](_0x21ae0f,_0x4d4140['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x15f922){const _0x5e2090=_0x15f922['plugins']['get']('RevisionViewer');return(_0x3d10c5,_0x2c66a8,_0x424666)=>{const _0x18c6dc=_0x2c66a8['markerName']['split'](':')[0x1],_0x2a7e79=_0x5e2090['_getChangeFromId'](_0x18c6dc);if(!_0x2a7e79)return null;const _0xd29f64='add'==_0x2a7e79['type']?'split':'merge';if(!_0x424666['consumable']['test'](_0x2c66a8['markerRange'],_0x3d10c5['name']))return;const _0x3102de=_0x2c66a8['markerRange']['getWalker'](),_0x42d66c=_0x2c66a8['markerRange']['start'],_0x201730=_0x15f922['model']['schema'];let _0x42318b=null,_0x3cf027=null,_0x58ae27=!0x1,_0x482279=!0x1;for(const _0x1e06d1 of _0x3102de){const _0x527d5e=_0x1e06d1['item'];_0x58ae27=_0x58ae27||_0x201730['isContent'](_0x527d5e);const _0x1cac50=_0x424666['mapper']['toViewElement'](_0x527d5e);if(_0x1cac50&&_0x1cac50['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1e06d1['type']&&(_0x201730['isBlock'](_0x527d5e)&&!_0x201730['isLimit'](_0x527d5e)&&(_0x527d5e['nextSibling']||_0x42d66c['isAtEnd']?_0x42318b&&_0x42318b['parent']==_0x527d5e||(_0x42318b=_0x527d5e,_0x5f77c5(_0x1e06d1['previousPosition']),_0x482279=!0x0):_0x3cf027=_0x3cf027||_0x1e06d1['previousPosition']));}function _0x5f77c5(_0x15575f){const _0x38cb47=_0x424666['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xd29f64}),_0x13c957=_0x424666['mapper']['toViewPosition'](_0x15575f);_0x2a7e79['data']['isSuggestion']&&_0x424666['writer']['addClass']('ck-suggestion-marker-'+_0xd29f64+'-new',_0x38cb47),_0x5e2090['activeChange']==_0x2a7e79&&_0x424666['writer']['addClass']('ck-suggestion-marker--active',_0x38cb47),_0x424666['writer']['insert'](_0x13c957,_0x38cb47),_0x424666['mapper']['bindElementToMarker'](_0x38cb47,_0x2c66a8['markerName']);}_0x58ae27||_0x482279||!_0x3cf027||_0x5f77c5(_0x3cf027);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x17683a,_0x14ab1b,_0x283e17)=>{const _0x329908=_0x283e17['mapper']['markerNameToElements'](_0x14ab1b['markerName']);if(_0x329908){for(const _0x40883e of _0x329908)(_0x40883e['hasClass']('ck-suggestion-marker-split')||_0x40883e['hasClass']('ck-suggestion-marker-merge'))&&(_0x283e17['mapper']['unbindElementFromMarkerName'](_0x40883e,_0x14ab1b['markerName']),_0x283e17['writer']['remove'](_0x40883e));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1300a5,_0x52cca9,_0x24902b)=>{const _0xaa26e9=_0x52cca9['markerName']['split'](':')[0x1],_0x1ba5d5=this['_getChangeFromId'](_0xaa26e9);if(!_0x1ba5d5)return null;const _0x5605e7='add'==_0x1ba5d5['type']?'split':'merge';if(_0x24902b['consumable']['test'](_0x52cca9['markerRange'],_0x1300a5['name']))for(const _0x20ca9a of _0x52cca9['markerRange']['getItems']()){if(!_0x20ca9a['is']('element','softBreak'))continue;const _0x353975=_0x24902b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5605e7}),_0x41a054=_0x24902b['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x20ca9a));_0x1ba5d5['data']['isSuggestion']&&_0x24902b['writer']['addClass']('ck-suggestion-marker-'+_0x5605e7+'-new',_0x353975),this['activeChange']==_0x1ba5d5&&_0x24902b['writer']['addClass']('ck-suggestion-marker--active',_0x353975),_0x24902b['writer']['insert'](_0x41a054,_0x353975),_0x24902b['mapper']['bindElementToMarker'](_0x353975,_0x52cca9['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x543dea=>{for(const _0xd807c3 of this['editor']['model']['document']['getRootNames']()){const _0x1e3f41=this['editor']['model']['document']['getRoot'](_0xd807c3),_0x2365cf=this['editor']['editing']['view']['document']['getRoot'](_0xd807c3);if(_0x2365cf){const _0x481dee=_0x1e3f41['getAttribute']('revisionHistoryAttachChange');if(_0x543dea['removeAttribute']('data-change-id',_0x2365cf),_0x543dea['removeClass']('ck-revision-history-root-add',_0x2365cf),_0x543dea['removeClass']('ck-revision-history-root-remove',_0x2365cf),_0x543dea['removeClass']('ck-revision-history-root--active',_0x2365cf),_0x481dee){const _0x2ae6c1=this['_getChangeFromId'](_0x481dee);if(!_0x2ae6c1)return null;_0x543dea['setAttribute']('data-change-id',_0x481dee,_0x2365cf),_0x543dea['addClass']('ck-revision-history-root-'+_0x2ae6c1['type'],_0x2365cf),this['activeChange']==_0x2ae6c1&&_0x543dea['addClass']('ck-revision-history-root--active',_0x2365cf);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3469e1=>'revision-comment:'+_0x3469e1,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x4a37ae=>'revision-suggestion:'+_0x4a37ae,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x30fd79=>({'name':'suggestion:'+_0x30fd79,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4e89d6=>{const _0x4c48d5=_0x4e89d6['markerName']['split'](':')[0x1];return'insertion'!=_0x4c48d5&&'deletion'!=_0x4c48d5?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4c48d5]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x266de5,_0x43f54f,_0x1ce429)=>{const _0x2ee91a=_0x1ce429['mapper']['markerNameToElements'](_0x43f54f['markerName']);if(_0x2ee91a){for(const _0x5dcbc4 of _0x2ee91a)_0x5dcbc4['is']('uiElement')&&(_0x1ce429['mapper']['unbindElementFromMarkerName'](_0x5dcbc4,_0x43f54f['markerName']),_0x1ce429['writer']['remove'](_0x5dcbc4));}},{'priority':'high'});}['_getChangeFromId'](_0x33d788){return this['_changeIdToChange']['get'](_0x33d788);}['_getViewForChange'](_0x1ce1a8){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x1ce1a8),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x46290e,_0x185885,_0x16305d,_0x49261e)=>{_0x49261e&&this['_balloon']['remove'](_0x49261e),_0x16305d&&(this['_balloon']['add']({'view':_0x16305d,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x23902c=this['editor']['editing'],_0x3bc3ca=this['_getChangeFromId'](_0x16305d['changeId']);let _0x21ac9e;if(_0x3bc3ca['data']['isOnRoot']){const _0x462662=_0x23902c['view']['getDomRoot'](_0x3bc3ca['rootName']);_0x21ac9e=Array['from'](_0x462662['getClientRects']());}else{const _0x5ad8e8=this['editor']['model']['markers']['get']('revision:'+_0x16305d['changeId']);_0x21ac9e=Array['from'](_0x23902c['mapper']['markerNameToElements'](_0x5ad8e8['name']))['map'](_0x351c4c=>_0x23902c['view']['domConverter']['mapViewToDom'](_0x351c4c))['map'](_0x2c040a=>Array['from'](_0x2c040a['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x21ac9e[0x0];return _0x21ac9e['find'](_0x45480c=>_0x45480c['top']-0x3<=this['_activeViewTarget']['y']&&_0x45480c['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x45480c['left']-0x3<=this['_activeViewTarget']['x']&&_0x45480c['right']+0x3>=this['_activeViewTarget']['x'])||_0x21ac9e[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x1d018f,_0x58ebf0,_0x3fdf9c,_0x4a651e)=>{this['activeView']=_0x3fdf9c?this['_getViewForChange'](_0x3fdf9c):null,this['editor']['model']['change'](()=>{const _0x3781c9=this['editor']['editing'];_0x4a651e&&(_0x4a651e['data']['isOnRoot']?_0x3781c9['view']['change'](_0x2160c0=>{_0x2160c0['removeClass']('ck-revision-history-root--active',_0x3781c9['view']['document']['getRoot'](_0x4a651e['rootName']));}):_0x3781c9['reconvertMarker']('revision:'+_0x4a651e['id'])),_0x3fdf9c&&(_0x3fdf9c['data']['isOnRoot']?_0x3781c9['view']['change'](_0x2fffb1=>{_0x2fffb1['addClass']('ck-revision-history-root--active',_0x3781c9['view']['document']['getRoot'](_0x3fdf9c['rootName']));}):_0x3781c9['reconvertMarker']('revision:'+_0x3fdf9c['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0xcd8d3,_0x396e2a)=>{if(this['activeChange'])return;const _0x4c0bbf=this['_findChangeIdFromDomTarget'](_0x396e2a['target']),_0xefc140=this['_changeIdToChange']['get'](_0x4c0bbf);_0xefc140?(this['_activeViewTarget']={'x':_0x396e2a['domEvent']['x'],'y':_0x396e2a['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0xefc140)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4657a8,_0x259ba7)=>{const _0x5ca194=this['_findChangeIdFromDomTarget'](_0x259ba7['target']),_0x539f25=this['_changeIdToChange']['get'](_0x5ca194);_0x539f25?(this['_activeViewTarget']={'x':_0x259ba7['domEvent']['x'],'y':_0x259ba7['domEvent']['y']},_0x539f25===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x539f25):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x228553){do{const _0x241fd1=_0x228553['getAttribute']('data-change-id');if(_0x241fd1)return _0x241fd1;_0x228553=_0x228553['parent'];}while(_0x228553);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x12508d=>{for(const _0x369496 of this['editor']['model']['markers'])_0x12508d['removeMarker'](_0x369496);});}}function _t(_0x5c8a24,_0x2c3c06){return(_0x4793d0,_0x54d636,_0x8f2efc)=>{if(!_0x8f2efc['consumable']['test'](_0x54d636['markerRange'],_0x4793d0['name']))return;const _0x4aba10=_0x54d636['markerRange']['getWalker'](),_0x4e5e5d=_0x54d636['markerRange']['start'],_0x3047bf=_0x5c8a24['model']['schema'];let _0x3f1364=null,_0xcd6779=null,_0x582563=!0x1,_0x42607e=!0x1;for(const _0xaa139d of _0x4aba10){const _0x5eea7c=_0xaa139d['item'];_0x582563=_0x582563||_0x3047bf['isContent'](_0x5eea7c);const _0x4611b9=_0x8f2efc['mapper']['toViewElement'](_0x5eea7c);if(_0x4611b9&&_0x4611b9['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xaa139d['type']&&(_0x3047bf['isBlock'](_0x5eea7c)&&!_0x3047bf['isLimit'](_0x5eea7c)&&(_0x5eea7c['nextSibling']||_0x4e5e5d['isAtEnd']?_0x3f1364&&_0x3f1364['parent']==_0x5eea7c||(_0x3f1364=_0x5eea7c,_0xca645e(_0xaa139d['previousPosition']),_0x42607e=!0x0):_0xcd6779=_0xcd6779||_0xaa139d['previousPosition']));}function _0xca645e(_0x494829){const _0x553a7f=_0x8f2efc['mapper']['toViewPosition'](_0x494829),_0x2cad98=_0x8f2efc['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2c3c06});_0x8f2efc['writer']['insert'](_0x553a7f,_0x2cad98),_0x8f2efc['mapper']['bindElementToMarker'](_0x2cad98,_0x54d636['markerName']);}_0x582563||_0x42607e||!_0xcd6779||_0xca645e(_0xcd6779);};}class RestoreRevisionCommand extends _0x1a1b5b{constructor(_0x4f9038){super(_0x4f9038);const _0x1e957c=_0x4f9038['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x1e957c,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1e957c,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4e1e54=this['editor'],_0x3957ed=_0x4e1e54['plugins']['get'](RevisionViewer),_0x4e677f=_0x3957ed['isReady']?_0x3957ed['diff']['newRevisionId']:null;_0x4e1e54['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4e677f);}['refresh'](){const {isReady:_0x40afe0,isEnabled:_0x8fdd13,repository:_0xe633ef,diff:_0x38ebd8}=this['editor']['plugins']['get'](RevisionViewer),_0x46cd8a=_0x38ebd8&&_0xe633ef['getLaterVisibleRevision'](_0x38ebd8['newRevisionId']);this['isEnabled']=_0x40afe0&&_0x8fdd13&&Boolean(_0x46cd8a);}}class ShowChangeCommand extends _0x1a1b5b{['_step'];constructor(_0x555821,{direction:_0x10c9b5}){super(_0x555821);const _0x1d5147=_0x555821['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x10c9b5?0x1:-0x1,this['listenTo'](_0x1d5147,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1d5147,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1d5147,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xaf8e94=this['editor'],_0x489695=_0xaf8e94['plugins']['get'](RevisionViewer),{isNavigationMode:_0x54dabb,currentChangeNumber:_0x332a8f}=_0x489695;let _0x2dc013;if(_0x489695['activeChange']=_0x54dabb?_0x489695['diff']['changes']['get'](_0x332a8f+this['_step']):_0x489695['diff']['changes']['first'],_0x489695['activeChange']['data']['isOnRoot'])_0x2dc013=_0xaf8e94['editing']['view']['getDomRoot'](_0x489695['activeChange']['rootName']);else{const _0x2d6a3f=_0xaf8e94['model']['markers']['get']('revision:'+_0x489695['activeChange']['id']);_0x2dc013=_0x49adfb(_0xaf8e94['editing'],_0x2d6a3f);}_0x39f26f({'target':_0x2dc013,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x9ffa14,currentChangeNumber:_0x1a76fc,numberOfChanges:_0x4a95da,isReady:_0xcb25f2,isEnabled:_0x12bd3a}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x12bd3a&&_0xcb25f2&&_0x4a95da)&&(!_0x9ffa14||(0x1===this['_step']?_0x1a76fc<_0x4a95da-0x1:_0x1a76fc>0x0));}}class ChangesNavigationView extends _0x5c0571{constructor(_0x1ef24f){super(_0x1ef24f);const _0x3d52a2=this['bindTemplate'],_0x2253b9=new _0x48a0f1(_0x1ef24f),_0x529ba8=new _0x48a0f1(_0x1ef24f);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',(_0x3a2106,_0x20f140)=>_0x3a2106&&_0x20f140>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3c30b1,_0x4ef698,_0x11a8be,_0x4be8f9)=>{if(!_0x3c30b1)return ft(_0x1ef24f,'Loading...');if(!_0x11a8be)return ft(_0x1ef24f,'No\x20changes');const _0x3a5e7b=ft(_0x1ef24f,'NUMBER_OF_CHANGES',_0x11a8be);return _0x4be8f9?ft(_0x1ef24f,'X_OF_Y_CHANGES',[_0x4ef698+0x1,_0x11a8be]):_0x3a5e7b;}),_0x2253b9['set']({'label':ft(_0x1ef24f,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x5053dd}),_0x529ba8['set']({'label':ft(_0x1ef24f,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x2b02d}),_0x2253b9['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x529ba8['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2253b9['on']('execute',()=>this['fire']('execute','backward')),_0x529ba8['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',_0x3d52a2['if']('_isStatusLabelVisible','ck-hidden',_0x17053d=>!_0x17053d)]},'children':[{'text':_0x3d52a2['to']('isNavigationMode',_0x4e81f9=>_0x4e81f9?ft(_0x1ef24f,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x1ef24f,'Total')+':\x20')}]},{'text':_0x3d52a2['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2253b9,_0x529ba8]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x20daab{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5b8763=this['editor']['editing']['view'];_0x5b8763['change'](_0x246789=>{for(const _0x4d8cf9 of _0x5b8763['document']['roots'])_0x246789['addClass'](yt,_0x4d8cf9);});}['hide'](){const _0x403dd9=this['editor']['editing']['view'];_0x403dd9['change'](_0x27c94c=>{for(const _0x592b5b of _0x403dd9['document']['roots'])_0x27c94c['removeClass'](yt,_0x592b5b);});}}class RevisionViewerUI extends _0x20daab{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x2fff9a=this['editor'],_0x1cba98=_0x2fff9a['plugins']['get'](RevisionViewer),_0x37629c=_0x2fff9a['plugins']['get'](RevisionViewerLoadingOverlay);_0x2fff9a['ui']['componentFactory']['add']('exitToEditing',_0x4c1ddb=>{const _0x5647da=new _0x48a0f1(_0x4c1ddb);return _0x5647da['set']({'label':ft(_0x4c1ddb,'Back\x20to\x20editing'),'icon':_0x204b25,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5647da,'execute',()=>{_0x2fff9a['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5647da;}),_0x2fff9a['ui']['componentFactory']['add']('restoreRevision',_0x184eff=>{const _0x41fe4b=new _0x48a0f1(_0x184eff);return _0x41fe4b['set']({'label':ft(_0x184eff,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x41fe4b['bind']('isEnabled')['to'](_0x2fff9a['commands']['get']('restoreRevision')),this['listenTo'](_0x41fe4b,'execute',()=>_0x2fff9a['execute']('restoreRevision')),_0x41fe4b;}),_0x2fff9a['ui']['componentFactory']['add']('changesNavigation',_0x88fd7b=>{const _0x2baeb6=new ChangesNavigationView(_0x88fd7b),_0x50513f=_0x2fff9a['commands']['get']('showPreviousChange'),_0x2de1cd=_0x2fff9a['commands']['get']('showNextChange');return _0x2baeb6['bind']('isBackwardNavigationEnabled')['to'](_0x50513f,'isEnabled'),_0x2baeb6['bind']('isForwardNavigationEnabled')['to'](_0x2de1cd,'isEnabled'),_0x2baeb6['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x1cba98),this['listenTo'](_0x2baeb6,'execute',(_0x30a10f,_0xa8f7cf)=>{_0x2fff9a['execute']('forward'===_0xa8f7cf?'showNextChange':'showPreviousChange');}),_0x2baeb6;}),_0x37629c['show'](),_0x1cba98['on']('change:isReady',(_0x3bb44d,_0x36bdd6,_0x294f4e)=>{_0x294f4e?_0x37629c['hide']():_0x37629c['show']();});}}class RevisionNameView extends _0x46d49f{['_resizeObserver']=null;constructor(_0x517fa1,_0x5bc476){super(_0x517fa1,_0x5bc476);const _0x2480ed=this['bindTemplate'];this['set']({'label':ft(_0x517fa1,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x517fa1,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x2480ed['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x21024a(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x3ca86c=this['fieldView']['element'];this['_tooltipString']=_0x3ca86c['scrollWidth']>_0x3ca86c['clientWidth']&&_0x3ca86c['value']||'';}}class RevisionAuthorView extends _0x5c0571{constructor(_0x4f8a3d,_0x231766,_0xfe9cb8){super(_0x4f8a3d);const _0x11e8f3=new nt();_0x11e8f3['set']({'content':_0xabede7,'viewBox':'0\x200\x2011\x2010'});const _0xbdc8eb=['ck','ck-revision-history-sidebar__revision-author'];_0xfe9cb8&&_0xbdc8eb['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3f37a7=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x4f8a3d,_0xfe9cb8?'Revision\x20creator':'Revision\x20author')},'children':[_0x11e8f3,_0x231766['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xbdc8eb},'children':_0x3f37a7});}}function Rt(_0x3d9392,_0xfa0efc){const _0x14ce62=_0x3d9392['bindTemplate'],_0x464b85=_0x3d9392['locale'],_0x56a9da=_0x16d7f1(_0x464b85);_0x56a9da['panelPosition']='sw';const _0x7187ce=function(_0x134878,_0x30b562){const _0x4a8362=function(_0x4b17a3,_0x2a75cd){const _0x69bfeb=_0x4b17a3['locale'],_0x56eba5={'Compare\x20against\x20selected':ft(_0x69bfeb,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x69bfeb,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x69bfeb,'Restore\x20this\x20revision')};return _0x2a75cd['map'](_0x139227=>{const _0x2a838a=_0x56eba5[_0x139227['name']];return _0x2a838a&&_0x2a838a!==_0x139227['name']&&(_0x139227['name']=_0x2a838a),_0x139227;});}(_0x134878,_0x30b562),_0x38c3bd=new _0x2d3a61();for(const _0x1d82f9 of _0x4a8362){const _0x5b225a={'type':'button','model':new rt({'label':_0x1d82f9['name'],'class':_0x1d82f9['class'],'withText':!0x0,'role':'menuitem','_action':_0x1d82f9['action']})};_0x5b225a['model']['bind']('isEnabled')['to'](_0x134878,'isActionsDropdownOpen',_0x119eb4=>'function'!=typeof _0x1d82f9['isEnabled']||(!_0x119eb4||_0x1d82f9['isEnabled'](_0x134878))),_0x38c3bd['add'](_0x5b225a);}return _0x38c3bd;}(_0x3d9392,_0xfa0efc);return _0x3d9392['bind']('isActionsDropdownOpen')['to'](_0x56a9da,'isOpen'),_0x56a9da['buttonView']['set']({'label':ft(_0x464b85,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x592620}),_0x56a9da['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x14ce62['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x14ce62['to'](_0x10a1b4=>_0x10a1b4['stopPropagation']())}}),_0x56a9da['on']('execute',_0x2a7682=>{_0x3d9392['isReady']&&'function'==typeof _0x2a7682['source']['_action']&&_0x2a7682['source']['_action'](_0x3d9392);}),ot(_0x56a9da,_0x7187ce,{'role':'menu'}),_0x56a9da['listenTo'](_0x3d9392,'change:isActionsDropdownOpen',(_0x3afa71,_0x3d1e15,_0x591ba1)=>{if(_0x591ba1)for(const _0x44b817 of _0x56a9da['listView']['items']){const _0x5a622f=_0x44b817['children']['first'],_0x596332=_0xfa0efc['find'](_0x8d74f8=>_0x8d74f8['action']===_0x5a622f['_action'])['isVisible'];_0x44b817['isVisible']=void 0x0===_0x596332||_0x596332(_0x3d9392);}}),_0x56a9da;}class RevisionView extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0x4cbe68,uid as _0x55087c,Collection as _0x12a0e4,logWarning as _0x3748bd,FocusTracker as _0x22ee29,KeystrokeHandler as _0x2862f7,scrollViewportToShowTarget as _0x17cc9f,ResizeObserver as _0x122c77,ElementReplacer as _0x1af71a,CKEditorError as _0x1f5a5b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x527a66,set as _0x19e1e7,unset as _0x1fc4f8,isEqual as _0x3a917e}from'es-toolkit/compat';import{Plugin as _0x18ed42,PendingActions as _0x579023,Command as _0x25b174,ElementApiMixin as _0x443cf2,Editor as _0x2c191d}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x4c4887,getMarkerDomElement as _0x1d3e7d,ConfirmMixin as _0x34dc84,sanitizeEditorConfig as _0x554e49}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x27685d,ViewAttributeElement as _0x572198,ViewEmptyElement as _0x8b642d,ViewRawElement as _0x1845d7,ViewUIElement as _0x474da6,ViewDocumentFragment as _0x3e2908,ViewText as _0x1712b5,ViewElement as _0x19d66d,ModelElement as _0x45e0a6,ModelRange as _0x8a4273,ModelPosition as _0x4e4050,ModelDocumentFragment as _0x34f38e,ModelText as _0x541a0c}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x432461,IconChevronUp as _0x396732,IconChevronDown as _0x3e48c0,IconUndo as _0x54f965,IconUser as _0x580980,IconThreeVerticalDots as _0x131dec}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x469ec1,View as _0x39c569,submitHandler as _0x9ecd07,LabeledFieldView as _0x321730,createLabeledInputText as _0x212138,createDropdown as _0x38d1cc,ListView as _0x249276,ListItemView as _0x14e979,ButtonView as _0x3296a8,MenuBarMenuView as _0x3839a1,MenuBarMenuListView as _0x4a0a8e,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as ut,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4cbe68(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x21f77e){super(),this['id']=_0x21f77e['id']||_0x55087c(),this['creator']=_0x21f77e['creator']||null,this['authors']=_0x21f77e['authors']||[],this['diffData']=_0x21f77e['diffData']||null,this['toVersion']=_0x21f77e['toVersion']||0x0,this['fromVersion']=_0x21f77e['fromVersion']||0x0,this['set']('name',_0x21f77e['name']||''),this['set']('createdAt',_0x21f77e['createdAt']||new Date()),this['set']('attributes',_0x21f77e['attributes']||{});}['setName'](_0x5c8e38){this['_update']({'name':_0x5c8e38});}['setAttribute'](_0x1d7f11,_0x40ae8d){const _0x55fa19=_0x527a66(this['attributes']);_0x19e1e7(_0x55fa19,_0x1d7f11,_0x40ae8d),this['_update']({'attributes':_0x55fa19});}['removeAttribute'](_0x430546){const _0x31cc29=_0x527a66(this['attributes']);_0x1fc4f8(_0x31cc29,_0x430546),this['_update']({'attributes':_0x31cc29});}['_update'](_0xa00809,_0x2906e5=!0x1){let _0x130b4b=!0x1;const _0x41efd5={'id':this['id']},_0x506259=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4bb097 of _0x506259){const _0x401272=_0xa00809[_0x4bb097];void 0x0!==_0x401272&&_0x401272!==this[_0x4bb097]&&(this[_0x4bb097]=_0x401272,_0x41efd5[_0x4bb097]=_0x401272,_0x130b4b=!0x0);}_0x130b4b&&(_0x41efd5['authors']&&(_0x41efd5['authorsIds']=_0x41efd5['authors']['map'](_0xcc67df=>_0xcc67df['id']),delete _0x41efd5['authors']),this['fire']('_update',_0x41efd5,_0x2906e5));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4b1968=>_0x4b1968['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x18ed42{['_revisions'];static get['requires'](){return[_0x4c4887];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x20b87b){super(_0x20b87b),this['_revisions']=new _0x12a0e4();}['afterInit'](){!async function(_0x5165bc){const _0x498677=_0x5d1c7d([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0xaca41c=0xeb829,_0x440da4=0x359e09b0,_0x481ac3=0x35998208^_0x440da4,_0x8bb4ad=window[_0x5d1c7d([0x44,0x61,0x74,0x65])][_0x5d1c7d([0x6e,0x6f,0x77])](),_0x43c3f7=_0x5165bc[_0x5d1c7d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2b70d4=new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x61a5da=>{_0x43c3f7[_0x5d1c7d([0x6f,0x6e,0x63,0x65])](_0x5d1c7d([0x72,0x65,0x61,0x64,0x79]),_0x61a5da);}),_0x497bae={[_0x5d1c7d([0x6b,0x74,0x79])]:_0x5d1c7d([0x45,0x43]),[_0x5d1c7d([0x75,0x73,0x65])]:_0x5d1c7d([0x73,0x69,0x67]),[_0x5d1c7d([0x63,0x72,0x76])]:_0x5d1c7d([0x50,0x2d,0x32,0x35,0x36]),[_0x5d1c7d([0x78])]:_0x5d1c7d([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]),[_0x5d1c7d([0x79])]:_0x5d1c7d([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]),[_0x5d1c7d([0x61,0x6c,0x67])]:_0x5d1c7d([0x45,0x53,0x32,0x35,0x36])},_0x2b73ae=_0x43c3f7[_0x5d1c7d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5d1c7d([0x67,0x65,0x74])](_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x11bf19(){let _0x548977,_0x2f5160=null,_0x2e1c4a=null;try{if(_0x2b73ae==_0x5d1c7d([0x47,0x50,0x4c]))return _0x5d1c7d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x548977=_0x272516(),!_0x548977)return _0x5d1c7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x548977[_0x5d1c7d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2e1c4a=_0x2c4678(_0x548977[_0x5d1c7d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x548977[_0x5d1c7d([0x6a,0x74,0x69])])),await _0x1da2ea()?_0x3cb106()?_0xe45512()?_0x5d1c7d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5781a4()?(_0x548977[_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5d1c7d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2f5160=_0x852988(_0x5d1c7d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x420fca()):_0x5d1c7d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5d1c7d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5d1c7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5d1c7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xe45512(){const _0x5783f9=[_0x5d1c7d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5d1c7d([0x74,0x72,0x69,0x61,0x6c])][_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x548977[_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x8bb4ad/0x3e8:0xe10*_0x481ac3;return _0x548977[_0x5d1c7d([0x65,0x78,0x70])]<_0x5783f9;}function _0x3cb106(){const _0x1aec8f=_0x548977[_0x5d1c7d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1aec8f)return!0x1;if(_0x1aec8f[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x2a])))return!0x0;if(_0x1aec8f[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x52,0x48])))return!0x0;if(_0x1aec8f[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x52,0x52,0x48]))){if(_0x132679())return!0x0;if(_0x4cfeb2()||_0x3a4c3a())return!0x0;}return!0x1;}function _0x5781a4(){const _0x17740e=_0x548977[_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x17740e||0x0==_0x17740e[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x21fb9b}=new URL(window[_0x5d1c7d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x17740e[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x21fb9b))return!0x0;const _0x27ff75=_0x21fb9b[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e]));return _0x17740e[_0x5d1c7d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12d628=>_0x12d628[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x2a])))[_0x5d1c7d([0x6d,0x61,0x70])](_0x5b3ca2=>_0x5b3ca2[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e])))[_0x5d1c7d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fa4a9=>_0x1fa4a9[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x27ff75[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5d1c7d([0x6d,0x61,0x70])](_0xb70fe=>Array(_0x27ff75[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xb70fe[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5d1c7d([0x66,0x69,0x6c,0x6c])](_0xb70fe[0x0]===_0x5d1c7d([0x2a])?_0x5d1c7d([0x2a]):'')[_0x5d1c7d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xb70fe))[_0x5d1c7d([0x73,0x6f,0x6d,0x65])](_0x7694e9=>_0x27ff75[_0x5d1c7d([0x65,0x76,0x65,0x72,0x79])]((_0x3b0aa3,_0x1787b4)=>_0x7694e9[_0x1787b4]===_0x3b0aa3||_0x7694e9[_0x1787b4]===_0x5d1c7d([0x2a])));}function _0x420fca(){return _0x2f5160&&_0x2e1c4a?new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x45c921,_0x30aae9)=>{_0x2f5160[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x45c921,_0x30aae9),_0x2e1c4a[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x5ebf6e=>{_0x5ebf6e!=_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64])&&_0x45c921(_0x5ebf6e);},_0x30aae9);}):_0x2f5160||_0x2e1c4a||_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2c4678(_0x8d0dfb,_0x4a76b7){return new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5bf62a=>{if(_0x2d485c())return _0x5bf62a(_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64]));_0x396914(),_0x43c3f7[_0x5d1c7d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5d1c7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x244890=!0x1;const _0x363ddd=_0x55087c();function _0x4a789d(_0xfa7733){return!!_0xfa7733&&(typeof _0xfa7733===_0x5d1c7d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xfa7733===_0x5d1c7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xfa7733[_0x5d1c7d([0x74,0x68,0x65,0x6e])]===_0x5d1c7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xfa7733[_0x5d1c7d([0x63,0x61,0x74,0x63,0x68])]===_0x5d1c7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x439f3a(_0xdc9052){_0x2ae6ab(_0xdc9052)[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x4aa718=>{if(!_0x4aa718||_0x4aa718[_0x5d1c7d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5d1c7d([0x6f,0x6b]))return _0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x36dd10(_0x542649(_0x363ddd+_0x4a76b7))!=_0x4aa718[_0x5d1c7d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64]);})[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x442d2b=>(_0x3ea0d4(),_0x442d2b),()=>{const _0x3407f4=_0x57af19();return null==_0x3407f4?(_0x3ea0d4(),_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64])):_0x5d1c7d(_0x8bb4ad-_0x3407f4>(0x11928db0^_0x440da4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x5bf62a)[_0x5d1c7d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5bf62a(_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4f8f6e=0x35a8e730^_0x440da4;function _0x3ea0d4(){const _0x34c8cb=_0x5d1c7d([0x6c,0x6c,0x63,0x74,0x2d])+_0x36dd10(_0x542649(_0x8d0dfb)),_0x59ab01=_0x420fcb(_0x36dd10(window[_0x5d1c7d([0x4d,0x61,0x74,0x68])][_0x5d1c7d([0x63,0x65,0x69,0x6c])](_0x8bb4ad/_0x4f8f6e)));window[_0x5d1c7d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5d1c7d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x34c8cb,_0x59ab01);}function _0x57af19(){const _0x2bd889=_0x5d1c7d([0x6c,0x6c,0x63,0x74,0x2d])+_0x36dd10(_0x542649(_0x8d0dfb)),_0x227ba6=window[_0x5d1c7d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5d1c7d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2bd889);return _0x227ba6?window[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x420fcb(_0x227ba6),0x10)*_0x4f8f6e:null;}function _0x2ae6ab(_0x5e17f9){return new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x438199,_0x4d839e)=>{_0x5e17f9[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x438199,_0x4d839e),window[_0x5d1c7d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4d839e,0x359fdd70^_0x440da4);});}}_0x43c3f7[_0x5d1c7d([0x6f,0x6e])](_0x5d1c7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3f87db,_0x4f5780)=>{if(_0x4f5780[0x0]!=_0x8d0dfb)return _0x5bf62a(_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4f5780[0x1]={..._0x4f5780[0x1],[_0x5d1c7d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x363ddd};},{[_0x5d1c7d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5d1c7d([0x68,0x69,0x67,0x68])}),_0x43c3f7[_0x5d1c7d([0x6f,0x6e])](_0x5d1c7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58738e=>{_0x4a789d(_0x58738e[_0x5d1c7d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x244890=!0x0,_0x439f3a(_0x58738e[_0x5d1c7d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5d1c7d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5d1c7d([0x6c,0x6f,0x77])}),_0x2b70d4[_0x5d1c7d([0x74,0x68,0x65,0x6e])](()=>{_0x244890||_0x5bf62a(_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2d485c(){return _0x43c3f7[_0x5d1c7d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5d1c7d([0x76,0x69,0x65,0x77])][_0x5d1c7d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5d1c7d([0x61,0x75,0x74,0x6f]);}function _0x396914(){_0x43c3f7[_0x5d1c7d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5d1c7d([0x76,0x69,0x65,0x77])][_0x5d1c7d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5d1c7d([0x61,0x75,0x74,0x6f]);}}function _0x852988(_0x3eab18){const _0x24d2a2=[new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f7714=>setTimeout(_0x2f7714,0x3597377c^_0x440da4)),_0x2b70d4[_0x5d1c7d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x12af0d=>{const _0x765392=0x359e09b7^_0x440da4,_0x1aeb1a=_0x5165bc[_0x5d1c7d([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x20683c(){_0x1aeb1a[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x765392&&_0x12af0d();}_0x20683c(),_0x1aeb1a[_0x5d1c7d([0x6f,0x6e])](_0x5d1c7d([0x61,0x64,0x64]),_0x20683c);})),new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x412aaf=>{function _0x49054a(){for(const _0x58f675 in window)if(window[_0x5d1c7d([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5d1c7d([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x58f675))&&window[_0x58f675]==_0xaca41c)return _0x412aaf();_0x43c3f7[_0x5d1c7d([0x73,0x74,0x61,0x74,0x65])]!=_0x5d1c7d([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5d1c7d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x49054a,0x359e1a38^_0x440da4);}_0x1e2a84(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x49054a();})];return window[_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5d1c7d([0x72,0x61,0x63,0x65])](_0x24d2a2)[_0x5d1c7d([0x74,0x68,0x65,0x6e])](()=>_0x3eab18);}async function _0x281f07(){if(await _0x2b70d4,_0x1e2a84(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x897501=_0x5165bc[_0x5d1c7d([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x453e79=_0x5165bc[_0x5d1c7d([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])](_0x897501[_0x5d1c7d([0x69,0x64])]),_0x5d1438=_0x15c307(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x5d1438[_0x5d1c7d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x897501['id'],_0x453e79?_0x453e79['id']:null,!0x0),_0x5d1438[_0x5d1c7d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5d1438[_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5d1438[_0x5d1c7d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x3f4413,void(_0x5d1438[_0x5d1c7d([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x3f4413);}if(_0x1e2a84(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x51125f=_0x15c307(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x51125f[_0x5d1c7d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x51125f[_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x51125f[_0x5d1c7d([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x3f4413,_0x51125f[_0x5d1c7d([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x3f4413;}_0x43c3f7[_0x5d1c7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5d1c7d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3f4413,_0x43c3f7[_0x5d1c7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5d1c7d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3f4413,_0x43c3f7[_0x5d1c7d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5d1c7d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x132679(){return _0x1e2a84(_0x5d1c7d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x15c307(_0x5d1c7d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5d1c7d([0x73,0x74,0x61,0x74,0x65])]==_0x5d1c7d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4cfeb2(){return _0x1e2a84(_0x5d1c7d([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 _0x3a4c3a(){return _0x1e2a84(_0x5d1c7d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x217e6b(_0x4e7d0d){const _0x4fe9f1=_0x1f1b2f();_0x43c3f7[_0x4fe9f1]=_0x5d1c7d([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])+_0x4e7d0d,_0x4e7d0d[_0x5d1c7d([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5d1c7d([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x1f1b2f()]=_0xaca41c),_0x4e7d0d!=_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64])&&_0x281f07();}function _0x1f1b2f(){const _0x40e340=window[_0x5d1c7d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5d1c7d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5d1c7d([0x6e,0x6f,0x77])]())[_0x5d1c7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5d1c7d([0x2e]),'');let _0x596b77=_0x5d1c7d([0x76]);for(let _0x3d1f13=0x0;_0x3d1f13<_0x40e340[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d1f13+=0x2){let _0x5cd666=window[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x40e340[_0x5d1c7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3d1f13,_0x3d1f13+0x2));_0x5cd666>=_0x498677[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5cd666-=_0x498677[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x596b77+=_0x498677[_0x5cd666];}return _0x596b77;}function _0x272516(){const _0x576d4c=_0x2b73ae[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e]));if(0x3!=_0x576d4c[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x23cd7a(_0x576d4c[0x1]);function _0x23cd7a(_0x178ea4){const _0xc3e90d=_0x4beae0(_0x178ea4);return _0xc3e90d&&_0x662e2e()?_0xc3e90d:null;function _0x662e2e(){const _0x1b4fca=_0xc3e90d[_0x5d1c7d([0x6a,0x74,0x69])],_0x10bf40=window[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b4fca[_0x5d1c7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b4fca[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3c984c={..._0xc3e90d,[_0x5d1c7d([0x6a,0x74,0x69])]:_0x1b4fca[_0x5d1c7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b4fca[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3c984c[_0x5d1c7d([0x76,0x63])],_0x542649(_0x3c984c)==_0x10bf40;}}}async function _0x1da2ea(){let _0x2479ff=!0x0;try{const _0x2e074e=_0x2b73ae[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e])),[_0x55bbbd,_0x4654d5,_0x79e3d5]=_0x2e074e;return _0x266f3d(_0x55bbbd),await _0x22a50d(_0x55bbbd,_0x4654d5,_0x79e3d5),_0x2479ff;}catch{return!0x1;}function _0x266f3d(_0x1c04fc){const _0x31bcbd=_0x4beae0(_0x1c04fc);_0x31bcbd&&_0x31bcbd[_0x5d1c7d([0x61,0x6c,0x67])]==_0x5d1c7d([0x45,0x53,0x32,0x35,0x36])||(_0x2479ff=!0x1);}async function _0x22a50d(_0x4aa730,_0x13777a,_0x152673){const _0x8a2474=window[_0x5d1c7d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5d1c7d([0x66,0x72,0x6f,0x6d])](_0x2776cb(_0x152673),_0x2a8947=>_0x2a8947[_0x5d1c7d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3c228a=new window[(_0x5d1c7d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5d1c7d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4aa730+_0x5d1c7d([0x2e])+_0x13777a),_0x40bbe0=window[_0x5d1c7d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5d1c7d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x40bbe0)return;const _0x57a183=await _0x40bbe0[_0x5d1c7d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5d1c7d([0x6a,0x77,0x6b]),_0x497bae,{[_0x5d1c7d([0x6e,0x61,0x6d,0x65])]:_0x5d1c7d([0x45,0x43,0x44,0x53,0x41]),[_0x5d1c7d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5d1c7d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5d1c7d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x40bbe0[_0x5d1c7d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5d1c7d([0x6e,0x61,0x6d,0x65])]:_0x5d1c7d([0x45,0x43,0x44,0x53,0x41]),[_0x5d1c7d([0x68,0x61,0x73,0x68])]:{[_0x5d1c7d([0x6e,0x61,0x6d,0x65])]:_0x5d1c7d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x57a183,_0x8a2474,_0x3c228a)||(_0x2479ff=!0x1);}}function _0x4beae0(_0x3e2b01){return _0x3e2b01[_0x5d1c7d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5d1c7d([0x65,0x79]))?JSON[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65])](_0x2776cb(_0x3e2b01)):null;}function _0x2776cb(_0x2aefb4){return window[_0x5d1c7d([0x61,0x74,0x6f,0x62])](_0x2aefb4[_0x5d1c7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5d1c7d([0x2b]))[_0x5d1c7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5d1c7d([0x2f])));}function _0x542649(_0x430b14){let _0x16832e=0x1505;function _0x2dcae5(_0x5bbe47){for(let _0x358c5f=0x0;_0x358c5f<_0x5bbe47[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x358c5f++){const _0x48a210=_0x5bbe47[_0x5d1c7d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x358c5f);_0x16832e=(_0x16832e<<0x5)+_0x16832e+_0x48a210,_0x16832e&=_0x16832e;}}function _0x2b2396(_0xeab79f){Array[_0x5d1c7d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xeab79f)?_0xeab79f[_0x5d1c7d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2b2396):_0xeab79f&&typeof _0xeab79f==_0x5d1c7d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5d1c7d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xeab79f)[_0x5d1c7d([0x73,0x6f,0x72,0x74])]()[_0x5d1c7d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x241c7d,_0x2a2681])=>{_0x2dcae5(_0x241c7d),_0x2b2396(_0x2a2681);}):_0x2dcae5(window[_0x5d1c7d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xeab79f));}return _0x2b2396(_0x430b14),_0x16832e>>>0x0;}function _0x36dd10(_0x10ebab){return _0x10ebab[_0x5d1c7d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5d1c7d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5d1c7d([0x30]));}function _0x420fcb(_0x19307d){return _0x19307d[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5d1c7d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5d1c7d([0x6a,0x6f,0x69,0x6e])]('');}function _0x1e2a84(_0x1b01c4){return _0x43c3f7[_0x5d1c7d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5d1c7d([0x68,0x61,0x73])](_0x1b01c4);}function _0x15c307(_0x33213d){return _0x43c3f7[_0x5d1c7d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5d1c7d([0x67,0x65,0x74])](_0x33213d);}function _0x3f4413(){}function _0x5d1c7d(_0x52031b){return _0x52031b['map'](_0x145d4a=>String['fromCharCode'](_0x145d4a))['join']('');}_0x217e6b(await _0x11bf19());}(this);}['createRevision'](_0x3c99c6){const _0x4d6c25=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x3c99c6['id'],'name':_0x3c99c6['name'],'creator':_0x3c99c6['creatorId']?_0x4d6c25['getUser'](_0x3c99c6['creatorId']):null,'diffData':_0x3c99c6['diffData']||_0x3c99c6['data'],'authors':_0x3c99c6['authorsIds']['map'](_0x3e7402=>_0x4d6c25['getUser'](_0x3e7402)),'createdAt':new Date(_0x3c99c6['createdAt']),'attributes':_0x3c99c6['attributes'],'fromVersion':_0x3c99c6['fromVersion'],'toVersion':_0x3c99c6['toVersion']});}['addRevision'](_0x308681,_0x170a01=0x0){this['_revisions']['add'](_0x308681,_0x170a01);}['getRevision'](_0x2a816c){return this['_revisions']['get'](_0x2a816c);}['getRevisions'](_0x5f5881={'toJSON':!0x1}){const _0x35252b=Array['from'](this['_revisions']);return _0x35252b['reverse'](),_0x5f5881['toJSON']?_0x35252b['map'](_0x5a1a57=>_0x5a1a57['toJSON']()):_0x35252b;}['getIndex'](_0x12b781){return this['_revisions']['getIndex'](_0x12b781);}['getEarlierVisibleRevision'](_0x3398ed){const [,_0x1e2a81]=this['getRevisionsIterator'](_0x3398ed,{'direction':'earlier'});return _0x1e2a81;}['getLaterVisibleRevision'](_0x37e42f){const [,_0x3e8bfe]=this['getRevisionsIterator'](_0x37e42f,{'direction':'later'});return _0x3e8bfe;}['getRevisionsInDiff'](_0x289cc4){const _0x1ec40d=[];for(const _0x2fe842 of this['getRevisionsIterator'](_0x289cc4['newRevisionId']))if(_0x1ec40d['push'](_0x2fe842),_0x2fe842['id']===_0x289cc4['oldRevisionId'])break;return _0x1ec40d;}*['getRevisionsIterator'](_0x39e6da,{direction:_0x5aa69d='earlier',filter:_0xfc6bb4=()=>!0x0}={}){const _0x11765c='earlier'===_0x5aa69d?0x1:-0x1;let _0x358374=this['_revisions']['get'](_0x39e6da),_0x46a8b8=this['getIndex'](_0x358374);for(yield _0x358374;_0x358374;){if(_0x46a8b8+=_0x11765c,_0x358374=this['getRevision'](_0x46a8b8),!_0x358374)return;_0xfc6bb4(_0x358374)&&(yield _0x358374);}}}class RevisionHistoryUtils extends _0x18ed42{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x27685d,'c'],[_0x572198,'a'],[_0x8b642d,'e'],[_0x1845d7,'r'],[_0x474da6,'u']]);['_typeCharToViewClass']=new Map([['c',_0x27685d],['a',_0x572198],['e',_0x8b642d],['r',_0x1845d7],['u',_0x474da6]]);async['loadRevisionData'](_0x157b09,_0x460831){if(_0x157b09['diffData']||!_0x460831)return;const _0x5e84a7=this['editor']['config']['get']('collaboration.channelId'),_0x395c5e=await _0x460831['getRevision']({'channelId':_0x5e84a7,'revisionId':_0x157b09['id']});_0x157b09['diffData']=_0x395c5e['diffData'];}['getRevisionDocumentData'](_0x41234e){const _0x45abd1={};for(const _0x3e2c13 in _0x41234e['diffData']){if(_0x41234e['diffData'][_0x3e2c13]['attachChange']&&!_0x41234e['diffData'][_0x3e2c13]['attachChange']['isAttached'])continue;const _0x13ccbb=this['_removeRevisionMarkers'](JSON['parse'](_0x41234e['diffData'][_0x3e2c13]['insertions'])),_0x3cee7c=this['editor']['editing']['view']['document'],_0x4600c2=new _0x3e2908(_0x3cee7c,_0x13ccbb['map'](_0x254663=>this['_getViewFromDiffObj'](_0x254663,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x45abd1[_0x3e2c13]=this['editor']['data']['processor']['toData'](_0x4600c2),this['editor']['data']['processor']['useFillerType']('default');}return _0x45abd1;}['getRevisionRootsAttributes'](_0x5a2bbb){const _0x3b6a3e={};for(const _0x4f6d43 in _0x5a2bbb['diffData'])_0x5a2bbb['diffData'][_0x4f6d43]['attachChange']&&!_0x5a2bbb['diffData'][_0x4f6d43]['attachChange']['isAttached']||(_0x3b6a3e[_0x4f6d43]=_0x5a2bbb['diffData'][_0x4f6d43]['attributesAfter']||{});return _0x3b6a3e;}['getRevisionRootsModelElements'](_0xd332a5){const _0x26959a={};for(const _0x148b92 in _0xd332a5['diffData']){if(_0xd332a5['diffData'][_0x148b92]['attachChange']&&!_0xd332a5['diffData'][_0x148b92]['attachChange']['isAttached'])continue;const _0x32056e=_0xd332a5['diffData'][_0x148b92]['rootElementName'];_0x32056e&&(_0x26959a[_0x148b92]=_0x32056e);}return _0x26959a;}['_getTypeCharForViewElement'](_0xd3b23d){return this['_viewClassToTypeChar']['get'](_0xd3b23d['constructor']);}['_getViewFromDiffObj'](_0x3de900,_0x257172){const _0x16d25b=this['editor']['editing']['view']['document'];if('string'==typeof _0x3de900)return new _0x1712b5(_0x16d25b,_0x3de900);{let _0x3374bf,_0x22df00;_0x22df00='u'==_0x3de900['type']||'r'==_0x3de900['type']?[]:_0x3de900['children']['map'](_0x3fd60a=>this['_getViewFromDiffObj'](_0x3fd60a,_0x257172));const _0x3876fc=this['_typeCharToViewClass']['get'](_0x3de900['type'])||_0x19d66d,_0x26773b=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x3374bf=new _0x3876fc(_0x16d25b,_0x3de900['name'],_0x3de900['attributes'],_0x22df00),'u'==_0x3de900['type']&&_0x3de900['children'][0x0]){const _0x185519=_0x3de900['children'][0x0];if(_0x3374bf['render']=function(_0x3f9418){const _0x20c5e7=_0x3f9418['createElement']('div');return _0x20c5e7['innerHTML']=_0x185519,_0x20c5e7['childNodes'][0x0];},_0x257172){const _0x2ecb0a=new _0x3e2908(_0x16d25b);_0x2ecb0a['_appendChild'](_0x3374bf);const _0x4a9942=Array['from'](_0x26773b['viewChildrenToDom'](_0x2ecb0a,{'bind':!0x1})),_0x2c6b16=_0x26773b['domDocument']['createElement']('div');_0x2c6b16['append'](..._0x4a9942),_0x3374bf=Array['from'](_0x26773b['domChildrenToView'](_0x2c6b16))[0x0];}}else{if('r'==_0x3de900['type']&&_0x3de900['children'][0x0]){const _0x3d86df=_0x3de900['children'][0x0];if(_0x3374bf['render']=function(_0x363998){_0x363998['innerHTML']=_0x3d86df;},_0x257172){const _0x20e7a8=new _0x3e2908(_0x16d25b);_0x20e7a8['_appendChild'](_0x3374bf);const _0x1bdd0d=Array['from'](_0x26773b['viewChildrenToDom'](_0x20e7a8,{'bind':!0x1})),_0x42e570=_0x26773b['domDocument']['createElement']('div');_0x42e570['append'](..._0x1bdd0d);const _0x2186d2=Array['from'](_0x26773b['domChildrenToView'](_0x42e570));_0x2186d2['length']>0x1?_0x3374bf['_appendChild'](_0x2186d2):_0x3374bf=_0x2186d2[0x0];}}}if(_0x3de900['customProperties']){for(const [_0x2d36fa,_0x3188ad]of _0x3de900['customProperties'])_0x3374bf['_setCustomProperty'](_0x2d36fa,_0x3188ad);}const _0x570b94=void 0x0===_0x3de900['fillerOffset']?null:_0x3de900['fillerOffset'];return null!==_0x570b94&&(_0x3374bf['getFillerOffset']=()=>_0x570b94),_0x3374bf;}}['_makeModelFromViewString'](_0x5cff82,_0x30d1fa){const _0x44bbd3=JSON['parse'](_0x5cff82),_0x39a170=this['editor']['editing']['view']['document'],_0x370ccb=new _0x3e2908(_0x39a170,_0x44bbd3['map'](_0x219a6f=>this['_getViewFromDiffObj'](_0x219a6f,!0x0))),_0x311715=this['editor']['data']['toModel'](_0x370ccb,_0x30d1fa);return _0x311715['name']=_0x30d1fa,_0x311715;}['_removeRevisionMarkers'](_0x53712b){return(_0x53712b=_0x53712b['filter'](_0x888bdd=>!_0x888bdd['name']||'revision-start'!==_0x888bdd['name']&&'revision-end'!==_0x888bdd['name']))['forEach'](_0x179fe6=>{'string'!=typeof _0x179fe6&&(_0x179fe6['children']=this['_removeRevisionMarkers'](_0x179fe6['children']),_0x179fe6['attributes']=_0x179fe6['attributes']['filter'](_0x2fe1a6=>!_0x2fe1a6[0x0]['startsWith']('data-revision-')));}),_0x53712b;}}function ft(_0x709d34,_0x2cc4f7,_0x3efdfa){const t=_0x709d34['t'];switch(_0x2cc4f7){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'},_0x3efdfa);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3efdfa);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x18ed42{['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[_0x4c4887,RevisionsRepository,RevisionHistoryUtils,_0x579023];}constructor(_0x3a32dc){super(_0x3a32dc),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x15fb1f=_0x55087c();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x15fb1f},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 _0x30c29a=this['repository']['getRevision'](0x0),_0x2ef144=_0x30c29a&&null===_0x30c29a['creator']?_0x30c29a:null;if(this['_continueCurrentRevision']=!!_0x2ef144&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x39f55c=this['_source']['getCurrentRevisionId'](),_0x2e9970=this['repository']['getRevision'](_0x39f55c);if(_0x2e9970)this['_startingVersion']=_0x2e9970['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x10d104=this['_source']['history']['_operations']['find'](_0x4cffb9=>!_0x4cffb9['_isInit']),_0x150c5b=_0x10d104?_0x10d104['baseVersion']:this['_source']['history']['version'];_0x30c29a?(_0x30c29a['toVersion']<_0x150c5b&&_0x30c29a['_update']({'toVersion':_0x150c5b}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2ef144['id'],this['_startingVersion']=_0x2ef144['fromVersion']):(this['_startingVersion']=_0x30c29a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x150c5b,this['_continueCurrentRevision']=!0x1);}}else _0x2ef144&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2ef144['toVersion'],this['editor']['model']['document']['history']['version']),_0x2ef144['fromVersion']===_0x2ef144['toVersion']?(0x0!==_0x2ef144['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ef144['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ef144['id'],this['_startingVersion']=_0x2ef144['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',_0x51a819=>!_0x51a819),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2d91b9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xdfbfcc;for(const _0x1f5950 in _0x2d91b9){const _0x40d39c=_0x1f5950,_0x4500c8=_0x2d91b9[_0x40d39c];if('revisionHistoryLicenseKeyValid'==_0x4500c8||'revisionHistoryLicenseKeyInvalid'==_0x4500c8||'revisionHistoryLicenseKeyExpired'==_0x4500c8||'revisionHistoryLicenseKeyDomainLimit'==_0x4500c8||'revisionHistoryLicenseKeyNotAllowed'==_0x4500c8||'revisionHistoryLicenseKeyEvaluationLimit'==_0x4500c8||'revisionHistoryLicenseKeyUsageLimit'==_0x4500c8){delete _0x2d91b9[_0x40d39c],_0xdfbfcc=_0x4500c8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x152db5=this['repository']['getRevision'](0x0),_0xc1236c=await this['getRevisionDocumentData'](_0x152db5),_0x35654e=await this['getRevisionRootsAttributes'](_0x152db5),_0x28e4f7=this['_utils']['getRevisionRootsModelElements'](_0x152db5);this['_replaceEditorDataWithRevisionData'](_0xc1236c,_0x35654e,_0x28e4f7);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2cbc94){this['_source']=_0x2cbc94;}async['update'](){const _0x4a9d85=await this['_source']['getLatestVersion']();if(_0x4a9d85>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1f5138=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4a9d85});_0x1f5138['authors']=_0x1f5138['authorsIds']['map'](_0x5e423=>this['editor']['plugins']['get']('Users')['getUser'](_0x5e423)),this['currentRevision']['_update'](_0x1f5138);}}async['saveRevision'](_0x552fc4={},_0x533394=null){const _0x5c0595=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x533394>this['currentRevision']['toVersion']&&(_0x533394=null),null===_0x533394&&(_0x533394=await this['_source']['getLatestVersion']());const _0x96e1b8=this['_getFromVersion'](_0x533394),_0xf0041d=this['buildRevisionData']({'from':_0x96e1b8,'to':_0x533394});if(this['currentRevision']['toVersion']<_0x533394){const _0x3216aa=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x533394,'to':_0x533394});_0x3216aa['authors']=[],_0x3216aa['authorsIds']=[],_0x3216aa['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3216aa,!0x0),delete _0x3216aa['authors'],_0x5c0595['push'](_0x3216aa);}_0x552fc4['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x552fc4['name']=_0x552fc4['name']||null,_0x552fc4['id']=_0x552fc4['id']||_0x55087c(),_0x552fc4={..._0x552fc4,..._0xf0041d};const _0x25d40c=this['addRevisionData'](_0x552fc4);_0x5c0595['push'](_0x552fc4);const _0x5a5678=this['repository']['getIndex'](_0x25d40c);if(0x0!==_0x5a5678){const _0x617128=this['repository']['getRevision'](_0x5a5678-0x1);if(_0x617128['fromVersion']!==_0x533394){const _0x15b1be=this['_revisionDataBuilder']['getData'](_0x533394,_0x617128['toVersion']),_0x2087a5={'id':_0x617128['id'],'diffData':_0x15b1be['diffData'],'authorsIds':_0x15b1be['authorsIds'],'authors':_0x15b1be['authorsIds']['map'](_0x1205ab=>this['editor']['plugins']['get']('Users')['getUser'](_0x1205ab)),'fromVersion':_0x533394};_0x617128===this['currentRevision']&&(_0x2087a5['createdAt']=new Date(_0x552fc4['createdAt']['getTime']()+0xa)),_0x617128['_update'](_0x2087a5,!0x0),delete _0x2087a5['authors'],_0x5c0595['push'](_0x2087a5);}}if(this['adapter']){for(const _0x4d6fb1 of _0x5c0595)this['_bufferUpdate'](_0x4d6fb1['id'],_0x4d6fb1,!0x0);this['sendBufferedUpdates']();}return _0x25d40c;}['addRevisionData'](_0x48737e){const _0x339849=this['repository']['createRevision'](_0x48737e);return this['adapter']&&_0x339849['on']('_update',(_0x1e0d86,_0x39f58e,_0x13c4b5)=>{_0x13c4b5||(this['_bufferUpdate'](_0x39f58e['id'],_0x39f58e,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x339849,this['_findInsertionIndex'](_0x339849)),_0x339849;}async['getRevisionDocumentData'](_0x532ee1){return await this['_utils']['loadRevisionData'](_0x532ee1,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x532ee1);}async['getRevisionRootsAttributes'](_0x309e4b){return await this['_utils']['loadRevisionData'](_0x309e4b,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x309e4b);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x15b574=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3895d8=0x0;_0x3895d8<_0x15b574['length'];_0x3895d8++){const _0x4db0b1=_0x15b574[_0x3895d8];let _0x17d22b=!0x1;for(const _0x4ce1da of Object['keys'](_0x4db0b1))void 0x0===_0x4db0b1[_0x4ce1da]?delete _0x4db0b1[_0x4ce1da]:'id'!==_0x4ce1da&&(_0x17d22b=!0x0);_0x17d22b||(_0x15b574[_0x3895d8]=null);}if(_0x15b574=_0x15b574['filter'](_0x54374a=>null!==_0x54374a),!_0x15b574['length'])return;for(let _0x1ab2ef=0x0;_0x1ab2ef<_0x15b574['length'];_0x1ab2ef++){const _0x13126f=_0x15b574[_0x1ab2ef];void 0x0!==_0x13126f['fromVersion']&&void 0x0===_0x13126f['toVersion']&&(_0x13126f['toVersion']=this['repository']['getRevision'](_0x13126f['id'])['toVersion']),void 0x0!==_0x13126f['toVersion']&&void 0x0===_0x13126f['fromVersion']&&(_0x13126f['fromVersion']=this['repository']['getRevision'](_0x13126f['id'])['fromVersion']);}const _0x465b00=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x15b574,_0x465b00)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x538f56=>{if(_0x538f56){for(const _0x3a64ee of _0x538f56)this['setRevisionData']({'id':_0x3a64ee['id'],'createdAt':_0x3a64ee['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x135d2a=null,from:_0x107130=null,to:_0x2220b8=null}){_0x107130=null!==_0x107130?_0x107130:_0x135d2a['fromVersion'],_0x2220b8=null!==_0x2220b8?_0x2220b8:_0x135d2a['toVersion'];const _0x3efb14=this['_revisionDataBuilder']['getData'](_0x107130,_0x2220b8),_0x250431={'diffData':_0x3efb14['diffData'],'authorsIds':_0x3efb14['authorsIds'],'fromVersion':_0x107130,'toVersion':_0x2220b8};if(!_0x135d2a||_0x2220b8!==_0x135d2a['toVersion']){const _0x118919=_0x2220b8-0x1,_0x386725=this['_source']['history']['getOperation'](_0x118919);_0x250431['createdAt']=_0x386725&&_0x386725['createdAt']||new Date();}if(this['_loadedStateData']&&_0x107130===this['_loadedStateData']['fromVersion']){for(const _0x27a731 of this['_loadedStateData']['authors'])_0x250431['authorsIds']['includes'](_0x27a731['id'])||_0x250431['authorsIds']['push'](_0x27a731['id']);}return _0x250431;}['_bufferUpdate'](_0x1a16b4,_0x20df9b,_0x50d1e3){if(this['_bufferedUpdates']['has'](_0x1a16b4)){const _0x10e6a1=this['_bufferedUpdates']['get'](_0x1a16b4);_0x20df9b=_0x50d1e3?{..._0x10e6a1,..._0x20df9b}:{..._0x20df9b,..._0x10e6a1};}this['_bufferedUpdates']['set'](_0x1a16b4,_0x20df9b);}['setRevisionData'](_0x3b70cc){const _0x52398b=this['repository']['getRevision'](_0x3b70cc['id']);if(_0x3b70cc['createdAt']&&(_0x3b70cc['createdAt']=new Date(_0x3b70cc['createdAt'])),_0x3b70cc['authorsIds']){const _0x1b557b=this['editor']['plugins']['get']('Users');_0x3b70cc['authors']=_0x3b70cc['authorsIds']['map'](_0x112338=>_0x1b557b['getUser'](_0x112338));}_0x52398b['_update'](_0x3b70cc,!0x0);}['_createInitialRevision'](_0x34218e){const _0x25603b=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x25603b)this['_initialRevisionId']=_0x25603b['id'];else{const _0x18431d=!this['editor']['model']['document']['roots']['find'](_0x54c31f=>this['editor']['model']['hasContent'](_0x54c31f)),_0x2b1c20=this['editor']['plugins']['get']('Users')['me']['id'],_0x42c5cf=ft(this['editor']['locale'],_0x18431d?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x34218e,'to':_0x34218e,'id':this['_initialRevisionId'],'name':_0x42c5cf,'creatorId':_0x2b1c20});}}['_createCurrentRevision'](_0x11efc5){const _0x378d70=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x378d70),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x11efc5,'to':_0x11efc5,'id':_0x378d70,'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'](_0x10689b,_0x7ebf26,_0x1b569d){const _0x318fae={},_0x478e24={},_0x2ecb8c={},_0x2dc060=this['editor']['config']['get']('roots')||{};for(const [_0x4a460a,_0xb27904]of Object['entries'](_0x2dc060))_0xb27904['lazyLoad']||(_0x318fae[_0x4a460a]=_0xb27904['initialData']??'',_0x478e24[_0x4a460a]=_0xb27904['modelAttributes']||{},_0xb27904['modelElement']&&(_0x2ecb8c[_0x4a460a]=_0xb27904['modelElement']));for(const _0x14aa31 of this['editor']['model']['document']['getRootNames']())_0x318fae[_0x14aa31]??='',_0x478e24[_0x14aa31]??={};let _0x12b2da=!0x1;const _0x3f5c4e=Object['keys'](_0x318fae),_0x39b958=Object['keys'](_0x10689b);for(const _0x98a1cc of _0x3f5c4e){if(_0x318fae[_0x98a1cc]!==_0x10689b[_0x98a1cc]&&''!==_0x318fae[_0x98a1cc]['trim']()){_0x12b2da=!0x0;break;}if(!_0x3a917e(_0x478e24[_0x98a1cc],_0x7ebf26[_0x98a1cc])&&Object['keys'](_0x478e24[_0x98a1cc])['length']>0x0){_0x12b2da=!0x0;break;}const _0x583978=_0x2ecb8c[_0x98a1cc],_0x13fa25=_0x1b569d[_0x98a1cc];if(_0x583978&&_0x13fa25&&_0x583978!==_0x13fa25){_0x12b2da=!0x0;break;}}_0x12b2da||(_0x12b2da=_0x39b958['some'](_0xfaf16a=>!this['editor']['model']['document']['getRoot'](_0xfaf16a))),_0x12b2da&&_0x3748bd('editor-initial-data-replaced-with-revision-data',{'editorData':_0x318fae,'editorRootsAttributes':_0x478e24,'editorRootsModelElements':_0x2ecb8c,'revisionData':_0x10689b,'revisionRootsAttributes':_0x7ebf26,'revisionRootsModelElements':_0x1b569d});for(const [_0x57c6f4,_0xd9b48b]of Object['entries'](_0x10689b))this['editor']['config']['set']('roots.'+_0x57c6f4+'.initialData',_0xd9b48b);for(const [_0xf454db,_0x16d05e]of Object['entries'](_0x7ebf26))this['editor']['config']['set']('roots.'+_0xf454db+'.modelAttributes',_0x16d05e);const _0x35d009=this['editor']['model']['document'];for(const [_0x267a65,_0x2ecc01]of Object['entries'](_0x1b569d)){this['editor']['config']['set']('roots.'+_0x267a65+'.modelElement',_0x2ecc01);const _0x553ef4=_0x35d009['getRoot'](_0x267a65);_0x553ef4&&_0x553ef4['name']!==_0x2ecc01&&(_0x35d009['roots']['remove'](_0x267a65),_0x35d009['createRoot'](_0x2ecc01,_0x267a65));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x1685e8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1685e8['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x30243a){const _0x2d2dc0=this['repository']['getRevisions']();_0x2d2dc0['reverse']();let _0x839a8c=0x0;for(;_0x839a8c<_0x2d2dc0['length'];){const _0x2f2ce3=_0x2d2dc0[_0x839a8c];if(_0x2f2ce3===this['currentRevision']){_0x839a8c++;continue;}if(_0x2f2ce3['id']===this['_initialRevisionId'])break;const _0xe1b7d9=_0x30243a['toVersion']-_0x2f2ce3['toVersion']||_0x30243a['fromVersion']-_0x2f2ce3['fromVersion'];if(_0xe1b7d9>0x0)break;if(_0xe1b7d9<0x0)_0x839a8c++;else{if(!_0x30243a['creator']&&_0x2f2ce3['creator'])break;if(_0x2f2ce3['creator']||!_0x30243a['creator']){if(_0x30243a['createdAt']>_0x2f2ce3['createdAt'])break;_0x839a8c++;}else _0x839a8c++;}}return _0x839a8c;}['_getFromVersion'](_0x2446af){const _0x32fdad=this['repository']['getRevisions']();_0x32fdad['reverse'](),_0x32fdad['shift']();const _0x2e32e6=_0x32fdad['find'](_0x2a0719=>_0x2a0719['toVersion']<=_0x2446af)['toVersion'];return _0x2e32e6<this['_startingVersion']?this['_startingVersion']:_0x2e32e6;}['_makeRevision']({name:_0x59410c,from:_0x5a6f52,to:_0x4a5605,creatorId:_0x32799a,id:_0x3beaeb}){const _0x540c35=this['buildRevisionData']({'from':_0x5a6f52,'to':_0x4a5605});_0x540c35['name']=_0x59410c,_0x540c35['creatorId']=_0x32799a,_0x540c35['id']=_0x3beaeb;const _0x3dde7f=this['addRevisionData'](_0x540c35);return this['adapter']&&this['_bufferUpdate'](_0x540c35['id'],_0x540c35,!0x0),_0x3dde7f;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x1380ab){this['editor']=_0x1380ab,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'](_0x38f8ef){this['source']=_0x38f8ef;const _0xaf0038=new Map(),_0x33fc49=new Map(),_0x34c179=this['editor']['model']['document']['roots']['map'](_0x3d2345=>_0x3d2345['rootName']);for(const _0x3e10f0 of _0x34c179){const _0x196210=this['editor']['model']['document']['getRoot'](_0x3e10f0),_0x321bda=gt(_0x196210);_0xaf0038['set'](_0x3e10f0,_0x321bda),_0x33fc49['set'](_0x3e10f0,Object['fromEntries'](_0x196210['getAttributes']()));}const _0x5b467e=Array['from'](this['editor']['model']['markers'])['map'](_0x542721=>[_0x542721['name'],_0x542721['getRange']()]),_0x5499d5=this['source']['version'];this['_saveMetaData'](_0x5499d5,_0xaf0038,_0x5b467e,_0x33fc49),this['_startingRevisionId']=this['_revisionId'];const _0x4e38f1=new Map(),_0x546646=new Map();for(const _0x1cf9ee of _0x34c179){const _0x404320=wt(_0x1cf9ee,this['editor']['model']['document']['getRoot'](_0x1cf9ee)['name']);_0x4e38f1['set'](_0x1cf9ee,_0x404320),_0x546646['set'](_0x1cf9ee,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x4e38f1,[],_0x546646);}['getData'](_0x129d90,_0x3cdd4){if(this['_lastFrom']===_0x129d90&&this['_lastTo']<=_0x3cdd4)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3cdd4,!0x0);else{if(!this['_savedMetaData']['has'](_0x129d90)){const _0x372ccd=this['_getPreviousFrom'](_0x129d90);this['_calculateMetaData'](_0x372ccd,_0x129d90,!0x1);}this['_calculateMetaData'](_0x129d90,_0x3cdd4,!0x0);}return this['_lastFrom']=_0x129d90,this['_lastTo']=_0x3cdd4,this['_getState']();}['loadState'](_0x938534){if(!this['_savedMetaData']['has'](_0x938534['fromVersion'])){const _0x5b9950=this['_getPreviousFrom'](_0x938534['fromVersion']);this['_calculateMetaData'](_0x5b9950,_0x938534['fromVersion'],!0x1);}this['_calculateMetaData'](_0x938534['fromVersion'],_0x938534['toVersion'],!0x1);const _0x252bab=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x938534['fromVersion'],this['_lastTo']=_0x938534['toVersion'];for(const _0x120965 in _0x938534['diffData']){const _0x4c68eb=_0x938534['diffData'][_0x120965]['attachChange'],_0x21a77a=_0x527a66(_0x938534['diffData'][_0x120965]['attributesBefore'])||{},_0x53fe3f=_0x938534['diffData'][_0x120965],_0x5a8490=_0x252bab['_makeModelFromViewString'](_0x53fe3f['deletions'],_0x53fe3f['rootElementName']||'$root');_0x5a8490['rootName']=_0x120965,_0x5a8490['_isAttached']=!_0x4c68eb||!_0x4c68eb['isAttached'],_0x5a8490['isAttached']=()=>_0x5a8490['_isAttached'],this['_baseRoots']['set'](_0x120965,_0x5a8490),this['_baseRootsAttributes']['set'](_0x120965,_0x21a77a),_0x4c68eb&&this['_touchedRoots']['set'](_0x120965,_0x4c68eb);const _0x3ebcde=this['_makeIdsRoot'](_0x5a8490);this['_baseIdsRoots']['set'](_0x120965,_0x3ebcde);for(const [_0x3e7577,_0x1dde51]of _0x5a8490['markers']){if(!_0x3e7577['startsWith']('revision:'))continue;const _0x2c3dbc=_0x3e7577['split'](':')[0x2];for(const _0x564a19 of _0x1dde51['getWalker']({'singleCharacters':!0x0})){const _0x3c5a4e=this['_getVidAttributeName'](_0x564a19),_0x3439d8='elementEnd'==_0x564a19['type']?_0x564a19['previousPosition']['path']['slice'](0x0,-0x1):_0x564a19['previousPosition']['path'],_0x34d62a=_0x3ebcde['getNodeByPath'](_0x3439d8)['getAttribute'](_0x3c5a4e);this['_touched']['set'](_0x34d62a,{'userId':_0x2c3dbc});}_0x5a8490['markers']['delete'](_0x3e7577);}}this['_startingRevisionId']=this['_revisionId'];const _0x798e06=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x30650b=>!this['_touched']['has'](_0x30650b));let _0x17890f=0x0;const _0x409067=new Map();for(const _0x2c8265 in _0x938534['diffData']){const _0x4c683d=_0x938534['diffData'][_0x2c8265]['attachChange'],_0x46743b=_0x527a66(_0x938534['diffData'][_0x2c8265]['attributesAfter'])||{},_0x165430=_0x938534['diffData'][_0x2c8265],_0x215b84=_0x252bab['_makeModelFromViewString'](_0x165430['insertions'],_0x165430['rootElementName']||'$root');_0x215b84['rootName']=_0x2c8265,_0x215b84['_isAttached']=!_0x4c683d||_0x4c683d['isAttached'],_0x215b84['isAttached']=()=>_0x215b84['_isAttached'],this['_diffRoots']['set'](_0x2c8265,_0x215b84),this['_diffRootsAttributes']['set'](_0x2c8265,_0x46743b);const _0x5bfd6e=this['_makeIdsRoot'](_0x215b84,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2c8265,_0x5bfd6e),_0x409067['set'](_0x2c8265,_0x215b84['isAttached']()?_0x46743b:{});for(const [_0x5bebd2,_0x2c6c00]of _0x215b84['markers']){if(!_0x5bebd2['startsWith']('revision:'))continue;const _0x3f8ed2=_0x5bebd2['split'](':')[0x2];for(const _0x920456 of _0x2c6c00['getWalker']({'singleCharacters':!0x0})){const _0x1c402a=this['_getVidAttributeName'](_0x920456),_0x41d4fe=this['_revisionId']++,_0x48743f='elementEnd'==_0x920456['type']?_0x920456['previousPosition']['path']['slice'](0x0,-0x1):_0x920456['previousPosition']['path'];_0x5bfd6e['getNodeByPath'](_0x48743f)['_setAttribute'](_0x1c402a,_0x41d4fe),this['_touched']['set'](_0x41d4fe,{'userId':_0x3f8ed2});}_0x215b84['markers']['delete'](_0x5bebd2);}for(const _0x323c20 of this['editor']['model']['createRangeIn'](_0x215b84)['getWalker']({'singleCharacters':!0x0})){const _0x3199e7=this['_getVidAttributeName'](_0x323c20),_0xc8a834='elementEnd'==_0x323c20['type']?_0x323c20['previousPosition']['path']['slice'](0x0,-0x1):_0x323c20['previousPosition']['path'],_0x6d4311=_0x5bfd6e['getNodeByPath'](_0xc8a834);_0x6d4311['getAttribute'](_0x3199e7)>0x0||_0x6d4311['_setAttribute'](_0x3199e7,_0x798e06[_0x17890f++]);}for(const [_0x456871,_0x46d48e]of _0x215b84['markers'])_0x456871['startsWith']('revision:')||this['_markers']['set'](_0x456871,_0x46d48e);}const {roots:_0x2e255f}=this['_savedMetaData']['get'](_0x938534['fromVersion']),{roots:_0x4ac911}=this['_savedMetaData']['get'](_0x938534['toVersion']),_0x5c90f1=gt(_0x2e255f['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x5c90f1),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5c90f1,Number['NEGATIVE_INFINITY']));const _0x33cc98=gt(_0x4ac911['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x33cc98),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x33cc98));const _0x352d3b=Array['from'](this['_diffRoots'])['map'](([_0x48f8dc,_0x596696])=>[_0x48f8dc,gt(_0x596696)]);this['_saveMetaData'](this['_lastTo'],_0x352d3b,this['_markers'],_0x409067);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0xb01b6a,_0x1f6d13,_0x3c4918,_0x4cacde){const _0x4d5a8c=new Map(_0x1f6d13),_0x54c9c2=new Map(_0x527a66(_0x4cacde)),_0x48bd4b=new Map();for(const [_0x1eb782,_0x89db60]of _0x3c4918)_0x48bd4b['set'](_0x1eb782,{'start':_0x89db60['start']['clone'](),'end':_0x89db60['end']['clone'](),'rootName':_0x89db60['root']['rootName']});this['_savedMetaData']['set'](_0xb01b6a,{'roots':_0x4d5a8c,'markers':_0x48bd4b,'rootsAttributes':_0x54c9c2});}['_removeMetaData'](_0x1a07e7){this['_savedMetaData']['delete'](_0x1a07e7);}['_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'](_0x4930fd,_0x4304b0=null){let _0x1cdd8e=null;_0x4930fd['is']('documentFragment')||(_0x1cdd8e=new _0x45e0a6(_0x4930fd['name'],{'vid_start':null===_0x4304b0?this['_revisionId']++:_0x4304b0++}));const _0x51ba4d=[];for(const _0x137e93 of _0x4930fd['getChildren']())if(_0x137e93['is']('element')){_0x51ba4d['push'](this['_makeIdsRoot'](_0x137e93,_0x4304b0));const _0x5511c8=_0x51ba4d[_0x51ba4d['length']-0x1];null!==_0x4304b0&&(_0x4304b0=_0x5511c8['is']('element','$text')?_0x5511c8['getAttribute']('vid')+0x1:_0x5511c8['getAttribute']('vid_end')+0x1);}else{for(let _0x389795=0x0;_0x389795<_0x137e93['offsetSize'];_0x389795++)_0x51ba4d['push'](new _0x45e0a6('$text',{'vid':null===_0x4304b0?this['_revisionId']++:_0x4304b0++}));}if(_0x4930fd['is']('documentFragment')){const _0x505297=wt(_0x4930fd['rootName'],_0x4930fd['name']);return _0x505297['_insertChild'](0x0,_0x51ba4d),_0x505297;}return _0x1cdd8e['_setAttribute']('vid_end',null===_0x4304b0?this['_revisionId']++:_0x4304b0++),_0x1cdd8e['_insertChild'](0x0,_0x51ba4d),_0x1cdd8e;}['_calculateMetaData'](_0x2c4dc9,_0xd529ae,_0x11b997){this['_reset']();const {roots:_0x2f18e3,markers:_0x383916,rootsAttributes:_0x285881}=this['_savedMetaData']['get'](_0x2c4dc9);this['_baseRoots']=new Map(_0x2f18e3),this['_baseRootsAttributes']=new Map(_0x527a66(_0x285881));for(const [_0x360653,_0x2b85c3]of this['_baseRoots'])if('$graveyard'!==_0x360653&&(this['_diffRoots']['set'](_0x360653,gt(_0x2b85c3)),this['_diffRootsAttributes']=new Map(_0x527a66(_0x285881)),_0x11b997)){const _0x172a04=this['_revisionId'];this['_idsRoots']['set'](_0x360653,this['_makeIdsRoot'](_0x2b85c3)),this['_baseIdsRoots']['set'](_0x360653,this['_makeIdsRoot'](_0x2b85c3,_0x172a04));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x11b997&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x110e59,_0x58ae7b]of _0x383916){const _0x227f46=this['_baseRoots']['get'](_0x58ae7b['rootName']),_0x1c32be=this['_diffRoots']['get'](_0x58ae7b['rootName']),_0x192ce7=new _0x8a4273(this['_fixPosition'](_0x58ae7b['start'],_0x227f46),this['_fixPosition'](_0x58ae7b['end'],_0x227f46)),_0x15f9d9=this['_fixRange'](_0x192ce7,_0x1c32be);_0x227f46['markers']['set'](_0x110e59,_0x192ce7),this['_markers']['set'](_0x110e59,_0x15f9d9);}this['_applyOperations'](_0x2c4dc9,_0xd529ae,_0x11b997);}['_applyOperations'](_0x7cf3c4,_0x402681,_0x36dd35){for(const _0x1d01dd of this['source']['getOperations'](_0x7cf3c4,_0x402681))this['_handleOperation'](_0x1d01dd,_0x36dd35);for(const _0xd14497 of this['_diffRoots']['values']())_0xd14497['markers']['clear']();for(const [_0x270a09,_0x1eaaec]of this['_markers']){this['_diffRoots']['get'](_0x1eaaec['root']['rootName'])['markers']['set'](_0x270a09,_0x1eaaec['clone']());}const _0x5b8bcb=new Map(),_0x93288f=new Map();for(const [_0x8eb0ff,_0x110e5e]of this['_diffRoots'])_0x5b8bcb['set'](_0x8eb0ff,gt(_0x110e5e)),_0x93288f['set'](_0x8eb0ff,this['_diffRootsAttributes']['get'](_0x8eb0ff));this['_saveMetaData'](_0x402681,_0x5b8bcb,this['_markers'],_0x93288f);}['_getPreviousFrom'](_0xd344a7){const _0x361168=Array['from'](this['_savedMetaData']['keys']());_0x361168['sort']((_0x2e9e0e,_0x566927)=>_0x2e9e0e-_0x566927),_0x361168['reverse']();for(const _0x54505b of _0x361168)if(_0x54505b<_0xd344a7)return _0x54505b;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2bf574,_0x3d760f){const _0x53b93c=Array['from'](_0x3d760f['markers'])['map'](([_0x287eb4,_0x4bf17d])=>[_0x287eb4,this['_fixRange'](_0x4bf17d,_0x2bf574)]);_0x2bf574['markers']=new Map(_0x53b93c);}['_transformMarkers'](_0x4351b7){for(const _0x5395a6 of this['_markers']['values']()){const _0x180135=_0x5395a6['getTransformedByOperation'](_0x4351b7),_0x554f19=_0x8a4273['_createFromRanges'](_0x180135);_0x5395a6['start']=_0x554f19['start'],_0x5395a6['end']=_0x554f19['end'];}}['_handleOperation'](_0x243d16,_0x2fd70e){if('addRoot'!=_0x243d16['type']&&'detachRoot'!=_0x243d16['type']){if('insert'==_0x243d16['type']){const _0x364773=_0x243d16['position']['root'],_0x3bb257=_0x364773['rootName'],_0x367422=_0x364773['name'];this['_diffRoots']['has'](_0x3bb257)||(this['_diffRoots']['set'](_0x3bb257,wt(_0x3bb257,_0x367422,!0x0)),this['_diffRootsAttributes']['set'](_0x3bb257,{}),_0x2fd70e&&this['_idsRoots']['set'](_0x3bb257,wt(_0x3bb257,_0x367422,!0x0)));}else{if('addRootAttribute'==_0x243d16['type']||'removeRootAttribute'==_0x243d16['type']||'changeRootAttribute'==_0x243d16['type'])return void this['_handleRootAttributeOperation'](_0x243d16);'marker'==_0x243d16['type']&&this['_handleMarkerOperation'](_0x243d16);}if('marker'!==_0x243d16['type']){const _0x5094fe=this['_cloneOperation'](_0x243d16,this['_diffRoots']);_0x5094fe['_execute'](),this['_transformMarkers'](_0x5094fe);}if(_0x2fd70e)switch(_0x243d16['type']){case'insert':this['_handleInsertOperation'](_0x243d16);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x243d16);break;case'merge':this['_handleMergeOperation'](_0x243d16);break;case'split':this['_handleSplitOperation'](_0x243d16);}}else this['_handleRootOperation'](_0x243d16,_0x2fd70e);}['_cloneOperation'](_0x4339ab,_0x15d241){const _0x1f60c3=_0x4339ab['clone']();return _0x1f60c3['_authorId']=_0x4339ab['_authorId'],this['_fixOperation'](_0x1f60c3,_0x15d241),_0x1f60c3;}['_getBaseVids'](_0x302022){return _0x302022['map'](_0x3c82b5=>{const _0x4252e5=this['_getVidAttributeName'](_0x3c82b5);return Number(_0x3c82b5['item']['getAttribute'](_0x4252e5));});}['_generateTape'](_0x467bbd,_0x4e7ec1){if(_0x467bbd['is']('element','$text'))_0x4e7ec1['push']({'item':_0x467bbd,'type':'text'});else{_0x467bbd['is']('element')&&_0x4e7ec1['push']({'item':_0x467bbd,'type':'elementStart'});for(const _0x1988cf of _0x467bbd['getChildren']())this['_generateTape'](_0x1988cf,_0x4e7ec1);_0x467bbd['is']('element')&&_0x4e7ec1['push']({'item':_0x467bbd,'type':'elementEnd'});}return _0x4e7ec1;}['_getState'](){const _0x582e9f=new Map(this['_touched']),_0x18d2a5=new Map(_0x582e9f),_0x4d0019=new Map(),_0x4c4877={'insertions':{},'deletions':{}},_0x2c761f={'insertions':{},'deletions':{}},_0x78b328=new Map(),_0x4a70ad=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x3fce47=new Map();_0x4a70ad['delete']('$graveyard');for(const _0x47beab of _0x4a70ad){const _0x4b7fe1=(this['_diffRoots']['get'](_0x47beab)??this['_baseRoots']['get'](_0x47beab))['name'],_0x47f8bf=this['_diffRoots']['get'](_0x47beab)||wt(_0x47beab,_0x4b7fe1,!0x1),_0x26929f=this['_baseRoots']['get'](_0x47beab)||wt(_0x47beab,_0x4b7fe1,!0x1);_0x47f8bf['isAttached']()||_0x26929f['isAttached']()?(_0x3fce47['set'](_0x47beab,_0x4b7fe1),_0x4c4877['insertions'][_0x47beab]=gt(_0x47f8bf),_0x4c4877['deletions'][_0x47beab]=gt(_0x26929f),this['_copyMarkers'](_0x4c4877['deletions'][_0x47beab],_0x26929f),this['_copyMarkers'](_0x4c4877['insertions'][_0x47beab],_0x47f8bf),_0x2c761f['insertions'][_0x47beab]=this['_generateTape'](this['_idsRoots']['get'](_0x47beab),[]),_0x2c761f['deletions'][_0x47beab]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x47beab)||wt(_0x47beab,_0x4b7fe1,!0x1),[])):_0x4a70ad['delete'](_0x47beab);}for(const _0x29760d of _0x4a70ad){const _0x539f87=_0x2c761f['insertions'][_0x29760d];for(const _0x5d5605 of _0x539f87){const _0x4089e0=this['_getVidAttributeName'](_0x5d5605),_0x51c4cb=_0x5d5605['item']['getAttribute'](_0x4089e0);_0x18d2a5['delete'](_0x51c4cb),_0x51c4cb>=this['_startingRevisionId']&&_0x4d0019['set'](_0x51c4cb,_0x582e9f['get'](_0x51c4cb));}}for(const _0x5093bd of _0x4a70ad){const _0x557344=_0x2c761f['insertions'][_0x5093bd],_0x5c5a3c=this['_getBaseVids'](_0x2c761f['deletions'][_0x5093bd]);let _0x184f6d=0x0;for(const _0x147128 of _0x557344){const _0x47c5fe=this['_getVidAttributeName'](_0x147128),_0x5c69c9=_0x147128['item']['getAttribute'](_0x47c5fe);if(!_0x4d0019['has'](_0x5c69c9)&&!_0x78b328['has'](_0x5c69c9)){if(_0x18d2a5['has'](_0x5c69c9))_0x184f6d++;else{if(_0x5c69c9!=_0x5c5a3c[_0x184f6d]){const _0x2b4b4b=_0x582e9f['get'](_0x5c69c9)||_0x582e9f['get'](_0x5c5a3c[_0x184f6d]);for(;_0x5c69c9!=_0x5c5a3c[_0x184f6d];)_0x18d2a5['has'](_0x5c5a3c[_0x184f6d])||(_0x78b328['set'](_0x5c5a3c[_0x184f6d],_0x2b4b4b),_0x582e9f['set'](_0x5c5a3c[_0x184f6d],_0x2b4b4b)),_0x184f6d++;}_0x184f6d++;}}}}for(const _0x48b27a of _0x4a70ad){const _0x5d7d3f=_0x2c761f['insertions'][_0x48b27a];for(const _0x36c69 of _0x5d7d3f){const _0x308b2d=this['_getVidAttributeName'](_0x36c69),_0xcc80c4=_0x36c69['item']['getAttribute'](_0x308b2d);if(_0x78b328['has'](_0xcc80c4)){const _0x305a37=_0x78b328['get'](_0xcc80c4);_0x18d2a5['has'](_0xcc80c4)||_0x18d2a5['set'](_0xcc80c4,{..._0x305a37}),_0x4d0019['set'](_0xcc80c4,{..._0x305a37});}}}for(const _0x3876b6 of _0x18d2a5['keys']())_0x3876b6>=this['_startingRevisionId']&&_0x18d2a5['delete'](_0x3876b6);const _0x212b13=new Map();for(const _0x566a1c of _0x4a70ad){let _0x577883=_0x2c761f['insertions'][_0x566a1c];for(const _0x5d3b0b of _0x577883)if(_0x5d3b0b['item']['is']('element','tableCell')){const _0x48f2b=this['_getVidAttributeName'](_0x5d3b0b),_0x1a32e5=_0x5d3b0b['item']['getAttribute'](_0x48f2b);if(_0x4d0019['has'](_0x1a32e5)){const _0x5c039c=_0x5d3b0b['item']['parent']['parent']['getAttribute']('vid_start'),_0x2ffbb3=_0x212b13['get'](_0x5c039c)||new Set();_0x2ffbb3['add'](_0x4d0019['get'](_0x1a32e5)['userId']),_0x212b13['set'](_0x5c039c,_0x2ffbb3);}}_0x577883=_0x2c761f['deletions'][_0x566a1c];for(const _0x625a43 of _0x577883)if(_0x625a43['item']['is']('element','tableCell')){const _0x340269=this['_getVidAttributeName'](_0x625a43),_0x494970=_0x625a43['item']['getAttribute'](_0x340269);if(_0x18d2a5['has'](_0x494970)){const _0xd4dd0=_0x625a43['item']['parent']['parent']['getAttribute']('vid_start'),_0x4f1022=_0x212b13['get'](_0xd4dd0)||new Set();_0x4f1022['add'](_0x18d2a5['get'](_0x494970)['userId']),_0x212b13['set'](_0xd4dd0,_0x4f1022);}}for(const _0x5829c7 of _0x212b13['keys']())(_0x4d0019['has'](_0x5829c7)||_0x18d2a5['has'](_0x5829c7))&&_0x212b13['delete'](_0x5829c7);}for(const _0x372ef5 of _0x4a70ad){const _0x539b83=_0x2c761f['insertions'][_0x372ef5];let _0x44534f=null,_0x3c387b=null;for(const _0x43800b of _0x539b83){const _0x22987b=this['_getVidAttributeName'](_0x43800b),_0x525bdc=_0x43800b['item']['getAttribute'](_0x22987b),_0x4e22fa=_0x212b13['get'](_0x525bdc);_0x4e22fa&&'elementStart'==_0x43800b['type']&&(_0x44534f=Array['from'](_0x4e22fa)[0x0],_0x3c387b=_0x43800b['item']['getAttribute']('vid_end')),_0x44534f&&(_0x18d2a5['set'](_0x525bdc,{'userId':_0x44534f}),_0x4d0019['set'](_0x525bdc,{'userId':_0x44534f})),_0x525bdc==_0x3c387b&&(_0x44534f=null,_0x3c387b=null);}}const _0x53aab7={},_0x1da416=new Set();for(const _0x116de1 of _0x4a70ad){const _0x38f953=_0x4c4877['deletions'][_0x116de1],_0x156f70=_0x4c4877['insertions'][_0x116de1];for(const {userId:_0x1b48cc}of this['_touchedMarkers']['values']())null!==_0x1b48cc&&_0x1da416['add'](_0x1b48cc);for(const {userId:_0x21f0fb}of this['_touchedRoots']['values']())null!==_0x21f0fb&&_0x1da416['add'](_0x21f0fb);this['_markChanges'](_0x156f70,_0x2c761f['insertions'][_0x116de1],_0x4d0019,'insertion',_0x1da416),this['_markChanges'](_0x38f953,_0x2c761f['deletions'][_0x116de1],_0x18d2a5,'deletion',_0x1da416),_0x53aab7[_0x116de1]={'insertions':this['_prepareViewToSave'](_0x156f70),'deletions':this['_prepareViewToSave'](_0x38f953),'attachChange':this['_touchedRoots']['get'](_0x116de1)||null,'attributesBefore':_0x527a66(this['_baseRootsAttributes']['get'](_0x116de1))||{},'attributesAfter':_0x527a66(this['_diffRootsAttributes']['get'](_0x116de1)),'rootElementName':_0x3fce47['get'](_0x116de1)};}return{'diffData':_0x53aab7,'authorsIds':Array['from'](_0x1da416)};}['_processRootBeforeSave'](_0x2a642a){for(const [,_0x728619]of _0x2a642a['markers']){const _0x385465=_0x728619['start']['getAncestors']()['filter'](_0x2e7b94=>'tableCell'==_0x2e7b94['name']);for(const _0x21a974 of _0x385465)0x1==_0x21a974['childCount']&&_0x21a974['getChild'](0x0)['is']('element','paragraph')&&_0x21a974['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4801ec){this['_processRootBeforeSave'](_0x4801ec);const _0x2a7698=this['editor']['data']['toView'](_0x4801ec,{}),_0x1385da=Array['from'](_0x2a7698['getChildren']())['map'](_0x150b41=>this['_getViewJson'](_0x150b41));return JSON['stringify'](_0x1385da);}['_getViewJson'](_0x412e35){if(_0x412e35['is']('$text'))return _0x412e35['data'];{const _0x44e188=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x29948c=_0x412e35,_0x2bf472=this['editor']['data']['htmlProcessor']['domConverter'],_0x4d05d9={'type':_0x44e188['_getTypeCharForViewElement'](_0x29948c),'name':_0x29948c['name'],'attributes':Array['from'](_0x29948c['getAttributes']()),'children':Array['from'](_0x29948c['getChildren']())['map'](_0x2a01ce=>this['_getViewJson'](_0x2a01ce))};if(_0x412e35['is']('uiElement')&&'$comment'!=_0x412e35['name']){const _0x283328=_0x412e35['render'](_0x2bf472['domDocument'],_0x2bf472);_0x4d05d9['children']['push'](_0x283328['outerHTML']);}else{if(_0x412e35['is']('rawElement')){const _0x3fce58=_0x2bf472['domDocument']['createElement'](_0x29948c['name']);_0x412e35['render'](_0x3fce58,_0x2bf472),_0x4d05d9['children']['push'](_0x3fce58['innerHTML']);}}const _0x3add92=Array['from'](_0x29948c['getCustomProperties']());_0x3add92['length']>0x0&&(_0x4d05d9['customProperties']=_0x3add92);const _0x2104a9=_0x29948c['getFillerOffset']();return null!==_0x2104a9&&(_0x4d05d9['fillerOffset']=_0x2104a9),_0x4d05d9;}}['_markChanges'](_0x2a9d9f,_0x2ee381,_0x487c8c,_0x4d5b7f,_0x15c798){let _0x5bae4a=null,_0xdcff70=null,_0x29f301=0x0;const _0x1aef4c=this['editor']['model'];for(let _0x31bb21=0x0;_0x31bb21<_0x2ee381['length'];_0x31bb21++){const _0x43505f=this['_getVidAttributeName'](_0x2ee381[_0x31bb21]),_0x26da79=_0x2ee381[_0x31bb21]['item']['getAttribute'](_0x43505f),_0x1fa828=_0x487c8c['get'](_0x26da79),_0x477a67=_0x31bb21==_0x2ee381['length']-0x1;(!_0x5bae4a&&_0x1fa828&&(_0x5bae4a=_0x1fa828,_0xdcff70=_0x2ee381[_0x31bb21]),_0x5bae4a&&(!_0x1fa828||_0x1fa828['userId']!=_0x5bae4a['userId']))&&(_0x53b7e6(_0x1fa828,mt(_0xdcff70,_0x2a9d9f,_0x1aef4c),mt(_0x2ee381[_0x31bb21],_0x2a9d9f,_0x1aef4c)),_0x5bae4a=_0x1fa828||null,_0xdcff70=_0x1fa828?_0x2ee381[_0x31bb21]:null),_0x5bae4a&&_0x477a67&&_0x53b7e6(_0x1fa828,mt(_0xdcff70,_0x2a9d9f,_0x1aef4c),pt(_0x2ee381[_0x31bb21],_0x2a9d9f,_0x1aef4c));}function _0x53b7e6(_0x47cb45,_0xe41271,_0x4add29){const _0x530d5d=_0x5bae4a['userId'],_0x1cd03b='revision:'+_0x4d5b7f+':'+_0x530d5d+':'+_0x29f301++,_0x3a7f50=_0x1aef4c['createRange'](_0xe41271,_0x4add29);_0x2a9d9f['markers']['set'](_0x1cd03b,_0x3a7f50),null!==_0x530d5d&&_0x15c798['add'](_0x530d5d);}}['_getVidAttributeName'](_0x250870){switch(_0x250870['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x1204cb,_0xa1057){_0x1204cb['baseVersion']=null;for(const _0xcb2a10 in _0x1204cb){const _0x5b328c=_0x1204cb[_0xcb2a10];if(_0x5b328c instanceof _0x4e4050){const _0x19e648=_0xa1057['get'](_0x5b328c['root']['rootName']);_0x1204cb[_0xcb2a10]=this['_fixPosition'](_0x5b328c,_0x19e648);}if(_0x5b328c instanceof _0x8a4273){const _0x2882b2=_0xa1057['get'](_0x5b328c['root']['rootName']);_0x1204cb[_0xcb2a10]=this['_fixRange'](_0x5b328c,_0x2882b2);}'root'===_0xcb2a10&&(_0x1204cb['root']=_0xa1057['get'](_0x1204cb['root']['rootName']));}}['_fixRange'](_0x2aa2a9,_0x347f19){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2aa2a9['start'],_0x347f19),this['_fixPosition'](_0x2aa2a9['end'],_0x347f19));}['_fixPosition'](_0x1fd7d6,_0x389750){return this['editor']['model']['createPositionFromPath'](_0x389750,_0x1fd7d6['path'],_0x1fd7d6['stickiness']);}['_handleInsertOperation'](_0x31f0f8){const _0x49eed7=this['_idsRoots']['get'](_0x31f0f8['position']['root']['rootName']),_0x60c8=this['_fixPosition'](_0x31f0f8['position'],_0x49eed7),_0x534837=null===_0x31f0f8['_authorId']?null:_0x31f0f8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5bcd4b=_0x60c8['parent'],_0xc81e35=this['_revisionId'],_0x256e5d=[];for(const _0x3e060f of _0x31f0f8['nodes'])if(_0x3e060f['is']('element'))_0x256e5d['push'](this['_makeIdsRoot'](_0x3e060f));else{for(let _0x43d16f=0x0;_0x43d16f<_0x3e060f['offsetSize'];_0x43d16f++)_0x256e5d['push'](new _0x45e0a6('$text',{'vid':this['_revisionId']++}));}const _0x3f71bc=this['_revisionId'];for(let _0x15e88f=_0xc81e35;_0x15e88f<_0x3f71bc;_0x15e88f++)this['_touched']['set'](_0x15e88f,{'userId':_0x534837});_0x5bcd4b['_insertChild'](_0x60c8['offset'],_0x256e5d);}['_handleMoveOperation'](_0x242bb9){(_0x242bb9=this['_cloneOperation'](_0x242bb9,this['_idsRoots']))['_execute']();const _0x15b857=null===_0x242bb9['_authorId']?null:_0x242bb9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3615d4=_0x242bb9['getMovedRangeStart'](),_0x4c2c80=_0x3615d4['parent'],_0x1bf0be=_0x3615d4['offset'];!function _0xedab9b(_0x3414dc,_0x563f86,_0xacb70c,_0x591466){for(let _0x2b9e3d=_0xacb70c;_0x2b9e3d<_0x591466;_0x2b9e3d++){const _0x135519=_0x563f86['getChild'](_0x2b9e3d);_0x135519['is']('element','$text')?_0x3414dc['set'](_0x135519['getAttribute']('vid'),{'userId':_0x15b857}):(_0x3414dc['set'](_0x135519['getAttribute']('vid_start'),{'userId':_0x15b857}),_0xedab9b(_0x3414dc,_0x135519,0x0,_0x135519['childCount']),_0x3414dc['set'](_0x135519['getAttribute']('vid_end'),{'userId':_0x15b857}));}}(this['_touched'],_0x4c2c80,_0x1bf0be,_0x1bf0be+_0x242bb9['howMany']);}['_handleMergeOperation'](_0x36c6b8){const _0x38b1d0=null===(_0x36c6b8=this['_cloneOperation'](_0x36c6b8,this['_idsRoots']))['_authorId']?null:_0x36c6b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x31e67b=_0x36c6b8['targetPosition']['parent'],_0x5b3055=_0x36c6b8['sourcePosition']['parent'],_0x48341a=_0x31e67b['getAttribute']('vid_end'),_0x119b9e=_0x5b3055['getAttribute']('vid_start');_0x31e67b['_setAttribute']('vid_end',_0x5b3055['getAttribute']('vid_end')),_0x5b3055['_setAttribute']('vid_end',_0x48341a),this['_touched']['set'](_0x119b9e,{'userId':_0x38b1d0}),this['_touched']['set'](_0x48341a,{'userId':_0x38b1d0}),_0x36c6b8['_execute']();}['_handleSplitOperation'](_0x15c3cf){const _0x2a604b=null===(_0x15c3cf=this['_cloneOperation'](_0x15c3cf,this['_idsRoots']))['_authorId']?null:_0x15c3cf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c14c3=_0x15c3cf['graveyardPosition'],_0x1aae14=_0x15c3cf['splitPosition']['parent'];_0x15c3cf['_execute']();const _0x5c6e8c=_0x1aae14['getAttribute']('vid_end'),_0x3c7e9d=_0x15c3cf['insertionPosition']['nodeAfter'];if(_0x4c14c3){const _0x4da43c=_0x3c7e9d['getAttribute']('vid_end'),_0x123f0a=_0x1aae14['getAttribute']('vid_end');_0x1aae14['_setAttribute']('vid_end',_0x4da43c),_0x3c7e9d['_setAttribute']('vid_end',_0x123f0a),this['_touched']['set'](_0x1aae14['getAttribute']('vid_end'),{'userId':_0x2a604b}),this['_touched']['set'](_0x3c7e9d['getAttribute']('vid_start'),{'userId':_0x2a604b});}else{const _0x1423da=this['_revisionId']++,_0x297578=this['_revisionId']++;_0x1aae14['_setAttribute']('vid_end',_0x1423da),_0x3c7e9d['_setAttribute']('vid_start',_0x297578),_0x3c7e9d['_setAttribute']('vid_end',_0x5c6e8c),this['_touched']['set'](_0x1423da,{'userId':_0x2a604b}),this['_touched']['set'](_0x297578,{'userId':_0x2a604b});}}['_handleMarkerOperation'](_0x8c03ff){if(!_0x8c03ff['affectsData'])return;const _0x4ac037=(_0x8c03ff=this['_cloneOperation'](_0x8c03ff,this['_diffRoots']))['oldRange']?_0x8c03ff['oldRange']['root']:null,_0x6e7abc=_0x8c03ff['newRange']?_0x8c03ff['newRange']['root']:null;_0x4ac037&&this['_markers']['delete'](_0x8c03ff['name']),_0x6e7abc&&this['_markers']['set'](_0x8c03ff['name'],_0x8c03ff['newRange']['clone']());const _0x18c6f3=null===_0x8c03ff['_authorId']?null:_0x8c03ff['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1a43e7=_0x8c03ff['name'];if(!this['_touchedMarkers']['has'](_0x1a43e7))return void this['_touchedMarkers']['set'](_0x1a43e7,{'range':_0x8c03ff['oldRange'],'userId':_0x18c6f3});const _0x43c91d=this['_touchedMarkers']['get'](_0x1a43e7),_0xd59a3=_0x43c91d['range'],_0x5af699=_0x8c03ff['newRange'];null==_0xd59a3&&null==_0x5af699||_0xd59a3&&_0x5af699&&_0xd59a3['isEqual'](_0x5af699)?this['_touchedMarkers']['delete'](_0x8c03ff['name']):_0x43c91d['userId']=_0x18c6f3;}['_handleRootOperation'](_0x29cdee,_0x18b559){this['_diffRoots']['has'](_0x29cdee['rootName'])?this['_diffRoots']['get'](_0x29cdee['rootName'])['_isAttached']=_0x29cdee['isAdd']:(this['_diffRoots']['set'](_0x29cdee['rootName'],wt(_0x29cdee['rootName'],_0x29cdee['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x29cdee['rootName'],{}),_0x18b559&&this['_idsRoots']['set'](_0x29cdee['rootName'],wt(_0x29cdee['rootName'],_0x29cdee['elementName'],!0x0)));const _0x1d36aa=null===_0x29cdee['_authorId']?null:_0x29cdee['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1a3e3d=this['_touchedRoots']['get'](_0x29cdee['rootName']);_0x1a3e3d&&_0x1a3e3d['userId']===_0x1d36aa?this['_touchedRoots']['delete'](_0x29cdee['rootName']):this['_touchedRoots']['set'](_0x29cdee['rootName'],{'userId':_0x1d36aa,'isAttached':_0x29cdee['isAdd']});}['_handleRootAttributeOperation'](_0x5f1d03){const _0xc542cf=this['_diffRootsAttributes']['get'](_0x5f1d03['root']['rootName']);null===_0x5f1d03['newValue']?delete _0xc542cf[_0x5f1d03['key']]:_0xc542cf[_0x5f1d03['key']]=_0x5f1d03['newValue'];}}function gt(_0x13bf35){const _0xf71434=wt(_0x13bf35['rootName'],_0x13bf35['name'],_0x13bf35['isAttached']());for(const _0x5a8f89 of _0x13bf35['getChildren']()){const _0x5c7310=_0x5a8f89['_clone'](!0x0);_0xf71434['_appendChild'](_0x5c7310);}return _0xf71434;}function wt(_0x5d15f2,_0x14bca7,_0x24b769=!0x0){const _0x50e9de=new _0x34f38e();return _0x50e9de['rootName']=_0x5d15f2,_0x50e9de['name']=_0x14bca7,_0x50e9de['_isAttached']=_0x24b769,_0x50e9de['isAttached']=()=>_0x50e9de['_isAttached'],_0x50e9de;}function mt(_0x541755,_0x54747f,_0x3c1589){const _0x395271='elementEnd'==_0x541755['type']?_0x3c1589['createPositionAt'](_0x541755['item'],'end'):_0x3c1589['createPositionBefore'](_0x541755['item']);return _0x3c1589['createPositionFromPath'](_0x54747f,_0x395271['path'],_0x395271['stickiness']);}function pt(_0x48c8dd,_0x2e1a7a,_0x12de6a){const _0x57e8b0='elementStart'==_0x48c8dd['type']?_0x12de6a['createPositionAt'](_0x48c8dd['item'],0x0):_0x12de6a['createPositionAfter'](_0x48c8dd['item']);return _0x12de6a['createPositionFromPath'](_0x2e1a7a,_0x57e8b0['path'],_0x57e8b0['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x469ec1(_0x39c569){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4a8c30,_0x78949c){super(_0x4a8c30),this['focusTracker']=new _0x22ee29(),this['keystrokes']=new _0x2862f7(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x78949c),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x9ecd07({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5170d1=_0x351e5b=>_0x351e5b['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5170d1),this['keystrokes']['set']('arrowleft',_0x5170d1),this['keystrokes']['set']('arrowup',_0x5170d1),this['keystrokes']['set']('arrowdown',_0x5170d1);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x17b76d){this['revisionNameInputView']['fieldView']['element']['value']=_0x17b76d['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x3ddd0e){const _0x5aaf88=new _0x321730(this['locale'],_0x212138),_0x410f65=_0x5aaf88['fieldView'];_0x410f65['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x57c719=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0x3ddd0e&&(_0x57c719+='\x20('+ft(this['locale'],'optional')+')'),(_0x5aaf88['label']=_0x57c719,_0x410f65['on']('input',()=>{this['revisionNameInputValue']=_0x410f65['element']['value']['trim']();}),_0x5aaf88);}}class RevisionHistoryUI extends _0x18ed42{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x5482cd=this['editor'],_0x4b1927=_0x5482cd['plugins']['get']('RevisionTracker');_0x5482cd['ui']['componentFactory']['add']('revisionHistory',_0x75b9f6=>{const _0x359e70=_0x38d1cc(_0x75b9f6),_0x212c2b=_0x359e70['panelView']['children'],_0x877125=new _0x249276(_0x75b9f6),_0x513c7f=new _0x14e979(_0x75b9f6),_0x7810cf=this['_createSaveRevisionButton'](_0x3296a8),_0x749d18=new _0x14e979(_0x75b9f6),_0x13c1b1=this['_createOpenRevisionButton'](_0x3296a8);return _0x359e70['bind']('isEnabled')['to'](_0x4b1927,'isReady',_0x4b1927,'isEnabled',_0x5482cd,'isReadOnly',(_0x389499,_0x4214f9,_0x214e95)=>_0x389499&&_0x4214f9&&!_0x214e95),_0x359e70['buttonView']['set']({'icon':_0x432461,'label':ft(_0x75b9f6,'Revision\x20history'),'tooltip':!0x0}),_0x7810cf['set']({'withText':!0x0,'role':'menuitem'}),_0x13c1b1['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x13c1b1,'execute',()=>{_0x359e70['isOpen']=!0x1,_0x5482cd['editing']['view']['focus']();},{'priority':'low'}),_0x513c7f['children']['add'](_0x7810cf),_0x749d18['children']['add'](_0x13c1b1),_0x877125['role']='menu',_0x877125['items']['addMany']([_0x513c7f,_0x749d18]),_0x212c2b['add'](_0x877125),_0x359e70;}),_0x5482cd['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x1b80b6=this['editor'],_0x5b88c0=_0x1b80b6['locale'],_0xce352b=_0x1b80b6['plugins']['get']('RevisionTracker'),_0x547270=new _0x3839a1(_0x5b88c0),_0x118c87=new _0x4a0a8e(_0x5b88c0);_0x547270['bind']('isEnabled')['to'](_0xce352b,'isReady',_0xce352b,'isEnabled',_0x1b80b6,'isReadOnly',(_0x189809,_0x493ad0,_0x25b3ea)=>_0x189809&&_0x493ad0&&!_0x25b3ea),_0x547270['buttonView']['set']({'icon':_0x432461,'label':ft(_0x5b88c0,'Revision\x20history')});const _0x591974=new tt(_0x5b88c0,_0x547270),_0x431e3a=this['_createSaveRevisionButton'](it);_0x431e3a['delegate']('execute')['to'](_0x547270),_0x591974['children']['add'](_0x431e3a),_0x118c87['items']['add'](_0x591974);const _0x545446=new tt(_0x5b88c0,_0x547270),_0x21e72b=this['_createOpenRevisionButton'](it);return _0x21e72b['delegate']('execute')['to'](_0x547270),_0x545446['children']['add'](_0x21e72b),_0x118c87['items']['add'](_0x545446),_0x547270['panelView']['children']['add'](_0x118c87),_0x547270;}['_createSaveRevisionButton'](_0x3d5ea1){const _0x409925=this['editor'],_0x3ce679=_0x409925['plugins']['get']('RevisionTracker'),_0x49e2a9=new _0x3d5ea1(_0x409925['locale']);return _0x49e2a9['set']({'label':ft(_0x409925['locale'],'Save\x20current\x20revision')}),_0x49e2a9['bind']('isEnabled')['to'](_0x3ce679,'isReady',_0x3ce679,'isEnabled',_0x409925,'isReadOnly',(_0x378405,_0x235490,_0x42ead4)=>_0x378405&&_0x235490&&!_0x42ead4),this['listenTo'](_0x49e2a9,'execute',()=>{this['_showDialog']();}),_0x49e2a9;}['_createOpenRevisionButton'](_0x190020){const _0x1c2de2=this['editor'],_0x235131=_0x1c2de2['plugins']['get']('RevisionTracker'),_0x1f4f6f=new _0x190020(_0x1c2de2['locale']);return _0x1f4f6f['set']({'label':ft(_0x1c2de2['locale'],'Open\x20revision\x20history')}),_0x1f4f6f['bind']('isEnabled')['to'](_0x235131,'isReady',_0x1c2de2,'isReadOnly',(_0x258c8f,_0x16ff2c)=>_0x258c8f&&!_0x16ff2c),this['listenTo'](_0x1f4f6f,'execute',()=>{_0x1c2de2['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x1f4f6f;}['_showDialog'](){const _0x3d96d9=this['editor'],_0xde33d9=_0x3d96d9['locale'],_0x56a2d=_0x3d96d9['plugins']['get']('Dialog'),_0x4e3d0c=_0x3d96d9['plugins']['get']('RevisionTracker');function _0xef615(_0x299c7c){_0x3d96d9['config']['get']('revisionHistory.requireRevisionName')&&''===_0x299c7c['revisionName']?_0x299c7c['revisionNameInputView']['errorText']=ft(_0xde33d9,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x3d96d9['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x299c7c['revisionName']}),_0x56a2d['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xef615(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x56a2d['show']({'id':'revisionSave','title':ft(_0xde33d9,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x3d96d9['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x56a2d['hide']()},{'label':ft(_0x3d96d9['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x15d173){_0x15d173['bind']('isEnabled')['to'](_0x4e3d0c,'isReady',_0x4e3d0c,'isEnabled',_0x3d96d9,'isReadOnly',(_0x34465a,_0x1ac6d2,_0x50f33e)=>_0x34465a&&_0x1ac6d2&&!_0x50f33e);},'onExecute':()=>_0xef615(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x401387=this['editor'],_0x19bcdf=_0x401387['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x19bcdf,_0x401387['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0x39c569{['changeId'];['_model'];constructor(_0x22ca55,_0x2969ff){super(_0x22ca55),this['_model']=_0x2969ff,this['changeId']=_0x2969ff['id'];const _0x325ed4=this['bindTemplate'],_0x1602f6=ft(_0x22ca55,_0x2969ff['data']['isSuggestion']?'Suggested\x20by':'add'==_0x2969ff['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x2969ff['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x325ed4['to']('type',_0x5370b6=>'ck-revision-change__'+_0x5370b6)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x1602f6}]},{'text':'\x20'+_0x2969ff['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x4cbe68(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x27517c){super(),this['id']=_0x27517c['id']||_0x55087c(),this['author']=_0x27517c['author'],this['type']=_0x27517c['type'],this['data']=_0x27517c['data']||{},this['rootName']=_0x27517c['rootName'],this['set']('createdAt',_0x27517c['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x485069,_0x18ebbf){this['newRevisionId']=_0x485069,this['oldRevisionId']=_0x18ebbf,this['changes']=new _0x12a0e4();}['_setChanges'](_0x48334f){for(const _0x2b3df1 of _0x48334f)this['changes']['add'](_0x2b3df1);}}class RevisionViewer extends _0x18ed42{['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[_0x4c4887,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x494fe6){super(_0x494fe6),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',(_0x3af280,_0x9a3c50,_0x5e6ced)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x5215b1=>{for(const _0x443183 of this['editor']['editing']['view']['document']['roots'])_0x5e6ced?_0x5215b1['removeClass']('ck-editor__editable__overlay',_0x443183):_0x5215b1['addClass']('ck-editor__editable__overlay',_0x443183);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2a2360=>null!==_0x2a2360),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3febfd,_0x2daccb,_0x382524)=>_0x3febfd&&_0x382524?_0x2daccb['changes']['getIndex'](_0x382524):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x364e72,_0x2b9c2d)=>_0x364e72?_0x2b9c2d['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x1657ed=this['editor'],_0x2936c7=new ShowChangeCommand(_0x1657ed,{'direction':'backward'}),_0x135f67=new ShowChangeCommand(_0x1657ed,{'direction':'forward'});(_0x1657ed['commands']['add']('showPreviousChange',_0x2936c7),_0x1657ed['commands']['add']('showNextChange',_0x135f67),_0x1657ed['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x1657ed)),this['on']('change:numberOfChanges',()=>{_0x2936c7['refresh'](),_0x135f67['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1657ed['enableReadOnlyMode']('revision-viewer'),_0x1657ed['plugins']['has']('WidgetToolbarRepository'))&&_0x1657ed['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x155073){return await this['_utils']['loadRevisionData'](_0x155073,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x155073);}async['getRevisionRootsAttributes'](_0x1ef00d){return await this['_utils']['loadRevisionData'](_0x1ef00d,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1ef00d);}async['compare'](_0x1540ae,_0x3627aa,_0x18e22b=!0x1){if(!this['isEnabled'])return;const _0x5e7bf8=this['diff'],_0x106a1a=this['repository'],_0xa5d484='string'==typeof _0x1540ae?_0x106a1a['getRevision'](_0x1540ae):_0x1540ae,_0x252dc0='string'==typeof _0x3627aa?_0x106a1a['getRevision'](_0x3627aa):_0x3627aa,_0xd75a43=_0xa5d484['id'],_0x1bb20d=_0x252dc0?_0x252dc0['id']:null;if(!_0x18e22b&&this['diff']&&this['diff']['newRevisionId']===_0xd75a43&&this['diff']['oldRevisionId']===_0x1bb20d)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0xd75a43,_0x1bb20d);const _0x1da27a=this['_getRevisionsRange'](_0xa5d484,_0x252dc0,!0x0)['map'](_0x87c518=>this['_utils']['loadRevisionData'](_0x87c518,this['adapter']));return _0x1da27a['push'](new Promise(_0x116068=>{setTimeout(_0x116068,0x14);})),Promise['all'](_0x1da27a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x39ec9d=this['_getDiff'](_0xd75a43,_0x1bb20d);for(const _0x232ed8 of _0x39ec9d['changes'])this['_changeIdToChange']['set'](_0x232ed8['id'],_0x232ed8);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5364f9=>{for(const _0x4ba985 of this['editor']['model']['document']['getRootNames']())_0x5364f9['detachRoot'](_0x4ba985);for(const _0x17da1a of Object['keys'](_0x39ec9d['model'])){const _0x1aa0f=_0x39ec9d['model'][_0x17da1a]['name'],_0x40ae6f=_0x5364f9['addRoot'](_0x17da1a,_0x1aa0f);for(const _0x563cae of Object['keys'](_0x39ec9d['attributes'][_0x17da1a]))_0x5364f9['setAttribute'](_0x563cae,_0x39ec9d['attributes'][_0x17da1a][_0x563cae],_0x40ae6f);_0x5364f9['insert'](_0x39ec9d['model'][_0x17da1a],_0x40ae6f,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x39ec9d['changes'])),this['isReady']=!0x0;})['catch'](_0x257782=>{console['error'](_0x257782),this['_cleanUp'](),_0x5e7bf8&&(this['diff']=_0x5e7bf8),this['isReady']=!0x0;});}['addRevisionData'](_0xa0c232,_0x96f41e){const _0x168c9a=this['repository']['createRevision'](_0xa0c232);return _0x168c9a['on']('_update',(_0x32cf49,_0x3a9a12,_0xa9dcbf)=>_0x96f41e(_0x3a9a12,_0xa9dcbf,_0x168c9a)),this['repository']['addRevision'](_0x168c9a),_0x168c9a;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1da53b=>{for(const _0x3286bb of this['editor']['model']['document']['getRootNames']())_0x1da53b['detachRoot'](_0x3286bb);});}['_sortAndFilterDiffChanges'](_0x1a7083){const _0x145f33=[],_0x40d99f=new Map();for(const _0xeb6333 of this['editor']['model']['document']['getRootNames']()){const _0x50d858=this['editor']['editing']['view']['getDomRoot'](_0xeb6333);if(!_0x50d858)continue;const _0x5905cf=_0x50d858['getClientRects']()['item'](0x0);_0x5905cf&&(_0x145f33['push'](_0xeb6333),_0x40d99f['set'](_0xeb6333,_0x5905cf));}return _0x145f33['sort']((_0x5b6681,_0x83971)=>{const _0x2145e8=_0x40d99f['get'](_0x5b6681),_0x473752=_0x40d99f['get'](_0x83971);return _0x2145e8['y']-_0x473752['y']||_0x2145e8['x']-_0x473752['x'];}),(_0x1a7083=_0x1a7083['filter'](_0x11b208=>_0x145f33['includes'](_0x11b208['rootName'])))['sort']((_0x537813,_0x43d062)=>_0x145f33['indexOf'](_0x537813['rootName'])-_0x145f33['indexOf'](_0x43d062['rootName'])),_0x1a7083;}['_makeTape'](_0x2baae6){const _0x4083d5=Array['from'](_0x2baae6['markers'])['filter'](([_0x4a030f,_0xd05172])=>_0x4a030f['startsWith']('revision:')&&!_0xd05172['isCollapsed']),_0x2119a8=Array['from'](this['editor']['model']['createRangeIn'](_0x2baae6)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x4083d5['length'])for(const _0x55e963 of _0x2119a8){const [_0x1a5621,_0x31d26b]=_0x4083d5[0x0],[,_0x399490,_0x2c8c20]=_0x1a5621['split'](':');if(_0x31d26b['end']['isEqual'](_0x55e963['nextPosition'])&&_0x4083d5['shift'](),(_0x55e963['previousPosition']['isEqual'](_0x31d26b['start'])||_0x55e963['previousPosition']['isAfter'](_0x31d26b['start']))&&('insertion'==_0x399490?_0x55e963['isAdded']={'userId':_0x2c8c20}:'deletion'==_0x399490&&(_0x55e963['isRemoved']={'userId':_0x2c8c20})),0x0==_0x4083d5['length'])break;}return _0x2119a8;}['_refreshStartEndIndex'](_0x44facd){const _0xf342e6=new Map();for(let _0x5f0cd3=0x0;_0x5f0cd3<_0x44facd['length'];_0x5f0cd3++)'text'===_0x44facd[_0x5f0cd3]['type']?(_0x44facd[_0x5f0cd3]['item']['startIndex']=_0x5f0cd3,_0x44facd[_0x5f0cd3]['item']['endIndex']=_0x5f0cd3):('elementStart'===_0x44facd[_0x5f0cd3]['type']?_0x44facd[_0x5f0cd3]['item']['startIndex']=_0x5f0cd3:'elementEnd'===_0x44facd[_0x5f0cd3]['type']&&(_0x44facd[_0x5f0cd3]['item']['endIndex']=_0x5f0cd3),_0xf342e6['set'](_0x44facd[_0x5f0cd3]['id'],_0x5f0cd3));for(const _0x41513d of _0xf342e6['values']())'elementStart'===_0x44facd[_0x41513d]['type']?_0x44facd[_0x41513d]['item']['endIndex']=_0xf342e6['get'](_0x44facd[_0x41513d]['pairId']):'elementEnd'===_0x44facd[_0x41513d]['type']&&(_0x44facd[_0x41513d]['item']['startIndex']=_0xf342e6['get'](_0x44facd[_0x41513d]['pairId']));}['_processTape'](_0x774158){for(let _0x1a2458=0x0;_0x1a2458<_0x774158['length'];_0x1a2458++){if('elementStart'===_0x774158[_0x1a2458]['type'])_0x774158[_0x1a2458]['item']['startIndex']=_0x1a2458;else{if('elementEnd'===_0x774158[_0x1a2458]['type']){_0x774158[_0x1a2458]['item']['endIndex']=_0x1a2458;const _0x308e72=_0x774158[_0x1a2458]['item']['startIndex'];_0x774158[_0x308e72]['pairId']=_0x774158[_0x1a2458]['id'],_0x774158[_0x1a2458]['pairId']=_0x774158[_0x308e72]['id'];}else _0x774158[_0x1a2458]['item']['startIndex']=_0x1a2458,_0x774158[_0x1a2458]['item']['endIndex']=_0x1a2458,_0x774158[_0x1a2458]['pairId']=null;}_0x774158[_0x1a2458]['markersStart']||(_0x774158[_0x1a2458]['markersStart']=[],_0x774158[_0x1a2458]['markersEnd']=[]);}}['_markInsertions'](_0x58db94,_0x2af9a1){const _0x2b95c4=_0x58db94['filter'](_0x2b3f3c=>!_0x2b3f3c['isAdded']);for(let _0x5160d9=0x0;_0x5160d9<_0x2af9a1['length'];_0x5160d9++)_0x2af9a1[_0x5160d9]['isAdded']&&(_0x2b95c4[_0x5160d9]['isAdded']=_0x2af9a1[_0x5160d9]['isAdded']);}['_getDiff'](_0x4f50dc,_0x318459=null){const _0x900e4f=this['repository']['getRevision'](_0x4f50dc),_0x341385=_0x318459?this['repository']['getRevision'](_0x318459):null,_0x1fcf16=this['_getRevisionsRange'](_0x900e4f,_0x341385),_0x132144=_0x1fcf16[_0x1fcf16['length']-0x1],_0xe017b9=new Map(),_0x3f8873={'model':{},'attributes':{},'changes':[]},_0x4c122b=new Set(),_0x483f79=new Map();for(let _0x64ee4=_0x1fcf16['length']-0x1;_0x64ee4>=0x0;_0x64ee4--){const _0x3118b4=_0x1fcf16[_0x64ee4];for(const _0xe702ec of Object['keys'](_0x3118b4['diffData']))if(_0x3118b4['diffData'][_0xe702ec]['attachChange']){const _0x21ece3=_0x3118b4['diffData'][_0xe702ec]['attachChange'];_0x21ece3['isAttached']?(_0x4c122b['add'](_0xe702ec),_0x483f79['has'](_0xe702ec)&&_0x483f79['get'](_0xe702ec)['userId']==_0x21ece3['userId']?_0x483f79['delete'](_0xe702ec):_0x483f79['set'](_0xe702ec,_0x21ece3)):_0x483f79['has'](_0xe702ec)?(_0x4c122b['delete'](_0xe702ec),_0x483f79['delete'](_0xe702ec)):(_0x4c122b['add'](_0xe702ec),_0x483f79['set'](_0xe702ec,_0x21ece3));}else _0x4c122b['add'](_0xe702ec);}for(const _0xb78017 of _0x4c122b){const _0x3e067d=_0x483f79['has'](_0xb78017)&&!_0x483f79['get'](_0xb78017)['isAttached'];let _0x14d78a=_0x3e067d?_0x1fcf16['length']-0x1:0x0;const _0x54b575=_0x3e067d?-0x1:0x1;for(;_0x1fcf16[_0x14d78a];){const _0x31a01e=_0x1fcf16[_0x14d78a];if(_0x31a01e['diffData'][_0xb78017]){const _0xf72002=_0x3e067d?_0x31a01e['diffData'][_0xb78017]['attributesBefore']:_0x31a01e['diffData'][_0xb78017]['attributesAfter'];_0x3f8873['attributes'][_0xb78017]=_0xf72002?_0x527a66(_0xf72002):{};break;}_0x14d78a+=_0x54b575;}}for(const _0xb173d of _0x1fcf16){_0xb173d['model']={};for(const _0x3d878c of _0xb173d['authors'])_0xe017b9['set'](_0x3d878c['id'],_0x3d878c);for(const _0x33ec15 of _0x4c122b){const _0x4bbd86=_0xb173d['diffData'][_0x33ec15]?_0xb173d['diffData'][_0x33ec15]['insertions']:'[]',_0x2199c9=_0xb173d['diffData'][_0x33ec15]?_0xb173d['diffData'][_0x33ec15]['deletions']:'[]',_0x599d92=_0xb173d['diffData'][_0x33ec15]?.['rootElementName']||'$root';_0xb173d['model'][_0x33ec15]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4bbd86,_0x599d92),'deletions':this['_utils']['_makeModelFromViewString'](_0x2199c9,_0x599d92)};}}for(const _0x365a3d of _0x4c122b){let _0x4c41b3=null,_0x52df91=0x0;const _0x4d6ec5=_0x1fcf16['map'](_0x4dbd55=>_0x4dbd55['diffData'][_0x365a3d]?.['rootElementName'])['find'](_0x252e6e=>void 0x0!==_0x252e6e)||'$root',_0x22a3c1=new Map(Array['from'](_0x900e4f['model'][_0x365a3d]['insertions']['markers'])['filter'](([_0xaac474])=>!_0xaac474['startsWith']('revision:')));let _0x419500=0x0;for(const _0x21470f of _0x1fcf16){const _0x4a261d=this['_makeTape'](_0x21470f['model'][_0x365a3d]['insertions']);_0x21470f==_0x900e4f?(_0x4c41b3=_0x4a261d,_0x52df91=_0x4c41b3['length'],_0x4c41b3['forEach'](_0x4d92c0=>{_0x4d92c0['id']=_0x419500++;}),this['_processTape'](_0x4c41b3)):this['_markInsertions'](_0x4c41b3,_0x4a261d);const _0x11d726=_0x4c41b3['filter'](_0x51806a=>!_0x51806a['isAdded'])['map'](_0x315351=>_0x315351['id']);let _0x4412ac=0x0;const _0x53ea00=this['_makeTape'](_0x21470f['model'][_0x365a3d]['deletions']);_0x53ea00['forEach'](_0x281801=>{_0x281801['isRemoved']?_0x281801['id']=_0x52df91++:_0x281801['id']=_0x11d726[_0x4412ac++];}),this['_processTape'](_0x53ea00),this['_setDistance'](_0x4c41b3,'isAdded'),this['_setDistance'](_0x53ea00,'isRemoved'),_0x21470f==_0x900e4f&&this['_markMarkers'](_0x4c41b3,_0x22a3c1),_0x4c41b3=this['_joinTapes'](_0x4c41b3,_0x53ea00),this['_refreshStartEndIndex'](_0x4c41b3),this['_setDistance'](_0x4c41b3,'isRemoved');}_0x4c41b3=_0x4c41b3['filter'](_0x2527b8=>!(_0x2527b8['isAdded']&&_0x2527b8['isRemoved']));const _0x63a536=new Map(_0x132144['model'][_0x365a3d]['deletions']['markers']),_0x47308f=new Set(_0x22a3c1['keys']());for(const _0x1e0fb6 of _0x63a536['keys']())_0x47308f['delete'](_0x1e0fb6);this['_markSuggestions'](_0x4c41b3,_0x47308f),this['_fixObsoleteTags'](_0x4c41b3),_0x4c41b3=this['_removeMissingPairs'](_0x4c41b3),_0x4c41b3=this['_markMismatchedRemovedTags'](_0x4c41b3),_0x4c41b3=this['_removeUnsupportedChanges'](_0x4c41b3);const {root:_0x5bb5d4,changes:_0x231308}=this['_makeModelFromTape'](_0x4c41b3,_0xe017b9,_0x365a3d,_0x4d6ec5);_0x3f8873['model'][_0x365a3d]=_0x5bb5d4;const _0xcac542=_0x483f79['get'](_0x365a3d);if(_0xcac542){const _0x74e8a6=_0xe017b9['get'](_0xcac542['userId']),_0x153469=new ChangeItem({'author':_0x74e8a6,'type':_0xcac542['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x365a3d});_0x231308['unshift'](_0x153469),_0x3f8873['attributes'][_0x365a3d]['revisionHistoryAttachChange']=_0x153469['id'];}_0x3f8873['changes']=_0x3f8873['changes']['concat'](_0x231308);}return _0x3f8873;}['_markMarkers'](_0x2479ed,_0x12ee00){for(let _0x579a7e=0x0;_0x579a7e<_0x2479ed['length'];_0x579a7e++)for(const [_0x54b306,_0x123917]of _0x12ee00)!_0x123917['isCollapsed']&&_0x123917['start']['isEqual'](_0x2479ed[_0x579a7e]['previousPosition'])&&_0x2479ed[_0x579a7e]['markersStart']['push'](_0x54b306),_0x123917['end']['isEqual'](_0x2479ed[_0x579a7e]['nextPosition'])&&_0x2479ed[_0x579a7e]['markersEnd']['push'](_0x54b306);}['_joinTapes'](_0x5c26d7,_0x3b4ff9){let _0x1f8959=[],_0x4d0f9f=0x0,_0x7b261a=0x0;for(;_0x4d0f9f<_0x5c26d7['length']||_0x7b261a<_0x3b4ff9['length'];){const _0x39efc1=_0x5c26d7[_0x4d0f9f]||{},_0x28ca59=_0x3b4ff9[_0x7b261a]||{};if(_0x39efc1['id']==_0x28ca59['id'])_0x4d0f9f++,_0x7b261a++,_0x1f8959['push'](_0x39efc1);else{if(_0x28ca59['isRemoved']&&_0x39efc1['isAdded']){const {commonTape:_0x13bbf5,iEnd:_0x45ca9c,jEnd:_0x1357c4}=this['_threeWayMerge'](_0x5c26d7,_0x4d0f9f,_0x3b4ff9,_0x7b261a);_0x1f8959=_0x1f8959['concat'](_0x13bbf5),_0x4d0f9f=_0x45ca9c,_0x7b261a=_0x1357c4;}else _0x28ca59['isRemoved']?(_0x7b261a++,_0x1f8959['push'](_0x28ca59)):(_0x4d0f9f++,_0x1f8959['push'](_0x39efc1));}}return _0x1f8959;}['_markSuggestions'](_0x1b5a15,_0x584bf1){const _0x4bc3a2=[];for(let _0x3740f7=0x0;_0x3740f7<_0x1b5a15['length'];_0x3740f7++){for(let _0x10588c=0x0;_0x10588c<_0x1b5a15[_0x3740f7]['markersStart']['length'];_0x10588c++){const _0x22c367=_0x1b5a15[_0x3740f7]['markersStart'][_0x10588c];if(!_0x584bf1['has'](_0x22c367))continue;const {group:_0x4e55fe,type:_0x3ebcce,authorId:_0x4db3a2}=_0x20c608(_0x22c367);'revision-suggestion'!=_0x4e55fe||'insertion'!=_0x3ebcce&&'deletion'!=_0x3ebcce||(_0x4bc3a2['unshift']({'type':_0x3ebcce,'name':_0x22c367,'userId':_0x4db3a2}),_0x1b5a15[_0x3740f7]['markersStart']['splice'](_0x10588c,0x1),_0x10588c--);}_0x1a717b(_0x1b5a15[_0x3740f7]);for(let _0x3fe000=0x0;_0x3fe000<_0x1b5a15[_0x3740f7]['markersEnd']['length'];_0x3fe000++){const _0x577538=_0x1b5a15[_0x3740f7]['markersEnd'][_0x3fe000];if(!_0x584bf1['has'](_0x577538))continue;const {group:_0x493a34,type:_0x503c07}=_0x20c608(_0x577538);if('revision-suggestion'!=_0x493a34||'insertion'!=_0x503c07&&'deletion'!=_0x503c07)continue;_0x1b5a15[_0x3740f7]['markersEnd']['splice'](_0x3fe000,0x1),_0x3fe000--;const _0x54bd8a=_0x4bc3a2['findIndex'](_0x4afdfb=>_0x4afdfb['name']==_0x577538);_0x54bd8a>-0x1&&_0x4bc3a2['splice'](_0x54bd8a,0x1);}}function _0x20c608(_0x364175){const _0x5865e9=_0x364175['split'](':');return{'group':_0x5865e9[0x0],'type':_0x5865e9[0x1],'subType':_0x5865e9['length']>=0x5?_0x5865e9[0x2]:null,'id':_0x5865e9['length']<0x5?_0x5865e9[0x2]:_0x5865e9[0x3],'authorId':_0x5865e9['length']<0x5?_0x5865e9[0x3]:_0x5865e9[0x4],'markerCount':0x6==_0x5865e9['length']?_0x5865e9[0x5]:null};}function _0x1a717b(_0xb3bd3d){for(let _0x1702f1=0x0;_0x1702f1<_0x4bc3a2['length'];_0x1702f1++){if(_0xb3bd3d['isAdded']&&'insertion'==_0x4bc3a2[_0x1702f1]['type']&&_0xb3bd3d['isAdded']['userId']==_0x4bc3a2[_0x1702f1]['userId'])return _0xb3bd3d['isAddSuggestion']=_0x4bc3a2[_0x1702f1],void delete _0xb3bd3d['isAdded'];if(!_0xb3bd3d['isAdded']&&!_0xb3bd3d['isRemoved']&&'deletion'==_0x4bc3a2[_0x1702f1]['type'])return void(_0xb3bd3d['isRemoveSuggestion']=_0x4bc3a2[_0x1702f1]);}}}['_setDistance'](_0x13144c,_0x52eeb3){let _0x329984=0x0,_0x220d63=!0x1;const _0x7c9bc3=new Map();for(const _0x5099ed of _0x13144c)_0x5099ed[_0x52eeb3]?_0x220d63&&(_0x329984++,_0x220d63=!0x1):(_0x329984++,_0x220d63=!0x0),_0x7c9bc3['set'](_0x5099ed['id'],_0x329984);for(let _0x594227=0x0;_0x594227<_0x13144c['length'];_0x594227++){if('isRemoved'==_0x52eeb3&&_0x13144c[_0x594227]['isAdded']||'isAdded'==_0x52eeb3&&_0x13144c[_0x594227]['isRemoved'])continue;if('text'==_0x13144c[_0x594227]['type']){_0x13144c[_0x594227]['distance']=0x0;continue;}const _0x4146f5=_0x7c9bc3['get'](_0x13144c[_0x594227]['pairId']),_0x197f33=_0x7c9bc3['get'](_0x13144c[_0x594227]['id']);_0x13144c[_0x594227]['distance']=_0x4146f5-_0x197f33;}}['_getRevisionsRange'](_0x3c9808,_0x3daf23,_0x2fef34=!0x1){const _0x1bbf4a=[];let _0x2662be=this['repository']['getIndex'](_0x3c9808),_0x533ce0=this['repository']['getIndex'](_0x3daf23);for(-0x1==_0x533ce0&&(_0x533ce0=this['repository']['_revisions']['length'],_0x2fef34=!0x1);_0x2662be<_0x533ce0;)_0x1bbf4a['push'](this['repository']['getRevision'](_0x2662be)),_0x2662be++;return _0x2fef34&&_0x1bbf4a['push'](this['repository']['getRevision'](_0x2662be)),_0x1bbf4a;}['_threeWayMerge'](_0x57cedd,_0x19fc15,_0x1fcfaa,_0xdd63e9){const _0x438a21=this['editor']['model']['schema'];let _0x28021a=_0x19fc15;for(;_0x57cedd[_0x28021a]&&_0x57cedd[_0x28021a]['isAdded'];)_0x28021a++;let _0x123b78=_0xdd63e9;for(;_0x1fcfaa[_0x123b78]&&_0x1fcfaa[_0x123b78]['isRemoved'];)_0x123b78++;_0x2b1282(_0x57cedd,_0x19fc15,_0x28021a),_0x2b1282(_0x1fcfaa,_0xdd63e9,_0x123b78);const _0x5c2ddd=_0x1fcfaa['slice'](_0xdd63e9,_0x123b78)['concat'](_0x57cedd['slice'](_0x19fc15,_0x28021a));return _0x5c2ddd['sort']((_0x4d2dd5,_0x24e3ae)=>_0x4d2dd5['side']!=_0x24e3ae['side']?_0x4d2dd5['side']-_0x24e3ae['side']:_0x4d2dd5['level']!=_0x24e3ae['level']?_0x4d2dd5['level']-_0x24e3ae['level']:_0x4d2dd5['distance']!=_0x24e3ae['distance']?_0x24e3ae['distance']-_0x4d2dd5['distance']:!!_0x4d2dd5['isAdded']!=!!_0x24e3ae['isAdded']?-0x1==_0x4d2dd5['side']||0x0==_0x4d2dd5['side']?_0x4d2dd5['isAdded']?-0x1:0x1:_0x4d2dd5['isAdded']?0x1:-0x1:_0x4d2dd5['index']-_0x24e3ae['index']),{'commonTape':_0x5c2ddd,'iEnd':_0x28021a,'jEnd':_0x123b78};function _0x2b1282(_0x658418,_0x1d71ce,_0x3dfc91){let _0x360aaa=-0x1,_0x3d7938=Number['POSITIVE_INFINITY'],_0x3ef597=!0x0;for(let _0x3591b5=_0x1d71ce;_0x3591b5<_0x3dfc91;_0x3591b5++)if(_0x438a21['isInline'](_0x658418[_0x3591b5]['item'])||(_0x3ef597=!0x1),_0x658418[_0x3591b5]['item']['startIndex']<_0x1d71ce&&(_0x360aaa=_0x3591b5),_0x658418[_0x3591b5]['item']['endIndex']>=_0x3dfc91){_0x3d7938=_0x3591b5;break;}_0x3ef597&&(_0x360aaa=_0x3dfc91-0x1);for(let _0x1929c3=_0x1d71ce;_0x1929c3<_0x3dfc91;_0x1929c3++)_0x658418[_0x1929c3]['side']=_0x1929c3<=_0x360aaa?-0x1:_0x1929c3<_0x3d7938?0x0:0x1,_0x658418[_0x1929c3]['index']=_0x1929c3;let _0x37463a=0x0;for(let _0x1a3d49=_0x1d71ce;_0x1a3d49<=_0x360aaa;_0x1a3d49++)0x0==_0x658418[_0x1a3d49]['distance']?_0x658418[_0x1a3d49]['level']=_0x37463a:(_0x37463a++,_0x658418[_0x1a3d49]['level']=_0x37463a,_0x37463a++);for(let _0x40d79b=_0x1d71ce;_0x40d79b<_0x3dfc91;_0x40d79b++)0x0==_0x658418[_0x40d79b]['side']&&(_0x658418[_0x40d79b]['level']=_0x37463a);_0x37463a=0x0;for(let _0x37b204=_0x3dfc91-0x1;_0x37b204>=_0x3d7938;_0x37b204--)0x0==_0x658418[_0x37b204]['distance']?_0x658418[_0x37b204]['level']=_0x37463a:(_0x37463a--,_0x658418[_0x37b204]['level']=_0x37463a,_0x37463a--);}}['_fixObsoleteTags'](_0x4c0d5f){const _0x29af8e=new Map(),_0x2a2921=this['editor']['model']['schema'];for(let _0x5eb623=0x1;_0x5eb623<_0x4c0d5f['length'];_0x5eb623++){let _0x11b39f,_0x3e1334,_0x2de003;const _0x370038=_0x4c0d5f[_0x5eb623],_0x32865f=_0x4c0d5f[_0x5eb623-0x1];if('text'==_0x370038['type'])continue;if(_0x370038['type']!=_0x32865f['type'])continue;if(!_0x2a2921['isBlock'](_0x32865f['item'])||_0x2a2921['isLimit'](_0x32865f['item']))continue;if(!_0x2a2921['isBlock'](_0x370038['item'])||_0x2a2921['isLimit'](_0x370038['item']))continue;if((_0x4c0d5f[_0x5eb623]['isAdded']||_0x4c0d5f[_0x5eb623]['isAddSuggestion'])&&_0x4c0d5f[_0x5eb623-0x1]['isRemoved'])_0x11b39f=_0x4c0d5f[_0x5eb623],_0x3e1334=_0x4c0d5f[_0x5eb623-0x1],_0x2de003=_0x5eb623-0x1;else{if(!_0x4c0d5f[_0x5eb623]['isRemoved']||!_0x4c0d5f[_0x5eb623-0x1]['isAdded']&&!_0x4c0d5f[_0x5eb623-0x1]['isAddSuggestion'])continue;_0x11b39f=_0x4c0d5f[_0x5eb623-0x1],_0x3e1334=_0x4c0d5f[_0x5eb623],_0x2de003=_0x5eb623;}const _0x4d3298=_0x11b39f['level']==_0x3e1334['level'],_0x249368=Math['abs'](_0x11b39f['level'])<Math['abs'](_0x3e1334['level'])&&0x0==_0x3e1334['distance'];(_0x4d3298||_0x249368)&&(_0x29af8e['set'](_0x3e1334['id'],_0x11b39f['id']),_0x4c0d5f['splice'](_0x2de003,0x1),_0x5eb623--,_0x11b39f['isAdded']=!0x1);}for(let _0x2da6f0=0x0;_0x2da6f0<_0x4c0d5f['length'];_0x2da6f0++)_0x29af8e['has'](_0x4c0d5f[_0x2da6f0]['pairId'])&&(_0x4c0d5f[_0x2da6f0]['pairId']=_0x29af8e['get'](_0x4c0d5f[_0x2da6f0]['pairId']));}['_removeMissingPairs'](_0x32493b){const _0x63ebd0=new Set(_0x32493b['map'](_0x3b6601=>_0x3b6601['id']));for(let _0x15523e=0x0;_0x15523e<_0x32493b['length'];_0x15523e++)_0x63ebd0['has'](_0x32493b[_0x15523e]['pairId'])||0x0==_0x32493b[_0x15523e]['distance']||(_0x32493b[_0x15523e]['isIncorrect']=!0x0);return _0x32493b['filter'](_0x49f429=>!_0x49f429['isIncorrect']);}['_markMismatchedRemovedTags'](_0x54b50e){const _0x263e55=new Set();for(let _0x51532a=0x0;_0x51532a<_0x54b50e['length'];_0x51532a++){if(_0x263e55['has'](_0x54b50e[_0x51532a]['id'])&&_0x54b50e[_0x51532a]['isRemoved']&&(_0x54b50e[_0x51532a]['isIncorrect']=!0x0),_0x54b50e[_0x51532a]['isIncorrect'])continue;if(0x0==_0x54b50e[_0x51532a]['distance'])continue;if('elementStart'!=_0x54b50e[_0x51532a]['type'])continue;if(null==_0x54b50e[_0x51532a]['pairId'])continue;let _0x89fe9b=_0x51532a+0x1,_0x5dab21=0x0;for(;_0x54b50e[_0x89fe9b]['id']!=_0x54b50e[_0x51532a]['pairId'];)'elementStart'==_0x54b50e[_0x89fe9b]['type']?_0x5dab21++:'elementEnd'==_0x54b50e[_0x89fe9b]['type']&&_0x5dab21--,_0x89fe9b++;if(0x0!=_0x5dab21){if(_0x54b50e[_0x51532a]['isRemoved'])_0x54b50e[_0x51532a]['isIncorrect']=!0x0;else{for(;_0x89fe9b!=_0x51532a;)_0x54b50e[_0x89fe9b]['isRemoved']&&0x0!=_0x54b50e[_0x89fe9b]['distance']&&(_0x54b50e[_0x89fe9b]['isIncorrect']=!0x0,_0x263e55['add'](_0x54b50e[_0x89fe9b]['pairId'])),_0x89fe9b--;}}}return _0x54b50e['filter'](_0x1acaac=>!_0x1acaac['isIncorrect']);}['_removeUnsupportedChanges'](_0x1054c4){const _0x56e100=this['editor']['model']['schema'];for(let _0x4fdd1b=0x0;_0x4fdd1b<_0x1054c4['length'];_0x4fdd1b++){if(!(_0x1054c4[_0x4fdd1b]['isAdded']||_0x1054c4[_0x4fdd1b]['isAddSuggestion']||_0x1054c4[_0x4fdd1b]['isRemoved']||_0x1054c4[_0x4fdd1b]['isRemoveSuggestion']))continue;if(0x0==_0x1054c4[_0x4fdd1b]['distance'])continue;const _0x2e23b4=_0x1054c4[_0x4fdd1b]['item'];_0x56e100['isBlock'](_0x2e23b4)||_0x56e100['isLimit'](_0x2e23b4)||(_0x1054c4[_0x4fdd1b]['isAdded']&&delete _0x1054c4[_0x4fdd1b]['isAdded'],_0x1054c4[_0x4fdd1b]['isAddSuggestion']&&delete _0x1054c4[_0x4fdd1b]['isAddSuggestion'],_0x1054c4[_0x4fdd1b]['isRemoveSuggestion']&&delete _0x1054c4[_0x4fdd1b]['isRemoveSuggestion'],_0x1054c4[_0x4fdd1b]['isRemoved']&&(_0x1054c4[_0x4fdd1b]['isIncorrect']=!0x0));}return _0x1054c4['filter'](_0x26a9cf=>!_0x26a9cf['isIncorrect']);}['_makeModelFromTape'](_0x5cf989,_0x10dbc6,_0xb82977,_0x7bf851){const _0x3a642f=new _0x34f38e(),_0x22dbc1=[],_0x55db90=new Map(),_0x2fe856=this['editor']['model'],_0x5bc52a=_0x2fe856['schema'],_0x35e7ee=[_0x3a642f],_0x42c861={},_0x51f6ca={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x3a642f['name']=_0x7bf851;let _0x41afa0=null;const _0x18202b=[0x0];for(let _0x613e8e=0x0;_0x613e8e<_0x5cf989['length'];_0x613e8e++)if('elementStart'===_0x5cf989[_0x613e8e]['type']){_0x5cf989[_0x613e8e]['previousPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b);const _0x3f68b7=new _0x45e0a6(_0x5cf989[_0x613e8e]['item']['name'],_0x5cf989[_0x613e8e]['item']['getAttributes']());_0x35e7ee[0x0]['_appendChild'](_0x3f68b7),_0x18202b['push'](0x0),_0x35e7ee['unshift'](_0x3f68b7),_0x5cf989[_0x613e8e]['nextPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b);}else'elementEnd'===_0x5cf989[_0x613e8e]['type']?(_0x35e7ee['shift'](),_0x5cf989[_0x613e8e]['previousPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b),_0x18202b['pop'](),_0x18202b[_0x18202b['length']-0x1]++,_0x5cf989[_0x613e8e]['nextPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b)):(_0x5cf989[_0x613e8e]['previousPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b),_0x41afa0?_0x41afa0['_data']+=_0x5cf989[_0x613e8e]['item']['data']:_0x41afa0=new _0x541a0c(_0x5cf989[_0x613e8e]['item']['data'],_0x5cf989[_0x613e8e]['item']['getAttributes']()),_0x5cf989[_0x613e8e+0x1]&&'text'===_0x5cf989[_0x613e8e+0x1]['type']&&_0xa4322f(_0x41afa0,_0x5cf989[_0x613e8e+0x1]['item'])||(_0x35e7ee[0x0]['_appendChild'](_0x41afa0),_0x41afa0=null),_0x18202b[_0x18202b['length']-0x1]+=_0x5cf989[_0x613e8e]['item']['offsetSize'],_0x5cf989[_0x613e8e]['nextPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b));for(let _0x1d83a7=0x0;_0x1d83a7<_0x5cf989['length'];_0x1d83a7++){const _0x5b1720=_0x5cf989[_0x1d83a7]['previousPosition'],_0x14e620=_0x5cf989[_0x1d83a7]['nextPosition'];for(const _0x3a91a5 of _0x5cf989[_0x1d83a7]['markersStart'])_0x55db90['set'](_0x3a91a5,{'start':_0x5b1720,'end':null});_0x428baf('isRemoveSuggestion',_0x1d83a7,_0x5b1720,_0x14e620),_0x428baf('isAddSuggestion',_0x1d83a7,_0x5b1720,_0x14e620),_0x428baf('isRemoved',_0x1d83a7,_0x5b1720,_0x14e620),_0x428baf('isAdded',_0x1d83a7,_0x5b1720,_0x14e620);for(const _0x5ae9bd of _0x5cf989[_0x1d83a7]['markersEnd']){const _0x1518d6=_0x55db90['get'](_0x5ae9bd);_0x1518d6?_0x1518d6['end']=_0x14e620:_0x55db90['set'](_0x5ae9bd,{'start':_0x14e620,'end':_0x14e620});}}for(const [_0x1e06e0,_0x3007a2]of _0x55db90){const _0x368f59=this['editor']['model']['createRange'](_0x3007a2['start'],_0x3007a2['end']);_0x3a642f['markers']['set'](_0x1e06e0,_0x368f59);}return _0x22dbc1['sort']((_0x22fc17,_0x11fbdf)=>{const _0x5c0529=_0x3a642f['markers']['get']('revision:'+_0x22fc17['id']),_0x56ca2d=_0x3a642f['markers']['get']('revision:'+_0x11fbdf['id']);return _0x5c0529['start']['isBefore'](_0x56ca2d['start'])?-0x1:_0x5c0529['start']['isAfter'](_0x56ca2d['start'])?0x1:_0x5c0529['end']['isBefore'](_0x56ca2d['end'])?-0x1:_0x5c0529['end']['isAfter'](_0x56ca2d['end'])?0x1:'add'===_0x22fc17['type']?-0x1:0x1;}),{'root':_0x3a642f,'changes':_0x22dbc1};function _0x428baf(_0x394085,_0x289711,_0x89fd71,_0x15f296){const _0x1e9d2b=!!_0x5cf989[_0x289711][_0x394085],_0x305eb0=_0x1e9d2b?_0x5cf989[_0x289711][_0x394085]['userId']:null,_0x9e678a=_0x289711===_0x5cf989['length']-0x1,_0x771ef3=_0x51f6ca[_0x394085][0x0],_0x563f2a=_0x5bc52a['isObject'](_0x5cf989[_0x289711]['item']);!_0x42c861[_0x394085]&&_0x1e9d2b?_0x42c861[_0x394085]={'start':_0x89fd71,'tapeItem':_0x5cf989[_0x289711],'userId':_0x305eb0,'type':_0x394085}:_0x42c861[_0x394085]&&!_0x1e9d2b?(_0x42c861[_0x394085]['end']=_0x89fd71,_0x11004e(_0x42c861[_0x394085]),_0x42c861[_0x394085]=null):_0x42c861[_0x394085]&&_0x1e9d2b&&_0x42c861[_0x394085]['userId']!==_0x305eb0&&(_0x42c861[_0x394085]['end']=_0x89fd71,_0x771ef3&&_0x771ef3['userId']===_0x42c861[_0x394085]['userId']||_0x11004e(_0x42c861[_0x394085]),_0x42c861[_0x394085]={'start':_0x89fd71,'tapeItem':_0x5cf989[_0x289711],'userId':_0x305eb0,'type':_0x394085}),_0x42c861[_0x394085]&&_0x563f2a&&('elementStart'!==_0x5cf989[_0x289711]['type']||_0x771ef3&&_0x771ef3['userId']===_0x305eb0||_0x51f6ca[_0x394085]['unshift']({'userId':_0x305eb0,'object':_0x5cf989[_0x289711]['item'],'change':_0x42c861[_0x394085]}),'elementEnd'===_0x5cf989[_0x289711]['type']&&_0x771ef3&&_0x771ef3['object']===_0x5cf989[_0x289711]['item']&&(_0x51f6ca[_0x394085]['shift'](),_0x42c861[_0x394085]=_0x771ef3['change'])),_0x42c861[_0x394085]&&_0x9e678a&&(_0x42c861[_0x394085]['end']=_0x15f296,_0x11004e(_0x42c861[_0x394085]),_0x42c861[_0x394085]=null);}function _0x11004e({start:_0x291db8,end:_0x3d1855,tapeItem:_0x4738bf,userId:_0xbd3e81,type:_0x2462f4}){const _0x22a9e6=_0x4738bf['item'],_0x152e0a=_0x2fe856['schema']['isBlock'](_0x22a9e6)&&!_0x2fe856['schema']['isLimit'](_0x22a9e6),_0x5eaff3=_0x291db8['nodeAfter']==_0x3d1855['parent']&&_0x3d1855['isAtStart'];if(_0x152e0a&&_0x5eaff3)return;const _0x4665cc=_0x2fe856['createRange'](_0x291db8,_0x3d1855),_0x3eafdf=_0x10dbc6['get'](_0xbd3e81),_0x21eb71=new ChangeItem({'author':_0x3eafdf,'type':'isAdded'==_0x2462f4||'isAddSuggestion'==_0x2462f4?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2462f4||'isRemoveSuggestion'==_0x2462f4},'createdAt':new Date(),'rootName':_0xb82977});_0x22dbc1['push'](_0x21eb71),_0x3a642f['markers']['set']('revision:'+_0x21eb71['id'],_0x4665cc);}function _0xa4322f(_0x34ae19,_0x5c8fbc){const _0x49cab5=_0x34ae19['getAttributes'](),_0x5bf926=_0x5c8fbc['getAttributes']();for(const _0x4ea65b of _0x49cab5){if(_0x4ea65b[0x1]!==_0x5c8fbc['getAttribute'](_0x4ea65b[0x0]))return!0x1;_0x5bf926['next']();}return _0x5bf926['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1df0c2=>{const _0x2da276=_0x1df0c2['markerName']['split'](':')[0x1],_0x500234=this['_getChangeFromId'](_0x2da276);if(!_0x500234)return null;const _0x2c12dd='add'==_0x500234['type']?'insertion':'deletion',_0x1c031b=['ck-suggestion-marker','ck-suggestion-marker-'+_0x2c12dd];return _0x500234['data']['isSuggestion']&&_0x1c031b['push']('ck-suggestion-marker-'+_0x2c12dd+'-new'),this['activeChange']==_0x500234&&_0x1c031b['push']('ck-suggestion-marker--active'),{'classes':_0x1c031b,'attributes':{'data-change-id':_0x2da276}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x5db322=>{_0x5db322['on']('element:pre',(_0x293a01,_0x512aff,_0x2795c4)=>{const _0x56964c=_0x512aff['viewItem']['getChild'](0x0);if(!_0x56964c||!_0x56964c['is']('element','code'))return;if(!_0x2795c4['consumable']['consume'](_0x56964c,{'attributes':['vid_start','vid_end']}))return;const _0x2dba06=_0x512aff['modelRange']['start']['nodeAfter'];_0x2795c4['writer']['setAttribute']('vid_start',_0x56964c['getAttribute']('vid_start'),_0x2dba06),_0x2795c4['writer']['setAttribute']('vid_end',_0x56964c['getAttribute']('vid_end'),_0x2dba06);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x56fab3=>{_0x56fab3['on']('element',(_0x4d6bbd,_0x36d41b,_0xe7c806)=>{if(!_0xe7c806['consumable']['consume'](_0x36d41b['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x36d41b['modelRange']['isCollapsed'])return;const _0x53b46f=_0x36d41b['modelRange']['start']['nodeAfter'];_0x53b46f['hasAttribute']('vid_start')||_0x53b46f['hasAttribute']('vid')||(_0xe7c806['writer']['setAttribute']('vid_start',_0x36d41b['viewItem']['getAttribute']('vid_start'),_0x53b46f),_0xe7c806['writer']['setAttribute']('vid_end',_0x36d41b['viewItem']['getAttribute']('vid_end'),_0x53b46f));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x450c69=>_0x450c69['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x33d2db,[,_0x468f3f])=>{['vid_start','vid_end','vid']['includes'](_0x468f3f)&&(_0x33d2db['return']=!0x0,_0x33d2db['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x46aa7b=>{_0x46aa7b['on']('attribute:vid',(_0x17ab2f,_0x1cf3a,_0x1c6542)=>{if('\x20'!=_0x1cf3a['item']['data']||_0x1cf3a['item']['parent']['maxOffset']>0x1)return;if(!_0x1c6542['consumable']['consume'](_0x1cf3a['item'],_0x17ab2f['name']))return;const _0x49c293=_0x1c6542['writer'],_0x18728a=_0x1c6542['mapper']['toViewRange'](_0x1cf3a['range']);_0x49c293['wrap'](_0x18728a,_0x49c293['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x350473){const _0x355d02=_0x350473['plugins']['get']('RevisionViewer');return(_0x47fb47,_0x49d8c2,_0x5e026d)=>{const _0x312bee=_0x49d8c2['markerName']['split'](':')[0x1],_0x459b29=_0x355d02['_getChangeFromId'](_0x312bee);if(!_0x459b29)return null;const _0x4044e9='add'==_0x459b29['type']?'split':'merge';if(!_0x5e026d['consumable']['test'](_0x49d8c2['markerRange'],_0x47fb47['name']))return;const _0x2a373f=_0x49d8c2['markerRange']['getWalker'](),_0x384a4f=_0x49d8c2['markerRange']['start'],_0x29144a=_0x350473['model']['schema'];let _0x2fabdb=null,_0x532d26=null,_0x39aac5=!0x1,_0x29f8a0=!0x1;for(const _0x5c8334 of _0x2a373f){const _0x3de85b=_0x5c8334['item'];_0x39aac5=_0x39aac5||_0x29144a['isContent'](_0x3de85b);const _0x25ea8c=_0x5e026d['mapper']['toViewElement'](_0x3de85b);if(_0x25ea8c&&_0x25ea8c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5c8334['type']&&(_0x29144a['isBlock'](_0x3de85b)&&!_0x29144a['isLimit'](_0x3de85b)&&(_0x3de85b['nextSibling']||_0x384a4f['isAtEnd']?_0x2fabdb&&_0x2fabdb['parent']==_0x3de85b||(_0x2fabdb=_0x3de85b,_0x296dbf(_0x5c8334['previousPosition']),_0x29f8a0=!0x0):_0x532d26=_0x532d26||_0x5c8334['previousPosition']));}function _0x296dbf(_0x176ca7){const _0x30f73d=_0x5e026d['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4044e9}),_0x37f051=_0x5e026d['mapper']['toViewPosition'](_0x176ca7);_0x459b29['data']['isSuggestion']&&_0x5e026d['writer']['addClass']('ck-suggestion-marker-'+_0x4044e9+'-new',_0x30f73d),_0x355d02['activeChange']==_0x459b29&&_0x5e026d['writer']['addClass']('ck-suggestion-marker--active',_0x30f73d),_0x5e026d['writer']['insert'](_0x37f051,_0x30f73d),_0x5e026d['mapper']['bindElementToMarker'](_0x30f73d,_0x49d8c2['markerName']);}_0x39aac5||_0x29f8a0||!_0x532d26||_0x296dbf(_0x532d26);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x195c72,_0xbec0cd,_0xa37980)=>{const _0x2ef848=_0xa37980['mapper']['markerNameToElements'](_0xbec0cd['markerName']);if(_0x2ef848){for(const _0x583791 of _0x2ef848)(_0x583791['hasClass']('ck-suggestion-marker-split')||_0x583791['hasClass']('ck-suggestion-marker-merge'))&&(_0xa37980['mapper']['unbindElementFromMarkerName'](_0x583791,_0xbec0cd['markerName']),_0xa37980['writer']['remove'](_0x583791));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4c3bdd,_0x209e19,_0x28452b)=>{const _0x1f8c51=_0x209e19['markerName']['split'](':')[0x1],_0x10f390=this['_getChangeFromId'](_0x1f8c51);if(!_0x10f390)return null;const _0x38f89f='add'==_0x10f390['type']?'split':'merge';if(_0x28452b['consumable']['test'](_0x209e19['markerRange'],_0x4c3bdd['name']))for(const _0x84ef9d of _0x209e19['markerRange']['getItems']()){if(!_0x84ef9d['is']('element','softBreak'))continue;const _0x4e8f98=_0x28452b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x38f89f}),_0x1f068a=_0x28452b['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x84ef9d));_0x10f390['data']['isSuggestion']&&_0x28452b['writer']['addClass']('ck-suggestion-marker-'+_0x38f89f+'-new',_0x4e8f98),this['activeChange']==_0x10f390&&_0x28452b['writer']['addClass']('ck-suggestion-marker--active',_0x4e8f98),_0x28452b['writer']['insert'](_0x1f068a,_0x4e8f98),_0x28452b['mapper']['bindElementToMarker'](_0x4e8f98,_0x209e19['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3daa09=>{for(const _0x26fc04 of this['editor']['model']['document']['getRootNames']()){const _0x49c852=this['editor']['model']['document']['getRoot'](_0x26fc04),_0x427526=this['editor']['editing']['view']['document']['getRoot'](_0x26fc04);if(_0x427526){const _0x1cce40=_0x49c852['getAttribute']('revisionHistoryAttachChange');if(_0x3daa09['removeAttribute']('data-change-id',_0x427526),_0x3daa09['removeClass']('ck-revision-history-root-add',_0x427526),_0x3daa09['removeClass']('ck-revision-history-root-remove',_0x427526),_0x3daa09['removeClass']('ck-revision-history-root--active',_0x427526),_0x1cce40){const _0x194987=this['_getChangeFromId'](_0x1cce40);if(!_0x194987)return null;_0x3daa09['setAttribute']('data-change-id',_0x1cce40,_0x427526),_0x3daa09['addClass']('ck-revision-history-root-'+_0x194987['type'],_0x427526),this['activeChange']==_0x194987&&_0x3daa09['addClass']('ck-revision-history-root--active',_0x427526);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x44f1d0=>'revision-comment:'+_0x44f1d0,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1e6cee=>'revision-suggestion:'+_0x1e6cee,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x5de848=>({'name':'suggestion:'+_0x5de848,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3f4b5e=>{const _0x24fe3c=_0x3f4b5e['markerName']['split'](':')[0x1];return'insertion'!=_0x24fe3c&&'deletion'!=_0x24fe3c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x24fe3c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x539f5f,_0xeee255,_0x2f1ab3)=>{const _0x22e44=_0x2f1ab3['mapper']['markerNameToElements'](_0xeee255['markerName']);if(_0x22e44){for(const _0x4826a4 of _0x22e44)_0x4826a4['is']('uiElement')&&(_0x2f1ab3['mapper']['unbindElementFromMarkerName'](_0x4826a4,_0xeee255['markerName']),_0x2f1ab3['writer']['remove'](_0x4826a4));}},{'priority':'high'});}['_getChangeFromId'](_0x49337d){return this['_changeIdToChange']['get'](_0x49337d);}['_getViewForChange'](_0x2e3748){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x2e3748),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x25c0e7,_0x2c294c,_0x2d1153,_0x3fed35)=>{_0x3fed35&&this['_balloon']['remove'](_0x3fed35),_0x2d1153&&(this['_balloon']['add']({'view':_0x2d1153,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x517c89=this['editor']['editing'],_0x2bc9bf=this['_getChangeFromId'](_0x2d1153['changeId']);let _0x1bbcc5;if(_0x2bc9bf['data']['isOnRoot']){const _0x1b9559=_0x517c89['view']['getDomRoot'](_0x2bc9bf['rootName']);_0x1bbcc5=Array['from'](_0x1b9559['getClientRects']());}else{const _0x8320a=this['editor']['model']['markers']['get']('revision:'+_0x2d1153['changeId']);_0x1bbcc5=Array['from'](_0x517c89['mapper']['markerNameToElements'](_0x8320a['name']))['map'](_0x5f1005=>_0x517c89['view']['domConverter']['mapViewToDom'](_0x5f1005))['map'](_0x2361aa=>Array['from'](_0x2361aa['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x1bbcc5[0x0];return _0x1bbcc5['find'](_0x1b17be=>_0x1b17be['top']-0x3<=this['_activeViewTarget']['y']&&_0x1b17be['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1b17be['left']-0x3<=this['_activeViewTarget']['x']&&_0x1b17be['right']+0x3>=this['_activeViewTarget']['x'])||_0x1bbcc5[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x49ca26,_0x9b92ee,_0x1c0f55,_0x4f5920)=>{this['activeView']=_0x1c0f55?this['_getViewForChange'](_0x1c0f55):null,this['editor']['model']['change'](()=>{const _0x27ec47=this['editor']['editing'];_0x4f5920&&(_0x4f5920['data']['isOnRoot']?_0x27ec47['view']['change'](_0x219414=>{_0x219414['removeClass']('ck-revision-history-root--active',_0x27ec47['view']['document']['getRoot'](_0x4f5920['rootName']));}):_0x27ec47['reconvertMarker']('revision:'+_0x4f5920['id'])),_0x1c0f55&&(_0x1c0f55['data']['isOnRoot']?_0x27ec47['view']['change'](_0x3b0d27=>{_0x3b0d27['addClass']('ck-revision-history-root--active',_0x27ec47['view']['document']['getRoot'](_0x1c0f55['rootName']));}):_0x27ec47['reconvertMarker']('revision:'+_0x1c0f55['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x13e2b1,_0x594ecd)=>{if(this['activeChange'])return;const _0x3a9d1c=this['_findChangeIdFromDomTarget'](_0x594ecd['target']),_0x533a79=this['_changeIdToChange']['get'](_0x3a9d1c);_0x533a79?(this['_activeViewTarget']={'x':_0x594ecd['domEvent']['x'],'y':_0x594ecd['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x533a79)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x34ae5a,_0x24159b)=>{const _0x90d49c=this['_findChangeIdFromDomTarget'](_0x24159b['target']),_0x309ce0=this['_changeIdToChange']['get'](_0x90d49c);_0x309ce0?(this['_activeViewTarget']={'x':_0x24159b['domEvent']['x'],'y':_0x24159b['domEvent']['y']},_0x309ce0===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x309ce0):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x44f9e1){do{const _0x3232fb=_0x44f9e1['getAttribute']('data-change-id');if(_0x3232fb)return _0x3232fb;_0x44f9e1=_0x44f9e1['parent'];}while(_0x44f9e1);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5d46ea=>{for(const _0x266c2e of this['editor']['model']['markers'])_0x5d46ea['removeMarker'](_0x266c2e);});}}function _t(_0x20f379,_0x49fb84){return(_0x2a0cc8,_0x45e825,_0x147be9)=>{if(!_0x147be9['consumable']['test'](_0x45e825['markerRange'],_0x2a0cc8['name']))return;const _0xb1e4c0=_0x45e825['markerRange']['getWalker'](),_0x4af739=_0x45e825['markerRange']['start'],_0x202cee=_0x20f379['model']['schema'];let _0x31c0a0=null,_0x4331f9=null,_0x3f36d5=!0x1,_0x5a695f=!0x1;for(const _0x6ad58c of _0xb1e4c0){const _0x37dafa=_0x6ad58c['item'];_0x3f36d5=_0x3f36d5||_0x202cee['isContent'](_0x37dafa);const _0x4b993e=_0x147be9['mapper']['toViewElement'](_0x37dafa);if(_0x4b993e&&_0x4b993e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x6ad58c['type']&&(_0x202cee['isBlock'](_0x37dafa)&&!_0x202cee['isLimit'](_0x37dafa)&&(_0x37dafa['nextSibling']||_0x4af739['isAtEnd']?_0x31c0a0&&_0x31c0a0['parent']==_0x37dafa||(_0x31c0a0=_0x37dafa,_0x94cf98(_0x6ad58c['previousPosition']),_0x5a695f=!0x0):_0x4331f9=_0x4331f9||_0x6ad58c['previousPosition']));}function _0x94cf98(_0xf7ea09){const _0x16ccf7=_0x147be9['mapper']['toViewPosition'](_0xf7ea09),_0xe74a0e=_0x147be9['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x49fb84});_0x147be9['writer']['insert'](_0x16ccf7,_0xe74a0e),_0x147be9['mapper']['bindElementToMarker'](_0xe74a0e,_0x45e825['markerName']);}_0x3f36d5||_0x5a695f||!_0x4331f9||_0x94cf98(_0x4331f9);};}class RestoreRevisionCommand extends _0x25b174{constructor(_0x2ceef1){super(_0x2ceef1);const _0x5042f3=_0x2ceef1['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x5042f3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5042f3,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3c14eb=this['editor'],_0x3042ca=_0x3c14eb['plugins']['get'](RevisionViewer),_0x3c0f47=_0x3042ca['isReady']?_0x3042ca['diff']['newRevisionId']:null;_0x3c14eb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3c0f47);}['refresh'](){const {isReady:_0x54f185,isEnabled:_0x335832,repository:_0x169616,diff:_0x349c49}=this['editor']['plugins']['get'](RevisionViewer),_0x3714d6=_0x349c49&&_0x169616['getLaterVisibleRevision'](_0x349c49['newRevisionId']);this['isEnabled']=_0x54f185&&_0x335832&&Boolean(_0x3714d6);}}class ShowChangeCommand extends _0x25b174{['_step'];constructor(_0x3af8c5,{direction:_0x33af63}){super(_0x3af8c5);const _0x32e421=_0x3af8c5['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x33af63?0x1:-0x1,this['listenTo'](_0x32e421,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x32e421,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x32e421,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xd0f723=this['editor'],_0xfd4d1d=_0xd0f723['plugins']['get'](RevisionViewer),{isNavigationMode:_0x52a1e2,currentChangeNumber:_0x2bebaf}=_0xfd4d1d;let _0x4d58f5;if(_0xfd4d1d['activeChange']=_0x52a1e2?_0xfd4d1d['diff']['changes']['get'](_0x2bebaf+this['_step']):_0xfd4d1d['diff']['changes']['first'],_0xfd4d1d['activeChange']['data']['isOnRoot'])_0x4d58f5=_0xd0f723['editing']['view']['getDomRoot'](_0xfd4d1d['activeChange']['rootName']);else{const _0x4901d4=_0xd0f723['model']['markers']['get']('revision:'+_0xfd4d1d['activeChange']['id']);_0x4d58f5=_0x1d3e7d(_0xd0f723['editing'],_0x4901d4);}_0x17cc9f({'target':_0x4d58f5,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x2a5277,currentChangeNumber:_0xaacaba,numberOfChanges:_0x5ed73a,isReady:_0xeee4da,isEnabled:_0x589d54}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x589d54&&_0xeee4da&&_0x5ed73a)&&(!_0x2a5277||(0x1===this['_step']?_0xaacaba<_0x5ed73a-0x1:_0xaacaba>0x0));}}class ChangesNavigationView extends _0x39c569{constructor(_0x41985a){super(_0x41985a);const _0x10493d=this['bindTemplate'],_0x676904=new _0x3296a8(_0x41985a),_0x4628ea=new _0x3296a8(_0x41985a);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',(_0x1178b8,_0x33f0f7)=>_0x1178b8&&_0x33f0f7>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x23aedf,_0x2190f9,_0x4ce21,_0x1282e6)=>{if(!_0x23aedf)return ft(_0x41985a,'Loading...');if(!_0x4ce21)return ft(_0x41985a,'No\x20changes');const _0x485767=ft(_0x41985a,'NUMBER_OF_CHANGES',_0x4ce21);return _0x1282e6?ft(_0x41985a,'X_OF_Y_CHANGES',[_0x2190f9+0x1,_0x4ce21]):_0x485767;}),_0x676904['set']({'label':ft(_0x41985a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x396732}),_0x4628ea['set']({'label':ft(_0x41985a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3e48c0}),_0x676904['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4628ea['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x676904['on']('execute',()=>this['fire']('execute','backward')),_0x4628ea['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',_0x10493d['if']('_isStatusLabelVisible','ck-hidden',_0x11a2f4=>!_0x11a2f4)]},'children':[{'text':_0x10493d['to']('isNavigationMode',_0x59125b=>_0x59125b?ft(_0x41985a,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x41985a,'Total')+':\x20')}]},{'text':_0x10493d['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x676904,_0x4628ea]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x18ed42{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x7b27b2=this['editor']['editing']['view'];_0x7b27b2['change'](_0x2a22c3=>{for(const _0x335436 of _0x7b27b2['document']['roots'])_0x2a22c3['addClass'](yt,_0x335436);});}['hide'](){const _0x2c73be=this['editor']['editing']['view'];_0x2c73be['change'](_0x34fe94=>{for(const _0x909e70 of _0x2c73be['document']['roots'])_0x34fe94['removeClass'](yt,_0x909e70);});}}class RevisionViewerUI extends _0x18ed42{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x5359e4=this['editor'],_0xbcbed4=_0x5359e4['plugins']['get'](RevisionViewer),_0x4ab7f7=_0x5359e4['plugins']['get'](RevisionViewerLoadingOverlay);_0x5359e4['ui']['componentFactory']['add']('exitToEditing',_0x5be2cc=>{const _0x3c5469=new _0x3296a8(_0x5be2cc);return _0x3c5469['set']({'label':ft(_0x5be2cc,'Back\x20to\x20editing'),'icon':_0x54f965,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3c5469,'execute',()=>{_0x5359e4['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3c5469;}),_0x5359e4['ui']['componentFactory']['add']('restoreRevision',_0x8168d8=>{const _0x200fc5=new _0x3296a8(_0x8168d8);return _0x200fc5['set']({'label':ft(_0x8168d8,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x200fc5['bind']('isEnabled')['to'](_0x5359e4['commands']['get']('restoreRevision')),this['listenTo'](_0x200fc5,'execute',()=>_0x5359e4['execute']('restoreRevision')),_0x200fc5;}),_0x5359e4['ui']['componentFactory']['add']('changesNavigation',_0x3af795=>{const _0x397e0e=new ChangesNavigationView(_0x3af795),_0x29cdc8=_0x5359e4['commands']['get']('showPreviousChange'),_0x469fd8=_0x5359e4['commands']['get']('showNextChange');return _0x397e0e['bind']('isBackwardNavigationEnabled')['to'](_0x29cdc8,'isEnabled'),_0x397e0e['bind']('isForwardNavigationEnabled')['to'](_0x469fd8,'isEnabled'),_0x397e0e['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xbcbed4),this['listenTo'](_0x397e0e,'execute',(_0xb39fff,_0x436b09)=>{_0x5359e4['execute']('forward'===_0x436b09?'showNextChange':'showPreviousChange');}),_0x397e0e;}),_0x4ab7f7['show'](),_0xbcbed4['on']('change:isReady',(_0x405a94,_0x42b432,_0xa1548f)=>{_0xa1548f?_0x4ab7f7['hide']():_0x4ab7f7['show']();});}}class RevisionNameView extends _0x321730{['_resizeObserver']=null;constructor(_0x3fb0b6,_0x183fd3){super(_0x3fb0b6,_0x183fd3);const _0x11a72b=this['bindTemplate'];this['set']({'label':ft(_0x3fb0b6,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x3fb0b6,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x11a72b['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x122c77(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4aa743=this['fieldView']['element'];this['_tooltipString']=_0x4aa743['scrollWidth']>_0x4aa743['clientWidth']&&_0x4aa743['value']||'';}}class RevisionAuthorView extends _0x39c569{constructor(_0x2adec2,_0x1f92d0,_0x16f381){super(_0x2adec2);const _0x504b35=new nt();_0x504b35['set']({'content':_0x580980,'viewBox':'0\x200\x2011\x2010'});const _0x67855b=['ck','ck-revision-history-sidebar__revision-author'];_0x16f381&&_0x67855b['push']('ck-revision-history-sidebar__revision-author_creator');const _0x37e601=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x2adec2,_0x16f381?'Revision\x20creator':'Revision\x20author')},'children':[_0x504b35,_0x1f92d0['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x67855b},'children':_0x37e601});}}function Rt(_0x3d0644,_0x504ce0){const _0x1575ee=_0x3d0644['bindTemplate'],_0x579887=_0x3d0644['locale'],_0x5c70de=_0x38d1cc(_0x579887);_0x5c70de['panelPosition']='sw';const _0x1c7dbf=function(_0x4f8f7f,_0x327cb2){const _0x1614c5=function(_0x25e52a,_0x4eab0f){const _0x37432e=_0x25e52a['locale'],_0x3a5851={'Compare\x20against\x20selected':ft(_0x37432e,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x37432e,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x37432e,'Restore\x20this\x20revision')};return _0x4eab0f['map'](_0x5a5cb0=>{const _0x327f06=_0x3a5851[_0x5a5cb0['name']];return _0x327f06&&_0x327f06!==_0x5a5cb0['name']&&(_0x5a5cb0['name']=_0x327f06),_0x5a5cb0;});}(_0x4f8f7f,_0x327cb2),_0x395fdd=new _0x12a0e4();for(const _0x2c4ca4 of _0x1614c5){const _0x444e09={'type':'button','model':new rt({'label':_0x2c4ca4['name'],'class':_0x2c4ca4['class'],'withText':!0x0,'role':'menuitem','_action':_0x2c4ca4['action']})};_0x444e09['model']['bind']('isEnabled')['to'](_0x4f8f7f,'isActionsDropdownOpen',_0x1011cc=>'function'!=typeof _0x2c4ca4['isEnabled']||(!_0x1011cc||_0x2c4ca4['isEnabled'](_0x4f8f7f))),_0x395fdd['add'](_0x444e09);}return _0x395fdd;}(_0x3d0644,_0x504ce0);return _0x3d0644['bind']('isActionsDropdownOpen')['to'](_0x5c70de,'isOpen'),_0x5c70de['buttonView']['set']({'label':ft(_0x579887,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x131dec}),_0x5c70de['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1575ee['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1575ee['to'](_0x3486c1=>_0x3486c1['stopPropagation']())}}),_0x5c70de['on']('execute',_0x54b071=>{_0x3d0644['isReady']&&'function'==typeof _0x54b071['source']['_action']&&_0x54b071['source']['_action'](_0x3d0644);}),ot(_0x5c70de,_0x1c7dbf,{'role':'menu'}),_0x5c70de['listenTo'](_0x3d0644,'change:isActionsDropdownOpen',(_0x256db9,_0x295fbd,_0x41ab84)=>{if(_0x41ab84)for(const _0x4f15e5 of _0x5c70de['listView']['items']){const _0x40f0c3=_0x4f15e5['children']['first'],_0x573e8c=_0x504ce0['find'](_0x35d6ac=>_0x35d6ac['action']===_0x40f0c3['_action'])['isVisible'];_0x4f15e5['isVisible']=void 0x0===_0x573e8c||_0x573e8c(_0x3d0644);}}),_0x5c70de;}class RevisionView extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x34dc84(_0x39c569){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x541550,_0x561c1d,_0x3971cc,_0x193a43){super(_0x541550);const _0x9c5f05=this['bindTemplate'],_0x1bbe5f=function(_0x151d19,_0x146dcb){const _0x59fd7a=Array['from'](_0x146dcb['authors'])['filter'](_0x22ab29=>_0x22ab29!=_0x146dcb['creator']);return _0x146dcb['creator']&&_0x59fd7a['unshift'](_0x146dcb['creator']),_0x59fd7a['map'](_0x5da99f=>new RevisionAuthorView(_0x151d19,_0x5da99f,_0x5da99f==_0x146dcb['creator']));}(_0x541550,_0x561c1d);this['id']=_0x561c1d['id'],this['_revision']=_0x561c1d,this['_requireRevisionName']=_0x193a43,this['bind']('name','createdAt')['to'](_0x561c1d),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x320f3f=>{return _0x4fac3b=_0x541550['uiLanguage'],(_0x232fb4=_0x320f3f)['toLocaleDateString'](_0x4fac3b,{'month':'long','day':'numeric'})+',\x20'+_0x232fb4['toLocaleTimeString'](_0x4fac3b,{'hour':'numeric','minute':'numeric'});var _0x4fac3b,_0x232fb4;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0x541550,_0x212138),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x1dea84=>_0x1dea84||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x17522e,_0x58e22e)=>_0x17522e&&_0x58e22e),this['revisionActionsView']=_0x3971cc&&_0x3971cc['length']?Rt(this,_0x3971cc):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x9c5f05['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x9c5f05['if']('isEnabled','ck-disabled',_0x1fea33=>!_0x1fea33),_0x9c5f05['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x9c5f05['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x9c5f05['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':_0x9c5f05['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':_0x1bbe5f}]},this['revisionActionsView']],'on':{'click':_0x9c5f05['to'](_0x4431b8=>{_0x4431b8['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x2f9d2e=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x2f9d2e,'change',()=>{this['_requireRevisionName']&&!_0x2f9d2e['value']||this['fire']('setName',{'id':this['id'],'name':_0x2f9d2e['value']}),_0x2f9d2e['value']||(_0x2f9d2e['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bt(_0x3db99a,_0x492e75){const _0x76ad77=vt['fromJSDate'](_0x3db99a)['setLocale'](_0x492e75),_0x4c66b8=vt['local'](),_0x3219c8=_0x4c66b8['minus']({'days':0x1})['startOf']('day');let _0x4f4368,_0x40fa6a;return _0x76ad77['hasSame'](_0x4c66b8,'day')?(_0x4f4368=_0x76ad77['startOf']('day')['toJSDate'](),_0x40fa6a=_0x76ad77['toRelativeCalendar']()):_0x76ad77['hasSame'](_0x3219c8,'day')?(_0x4f4368=_0x3219c8['toJSDate'](),_0x40fa6a=_0x76ad77['toRelativeCalendar']()):_0x76ad77['hasSame'](_0x4c66b8,'week')?(_0x4f4368=_0x76ad77['startOf']('week')['toJSDate'](),_0x40fa6a=_0x76ad77['weekdayLong']||''):_0x76ad77['hasSame'](_0x4c66b8,'year')?(_0x4f4368=_0x76ad77['startOf']('month')['toJSDate'](),_0x40fa6a=_0x76ad77['monthLong']||''):(_0x4f4368=_0x76ad77['startOf']('year')['toJSDate'](),_0x40fa6a=String(_0x76ad77['year'])),{'startDate':_0x4f4368,'localizedPeriodName':_0x40fa6a};}class RevisionsSidebarTimePeriodView extends _0x39c569{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x43ab2d,_0x1d6a02,_0x21ca3c,_0x1cab66){super(_0x43ab2d);const _0xdc75b2=bt(_0x1d6a02,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x1d6a02,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x21ca3c,this['_requireRevisionName']=_0x1cab66,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':_0xdc75b2}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2444fa){const _0x2a2a82=new RevisionView(this['locale'],_0x2444fa,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x2a2a82);}['removeRevision'](_0x125f29){const _0x16389d=this['revisionViews']['find'](_0x3358d4=>_0x3358d4['id']===_0x125f29['id']);this['revisionViews']['remove'](_0x16389d);}}class RevisionsSidebarHeaderView extends _0x39c569{constructor(_0x53221a){super(_0x53221a);const _0x538184=new nt();_0x538184['content']=_0x432461,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x538184,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0x53221a,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0x39c569{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2df669,_0x19083b,_0x56569c,_0xd858f1){super(_0x2df669);const _0x4c4f74=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x19083b,this['_revisionActions']=_0x56569c,this['_requireRevisionName']=_0xd858f1,this['on']('select',(_0xafd71,_0x539da4)=>{this['fire']('revisionSelected',_0x539da4);}),this['on']('setName',(_0x5e8b72,_0x56e324)=>{this['fire']('revisionSetName',_0x56e324);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x2df669),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4c4f74['if']('isEnabled','ck-disabled',_0x3ac4fa=>!_0x3ac4fa)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x3f4616 of this['_revisions'])this['_addRevision'](_0x3f4616);this['_revisions']['on']('add',(_0x44c2c6,_0x40085a)=>{this['_addRevision'](_0x40085a);}),this['_revisions']['on']('remove',(_0x44dfd8,_0x3d0016)=>{this['_removeRevision'](_0x3d0016);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x5650cd=>_0x5650cd['revisionViews']['map'](_0x5c80cf=>_0x5c80cf))['flat']();}['selectRevision'](_0xb6f19d){for(const _0x41cd92 of this['revisionViews'])_0xb6f19d&&_0xb6f19d['id']===_0x41cd92['id']?_0x41cd92['select']():_0x41cd92['deselect']();}['highlightRevisions'](_0x1357d0){for(const _0x2d1407 of this['revisionViews'])_0x1357d0['some'](({id:_0x368f33})=>_0x368f33===_0x2d1407['id'])?_0x2d1407['highlight']():_0x2d1407['unhighlight']();}['_addRevision'](_0x521586){const _0x1f17b6=bt(_0x521586['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x351422=this['_getTimePeriodViewByStartDate'](_0x1f17b6);_0x351422||(_0x351422=new RevisionsSidebarTimePeriodView(this['locale'],_0x1f17b6,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x351422)),_0x351422['addRevision'](_0x521586);}['_removeRevision'](_0x270e56){const _0x4885f2=bt(_0x270e56['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4885f2)['removeRevision'](_0x270e56);}['_getTimePeriodViewByStartDate'](_0x21681e){return this['timePeriodViews']['find'](_0x2a5e93=>_0x2a5e93['startDate']['getTime']()===_0x21681e['getTime']());}}class RevisionsSidebar extends _0x18ed42{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(
|
|
30
|
-
_0xa4dcc7(_0xb70b37){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x47abf1,_0x11f02c){super(_0x11f02c),this['sourceElement']=_0x47abf1,this['model']['document']['createRoot']();const _0x5380cb=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x5380cb);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x447a3e,_0x37e5ba){const _0x42faee=new this(_0x447a3e,_0x37e5ba);return await _0x42faee['initPlugins'](),await _0x42faee['ui']['init'](_0x447a3e),await _0x42faee['data']['init'](_0x42faee['config']['get']('initialData')||''),_0x42faee['fire']('ready'),_0x42faee;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x20daab{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x30455d){function _0x484fe6(_0x5a2742){return _0x5a2742['map'](_0x206975=>String['fromCharCode'](_0x206975))['join']('');}super(_0x30455d),this['result']='end',_0x30455d[_0x484fe6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x484fe6([0x76,0x69,0x65,0x77])][_0x484fe6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x484fe6([0x61,0x75,0x74,0x6f]),_0x30455d[_0x484fe6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x484fe6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x484fe6([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x484fe6([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x484fe6([0x6f,0x6b])});}}class RevisionHistory extends _0x20daab{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x37ab73){if(super(_0x37ab73),!this['editor']['config']['get']('revisionHistory'))throw new _0x5e0c91('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xcd640b=>this['_showRevisionViewer']({..._0xcd640b,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1edcc2=>this['_closeRevisionViewer'](_0x1edcc2)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x5913be=>this['_restoreRevision'](_0x5913be)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x4b11b9){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4b11b9;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x51e22b){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x51e22b);}['getRevision'](_0x3eca28){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3eca28);}['getRevisions'](_0x1b4811){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1b4811||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4fa0f3=this['editor'],_0x2c1119=_0x4eb3e3(_0x4fa0f3,It),_0x647851=_0x4fa0f3['plugins']['get']('RevisionTracker'),_0xd5254a=_0x4fa0f3['plugins']['get'](_0xf95694)['users'];return _0x2c1119['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2c1119['lazyRoots'],(_0x2c1119['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x20daab{static get['requires'](){return[RevisionViewer,_0xf95694];}['init'](){const _0x3ebac6=this['editor']['plugins']['get'](_0xf95694);for(const _0x177b80 of _0xd5254a)_0x177b80['isAnonymous']||_0x3ebac6['getUser'](_0x177b80['id'])||_0x3ebac6['addUser'](_0x177b80);const _0x3ac9f7=_0x647851['repository']['getRevisions']();let _0x5b2cc4=null;const _0x5722fe=this['editor']['plugins']['get']('RevisionViewer');_0x5722fe['adapter']=_0x647851['adapter'],_0x5722fe['bind']('isEnabled')['to'](_0x647851),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4fa0f3,'isReadOnly',_0x2d539f=>!_0x2d539f);for(const _0x39bcf8 of _0x3ac9f7){const _0x2c754b=null===_0x39bcf8['creator'];if(_0x2c754b&&_0x39bcf8['toVersion']===_0x39bcf8['fromVersion'])continue;const _0x3ebb9e=_0x39bcf8['toJSON']();_0x5722fe['addRevisionData'](_0x3ebb9e,(_0x55ac40,_0x23b7bd,_0x11795b)=>{if(_0x2c754b){if(_0x5b2cc4)_0x5b2cc4['_update'](_0x55ac40,_0x23b7bd);else{if(!_0x23b7bd){const _0x43ef26=_0x11795b['toJSON']();_0x43ef26['id']=_0x13bc90(),_0x647851['saveRevision'](_0x43ef26,_0x11795b['toVersion'])['then'](_0x189906=>{_0x5b2cc4=_0x189906;});}}}else _0x39bcf8['_update'](_0x55ac40,_0x23b7bd);});}}},RevisionsSidebar),_0x2c1119);}['_enhanceShowRevisionViewerCallback'](){const _0x1f9591=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x41a320=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x2f1121=this['editor']['plugins']['get']('Autosave');await _0x2f1121['save']();}else await _0x41a320['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x55579e=this['editor']['plugins']['get']('Dialog');_0x55579e['isOpen']&&_0x55579e['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x17f125=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x553db4 of _0x17f125)_0x553db4['class']=_0x553db4['class']?_0x553db4['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x3418e7=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x3418e7&&_0x3418e7['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x37b756=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x37b756&&_0x37b756['setAttribute']('tabindex','-1');}}const _0x5bd27a=this['_getRevisionViewerEditorConfig']();return _0x1f9591(_0x5bd27a)['then'](_0x1fb280=>{return(this['_viewerEditor']=_0x1fb280,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'),_0x1fb280);})['catch'](_0x51c9c1=>(console['error'](_0x51c9c1),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x86554e=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x2e9d01=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x137af4 of _0x2e9d01)_0x137af4['class']='ck-tab-panel_disabled'===_0x137af4['class']?'':_0x137af4['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x4c09e4=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4c09e4&&_0x4c09e4['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x528dd4=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x528dd4&&_0x528dd4['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x86554e(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x10c4ae=this['editor']['plugins']['get']('Annotations');_0x10c4ae['refreshVisibility'](),_0x10c4ae['refreshPositioning']();}});});}['_showRevisionViewer'](_0x253cb5){const _0x5b52ea=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x365e71=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x365712=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x365712,_0x253cb5)['then'](_0x2d1dc4=>(_0x365e71['style']['display']='block',_0x5b52ea['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2d1dc4));}['_closeRevisionViewer'](_0x37d149){const _0x16a2b0=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x16a2b0['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x37d149['destroy']();}async['_restoreRevision'](_0x2f42c2){const _0x5b85cf=this['editor'],_0x3302ad=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x5cbdf7=_0x5b85cf['plugins']['get']('RevisionTracker'),_0x576daf=_0x5b85cf['plugins']['get']('RevisionHistoryUtils'),_0x50342a=_0x3302ad['repository']['getRevision'](_0x2f42c2);let _0x3a7803,_0x3bc2aa,_0xfe7c68;try{await _0x576daf['loadRevisionData'](_0x50342a,this['adapter']),_0x3a7803=_0x576daf['getRevisionDocumentData'](_0x50342a),_0x3bc2aa=_0x576daf['getRevisionRootsAttributes'](_0x50342a);}catch(_0x42964e){return void console['error'](_0x42964e);}_0x5b85cf['model']['change'](_0x259737=>{for(const _0x3fe73e of Array['from'](_0x5b85cf['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x259737['removeMarker'](_0x3fe73e);}),_0x3302ad['isReady']=!0x1,_0x5b85cf['model']['enqueueChange'](_0x3fecad=>{_0x3fecad['setSelection'](null),_0x3fecad['removeSelectionAttribute'](_0x5b85cf['model']['document']['selection']['getAttributeKeys']());const _0x137238=Object['keys'](_0x3a7803);for(const _0x1f51f8 of _0x5b85cf['model']['document']['roots'])'$graveyard'!=_0x1f51f8['rootName']&&_0x1f51f8['isAttached']()&&!_0x137238['includes'](_0x1f51f8['rootName'])&&_0x3fecad['detachRoot'](_0x1f51f8);for(const _0x2e4be9 of _0x137238){let _0x31769f=_0x5b85cf['model']['document']['getRoot'](_0x2e4be9);if(!_0x31769f||!_0x31769f['isAttached']()){const _0x1f2d85=_0x50342a['diffData']?.[_0x2e4be9]?.['rootElementName']||'$root';_0x31769f=_0x3fecad['addRoot'](_0x2e4be9,_0x1f2d85);}const _0x4857ee=_0x3bc2aa[_0x2e4be9],_0x399f32=Object['keys'](_0x4857ee),_0xc6d57=_0x3a7803[_0x2e4be9];for(const _0x57ea32 of _0x31769f['getAttributeKeys']())_0x399f32['includes'](_0x57ea32)||_0x3fecad['removeAttribute'](_0x57ea32,_0x31769f);for(const _0x5db14d of _0x399f32)_0x3fecad['setAttribute'](_0x5db14d,_0x3bc2aa[_0x2e4be9][_0x5db14d],_0x31769f);_0x3fecad['remove'](_0x3fecad['createRangeIn'](_0x31769f)),_0x3fecad['insert'](_0x5b85cf['data']['parse'](_0xc6d57,_0x31769f),_0x31769f,0x0);}});const _0xcdb98f=ft(_0x5b85cf['locale'],'Restored');if(_0x50342a['name'])_0xfe7c68=-0x1==_0x50342a['name']['indexOf'](_0xcdb98f)?_0xcdb98f+':\x20'+_0x50342a['name']:_0x50342a['name'];else _0xfe7c68=_0xcdb98f+':\x20'+(_0x50342a['createdAt']['toLocaleDateString'](_0x5b85cf['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x50342a['createdAt']['toLocaleTimeString'](_0x5b85cf['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x5cbdf7['saveRevision']({'name':_0xfe7c68}),_0x3302ad['isReady']=!0x0,_0x5b85cf['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
|
|
29
|
+
kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x369e50){super(_0x369e50),this['_revisionViewer']=_0x369e50['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x4e00da=this['_revisionsRepository']['_revisions'],_0x12eefb=this['_createRevisionActions'](),_0x540dfd=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0x4e00da,_0x12eefb,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',(_0x325b9d,_0xe74fb5)=>{_0xe74fb5['revisionViews']['on']('add',(_0x2a647f,_0x15dc23)=>{_0x15dc23['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)),_0x540dfd['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x3e0a3a=this['_revisionsRepository']['getRevision'](0x0);if(_0x3e0a3a){const _0x3e2a16=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3e0a3a['id']);this['_revisionViewer']['compare'](_0x3e0a3a,_0x3e2a16);}}['_handleRevisionSelected'](_0x293d61,_0x53dc50){const _0x14724e=this['_revisionsRepository']['getRevision'](_0x53dc50['id']),_0x3d9efe=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x14724e['id']);this['_revisionViewer']['compare'](_0x14724e,_0x3d9efe);}['_handleRevisionSetName'](_0x579e41,_0x5d73f8){this['_revisionsRepository']['getRevision'](_0x5d73f8['id'])['setName'](_0x5d73f8['name']);}['_handleDiffChange'](_0x2df8ff,_0x516935,_0x254d59){const _0x2bca80=this['_revisionsRepository']['getRevisionsInDiff'](_0x254d59);_0x2bca80['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x2bca80),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x2bca80[0x0]));}['_createRevisionActions'](){const _0x119d9c=this['editor'],_0x429109=RevisionsSidebar['availableRevisionActions'],_0x47e189=_0x119d9c['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x47e189['length'])return _0x47e189['map'](_0x52eec1=>{const _0x5d3810='string'==typeof _0x52eec1?Object['assign']({},_0x429109[_0x52eec1]):_0x52eec1;return _0x5d3810['action']=_0x5d3810['action']['bind'](this,_0x119d9c),_0x5d3810['isVisible']&&(_0x5d3810['isVisible']=_0x5d3810['isVisible']['bind'](this,_0x119d9c)),_0x5d3810;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x412fb3},_0x1cf93d)=>{const _0x2b8f44=_0x412fb3['get'](RevisionViewer),_0x2725fc=_0x2b8f44['repository'];let _0x1197ec=_0x2b8f44['diff']['newRevisionId'],_0x19bc24=_0x1cf93d['id'];_0x2725fc['getIndex'](_0x1197ec)>_0x2725fc['getIndex'](_0x19bc24)&&([_0x1197ec,_0x19bc24]=[_0x19bc24,_0x1197ec]),_0x2b8f44['compare'](_0x1197ec,_0x19bc24);},'isVisible':({plugins:_0xae3375},_0x7b19ac)=>{const _0x556177=_0xae3375['get'](RevisionViewer);return!(_0x556177['repository']['getRevisionsInDiff'](_0x556177['diff'])['length']>0x2)&&!_0x7b19ac['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1b0a7f,{id:_0x346a4c})=>{_0x1b0a7f['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x346a4c);},'isVisible':({plugins:_0x44f764},_0x1f7b2d)=>!!_0x44f764['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x1f7b2d['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x115028},{id:_0x5cd67a,revisionNameView:_0x4a93a3})=>{const _0x311d44=_0x115028['get'](RevisionViewer),_0x2459a0=_0x311d44['repository']['getEarlierVisibleRevision'](_0x5cd67a);_0x311d44['compare'](_0x5cd67a,_0x2459a0),_0x4a93a3['focus'](),_0x4a93a3['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x41eba7,_0x2ae504){super(_0x41eba7),this['_view']=_0x2ae504,this['_toolbarConfig']=ht(_0x41eba7['config']['get']('toolbar')),this['_elementReplacer']=new _0x1af71a();}get['element'](){return this['view']['element'];}['init'](_0x110a3f){const _0x1fff98=this['editor'],_0x174094=this['view'],_0x57c5bf=_0x1fff98['editing']['view'],_0x235f76=_0x174094['editable'],_0xd1bbce=_0x57c5bf['document']['getRoot']();_0x235f76['name']=_0xd1bbce['rootName'],_0x174094['render']();const _0x23063b=_0x235f76['element'];this['setEditableElement'](_0x235f76['name'],_0x23063b),_0x174094['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x57c5bf['attachDomRoot'](_0x23063b),this['_elementReplacer']['replace'](_0x110a3f,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x470acc=this['view'],_0x2921d5=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x2921d5['detachDomRoot'](_0x470acc['editable']['name']),_0x470acc['destroy']();}['_initToolbar'](){const _0x1d0b76=this['view'];_0x1d0b76['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x1d0b76['stickyPanel']['limiterElement']=_0x1d0b76['element'],_0x1d0b76['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x466e10})=>_0x466e10),_0x1d0b76['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x1d0b76['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x535ffc,_0x4ebcbe,_0x203459={}){super(_0x535ffc),this['stickyPanel']=new lt(_0x535ffc),this['toolbar']=new ut(_0x535ffc,{'shouldGroupWhenFull':_0x203459['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x535ffc,_0x4ebcbe);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class RevisionViewerEditor extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x443cf2(_0x2c191d){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x3c75d0,_0x3b04c4){super(_0x3b04c4),this['sourceElement']=_0x3c75d0,this['model']['document']['createRoot']();const _0x2c1442=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x2c1442);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x2707a3,_0x2926c4){const _0x1cf995=new this(_0x2707a3,_0x2926c4);return await _0x1cf995['initPlugins'](),await _0x1cf995['ui']['init'](_0x2707a3),await _0x1cf995['data']['init'](_0x1cf995['config']['get']('initialData')||''),_0x1cf995['fire']('ready'),_0x1cf995;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x18ed42{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x45366e){function _0x33097e(_0x55c7ed){return _0x55c7ed['map'](_0x5dcbdb=>String['fromCharCode'](_0x5dcbdb))['join']('');}super(_0x45366e),this['result']='end',_0x45366e[_0x33097e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33097e([0x76,0x69,0x65,0x77])][_0x33097e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x33097e([0x61,0x75,0x74,0x6f]),_0x45366e[_0x33097e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x33097e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x33097e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x33097e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x33097e([0x6f,0x6b])});}}class RevisionHistory extends _0x18ed42{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x118676){if(super(_0x118676),!this['editor']['config']['get']('revisionHistory'))throw new _0x1f5a5b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xc3c8a5=>this['_showRevisionViewer']({..._0xc3c8a5,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x15aabe=>this['_closeRevisionViewer'](_0x15aabe)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x53aaef=>this['_restoreRevision'](_0x53aaef)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x423d8d){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x423d8d;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x56b804){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x56b804);}['getRevision'](_0x661238){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x661238);}['getRevisions'](_0x416205){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x416205||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x42a0c5=this['editor'],_0x1ff72f=_0x554e49(_0x42a0c5,It),_0x4402ff=_0x42a0c5['plugins']['get']('RevisionTracker'),_0x3c2bd3=_0x42a0c5['plugins']['get'](_0x4c4887)['users'];return _0x1ff72f['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1ff72f['lazyRoots'],(_0x1ff72f['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x18ed42{static get['requires'](){return[RevisionViewer,_0x4c4887];}['init'](){const _0x44f1ff=this['editor']['plugins']['get'](_0x4c4887);for(const _0x2bc809 of _0x3c2bd3)_0x2bc809['isAnonymous']||_0x44f1ff['getUser'](_0x2bc809['id'])||_0x44f1ff['addUser'](_0x2bc809);const _0x33be09=_0x4402ff['repository']['getRevisions']();let _0x1daa02=null;const _0x165344=this['editor']['plugins']['get']('RevisionViewer');_0x165344['adapter']=_0x4402ff['adapter'],_0x165344['bind']('isEnabled')['to'](_0x4402ff),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x42a0c5,'isReadOnly',_0x3ff5d7=>!_0x3ff5d7);for(const _0x26d11f of _0x33be09){const _0x273944=null===_0x26d11f['creator'];if(_0x273944&&_0x26d11f['toVersion']===_0x26d11f['fromVersion'])continue;const _0x49a8d1=_0x26d11f['toJSON']();_0x165344['addRevisionData'](_0x49a8d1,(_0x3886c6,_0x46fad3,_0x31d52c)=>{if(_0x273944){if(_0x1daa02)_0x1daa02['_update'](_0x3886c6,_0x46fad3);else{if(!_0x46fad3){const _0x3f500d=_0x31d52c['toJSON']();_0x3f500d['id']=_0x55087c(),_0x4402ff['saveRevision'](_0x3f500d,_0x31d52c['toVersion'])['then'](_0x41115c=>{_0x1daa02=_0x41115c;});}}}else _0x26d11f['_update'](_0x3886c6,_0x46fad3);});}}},RevisionsSidebar),_0x1ff72f);}['_enhanceShowRevisionViewerCallback'](){const _0xf28c12=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x3fd3c1=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x447f07=this['editor']['plugins']['get']('Autosave');await _0x447f07['save']();}else await _0x3fd3c1['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5d268d=this['editor']['plugins']['get']('Dialog');_0x5d268d['isOpen']&&_0x5d268d['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x3587aa=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4b4676 of _0x3587aa)_0x4b4676['class']=_0x4b4676['class']?_0x4b4676['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x11b976=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x11b976&&_0x11b976['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xcd86ab=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xcd86ab&&_0xcd86ab['setAttribute']('tabindex','-1');}}const _0x38aa35=this['_getRevisionViewerEditorConfig']();return _0xf28c12(_0x38aa35)['then'](_0x281268=>{return(this['_viewerEditor']=_0x281268,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'),_0x281268);})['catch'](_0x320d6c=>(console['error'](_0x320d6c),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3be552=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x21ec5e=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x197d52 of _0x21ec5e)_0x197d52['class']='ck-tab-panel_disabled'===_0x197d52['class']?'':_0x197d52['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x1ae869=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x1ae869&&_0x1ae869['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x425dd1=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x425dd1&&_0x425dd1['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x3be552(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x177062=this['editor']['plugins']['get']('Annotations');_0x177062['refreshVisibility'](),_0x177062['refreshPositioning']();}});});}['_showRevisionViewer'](_0x7ebf95){const _0x595a90=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x581840=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x455657=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x455657,_0x7ebf95)['then'](_0x1e793f=>(_0x581840['style']['display']='block',_0x595a90['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1e793f));}['_closeRevisionViewer'](_0x497eae){const _0x40ec84=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x40ec84['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x497eae['destroy']();}async['_restoreRevision'](_0x11dd94){const _0x48ad1e=this['editor'],_0x2eba80=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0xf1e945=_0x48ad1e['plugins']['get']('RevisionTracker'),_0xabc710=_0x48ad1e['plugins']['get']('RevisionHistoryUtils'),_0x8ded6b=_0x2eba80['repository']['getRevision'](_0x11dd94);let _0x1d598c,_0x180891,_0x550707;try{await _0xabc710['loadRevisionData'](_0x8ded6b,this['adapter']),_0x1d598c=_0xabc710['getRevisionDocumentData'](_0x8ded6b),_0x180891=_0xabc710['getRevisionRootsAttributes'](_0x8ded6b);}catch(_0x25def1){return void console['error'](_0x25def1);}_0x48ad1e['model']['change'](_0x5aed60=>{for(const _0x4ae39d of Array['from'](_0x48ad1e['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5aed60['removeMarker'](_0x4ae39d);}),_0x2eba80['isReady']=!0x1,_0x48ad1e['model']['enqueueChange'](_0x147cc1=>{_0x147cc1['setSelection'](null),_0x147cc1['removeSelectionAttribute'](_0x48ad1e['model']['document']['selection']['getAttributeKeys']());const _0x578b00=Object['keys'](_0x1d598c);for(const _0x67aa00 of _0x48ad1e['model']['document']['roots'])'$graveyard'!=_0x67aa00['rootName']&&_0x67aa00['isAttached']()&&!_0x578b00['includes'](_0x67aa00['rootName'])&&_0x147cc1['detachRoot'](_0x67aa00);for(const _0xad344e of _0x578b00){let _0x4f4afb=_0x48ad1e['model']['document']['getRoot'](_0xad344e);if(!_0x4f4afb||!_0x4f4afb['isAttached']()){const _0x3ca181=_0x8ded6b['diffData']?.[_0xad344e]?.['rootElementName']||'$root';_0x4f4afb=_0x147cc1['addRoot'](_0xad344e,_0x3ca181);}const _0x3fe02f=_0x180891[_0xad344e],_0x43cf0a=Object['keys'](_0x3fe02f),_0x21351d=_0x1d598c[_0xad344e];for(const _0xa1e2c3 of _0x4f4afb['getAttributeKeys']())_0x43cf0a['includes'](_0xa1e2c3)||_0x147cc1['removeAttribute'](_0xa1e2c3,_0x4f4afb);for(const _0x475ba0 of _0x43cf0a)_0x147cc1['setAttribute'](_0x475ba0,_0x180891[_0xad344e][_0x475ba0],_0x4f4afb);_0x147cc1['remove'](_0x147cc1['createRangeIn'](_0x4f4afb)),_0x147cc1['insert'](_0x48ad1e['data']['parse'](_0x21351d,_0x4f4afb),_0x4f4afb,0x0);}});const _0x4e0e41=ft(_0x48ad1e['locale'],'Restored');if(_0x8ded6b['name'])_0x550707=-0x1==_0x8ded6b['name']['indexOf'](_0x4e0e41)?_0x4e0e41+':\x20'+_0x8ded6b['name']:_0x8ded6b['name'];else _0x550707=_0x4e0e41+':\x20'+(_0x8ded6b['createdAt']['toLocaleDateString'](_0x48ad1e['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x8ded6b['createdAt']['toLocaleTimeString'](_0x48ad1e['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0xf1e945['saveRevision']({'name':_0x550707}),_0x2eba80['isReady']=!0x0,_0x48ad1e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-revision-history",
|
|
3
|
-
"version": "48.2.0-alpha.
|
|
3
|
+
"version": "48.2.0-alpha.5",
|
|
4
4
|
"description": "Document revision history feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ckeditor/ckeditor5-autosave": "48.2.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-collaboration-core": "48.2.0-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-comments": "48.2.0-alpha.
|
|
40
|
-
"@ckeditor/ckeditor5-core": "48.2.0-alpha.
|
|
41
|
-
"@ckeditor/ckeditor5-engine": "48.2.0-alpha.
|
|
42
|
-
"@ckeditor/ckeditor5-icons": "48.2.0-alpha.
|
|
43
|
-
"@ckeditor/ckeditor5-ui": "48.2.0-alpha.
|
|
44
|
-
"@ckeditor/ckeditor5-utils": "48.2.0-alpha.
|
|
45
|
-
"@ckeditor/ckeditor5-widget": "48.2.0-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-autosave": "48.2.0-alpha.5",
|
|
38
|
+
"@ckeditor/ckeditor5-collaboration-core": "48.2.0-alpha.5",
|
|
39
|
+
"@ckeditor/ckeditor5-comments": "48.2.0-alpha.5",
|
|
40
|
+
"@ckeditor/ckeditor5-core": "48.2.0-alpha.5",
|
|
41
|
+
"@ckeditor/ckeditor5-engine": "48.2.0-alpha.5",
|
|
42
|
+
"@ckeditor/ckeditor5-icons": "48.2.0-alpha.5",
|
|
43
|
+
"@ckeditor/ckeditor5-ui": "48.2.0-alpha.5",
|
|
44
|
+
"@ckeditor/ckeditor5-utils": "48.2.0-alpha.5",
|
|
45
|
+
"@ckeditor/ckeditor5-widget": "48.2.0-alpha.5",
|
|
46
46
|
"@types/luxon": "3.6.2",
|
|
47
47
|
"es-toolkit": "1.45.1",
|
|
48
48
|
"luxon": "3.6.1"
|