@ckeditor/ckeditor5-revision-history 45.2.1-alpha.0 → 45.2.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/dist/index.js +6 -6
- package/package.json +11 -11
- package/src/revisionsrepository.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x5bca80(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x5937a1){super(),this['id']=_0x5937a1['id']||_0x581a69(),this['creator']=_0x5937a1['creator']||null,this['authors']=_0x5937a1['authors']||[],this['diffData']=_0x5937a1['diffData']||null,this['toVersion']=_0x5937a1['toVersion']||0x0,this['fromVersion']=_0x5937a1['fromVersion']||0x0,this['set']('name',_0x5937a1['name']||''),this['set']('createdAt',_0x5937a1['createdAt']||new Date()),this['set']('attributes',_0x5937a1['attributes']||{});}['setName'](_0x66dd36){this['_update']({'name':_0x66dd36});}['setAttribute'](_0x2e9a0f,_0x422ded){const _0x37750b=_0x37c4af(this['attributes']);_0x336eaf(_0x37750b,_0x2e9a0f,_0x422ded),this['_update']({'attributes':_0x37750b});}['removeAttribute'](_0x53e292){const _0x17c3fd=_0x37c4af(this['attributes']);_0x28f1a8(_0x17c3fd,_0x53e292),this['_update']({'attributes':_0x17c3fd});}['_update'](_0x3fe0c4,_0x1b2851=!0x1){let _0x1c0f60=!0x1;const _0xaab459={'id':this['id']},_0x3119c3=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x3f71ac of _0x3119c3){const _0x3feb51=_0x3fe0c4[_0x3f71ac];void 0x0!==_0x3feb51&&_0x3feb51!==this[_0x3f71ac]&&(this[_0x3f71ac]=_0x3feb51,_0xaab459[_0x3f71ac]=_0x3feb51,_0x1c0f60=!0x0);}_0x1c0f60&&(_0xaab459['authors']&&(_0xaab459['authorsIds']=_0xaab459['authors']['map'](_0x45fdbd=>_0x45fdbd['id']),delete _0xaab459['authors']),this['fire']('_update',_0xaab459,_0x1b2851));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x279645=>_0x279645['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x388832{['_revisions'];static get['requires'](){return[_0x1f7964];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1633ca){super(_0x1633ca),this['_revisions']=new _0x42deb6();}['afterInit'](){!async function(_0x3dd69d){const _0x391c11=_0x3d0ebf([0x4f,0x72,0x55,0x46,0x6b,0x6e,0x65,0x4b,0x59,0x52,0x41,0x47,0x74,0x70,0x79,0x73,0x48,0x6c,0x68,0x57,0x5a,0x4e,0x51,0x39,0x78,0x43,0x6a,0x32,0x42,0x34,0x53,0x71,0x38,0x35,0x58,0x50,0x76,0x45,0x77,0x4a,0x67,0x6f,0x36,0x4c,0x4d,0x30,0x7a,0x66,0x6d,0x37,0x75,0x33,0x49,0x64,0x69,0x54,0x62,0x61,0x63,0x44,0x31,0x56]),_0x477446=0xeb829,_0x17022f=0x148636e,_0x53c05d=0x14f09ce^_0x17022f,_0x389027=window[_0x3d0ebf([0x44,0x61,0x74,0x65])][_0x3d0ebf([0x6e,0x6f,0x77])](),_0x49ad16=_0x3dd69d[_0x3d0ebf([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2cf97e=new window[(_0x3d0ebf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c3890=>{_0x49ad16[_0x3d0ebf([0x6f,0x6e,0x63,0x65])](_0x3d0ebf([0x72,0x65,0x61,0x64,0x79]),_0x5c3890);}),_0x5deb92={[_0x3d0ebf([0x6b,0x74,0x79])]:_0x3d0ebf([0x45,0x43]),[_0x3d0ebf([0x75,0x73,0x65])]:_0x3d0ebf([0x73,0x69,0x67]),[_0x3d0ebf([0x63,0x72,0x76])]:_0x3d0ebf([0x50,0x2d,0x32,0x35,0x36]),[_0x3d0ebf([0x78])]:_0x3d0ebf([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]),[_0x3d0ebf([0x79])]:_0x3d0ebf([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]),[_0x3d0ebf([0x61,0x6c,0x67])]:_0x3d0ebf([0x45,0x53,0x32,0x35,0x36])},_0x34b7df=_0x49ad16[_0x3d0ebf([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3d0ebf([0x67,0x65,0x74])](_0x3d0ebf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x26c121(){let _0xe894a4,_0x13c9c0=null,_0x25405c=null;try{if(_0x34b7df==_0x3d0ebf([0x47,0x50,0x4c]))return _0x3d0ebf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xe894a4=_0x585b9d(),!_0xe894a4)return _0x3d0ebf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xe894a4[_0x3d0ebf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x25405c=_0x5c8728(_0xe894a4[_0x3d0ebf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xe894a4[_0x3d0ebf([0x6a,0x74,0x69])])),await _0x46abec()?_0x4512d6()?_0x100af1()?_0x3d0ebf([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2e3e02()?(_0xe894a4[_0x3d0ebf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3d0ebf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x13c9c0=_0x4db6f1(_0x3d0ebf([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xe894a4[_0x3d0ebf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3d0ebf([0x74,0x72,0x69,0x61,0x6c])&&(_0x13c9c0=_0x4db6f1(_0x3d0ebf([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x37ff01()):_0x3d0ebf([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3d0ebf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3d0ebf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3d0ebf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x100af1(){const _0x165b73=[_0x3d0ebf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3d0ebf([0x74,0x72,0x69,0x61,0x6c])][_0x3d0ebf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe894a4[_0x3d0ebf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x389027/0x3e8:0xe10*_0x53c05d;return _0xe894a4[_0x3d0ebf([0x65,0x78,0x70])]<_0x165b73;}function _0x4512d6(){const _0x43c13a=_0xe894a4[_0x3d0ebf([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x43c13a)return!0x1;if(_0x43c13a[_0x3d0ebf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d0ebf([0x2a])))return!0x0;if(_0x43c13a[_0x3d0ebf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d0ebf([0x52,0x48])))return!0x0;if(_0x43c13a[_0x3d0ebf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d0ebf([0x52,0x52,0x48]))){if(_0x14878d())return!0x0;if(_0x212770()||_0x15496c())return!0x0;}return!0x1;}function _0x2e3e02(){const _0x12b438=_0xe894a4[_0x3d0ebf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x12b438||0x0==_0x12b438[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x290a3d}=new URL(window[_0x3d0ebf([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x12b438[_0x3d0ebf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x290a3d))return!0x0;const _0x749775=_0x290a3d[_0x3d0ebf([0x73,0x70,0x6c,0x69,0x74])](_0x3d0ebf([0x2e]));return _0x12b438[_0x3d0ebf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x16af33=>_0x16af33[_0x3d0ebf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d0ebf([0x2a])))[_0x3d0ebf([0x6d,0x61,0x70])](_0x2e7272=>_0x2e7272[_0x3d0ebf([0x73,0x70,0x6c,0x69,0x74])](_0x3d0ebf([0x2e])))[_0x3d0ebf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x50477a=>_0x50477a[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x749775[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3d0ebf([0x6d,0x61,0x70])](_0x25fdca=>Array(_0x749775[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x25fdca[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3d0ebf([0x66,0x69,0x6c,0x6c])](_0x25fdca[0x0]===_0x3d0ebf([0x2a])?_0x3d0ebf([0x2a]):'')[_0x3d0ebf([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x25fdca))[_0x3d0ebf([0x73,0x6f,0x6d,0x65])](_0x50d308=>_0x749775[_0x3d0ebf([0x65,0x76,0x65,0x72,0x79])]((_0x3d9c66,_0x42c954)=>_0x50d308[_0x42c954]===_0x3d9c66||_0x50d308[_0x42c954]===_0x3d0ebf([0x2a])));}function _0x37ff01(){return _0x13c9c0&&_0x25405c?new window[(_0x3d0ebf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x547018,_0x3c75e0)=>{_0x13c9c0[_0x3d0ebf([0x74,0x68,0x65,0x6e])](_0x547018,_0x3c75e0),_0x25405c[_0x3d0ebf([0x74,0x68,0x65,0x6e])](_0x3a1eff=>{_0x3a1eff!=_0x3d0ebf([0x56,0x61,0x6c,0x69,0x64])&&_0x547018(_0x3a1eff);},_0x3c75e0);}):_0x13c9c0||_0x25405c||_0x3d0ebf([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5c8728(_0x4f1033,_0x157722){return new window[(_0x3d0ebf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24b6a9=>{if(_0x17fc35())return _0x24b6a9(_0x3d0ebf([0x56,0x61,0x6c,0x69,0x64]));_0xdb4115(),_0x49ad16[_0x3d0ebf([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3d0ebf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x30b8f8=!0x1;const _0x4b519f=_0x581a69();function _0x247090(_0x1e638f){return!!_0x1e638f&&(typeof _0x1e638f===_0x3d0ebf([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1e638f===_0x3d0ebf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1e638f[_0x3d0ebf([0x74,0x68,0x65,0x6e])]===_0x3d0ebf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1e638f[_0x3d0ebf([0x63,0x61,0x74,0x63,0x68])]===_0x3d0ebf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3457e0(_0x5f0e91){_0x148114(_0x5f0e91)[_0x3d0ebf([0x74,0x68,0x65,0x6e])](_0x26ca7e=>{if(!_0x26ca7e||_0x26ca7e[_0x3d0ebf([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3d0ebf([0x6f,0x6b]))return _0x3d0ebf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5efaa2(_0x16002b(_0x4b519f+_0x157722))!=_0x26ca7e[_0x3d0ebf([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3d0ebf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3d0ebf([0x56,0x61,0x6c,0x69,0x64]);})[_0x3d0ebf([0x74,0x68,0x65,0x6e])](_0x3ae004=>(_0xe2fa4e(),_0x3ae004),()=>{const _0x499686=_0x2b2e94();return null==_0x499686?(_0xe2fa4e(),_0x3d0ebf([0x56,0x61,0x6c,0x69,0x64])):_0x3d0ebf(_0x389027-_0x499686>(0x2544e76e^_0x17022f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3d0ebf([0x74,0x68,0x65,0x6e])](_0x24b6a9)[_0x3d0ebf([0x63,0x61,0x74,0x63,0x68])](()=>{_0x24b6a9(_0x3d0ebf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x50ffc8=0x17e8dee^_0x17022f;function _0xe2fa4e(){const _0x505524=_0x3d0ebf([0x6c,0x6c,0x63,0x74,0x2d])+_0x5efaa2(_0x16002b(_0x4f1033)),_0x3218b0=_0x69e6f9(_0x5efaa2(window[_0x3d0ebf([0x4d,0x61,0x74,0x68])][_0x3d0ebf([0x63,0x65,0x69,0x6c])](_0x389027/_0x50ffc8)));window[_0x3d0ebf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3d0ebf([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x505524,_0x3218b0);}function _0x2b2e94(){const _0x26e57f=_0x3d0ebf([0x6c,0x6c,0x63,0x74,0x2d])+_0x5efaa2(_0x16002b(_0x4f1033)),_0x4777f2=window[_0x3d0ebf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3d0ebf([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x26e57f);return _0x4777f2?window[_0x3d0ebf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x69e6f9(_0x4777f2),0x10)*_0x50ffc8:null;}function _0x148114(_0x58822e){return new window[(_0x3d0ebf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3e1a25,_0x1627c7)=>{_0x58822e[_0x3d0ebf([0x74,0x68,0x65,0x6e])](_0x3e1a25,_0x1627c7),window[_0x3d0ebf([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1627c7,0x149b7ae^_0x17022f);});}}_0x49ad16[_0x3d0ebf([0x6f,0x6e])](_0x3d0ebf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3a33cd,_0x4b6781)=>{if(_0x4b6781[0x0]!=_0x4f1033)return _0x24b6a9(_0x3d0ebf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4b6781[0x1]={..._0x4b6781[0x1],[_0x3d0ebf([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4b519f};},{[_0x3d0ebf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3d0ebf([0x68,0x69,0x67,0x68])}),_0x49ad16[_0x3d0ebf([0x6f,0x6e])](_0x3d0ebf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x275f94=>{_0x247090(_0x275f94[_0x3d0ebf([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x30b8f8=!0x0,_0x3457e0(_0x275f94[_0x3d0ebf([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3d0ebf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3d0ebf([0x6c,0x6f,0x77])}),_0x2cf97e[_0x3d0ebf([0x74,0x68,0x65,0x6e])](()=>{_0x30b8f8||_0x24b6a9(_0x3d0ebf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x17fc35(){return _0x49ad16[_0x3d0ebf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d0ebf([0x76,0x69,0x65,0x77])][_0x3d0ebf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3d0ebf([0x61,0x75,0x74,0x6f]);}function _0xdb4115(){_0x49ad16[_0x3d0ebf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d0ebf([0x76,0x69,0x65,0x77])][_0x3d0ebf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3d0ebf([0x61,0x75,0x74,0x6f]);}}function _0x4db6f1(_0x252d38){const _0x1a71d8=[new window[(_0x3d0ebf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb7f2a0=>setTimeout(_0xb7f2a0,0x1415da2^_0x17022f)),_0x2cf97e[_0x3d0ebf([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3d0ebf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x316b18=>{const _0x5bbf2d=0x1486369^_0x17022f,_0x3f3796=_0x3dd69d[_0x3d0ebf([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x46d33d(){_0x3f3796[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x5bbf2d&&_0x316b18();}_0x46d33d(),_0x3f3796[_0x3d0ebf([0x6f,0x6e])](_0x3d0ebf([0x61,0x64,0x64]),_0x46d33d);})),new window[(_0x3d0ebf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x187616=>{function _0x5de22a(){for(const _0xeeff96 in window)if(window[_0x3d0ebf([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x3d0ebf([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0xeeff96))&&window[_0xeeff96]==_0x477446)return _0x187616();_0x49ad16[_0x3d0ebf([0x73,0x74,0x61,0x74,0x65])]!=_0x3d0ebf([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x3d0ebf([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5de22a,0x14870e6^_0x17022f);}_0x3c6e61(_0x3d0ebf([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x5de22a();})];return window[_0x3d0ebf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3d0ebf([0x72,0x61,0x63,0x65])](_0x1a71d8)[_0x3d0ebf([0x74,0x68,0x65,0x6e])](()=>_0x252d38);}async function _0x43bc4a(){if(await _0x2cf97e,_0x3c6e61(_0x3d0ebf([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x549a1d=_0x3dd69d[_0x3d0ebf([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x3d0e02=_0x3dd69d[_0x3d0ebf([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])](_0x549a1d[_0x3d0ebf([0x69,0x64])]),_0x47b531=_0x30a917(_0x3d0ebf([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x47b531[_0x3d0ebf([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x549a1d['id'],_0x3d0e02?_0x3d0e02['id']:null,!0x0),_0x47b531[_0x3d0ebf([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3d0ebf([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x47b531[_0x3d0ebf([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x47b531[_0x3d0ebf([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x846430,void(_0x47b531[_0x3d0ebf([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x846430);}if(_0x3c6e61(_0x3d0ebf([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x4e2754=_0x30a917(_0x3d0ebf([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x4e2754[_0x3d0ebf([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3d0ebf([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4e2754[_0x3d0ebf([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4e2754[_0x3d0ebf([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x846430,_0x4e2754[_0x3d0ebf([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x846430;}_0x49ad16[_0x3d0ebf([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d0ebf([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x846430,_0x49ad16[_0x3d0ebf([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d0ebf([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x846430,_0x49ad16[_0x3d0ebf([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3d0ebf([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x14878d(){return _0x3c6e61(_0x3d0ebf([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x30a917(_0x3d0ebf([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3d0ebf([0x73,0x74,0x61,0x74,0x65])]==_0x3d0ebf([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x212770(){return _0x3c6e61(_0x3d0ebf([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 _0x15496c(){return _0x3c6e61(_0x3d0ebf([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x14332b(_0x30a6ff){const _0x3c1ca6=_0x1be22f();_0x49ad16[_0x3c1ca6]=_0x3d0ebf([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])+_0x30a6ff,_0x30a6ff[_0x3d0ebf([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x3d0ebf([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x1be22f()]=_0x477446),_0x30a6ff!=_0x3d0ebf([0x56,0x61,0x6c,0x69,0x64])&&_0x43bc4a();}function _0x1be22f(){const _0x5ce1d9=window[_0x3d0ebf([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3d0ebf([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3d0ebf([0x6e,0x6f,0x77])]())[_0x3d0ebf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3d0ebf([0x2e]),'');let _0x189134=_0x3d0ebf([0x4f]);for(let _0x151b63=0x0;_0x151b63<_0x5ce1d9[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x151b63+=0x2){let _0x1ee366=window[_0x3d0ebf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5ce1d9[_0x3d0ebf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x151b63,_0x151b63+0x2));_0x1ee366>=_0x391c11[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1ee366-=_0x391c11[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x189134+=_0x391c11[_0x1ee366];}return _0x189134;}function _0x585b9d(){const _0x56ccea=_0x34b7df[_0x3d0ebf([0x73,0x70,0x6c,0x69,0x74])](_0x3d0ebf([0x2e]));if(0x3!=_0x56ccea[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1ef180(_0x56ccea[0x1]);function _0x1ef180(_0x5784d9){const _0x484b84=_0xfa0f96(_0x5784d9);return _0x484b84&&_0x92809c()?_0x484b84:null;function _0x92809c(){const _0xa67af6=_0x484b84[_0x3d0ebf([0x6a,0x74,0x69])],_0x3f0a84=window[_0x3d0ebf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xa67af6[_0x3d0ebf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xa67af6[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x21b4af={..._0x484b84,[_0x3d0ebf([0x6a,0x74,0x69])]:_0xa67af6[_0x3d0ebf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xa67af6[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x21b4af[_0x3d0ebf([0x76,0x63])],_0x16002b(_0x21b4af)==_0x3f0a84;}}}async function _0x46abec(){let _0x7762b6=!0x0;try{const _0x19550c=_0x34b7df[_0x3d0ebf([0x73,0x70,0x6c,0x69,0x74])](_0x3d0ebf([0x2e])),[_0x2ee489,_0x56bf4d,_0x34802e]=_0x19550c;return _0x46d15d(_0x2ee489),await _0x3f4987(_0x2ee489,_0x56bf4d,_0x34802e),_0x7762b6;}catch{return!0x1;}function _0x46d15d(_0x52f2fe){const _0x20bb65=_0xfa0f96(_0x52f2fe);_0x20bb65&&_0x20bb65[_0x3d0ebf([0x61,0x6c,0x67])]==_0x3d0ebf([0x45,0x53,0x32,0x35,0x36])||(_0x7762b6=!0x1);}async function _0x3f4987(_0xce423d,_0x4337a0,_0x382c89){const _0x41b408=window[_0x3d0ebf([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3d0ebf([0x66,0x72,0x6f,0x6d])](_0x4525d9(_0x382c89),_0x58958c=>_0x58958c[_0x3d0ebf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3fa807=new window[(_0x3d0ebf([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3d0ebf([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xce423d+_0x3d0ebf([0x2e])+_0x4337a0),_0x2fd502=window[_0x3d0ebf([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3d0ebf([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2fd502)return;const _0x1b0194=await _0x2fd502[_0x3d0ebf([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3d0ebf([0x6a,0x77,0x6b]),_0x5deb92,{[_0x3d0ebf([0x6e,0x61,0x6d,0x65])]:_0x3d0ebf([0x45,0x43,0x44,0x53,0x41]),[_0x3d0ebf([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3d0ebf([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3d0ebf([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2fd502[_0x3d0ebf([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3d0ebf([0x6e,0x61,0x6d,0x65])]:_0x3d0ebf([0x45,0x43,0x44,0x53,0x41]),[_0x3d0ebf([0x68,0x61,0x73,0x68])]:{[_0x3d0ebf([0x6e,0x61,0x6d,0x65])]:_0x3d0ebf([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1b0194,_0x41b408,_0x3fa807)||(_0x7762b6=!0x1);}}function _0xfa0f96(_0x56ce25){return _0x56ce25[_0x3d0ebf([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3d0ebf([0x65,0x79]))?JSON[_0x3d0ebf([0x70,0x61,0x72,0x73,0x65])](_0x4525d9(_0x56ce25)):null;}function _0x4525d9(_0x104942){return window[_0x3d0ebf([0x61,0x74,0x6f,0x62])](_0x104942[_0x3d0ebf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3d0ebf([0x2b]))[_0x3d0ebf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3d0ebf([0x2f])));}function _0x16002b(_0x5317b3){let _0x12d31a=0x1505;function _0x55448b(_0x2d297c){for(let _0xc89da8=0x0;_0xc89da8<_0x2d297c[_0x3d0ebf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xc89da8++){const _0x5f160b=_0x2d297c[_0x3d0ebf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xc89da8);_0x12d31a=(_0x12d31a<<0x5)+_0x12d31a+_0x5f160b,_0x12d31a&=_0x12d31a;}}function _0x44bc99(_0x2c4310){Array[_0x3d0ebf([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2c4310)?_0x2c4310[_0x3d0ebf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x44bc99):_0x2c4310&&typeof _0x2c4310==_0x3d0ebf([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3d0ebf([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2c4310)[_0x3d0ebf([0x73,0x6f,0x72,0x74])]()[_0x3d0ebf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x455735,_0x48c690])=>{_0x55448b(_0x455735),_0x44bc99(_0x48c690);}):_0x55448b(window[_0x3d0ebf([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2c4310));}return _0x44bc99(_0x5317b3),_0x12d31a>>>0x0;}function _0x5efaa2(_0x4970f7){return _0x4970f7[_0x3d0ebf([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3d0ebf([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3d0ebf([0x30]));}function _0x69e6f9(_0x323e13){return _0x323e13[_0x3d0ebf([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3d0ebf([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3d0ebf([0x6a,0x6f,0x69,0x6e])]('');}function _0x3c6e61(_0x1c43a8){return _0x49ad16[_0x3d0ebf([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3d0ebf([0x68,0x61,0x73])](_0x1c43a8);}function _0x30a917(_0x1326d8){return _0x49ad16[_0x3d0ebf([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3d0ebf([0x67,0x65,0x74])](_0x1326d8);}function _0x846430(){}function _0x3d0ebf(_0x37b3ef){return _0x37b3ef['map'](_0x43142f=>String['fromCharCode'](_0x43142f))['join']('');}_0x14332b(await _0x26c121());}(this);}['createRevision'](_0x26348b){const _0x200575=this['editor']['plugins']['get']('Users');return new h({'id':_0x26348b['id'],'name':_0x26348b['name'],'creator':_0x26348b['creatorId']?_0x200575['getUser'](_0x26348b['creatorId']):null,'diffData':_0x26348b['diffData']||_0x26348b['data'],'authors':_0x26348b['authorsIds']['map'](_0x4054e8=>_0x200575['getUser'](_0x4054e8)),'createdAt':new Date(_0x26348b['createdAt']),'attributes':_0x26348b['attributes'],'fromVersion':_0x26348b['fromVersion'],'toVersion':_0x26348b['toVersion']});}['addRevision'](_0x37cd72,_0x5134c0=0x0){this['_revisions']['add'](_0x37cd72,_0x5134c0);}['getRevision'](_0x43e8ee){return this['_revisions']['get'](_0x43e8ee);}['getRevisions'](_0x41caf4={'toJSON':!0x1}){const _0x43caf7=Array['from'](this['_revisions']);return _0x43caf7['reverse'](),_0x41caf4['toJSON']?_0x43caf7['map'](_0x3ca676=>_0x3ca676['toJSON']()):_0x43caf7;}['getIndex'](_0x553d1d){return this['_revisions']['getIndex'](_0x553d1d);}['getEarlierVisibleRevision'](_0x57bce6){const [,_0x4b462a]=this['getRevisionsIterator'](_0x57bce6,{'direction':'earlier'});return _0x4b462a;}['getLaterVisibleRevision'](_0x5259ed){const [,_0x385945]=this['getRevisionsIterator'](_0x5259ed,{'direction':'later'});return _0x385945;}['getRevisionsInDiff'](_0x29f4b6){const _0x158da8=[];for(const _0x242a1c of this['getRevisionsIterator'](_0x29f4b6['newRevisionId']))if(_0x158da8['push'](_0x242a1c),_0x242a1c['id']===_0x29f4b6['oldRevisionId'])break;return _0x158da8;}*['getRevisionsIterator'](_0x574353,{direction:_0x195d11='earlier',filter:_0x2b69d9=()=>!0x0}={}){const _0x752a5='earlier'===_0x195d11?0x1:-0x1;let _0x3732a7=this['_revisions']['get'](_0x574353),_0x14e860=this['getIndex'](_0x3732a7);for(yield _0x3732a7;_0x3732a7;){if(_0x14e860+=_0x752a5,_0x3732a7=this['getRevision'](_0x14e860),!_0x3732a7)return;_0x2b69d9(_0x3732a7)&&(yield _0x3732a7);}}}class V extends _0x388832{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x529951,'c'],[_0x187db2,'a'],[_0x4215f4,'e'],[_0x2fea0e,'r'],[_0x930fa2,'u']]);['_typeCharToViewClass']=new Map([['c',_0x529951],['a',_0x187db2],['e',_0x4215f4],['r',_0x2fea0e],['u',_0x930fa2]]);async['loadRevisionData'](_0x5a8776,_0x4b53b5){if(_0x5a8776['diffData']||!_0x4b53b5)return;const _0x54173e=this['editor']['config']['get']('collaboration.channelId'),_0x1895ad=await _0x4b53b5['getRevision']({'channelId':_0x54173e,'revisionId':_0x5a8776['id']});_0x5a8776['diffData']=_0x1895ad['diffData'];}['getRevisionDocumentData'](_0x4f2d20){const _0xf58113={};for(const _0xd709f9 in _0x4f2d20['diffData']){if(_0x4f2d20['diffData'][_0xd709f9]['attachChange']&&!_0x4f2d20['diffData'][_0xd709f9]['attachChange']['isAttached'])continue;const _0x3674b5=this['_removeRevisionMarkers'](JSON['parse'](_0x4f2d20['diffData'][_0xd709f9]['insertions'])),_0x3163b4=this['editor']['editing']['view']['document'],_0x1c7763=new _0x47c062(_0x3163b4,_0x3674b5['map'](_0x15d794=>this['_getViewFromDiffObj'](_0x15d794,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0xf58113[_0xd709f9]=this['editor']['data']['processor']['toData'](_0x1c7763),this['editor']['data']['processor']['useFillerType']('default');}return _0xf58113;}['getRevisionRootsAttributes'](_0x5165e6){const _0x1a8bf2={};for(const _0x311912 in _0x5165e6['diffData'])_0x5165e6['diffData'][_0x311912]['attachChange']&&!_0x5165e6['diffData'][_0x311912]['attachChange']['isAttached']||(_0x1a8bf2[_0x311912]=_0x5165e6['diffData'][_0x311912]['attributesAfter']||{});return _0x1a8bf2;}['_getTypeCharForViewElement'](_0xa165ba){return this['_viewClassToTypeChar']['get'](_0xa165ba['constructor']);}['_getViewFromDiffObj'](_0x37d4bf,_0x276608){const _0x3b92ea=this['editor']['editing']['view']['document'];if('string'==typeof _0x37d4bf)return new _0x753ea8(_0x3b92ea,_0x37d4bf);{let _0xa815a6,_0x32dfb1;_0x32dfb1='u'==_0x37d4bf['type']||'r'==_0x37d4bf['type']?[]:_0x37d4bf['children']['map'](_0x461ecb=>this['_getViewFromDiffObj'](_0x461ecb,_0x276608));const _0x2b9d19=this['_typeCharToViewClass']['get'](_0x37d4bf['type'])||_0x48db47,_0x1a252a=this['editor']['data']['htmlProcessor']['domConverter'];if(_0xa815a6=new _0x2b9d19(_0x3b92ea,_0x37d4bf['name'],_0x37d4bf['attributes'],_0x32dfb1),'u'==_0x37d4bf['type']&&_0x37d4bf['children'][0x0]){const _0x1f8c9c=_0x37d4bf['children'][0x0];if(_0xa815a6['render']=function(_0x54bfa2){const _0x529b87=_0x54bfa2['createElement']('div');return _0x529b87['innerHTML']=_0x1f8c9c,_0x529b87['childNodes'][0x0];},_0x276608){const _0x5a9b43=new _0x47c062(_0x3b92ea);_0x5a9b43['_appendChild'](_0xa815a6);const _0xb607a6=Array['from'](_0x1a252a['viewChildrenToDom'](_0x5a9b43,{'bind':!0x1})),_0xd4467a=_0x1a252a['domDocument']['createElement']('div');_0xd4467a['append'](..._0xb607a6),_0xa815a6=Array['from'](_0x1a252a['domChildrenToView'](_0xd4467a))[0x0];}}else{if('r'==_0x37d4bf['type']&&_0x37d4bf['children'][0x0]){const _0x3308ec=_0x37d4bf['children'][0x0];if(_0xa815a6['render']=function(_0xba968){_0xba968['innerHTML']=_0x3308ec;},_0x276608){const _0x536198=new _0x47c062(_0x3b92ea);_0x536198['_appendChild'](_0xa815a6);const _0x348192=Array['from'](_0x1a252a['viewChildrenToDom'](_0x536198,{'bind':!0x1})),_0x336bc3=_0x1a252a['domDocument']['createElement']('div');_0x336bc3['append'](..._0x348192);const _0x5aa982=Array['from'](_0x1a252a['domChildrenToView'](_0x336bc3));_0x5aa982['length']>0x1?_0xa815a6['_appendChild'](_0x5aa982):_0xa815a6=_0x5aa982[0x0];}}}if(_0x37d4bf['customProperties']){for(const [_0x1a1425,_0x4ce0c4]of _0x37d4bf['customProperties'])_0xa815a6['_setCustomProperty'](_0x1a1425,_0x4ce0c4);}const _0x3a33d4=void 0x0===_0x37d4bf['fillerOffset']?null:_0x37d4bf['fillerOffset'];return null!==_0x3a33d4&&(_0xa815a6['getFillerOffset']=()=>_0x3a33d4),_0xa815a6;}}['_makeModelFromViewString'](_0x2e762f){const _0x5ea982=JSON['parse'](_0x2e762f),_0x58950c=this['editor']['editing']['view']['document'],_0x598bc8=new _0x47c062(_0x58950c,_0x5ea982['map'](_0x23d42d=>this['_getViewFromDiffObj'](_0x23d42d,!0x0)));return this['editor']['data']['toModel'](_0x598bc8);}['_removeRevisionMarkers'](_0x1f5ccb){return(_0x1f5ccb=_0x1f5ccb['filter'](_0x1f8c61=>!_0x1f8c61['name']||'revision-start'!==_0x1f8c61['name']&&'revision-end'!==_0x1f8c61['name']))['forEach'](_0x47c34a=>{'string'!=typeof _0x47c34a&&(_0x47c34a['children']=this['_removeRevisionMarkers'](_0x47c34a['children']),_0x47c34a['attributes']=_0x47c34a['attributes']['filter'](_0x1bdc30=>!_0x1bdc30[0x0]['startsWith']('data-revision-')));}),_0x1f5ccb;}}function g(_0x6052ab,_0x1e2942,_0x1a8caf){const t=_0x6052ab['t'];switch(_0x1e2942){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'},_0x1a8caf);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1a8caf);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class u extends _0x388832{['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[_0x1f7964,I,V,_0x4a098f];}constructor(_0xf1ad41){super(_0xf1ad41),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3a2f02=_0x581a69();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3a2f02},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 _0x85d5e0=this['repository']['getRevision'](0x0),_0x4ea8e0=_0x85d5e0&&null===_0x85d5e0['creator']?_0x85d5e0:null;if(this['_continueCurrentRevision']=!!_0x4ea8e0&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1d4b8e=this['_source']['getCurrentRevisionId'](),_0x89d070=this['repository']['getRevision'](_0x1d4b8e);if(_0x89d070)this['_startingVersion']=_0x89d070['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1cdd27=this['_source']['history']['_operations']['find'](_0xce7824=>!_0xce7824['_isInit']),_0x573d71=_0x1cdd27?_0x1cdd27['baseVersion']:this['_source']['history']['version'];_0x85d5e0?(_0x85d5e0['toVersion']<_0x573d71&&_0x85d5e0['_update']({'toVersion':_0x573d71}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x4ea8e0['id'],this['_startingVersion']=_0x4ea8e0['fromVersion']):(this['_startingVersion']=_0x85d5e0['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x573d71,this['_continueCurrentRevision']=!0x1);}}else _0x4ea8e0&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x4ea8e0['toVersion'],this['editor']['model']['document']['history']['version']),_0x4ea8e0['fromVersion']===_0x4ea8e0['toVersion']?(0x0!==_0x4ea8e0['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x4ea8e0['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x4ea8e0['id'],this['_startingVersion']=_0x4ea8e0['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',_0x3df2d5=>!_0x3df2d5),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x8981db=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x49d0c4;for(const _0x41fb0b in _0x8981db){const _0x48f297=_0x41fb0b,_0x25e242=_0x8981db[_0x48f297];if('revisionHistoryLicenseKeyValid'==_0x25e242||'revisionHistoryLicenseKeyInvalid'==_0x25e242||'revisionHistoryLicenseKeyExpired'==_0x25e242||'revisionHistoryLicenseKeyDomainLimit'==_0x25e242||'revisionHistoryLicenseKeyNotAllowed'==_0x25e242||'revisionHistoryLicenseKeyEvaluationLimit'==_0x25e242||'revisionHistoryLicenseKeyTrialLimit'==_0x25e242||'revisionHistoryLicenseKeyUsageLimit'==_0x25e242){delete _0x8981db[_0x48f297],_0x49d0c4=_0x25e242,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x49d0c4&&_0x8981db['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x49d0c4&&_0x8981db['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x49d0c4&&_0x8981db['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x49d0c4&&_0x8981db['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x49d0c4&&_0x8981db['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x49d0c4&&_0x8981db['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x49d0c4&&_0x8981db['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x25b0f9=this['repository']['getRevision'](0x0),_0x48c0cc=await this['getRevisionDocumentData'](_0x25b0f9),_0x5ad103=await this['getRevisionRootsAttributes'](_0x25b0f9);this['_replaceEditorDataWithRevisionData'](_0x48c0cc,_0x5ad103);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x59e3ac){this['_source']=_0x59e3ac;}async['update'](){const _0x3d1a28=await this['_source']['getLatestVersion']();if(_0x3d1a28>this['currentRevision']['toVersion']){await this['_loadState']();const _0x43aa60=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3d1a28});_0x43aa60['authors']=_0x43aa60['authorsIds']['map'](_0x16e1a7=>this['editor']['plugins']['get']('Users')['getUser'](_0x16e1a7)),this['currentRevision']['_update'](_0x43aa60);}}async['saveRevision'](_0x31496b={},_0x371f49=null){const _0x31c37d=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x371f49>this['currentRevision']['toVersion']&&(_0x371f49=null),null===_0x371f49&&(_0x371f49=await this['_source']['getLatestVersion']());const _0x29b65c=this['_getFromVersion'](_0x371f49),_0x283d39=this['buildRevisionData']({'from':_0x29b65c,'to':_0x371f49});if(this['currentRevision']['toVersion']<_0x371f49){const _0x272088=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x371f49,'to':_0x371f49});_0x272088['authors']=[],_0x272088['authorsIds']=[],_0x272088['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x272088,!0x0),delete _0x272088['authors'],_0x31c37d['push'](_0x272088);}_0x31496b['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x31496b['name']=_0x31496b['name']||null,_0x31496b['id']=_0x31496b['id']||_0x581a69(),_0x31496b={..._0x31496b,..._0x283d39};const _0x5bc781=this['addRevisionData'](_0x31496b);_0x31c37d['push'](_0x31496b);const _0xb9c581=this['repository']['getIndex'](_0x5bc781);if(0x0!==_0xb9c581){const _0x463a26=this['repository']['getRevision'](_0xb9c581-0x1);if(_0x463a26['fromVersion']!==_0x371f49){const _0xb0b056=this['_revisionDataBuilder']['getData'](_0x371f49,_0x463a26['toVersion']),_0x3a0e0c={'id':_0x463a26['id'],'diffData':_0xb0b056['diffData'],'authorsIds':_0xb0b056['authorsIds'],'authors':_0xb0b056['authorsIds']['map'](_0x23673c=>this['editor']['plugins']['get']('Users')['getUser'](_0x23673c)),'fromVersion':_0x371f49};_0x463a26===this['currentRevision']&&(_0x3a0e0c['createdAt']=new Date(_0x31496b['createdAt']['getTime']()+0xa)),_0x463a26['_update'](_0x3a0e0c,!0x0),delete _0x3a0e0c['authors'],_0x31c37d['push'](_0x3a0e0c);}}if(this['adapter']){for(const _0xeecda8 of _0x31c37d)this['_bufferUpdate'](_0xeecda8['id'],_0xeecda8,!0x0);this['sendBufferedUpdates']();}return _0x5bc781;}['addRevisionData'](_0x340c5e){const _0xa5413b=this['repository']['createRevision'](_0x340c5e);return this['adapter']&&_0xa5413b['on']('_update',(_0x446437,_0x12af44,_0x21f9a1)=>{_0x21f9a1||(this['_bufferUpdate'](_0x12af44['id'],_0x12af44,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0xa5413b,this['_findInsertionIndex'](_0xa5413b)),_0xa5413b;}async['getRevisionDocumentData'](_0x2202bd){return await this['_utils']['loadRevisionData'](_0x2202bd,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2202bd);}async['getRevisionRootsAttributes'](_0x363e01){return await this['_utils']['loadRevisionData'](_0x363e01,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x363e01);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2c4774=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x4c5748=0x0;_0x4c5748<_0x2c4774['length'];_0x4c5748++){const _0x1537a7=_0x2c4774[_0x4c5748];let _0x5e9627=!0x1;for(const _0x21a6ce of Object['keys'](_0x1537a7))void 0x0===_0x1537a7[_0x21a6ce]?delete _0x1537a7[_0x21a6ce]:'id'!==_0x21a6ce&&(_0x5e9627=!0x0);_0x5e9627||(_0x2c4774[_0x4c5748]=null);}if(_0x2c4774=_0x2c4774['filter'](_0x56e0b8=>null!==_0x56e0b8),!_0x2c4774['length'])return;for(let _0x45e3c2=0x0;_0x45e3c2<_0x2c4774['length'];_0x45e3c2++){const _0x229869=_0x2c4774[_0x45e3c2];void 0x0!==_0x229869['fromVersion']&&void 0x0===_0x229869['toVersion']&&(_0x229869['toVersion']=this['repository']['getRevision'](_0x229869['id'])['toVersion']),void 0x0!==_0x229869['toVersion']&&void 0x0===_0x229869['fromVersion']&&(_0x229869['fromVersion']=this['repository']['getRevision'](_0x229869['id'])['fromVersion']);}const _0x2c88e5=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2c4774,_0x2c88e5)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x2f0d93=>{if(_0x2f0d93){for(const _0x2cca4b of _0x2f0d93)this['setRevisionData']({'id':_0x2cca4b['id'],'createdAt':_0x2cca4b['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x5b23e4=null,from:_0x219445=null,to:_0xd1d1b1=null}){_0x219445=null!==_0x219445?_0x219445:_0x5b23e4['fromVersion'],_0xd1d1b1=null!==_0xd1d1b1?_0xd1d1b1:_0x5b23e4['toVersion'];const _0x14eaf5=this['_revisionDataBuilder']['getData'](_0x219445,_0xd1d1b1),_0x2cb498={'diffData':_0x14eaf5['diffData'],'authorsIds':_0x14eaf5['authorsIds'],'fromVersion':_0x219445,'toVersion':_0xd1d1b1};if(!_0x5b23e4||_0xd1d1b1!==_0x5b23e4['toVersion']){const _0x2db764=_0xd1d1b1-0x1,_0x552958=this['_source']['history']['getOperation'](_0x2db764);_0x2cb498['createdAt']=_0x552958&&_0x552958['createdAt']||new Date();}if(this['_loadedStateData']&&_0x219445===this['_loadedStateData']['fromVersion']){for(const _0x295a56 of this['_loadedStateData']['authors'])_0x2cb498['authorsIds']['includes'](_0x295a56['id'])||_0x2cb498['authorsIds']['push'](_0x295a56['id']);}return _0x2cb498;}['_bufferUpdate'](_0x28a5a6,_0x4f3569,_0x1a0316){if(this['_bufferedUpdates']['has'](_0x28a5a6)){const _0x3e3157=this['_bufferedUpdates']['get'](_0x28a5a6);_0x4f3569=_0x1a0316?{..._0x3e3157,..._0x4f3569}:{..._0x4f3569,..._0x3e3157};}this['_bufferedUpdates']['set'](_0x28a5a6,_0x4f3569);}['setRevisionData'](_0x2c8f8f){const _0x1ba600=this['repository']['getRevision'](_0x2c8f8f['id']);if(_0x2c8f8f['createdAt']&&(_0x2c8f8f['createdAt']=new Date(_0x2c8f8f['createdAt'])),_0x2c8f8f['authorsIds']){const _0x28d3df=this['editor']['plugins']['get']('Users');_0x2c8f8f['authors']=_0x2c8f8f['authorsIds']['map'](_0x42ba3b=>_0x28d3df['getUser'](_0x42ba3b));}_0x1ba600['_update'](_0x2c8f8f,!0x0);}['_createInitialRevision'](_0x525db8){const _0x41baf9=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x41baf9)this['_initialRevisionId']=_0x41baf9['id'];else{const _0x3e8113=!this['editor']['model']['document']['roots']['find'](_0x353232=>this['editor']['model']['hasContent'](_0x353232)),_0x2f33de=this['editor']['plugins']['get']('Users')['me']['id'],_0x5aebec=g(this['editor']['locale'],_0x3e8113?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x525db8,'to':_0x525db8,'id':this['_initialRevisionId'],'name':_0x5aebec,'creatorId':_0x2f33de});}}['_createCurrentRevision'](_0x20a293){const _0x46888e=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x46888e),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x20a293,'to':_0x20a293,'id':_0x46888e,'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'](_0x546da0,_0x226476){let _0x4e18ec=this['editor']['config']['get']('initialData'),_0x3cd6ab=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x4e18ec){_0x4e18ec={};for(const _0x226f14 of this['editor']['model']['document']['getRootNames']())_0x4e18ec[_0x226f14]='';}if('string'==typeof _0x4e18ec&&(_0x4e18ec={'main':_0x4e18ec}),void 0x0===_0x3cd6ab){_0x3cd6ab={};for(const _0x27e6b9 of this['editor']['model']['document']['getRootNames']())_0x3cd6ab[_0x27e6b9]={};}let _0x2ddf73=!0x1;const _0x45c0cc=Object['keys'](_0x4e18ec),_0x1778f5=Object['keys'](_0x546da0);for(const _0x4573ad of _0x45c0cc){if(_0x4e18ec[_0x4573ad]!==_0x546da0[_0x4573ad]&&''!==_0x4e18ec[_0x4573ad]['trim']()){_0x2ddf73=!0x0;break;}if(!_0x4d440b(_0x3cd6ab[_0x4573ad],_0x226476[_0x4573ad])&&Object['keys'](_0x3cd6ab[_0x4573ad])['length']>0x0){_0x2ddf73=!0x0;break;}}_0x2ddf73||(_0x2ddf73=_0x1778f5['some'](_0x4c2729=>!this['editor']['model']['document']['getRoot'](_0x4c2729))),_0x2ddf73&&_0x229fbf('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4e18ec,'editorRootsAttributes':_0x3cd6ab,'revisionData':_0x546da0,'revisionRootsAttributes':_0x226476}),this['editor']['config']['set']('initialData',_0x546da0),this['editor']['config']['set']('rootsAttributes',_0x226476);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x73fac3=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x73fac3['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x2204f7){const _0x31b2f5=this['repository']['getRevisions']();_0x31b2f5['reverse']();let _0x3b113b=0x0;for(;_0x3b113b<_0x31b2f5['length'];){const _0x2b97cf=_0x31b2f5[_0x3b113b];if(_0x2b97cf===this['currentRevision']){_0x3b113b++;continue;}if(_0x2b97cf['id']===this['_initialRevisionId'])break;const _0x46fe5d=_0x2204f7['toVersion']-_0x2b97cf['toVersion']||_0x2204f7['fromVersion']-_0x2b97cf['fromVersion'];if(_0x46fe5d>0x0)break;if(_0x46fe5d<0x0)_0x3b113b++;else{if(!_0x2204f7['creator']&&_0x2b97cf['creator'])break;if(_0x2b97cf['creator']||!_0x2204f7['creator']){if(_0x2204f7['createdAt']>_0x2b97cf['createdAt'])break;_0x3b113b++;}else _0x3b113b++;}}return _0x3b113b;}['_getFromVersion'](_0xf6073d){const _0x4abfd6=this['repository']['getRevisions']();_0x4abfd6['reverse'](),_0x4abfd6['shift']();const _0x3df090=_0x4abfd6['find'](_0x3c6660=>_0x3c6660['toVersion']<=_0xf6073d)['toVersion'];return _0x3df090<this['_startingVersion']?this['_startingVersion']:_0x3df090;}['_makeRevision']({name:_0x5c6c58,from:_0x35362a,to:_0x3efe39,creatorId:_0x11cd45,id:_0x46c3e8}){const _0x2676a7=this['buildRevisionData']({'from':_0x35362a,'to':_0x3efe39});_0x2676a7['name']=_0x5c6c58,_0x2676a7['creatorId']=_0x11cd45,_0x2676a7['id']=_0x46c3e8;const _0x5c62d0=this['addRevisionData'](_0x2676a7);return this['adapter']&&this['_bufferUpdate'](_0x2676a7['id'],_0x2676a7,!0x0),_0x5c62d0;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x1be778){this['editor']=_0x1be778,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'](_0x5cd320){this['source']=_0x5cd320;const _0x52652a=new Map(),_0x3a5caa=new Map(),_0x5b29a3=this['editor']['model']['document']['roots']['map'](_0x470ef7=>_0x470ef7['rootName']);for(const _0x347020 of _0x5b29a3){const _0x2f911a=this['editor']['model']['document']['getRoot'](_0x347020),_0x5d5820=N(_0x2f911a);_0x52652a['set'](_0x347020,_0x5d5820),_0x3a5caa['set'](_0x347020,Object['fromEntries'](_0x2f911a['getAttributes']()));}const _0x130ebf=Array['from'](this['editor']['model']['markers'])['map'](_0x57707f=>[_0x57707f['name'],_0x57707f['getRange']()]),_0x2bc21f=this['source']['version'];this['_saveMetaData'](_0x2bc21f,_0x52652a,_0x130ebf,_0x3a5caa),this['_startingRevisionId']=this['_revisionId'];const _0x392be9=new Map(),_0x4e8991=new Map();for(const _0x30785d of _0x5b29a3){const _0x423420=P(_0x30785d);_0x392be9['set'](_0x30785d,_0x423420),_0x4e8991['set'](_0x30785d,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x392be9,[],_0x4e8991);}['getData'](_0x5f1abd,_0xdd200b){if(this['_lastFrom']===_0x5f1abd&&this['_lastTo']<=_0xdd200b)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0xdd200b,!0x0);else{if(!this['_savedMetaData']['has'](_0x5f1abd)){const _0x4615a9=this['_getPreviousFrom'](_0x5f1abd);this['_calculateMetaData'](_0x4615a9,_0x5f1abd,!0x1);}this['_calculateMetaData'](_0x5f1abd,_0xdd200b,!0x0);}return this['_lastFrom']=_0x5f1abd,this['_lastTo']=_0xdd200b,this['_getState']();}['loadState'](_0x5e82cf){const _0x2b2f3a=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5e82cf['fromVersion'],this['_lastTo']=_0x5e82cf['toVersion'];for(const _0x520040 in _0x5e82cf['diffData']){const _0x5e5157=_0x5e82cf['diffData'][_0x520040]['attachChange'],_0x3922a7=_0x37c4af(_0x5e82cf['diffData'][_0x520040]['attributesBefore'])||{},_0x31f693=_0x2b2f3a['_makeModelFromViewString'](_0x5e82cf['diffData'][_0x520040]['deletions']);_0x31f693['rootName']=_0x520040,_0x31f693['_isAttached']=!_0x5e5157||!_0x5e5157['isAttached'],_0x31f693['isAttached']=()=>_0x31f693['_isAttached'],this['_baseRoots']['set'](_0x520040,_0x31f693),this['_baseRootsAttributes']['set'](_0x520040,_0x3922a7),_0x5e5157&&this['_touchedRoots']['set'](_0x520040,_0x5e5157);const _0x5da6c7=this['_makeIdsRoot'](_0x31f693);this['_baseIdsRoots']['set'](_0x520040,_0x5da6c7);for(const [_0x50155c,_0x41c17e]of _0x31f693['markers']){if(!_0x50155c['startsWith']('revision:'))continue;const _0x240c8c=_0x50155c['split'](':')[0x2];for(const _0x442d12 of _0x41c17e['getWalker']({'singleCharacters':!0x0})){const _0x526163=this['_getVidAttributeName'](_0x442d12),_0x255806='elementEnd'==_0x442d12['type']?_0x442d12['previousPosition']['path']['slice'](0x0,-0x1):_0x442d12['previousPosition']['path'],_0x432e76=_0x5da6c7['getNodeByPath'](_0x255806)['getAttribute'](_0x526163);this['_touched']['set'](_0x432e76,{'userId':_0x240c8c});}}}this['_startingRevisionId']=this['_revisionId'];const _0xaf7e19=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x488aad=>!this['_touched']['has'](_0x488aad));let _0x188ebd=0x0;const _0x4eac6a=new Map();for(const _0x5d5e1b in _0x5e82cf['diffData']){const _0x4b1e04=_0x5e82cf['diffData'][_0x5d5e1b]['attachChange'],_0x34371c=_0x37c4af(_0x5e82cf['diffData'][_0x5d5e1b]['attributesAfter'])||{},_0x2db01e=_0x2b2f3a['_makeModelFromViewString'](_0x5e82cf['diffData'][_0x5d5e1b]['insertions']);_0x2db01e['rootName']=_0x5d5e1b,_0x2db01e['_isAttached']=!_0x4b1e04||_0x4b1e04['isAttached'],_0x2db01e['isAttached']=()=>_0x2db01e['_isAttached'],this['_diffRoots']['set'](_0x5d5e1b,_0x2db01e),this['_diffRootsAttributes']['set'](_0x5d5e1b,_0x34371c);const _0x26df47=this['_makeIdsRoot'](_0x2db01e,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5d5e1b,_0x26df47),_0x4eac6a['set'](_0x5d5e1b,_0x2db01e['isAttached']()?_0x34371c:{});for(const [_0x17791a,_0x33ba6d]of _0x2db01e['markers']){if(!_0x17791a['startsWith']('revision:'))continue;const _0x14cc85=_0x17791a['split'](':')[0x2];for(const _0x389958 of _0x33ba6d['getWalker']({'singleCharacters':!0x0})){const _0x51ee3d=this['_getVidAttributeName'](_0x389958),_0x3cad70=this['_revisionId']++,_0x47929a='elementEnd'==_0x389958['type']?_0x389958['previousPosition']['path']['slice'](0x0,-0x1):_0x389958['previousPosition']['path'];_0x26df47['getNodeByPath'](_0x47929a)['_setAttribute'](_0x51ee3d,_0x3cad70),this['_touched']['set'](_0x3cad70,{'userId':_0x14cc85});}}for(const _0x40442f of this['editor']['model']['createRangeIn'](_0x2db01e)['getWalker']({'singleCharacters':!0x0})){const _0x10b110=this['_getVidAttributeName'](_0x40442f),_0x1d8937='elementEnd'==_0x40442f['type']?_0x40442f['previousPosition']['path']['slice'](0x0,-0x1):_0x40442f['previousPosition']['path'],_0x5a3923=_0x26df47['getNodeByPath'](_0x1d8937);_0x5a3923['getAttribute'](_0x10b110)>0x0||_0x5a3923['_setAttribute'](_0x10b110,_0xaf7e19[_0x188ebd++]);}for(const [_0x2c830a,_0xaa4b34]of _0x2db01e['markers'])_0x2c830a['startsWith']('revision:')||this['_markers']['set'](_0x2c830a,_0xaa4b34);}const _0x25f818=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x25f818),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x25f818,0x1));const _0x15127a=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x15127a),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x15127a,0x1));const _0x2284a6=Array['from'](this['_diffRoots'])['map'](([_0x431976,_0x4454ff])=>[_0x431976,N(_0x4454ff)]);this['_saveMetaData'](this['_lastTo'],_0x2284a6,this['_markers'],_0x4eac6a);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x13e088,_0x7a9fa0,_0x3de1d3,_0x5b47ad){const _0xf3250e=new Map(_0x7a9fa0),_0x5f011b=new Map(_0x37c4af(_0x5b47ad)),_0x1c6615=new Map();for(const [_0x20bb60,_0x20616d]of _0x3de1d3)_0x1c6615['set'](_0x20bb60,{'start':_0x20616d['start']['clone'](),'end':_0x20616d['end']['clone'](),'rootName':_0x20616d['root']['rootName']});this['_savedMetaData']['set'](_0x13e088,{'roots':_0xf3250e,'markers':_0x1c6615,'rootsAttributes':_0x5f011b});}['_removeMetaData'](_0x5a533a){this['_savedMetaData']['delete'](_0x5a533a);}['_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'](_0x3c3a0c,_0x35adc0=null){let _0x59cb43=null;_0x3c3a0c['is']('documentFragment')||(_0x59cb43=new ut(_0x3c3a0c['name'],{'vid_start':null===_0x35adc0?this['_revisionId']++:_0x35adc0++}));const _0x10262e=[];for(const _0x1a6c42 of _0x3c3a0c['getChildren']())if(_0x1a6c42['is']('element')){_0x10262e['push'](this['_makeIdsRoot'](_0x1a6c42,_0x35adc0));const _0x51a6d6=_0x10262e[_0x10262e['length']-0x1];null!==_0x35adc0&&(_0x35adc0=_0x51a6d6['is']('element','$text')?_0x51a6d6['getAttribute']('vid')+0x1:_0x51a6d6['getAttribute']('vid_end')+0x1);}else{for(let _0x30fe94=0x0;_0x30fe94<_0x1a6c42['offsetSize'];_0x30fe94++)_0x10262e['push'](new ut('$text',{'vid':null===_0x35adc0?this['_revisionId']++:_0x35adc0++}));}if(_0x3c3a0c['is']('documentFragment')){const _0x1775f4=P(_0x3c3a0c['rootName']);return _0x1775f4['_insertChild'](0x0,_0x10262e),_0x1775f4;}return _0x59cb43['_setAttribute']('vid_end',null===_0x35adc0?this['_revisionId']++:_0x35adc0++),_0x59cb43['_insertChild'](0x0,_0x10262e),_0x59cb43;}['_calculateMetaData'](_0x3febc4,_0x4fe55a,_0x175cd5){this['_reset']();const {roots:_0x1d5200,markers:_0x4a9b70,rootsAttributes:_0x49d7a4}=this['_savedMetaData']['get'](_0x3febc4);this['_baseRoots']=new Map(_0x1d5200),this['_baseRootsAttributes']=new Map(_0x37c4af(_0x49d7a4));for(const [_0xee1849,_0x2d6109]of this['_baseRoots'])if('$graveyard'!==_0xee1849&&(this['_diffRoots']['set'](_0xee1849,N(_0x2d6109)),this['_diffRootsAttributes']=new Map(_0x37c4af(_0x49d7a4)),_0x175cd5)){const _0x16d21b=this['_revisionId'];this['_idsRoots']['set'](_0xee1849,this['_makeIdsRoot'](_0x2d6109)),this['_baseIdsRoots']['set'](_0xee1849,this['_makeIdsRoot'](_0x2d6109,_0x16d21b));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x175cd5&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1feef7,_0x424d97]of _0x4a9b70){const _0x32f034=this['_baseRoots']['get'](_0x424d97['rootName']),_0x1135c6=this['_diffRoots']['get'](_0x424d97['rootName']),_0x37bbc0=new ft(this['_fixPosition'](_0x424d97['start'],_0x32f034),this['_fixPosition'](_0x424d97['end'],_0x32f034)),_0x25bf27=this['_fixRange'](_0x37bbc0,_0x1135c6);_0x32f034['markers']['set'](_0x1feef7,_0x37bbc0),this['_markers']['set'](_0x1feef7,_0x25bf27);}this['_applyOperations'](_0x3febc4,_0x4fe55a,_0x175cd5);}['_applyOperations'](_0x156b3f,_0x4501df,_0x50887c){for(const _0x3efca1 of this['source']['getOperations'](_0x156b3f,_0x4501df))this['_handleOperation'](_0x3efca1,_0x50887c);for(const _0x12f7d9 of this['_diffRoots']['values']())_0x12f7d9['markers']['clear']();for(const [_0x123b22,_0x43ebc0]of this['_markers']){this['_diffRoots']['get'](_0x43ebc0['root']['rootName'])['markers']['set'](_0x123b22,_0x43ebc0['clone']());}const _0x4bfc4f=new Map(),_0x1acd58=new Map();for(const [_0x3e491b,_0x4c81e1]of this['_diffRoots'])_0x4bfc4f['set'](_0x3e491b,N(_0x4c81e1)),_0x1acd58['set'](_0x3e491b,this['_diffRootsAttributes']['get'](_0x3e491b));this['_saveMetaData'](_0x4501df,_0x4bfc4f,this['_markers'],_0x1acd58);}['_getPreviousFrom'](_0x19c957){const _0x4ac896=Array['from'](this['_savedMetaData']['keys']());_0x4ac896['sort']((_0x2018a3,_0x173add)=>_0x2018a3-_0x173add),_0x4ac896['reverse']();for(const _0xfc2746 of _0x4ac896)if(_0xfc2746<_0x19c957)return _0xfc2746;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x27cc6a,_0x2bc42b){const _0x3f5aaf=Array['from'](_0x2bc42b['markers'])['map'](([_0x81fc56,_0x20cdda])=>[_0x81fc56,this['_fixRange'](_0x20cdda,_0x27cc6a)]);_0x27cc6a['markers']=new Map(_0x3f5aaf);}['_transformMarkers'](_0x1a1613){for(const _0x525579 of this['_markers']['values']()){const _0x5b853e=_0x525579['getTransformedByOperation'](_0x1a1613),_0x4d56b7=ft['_createFromRanges'](_0x5b853e);_0x525579['start']=_0x4d56b7['start'],_0x525579['end']=_0x4d56b7['end'];}}['_handleOperation'](_0x3f4547,_0x36033a){if('addRoot'!=_0x3f4547['type']&&'detachRoot'!=_0x3f4547['type']){if('insert'==_0x3f4547['type']){const _0x4bf9e4=_0x3f4547['position']['root']['rootName'];this['_diffRoots']['has'](_0x4bf9e4)||(this['_diffRoots']['set'](_0x4bf9e4,P(_0x4bf9e4,!0x0)),this['_diffRootsAttributes']['set'](_0x4bf9e4,{}),_0x36033a&&this['_idsRoots']['set'](_0x4bf9e4,P(_0x4bf9e4,!0x0)));}else{if('addRootAttribute'==_0x3f4547['type']||'removeRootAttribute'==_0x3f4547['type']||'changeRootAttribute'==_0x3f4547['type'])return void this['_handleRootAttributeOperation'](_0x3f4547);'marker'==_0x3f4547['type']&&this['_handleMarkerOperation'](_0x3f4547);}if('marker'!==_0x3f4547['type']){const _0x232c6f=this['_cloneOperation'](_0x3f4547,this['_diffRoots']);_0x232c6f['_execute'](),this['_transformMarkers'](_0x232c6f);}if(_0x36033a)switch(_0x3f4547['type']){case'insert':this['_handleInsertOperation'](_0x3f4547);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x3f4547);break;case'merge':this['_handleMergeOperation'](_0x3f4547);break;case'split':this['_handleSplitOperation'](_0x3f4547);}}else this['_handleRootOperation'](_0x3f4547,_0x36033a);}['_cloneOperation'](_0x501ab9,_0x2b454d){const _0x39d3b7=_0x501ab9['clone']();return _0x39d3b7['_authorId']=_0x501ab9['_authorId'],this['_fixOperation'](_0x39d3b7,_0x2b454d),_0x39d3b7;}['_getBaseVids'](_0x3a6171){return _0x3a6171['map'](_0x192058=>{const _0x2e0113=this['_getVidAttributeName'](_0x192058);return Number(_0x192058['item']['getAttribute'](_0x2e0113));});}['_generateTape'](_0x2bea45,_0x3c6813){if(_0x2bea45['is']('element','$text'))_0x3c6813['push']({'item':_0x2bea45,'type':'text'});else{_0x2bea45['is']('element')&&_0x3c6813['push']({'item':_0x2bea45,'type':'elementStart'});for(const _0x39d69c of _0x2bea45['getChildren']())this['_generateTape'](_0x39d69c,_0x3c6813);_0x2bea45['is']('element')&&_0x3c6813['push']({'item':_0x2bea45,'type':'elementEnd'});}return _0x3c6813;}['_getState'](){const _0x4d6f28=new Map(this['_touched']),_0xff49cf=new Map(_0x4d6f28),_0x4e3a39=new Map(),_0x175645={'insertions':{},'deletions':{}},_0x2993e3={'insertions':{},'deletions':{}},_0xd448da=new Map(),_0x44c290=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x44c290['delete']('$graveyard');for(const _0x48fe91 of _0x44c290){const _0x2d91f6=this['_diffRoots']['get'](_0x48fe91)||P(_0x48fe91,!0x1),_0x41c197=this['_baseRoots']['get'](_0x48fe91)||P(_0x48fe91,!0x1);_0x2d91f6['isAttached']()||_0x41c197['isAttached']()?(_0x175645['insertions'][_0x48fe91]=N(_0x2d91f6),_0x175645['deletions'][_0x48fe91]=N(_0x41c197),this['_copyMarkers'](_0x175645['deletions'][_0x48fe91],_0x41c197),this['_copyMarkers'](_0x175645['insertions'][_0x48fe91],_0x2d91f6),_0x2993e3['insertions'][_0x48fe91]=this['_generateTape'](this['_idsRoots']['get'](_0x48fe91),[]),_0x2993e3['deletions'][_0x48fe91]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x48fe91)||P(_0x48fe91,!0x1),[])):_0x44c290['delete'](_0x48fe91);}for(const _0x6cfebb of _0x44c290){const _0x1a4c33=_0x2993e3['insertions'][_0x6cfebb];for(const _0x766738 of _0x1a4c33){const _0x272275=this['_getVidAttributeName'](_0x766738),_0x2a4ae5=_0x766738['item']['getAttribute'](_0x272275);_0xff49cf['delete'](_0x2a4ae5),_0x2a4ae5>=this['_startingRevisionId']&&_0x4e3a39['set'](_0x2a4ae5,_0x4d6f28['get'](_0x2a4ae5));}}for(const _0xfa0068 of _0x44c290){const _0x528f83=_0x2993e3['insertions'][_0xfa0068],_0x39229e=this['_getBaseVids'](_0x2993e3['deletions'][_0xfa0068]);let _0x47767e=0x0;for(const _0x50d47c of _0x528f83){const _0x231a86=this['_getVidAttributeName'](_0x50d47c),_0x343aea=_0x50d47c['item']['getAttribute'](_0x231a86);if(!_0x4e3a39['has'](_0x343aea)&&!_0xd448da['has'](_0x343aea)){if(_0xff49cf['has'](_0x343aea))_0x47767e++;else{if(_0x343aea!=_0x39229e[_0x47767e]){const _0x5b4cc9=_0x4d6f28['get'](_0x343aea)||_0x4d6f28['get'](_0x39229e[_0x47767e]);for(;_0x343aea!=_0x39229e[_0x47767e];)_0xff49cf['has'](_0x39229e[_0x47767e])||(_0xd448da['set'](_0x39229e[_0x47767e],_0x5b4cc9),_0x4d6f28['set'](_0x39229e[_0x47767e],_0x5b4cc9)),_0x47767e++;}_0x47767e++;}}}}for(const _0x239df0 of _0x44c290){const _0x362e92=_0x2993e3['insertions'][_0x239df0];for(const _0x1bd4e3 of _0x362e92){const _0x243b07=this['_getVidAttributeName'](_0x1bd4e3),_0x29ee73=_0x1bd4e3['item']['getAttribute'](_0x243b07);if(_0xd448da['has'](_0x29ee73)){const _0x325844=_0xd448da['get'](_0x29ee73);_0xff49cf['has'](_0x29ee73)||_0xff49cf['set'](_0x29ee73,{..._0x325844}),_0x4e3a39['set'](_0x29ee73,{..._0x325844});}}}for(const _0x1a86ee of _0xff49cf['keys']())_0x1a86ee>=this['_startingRevisionId']&&_0xff49cf['delete'](_0x1a86ee);const _0x3cb339=new Map();for(const _0x158d0b of _0x44c290){let _0x449a83=_0x2993e3['insertions'][_0x158d0b];for(const _0x51bf0b of _0x449a83)if(_0x51bf0b['item']['is']('element','tableCell')){const _0xc87048=this['_getVidAttributeName'](_0x51bf0b),_0x3987fb=_0x51bf0b['item']['getAttribute'](_0xc87048);if(_0x4e3a39['has'](_0x3987fb)){const _0x371f75=_0x51bf0b['item']['parent']['parent']['getAttribute']('vid_start'),_0x331d73=_0x3cb339['get'](_0x371f75)||new Set();_0x331d73['add'](_0x4e3a39['get'](_0x3987fb)['userId']),_0x3cb339['set'](_0x371f75,_0x331d73);}}_0x449a83=_0x2993e3['deletions'][_0x158d0b];for(const _0x528baa of _0x449a83)if(_0x528baa['item']['is']('element','tableCell')){const _0x54a122=this['_getVidAttributeName'](_0x528baa),_0xbd544d=_0x528baa['item']['getAttribute'](_0x54a122);if(_0xff49cf['has'](_0xbd544d)){const _0x35a5cb=_0x528baa['item']['parent']['parent']['getAttribute']('vid_start'),_0x51fd6a=_0x3cb339['get'](_0x35a5cb)||new Set();_0x51fd6a['add'](_0xff49cf['get'](_0xbd544d)['userId']),_0x3cb339['set'](_0x35a5cb,_0x51fd6a);}}for(const _0x17d1d7 of _0x3cb339['keys']())(_0x4e3a39['has'](_0x17d1d7)||_0xff49cf['has'](_0x17d1d7))&&_0x3cb339['delete'](_0x17d1d7);}for(const _0x5b329e of _0x44c290){const _0x475360=_0x2993e3['insertions'][_0x5b329e];let _0x11f525=null,_0xc2680a=null;for(const _0xa57438 of _0x475360){const _0xe24a1f=this['_getVidAttributeName'](_0xa57438),_0x5b71a3=_0xa57438['item']['getAttribute'](_0xe24a1f),_0x5da1d4=_0x3cb339['get'](_0x5b71a3);_0x5da1d4&&'elementStart'==_0xa57438['type']&&(_0x11f525=Array['from'](_0x5da1d4)[0x0],_0xc2680a=_0xa57438['item']['getAttribute']('vid_end')),_0x11f525&&(_0xff49cf['set'](_0x5b71a3,{'userId':_0x11f525}),_0x4e3a39['set'](_0x5b71a3,{'userId':_0x11f525})),_0x5b71a3==_0xc2680a&&(_0x11f525=null,_0xc2680a=null);}}const _0x514c5c={},_0x384a46=new Set();for(const _0xc71f3c of _0x44c290){const _0x12f291=_0x175645['deletions'][_0xc71f3c],_0x583d85=_0x175645['insertions'][_0xc71f3c];for(const {userId:_0x283e42}of this['_touchedMarkers']['values']())null!==_0x283e42&&_0x384a46['add'](_0x283e42);for(const {userId:_0x14acb4}of this['_touchedRoots']['values']())null!==_0x14acb4&&_0x384a46['add'](_0x14acb4);this['_markChanges'](_0x583d85,_0x2993e3['insertions'][_0xc71f3c],_0x4e3a39,'insertion',_0x384a46),this['_markChanges'](_0x12f291,_0x2993e3['deletions'][_0xc71f3c],_0xff49cf,'deletion',_0x384a46),_0x514c5c[_0xc71f3c]={'insertions':this['_prepareViewToSave'](_0x583d85),'deletions':this['_prepareViewToSave'](_0x12f291),'attachChange':this['_touchedRoots']['get'](_0xc71f3c)||null,'attributesBefore':_0x37c4af(this['_baseRootsAttributes']['get'](_0xc71f3c))||{},'attributesAfter':_0x37c4af(this['_diffRootsAttributes']['get'](_0xc71f3c))};}return{'diffData':_0x514c5c,'authorsIds':Array['from'](_0x384a46)};}['_processRootBeforeSave'](_0x2399eb){for(const [,_0x1dc0c2]of _0x2399eb['markers']){const _0x11865a=_0x1dc0c2['start']['getAncestors']()['filter'](_0x3e641f=>'tableCell'==_0x3e641f['name']);for(const _0x5ef243 of _0x11865a)0x1==_0x5ef243['childCount']&&_0x5ef243['getChild'](0x0)['is']('element','paragraph')&&_0x5ef243['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x8e938c){this['_processRootBeforeSave'](_0x8e938c);const _0x4d8787=this['editor']['data']['toView'](_0x8e938c,{}),_0x570018=Array['from'](_0x4d8787['getChildren']())['map'](_0x385934=>this['_getViewJson'](_0x385934));return JSON['stringify'](_0x570018);}['_getViewJson'](_0x556ca9){if(_0x556ca9['is']('$text'))return _0x556ca9['data'];{const _0x3485ec=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x444e45=_0x556ca9,_0x3660f4=this['editor']['data']['htmlProcessor']['domConverter'],_0x2f26e1={'type':_0x3485ec['_getTypeCharForViewElement'](_0x444e45),'name':_0x444e45['name'],'attributes':Array['from'](_0x444e45['getAttributes']()),'children':Array['from'](_0x444e45['getChildren']())['map'](_0x384ee3=>this['_getViewJson'](_0x384ee3))};if(_0x556ca9['is']('uiElement')&&'$comment'!=_0x556ca9['name']){const _0x2ae10a=_0x556ca9['render'](_0x3660f4['domDocument'],_0x3660f4);_0x2f26e1['children']['push'](_0x2ae10a['outerHTML']);}else{if(_0x556ca9['is']('rawElement')){const _0x254729=_0x3660f4['domDocument']['createElement'](_0x444e45['name']);_0x556ca9['render'](_0x254729,_0x3660f4),_0x2f26e1['children']['push'](_0x254729['innerHTML']);}}const _0x170d63=Array['from'](_0x444e45['getCustomProperties']());_0x170d63['length']>0x0&&(_0x2f26e1['customProperties']=_0x170d63);const _0x5d2018=_0x444e45['getFillerOffset']();return null!==_0x5d2018&&(_0x2f26e1['fillerOffset']=_0x5d2018),_0x2f26e1;}}['_markChanges'](_0x1e73bf,_0x36fdb6,_0xeb9d18,_0x45f923,_0x123c21){let _0x36319a=null,_0xd91dc4=null,_0x3f59da=0x0;const _0xb43c93=this['editor']['model'];for(let _0x54fe39=0x0;_0x54fe39<_0x36fdb6['length'];_0x54fe39++){const _0x197d54=this['_getVidAttributeName'](_0x36fdb6[_0x54fe39]),_0x1c4140=_0x36fdb6[_0x54fe39]['item']['getAttribute'](_0x197d54),_0x1699b8=_0xeb9d18['get'](_0x1c4140),_0x4ae488=_0x54fe39==_0x36fdb6['length']-0x1;(!_0x36319a&&_0x1699b8&&(_0x36319a=_0x1699b8,_0xd91dc4=_0x36fdb6[_0x54fe39]),_0x36319a&&(!_0x1699b8||_0x1699b8['userId']!=_0x36319a['userId']))&&(_0x50877b(_0x1699b8,F(_0xd91dc4,_0x1e73bf,_0xb43c93),F(_0x36fdb6[_0x54fe39],_0x1e73bf,_0xb43c93)),_0x36319a=_0x1699b8||null,_0xd91dc4=_0x1699b8?_0x36fdb6[_0x54fe39]:null),_0x36319a&&_0x4ae488&&_0x50877b(_0x1699b8,F(_0xd91dc4,_0x1e73bf,_0xb43c93),B(_0x36fdb6[_0x54fe39],_0x1e73bf,_0xb43c93));}function _0x50877b(_0x2a4b7f,_0x188cfe,_0x34abfc){const _0xd81347=_0x36319a['userId'],_0x879662='revision:'+_0x45f923+':'+_0xd81347+':'+_0x3f59da++,_0x1e05e3=_0xb43c93['createRange'](_0x188cfe,_0x34abfc);_0x1e73bf['markers']['set'](_0x879662,_0x1e05e3),null!==_0xd81347&&_0x123c21['add'](_0xd81347);}}['_getVidAttributeName'](_0x38a4d5){switch(_0x38a4d5['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x3b81dc,_0x191ded){_0x3b81dc['baseVersion']=null;for(const _0x372c20 in _0x3b81dc){const _0x2e1add=_0x3b81dc[_0x372c20];if(_0x2e1add instanceof vt){const _0x2aacef=_0x191ded['get'](_0x2e1add['root']['rootName']);_0x3b81dc[_0x372c20]=this['_fixPosition'](_0x2e1add,_0x2aacef);}if(_0x2e1add instanceof ft){const _0x3de0c4=_0x191ded['get'](_0x2e1add['root']['rootName']);_0x3b81dc[_0x372c20]=this['_fixRange'](_0x2e1add,_0x3de0c4);}'root'===_0x372c20&&(_0x3b81dc['root']=_0x191ded['get'](_0x3b81dc['root']['rootName']));}}['_fixRange'](_0x43630c,_0x3d8063){return this['editor']['model']['createRange'](this['_fixPosition'](_0x43630c['start'],_0x3d8063),this['_fixPosition'](_0x43630c['end'],_0x3d8063));}['_fixPosition'](_0x5efa6c,_0x389045){return this['editor']['model']['createPositionFromPath'](_0x389045,_0x5efa6c['path'],_0x5efa6c['stickiness']);}['_handleInsertOperation'](_0x130f82){const _0x266976=this['_idsRoots']['get'](_0x130f82['position']['root']['rootName']),_0x324df1=this['_fixPosition'](_0x130f82['position'],_0x266976),_0x31cc4b=null===_0x130f82['_authorId']?null:_0x130f82['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x543dd3=_0x324df1['parent'],_0x585163=this['_revisionId'],_0x3cfc6e=[];for(const _0x140e06 of _0x130f82['nodes'])if(_0x140e06['is']('element'))_0x3cfc6e['push'](this['_makeIdsRoot'](_0x140e06));else{for(let _0x531c1a=0x0;_0x531c1a<_0x140e06['offsetSize'];_0x531c1a++)_0x3cfc6e['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x36e151=this['_revisionId'];for(let _0xcb456e=_0x585163;_0xcb456e<_0x36e151;_0xcb456e++)this['_touched']['set'](_0xcb456e,{'userId':_0x31cc4b});_0x543dd3['_insertChild'](_0x324df1['offset'],_0x3cfc6e);}['_handleMoveOperation'](_0x47bcb7){(_0x47bcb7=this['_cloneOperation'](_0x47bcb7,this['_idsRoots']))['_execute']();const _0x1272c4=null===_0x47bcb7['_authorId']?null:_0x47bcb7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x24e768=_0x47bcb7['getMovedRangeStart'](),_0x34ed51=_0x24e768['parent'],_0x2e73c8=_0x24e768['offset'];!function _0x41fc2e(_0x3899a5,_0xc8efff,_0x21e5c,_0xa5a3bb){for(let _0x19827c=_0x21e5c;_0x19827c<_0xa5a3bb;_0x19827c++){const _0x5a80e7=_0xc8efff['getChild'](_0x19827c);_0x5a80e7['is']('element','$text')?_0x3899a5['set'](_0x5a80e7['getAttribute']('vid'),{'userId':_0x1272c4}):(_0x3899a5['set'](_0x5a80e7['getAttribute']('vid_start'),{'userId':_0x1272c4}),_0x41fc2e(_0x3899a5,_0x5a80e7,0x0,_0x5a80e7['childCount']),_0x3899a5['set'](_0x5a80e7['getAttribute']('vid_end'),{'userId':_0x1272c4}));}}(this['_touched'],_0x34ed51,_0x2e73c8,_0x2e73c8+_0x47bcb7['howMany']);}['_handleMergeOperation'](_0x1d5734){const _0x32c595=null===(_0x1d5734=this['_cloneOperation'](_0x1d5734,this['_idsRoots']))['_authorId']?null:_0x1d5734['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x300de5=_0x1d5734['targetPosition']['parent'],_0x43d80b=_0x1d5734['sourcePosition']['parent'],_0x598735=_0x300de5['getAttribute']('vid_end'),_0x46dd6c=_0x43d80b['getAttribute']('vid_start');_0x300de5['_setAttribute']('vid_end',_0x43d80b['getAttribute']('vid_end')),_0x43d80b['_setAttribute']('vid_end',_0x598735),this['_touched']['set'](_0x46dd6c,{'userId':_0x32c595}),this['_touched']['set'](_0x598735,{'userId':_0x32c595}),_0x1d5734['_execute']();}['_handleSplitOperation'](_0x3ed54b){const _0x45b5a4=null===(_0x3ed54b=this['_cloneOperation'](_0x3ed54b,this['_idsRoots']))['_authorId']?null:_0x3ed54b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x193f59=_0x3ed54b['graveyardPosition'],_0x4dda26=_0x3ed54b['splitPosition']['parent'];_0x3ed54b['_execute']();const _0x47c5eb=_0x4dda26['getAttribute']('vid_end'),_0x407049=_0x3ed54b['insertionPosition']['nodeAfter'];if(_0x193f59){const _0x318dae=_0x407049['getAttribute']('vid_end'),_0xa9b0ff=_0x4dda26['getAttribute']('vid_end');_0x4dda26['_setAttribute']('vid_end',_0x318dae),_0x407049['_setAttribute']('vid_end',_0xa9b0ff),this['_touched']['set'](_0x4dda26['getAttribute']('vid_end'),{'userId':_0x45b5a4}),this['_touched']['set'](_0x407049['getAttribute']('vid_start'),{'userId':_0x45b5a4});}else{const _0x493fbe=this['_revisionId']++,_0x199fec=this['_revisionId']++;_0x4dda26['_setAttribute']('vid_end',_0x493fbe),_0x407049['_setAttribute']('vid_start',_0x199fec),_0x407049['_setAttribute']('vid_end',_0x47c5eb),this['_touched']['set'](_0x493fbe,{'userId':_0x45b5a4}),this['_touched']['set'](_0x199fec,{'userId':_0x45b5a4});}}['_handleMarkerOperation'](_0x22183a){if(!_0x22183a['affectsData'])return;const _0x306b5e=(_0x22183a=this['_cloneOperation'](_0x22183a,this['_diffRoots']))['oldRange']?_0x22183a['oldRange']['root']:null,_0x113898=_0x22183a['newRange']?_0x22183a['newRange']['root']:null;_0x306b5e&&this['_markers']['delete'](_0x22183a['name']),_0x113898&&this['_markers']['set'](_0x22183a['name'],_0x22183a['newRange']['clone']());const _0x4c19be=null===_0x22183a['_authorId']?null:_0x22183a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2e1f80=_0x22183a['name'];if(!this['_touchedMarkers']['has'](_0x2e1f80))return void this['_touchedMarkers']['set'](_0x2e1f80,{'range':_0x22183a['oldRange'],'userId':_0x4c19be});const _0x933a82=this['_touchedMarkers']['get'](_0x2e1f80),_0x826307=_0x933a82['range'],_0x5e88c4=_0x22183a['newRange'];null==_0x826307&&null==_0x5e88c4||_0x826307&&_0x5e88c4&&_0x826307['isEqual'](_0x5e88c4)?this['_touchedMarkers']['delete'](_0x22183a['name']):_0x933a82['userId']=_0x4c19be;}['_handleRootOperation'](_0x3592d4,_0xd3756){this['_diffRoots']['has'](_0x3592d4['rootName'])?this['_diffRoots']['get'](_0x3592d4['rootName'])['_isAttached']=_0x3592d4['isAdd']:(this['_diffRoots']['set'](_0x3592d4['rootName'],P(_0x3592d4['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3592d4['rootName'],{}),_0xd3756&&this['_idsRoots']['set'](_0x3592d4['rootName'],P(_0x3592d4['rootName'],!0x0)));const _0x474756=null===_0x3592d4['_authorId']?null:_0x3592d4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4a4a5c=this['_touchedRoots']['get'](_0x3592d4['rootName']);_0x4a4a5c&&_0x4a4a5c['userId']===_0x474756?this['_touchedRoots']['delete'](_0x3592d4['rootName']):this['_touchedRoots']['set'](_0x3592d4['rootName'],{'userId':_0x474756,'isAttached':_0x3592d4['isAdd']});}['_handleRootAttributeOperation'](_0x41597b){const _0x519342=this['_diffRootsAttributes']['get'](_0x41597b['root']['rootName']);null===_0x41597b['newValue']?delete _0x519342[_0x41597b['key']]:_0x519342[_0x41597b['key']]=_0x41597b['newValue'];}}function N(_0x272435){const _0x1e5d5c=P(_0x272435['rootName'],_0x272435['isAttached']());for(const _0x29aa87 of _0x272435['getChildren']()){const _0xff1eeb=_0x29aa87['_clone'](!0x0);_0x1e5d5c['_appendChild'](_0xff1eeb);}return _0x1e5d5c;}function P(_0x21d305,_0x49a475=!0x0){const _0x5623fa=new gt();return _0x5623fa['rootName']=_0x21d305,_0x5623fa['_isAttached']=_0x49a475,_0x5623fa['isAttached']=()=>_0x5623fa['_isAttached'],_0x5623fa;}function F(_0x417e29,_0x269e97,_0x3c02b8){const _0xc5e984='elementEnd'==_0x417e29['type']?_0x3c02b8['createPositionAt'](_0x417e29['item'],'end'):_0x3c02b8['createPositionBefore'](_0x417e29['item']);return _0x3c02b8['createPositionFromPath'](_0x269e97,_0xc5e984['path'],_0xc5e984['stickiness']);}function B(_0x29d45d,_0x1fd3dd,_0x4ddc80){const _0x12ef5d='elementStart'==_0x29d45d['type']?_0x4ddc80['createPositionAt'](_0x29d45d['item'],0x0):_0x4ddc80['createPositionAfter'](_0x29d45d['item']);return _0x4ddc80['createPositionFromPath'](_0x1fd3dd,_0x12ef5d['path'],_0x12ef5d['stickiness']);}class os extends _0x1c04a0{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x3da459,_0x2aacdc){super(_0x3da459),this['focusTracker']=new _0xcf59f3(),this['keystrokes']=new _0x567b7d(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2aacdc),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x23c3a2({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x496832=_0x3d597d=>_0x3d597d['stopPropagation']();this['keystrokes']['set']('arrowright',_0x496832),this['keystrokes']['set']('arrowleft',_0x496832),this['keystrokes']['set']('arrowup',_0x496832),this['keystrokes']['set']('arrowdown',_0x496832);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x13e1b3){this['revisionNameInputView']['fieldView']['element']['value']=_0x13e1b3['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x2be949){const _0x577c13=new nt(this['locale'],ti),_0x130aff=_0x577c13['fieldView'];_0x130aff['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x2af4b9=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x2be949&&(_0x2af4b9+='\x20('+g(this['locale'],'optional')+')'),(_0x577c13['label']=_0x2af4b9,_0x130aff['on']('input',()=>{this['revisionNameInputValue']=_0x130aff['element']['value']['trim']();}),_0x577c13);}}class f extends _0x388832{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0xfde7c2=this['editor'],_0x80a745=_0xfde7c2['plugins']['get']('RevisionTracker');_0xfde7c2['ui']['componentFactory']['add']('revisionHistory',_0x5d9561=>{const _0x4b3a52=_0x3c7356(_0x5d9561),_0x3992ad=_0x4b3a52['panelView']['children'],_0x20f564=new _0x21d457(_0x5d9561),_0x5135fb=new te(_0x5d9561),_0x480b3c=new _0x48cda4(_0x5d9561),_0x56c9d2=new te(_0x5d9561),_0x29f6e1=new _0x48cda4(_0x5d9561);return _0x4b3a52['bind']('isEnabled')['to'](_0x80a745,'isReady',_0x80a745,'isEnabled',_0xfde7c2,'isReadOnly',(_0x4d8189,_0x15a18a,_0x49e59e)=>_0x4d8189&&_0x15a18a&&!_0x49e59e),_0x4b3a52['buttonView']['set']({'icon':_0x5b19fb,'label':g(_0x5d9561,'Revision\x20history'),'tooltip':!0x0}),_0x480b3c['set']({'label':g(_0x5d9561,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x480b3c['bind']('isEnabled')['to'](_0x80a745,'isReady',_0x80a745,'isEnabled',_0xfde7c2,'isReadOnly',(_0xbbca10,_0x365b6d,_0x25012e)=>_0xbbca10&&_0x365b6d&&!_0x25012e),_0x480b3c['on']('execute',()=>this['_showDialog']()),_0x29f6e1['set']({'label':g(_0x5d9561,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x29f6e1['bind']('isEnabled')['to'](_0x80a745,'isReady',_0xfde7c2,'isReadOnly',(_0x29c940,_0x1fa28c)=>_0x29c940&&!_0x1fa28c),_0x29f6e1['on']('execute',()=>{_0xfde7c2['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x4b3a52['isOpen']=!0x1,_0xfde7c2['editing']['view']['focus']();}),_0x5135fb['children']['add'](_0x480b3c),_0x56c9d2['children']['add'](_0x29f6e1),_0x20f564['role']='menu',_0x20f564['items']['addMany']([_0x5135fb,_0x56c9d2]),_0x3992ad['add'](_0x20f564),_0x4b3a52;}),_0xfde7c2['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x1072de=this['editor'],_0x1f84ea=_0x1072de['locale'],_0x212d71=new _0x5f4a9c(_0x1f84ea),_0x408090=new _0xf85c93(_0x1f84ea);_0x212d71['buttonView']['set']({'icon':_0x5b19fb,'label':g(_0x1f84ea,'Revision\x20history')});const _0x4e2912=new _0x3b5e19(_0x1f84ea,_0x212d71),_0x5ef768=new _0x211c68(_0x1f84ea);_0x5ef768['set']({'label':g(_0x1f84ea,'Save\x20current\x20revision')}),_0x5ef768['delegate']('execute')['to'](_0x212d71),_0x5ef768['on']('execute',()=>{this['_showDialog']();}),_0x4e2912['children']['add'](_0x5ef768),_0x408090['items']['add'](_0x4e2912);const _0xb0794e=new _0x3b5e19(_0x1f84ea,_0x212d71),_0x489188=new _0x211c68(_0x1f84ea);return _0x489188['set']({'label':g(_0x1f84ea,'Open\x20revision\x20history')}),_0x489188['delegate']('execute')['to'](_0x212d71),_0x489188['on']('execute',()=>{_0x1072de['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0xb0794e['children']['add'](_0x489188),_0x408090['items']['add'](_0xb0794e),_0x212d71['panelView']['children']['add'](_0x408090),_0x212d71;}['_showDialog'](){const _0xe2cace=this['editor'],_0x49aecc=_0xe2cace['locale'],_0xccb1e3=_0xe2cace['plugins']['get']('Dialog'),_0x1ad3a8=_0xe2cace['plugins']['get']('RevisionTracker');function _0x304c2c(_0x5d33a2){_0xe2cace['config']['get']('revisionHistory.requireRevisionName')&&''===_0x5d33a2['revisionName']?_0x5d33a2['revisionNameInputView']['errorText']=g(_0x49aecc,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0xe2cace['plugins']['get'](u)['saveRevision']({'name':_0x5d33a2['revisionName']}),_0xccb1e3['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x304c2c(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0xccb1e3['show']({'id':'revisionSave','title':g(_0x49aecc,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0xe2cace['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0xccb1e3['hide']()},{'label':g(_0xe2cace['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x46c82c){_0x46c82c['bind']('isEnabled')['to'](_0x1ad3a8,'isReady',_0x1ad3a8,'isEnabled',_0xe2cace,'isReadOnly',(_0x6ce4a,_0xcc0743,_0x50d405)=>_0x6ce4a&&_0xcc0743&&!_0x50d405);},'onExecute':()=>_0x304c2c(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x593478=this['editor'],_0x50c7bb=_0x593478['locale'];this['_saveRevisionFormView']=new os(_0x50c7bb,_0x593478['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x1c04a0{['changeId'];['_model'];constructor(_0x1cb5f3,_0x5b896b){super(_0x1cb5f3),this['_model']=_0x5b896b,this['changeId']=_0x5b896b['id'];const _0x5939f9=this['bindTemplate'],_0xae871d=g(_0x1cb5f3,_0x5b896b['data']['isSuggestion']?'Suggested\x20by':'add'==_0x5b896b['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x5b896b['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5939f9['to']('type',_0x361a3a=>'ck-revision-change__'+_0x361a3a)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0xae871d}]},{'text':'\x20'+_0x5b896b['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x5bca80(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x21a3aa){super(),this['id']=_0x21a3aa['id']||_0x581a69(),this['author']=_0x21a3aa['author'],this['type']=_0x21a3aa['type'],this['data']=_0x21a3aa['data']||{},this['rootName']=_0x21a3aa['rootName'],this['set']('createdAt',_0x21a3aa['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x3634d5,_0x5a998e){this['newRevisionId']=_0x3634d5,this['oldRevisionId']=_0x5a998e,this['changes']=new _0x42deb6();}['_setChanges'](_0x2e2250){for(const _0x4eb491 of _0x2e2250)this['changes']['add'](_0x4eb491);}}class m extends _0x388832{['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[_0x1f7964,_0x344726,I,V];}constructor(_0x3618ad){super(_0x3618ad),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',(_0x1b1635,_0x457042,_0x535b85)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x511c71=>{for(const _0x3096ae of this['editor']['editing']['view']['document']['roots'])_0x535b85?_0x511c71['removeClass']('ck-editor__editable__overlay',_0x3096ae):_0x511c71['addClass']('ck-editor__editable__overlay',_0x3096ae);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x450de2=>null!==_0x450de2),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x9f7fa4,_0x21fd9b,_0x1b6cb8)=>_0x9f7fa4&&_0x1b6cb8?_0x21fd9b['changes']['getIndex'](_0x1b6cb8):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x16c076,_0x3452a5)=>_0x16c076?_0x3452a5['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x344726);}['init'](){const _0x2183f6=this['editor'],_0x304be0=new pt(_0x2183f6,{'direction':'backward'}),_0x5bc38f=new pt(_0x2183f6,{'direction':'forward'});(_0x2183f6['commands']['add']('showPreviousChange',_0x304be0),_0x2183f6['commands']['add']('showNextChange',_0x5bc38f),_0x2183f6['commands']['add']('restoreRevision',new wt(_0x2183f6)),this['on']('change:numberOfChanges',()=>{_0x304be0['refresh'](),_0x5bc38f['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x2183f6['enableReadOnlyMode']('revision-viewer'),_0x2183f6['plugins']['has']('WidgetToolbarRepository'))&&_0x2183f6['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x20beda){return await this['_utils']['loadRevisionData'](_0x20beda,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x20beda);}async['getRevisionRootsAttributes'](_0x4038c6){return await this['_utils']['loadRevisionData'](_0x4038c6,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4038c6);}async['compare'](_0x4f90f9,_0x578a25,_0x4c4302=!0x1){if(!this['isEnabled'])return;const _0x1d9fc8=this['diff'],_0x2f23a2=this['repository'],_0x50379f='string'==typeof _0x4f90f9?_0x2f23a2['getRevision'](_0x4f90f9):_0x4f90f9,_0x4ee900='string'==typeof _0x578a25?_0x2f23a2['getRevision'](_0x578a25):_0x578a25,_0x839ea=_0x50379f['id'],_0x1be0ba=_0x4ee900?_0x4ee900['id']:null;if(!_0x4c4302&&this['diff']&&this['diff']['newRevisionId']===_0x839ea&&this['diff']['oldRevisionId']===_0x1be0ba)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x839ea,_0x1be0ba);const _0x3470b0=this['_getRevisionsRange'](_0x50379f,_0x4ee900,!0x0)['map'](_0x31b762=>this['_utils']['loadRevisionData'](_0x31b762,this['adapter']));return _0x3470b0['push'](new Promise(_0x23f101=>{setTimeout(_0x23f101,0x14);})),Promise['all'](_0x3470b0)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4130c4=this['_getDiff'](_0x839ea,_0x1be0ba);for(const _0x5d215c of _0x4130c4['changes'])this['_changeIdToChange']['set'](_0x5d215c['id'],_0x5d215c);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2b09ce=>{for(const _0x246642 of this['editor']['model']['document']['getRootNames']())_0x2b09ce['detachRoot'](_0x246642);for(const _0xa738a9 of Object['keys'](_0x4130c4['model'])){const _0x37ada8=_0x2b09ce['addRoot'](_0xa738a9);for(const _0x22f02c of Object['keys'](_0x4130c4['attributes'][_0xa738a9]))_0x2b09ce['setAttribute'](_0x22f02c,_0x4130c4['attributes'][_0xa738a9][_0x22f02c],_0x37ada8);_0x2b09ce['insert'](_0x4130c4['model'][_0xa738a9],_0x37ada8,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4130c4['changes'])),this['isReady']=!0x0;})['catch'](_0x2ee32f=>{console['error'](_0x2ee32f),this['_cleanUp'](),_0x1d9fc8&&(this['diff']=_0x1d9fc8),this['isReady']=!0x0;});}['addRevisionData'](_0x29ca21,_0x14b850){const _0x2ad98e=this['repository']['createRevision'](_0x29ca21);return _0x2ad98e['on']('_update',(_0x572411,_0x1ba500,_0x589385)=>_0x14b850(_0x1ba500,_0x589385,_0x2ad98e)),this['repository']['addRevision'](_0x2ad98e),_0x2ad98e;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4e45d7=>{for(const _0x52fa8a of this['editor']['model']['document']['getRootNames']())_0x4e45d7['detachRoot'](_0x52fa8a);});}['_sortAndFilterDiffChanges'](_0x2d1496){const _0x31336b=[],_0x3fcaaa=new Map();for(const _0x13c30c of this['editor']['model']['document']['getRootNames']()){const _0x17c0fa=this['editor']['editing']['view']['getDomRoot'](_0x13c30c);if(!_0x17c0fa)continue;const _0x2ac34b=_0x17c0fa['getClientRects']()['item'](0x0);_0x2ac34b&&(_0x31336b['push'](_0x13c30c),_0x3fcaaa['set'](_0x13c30c,_0x2ac34b));}return _0x31336b['sort']((_0x3236fa,_0x555914)=>{const _0x4f649c=_0x3fcaaa['get'](_0x3236fa),_0x3cebb0=_0x3fcaaa['get'](_0x555914);return _0x4f649c['y']-_0x3cebb0['y']||_0x4f649c['x']-_0x3cebb0['x'];}),(_0x2d1496=_0x2d1496['filter'](_0x408073=>_0x31336b['includes'](_0x408073['rootName'])))['sort']((_0x344ba9,_0x28ea4d)=>_0x31336b['indexOf'](_0x344ba9['rootName'])-_0x31336b['indexOf'](_0x28ea4d['rootName'])),_0x2d1496;}['_makeTape'](_0x339a83){const _0x3b6799=Array['from'](_0x339a83['markers'])['filter'](([_0x237c71,_0x3842ad])=>_0x237c71['startsWith']('revision:')&&!_0x3842ad['isCollapsed']),_0x38752e=Array['from'](this['editor']['model']['createRangeIn'](_0x339a83)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3b6799['length'])for(const _0x44f17f of _0x38752e){const [_0x55688b,_0x142db1]=_0x3b6799[0x0],[,_0x3c9470,_0x592733]=_0x55688b['split'](':');if(_0x142db1['end']['isEqual'](_0x44f17f['nextPosition'])&&_0x3b6799['shift'](),(_0x44f17f['previousPosition']['isEqual'](_0x142db1['start'])||_0x44f17f['previousPosition']['isAfter'](_0x142db1['start']))&&('insertion'==_0x3c9470?_0x44f17f['isAdded']={'userId':_0x592733}:'deletion'==_0x3c9470&&(_0x44f17f['isRemoved']={'userId':_0x592733})),0x0==_0x3b6799['length'])break;}return _0x38752e;}['_refreshStartEndIndex'](_0x1240eb){const _0x1eaefb=new Map();for(let _0x3171d6=0x0;_0x3171d6<_0x1240eb['length'];_0x3171d6++)'text'===_0x1240eb[_0x3171d6]['type']?(_0x1240eb[_0x3171d6]['item']['startIndex']=_0x3171d6,_0x1240eb[_0x3171d6]['item']['endIndex']=_0x3171d6):('elementStart'===_0x1240eb[_0x3171d6]['type']?_0x1240eb[_0x3171d6]['item']['startIndex']=_0x3171d6:'elementEnd'===_0x1240eb[_0x3171d6]['type']&&(_0x1240eb[_0x3171d6]['item']['endIndex']=_0x3171d6),_0x1eaefb['set'](_0x1240eb[_0x3171d6]['id'],_0x3171d6));for(const _0x2b74e9 of _0x1eaefb['values']())'elementStart'===_0x1240eb[_0x2b74e9]['type']?_0x1240eb[_0x2b74e9]['item']['endIndex']=_0x1eaefb['get'](_0x1240eb[_0x2b74e9]['pairId']):'elementEnd'===_0x1240eb[_0x2b74e9]['type']&&(_0x1240eb[_0x2b74e9]['item']['startIndex']=_0x1eaefb['get'](_0x1240eb[_0x2b74e9]['pairId']));}['_processTape'](_0x17d877){for(let _0x1ea4ba=0x0;_0x1ea4ba<_0x17d877['length'];_0x1ea4ba++){if('elementStart'===_0x17d877[_0x1ea4ba]['type'])_0x17d877[_0x1ea4ba]['item']['startIndex']=_0x1ea4ba;else{if('elementEnd'===_0x17d877[_0x1ea4ba]['type']){_0x17d877[_0x1ea4ba]['item']['endIndex']=_0x1ea4ba;const _0x315618=_0x17d877[_0x1ea4ba]['item']['startIndex'];_0x17d877[_0x315618]['pairId']=_0x17d877[_0x1ea4ba]['id'],_0x17d877[_0x1ea4ba]['pairId']=_0x17d877[_0x315618]['id'];}else _0x17d877[_0x1ea4ba]['item']['startIndex']=_0x1ea4ba,_0x17d877[_0x1ea4ba]['item']['endIndex']=_0x1ea4ba,_0x17d877[_0x1ea4ba]['pairId']=null;}_0x17d877[_0x1ea4ba]['markersStart']||(_0x17d877[_0x1ea4ba]['markersStart']=[],_0x17d877[_0x1ea4ba]['markersEnd']=[]);}}['_markInsertions'](_0x3b779,_0x2d15b0){const _0x97a984=_0x3b779['filter'](_0x240f5a=>!_0x240f5a['isAdded']);for(let _0x2cbcca=0x0;_0x2cbcca<_0x2d15b0['length'];_0x2cbcca++)_0x2d15b0[_0x2cbcca]['isAdded']&&(_0x97a984[_0x2cbcca]['isAdded']=_0x2d15b0[_0x2cbcca]['isAdded']);}['_getDiff'](_0x536a96,_0x1f9fbc=null){const _0x1dd0e0=this['repository']['getRevision'](_0x536a96),_0xf64b21=_0x1f9fbc?this['repository']['getRevision'](_0x1f9fbc):null,_0x2aae34=this['_getRevisionsRange'](_0x1dd0e0,_0xf64b21),_0x4b0fbf=_0x2aae34[_0x2aae34['length']-0x1],_0xbb6f9=new Map(),_0x24a015={'model':{},'attributes':{},'changes':[]},_0x5aa564=new Set(),_0x2a8828=new Map();for(let _0x266b41=_0x2aae34['length']-0x1;_0x266b41>=0x0;_0x266b41--){const _0x3794a1=_0x2aae34[_0x266b41];for(const _0x3bbfb8 of Object['keys'](_0x3794a1['diffData']))if(_0x3794a1['diffData'][_0x3bbfb8]['attachChange']){const _0x5b9762=_0x3794a1['diffData'][_0x3bbfb8]['attachChange'];_0x5b9762['isAttached']?(_0x5aa564['add'](_0x3bbfb8),_0x2a8828['has'](_0x3bbfb8)&&_0x2a8828['get'](_0x3bbfb8)['userId']==_0x5b9762['userId']?_0x2a8828['delete'](_0x3bbfb8):_0x2a8828['set'](_0x3bbfb8,_0x5b9762)):_0x2a8828['has'](_0x3bbfb8)?(_0x5aa564['delete'](_0x3bbfb8),_0x2a8828['delete'](_0x3bbfb8)):(_0x5aa564['add'](_0x3bbfb8),_0x2a8828['set'](_0x3bbfb8,_0x5b9762));}else _0x5aa564['add'](_0x3bbfb8);}for(const _0x21dc66 of _0x5aa564){const _0x2a0275=_0x2a8828['has'](_0x21dc66)&&!_0x2a8828['get'](_0x21dc66)['isAttached'];let _0x27da19=_0x2a0275?_0x2aae34['length']-0x1:0x0;const _0x2da55e=_0x2a0275?-0x1:0x1;for(;_0x2aae34[_0x27da19];){const _0x2d46eb=_0x2aae34[_0x27da19];if(_0x2d46eb['diffData'][_0x21dc66]){const _0x661b5=_0x2a0275?_0x2d46eb['diffData'][_0x21dc66]['attributesBefore']:_0x2d46eb['diffData'][_0x21dc66]['attributesAfter'];_0x24a015['attributes'][_0x21dc66]=_0x661b5?_0x37c4af(_0x661b5):{};break;}_0x27da19+=_0x2da55e;}}for(const _0x3e5ca4 of _0x2aae34){_0x3e5ca4['model']={};for(const _0x1798c7 of _0x3e5ca4['authors'])_0xbb6f9['set'](_0x1798c7['id'],_0x1798c7);for(const _0xe5a577 of _0x5aa564){const _0x149884=_0x3e5ca4['diffData'][_0xe5a577]?_0x3e5ca4['diffData'][_0xe5a577]['insertions']:'[]',_0x1a5132=_0x3e5ca4['diffData'][_0xe5a577]?_0x3e5ca4['diffData'][_0xe5a577]['deletions']:'[]';_0x3e5ca4['model'][_0xe5a577]={'insertions':this['_utils']['_makeModelFromViewString'](_0x149884),'deletions':this['_utils']['_makeModelFromViewString'](_0x1a5132)};}}for(const _0x49bf8f of _0x5aa564){let _0x42c0f0=null,_0x4ccd7c=0x0;const _0x1a7fda=new Map(Array['from'](_0x1dd0e0['model'][_0x49bf8f]['insertions']['markers'])['filter'](([_0x53a06e])=>!_0x53a06e['startsWith']('revision:')));let _0x270177=0x0;for(const _0x4ba1be of _0x2aae34){const _0x54196a=this['_makeTape'](_0x4ba1be['model'][_0x49bf8f]['insertions']);_0x4ba1be==_0x1dd0e0?(_0x42c0f0=_0x54196a,_0x4ccd7c=_0x42c0f0['length'],_0x42c0f0['forEach'](_0x590fe8=>{_0x590fe8['id']=_0x270177++;}),this['_processTape'](_0x42c0f0)):this['_markInsertions'](_0x42c0f0,_0x54196a);const _0x5c277b=_0x42c0f0['filter'](_0x7a032f=>!_0x7a032f['isAdded'])['map'](_0x275c33=>_0x275c33['id']);let _0x31bccc=0x0;const _0xf6d3d5=this['_makeTape'](_0x4ba1be['model'][_0x49bf8f]['deletions']);_0xf6d3d5['forEach'](_0x32354b=>{_0x32354b['isRemoved']?_0x32354b['id']=_0x4ccd7c++:_0x32354b['id']=_0x5c277b[_0x31bccc++];}),this['_processTape'](_0xf6d3d5),this['_setDistance'](_0x42c0f0,'isAdded'),this['_setDistance'](_0xf6d3d5,'isRemoved'),_0x4ba1be==_0x1dd0e0&&this['_markMarkers'](_0x42c0f0,_0x1a7fda),_0x42c0f0=this['_joinTapes'](_0x42c0f0,_0xf6d3d5),this['_refreshStartEndIndex'](_0x42c0f0),this['_setDistance'](_0x42c0f0,'isRemoved');}_0x42c0f0=_0x42c0f0['filter'](_0x50ad1b=>!(_0x50ad1b['isAdded']&&_0x50ad1b['isRemoved']));const _0xd8ee5b=new Map(_0x4b0fbf['model'][_0x49bf8f]['deletions']['markers']),_0x578ba9=new Set(_0x1a7fda['keys']());for(const _0x2d4688 of _0xd8ee5b['keys']())_0x578ba9['delete'](_0x2d4688);this['_markSuggestions'](_0x42c0f0,_0x578ba9),this['_fixObsoleteTags'](_0x42c0f0),_0x42c0f0=this['_removeMissingPairs'](_0x42c0f0),_0x42c0f0=this['_markMismatchedRemovedTags'](_0x42c0f0),_0x42c0f0=this['_removeUnsupportedChanges'](_0x42c0f0);const {root:_0x4cc598,changes:_0x28a93b}=this['_makeModelFromTape'](_0x42c0f0,_0xbb6f9,_0x49bf8f);_0x24a015['model'][_0x49bf8f]=_0x4cc598;const _0x4866f6=_0x2a8828['get'](_0x49bf8f);if(_0x4866f6){const _0x5b640a=_0xbb6f9['get'](_0x4866f6['userId']),_0x5d3014=new r({'author':_0x5b640a,'type':_0x4866f6['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x49bf8f});_0x28a93b['unshift'](_0x5d3014),_0x24a015['attributes'][_0x49bf8f]['revisionHistoryAttachChange']=_0x5d3014['id'];}_0x24a015['changes']=_0x24a015['changes']['concat'](_0x28a93b);}return _0x24a015;}['_markMarkers'](_0x5b9593,_0x3fefd3){for(let _0x11c698=0x0;_0x11c698<_0x5b9593['length'];_0x11c698++)for(const [_0x48ad88,_0x27d377]of _0x3fefd3)!_0x27d377['isCollapsed']&&_0x27d377['start']['isEqual'](_0x5b9593[_0x11c698]['previousPosition'])&&_0x5b9593[_0x11c698]['markersStart']['push'](_0x48ad88),_0x27d377['end']['isEqual'](_0x5b9593[_0x11c698]['nextPosition'])&&_0x5b9593[_0x11c698]['markersEnd']['push'](_0x48ad88);}['_joinTapes'](_0x898702,_0x5d255c){let _0x2574a8=[],_0x2fc800=0x0,_0x2e42cd=0x0;for(;_0x2fc800<_0x898702['length']||_0x2e42cd<_0x5d255c['length'];){const _0x63b93b=_0x898702[_0x2fc800]||{},_0x446990=_0x5d255c[_0x2e42cd]||{};if(_0x63b93b['id']==_0x446990['id'])_0x2fc800++,_0x2e42cd++,_0x2574a8['push'](_0x63b93b);else{if(_0x446990['isRemoved']&&_0x63b93b['isAdded']){const {commonTape:_0x409eeb,iEnd:_0x2e64fe,jEnd:_0x1a2215}=this['_threeWayMerge'](_0x898702,_0x2fc800,_0x5d255c,_0x2e42cd);_0x2574a8=_0x2574a8['concat'](_0x409eeb),_0x2fc800=_0x2e64fe,_0x2e42cd=_0x1a2215;}else _0x446990['isRemoved']?(_0x2e42cd++,_0x2574a8['push'](_0x446990)):(_0x2fc800++,_0x2574a8['push'](_0x63b93b));}}return _0x2574a8;}['_markSuggestions'](_0x2b885e,_0x46ef0e){const _0xb0cb3=[];for(let _0x5300c3=0x0;_0x5300c3<_0x2b885e['length'];_0x5300c3++){for(let _0x9784cd=0x0;_0x9784cd<_0x2b885e[_0x5300c3]['markersStart']['length'];_0x9784cd++){const _0x3ceee4=_0x2b885e[_0x5300c3]['markersStart'][_0x9784cd];if(!_0x46ef0e['has'](_0x3ceee4))continue;const {group:_0x5c16f9,type:_0x2cd669,authorId:_0x46d162}=_0x5ba153(_0x3ceee4);'revision-suggestion'!=_0x5c16f9||'insertion'!=_0x2cd669&&'deletion'!=_0x2cd669||(_0xb0cb3['unshift']({'type':_0x2cd669,'name':_0x3ceee4,'userId':_0x46d162}),_0x2b885e[_0x5300c3]['markersStart']['splice'](_0x9784cd,0x1),_0x9784cd--);}_0x244f4e(_0x2b885e[_0x5300c3]);for(let _0x85a28=0x0;_0x85a28<_0x2b885e[_0x5300c3]['markersEnd']['length'];_0x85a28++){const _0xeecb30=_0x2b885e[_0x5300c3]['markersEnd'][_0x85a28];if(!_0x46ef0e['has'](_0xeecb30))continue;const {group:_0x4aff55,type:_0x15eec2}=_0x5ba153(_0xeecb30);if('revision-suggestion'!=_0x4aff55||'insertion'!=_0x15eec2&&'deletion'!=_0x15eec2)continue;_0x2b885e[_0x5300c3]['markersEnd']['splice'](_0x85a28,0x1),_0x85a28--;const _0x19eea5=_0xb0cb3['findIndex'](_0x5efe28=>_0x5efe28['name']==_0xeecb30);_0x19eea5>-0x1&&_0xb0cb3['splice'](_0x19eea5,0x1);}}function _0x5ba153(_0x4433a4){const _0x1d816e=_0x4433a4['split'](':');return{'group':_0x1d816e[0x0],'type':_0x1d816e[0x1],'subType':_0x1d816e['length']>=0x5?_0x1d816e[0x2]:null,'id':_0x1d816e['length']<0x5?_0x1d816e[0x2]:_0x1d816e[0x3],'authorId':_0x1d816e['length']<0x5?_0x1d816e[0x3]:_0x1d816e[0x4],'markerCount':0x6==_0x1d816e['length']?_0x1d816e[0x5]:null};}function _0x244f4e(_0x1628d3){for(let _0x2e244f=0x0;_0x2e244f<_0xb0cb3['length'];_0x2e244f++){if(_0x1628d3['isAdded']&&'insertion'==_0xb0cb3[_0x2e244f]['type']&&_0x1628d3['isAdded']['userId']==_0xb0cb3[_0x2e244f]['userId'])return _0x1628d3['isAddSuggestion']=_0xb0cb3[_0x2e244f],void delete _0x1628d3['isAdded'];if(!_0x1628d3['isAdded']&&!_0x1628d3['isRemoved']&&'deletion'==_0xb0cb3[_0x2e244f]['type'])return void(_0x1628d3['isRemoveSuggestion']=_0xb0cb3[_0x2e244f]);}}}['_setDistance'](_0xeeb09a,_0x127e1c){let _0x30ac58=0x0,_0x52ba86=!0x1;const _0x3ed55f=new Map();for(const _0x437f17 of _0xeeb09a)_0x437f17[_0x127e1c]?_0x52ba86&&(_0x30ac58++,_0x52ba86=!0x1):(_0x30ac58++,_0x52ba86=!0x0),_0x3ed55f['set'](_0x437f17['id'],_0x30ac58);for(let _0x326dd2=0x0;_0x326dd2<_0xeeb09a['length'];_0x326dd2++){if('isRemoved'==_0x127e1c&&_0xeeb09a[_0x326dd2]['isAdded']||'isAdded'==_0x127e1c&&_0xeeb09a[_0x326dd2]['isRemoved'])continue;if('text'==_0xeeb09a[_0x326dd2]['type']){_0xeeb09a[_0x326dd2]['distance']=0x0;continue;}const _0x59c08e=_0x3ed55f['get'](_0xeeb09a[_0x326dd2]['pairId']),_0xa8a070=_0x3ed55f['get'](_0xeeb09a[_0x326dd2]['id']);_0xeeb09a[_0x326dd2]['distance']=_0x59c08e-_0xa8a070;}}['_getRevisionsRange'](_0x1c2af6,_0x331c5c,_0x1bbc80=!0x1){const _0x5589d7=[];let _0x1f56cf=this['repository']['getIndex'](_0x1c2af6),_0x540828=this['repository']['getIndex'](_0x331c5c);for(-0x1==_0x540828&&(_0x540828=this['repository']['_revisions']['length'],_0x1bbc80=!0x1);_0x1f56cf<_0x540828;)_0x5589d7['push'](this['repository']['getRevision'](_0x1f56cf)),_0x1f56cf++;return _0x1bbc80&&_0x5589d7['push'](this['repository']['getRevision'](_0x1f56cf)),_0x5589d7;}['_threeWayMerge'](_0xf9a0c7,_0x5b1de0,_0xa53cd6,_0x2b80fb){const _0x2be75b=this['editor']['model']['schema'];let _0x59918a=_0x5b1de0;for(;_0xf9a0c7[_0x59918a]&&_0xf9a0c7[_0x59918a]['isAdded'];)_0x59918a++;let _0x21a996=_0x2b80fb;for(;_0xa53cd6[_0x21a996]&&_0xa53cd6[_0x21a996]['isRemoved'];)_0x21a996++;_0x1da58c(_0xf9a0c7,_0x5b1de0,_0x59918a),_0x1da58c(_0xa53cd6,_0x2b80fb,_0x21a996);const _0x392674=_0xa53cd6['slice'](_0x2b80fb,_0x21a996)['concat'](_0xf9a0c7['slice'](_0x5b1de0,_0x59918a));return _0x392674['sort']((_0x1668d2,_0x1409b4)=>_0x1668d2['side']!=_0x1409b4['side']?_0x1668d2['side']-_0x1409b4['side']:_0x1668d2['level']!=_0x1409b4['level']?_0x1668d2['level']-_0x1409b4['level']:_0x1668d2['distance']!=_0x1409b4['distance']?_0x1409b4['distance']-_0x1668d2['distance']:!!_0x1668d2['isAdded']!=!!_0x1409b4['isAdded']?-0x1==_0x1668d2['side']||0x0==_0x1668d2['side']?_0x1668d2['isAdded']?-0x1:0x1:_0x1668d2['isAdded']?0x1:-0x1:_0x1668d2['index']-_0x1409b4['index']),{'commonTape':_0x392674,'iEnd':_0x59918a,'jEnd':_0x21a996};function _0x1da58c(_0x2aa385,_0x27dab4,_0x26fee8){let _0x26d4a7=-0x1,_0x48850d=Number['POSITIVE_INFINITY'],_0xc52733=!0x0;for(let _0x560b1a=_0x27dab4;_0x560b1a<_0x26fee8;_0x560b1a++)if(_0x2be75b['isInline'](_0x2aa385[_0x560b1a]['item'])||(_0xc52733=!0x1),_0x2aa385[_0x560b1a]['item']['startIndex']<_0x27dab4&&(_0x26d4a7=_0x560b1a),_0x2aa385[_0x560b1a]['item']['endIndex']>=_0x26fee8){_0x48850d=_0x560b1a;break;}_0xc52733&&(_0x26d4a7=_0x26fee8-0x1);for(let _0x4b4f4a=_0x27dab4;_0x4b4f4a<_0x26fee8;_0x4b4f4a++)_0x2aa385[_0x4b4f4a]['side']=_0x4b4f4a<=_0x26d4a7?-0x1:_0x4b4f4a<_0x48850d?0x0:0x1,_0x2aa385[_0x4b4f4a]['index']=_0x4b4f4a;let _0x15c2db=0x0;for(let _0x586810=_0x27dab4;_0x586810<=_0x26d4a7;_0x586810++)0x0==_0x2aa385[_0x586810]['distance']?_0x2aa385[_0x586810]['level']=_0x15c2db:(_0x15c2db++,_0x2aa385[_0x586810]['level']=_0x15c2db,_0x15c2db++);for(let _0x3e4b84=_0x27dab4;_0x3e4b84<_0x26fee8;_0x3e4b84++)0x0==_0x2aa385[_0x3e4b84]['side']&&(_0x2aa385[_0x3e4b84]['level']=_0x15c2db);_0x15c2db=0x0;for(let _0x594e36=_0x26fee8-0x1;_0x594e36>=_0x48850d;_0x594e36--)0x0==_0x2aa385[_0x594e36]['distance']?_0x2aa385[_0x594e36]['level']=_0x15c2db:(_0x15c2db--,_0x2aa385[_0x594e36]['level']=_0x15c2db,_0x15c2db--);}}['_fixObsoleteTags'](_0x5d9ec9){const _0x213831=new Map(),_0x5cd79e=this['editor']['model']['schema'];for(let _0x3b0489=0x1;_0x3b0489<_0x5d9ec9['length'];_0x3b0489++){let _0x535a67,_0x3a3249,_0xe93fb5;const _0x2111fb=_0x5d9ec9[_0x3b0489],_0xe93936=_0x5d9ec9[_0x3b0489-0x1];if('text'==_0x2111fb['type'])continue;if(_0x2111fb['type']!=_0xe93936['type'])continue;if(!_0x5cd79e['isBlock'](_0xe93936['item'])||_0x5cd79e['isLimit'](_0xe93936['item']))continue;if(!_0x5cd79e['isBlock'](_0x2111fb['item'])||_0x5cd79e['isLimit'](_0x2111fb['item']))continue;if((_0x5d9ec9[_0x3b0489]['isAdded']||_0x5d9ec9[_0x3b0489]['isAddSuggestion'])&&_0x5d9ec9[_0x3b0489-0x1]['isRemoved'])_0x535a67=_0x5d9ec9[_0x3b0489],_0x3a3249=_0x5d9ec9[_0x3b0489-0x1],_0xe93fb5=_0x3b0489-0x1;else{if(!_0x5d9ec9[_0x3b0489]['isRemoved']||!_0x5d9ec9[_0x3b0489-0x1]['isAdded']&&!_0x5d9ec9[_0x3b0489-0x1]['isAddSuggestion'])continue;_0x535a67=_0x5d9ec9[_0x3b0489-0x1],_0x3a3249=_0x5d9ec9[_0x3b0489],_0xe93fb5=_0x3b0489;}const _0x25b56a=_0x535a67['level']==_0x3a3249['level'],_0x4415f1=Math['abs'](_0x535a67['level'])<Math['abs'](_0x3a3249['level'])&&0x0==_0x3a3249['distance'];(_0x25b56a||_0x4415f1)&&(_0x213831['set'](_0x3a3249['id'],_0x535a67['id']),_0x5d9ec9['splice'](_0xe93fb5,0x1),_0x3b0489--,_0x535a67['isAdded']=!0x1);}for(let _0x335a95=0x0;_0x335a95<_0x5d9ec9['length'];_0x335a95++)_0x213831['has'](_0x5d9ec9[_0x335a95]['pairId'])&&(_0x5d9ec9[_0x335a95]['pairId']=_0x213831['get'](_0x5d9ec9[_0x335a95]['pairId']));}['_removeMissingPairs'](_0x325196){const _0x36ca15=new Set(_0x325196['map'](_0x368c40=>_0x368c40['id']));for(let _0x457e1d=0x0;_0x457e1d<_0x325196['length'];_0x457e1d++)_0x36ca15['has'](_0x325196[_0x457e1d]['pairId'])||0x0==_0x325196[_0x457e1d]['distance']||(_0x325196[_0x457e1d]['isIncorrect']=!0x0);return _0x325196['filter'](_0x4e3fa3=>!_0x4e3fa3['isIncorrect']);}['_markMismatchedRemovedTags'](_0x4fdc62){const _0x443fe7=new Set();for(let _0x7a369c=0x0;_0x7a369c<_0x4fdc62['length'];_0x7a369c++){if(_0x443fe7['has'](_0x4fdc62[_0x7a369c]['id'])&&_0x4fdc62[_0x7a369c]['isRemoved']&&(_0x4fdc62[_0x7a369c]['isIncorrect']=!0x0),_0x4fdc62[_0x7a369c]['isIncorrect'])continue;if(0x0==_0x4fdc62[_0x7a369c]['distance'])continue;if('elementStart'!=_0x4fdc62[_0x7a369c]['type'])continue;if(null==_0x4fdc62[_0x7a369c]['pairId'])continue;let _0x167125=_0x7a369c+0x1,_0x2f6534=0x0;for(;_0x4fdc62[_0x167125]['id']!=_0x4fdc62[_0x7a369c]['pairId'];)'elementStart'==_0x4fdc62[_0x167125]['type']?_0x2f6534++:'elementEnd'==_0x4fdc62[_0x167125]['type']&&_0x2f6534--,_0x167125++;if(0x0!=_0x2f6534){if(_0x4fdc62[_0x7a369c]['isRemoved'])_0x4fdc62[_0x7a369c]['isIncorrect']=!0x0;else{for(;_0x167125!=_0x7a369c;)_0x4fdc62[_0x167125]['isRemoved']&&0x0!=_0x4fdc62[_0x167125]['distance']&&(_0x4fdc62[_0x167125]['isIncorrect']=!0x0,_0x443fe7['add'](_0x4fdc62[_0x167125]['pairId'])),_0x167125--;}}}return _0x4fdc62['filter'](_0x137120=>!_0x137120['isIncorrect']);}['_removeUnsupportedChanges'](_0x1ea97f){const _0x31b3fd=this['editor']['model']['schema'];for(let _0x13bf9a=0x0;_0x13bf9a<_0x1ea97f['length'];_0x13bf9a++){if(!(_0x1ea97f[_0x13bf9a]['isAdded']||_0x1ea97f[_0x13bf9a]['isAddSuggestion']||_0x1ea97f[_0x13bf9a]['isRemoved']||_0x1ea97f[_0x13bf9a]['isRemoveSuggestion']))continue;if(0x0==_0x1ea97f[_0x13bf9a]['distance'])continue;const _0x2d1eb0=_0x1ea97f[_0x13bf9a]['item'];_0x31b3fd['isBlock'](_0x2d1eb0)||_0x31b3fd['isLimit'](_0x2d1eb0)||(_0x1ea97f[_0x13bf9a]['isAdded']&&delete _0x1ea97f[_0x13bf9a]['isAdded'],_0x1ea97f[_0x13bf9a]['isAddSuggestion']&&delete _0x1ea97f[_0x13bf9a]['isAddSuggestion'],_0x1ea97f[_0x13bf9a]['isRemoveSuggestion']&&delete _0x1ea97f[_0x13bf9a]['isRemoveSuggestion'],_0x1ea97f[_0x13bf9a]['isRemoved']&&(_0x1ea97f[_0x13bf9a]['isIncorrect']=!0x0));}return _0x1ea97f['filter'](_0x3b3d92=>!_0x3b3d92['isIncorrect']);}['_makeModelFromTape'](_0x3178a1,_0x14c776,_0x3e4ceb){const _0x5f4425=new gt(),_0x16b771=[],_0x57b4e7=new Map(),_0x4472dc=this['editor']['model'],_0x3bf6b2=_0x4472dc['schema'],_0x585aa7=[_0x5f4425],_0x149373={},_0x3aa04c={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5aae29=null;const _0x31d3fa=[0x0];for(let _0x1221c9=0x0;_0x1221c9<_0x3178a1['length'];_0x1221c9++)if('elementStart'===_0x3178a1[_0x1221c9]['type']){_0x3178a1[_0x1221c9]['previousPosition']=_0x4472dc['createPositionFromPath'](_0x5f4425,_0x31d3fa);const _0x5c04b1=new ut(_0x3178a1[_0x1221c9]['item']['name'],_0x3178a1[_0x1221c9]['item']['getAttributes']());_0x585aa7[0x0]['_appendChild'](_0x5c04b1),_0x31d3fa['push'](0x0),_0x585aa7['unshift'](_0x5c04b1),_0x3178a1[_0x1221c9]['nextPosition']=_0x4472dc['createPositionFromPath'](_0x5f4425,_0x31d3fa);}else'elementEnd'===_0x3178a1[_0x1221c9]['type']?(_0x585aa7['shift'](),_0x3178a1[_0x1221c9]['previousPosition']=_0x4472dc['createPositionFromPath'](_0x5f4425,_0x31d3fa),_0x31d3fa['pop'](),_0x31d3fa[_0x31d3fa['length']-0x1]++,_0x3178a1[_0x1221c9]['nextPosition']=_0x4472dc['createPositionFromPath'](_0x5f4425,_0x31d3fa)):(_0x3178a1[_0x1221c9]['previousPosition']=_0x4472dc['createPositionFromPath'](_0x5f4425,_0x31d3fa),_0x5aae29?_0x5aae29['_data']+=_0x3178a1[_0x1221c9]['item']['data']:_0x5aae29=new mt(_0x3178a1[_0x1221c9]['item']['data'],_0x3178a1[_0x1221c9]['item']['getAttributes']()),_0x3178a1[_0x1221c9+0x1]&&'text'===_0x3178a1[_0x1221c9+0x1]['type']&&_0x575be6(_0x5aae29,_0x3178a1[_0x1221c9+0x1]['item'])||(_0x585aa7[0x0]['_appendChild'](_0x5aae29),_0x5aae29=null),_0x31d3fa[_0x31d3fa['length']-0x1]+=_0x3178a1[_0x1221c9]['item']['offsetSize'],_0x3178a1[_0x1221c9]['nextPosition']=_0x4472dc['createPositionFromPath'](_0x5f4425,_0x31d3fa));for(let _0x3df0a1=0x0;_0x3df0a1<_0x3178a1['length'];_0x3df0a1++){const _0x1376c0=_0x3178a1[_0x3df0a1]['previousPosition'],_0x124254=_0x3178a1[_0x3df0a1]['nextPosition'];for(const _0x2f02c2 of _0x3178a1[_0x3df0a1]['markersStart'])_0x57b4e7['set'](_0x2f02c2,{'start':_0x1376c0,'end':null});_0x3f8c85('isRemoveSuggestion',_0x3df0a1,_0x1376c0,_0x124254),_0x3f8c85('isAddSuggestion',_0x3df0a1,_0x1376c0,_0x124254),_0x3f8c85('isRemoved',_0x3df0a1,_0x1376c0,_0x124254),_0x3f8c85('isAdded',_0x3df0a1,_0x1376c0,_0x124254);for(const _0x22abca of _0x3178a1[_0x3df0a1]['markersEnd']){const _0x1ebbc4=_0x57b4e7['get'](_0x22abca);_0x1ebbc4?_0x1ebbc4['end']=_0x124254:_0x57b4e7['set'](_0x22abca,{'start':_0x124254,'end':_0x124254});}}for(const [_0x436c5b,_0x2abc6e]of _0x57b4e7){const _0x4a0090=this['editor']['model']['createRange'](_0x2abc6e['start'],_0x2abc6e['end']);_0x5f4425['markers']['set'](_0x436c5b,_0x4a0090);}return _0x16b771['sort']((_0x356e7f,_0x1a7902)=>{const _0x44710e=_0x5f4425['markers']['get']('revision:'+_0x356e7f['id']),_0xa859df=_0x5f4425['markers']['get']('revision:'+_0x1a7902['id']);return _0x44710e['start']['isBefore'](_0xa859df['start'])?-0x1:_0x44710e['start']['isAfter'](_0xa859df['start'])?0x1:_0x44710e['end']['isBefore'](_0xa859df['end'])?-0x1:_0x44710e['end']['isAfter'](_0xa859df['end'])?0x1:'add'===_0x356e7f['type']?-0x1:0x1;}),{'root':_0x5f4425,'changes':_0x16b771};function _0x3f8c85(_0x1d4645,_0x33e2e1,_0x535cb2,_0x425a23){const _0x35b153=!!_0x3178a1[_0x33e2e1][_0x1d4645],_0x5f236b=_0x35b153?_0x3178a1[_0x33e2e1][_0x1d4645]['userId']:null,_0x4cb2f9=_0x33e2e1===_0x3178a1['length']-0x1,_0x337b42=_0x3aa04c[_0x1d4645][0x0],_0x5ef10a=_0x3bf6b2['isObject'](_0x3178a1[_0x33e2e1]['item']);!_0x149373[_0x1d4645]&&_0x35b153?_0x149373[_0x1d4645]={'start':_0x535cb2,'tapeItem':_0x3178a1[_0x33e2e1],'userId':_0x5f236b,'type':_0x1d4645}:_0x149373[_0x1d4645]&&!_0x35b153?(_0x149373[_0x1d4645]['end']=_0x535cb2,_0xbea36b(_0x149373[_0x1d4645]),_0x149373[_0x1d4645]=null):_0x149373[_0x1d4645]&&_0x35b153&&_0x149373[_0x1d4645]['userId']!==_0x5f236b&&(_0x149373[_0x1d4645]['end']=_0x535cb2,_0x337b42&&_0x337b42['userId']===_0x149373[_0x1d4645]['userId']||_0xbea36b(_0x149373[_0x1d4645]),_0x149373[_0x1d4645]={'start':_0x535cb2,'tapeItem':_0x3178a1[_0x33e2e1],'userId':_0x5f236b,'type':_0x1d4645}),_0x149373[_0x1d4645]&&_0x5ef10a&&('elementStart'!==_0x3178a1[_0x33e2e1]['type']||_0x337b42&&_0x337b42['userId']===_0x5f236b||_0x3aa04c[_0x1d4645]['unshift']({'userId':_0x5f236b,'object':_0x3178a1[_0x33e2e1]['item'],'change':_0x149373[_0x1d4645]}),'elementEnd'===_0x3178a1[_0x33e2e1]['type']&&_0x337b42&&_0x337b42['object']===_0x3178a1[_0x33e2e1]['item']&&(_0x3aa04c[_0x1d4645]['shift'](),_0x149373[_0x1d4645]=_0x337b42['change'])),_0x149373[_0x1d4645]&&_0x4cb2f9&&(_0x149373[_0x1d4645]['end']=_0x425a23,_0xbea36b(_0x149373[_0x1d4645]),_0x149373[_0x1d4645]=null);}function _0xbea36b({start:_0x3e7f93,end:_0x3776d9,tapeItem:_0x59bb2c,userId:_0x1f64ef,type:_0x4aa413}){const _0x4ac1ad=_0x59bb2c['item'],_0x3ff3bf=_0x4472dc['schema']['isBlock'](_0x4ac1ad)&&!_0x4472dc['schema']['isLimit'](_0x4ac1ad),_0x163386=_0x3e7f93['nodeAfter']==_0x3776d9['parent']&&_0x3776d9['isAtStart'];if(_0x3ff3bf&&_0x163386)return;const _0x7c6cf6=_0x4472dc['createRange'](_0x3e7f93,_0x3776d9),_0x5c18dc=_0x14c776['get'](_0x1f64ef),_0x45ad8c=new r({'author':_0x5c18dc,'type':'isAdded'==_0x4aa413||'isAddSuggestion'==_0x4aa413?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4aa413||'isRemoveSuggestion'==_0x4aa413},'createdAt':new Date(),'rootName':_0x3e4ceb});_0x16b771['push'](_0x45ad8c),_0x5f4425['markers']['set']('revision:'+_0x45ad8c['id'],_0x7c6cf6);}function _0x575be6(_0x542f09,_0x49e732){const _0x57a494=_0x542f09['getAttributes'](),_0x223fd2=_0x49e732['getAttributes']();for(const _0xd8f7c of _0x57a494){if(_0xd8f7c[0x1]!==_0x49e732['getAttribute'](_0xd8f7c[0x0]))return!0x1;_0x223fd2['next']();}return _0x223fd2['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x232003=>{const _0x2e90df=_0x232003['markerName']['split'](':')[0x1],_0x491e02=this['_getChangeFromId'](_0x2e90df);if(!_0x491e02)return null;const _0x2fb834='add'==_0x491e02['type']?'insertion':'deletion',_0x4d63b0=['ck-suggestion-marker','ck-suggestion-marker-'+_0x2fb834];return _0x491e02['data']['isSuggestion']&&_0x4d63b0['push']('ck-suggestion-marker-'+_0x2fb834+'-new'),this['activeChange']==_0x491e02&&_0x4d63b0['push']('ck-suggestion-marker--active'),{'classes':_0x4d63b0,'attributes':{'data-change-id':_0x2e90df}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x2f136a=>{_0x2f136a['on']('element:pre',(_0xee2c7c,_0x879beb,_0x4b8215)=>{const _0x21bb2c=_0x879beb['viewItem']['getChild'](0x0);if(!_0x21bb2c||!_0x21bb2c['is']('element','code'))return;if(!_0x4b8215['consumable']['consume'](_0x21bb2c,{'attributes':['vid_start','vid_end']}))return;const _0x5994f0=_0x879beb['modelRange']['start']['nodeAfter'];_0x4b8215['writer']['setAttribute']('vid_start',_0x21bb2c['getAttribute']('vid_start'),_0x5994f0),_0x4b8215['writer']['setAttribute']('vid_end',_0x21bb2c['getAttribute']('vid_end'),_0x5994f0);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x56ca8c=>{_0x56ca8c['on']('element',(_0x3c3f13,_0x85aee,_0x38ef65)=>{if(!_0x38ef65['consumable']['consume'](_0x85aee['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x85aee['modelRange']['isCollapsed'])return;const _0x3334bd=_0x85aee['modelRange']['start']['nodeAfter'];_0x3334bd['hasAttribute']('vid_start')||_0x3334bd['hasAttribute']('vid')||(_0x38ef65['writer']['setAttribute']('vid_start',_0x85aee['viewItem']['getAttribute']('vid_start'),_0x3334bd),_0x38ef65['writer']['setAttribute']('vid_end',_0x85aee['viewItem']['getAttribute']('vid_end'),_0x3334bd));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x53792b=>_0x53792b['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x117433,[,_0x51341f])=>{['vid_start','vid_end','vid']['includes'](_0x51341f)&&(_0x117433['return']=!0x0,_0x117433['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x54a7ae=>{_0x54a7ae['on']('attribute:vid',(_0x1c17f1,_0x2c4050,_0x48748e)=>{if('\x20'!=_0x2c4050['item']['data']||_0x2c4050['item']['parent']['maxOffset']>0x1)return;if(!_0x48748e['consumable']['consume'](_0x2c4050['item'],_0x1c17f1['name']))return;const _0x5d629c=_0x48748e['writer'],_0x203174=_0x48748e['mapper']['toViewRange'](_0x2c4050['range']);_0x5d629c['wrap'](_0x203174,_0x5d629c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x56053f){const _0x465bc9=_0x56053f['plugins']['get']('RevisionViewer');return(_0x5125d1,_0x4bee3d,_0x436d68)=>{const _0x5cd939=_0x4bee3d['markerName']['split'](':')[0x1],_0xa8f450=_0x465bc9['_getChangeFromId'](_0x5cd939);if(!_0xa8f450)return null;const _0x3c2614='add'==_0xa8f450['type']?'split':'merge';if(!_0x436d68['consumable']['test'](_0x4bee3d['markerRange'],_0x5125d1['name']))return;const _0x4603b9=_0x4bee3d['markerRange']['getWalker'](),_0x2c11bf=_0x4bee3d['markerRange']['start'],_0x407463=_0x56053f['model']['schema'];let _0x31dd6e=null,_0x48d30f=null,_0x4ded73=!0x1,_0x10157e=!0x1;for(const _0x462d6e of _0x4603b9){const _0x36f32a=_0x462d6e['item'];_0x4ded73=_0x4ded73||_0x407463['isContent'](_0x36f32a);const _0x2007ff=_0x436d68['mapper']['toViewElement'](_0x36f32a);if(_0x2007ff&&_0x2007ff['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x462d6e['type']&&(_0x407463['isBlock'](_0x36f32a)&&!_0x407463['isLimit'](_0x36f32a)&&(_0x36f32a['nextSibling']||_0x2c11bf['isAtEnd']?_0x31dd6e&&_0x31dd6e['parent']==_0x36f32a||(_0x31dd6e=_0x36f32a,_0x51c678(_0x462d6e['previousPosition']),_0x10157e=!0x0):_0x48d30f=_0x48d30f||_0x462d6e['previousPosition']));}function _0x51c678(_0x5aadc1){const _0x3a0897=_0x436d68['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3c2614}),_0x441b7b=_0x436d68['mapper']['toViewPosition'](_0x5aadc1);_0xa8f450['data']['isSuggestion']&&_0x436d68['writer']['addClass']('ck-suggestion-marker-'+_0x3c2614+'-new',_0x3a0897),_0x465bc9['activeChange']==_0xa8f450&&_0x436d68['writer']['addClass']('ck-suggestion-marker--active',_0x3a0897),_0x436d68['writer']['insert'](_0x441b7b,_0x3a0897),_0x436d68['mapper']['bindElementToMarker'](_0x3a0897,_0x4bee3d['markerName']);}_0x4ded73||_0x10157e||!_0x48d30f||_0x51c678(_0x48d30f);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x52dbfb,_0x1712fe,_0xb8b589)=>{const _0x2e7a5b=_0xb8b589['mapper']['markerNameToElements'](_0x1712fe['markerName']);if(_0x2e7a5b){for(const _0x18f84b of _0x2e7a5b)(_0x18f84b['hasClass']('ck-suggestion-marker-split')||_0x18f84b['hasClass']('ck-suggestion-marker-merge'))&&(_0xb8b589['mapper']['unbindElementFromMarkerName'](_0x18f84b,_0x1712fe['markerName']),_0xb8b589['writer']['remove'](_0x18f84b));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x44d9de,_0x55fb9d,_0x1ea669)=>{const _0x152f4f=_0x55fb9d['markerName']['split'](':')[0x1],_0x27b3ea=this['_getChangeFromId'](_0x152f4f);if(!_0x27b3ea)return null;const _0x24d04b='add'==_0x27b3ea['type']?'split':'merge';if(_0x1ea669['consumable']['test'](_0x55fb9d['markerRange'],_0x44d9de['name']))for(const _0x4684df of _0x55fb9d['markerRange']['getItems']()){if(!_0x4684df['is']('element','softBreak'))continue;const _0x265bbf=_0x1ea669['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x24d04b}),_0x719572=_0x1ea669['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4684df));_0x27b3ea['data']['isSuggestion']&&_0x1ea669['writer']['addClass']('ck-suggestion-marker-'+_0x24d04b+'-new',_0x265bbf),this['activeChange']==_0x27b3ea&&_0x1ea669['writer']['addClass']('ck-suggestion-marker--active',_0x265bbf),_0x1ea669['writer']['insert'](_0x719572,_0x265bbf),_0x1ea669['mapper']['bindElementToMarker'](_0x265bbf,_0x55fb9d['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3454f6=>{for(const _0x33cd7c of this['editor']['model']['document']['getRootNames']()){const _0x4a405f=this['editor']['model']['document']['getRoot'](_0x33cd7c),_0x10908b=this['editor']['editing']['view']['document']['getRoot'](_0x33cd7c);if(_0x10908b){const _0x3b77ad=_0x4a405f['getAttribute']('revisionHistoryAttachChange');if(_0x3454f6['removeAttribute']('data-change-id',_0x10908b),_0x3454f6['removeClass']('ck-revision-history-root-add',_0x10908b),_0x3454f6['removeClass']('ck-revision-history-root-remove',_0x10908b),_0x3454f6['removeClass']('ck-revision-history-root--active',_0x10908b),_0x3b77ad){const _0x186942=this['_getChangeFromId'](_0x3b77ad);if(!_0x186942)return null;_0x3454f6['setAttribute']('data-change-id',_0x3b77ad,_0x10908b),_0x3454f6['addClass']('ck-revision-history-root-'+_0x186942['type'],_0x10908b),this['activeChange']==_0x186942&&_0x3454f6['addClass']('ck-revision-history-root--active',_0x10908b);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x438d77=>'revision-comment:'+_0x438d77,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5e8577=>'revision-suggestion:'+_0x5e8577,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3a7693=>({'name':'suggestion:'+_0x3a7693,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4b184b=>{const _0x4027ff=_0x4b184b['markerName']['split'](':')[0x1];return'insertion'!=_0x4027ff&&'deletion'!=_0x4027ff?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4027ff]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',X(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',X(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x285d42,_0x22978d,_0x1dff6d)=>{const _0x56d2a8=_0x1dff6d['mapper']['markerNameToElements'](_0x22978d['markerName']);if(_0x56d2a8){for(const _0x2d6e31 of _0x56d2a8)_0x2d6e31['is']('uiElement')&&(_0x1dff6d['mapper']['unbindElementFromMarkerName'](_0x2d6e31,_0x22978d['markerName']),_0x1dff6d['writer']['remove'](_0x2d6e31));}},{'priority':'high'});}['_getChangeFromId'](_0x34c898){return this['_changeIdToChange']['get'](_0x34c898);}['_getViewForChange'](_0x5d5697){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x5d5697),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x58fc58,_0x5549de,_0x1fd07d,_0x31b87e)=>{_0x31b87e&&this['_balloon']['remove'](_0x31b87e),_0x1fd07d&&(this['_balloon']['add']({'view':_0x1fd07d,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x323918=this['editor']['editing'],_0x49d875=this['_getChangeFromId'](_0x1fd07d['changeId']);let _0x404596;if(_0x49d875['data']['isOnRoot']){const _0x53c11b=_0x323918['view']['getDomRoot'](_0x49d875['rootName']);_0x404596=Array['from'](_0x53c11b['getClientRects']());}else{const _0x4e930b=this['editor']['model']['markers']['get']('revision:'+_0x1fd07d['changeId']);_0x404596=Array['from'](_0x323918['mapper']['markerNameToElements'](_0x4e930b['name']))['map'](_0xa734a6=>_0x323918['view']['domConverter']['mapViewToDom'](_0xa734a6))['map'](_0x5607fe=>Array['from'](_0x5607fe['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x404596[0x0];return _0x404596['find'](_0x4e58e8=>_0x4e58e8['top']-0x3<=this['_activeViewTarget']['y']&&_0x4e58e8['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4e58e8['left']-0x3<=this['_activeViewTarget']['x']&&_0x4e58e8['right']+0x3>=this['_activeViewTarget']['x'])||_0x404596[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x24b34b,_0x47295a,_0x359378,_0x18aaeb)=>{this['activeView']=_0x359378?this['_getViewForChange'](_0x359378):null,this['editor']['model']['change'](()=>{const _0xb1976a=this['editor']['editing'];_0x18aaeb&&(_0x18aaeb['data']['isOnRoot']?_0xb1976a['view']['change'](_0xd544c2=>{_0xd544c2['removeClass']('ck-revision-history-root--active',_0xb1976a['view']['document']['getRoot'](_0x18aaeb['rootName']));}):_0xb1976a['reconvertMarker']('revision:'+_0x18aaeb['id'])),_0x359378&&(_0x359378['data']['isOnRoot']?_0xb1976a['view']['change'](_0x1d7800=>{_0x1d7800['addClass']('ck-revision-history-root--active',_0xb1976a['view']['document']['getRoot'](_0x359378['rootName']));}):_0xb1976a['reconvertMarker']('revision:'+_0x359378['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x22d377,_0x19a024)=>{if(this['activeChange'])return;const _0x53940c=this['_findChangeIdFromDomTarget'](_0x19a024['target']),_0x15f131=this['_changeIdToChange']['get'](_0x53940c);_0x15f131?(this['_activeViewTarget']={'x':_0x19a024['domEvent']['x'],'y':_0x19a024['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x15f131)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2888d9,_0x361c3a)=>{const _0x3d056d=this['_findChangeIdFromDomTarget'](_0x361c3a['target']),_0x4d509d=this['_changeIdToChange']['get'](_0x3d056d);_0x4d509d?(this['_activeViewTarget']={'x':_0x361c3a['domEvent']['x'],'y':_0x361c3a['domEvent']['y']},_0x4d509d===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x4d509d):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x153b2b){do{const _0x179920=_0x153b2b['getAttribute']('data-change-id');if(_0x179920)return _0x179920;_0x153b2b=_0x153b2b['parent'];}while(_0x153b2b);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x179fa7=>{for(const _0x50b112 of this['editor']['model']['markers'])_0x179fa7['removeMarker'](_0x50b112);});}}function X(_0x10ef78,_0x3b96b4){return(_0x1b32c4,_0x1ba94b,_0x1ebea7)=>{if(!_0x1ebea7['consumable']['test'](_0x1ba94b['markerRange'],_0x1b32c4['name']))return;const _0x2aeb27=_0x1ba94b['markerRange']['getWalker'](),_0x2a9d23=_0x1ba94b['markerRange']['start'],_0x34d7e9=_0x10ef78['model']['schema'];let _0x1cd6a0=null,_0xcdedca=null,_0x516595=!0x1,_0x17496b=!0x1;for(const _0x6456a1 of _0x2aeb27){const _0x327910=_0x6456a1['item'];_0x516595=_0x516595||_0x34d7e9['isContent'](_0x327910);const _0x173697=_0x1ebea7['mapper']['toViewElement'](_0x327910);if(_0x173697&&_0x173697['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x6456a1['type']&&(_0x34d7e9['isBlock'](_0x327910)&&!_0x34d7e9['isLimit'](_0x327910)&&(_0x327910['nextSibling']||_0x2a9d23['isAtEnd']?_0x1cd6a0&&_0x1cd6a0['parent']==_0x327910||(_0x1cd6a0=_0x327910,_0x871a77(_0x6456a1['previousPosition']),_0x17496b=!0x0):_0xcdedca=_0xcdedca||_0x6456a1['previousPosition']));}function _0x871a77(_0x223005){const _0x49b209=_0x1ebea7['mapper']['toViewPosition'](_0x223005),_0x358b16=_0x1ebea7['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x3b96b4});_0x1ebea7['writer']['insert'](_0x49b209,_0x358b16),_0x1ebea7['mapper']['bindElementToMarker'](_0x358b16,_0x1ba94b['markerName']);}_0x516595||_0x17496b||!_0xcdedca||_0x871a77(_0xcdedca);};}class wt extends _0x59ada3{constructor(_0x4eec08){super(_0x4eec08);const _0x44aba9=_0x4eec08['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x44aba9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x44aba9,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0xb60bb=this['editor'],_0x2da76a=_0xb60bb['plugins']['get'](m),_0x2ba74f=_0x2da76a['isReady']?_0x2da76a['diff']['newRevisionId']:null;_0xb60bb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2ba74f);}['refresh'](){const {isReady:_0x17e3c3,isEnabled:_0xad78cb,repository:_0x27aa4e,diff:_0x5818ec}=this['editor']['plugins']['get'](m),_0x4b92f8=_0x5818ec&&_0x27aa4e['getLaterVisibleRevision'](_0x5818ec['newRevisionId']);this['isEnabled']=_0x17e3c3&&_0xad78cb&&Boolean(_0x4b92f8);}}class pt extends _0x59ada3{['_step'];constructor(_0x1cc6fc,{direction:_0x3053f8}){super(_0x1cc6fc);const _0x2d5aa0=_0x1cc6fc['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x3053f8?0x1:-0x1,this['listenTo'](_0x2d5aa0,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2d5aa0,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2d5aa0,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x1b2b20=this['editor'],_0x4fa16a=_0x1b2b20['plugins']['get'](m),{isNavigationMode:_0x1e8751,currentChangeNumber:_0x284bcb}=_0x4fa16a;let _0x238921;if(_0x4fa16a['activeChange']=_0x1e8751?_0x4fa16a['diff']['changes']['get'](_0x284bcb+this['_step']):_0x4fa16a['diff']['changes']['first'],_0x4fa16a['activeChange']['data']['isOnRoot'])_0x238921=_0x1b2b20['editing']['view']['getDomRoot'](_0x4fa16a['activeChange']['rootName']);else{const _0x15281e=_0x1b2b20['model']['markers']['get']('revision:'+_0x4fa16a['activeChange']['id']);_0x238921=_0x25f9be(_0x1b2b20['editing'],_0x15281e);}_0x58476b({'target':_0x238921,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x423dcc,currentChangeNumber:_0x156510,numberOfChanges:_0x2b877b,isReady:_0x537469,isEnabled:_0xba6bb}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0xba6bb&&_0x537469&&_0x2b877b)&&(!_0x423dcc||(0x1===this['_step']?_0x156510<_0x2b877b-0x1:_0x156510>0x0));}}class li extends _0x1c04a0{constructor(_0x38356b){super(_0x38356b);const _0x21c72c=this['bindTemplate'],_0x1df977=new _0x48cda4(_0x38356b),_0x5b8d53=new _0x48cda4(_0x38356b);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',(_0x4c107e,_0x3a5460)=>_0x4c107e&&_0x3a5460>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x5c8551,_0x1bf7f6,_0x5d0cc7,_0x30bcdb)=>{if(!_0x5c8551)return g(_0x38356b,'Loading...');if(!_0x5d0cc7)return g(_0x38356b,'No\x20changes');const _0x1ae218=g(_0x38356b,'NUMBER_OF_CHANGES',_0x5d0cc7);return _0x30bcdb?g(_0x38356b,'X_OF_Y_CHANGES',[_0x1bf7f6+0x1,_0x5d0cc7]):_0x1ae218;}),_0x1df977['set']({'label':g(_0x38356b,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x23d172}),_0x5b8d53['set']({'label':g(_0x38356b,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x11b2c7}),_0x1df977['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5b8d53['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1df977['on']('execute',()=>this['fire']('execute','backward')),_0x5b8d53['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',_0x21c72c['if']('_isStatusLabelVisible','ck-hidden',_0x480b89=>!_0x480b89)]},'children':[{'text':_0x21c72c['to']('isNavigationMode',_0x36fda3=>_0x36fda3?g(_0x38356b,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x38356b,'Total')+':\x20')}]},{'text':_0x21c72c['to']('_statusText')}]},new _0x47ae21(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1df977,_0x5b8d53]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x388832{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0xbda164=this['editor']['editing']['view'];_0xbda164['change'](_0x59d2fa=>{for(const _0x58a40b of _0xbda164['document']['roots'])_0x59d2fa['addClass'](ce,_0x58a40b);});}['hide'](){const _0x2af280=this['editor']['editing']['view'];_0x2af280['change'](_0x46af39=>{for(const _0x484621 of _0x2af280['document']['roots'])_0x46af39['removeClass'](ce,_0x484621);});}}class R extends _0x388832{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x3001e2=this['editor'],_0x4cf8ea=_0x3001e2['plugins']['get'](m),_0x275c6b=_0x3001e2['plugins']['get'](le);_0x3001e2['ui']['componentFactory']['add']('exitToEditing',_0x37f4f6=>{const _0x1545ff=new _0x48cda4(_0x37f4f6);return _0x1545ff['set']({'label':g(_0x37f4f6,'Back\x20to\x20editing'),'icon':_0x545685,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1545ff,'execute',()=>{_0x3001e2['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1545ff;}),_0x3001e2['ui']['componentFactory']['add']('restoreRevision',_0x251a37=>{const _0x5195bf=new _0x48cda4(_0x251a37);return _0x5195bf['set']({'label':g(_0x251a37,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x5195bf['bind']('isEnabled')['to'](_0x3001e2['commands']['get']('restoreRevision')),this['listenTo'](_0x5195bf,'execute',()=>_0x3001e2['execute']('restoreRevision')),_0x5195bf;}),_0x3001e2['ui']['componentFactory']['add']('changesNavigation',_0x3e1192=>{const _0x5eb48d=new li(_0x3e1192),_0x12d559=_0x3001e2['commands']['get']('showPreviousChange'),_0x3f100f=_0x3001e2['commands']['get']('showNextChange');return _0x5eb48d['bind']('isBackwardNavigationEnabled')['to'](_0x12d559,'isEnabled'),_0x5eb48d['bind']('isForwardNavigationEnabled')['to'](_0x3f100f,'isEnabled'),_0x5eb48d['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x4cf8ea),this['listenTo'](_0x5eb48d,'execute',(_0x14f496,_0x442a60)=>{_0x3001e2['execute']('forward'===_0x442a60?'showNextChange':'showPreviousChange');}),_0x5eb48d;}),_0x275c6b['show'](),_0x4cf8ea['on']('change:isReady',(_0x36da3b,_0x56f60f,_0x2d5170)=>{_0x2d5170?_0x275c6b['hide']():_0x275c6b['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x2c4194,_0x5e1342){super(_0x2c4194,_0x5e1342);const _0x3c27bc=this['bindTemplate'];this['set']({'label':g(_0x2c4194,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x2c4194,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3c27bc['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x2ad184=this['fieldView']['element'];this['_tooltipString']=_0x2ad184['scrollWidth']>_0x2ad184['clientWidth']&&_0x2ad184['value']||'';}}class oi extends _0x1c04a0{constructor(_0x547b92,_0x3d2c39,_0x4dc8c2){super(_0x547b92);const _0x585409=new _0x39a2ed();_0x585409['set']({'content':_0x3608a6,'viewBox':'0\x200\x2011\x2010'});const _0x2e1b8c=['ck','ck-revision-history-sidebar__revision-author'];_0x4dc8c2&&_0x2e1b8c['push']('ck-revision-history-sidebar__revision-author_creator');const _0xc02da4=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x547b92,_0x4dc8c2?'Revision\x20creator':'Revision\x20author')},'children':[_0x585409,_0x3d2c39['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2e1b8c},'children':_0xc02da4});}}function ni(_0x470c4e,_0x721904){const _0x525b9b=_0x470c4e['bindTemplate'],_0x11d6b7=_0x470c4e['locale'],_0x5d0adb=_0x3c7356(_0x11d6b7);_0x5d0adb['panelPosition']='sw';const _0x2be8f4=function(_0x17b3e6,_0x5ebe69){const _0x33fa8c=function(_0x21dba9,_0x2cfa52){const _0x2d571f=_0x21dba9['locale'],_0x21e8f8={'Compare\x20against\x20selected':g(_0x2d571f,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x2d571f,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x2d571f,'Restore\x20this\x20revision')};return _0x2cfa52['map'](_0x25feb2=>{const _0x4d103f=_0x21e8f8[_0x25feb2['name']];return _0x4d103f&&_0x4d103f!==_0x25feb2['name']&&(_0x25feb2['name']=_0x4d103f),_0x25feb2;});}(_0x17b3e6,_0x5ebe69),_0x9290a7=new _0x42deb6();for(const _0x172cc9 of _0x33fa8c){const _0x50a7e8={'type':'button','model':new to({'label':_0x172cc9['name'],'class':_0x172cc9['class'],'withText':!0x0,'role':'menuitem','_action':_0x172cc9['action']})};_0x50a7e8['model']['bind']('isEnabled')['to'](_0x17b3e6,'isActionsDropdownOpen',_0x50fa5a=>'function'!=typeof _0x172cc9['isEnabled']||(!_0x50fa5a||_0x172cc9['isEnabled'](_0x17b3e6))),_0x9290a7['add'](_0x50a7e8);}return _0x9290a7;}(_0x470c4e,_0x721904);return _0x470c4e['bind']('isActionsDropdownOpen')['to'](_0x5d0adb,'isOpen'),_0x5d0adb['buttonView']['set']({'label':g(_0x11d6b7,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x23c79f}),_0x5d0adb['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x525b9b['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x525b9b['to'](_0x48d563=>_0x48d563['stopPropagation']())}}),_0x5d0adb['on']('execute',_0x245607=>{_0x470c4e['isReady']&&'function'==typeof _0x245607['source']['_action']&&_0x245607['source']['_action'](_0x470c4e);}),_0x2bb12c(_0x5d0adb,_0x2be8f4,{'role':'menu'}),_0x5d0adb['listenTo'](_0x470c4e,'change:isActionsDropdownOpen',(_0x331f04,_0x4232b9,_0x9e3ace)=>{if(_0x9e3ace)for(const _0x49d714 of _0x5d0adb['listView']['items']){const _0x305155=_0x49d714['children']['first'],_0x75dcc8=_0x721904['find'](_0xdd54bc=>_0xdd54bc['action']===_0x305155['_action'])['isVisible'];_0x49d714['isVisible']=void 0x0===_0x75dcc8||_0x75dcc8(_0x470c4e);}}),_0x5d0adb;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x1f7614,uid as _0x2a811c,Collection as _0x2f6a5b,logWarning as _0x41ff87,FocusTracker as _0x1411f8,KeystrokeHandler as _0x1c41ad,scrollViewportToShowTarget as _0x2d24ed,ResizeObserver as nt,ElementReplacer as ot,CKEditorError as _0xe12093}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x2061e4,set as _0x277a5a,unset as _0x438d41,isEqual as _0x1c5062}from'es-toolkit/compat';import{Plugin as _0x506da8,PendingActions as _0x31e0c7,Command as _0x5a96ec,ElementApiMixin as _0xbeea5a,Editor as _0x3dfc7f}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x24f403,getMarkerDomElement as _0x9249c1,ConfirmMixin as ti,sanitizeEditorConfig as _0x2e9595}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x2d2b0d,ViewAttributeElement as _0x2bf1ad,ViewEmptyElement as _0x37aae7,ViewRawElement as _0x36609f,ViewUIElement as _0x644339,ViewDocumentFragment as _0x218b0c,ViewText as _0x3f3247,ViewElement as _0x37f088,Element as ut,Range as lt,Position as ft,DocumentFragment as vt,Text as gt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x5606df,IconChevronUp as _0x24917,IconChevronDown as _0x536269,IconUndo as _0x5ec9a1,IconUser as _0x2cb2bd,IconThreeVerticalDots as _0x916b6a}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as ts,injectCssTransitionDisabler as _0x89b94,submitHandler as _0x29c8c4,LabeledFieldView as _0xc22ea8,createLabeledInputText as _0x34f747,createDropdown as _0x418de7,ListView as _0x2743d1,ListItemView as _0x24db08,ButtonView as te,MenuBarMenuView as _0xafdc44,MenuBarMenuListView as _0x2903e1,MenuBarMenuListItemView as _0x2f8c79,MenuBarMenuListItemButtonView as _0x55977e,ContextualBalloon as _0x1f5838,ToolbarSeparatorView as _0x263769,IconView as _0x5353e5,addListToDropdown as _0xd53a08,ViewModel as to,EditorUI as st,normalizeToolbarConfig as et,BoxedEditorUIView as rt,StickyPanelView as ht,ToolbarView as dt,InlineEditableUIView as ct}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0xd936a}from'luxon';class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1f7614(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x3ebc71){super(),this['id']=_0x3ebc71['id']||_0x2a811c(),this['creator']=_0x3ebc71['creator']||null,this['authors']=_0x3ebc71['authors']||[],this['diffData']=_0x3ebc71['diffData']||null,this['toVersion']=_0x3ebc71['toVersion']||0x0,this['fromVersion']=_0x3ebc71['fromVersion']||0x0,this['set']('name',_0x3ebc71['name']||''),this['set']('createdAt',_0x3ebc71['createdAt']||new Date()),this['set']('attributes',_0x3ebc71['attributes']||{});}['setName'](_0x382964){this['_update']({'name':_0x382964});}['setAttribute'](_0x4f78d3,_0x126091){const _0x24275b=_0x2061e4(this['attributes']);_0x277a5a(_0x24275b,_0x4f78d3,_0x126091),this['_update']({'attributes':_0x24275b});}['removeAttribute'](_0x446341){const _0x46c6ce=_0x2061e4(this['attributes']);_0x438d41(_0x46c6ce,_0x446341),this['_update']({'attributes':_0x46c6ce});}['_update'](_0x343f82,_0x824da9=!0x1){let _0x37253b=!0x1;const _0x41a939={'id':this['id']},_0x5ef1c7=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4b8f67 of _0x5ef1c7){const _0xa46f36=_0x343f82[_0x4b8f67];void 0x0!==_0xa46f36&&_0xa46f36!==this[_0x4b8f67]&&(this[_0x4b8f67]=_0xa46f36,_0x41a939[_0x4b8f67]=_0xa46f36,_0x37253b=!0x0);}_0x37253b&&(_0x41a939['authors']&&(_0x41a939['authorsIds']=_0x41a939['authors']['map'](_0x52658e=>_0x52658e['id']),delete _0x41a939['authors']),this['fire']('_update',_0x41a939,_0x824da9));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x172d76=>_0x172d76['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x506da8{['_revisions'];static get['requires'](){return[_0x24f403];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x4d5df4){super(_0x4d5df4),this['_revisions']=new _0x2f6a5b();}['afterInit'](){!async function(_0x2b3c9f){const _0x454452=_0x1d34ab([0x58,0x4c,0x39,0x7a,0x55,0x44,0x42,0x4f,0x68,0x33,0x67,0x4b,0x37,0x73,0x4a,0x46,0x45,0x64,0x61,0x71,0x43,0x69,0x6d,0x6f,0x48,0x6e,0x4d,0x66,0x74,0x79,0x75,0x54,0x6a,0x49,0x70,0x56,0x36,0x63,0x30,0x41,0x52,0x6c,0x32,0x57,0x59,0x77,0x72,0x50,0x62,0x78,0x51,0x35,0x6b,0x4e,0x65,0x5a,0x31,0x34,0x47,0x76,0x53,0x38]),_0x5044a7=0xeb829,_0x4588d6=0xa32fd81,_0x300de6=0xa359739^_0x4588d6,_0x426b25=window[_0x1d34ab([0x44,0x61,0x74,0x65])][_0x1d34ab([0x6e,0x6f,0x77])](),_0x2aa050=_0x2b3c9f[_0x1d34ab([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x57804e=new window[(_0x1d34ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40c919=>{_0x2aa050[_0x1d34ab([0x6f,0x6e,0x63,0x65])](_0x1d34ab([0x72,0x65,0x61,0x64,0x79]),_0x40c919);}),_0x4719ee={[_0x1d34ab([0x6b,0x74,0x79])]:_0x1d34ab([0x45,0x43]),[_0x1d34ab([0x75,0x73,0x65])]:_0x1d34ab([0x73,0x69,0x67]),[_0x1d34ab([0x63,0x72,0x76])]:_0x1d34ab([0x50,0x2d,0x32,0x35,0x36]),[_0x1d34ab([0x78])]:_0x1d34ab([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]),[_0x1d34ab([0x79])]:_0x1d34ab([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]),[_0x1d34ab([0x61,0x6c,0x67])]:_0x1d34ab([0x45,0x53,0x32,0x35,0x36])},_0x52350a=_0x2aa050[_0x1d34ab([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1d34ab([0x67,0x65,0x74])](_0x1d34ab([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x22464a(){let _0x2fcd7a,_0x4b5aed=null,_0x1df2f1=null;try{if(_0x52350a==_0x1d34ab([0x47,0x50,0x4c]))return _0x1d34ab([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2fcd7a=_0x58dbd3(),!_0x2fcd7a)return _0x1d34ab([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2fcd7a[_0x1d34ab([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1df2f1=_0x278b2a(_0x2fcd7a[_0x1d34ab([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2fcd7a[_0x1d34ab([0x6a,0x74,0x69])])),await _0x53e8e6()?_0x468f69()?_0x3d4305()?_0x1d34ab([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1debc9()?(_0x2fcd7a[_0x1d34ab([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1d34ab([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4b5aed=_0x267d54(_0x1d34ab([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2fcd7a[_0x1d34ab([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1d34ab([0x74,0x72,0x69,0x61,0x6c])&&(_0x4b5aed=_0x267d54(_0x1d34ab([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4d95ed()):_0x1d34ab([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1d34ab([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1d34ab([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1d34ab([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3d4305(){const _0x313adb=[_0x1d34ab([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1d34ab([0x74,0x72,0x69,0x61,0x6c])][_0x1d34ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fcd7a[_0x1d34ab([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x426b25/0x3e8:0xe10*_0x300de6;return _0x2fcd7a[_0x1d34ab([0x65,0x78,0x70])]<_0x313adb;}function _0x468f69(){const _0x2570f7=_0x2fcd7a[_0x1d34ab([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2570f7)return!0x1;if(_0x2570f7[_0x1d34ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d34ab([0x2a])))return!0x0;if(_0x2570f7[_0x1d34ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d34ab([0x52,0x48])))return!0x0;if(_0x2570f7[_0x1d34ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d34ab([0x52,0x52,0x48]))){if(_0x421f1e())return!0x0;if(_0x1fc08f()||_0x4994af())return!0x0;}return!0x1;}function _0x1debc9(){const _0x4cced9=_0x2fcd7a[_0x1d34ab([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4cced9||0x0==_0x4cced9[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x43c0e2}=new URL(window[_0x1d34ab([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4cced9[_0x1d34ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43c0e2))return!0x0;const _0x16b6cf=_0x43c0e2[_0x1d34ab([0x73,0x70,0x6c,0x69,0x74])](_0x1d34ab([0x2e]));return _0x4cced9[_0x1d34ab([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3648ed=>_0x3648ed[_0x1d34ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d34ab([0x2a])))[_0x1d34ab([0x6d,0x61,0x70])](_0x59452f=>_0x59452f[_0x1d34ab([0x73,0x70,0x6c,0x69,0x74])](_0x1d34ab([0x2e])))[_0x1d34ab([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a6479=>_0x5a6479[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x16b6cf[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1d34ab([0x6d,0x61,0x70])](_0x4fafdf=>Array(_0x16b6cf[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4fafdf[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1d34ab([0x66,0x69,0x6c,0x6c])](_0x4fafdf[0x0]===_0x1d34ab([0x2a])?_0x1d34ab([0x2a]):'')[_0x1d34ab([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4fafdf))[_0x1d34ab([0x73,0x6f,0x6d,0x65])](_0x39d693=>_0x16b6cf[_0x1d34ab([0x65,0x76,0x65,0x72,0x79])]((_0x472e4b,_0x3bfabf)=>_0x39d693[_0x3bfabf]===_0x472e4b||_0x39d693[_0x3bfabf]===_0x1d34ab([0x2a])));}function _0x4d95ed(){return _0x4b5aed&&_0x1df2f1?new window[(_0x1d34ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x377350,_0x4d77ee)=>{_0x4b5aed[_0x1d34ab([0x74,0x68,0x65,0x6e])](_0x377350,_0x4d77ee),_0x1df2f1[_0x1d34ab([0x74,0x68,0x65,0x6e])](_0x1265a5=>{_0x1265a5!=_0x1d34ab([0x56,0x61,0x6c,0x69,0x64])&&_0x377350(_0x1265a5);},_0x4d77ee);}):_0x4b5aed||_0x1df2f1||_0x1d34ab([0x56,0x61,0x6c,0x69,0x64]);}}function _0x278b2a(_0x2a59ae,_0x18c526){return new window[(_0x1d34ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x349323=>{if(_0x166c3b())return _0x349323(_0x1d34ab([0x56,0x61,0x6c,0x69,0x64]));_0x426e35(),_0x2aa050[_0x1d34ab([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1d34ab([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1561c0=!0x1;const _0x1a7685=_0x2a811c();function _0x1e2910(_0x272b73){return!!_0x272b73&&(typeof _0x272b73===_0x1d34ab([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x272b73===_0x1d34ab([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x272b73[_0x1d34ab([0x74,0x68,0x65,0x6e])]===_0x1d34ab([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x272b73[_0x1d34ab([0x63,0x61,0x74,0x63,0x68])]===_0x1d34ab([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x455847(_0x553f54){_0x6bc94e(_0x553f54)[_0x1d34ab([0x74,0x68,0x65,0x6e])](_0x2a0012=>{if(!_0x2a0012||_0x2a0012[_0x1d34ab([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1d34ab([0x6f,0x6b]))return _0x1d34ab([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xe9efd6(_0x47186d(_0x1a7685+_0x18c526))!=_0x2a0012[_0x1d34ab([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1d34ab([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1d34ab([0x56,0x61,0x6c,0x69,0x64]);})[_0x1d34ab([0x74,0x68,0x65,0x6e])](_0x1991d1=>(_0x3f3233(),_0x1991d1),()=>{const _0x251787=_0x6b7b68();return null==_0x251787?(_0x3f3233(),_0x1d34ab([0x56,0x61,0x6c,0x69,0x64])):_0x1d34ab(_0x426b25-_0x251787>(0x2e3e7981^_0x4588d6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1d34ab([0x74,0x68,0x65,0x6e])](_0x349323)[_0x1d34ab([0x63,0x61,0x74,0x63,0x68])](()=>{_0x349323(_0x1d34ab([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x557e41=0xa041301^_0x4588d6;function _0x3f3233(){const _0x2279c8=_0x1d34ab([0x6c,0x6c,0x63,0x74,0x2d])+_0xe9efd6(_0x47186d(_0x2a59ae)),_0x41e47e=_0x4ca860(_0xe9efd6(window[_0x1d34ab([0x4d,0x61,0x74,0x68])][_0x1d34ab([0x63,0x65,0x69,0x6c])](_0x426b25/_0x557e41)));window[_0x1d34ab([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1d34ab([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2279c8,_0x41e47e);}function _0x6b7b68(){const _0x2ed6b5=_0x1d34ab([0x6c,0x6c,0x63,0x74,0x2d])+_0xe9efd6(_0x47186d(_0x2a59ae)),_0x17a369=window[_0x1d34ab([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1d34ab([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2ed6b5);return _0x17a369?window[_0x1d34ab([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ca860(_0x17a369),0x10)*_0x557e41:null;}function _0x6bc94e(_0x17b572){return new window[(_0x1d34ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3836a1,_0x32ebcd)=>{_0x17b572[_0x1d34ab([0x74,0x68,0x65,0x6e])](_0x3836a1,_0x32ebcd),window[_0x1d34ab([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x32ebcd,0xa332941^_0x4588d6);});}}_0x2aa050[_0x1d34ab([0x6f,0x6e])](_0x1d34ab([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x472c1e,_0x380588)=>{if(_0x380588[0x0]!=_0x2a59ae)return _0x349323(_0x1d34ab([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x380588[0x1]={..._0x380588[0x1],[_0x1d34ab([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1a7685};},{[_0x1d34ab([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1d34ab([0x68,0x69,0x67,0x68])}),_0x2aa050[_0x1d34ab([0x6f,0x6e])](_0x1d34ab([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x37a519=>{_0x1e2910(_0x37a519[_0x1d34ab([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1561c0=!0x0,_0x455847(_0x37a519[_0x1d34ab([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1d34ab([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1d34ab([0x6c,0x6f,0x77])}),_0x57804e[_0x1d34ab([0x74,0x68,0x65,0x6e])](()=>{_0x1561c0||_0x349323(_0x1d34ab([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x166c3b(){return _0x2aa050[_0x1d34ab([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1d34ab([0x76,0x69,0x65,0x77])][_0x1d34ab([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1d34ab([0x61,0x75,0x74,0x6f]);}function _0x426e35(){_0x2aa050[_0x1d34ab([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1d34ab([0x76,0x69,0x65,0x77])][_0x1d34ab([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1d34ab([0x61,0x75,0x74,0x6f]);}}function _0x267d54(_0x5a563c){const _0xba0a00=[new window[(_0x1d34ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3cf854=>setTimeout(_0x3cf854,0xa3bc34d^_0x4588d6)),_0x57804e[_0x1d34ab([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1d34ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x247887=>{const _0x50d324=0xa32fd86^_0x4588d6,_0x31073c=_0x2b3c9f[_0x1d34ab([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x43dfa8(){_0x31073c[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x50d324&&_0x247887();}_0x43dfa8(),_0x31073c[_0x1d34ab([0x6f,0x6e])](_0x1d34ab([0x61,0x64,0x64]),_0x43dfa8);})),new window[(_0x1d34ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4146b7=>{function _0x53cd7b(){for(const _0x3ab8f8 in window)if(window[_0x1d34ab([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x1d34ab([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x3ab8f8))&&window[_0x3ab8f8]==_0x5044a7)return _0x4146b7();_0x2aa050[_0x1d34ab([0x73,0x74,0x61,0x74,0x65])]!=_0x1d34ab([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x1d34ab([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x53cd7b,0xa32ee09^_0x4588d6);}_0x199544(_0x1d34ab([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x53cd7b();})];return window[_0x1d34ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1d34ab([0x72,0x61,0x63,0x65])](_0xba0a00)[_0x1d34ab([0x74,0x68,0x65,0x6e])](()=>_0x5a563c);}async function _0x12328f(){if(await _0x57804e,_0x199544(_0x1d34ab([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0xbe9a1c=_0x2b3c9f[_0x1d34ab([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x5d4e4e=_0x2b3c9f[_0x1d34ab([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])](_0xbe9a1c[_0x1d34ab([0x69,0x64])]),_0x4cecbb=_0x2b6d03(_0x1d34ab([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4cecbb[_0x1d34ab([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0xbe9a1c['id'],_0x5d4e4e?_0x5d4e4e['id']:null,!0x0),_0x4cecbb[_0x1d34ab([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1d34ab([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4cecbb[_0x1d34ab([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4cecbb[_0x1d34ab([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x249627,void(_0x4cecbb[_0x1d34ab([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x249627);}if(_0x199544(_0x1d34ab([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1b25a6=_0x2b6d03(_0x1d34ab([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1b25a6[_0x1d34ab([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1d34ab([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1b25a6[_0x1d34ab([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1b25a6[_0x1d34ab([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x249627,_0x1b25a6[_0x1d34ab([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x249627;}_0x2aa050[_0x1d34ab([0x6d,0x6f,0x64,0x65,0x6c])][_0x1d34ab([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x249627,_0x2aa050[_0x1d34ab([0x6d,0x6f,0x64,0x65,0x6c])][_0x1d34ab([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x249627,_0x2aa050[_0x1d34ab([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1d34ab([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x421f1e(){return _0x199544(_0x1d34ab([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2b6d03(_0x1d34ab([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x1d34ab([0x73,0x74,0x61,0x74,0x65])]==_0x1d34ab([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1fc08f(){return _0x199544(_0x1d34ab([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 _0x4994af(){return _0x199544(_0x1d34ab([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xc7bd38(_0x4350c8){const _0x4c9e38=_0x6271c1();_0x2aa050[_0x4c9e38]=_0x1d34ab([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])+_0x4350c8,_0x4350c8[_0x1d34ab([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x1d34ab([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x6271c1()]=_0x5044a7),_0x4350c8!=_0x1d34ab([0x56,0x61,0x6c,0x69,0x64])&&_0x12328f();}function _0x6271c1(){const _0xaa78c3=window[_0x1d34ab([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1d34ab([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1d34ab([0x6e,0x6f,0x77])]())[_0x1d34ab([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1d34ab([0x2e]),'');let _0x226445=_0x1d34ab([0x58]);for(let _0x1f2b72=0x0;_0x1f2b72<_0xaa78c3[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1f2b72+=0x2){let _0x360dae=window[_0x1d34ab([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xaa78c3[_0x1d34ab([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1f2b72,_0x1f2b72+0x2));_0x360dae>=_0x454452[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x360dae-=_0x454452[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x226445+=_0x454452[_0x360dae];}return _0x226445;}function _0x58dbd3(){const _0x10c1db=_0x52350a[_0x1d34ab([0x73,0x70,0x6c,0x69,0x74])](_0x1d34ab([0x2e]));if(0x3!=_0x10c1db[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x314ada(_0x10c1db[0x1]);function _0x314ada(_0x561083){const _0xd891c5=_0x30a7bf(_0x561083);return _0xd891c5&&_0x464b29()?_0xd891c5:null;function _0x464b29(){const _0x4fd25a=_0xd891c5[_0x1d34ab([0x6a,0x74,0x69])],_0x3afc23=window[_0x1d34ab([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4fd25a[_0x1d34ab([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4fd25a[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1c81c2={..._0xd891c5,[_0x1d34ab([0x6a,0x74,0x69])]:_0x4fd25a[_0x1d34ab([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4fd25a[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1c81c2[_0x1d34ab([0x76,0x63])],_0x47186d(_0x1c81c2)==_0x3afc23;}}}async function _0x53e8e6(){let _0x54854d=!0x0;try{const _0x2829db=_0x52350a[_0x1d34ab([0x73,0x70,0x6c,0x69,0x74])](_0x1d34ab([0x2e])),[_0x24df9e,_0x11d0fb,_0x3e936c]=_0x2829db;return _0x2a2dd4(_0x24df9e),await _0x3db443(_0x24df9e,_0x11d0fb,_0x3e936c),_0x54854d;}catch{return!0x1;}function _0x2a2dd4(_0x16ab15){const _0x15b6e1=_0x30a7bf(_0x16ab15);_0x15b6e1&&_0x15b6e1[_0x1d34ab([0x61,0x6c,0x67])]==_0x1d34ab([0x45,0x53,0x32,0x35,0x36])||(_0x54854d=!0x1);}async function _0x3db443(_0x1c47c0,_0x44c94a,_0x1a9ea6){const _0x56d51b=window[_0x1d34ab([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1d34ab([0x66,0x72,0x6f,0x6d])](_0x4db6dd(_0x1a9ea6),_0x534923=>_0x534923[_0x1d34ab([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3d585c=new window[(_0x1d34ab([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1d34ab([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1c47c0+_0x1d34ab([0x2e])+_0x44c94a),_0x1f343d=window[_0x1d34ab([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1d34ab([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1f343d)return;const _0x1d078b=await _0x1f343d[_0x1d34ab([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1d34ab([0x6a,0x77,0x6b]),_0x4719ee,{[_0x1d34ab([0x6e,0x61,0x6d,0x65])]:_0x1d34ab([0x45,0x43,0x44,0x53,0x41]),[_0x1d34ab([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1d34ab([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1d34ab([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1f343d[_0x1d34ab([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1d34ab([0x6e,0x61,0x6d,0x65])]:_0x1d34ab([0x45,0x43,0x44,0x53,0x41]),[_0x1d34ab([0x68,0x61,0x73,0x68])]:{[_0x1d34ab([0x6e,0x61,0x6d,0x65])]:_0x1d34ab([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1d078b,_0x56d51b,_0x3d585c)||(_0x54854d=!0x1);}}function _0x30a7bf(_0x42c42d){return _0x42c42d[_0x1d34ab([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1d34ab([0x65,0x79]))?JSON[_0x1d34ab([0x70,0x61,0x72,0x73,0x65])](_0x4db6dd(_0x42c42d)):null;}function _0x4db6dd(_0x3fdbd5){return window[_0x1d34ab([0x61,0x74,0x6f,0x62])](_0x3fdbd5[_0x1d34ab([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1d34ab([0x2b]))[_0x1d34ab([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1d34ab([0x2f])));}function _0x47186d(_0x3a6c78){let _0x244db7=0x1505;function _0x1773b0(_0xdc204e){for(let _0x49fa56=0x0;_0x49fa56<_0xdc204e[_0x1d34ab([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x49fa56++){const _0x576459=_0xdc204e[_0x1d34ab([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x49fa56);_0x244db7=(_0x244db7<<0x5)+_0x244db7+_0x576459,_0x244db7&=_0x244db7;}}function _0x16facc(_0x54cdeb){Array[_0x1d34ab([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x54cdeb)?_0x54cdeb[_0x1d34ab([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x16facc):_0x54cdeb&&typeof _0x54cdeb==_0x1d34ab([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1d34ab([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x54cdeb)[_0x1d34ab([0x73,0x6f,0x72,0x74])]()[_0x1d34ab([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2c74fd,_0xd3e756])=>{_0x1773b0(_0x2c74fd),_0x16facc(_0xd3e756);}):_0x1773b0(window[_0x1d34ab([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x54cdeb));}return _0x16facc(_0x3a6c78),_0x244db7>>>0x0;}function _0xe9efd6(_0x1711f0){return _0x1711f0[_0x1d34ab([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1d34ab([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1d34ab([0x30]));}function _0x4ca860(_0x4a16cf){return _0x4a16cf[_0x1d34ab([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1d34ab([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1d34ab([0x6a,0x6f,0x69,0x6e])]('');}function _0x199544(_0x50529c){return _0x2aa050[_0x1d34ab([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1d34ab([0x68,0x61,0x73])](_0x50529c);}function _0x2b6d03(_0x46158e){return _0x2aa050[_0x1d34ab([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1d34ab([0x67,0x65,0x74])](_0x46158e);}function _0x249627(){}function _0x1d34ab(_0x103d02){return _0x103d02['map'](_0x1d9d5a=>String['fromCharCode'](_0x1d9d5a))['join']('');}_0xc7bd38(await _0x22464a());}(this);}['createRevision'](_0x330a74){const _0xca563d=this['editor']['plugins']['get']('Users');return new h({'id':_0x330a74['id'],'name':_0x330a74['name'],'creator':_0x330a74['creatorId']?_0xca563d['getUser'](_0x330a74['creatorId']):null,'diffData':_0x330a74['diffData']||_0x330a74['data'],'authors':_0x330a74['authorsIds']['map'](_0xd169c2=>_0xca563d['getUser'](_0xd169c2)),'createdAt':new Date(_0x330a74['createdAt']),'attributes':_0x330a74['attributes'],'fromVersion':_0x330a74['fromVersion'],'toVersion':_0x330a74['toVersion']});}['addRevision'](_0x378bbe,_0x399959=0x0){this['_revisions']['add'](_0x378bbe,_0x399959);}['getRevision'](_0x229bb1){return this['_revisions']['get'](_0x229bb1);}['getRevisions'](_0xd0c056={'toJSON':!0x1}){const _0x3bd836=Array['from'](this['_revisions']);return _0x3bd836['reverse'](),_0xd0c056['toJSON']?_0x3bd836['map'](_0x17d3fe=>_0x17d3fe['toJSON']()):_0x3bd836;}['getIndex'](_0x2a640b){return this['_revisions']['getIndex'](_0x2a640b);}['getEarlierVisibleRevision'](_0x4855f6){const [,_0xc95e99]=this['getRevisionsIterator'](_0x4855f6,{'direction':'earlier'});return _0xc95e99;}['getLaterVisibleRevision'](_0x38ccb4){const [,_0x90eaf]=this['getRevisionsIterator'](_0x38ccb4,{'direction':'later'});return _0x90eaf;}['getRevisionsInDiff'](_0x37ef14){const _0x2d13dd=[];for(const _0x1fc3e7 of this['getRevisionsIterator'](_0x37ef14['newRevisionId']))if(_0x2d13dd['push'](_0x1fc3e7),_0x1fc3e7['id']===_0x37ef14['oldRevisionId'])break;return _0x2d13dd;}*['getRevisionsIterator'](_0x523547,{direction:_0x1c93c8='earlier',filter:_0x147cbe=()=>!0x0}={}){const _0x1e3cb1='earlier'===_0x1c93c8?0x1:-0x1;let _0x3a9e06=this['_revisions']['get'](_0x523547),_0x2fdc0b=this['getIndex'](_0x3a9e06);for(yield _0x3a9e06;_0x3a9e06;){if(_0x2fdc0b+=_0x1e3cb1,_0x3a9e06=this['getRevision'](_0x2fdc0b),!_0x3a9e06)return;_0x147cbe(_0x3a9e06)&&(yield _0x3a9e06);}}}class V extends _0x506da8{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2d2b0d,'c'],[_0x2bf1ad,'a'],[_0x37aae7,'e'],[_0x36609f,'r'],[_0x644339,'u']]);['_typeCharToViewClass']=new Map([['c',_0x2d2b0d],['a',_0x2bf1ad],['e',_0x37aae7],['r',_0x36609f],['u',_0x644339]]);async['loadRevisionData'](_0x305cec,_0xde995c){if(_0x305cec['diffData']||!_0xde995c)return;const _0x2021ed=this['editor']['config']['get']('collaboration.channelId'),_0x44d26c=await _0xde995c['getRevision']({'channelId':_0x2021ed,'revisionId':_0x305cec['id']});_0x305cec['diffData']=_0x44d26c['diffData'];}['getRevisionDocumentData'](_0x45ac54){const _0x2703d9={};for(const _0x543a2e in _0x45ac54['diffData']){if(_0x45ac54['diffData'][_0x543a2e]['attachChange']&&!_0x45ac54['diffData'][_0x543a2e]['attachChange']['isAttached'])continue;const _0x3419fb=this['_removeRevisionMarkers'](JSON['parse'](_0x45ac54['diffData'][_0x543a2e]['insertions'])),_0x2b9bae=this['editor']['editing']['view']['document'],_0x52a0e0=new _0x218b0c(_0x2b9bae,_0x3419fb['map'](_0x315cb4=>this['_getViewFromDiffObj'](_0x315cb4,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x2703d9[_0x543a2e]=this['editor']['data']['processor']['toData'](_0x52a0e0),this['editor']['data']['processor']['useFillerType']('default');}return _0x2703d9;}['getRevisionRootsAttributes'](_0x4aa22e){const _0x1be060={};for(const _0x5a8fb9 in _0x4aa22e['diffData'])_0x4aa22e['diffData'][_0x5a8fb9]['attachChange']&&!_0x4aa22e['diffData'][_0x5a8fb9]['attachChange']['isAttached']||(_0x1be060[_0x5a8fb9]=_0x4aa22e['diffData'][_0x5a8fb9]['attributesAfter']||{});return _0x1be060;}['_getTypeCharForViewElement'](_0x3cb201){return this['_viewClassToTypeChar']['get'](_0x3cb201['constructor']);}['_getViewFromDiffObj'](_0x247fff,_0x44da83){const _0x1fd85d=this['editor']['editing']['view']['document'];if('string'==typeof _0x247fff)return new _0x3f3247(_0x1fd85d,_0x247fff);{let _0x4dc844,_0x10fd39;_0x10fd39='u'==_0x247fff['type']||'r'==_0x247fff['type']?[]:_0x247fff['children']['map'](_0x31c74a=>this['_getViewFromDiffObj'](_0x31c74a,_0x44da83));const _0x2eaf85=this['_typeCharToViewClass']['get'](_0x247fff['type'])||_0x37f088,_0x48f1f7=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x4dc844=new _0x2eaf85(_0x1fd85d,_0x247fff['name'],_0x247fff['attributes'],_0x10fd39),'u'==_0x247fff['type']&&_0x247fff['children'][0x0]){const _0x52bde7=_0x247fff['children'][0x0];if(_0x4dc844['render']=function(_0x5300df){const _0x5a2eac=_0x5300df['createElement']('div');return _0x5a2eac['innerHTML']=_0x52bde7,_0x5a2eac['childNodes'][0x0];},_0x44da83){const _0xfc258d=new _0x218b0c(_0x1fd85d);_0xfc258d['_appendChild'](_0x4dc844);const _0x327714=Array['from'](_0x48f1f7['viewChildrenToDom'](_0xfc258d,{'bind':!0x1})),_0x13d8aa=_0x48f1f7['domDocument']['createElement']('div');_0x13d8aa['append'](..._0x327714),_0x4dc844=Array['from'](_0x48f1f7['domChildrenToView'](_0x13d8aa))[0x0];}}else{if('r'==_0x247fff['type']&&_0x247fff['children'][0x0]){const _0x25950c=_0x247fff['children'][0x0];if(_0x4dc844['render']=function(_0x5cc279){_0x5cc279['innerHTML']=_0x25950c;},_0x44da83){const _0x31f4b6=new _0x218b0c(_0x1fd85d);_0x31f4b6['_appendChild'](_0x4dc844);const _0x125cda=Array['from'](_0x48f1f7['viewChildrenToDom'](_0x31f4b6,{'bind':!0x1})),_0x117718=_0x48f1f7['domDocument']['createElement']('div');_0x117718['append'](..._0x125cda);const _0x500dae=Array['from'](_0x48f1f7['domChildrenToView'](_0x117718));_0x500dae['length']>0x1?_0x4dc844['_appendChild'](_0x500dae):_0x4dc844=_0x500dae[0x0];}}}if(_0x247fff['customProperties']){for(const [_0x47345c,_0x57ef0a]of _0x247fff['customProperties'])_0x4dc844['_setCustomProperty'](_0x47345c,_0x57ef0a);}const _0x12e6bb=void 0x0===_0x247fff['fillerOffset']?null:_0x247fff['fillerOffset'];return null!==_0x12e6bb&&(_0x4dc844['getFillerOffset']=()=>_0x12e6bb),_0x4dc844;}}['_makeModelFromViewString'](_0x365fa5){const _0x229ccd=JSON['parse'](_0x365fa5),_0x390609=this['editor']['editing']['view']['document'],_0x3754ab=new _0x218b0c(_0x390609,_0x229ccd['map'](_0x3c191c=>this['_getViewFromDiffObj'](_0x3c191c,!0x0)));return this['editor']['data']['toModel'](_0x3754ab);}['_removeRevisionMarkers'](_0x344c11){return(_0x344c11=_0x344c11['filter'](_0x565c20=>!_0x565c20['name']||'revision-start'!==_0x565c20['name']&&'revision-end'!==_0x565c20['name']))['forEach'](_0x278279=>{'string'!=typeof _0x278279&&(_0x278279['children']=this['_removeRevisionMarkers'](_0x278279['children']),_0x278279['attributes']=_0x278279['attributes']['filter'](_0x69493=>!_0x69493[0x0]['startsWith']('data-revision-')));}),_0x344c11;}}function g(_0x56f884,_0x3b6a3b,_0x7b2867){const t=_0x56f884['t'];switch(_0x3b6a3b){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'},_0x7b2867);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x7b2867);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class u extends _0x506da8{['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[_0x24f403,I,V,_0x31e0c7];}constructor(_0x38e928){super(_0x38e928),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x1e1e3c=_0x2a811c();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x1e1e3c},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 _0xc3c01a=this['repository']['getRevision'](0x0),_0x31ebaa=_0xc3c01a&&null===_0xc3c01a['creator']?_0xc3c01a:null;if(this['_continueCurrentRevision']=!!_0x31ebaa&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x3dde16=this['_source']['getCurrentRevisionId'](),_0x8c30a5=this['repository']['getRevision'](_0x3dde16);if(_0x8c30a5)this['_startingVersion']=_0x8c30a5['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x6c7998=this['_source']['history']['_operations']['find'](_0x4f42c4=>!_0x4f42c4['_isInit']),_0xd689a3=_0x6c7998?_0x6c7998['baseVersion']:this['_source']['history']['version'];_0xc3c01a?(_0xc3c01a['toVersion']<_0xd689a3&&_0xc3c01a['_update']({'toVersion':_0xd689a3}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x31ebaa['id'],this['_startingVersion']=_0x31ebaa['fromVersion']):(this['_startingVersion']=_0xc3c01a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0xd689a3,this['_continueCurrentRevision']=!0x1);}}else _0x31ebaa&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x31ebaa['toVersion'],this['editor']['model']['document']['history']['version']),_0x31ebaa['fromVersion']===_0x31ebaa['toVersion']?(0x0!==_0x31ebaa['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x31ebaa['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x31ebaa['id'],this['_startingVersion']=_0x31ebaa['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',_0x480521=>!_0x480521),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x15db0f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5ede0f;for(const _0x3c2bf6 in _0x15db0f){const _0x150a2d=_0x3c2bf6,_0x2f17ce=_0x15db0f[_0x150a2d];if('revisionHistoryLicenseKeyValid'==_0x2f17ce||'revisionHistoryLicenseKeyInvalid'==_0x2f17ce||'revisionHistoryLicenseKeyExpired'==_0x2f17ce||'revisionHistoryLicenseKeyDomainLimit'==_0x2f17ce||'revisionHistoryLicenseKeyNotAllowed'==_0x2f17ce||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2f17ce||'revisionHistoryLicenseKeyTrialLimit'==_0x2f17ce||'revisionHistoryLicenseKeyUsageLimit'==_0x2f17ce){delete _0x15db0f[_0x150a2d],_0x5ede0f=_0x2f17ce,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5ede0f&&_0x15db0f['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5ede0f&&_0x15db0f['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5ede0f&&_0x15db0f['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5ede0f&&_0x15db0f['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5ede0f&&_0x15db0f['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x5ede0f&&_0x15db0f['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5ede0f&&_0x15db0f['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x36e01f=this['repository']['getRevision'](0x0),_0x562ea1=await this['getRevisionDocumentData'](_0x36e01f),_0x5135c9=await this['getRevisionRootsAttributes'](_0x36e01f);this['_replaceEditorDataWithRevisionData'](_0x562ea1,_0x5135c9);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x161d2e){this['_source']=_0x161d2e;}async['update'](){const _0x43e1c4=await this['_source']['getLatestVersion']();if(_0x43e1c4>this['currentRevision']['toVersion']){await this['_loadState']();const _0xfdb558=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x43e1c4});_0xfdb558['authors']=_0xfdb558['authorsIds']['map'](_0x194eb0=>this['editor']['plugins']['get']('Users')['getUser'](_0x194eb0)),this['currentRevision']['_update'](_0xfdb558);}}async['saveRevision'](_0x18fecb={},_0x38627a=null){const _0xf26f34=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x38627a>this['currentRevision']['toVersion']&&(_0x38627a=null),null===_0x38627a&&(_0x38627a=await this['_source']['getLatestVersion']());const _0x17111c=this['_getFromVersion'](_0x38627a),_0x2305a4=this['buildRevisionData']({'from':_0x17111c,'to':_0x38627a});if(this['currentRevision']['toVersion']<_0x38627a){const _0x2534c7=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x38627a,'to':_0x38627a});_0x2534c7['authors']=[],_0x2534c7['authorsIds']=[],_0x2534c7['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2534c7,!0x0),delete _0x2534c7['authors'],_0xf26f34['push'](_0x2534c7);}_0x18fecb['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x18fecb['name']=_0x18fecb['name']||null,_0x18fecb['id']=_0x18fecb['id']||_0x2a811c(),_0x18fecb={..._0x18fecb,..._0x2305a4};const _0x274321=this['addRevisionData'](_0x18fecb);_0xf26f34['push'](_0x18fecb);const _0x3df86b=this['repository']['getIndex'](_0x274321);if(0x0!==_0x3df86b){const _0xb2a85a=this['repository']['getRevision'](_0x3df86b-0x1);if(_0xb2a85a['fromVersion']!==_0x38627a){const _0x412d4e=this['_revisionDataBuilder']['getData'](_0x38627a,_0xb2a85a['toVersion']),_0x43e49d={'id':_0xb2a85a['id'],'diffData':_0x412d4e['diffData'],'authorsIds':_0x412d4e['authorsIds'],'authors':_0x412d4e['authorsIds']['map'](_0x22b0c4=>this['editor']['plugins']['get']('Users')['getUser'](_0x22b0c4)),'fromVersion':_0x38627a};_0xb2a85a===this['currentRevision']&&(_0x43e49d['createdAt']=new Date(_0x18fecb['createdAt']['getTime']()+0xa)),_0xb2a85a['_update'](_0x43e49d,!0x0),delete _0x43e49d['authors'],_0xf26f34['push'](_0x43e49d);}}if(this['adapter']){for(const _0x3ea3eb of _0xf26f34)this['_bufferUpdate'](_0x3ea3eb['id'],_0x3ea3eb,!0x0);this['sendBufferedUpdates']();}return _0x274321;}['addRevisionData'](_0x2609e7){const _0x5dcd62=this['repository']['createRevision'](_0x2609e7);return this['adapter']&&_0x5dcd62['on']('_update',(_0x479787,_0x1350e2,_0x244d18)=>{_0x244d18||(this['_bufferUpdate'](_0x1350e2['id'],_0x1350e2,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5dcd62,this['_findInsertionIndex'](_0x5dcd62)),_0x5dcd62;}async['getRevisionDocumentData'](_0x199b1a){return await this['_utils']['loadRevisionData'](_0x199b1a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x199b1a);}async['getRevisionRootsAttributes'](_0x2e0def){return await this['_utils']['loadRevisionData'](_0x2e0def,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2e0def);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0xbe01ee=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x2c3ccd=0x0;_0x2c3ccd<_0xbe01ee['length'];_0x2c3ccd++){const _0x4b0291=_0xbe01ee[_0x2c3ccd];let _0x36e2f1=!0x1;for(const _0x3cb200 of Object['keys'](_0x4b0291))void 0x0===_0x4b0291[_0x3cb200]?delete _0x4b0291[_0x3cb200]:'id'!==_0x3cb200&&(_0x36e2f1=!0x0);_0x36e2f1||(_0xbe01ee[_0x2c3ccd]=null);}if(_0xbe01ee=_0xbe01ee['filter'](_0x52a8b2=>null!==_0x52a8b2),!_0xbe01ee['length'])return;for(let _0x268f66=0x0;_0x268f66<_0xbe01ee['length'];_0x268f66++){const _0x4be86e=_0xbe01ee[_0x268f66];void 0x0!==_0x4be86e['fromVersion']&&void 0x0===_0x4be86e['toVersion']&&(_0x4be86e['toVersion']=this['repository']['getRevision'](_0x4be86e['id'])['toVersion']),void 0x0!==_0x4be86e['toVersion']&&void 0x0===_0x4be86e['fromVersion']&&(_0x4be86e['fromVersion']=this['repository']['getRevision'](_0x4be86e['id'])['fromVersion']);}const _0x5d1033=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0xbe01ee,_0x5d1033)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x476cfe=>{if(_0x476cfe){for(const _0x4592a6 of _0x476cfe)this['setRevisionData']({'id':_0x4592a6['id'],'createdAt':_0x4592a6['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x47e23a=null,from:_0x1e6241=null,to:_0x2053c3=null}){_0x1e6241=null!==_0x1e6241?_0x1e6241:_0x47e23a['fromVersion'],_0x2053c3=null!==_0x2053c3?_0x2053c3:_0x47e23a['toVersion'];const _0x4f9f53=this['_revisionDataBuilder']['getData'](_0x1e6241,_0x2053c3),_0x47c9e6={'diffData':_0x4f9f53['diffData'],'authorsIds':_0x4f9f53['authorsIds'],'fromVersion':_0x1e6241,'toVersion':_0x2053c3};if(!_0x47e23a||_0x2053c3!==_0x47e23a['toVersion']){const _0x263349=_0x2053c3-0x1,_0x86b053=this['_source']['history']['getOperation'](_0x263349);_0x47c9e6['createdAt']=_0x86b053&&_0x86b053['createdAt']||new Date();}if(this['_loadedStateData']&&_0x1e6241===this['_loadedStateData']['fromVersion']){for(const _0x52f75f of this['_loadedStateData']['authors'])_0x47c9e6['authorsIds']['includes'](_0x52f75f['id'])||_0x47c9e6['authorsIds']['push'](_0x52f75f['id']);}return _0x47c9e6;}['_bufferUpdate'](_0x5ea052,_0x374207,_0x32384f){if(this['_bufferedUpdates']['has'](_0x5ea052)){const _0x23249d=this['_bufferedUpdates']['get'](_0x5ea052);_0x374207=_0x32384f?{..._0x23249d,..._0x374207}:{..._0x374207,..._0x23249d};}this['_bufferedUpdates']['set'](_0x5ea052,_0x374207);}['setRevisionData'](_0xe9606a){const _0x191588=this['repository']['getRevision'](_0xe9606a['id']);if(_0xe9606a['createdAt']&&(_0xe9606a['createdAt']=new Date(_0xe9606a['createdAt'])),_0xe9606a['authorsIds']){const _0x3f4df1=this['editor']['plugins']['get']('Users');_0xe9606a['authors']=_0xe9606a['authorsIds']['map'](_0x36b64e=>_0x3f4df1['getUser'](_0x36b64e));}_0x191588['_update'](_0xe9606a,!0x0);}['_createInitialRevision'](_0x393290){const _0x533b96=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x533b96)this['_initialRevisionId']=_0x533b96['id'];else{const _0x2228e0=!this['editor']['model']['document']['roots']['find'](_0x23d16f=>this['editor']['model']['hasContent'](_0x23d16f)),_0x274234=this['editor']['plugins']['get']('Users')['me']['id'],_0x56c00d=g(this['editor']['locale'],_0x2228e0?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x393290,'to':_0x393290,'id':this['_initialRevisionId'],'name':_0x56c00d,'creatorId':_0x274234});}}['_createCurrentRevision'](_0xac4bf4){const _0x4b7392=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x4b7392),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xac4bf4,'to':_0xac4bf4,'id':_0x4b7392,'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'](_0x5c42a1,_0x502257){let _0x1ff299=this['editor']['config']['get']('initialData'),_0x4fc2ce=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x1ff299){_0x1ff299={};for(const _0x20f961 of this['editor']['model']['document']['getRootNames']())_0x1ff299[_0x20f961]='';}if('string'==typeof _0x1ff299&&(_0x1ff299={'main':_0x1ff299}),void 0x0===_0x4fc2ce){_0x4fc2ce={};for(const _0x7ceaad of this['editor']['model']['document']['getRootNames']())_0x4fc2ce[_0x7ceaad]={};}let _0x48e988=!0x1;const _0x371a35=Object['keys'](_0x1ff299),_0x7667b3=Object['keys'](_0x5c42a1);for(const _0x419e24 of _0x371a35){if(_0x1ff299[_0x419e24]!==_0x5c42a1[_0x419e24]&&''!==_0x1ff299[_0x419e24]['trim']()){_0x48e988=!0x0;break;}if(!_0x1c5062(_0x4fc2ce[_0x419e24],_0x502257[_0x419e24])&&Object['keys'](_0x4fc2ce[_0x419e24])['length']>0x0){_0x48e988=!0x0;break;}}_0x48e988||(_0x48e988=_0x7667b3['some'](_0x5d8936=>!this['editor']['model']['document']['getRoot'](_0x5d8936))),_0x48e988&&_0x41ff87('editor-initial-data-replaced-with-revision-data',{'editorData':_0x1ff299,'editorRootsAttributes':_0x4fc2ce,'revisionData':_0x5c42a1,'revisionRootsAttributes':_0x502257}),this['editor']['config']['set']('initialData',_0x5c42a1),this['editor']['config']['set']('rootsAttributes',_0x502257);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x383076=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x383076['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x52102e){const _0x5bbaca=this['repository']['getRevisions']();_0x5bbaca['reverse']();let _0x5eda91=0x0;for(;_0x5eda91<_0x5bbaca['length'];){const _0x3695c6=_0x5bbaca[_0x5eda91];if(_0x3695c6===this['currentRevision']){_0x5eda91++;continue;}if(_0x3695c6['id']===this['_initialRevisionId'])break;const _0x3273b5=_0x52102e['toVersion']-_0x3695c6['toVersion']||_0x52102e['fromVersion']-_0x3695c6['fromVersion'];if(_0x3273b5>0x0)break;if(_0x3273b5<0x0)_0x5eda91++;else{if(!_0x52102e['creator']&&_0x3695c6['creator'])break;if(_0x3695c6['creator']||!_0x52102e['creator']){if(_0x52102e['createdAt']>_0x3695c6['createdAt'])break;_0x5eda91++;}else _0x5eda91++;}}return _0x5eda91;}['_getFromVersion'](_0x51e15a){const _0x50b018=this['repository']['getRevisions']();_0x50b018['reverse'](),_0x50b018['shift']();const _0x458353=_0x50b018['find'](_0x5ca6fc=>_0x5ca6fc['toVersion']<=_0x51e15a)['toVersion'];return _0x458353<this['_startingVersion']?this['_startingVersion']:_0x458353;}['_makeRevision']({name:_0x34f80c,from:_0x2aa331,to:_0x58430b,creatorId:_0x5f0ee7,id:_0x5578d8}){const _0xd5d860=this['buildRevisionData']({'from':_0x2aa331,'to':_0x58430b});_0xd5d860['name']=_0x34f80c,_0xd5d860['creatorId']=_0x5f0ee7,_0xd5d860['id']=_0x5578d8;const _0xa6fac9=this['addRevisionData'](_0xd5d860);return this['adapter']&&this['_bufferUpdate'](_0xd5d860['id'],_0xd5d860,!0x0),_0xa6fac9;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x1ad506){this['editor']=_0x1ad506,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'](_0x22c83e){this['source']=_0x22c83e;const _0x4af98f=new Map(),_0x177c15=new Map(),_0xd5f44b=this['editor']['model']['document']['roots']['map'](_0x2c1dd5=>_0x2c1dd5['rootName']);for(const _0x1cd0fb of _0xd5f44b){const _0xb3beb9=this['editor']['model']['document']['getRoot'](_0x1cd0fb),_0xd9d146=N(_0xb3beb9);_0x4af98f['set'](_0x1cd0fb,_0xd9d146),_0x177c15['set'](_0x1cd0fb,Object['fromEntries'](_0xb3beb9['getAttributes']()));}const _0x5ac133=Array['from'](this['editor']['model']['markers'])['map'](_0x144e6e=>[_0x144e6e['name'],_0x144e6e['getRange']()]),_0x1c5ae4=this['source']['version'];this['_saveMetaData'](_0x1c5ae4,_0x4af98f,_0x5ac133,_0x177c15),this['_startingRevisionId']=this['_revisionId'];const _0x3debf0=new Map(),_0x2332e6=new Map();for(const _0x506ebc of _0xd5f44b){const _0x1dc1ef=P(_0x506ebc);_0x3debf0['set'](_0x506ebc,_0x1dc1ef),_0x2332e6['set'](_0x506ebc,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3debf0,[],_0x2332e6);}['getData'](_0x4f5ed1,_0x3b338a){if(this['_lastFrom']===_0x4f5ed1&&this['_lastTo']<=_0x3b338a)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3b338a,!0x0);else{if(!this['_savedMetaData']['has'](_0x4f5ed1)){const _0x5300fb=this['_getPreviousFrom'](_0x4f5ed1);this['_calculateMetaData'](_0x5300fb,_0x4f5ed1,!0x1);}this['_calculateMetaData'](_0x4f5ed1,_0x3b338a,!0x0);}return this['_lastFrom']=_0x4f5ed1,this['_lastTo']=_0x3b338a,this['_getState']();}['loadState'](_0x598ad0){const _0x396b52=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x598ad0['fromVersion'],this['_lastTo']=_0x598ad0['toVersion'];for(const _0x1180bf in _0x598ad0['diffData']){const _0x3898cb=_0x598ad0['diffData'][_0x1180bf]['attachChange'],_0x197f30=_0x2061e4(_0x598ad0['diffData'][_0x1180bf]['attributesBefore'])||{},_0xc539f5=_0x396b52['_makeModelFromViewString'](_0x598ad0['diffData'][_0x1180bf]['deletions']);_0xc539f5['rootName']=_0x1180bf,_0xc539f5['_isAttached']=!_0x3898cb||!_0x3898cb['isAttached'],_0xc539f5['isAttached']=()=>_0xc539f5['_isAttached'],this['_baseRoots']['set'](_0x1180bf,_0xc539f5),this['_baseRootsAttributes']['set'](_0x1180bf,_0x197f30),_0x3898cb&&this['_touchedRoots']['set'](_0x1180bf,_0x3898cb);const _0x286e14=this['_makeIdsRoot'](_0xc539f5);this['_baseIdsRoots']['set'](_0x1180bf,_0x286e14);for(const [_0x2583ee,_0x4efaff]of _0xc539f5['markers']){if(!_0x2583ee['startsWith']('revision:'))continue;const _0x1d10e5=_0x2583ee['split'](':')[0x2];for(const _0x4d7194 of _0x4efaff['getWalker']({'singleCharacters':!0x0})){const _0x131710=this['_getVidAttributeName'](_0x4d7194),_0x199bfa='elementEnd'==_0x4d7194['type']?_0x4d7194['previousPosition']['path']['slice'](0x0,-0x1):_0x4d7194['previousPosition']['path'],_0x1384eb=_0x286e14['getNodeByPath'](_0x199bfa)['getAttribute'](_0x131710);this['_touched']['set'](_0x1384eb,{'userId':_0x1d10e5});}}}this['_startingRevisionId']=this['_revisionId'];const _0x1a2b13=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x1d3956=>!this['_touched']['has'](_0x1d3956));let _0x2a9de9=0x0;const _0x53aaff=new Map();for(const _0x163c59 in _0x598ad0['diffData']){const _0x430a19=_0x598ad0['diffData'][_0x163c59]['attachChange'],_0x54456a=_0x2061e4(_0x598ad0['diffData'][_0x163c59]['attributesAfter'])||{},_0x349ff4=_0x396b52['_makeModelFromViewString'](_0x598ad0['diffData'][_0x163c59]['insertions']);_0x349ff4['rootName']=_0x163c59,_0x349ff4['_isAttached']=!_0x430a19||_0x430a19['isAttached'],_0x349ff4['isAttached']=()=>_0x349ff4['_isAttached'],this['_diffRoots']['set'](_0x163c59,_0x349ff4),this['_diffRootsAttributes']['set'](_0x163c59,_0x54456a);const _0x527a88=this['_makeIdsRoot'](_0x349ff4,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x163c59,_0x527a88),_0x53aaff['set'](_0x163c59,_0x349ff4['isAttached']()?_0x54456a:{});for(const [_0x24f78a,_0x4fdfc1]of _0x349ff4['markers']){if(!_0x24f78a['startsWith']('revision:'))continue;const _0x16fa08=_0x24f78a['split'](':')[0x2];for(const _0x25c77a of _0x4fdfc1['getWalker']({'singleCharacters':!0x0})){const _0x335916=this['_getVidAttributeName'](_0x25c77a),_0x6cbe31=this['_revisionId']++,_0x18c812='elementEnd'==_0x25c77a['type']?_0x25c77a['previousPosition']['path']['slice'](0x0,-0x1):_0x25c77a['previousPosition']['path'];_0x527a88['getNodeByPath'](_0x18c812)['_setAttribute'](_0x335916,_0x6cbe31),this['_touched']['set'](_0x6cbe31,{'userId':_0x16fa08});}}for(const _0x1ec2c8 of this['editor']['model']['createRangeIn'](_0x349ff4)['getWalker']({'singleCharacters':!0x0})){const _0x3374eb=this['_getVidAttributeName'](_0x1ec2c8),_0x16fbea='elementEnd'==_0x1ec2c8['type']?_0x1ec2c8['previousPosition']['path']['slice'](0x0,-0x1):_0x1ec2c8['previousPosition']['path'],_0x1d806c=_0x527a88['getNodeByPath'](_0x16fbea);_0x1d806c['getAttribute'](_0x3374eb)>0x0||_0x1d806c['_setAttribute'](_0x3374eb,_0x1a2b13[_0x2a9de9++]);}for(const [_0x42a3d6,_0x55f3fc]of _0x349ff4['markers'])_0x42a3d6['startsWith']('revision:')||this['_markers']['set'](_0x42a3d6,_0x55f3fc);}const _0x19710d=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x19710d),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x19710d,0x1));const _0xc6fecb=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0xc6fecb),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xc6fecb,0x1));const _0x599981=Array['from'](this['_diffRoots'])['map'](([_0x47a341,_0x225e61])=>[_0x47a341,N(_0x225e61)]);this['_saveMetaData'](this['_lastTo'],_0x599981,this['_markers'],_0x53aaff);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x286140,_0x2f58d7,_0x2aece7,_0x4c6e32){const _0x312f69=new Map(_0x2f58d7),_0x18df41=new Map(_0x2061e4(_0x4c6e32)),_0x590ed4=new Map();for(const [_0x3c34a7,_0x3e8dbf]of _0x2aece7)_0x590ed4['set'](_0x3c34a7,{'start':_0x3e8dbf['start']['clone'](),'end':_0x3e8dbf['end']['clone'](),'rootName':_0x3e8dbf['root']['rootName']});this['_savedMetaData']['set'](_0x286140,{'roots':_0x312f69,'markers':_0x590ed4,'rootsAttributes':_0x18df41});}['_removeMetaData'](_0x356516){this['_savedMetaData']['delete'](_0x356516);}['_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'](_0x47da83,_0x430087=null){let _0x40898a=null;_0x47da83['is']('documentFragment')||(_0x40898a=new ut(_0x47da83['name'],{'vid_start':null===_0x430087?this['_revisionId']++:_0x430087++}));const _0x2b5c95=[];for(const _0x3d07b5 of _0x47da83['getChildren']())if(_0x3d07b5['is']('element')){_0x2b5c95['push'](this['_makeIdsRoot'](_0x3d07b5,_0x430087));const _0x485e38=_0x2b5c95[_0x2b5c95['length']-0x1];null!==_0x430087&&(_0x430087=_0x485e38['is']('element','$text')?_0x485e38['getAttribute']('vid')+0x1:_0x485e38['getAttribute']('vid_end')+0x1);}else{for(let _0xf5dba8=0x0;_0xf5dba8<_0x3d07b5['offsetSize'];_0xf5dba8++)_0x2b5c95['push'](new ut('$text',{'vid':null===_0x430087?this['_revisionId']++:_0x430087++}));}if(_0x47da83['is']('documentFragment')){const _0x47b24f=P(_0x47da83['rootName']);return _0x47b24f['_insertChild'](0x0,_0x2b5c95),_0x47b24f;}return _0x40898a['_setAttribute']('vid_end',null===_0x430087?this['_revisionId']++:_0x430087++),_0x40898a['_insertChild'](0x0,_0x2b5c95),_0x40898a;}['_calculateMetaData'](_0x1f876b,_0x174a8b,_0xf34b2a){this['_reset']();const {roots:_0x22dd0a,markers:_0x1a97b5,rootsAttributes:_0x51c175}=this['_savedMetaData']['get'](_0x1f876b);this['_baseRoots']=new Map(_0x22dd0a),this['_baseRootsAttributes']=new Map(_0x2061e4(_0x51c175));for(const [_0x486170,_0xb4b329]of this['_baseRoots'])if('$graveyard'!==_0x486170&&(this['_diffRoots']['set'](_0x486170,N(_0xb4b329)),this['_diffRootsAttributes']=new Map(_0x2061e4(_0x51c175)),_0xf34b2a)){const _0x24fa3a=this['_revisionId'];this['_idsRoots']['set'](_0x486170,this['_makeIdsRoot'](_0xb4b329)),this['_baseIdsRoots']['set'](_0x486170,this['_makeIdsRoot'](_0xb4b329,_0x24fa3a));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0xf34b2a&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x5c4ec2,_0x1d70ff]of _0x1a97b5){const _0x3a7f83=this['_baseRoots']['get'](_0x1d70ff['rootName']),_0x1c9fbd=this['_diffRoots']['get'](_0x1d70ff['rootName']),_0x4a30e5=new lt(this['_fixPosition'](_0x1d70ff['start'],_0x3a7f83),this['_fixPosition'](_0x1d70ff['end'],_0x3a7f83)),_0x1a1e8f=this['_fixRange'](_0x4a30e5,_0x1c9fbd);_0x3a7f83['markers']['set'](_0x5c4ec2,_0x4a30e5),this['_markers']['set'](_0x5c4ec2,_0x1a1e8f);}this['_applyOperations'](_0x1f876b,_0x174a8b,_0xf34b2a);}['_applyOperations'](_0xeca930,_0xcd6e83,_0xc5b80d){for(const _0x548d4f of this['source']['getOperations'](_0xeca930,_0xcd6e83))this['_handleOperation'](_0x548d4f,_0xc5b80d);for(const _0x1f88de of this['_diffRoots']['values']())_0x1f88de['markers']['clear']();for(const [_0x2d56e8,_0x4a6ae6]of this['_markers']){this['_diffRoots']['get'](_0x4a6ae6['root']['rootName'])['markers']['set'](_0x2d56e8,_0x4a6ae6['clone']());}const _0x1188f9=new Map(),_0x51c7b9=new Map();for(const [_0x4bb46a,_0x38f47e]of this['_diffRoots'])_0x1188f9['set'](_0x4bb46a,N(_0x38f47e)),_0x51c7b9['set'](_0x4bb46a,this['_diffRootsAttributes']['get'](_0x4bb46a));this['_saveMetaData'](_0xcd6e83,_0x1188f9,this['_markers'],_0x51c7b9);}['_getPreviousFrom'](_0x4129d8){const _0x352df2=Array['from'](this['_savedMetaData']['keys']());_0x352df2['sort']((_0x316876,_0x2ece0e)=>_0x316876-_0x2ece0e),_0x352df2['reverse']();for(const _0x4d4598 of _0x352df2)if(_0x4d4598<_0x4129d8)return _0x4d4598;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x24ec4a,_0x2aa83b){const _0x2c1711=Array['from'](_0x2aa83b['markers'])['map'](([_0xa81b31,_0x5e33f5])=>[_0xa81b31,this['_fixRange'](_0x5e33f5,_0x24ec4a)]);_0x24ec4a['markers']=new Map(_0x2c1711);}['_transformMarkers'](_0x52fda9){for(const _0x49c9c9 of this['_markers']['values']()){const _0x29ccea=_0x49c9c9['getTransformedByOperation'](_0x52fda9),_0x174de8=lt['_createFromRanges'](_0x29ccea);_0x49c9c9['start']=_0x174de8['start'],_0x49c9c9['end']=_0x174de8['end'];}}['_handleOperation'](_0x27e3eb,_0x354fe3){if('addRoot'!=_0x27e3eb['type']&&'detachRoot'!=_0x27e3eb['type']){if('insert'==_0x27e3eb['type']){const _0x59be37=_0x27e3eb['position']['root']['rootName'];this['_diffRoots']['has'](_0x59be37)||(this['_diffRoots']['set'](_0x59be37,P(_0x59be37,!0x0)),this['_diffRootsAttributes']['set'](_0x59be37,{}),_0x354fe3&&this['_idsRoots']['set'](_0x59be37,P(_0x59be37,!0x0)));}else{if('addRootAttribute'==_0x27e3eb['type']||'removeRootAttribute'==_0x27e3eb['type']||'changeRootAttribute'==_0x27e3eb['type'])return void this['_handleRootAttributeOperation'](_0x27e3eb);'marker'==_0x27e3eb['type']&&this['_handleMarkerOperation'](_0x27e3eb);}if('marker'!==_0x27e3eb['type']){const _0x3bee80=this['_cloneOperation'](_0x27e3eb,this['_diffRoots']);_0x3bee80['_execute'](),this['_transformMarkers'](_0x3bee80);}if(_0x354fe3)switch(_0x27e3eb['type']){case'insert':this['_handleInsertOperation'](_0x27e3eb);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x27e3eb);break;case'merge':this['_handleMergeOperation'](_0x27e3eb);break;case'split':this['_handleSplitOperation'](_0x27e3eb);}}else this['_handleRootOperation'](_0x27e3eb,_0x354fe3);}['_cloneOperation'](_0x5db7a4,_0x52ff1e){const _0x52c3ba=_0x5db7a4['clone']();return _0x52c3ba['_authorId']=_0x5db7a4['_authorId'],this['_fixOperation'](_0x52c3ba,_0x52ff1e),_0x52c3ba;}['_getBaseVids'](_0x3c801f){return _0x3c801f['map'](_0x459510=>{const _0x1ab34e=this['_getVidAttributeName'](_0x459510);return Number(_0x459510['item']['getAttribute'](_0x1ab34e));});}['_generateTape'](_0x4af9cc,_0x24dfcb){if(_0x4af9cc['is']('element','$text'))_0x24dfcb['push']({'item':_0x4af9cc,'type':'text'});else{_0x4af9cc['is']('element')&&_0x24dfcb['push']({'item':_0x4af9cc,'type':'elementStart'});for(const _0x2e6b81 of _0x4af9cc['getChildren']())this['_generateTape'](_0x2e6b81,_0x24dfcb);_0x4af9cc['is']('element')&&_0x24dfcb['push']({'item':_0x4af9cc,'type':'elementEnd'});}return _0x24dfcb;}['_getState'](){const _0x2c9cae=new Map(this['_touched']),_0x59e497=new Map(_0x2c9cae),_0x2e0ad5=new Map(),_0xbef768={'insertions':{},'deletions':{}},_0x4c9e34={'insertions':{},'deletions':{}},_0xad4455=new Map(),_0x1ef40b=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x1ef40b['delete']('$graveyard');for(const _0x35fe82 of _0x1ef40b){const _0x55b3e3=this['_diffRoots']['get'](_0x35fe82)||P(_0x35fe82,!0x1),_0x2a5b8a=this['_baseRoots']['get'](_0x35fe82)||P(_0x35fe82,!0x1);_0x55b3e3['isAttached']()||_0x2a5b8a['isAttached']()?(_0xbef768['insertions'][_0x35fe82]=N(_0x55b3e3),_0xbef768['deletions'][_0x35fe82]=N(_0x2a5b8a),this['_copyMarkers'](_0xbef768['deletions'][_0x35fe82],_0x2a5b8a),this['_copyMarkers'](_0xbef768['insertions'][_0x35fe82],_0x55b3e3),_0x4c9e34['insertions'][_0x35fe82]=this['_generateTape'](this['_idsRoots']['get'](_0x35fe82),[]),_0x4c9e34['deletions'][_0x35fe82]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x35fe82)||P(_0x35fe82,!0x1),[])):_0x1ef40b['delete'](_0x35fe82);}for(const _0x381b08 of _0x1ef40b){const _0x1df0af=_0x4c9e34['insertions'][_0x381b08];for(const _0x3ec3df of _0x1df0af){const _0x1f0cd1=this['_getVidAttributeName'](_0x3ec3df),_0x271b5f=_0x3ec3df['item']['getAttribute'](_0x1f0cd1);_0x59e497['delete'](_0x271b5f),_0x271b5f>=this['_startingRevisionId']&&_0x2e0ad5['set'](_0x271b5f,_0x2c9cae['get'](_0x271b5f));}}for(const _0x491db8 of _0x1ef40b){const _0x47105a=_0x4c9e34['insertions'][_0x491db8],_0xdc716d=this['_getBaseVids'](_0x4c9e34['deletions'][_0x491db8]);let _0x33b1e9=0x0;for(const _0x33a759 of _0x47105a){const _0xae41c3=this['_getVidAttributeName'](_0x33a759),_0x52068c=_0x33a759['item']['getAttribute'](_0xae41c3);if(!_0x2e0ad5['has'](_0x52068c)&&!_0xad4455['has'](_0x52068c)){if(_0x59e497['has'](_0x52068c))_0x33b1e9++;else{if(_0x52068c!=_0xdc716d[_0x33b1e9]){const _0x5b7ce4=_0x2c9cae['get'](_0x52068c)||_0x2c9cae['get'](_0xdc716d[_0x33b1e9]);for(;_0x52068c!=_0xdc716d[_0x33b1e9];)_0x59e497['has'](_0xdc716d[_0x33b1e9])||(_0xad4455['set'](_0xdc716d[_0x33b1e9],_0x5b7ce4),_0x2c9cae['set'](_0xdc716d[_0x33b1e9],_0x5b7ce4)),_0x33b1e9++;}_0x33b1e9++;}}}}for(const _0x96c787 of _0x1ef40b){const _0x25b0b3=_0x4c9e34['insertions'][_0x96c787];for(const _0x2549dd of _0x25b0b3){const _0x2a80a9=this['_getVidAttributeName'](_0x2549dd),_0x5434aa=_0x2549dd['item']['getAttribute'](_0x2a80a9);if(_0xad4455['has'](_0x5434aa)){const _0x5b5a10=_0xad4455['get'](_0x5434aa);_0x59e497['has'](_0x5434aa)||_0x59e497['set'](_0x5434aa,{..._0x5b5a10}),_0x2e0ad5['set'](_0x5434aa,{..._0x5b5a10});}}}for(const _0x285fa6 of _0x59e497['keys']())_0x285fa6>=this['_startingRevisionId']&&_0x59e497['delete'](_0x285fa6);const _0x588963=new Map();for(const _0x2ba4e9 of _0x1ef40b){let _0x5a3190=_0x4c9e34['insertions'][_0x2ba4e9];for(const _0x33dc74 of _0x5a3190)if(_0x33dc74['item']['is']('element','tableCell')){const _0x25320f=this['_getVidAttributeName'](_0x33dc74),_0x286465=_0x33dc74['item']['getAttribute'](_0x25320f);if(_0x2e0ad5['has'](_0x286465)){const _0x1a94b2=_0x33dc74['item']['parent']['parent']['getAttribute']('vid_start'),_0x5227c0=_0x588963['get'](_0x1a94b2)||new Set();_0x5227c0['add'](_0x2e0ad5['get'](_0x286465)['userId']),_0x588963['set'](_0x1a94b2,_0x5227c0);}}_0x5a3190=_0x4c9e34['deletions'][_0x2ba4e9];for(const _0x1ff5a4 of _0x5a3190)if(_0x1ff5a4['item']['is']('element','tableCell')){const _0x8cf499=this['_getVidAttributeName'](_0x1ff5a4),_0x2da54e=_0x1ff5a4['item']['getAttribute'](_0x8cf499);if(_0x59e497['has'](_0x2da54e)){const _0x3201c5=_0x1ff5a4['item']['parent']['parent']['getAttribute']('vid_start'),_0x4e29d2=_0x588963['get'](_0x3201c5)||new Set();_0x4e29d2['add'](_0x59e497['get'](_0x2da54e)['userId']),_0x588963['set'](_0x3201c5,_0x4e29d2);}}for(const _0x57057a of _0x588963['keys']())(_0x2e0ad5['has'](_0x57057a)||_0x59e497['has'](_0x57057a))&&_0x588963['delete'](_0x57057a);}for(const _0x5457b4 of _0x1ef40b){const _0x298d25=_0x4c9e34['insertions'][_0x5457b4];let _0x1385f9=null,_0x2c5675=null;for(const _0x18c783 of _0x298d25){const _0x27cc9d=this['_getVidAttributeName'](_0x18c783),_0x534c64=_0x18c783['item']['getAttribute'](_0x27cc9d),_0x1c39de=_0x588963['get'](_0x534c64);_0x1c39de&&'elementStart'==_0x18c783['type']&&(_0x1385f9=Array['from'](_0x1c39de)[0x0],_0x2c5675=_0x18c783['item']['getAttribute']('vid_end')),_0x1385f9&&(_0x59e497['set'](_0x534c64,{'userId':_0x1385f9}),_0x2e0ad5['set'](_0x534c64,{'userId':_0x1385f9})),_0x534c64==_0x2c5675&&(_0x1385f9=null,_0x2c5675=null);}}const _0x1945c8={},_0x15f20d=new Set();for(const _0x500aa7 of _0x1ef40b){const _0x3cf42f=_0xbef768['deletions'][_0x500aa7],_0x26056e=_0xbef768['insertions'][_0x500aa7];for(const {userId:_0x5cda59}of this['_touchedMarkers']['values']())null!==_0x5cda59&&_0x15f20d['add'](_0x5cda59);for(const {userId:_0x1da552}of this['_touchedRoots']['values']())null!==_0x1da552&&_0x15f20d['add'](_0x1da552);this['_markChanges'](_0x26056e,_0x4c9e34['insertions'][_0x500aa7],_0x2e0ad5,'insertion',_0x15f20d),this['_markChanges'](_0x3cf42f,_0x4c9e34['deletions'][_0x500aa7],_0x59e497,'deletion',_0x15f20d),_0x1945c8[_0x500aa7]={'insertions':this['_prepareViewToSave'](_0x26056e),'deletions':this['_prepareViewToSave'](_0x3cf42f),'attachChange':this['_touchedRoots']['get'](_0x500aa7)||null,'attributesBefore':_0x2061e4(this['_baseRootsAttributes']['get'](_0x500aa7))||{},'attributesAfter':_0x2061e4(this['_diffRootsAttributes']['get'](_0x500aa7))};}return{'diffData':_0x1945c8,'authorsIds':Array['from'](_0x15f20d)};}['_processRootBeforeSave'](_0x187608){for(const [,_0x52115f]of _0x187608['markers']){const _0x5135fb=_0x52115f['start']['getAncestors']()['filter'](_0x4af3ae=>'tableCell'==_0x4af3ae['name']);for(const _0x2a9bba of _0x5135fb)0x1==_0x2a9bba['childCount']&&_0x2a9bba['getChild'](0x0)['is']('element','paragraph')&&_0x2a9bba['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0xd64d0d){this['_processRootBeforeSave'](_0xd64d0d);const _0x260077=this['editor']['data']['toView'](_0xd64d0d,{}),_0x22b56c=Array['from'](_0x260077['getChildren']())['map'](_0x45d758=>this['_getViewJson'](_0x45d758));return JSON['stringify'](_0x22b56c);}['_getViewJson'](_0x546cbc){if(_0x546cbc['is']('$text'))return _0x546cbc['data'];{const _0x437ec0=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x20d14f=_0x546cbc,_0x18491c=this['editor']['data']['htmlProcessor']['domConverter'],_0x1159b7={'type':_0x437ec0['_getTypeCharForViewElement'](_0x20d14f),'name':_0x20d14f['name'],'attributes':Array['from'](_0x20d14f['getAttributes']()),'children':Array['from'](_0x20d14f['getChildren']())['map'](_0x12a885=>this['_getViewJson'](_0x12a885))};if(_0x546cbc['is']('uiElement')&&'$comment'!=_0x546cbc['name']){const _0x2634f2=_0x546cbc['render'](_0x18491c['domDocument'],_0x18491c);_0x1159b7['children']['push'](_0x2634f2['outerHTML']);}else{if(_0x546cbc['is']('rawElement')){const _0x4c9aec=_0x18491c['domDocument']['createElement'](_0x20d14f['name']);_0x546cbc['render'](_0x4c9aec,_0x18491c),_0x1159b7['children']['push'](_0x4c9aec['innerHTML']);}}const _0x3c8bd3=Array['from'](_0x20d14f['getCustomProperties']());_0x3c8bd3['length']>0x0&&(_0x1159b7['customProperties']=_0x3c8bd3);const _0x1eafea=_0x20d14f['getFillerOffset']();return null!==_0x1eafea&&(_0x1159b7['fillerOffset']=_0x1eafea),_0x1159b7;}}['_markChanges'](_0x3656d6,_0x46b06b,_0x573bf8,_0x1f501a,_0x183cc2){let _0x411c88=null,_0x2e0263=null,_0x34cb3c=0x0;const _0x27b274=this['editor']['model'];for(let _0x302298=0x0;_0x302298<_0x46b06b['length'];_0x302298++){const _0x3f8d80=this['_getVidAttributeName'](_0x46b06b[_0x302298]),_0x558f44=_0x46b06b[_0x302298]['item']['getAttribute'](_0x3f8d80),_0x13790e=_0x573bf8['get'](_0x558f44),_0x3ecc5c=_0x302298==_0x46b06b['length']-0x1;(!_0x411c88&&_0x13790e&&(_0x411c88=_0x13790e,_0x2e0263=_0x46b06b[_0x302298]),_0x411c88&&(!_0x13790e||_0x13790e['userId']!=_0x411c88['userId']))&&(_0x34af8a(_0x13790e,F(_0x2e0263,_0x3656d6,_0x27b274),F(_0x46b06b[_0x302298],_0x3656d6,_0x27b274)),_0x411c88=_0x13790e||null,_0x2e0263=_0x13790e?_0x46b06b[_0x302298]:null),_0x411c88&&_0x3ecc5c&&_0x34af8a(_0x13790e,F(_0x2e0263,_0x3656d6,_0x27b274),B(_0x46b06b[_0x302298],_0x3656d6,_0x27b274));}function _0x34af8a(_0x503999,_0x504098,_0x20df49){const _0x207f7b=_0x411c88['userId'],_0x5d6601='revision:'+_0x1f501a+':'+_0x207f7b+':'+_0x34cb3c++,_0x1d314c=_0x27b274['createRange'](_0x504098,_0x20df49);_0x3656d6['markers']['set'](_0x5d6601,_0x1d314c),null!==_0x207f7b&&_0x183cc2['add'](_0x207f7b);}}['_getVidAttributeName'](_0x2ddc17){switch(_0x2ddc17['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x113bc6,_0x3dc404){_0x113bc6['baseVersion']=null;for(const _0x41383d in _0x113bc6){const _0x3878f4=_0x113bc6[_0x41383d];if(_0x3878f4 instanceof ft){const _0x331b74=_0x3dc404['get'](_0x3878f4['root']['rootName']);_0x113bc6[_0x41383d]=this['_fixPosition'](_0x3878f4,_0x331b74);}if(_0x3878f4 instanceof lt){const _0xeb247e=_0x3dc404['get'](_0x3878f4['root']['rootName']);_0x113bc6[_0x41383d]=this['_fixRange'](_0x3878f4,_0xeb247e);}'root'===_0x41383d&&(_0x113bc6['root']=_0x3dc404['get'](_0x113bc6['root']['rootName']));}}['_fixRange'](_0x5cb39e,_0x24525a){return this['editor']['model']['createRange'](this['_fixPosition'](_0x5cb39e['start'],_0x24525a),this['_fixPosition'](_0x5cb39e['end'],_0x24525a));}['_fixPosition'](_0x590fcf,_0x3ff0a1){return this['editor']['model']['createPositionFromPath'](_0x3ff0a1,_0x590fcf['path'],_0x590fcf['stickiness']);}['_handleInsertOperation'](_0x2869b6){const _0x17f197=this['_idsRoots']['get'](_0x2869b6['position']['root']['rootName']),_0x1a630c=this['_fixPosition'](_0x2869b6['position'],_0x17f197),_0x5767ac=null===_0x2869b6['_authorId']?null:_0x2869b6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3dd1ee=_0x1a630c['parent'],_0x16c42a=this['_revisionId'],_0x43fc83=[];for(const _0x118bb0 of _0x2869b6['nodes'])if(_0x118bb0['is']('element'))_0x43fc83['push'](this['_makeIdsRoot'](_0x118bb0));else{for(let _0xfa5e3e=0x0;_0xfa5e3e<_0x118bb0['offsetSize'];_0xfa5e3e++)_0x43fc83['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x4b7e62=this['_revisionId'];for(let _0x422a1b=_0x16c42a;_0x422a1b<_0x4b7e62;_0x422a1b++)this['_touched']['set'](_0x422a1b,{'userId':_0x5767ac});_0x3dd1ee['_insertChild'](_0x1a630c['offset'],_0x43fc83);}['_handleMoveOperation'](_0x66843a){(_0x66843a=this['_cloneOperation'](_0x66843a,this['_idsRoots']))['_execute']();const _0x49e576=null===_0x66843a['_authorId']?null:_0x66843a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x370443=_0x66843a['getMovedRangeStart'](),_0x32830d=_0x370443['parent'],_0x5c4a30=_0x370443['offset'];!function _0x56008b(_0x296a85,_0x4eaca3,_0x22dc84,_0x53a794){for(let _0x20b8a5=_0x22dc84;_0x20b8a5<_0x53a794;_0x20b8a5++){const _0xdc72fa=_0x4eaca3['getChild'](_0x20b8a5);_0xdc72fa['is']('element','$text')?_0x296a85['set'](_0xdc72fa['getAttribute']('vid'),{'userId':_0x49e576}):(_0x296a85['set'](_0xdc72fa['getAttribute']('vid_start'),{'userId':_0x49e576}),_0x56008b(_0x296a85,_0xdc72fa,0x0,_0xdc72fa['childCount']),_0x296a85['set'](_0xdc72fa['getAttribute']('vid_end'),{'userId':_0x49e576}));}}(this['_touched'],_0x32830d,_0x5c4a30,_0x5c4a30+_0x66843a['howMany']);}['_handleMergeOperation'](_0x18eefa){const _0x5d1383=null===(_0x18eefa=this['_cloneOperation'](_0x18eefa,this['_idsRoots']))['_authorId']?null:_0x18eefa['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x37c306=_0x18eefa['targetPosition']['parent'],_0xd69d97=_0x18eefa['sourcePosition']['parent'],_0x1ba024=_0x37c306['getAttribute']('vid_end'),_0x372506=_0xd69d97['getAttribute']('vid_start');_0x37c306['_setAttribute']('vid_end',_0xd69d97['getAttribute']('vid_end')),_0xd69d97['_setAttribute']('vid_end',_0x1ba024),this['_touched']['set'](_0x372506,{'userId':_0x5d1383}),this['_touched']['set'](_0x1ba024,{'userId':_0x5d1383}),_0x18eefa['_execute']();}['_handleSplitOperation'](_0x12ad4c){const _0x12c46e=null===(_0x12ad4c=this['_cloneOperation'](_0x12ad4c,this['_idsRoots']))['_authorId']?null:_0x12ad4c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x314192=_0x12ad4c['graveyardPosition'],_0x46e920=_0x12ad4c['splitPosition']['parent'];_0x12ad4c['_execute']();const _0x4d976a=_0x46e920['getAttribute']('vid_end'),_0x364f05=_0x12ad4c['insertionPosition']['nodeAfter'];if(_0x314192){const _0x205061=_0x364f05['getAttribute']('vid_end'),_0x4aba72=_0x46e920['getAttribute']('vid_end');_0x46e920['_setAttribute']('vid_end',_0x205061),_0x364f05['_setAttribute']('vid_end',_0x4aba72),this['_touched']['set'](_0x46e920['getAttribute']('vid_end'),{'userId':_0x12c46e}),this['_touched']['set'](_0x364f05['getAttribute']('vid_start'),{'userId':_0x12c46e});}else{const _0x3fd45d=this['_revisionId']++,_0x2a48cf=this['_revisionId']++;_0x46e920['_setAttribute']('vid_end',_0x3fd45d),_0x364f05['_setAttribute']('vid_start',_0x2a48cf),_0x364f05['_setAttribute']('vid_end',_0x4d976a),this['_touched']['set'](_0x3fd45d,{'userId':_0x12c46e}),this['_touched']['set'](_0x2a48cf,{'userId':_0x12c46e});}}['_handleMarkerOperation'](_0xb4e891){if(!_0xb4e891['affectsData'])return;const _0x3b574d=(_0xb4e891=this['_cloneOperation'](_0xb4e891,this['_diffRoots']))['oldRange']?_0xb4e891['oldRange']['root']:null,_0x4f4d4c=_0xb4e891['newRange']?_0xb4e891['newRange']['root']:null;_0x3b574d&&this['_markers']['delete'](_0xb4e891['name']),_0x4f4d4c&&this['_markers']['set'](_0xb4e891['name'],_0xb4e891['newRange']['clone']());const _0x7ec6dc=null===_0xb4e891['_authorId']?null:_0xb4e891['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x20f5d9=_0xb4e891['name'];if(!this['_touchedMarkers']['has'](_0x20f5d9))return void this['_touchedMarkers']['set'](_0x20f5d9,{'range':_0xb4e891['oldRange'],'userId':_0x7ec6dc});const _0x25bc68=this['_touchedMarkers']['get'](_0x20f5d9),_0x1904fc=_0x25bc68['range'],_0x6f2ffa=_0xb4e891['newRange'];null==_0x1904fc&&null==_0x6f2ffa||_0x1904fc&&_0x6f2ffa&&_0x1904fc['isEqual'](_0x6f2ffa)?this['_touchedMarkers']['delete'](_0xb4e891['name']):_0x25bc68['userId']=_0x7ec6dc;}['_handleRootOperation'](_0x168895,_0xd4f1f4){this['_diffRoots']['has'](_0x168895['rootName'])?this['_diffRoots']['get'](_0x168895['rootName'])['_isAttached']=_0x168895['isAdd']:(this['_diffRoots']['set'](_0x168895['rootName'],P(_0x168895['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x168895['rootName'],{}),_0xd4f1f4&&this['_idsRoots']['set'](_0x168895['rootName'],P(_0x168895['rootName'],!0x0)));const _0x5ac4be=null===_0x168895['_authorId']?null:_0x168895['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x25799f=this['_touchedRoots']['get'](_0x168895['rootName']);_0x25799f&&_0x25799f['userId']===_0x5ac4be?this['_touchedRoots']['delete'](_0x168895['rootName']):this['_touchedRoots']['set'](_0x168895['rootName'],{'userId':_0x5ac4be,'isAttached':_0x168895['isAdd']});}['_handleRootAttributeOperation'](_0x292fb1){const _0x6a620b=this['_diffRootsAttributes']['get'](_0x292fb1['root']['rootName']);null===_0x292fb1['newValue']?delete _0x6a620b[_0x292fb1['key']]:_0x6a620b[_0x292fb1['key']]=_0x292fb1['newValue'];}}function N(_0xf9ae7d){const _0x240168=P(_0xf9ae7d['rootName'],_0xf9ae7d['isAttached']());for(const _0x5e52e2 of _0xf9ae7d['getChildren']()){const _0x2fc0e0=_0x5e52e2['_clone'](!0x0);_0x240168['_appendChild'](_0x2fc0e0);}return _0x240168;}function P(_0x37b746,_0x38ec4e=!0x0){const _0x39b369=new vt();return _0x39b369['rootName']=_0x37b746,_0x39b369['_isAttached']=_0x38ec4e,_0x39b369['isAttached']=()=>_0x39b369['_isAttached'],_0x39b369;}function F(_0x449227,_0x2541fd,_0x22c08a){const _0x3b4e48='elementEnd'==_0x449227['type']?_0x22c08a['createPositionAt'](_0x449227['item'],'end'):_0x22c08a['createPositionBefore'](_0x449227['item']);return _0x22c08a['createPositionFromPath'](_0x2541fd,_0x3b4e48['path'],_0x3b4e48['stickiness']);}function B(_0x1744a2,_0x52c0b8,_0x304ec6){const _0x190052='elementStart'==_0x1744a2['type']?_0x304ec6['createPositionAt'](_0x1744a2['item'],0x0):_0x304ec6['createPositionAfter'](_0x1744a2['item']);return _0x304ec6['createPositionFromPath'](_0x52c0b8,_0x190052['path'],_0x190052['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x106aab,_0x2d2ac1){super(_0x106aab),this['focusTracker']=new _0x1411f8(),this['keystrokes']=new _0x1c41ad(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2d2ac1),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x89b94(this);}['render'](){super['render'](),_0x29c8c4({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x32bf07=_0x469847=>_0x469847['stopPropagation']();this['keystrokes']['set']('arrowright',_0x32bf07),this['keystrokes']['set']('arrowleft',_0x32bf07),this['keystrokes']['set']('arrowup',_0x32bf07),this['keystrokes']['set']('arrowdown',_0x32bf07);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x236479){this['revisionNameInputView']['fieldView']['element']['value']=_0x236479['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x51e173){const _0x162d53=new _0xc22ea8(this['locale'],_0x34f747),_0x17a4b8=_0x162d53['fieldView'];_0x17a4b8['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x17f01b=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x51e173&&(_0x17f01b+='\x20('+g(this['locale'],'optional')+')'),(_0x162d53['label']=_0x17f01b,_0x17a4b8['on']('input',()=>{this['revisionNameInputValue']=_0x17a4b8['element']['value']['trim']();}),_0x162d53);}}class f extends _0x506da8{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x102bd5=this['editor'],_0x5765f6=_0x102bd5['plugins']['get']('RevisionTracker');_0x102bd5['ui']['componentFactory']['add']('revisionHistory',_0x4ce0b5=>{const _0x3675c0=_0x418de7(_0x4ce0b5),_0x37ba25=_0x3675c0['panelView']['children'],_0x5e1232=new _0x2743d1(_0x4ce0b5),_0x1e87cb=new _0x24db08(_0x4ce0b5),_0x5427db=new te(_0x4ce0b5),_0x5be616=new _0x24db08(_0x4ce0b5),_0x4560a1=new te(_0x4ce0b5);return _0x3675c0['bind']('isEnabled')['to'](_0x5765f6,'isReady',_0x5765f6,'isEnabled',_0x102bd5,'isReadOnly',(_0x3b64da,_0x33fd45,_0x3d0e64)=>_0x3b64da&&_0x33fd45&&!_0x3d0e64),_0x3675c0['buttonView']['set']({'icon':_0x5606df,'label':g(_0x4ce0b5,'Revision\x20history'),'tooltip':!0x0}),_0x5427db['set']({'label':g(_0x4ce0b5,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x5427db['bind']('isEnabled')['to'](_0x5765f6,'isReady',_0x5765f6,'isEnabled',_0x102bd5,'isReadOnly',(_0x4c0e6d,_0x227f01,_0x1c1939)=>_0x4c0e6d&&_0x227f01&&!_0x1c1939),_0x5427db['on']('execute',()=>this['_showDialog']()),_0x4560a1['set']({'label':g(_0x4ce0b5,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x4560a1['bind']('isEnabled')['to'](_0x5765f6,'isReady',_0x102bd5,'isReadOnly',(_0x35f715,_0x5405da)=>_0x35f715&&!_0x5405da),_0x4560a1['on']('execute',()=>{_0x102bd5['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x3675c0['isOpen']=!0x1,_0x102bd5['editing']['view']['focus']();}),_0x1e87cb['children']['add'](_0x5427db),_0x5be616['children']['add'](_0x4560a1),_0x5e1232['role']='menu',_0x5e1232['items']['addMany']([_0x1e87cb,_0x5be616]),_0x37ba25['add'](_0x5e1232),_0x3675c0;}),_0x102bd5['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x4814d4=this['editor'],_0x3b9f63=_0x4814d4['locale'],_0x1d7b90=new _0xafdc44(_0x3b9f63),_0x591137=new _0x2903e1(_0x3b9f63);_0x1d7b90['buttonView']['set']({'icon':_0x5606df,'label':g(_0x3b9f63,'Revision\x20history')});const _0x3a2b83=new _0x2f8c79(_0x3b9f63,_0x1d7b90),_0x3d99fc=new _0x55977e(_0x3b9f63);_0x3d99fc['set']({'label':g(_0x3b9f63,'Save\x20current\x20revision')}),_0x3d99fc['delegate']('execute')['to'](_0x1d7b90),_0x3d99fc['on']('execute',()=>{this['_showDialog']();}),_0x3a2b83['children']['add'](_0x3d99fc),_0x591137['items']['add'](_0x3a2b83);const _0x203681=new _0x2f8c79(_0x3b9f63,_0x1d7b90),_0x28e6f0=new _0x55977e(_0x3b9f63);return _0x28e6f0['set']({'label':g(_0x3b9f63,'Open\x20revision\x20history')}),_0x28e6f0['delegate']('execute')['to'](_0x1d7b90),_0x28e6f0['on']('execute',()=>{_0x4814d4['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x203681['children']['add'](_0x28e6f0),_0x591137['items']['add'](_0x203681),_0x1d7b90['panelView']['children']['add'](_0x591137),_0x1d7b90;}['_showDialog'](){const _0x1d148e=this['editor'],_0x13679c=_0x1d148e['locale'],_0x262963=_0x1d148e['plugins']['get']('Dialog'),_0x22eeff=_0x1d148e['plugins']['get']('RevisionTracker');function _0x39945d(_0x8183fb){_0x1d148e['config']['get']('revisionHistory.requireRevisionName')&&''===_0x8183fb['revisionName']?_0x8183fb['revisionNameInputView']['errorText']=g(_0x13679c,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x1d148e['plugins']['get'](u)['saveRevision']({'name':_0x8183fb['revisionName']}),_0x262963['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x39945d(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x262963['show']({'id':'revisionSave','title':g(_0x13679c,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x1d148e['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x262963['hide']()},{'label':g(_0x1d148e['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x446260){_0x446260['bind']('isEnabled')['to'](_0x22eeff,'isReady',_0x22eeff,'isEnabled',_0x1d148e,'isReadOnly',(_0x2b1168,_0x1269ca,_0x67a89b)=>_0x2b1168&&_0x1269ca&&!_0x67a89b);},'onExecute':()=>_0x39945d(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x330919=this['editor'],_0x49e673=_0x330919['locale'];this['_saveRevisionFormView']=new hs(_0x49e673,_0x330919['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends ts{['changeId'];['_model'];constructor(_0x54f9df,_0x202186){super(_0x54f9df),this['_model']=_0x202186,this['changeId']=_0x202186['id'];const _0x230e5a=this['bindTemplate'],_0x3304cc=g(_0x54f9df,_0x202186['data']['isSuggestion']?'Suggested\x20by':'add'==_0x202186['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x202186['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x230e5a['to']('type',_0x3fde58=>'ck-revision-change__'+_0x3fde58)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x3304cc}]},{'text':'\x20'+_0x202186['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1f7614(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0xed8c0b){super(),this['id']=_0xed8c0b['id']||_0x2a811c(),this['author']=_0xed8c0b['author'],this['type']=_0xed8c0b['type'],this['data']=_0xed8c0b['data']||{},this['rootName']=_0xed8c0b['rootName'],this['set']('createdAt',_0xed8c0b['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x3925a6,_0x18ec4a){this['newRevisionId']=_0x3925a6,this['oldRevisionId']=_0x18ec4a,this['changes']=new _0x2f6a5b();}['_setChanges'](_0x728c2f){for(const _0x1550bf of _0x728c2f)this['changes']['add'](_0x1550bf);}}class m extends _0x506da8{['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[_0x24f403,_0x1f5838,I,V];}constructor(_0x330c7e){super(_0x330c7e),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',(_0x37bc31,_0x264b69,_0xfb8088)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x274c9a=>{for(const _0x175b6d of this['editor']['editing']['view']['document']['roots'])_0xfb8088?_0x274c9a['removeClass']('ck-editor__editable__overlay',_0x175b6d):_0x274c9a['addClass']('ck-editor__editable__overlay',_0x175b6d);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4b6c1c=>null!==_0x4b6c1c),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x368460,_0x33abd7,_0x4dd45e)=>_0x368460&&_0x4dd45e?_0x33abd7['changes']['getIndex'](_0x4dd45e):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x869fa8,_0x3a74e7)=>_0x869fa8?_0x3a74e7['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1f5838);}['init'](){const _0x3a1e33=this['editor'],_0x1a5eab=new wt(_0x3a1e33,{'direction':'backward'}),_0x1c857b=new wt(_0x3a1e33,{'direction':'forward'});(_0x3a1e33['commands']['add']('showPreviousChange',_0x1a5eab),_0x3a1e33['commands']['add']('showNextChange',_0x1c857b),_0x3a1e33['commands']['add']('restoreRevision',new mt(_0x3a1e33)),this['on']('change:numberOfChanges',()=>{_0x1a5eab['refresh'](),_0x1c857b['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x3a1e33['enableReadOnlyMode']('revision-viewer'),_0x3a1e33['plugins']['has']('WidgetToolbarRepository'))&&_0x3a1e33['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0xf3be43){return await this['_utils']['loadRevisionData'](_0xf3be43,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xf3be43);}async['getRevisionRootsAttributes'](_0x5edcbf){return await this['_utils']['loadRevisionData'](_0x5edcbf,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5edcbf);}async['compare'](_0x322e08,_0x4d12e5,_0x33f8dc=!0x1){if(!this['isEnabled'])return;const _0x2bfe51=this['diff'],_0x10310b=this['repository'],_0x530240='string'==typeof _0x322e08?_0x10310b['getRevision'](_0x322e08):_0x322e08,_0x38a252='string'==typeof _0x4d12e5?_0x10310b['getRevision'](_0x4d12e5):_0x4d12e5,_0x392bae=_0x530240['id'],_0x54b662=_0x38a252?_0x38a252['id']:null;if(!_0x33f8dc&&this['diff']&&this['diff']['newRevisionId']===_0x392bae&&this['diff']['oldRevisionId']===_0x54b662)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x392bae,_0x54b662);const _0x29d670=this['_getRevisionsRange'](_0x530240,_0x38a252,!0x0)['map'](_0xd1bf4d=>this['_utils']['loadRevisionData'](_0xd1bf4d,this['adapter']));return _0x29d670['push'](new Promise(_0x1f93be=>{setTimeout(_0x1f93be,0x14);})),Promise['all'](_0x29d670)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x21e5bb=this['_getDiff'](_0x392bae,_0x54b662);for(const _0x296d2a of _0x21e5bb['changes'])this['_changeIdToChange']['set'](_0x296d2a['id'],_0x296d2a);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x9df71=>{for(const _0x5445a5 of this['editor']['model']['document']['getRootNames']())_0x9df71['detachRoot'](_0x5445a5);for(const _0x687cd0 of Object['keys'](_0x21e5bb['model'])){const _0xc163b8=_0x9df71['addRoot'](_0x687cd0);for(const _0x240390 of Object['keys'](_0x21e5bb['attributes'][_0x687cd0]))_0x9df71['setAttribute'](_0x240390,_0x21e5bb['attributes'][_0x687cd0][_0x240390],_0xc163b8);_0x9df71['insert'](_0x21e5bb['model'][_0x687cd0],_0xc163b8,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x21e5bb['changes'])),this['isReady']=!0x0;})['catch'](_0x2dc10e=>{console['error'](_0x2dc10e),this['_cleanUp'](),_0x2bfe51&&(this['diff']=_0x2bfe51),this['isReady']=!0x0;});}['addRevisionData'](_0x536c95,_0x2c709e){const _0x1d6d90=this['repository']['createRevision'](_0x536c95);return _0x1d6d90['on']('_update',(_0x9d1c89,_0x21532a,_0x5da059)=>_0x2c709e(_0x21532a,_0x5da059,_0x1d6d90)),this['repository']['addRevision'](_0x1d6d90),_0x1d6d90;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x437219=>{for(const _0x2422a6 of this['editor']['model']['document']['getRootNames']())_0x437219['detachRoot'](_0x2422a6);});}['_sortAndFilterDiffChanges'](_0x452171){const _0x58134e=[],_0x3917fd=new Map();for(const _0x124989 of this['editor']['model']['document']['getRootNames']()){const _0x4362f=this['editor']['editing']['view']['getDomRoot'](_0x124989);if(!_0x4362f)continue;const _0x319b66=_0x4362f['getClientRects']()['item'](0x0);_0x319b66&&(_0x58134e['push'](_0x124989),_0x3917fd['set'](_0x124989,_0x319b66));}return _0x58134e['sort']((_0x541902,_0x375b11)=>{const _0x43897c=_0x3917fd['get'](_0x541902),_0x379f37=_0x3917fd['get'](_0x375b11);return _0x43897c['y']-_0x379f37['y']||_0x43897c['x']-_0x379f37['x'];}),(_0x452171=_0x452171['filter'](_0x2cc99a=>_0x58134e['includes'](_0x2cc99a['rootName'])))['sort']((_0x502054,_0x2a2af7)=>_0x58134e['indexOf'](_0x502054['rootName'])-_0x58134e['indexOf'](_0x2a2af7['rootName'])),_0x452171;}['_makeTape'](_0x231bd4){const _0x8067a2=Array['from'](_0x231bd4['markers'])['filter'](([_0x2b810f,_0x211ddc])=>_0x2b810f['startsWith']('revision:')&&!_0x211ddc['isCollapsed']),_0x37e407=Array['from'](this['editor']['model']['createRangeIn'](_0x231bd4)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x8067a2['length'])for(const _0x329197 of _0x37e407){const [_0x253564,_0x1ed1ea]=_0x8067a2[0x0],[,_0x302178,_0x596e97]=_0x253564['split'](':');if(_0x1ed1ea['end']['isEqual'](_0x329197['nextPosition'])&&_0x8067a2['shift'](),(_0x329197['previousPosition']['isEqual'](_0x1ed1ea['start'])||_0x329197['previousPosition']['isAfter'](_0x1ed1ea['start']))&&('insertion'==_0x302178?_0x329197['isAdded']={'userId':_0x596e97}:'deletion'==_0x302178&&(_0x329197['isRemoved']={'userId':_0x596e97})),0x0==_0x8067a2['length'])break;}return _0x37e407;}['_refreshStartEndIndex'](_0x95bdd8){const _0x1c49ca=new Map();for(let _0x3333a8=0x0;_0x3333a8<_0x95bdd8['length'];_0x3333a8++)'text'===_0x95bdd8[_0x3333a8]['type']?(_0x95bdd8[_0x3333a8]['item']['startIndex']=_0x3333a8,_0x95bdd8[_0x3333a8]['item']['endIndex']=_0x3333a8):('elementStart'===_0x95bdd8[_0x3333a8]['type']?_0x95bdd8[_0x3333a8]['item']['startIndex']=_0x3333a8:'elementEnd'===_0x95bdd8[_0x3333a8]['type']&&(_0x95bdd8[_0x3333a8]['item']['endIndex']=_0x3333a8),_0x1c49ca['set'](_0x95bdd8[_0x3333a8]['id'],_0x3333a8));for(const _0x3928a4 of _0x1c49ca['values']())'elementStart'===_0x95bdd8[_0x3928a4]['type']?_0x95bdd8[_0x3928a4]['item']['endIndex']=_0x1c49ca['get'](_0x95bdd8[_0x3928a4]['pairId']):'elementEnd'===_0x95bdd8[_0x3928a4]['type']&&(_0x95bdd8[_0x3928a4]['item']['startIndex']=_0x1c49ca['get'](_0x95bdd8[_0x3928a4]['pairId']));}['_processTape'](_0x33fe3c){for(let _0xb7078=0x0;_0xb7078<_0x33fe3c['length'];_0xb7078++){if('elementStart'===_0x33fe3c[_0xb7078]['type'])_0x33fe3c[_0xb7078]['item']['startIndex']=_0xb7078;else{if('elementEnd'===_0x33fe3c[_0xb7078]['type']){_0x33fe3c[_0xb7078]['item']['endIndex']=_0xb7078;const _0x221381=_0x33fe3c[_0xb7078]['item']['startIndex'];_0x33fe3c[_0x221381]['pairId']=_0x33fe3c[_0xb7078]['id'],_0x33fe3c[_0xb7078]['pairId']=_0x33fe3c[_0x221381]['id'];}else _0x33fe3c[_0xb7078]['item']['startIndex']=_0xb7078,_0x33fe3c[_0xb7078]['item']['endIndex']=_0xb7078,_0x33fe3c[_0xb7078]['pairId']=null;}_0x33fe3c[_0xb7078]['markersStart']||(_0x33fe3c[_0xb7078]['markersStart']=[],_0x33fe3c[_0xb7078]['markersEnd']=[]);}}['_markInsertions'](_0x5dc084,_0xf44fee){const _0x398012=_0x5dc084['filter'](_0xe09397=>!_0xe09397['isAdded']);for(let _0x40b9b9=0x0;_0x40b9b9<_0xf44fee['length'];_0x40b9b9++)_0xf44fee[_0x40b9b9]['isAdded']&&(_0x398012[_0x40b9b9]['isAdded']=_0xf44fee[_0x40b9b9]['isAdded']);}['_getDiff'](_0x597b7a,_0x52893b=null){const _0x410c6a=this['repository']['getRevision'](_0x597b7a),_0x4ac0cc=_0x52893b?this['repository']['getRevision'](_0x52893b):null,_0x11e81b=this['_getRevisionsRange'](_0x410c6a,_0x4ac0cc),_0x41f301=_0x11e81b[_0x11e81b['length']-0x1],_0x370f33=new Map(),_0x415a6d={'model':{},'attributes':{},'changes':[]},_0x1d258a=new Set(),_0x445eb9=new Map();for(let _0x51ff8c=_0x11e81b['length']-0x1;_0x51ff8c>=0x0;_0x51ff8c--){const _0x3fe88e=_0x11e81b[_0x51ff8c];for(const _0x4ca331 of Object['keys'](_0x3fe88e['diffData']))if(_0x3fe88e['diffData'][_0x4ca331]['attachChange']){const _0x44c5b7=_0x3fe88e['diffData'][_0x4ca331]['attachChange'];_0x44c5b7['isAttached']?(_0x1d258a['add'](_0x4ca331),_0x445eb9['has'](_0x4ca331)&&_0x445eb9['get'](_0x4ca331)['userId']==_0x44c5b7['userId']?_0x445eb9['delete'](_0x4ca331):_0x445eb9['set'](_0x4ca331,_0x44c5b7)):_0x445eb9['has'](_0x4ca331)?(_0x1d258a['delete'](_0x4ca331),_0x445eb9['delete'](_0x4ca331)):(_0x1d258a['add'](_0x4ca331),_0x445eb9['set'](_0x4ca331,_0x44c5b7));}else _0x1d258a['add'](_0x4ca331);}for(const _0x590dd2 of _0x1d258a){const _0x4ec622=_0x445eb9['has'](_0x590dd2)&&!_0x445eb9['get'](_0x590dd2)['isAttached'];let _0x3045ca=_0x4ec622?_0x11e81b['length']-0x1:0x0;const _0xbf7513=_0x4ec622?-0x1:0x1;for(;_0x11e81b[_0x3045ca];){const _0x2a8fc8=_0x11e81b[_0x3045ca];if(_0x2a8fc8['diffData'][_0x590dd2]){const _0x9e44c9=_0x4ec622?_0x2a8fc8['diffData'][_0x590dd2]['attributesBefore']:_0x2a8fc8['diffData'][_0x590dd2]['attributesAfter'];_0x415a6d['attributes'][_0x590dd2]=_0x9e44c9?_0x2061e4(_0x9e44c9):{};break;}_0x3045ca+=_0xbf7513;}}for(const _0x1e8b39 of _0x11e81b){_0x1e8b39['model']={};for(const _0x458b0b of _0x1e8b39['authors'])_0x370f33['set'](_0x458b0b['id'],_0x458b0b);for(const _0x240b18 of _0x1d258a){const _0x493288=_0x1e8b39['diffData'][_0x240b18]?_0x1e8b39['diffData'][_0x240b18]['insertions']:'[]',_0x3c90f7=_0x1e8b39['diffData'][_0x240b18]?_0x1e8b39['diffData'][_0x240b18]['deletions']:'[]';_0x1e8b39['model'][_0x240b18]={'insertions':this['_utils']['_makeModelFromViewString'](_0x493288),'deletions':this['_utils']['_makeModelFromViewString'](_0x3c90f7)};}}for(const _0x10cb04 of _0x1d258a){let _0x530e90=null,_0x4ed718=0x0;const _0xcaafdd=new Map(Array['from'](_0x410c6a['model'][_0x10cb04]['insertions']['markers'])['filter'](([_0x51fd99])=>!_0x51fd99['startsWith']('revision:')));let _0x4623a4=0x0;for(const _0x55396c of _0x11e81b){const _0x1dd8f4=this['_makeTape'](_0x55396c['model'][_0x10cb04]['insertions']);_0x55396c==_0x410c6a?(_0x530e90=_0x1dd8f4,_0x4ed718=_0x530e90['length'],_0x530e90['forEach'](_0xef5a74=>{_0xef5a74['id']=_0x4623a4++;}),this['_processTape'](_0x530e90)):this['_markInsertions'](_0x530e90,_0x1dd8f4);const _0x172e4b=_0x530e90['filter'](_0x54e6ce=>!_0x54e6ce['isAdded'])['map'](_0x5895=>_0x5895['id']);let _0x279800=0x0;const _0x16ce2f=this['_makeTape'](_0x55396c['model'][_0x10cb04]['deletions']);_0x16ce2f['forEach'](_0x544067=>{_0x544067['isRemoved']?_0x544067['id']=_0x4ed718++:_0x544067['id']=_0x172e4b[_0x279800++];}),this['_processTape'](_0x16ce2f),this['_setDistance'](_0x530e90,'isAdded'),this['_setDistance'](_0x16ce2f,'isRemoved'),_0x55396c==_0x410c6a&&this['_markMarkers'](_0x530e90,_0xcaafdd),_0x530e90=this['_joinTapes'](_0x530e90,_0x16ce2f),this['_refreshStartEndIndex'](_0x530e90),this['_setDistance'](_0x530e90,'isRemoved');}_0x530e90=_0x530e90['filter'](_0x580c70=>!(_0x580c70['isAdded']&&_0x580c70['isRemoved']));const _0x55ba66=new Map(_0x41f301['model'][_0x10cb04]['deletions']['markers']),_0x2f9357=new Set(_0xcaafdd['keys']());for(const _0x22ea59 of _0x55ba66['keys']())_0x2f9357['delete'](_0x22ea59);this['_markSuggestions'](_0x530e90,_0x2f9357),this['_fixObsoleteTags'](_0x530e90),_0x530e90=this['_removeMissingPairs'](_0x530e90),_0x530e90=this['_markMismatchedRemovedTags'](_0x530e90),_0x530e90=this['_removeUnsupportedChanges'](_0x530e90);const {root:_0x1eef3a,changes:_0x4450d6}=this['_makeModelFromTape'](_0x530e90,_0x370f33,_0x10cb04);_0x415a6d['model'][_0x10cb04]=_0x1eef3a;const _0x3a5c81=_0x445eb9['get'](_0x10cb04);if(_0x3a5c81){const _0x1fed10=_0x370f33['get'](_0x3a5c81['userId']),_0x4604e6=new r({'author':_0x1fed10,'type':_0x3a5c81['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x10cb04});_0x4450d6['unshift'](_0x4604e6),_0x415a6d['attributes'][_0x10cb04]['revisionHistoryAttachChange']=_0x4604e6['id'];}_0x415a6d['changes']=_0x415a6d['changes']['concat'](_0x4450d6);}return _0x415a6d;}['_markMarkers'](_0x50c4d7,_0x489202){for(let _0x7901ff=0x0;_0x7901ff<_0x50c4d7['length'];_0x7901ff++)for(const [_0x2718a9,_0x2fde3e]of _0x489202)!_0x2fde3e['isCollapsed']&&_0x2fde3e['start']['isEqual'](_0x50c4d7[_0x7901ff]['previousPosition'])&&_0x50c4d7[_0x7901ff]['markersStart']['push'](_0x2718a9),_0x2fde3e['end']['isEqual'](_0x50c4d7[_0x7901ff]['nextPosition'])&&_0x50c4d7[_0x7901ff]['markersEnd']['push'](_0x2718a9);}['_joinTapes'](_0x1c22ab,_0x28df20){let _0x2e4117=[],_0x26f3a2=0x0,_0x5493a5=0x0;for(;_0x26f3a2<_0x1c22ab['length']||_0x5493a5<_0x28df20['length'];){const _0x14708c=_0x1c22ab[_0x26f3a2]||{},_0x29f9f3=_0x28df20[_0x5493a5]||{};if(_0x14708c['id']==_0x29f9f3['id'])_0x26f3a2++,_0x5493a5++,_0x2e4117['push'](_0x14708c);else{if(_0x29f9f3['isRemoved']&&_0x14708c['isAdded']){const {commonTape:_0x1d8b8d,iEnd:_0x36b354,jEnd:_0x3aae69}=this['_threeWayMerge'](_0x1c22ab,_0x26f3a2,_0x28df20,_0x5493a5);_0x2e4117=_0x2e4117['concat'](_0x1d8b8d),_0x26f3a2=_0x36b354,_0x5493a5=_0x3aae69;}else _0x29f9f3['isRemoved']?(_0x5493a5++,_0x2e4117['push'](_0x29f9f3)):(_0x26f3a2++,_0x2e4117['push'](_0x14708c));}}return _0x2e4117;}['_markSuggestions'](_0x417a5f,_0xaa1c31){const _0x143c42=[];for(let _0x56e4da=0x0;_0x56e4da<_0x417a5f['length'];_0x56e4da++){for(let _0x45d9d0=0x0;_0x45d9d0<_0x417a5f[_0x56e4da]['markersStart']['length'];_0x45d9d0++){const _0x54227d=_0x417a5f[_0x56e4da]['markersStart'][_0x45d9d0];if(!_0xaa1c31['has'](_0x54227d))continue;const {group:_0x8bb1b9,type:_0x120ec4,authorId:_0x367a56}=_0x13a425(_0x54227d);'revision-suggestion'!=_0x8bb1b9||'insertion'!=_0x120ec4&&'deletion'!=_0x120ec4||(_0x143c42['unshift']({'type':_0x120ec4,'name':_0x54227d,'userId':_0x367a56}),_0x417a5f[_0x56e4da]['markersStart']['splice'](_0x45d9d0,0x1),_0x45d9d0--);}_0x427e63(_0x417a5f[_0x56e4da]);for(let _0x9ad92c=0x0;_0x9ad92c<_0x417a5f[_0x56e4da]['markersEnd']['length'];_0x9ad92c++){const _0x3b01a1=_0x417a5f[_0x56e4da]['markersEnd'][_0x9ad92c];if(!_0xaa1c31['has'](_0x3b01a1))continue;const {group:_0x52ccc9,type:_0x1f6aad}=_0x13a425(_0x3b01a1);if('revision-suggestion'!=_0x52ccc9||'insertion'!=_0x1f6aad&&'deletion'!=_0x1f6aad)continue;_0x417a5f[_0x56e4da]['markersEnd']['splice'](_0x9ad92c,0x1),_0x9ad92c--;const _0x3dd97d=_0x143c42['findIndex'](_0x153a28=>_0x153a28['name']==_0x3b01a1);_0x3dd97d>-0x1&&_0x143c42['splice'](_0x3dd97d,0x1);}}function _0x13a425(_0x18d38b){const _0x542477=_0x18d38b['split'](':');return{'group':_0x542477[0x0],'type':_0x542477[0x1],'subType':_0x542477['length']>=0x5?_0x542477[0x2]:null,'id':_0x542477['length']<0x5?_0x542477[0x2]:_0x542477[0x3],'authorId':_0x542477['length']<0x5?_0x542477[0x3]:_0x542477[0x4],'markerCount':0x6==_0x542477['length']?_0x542477[0x5]:null};}function _0x427e63(_0x16abb0){for(let _0x1d204b=0x0;_0x1d204b<_0x143c42['length'];_0x1d204b++){if(_0x16abb0['isAdded']&&'insertion'==_0x143c42[_0x1d204b]['type']&&_0x16abb0['isAdded']['userId']==_0x143c42[_0x1d204b]['userId'])return _0x16abb0['isAddSuggestion']=_0x143c42[_0x1d204b],void delete _0x16abb0['isAdded'];if(!_0x16abb0['isAdded']&&!_0x16abb0['isRemoved']&&'deletion'==_0x143c42[_0x1d204b]['type'])return void(_0x16abb0['isRemoveSuggestion']=_0x143c42[_0x1d204b]);}}}['_setDistance'](_0x4dcebc,_0x4e4322){let _0x3a7d69=0x0,_0x435726=!0x1;const _0x50fd4c=new Map();for(const _0x3cd4f0 of _0x4dcebc)_0x3cd4f0[_0x4e4322]?_0x435726&&(_0x3a7d69++,_0x435726=!0x1):(_0x3a7d69++,_0x435726=!0x0),_0x50fd4c['set'](_0x3cd4f0['id'],_0x3a7d69);for(let _0x46f44c=0x0;_0x46f44c<_0x4dcebc['length'];_0x46f44c++){if('isRemoved'==_0x4e4322&&_0x4dcebc[_0x46f44c]['isAdded']||'isAdded'==_0x4e4322&&_0x4dcebc[_0x46f44c]['isRemoved'])continue;if('text'==_0x4dcebc[_0x46f44c]['type']){_0x4dcebc[_0x46f44c]['distance']=0x0;continue;}const _0x41f900=_0x50fd4c['get'](_0x4dcebc[_0x46f44c]['pairId']),_0x50961d=_0x50fd4c['get'](_0x4dcebc[_0x46f44c]['id']);_0x4dcebc[_0x46f44c]['distance']=_0x41f900-_0x50961d;}}['_getRevisionsRange'](_0x17eeb3,_0x14922a,_0x576dd6=!0x1){const _0x2d4c0a=[];let _0x2df4c9=this['repository']['getIndex'](_0x17eeb3),_0x3ba8b5=this['repository']['getIndex'](_0x14922a);for(-0x1==_0x3ba8b5&&(_0x3ba8b5=this['repository']['_revisions']['length'],_0x576dd6=!0x1);_0x2df4c9<_0x3ba8b5;)_0x2d4c0a['push'](this['repository']['getRevision'](_0x2df4c9)),_0x2df4c9++;return _0x576dd6&&_0x2d4c0a['push'](this['repository']['getRevision'](_0x2df4c9)),_0x2d4c0a;}['_threeWayMerge'](_0x144e39,_0x4bad2a,_0x49eccb,_0x6ff026){const _0x49389a=this['editor']['model']['schema'];let _0x263c62=_0x4bad2a;for(;_0x144e39[_0x263c62]&&_0x144e39[_0x263c62]['isAdded'];)_0x263c62++;let _0x20b439=_0x6ff026;for(;_0x49eccb[_0x20b439]&&_0x49eccb[_0x20b439]['isRemoved'];)_0x20b439++;_0x3ea4ab(_0x144e39,_0x4bad2a,_0x263c62),_0x3ea4ab(_0x49eccb,_0x6ff026,_0x20b439);const _0xaaa939=_0x49eccb['slice'](_0x6ff026,_0x20b439)['concat'](_0x144e39['slice'](_0x4bad2a,_0x263c62));return _0xaaa939['sort']((_0x5bbf48,_0x5e1783)=>_0x5bbf48['side']!=_0x5e1783['side']?_0x5bbf48['side']-_0x5e1783['side']:_0x5bbf48['level']!=_0x5e1783['level']?_0x5bbf48['level']-_0x5e1783['level']:_0x5bbf48['distance']!=_0x5e1783['distance']?_0x5e1783['distance']-_0x5bbf48['distance']:!!_0x5bbf48['isAdded']!=!!_0x5e1783['isAdded']?-0x1==_0x5bbf48['side']||0x0==_0x5bbf48['side']?_0x5bbf48['isAdded']?-0x1:0x1:_0x5bbf48['isAdded']?0x1:-0x1:_0x5bbf48['index']-_0x5e1783['index']),{'commonTape':_0xaaa939,'iEnd':_0x263c62,'jEnd':_0x20b439};function _0x3ea4ab(_0x457c3f,_0x1dc1fa,_0x409071){let _0x113a4a=-0x1,_0x2af1d3=Number['POSITIVE_INFINITY'],_0x6fcae2=!0x0;for(let _0x314f88=_0x1dc1fa;_0x314f88<_0x409071;_0x314f88++)if(_0x49389a['isInline'](_0x457c3f[_0x314f88]['item'])||(_0x6fcae2=!0x1),_0x457c3f[_0x314f88]['item']['startIndex']<_0x1dc1fa&&(_0x113a4a=_0x314f88),_0x457c3f[_0x314f88]['item']['endIndex']>=_0x409071){_0x2af1d3=_0x314f88;break;}_0x6fcae2&&(_0x113a4a=_0x409071-0x1);for(let _0x1b2c3f=_0x1dc1fa;_0x1b2c3f<_0x409071;_0x1b2c3f++)_0x457c3f[_0x1b2c3f]['side']=_0x1b2c3f<=_0x113a4a?-0x1:_0x1b2c3f<_0x2af1d3?0x0:0x1,_0x457c3f[_0x1b2c3f]['index']=_0x1b2c3f;let _0x4984cf=0x0;for(let _0x5ac35a=_0x1dc1fa;_0x5ac35a<=_0x113a4a;_0x5ac35a++)0x0==_0x457c3f[_0x5ac35a]['distance']?_0x457c3f[_0x5ac35a]['level']=_0x4984cf:(_0x4984cf++,_0x457c3f[_0x5ac35a]['level']=_0x4984cf,_0x4984cf++);for(let _0x597dc6=_0x1dc1fa;_0x597dc6<_0x409071;_0x597dc6++)0x0==_0x457c3f[_0x597dc6]['side']&&(_0x457c3f[_0x597dc6]['level']=_0x4984cf);_0x4984cf=0x0;for(let _0x336a26=_0x409071-0x1;_0x336a26>=_0x2af1d3;_0x336a26--)0x0==_0x457c3f[_0x336a26]['distance']?_0x457c3f[_0x336a26]['level']=_0x4984cf:(_0x4984cf--,_0x457c3f[_0x336a26]['level']=_0x4984cf,_0x4984cf--);}}['_fixObsoleteTags'](_0x21b96f){const _0x69ca47=new Map(),_0x5e1cf0=this['editor']['model']['schema'];for(let _0x46d071=0x1;_0x46d071<_0x21b96f['length'];_0x46d071++){let _0xd34a8f,_0x39ad76,_0x1a2407;const _0x4c8793=_0x21b96f[_0x46d071],_0x2f9253=_0x21b96f[_0x46d071-0x1];if('text'==_0x4c8793['type'])continue;if(_0x4c8793['type']!=_0x2f9253['type'])continue;if(!_0x5e1cf0['isBlock'](_0x2f9253['item'])||_0x5e1cf0['isLimit'](_0x2f9253['item']))continue;if(!_0x5e1cf0['isBlock'](_0x4c8793['item'])||_0x5e1cf0['isLimit'](_0x4c8793['item']))continue;if((_0x21b96f[_0x46d071]['isAdded']||_0x21b96f[_0x46d071]['isAddSuggestion'])&&_0x21b96f[_0x46d071-0x1]['isRemoved'])_0xd34a8f=_0x21b96f[_0x46d071],_0x39ad76=_0x21b96f[_0x46d071-0x1],_0x1a2407=_0x46d071-0x1;else{if(!_0x21b96f[_0x46d071]['isRemoved']||!_0x21b96f[_0x46d071-0x1]['isAdded']&&!_0x21b96f[_0x46d071-0x1]['isAddSuggestion'])continue;_0xd34a8f=_0x21b96f[_0x46d071-0x1],_0x39ad76=_0x21b96f[_0x46d071],_0x1a2407=_0x46d071;}const _0x4e290e=_0xd34a8f['level']==_0x39ad76['level'],_0x33b2f5=Math['abs'](_0xd34a8f['level'])<Math['abs'](_0x39ad76['level'])&&0x0==_0x39ad76['distance'];(_0x4e290e||_0x33b2f5)&&(_0x69ca47['set'](_0x39ad76['id'],_0xd34a8f['id']),_0x21b96f['splice'](_0x1a2407,0x1),_0x46d071--,_0xd34a8f['isAdded']=!0x1);}for(let _0x1eb457=0x0;_0x1eb457<_0x21b96f['length'];_0x1eb457++)_0x69ca47['has'](_0x21b96f[_0x1eb457]['pairId'])&&(_0x21b96f[_0x1eb457]['pairId']=_0x69ca47['get'](_0x21b96f[_0x1eb457]['pairId']));}['_removeMissingPairs'](_0x42a88a){const _0x256401=new Set(_0x42a88a['map'](_0x36717f=>_0x36717f['id']));for(let _0x17235b=0x0;_0x17235b<_0x42a88a['length'];_0x17235b++)_0x256401['has'](_0x42a88a[_0x17235b]['pairId'])||0x0==_0x42a88a[_0x17235b]['distance']||(_0x42a88a[_0x17235b]['isIncorrect']=!0x0);return _0x42a88a['filter'](_0x316dca=>!_0x316dca['isIncorrect']);}['_markMismatchedRemovedTags'](_0x408a7b){const _0x5c5578=new Set();for(let _0xfdfffc=0x0;_0xfdfffc<_0x408a7b['length'];_0xfdfffc++){if(_0x5c5578['has'](_0x408a7b[_0xfdfffc]['id'])&&_0x408a7b[_0xfdfffc]['isRemoved']&&(_0x408a7b[_0xfdfffc]['isIncorrect']=!0x0),_0x408a7b[_0xfdfffc]['isIncorrect'])continue;if(0x0==_0x408a7b[_0xfdfffc]['distance'])continue;if('elementStart'!=_0x408a7b[_0xfdfffc]['type'])continue;if(null==_0x408a7b[_0xfdfffc]['pairId'])continue;let _0x155533=_0xfdfffc+0x1,_0x5b3701=0x0;for(;_0x408a7b[_0x155533]['id']!=_0x408a7b[_0xfdfffc]['pairId'];)'elementStart'==_0x408a7b[_0x155533]['type']?_0x5b3701++:'elementEnd'==_0x408a7b[_0x155533]['type']&&_0x5b3701--,_0x155533++;if(0x0!=_0x5b3701){if(_0x408a7b[_0xfdfffc]['isRemoved'])_0x408a7b[_0xfdfffc]['isIncorrect']=!0x0;else{for(;_0x155533!=_0xfdfffc;)_0x408a7b[_0x155533]['isRemoved']&&0x0!=_0x408a7b[_0x155533]['distance']&&(_0x408a7b[_0x155533]['isIncorrect']=!0x0,_0x5c5578['add'](_0x408a7b[_0x155533]['pairId'])),_0x155533--;}}}return _0x408a7b['filter'](_0x570f81=>!_0x570f81['isIncorrect']);}['_removeUnsupportedChanges'](_0x1113af){const _0x22b1f8=this['editor']['model']['schema'];for(let _0x36112b=0x0;_0x36112b<_0x1113af['length'];_0x36112b++){if(!(_0x1113af[_0x36112b]['isAdded']||_0x1113af[_0x36112b]['isAddSuggestion']||_0x1113af[_0x36112b]['isRemoved']||_0x1113af[_0x36112b]['isRemoveSuggestion']))continue;if(0x0==_0x1113af[_0x36112b]['distance'])continue;const _0x367add=_0x1113af[_0x36112b]['item'];_0x22b1f8['isBlock'](_0x367add)||_0x22b1f8['isLimit'](_0x367add)||(_0x1113af[_0x36112b]['isAdded']&&delete _0x1113af[_0x36112b]['isAdded'],_0x1113af[_0x36112b]['isAddSuggestion']&&delete _0x1113af[_0x36112b]['isAddSuggestion'],_0x1113af[_0x36112b]['isRemoveSuggestion']&&delete _0x1113af[_0x36112b]['isRemoveSuggestion'],_0x1113af[_0x36112b]['isRemoved']&&(_0x1113af[_0x36112b]['isIncorrect']=!0x0));}return _0x1113af['filter'](_0x1a30c1=>!_0x1a30c1['isIncorrect']);}['_makeModelFromTape'](_0x586ad4,_0x31283c,_0x3d71e9){const _0x2bc151=new vt(),_0x756955=[],_0x52327a=new Map(),_0x133e2d=this['editor']['model'],_0x390608=_0x133e2d['schema'],_0x29e529=[_0x2bc151],_0xb4e324={},_0x39f630={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x51f577=null;const _0x3e87c3=[0x0];for(let _0xdf03ab=0x0;_0xdf03ab<_0x586ad4['length'];_0xdf03ab++)if('elementStart'===_0x586ad4[_0xdf03ab]['type']){_0x586ad4[_0xdf03ab]['previousPosition']=_0x133e2d['createPositionFromPath'](_0x2bc151,_0x3e87c3);const _0x31a6e3=new ut(_0x586ad4[_0xdf03ab]['item']['name'],_0x586ad4[_0xdf03ab]['item']['getAttributes']());_0x29e529[0x0]['_appendChild'](_0x31a6e3),_0x3e87c3['push'](0x0),_0x29e529['unshift'](_0x31a6e3),_0x586ad4[_0xdf03ab]['nextPosition']=_0x133e2d['createPositionFromPath'](_0x2bc151,_0x3e87c3);}else'elementEnd'===_0x586ad4[_0xdf03ab]['type']?(_0x29e529['shift'](),_0x586ad4[_0xdf03ab]['previousPosition']=_0x133e2d['createPositionFromPath'](_0x2bc151,_0x3e87c3),_0x3e87c3['pop'](),_0x3e87c3[_0x3e87c3['length']-0x1]++,_0x586ad4[_0xdf03ab]['nextPosition']=_0x133e2d['createPositionFromPath'](_0x2bc151,_0x3e87c3)):(_0x586ad4[_0xdf03ab]['previousPosition']=_0x133e2d['createPositionFromPath'](_0x2bc151,_0x3e87c3),_0x51f577?_0x51f577['_data']+=_0x586ad4[_0xdf03ab]['item']['data']:_0x51f577=new gt(_0x586ad4[_0xdf03ab]['item']['data'],_0x586ad4[_0xdf03ab]['item']['getAttributes']()),_0x586ad4[_0xdf03ab+0x1]&&'text'===_0x586ad4[_0xdf03ab+0x1]['type']&&_0x3b47dd(_0x51f577,_0x586ad4[_0xdf03ab+0x1]['item'])||(_0x29e529[0x0]['_appendChild'](_0x51f577),_0x51f577=null),_0x3e87c3[_0x3e87c3['length']-0x1]+=_0x586ad4[_0xdf03ab]['item']['offsetSize'],_0x586ad4[_0xdf03ab]['nextPosition']=_0x133e2d['createPositionFromPath'](_0x2bc151,_0x3e87c3));for(let _0x8d9fba=0x0;_0x8d9fba<_0x586ad4['length'];_0x8d9fba++){const _0x1d3a8e=_0x586ad4[_0x8d9fba]['previousPosition'],_0x5d9556=_0x586ad4[_0x8d9fba]['nextPosition'];for(const _0x422ca2 of _0x586ad4[_0x8d9fba]['markersStart'])_0x52327a['set'](_0x422ca2,{'start':_0x1d3a8e,'end':null});_0x5afdd3('isRemoveSuggestion',_0x8d9fba,_0x1d3a8e,_0x5d9556),_0x5afdd3('isAddSuggestion',_0x8d9fba,_0x1d3a8e,_0x5d9556),_0x5afdd3('isRemoved',_0x8d9fba,_0x1d3a8e,_0x5d9556),_0x5afdd3('isAdded',_0x8d9fba,_0x1d3a8e,_0x5d9556);for(const _0x16a3cc of _0x586ad4[_0x8d9fba]['markersEnd']){const _0x45a08a=_0x52327a['get'](_0x16a3cc);_0x45a08a?_0x45a08a['end']=_0x5d9556:_0x52327a['set'](_0x16a3cc,{'start':_0x5d9556,'end':_0x5d9556});}}for(const [_0xea534c,_0x378a88]of _0x52327a){const _0x374e8f=this['editor']['model']['createRange'](_0x378a88['start'],_0x378a88['end']);_0x2bc151['markers']['set'](_0xea534c,_0x374e8f);}return _0x756955['sort']((_0x564592,_0x4f1ee9)=>{const _0x3a8367=_0x2bc151['markers']['get']('revision:'+_0x564592['id']),_0x151e40=_0x2bc151['markers']['get']('revision:'+_0x4f1ee9['id']);return _0x3a8367['start']['isBefore'](_0x151e40['start'])?-0x1:_0x3a8367['start']['isAfter'](_0x151e40['start'])?0x1:_0x3a8367['end']['isBefore'](_0x151e40['end'])?-0x1:_0x3a8367['end']['isAfter'](_0x151e40['end'])?0x1:'add'===_0x564592['type']?-0x1:0x1;}),{'root':_0x2bc151,'changes':_0x756955};function _0x5afdd3(_0x47e01e,_0x2b2b8b,_0x297599,_0x47a45){const _0x222aef=!!_0x586ad4[_0x2b2b8b][_0x47e01e],_0x38b149=_0x222aef?_0x586ad4[_0x2b2b8b][_0x47e01e]['userId']:null,_0x1b6843=_0x2b2b8b===_0x586ad4['length']-0x1,_0x2bd470=_0x39f630[_0x47e01e][0x0],_0x55d3ee=_0x390608['isObject'](_0x586ad4[_0x2b2b8b]['item']);!_0xb4e324[_0x47e01e]&&_0x222aef?_0xb4e324[_0x47e01e]={'start':_0x297599,'tapeItem':_0x586ad4[_0x2b2b8b],'userId':_0x38b149,'type':_0x47e01e}:_0xb4e324[_0x47e01e]&&!_0x222aef?(_0xb4e324[_0x47e01e]['end']=_0x297599,_0x479b77(_0xb4e324[_0x47e01e]),_0xb4e324[_0x47e01e]=null):_0xb4e324[_0x47e01e]&&_0x222aef&&_0xb4e324[_0x47e01e]['userId']!==_0x38b149&&(_0xb4e324[_0x47e01e]['end']=_0x297599,_0x2bd470&&_0x2bd470['userId']===_0xb4e324[_0x47e01e]['userId']||_0x479b77(_0xb4e324[_0x47e01e]),_0xb4e324[_0x47e01e]={'start':_0x297599,'tapeItem':_0x586ad4[_0x2b2b8b],'userId':_0x38b149,'type':_0x47e01e}),_0xb4e324[_0x47e01e]&&_0x55d3ee&&('elementStart'!==_0x586ad4[_0x2b2b8b]['type']||_0x2bd470&&_0x2bd470['userId']===_0x38b149||_0x39f630[_0x47e01e]['unshift']({'userId':_0x38b149,'object':_0x586ad4[_0x2b2b8b]['item'],'change':_0xb4e324[_0x47e01e]}),'elementEnd'===_0x586ad4[_0x2b2b8b]['type']&&_0x2bd470&&_0x2bd470['object']===_0x586ad4[_0x2b2b8b]['item']&&(_0x39f630[_0x47e01e]['shift'](),_0xb4e324[_0x47e01e]=_0x2bd470['change'])),_0xb4e324[_0x47e01e]&&_0x1b6843&&(_0xb4e324[_0x47e01e]['end']=_0x47a45,_0x479b77(_0xb4e324[_0x47e01e]),_0xb4e324[_0x47e01e]=null);}function _0x479b77({start:_0xd646d5,end:_0x464540,tapeItem:_0x15300a,userId:_0x29721a,type:_0x33c5d5}){const _0x382dd1=_0x15300a['item'],_0x13c163=_0x133e2d['schema']['isBlock'](_0x382dd1)&&!_0x133e2d['schema']['isLimit'](_0x382dd1),_0x24405a=_0xd646d5['nodeAfter']==_0x464540['parent']&&_0x464540['isAtStart'];if(_0x13c163&&_0x24405a)return;const _0x38c2be=_0x133e2d['createRange'](_0xd646d5,_0x464540),_0x1ed700=_0x31283c['get'](_0x29721a),_0x811cf9=new r({'author':_0x1ed700,'type':'isAdded'==_0x33c5d5||'isAddSuggestion'==_0x33c5d5?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x33c5d5||'isRemoveSuggestion'==_0x33c5d5},'createdAt':new Date(),'rootName':_0x3d71e9});_0x756955['push'](_0x811cf9),_0x2bc151['markers']['set']('revision:'+_0x811cf9['id'],_0x38c2be);}function _0x3b47dd(_0x387b17,_0x5d327c){const _0x147bd8=_0x387b17['getAttributes'](),_0x57609d=_0x5d327c['getAttributes']();for(const _0x50cb72 of _0x147bd8){if(_0x50cb72[0x1]!==_0x5d327c['getAttribute'](_0x50cb72[0x0]))return!0x1;_0x57609d['next']();}return _0x57609d['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1243d7=>{const _0x3f308e=_0x1243d7['markerName']['split'](':')[0x1],_0x49f9c6=this['_getChangeFromId'](_0x3f308e);if(!_0x49f9c6)return null;const _0x5980e2='add'==_0x49f9c6['type']?'insertion':'deletion',_0x43f701=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5980e2];return _0x49f9c6['data']['isSuggestion']&&_0x43f701['push']('ck-suggestion-marker-'+_0x5980e2+'-new'),this['activeChange']==_0x49f9c6&&_0x43f701['push']('ck-suggestion-marker--active'),{'classes':_0x43f701,'attributes':{'data-change-id':_0x3f308e}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x442209=>{_0x442209['on']('element:pre',(_0x578bca,_0x52bbcd,_0xe5257a)=>{const _0x185e2b=_0x52bbcd['viewItem']['getChild'](0x0);if(!_0x185e2b||!_0x185e2b['is']('element','code'))return;if(!_0xe5257a['consumable']['consume'](_0x185e2b,{'attributes':['vid_start','vid_end']}))return;const _0x143f9a=_0x52bbcd['modelRange']['start']['nodeAfter'];_0xe5257a['writer']['setAttribute']('vid_start',_0x185e2b['getAttribute']('vid_start'),_0x143f9a),_0xe5257a['writer']['setAttribute']('vid_end',_0x185e2b['getAttribute']('vid_end'),_0x143f9a);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x2a996c=>{_0x2a996c['on']('element',(_0x861303,_0x3a1091,_0x2467af)=>{if(!_0x2467af['consumable']['consume'](_0x3a1091['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3a1091['modelRange']['isCollapsed'])return;const _0x200e8d=_0x3a1091['modelRange']['start']['nodeAfter'];_0x200e8d['hasAttribute']('vid_start')||_0x200e8d['hasAttribute']('vid')||(_0x2467af['writer']['setAttribute']('vid_start',_0x3a1091['viewItem']['getAttribute']('vid_start'),_0x200e8d),_0x2467af['writer']['setAttribute']('vid_end',_0x3a1091['viewItem']['getAttribute']('vid_end'),_0x200e8d));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x13b56d=>_0x13b56d['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x527ee9,[,_0x39c8ff])=>{['vid_start','vid_end','vid']['includes'](_0x39c8ff)&&(_0x527ee9['return']=!0x0,_0x527ee9['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5dabb0=>{_0x5dabb0['on']('attribute:vid',(_0xf810a4,_0x50ea76,_0x11b7b1)=>{if('\x20'!=_0x50ea76['item']['data']||_0x50ea76['item']['parent']['maxOffset']>0x1)return;if(!_0x11b7b1['consumable']['consume'](_0x50ea76['item'],_0xf810a4['name']))return;const _0x112e7e=_0x11b7b1['writer'],_0x2c81c5=_0x11b7b1['mapper']['toViewRange'](_0x50ea76['range']);_0x112e7e['wrap'](_0x2c81c5,_0x112e7e['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x43453a){const _0x444ea4=_0x43453a['plugins']['get']('RevisionViewer');return(_0x4b3a6b,_0xa1b0b8,_0x4643e5)=>{const _0x746e5c=_0xa1b0b8['markerName']['split'](':')[0x1],_0x5b5689=_0x444ea4['_getChangeFromId'](_0x746e5c);if(!_0x5b5689)return null;const _0x5bd1ae='add'==_0x5b5689['type']?'split':'merge';if(!_0x4643e5['consumable']['test'](_0xa1b0b8['markerRange'],_0x4b3a6b['name']))return;const _0x1f9ed4=_0xa1b0b8['markerRange']['getWalker'](),_0x579d28=_0xa1b0b8['markerRange']['start'],_0x1cac4f=_0x43453a['model']['schema'];let _0x32213d=null,_0x331575=null,_0x2c98f3=!0x1,_0x359708=!0x1;for(const _0x3ed4a0 of _0x1f9ed4){const _0x301392=_0x3ed4a0['item'];_0x2c98f3=_0x2c98f3||_0x1cac4f['isContent'](_0x301392);const _0x4115ea=_0x4643e5['mapper']['toViewElement'](_0x301392);if(_0x4115ea&&_0x4115ea['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3ed4a0['type']&&(_0x1cac4f['isBlock'](_0x301392)&&!_0x1cac4f['isLimit'](_0x301392)&&(_0x301392['nextSibling']||_0x579d28['isAtEnd']?_0x32213d&&_0x32213d['parent']==_0x301392||(_0x32213d=_0x301392,_0x444fa0(_0x3ed4a0['previousPosition']),_0x359708=!0x0):_0x331575=_0x331575||_0x3ed4a0['previousPosition']));}function _0x444fa0(_0x4b5758){const _0x56c8d8=_0x4643e5['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5bd1ae}),_0x496117=_0x4643e5['mapper']['toViewPosition'](_0x4b5758);_0x5b5689['data']['isSuggestion']&&_0x4643e5['writer']['addClass']('ck-suggestion-marker-'+_0x5bd1ae+'-new',_0x56c8d8),_0x444ea4['activeChange']==_0x5b5689&&_0x4643e5['writer']['addClass']('ck-suggestion-marker--active',_0x56c8d8),_0x4643e5['writer']['insert'](_0x496117,_0x56c8d8),_0x4643e5['mapper']['bindElementToMarker'](_0x56c8d8,_0xa1b0b8['markerName']);}_0x2c98f3||_0x359708||!_0x331575||_0x444fa0(_0x331575);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x215915,_0x2c5a8f,_0x2e7785)=>{const _0x550de4=_0x2e7785['mapper']['markerNameToElements'](_0x2c5a8f['markerName']);if(_0x550de4){for(const _0x225274 of _0x550de4)(_0x225274['hasClass']('ck-suggestion-marker-split')||_0x225274['hasClass']('ck-suggestion-marker-merge'))&&(_0x2e7785['mapper']['unbindElementFromMarkerName'](_0x225274,_0x2c5a8f['markerName']),_0x2e7785['writer']['remove'](_0x225274));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0xc40bfb,_0x57750b,_0x300ced)=>{const _0x363308=_0x57750b['markerName']['split'](':')[0x1],_0x36a254=this['_getChangeFromId'](_0x363308);if(!_0x36a254)return null;const _0xefba80='add'==_0x36a254['type']?'split':'merge';if(_0x300ced['consumable']['test'](_0x57750b['markerRange'],_0xc40bfb['name']))for(const _0x26711e of _0x57750b['markerRange']['getItems']()){if(!_0x26711e['is']('element','softBreak'))continue;const _0x653204=_0x300ced['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xefba80}),_0x380061=_0x300ced['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x26711e));_0x36a254['data']['isSuggestion']&&_0x300ced['writer']['addClass']('ck-suggestion-marker-'+_0xefba80+'-new',_0x653204),this['activeChange']==_0x36a254&&_0x300ced['writer']['addClass']('ck-suggestion-marker--active',_0x653204),_0x300ced['writer']['insert'](_0x380061,_0x653204),_0x300ced['mapper']['bindElementToMarker'](_0x653204,_0x57750b['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x16585c=>{for(const _0x202c39 of this['editor']['model']['document']['getRootNames']()){const _0x5cdb40=this['editor']['model']['document']['getRoot'](_0x202c39),_0x20e578=this['editor']['editing']['view']['document']['getRoot'](_0x202c39);if(_0x20e578){const _0x283fbf=_0x5cdb40['getAttribute']('revisionHistoryAttachChange');if(_0x16585c['removeAttribute']('data-change-id',_0x20e578),_0x16585c['removeClass']('ck-revision-history-root-add',_0x20e578),_0x16585c['removeClass']('ck-revision-history-root-remove',_0x20e578),_0x16585c['removeClass']('ck-revision-history-root--active',_0x20e578),_0x283fbf){const _0x19f477=this['_getChangeFromId'](_0x283fbf);if(!_0x19f477)return null;_0x16585c['setAttribute']('data-change-id',_0x283fbf,_0x20e578),_0x16585c['addClass']('ck-revision-history-root-'+_0x19f477['type'],_0x20e578),this['activeChange']==_0x19f477&&_0x16585c['addClass']('ck-revision-history-root--active',_0x20e578);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x24545b=>'revision-comment:'+_0x24545b,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2d8aa3=>'revision-suggestion:'+_0x2d8aa3,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x491236=>({'name':'suggestion:'+_0x491236,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x458467=>{const _0x4517b4=_0x458467['markerName']['split'](':')[0x1];return'insertion'!=_0x4517b4&&'deletion'!=_0x4517b4?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4517b4]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',X(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',X(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0xfcb6a0,_0x27263c,_0x4bf9e1)=>{const _0x467dc4=_0x4bf9e1['mapper']['markerNameToElements'](_0x27263c['markerName']);if(_0x467dc4){for(const _0x2f0047 of _0x467dc4)_0x2f0047['is']('uiElement')&&(_0x4bf9e1['mapper']['unbindElementFromMarkerName'](_0x2f0047,_0x27263c['markerName']),_0x4bf9e1['writer']['remove'](_0x2f0047));}},{'priority':'high'});}['_getChangeFromId'](_0x2ee9d2){return this['_changeIdToChange']['get'](_0x2ee9d2);}['_getViewForChange'](_0x1e9373){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x1e9373),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4d6bae,_0x27d0f0,_0x209218,_0x5d50a0)=>{_0x5d50a0&&this['_balloon']['remove'](_0x5d50a0),_0x209218&&(this['_balloon']['add']({'view':_0x209218,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x50a1d1=this['editor']['editing'],_0x1c5455=this['_getChangeFromId'](_0x209218['changeId']);let _0x4b9343;if(_0x1c5455['data']['isOnRoot']){const _0x513ba3=_0x50a1d1['view']['getDomRoot'](_0x1c5455['rootName']);_0x4b9343=Array['from'](_0x513ba3['getClientRects']());}else{const _0x163e6d=this['editor']['model']['markers']['get']('revision:'+_0x209218['changeId']);_0x4b9343=Array['from'](_0x50a1d1['mapper']['markerNameToElements'](_0x163e6d['name']))['map'](_0xe612e6=>_0x50a1d1['view']['domConverter']['mapViewToDom'](_0xe612e6))['map'](_0x113c31=>Array['from'](_0x113c31['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x4b9343[0x0];return _0x4b9343['find'](_0x1aeb7f=>_0x1aeb7f['top']-0x3<=this['_activeViewTarget']['y']&&_0x1aeb7f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1aeb7f['left']-0x3<=this['_activeViewTarget']['x']&&_0x1aeb7f['right']+0x3>=this['_activeViewTarget']['x'])||_0x4b9343[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x8b9185,_0x2d5e81,_0x29b983,_0x47c389)=>{this['activeView']=_0x29b983?this['_getViewForChange'](_0x29b983):null,this['editor']['model']['change'](()=>{const _0x346ded=this['editor']['editing'];_0x47c389&&(_0x47c389['data']['isOnRoot']?_0x346ded['view']['change'](_0xaa1b1b=>{_0xaa1b1b['removeClass']('ck-revision-history-root--active',_0x346ded['view']['document']['getRoot'](_0x47c389['rootName']));}):_0x346ded['reconvertMarker']('revision:'+_0x47c389['id'])),_0x29b983&&(_0x29b983['data']['isOnRoot']?_0x346ded['view']['change'](_0x46fd2b=>{_0x46fd2b['addClass']('ck-revision-history-root--active',_0x346ded['view']['document']['getRoot'](_0x29b983['rootName']));}):_0x346ded['reconvertMarker']('revision:'+_0x29b983['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x2b1cb0,_0x206189)=>{if(this['activeChange'])return;const _0x2b667a=this['_findChangeIdFromDomTarget'](_0x206189['target']),_0x2cdca8=this['_changeIdToChange']['get'](_0x2b667a);_0x2cdca8?(this['_activeViewTarget']={'x':_0x206189['domEvent']['x'],'y':_0x206189['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x2cdca8)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x58b16c,_0x533c05)=>{const _0x514dd8=this['_findChangeIdFromDomTarget'](_0x533c05['target']),_0x54c04f=this['_changeIdToChange']['get'](_0x514dd8);_0x54c04f?(this['_activeViewTarget']={'x':_0x533c05['domEvent']['x'],'y':_0x533c05['domEvent']['y']},_0x54c04f===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x54c04f):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x483246){do{const _0x3a0d52=_0x483246['getAttribute']('data-change-id');if(_0x3a0d52)return _0x3a0d52;_0x483246=_0x483246['parent'];}while(_0x483246);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0xe143c6=>{for(const _0x2e3ad6 of this['editor']['model']['markers'])_0xe143c6['removeMarker'](_0x2e3ad6);});}}function X(_0x7c3378,_0xf90b9b){return(_0x5eb228,_0x52d9b0,_0x22c1a0)=>{if(!_0x22c1a0['consumable']['test'](_0x52d9b0['markerRange'],_0x5eb228['name']))return;const _0x45a792=_0x52d9b0['markerRange']['getWalker'](),_0x3546a1=_0x52d9b0['markerRange']['start'],_0x442f6a=_0x7c3378['model']['schema'];let _0x262a1d=null,_0x371d3b=null,_0xdfd38e=!0x1,_0x4b9d88=!0x1;for(const _0x4e74fd of _0x45a792){const _0x4c06e7=_0x4e74fd['item'];_0xdfd38e=_0xdfd38e||_0x442f6a['isContent'](_0x4c06e7);const _0x147408=_0x22c1a0['mapper']['toViewElement'](_0x4c06e7);if(_0x147408&&_0x147408['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4e74fd['type']&&(_0x442f6a['isBlock'](_0x4c06e7)&&!_0x442f6a['isLimit'](_0x4c06e7)&&(_0x4c06e7['nextSibling']||_0x3546a1['isAtEnd']?_0x262a1d&&_0x262a1d['parent']==_0x4c06e7||(_0x262a1d=_0x4c06e7,_0x37bd1e(_0x4e74fd['previousPosition']),_0x4b9d88=!0x0):_0x371d3b=_0x371d3b||_0x4e74fd['previousPosition']));}function _0x37bd1e(_0x3c4997){const _0x410f90=_0x22c1a0['mapper']['toViewPosition'](_0x3c4997),_0x27d5d2=_0x22c1a0['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xf90b9b});_0x22c1a0['writer']['insert'](_0x410f90,_0x27d5d2),_0x22c1a0['mapper']['bindElementToMarker'](_0x27d5d2,_0x52d9b0['markerName']);}_0xdfd38e||_0x4b9d88||!_0x371d3b||_0x37bd1e(_0x371d3b);};}class mt extends _0x5a96ec{constructor(_0x4296fa){super(_0x4296fa);const _0x574817=_0x4296fa['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x574817,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x574817,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x772c31=this['editor'],_0x2c532c=_0x772c31['plugins']['get'](m),_0x415ff9=_0x2c532c['isReady']?_0x2c532c['diff']['newRevisionId']:null;_0x772c31['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x415ff9);}['refresh'](){const {isReady:_0x3d39d3,isEnabled:_0x261fcb,repository:_0x9e79b3,diff:_0x1cc73b}=this['editor']['plugins']['get'](m),_0x497be3=_0x1cc73b&&_0x9e79b3['getLaterVisibleRevision'](_0x1cc73b['newRevisionId']);this['isEnabled']=_0x3d39d3&&_0x261fcb&&Boolean(_0x497be3);}}class wt extends _0x5a96ec{['_step'];constructor(_0x4659f7,{direction:_0x488bd1}){super(_0x4659f7);const _0x4b5b11=_0x4659f7['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x488bd1?0x1:-0x1,this['listenTo'](_0x4b5b11,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4b5b11,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x4b5b11,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x23f5ca=this['editor'],_0x2df641=_0x23f5ca['plugins']['get'](m),{isNavigationMode:_0x240984,currentChangeNumber:_0x790bd5}=_0x2df641;let _0x1a2336;if(_0x2df641['activeChange']=_0x240984?_0x2df641['diff']['changes']['get'](_0x790bd5+this['_step']):_0x2df641['diff']['changes']['first'],_0x2df641['activeChange']['data']['isOnRoot'])_0x1a2336=_0x23f5ca['editing']['view']['getDomRoot'](_0x2df641['activeChange']['rootName']);else{const _0x5eddea=_0x23f5ca['model']['markers']['get']('revision:'+_0x2df641['activeChange']['id']);_0x1a2336=_0x9249c1(_0x23f5ca['editing'],_0x5eddea);}_0x2d24ed({'target':_0x1a2336,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x2e7044,currentChangeNumber:_0x46c334,numberOfChanges:_0x45511f,isReady:_0x333e7b,isEnabled:_0x3d16c8}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x3d16c8&&_0x333e7b&&_0x45511f)&&(!_0x2e7044||(0x1===this['_step']?_0x46c334<_0x45511f-0x1:_0x46c334>0x0));}}class _i extends ts{constructor(_0x154890){super(_0x154890);const _0x383711=this['bindTemplate'],_0x4fe374=new te(_0x154890),_0x1c48ec=new te(_0x154890);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',(_0x2ff0ba,_0x5dd0d7)=>_0x2ff0ba&&_0x5dd0d7>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4c401a,_0x2f2eb0,_0x28b5a6,_0x424308)=>{if(!_0x4c401a)return g(_0x154890,'Loading...');if(!_0x28b5a6)return g(_0x154890,'No\x20changes');const _0x56b7b2=g(_0x154890,'NUMBER_OF_CHANGES',_0x28b5a6);return _0x424308?g(_0x154890,'X_OF_Y_CHANGES',[_0x2f2eb0+0x1,_0x28b5a6]):_0x56b7b2;}),_0x4fe374['set']({'label':g(_0x154890,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x24917}),_0x1c48ec['set']({'label':g(_0x154890,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x536269}),_0x4fe374['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1c48ec['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x4fe374['on']('execute',()=>this['fire']('execute','backward')),_0x1c48ec['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',_0x383711['if']('_isStatusLabelVisible','ck-hidden',_0x55ae62=>!_0x55ae62)]},'children':[{'text':_0x383711['to']('isNavigationMode',_0x1c6e80=>_0x1c6e80?g(_0x154890,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x154890,'Total')+':\x20')}]},{'text':_0x383711['to']('_statusText')}]},new _0x263769(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x4fe374,_0x1c48ec]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x506da8{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5e45b2=this['editor']['editing']['view'];_0x5e45b2['change'](_0x434a17=>{for(const _0x2bb782 of _0x5e45b2['document']['roots'])_0x434a17['addClass'](le,_0x2bb782);});}['hide'](){const _0x12818f=this['editor']['editing']['view'];_0x12818f['change'](_0x27ceff=>{for(const _0x4296e7 of _0x12818f['document']['roots'])_0x27ceff['removeClass'](le,_0x4296e7);});}}class R extends _0x506da8{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,ge];}['init'](){const _0x573b04=this['editor'],_0x42d16f=_0x573b04['plugins']['get'](m),_0xa5b586=_0x573b04['plugins']['get'](ge);_0x573b04['ui']['componentFactory']['add']('exitToEditing',_0x3f3f4d=>{const _0x4f3815=new te(_0x3f3f4d);return _0x4f3815['set']({'label':g(_0x3f3f4d,'Back\x20to\x20editing'),'icon':_0x5ec9a1,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x4f3815,'execute',()=>{_0x573b04['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x4f3815;}),_0x573b04['ui']['componentFactory']['add']('restoreRevision',_0x5a125d=>{const _0x4c3060=new te(_0x5a125d);return _0x4c3060['set']({'label':g(_0x5a125d,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4c3060['bind']('isEnabled')['to'](_0x573b04['commands']['get']('restoreRevision')),this['listenTo'](_0x4c3060,'execute',()=>_0x573b04['execute']('restoreRevision')),_0x4c3060;}),_0x573b04['ui']['componentFactory']['add']('changesNavigation',_0x4630e3=>{const _0xc3e755=new _i(_0x4630e3),_0x11010d=_0x573b04['commands']['get']('showPreviousChange'),_0x110757=_0x573b04['commands']['get']('showNextChange');return _0xc3e755['bind']('isBackwardNavigationEnabled')['to'](_0x11010d,'isEnabled'),_0xc3e755['bind']('isForwardNavigationEnabled')['to'](_0x110757,'isEnabled'),_0xc3e755['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x42d16f),this['listenTo'](_0xc3e755,'execute',(_0x21e146,_0x337f31)=>{_0x573b04['execute']('forward'===_0x337f31?'showNextChange':'showPreviousChange');}),_0xc3e755;}),_0xa5b586['show'](),_0x42d16f['on']('change:isReady',(_0x2284e2,_0x407eae,_0x651a1a)=>{_0x651a1a?_0xa5b586['hide']():_0xa5b586['show']();});}}class at extends _0xc22ea8{['_resizeObserver']=null;constructor(_0x2d31da,_0x5b5d77){super(_0x2d31da,_0x5b5d77);const _0x26ad97=this['bindTemplate'];this['set']({'label':g(_0x2d31da,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x2d31da,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x26ad97['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new nt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x50bfa1=this['fieldView']['element'];this['_tooltipString']=_0x50bfa1['scrollWidth']>_0x50bfa1['clientWidth']&&_0x50bfa1['value']||'';}}class si extends ts{constructor(_0x5e5fbc,_0x4ed461,_0x25479a){super(_0x5e5fbc);const _0x45991d=new _0x5353e5();_0x45991d['set']({'content':_0x2cb2bd,'viewBox':'0\x200\x2011\x2010'});const _0xfcc353=['ck','ck-revision-history-sidebar__revision-author'];_0x25479a&&_0xfcc353['push']('ck-revision-history-sidebar__revision-author_creator');const _0x2f36bf=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x5e5fbc,_0x25479a?'Revision\x20creator':'Revision\x20author')},'children':[_0x45991d,_0x4ed461['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xfcc353},'children':_0x2f36bf});}}function oi(_0x35aebd,_0x58f1e0){const _0x377ad3=_0x35aebd['bindTemplate'],_0x5aa742=_0x35aebd['locale'],_0xe6055a=_0x418de7(_0x5aa742);_0xe6055a['panelPosition']='sw';const _0x59c240=function(_0x1736fb,_0x463a19){const _0x493f5f=function(_0x1e148b,_0x2a0ed5){const _0x4dfc25=_0x1e148b['locale'],_0x5c9d7d={'Compare\x20against\x20selected':g(_0x4dfc25,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x4dfc25,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x4dfc25,'Restore\x20this\x20revision')};return _0x2a0ed5['map'](_0xd854bd=>{const _0x5b9103=_0x5c9d7d[_0xd854bd['name']];return _0x5b9103&&_0x5b9103!==_0xd854bd['name']&&(_0xd854bd['name']=_0x5b9103),_0xd854bd;});}(_0x1736fb,_0x463a19),_0x121b75=new _0x2f6a5b();for(const _0x57ca8a of _0x493f5f){const _0x36348f={'type':'button','model':new to({'label':_0x57ca8a['name'],'class':_0x57ca8a['class'],'withText':!0x0,'role':'menuitem','_action':_0x57ca8a['action']})};_0x36348f['model']['bind']('isEnabled')['to'](_0x1736fb,'isActionsDropdownOpen',_0x3597c5=>'function'!=typeof _0x57ca8a['isEnabled']||(!_0x3597c5||_0x57ca8a['isEnabled'](_0x1736fb))),_0x121b75['add'](_0x36348f);}return _0x121b75;}(_0x35aebd,_0x58f1e0);return _0x35aebd['bind']('isActionsDropdownOpen')['to'](_0xe6055a,'isOpen'),_0xe6055a['buttonView']['set']({'label':g(_0x5aa742,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x916b6a}),_0xe6055a['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x377ad3['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x377ad3['to'](_0xb76451=>_0xb76451['stopPropagation']())}}),_0xe6055a['on']('execute',_0x40c6b3=>{_0x35aebd['isReady']&&'function'==typeof _0x40c6b3['source']['_action']&&_0x40c6b3['source']['_action'](_0x35aebd);}),_0xd53a08(_0xe6055a,_0x59c240,{'role':'menu'}),_0xe6055a['listenTo'](_0x35aebd,'change:isActionsDropdownOpen',(_0x39aded,_0x47433e,_0x29a691)=>{if(_0x29a691)for(const _0x5a42d9 of _0xe6055a['listView']['items']){const _0x405636=_0x5a42d9['children']['first'],_0x116d97=_0x58f1e0['find'](_0x1e2a0e=>_0x1e2a0e['action']===_0x405636['_action'])['isVisible'];_0x5a42d9['isVisible']=void 0x0===_0x116d97||_0x116d97(_0x35aebd);}}),_0xe6055a;}class hi extends/* #__PURE__ -- @preserve */
|
|
26
|
+
ti(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x585f92,_0x3d34d6,_0xeaf407,_0x299c93){super(_0x585f92);const _0x540423=this['bindTemplate'],_0x2a461e=function(_0x39a1db,_0x31d8d8){const _0x273892=Array['from'](_0x31d8d8['authors'])['filter'](_0x7c87c8=>_0x7c87c8!=_0x31d8d8['creator']);return _0x31d8d8['creator']&&_0x273892['unshift'](_0x31d8d8['creator']),_0x273892['map'](_0x207588=>new si(_0x39a1db,_0x207588,_0x207588==_0x31d8d8['creator']));}(_0x585f92,_0x3d34d6);this['id']=_0x3d34d6['id'],this['_revision']=_0x3d34d6,this['_requireRevisionName']=_0x299c93,this['bind']('name','createdAt')['to'](_0x3d34d6),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x499dbe=>{return _0x5ca37e=_0x585f92['uiLanguage'],(_0x2a36f7=_0x499dbe)['toLocaleDateString'](_0x5ca37e,{'month':'long','day':'numeric'})+',\x20'+_0x2a36f7['toLocaleTimeString'](_0x5ca37e,{'hour':'numeric','minute':'numeric'});var _0x5ca37e,_0x2a36f7;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new at(_0x585f92,_0x34f747),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3a8ed1=>_0x3a8ed1||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x5820ec,_0x5b0ed1)=>_0x5820ec&&_0x5b0ed1),this['revisionActionsView']=_0xeaf407&&_0xeaf407['length']?oi(this,_0xeaf407):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x540423['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x540423['if']('isEnabled','ck-disabled',_0xcf2941=>!_0xcf2941),_0x540423['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x540423['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x540423['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':_0x540423['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':_0x2a461e}]},this['revisionActionsView']],'on':{'click':_0x540423['to'](_0x2618b6=>{_0x2618b6['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x33689f=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x33689f,'change',()=>{this['_requireRevisionName']&&!_0x33689f['value']||this['fire']('setName',{'id':this['id'],'name':_0x33689f['value']}),_0x33689f['value']||(_0x33689f['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ai(_0x1f8fd3,_0x33418d){const _0x747f28=_0xd936a['fromJSDate'](_0x1f8fd3)['setLocale'](_0x33418d),_0x3f83b7=_0xd936a['local'](),_0xe2658c=_0x3f83b7['minus']({'days':0x1})['startOf']('day');let _0x3250cc,_0x3da3ad;return _0x747f28['hasSame'](_0x3f83b7,'day')?(_0x3250cc=_0x747f28['startOf']('day')['toJSDate'](),_0x3da3ad=_0x747f28['toRelativeCalendar']()):_0x747f28['hasSame'](_0xe2658c,'day')?(_0x3250cc=_0xe2658c['toJSDate'](),_0x3da3ad=_0x747f28['toRelativeCalendar']()):_0x747f28['hasSame'](_0x3f83b7,'week')?(_0x3250cc=_0x747f28['startOf']('week')['toJSDate'](),_0x3da3ad=_0x747f28['weekdayLong']||''):_0x747f28['hasSame'](_0x3f83b7,'year')?(_0x3250cc=_0x747f28['startOf']('month')['toJSDate'](),_0x3da3ad=_0x747f28['monthLong']||''):(_0x3250cc=_0x747f28['startOf']('year')['toJSDate'](),_0x3da3ad=String(_0x747f28['year'])),{'startDate':_0x3250cc,'localizedPeriodName':_0x3da3ad};}class di extends ts{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x598265,_0x2ce355,_0x14d874,_0x2aad5b){super(_0x598265);const _0x3414d8=ai(_0x2ce355,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x2ce355,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x14d874,this['_requireRevisionName']=_0x2aad5b,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':_0x3414d8}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x150949){const _0x2b9591=new hi(this['locale'],_0x150949,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x2b9591);}['removeRevision'](_0x45120f){const _0x42b959=this['revisionViews']['find'](_0x25282c=>_0x25282c['id']===_0x45120f['id']);this['revisionViews']['remove'](_0x42b959);}}class as extends ts{constructor(_0x54a562){super(_0x54a562);const _0x1c54c3=new _0x5353e5();_0x1c54c3['content']=_0x5606df,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x1c54c3,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x54a562,'Revision\x20history')]}]});}}class ni extends ts{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x278908,_0x459903,_0x47397a,_0x558760){super(_0x278908);const _0x388e32=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x459903,this['_revisionActions']=_0x47397a,this['_requireRevisionName']=_0x558760,this['on']('select',(_0xb77ab9,_0x2d273f)=>{this['fire']('revisionSelected',_0x2d273f);}),this['on']('setName',(_0x4e6dd6,_0x24db34)=>{this['fire']('revisionSetName',_0x24db34);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x278908),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x388e32['if']('isEnabled','ck-disabled',_0x141e2f=>!_0x141e2f)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x1020cc of this['_revisions'])this['_addRevision'](_0x1020cc);this['_revisions']['on']('add',(_0x563427,_0x2bcbc3)=>{this['_addRevision'](_0x2bcbc3);}),this['_revisions']['on']('remove',(_0x3ee154,_0x20bc9b)=>{this['_removeRevision'](_0x20bc9b);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x495879=>_0x495879['revisionViews']['map'](_0x431563=>_0x431563))['flat']();}['selectRevision'](_0x5dcab1){for(const _0x25a18a of this['revisionViews'])_0x5dcab1&&_0x5dcab1['id']===_0x25a18a['id']?_0x25a18a['select']():_0x25a18a['deselect']();}['highlightRevisions'](_0x49125a){for(const _0x270546 of this['revisionViews'])_0x49125a['some'](({id:_0x12dd5b})=>_0x12dd5b===_0x270546['id'])?_0x270546['highlight']():_0x270546['unhighlight']();}['_addRevision'](_0x4c8db0){const _0x210bb4=ai(_0x4c8db0['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x351d14=this['timePeriodViews']['get'](0x0);_0x351d14&&_0x351d14['startDate']['getTime']()===_0x210bb4['getTime']()||(_0x351d14=new di(this['locale'],_0x210bb4,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x351d14)),_0x351d14['addRevision'](_0x4c8db0);}['_removeRevision'](_0x1789d0){const _0x1f6c36=ai(_0x1789d0['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x1f6c36)['removeRevision'](_0x1789d0);}['_getTimePeriodViewByStartDate'](_0x4c7d34){return this['timePeriodViews']['find'](_0x4fd49e=>_0x4fd49e['startDate']['getTime']()===_0x4c7d34['getTime']());}}class d extends _0x506da8{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
|
|
29
|
-
_0x348b46(_0x5829a0){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x3a0e26,_0xe6e1d3){super(_0xe6e1d3),this['sourceElement']=_0x3a0e26,this['model']['document']['createRoot']();const _0x5bfa45=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x5bfa45);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x5b8452,_0x2df789){const _0x42e5dd=new this(_0x5b8452,_0x2df789);return await _0x42e5dd['initPlugins'](),await _0x42e5dd['ui']['init'](_0x5b8452),await _0x42e5dd['data']['init'](_0x42e5dd['config']['get']('initialData')||''),_0x42e5dd['fire']('ready'),_0x42e5dd;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x388832{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x352a3e){function _0x4bab3c(_0x160d8b){return _0x160d8b['map'](_0xb686af=>String['fromCharCode'](_0xb686af))['join']('');}super(_0x352a3e),this['result']='end',_0x352a3e[_0x4bab3c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4bab3c([0x76,0x69,0x65,0x77])][_0x4bab3c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4bab3c([0x61,0x75,0x74,0x6f]),_0x352a3e[_0x4bab3c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4bab3c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4bab3c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4bab3c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4bab3c([0x6f,0x6b])});}}class k extends _0x388832{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x2cf1c8){if(super(_0x2cf1c8),!this['editor']['config']['get']('revisionHistory'))throw new _0x3fa4ea('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x12b85e=>this['_showRevisionViewer']({..._0x12b85e,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x23a3fe=>this['_closeRevisionViewer'](_0x23a3fe)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x38f659=>this['_restoreRevision'](_0x38f659)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x1fc289){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x1fc289;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x54e880){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x54e880);}['getRevision'](_0x449844){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x449844);}['getRevisions'](_0x49e08b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x49e08b||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x2ec686=this['editor'],_0x1cb43e=_0x49df15(_0x2ec686,p),_0x4b2107=_0x2ec686['plugins']['get']('RevisionTracker'),_0x2bf40e=_0x2ec686['plugins']['get']('Users')['users'];return _0x1cb43e['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1cb43e['lazyRoots'],(_0x1cb43e['plugins']['push'](yt,m,R,class extends _0x388832{static get['requires'](){return[m,'Users'];}['init'](){const _0x46de22=this['editor']['plugins']['get']('Users');for(const _0x5e519e of _0x2bf40e)_0x5e519e['isAnonymous']||_0x46de22['getUser'](_0x5e519e['id'])||_0x46de22['addUser'](_0x5e519e);const _0x82f167=_0x4b2107['repository']['getRevisions']();let _0x28899b=null;const _0x4caec3=this['editor']['plugins']['get']('RevisionViewer');_0x4caec3['adapter']=_0x4b2107['adapter'],_0x4caec3['bind']('isEnabled')['to'](_0x4b2107),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x2ec686,'isReadOnly',_0x46b1d8=>!_0x46b1d8);for(const _0x4dac5b of _0x82f167){const _0x3bdd54=null===_0x4dac5b['creator'];if(_0x3bdd54&&_0x4dac5b['toVersion']===_0x4dac5b['fromVersion'])continue;const _0xd3834a=_0x4dac5b['toJSON']();_0x4caec3['addRevisionData'](_0xd3834a,(_0x7adaab,_0x4d923b,_0x1ce8d6)=>{if(_0x3bdd54){if(_0x28899b)_0x28899b['_update'](_0x7adaab,_0x4d923b);else{if(!_0x4d923b){const _0x542b9f=_0x1ce8d6['toJSON']();_0x542b9f['id']=_0x581a69(),_0x4b2107['saveRevision'](_0x542b9f,_0x1ce8d6['toVersion'])['then'](_0x5ad580=>{_0x28899b=_0x5ad580;});}}}else _0x4dac5b['_update'](_0x7adaab,_0x4d923b);});}}},d),_0x1cb43e);}['_enhanceShowRevisionViewerCallback'](){const _0x3afff3=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x1c0906=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x247fe7=this['editor']['plugins']['get']('Autosave');await _0x247fe7['save']();}else await _0x1c0906['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x3850d2=this['editor']['plugins']['get']('Dialog');_0x3850d2['isOpen']&&_0x3850d2['hide']();}const _0x5d382b=this['_getRevisionViewerEditorConfig']();return _0x3afff3(_0x5d382b)['then'](_0x34b255=>{return(this['_viewerEditor']=_0x34b255,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'),_0x34b255);})['catch'](_0xf58eec=>(console['error'](_0xf58eec),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x232e92=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x232e92(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x507fd2=this['editor']['plugins']['get']('Annotations');_0x507fd2['refreshVisibility'](),_0x507fd2['refreshPositioning']();}})));}['_showRevisionViewer'](_0x4a8512){const _0x3c0711=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x30268b=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x5bd419=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x5bd419,_0x4a8512)['then'](_0x6e1a77=>(_0x30268b['style']['display']='block',_0x3c0711['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x6e1a77));}['_closeRevisionViewer'](_0xad78db){const _0x4f442a=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x4f442a['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xad78db['destroy']();}async['_restoreRevision'](_0x41f9ba){const _0x57343b=this['editor'],_0x41d10e=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x469fc0=_0x57343b['plugins']['get']('RevisionTracker'),_0x511cdf=_0x57343b['plugins']['get']('RevisionHistoryUtils'),_0x3299db=_0x41d10e['repository']['getRevision'](_0x41f9ba);let _0x44930a,_0x3c7ac7,_0x23d909;try{await _0x511cdf['loadRevisionData'](_0x3299db,this['adapter']),_0x44930a=_0x511cdf['getRevisionDocumentData'](_0x3299db),_0x3c7ac7=_0x511cdf['getRevisionRootsAttributes'](_0x3299db);}catch(_0x189355){return void console['error'](_0x189355);}_0x57343b['model']['change'](_0x228bdb=>{for(const _0x522db0 of Array['from'](_0x57343b['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x228bdb['removeMarker'](_0x522db0);}),_0x41d10e['isReady']=!0x1,_0x57343b['model']['enqueueChange'](_0x55a2cb=>{_0x55a2cb['setSelection'](null),_0x55a2cb['removeSelectionAttribute'](_0x57343b['model']['document']['selection']['getAttributeKeys']());const _0x74e74d=Object['keys'](_0x44930a);for(const _0x136158 of _0x57343b['model']['document']['roots'])'$graveyard'!=_0x136158['rootName']&&_0x136158['isAttached']()&&!_0x74e74d['includes'](_0x136158['rootName'])&&_0x55a2cb['detachRoot'](_0x136158);for(const _0x4deb17 of _0x74e74d){let _0x2e6add=_0x57343b['model']['document']['getRoot'](_0x4deb17);_0x2e6add&&_0x2e6add['isAttached']()||(_0x2e6add=_0x55a2cb['addRoot'](_0x4deb17));const _0x4ac8bc=_0x3c7ac7[_0x4deb17],_0x46ede3=Object['keys'](_0x4ac8bc),_0x46895e=_0x44930a[_0x4deb17];for(const _0x4aec3a of _0x2e6add['getAttributeKeys']())_0x46ede3['includes'](_0x4aec3a)||_0x55a2cb['removeAttribute'](_0x4aec3a,_0x2e6add);for(const _0xe60b59 of _0x46ede3)_0x55a2cb['setAttribute'](_0xe60b59,_0x3c7ac7[_0x4deb17][_0xe60b59],_0x2e6add);_0x55a2cb['remove'](_0x55a2cb['createRangeIn'](_0x2e6add)),_0x55a2cb['insert'](_0x57343b['data']['parse'](_0x46895e,_0x2e6add),_0x2e6add,0x0);}});const _0xbd6c1f=g(_0x57343b['locale'],'Restored');if(_0x3299db['name'])_0x23d909=-0x1==_0x3299db['name']['indexOf'](_0xbd6c1f)?_0xbd6c1f+':\x20'+_0x3299db['name']:_0x3299db['name'];else _0x23d909=_0xbd6c1f+':\x20'+(_0x3299db['createdAt']['toLocaleDateString'](_0x57343b['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3299db['createdAt']['toLocaleTimeString'](_0x57343b['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x469fc0['saveRevision']({'name':_0x23d909}),_0x41d10e['isReady']=!0x0,_0x57343b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,V as RevisionHistoryUtils,u as RevisionTracker,m as RevisionViewer,w as RevisionViewerEditor,le as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};
|
|
28
|
+
pt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(_0x2f6c9c){super(_0x2f6c9c),this['_revisionViewer']=_0x2f6c9c['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x273b80=this['_revisionsRepository']['_revisions'],_0x59bb54=this['_createRevisionActions'](),_0x1252b4=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ni(this['editor']['locale'],_0x273b80,_0x59bb54,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',(_0xa4332d,_0x4524cb)=>{_0x4524cb['revisionViews']['on']('add',(_0x5c0b49,_0x121653)=>{_0x121653['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)),_0x1252b4['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x29118f=this['_revisionsRepository']['getRevision'](0x0);if(_0x29118f){const _0x50692e=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x29118f['id']);this['_revisionViewer']['compare'](_0x29118f,_0x50692e);}}['_handleRevisionSelected'](_0x4c3ce6,_0x23daa1){const _0x24abb7=this['_revisionsRepository']['getRevision'](_0x23daa1['id']),_0x4636c8=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x24abb7['id']);this['_revisionViewer']['compare'](_0x24abb7,_0x4636c8);}['_handleRevisionSetName'](_0x1fc15a,_0xe19e3c){this['_revisionsRepository']['getRevision'](_0xe19e3c['id'])['setName'](_0xe19e3c['name']);}['_handleDiffChange'](_0x2fbcf8,_0x572c46,_0x213267){const _0x3eed93=this['_revisionsRepository']['getRevisionsInDiff'](_0x213267);_0x3eed93['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x3eed93),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x3eed93[0x0]));}['_createRevisionActions'](){const _0x3ee0f6=this['editor'],_0x3b5c62=d['availableRevisionActions'],_0x35f98a=_0x3ee0f6['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x35f98a['length'])return _0x35f98a['map'](_0x8cf68c=>{const _0x5bf216='string'==typeof _0x8cf68c?Object['assign']({},_0x3b5c62[_0x8cf68c]):_0x8cf68c;return _0x5bf216['action']=_0x5bf216['action']['bind'](this,_0x3ee0f6),_0x5bf216['isVisible']&&(_0x5bf216['isVisible']=_0x5bf216['isVisible']['bind'](this,_0x3ee0f6)),_0x5bf216;});}}function pt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x5ab3a2},_0x5ee93)=>{const _0x788e5=_0x5ab3a2['get'](m),_0x2a422f=_0x788e5['repository'];let _0x48cfaf=_0x788e5['diff']['newRevisionId'],_0x9acdd4=_0x5ee93['id'];_0x2a422f['getIndex'](_0x48cfaf)>_0x2a422f['getIndex'](_0x9acdd4)&&([_0x48cfaf,_0x9acdd4]=[_0x9acdd4,_0x48cfaf]),_0x788e5['compare'](_0x48cfaf,_0x9acdd4);},'isVisible':({plugins:_0x56a1b5},_0x2d3d36)=>{const _0x68d592=_0x56a1b5['get'](m);return!(_0x68d592['repository']['getRevisionsInDiff'](_0x68d592['diff'])['length']>0x2)&&!_0x2d3d36['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x5bd3a7,{id:_0x368a4f})=>{_0x5bd3a7['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x368a4f);},'isVisible':({plugins:_0x277929},_0x338614)=>!!_0x277929['get'](m)['repository']['getLaterVisibleRevision'](_0x338614['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x2b158e},{id:_0x2904dd,revisionNameView:_0x46a415})=>{const _0x25e292=_0x2b158e['get'](m),_0x4d6267=_0x25e292['repository']['getEarlierVisibleRevision'](_0x2904dd);_0x25e292['compare'](_0x2904dd,_0x4d6267),_0x46a415['focus'](),_0x46a415['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x59d3e3,_0x2caf58){super(_0x59d3e3),this['_view']=_0x2caf58,this['_toolbarConfig']=et(_0x59d3e3['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x59afef){const _0x4aa2de=this['editor'],_0x4d039b=this['view'],_0x2ec597=_0x4aa2de['editing']['view'],_0x2316b8=_0x4d039b['editable'],_0x3da480=_0x2ec597['document']['getRoot']();_0x2316b8['name']=_0x3da480['rootName'],_0x4d039b['render']();const _0x516b47=_0x2316b8['element'];this['setEditableElement'](_0x2316b8['name'],_0x516b47),_0x4d039b['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2ec597['attachDomRoot'](_0x516b47),this['_elementReplacer']['replace'](_0x59afef,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x34f555=this['view'],_0x4c9ec4=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4c9ec4['detachDomRoot'](_0x34f555['editable']['name']),_0x34f555['destroy']();}['_initToolbar'](){const _0x4f4824=this['view'];_0x4f4824['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x4f4824['stickyPanel']['limiterElement']=_0x4f4824['element'],_0x4f4824['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x7f619b})=>_0x7f619b),_0x4f4824['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x4f4824['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x506e30,_0x3bda42,_0xbc6f71={}){super(_0x506e30),this['stickyPanel']=new ht(_0x506e30),this['toolbar']=new dt(_0x506e30,{'shouldGroupWhenFull':_0xbc6f71['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x506e30,_0x3bda42);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class w extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0xbeea5a(_0x3dfc7f){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1474b7,_0x3c06ce){super(_0x3c06ce),this['sourceElement']=_0x1474b7,this['model']['document']['createRoot']();const _0x48a714=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x48a714);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x49eabf,_0x4f8b61){const _0x20a9c8=new this(_0x49eabf,_0x4f8b61);return await _0x20a9c8['initPlugins'](),await _0x20a9c8['ui']['init'](_0x49eabf),await _0x20a9c8['data']['init'](_0x20a9c8['config']['get']('initialData')||''),_0x20a9c8['fire']('ready'),_0x20a9c8;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class _t extends _0x506da8{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xb45747){function _0xed1cbf(_0x258024){return _0x258024['map'](_0x595074=>String['fromCharCode'](_0x595074))['join']('');}super(_0xb45747),this['result']='end',_0xb45747[_0xed1cbf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xed1cbf([0x76,0x69,0x65,0x77])][_0xed1cbf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xed1cbf([0x61,0x75,0x74,0x6f]),_0xb45747[_0xed1cbf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xed1cbf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xed1cbf([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xed1cbf([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xed1cbf([0x6f,0x6b])});}}class k extends _0x506da8{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x31c655){if(super(_0x31c655),!this['editor']['config']['get']('revisionHistory'))throw new _0xe12093('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xd53261=>this['_showRevisionViewer']({..._0xd53261,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1ad3f6=>this['_closeRevisionViewer'](_0x1ad3f6)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x381ec9=>this['_restoreRevision'](_0x381ec9)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x14494b){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x14494b;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x481f67){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x481f67);}['getRevision'](_0x3caad6){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3caad6);}['getRevisions'](_0x3253f1){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3253f1||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x74e1f3=this['editor'],_0x40307=_0x2e9595(_0x74e1f3,p),_0x56fc38=_0x74e1f3['plugins']['get']('RevisionTracker'),_0x49fa2f=_0x74e1f3['plugins']['get']('Users')['users'];return _0x40307['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x40307['lazyRoots'],(_0x40307['plugins']['push'](_t,m,R,class extends _0x506da8{static get['requires'](){return[m,'Users'];}['init'](){const _0x5eab95=this['editor']['plugins']['get']('Users');for(const _0x368ad9 of _0x49fa2f)_0x368ad9['isAnonymous']||_0x5eab95['getUser'](_0x368ad9['id'])||_0x5eab95['addUser'](_0x368ad9);const _0x1cc9dc=_0x56fc38['repository']['getRevisions']();let _0xce30ea=null;const _0x2bda01=this['editor']['plugins']['get']('RevisionViewer');_0x2bda01['adapter']=_0x56fc38['adapter'],_0x2bda01['bind']('isEnabled')['to'](_0x56fc38),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x74e1f3,'isReadOnly',_0x58f7fa=>!_0x58f7fa);for(const _0x196137 of _0x1cc9dc){const _0x144eb2=null===_0x196137['creator'];if(_0x144eb2&&_0x196137['toVersion']===_0x196137['fromVersion'])continue;const _0x2d4271=_0x196137['toJSON']();_0x2bda01['addRevisionData'](_0x2d4271,(_0x26e884,_0x10a6f0,_0x2223ee)=>{if(_0x144eb2){if(_0xce30ea)_0xce30ea['_update'](_0x26e884,_0x10a6f0);else{if(!_0x10a6f0){const _0x5e1dc4=_0x2223ee['toJSON']();_0x5e1dc4['id']=_0x2a811c(),_0x56fc38['saveRevision'](_0x5e1dc4,_0x2223ee['toVersion'])['then'](_0x5b0331=>{_0xce30ea=_0x5b0331;});}}}else _0x196137['_update'](_0x26e884,_0x10a6f0);});}}},d),_0x40307);}['_enhanceShowRevisionViewerCallback'](){const _0x534b03=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x545dca=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x46baa3=this['editor']['plugins']['get']('Autosave');await _0x46baa3['save']();}else await _0x545dca['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x22aa81=this['editor']['plugins']['get']('Dialog');_0x22aa81['isOpen']&&_0x22aa81['hide']();}const _0x119594=this['_getRevisionViewerEditorConfig']();return _0x534b03(_0x119594)['then'](_0x3f01a0=>{return(this['_viewerEditor']=_0x3f01a0,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'),_0x3f01a0);})['catch'](_0x9d878f=>(console['error'](_0x9d878f),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x2a3bcd=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x2a3bcd(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x548502=this['editor']['plugins']['get']('Annotations');_0x548502['refreshVisibility'](),_0x548502['refreshPositioning']();}})));}['_showRevisionViewer'](_0x4f0e68){const _0x2b8855=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x212d6b=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2e67f5=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x2e67f5,_0x4f0e68)['then'](_0x20e56b=>(_0x212d6b['style']['display']='block',_0x2b8855['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x20e56b));}['_closeRevisionViewer'](_0x5c9c15){const _0x33fa03=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x33fa03['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x5c9c15['destroy']();}async['_restoreRevision'](_0x733a86){const _0x3d85a8=this['editor'],_0x2a7557=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x4fe61e=_0x3d85a8['plugins']['get']('RevisionTracker'),_0x349a08=_0x3d85a8['plugins']['get']('RevisionHistoryUtils'),_0x4805b9=_0x2a7557['repository']['getRevision'](_0x733a86);let _0x3b5b5e,_0x54ec64,_0x4133bd;try{await _0x349a08['loadRevisionData'](_0x4805b9,this['adapter']),_0x3b5b5e=_0x349a08['getRevisionDocumentData'](_0x4805b9),_0x54ec64=_0x349a08['getRevisionRootsAttributes'](_0x4805b9);}catch(_0x191f2a){return void console['error'](_0x191f2a);}_0x3d85a8['model']['change'](_0x341d08=>{for(const _0x2d3211 of Array['from'](_0x3d85a8['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x341d08['removeMarker'](_0x2d3211);}),_0x2a7557['isReady']=!0x1,_0x3d85a8['model']['enqueueChange'](_0x25e0b3=>{_0x25e0b3['setSelection'](null),_0x25e0b3['removeSelectionAttribute'](_0x3d85a8['model']['document']['selection']['getAttributeKeys']());const _0x5c9df3=Object['keys'](_0x3b5b5e);for(const _0x1d90a9 of _0x3d85a8['model']['document']['roots'])'$graveyard'!=_0x1d90a9['rootName']&&_0x1d90a9['isAttached']()&&!_0x5c9df3['includes'](_0x1d90a9['rootName'])&&_0x25e0b3['detachRoot'](_0x1d90a9);for(const _0x8c4cd7 of _0x5c9df3){let _0x5b2cbe=_0x3d85a8['model']['document']['getRoot'](_0x8c4cd7);_0x5b2cbe&&_0x5b2cbe['isAttached']()||(_0x5b2cbe=_0x25e0b3['addRoot'](_0x8c4cd7));const _0x4ec23f=_0x54ec64[_0x8c4cd7],_0x12a754=Object['keys'](_0x4ec23f),_0x17fb28=_0x3b5b5e[_0x8c4cd7];for(const _0x4ad8a0 of _0x5b2cbe['getAttributeKeys']())_0x12a754['includes'](_0x4ad8a0)||_0x25e0b3['removeAttribute'](_0x4ad8a0,_0x5b2cbe);for(const _0x27bab4 of _0x12a754)_0x25e0b3['setAttribute'](_0x27bab4,_0x54ec64[_0x8c4cd7][_0x27bab4],_0x5b2cbe);_0x25e0b3['remove'](_0x25e0b3['createRangeIn'](_0x5b2cbe)),_0x25e0b3['insert'](_0x3d85a8['data']['parse'](_0x17fb28,_0x5b2cbe),_0x5b2cbe,0x0);}});const _0x4341b9=g(_0x3d85a8['locale'],'Restored');if(_0x4805b9['name'])_0x4133bd=-0x1==_0x4805b9['name']['indexOf'](_0x4341b9)?_0x4341b9+':\x20'+_0x4805b9['name']:_0x4805b9['name'];else _0x4133bd=_0x4341b9+':\x20'+(_0x4805b9['createdAt']['toLocaleDateString'](_0x3d85a8['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4805b9['createdAt']['toLocaleTimeString'](_0x3d85a8['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x4fe61e['saveRevision']({'name':_0x4133bd}),_0x2a7557['isReady']=!0x0,_0x3d85a8['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,V as RevisionHistoryUtils,u as RevisionTracker,m as RevisionViewer,w as RevisionViewerEditor,ge as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};
|