@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250530.0 → 0.0.0-nightly-20250601.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/dist/index.js +6 -6
- package/package.json +11 -11
- package/src/revisionsrepository.js +1 -1
- package/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
|
-
_0x4c4bcc(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x4caf7c){super(),this['id']=_0x4caf7c['id']||_0x40eb95(),this['creator']=_0x4caf7c['creator']||null,this['authors']=_0x4caf7c['authors']||[],this['diffData']=_0x4caf7c['diffData']||null,this['toVersion']=_0x4caf7c['toVersion']||0x0,this['fromVersion']=_0x4caf7c['fromVersion']||0x0,this['set']('name',_0x4caf7c['name']||''),this['set']('createdAt',_0x4caf7c['createdAt']||new Date()),this['set']('attributes',_0x4caf7c['attributes']||{});}['setName'](_0x2539e6){this['_update']({'name':_0x2539e6});}['setAttribute'](_0x220176,_0x4b7fe9){const _0x449e48=_0x186736(this['attributes']);_0x1d01fa(_0x449e48,_0x220176,_0x4b7fe9),this['_update']({'attributes':_0x449e48});}['removeAttribute'](_0x13e872){const _0x4a967b=_0x186736(this['attributes']);_0x19ada6(_0x4a967b,_0x13e872),this['_update']({'attributes':_0x4a967b});}['_update'](_0xd2dd1f,_0x2113e7=!0x1){let _0x201416=!0x1;const _0x1c80b6={'id':this['id']},_0x125515=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0xb9d99e of _0x125515){const _0x3ea52f=_0xd2dd1f[_0xb9d99e];void 0x0!==_0x3ea52f&&_0x3ea52f!==this[_0xb9d99e]&&(this[_0xb9d99e]=_0x3ea52f,_0x1c80b6[_0xb9d99e]=_0x3ea52f,_0x201416=!0x0);}_0x201416&&(_0x1c80b6['authors']&&(_0x1c80b6['authorsIds']=_0x1c80b6['authors']['map'](_0x2a6eaa=>_0x2a6eaa['id']),delete _0x1c80b6['authors']),this['fire']('_update',_0x1c80b6,_0x2113e7));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x107dfc=>_0x107dfc['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x46f453{['_revisions'];static get['requires'](){return[_0x2e21a7];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0xdb0cf6){super(_0xdb0cf6),this['_revisions']=new _0xd190b7();}['afterInit'](){!async function(_0x42fe93){const _0x344e3d=_0x3bbeb2([0x55,0x38,0x75,0x67,0x46,0x73,0x63,0x6d,0x41,0x58,0x53,0x44,0x6a,0x74,0x4c,0x35,0x39,0x65,0x49,0x31,0x4d,0x4b,0x79,0x69,0x42,0x6e,0x30,0x70,0x52,0x56,0x77,0x6f,0x51,0x34,0x37,0x72,0x57,0x4f,0x4e,0x7a,0x61,0x62,0x50,0x59,0x54,0x64,0x5a,0x48,0x33,0x36,0x43,0x68,0x78,0x76,0x66,0x45,0x32,0x71,0x6b,0x4a,0x47,0x6c]),_0xf07e60=0xeb829,_0xe66cf9=0x7ced501f,_0x37fdfc=0x7cea394f^_0xe66cf9,_0x4640f5=window[_0x3bbeb2([0x44,0x61,0x74,0x65])][_0x3bbeb2([0x6e,0x6f,0x77])](),_0x18c6d5=_0x42fe93[_0x3bbeb2([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x40ad45=new window[(_0x3bbeb2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58bfb6=>{_0x18c6d5[_0x3bbeb2([0x6f,0x6e,0x63,0x65])](_0x3bbeb2([0x72,0x65,0x61,0x64,0x79]),_0x58bfb6);}),_0x4da0ac={[_0x3bbeb2([0x6b,0x74,0x79])]:_0x3bbeb2([0x45,0x43]),[_0x3bbeb2([0x75,0x73,0x65])]:_0x3bbeb2([0x73,0x69,0x67]),[_0x3bbeb2([0x63,0x72,0x76])]:_0x3bbeb2([0x50,0x2d,0x32,0x35,0x36]),[_0x3bbeb2([0x78])]:_0x3bbeb2([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]),[_0x3bbeb2([0x79])]:_0x3bbeb2([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]),[_0x3bbeb2([0x61,0x6c,0x67])]:_0x3bbeb2([0x45,0x53,0x32,0x35,0x36])},_0x2ea2e0=_0x18c6d5[_0x3bbeb2([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3bbeb2([0x67,0x65,0x74])](_0x3bbeb2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1cc837(){let _0x298102,_0x4b063a=null,_0x2a3c35=null;try{if(_0x2ea2e0==_0x3bbeb2([0x47,0x50,0x4c]))return _0x3bbeb2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x298102=_0x379474(),!_0x298102)return _0x3bbeb2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x298102[_0x3bbeb2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2a3c35=_0x2959c5(_0x298102[_0x3bbeb2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x298102[_0x3bbeb2([0x6a,0x74,0x69])])),await _0x61547c()?_0x34f2ad()?_0x458593()?_0x3bbeb2([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2fd67()?(_0x298102[_0x3bbeb2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3bbeb2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4b063a=_0x10bc24(_0x3bbeb2([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x298102[_0x3bbeb2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3bbeb2([0x74,0x72,0x69,0x61,0x6c])&&(_0x4b063a=_0x10bc24(_0x3bbeb2([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x39cd34()):_0x3bbeb2([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3bbeb2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3bbeb2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3bbeb2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x458593(){const _0x12bffd=[_0x3bbeb2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3bbeb2([0x74,0x72,0x69,0x61,0x6c])][_0x3bbeb2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x298102[_0x3bbeb2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4640f5/0x3e8:0xe10*_0x37fdfc;return _0x298102[_0x3bbeb2([0x65,0x78,0x70])]<_0x12bffd;}function _0x34f2ad(){const _0x311a73=_0x298102[_0x3bbeb2([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x311a73)return!0x1;if(_0x311a73[_0x3bbeb2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bbeb2([0x2a])))return!0x0;if(_0x311a73[_0x3bbeb2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bbeb2([0x52,0x48])))return!0x0;if(_0x311a73[_0x3bbeb2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bbeb2([0x52,0x52,0x48]))){if(_0x386a21())return!0x0;if(_0x1a52e5()||_0x275e81())return!0x0;}return!0x1;}function _0x2fd67(){const _0xe2e26e=_0x298102[_0x3bbeb2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xe2e26e||0x0==_0xe2e26e[_0x3bbeb2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xe0cf5}=new URL(window[_0x3bbeb2([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xe2e26e[_0x3bbeb2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe0cf5))return!0x0;const _0x3aa2a3=_0xe0cf5[_0x3bbeb2([0x73,0x70,0x6c,0x69,0x74])](_0x3bbeb2([0x2e]));return _0xe2e26e[_0x3bbeb2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x21c196=>_0x21c196[_0x3bbeb2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bbeb2([0x2a])))[_0x3bbeb2([0x6d,0x61,0x70])](_0xe48d1a=>_0xe48d1a[_0x3bbeb2([0x73,0x70,0x6c,0x69,0x74])](_0x3bbeb2([0x2e])))[_0x3bbeb2([0x73,0x6f,0x6d,0x65])](_0x487e4f=>_0x3aa2a3[_0x3bbeb2([0x65,0x76,0x65,0x72,0x79])]((_0x7bea70,_0x356fc9)=>_0x487e4f[_0x356fc9]===_0x7bea70||_0x487e4f[_0x356fc9]===_0x3bbeb2([0x2a])));}function _0x39cd34(){return _0x4b063a&&_0x2a3c35?new window[(_0x3bbeb2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5f941e,_0x496b12)=>{_0x4b063a[_0x3bbeb2([0x74,0x68,0x65,0x6e])](_0x5f941e,_0x496b12),_0x2a3c35[_0x3bbeb2([0x74,0x68,0x65,0x6e])](_0x378c0a=>{_0x378c0a!=_0x3bbeb2([0x56,0x61,0x6c,0x69,0x64])&&_0x5f941e(_0x378c0a);},_0x496b12);}):_0x4b063a||_0x2a3c35||_0x3bbeb2([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2959c5(_0x566f40,_0x5b0f9b){return new window[(_0x3bbeb2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2249e4=>{if(_0x4845bf())return _0x2249e4(_0x3bbeb2([0x56,0x61,0x6c,0x69,0x64]));_0x124ce0(),_0x18c6d5[_0x3bbeb2([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3bbeb2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x543b6e=!0x1;const _0x749f27=_0x40eb95();function _0x974933(_0x5e0745){return!!_0x5e0745&&(typeof _0x5e0745===_0x3bbeb2([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5e0745===_0x3bbeb2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5e0745[_0x3bbeb2([0x74,0x68,0x65,0x6e])]===_0x3bbeb2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5e0745[_0x3bbeb2([0x63,0x61,0x74,0x63,0x68])]===_0x3bbeb2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x495225(_0x56669a){_0x289a3d(_0x56669a)[_0x3bbeb2([0x74,0x68,0x65,0x6e])](_0x45e1c8=>{if(!_0x45e1c8||_0x45e1c8[_0x3bbeb2([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3bbeb2([0x6f,0x6b]))return _0x3bbeb2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3d8ae5(_0x56e7b4(_0x749f27+_0x5b0f9b))!=_0x45e1c8[_0x3bbeb2([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3bbeb2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3bbeb2([0x56,0x61,0x6c,0x69,0x64]);})[_0x3bbeb2([0x74,0x68,0x65,0x6e])](_0x32b420=>(_0x413b0e(),_0x32b420),()=>{const _0x334150=_0x22251b();return null==_0x334150?(_0x413b0e(),_0x3bbeb2([0x56,0x61,0x6c,0x69,0x64])):_0x3bbeb2(_0x4640f5-_0x334150>(0x58e1d41f^_0xe66cf9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3bbeb2([0x74,0x68,0x65,0x6e])](_0x2249e4)[_0x3bbeb2([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2249e4(_0x3bbeb2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1016e5=0x7cdbbe9f^_0xe66cf9;function _0x413b0e(){const _0x117a8c=_0x3bbeb2([0x6c,0x6c,0x63,0x74,0x2d])+_0x3d8ae5(_0x56e7b4(_0x566f40)),_0x2994ff=_0x5941e6(_0x3d8ae5(window[_0x3bbeb2([0x4d,0x61,0x74,0x68])][_0x3bbeb2([0x63,0x65,0x69,0x6c])](_0x4640f5/_0x1016e5)));window[_0x3bbeb2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3bbeb2([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x117a8c,_0x2994ff);}function _0x22251b(){const _0x504fd0=_0x3bbeb2([0x6c,0x6c,0x63,0x74,0x2d])+_0x3d8ae5(_0x56e7b4(_0x566f40)),_0x43ee36=window[_0x3bbeb2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3bbeb2([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x504fd0);return _0x43ee36?window[_0x3bbeb2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5941e6(_0x43ee36),0x10)*_0x1016e5:null;}function _0x289a3d(_0x595d6d){return new window[(_0x3bbeb2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x24fd9c,_0x4924c5)=>{_0x595d6d[_0x3bbeb2([0x74,0x68,0x65,0x6e])](_0x24fd9c,_0x4924c5),window[_0x3bbeb2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4924c5,0x7cec84df^_0xe66cf9);});}}_0x18c6d5[_0x3bbeb2([0x6f,0x6e])](_0x3bbeb2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x335948,_0x1dccaf)=>{if(_0x1dccaf[0x0]!=_0x566f40)return _0x2249e4(_0x3bbeb2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1dccaf[0x1]={..._0x1dccaf[0x1],[_0x3bbeb2([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x749f27};},{[_0x3bbeb2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3bbeb2([0x68,0x69,0x67,0x68])}),_0x18c6d5[_0x3bbeb2([0x6f,0x6e])](_0x3bbeb2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x302d0a=>{_0x974933(_0x302d0a[_0x3bbeb2([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x543b6e=!0x0,_0x495225(_0x302d0a[_0x3bbeb2([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3bbeb2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3bbeb2([0x6c,0x6f,0x77])}),_0x40ad45[_0x3bbeb2([0x74,0x68,0x65,0x6e])](()=>{_0x543b6e||_0x2249e4(_0x3bbeb2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4845bf(){return _0x18c6d5[_0x3bbeb2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3bbeb2([0x76,0x69,0x65,0x77])][_0x3bbeb2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3bbeb2([0x61,0x75,0x74,0x6f]);}function _0x124ce0(){_0x18c6d5[_0x3bbeb2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3bbeb2([0x76,0x69,0x65,0x77])][_0x3bbeb2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3bbeb2([0x61,0x75,0x74,0x6f]);}}function _0x10bc24(_0x2e41dd){const _0x51139a=[new window[(_0x3bbeb2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4993ac=>setTimeout(_0x4993ac,0x7ce46ed3^_0xe66cf9)),_0x40ad45[_0x3bbeb2([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3bbeb2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1b0d2a=>{const _0x50c095=0x7ced5018^_0xe66cf9,_0xbc4b3b=_0x42fe93[_0x3bbeb2([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x67be1d(){_0xbc4b3b[_0x3bbeb2([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x50c095&&_0x1b0d2a();}_0x67be1d(),_0xbc4b3b[_0x3bbeb2([0x6f,0x6e])](_0x3bbeb2([0x61,0x64,0x64]),_0x67be1d);})),new window[(_0x3bbeb2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1eecf4=>{function _0x4fe479(){for(const _0x300037 in window)if(window[_0x3bbeb2([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x3bbeb2([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x300037))&&window[_0x300037]==_0xf07e60)return _0x1eecf4();_0x18c6d5[_0x3bbeb2([0x73,0x74,0x61,0x74,0x65])]!=_0x3bbeb2([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x3bbeb2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4fe479,0x7ced4397^_0xe66cf9);}_0x336807(_0x3bbeb2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x4fe479();})];return window[_0x3bbeb2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3bbeb2([0x72,0x61,0x63,0x65])](_0x51139a)[_0x3bbeb2([0x74,0x68,0x65,0x6e])](()=>_0x2e41dd);}async function _0x46f70b(){if(await _0x40ad45,_0x336807(_0x3bbeb2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x58c6b3=_0x42fe93[_0x3bbeb2([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x5533d9=_0x42fe93[_0x3bbeb2([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])](_0x58c6b3[_0x3bbeb2([0x69,0x64])]),_0x548b2d=_0x10edc2(_0x3bbeb2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x548b2d[_0x3bbeb2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x58c6b3['id'],_0x5533d9?_0x5533d9['id']:null,!0x0),_0x548b2d[_0x3bbeb2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3bbeb2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x548b2d[_0x3bbeb2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x548b2d[_0x3bbeb2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x405b24,void(_0x548b2d[_0x3bbeb2([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x405b24);}if(_0x336807(_0x3bbeb2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x55ff04=_0x10edc2(_0x3bbeb2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x55ff04[_0x3bbeb2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3bbeb2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x55ff04[_0x3bbeb2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x55ff04[_0x3bbeb2([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x405b24,_0x55ff04[_0x3bbeb2([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x405b24;}_0x18c6d5[_0x3bbeb2([0x6d,0x6f,0x64,0x65,0x6c])][_0x3bbeb2([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x405b24,_0x18c6d5[_0x3bbeb2([0x6d,0x6f,0x64,0x65,0x6c])][_0x3bbeb2([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x405b24,_0x18c6d5[_0x3bbeb2([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3bbeb2([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x386a21(){return _0x336807(_0x3bbeb2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x10edc2(_0x3bbeb2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3bbeb2([0x73,0x74,0x61,0x74,0x65])]==_0x3bbeb2([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1a52e5(){return _0x336807(_0x3bbeb2([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 _0x275e81(){return _0x336807(_0x3bbeb2([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x136d60(_0x33df72){const _0x52abd1=_0x25bdb1();_0x18c6d5[_0x52abd1]=_0x3bbeb2([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])+_0x33df72,_0x33df72[_0x3bbeb2([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x3bbeb2([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x25bdb1()]=_0xf07e60),_0x33df72!=_0x3bbeb2([0x56,0x61,0x6c,0x69,0x64])&&_0x46f70b();}function _0x25bdb1(){const _0xf65ef5=window[_0x3bbeb2([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3bbeb2([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3bbeb2([0x6e,0x6f,0x77])]())[_0x3bbeb2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3bbeb2([0x2e]),'');let _0x4f6449=_0x3bbeb2([0x55]);for(let _0x249db4=0x0;_0x249db4<_0xf65ef5[_0x3bbeb2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x249db4+=0x2){let _0x37503a=window[_0x3bbeb2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xf65ef5[_0x3bbeb2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x249db4,_0x249db4+0x2));_0x37503a>=_0x344e3d[_0x3bbeb2([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x37503a-=_0x344e3d[_0x3bbeb2([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4f6449+=_0x344e3d[_0x37503a];}return _0x4f6449;}function _0x379474(){const _0x1bae03=_0x2ea2e0[_0x3bbeb2([0x73,0x70,0x6c,0x69,0x74])](_0x3bbeb2([0x2e]));if(0x3!=_0x1bae03[_0x3bbeb2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4e6bb2(_0x1bae03[0x1]);function _0x4e6bb2(_0x1f55b2){const _0x3ffb76=_0x418ce6(_0x1f55b2);return _0x3ffb76&&_0x15c6da()?_0x3ffb76:null;function _0x15c6da(){const _0x46a7af=_0x3ffb76[_0x3bbeb2([0x6a,0x74,0x69])],_0x37c313=window[_0x3bbeb2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x46a7af[_0x3bbeb2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x46a7af[_0x3bbeb2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x95befa={..._0x3ffb76,[_0x3bbeb2([0x6a,0x74,0x69])]:_0x46a7af[_0x3bbeb2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x46a7af[_0x3bbeb2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x95befa[_0x3bbeb2([0x76,0x63])],_0x56e7b4(_0x95befa)==_0x37c313;}}}async function _0x61547c(){let _0x1cfc9b=!0x0;try{const _0x4a2e60=_0x2ea2e0[_0x3bbeb2([0x73,0x70,0x6c,0x69,0x74])](_0x3bbeb2([0x2e])),[_0x24759c,_0x16f178,_0x13c01e]=_0x4a2e60;return _0x3d1d20(_0x24759c),await _0x501b81(_0x24759c,_0x16f178,_0x13c01e),_0x1cfc9b;}catch{return!0x1;}function _0x3d1d20(_0x32a4a7){const _0x585187=_0x418ce6(_0x32a4a7);_0x585187&&_0x585187[_0x3bbeb2([0x61,0x6c,0x67])]==_0x3bbeb2([0x45,0x53,0x32,0x35,0x36])||(_0x1cfc9b=!0x1);}async function _0x501b81(_0x36ea81,_0x35487f,_0x4f1289){const _0x52ba33=window[_0x3bbeb2([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3bbeb2([0x66,0x72,0x6f,0x6d])](_0x22374a(_0x4f1289),_0x55774a=>_0x55774a[_0x3bbeb2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x10f57b=new window[(_0x3bbeb2([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3bbeb2([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x36ea81+_0x3bbeb2([0x2e])+_0x35487f),_0x54953f=window[_0x3bbeb2([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3bbeb2([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x54953f)return;const _0x46c671=await _0x54953f[_0x3bbeb2([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3bbeb2([0x6a,0x77,0x6b]),_0x4da0ac,{[_0x3bbeb2([0x6e,0x61,0x6d,0x65])]:_0x3bbeb2([0x45,0x43,0x44,0x53,0x41]),[_0x3bbeb2([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3bbeb2([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3bbeb2([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x54953f[_0x3bbeb2([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3bbeb2([0x6e,0x61,0x6d,0x65])]:_0x3bbeb2([0x45,0x43,0x44,0x53,0x41]),[_0x3bbeb2([0x68,0x61,0x73,0x68])]:{[_0x3bbeb2([0x6e,0x61,0x6d,0x65])]:_0x3bbeb2([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x46c671,_0x52ba33,_0x10f57b)||(_0x1cfc9b=!0x1);}}function _0x418ce6(_0xe7f211){return _0xe7f211[_0x3bbeb2([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3bbeb2([0x65,0x79]))?JSON[_0x3bbeb2([0x70,0x61,0x72,0x73,0x65])](_0x22374a(_0xe7f211)):null;}function _0x22374a(_0x2e1791){return window[_0x3bbeb2([0x61,0x74,0x6f,0x62])](_0x2e1791[_0x3bbeb2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3bbeb2([0x2b]))[_0x3bbeb2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3bbeb2([0x2f])));}function _0x56e7b4(_0x1adf80){let _0x19ee41=0x1505;function _0x3e1671(_0x4356a0){for(let _0x242308=0x0;_0x242308<_0x4356a0[_0x3bbeb2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x242308++){const _0x4e571d=_0x4356a0[_0x3bbeb2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x242308);_0x19ee41=(_0x19ee41<<0x5)+_0x19ee41+_0x4e571d,_0x19ee41&=_0x19ee41;}}function _0x54e502(_0x4acb40){Array[_0x3bbeb2([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4acb40)?_0x4acb40[_0x3bbeb2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x54e502):_0x4acb40&&typeof _0x4acb40==_0x3bbeb2([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3bbeb2([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4acb40)[_0x3bbeb2([0x73,0x6f,0x72,0x74])]()[_0x3bbeb2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x188ec7,_0x55f009])=>{_0x3e1671(_0x188ec7),_0x54e502(_0x55f009);}):_0x3e1671(window[_0x3bbeb2([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4acb40));}return _0x54e502(_0x1adf80),_0x19ee41>>>0x0;}function _0x3d8ae5(_0x127b66){return _0x127b66[_0x3bbeb2([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3bbeb2([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3bbeb2([0x30]));}function _0x5941e6(_0x1cd7b0){return _0x1cd7b0[_0x3bbeb2([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3bbeb2([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3bbeb2([0x6a,0x6f,0x69,0x6e])]('');}function _0x336807(_0x499503){return _0x18c6d5[_0x3bbeb2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3bbeb2([0x68,0x61,0x73])](_0x499503);}function _0x10edc2(_0x38fb39){return _0x18c6d5[_0x3bbeb2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3bbeb2([0x67,0x65,0x74])](_0x38fb39);}function _0x405b24(){}function _0x3bbeb2(_0x2e4ed2){return _0x2e4ed2['map'](_0x3bdbc1=>String['fromCharCode'](_0x3bdbc1))['join']('');}_0x136d60(await _0x1cc837());}(this);}['createRevision'](_0x86eb6e){const _0x391dab=this['editor']['plugins']['get']('Users');return new h({'id':_0x86eb6e['id'],'name':_0x86eb6e['name'],'creator':_0x86eb6e['creatorId']?_0x391dab['getUser'](_0x86eb6e['creatorId']):null,'diffData':_0x86eb6e['diffData']||_0x86eb6e['data'],'authors':_0x86eb6e['authorsIds']['map'](_0x4e0abc=>_0x391dab['getUser'](_0x4e0abc)),'createdAt':new Date(_0x86eb6e['createdAt']),'attributes':_0x86eb6e['attributes'],'fromVersion':_0x86eb6e['fromVersion'],'toVersion':_0x86eb6e['toVersion']});}['addRevision'](_0x509569,_0x2f611b=0x0){this['_revisions']['add'](_0x509569,_0x2f611b);}['getRevision'](_0x2c9c52){return this['_revisions']['get'](_0x2c9c52);}['getRevisions'](_0x95eb9e={'toJSON':!0x1}){const _0x12e74b=Array['from'](this['_revisions']);return _0x12e74b['reverse'](),_0x95eb9e['toJSON']?_0x12e74b['map'](_0x805e52=>_0x805e52['toJSON']()):_0x12e74b;}['getIndex'](_0x5a1840){return this['_revisions']['getIndex'](_0x5a1840);}['getEarlierVisibleRevision'](_0x30da45){const [,_0x1f2ade]=this['getRevisionsIterator'](_0x30da45,{'direction':'earlier'});return _0x1f2ade;}['getLaterVisibleRevision'](_0x3d87af){const [,_0x29668a]=this['getRevisionsIterator'](_0x3d87af,{'direction':'later'});return _0x29668a;}['getRevisionsInDiff'](_0x14be35){const _0x165fc9=[];for(const _0x2c0bf9 of this['getRevisionsIterator'](_0x14be35['newRevisionId']))if(_0x165fc9['push'](_0x2c0bf9),_0x2c0bf9['id']===_0x14be35['oldRevisionId'])break;return _0x165fc9;}*['getRevisionsIterator'](_0x5b22f,{direction:_0x24f190='earlier',filter:_0x4ff0f6=()=>!0x0}={}){const _0x23206d='earlier'===_0x24f190?0x1:-0x1;let _0x3b2dd8=this['_revisions']['get'](_0x5b22f),_0x187684=this['getIndex'](_0x3b2dd8);for(yield _0x3b2dd8;_0x3b2dd8;){if(_0x187684+=_0x23206d,_0x3b2dd8=this['getRevision'](_0x187684),!_0x3b2dd8)return;_0x4ff0f6(_0x3b2dd8)&&(yield _0x3b2dd8);}}}class V extends _0x46f453{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x40bc32,'c'],[_0x4b1895,'a'],[_0x48c5f3,'e'],[_0x7cf9af,'r'],[_0x573dd1,'u']]);['_typeCharToViewClass']=new Map([['c',_0x40bc32],['a',_0x4b1895],['e',_0x48c5f3],['r',_0x7cf9af],['u',_0x573dd1]]);async['loadRevisionData'](_0xd7f509,_0x31a883){if(_0xd7f509['diffData']||!_0x31a883)return;const _0xc84de1=this['editor']['config']['get']('collaboration.channelId'),_0x2dcf7d=await _0x31a883['getRevision']({'channelId':_0xc84de1,'revisionId':_0xd7f509['id']});_0xd7f509['diffData']=_0x2dcf7d['diffData'];}['getRevisionDocumentData'](_0x24679c){const _0x2f0a6d={};for(const _0x44f95e in _0x24679c['diffData']){if(_0x24679c['diffData'][_0x44f95e]['attachChange']&&!_0x24679c['diffData'][_0x44f95e]['attachChange']['isAttached'])continue;const _0x1e28d0=this['_removeRevisionMarkers'](JSON['parse'](_0x24679c['diffData'][_0x44f95e]['insertions'])),_0x5c3334=this['editor']['editing']['view']['document'],_0x1526b0=new _0xf61bc4(_0x5c3334,_0x1e28d0['map'](_0x5d8deb=>this['_getViewFromDiffObj'](_0x5d8deb,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x2f0a6d[_0x44f95e]=this['editor']['data']['processor']['toData'](_0x1526b0),this['editor']['data']['processor']['useFillerType']('default');}return _0x2f0a6d;}['getRevisionRootsAttributes'](_0x2efd62){const _0x32425c={};for(const _0x44e02b in _0x2efd62['diffData'])_0x2efd62['diffData'][_0x44e02b]['attachChange']&&!_0x2efd62['diffData'][_0x44e02b]['attachChange']['isAttached']||(_0x32425c[_0x44e02b]=_0x2efd62['diffData'][_0x44e02b]['attributesAfter']||{});return _0x32425c;}['_getTypeCharForViewElement'](_0x36252a){return this['_viewClassToTypeChar']['get'](_0x36252a['constructor']);}['_getViewFromDiffObj'](_0x17147d,_0x43a36a){const _0x5dba0b=this['editor']['editing']['view']['document'];if('string'==typeof _0x17147d)return new _0x165a8d(_0x5dba0b,_0x17147d);{let _0x51fd93,_0x2800b7;_0x2800b7='u'==_0x17147d['type']||'r'==_0x17147d['type']?[]:_0x17147d['children']['map'](_0x558f48=>this['_getViewFromDiffObj'](_0x558f48,_0x43a36a));const _0x1cf5ac=this['_typeCharToViewClass']['get'](_0x17147d['type'])||_0xf79cd4,_0x541a51=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x51fd93=new _0x1cf5ac(_0x5dba0b,_0x17147d['name'],_0x17147d['attributes'],_0x2800b7),'u'==_0x17147d['type']&&_0x17147d['children'][0x0]){const _0x1c3676=_0x17147d['children'][0x0];if(_0x51fd93['render']=function(_0x110d72){const _0x121fd0=_0x110d72['createElement']('div');return _0x121fd0['innerHTML']=_0x1c3676,_0x121fd0['childNodes'][0x0];},_0x43a36a){const _0x2da600=new _0xf61bc4(_0x5dba0b);_0x2da600['_appendChild'](_0x51fd93);const _0x139159=Array['from'](_0x541a51['viewChildrenToDom'](_0x2da600,{'bind':!0x1})),_0x78fd29=_0x541a51['domDocument']['createElement']('div');_0x78fd29['append'](..._0x139159),_0x51fd93=Array['from'](_0x541a51['domChildrenToView'](_0x78fd29))[0x0];}}else{if('r'==_0x17147d['type']&&_0x17147d['children'][0x0]){const _0x72961b=_0x17147d['children'][0x0];if(_0x51fd93['render']=function(_0x5b1bd8){_0x5b1bd8['innerHTML']=_0x72961b;},_0x43a36a){const _0x2a0d77=new _0xf61bc4(_0x5dba0b);_0x2a0d77['_appendChild'](_0x51fd93);const _0x5c7fe9=Array['from'](_0x541a51['viewChildrenToDom'](_0x2a0d77,{'bind':!0x1})),_0x2462ed=_0x541a51['domDocument']['createElement']('div');_0x2462ed['append'](..._0x5c7fe9);const _0x216f2b=Array['from'](_0x541a51['domChildrenToView'](_0x2462ed));_0x216f2b['length']>0x1?_0x51fd93['_appendChild'](_0x216f2b):_0x51fd93=_0x216f2b[0x0];}}}if(_0x17147d['customProperties']){for(const [_0x4f5d45,_0x3ef991]of _0x17147d['customProperties'])_0x51fd93['_setCustomProperty'](_0x4f5d45,_0x3ef991);}const _0xa22994=void 0x0===_0x17147d['fillerOffset']?null:_0x17147d['fillerOffset'];return null!==_0xa22994&&(_0x51fd93['getFillerOffset']=()=>_0xa22994),_0x51fd93;}}['_makeModelFromViewString'](_0x1956d2){const _0x4a9cbb=JSON['parse'](_0x1956d2),_0x4a844f=this['editor']['editing']['view']['document'],_0x4d0f81=new _0xf61bc4(_0x4a844f,_0x4a9cbb['map'](_0x2baa3a=>this['_getViewFromDiffObj'](_0x2baa3a,!0x0)));return this['editor']['data']['toModel'](_0x4d0f81);}['_removeRevisionMarkers'](_0x4a89dc){return(_0x4a89dc=_0x4a89dc['filter'](_0x3a990b=>!_0x3a990b['name']||'revision-start'!==_0x3a990b['name']&&'revision-end'!==_0x3a990b['name']))['forEach'](_0x1032d5=>{'string'!=typeof _0x1032d5&&(_0x1032d5['children']=this['_removeRevisionMarkers'](_0x1032d5['children']),_0x1032d5['attributes']=_0x1032d5['attributes']['filter'](_0x11f2e0=>!_0x11f2e0[0x0]['startsWith']('data-revision-')));}),_0x4a89dc;}}function g(_0x5d3bf5,_0x10e206,_0xa5fcc8){const t=_0x5d3bf5['t'];switch(_0x10e206){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'},_0xa5fcc8);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xa5fcc8);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 _0x46f453{['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[_0x2e21a7,I,V,_0x135413];}constructor(_0xf01d4d){super(_0xf01d4d),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 _0x4809de=_0x40eb95();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x4809de},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 _0x40e680=this['repository']['getRevision'](0x0),_0x5ad722=_0x40e680&&null===_0x40e680['creator']?_0x40e680:null;if(this['_continueCurrentRevision']=!!_0x5ad722&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x191c68=this['_source']['getCurrentRevisionId'](),_0x183357=this['repository']['getRevision'](_0x191c68);if(_0x183357)this['_startingVersion']=_0x183357['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x188691=this['_source']['history']['_operations']['find'](_0x460711=>!_0x460711['_isInit']),_0x474866=_0x188691?_0x188691['baseVersion']:this['_source']['history']['version'];_0x40e680?(_0x40e680['toVersion']<_0x474866&&_0x40e680['_update']({'toVersion':_0x474866}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5ad722['id'],this['_startingVersion']=_0x5ad722['fromVersion']):(this['_startingVersion']=_0x40e680['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x474866,this['_continueCurrentRevision']=!0x1);}}else _0x5ad722&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5ad722['toVersion'],this['editor']['model']['document']['history']['version']),_0x5ad722['fromVersion']===_0x5ad722['toVersion']?(0x0!==_0x5ad722['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5ad722['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5ad722['id'],this['_startingVersion']=_0x5ad722['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',_0x332047=>!_0x332047),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4fe1e6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x53bc15;for(const _0x14ce14 in _0x4fe1e6){const _0x21cb3a=_0x14ce14,_0x3bcd30=_0x4fe1e6[_0x21cb3a];if('revisionHistoryLicenseKeyValid'==_0x3bcd30||'revisionHistoryLicenseKeyInvalid'==_0x3bcd30||'revisionHistoryLicenseKeyExpired'==_0x3bcd30||'revisionHistoryLicenseKeyDomainLimit'==_0x3bcd30||'revisionHistoryLicenseKeyNotAllowed'==_0x3bcd30||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3bcd30||'revisionHistoryLicenseKeyTrialLimit'==_0x3bcd30||'revisionHistoryLicenseKeyUsageLimit'==_0x3bcd30){delete _0x4fe1e6[_0x21cb3a],_0x53bc15=_0x3bcd30,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x53bc15&&_0x4fe1e6['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x53bc15&&_0x4fe1e6['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x53bc15&&_0x4fe1e6['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x53bc15&&_0x4fe1e6['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x53bc15&&_0x4fe1e6['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x53bc15&&_0x4fe1e6['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x53bc15&&_0x4fe1e6['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x4dd4ff=this['repository']['getRevision'](0x0),_0x197a6c=await this['getRevisionDocumentData'](_0x4dd4ff),_0x1b6cfe=await this['getRevisionRootsAttributes'](_0x4dd4ff);this['_replaceEditorDataWithRevisionData'](_0x197a6c,_0x1b6cfe);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x50980b){this['_source']=_0x50980b;}async['update'](){const _0x34fed8=await this['_source']['getLatestVersion']();if(_0x34fed8>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5b2d83=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x34fed8});_0x5b2d83['authors']=_0x5b2d83['authorsIds']['map'](_0xf803fb=>this['editor']['plugins']['get']('Users')['getUser'](_0xf803fb)),this['currentRevision']['_update'](_0x5b2d83);}}async['saveRevision'](_0x18962f={},_0x269bbd=null){const _0x313259=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x269bbd>this['currentRevision']['toVersion']&&(_0x269bbd=null),null===_0x269bbd&&(_0x269bbd=await this['_source']['getLatestVersion']());const _0x68190c=this['_getFromVersion'](_0x269bbd),_0x4cfb45=this['buildRevisionData']({'from':_0x68190c,'to':_0x269bbd});if(this['currentRevision']['toVersion']<_0x269bbd){const _0x3e36ee=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x269bbd,'to':_0x269bbd});_0x3e36ee['authors']=[],_0x3e36ee['authorsIds']=[],_0x3e36ee['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3e36ee,!0x0),delete _0x3e36ee['authors'],_0x313259['push'](_0x3e36ee);}_0x18962f['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x18962f['name']=_0x18962f['name']||null,_0x18962f['id']=_0x18962f['id']||_0x40eb95(),_0x18962f={..._0x18962f,..._0x4cfb45};const _0x1ccf74=this['addRevisionData'](_0x18962f);_0x313259['push'](_0x18962f);const _0x41279e=this['repository']['getIndex'](_0x1ccf74);if(0x0!==_0x41279e){const _0x337497=this['repository']['getRevision'](_0x41279e-0x1);if(_0x337497['fromVersion']!==_0x269bbd){const _0x2c9955=this['_revisionDataBuilder']['getData'](_0x269bbd,_0x337497['toVersion']),_0x41a871={'id':_0x337497['id'],'diffData':_0x2c9955['diffData'],'authorsIds':_0x2c9955['authorsIds'],'authors':_0x2c9955['authorsIds']['map'](_0xd0eb66=>this['editor']['plugins']['get']('Users')['getUser'](_0xd0eb66)),'fromVersion':_0x269bbd};_0x337497===this['currentRevision']&&(_0x41a871['createdAt']=new Date(_0x18962f['createdAt']['getTime']()+0xa)),_0x337497['_update'](_0x41a871,!0x0),delete _0x41a871['authors'],_0x313259['push'](_0x41a871);}}if(this['adapter']){for(const _0x345354 of _0x313259)this['_bufferUpdate'](_0x345354['id'],_0x345354,!0x0);this['sendBufferedUpdates']();}return _0x1ccf74;}['addRevisionData'](_0x3927c0){const _0xce0d2=this['repository']['createRevision'](_0x3927c0);return this['adapter']&&_0xce0d2['on']('_update',(_0x21e836,_0x45c91e,_0x5e9338)=>{_0x5e9338||(this['_bufferUpdate'](_0x45c91e['id'],_0x45c91e,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0xce0d2,this['_findInsertionIndex'](_0xce0d2)),_0xce0d2;}async['getRevisionDocumentData'](_0x472884){return await this['_utils']['loadRevisionData'](_0x472884,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x472884);}async['getRevisionRootsAttributes'](_0x47f1dd){return await this['_utils']['loadRevisionData'](_0x47f1dd,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x47f1dd);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x4e902c=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x32494c=0x0;_0x32494c<_0x4e902c['length'];_0x32494c++){const _0x466489=_0x4e902c[_0x32494c];let _0x30ea75=!0x1;for(const _0x271ed1 of Object['keys'](_0x466489))void 0x0===_0x466489[_0x271ed1]?delete _0x466489[_0x271ed1]:'id'!==_0x271ed1&&(_0x30ea75=!0x0);_0x30ea75||(_0x4e902c[_0x32494c]=null);}if(_0x4e902c=_0x4e902c['filter'](_0x249606=>null!==_0x249606),!_0x4e902c['length'])return;for(let _0x406634=0x0;_0x406634<_0x4e902c['length'];_0x406634++){const _0x160dfc=_0x4e902c[_0x406634];void 0x0!==_0x160dfc['fromVersion']&&void 0x0===_0x160dfc['toVersion']&&(_0x160dfc['toVersion']=this['repository']['getRevision'](_0x160dfc['id'])['toVersion']),void 0x0!==_0x160dfc['toVersion']&&void 0x0===_0x160dfc['fromVersion']&&(_0x160dfc['fromVersion']=this['repository']['getRevision'](_0x160dfc['id'])['fromVersion']);}const _0xc25501=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x4e902c,_0xc25501)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x12a00d=>{if(_0x12a00d){for(const _0x4e72c2 of _0x12a00d)this['setRevisionData']({'id':_0x4e72c2['id'],'createdAt':_0x4e72c2['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x51e289=null,from:_0x1a555a=null,to:_0x4e7a89=null}){_0x1a555a=null!==_0x1a555a?_0x1a555a:_0x51e289['fromVersion'],_0x4e7a89=null!==_0x4e7a89?_0x4e7a89:_0x51e289['toVersion'];const _0xb07b63=this['_revisionDataBuilder']['getData'](_0x1a555a,_0x4e7a89),_0x16f6d4={'diffData':_0xb07b63['diffData'],'authorsIds':_0xb07b63['authorsIds'],'fromVersion':_0x1a555a,'toVersion':_0x4e7a89};if(!_0x51e289||_0x4e7a89!==_0x51e289['toVersion']){const _0x3639e0=_0x4e7a89-0x1,_0x16a341=this['_source']['history']['getOperation'](_0x3639e0);_0x16f6d4['createdAt']=_0x16a341&&_0x16a341['createdAt']||new Date();}if(this['_loadedStateData']&&_0x1a555a===this['_loadedStateData']['fromVersion']){for(const _0x382bc3 of this['_loadedStateData']['authors'])_0x16f6d4['authorsIds']['includes'](_0x382bc3['id'])||_0x16f6d4['authorsIds']['push'](_0x382bc3['id']);}return _0x16f6d4;}['_bufferUpdate'](_0x3cfc7d,_0x2671f6,_0x144177){if(this['_bufferedUpdates']['has'](_0x3cfc7d)){const _0x5baf85=this['_bufferedUpdates']['get'](_0x3cfc7d);_0x2671f6=_0x144177?{..._0x5baf85,..._0x2671f6}:{..._0x2671f6,..._0x5baf85};}this['_bufferedUpdates']['set'](_0x3cfc7d,_0x2671f6);}['setRevisionData'](_0x15d3c3){const _0x21c53e=this['repository']['getRevision'](_0x15d3c3['id']);if(_0x15d3c3['createdAt']&&(_0x15d3c3['createdAt']=new Date(_0x15d3c3['createdAt'])),_0x15d3c3['authorsIds']){const _0x31f451=this['editor']['plugins']['get']('Users');_0x15d3c3['authors']=_0x15d3c3['authorsIds']['map'](_0x25273b=>_0x31f451['getUser'](_0x25273b));}_0x21c53e['_update'](_0x15d3c3,!0x0);}['_createInitialRevision'](_0x4613cd){const _0x1de3f0=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1de3f0)this['_initialRevisionId']=_0x1de3f0['id'];else{const _0x32810f=!this['editor']['model']['document']['roots']['find'](_0x198fc7=>this['editor']['model']['hasContent'](_0x198fc7)),_0x4a9d3d=this['editor']['plugins']['get']('Users')['me']['id'],_0xe7de0c=g(this['editor']['locale'],_0x32810f?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4613cd,'to':_0x4613cd,'id':this['_initialRevisionId'],'name':_0xe7de0c,'creatorId':_0x4a9d3d});}}['_createCurrentRevision'](_0x49e805){const _0x489561=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x489561),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x49e805,'to':_0x49e805,'id':_0x489561,'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'](_0x30b677,_0x2c9c87){let _0x70fc43=this['editor']['config']['get']('initialData'),_0xd4d20d=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x70fc43){_0x70fc43={};for(const _0x4c6b8b of this['editor']['model']['document']['getRootNames']())_0x70fc43[_0x4c6b8b]='';}if('string'==typeof _0x70fc43&&(_0x70fc43={'main':_0x70fc43}),void 0x0===_0xd4d20d){_0xd4d20d={};for(const _0x265236 of this['editor']['model']['document']['getRootNames']())_0xd4d20d[_0x265236]={};}let _0x2960d4=!0x1;const _0x2f471b=Object['keys'](_0x70fc43),_0x4dcdc3=Object['keys'](_0x30b677);for(const _0x14b744 of _0x2f471b){if(_0x70fc43[_0x14b744]!==_0x30b677[_0x14b744]&&''!==_0x70fc43[_0x14b744]['trim']()){_0x2960d4=!0x0;break;}if(!_0x23588e(_0xd4d20d[_0x14b744],_0x2c9c87[_0x14b744])&&Object['keys'](_0xd4d20d[_0x14b744])['length']>0x0){_0x2960d4=!0x0;break;}}_0x2960d4||(_0x2960d4=_0x4dcdc3['some'](_0x237a24=>!this['editor']['model']['document']['getRoot'](_0x237a24))),_0x2960d4&&_0x2aedd5('editor-initial-data-replaced-with-revision-data',{'editorData':_0x70fc43,'editorRootsAttributes':_0xd4d20d,'revisionData':_0x30b677,'revisionRootsAttributes':_0x2c9c87}),this['editor']['config']['set']('initialData',_0x30b677),this['editor']['config']['set']('rootsAttributes',_0x2c9c87);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x231dcb=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x231dcb['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x39bd78){const _0x233faf=this['repository']['getRevisions']();_0x233faf['reverse']();let _0x192e71=0x0;for(;_0x192e71<_0x233faf['length'];){const _0x2398de=_0x233faf[_0x192e71];if(_0x2398de===this['currentRevision']){_0x192e71++;continue;}if(_0x2398de['id']===this['_initialRevisionId'])break;const _0x53aa09=_0x39bd78['toVersion']-_0x2398de['toVersion']||_0x39bd78['fromVersion']-_0x2398de['fromVersion'];if(_0x53aa09>0x0)break;if(_0x53aa09<0x0)_0x192e71++;else{if(!_0x39bd78['creator']&&_0x2398de['creator'])break;if(_0x2398de['creator']||!_0x39bd78['creator']){if(_0x39bd78['createdAt']>_0x2398de['createdAt'])break;_0x192e71++;}else _0x192e71++;}}return _0x192e71;}['_getFromVersion'](_0xf83808){const _0x20b13b=this['repository']['getRevisions']();_0x20b13b['reverse'](),_0x20b13b['shift']();const _0x9a1c80=_0x20b13b['find'](_0x1f27f0=>_0x1f27f0['toVersion']<=_0xf83808)['toVersion'];return _0x9a1c80<this['_startingVersion']?this['_startingVersion']:_0x9a1c80;}['_makeRevision']({name:_0x551b0b,from:_0x5f1bd4,to:_0x321c37,creatorId:_0xb65cac,id:_0x3b9bcb}){const _0x4241e4=this['buildRevisionData']({'from':_0x5f1bd4,'to':_0x321c37});_0x4241e4['name']=_0x551b0b,_0x4241e4['creatorId']=_0xb65cac,_0x4241e4['id']=_0x3b9bcb;const _0x41b7d1=this['addRevisionData'](_0x4241e4);return this['adapter']&&this['_bufferUpdate'](_0x4241e4['id'],_0x4241e4,!0x0),_0x41b7d1;}['_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(_0x326ffb){this['editor']=_0x326ffb,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'](_0x4c1958){this['source']=_0x4c1958;const _0x536a30=new Map(),_0x51f260=new Map(),_0x2c0882=this['editor']['model']['document']['roots']['map'](_0x4e2ed6=>_0x4e2ed6['rootName']);for(const _0x160022 of _0x2c0882){const _0x361ed4=this['editor']['model']['document']['getRoot'](_0x160022),_0x441a55=N(_0x361ed4);_0x536a30['set'](_0x160022,_0x441a55),_0x51f260['set'](_0x160022,Object['fromEntries'](_0x361ed4['getAttributes']()));}const _0x583f06=Array['from'](this['editor']['model']['markers'])['map'](_0x440552=>[_0x440552['name'],_0x440552['getRange']()]),_0x16c6d4=this['source']['version'];this['_saveMetaData'](_0x16c6d4,_0x536a30,_0x583f06,_0x51f260),this['_startingRevisionId']=this['_revisionId'];const _0x16ad04=new Map(),_0x24b907=new Map();for(const _0x11780b of _0x2c0882){const _0x197d5f=P(_0x11780b);_0x16ad04['set'](_0x11780b,_0x197d5f),_0x24b907['set'](_0x11780b,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x16ad04,[],_0x24b907);}['getData'](_0x30facb,_0x2d4f9c){if(this['_lastFrom']===_0x30facb&&this['_lastTo']<=_0x2d4f9c)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2d4f9c,!0x0);else{if(!this['_savedMetaData']['has'](_0x30facb)){const _0x542766=this['_getPreviousFrom'](_0x30facb);this['_calculateMetaData'](_0x542766,_0x30facb,!0x1);}this['_calculateMetaData'](_0x30facb,_0x2d4f9c,!0x0);}return this['_lastFrom']=_0x30facb,this['_lastTo']=_0x2d4f9c,this['_getState']();}['loadState'](_0x1d04a5){const _0x501bf4=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x1d04a5['fromVersion'],this['_lastTo']=_0x1d04a5['toVersion'];for(const _0x3b7caf in _0x1d04a5['diffData']){const _0x3d4653=_0x1d04a5['diffData'][_0x3b7caf]['attachChange'],_0x1acbae=_0x186736(_0x1d04a5['diffData'][_0x3b7caf]['attributesBefore'])||{},_0xa50db6=_0x501bf4['_makeModelFromViewString'](_0x1d04a5['diffData'][_0x3b7caf]['deletions']);_0xa50db6['rootName']=_0x3b7caf,_0xa50db6['_isAttached']=!_0x3d4653||!_0x3d4653['isAttached'],_0xa50db6['isAttached']=()=>_0xa50db6['_isAttached'],this['_baseRoots']['set'](_0x3b7caf,_0xa50db6),this['_baseRootsAttributes']['set'](_0x3b7caf,_0x1acbae),_0x3d4653&&this['_touchedRoots']['set'](_0x3b7caf,_0x3d4653);const _0x55e812=this['_makeIdsRoot'](_0xa50db6);this['_baseIdsRoots']['set'](_0x3b7caf,_0x55e812);for(const [_0x4b99ac,_0x1e21ca]of _0xa50db6['markers']){if(!_0x4b99ac['startsWith']('revision:'))continue;const _0x952fb7=_0x4b99ac['split'](':')[0x2];for(const _0x22fc17 of _0x1e21ca['getWalker']({'singleCharacters':!0x0})){const _0x1aaeba=this['_getVidAttributeName'](_0x22fc17),_0xa30b46='elementEnd'==_0x22fc17['type']?_0x22fc17['previousPosition']['path']['slice'](0x0,-0x1):_0x22fc17['previousPosition']['path'],_0x15cf79=_0x55e812['getNodeByPath'](_0xa30b46)['getAttribute'](_0x1aaeba);this['_touched']['set'](_0x15cf79,{'userId':_0x952fb7});}}}this['_startingRevisionId']=this['_revisionId'];const _0x12163a=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2504ee=>!this['_touched']['has'](_0x2504ee));let _0x56dde0=0x0;const _0x332ebc=new Map();for(const _0x4be2aa in _0x1d04a5['diffData']){const _0x187244=_0x1d04a5['diffData'][_0x4be2aa]['attachChange'],_0xb07054=_0x186736(_0x1d04a5['diffData'][_0x4be2aa]['attributesAfter'])||{},_0x193661=_0x501bf4['_makeModelFromViewString'](_0x1d04a5['diffData'][_0x4be2aa]['insertions']);_0x193661['rootName']=_0x4be2aa,_0x193661['_isAttached']=!_0x187244||_0x187244['isAttached'],_0x193661['isAttached']=()=>_0x193661['_isAttached'],this['_diffRoots']['set'](_0x4be2aa,_0x193661),this['_diffRootsAttributes']['set'](_0x4be2aa,_0xb07054);const _0x2bd814=this['_makeIdsRoot'](_0x193661,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4be2aa,_0x2bd814),_0x332ebc['set'](_0x4be2aa,_0x193661['isAttached']()?_0xb07054:{});for(const [_0x57f304,_0x2ae0e3]of _0x193661['markers']){if(!_0x57f304['startsWith']('revision:'))continue;const _0x3dd338=_0x57f304['split'](':')[0x2];for(const _0x5edcdd of _0x2ae0e3['getWalker']({'singleCharacters':!0x0})){const _0x2cea22=this['_getVidAttributeName'](_0x5edcdd),_0x4c1319=this['_revisionId']++,_0x15d730='elementEnd'==_0x5edcdd['type']?_0x5edcdd['previousPosition']['path']['slice'](0x0,-0x1):_0x5edcdd['previousPosition']['path'];_0x2bd814['getNodeByPath'](_0x15d730)['_setAttribute'](_0x2cea22,_0x4c1319),this['_touched']['set'](_0x4c1319,{'userId':_0x3dd338});}}for(const _0x2d116a of this['editor']['model']['createRangeIn'](_0x193661)['getWalker']({'singleCharacters':!0x0})){const _0x384ed5=this['_getVidAttributeName'](_0x2d116a),_0x37358='elementEnd'==_0x2d116a['type']?_0x2d116a['previousPosition']['path']['slice'](0x0,-0x1):_0x2d116a['previousPosition']['path'],_0x2a6528=_0x2bd814['getNodeByPath'](_0x37358);_0x2a6528['getAttribute'](_0x384ed5)>0x0||_0x2a6528['_setAttribute'](_0x384ed5,_0x12163a[_0x56dde0++]);}for(const [_0x38db15,_0x55dff0]of _0x193661['markers'])_0x38db15['startsWith']('revision:')||this['_markers']['set'](_0x38db15,_0x55dff0);}const _0x73f9=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x73f9),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x73f9,0x1));const _0x4ce31f=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x4ce31f),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4ce31f,0x1));const _0x436790=Array['from'](this['_diffRoots'])['map'](([_0x5b9269,_0x4a531a])=>[_0x5b9269,N(_0x4a531a)]);this['_saveMetaData'](this['_lastTo'],_0x436790,this['_markers'],_0x332ebc);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x4efc66,_0x4c2fa3,_0x411f4f,_0x386df4){const _0x3c16e9=new Map(_0x4c2fa3),_0x3e13ab=new Map(_0x186736(_0x386df4)),_0x4dd7ad=new Map();for(const [_0x4323df,_0x2dfd30]of _0x411f4f)_0x4dd7ad['set'](_0x4323df,{'start':_0x2dfd30['start']['clone'](),'end':_0x2dfd30['end']['clone'](),'rootName':_0x2dfd30['root']['rootName']});this['_savedMetaData']['set'](_0x4efc66,{'roots':_0x3c16e9,'markers':_0x4dd7ad,'rootsAttributes':_0x3e13ab});}['_removeMetaData'](_0x2b4c3d){this['_savedMetaData']['delete'](_0x2b4c3d);}['_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'](_0x556c2d,_0x1d1953=null){let _0x113f22=null;_0x556c2d['is']('documentFragment')||(_0x113f22=new ut(_0x556c2d['name'],{'vid_start':null===_0x1d1953?this['_revisionId']++:_0x1d1953++}));const _0x45673a=[];for(const _0x4f06cd of _0x556c2d['getChildren']())if(_0x4f06cd['is']('element')){_0x45673a['push'](this['_makeIdsRoot'](_0x4f06cd,_0x1d1953));const _0x54607b=_0x45673a[_0x45673a['length']-0x1];null!==_0x1d1953&&(_0x1d1953=_0x54607b['is']('element','$text')?_0x54607b['getAttribute']('vid')+0x1:_0x54607b['getAttribute']('vid_end')+0x1);}else{for(let _0x5441ad=0x0;_0x5441ad<_0x4f06cd['offsetSize'];_0x5441ad++)_0x45673a['push'](new ut('$text',{'vid':null===_0x1d1953?this['_revisionId']++:_0x1d1953++}));}if(_0x556c2d['is']('documentFragment')){const _0x3f781f=P(_0x556c2d['rootName']);return _0x3f781f['_insertChild'](0x0,_0x45673a),_0x3f781f;}return _0x113f22['_setAttribute']('vid_end',null===_0x1d1953?this['_revisionId']++:_0x1d1953++),_0x113f22['_insertChild'](0x0,_0x45673a),_0x113f22;}['_calculateMetaData'](_0xe204dd,_0x5d78be,_0x43c350){this['_reset']();const {roots:_0x2cace8,markers:_0x335283,rootsAttributes:_0x104c1e}=this['_savedMetaData']['get'](_0xe204dd);this['_baseRoots']=new Map(_0x2cace8),this['_baseRootsAttributes']=new Map(_0x186736(_0x104c1e));for(const [_0x5bdf4e,_0x2c9299]of this['_baseRoots'])if('$graveyard'!==_0x5bdf4e&&(this['_diffRoots']['set'](_0x5bdf4e,N(_0x2c9299)),this['_diffRootsAttributes']=new Map(_0x186736(_0x104c1e)),_0x43c350)){const _0x1c198b=this['_revisionId'];this['_idsRoots']['set'](_0x5bdf4e,this['_makeIdsRoot'](_0x2c9299)),this['_baseIdsRoots']['set'](_0x5bdf4e,this['_makeIdsRoot'](_0x2c9299,_0x1c198b));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x43c350&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x538860,_0x5b16ab]of _0x335283){const _0x2bddab=this['_baseRoots']['get'](_0x5b16ab['rootName']),_0x4b1460=this['_diffRoots']['get'](_0x5b16ab['rootName']),_0x493c05=new ft(this['_fixPosition'](_0x5b16ab['start'],_0x2bddab),this['_fixPosition'](_0x5b16ab['end'],_0x2bddab)),_0x5e6fa1=this['_fixRange'](_0x493c05,_0x4b1460);_0x2bddab['markers']['set'](_0x538860,_0x493c05),this['_markers']['set'](_0x538860,_0x5e6fa1);}this['_applyOperations'](_0xe204dd,_0x5d78be,_0x43c350);}['_applyOperations'](_0x460558,_0x14d958,_0x2f1e83){for(const _0x20fa2e of this['source']['getOperations'](_0x460558,_0x14d958))this['_handleOperation'](_0x20fa2e,_0x2f1e83);for(const _0x294165 of this['_diffRoots']['values']())_0x294165['markers']['clear']();for(const [_0x4be774,_0x11e854]of this['_markers']){this['_diffRoots']['get'](_0x11e854['root']['rootName'])['markers']['set'](_0x4be774,_0x11e854['clone']());}const _0x5c269c=new Map(),_0x5927d4=new Map();for(const [_0x245f8c,_0x49c1ca]of this['_diffRoots'])_0x5c269c['set'](_0x245f8c,N(_0x49c1ca)),_0x5927d4['set'](_0x245f8c,this['_diffRootsAttributes']['get'](_0x245f8c));this['_saveMetaData'](_0x14d958,_0x5c269c,this['_markers'],_0x5927d4);}['_getPreviousFrom'](_0x32019f){const _0x5190d0=Array['from'](this['_savedMetaData']['keys']());_0x5190d0['sort']((_0x27b87f,_0x1b00c2)=>_0x27b87f-_0x1b00c2),_0x5190d0['reverse']();for(const _0x49009f of _0x5190d0)if(_0x49009f<_0x32019f)return _0x49009f;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5e55a9,_0x34e57b){const _0x475f74=Array['from'](_0x34e57b['markers'])['map'](([_0x545abd,_0x4b38bd])=>[_0x545abd,this['_fixRange'](_0x4b38bd,_0x5e55a9)]);_0x5e55a9['markers']=new Map(_0x475f74);}['_transformMarkers'](_0x1ccb08){for(const _0x7a1915 of this['_markers']['values']()){const _0x625740=_0x7a1915['getTransformedByOperation'](_0x1ccb08),_0x341d49=ft['_createFromRanges'](_0x625740);_0x7a1915['start']=_0x341d49['start'],_0x7a1915['end']=_0x341d49['end'];}}['_handleOperation'](_0xfd0577,_0x5c8c67){if('addRoot'!=_0xfd0577['type']&&'detachRoot'!=_0xfd0577['type']){if('insert'==_0xfd0577['type']){const _0x74bfcf=_0xfd0577['position']['root']['rootName'];this['_diffRoots']['has'](_0x74bfcf)||(this['_diffRoots']['set'](_0x74bfcf,P(_0x74bfcf,!0x0)),this['_diffRootsAttributes']['set'](_0x74bfcf,{}),_0x5c8c67&&this['_idsRoots']['set'](_0x74bfcf,P(_0x74bfcf,!0x0)));}else{if('addRootAttribute'==_0xfd0577['type']||'removeRootAttribute'==_0xfd0577['type']||'changeRootAttribute'==_0xfd0577['type'])return void this['_handleRootAttributeOperation'](_0xfd0577);'marker'==_0xfd0577['type']&&this['_handleMarkerOperation'](_0xfd0577);}if('marker'!==_0xfd0577['type']){const _0x38f569=this['_cloneOperation'](_0xfd0577,this['_diffRoots']);_0x38f569['_execute'](),this['_transformMarkers'](_0x38f569);}if(_0x5c8c67)switch(_0xfd0577['type']){case'insert':this['_handleInsertOperation'](_0xfd0577);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xfd0577);break;case'merge':this['_handleMergeOperation'](_0xfd0577);break;case'split':this['_handleSplitOperation'](_0xfd0577);}}else this['_handleRootOperation'](_0xfd0577,_0x5c8c67);}['_cloneOperation'](_0x3b5df3,_0x55040a){const _0xea1dad=_0x3b5df3['clone']();return _0xea1dad['_authorId']=_0x3b5df3['_authorId'],this['_fixOperation'](_0xea1dad,_0x55040a),_0xea1dad;}['_getBaseVids'](_0x3f8319){return _0x3f8319['map'](_0x5dc4db=>{const _0x5b6bc5=this['_getVidAttributeName'](_0x5dc4db);return Number(_0x5dc4db['item']['getAttribute'](_0x5b6bc5));});}['_generateTape'](_0x397f64,_0x496489){if(_0x397f64['is']('element','$text'))_0x496489['push']({'item':_0x397f64,'type':'text'});else{_0x397f64['is']('element')&&_0x496489['push']({'item':_0x397f64,'type':'elementStart'});for(const _0x26c78a of _0x397f64['getChildren']())this['_generateTape'](_0x26c78a,_0x496489);_0x397f64['is']('element')&&_0x496489['push']({'item':_0x397f64,'type':'elementEnd'});}return _0x496489;}['_getState'](){const _0x2ac8c5=new Map(this['_touched']),_0x7aa600=new Map(_0x2ac8c5),_0x252558=new Map(),_0x5abea9={'insertions':{},'deletions':{}},_0x569c5f={'insertions':{},'deletions':{}},_0x267b9a=new Map(),_0x39a25a=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x39a25a['delete']('$graveyard');for(const _0x54fe5a of _0x39a25a){const _0x3e07fc=this['_diffRoots']['get'](_0x54fe5a)||P(_0x54fe5a,!0x1),_0x5dcc3b=this['_baseRoots']['get'](_0x54fe5a)||P(_0x54fe5a,!0x1);_0x3e07fc['isAttached']()||_0x5dcc3b['isAttached']()?(_0x5abea9['insertions'][_0x54fe5a]=N(_0x3e07fc),_0x5abea9['deletions'][_0x54fe5a]=N(_0x5dcc3b),this['_copyMarkers'](_0x5abea9['deletions'][_0x54fe5a],_0x5dcc3b),this['_copyMarkers'](_0x5abea9['insertions'][_0x54fe5a],_0x3e07fc),_0x569c5f['insertions'][_0x54fe5a]=this['_generateTape'](this['_idsRoots']['get'](_0x54fe5a),[]),_0x569c5f['deletions'][_0x54fe5a]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x54fe5a)||P(_0x54fe5a,!0x1),[])):_0x39a25a['delete'](_0x54fe5a);}for(const _0x300d57 of _0x39a25a){const _0xf018e6=_0x569c5f['insertions'][_0x300d57];for(const _0x167324 of _0xf018e6){const _0x2d2d33=this['_getVidAttributeName'](_0x167324),_0x251448=_0x167324['item']['getAttribute'](_0x2d2d33);_0x7aa600['delete'](_0x251448),_0x251448>=this['_startingRevisionId']&&_0x252558['set'](_0x251448,_0x2ac8c5['get'](_0x251448));}}for(const _0x34d13c of _0x39a25a){const _0x2cd0bb=_0x569c5f['insertions'][_0x34d13c],_0x362faa=this['_getBaseVids'](_0x569c5f['deletions'][_0x34d13c]);let _0x25d5b7=0x0;for(const _0x4680de of _0x2cd0bb){const _0x3f6bfd=this['_getVidAttributeName'](_0x4680de),_0x7beae1=_0x4680de['item']['getAttribute'](_0x3f6bfd);if(!_0x252558['has'](_0x7beae1)&&!_0x267b9a['has'](_0x7beae1)){if(_0x7aa600['has'](_0x7beae1))_0x25d5b7++;else{if(_0x7beae1!=_0x362faa[_0x25d5b7]){const _0xf90c39=_0x2ac8c5['get'](_0x7beae1)||_0x2ac8c5['get'](_0x362faa[_0x25d5b7]);for(;_0x7beae1!=_0x362faa[_0x25d5b7];)_0x7aa600['has'](_0x362faa[_0x25d5b7])||(_0x267b9a['set'](_0x362faa[_0x25d5b7],_0xf90c39),_0x2ac8c5['set'](_0x362faa[_0x25d5b7],_0xf90c39)),_0x25d5b7++;}_0x25d5b7++;}}}}for(const _0x17fa6b of _0x39a25a){const _0x460b84=_0x569c5f['insertions'][_0x17fa6b];for(const _0x23b5c6 of _0x460b84){const _0x200b7f=this['_getVidAttributeName'](_0x23b5c6),_0x4ae4ee=_0x23b5c6['item']['getAttribute'](_0x200b7f);if(_0x267b9a['has'](_0x4ae4ee)){const _0x3c3060=_0x267b9a['get'](_0x4ae4ee);_0x7aa600['has'](_0x4ae4ee)||_0x7aa600['set'](_0x4ae4ee,{..._0x3c3060}),_0x252558['set'](_0x4ae4ee,{..._0x3c3060});}}}for(const _0x52e8b2 of _0x7aa600['keys']())_0x52e8b2>=this['_startingRevisionId']&&_0x7aa600['delete'](_0x52e8b2);const _0x594494=new Map();for(const _0x2a0eeb of _0x39a25a){let _0x1ec11a=_0x569c5f['insertions'][_0x2a0eeb];for(const _0x44bd43 of _0x1ec11a)if(_0x44bd43['item']['is']('element','tableCell')){const _0x5952e9=this['_getVidAttributeName'](_0x44bd43),_0x3e4bcf=_0x44bd43['item']['getAttribute'](_0x5952e9);if(_0x252558['has'](_0x3e4bcf)){const _0x490c4=_0x44bd43['item']['parent']['parent']['getAttribute']('vid_start'),_0x3ffcff=_0x594494['get'](_0x490c4)||new Set();_0x3ffcff['add'](_0x252558['get'](_0x3e4bcf)['userId']),_0x594494['set'](_0x490c4,_0x3ffcff);}}_0x1ec11a=_0x569c5f['deletions'][_0x2a0eeb];for(const _0xe2af6f of _0x1ec11a)if(_0xe2af6f['item']['is']('element','tableCell')){const _0x2fae63=this['_getVidAttributeName'](_0xe2af6f),_0x1aabb3=_0xe2af6f['item']['getAttribute'](_0x2fae63);if(_0x7aa600['has'](_0x1aabb3)){const _0x287b2a=_0xe2af6f['item']['parent']['parent']['getAttribute']('vid_start'),_0x5a7ba5=_0x594494['get'](_0x287b2a)||new Set();_0x5a7ba5['add'](_0x7aa600['get'](_0x1aabb3)['userId']),_0x594494['set'](_0x287b2a,_0x5a7ba5);}}for(const _0x1f161b of _0x594494['keys']())(_0x252558['has'](_0x1f161b)||_0x7aa600['has'](_0x1f161b))&&_0x594494['delete'](_0x1f161b);}for(const _0x45e4db of _0x39a25a){const _0x55c908=_0x569c5f['insertions'][_0x45e4db];let _0x28e1bb=null,_0x2d9428=null;for(const _0x1ec2fd of _0x55c908){const _0x55d798=this['_getVidAttributeName'](_0x1ec2fd),_0x2d8f23=_0x1ec2fd['item']['getAttribute'](_0x55d798),_0x1591e8=_0x594494['get'](_0x2d8f23);_0x1591e8&&'elementStart'==_0x1ec2fd['type']&&(_0x28e1bb=Array['from'](_0x1591e8)[0x0],_0x2d9428=_0x1ec2fd['item']['getAttribute']('vid_end')),_0x28e1bb&&(_0x7aa600['set'](_0x2d8f23,{'userId':_0x28e1bb}),_0x252558['set'](_0x2d8f23,{'userId':_0x28e1bb})),_0x2d8f23==_0x2d9428&&(_0x28e1bb=null,_0x2d9428=null);}}const _0x9184a1={},_0x566cff=new Set();for(const _0x2c5fc3 of _0x39a25a){const _0x31cc4d=_0x5abea9['deletions'][_0x2c5fc3],_0x42645d=_0x5abea9['insertions'][_0x2c5fc3];for(const {userId:_0x3a91d3}of this['_touchedMarkers']['values']())null!==_0x3a91d3&&_0x566cff['add'](_0x3a91d3);for(const {userId:_0x1ac8d3}of this['_touchedRoots']['values']())null!==_0x1ac8d3&&_0x566cff['add'](_0x1ac8d3);this['_markChanges'](_0x42645d,_0x569c5f['insertions'][_0x2c5fc3],_0x252558,'insertion',_0x566cff),this['_markChanges'](_0x31cc4d,_0x569c5f['deletions'][_0x2c5fc3],_0x7aa600,'deletion',_0x566cff),_0x9184a1[_0x2c5fc3]={'insertions':this['_prepareViewToSave'](_0x42645d),'deletions':this['_prepareViewToSave'](_0x31cc4d),'attachChange':this['_touchedRoots']['get'](_0x2c5fc3)||null,'attributesBefore':_0x186736(this['_baseRootsAttributes']['get'](_0x2c5fc3))||{},'attributesAfter':_0x186736(this['_diffRootsAttributes']['get'](_0x2c5fc3))};}return{'diffData':_0x9184a1,'authorsIds':Array['from'](_0x566cff)};}['_processRootBeforeSave'](_0x160ba7){for(const [,_0x3ec349]of _0x160ba7['markers']){const _0x592a68=_0x3ec349['start']['getAncestors']()['filter'](_0x13742e=>'tableCell'==_0x13742e['name']);for(const _0x5e8bf3 of _0x592a68)0x1==_0x5e8bf3['childCount']&&_0x5e8bf3['getChild'](0x0)['is']('element','paragraph')&&_0x5e8bf3['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5d30d5){this['_processRootBeforeSave'](_0x5d30d5);const _0x44ce7a=this['editor']['data']['toView'](_0x5d30d5,{}),_0x203903=Array['from'](_0x44ce7a['getChildren']())['map'](_0x371ce9=>this['_getViewJson'](_0x371ce9));return JSON['stringify'](_0x203903);}['_getViewJson'](_0x7063db){if(_0x7063db['is']('$text'))return _0x7063db['data'];{const _0x1a3343=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x10b39a=_0x7063db,_0x2250fa=this['editor']['data']['htmlProcessor']['domConverter'],_0x5b5a61={'type':_0x1a3343['_getTypeCharForViewElement'](_0x10b39a),'name':_0x10b39a['name'],'attributes':Array['from'](_0x10b39a['getAttributes']()),'children':Array['from'](_0x10b39a['getChildren']())['map'](_0x4b3f89=>this['_getViewJson'](_0x4b3f89))};if(_0x7063db['is']('uiElement')&&'$comment'!=_0x7063db['name']){const _0x1a15ba=_0x7063db['render'](_0x2250fa['domDocument'],_0x2250fa);_0x5b5a61['children']['push'](_0x1a15ba['outerHTML']);}else{if(_0x7063db['is']('rawElement')){const _0x1d36d7=_0x2250fa['domDocument']['createElement'](_0x10b39a['name']);_0x7063db['render'](_0x1d36d7,_0x2250fa),_0x5b5a61['children']['push'](_0x1d36d7['innerHTML']);}}const _0x2e22e7=Array['from'](_0x10b39a['getCustomProperties']());_0x2e22e7['length']>0x0&&(_0x5b5a61['customProperties']=_0x2e22e7);const _0x34be6d=_0x10b39a['getFillerOffset']();return null!==_0x34be6d&&(_0x5b5a61['fillerOffset']=_0x34be6d),_0x5b5a61;}}['_markChanges'](_0x42aeda,_0x2ff75d,_0x185418,_0x1235a0,_0x3d958a){let _0x3d6af6=null,_0x33d593=null,_0x47b764=0x0;const _0x33be04=this['editor']['model'];for(let _0x2fbacd=0x0;_0x2fbacd<_0x2ff75d['length'];_0x2fbacd++){const _0x338245=this['_getVidAttributeName'](_0x2ff75d[_0x2fbacd]),_0x10a558=_0x2ff75d[_0x2fbacd]['item']['getAttribute'](_0x338245),_0x1d21e4=_0x185418['get'](_0x10a558),_0x3ef565=_0x2fbacd==_0x2ff75d['length']-0x1;(!_0x3d6af6&&_0x1d21e4&&(_0x3d6af6=_0x1d21e4,_0x33d593=_0x2ff75d[_0x2fbacd]),_0x3d6af6&&(!_0x1d21e4||_0x1d21e4['userId']!=_0x3d6af6['userId']))&&(_0x3c3a5a(_0x1d21e4,F(_0x33d593,_0x42aeda,_0x33be04),F(_0x2ff75d[_0x2fbacd],_0x42aeda,_0x33be04)),_0x3d6af6=_0x1d21e4||null,_0x33d593=_0x1d21e4?_0x2ff75d[_0x2fbacd]:null),_0x3d6af6&&_0x3ef565&&_0x3c3a5a(_0x1d21e4,F(_0x33d593,_0x42aeda,_0x33be04),B(_0x2ff75d[_0x2fbacd],_0x42aeda,_0x33be04));}function _0x3c3a5a(_0x45b654,_0x48b5b6,_0x518532){const _0x4099b5=_0x3d6af6['userId'],_0x49c664='revision:'+_0x1235a0+':'+_0x4099b5+':'+_0x47b764++,_0x3bf961=_0x33be04['createRange'](_0x48b5b6,_0x518532);_0x42aeda['markers']['set'](_0x49c664,_0x3bf961),null!==_0x4099b5&&_0x3d958a['add'](_0x4099b5);}}['_getVidAttributeName'](_0x3524af){switch(_0x3524af['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x38d77f,_0x20c138){_0x38d77f['baseVersion']=null;for(const _0x8fca68 in _0x38d77f){const _0x192052=_0x38d77f[_0x8fca68];if(_0x192052 instanceof vt){const _0x292953=_0x20c138['get'](_0x192052['root']['rootName']);_0x38d77f[_0x8fca68]=this['_fixPosition'](_0x192052,_0x292953);}if(_0x192052 instanceof ft){const _0x506f50=_0x20c138['get'](_0x192052['root']['rootName']);_0x38d77f[_0x8fca68]=this['_fixRange'](_0x192052,_0x506f50);}'root'===_0x8fca68&&(_0x38d77f['root']=_0x20c138['get'](_0x38d77f['root']['rootName']));}}['_fixRange'](_0x54a345,_0x382694){return this['editor']['model']['createRange'](this['_fixPosition'](_0x54a345['start'],_0x382694),this['_fixPosition'](_0x54a345['end'],_0x382694));}['_fixPosition'](_0x23cd26,_0x12d61b){return this['editor']['model']['createPositionFromPath'](_0x12d61b,_0x23cd26['path'],_0x23cd26['stickiness']);}['_handleInsertOperation'](_0x1c1127){const _0x4db41a=this['_idsRoots']['get'](_0x1c1127['position']['root']['rootName']),_0x8fdf94=this['_fixPosition'](_0x1c1127['position'],_0x4db41a),_0x2e87b5=null===_0x1c1127['_authorId']?null:_0x1c1127['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x29ed12=_0x8fdf94['parent'],_0x488fef=this['_revisionId'],_0x4b1c56=[];for(const _0x16b93a of _0x1c1127['nodes'])if(_0x16b93a['is']('element'))_0x4b1c56['push'](this['_makeIdsRoot'](_0x16b93a));else{for(let _0x301d3f=0x0;_0x301d3f<_0x16b93a['offsetSize'];_0x301d3f++)_0x4b1c56['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x4fe048=this['_revisionId'];for(let _0xe9238d=_0x488fef;_0xe9238d<_0x4fe048;_0xe9238d++)this['_touched']['set'](_0xe9238d,{'userId':_0x2e87b5});_0x29ed12['_insertChild'](_0x8fdf94['offset'],_0x4b1c56);}['_handleMoveOperation'](_0x140367){(_0x140367=this['_cloneOperation'](_0x140367,this['_idsRoots']))['_execute']();const _0x587414=null===_0x140367['_authorId']?null:_0x140367['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4cf026=_0x140367['getMovedRangeStart'](),_0x1fb68d=_0x4cf026['parent'],_0x275232=_0x4cf026['offset'];!function _0x90dd96(_0x90ca29,_0x24852b,_0x28339f,_0x5733d6){for(let _0x521488=_0x28339f;_0x521488<_0x5733d6;_0x521488++){const _0x3737b5=_0x24852b['getChild'](_0x521488);_0x3737b5['is']('element','$text')?_0x90ca29['set'](_0x3737b5['getAttribute']('vid'),{'userId':_0x587414}):(_0x90ca29['set'](_0x3737b5['getAttribute']('vid_start'),{'userId':_0x587414}),_0x90dd96(_0x90ca29,_0x3737b5,0x0,_0x3737b5['childCount']),_0x90ca29['set'](_0x3737b5['getAttribute']('vid_end'),{'userId':_0x587414}));}}(this['_touched'],_0x1fb68d,_0x275232,_0x275232+_0x140367['howMany']);}['_handleMergeOperation'](_0x47943b){const _0x4cf48a=null===(_0x47943b=this['_cloneOperation'](_0x47943b,this['_idsRoots']))['_authorId']?null:_0x47943b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1198bd=_0x47943b['targetPosition']['parent'],_0x36e4b3=_0x47943b['sourcePosition']['parent'],_0x507288=_0x1198bd['getAttribute']('vid_end'),_0x12449c=_0x36e4b3['getAttribute']('vid_start');_0x1198bd['_setAttribute']('vid_end',_0x36e4b3['getAttribute']('vid_end')),_0x36e4b3['_setAttribute']('vid_end',_0x507288),this['_touched']['set'](_0x12449c,{'userId':_0x4cf48a}),this['_touched']['set'](_0x507288,{'userId':_0x4cf48a}),_0x47943b['_execute']();}['_handleSplitOperation'](_0x136bc7){const _0x2edc77=null===(_0x136bc7=this['_cloneOperation'](_0x136bc7,this['_idsRoots']))['_authorId']?null:_0x136bc7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xd0e2d8=_0x136bc7['graveyardPosition'],_0x5277ad=_0x136bc7['splitPosition']['parent'];_0x136bc7['_execute']();const _0x16d90e=_0x5277ad['getAttribute']('vid_end'),_0x1346a5=_0x136bc7['insertionPosition']['nodeAfter'];if(_0xd0e2d8){const _0x2a5221=_0x1346a5['getAttribute']('vid_end'),_0x15c6be=_0x5277ad['getAttribute']('vid_end');_0x5277ad['_setAttribute']('vid_end',_0x2a5221),_0x1346a5['_setAttribute']('vid_end',_0x15c6be),this['_touched']['set'](_0x5277ad['getAttribute']('vid_end'),{'userId':_0x2edc77}),this['_touched']['set'](_0x1346a5['getAttribute']('vid_start'),{'userId':_0x2edc77});}else{const _0x388b4c=this['_revisionId']++,_0x48f736=this['_revisionId']++;_0x5277ad['_setAttribute']('vid_end',_0x388b4c),_0x1346a5['_setAttribute']('vid_start',_0x48f736),_0x1346a5['_setAttribute']('vid_end',_0x16d90e),this['_touched']['set'](_0x388b4c,{'userId':_0x2edc77}),this['_touched']['set'](_0x48f736,{'userId':_0x2edc77});}}['_handleMarkerOperation'](_0x8c5b65){if(!_0x8c5b65['affectsData'])return;const _0xd320cd=(_0x8c5b65=this['_cloneOperation'](_0x8c5b65,this['_diffRoots']))['oldRange']?_0x8c5b65['oldRange']['root']:null,_0x5ead2d=_0x8c5b65['newRange']?_0x8c5b65['newRange']['root']:null;_0xd320cd&&this['_markers']['delete'](_0x8c5b65['name']),_0x5ead2d&&this['_markers']['set'](_0x8c5b65['name'],_0x8c5b65['newRange']['clone']());const _0x180fd6=null===_0x8c5b65['_authorId']?null:_0x8c5b65['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3784ca=_0x8c5b65['name'];if(!this['_touchedMarkers']['has'](_0x3784ca))return void this['_touchedMarkers']['set'](_0x3784ca,{'range':_0x8c5b65['oldRange'],'userId':_0x180fd6});const _0x315b95=this['_touchedMarkers']['get'](_0x3784ca),_0x250159=_0x315b95['range'],_0x2ece70=_0x8c5b65['newRange'];null==_0x250159&&null==_0x2ece70||_0x250159&&_0x2ece70&&_0x250159['isEqual'](_0x2ece70)?this['_touchedMarkers']['delete'](_0x8c5b65['name']):_0x315b95['userId']=_0x180fd6;}['_handleRootOperation'](_0x58acdf,_0x3aefb8){this['_diffRoots']['has'](_0x58acdf['rootName'])?this['_diffRoots']['get'](_0x58acdf['rootName'])['_isAttached']=_0x58acdf['isAdd']:(this['_diffRoots']['set'](_0x58acdf['rootName'],P(_0x58acdf['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x58acdf['rootName'],{}),_0x3aefb8&&this['_idsRoots']['set'](_0x58acdf['rootName'],P(_0x58acdf['rootName'],!0x0)));const _0x2846f6=null===_0x58acdf['_authorId']?null:_0x58acdf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x575afb=this['_touchedRoots']['get'](_0x58acdf['rootName']);_0x575afb&&_0x575afb['userId']===_0x2846f6?this['_touchedRoots']['delete'](_0x58acdf['rootName']):this['_touchedRoots']['set'](_0x58acdf['rootName'],{'userId':_0x2846f6,'isAttached':_0x58acdf['isAdd']});}['_handleRootAttributeOperation'](_0x3e181e){const _0x304d7b=this['_diffRootsAttributes']['get'](_0x3e181e['root']['rootName']);null===_0x3e181e['newValue']?delete _0x304d7b[_0x3e181e['key']]:_0x304d7b[_0x3e181e['key']]=_0x3e181e['newValue'];}}function N(_0x2dd113){const _0x23cb66=P(_0x2dd113['rootName'],_0x2dd113['isAttached']());for(const _0x315a59 of _0x2dd113['getChildren']()){const _0xf6b6f0=_0x315a59['_clone'](!0x0);_0x23cb66['_appendChild'](_0xf6b6f0);}return _0x23cb66;}function P(_0x29077c,_0x3f85a4=!0x0){const _0x46364d=new gt();return _0x46364d['rootName']=_0x29077c,_0x46364d['_isAttached']=_0x3f85a4,_0x46364d['isAttached']=()=>_0x46364d['_isAttached'],_0x46364d;}function F(_0x36ad26,_0x6ef5d5,_0x435cf1){const _0xfd6153='elementEnd'==_0x36ad26['type']?_0x435cf1['createPositionAt'](_0x36ad26['item'],'end'):_0x435cf1['createPositionBefore'](_0x36ad26['item']);return _0x435cf1['createPositionFromPath'](_0x6ef5d5,_0xfd6153['path'],_0xfd6153['stickiness']);}function B(_0x4602a9,_0x36d9c2,_0x32bd5a){const _0x4b8603='elementStart'==_0x4602a9['type']?_0x32bd5a['createPositionAt'](_0x4602a9['item'],0x0):_0x32bd5a['createPositionAfter'](_0x4602a9['item']);return _0x32bd5a['createPositionFromPath'](_0x36d9c2,_0x4b8603['path'],_0x4b8603['stickiness']);}class os extends _0x1a952d{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0xd83310,_0x18956f){super(_0xd83310),this['focusTracker']=new _0x361897(),this['keystrokes']=new _0x224712(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x18956f),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'](),_0x27b1ea({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5cbf9d=_0x15265e=>_0x15265e['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5cbf9d),this['keystrokes']['set']('arrowleft',_0x5cbf9d),this['keystrokes']['set']('arrowup',_0x5cbf9d),this['keystrokes']['set']('arrowdown',_0x5cbf9d);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x28c611){this['revisionNameInputView']['fieldView']['element']['value']=_0x28c611['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x219571){const _0x4a2bd9=new nt(this['locale'],ti),_0x1c98c8=_0x4a2bd9['fieldView'];_0x1c98c8['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x8d99fd=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x219571&&(_0x8d99fd+='\x20('+g(this['locale'],'optional')+')'),(_0x4a2bd9['label']=_0x8d99fd,_0x1c98c8['on']('input',()=>{this['revisionNameInputValue']=_0x1c98c8['element']['value']['trim']();}),_0x4a2bd9);}}class f extends _0x46f453{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x4e67db=this['editor'],_0x1f9269=_0x4e67db['plugins']['get']('RevisionTracker');_0x4e67db['ui']['componentFactory']['add']('revisionHistory',_0x237f39=>{const _0x41673d=_0x206e66(_0x237f39),_0x20dd26=_0x41673d['panelView']['children'],_0x2df1ab=new _0x322c4b(_0x237f39),_0x48ed23=new te(_0x237f39),_0x1519cc=new _0x1b8fcb(_0x237f39),_0x23beb0=new te(_0x237f39),_0x2f2e80=new _0x1b8fcb(_0x237f39);return _0x41673d['bind']('isEnabled')['to'](_0x1f9269,'isReady',_0x1f9269,'isEnabled',_0x4e67db,'isReadOnly',(_0x1c7687,_0x10ffdf,_0x16c2d6)=>_0x1c7687&&_0x10ffdf&&!_0x16c2d6),_0x41673d['buttonView']['set']({'icon':_0x4cdf1c,'label':g(_0x237f39,'Revision\x20history'),'tooltip':!0x0}),_0x1519cc['set']({'label':g(_0x237f39,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x1519cc['bind']('isEnabled')['to'](_0x1f9269,'isReady',_0x1f9269,'isEnabled',_0x4e67db,'isReadOnly',(_0x49a074,_0x5c3dbe,_0x5bc88a)=>_0x49a074&&_0x5c3dbe&&!_0x5bc88a),_0x1519cc['on']('execute',()=>this['_showDialog']()),_0x2f2e80['set']({'label':g(_0x237f39,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x2f2e80['bind']('isEnabled')['to'](_0x1f9269,'isReady',_0x4e67db,'isReadOnly',(_0x41be52,_0x1516dd)=>_0x41be52&&!_0x1516dd),_0x2f2e80['on']('execute',()=>{_0x4e67db['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x41673d['isOpen']=!0x1,_0x4e67db['editing']['view']['focus']();}),_0x48ed23['children']['add'](_0x1519cc),_0x23beb0['children']['add'](_0x2f2e80),_0x2df1ab['role']='menu',_0x2df1ab['items']['addMany']([_0x48ed23,_0x23beb0]),_0x20dd26['add'](_0x2df1ab),_0x41673d;}),_0x4e67db['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x29941c=this['editor'],_0xdc9777=_0x29941c['locale'],_0x14746e=new _0x1b6528(_0xdc9777),_0xab47eb=new _0xcb4d04(_0xdc9777);_0x14746e['buttonView']['set']({'icon':_0x4cdf1c,'label':g(_0xdc9777,'Revision\x20history')});const _0x5f4309=new _0x4838e9(_0xdc9777,_0x14746e),_0x4decad=new _0x382814(_0xdc9777);_0x4decad['set']({'label':g(_0xdc9777,'Save\x20current\x20revision')}),_0x4decad['delegate']('execute')['to'](_0x14746e),_0x4decad['on']('execute',()=>{this['_showDialog']();}),_0x5f4309['children']['add'](_0x4decad),_0xab47eb['items']['add'](_0x5f4309);const _0x3657ba=new _0x4838e9(_0xdc9777,_0x14746e),_0x788afd=new _0x382814(_0xdc9777);return _0x788afd['set']({'label':g(_0xdc9777,'Open\x20revision\x20history')}),_0x788afd['delegate']('execute')['to'](_0x14746e),_0x788afd['on']('execute',()=>{_0x29941c['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x3657ba['children']['add'](_0x788afd),_0xab47eb['items']['add'](_0x3657ba),_0x14746e['panelView']['children']['add'](_0xab47eb),_0x14746e;}['_showDialog'](){const _0x3d1a58=this['editor'],_0x5e74f2=_0x3d1a58['locale'],_0x51dc0c=_0x3d1a58['plugins']['get']('Dialog'),_0x2d5611=_0x3d1a58['plugins']['get']('RevisionTracker');function _0x425703(_0x53b4b4){_0x3d1a58['config']['get']('revisionHistory.requireRevisionName')&&''===_0x53b4b4['revisionName']?_0x53b4b4['revisionNameInputView']['errorText']=g(_0x5e74f2,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x3d1a58['plugins']['get'](u)['saveRevision']({'name':_0x53b4b4['revisionName']}),_0x51dc0c['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x425703(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x51dc0c['show']({'id':'revisionSave','title':g(_0x5e74f2,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x3d1a58['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x51dc0c['hide']()},{'label':g(_0x3d1a58['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x40bbea){_0x40bbea['bind']('isEnabled')['to'](_0x2d5611,'isReady',_0x2d5611,'isEnabled',_0x3d1a58,'isReadOnly',(_0x46a240,_0x47ddf4,_0x1fa1f8)=>_0x46a240&&_0x47ddf4&&!_0x1fa1f8);},'onExecute':()=>_0x425703(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x3909e6=this['editor'],_0x124285=_0x3909e6['locale'];this['_saveRevisionFormView']=new os(_0x124285,_0x3909e6['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x1a952d{['changeId'];['_model'];constructor(_0x588987,_0x1a5d84){super(_0x588987),this['_model']=_0x1a5d84,this['changeId']=_0x1a5d84['id'];const _0x17a775=this['bindTemplate'],_0x1c9839=g(_0x588987,_0x1a5d84['data']['isSuggestion']?'Suggested\x20by':'add'==_0x1a5d84['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x1a5d84['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x17a775['to']('type',_0x623632=>'ck-revision-change__'+_0x623632)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x1c9839}]},{'text':'\x20'+_0x1a5d84['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x4c4bcc(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x160b1d){super(),this['id']=_0x160b1d['id']||_0x40eb95(),this['author']=_0x160b1d['author'],this['type']=_0x160b1d['type'],this['data']=_0x160b1d['data']||{},this['rootName']=_0x160b1d['rootName'],this['set']('createdAt',_0x160b1d['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(_0x12a44f,_0x5c2f5d){this['newRevisionId']=_0x12a44f,this['oldRevisionId']=_0x5c2f5d,this['changes']=new _0xd190b7();}['_setChanges'](_0x18d0db){for(const _0x6873cc of _0x18d0db)this['changes']['add'](_0x6873cc);}}class m extends _0x46f453{['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[_0x2e21a7,_0x50e5cc,I,V];}constructor(_0x4e9e8e){super(_0x4e9e8e),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',(_0xe53d5,_0x45a0fe,_0x33c243)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2e7ca3=>{for(const _0x13a52d of this['editor']['editing']['view']['document']['roots'])_0x33c243?_0x2e7ca3['removeClass']('ck-editor__editable__overlay',_0x13a52d):_0x2e7ca3['addClass']('ck-editor__editable__overlay',_0x13a52d);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x112e6f=>null!==_0x112e6f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5720df,_0x2fa093,_0x69f012)=>_0x5720df&&_0x69f012?_0x2fa093['changes']['getIndex'](_0x69f012):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4ae2b2,_0x35f606)=>_0x4ae2b2?_0x35f606['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x50e5cc);}['init'](){const _0x4095db=this['editor'],_0x158c31=new pt(_0x4095db,{'direction':'backward'}),_0x23f824=new pt(_0x4095db,{'direction':'forward'});(_0x4095db['commands']['add']('showPreviousChange',_0x158c31),_0x4095db['commands']['add']('showNextChange',_0x23f824),_0x4095db['commands']['add']('restoreRevision',new wt(_0x4095db)),this['on']('change:numberOfChanges',()=>{_0x158c31['refresh'](),_0x23f824['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4095db['enableReadOnlyMode']('revision-viewer'),_0x4095db['plugins']['has']('WidgetToolbarRepository'))&&_0x4095db['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x329300){return await this['_utils']['loadRevisionData'](_0x329300,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x329300);}async['getRevisionRootsAttributes'](_0x24e9ee){return await this['_utils']['loadRevisionData'](_0x24e9ee,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x24e9ee);}async['compare'](_0x4198a4,_0x1dd9b1,_0x229a47=!0x1){if(!this['isEnabled'])return;const _0x476916=this['diff'],_0x3f5ff3=this['repository'],_0xd932de='string'==typeof _0x4198a4?_0x3f5ff3['getRevision'](_0x4198a4):_0x4198a4,_0x5cdf46='string'==typeof _0x1dd9b1?_0x3f5ff3['getRevision'](_0x1dd9b1):_0x1dd9b1,_0xbcf0f4=_0xd932de['id'],_0x5c892e=_0x5cdf46?_0x5cdf46['id']:null;if(!_0x229a47&&this['diff']&&this['diff']['newRevisionId']===_0xbcf0f4&&this['diff']['oldRevisionId']===_0x5c892e)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0xbcf0f4,_0x5c892e);const _0x30efa1=this['_getRevisionsRange'](_0xd932de,_0x5cdf46,!0x0)['map'](_0x108280=>this['_utils']['loadRevisionData'](_0x108280,this['adapter']));return _0x30efa1['push'](new Promise(_0x33c338=>{setTimeout(_0x33c338,0x14);})),Promise['all'](_0x30efa1)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x354426=this['_getDiff'](_0xbcf0f4,_0x5c892e);for(const _0x3508c6 of _0x354426['changes'])this['_changeIdToChange']['set'](_0x3508c6['id'],_0x3508c6);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x56b46e=>{for(const _0x4a43c5 of this['editor']['model']['document']['getRootNames']())_0x56b46e['detachRoot'](_0x4a43c5);for(const _0x576e5b of Object['keys'](_0x354426['model'])){const _0x27b864=_0x56b46e['addRoot'](_0x576e5b);for(const _0x41c29f of Object['keys'](_0x354426['attributes'][_0x576e5b]))_0x56b46e['setAttribute'](_0x41c29f,_0x354426['attributes'][_0x576e5b][_0x41c29f],_0x27b864);_0x56b46e['insert'](_0x354426['model'][_0x576e5b],_0x27b864,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x354426['changes'])),this['isReady']=!0x0;})['catch'](_0xae3f28=>{console['error'](_0xae3f28),this['_cleanUp'](),_0x476916&&(this['diff']=_0x476916),this['isReady']=!0x0;});}['addRevisionData'](_0x51389c,_0x11abf0){const _0x5307e3=this['repository']['createRevision'](_0x51389c);return _0x5307e3['on']('_update',(_0x1d0203,_0x2c6834,_0x2108e6)=>_0x11abf0(_0x2c6834,_0x2108e6,_0x5307e3)),this['repository']['addRevision'](_0x5307e3),_0x5307e3;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x10790e=>{for(const _0xf45466 of this['editor']['model']['document']['getRootNames']())_0x10790e['detachRoot'](_0xf45466);});}['_sortAndFilterDiffChanges'](_0x462b8c){const _0x1c1ca2=[],_0x23defe=new Map();for(const _0x212a29 of this['editor']['model']['document']['getRootNames']()){const _0x43190f=this['editor']['editing']['view']['getDomRoot'](_0x212a29);if(!_0x43190f)continue;const _0x246b57=_0x43190f['getClientRects']()['item'](0x0);_0x246b57&&(_0x1c1ca2['push'](_0x212a29),_0x23defe['set'](_0x212a29,_0x246b57));}return _0x1c1ca2['sort']((_0x25ecc4,_0x50945a)=>{const _0x465ea8=_0x23defe['get'](_0x25ecc4),_0x839576=_0x23defe['get'](_0x50945a);return _0x465ea8['y']-_0x839576['y']||_0x465ea8['x']-_0x839576['x'];}),(_0x462b8c=_0x462b8c['filter'](_0x5d4b04=>_0x1c1ca2['includes'](_0x5d4b04['rootName'])))['sort']((_0x2e13ae,_0x2ff416)=>_0x1c1ca2['indexOf'](_0x2e13ae['rootName'])-_0x1c1ca2['indexOf'](_0x2ff416['rootName'])),_0x462b8c;}['_makeTape'](_0x4cc2d8){const _0x2bc37c=Array['from'](_0x4cc2d8['markers'])['filter'](([_0x54098f,_0x357d2e])=>_0x54098f['startsWith']('revision:')&&!_0x357d2e['isCollapsed']),_0x4ac2e6=Array['from'](this['editor']['model']['createRangeIn'](_0x4cc2d8)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x2bc37c['length'])for(const _0x368a39 of _0x4ac2e6){const [_0x50d735,_0x43afd8]=_0x2bc37c[0x0],[,_0x4fd47c,_0x960302]=_0x50d735['split'](':');if(_0x43afd8['end']['isEqual'](_0x368a39['nextPosition'])&&_0x2bc37c['shift'](),(_0x368a39['previousPosition']['isEqual'](_0x43afd8['start'])||_0x368a39['previousPosition']['isAfter'](_0x43afd8['start']))&&('insertion'==_0x4fd47c?_0x368a39['isAdded']={'userId':_0x960302}:'deletion'==_0x4fd47c&&(_0x368a39['isRemoved']={'userId':_0x960302})),0x0==_0x2bc37c['length'])break;}return _0x4ac2e6;}['_refreshStartEndIndex'](_0x2296f2){const _0x44795f=new Map();for(let _0x5758b1=0x0;_0x5758b1<_0x2296f2['length'];_0x5758b1++)'text'===_0x2296f2[_0x5758b1]['type']?(_0x2296f2[_0x5758b1]['item']['startIndex']=_0x5758b1,_0x2296f2[_0x5758b1]['item']['endIndex']=_0x5758b1):('elementStart'===_0x2296f2[_0x5758b1]['type']?_0x2296f2[_0x5758b1]['item']['startIndex']=_0x5758b1:'elementEnd'===_0x2296f2[_0x5758b1]['type']&&(_0x2296f2[_0x5758b1]['item']['endIndex']=_0x5758b1),_0x44795f['set'](_0x2296f2[_0x5758b1]['id'],_0x5758b1));for(const _0x35220c of _0x44795f['values']())'elementStart'===_0x2296f2[_0x35220c]['type']?_0x2296f2[_0x35220c]['item']['endIndex']=_0x44795f['get'](_0x2296f2[_0x35220c]['pairId']):'elementEnd'===_0x2296f2[_0x35220c]['type']&&(_0x2296f2[_0x35220c]['item']['startIndex']=_0x44795f['get'](_0x2296f2[_0x35220c]['pairId']));}['_processTape'](_0x2ff569){for(let _0x306dd1=0x0;_0x306dd1<_0x2ff569['length'];_0x306dd1++){if('elementStart'===_0x2ff569[_0x306dd1]['type'])_0x2ff569[_0x306dd1]['item']['startIndex']=_0x306dd1;else{if('elementEnd'===_0x2ff569[_0x306dd1]['type']){_0x2ff569[_0x306dd1]['item']['endIndex']=_0x306dd1;const _0x5c7ccc=_0x2ff569[_0x306dd1]['item']['startIndex'];_0x2ff569[_0x5c7ccc]['pairId']=_0x2ff569[_0x306dd1]['id'],_0x2ff569[_0x306dd1]['pairId']=_0x2ff569[_0x5c7ccc]['id'];}else _0x2ff569[_0x306dd1]['item']['startIndex']=_0x306dd1,_0x2ff569[_0x306dd1]['item']['endIndex']=_0x306dd1,_0x2ff569[_0x306dd1]['pairId']=null;}_0x2ff569[_0x306dd1]['markersStart']||(_0x2ff569[_0x306dd1]['markersStart']=[],_0x2ff569[_0x306dd1]['markersEnd']=[]);}}['_markInsertions'](_0x5c6f0f,_0x366d45){const _0x9f4e29=_0x5c6f0f['filter'](_0x51269b=>!_0x51269b['isAdded']);for(let _0xea5508=0x0;_0xea5508<_0x366d45['length'];_0xea5508++)_0x366d45[_0xea5508]['isAdded']&&(_0x9f4e29[_0xea5508]['isAdded']=_0x366d45[_0xea5508]['isAdded']);}['_getDiff'](_0x444861,_0x2aa529=null){const _0x53245c=this['repository']['getRevision'](_0x444861),_0x46b5f2=_0x2aa529?this['repository']['getRevision'](_0x2aa529):null,_0x1322df=this['_getRevisionsRange'](_0x53245c,_0x46b5f2),_0x338eaa=_0x1322df[_0x1322df['length']-0x1],_0x51a84d=new Map(),_0x10d315={'model':{},'attributes':{},'changes':[]},_0x51ce4c=new Set(),_0x56d456=new Map();for(let _0x66d4f8=_0x1322df['length']-0x1;_0x66d4f8>=0x0;_0x66d4f8--){const _0x5b7f6e=_0x1322df[_0x66d4f8];for(const _0x45534f of Object['keys'](_0x5b7f6e['diffData']))if(_0x5b7f6e['diffData'][_0x45534f]['attachChange']){const _0x5a6f0c=_0x5b7f6e['diffData'][_0x45534f]['attachChange'];_0x5a6f0c['isAttached']?(_0x51ce4c['add'](_0x45534f),_0x56d456['has'](_0x45534f)&&_0x56d456['get'](_0x45534f)['userId']==_0x5a6f0c['userId']?_0x56d456['delete'](_0x45534f):_0x56d456['set'](_0x45534f,_0x5a6f0c)):_0x56d456['has'](_0x45534f)?(_0x51ce4c['delete'](_0x45534f),_0x56d456['delete'](_0x45534f)):(_0x51ce4c['add'](_0x45534f),_0x56d456['set'](_0x45534f,_0x5a6f0c));}else _0x51ce4c['add'](_0x45534f);}for(const _0x293f88 of _0x51ce4c){const _0x4bfd31=_0x56d456['has'](_0x293f88)&&!_0x56d456['get'](_0x293f88)['isAttached'];let _0x37e318=_0x4bfd31?_0x1322df['length']-0x1:0x0;const _0x8c6ec3=_0x4bfd31?-0x1:0x1;for(;_0x1322df[_0x37e318];){const _0x2265f9=_0x1322df[_0x37e318];if(_0x2265f9['diffData'][_0x293f88]){const _0x52f542=_0x4bfd31?_0x2265f9['diffData'][_0x293f88]['attributesBefore']:_0x2265f9['diffData'][_0x293f88]['attributesAfter'];_0x10d315['attributes'][_0x293f88]=_0x52f542?_0x186736(_0x52f542):{};break;}_0x37e318+=_0x8c6ec3;}}for(const _0x13206a of _0x1322df){_0x13206a['model']={};for(const _0x2c8d38 of _0x13206a['authors'])_0x51a84d['set'](_0x2c8d38['id'],_0x2c8d38);for(const _0x565e55 of _0x51ce4c){const _0x2cac91=_0x13206a['diffData'][_0x565e55]?_0x13206a['diffData'][_0x565e55]['insertions']:'[]',_0x8ffca8=_0x13206a['diffData'][_0x565e55]?_0x13206a['diffData'][_0x565e55]['deletions']:'[]';_0x13206a['model'][_0x565e55]={'insertions':this['_utils']['_makeModelFromViewString'](_0x2cac91),'deletions':this['_utils']['_makeModelFromViewString'](_0x8ffca8)};}}for(const _0x192773 of _0x51ce4c){let _0x588f94=null,_0x509861=0x0;const _0xc3ec3f=new Map(Array['from'](_0x53245c['model'][_0x192773]['insertions']['markers'])['filter'](([_0x1e8e62])=>!_0x1e8e62['startsWith']('revision:')));let _0xbea9f0=0x0;for(const _0x552232 of _0x1322df){const _0x628054=this['_makeTape'](_0x552232['model'][_0x192773]['insertions']);_0x552232==_0x53245c?(_0x588f94=_0x628054,_0x509861=_0x588f94['length'],_0x588f94['forEach'](_0x1f76ca=>{_0x1f76ca['id']=_0xbea9f0++;}),this['_processTape'](_0x588f94)):this['_markInsertions'](_0x588f94,_0x628054);const _0x150a34=_0x588f94['filter'](_0x518f7f=>!_0x518f7f['isAdded'])['map'](_0x5a329d=>_0x5a329d['id']);let _0x384043=0x0;const _0x3b82e7=this['_makeTape'](_0x552232['model'][_0x192773]['deletions']);_0x3b82e7['forEach'](_0x13b12e=>{_0x13b12e['isRemoved']?_0x13b12e['id']=_0x509861++:_0x13b12e['id']=_0x150a34[_0x384043++];}),this['_processTape'](_0x3b82e7),this['_setDistance'](_0x588f94,'isAdded'),this['_setDistance'](_0x3b82e7,'isRemoved'),_0x552232==_0x53245c&&this['_markMarkers'](_0x588f94,_0xc3ec3f),_0x588f94=this['_joinTapes'](_0x588f94,_0x3b82e7),this['_refreshStartEndIndex'](_0x588f94),this['_setDistance'](_0x588f94,'isRemoved');}_0x588f94=_0x588f94['filter'](_0x3dc2ff=>!(_0x3dc2ff['isAdded']&&_0x3dc2ff['isRemoved']));const _0x31895d=new Map(_0x338eaa['model'][_0x192773]['deletions']['markers']),_0x1376d2=new Set(_0xc3ec3f['keys']());for(const _0x46af51 of _0x31895d['keys']())_0x1376d2['delete'](_0x46af51);this['_markSuggestions'](_0x588f94,_0x1376d2),this['_fixObsoleteTags'](_0x588f94),_0x588f94=this['_removeMissingPairs'](_0x588f94),_0x588f94=this['_markMismatchedRemovedTags'](_0x588f94),_0x588f94=this['_removeUnsupportedChanges'](_0x588f94);const {root:_0x5d9183,changes:_0x4c0446}=this['_makeModelFromTape'](_0x588f94,_0x51a84d,_0x192773);_0x10d315['model'][_0x192773]=_0x5d9183;const _0x5cd5d3=_0x56d456['get'](_0x192773);if(_0x5cd5d3){const _0x440af1=_0x51a84d['get'](_0x5cd5d3['userId']),_0x412fbf=new r({'author':_0x440af1,'type':_0x5cd5d3['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x192773});_0x4c0446['unshift'](_0x412fbf),_0x10d315['attributes'][_0x192773]['revisionHistoryAttachChange']=_0x412fbf['id'];}_0x10d315['changes']=_0x10d315['changes']['concat'](_0x4c0446);}return _0x10d315;}['_markMarkers'](_0x21a68e,_0x21e163){for(let _0x14ac01=0x0;_0x14ac01<_0x21a68e['length'];_0x14ac01++)for(const [_0xd1b452,_0x1465d]of _0x21e163)!_0x1465d['isCollapsed']&&_0x1465d['start']['isEqual'](_0x21a68e[_0x14ac01]['previousPosition'])&&_0x21a68e[_0x14ac01]['markersStart']['push'](_0xd1b452),_0x1465d['end']['isEqual'](_0x21a68e[_0x14ac01]['nextPosition'])&&_0x21a68e[_0x14ac01]['markersEnd']['push'](_0xd1b452);}['_joinTapes'](_0x15d476,_0xf4c055){let _0x207ac4=[],_0x25223c=0x0,_0x1a8dad=0x0;for(;_0x25223c<_0x15d476['length']||_0x1a8dad<_0xf4c055['length'];){const _0x461cfd=_0x15d476[_0x25223c]||{},_0x40607c=_0xf4c055[_0x1a8dad]||{};if(_0x461cfd['id']==_0x40607c['id'])_0x25223c++,_0x1a8dad++,_0x207ac4['push'](_0x461cfd);else{if(_0x40607c['isRemoved']&&_0x461cfd['isAdded']){const {commonTape:_0x754b5f,iEnd:_0x962a2,jEnd:_0x3e706b}=this['_threeWayMerge'](_0x15d476,_0x25223c,_0xf4c055,_0x1a8dad);_0x207ac4=_0x207ac4['concat'](_0x754b5f),_0x25223c=_0x962a2,_0x1a8dad=_0x3e706b;}else _0x40607c['isRemoved']?(_0x1a8dad++,_0x207ac4['push'](_0x40607c)):(_0x25223c++,_0x207ac4['push'](_0x461cfd));}}return _0x207ac4;}['_markSuggestions'](_0x39596b,_0x51f537){const _0x2d021e=[];for(let _0x31db33=0x0;_0x31db33<_0x39596b['length'];_0x31db33++){for(let _0x420f88=0x0;_0x420f88<_0x39596b[_0x31db33]['markersStart']['length'];_0x420f88++){const _0x503457=_0x39596b[_0x31db33]['markersStart'][_0x420f88];if(!_0x51f537['has'](_0x503457))continue;const {group:_0x147881,type:_0x19e2c2,authorId:_0xaeec04}=_0x34c03e(_0x503457);'revision-suggestion'!=_0x147881||'insertion'!=_0x19e2c2&&'deletion'!=_0x19e2c2||(_0x2d021e['unshift']({'type':_0x19e2c2,'name':_0x503457,'userId':_0xaeec04}),_0x39596b[_0x31db33]['markersStart']['splice'](_0x420f88,0x1),_0x420f88--);}_0x3aca69(_0x39596b[_0x31db33]);for(let _0x4b4c9f=0x0;_0x4b4c9f<_0x39596b[_0x31db33]['markersEnd']['length'];_0x4b4c9f++){const _0x5de77b=_0x39596b[_0x31db33]['markersEnd'][_0x4b4c9f];if(!_0x51f537['has'](_0x5de77b))continue;const {group:_0x32671a,type:_0x2d8288}=_0x34c03e(_0x5de77b);if('revision-suggestion'!=_0x32671a||'insertion'!=_0x2d8288&&'deletion'!=_0x2d8288)continue;_0x39596b[_0x31db33]['markersEnd']['splice'](_0x4b4c9f,0x1),_0x4b4c9f--;const _0x3f5f9c=_0x2d021e['findIndex'](_0xf73efb=>_0xf73efb['name']==_0x5de77b);_0x3f5f9c>-0x1&&_0x2d021e['splice'](_0x3f5f9c,0x1);}}function _0x34c03e(_0x1791e){const _0x1f568f=_0x1791e['split'](':');return{'group':_0x1f568f[0x0],'type':_0x1f568f[0x1],'subType':_0x1f568f['length']>=0x5?_0x1f568f[0x2]:null,'id':_0x1f568f['length']<0x5?_0x1f568f[0x2]:_0x1f568f[0x3],'authorId':_0x1f568f['length']<0x5?_0x1f568f[0x3]:_0x1f568f[0x4],'markerCount':0x6==_0x1f568f['length']?_0x1f568f[0x5]:null};}function _0x3aca69(_0x1dbbd5){for(let _0x3d5ab6=0x0;_0x3d5ab6<_0x2d021e['length'];_0x3d5ab6++){if(_0x1dbbd5['isAdded']&&'insertion'==_0x2d021e[_0x3d5ab6]['type']&&_0x1dbbd5['isAdded']['userId']==_0x2d021e[_0x3d5ab6]['userId'])return _0x1dbbd5['isAddSuggestion']=_0x2d021e[_0x3d5ab6],void delete _0x1dbbd5['isAdded'];if(!_0x1dbbd5['isAdded']&&!_0x1dbbd5['isRemoved']&&'deletion'==_0x2d021e[_0x3d5ab6]['type'])return void(_0x1dbbd5['isRemoveSuggestion']=_0x2d021e[_0x3d5ab6]);}}}['_setDistance'](_0x3ed273,_0x2dae45){let _0x3ef6b6=0x0,_0x47077d=!0x1;const _0x222fa2=new Map();for(const _0x4c09a1 of _0x3ed273)_0x4c09a1[_0x2dae45]?_0x47077d&&(_0x3ef6b6++,_0x47077d=!0x1):(_0x3ef6b6++,_0x47077d=!0x0),_0x222fa2['set'](_0x4c09a1['id'],_0x3ef6b6);for(let _0x566348=0x0;_0x566348<_0x3ed273['length'];_0x566348++){if('isRemoved'==_0x2dae45&&_0x3ed273[_0x566348]['isAdded']||'isAdded'==_0x2dae45&&_0x3ed273[_0x566348]['isRemoved'])continue;if('text'==_0x3ed273[_0x566348]['type']){_0x3ed273[_0x566348]['distance']=0x0;continue;}const _0x5b80e1=_0x222fa2['get'](_0x3ed273[_0x566348]['pairId']),_0x10e90d=_0x222fa2['get'](_0x3ed273[_0x566348]['id']);_0x3ed273[_0x566348]['distance']=_0x5b80e1-_0x10e90d;}}['_getRevisionsRange'](_0x19291b,_0x41b1f4,_0x119b05=!0x1){const _0x4aebd6=[];let _0x3dbbbe=this['repository']['getIndex'](_0x19291b),_0x1c0aae=this['repository']['getIndex'](_0x41b1f4);for(-0x1==_0x1c0aae&&(_0x1c0aae=this['repository']['_revisions']['length'],_0x119b05=!0x1);_0x3dbbbe<_0x1c0aae;)_0x4aebd6['push'](this['repository']['getRevision'](_0x3dbbbe)),_0x3dbbbe++;return _0x119b05&&_0x4aebd6['push'](this['repository']['getRevision'](_0x3dbbbe)),_0x4aebd6;}['_threeWayMerge'](_0xd89ffc,_0x1f49da,_0x5fbe7,_0x20115a){const _0x64f16b=this['editor']['model']['schema'];let _0x5264ba=_0x1f49da;for(;_0xd89ffc[_0x5264ba]&&_0xd89ffc[_0x5264ba]['isAdded'];)_0x5264ba++;let _0x2e1b6f=_0x20115a;for(;_0x5fbe7[_0x2e1b6f]&&_0x5fbe7[_0x2e1b6f]['isRemoved'];)_0x2e1b6f++;_0x28edc4(_0xd89ffc,_0x1f49da,_0x5264ba),_0x28edc4(_0x5fbe7,_0x20115a,_0x2e1b6f);const _0x2cb900=_0x5fbe7['slice'](_0x20115a,_0x2e1b6f)['concat'](_0xd89ffc['slice'](_0x1f49da,_0x5264ba));return _0x2cb900['sort']((_0x2f57ac,_0x53a6df)=>_0x2f57ac['side']!=_0x53a6df['side']?_0x2f57ac['side']-_0x53a6df['side']:_0x2f57ac['level']!=_0x53a6df['level']?_0x2f57ac['level']-_0x53a6df['level']:_0x2f57ac['distance']!=_0x53a6df['distance']?_0x53a6df['distance']-_0x2f57ac['distance']:!!_0x2f57ac['isAdded']!=!!_0x53a6df['isAdded']?-0x1==_0x2f57ac['side']||0x0==_0x2f57ac['side']?_0x2f57ac['isAdded']?-0x1:0x1:_0x2f57ac['isAdded']?0x1:-0x1:_0x2f57ac['index']-_0x53a6df['index']),{'commonTape':_0x2cb900,'iEnd':_0x5264ba,'jEnd':_0x2e1b6f};function _0x28edc4(_0x1699a4,_0x12f9f8,_0x389aa0){let _0x231fc8=-0x1,_0x2631f6=Number['POSITIVE_INFINITY'],_0x5425cc=!0x0;for(let _0x59ade6=_0x12f9f8;_0x59ade6<_0x389aa0;_0x59ade6++)if(_0x64f16b['isInline'](_0x1699a4[_0x59ade6]['item'])||(_0x5425cc=!0x1),_0x1699a4[_0x59ade6]['item']['startIndex']<_0x12f9f8&&(_0x231fc8=_0x59ade6),_0x1699a4[_0x59ade6]['item']['endIndex']>=_0x389aa0){_0x2631f6=_0x59ade6;break;}_0x5425cc&&(_0x231fc8=_0x389aa0-0x1);for(let _0x44810b=_0x12f9f8;_0x44810b<_0x389aa0;_0x44810b++)_0x1699a4[_0x44810b]['side']=_0x44810b<=_0x231fc8?-0x1:_0x44810b<_0x2631f6?0x0:0x1,_0x1699a4[_0x44810b]['index']=_0x44810b;let _0x5bec65=0x0;for(let _0x444cb0=_0x12f9f8;_0x444cb0<=_0x231fc8;_0x444cb0++)0x0==_0x1699a4[_0x444cb0]['distance']?_0x1699a4[_0x444cb0]['level']=_0x5bec65:(_0x5bec65++,_0x1699a4[_0x444cb0]['level']=_0x5bec65,_0x5bec65++);for(let _0x1cf430=_0x12f9f8;_0x1cf430<_0x389aa0;_0x1cf430++)0x0==_0x1699a4[_0x1cf430]['side']&&(_0x1699a4[_0x1cf430]['level']=_0x5bec65);_0x5bec65=0x0;for(let _0xccceac=_0x389aa0-0x1;_0xccceac>=_0x2631f6;_0xccceac--)0x0==_0x1699a4[_0xccceac]['distance']?_0x1699a4[_0xccceac]['level']=_0x5bec65:(_0x5bec65--,_0x1699a4[_0xccceac]['level']=_0x5bec65,_0x5bec65--);}}['_fixObsoleteTags'](_0x46a10a){const _0x4a373c=new Map(),_0x11a760=this['editor']['model']['schema'];for(let _0x28581f=0x1;_0x28581f<_0x46a10a['length'];_0x28581f++){let _0x4648a4,_0x5c88d4,_0x58ab44;const _0x5529d6=_0x46a10a[_0x28581f],_0x1568f2=_0x46a10a[_0x28581f-0x1];if('text'==_0x5529d6['type'])continue;if(_0x5529d6['type']!=_0x1568f2['type'])continue;if(!_0x11a760['isBlock'](_0x1568f2['item'])||_0x11a760['isLimit'](_0x1568f2['item']))continue;if(!_0x11a760['isBlock'](_0x5529d6['item'])||_0x11a760['isLimit'](_0x5529d6['item']))continue;if((_0x46a10a[_0x28581f]['isAdded']||_0x46a10a[_0x28581f]['isAddSuggestion'])&&_0x46a10a[_0x28581f-0x1]['isRemoved'])_0x4648a4=_0x46a10a[_0x28581f],_0x5c88d4=_0x46a10a[_0x28581f-0x1],_0x58ab44=_0x28581f-0x1;else{if(!_0x46a10a[_0x28581f]['isRemoved']||!_0x46a10a[_0x28581f-0x1]['isAdded']&&!_0x46a10a[_0x28581f-0x1]['isAddSuggestion'])continue;_0x4648a4=_0x46a10a[_0x28581f-0x1],_0x5c88d4=_0x46a10a[_0x28581f],_0x58ab44=_0x28581f;}const _0x2af812=_0x4648a4['level']==_0x5c88d4['level'],_0x47632d=Math['abs'](_0x4648a4['level'])<Math['abs'](_0x5c88d4['level'])&&0x0==_0x5c88d4['distance'];(_0x2af812||_0x47632d)&&(_0x4a373c['set'](_0x5c88d4['id'],_0x4648a4['id']),_0x46a10a['splice'](_0x58ab44,0x1),_0x28581f--,_0x4648a4['isAdded']=!0x1);}for(let _0x189ace=0x0;_0x189ace<_0x46a10a['length'];_0x189ace++)_0x4a373c['has'](_0x46a10a[_0x189ace]['pairId'])&&(_0x46a10a[_0x189ace]['pairId']=_0x4a373c['get'](_0x46a10a[_0x189ace]['pairId']));}['_removeMissingPairs'](_0x4d9a35){const _0x54f410=new Set(_0x4d9a35['map'](_0x47bb3c=>_0x47bb3c['id']));for(let _0x205b4c=0x0;_0x205b4c<_0x4d9a35['length'];_0x205b4c++)_0x54f410['has'](_0x4d9a35[_0x205b4c]['pairId'])||0x0==_0x4d9a35[_0x205b4c]['distance']||(_0x4d9a35[_0x205b4c]['isIncorrect']=!0x0);return _0x4d9a35['filter'](_0x9685a5=>!_0x9685a5['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2fd155){const _0x3c14da=new Set();for(let _0x12cd09=0x0;_0x12cd09<_0x2fd155['length'];_0x12cd09++){if(_0x3c14da['has'](_0x2fd155[_0x12cd09]['id'])&&_0x2fd155[_0x12cd09]['isRemoved']&&(_0x2fd155[_0x12cd09]['isIncorrect']=!0x0),_0x2fd155[_0x12cd09]['isIncorrect'])continue;if(0x0==_0x2fd155[_0x12cd09]['distance'])continue;if('elementStart'!=_0x2fd155[_0x12cd09]['type'])continue;if(null==_0x2fd155[_0x12cd09]['pairId'])continue;let _0x1a8b8d=_0x12cd09+0x1,_0x460af6=0x0;for(;_0x2fd155[_0x1a8b8d]['id']!=_0x2fd155[_0x12cd09]['pairId'];)'elementStart'==_0x2fd155[_0x1a8b8d]['type']?_0x460af6++:'elementEnd'==_0x2fd155[_0x1a8b8d]['type']&&_0x460af6--,_0x1a8b8d++;if(0x0!=_0x460af6){if(_0x2fd155[_0x12cd09]['isRemoved'])_0x2fd155[_0x12cd09]['isIncorrect']=!0x0;else{for(;_0x1a8b8d!=_0x12cd09;)_0x2fd155[_0x1a8b8d]['isRemoved']&&0x0!=_0x2fd155[_0x1a8b8d]['distance']&&(_0x2fd155[_0x1a8b8d]['isIncorrect']=!0x0,_0x3c14da['add'](_0x2fd155[_0x1a8b8d]['pairId'])),_0x1a8b8d--;}}}return _0x2fd155['filter'](_0x115e43=>!_0x115e43['isIncorrect']);}['_removeUnsupportedChanges'](_0x423c64){const _0x23163b=this['editor']['model']['schema'];for(let _0x5d0c6d=0x0;_0x5d0c6d<_0x423c64['length'];_0x5d0c6d++){if(!(_0x423c64[_0x5d0c6d]['isAdded']||_0x423c64[_0x5d0c6d]['isAddSuggestion']||_0x423c64[_0x5d0c6d]['isRemoved']||_0x423c64[_0x5d0c6d]['isRemoveSuggestion']))continue;if(0x0==_0x423c64[_0x5d0c6d]['distance'])continue;const _0x1d0e0f=_0x423c64[_0x5d0c6d]['item'];_0x23163b['isBlock'](_0x1d0e0f)||_0x23163b['isLimit'](_0x1d0e0f)||(_0x423c64[_0x5d0c6d]['isAdded']&&delete _0x423c64[_0x5d0c6d]['isAdded'],_0x423c64[_0x5d0c6d]['isAddSuggestion']&&delete _0x423c64[_0x5d0c6d]['isAddSuggestion'],_0x423c64[_0x5d0c6d]['isRemoveSuggestion']&&delete _0x423c64[_0x5d0c6d]['isRemoveSuggestion'],_0x423c64[_0x5d0c6d]['isRemoved']&&(_0x423c64[_0x5d0c6d]['isIncorrect']=!0x0));}return _0x423c64['filter'](_0x452551=>!_0x452551['isIncorrect']);}['_makeModelFromTape'](_0x44e342,_0x458348,_0x252502){const _0x18bacc=new gt(),_0x26c545=[],_0x3d27ff=new Map(),_0x8c34a6=this['editor']['model'],_0x472a3d=_0x8c34a6['schema'],_0x429f33=[_0x18bacc],_0x1b9806={},_0x5e944e={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5a7811=null;const _0x3eb72e=[0x0];for(let _0x8601ae=0x0;_0x8601ae<_0x44e342['length'];_0x8601ae++)if('elementStart'===_0x44e342[_0x8601ae]['type']){_0x44e342[_0x8601ae]['previousPosition']=_0x8c34a6['createPositionFromPath'](_0x18bacc,_0x3eb72e);const _0x2c331b=new ut(_0x44e342[_0x8601ae]['item']['name'],_0x44e342[_0x8601ae]['item']['getAttributes']());_0x429f33[0x0]['_appendChild'](_0x2c331b),_0x3eb72e['push'](0x0),_0x429f33['unshift'](_0x2c331b),_0x44e342[_0x8601ae]['nextPosition']=_0x8c34a6['createPositionFromPath'](_0x18bacc,_0x3eb72e);}else'elementEnd'===_0x44e342[_0x8601ae]['type']?(_0x429f33['shift'](),_0x44e342[_0x8601ae]['previousPosition']=_0x8c34a6['createPositionFromPath'](_0x18bacc,_0x3eb72e),_0x3eb72e['pop'](),_0x3eb72e[_0x3eb72e['length']-0x1]++,_0x44e342[_0x8601ae]['nextPosition']=_0x8c34a6['createPositionFromPath'](_0x18bacc,_0x3eb72e)):(_0x44e342[_0x8601ae]['previousPosition']=_0x8c34a6['createPositionFromPath'](_0x18bacc,_0x3eb72e),_0x5a7811?_0x5a7811['_data']+=_0x44e342[_0x8601ae]['item']['data']:_0x5a7811=new mt(_0x44e342[_0x8601ae]['item']['data'],_0x44e342[_0x8601ae]['item']['getAttributes']()),_0x44e342[_0x8601ae+0x1]&&'text'===_0x44e342[_0x8601ae+0x1]['type']&&_0x12f373(_0x5a7811,_0x44e342[_0x8601ae+0x1]['item'])||(_0x429f33[0x0]['_appendChild'](_0x5a7811),_0x5a7811=null),_0x3eb72e[_0x3eb72e['length']-0x1]+=_0x44e342[_0x8601ae]['item']['offsetSize'],_0x44e342[_0x8601ae]['nextPosition']=_0x8c34a6['createPositionFromPath'](_0x18bacc,_0x3eb72e));for(let _0x1789e2=0x0;_0x1789e2<_0x44e342['length'];_0x1789e2++){const _0x1e0135=_0x44e342[_0x1789e2]['previousPosition'],_0x44606f=_0x44e342[_0x1789e2]['nextPosition'];for(const _0xa64c1 of _0x44e342[_0x1789e2]['markersStart'])_0x3d27ff['set'](_0xa64c1,{'start':_0x1e0135,'end':null});_0xca6a35('isRemoveSuggestion',_0x1789e2,_0x1e0135,_0x44606f),_0xca6a35('isAddSuggestion',_0x1789e2,_0x1e0135,_0x44606f),_0xca6a35('isRemoved',_0x1789e2,_0x1e0135,_0x44606f),_0xca6a35('isAdded',_0x1789e2,_0x1e0135,_0x44606f);for(const _0x101c2e of _0x44e342[_0x1789e2]['markersEnd']){const _0x4c13a1=_0x3d27ff['get'](_0x101c2e);_0x4c13a1?_0x4c13a1['end']=_0x44606f:_0x3d27ff['set'](_0x101c2e,{'start':_0x44606f,'end':_0x44606f});}}for(const [_0x5cf697,_0x4e01cd]of _0x3d27ff){const _0x87034d=this['editor']['model']['createRange'](_0x4e01cd['start'],_0x4e01cd['end']);_0x18bacc['markers']['set'](_0x5cf697,_0x87034d);}return _0x26c545['sort']((_0x1cefba,_0x173179)=>{const _0x443f3b=_0x18bacc['markers']['get']('revision:'+_0x1cefba['id']),_0x1b9cf9=_0x18bacc['markers']['get']('revision:'+_0x173179['id']);return _0x443f3b['start']['isBefore'](_0x1b9cf9['start'])?-0x1:_0x443f3b['start']['isAfter'](_0x1b9cf9['start'])?0x1:_0x443f3b['end']['isBefore'](_0x1b9cf9['end'])?-0x1:_0x443f3b['end']['isAfter'](_0x1b9cf9['end'])?0x1:'add'===_0x1cefba['type']?-0x1:0x1;}),{'root':_0x18bacc,'changes':_0x26c545};function _0xca6a35(_0x48d443,_0xc0a11e,_0x477018,_0x4b4d53){const _0x543509=!!_0x44e342[_0xc0a11e][_0x48d443],_0x2c16c9=_0x543509?_0x44e342[_0xc0a11e][_0x48d443]['userId']:null,_0x15d155=_0xc0a11e===_0x44e342['length']-0x1,_0x443418=_0x5e944e[_0x48d443][0x0],_0x36c0d3=_0x472a3d['isObject'](_0x44e342[_0xc0a11e]['item']);!_0x1b9806[_0x48d443]&&_0x543509?_0x1b9806[_0x48d443]={'start':_0x477018,'tapeItem':_0x44e342[_0xc0a11e],'userId':_0x2c16c9,'type':_0x48d443}:_0x1b9806[_0x48d443]&&!_0x543509?(_0x1b9806[_0x48d443]['end']=_0x477018,_0x5cfe82(_0x1b9806[_0x48d443]),_0x1b9806[_0x48d443]=null):_0x1b9806[_0x48d443]&&_0x543509&&_0x1b9806[_0x48d443]['userId']!==_0x2c16c9&&(_0x1b9806[_0x48d443]['end']=_0x477018,_0x443418&&_0x443418['userId']===_0x1b9806[_0x48d443]['userId']||_0x5cfe82(_0x1b9806[_0x48d443]),_0x1b9806[_0x48d443]={'start':_0x477018,'tapeItem':_0x44e342[_0xc0a11e],'userId':_0x2c16c9,'type':_0x48d443}),_0x1b9806[_0x48d443]&&_0x36c0d3&&('elementStart'!==_0x44e342[_0xc0a11e]['type']||_0x443418&&_0x443418['userId']===_0x2c16c9||_0x5e944e[_0x48d443]['unshift']({'userId':_0x2c16c9,'object':_0x44e342[_0xc0a11e]['item'],'change':_0x1b9806[_0x48d443]}),'elementEnd'===_0x44e342[_0xc0a11e]['type']&&_0x443418&&_0x443418['object']===_0x44e342[_0xc0a11e]['item']&&(_0x5e944e[_0x48d443]['shift'](),_0x1b9806[_0x48d443]=_0x443418['change'])),_0x1b9806[_0x48d443]&&_0x15d155&&(_0x1b9806[_0x48d443]['end']=_0x4b4d53,_0x5cfe82(_0x1b9806[_0x48d443]),_0x1b9806[_0x48d443]=null);}function _0x5cfe82({start:_0xe8a212,end:_0x405409,tapeItem:_0x48ebcf,userId:_0x1da5a7,type:_0x5c00eb}){const _0x45522f=_0x48ebcf['item'],_0x239ac0=_0x8c34a6['schema']['isBlock'](_0x45522f)&&!_0x8c34a6['schema']['isLimit'](_0x45522f),_0x5488b2=_0xe8a212['nodeAfter']==_0x405409['parent']&&_0x405409['isAtStart'];if(_0x239ac0&&_0x5488b2)return;const _0x34d4d0=_0x8c34a6['createRange'](_0xe8a212,_0x405409),_0xefafb6=_0x458348['get'](_0x1da5a7),_0x2175e2=new r({'author':_0xefafb6,'type':'isAdded'==_0x5c00eb||'isAddSuggestion'==_0x5c00eb?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5c00eb||'isRemoveSuggestion'==_0x5c00eb},'createdAt':new Date(),'rootName':_0x252502});_0x26c545['push'](_0x2175e2),_0x18bacc['markers']['set']('revision:'+_0x2175e2['id'],_0x34d4d0);}function _0x12f373(_0x485638,_0x43afa0){const _0x262117=_0x485638['getAttributes'](),_0x1b67c8=_0x43afa0['getAttributes']();for(const _0x2b5fd5 of _0x262117){if(_0x2b5fd5[0x1]!==_0x43afa0['getAttribute'](_0x2b5fd5[0x0]))return!0x1;_0x1b67c8['next']();}return _0x1b67c8['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x4a14ba=>{const _0x42d58e=_0x4a14ba['markerName']['split'](':')[0x1],_0x548932=this['_getChangeFromId'](_0x42d58e);if(!_0x548932)return null;const _0x57696a='add'==_0x548932['type']?'insertion':'deletion',_0xa4010=['ck-suggestion-marker','ck-suggestion-marker-'+_0x57696a];return _0x548932['data']['isSuggestion']&&_0xa4010['push']('ck-suggestion-marker-'+_0x57696a+'-new'),this['activeChange']==_0x548932&&_0xa4010['push']('ck-suggestion-marker--active'),{'classes':_0xa4010,'attributes':{'data-change-id':_0x42d58e}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x18cdf8=>{_0x18cdf8['on']('element:pre',(_0x5b3140,_0x5708de,_0x768b92)=>{const _0x5823f9=_0x5708de['viewItem']['getChild'](0x0);if(!_0x5823f9||!_0x5823f9['is']('element','code'))return;if(!_0x768b92['consumable']['consume'](_0x5823f9,{'attributes':['vid_start','vid_end']}))return;const _0x31eb24=_0x5708de['modelRange']['start']['nodeAfter'];_0x768b92['writer']['setAttribute']('vid_start',_0x5823f9['getAttribute']('vid_start'),_0x31eb24),_0x768b92['writer']['setAttribute']('vid_end',_0x5823f9['getAttribute']('vid_end'),_0x31eb24);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1efe56=>{_0x1efe56['on']('element',(_0x8a1f7,_0x1314c8,_0x400fab)=>{if(!_0x400fab['consumable']['consume'](_0x1314c8['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1314c8['modelRange']['isCollapsed'])return;const _0xd14092=_0x1314c8['modelRange']['start']['nodeAfter'];_0xd14092['hasAttribute']('vid_start')||_0xd14092['hasAttribute']('vid')||(_0x400fab['writer']['setAttribute']('vid_start',_0x1314c8['viewItem']['getAttribute']('vid_start'),_0xd14092),_0x400fab['writer']['setAttribute']('vid_end',_0x1314c8['viewItem']['getAttribute']('vid_end'),_0xd14092));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1713f6=>_0x1713f6['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x514ab1,[,_0x1551a1])=>{['vid_start','vid_end','vid']['includes'](_0x1551a1)&&(_0x514ab1['return']=!0x0,_0x514ab1['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x29d841=>{_0x29d841['on']('attribute:vid',(_0x14a5d9,_0x3ba653,_0x12ecc9)=>{if('\x20'!=_0x3ba653['item']['data']||_0x3ba653['item']['parent']['maxOffset']>0x1)return;if(!_0x12ecc9['consumable']['consume'](_0x3ba653['item'],_0x14a5d9['name']))return;const _0x38fb5b=_0x12ecc9['writer'],_0x526812=_0x12ecc9['mapper']['toViewRange'](_0x3ba653['range']);_0x38fb5b['wrap'](_0x526812,_0x38fb5b['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x3206d1){const _0x51584c=_0x3206d1['plugins']['get']('RevisionViewer');return(_0x3ad487,_0x57ef0e,_0x5e5ce5)=>{const _0x4bf33c=_0x57ef0e['markerName']['split'](':')[0x1],_0x231d64=_0x51584c['_getChangeFromId'](_0x4bf33c);if(!_0x231d64)return null;const _0x1a2d97='add'==_0x231d64['type']?'split':'merge';if(!_0x5e5ce5['consumable']['test'](_0x57ef0e['markerRange'],_0x3ad487['name']))return;const _0x1b48cc=_0x57ef0e['markerRange']['getWalker'](),_0x213ea6=_0x57ef0e['markerRange']['start'],_0x5c89a1=_0x3206d1['model']['schema'];let _0x3102dd=null,_0x21540d=null,_0x57a686=!0x1,_0x5c9dd9=!0x1;for(const _0x4410e2 of _0x1b48cc){const _0x17127f=_0x4410e2['item'];_0x57a686=_0x57a686||_0x5c89a1['isContent'](_0x17127f);const _0x51e570=_0x5e5ce5['mapper']['toViewElement'](_0x17127f);if(_0x51e570&&_0x51e570['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4410e2['type']&&(_0x5c89a1['isBlock'](_0x17127f)&&!_0x5c89a1['isLimit'](_0x17127f)&&(_0x17127f['nextSibling']||_0x213ea6['isAtEnd']?_0x3102dd&&_0x3102dd['parent']==_0x17127f||(_0x3102dd=_0x17127f,_0x146369(_0x4410e2['previousPosition']),_0x5c9dd9=!0x0):_0x21540d=_0x21540d||_0x4410e2['previousPosition']));}function _0x146369(_0x581c1a){const _0x3e1116=_0x5e5ce5['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1a2d97}),_0x2ea787=_0x5e5ce5['mapper']['toViewPosition'](_0x581c1a);_0x231d64['data']['isSuggestion']&&_0x5e5ce5['writer']['addClass']('ck-suggestion-marker-'+_0x1a2d97+'-new',_0x3e1116),_0x51584c['activeChange']==_0x231d64&&_0x5e5ce5['writer']['addClass']('ck-suggestion-marker--active',_0x3e1116),_0x5e5ce5['writer']['insert'](_0x2ea787,_0x3e1116),_0x5e5ce5['mapper']['bindElementToMarker'](_0x3e1116,_0x57ef0e['markerName']);}_0x57a686||_0x5c9dd9||!_0x21540d||_0x146369(_0x21540d);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xb8443f,_0x1a592b,_0x5c5671)=>{const _0x4756ef=_0x5c5671['mapper']['markerNameToElements'](_0x1a592b['markerName']);if(_0x4756ef){for(const _0x481310 of _0x4756ef)(_0x481310['hasClass']('ck-suggestion-marker-split')||_0x481310['hasClass']('ck-suggestion-marker-merge'))&&(_0x5c5671['mapper']['unbindElementFromMarkerName'](_0x481310,_0x1a592b['markerName']),_0x5c5671['writer']['remove'](_0x481310));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x2ef639,_0x2388f7,_0x144f82)=>{const _0x39ba9c=_0x2388f7['markerName']['split'](':')[0x1],_0x6c54de=this['_getChangeFromId'](_0x39ba9c);if(!_0x6c54de)return null;const _0x20729f='add'==_0x6c54de['type']?'split':'merge';if(_0x144f82['consumable']['test'](_0x2388f7['markerRange'],_0x2ef639['name']))for(const _0x4a6806 of _0x2388f7['markerRange']['getItems']()){if(!_0x4a6806['is']('element','softBreak'))continue;const _0x2ce503=_0x144f82['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x20729f}),_0x843a62=_0x144f82['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4a6806));_0x6c54de['data']['isSuggestion']&&_0x144f82['writer']['addClass']('ck-suggestion-marker-'+_0x20729f+'-new',_0x2ce503),this['activeChange']==_0x6c54de&&_0x144f82['writer']['addClass']('ck-suggestion-marker--active',_0x2ce503),_0x144f82['writer']['insert'](_0x843a62,_0x2ce503),_0x144f82['mapper']['bindElementToMarker'](_0x2ce503,_0x2388f7['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1fa8b8=>{for(const _0x21ae18 of this['editor']['model']['document']['getRootNames']()){const _0xdc7d56=this['editor']['model']['document']['getRoot'](_0x21ae18),_0x14f392=this['editor']['editing']['view']['document']['getRoot'](_0x21ae18);if(_0x14f392){const _0x2b61a2=_0xdc7d56['getAttribute']('revisionHistoryAttachChange');if(_0x1fa8b8['removeAttribute']('data-change-id',_0x14f392),_0x1fa8b8['removeClass']('ck-revision-history-root-add',_0x14f392),_0x1fa8b8['removeClass']('ck-revision-history-root-remove',_0x14f392),_0x1fa8b8['removeClass']('ck-revision-history-root--active',_0x14f392),_0x2b61a2){const _0x5deff2=this['_getChangeFromId'](_0x2b61a2);if(!_0x5deff2)return null;_0x1fa8b8['setAttribute']('data-change-id',_0x2b61a2,_0x14f392),_0x1fa8b8['addClass']('ck-revision-history-root-'+_0x5deff2['type'],_0x14f392),this['activeChange']==_0x5deff2&&_0x1fa8b8['addClass']('ck-revision-history-root--active',_0x14f392);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4e834b=>'revision-comment:'+_0x4e834b,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2719f9=>'revision-suggestion:'+_0x2719f9,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x5b157d=>({'name':'suggestion:'+_0x5b157d,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x15bfb9=>{const _0xdf4ea=_0x15bfb9['markerName']['split'](':')[0x1];return'insertion'!=_0xdf4ea&&'deletion'!=_0xdf4ea?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0xdf4ea]};}}),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',(_0x27384a,_0x333212,_0x42d727)=>{const _0x1e39bd=_0x42d727['mapper']['markerNameToElements'](_0x333212['markerName']);if(_0x1e39bd){for(const _0x3bdfb3 of _0x1e39bd)_0x3bdfb3['is']('uiElement')&&(_0x42d727['mapper']['unbindElementFromMarkerName'](_0x3bdfb3,_0x333212['markerName']),_0x42d727['writer']['remove'](_0x3bdfb3));}},{'priority':'high'});}['_getChangeFromId'](_0x2350f4){return this['_changeIdToChange']['get'](_0x2350f4);}['_getViewForChange'](_0x3fa08f){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x3fa08f),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2c6379,_0x42c458,_0xc77ce1,_0x44b67d)=>{_0x44b67d&&this['_balloon']['remove'](_0x44b67d),_0xc77ce1&&(this['_balloon']['add']({'view':_0xc77ce1,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2c30f9=this['editor']['editing'],_0x38cfff=this['_getChangeFromId'](_0xc77ce1['changeId']);let _0x987736;if(_0x38cfff['data']['isOnRoot']){const _0x1fb553=_0x2c30f9['view']['getDomRoot'](_0x38cfff['rootName']);_0x987736=Array['from'](_0x1fb553['getClientRects']());}else{const _0x9528f6=this['editor']['model']['markers']['get']('revision:'+_0xc77ce1['changeId']);_0x987736=Array['from'](_0x2c30f9['mapper']['markerNameToElements'](_0x9528f6['name']))['map'](_0x145cc7=>_0x2c30f9['view']['domConverter']['mapViewToDom'](_0x145cc7))['map'](_0x17d4e9=>Array['from'](_0x17d4e9['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x987736[0x0];return _0x987736['find'](_0x342e7a=>_0x342e7a['top']-0x3<=this['_activeViewTarget']['y']&&_0x342e7a['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x342e7a['left']-0x3<=this['_activeViewTarget']['x']&&_0x342e7a['right']+0x3>=this['_activeViewTarget']['x'])||_0x987736[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x218798,_0x53f916,_0x39f794,_0x404774)=>{this['activeView']=_0x39f794?this['_getViewForChange'](_0x39f794):null,this['editor']['model']['change'](()=>{const _0x53ffbf=this['editor']['editing'];_0x404774&&(_0x404774['data']['isOnRoot']?_0x53ffbf['view']['change'](_0x15e474=>{_0x15e474['removeClass']('ck-revision-history-root--active',_0x53ffbf['view']['document']['getRoot'](_0x404774['rootName']));}):_0x53ffbf['reconvertMarker']('revision:'+_0x404774['id'])),_0x39f794&&(_0x39f794['data']['isOnRoot']?_0x53ffbf['view']['change'](_0x18a6e1=>{_0x18a6e1['addClass']('ck-revision-history-root--active',_0x53ffbf['view']['document']['getRoot'](_0x39f794['rootName']));}):_0x53ffbf['reconvertMarker']('revision:'+_0x39f794['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x21f020,_0x4bc796)=>{if(this['activeChange'])return;const _0x18c6ca=this['_findChangeIdFromDomTarget'](_0x4bc796['target']),_0x5ec684=this['_changeIdToChange']['get'](_0x18c6ca);_0x5ec684?(this['_activeViewTarget']={'x':_0x4bc796['domEvent']['x'],'y':_0x4bc796['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x5ec684)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3a37d1,_0x3187a8)=>{const _0x20eb99=this['_findChangeIdFromDomTarget'](_0x3187a8['target']),_0x108b7d=this['_changeIdToChange']['get'](_0x20eb99);_0x108b7d?(this['_activeViewTarget']={'x':_0x3187a8['domEvent']['x'],'y':_0x3187a8['domEvent']['y']},_0x108b7d===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x108b7d):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x2ce0d0){do{const _0x29fd3=_0x2ce0d0['getAttribute']('data-change-id');if(_0x29fd3)return _0x29fd3;_0x2ce0d0=_0x2ce0d0['parent'];}while(_0x2ce0d0);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0xff15c2=>{for(const _0x36ad0f of this['editor']['model']['markers'])_0xff15c2['removeMarker'](_0x36ad0f);});}}function X(_0x46d0ea,_0x1a63c5){return(_0x501f09,_0x2357c4,_0x62b6b0)=>{if(!_0x62b6b0['consumable']['test'](_0x2357c4['markerRange'],_0x501f09['name']))return;const _0x210112=_0x2357c4['markerRange']['getWalker'](),_0x9811a3=_0x2357c4['markerRange']['start'],_0x30b811=_0x46d0ea['model']['schema'];let _0x37649b=null,_0x13f6a4=null,_0x36d617=!0x1,_0x13d283=!0x1;for(const _0x5dcd37 of _0x210112){const _0x402686=_0x5dcd37['item'];_0x36d617=_0x36d617||_0x30b811['isContent'](_0x402686);const _0x1cdbd5=_0x62b6b0['mapper']['toViewElement'](_0x402686);if(_0x1cdbd5&&_0x1cdbd5['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5dcd37['type']&&(_0x30b811['isBlock'](_0x402686)&&!_0x30b811['isLimit'](_0x402686)&&(_0x402686['nextSibling']||_0x9811a3['isAtEnd']?_0x37649b&&_0x37649b['parent']==_0x402686||(_0x37649b=_0x402686,_0x470ed7(_0x5dcd37['previousPosition']),_0x13d283=!0x0):_0x13f6a4=_0x13f6a4||_0x5dcd37['previousPosition']));}function _0x470ed7(_0x5d7038){const _0x512617=_0x62b6b0['mapper']['toViewPosition'](_0x5d7038),_0x207e71=_0x62b6b0['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1a63c5});_0x62b6b0['writer']['insert'](_0x512617,_0x207e71),_0x62b6b0['mapper']['bindElementToMarker'](_0x207e71,_0x2357c4['markerName']);}_0x36d617||_0x13d283||!_0x13f6a4||_0x470ed7(_0x13f6a4);};}class wt extends _0x5df545{constructor(_0x437d2c){super(_0x437d2c);const _0x218ff2=_0x437d2c['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x218ff2,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x218ff2,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4583b3=this['editor'],_0x2fab06=_0x4583b3['plugins']['get'](m),_0x1cf3f6=_0x2fab06['isReady']?_0x2fab06['diff']['newRevisionId']:null;_0x4583b3['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1cf3f6);}['refresh'](){const {isReady:_0x46051c,isEnabled:_0x68a2da,repository:_0x5bcb8f,diff:_0x5088a3}=this['editor']['plugins']['get'](m),_0x233c95=_0x5088a3&&_0x5bcb8f['getLaterVisibleRevision'](_0x5088a3['newRevisionId']);this['isEnabled']=_0x46051c&&_0x68a2da&&Boolean(_0x233c95);}}class pt extends _0x5df545{['_step'];constructor(_0x384a6d,{direction:_0x211677}){super(_0x384a6d);const _0x2d39f6=_0x384a6d['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x211677?0x1:-0x1,this['listenTo'](_0x2d39f6,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2d39f6,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2d39f6,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x53211e=this['editor'],_0x473364=_0x53211e['plugins']['get'](m),{isNavigationMode:_0x268b83,currentChangeNumber:_0x14d458}=_0x473364;let _0x8cb546;if(_0x473364['activeChange']=_0x268b83?_0x473364['diff']['changes']['get'](_0x14d458+this['_step']):_0x473364['diff']['changes']['first'],_0x473364['activeChange']['data']['isOnRoot'])_0x8cb546=_0x53211e['editing']['view']['getDomRoot'](_0x473364['activeChange']['rootName']);else{const _0x5929b0=_0x53211e['model']['markers']['get']('revision:'+_0x473364['activeChange']['id']);_0x8cb546=_0x24de38(_0x53211e['editing'],_0x5929b0);}_0x47aff1({'target':_0x8cb546,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x577fdf,currentChangeNumber:_0x1bb10c,numberOfChanges:_0xbd89a4,isReady:_0x1f7cde,isEnabled:_0x4ce4f3}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x4ce4f3&&_0x1f7cde&&_0xbd89a4)&&(!_0x577fdf||(0x1===this['_step']?_0x1bb10c<_0xbd89a4-0x1:_0x1bb10c>0x0));}}class _i extends _0x1a952d{constructor(_0x5ddb19){super(_0x5ddb19);const _0x5e49d1=this['bindTemplate'],_0x3e8d42=new _0x1b8fcb(_0x5ddb19),_0x14575f=new _0x1b8fcb(_0x5ddb19);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',(_0x4e098e,_0x4b5955)=>_0x4e098e&&_0x4b5955>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3502d1,_0x2b1e2d,_0xfd87a8,_0x1283ce)=>{if(!_0x3502d1)return g(_0x5ddb19,'Loading...');if(!_0xfd87a8)return g(_0x5ddb19,'No\x20changes');const _0x5e32aa=g(_0x5ddb19,'NUMBER_OF_CHANGES',_0xfd87a8);return _0x1283ce?g(_0x5ddb19,'X_OF_Y_CHANGES',[_0x2b1e2d+0x1,_0xfd87a8]):_0x5e32aa;}),_0x3e8d42['set']({'label':g(_0x5ddb19,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x43cc35}),_0x14575f['set']({'label':g(_0x5ddb19,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x1589e8}),_0x3e8d42['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x14575f['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x3e8d42['on']('execute',()=>this['fire']('execute','backward')),_0x14575f['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',_0x5e49d1['if']('_isStatusLabelVisible','ck-hidden',_0x29741b=>!_0x29741b)]},'children':[{'text':_0x5e49d1['to']('isNavigationMode',_0x30ae39=>_0x30ae39?g(_0x5ddb19,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x5ddb19,'Total')+':\x20')}]},{'text':_0x5e49d1['to']('_statusText')}]},new _0x5582a4(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x3e8d42,_0x14575f]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x46f453{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x591399=this['editor']['editing']['view'];_0x591399['change'](_0x32bcf9=>{for(const _0x505b34 of _0x591399['document']['roots'])_0x32bcf9['addClass'](ce,_0x505b34);});}['hide'](){const _0x5b8173=this['editor']['editing']['view'];_0x5b8173['change'](_0x2fd52f=>{for(const _0x1bcde1 of _0x5b8173['document']['roots'])_0x2fd52f['removeClass'](ce,_0x1bcde1);});}}class R extends _0x46f453{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x92dda3=this['editor'],_0xeccbe4=_0x92dda3['plugins']['get'](m),_0x399de8=_0x92dda3['plugins']['get'](le);_0x92dda3['ui']['componentFactory']['add']('exitToEditing',_0x5586ca=>{const _0x5344b7=new _0x1b8fcb(_0x5586ca);return _0x5344b7['set']({'label':g(_0x5586ca,'Back\x20to\x20editing'),'icon':_0x35b496,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5344b7,'execute',()=>{_0x92dda3['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5344b7;}),_0x92dda3['ui']['componentFactory']['add']('restoreRevision',_0x3045c1=>{const _0x130060=new _0x1b8fcb(_0x3045c1);return _0x130060['set']({'label':g(_0x3045c1,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x130060['bind']('isEnabled')['to'](_0x92dda3['commands']['get']('restoreRevision')),this['listenTo'](_0x130060,'execute',()=>_0x92dda3['execute']('restoreRevision')),_0x130060;}),_0x92dda3['ui']['componentFactory']['add']('changesNavigation',_0x299e6a=>{const _0x19e58d=new _i(_0x299e6a),_0x5641a9=_0x92dda3['commands']['get']('showPreviousChange'),_0x3f50a4=_0x92dda3['commands']['get']('showNextChange');return _0x19e58d['bind']('isBackwardNavigationEnabled')['to'](_0x5641a9,'isEnabled'),_0x19e58d['bind']('isForwardNavigationEnabled')['to'](_0x3f50a4,'isEnabled'),_0x19e58d['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xeccbe4),this['listenTo'](_0x19e58d,'execute',(_0xf8ccfd,_0x3225b3)=>{_0x92dda3['execute']('forward'===_0x3225b3?'showNextChange':'showPreviousChange');}),_0x19e58d;}),_0x399de8['show'](),_0xeccbe4['on']('change:isReady',(_0x30b7de,_0x1aafd4,_0x1642f1)=>{_0x1642f1?_0x399de8['hide']():_0x399de8['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x50575d,_0xec1593){super(_0x50575d,_0xec1593);const _0x46a81d=this['bindTemplate'];this['set']({'label':g(_0x50575d,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x50575d,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x46a81d['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 _0x50096f=this['fieldView']['element'];this['_tooltipString']=_0x50096f['scrollWidth']>_0x50096f['clientWidth']&&_0x50096f['value']||'';}}class oi extends _0x1a952d{constructor(_0x298c40,_0xb5586e,_0x3cdfb9){super(_0x298c40);const _0x41adac=new _0x5530bb();_0x41adac['set']({'content':_0x5e6cf6,'viewBox':'0\x200\x2011\x2010'});const _0x1abba5=['ck','ck-revision-history-sidebar__revision-author'];_0x3cdfb9&&_0x1abba5['push']('ck-revision-history-sidebar__revision-author_creator');const _0x324302=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x298c40,_0x3cdfb9?'Revision\x20creator':'Revision\x20author')},'children':[_0x41adac,_0xb5586e['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x1abba5},'children':_0x324302});}}function ni(_0x273014,_0x45b014){const _0x291a78=_0x273014['bindTemplate'],_0x2077b2=_0x273014['locale'],_0x98e8a4=_0x206e66(_0x2077b2);_0x98e8a4['panelPosition']='sw';const _0xc32c94=function(_0x210a88,_0x30f992){const _0x44d90b=function(_0x48b1ab,_0x8a0915){const _0x5a8a4e=_0x48b1ab['locale'],_0x31e1ac={'Compare\x20against\x20selected':g(_0x5a8a4e,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x5a8a4e,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x5a8a4e,'Restore\x20this\x20revision')};return _0x8a0915['map'](_0x5f38a0=>{const _0x5eba41=_0x31e1ac[_0x5f38a0['name']];return _0x5eba41&&_0x5eba41!==_0x5f38a0['name']&&(_0x5f38a0['name']=_0x5eba41),_0x5f38a0;});}(_0x210a88,_0x30f992),_0x369754=new _0xd190b7();for(const _0x40e55a of _0x44d90b){const _0x3b10ef={'type':'button','model':new to({'label':_0x40e55a['name'],'class':_0x40e55a['class'],'withText':!0x0,'role':'menuitem','_action':_0x40e55a['action']})};_0x3b10ef['model']['bind']('isEnabled')['to'](_0x210a88,'isActionsDropdownOpen',_0x3dea9c=>'function'!=typeof _0x40e55a['isEnabled']||(!_0x3dea9c||_0x40e55a['isEnabled'](_0x210a88))),_0x369754['add'](_0x3b10ef);}return _0x369754;}(_0x273014,_0x45b014);return _0x273014['bind']('isActionsDropdownOpen')['to'](_0x98e8a4,'isOpen'),_0x98e8a4['buttonView']['set']({'label':g(_0x2077b2,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0xfb727e}),_0x98e8a4['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x291a78['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x291a78['to'](_0x460019=>_0x460019['stopPropagation']())}}),_0x98e8a4['on']('execute',_0x20eb48=>{_0x273014['isReady']&&'function'==typeof _0x20eb48['source']['_action']&&_0x20eb48['source']['_action'](_0x273014);}),_0x4d0c03(_0x98e8a4,_0xc32c94,{'role':'menu'}),_0x98e8a4['listenTo'](_0x273014,'change:isActionsDropdownOpen',(_0x58a990,_0x3f2362,_0x12b062)=>{if(_0x12b062)for(const _0x4872ac of _0x98e8a4['listView']['items']){const _0x565f48=_0x4872ac['children']['first'],_0x389fd8=_0x45b014['find'](_0x5033f4=>_0x5033f4['action']===_0x565f48['_action'])['isVisible'];_0x4872ac['isVisible']=void 0x0===_0x389fd8||_0x389fd8(_0x273014);}}),_0x98e8a4;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x1fae21,uid as _0x498586,Collection as _0x2a9213,logWarning as _0x2a2f93,FocusTracker as _0x1abf6e,KeystrokeHandler as _0x39fef4,scrollViewportToShowTarget as _0x40b14f,ResizeObserver as nt,ElementReplacer as ot,CKEditorError as _0x2b5225}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x74c535,set as _0x6d4807,unset as _0x7ce151,isEqual as _0x3ea6af}from'es-toolkit/compat';import{Plugin as _0x37aa98,PendingActions as _0x3d5281,Command as _0x5123c0,ElementApiMixin as _0x376351,Editor as _0x56567c}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x3c957c,getMarkerDomElement as _0x2e5ebc,ConfirmMixin as _0x36d32c,sanitizeEditorConfig as _0x44ead7}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x18e66d,ViewAttributeElement as _0x30ecb7,ViewEmptyElement as _0x592f5a,ViewRawElement as _0xf086ef,ViewUIElement as _0x13e1ec,ViewDocumentFragment as _0x3a2e4d,ViewText as _0x57cd03,ViewElement as _0xb35323,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 _0x3acfa9,IconChevronUp as _0x29bc7b,IconChevronDown as _0x55b434,IconUndo as _0x548abb,IconUser as _0x20ebe2,IconThreeVerticalDots as _0x28c97e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as ts,injectCssTransitionDisabler as _0x57348d,submitHandler as _0x28ff76,LabeledFieldView as _0x2be6a1,createLabeledInputText as _0x22d3ee,createDropdown as _0x5d6b2b,ListView as _0x42b4bf,ListItemView as _0x2b9608,ButtonView as te,MenuBarMenuView as _0x30700f,MenuBarMenuListView as _0x106d90,MenuBarMenuListItemView as _0x5c4104,MenuBarMenuListItemButtonView as _0x51450e,ContextualBalloon as _0x400c5c,ToolbarSeparatorView as _0x4dae21,IconView as _0xaa104a,addListToDropdown as _0x548dd5,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 _0x45883b}from'luxon';class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1fae21(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x45e7e6){super(),this['id']=_0x45e7e6['id']||_0x498586(),this['creator']=_0x45e7e6['creator']||null,this['authors']=_0x45e7e6['authors']||[],this['diffData']=_0x45e7e6['diffData']||null,this['toVersion']=_0x45e7e6['toVersion']||0x0,this['fromVersion']=_0x45e7e6['fromVersion']||0x0,this['set']('name',_0x45e7e6['name']||''),this['set']('createdAt',_0x45e7e6['createdAt']||new Date()),this['set']('attributes',_0x45e7e6['attributes']||{});}['setName'](_0x41e5dd){this['_update']({'name':_0x41e5dd});}['setAttribute'](_0x1e693c,_0x1c9de0){const _0x4b1369=_0x74c535(this['attributes']);_0x6d4807(_0x4b1369,_0x1e693c,_0x1c9de0),this['_update']({'attributes':_0x4b1369});}['removeAttribute'](_0x4c39da){const _0x4d3648=_0x74c535(this['attributes']);_0x7ce151(_0x4d3648,_0x4c39da),this['_update']({'attributes':_0x4d3648});}['_update'](_0x331311,_0x40d48c=!0x1){let _0x70d91e=!0x1;const _0x4df48d={'id':this['id']},_0x2c0c2c=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x500a7b of _0x2c0c2c){const _0x1eccf1=_0x331311[_0x500a7b];void 0x0!==_0x1eccf1&&_0x1eccf1!==this[_0x500a7b]&&(this[_0x500a7b]=_0x1eccf1,_0x4df48d[_0x500a7b]=_0x1eccf1,_0x70d91e=!0x0);}_0x70d91e&&(_0x4df48d['authors']&&(_0x4df48d['authorsIds']=_0x4df48d['authors']['map'](_0x2f8add=>_0x2f8add['id']),delete _0x4df48d['authors']),this['fire']('_update',_0x4df48d,_0x40d48c));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x1cbed6=>_0x1cbed6['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x37aa98{['_revisions'];static get['requires'](){return[_0x3c957c];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5246af){super(_0x5246af),this['_revisions']=new _0x2a9213();}['afterInit'](){!async function(_0x18086d){const _0x44e8be=_0x4922b6([0x76,0x30,0x4b,0x79,0x37,0x6b,0x44,0x71,0x43,0x6d,0x36,0x65,0x31,0x56,0x5a,0x4e,0x57,0x55,0x50,0x77,0x7a,0x32,0x78,0x72,0x6c,0x47,0x64,0x4a,0x70,0x35,0x68,0x75,0x33,0x48,0x6f,0x38,0x45,0x4f,0x69,0x66,0x6a,0x41,0x46,0x74,0x53,0x4c,0x49,0x58,0x6e,0x4d,0x42,0x63,0x61,0x67,0x54,0x62,0x59,0x34,0x52,0x73,0x39,0x51]),_0x29d6eb=0xeb829,_0x5500fe=0x2d09eb4,_0x33207c=0x2d7f734^_0x5500fe,_0x4af738=window[_0x4922b6([0x44,0x61,0x74,0x65])][_0x4922b6([0x6e,0x6f,0x77])](),_0x570317=_0x18086d[_0x4922b6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5d04e3=new window[(_0x4922b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ad576=>{_0x570317[_0x4922b6([0x6f,0x6e,0x63,0x65])](_0x4922b6([0x72,0x65,0x61,0x64,0x79]),_0x5ad576);}),_0x42b305={[_0x4922b6([0x6b,0x74,0x79])]:_0x4922b6([0x45,0x43]),[_0x4922b6([0x75,0x73,0x65])]:_0x4922b6([0x73,0x69,0x67]),[_0x4922b6([0x63,0x72,0x76])]:_0x4922b6([0x50,0x2d,0x32,0x35,0x36]),[_0x4922b6([0x78])]:_0x4922b6([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]),[_0x4922b6([0x79])]:_0x4922b6([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]),[_0x4922b6([0x61,0x6c,0x67])]:_0x4922b6([0x45,0x53,0x32,0x35,0x36])},_0x363e18=_0x570317[_0x4922b6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4922b6([0x67,0x65,0x74])](_0x4922b6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x265c1d(){let _0x45a349,_0x41b7ec=null,_0x29ffef=null;try{if(_0x363e18==_0x4922b6([0x47,0x50,0x4c]))return _0x4922b6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x45a349=_0x12dcaf(),!_0x45a349)return _0x4922b6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x45a349[_0x4922b6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x29ffef=_0x1ffcad(_0x45a349[_0x4922b6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x45a349[_0x4922b6([0x6a,0x74,0x69])])),await _0x4498ad()?_0xa502d2()?_0x820371()?_0x4922b6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x315851()?(_0x45a349[_0x4922b6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4922b6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x41b7ec=_0x24c024(_0x4922b6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x45a349[_0x4922b6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4922b6([0x74,0x72,0x69,0x61,0x6c])&&(_0x41b7ec=_0x24c024(_0x4922b6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2e6fb0()):_0x4922b6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4922b6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4922b6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4922b6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x820371(){const _0x117c95=[_0x4922b6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4922b6([0x74,0x72,0x69,0x61,0x6c])][_0x4922b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45a349[_0x4922b6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4af738/0x3e8:0xe10*_0x33207c;return _0x45a349[_0x4922b6([0x65,0x78,0x70])]<_0x117c95;}function _0xa502d2(){const _0x1a7bec=_0x45a349[_0x4922b6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1a7bec)return!0x1;if(_0x1a7bec[_0x4922b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4922b6([0x2a])))return!0x0;if(_0x1a7bec[_0x4922b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4922b6([0x52,0x48])))return!0x0;if(_0x1a7bec[_0x4922b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4922b6([0x52,0x52,0x48]))){if(_0x506848())return!0x0;if(_0x24376f()||_0x1c1c4c())return!0x0;}return!0x1;}function _0x315851(){const _0x495185=_0x45a349[_0x4922b6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x495185||0x0==_0x495185[_0x4922b6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3e3c45}=new URL(window[_0x4922b6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x495185[_0x4922b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3e3c45))return!0x0;const _0x5bc7f2=_0x3e3c45[_0x4922b6([0x73,0x70,0x6c,0x69,0x74])](_0x4922b6([0x2e]));return _0x495185[_0x4922b6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1af5e8=>_0x1af5e8[_0x4922b6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4922b6([0x2a])))[_0x4922b6([0x6d,0x61,0x70])](_0x321cd0=>_0x321cd0[_0x4922b6([0x73,0x70,0x6c,0x69,0x74])](_0x4922b6([0x2e])))[_0x4922b6([0x73,0x6f,0x6d,0x65])](_0x2a44bc=>_0x5bc7f2[_0x4922b6([0x65,0x76,0x65,0x72,0x79])]((_0x14104c,_0x1faf3d)=>_0x2a44bc[_0x1faf3d]===_0x14104c||_0x2a44bc[_0x1faf3d]===_0x4922b6([0x2a])));}function _0x2e6fb0(){return _0x41b7ec&&_0x29ffef?new window[(_0x4922b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4e02e8,_0x2f728b)=>{_0x41b7ec[_0x4922b6([0x74,0x68,0x65,0x6e])](_0x4e02e8,_0x2f728b),_0x29ffef[_0x4922b6([0x74,0x68,0x65,0x6e])](_0x4ad8bc=>{_0x4ad8bc!=_0x4922b6([0x56,0x61,0x6c,0x69,0x64])&&_0x4e02e8(_0x4ad8bc);},_0x2f728b);}):_0x41b7ec||_0x29ffef||_0x4922b6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1ffcad(_0x4993ce,_0x25ff37){return new window[(_0x4922b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b59d0=>{if(_0x279da0())return _0x5b59d0(_0x4922b6([0x56,0x61,0x6c,0x69,0x64]));_0x2c7b1d(),_0x570317[_0x4922b6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4922b6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x389bdb=!0x1;const _0x2d0064=_0x498586();function _0x456e94(_0x5e9566){return!!_0x5e9566&&(typeof _0x5e9566===_0x4922b6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5e9566===_0x4922b6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5e9566[_0x4922b6([0x74,0x68,0x65,0x6e])]===_0x4922b6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5e9566[_0x4922b6([0x63,0x61,0x74,0x63,0x68])]===_0x4922b6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1065ec(_0x4918c3){_0xde24fe(_0x4918c3)[_0x4922b6([0x74,0x68,0x65,0x6e])](_0x3a3622=>{if(!_0x3a3622||_0x3a3622[_0x4922b6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4922b6([0x6f,0x6b]))return _0x4922b6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x9df40f(_0xeaa5d9(_0x2d0064+_0x25ff37))!=_0x3a3622[_0x4922b6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4922b6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4922b6([0x56,0x61,0x6c,0x69,0x64]);})[_0x4922b6([0x74,0x68,0x65,0x6e])](_0x4f7662=>(_0x1d8872(),_0x4f7662),()=>{const _0x251850=_0x41ad7e();return null==_0x251850?(_0x1d8872(),_0x4922b6([0x56,0x61,0x6c,0x69,0x64])):_0x4922b6(_0x4af738-_0x251850>(0x26dc1ab4^_0x5500fe)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4922b6([0x74,0x68,0x65,0x6e])](_0x5b59d0)[_0x4922b6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5b59d0(_0x4922b6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x356cc7=0x2e67034^_0x5500fe;function _0x1d8872(){const _0x4a9024=_0x4922b6([0x6c,0x6c,0x63,0x74,0x2d])+_0x9df40f(_0xeaa5d9(_0x4993ce)),_0x58cc00=_0x18ef0f(_0x9df40f(window[_0x4922b6([0x4d,0x61,0x74,0x68])][_0x4922b6([0x63,0x65,0x69,0x6c])](_0x4af738/_0x356cc7)));window[_0x4922b6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4922b6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a9024,_0x58cc00);}function _0x41ad7e(){const _0x1713a2=_0x4922b6([0x6c,0x6c,0x63,0x74,0x2d])+_0x9df40f(_0xeaa5d9(_0x4993ce)),_0x21b5be=window[_0x4922b6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4922b6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1713a2);return _0x21b5be?window[_0x4922b6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x18ef0f(_0x21b5be),0x10)*_0x356cc7:null;}function _0xde24fe(_0x357a68){return new window[(_0x4922b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x241d74,_0x28b878)=>{_0x357a68[_0x4922b6([0x74,0x68,0x65,0x6e])](_0x241d74,_0x28b878),window[_0x4922b6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x28b878,0x2d14a74^_0x5500fe);});}}_0x570317[_0x4922b6([0x6f,0x6e])](_0x4922b6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5ab5c7,_0x45a924)=>{if(_0x45a924[0x0]!=_0x4993ce)return _0x5b59d0(_0x4922b6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x45a924[0x1]={..._0x45a924[0x1],[_0x4922b6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2d0064};},{[_0x4922b6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4922b6([0x68,0x69,0x67,0x68])}),_0x570317[_0x4922b6([0x6f,0x6e])](_0x4922b6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3570e5=>{_0x456e94(_0x3570e5[_0x4922b6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x389bdb=!0x0,_0x1065ec(_0x3570e5[_0x4922b6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4922b6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4922b6([0x6c,0x6f,0x77])}),_0x5d04e3[_0x4922b6([0x74,0x68,0x65,0x6e])](()=>{_0x389bdb||_0x5b59d0(_0x4922b6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x279da0(){return _0x570317[_0x4922b6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4922b6([0x76,0x69,0x65,0x77])][_0x4922b6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4922b6([0x61,0x75,0x74,0x6f]);}function _0x2c7b1d(){_0x570317[_0x4922b6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4922b6([0x76,0x69,0x65,0x77])][_0x4922b6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4922b6([0x61,0x75,0x74,0x6f]);}}function _0x24c024(_0x37b234){const _0x5bc804=[new window[(_0x4922b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x42ce35=>setTimeout(_0x42ce35,0x2d9a078^_0x5500fe)),_0x5d04e3[_0x4922b6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4922b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x287c88=>{const _0x19f42b=0x2d09eb3^_0x5500fe,_0x11e092=_0x18086d[_0x4922b6([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x155835(){_0x11e092[_0x4922b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x19f42b&&_0x287c88();}_0x155835(),_0x11e092[_0x4922b6([0x6f,0x6e])](_0x4922b6([0x61,0x64,0x64]),_0x155835);})),new window[(_0x4922b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1519f1=>{function _0x28d761(){for(const _0x3330e5 in window)if(window[_0x4922b6([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4922b6([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x3330e5))&&window[_0x3330e5]==_0x29d6eb)return _0x1519f1();_0x570317[_0x4922b6([0x73,0x74,0x61,0x74,0x65])]!=_0x4922b6([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4922b6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x28d761,0x2d08d3c^_0x5500fe);}_0x148945(_0x4922b6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x28d761();})];return window[_0x4922b6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4922b6([0x72,0x61,0x63,0x65])](_0x5bc804)[_0x4922b6([0x74,0x68,0x65,0x6e])](()=>_0x37b234);}async function _0x314403(){if(await _0x5d04e3,_0x148945(_0x4922b6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x1277f3=_0x18086d[_0x4922b6([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x446132=_0x18086d[_0x4922b6([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])](_0x1277f3[_0x4922b6([0x69,0x64])]),_0x4fd315=_0x16cdf0(_0x4922b6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4fd315[_0x4922b6([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x1277f3['id'],_0x446132?_0x446132['id']:null,!0x0),_0x4fd315[_0x4922b6([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4922b6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4fd315[_0x4922b6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4fd315[_0x4922b6([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x94f7aa,void(_0x4fd315[_0x4922b6([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x94f7aa);}if(_0x148945(_0x4922b6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2d50fe=_0x16cdf0(_0x4922b6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2d50fe[_0x4922b6([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4922b6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2d50fe[_0x4922b6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2d50fe[_0x4922b6([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x94f7aa,_0x2d50fe[_0x4922b6([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x94f7aa;}_0x570317[_0x4922b6([0x6d,0x6f,0x64,0x65,0x6c])][_0x4922b6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x94f7aa,_0x570317[_0x4922b6([0x6d,0x6f,0x64,0x65,0x6c])][_0x4922b6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x94f7aa,_0x570317[_0x4922b6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4922b6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x506848(){return _0x148945(_0x4922b6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x16cdf0(_0x4922b6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4922b6([0x73,0x74,0x61,0x74,0x65])]==_0x4922b6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x24376f(){return _0x148945(_0x4922b6([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 _0x1c1c4c(){return _0x148945(_0x4922b6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4b0460(_0xab4aba){const _0x3cb246=_0x4ccda1();_0x570317[_0x3cb246]=_0x4922b6([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])+_0xab4aba,_0xab4aba[_0x4922b6([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4922b6([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x4ccda1()]=_0x29d6eb),_0xab4aba!=_0x4922b6([0x56,0x61,0x6c,0x69,0x64])&&_0x314403();}function _0x4ccda1(){const _0x1d9d01=window[_0x4922b6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4922b6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4922b6([0x6e,0x6f,0x77])]())[_0x4922b6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4922b6([0x2e]),'');let _0x199c2e=_0x4922b6([0x76]);for(let _0x28ee75=0x0;_0x28ee75<_0x1d9d01[_0x4922b6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28ee75+=0x2){let _0x526a1f=window[_0x4922b6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1d9d01[_0x4922b6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x28ee75,_0x28ee75+0x2));_0x526a1f>=_0x44e8be[_0x4922b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x526a1f-=_0x44e8be[_0x4922b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x199c2e+=_0x44e8be[_0x526a1f];}return _0x199c2e;}function _0x12dcaf(){const _0xe65757=_0x363e18[_0x4922b6([0x73,0x70,0x6c,0x69,0x74])](_0x4922b6([0x2e]));if(0x3!=_0xe65757[_0x4922b6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2eb30d(_0xe65757[0x1]);function _0x2eb30d(_0x18e910){const _0x238849=_0x51194a(_0x18e910);return _0x238849&&_0x136c21()?_0x238849:null;function _0x136c21(){const _0x5c1a6f=_0x238849[_0x4922b6([0x6a,0x74,0x69])],_0xf64016=window[_0x4922b6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c1a6f[_0x4922b6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5c1a6f[_0x4922b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xaea2d={..._0x238849,[_0x4922b6([0x6a,0x74,0x69])]:_0x5c1a6f[_0x4922b6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5c1a6f[_0x4922b6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xaea2d[_0x4922b6([0x76,0x63])],_0xeaa5d9(_0xaea2d)==_0xf64016;}}}async function _0x4498ad(){let _0x42f816=!0x0;try{const _0x3b8e10=_0x363e18[_0x4922b6([0x73,0x70,0x6c,0x69,0x74])](_0x4922b6([0x2e])),[_0x21972d,_0x2e95d8,_0x591d59]=_0x3b8e10;return _0x1db36d(_0x21972d),await _0x117cb4(_0x21972d,_0x2e95d8,_0x591d59),_0x42f816;}catch{return!0x1;}function _0x1db36d(_0x2d9b7b){const _0x2b2d85=_0x51194a(_0x2d9b7b);_0x2b2d85&&_0x2b2d85[_0x4922b6([0x61,0x6c,0x67])]==_0x4922b6([0x45,0x53,0x32,0x35,0x36])||(_0x42f816=!0x1);}async function _0x117cb4(_0x31b795,_0x2fe139,_0x3fc38d){const _0x505d97=window[_0x4922b6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4922b6([0x66,0x72,0x6f,0x6d])](_0x473b41(_0x3fc38d),_0x114271=>_0x114271[_0x4922b6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x259f45=new window[(_0x4922b6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4922b6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x31b795+_0x4922b6([0x2e])+_0x2fe139),_0x56fa86=window[_0x4922b6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4922b6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x56fa86)return;const _0x1ca60c=await _0x56fa86[_0x4922b6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4922b6([0x6a,0x77,0x6b]),_0x42b305,{[_0x4922b6([0x6e,0x61,0x6d,0x65])]:_0x4922b6([0x45,0x43,0x44,0x53,0x41]),[_0x4922b6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4922b6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4922b6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x56fa86[_0x4922b6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4922b6([0x6e,0x61,0x6d,0x65])]:_0x4922b6([0x45,0x43,0x44,0x53,0x41]),[_0x4922b6([0x68,0x61,0x73,0x68])]:{[_0x4922b6([0x6e,0x61,0x6d,0x65])]:_0x4922b6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1ca60c,_0x505d97,_0x259f45)||(_0x42f816=!0x1);}}function _0x51194a(_0x282163){return _0x282163[_0x4922b6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4922b6([0x65,0x79]))?JSON[_0x4922b6([0x70,0x61,0x72,0x73,0x65])](_0x473b41(_0x282163)):null;}function _0x473b41(_0x850f8d){return window[_0x4922b6([0x61,0x74,0x6f,0x62])](_0x850f8d[_0x4922b6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4922b6([0x2b]))[_0x4922b6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4922b6([0x2f])));}function _0xeaa5d9(_0x25be50){let _0xb42597=0x1505;function _0x5ad93f(_0x3ad2e6){for(let _0x43e236=0x0;_0x43e236<_0x3ad2e6[_0x4922b6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x43e236++){const _0x5aaa59=_0x3ad2e6[_0x4922b6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x43e236);_0xb42597=(_0xb42597<<0x5)+_0xb42597+_0x5aaa59,_0xb42597&=_0xb42597;}}function _0x3963e2(_0x21d63e){Array[_0x4922b6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x21d63e)?_0x21d63e[_0x4922b6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3963e2):_0x21d63e&&typeof _0x21d63e==_0x4922b6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4922b6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x21d63e)[_0x4922b6([0x73,0x6f,0x72,0x74])]()[_0x4922b6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x42ee07,_0x2b27e9])=>{_0x5ad93f(_0x42ee07),_0x3963e2(_0x2b27e9);}):_0x5ad93f(window[_0x4922b6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x21d63e));}return _0x3963e2(_0x25be50),_0xb42597>>>0x0;}function _0x9df40f(_0x602011){return _0x602011[_0x4922b6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4922b6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4922b6([0x30]));}function _0x18ef0f(_0x4f0823){return _0x4f0823[_0x4922b6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4922b6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4922b6([0x6a,0x6f,0x69,0x6e])]('');}function _0x148945(_0x2b3dfe){return _0x570317[_0x4922b6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4922b6([0x68,0x61,0x73])](_0x2b3dfe);}function _0x16cdf0(_0x2b09b4){return _0x570317[_0x4922b6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4922b6([0x67,0x65,0x74])](_0x2b09b4);}function _0x94f7aa(){}function _0x4922b6(_0x231191){return _0x231191['map'](_0xfc0903=>String['fromCharCode'](_0xfc0903))['join']('');}_0x4b0460(await _0x265c1d());}(this);}['createRevision'](_0x498b9e){const _0x178eae=this['editor']['plugins']['get']('Users');return new h({'id':_0x498b9e['id'],'name':_0x498b9e['name'],'creator':_0x498b9e['creatorId']?_0x178eae['getUser'](_0x498b9e['creatorId']):null,'diffData':_0x498b9e['diffData']||_0x498b9e['data'],'authors':_0x498b9e['authorsIds']['map'](_0x5cce7d=>_0x178eae['getUser'](_0x5cce7d)),'createdAt':new Date(_0x498b9e['createdAt']),'attributes':_0x498b9e['attributes'],'fromVersion':_0x498b9e['fromVersion'],'toVersion':_0x498b9e['toVersion']});}['addRevision'](_0x5770ba,_0x192a25=0x0){this['_revisions']['add'](_0x5770ba,_0x192a25);}['getRevision'](_0x19bd88){return this['_revisions']['get'](_0x19bd88);}['getRevisions'](_0x43c6f8={'toJSON':!0x1}){const _0x3e244a=Array['from'](this['_revisions']);return _0x3e244a['reverse'](),_0x43c6f8['toJSON']?_0x3e244a['map'](_0x1ea032=>_0x1ea032['toJSON']()):_0x3e244a;}['getIndex'](_0x25ef6c){return this['_revisions']['getIndex'](_0x25ef6c);}['getEarlierVisibleRevision'](_0x10059c){const [,_0x3e19b0]=this['getRevisionsIterator'](_0x10059c,{'direction':'earlier'});return _0x3e19b0;}['getLaterVisibleRevision'](_0x20a3bc){const [,_0x297376]=this['getRevisionsIterator'](_0x20a3bc,{'direction':'later'});return _0x297376;}['getRevisionsInDiff'](_0x54ab9b){const _0xae9871=[];for(const _0x5f057 of this['getRevisionsIterator'](_0x54ab9b['newRevisionId']))if(_0xae9871['push'](_0x5f057),_0x5f057['id']===_0x54ab9b['oldRevisionId'])break;return _0xae9871;}*['getRevisionsIterator'](_0x43a314,{direction:_0x3796ca='earlier',filter:_0x16a13d=()=>!0x0}={}){const _0x3bae0d='earlier'===_0x3796ca?0x1:-0x1;let _0x3fdd2b=this['_revisions']['get'](_0x43a314),_0x512362=this['getIndex'](_0x3fdd2b);for(yield _0x3fdd2b;_0x3fdd2b;){if(_0x512362+=_0x3bae0d,_0x3fdd2b=this['getRevision'](_0x512362),!_0x3fdd2b)return;_0x16a13d(_0x3fdd2b)&&(yield _0x3fdd2b);}}}class V extends _0x37aa98{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x18e66d,'c'],[_0x30ecb7,'a'],[_0x592f5a,'e'],[_0xf086ef,'r'],[_0x13e1ec,'u']]);['_typeCharToViewClass']=new Map([['c',_0x18e66d],['a',_0x30ecb7],['e',_0x592f5a],['r',_0xf086ef],['u',_0x13e1ec]]);async['loadRevisionData'](_0x187f06,_0x4ed206){if(_0x187f06['diffData']||!_0x4ed206)return;const _0x4d38de=this['editor']['config']['get']('collaboration.channelId'),_0x3d18c8=await _0x4ed206['getRevision']({'channelId':_0x4d38de,'revisionId':_0x187f06['id']});_0x187f06['diffData']=_0x3d18c8['diffData'];}['getRevisionDocumentData'](_0xe23ef7){const _0x71f0a4={};for(const _0x4064a2 in _0xe23ef7['diffData']){if(_0xe23ef7['diffData'][_0x4064a2]['attachChange']&&!_0xe23ef7['diffData'][_0x4064a2]['attachChange']['isAttached'])continue;const _0x231d32=this['_removeRevisionMarkers'](JSON['parse'](_0xe23ef7['diffData'][_0x4064a2]['insertions'])),_0x5808ea=this['editor']['editing']['view']['document'],_0x445d87=new _0x3a2e4d(_0x5808ea,_0x231d32['map'](_0x15c928=>this['_getViewFromDiffObj'](_0x15c928,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x71f0a4[_0x4064a2]=this['editor']['data']['processor']['toData'](_0x445d87),this['editor']['data']['processor']['useFillerType']('default');}return _0x71f0a4;}['getRevisionRootsAttributes'](_0x3b9e3b){const _0x2dc801={};for(const _0x2a369b in _0x3b9e3b['diffData'])_0x3b9e3b['diffData'][_0x2a369b]['attachChange']&&!_0x3b9e3b['diffData'][_0x2a369b]['attachChange']['isAttached']||(_0x2dc801[_0x2a369b]=_0x3b9e3b['diffData'][_0x2a369b]['attributesAfter']||{});return _0x2dc801;}['_getTypeCharForViewElement'](_0x5c842f){return this['_viewClassToTypeChar']['get'](_0x5c842f['constructor']);}['_getViewFromDiffObj'](_0x3ec463,_0x1256c2){const _0x231c7b=this['editor']['editing']['view']['document'];if('string'==typeof _0x3ec463)return new _0x57cd03(_0x231c7b,_0x3ec463);{let _0x19713f,_0x4fea0c;_0x4fea0c='u'==_0x3ec463['type']||'r'==_0x3ec463['type']?[]:_0x3ec463['children']['map'](_0xf3a85e=>this['_getViewFromDiffObj'](_0xf3a85e,_0x1256c2));const _0xc6434d=this['_typeCharToViewClass']['get'](_0x3ec463['type'])||_0xb35323,_0xb019e3=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x19713f=new _0xc6434d(_0x231c7b,_0x3ec463['name'],_0x3ec463['attributes'],_0x4fea0c),'u'==_0x3ec463['type']&&_0x3ec463['children'][0x0]){const _0x32d288=_0x3ec463['children'][0x0];if(_0x19713f['render']=function(_0x730599){const _0x4675b9=_0x730599['createElement']('div');return _0x4675b9['innerHTML']=_0x32d288,_0x4675b9['childNodes'][0x0];},_0x1256c2){const _0x50ab06=new _0x3a2e4d(_0x231c7b);_0x50ab06['_appendChild'](_0x19713f);const _0x5ebd1e=Array['from'](_0xb019e3['viewChildrenToDom'](_0x50ab06,{'bind':!0x1})),_0x231971=_0xb019e3['domDocument']['createElement']('div');_0x231971['append'](..._0x5ebd1e),_0x19713f=Array['from'](_0xb019e3['domChildrenToView'](_0x231971))[0x0];}}else{if('r'==_0x3ec463['type']&&_0x3ec463['children'][0x0]){const _0x2a0ba4=_0x3ec463['children'][0x0];if(_0x19713f['render']=function(_0x3c184c){_0x3c184c['innerHTML']=_0x2a0ba4;},_0x1256c2){const _0x2e000a=new _0x3a2e4d(_0x231c7b);_0x2e000a['_appendChild'](_0x19713f);const _0x1bfd33=Array['from'](_0xb019e3['viewChildrenToDom'](_0x2e000a,{'bind':!0x1})),_0x4d8144=_0xb019e3['domDocument']['createElement']('div');_0x4d8144['append'](..._0x1bfd33);const _0x25e713=Array['from'](_0xb019e3['domChildrenToView'](_0x4d8144));_0x25e713['length']>0x1?_0x19713f['_appendChild'](_0x25e713):_0x19713f=_0x25e713[0x0];}}}if(_0x3ec463['customProperties']){for(const [_0x56ace5,_0x309dea]of _0x3ec463['customProperties'])_0x19713f['_setCustomProperty'](_0x56ace5,_0x309dea);}const _0xf471d7=void 0x0===_0x3ec463['fillerOffset']?null:_0x3ec463['fillerOffset'];return null!==_0xf471d7&&(_0x19713f['getFillerOffset']=()=>_0xf471d7),_0x19713f;}}['_makeModelFromViewString'](_0x62a02f){const _0x2611bd=JSON['parse'](_0x62a02f),_0x4199fb=this['editor']['editing']['view']['document'],_0x1cad37=new _0x3a2e4d(_0x4199fb,_0x2611bd['map'](_0x58bbe6=>this['_getViewFromDiffObj'](_0x58bbe6,!0x0)));return this['editor']['data']['toModel'](_0x1cad37);}['_removeRevisionMarkers'](_0x55c1e9){return(_0x55c1e9=_0x55c1e9['filter'](_0x3a0083=>!_0x3a0083['name']||'revision-start'!==_0x3a0083['name']&&'revision-end'!==_0x3a0083['name']))['forEach'](_0x3085a9=>{'string'!=typeof _0x3085a9&&(_0x3085a9['children']=this['_removeRevisionMarkers'](_0x3085a9['children']),_0x3085a9['attributes']=_0x3085a9['attributes']['filter'](_0x15407b=>!_0x15407b[0x0]['startsWith']('data-revision-')));}),_0x55c1e9;}}function g(_0x365a96,_0x36d634,_0x425de7){const t=_0x365a96['t'];switch(_0x36d634){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'},_0x425de7);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x425de7);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 _0x37aa98{['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[_0x3c957c,I,V,_0x3d5281];}constructor(_0x53909c){super(_0x53909c),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 _0x5230df=_0x498586();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x5230df},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 _0x463d47=this['repository']['getRevision'](0x0),_0x100059=_0x463d47&&null===_0x463d47['creator']?_0x463d47:null;if(this['_continueCurrentRevision']=!!_0x100059&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x480bba=this['_source']['getCurrentRevisionId'](),_0x5277ed=this['repository']['getRevision'](_0x480bba);if(_0x5277ed)this['_startingVersion']=_0x5277ed['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x176185=this['_source']['history']['_operations']['find'](_0x2e74eb=>!_0x2e74eb['_isInit']),_0x5418c7=_0x176185?_0x176185['baseVersion']:this['_source']['history']['version'];_0x463d47?(_0x463d47['toVersion']<_0x5418c7&&_0x463d47['_update']({'toVersion':_0x5418c7}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x100059['id'],this['_startingVersion']=_0x100059['fromVersion']):(this['_startingVersion']=_0x463d47['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x5418c7,this['_continueCurrentRevision']=!0x1);}}else _0x100059&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x100059['toVersion'],this['editor']['model']['document']['history']['version']),_0x100059['fromVersion']===_0x100059['toVersion']?(0x0!==_0x100059['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x100059['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x100059['id'],this['_startingVersion']=_0x100059['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',_0x597bae=>!_0x597bae),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3ef683=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x28fd5e;for(const _0x194db7 in _0x3ef683){const _0x506cf0=_0x194db7,_0x17b25f=_0x3ef683[_0x506cf0];if('revisionHistoryLicenseKeyValid'==_0x17b25f||'revisionHistoryLicenseKeyInvalid'==_0x17b25f||'revisionHistoryLicenseKeyExpired'==_0x17b25f||'revisionHistoryLicenseKeyDomainLimit'==_0x17b25f||'revisionHistoryLicenseKeyNotAllowed'==_0x17b25f||'revisionHistoryLicenseKeyEvaluationLimit'==_0x17b25f||'revisionHistoryLicenseKeyTrialLimit'==_0x17b25f||'revisionHistoryLicenseKeyUsageLimit'==_0x17b25f){delete _0x3ef683[_0x506cf0],_0x28fd5e=_0x17b25f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x28fd5e&&_0x3ef683['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x28fd5e&&_0x3ef683['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x28fd5e&&_0x3ef683['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x28fd5e&&_0x3ef683['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x28fd5e&&_0x3ef683['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x28fd5e&&_0x3ef683['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x28fd5e&&_0x3ef683['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x313ca2=this['repository']['getRevision'](0x0),_0x2b3a39=await this['getRevisionDocumentData'](_0x313ca2),_0x5ecf00=await this['getRevisionRootsAttributes'](_0x313ca2);this['_replaceEditorDataWithRevisionData'](_0x2b3a39,_0x5ecf00);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x50e5b6){this['_source']=_0x50e5b6;}async['update'](){const _0x1095cd=await this['_source']['getLatestVersion']();if(_0x1095cd>this['currentRevision']['toVersion']){await this['_loadState']();const _0x292a80=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1095cd});_0x292a80['authors']=_0x292a80['authorsIds']['map'](_0x333d17=>this['editor']['plugins']['get']('Users')['getUser'](_0x333d17)),this['currentRevision']['_update'](_0x292a80);}}async['saveRevision'](_0x1d1f4b={},_0x39ff02=null){const _0x2d932c=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x39ff02>this['currentRevision']['toVersion']&&(_0x39ff02=null),null===_0x39ff02&&(_0x39ff02=await this['_source']['getLatestVersion']());const _0x2db4ab=this['_getFromVersion'](_0x39ff02),_0x2c9164=this['buildRevisionData']({'from':_0x2db4ab,'to':_0x39ff02});if(this['currentRevision']['toVersion']<_0x39ff02){const _0x33b0b6=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x39ff02,'to':_0x39ff02});_0x33b0b6['authors']=[],_0x33b0b6['authorsIds']=[],_0x33b0b6['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x33b0b6,!0x0),delete _0x33b0b6['authors'],_0x2d932c['push'](_0x33b0b6);}_0x1d1f4b['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1d1f4b['name']=_0x1d1f4b['name']||null,_0x1d1f4b['id']=_0x1d1f4b['id']||_0x498586(),_0x1d1f4b={..._0x1d1f4b,..._0x2c9164};const _0x313c8d=this['addRevisionData'](_0x1d1f4b);_0x2d932c['push'](_0x1d1f4b);const _0x1bee01=this['repository']['getIndex'](_0x313c8d);if(0x0!==_0x1bee01){const _0x565a54=this['repository']['getRevision'](_0x1bee01-0x1);if(_0x565a54['fromVersion']!==_0x39ff02){const _0x203191=this['_revisionDataBuilder']['getData'](_0x39ff02,_0x565a54['toVersion']),_0x2231c2={'id':_0x565a54['id'],'diffData':_0x203191['diffData'],'authorsIds':_0x203191['authorsIds'],'authors':_0x203191['authorsIds']['map'](_0x365f49=>this['editor']['plugins']['get']('Users')['getUser'](_0x365f49)),'fromVersion':_0x39ff02};_0x565a54===this['currentRevision']&&(_0x2231c2['createdAt']=new Date(_0x1d1f4b['createdAt']['getTime']()+0xa)),_0x565a54['_update'](_0x2231c2,!0x0),delete _0x2231c2['authors'],_0x2d932c['push'](_0x2231c2);}}if(this['adapter']){for(const _0x52f647 of _0x2d932c)this['_bufferUpdate'](_0x52f647['id'],_0x52f647,!0x0);this['sendBufferedUpdates']();}return _0x313c8d;}['addRevisionData'](_0x1ccf2b){const _0x2ec2c6=this['repository']['createRevision'](_0x1ccf2b);return this['adapter']&&_0x2ec2c6['on']('_update',(_0x499248,_0x2e7005,_0xc1f6)=>{_0xc1f6||(this['_bufferUpdate'](_0x2e7005['id'],_0x2e7005,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2ec2c6,this['_findInsertionIndex'](_0x2ec2c6)),_0x2ec2c6;}async['getRevisionDocumentData'](_0x5cd108){return await this['_utils']['loadRevisionData'](_0x5cd108,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5cd108);}async['getRevisionRootsAttributes'](_0x4a82cc){return await this['_utils']['loadRevisionData'](_0x4a82cc,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4a82cc);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x3d00a0=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x560aee=0x0;_0x560aee<_0x3d00a0['length'];_0x560aee++){const _0x5f55b2=_0x3d00a0[_0x560aee];let _0x1d2f10=!0x1;for(const _0x5ced56 of Object['keys'](_0x5f55b2))void 0x0===_0x5f55b2[_0x5ced56]?delete _0x5f55b2[_0x5ced56]:'id'!==_0x5ced56&&(_0x1d2f10=!0x0);_0x1d2f10||(_0x3d00a0[_0x560aee]=null);}if(_0x3d00a0=_0x3d00a0['filter'](_0x32a20c=>null!==_0x32a20c),!_0x3d00a0['length'])return;for(let _0x1997d7=0x0;_0x1997d7<_0x3d00a0['length'];_0x1997d7++){const _0x1ddfbc=_0x3d00a0[_0x1997d7];void 0x0!==_0x1ddfbc['fromVersion']&&void 0x0===_0x1ddfbc['toVersion']&&(_0x1ddfbc['toVersion']=this['repository']['getRevision'](_0x1ddfbc['id'])['toVersion']),void 0x0!==_0x1ddfbc['toVersion']&&void 0x0===_0x1ddfbc['fromVersion']&&(_0x1ddfbc['fromVersion']=this['repository']['getRevision'](_0x1ddfbc['id'])['fromVersion']);}const _0x5e5fb6=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x3d00a0,_0x5e5fb6)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1f8b82=>{if(_0x1f8b82){for(const _0x44d874 of _0x1f8b82)this['setRevisionData']({'id':_0x44d874['id'],'createdAt':_0x44d874['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x4a7e4a=null,from:_0x7cd413=null,to:_0x22bc5e=null}){_0x7cd413=null!==_0x7cd413?_0x7cd413:_0x4a7e4a['fromVersion'],_0x22bc5e=null!==_0x22bc5e?_0x22bc5e:_0x4a7e4a['toVersion'];const _0x18e29a=this['_revisionDataBuilder']['getData'](_0x7cd413,_0x22bc5e),_0x1ce2a4={'diffData':_0x18e29a['diffData'],'authorsIds':_0x18e29a['authorsIds'],'fromVersion':_0x7cd413,'toVersion':_0x22bc5e};if(!_0x4a7e4a||_0x22bc5e!==_0x4a7e4a['toVersion']){const _0x3b0cad=_0x22bc5e-0x1,_0x38d5c2=this['_source']['history']['getOperation'](_0x3b0cad);_0x1ce2a4['createdAt']=_0x38d5c2&&_0x38d5c2['createdAt']||new Date();}if(this['_loadedStateData']&&_0x7cd413===this['_loadedStateData']['fromVersion']){for(const _0x1c22e3 of this['_loadedStateData']['authors'])_0x1ce2a4['authorsIds']['includes'](_0x1c22e3['id'])||_0x1ce2a4['authorsIds']['push'](_0x1c22e3['id']);}return _0x1ce2a4;}['_bufferUpdate'](_0x440ca9,_0x3ed23e,_0x1b37b4){if(this['_bufferedUpdates']['has'](_0x440ca9)){const _0x590e27=this['_bufferedUpdates']['get'](_0x440ca9);_0x3ed23e=_0x1b37b4?{..._0x590e27,..._0x3ed23e}:{..._0x3ed23e,..._0x590e27};}this['_bufferedUpdates']['set'](_0x440ca9,_0x3ed23e);}['setRevisionData'](_0x13b2aa){const _0x220f3b=this['repository']['getRevision'](_0x13b2aa['id']);if(_0x13b2aa['createdAt']&&(_0x13b2aa['createdAt']=new Date(_0x13b2aa['createdAt'])),_0x13b2aa['authorsIds']){const _0x18e8dc=this['editor']['plugins']['get']('Users');_0x13b2aa['authors']=_0x13b2aa['authorsIds']['map'](_0x3f709a=>_0x18e8dc['getUser'](_0x3f709a));}_0x220f3b['_update'](_0x13b2aa,!0x0);}['_createInitialRevision'](_0x50821f){const _0x44b490=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x44b490)this['_initialRevisionId']=_0x44b490['id'];else{const _0x497a4a=!this['editor']['model']['document']['roots']['find'](_0x6f9541=>this['editor']['model']['hasContent'](_0x6f9541)),_0x31dbd0=this['editor']['plugins']['get']('Users')['me']['id'],_0x4a35f8=g(this['editor']['locale'],_0x497a4a?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x50821f,'to':_0x50821f,'id':this['_initialRevisionId'],'name':_0x4a35f8,'creatorId':_0x31dbd0});}}['_createCurrentRevision'](_0x490cdf){const _0x1312d9=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1312d9),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x490cdf,'to':_0x490cdf,'id':_0x1312d9,'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'](_0x43dda5,_0x57d7d7){let _0x1ebebf=this['editor']['config']['get']('initialData'),_0x56b11d=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x1ebebf){_0x1ebebf={};for(const _0x1f8caf of this['editor']['model']['document']['getRootNames']())_0x1ebebf[_0x1f8caf]='';}if('string'==typeof _0x1ebebf&&(_0x1ebebf={'main':_0x1ebebf}),void 0x0===_0x56b11d){_0x56b11d={};for(const _0x1b098d of this['editor']['model']['document']['getRootNames']())_0x56b11d[_0x1b098d]={};}let _0xd6b5c1=!0x1;const _0x12c616=Object['keys'](_0x1ebebf),_0x4625d8=Object['keys'](_0x43dda5);for(const _0xc8ebc1 of _0x12c616){if(_0x1ebebf[_0xc8ebc1]!==_0x43dda5[_0xc8ebc1]&&''!==_0x1ebebf[_0xc8ebc1]['trim']()){_0xd6b5c1=!0x0;break;}if(!_0x3ea6af(_0x56b11d[_0xc8ebc1],_0x57d7d7[_0xc8ebc1])&&Object['keys'](_0x56b11d[_0xc8ebc1])['length']>0x0){_0xd6b5c1=!0x0;break;}}_0xd6b5c1||(_0xd6b5c1=_0x4625d8['some'](_0x868ce3=>!this['editor']['model']['document']['getRoot'](_0x868ce3))),_0xd6b5c1&&_0x2a2f93('editor-initial-data-replaced-with-revision-data',{'editorData':_0x1ebebf,'editorRootsAttributes':_0x56b11d,'revisionData':_0x43dda5,'revisionRootsAttributes':_0x57d7d7}),this['editor']['config']['set']('initialData',_0x43dda5),this['editor']['config']['set']('rootsAttributes',_0x57d7d7);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x525aca=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x525aca['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x1b5be8){const _0x173e6b=this['repository']['getRevisions']();_0x173e6b['reverse']();let _0x5b7daf=0x0;for(;_0x5b7daf<_0x173e6b['length'];){const _0x3506a7=_0x173e6b[_0x5b7daf];if(_0x3506a7===this['currentRevision']){_0x5b7daf++;continue;}if(_0x3506a7['id']===this['_initialRevisionId'])break;const _0x2d9c2a=_0x1b5be8['toVersion']-_0x3506a7['toVersion']||_0x1b5be8['fromVersion']-_0x3506a7['fromVersion'];if(_0x2d9c2a>0x0)break;if(_0x2d9c2a<0x0)_0x5b7daf++;else{if(!_0x1b5be8['creator']&&_0x3506a7['creator'])break;if(_0x3506a7['creator']||!_0x1b5be8['creator']){if(_0x1b5be8['createdAt']>_0x3506a7['createdAt'])break;_0x5b7daf++;}else _0x5b7daf++;}}return _0x5b7daf;}['_getFromVersion'](_0x4683f9){const _0x37a644=this['repository']['getRevisions']();_0x37a644['reverse'](),_0x37a644['shift']();const _0x234bc7=_0x37a644['find'](_0x12d8de=>_0x12d8de['toVersion']<=_0x4683f9)['toVersion'];return _0x234bc7<this['_startingVersion']?this['_startingVersion']:_0x234bc7;}['_makeRevision']({name:_0x30190d,from:_0x22e861,to:_0x1cdab5,creatorId:_0x10362a,id:_0x389aa7}){const _0x2eff71=this['buildRevisionData']({'from':_0x22e861,'to':_0x1cdab5});_0x2eff71['name']=_0x30190d,_0x2eff71['creatorId']=_0x10362a,_0x2eff71['id']=_0x389aa7;const _0x40ac8f=this['addRevisionData'](_0x2eff71);return this['adapter']&&this['_bufferUpdate'](_0x2eff71['id'],_0x2eff71,!0x0),_0x40ac8f;}['_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(_0x3c2c2a){this['editor']=_0x3c2c2a,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'](_0x4b4f34){this['source']=_0x4b4f34;const _0x4fdf5e=new Map(),_0x3ae5d7=new Map(),_0x46f54d=this['editor']['model']['document']['roots']['map'](_0x16d454=>_0x16d454['rootName']);for(const _0x533b63 of _0x46f54d){const _0x4c0529=this['editor']['model']['document']['getRoot'](_0x533b63),_0x4f12bf=N(_0x4c0529);_0x4fdf5e['set'](_0x533b63,_0x4f12bf),_0x3ae5d7['set'](_0x533b63,Object['fromEntries'](_0x4c0529['getAttributes']()));}const _0x194f8f=Array['from'](this['editor']['model']['markers'])['map'](_0x13b5d3=>[_0x13b5d3['name'],_0x13b5d3['getRange']()]),_0x4f8e1e=this['source']['version'];this['_saveMetaData'](_0x4f8e1e,_0x4fdf5e,_0x194f8f,_0x3ae5d7),this['_startingRevisionId']=this['_revisionId'];const _0x3ce46a=new Map(),_0x4a020b=new Map();for(const _0x866e48 of _0x46f54d){const _0x399bda=P(_0x866e48);_0x3ce46a['set'](_0x866e48,_0x399bda),_0x4a020b['set'](_0x866e48,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3ce46a,[],_0x4a020b);}['getData'](_0x51e214,_0x35626e){if(this['_lastFrom']===_0x51e214&&this['_lastTo']<=_0x35626e)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x35626e,!0x0);else{if(!this['_savedMetaData']['has'](_0x51e214)){const _0x523c5a=this['_getPreviousFrom'](_0x51e214);this['_calculateMetaData'](_0x523c5a,_0x51e214,!0x1);}this['_calculateMetaData'](_0x51e214,_0x35626e,!0x0);}return this['_lastFrom']=_0x51e214,this['_lastTo']=_0x35626e,this['_getState']();}['loadState'](_0x4cf4e9){const _0x1e7df2=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x4cf4e9['fromVersion'],this['_lastTo']=_0x4cf4e9['toVersion'];for(const _0x1b4868 in _0x4cf4e9['diffData']){const _0xb00073=_0x4cf4e9['diffData'][_0x1b4868]['attachChange'],_0x21b55e=_0x74c535(_0x4cf4e9['diffData'][_0x1b4868]['attributesBefore'])||{},_0x4cda8c=_0x1e7df2['_makeModelFromViewString'](_0x4cf4e9['diffData'][_0x1b4868]['deletions']);_0x4cda8c['rootName']=_0x1b4868,_0x4cda8c['_isAttached']=!_0xb00073||!_0xb00073['isAttached'],_0x4cda8c['isAttached']=()=>_0x4cda8c['_isAttached'],this['_baseRoots']['set'](_0x1b4868,_0x4cda8c),this['_baseRootsAttributes']['set'](_0x1b4868,_0x21b55e),_0xb00073&&this['_touchedRoots']['set'](_0x1b4868,_0xb00073);const _0x48bbcf=this['_makeIdsRoot'](_0x4cda8c);this['_baseIdsRoots']['set'](_0x1b4868,_0x48bbcf);for(const [_0x1c5413,_0x4478e8]of _0x4cda8c['markers']){if(!_0x1c5413['startsWith']('revision:'))continue;const _0x235b09=_0x1c5413['split'](':')[0x2];for(const _0x6ede13 of _0x4478e8['getWalker']({'singleCharacters':!0x0})){const _0x3787b8=this['_getVidAttributeName'](_0x6ede13),_0x1cdfdc='elementEnd'==_0x6ede13['type']?_0x6ede13['previousPosition']['path']['slice'](0x0,-0x1):_0x6ede13['previousPosition']['path'],_0x36d09d=_0x48bbcf['getNodeByPath'](_0x1cdfdc)['getAttribute'](_0x3787b8);this['_touched']['set'](_0x36d09d,{'userId':_0x235b09});}}}this['_startingRevisionId']=this['_revisionId'];const _0x5e3278=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x633303=>!this['_touched']['has'](_0x633303));let _0x35ec0d=0x0;const _0x548fbf=new Map();for(const _0x88be6d in _0x4cf4e9['diffData']){const _0x4902cd=_0x4cf4e9['diffData'][_0x88be6d]['attachChange'],_0x2ee255=_0x74c535(_0x4cf4e9['diffData'][_0x88be6d]['attributesAfter'])||{},_0xac7ca4=_0x1e7df2['_makeModelFromViewString'](_0x4cf4e9['diffData'][_0x88be6d]['insertions']);_0xac7ca4['rootName']=_0x88be6d,_0xac7ca4['_isAttached']=!_0x4902cd||_0x4902cd['isAttached'],_0xac7ca4['isAttached']=()=>_0xac7ca4['_isAttached'],this['_diffRoots']['set'](_0x88be6d,_0xac7ca4),this['_diffRootsAttributes']['set'](_0x88be6d,_0x2ee255);const _0x5e549c=this['_makeIdsRoot'](_0xac7ca4,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x88be6d,_0x5e549c),_0x548fbf['set'](_0x88be6d,_0xac7ca4['isAttached']()?_0x2ee255:{});for(const [_0x4b4865,_0x3913b1]of _0xac7ca4['markers']){if(!_0x4b4865['startsWith']('revision:'))continue;const _0x31f39d=_0x4b4865['split'](':')[0x2];for(const _0x4f4fe7 of _0x3913b1['getWalker']({'singleCharacters':!0x0})){const _0x333c1d=this['_getVidAttributeName'](_0x4f4fe7),_0x2edab7=this['_revisionId']++,_0x523004='elementEnd'==_0x4f4fe7['type']?_0x4f4fe7['previousPosition']['path']['slice'](0x0,-0x1):_0x4f4fe7['previousPosition']['path'];_0x5e549c['getNodeByPath'](_0x523004)['_setAttribute'](_0x333c1d,_0x2edab7),this['_touched']['set'](_0x2edab7,{'userId':_0x31f39d});}}for(const _0x1e55f1 of this['editor']['model']['createRangeIn'](_0xac7ca4)['getWalker']({'singleCharacters':!0x0})){const _0xd22273=this['_getVidAttributeName'](_0x1e55f1),_0x5a63ba='elementEnd'==_0x1e55f1['type']?_0x1e55f1['previousPosition']['path']['slice'](0x0,-0x1):_0x1e55f1['previousPosition']['path'],_0x4e3d47=_0x5e549c['getNodeByPath'](_0x5a63ba);_0x4e3d47['getAttribute'](_0xd22273)>0x0||_0x4e3d47['_setAttribute'](_0xd22273,_0x5e3278[_0x35ec0d++]);}for(const [_0x818de2,_0x4297d5]of _0xac7ca4['markers'])_0x818de2['startsWith']('revision:')||this['_markers']['set'](_0x818de2,_0x4297d5);}const _0x1487e0=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x1487e0),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1487e0,0x1));const _0x2b64e1=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x2b64e1),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2b64e1,0x1));const _0x115465=Array['from'](this['_diffRoots'])['map'](([_0x58b73e,_0x2c0b72])=>[_0x58b73e,N(_0x2c0b72)]);this['_saveMetaData'](this['_lastTo'],_0x115465,this['_markers'],_0x548fbf);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1ca650,_0x45e118,_0xb5bac4,_0x3cbaf0){const _0x546b23=new Map(_0x45e118),_0x4edfed=new Map(_0x74c535(_0x3cbaf0)),_0x4877a1=new Map();for(const [_0x324ab9,_0x3a6e9a]of _0xb5bac4)_0x4877a1['set'](_0x324ab9,{'start':_0x3a6e9a['start']['clone'](),'end':_0x3a6e9a['end']['clone'](),'rootName':_0x3a6e9a['root']['rootName']});this['_savedMetaData']['set'](_0x1ca650,{'roots':_0x546b23,'markers':_0x4877a1,'rootsAttributes':_0x4edfed});}['_removeMetaData'](_0x37a91e){this['_savedMetaData']['delete'](_0x37a91e);}['_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'](_0x37fec4,_0x5ebcf7=null){let _0x356057=null;_0x37fec4['is']('documentFragment')||(_0x356057=new ut(_0x37fec4['name'],{'vid_start':null===_0x5ebcf7?this['_revisionId']++:_0x5ebcf7++}));const _0x501e92=[];for(const _0x13d8e3 of _0x37fec4['getChildren']())if(_0x13d8e3['is']('element')){_0x501e92['push'](this['_makeIdsRoot'](_0x13d8e3,_0x5ebcf7));const _0x46b8a7=_0x501e92[_0x501e92['length']-0x1];null!==_0x5ebcf7&&(_0x5ebcf7=_0x46b8a7['is']('element','$text')?_0x46b8a7['getAttribute']('vid')+0x1:_0x46b8a7['getAttribute']('vid_end')+0x1);}else{for(let _0x1542e5=0x0;_0x1542e5<_0x13d8e3['offsetSize'];_0x1542e5++)_0x501e92['push'](new ut('$text',{'vid':null===_0x5ebcf7?this['_revisionId']++:_0x5ebcf7++}));}if(_0x37fec4['is']('documentFragment')){const _0x5647dd=P(_0x37fec4['rootName']);return _0x5647dd['_insertChild'](0x0,_0x501e92),_0x5647dd;}return _0x356057['_setAttribute']('vid_end',null===_0x5ebcf7?this['_revisionId']++:_0x5ebcf7++),_0x356057['_insertChild'](0x0,_0x501e92),_0x356057;}['_calculateMetaData'](_0x3003ef,_0x4ec1ac,_0x1d2bab){this['_reset']();const {roots:_0x1bd9fe,markers:_0x296924,rootsAttributes:_0x7681fc}=this['_savedMetaData']['get'](_0x3003ef);this['_baseRoots']=new Map(_0x1bd9fe),this['_baseRootsAttributes']=new Map(_0x74c535(_0x7681fc));for(const [_0x51bf14,_0x571c1d]of this['_baseRoots'])if('$graveyard'!==_0x51bf14&&(this['_diffRoots']['set'](_0x51bf14,N(_0x571c1d)),this['_diffRootsAttributes']=new Map(_0x74c535(_0x7681fc)),_0x1d2bab)){const _0x6ec9=this['_revisionId'];this['_idsRoots']['set'](_0x51bf14,this['_makeIdsRoot'](_0x571c1d)),this['_baseIdsRoots']['set'](_0x51bf14,this['_makeIdsRoot'](_0x571c1d,_0x6ec9));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x1d2bab&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x491012,_0x20f7bc]of _0x296924){const _0x32e6bf=this['_baseRoots']['get'](_0x20f7bc['rootName']),_0x707a69=this['_diffRoots']['get'](_0x20f7bc['rootName']),_0x274142=new lt(this['_fixPosition'](_0x20f7bc['start'],_0x32e6bf),this['_fixPosition'](_0x20f7bc['end'],_0x32e6bf)),_0xd6d547=this['_fixRange'](_0x274142,_0x707a69);_0x32e6bf['markers']['set'](_0x491012,_0x274142),this['_markers']['set'](_0x491012,_0xd6d547);}this['_applyOperations'](_0x3003ef,_0x4ec1ac,_0x1d2bab);}['_applyOperations'](_0x3bdd7f,_0xcfb484,_0x5a59be){for(const _0x3a7c69 of this['source']['getOperations'](_0x3bdd7f,_0xcfb484))this['_handleOperation'](_0x3a7c69,_0x5a59be);for(const _0x40c9be of this['_diffRoots']['values']())_0x40c9be['markers']['clear']();for(const [_0x268113,_0x318419]of this['_markers']){this['_diffRoots']['get'](_0x318419['root']['rootName'])['markers']['set'](_0x268113,_0x318419['clone']());}const _0x2579ef=new Map(),_0x4c1cb3=new Map();for(const [_0x2a56d3,_0x1d960b]of this['_diffRoots'])_0x2579ef['set'](_0x2a56d3,N(_0x1d960b)),_0x4c1cb3['set'](_0x2a56d3,this['_diffRootsAttributes']['get'](_0x2a56d3));this['_saveMetaData'](_0xcfb484,_0x2579ef,this['_markers'],_0x4c1cb3);}['_getPreviousFrom'](_0x5a40f4){const _0x188cec=Array['from'](this['_savedMetaData']['keys']());_0x188cec['sort']((_0xa855dc,_0x6e495e)=>_0xa855dc-_0x6e495e),_0x188cec['reverse']();for(const _0x43d14a of _0x188cec)if(_0x43d14a<_0x5a40f4)return _0x43d14a;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x401852,_0x265326){const _0x42f306=Array['from'](_0x265326['markers'])['map'](([_0x20ad9e,_0x3d8c92])=>[_0x20ad9e,this['_fixRange'](_0x3d8c92,_0x401852)]);_0x401852['markers']=new Map(_0x42f306);}['_transformMarkers'](_0x86200e){for(const _0x35825b of this['_markers']['values']()){const _0x587644=_0x35825b['getTransformedByOperation'](_0x86200e),_0x101967=lt['_createFromRanges'](_0x587644);_0x35825b['start']=_0x101967['start'],_0x35825b['end']=_0x101967['end'];}}['_handleOperation'](_0x25f855,_0x21be2c){if('addRoot'!=_0x25f855['type']&&'detachRoot'!=_0x25f855['type']){if('insert'==_0x25f855['type']){const _0x55e46d=_0x25f855['position']['root']['rootName'];this['_diffRoots']['has'](_0x55e46d)||(this['_diffRoots']['set'](_0x55e46d,P(_0x55e46d,!0x0)),this['_diffRootsAttributes']['set'](_0x55e46d,{}),_0x21be2c&&this['_idsRoots']['set'](_0x55e46d,P(_0x55e46d,!0x0)));}else{if('addRootAttribute'==_0x25f855['type']||'removeRootAttribute'==_0x25f855['type']||'changeRootAttribute'==_0x25f855['type'])return void this['_handleRootAttributeOperation'](_0x25f855);'marker'==_0x25f855['type']&&this['_handleMarkerOperation'](_0x25f855);}if('marker'!==_0x25f855['type']){const _0x2d3b57=this['_cloneOperation'](_0x25f855,this['_diffRoots']);_0x2d3b57['_execute'](),this['_transformMarkers'](_0x2d3b57);}if(_0x21be2c)switch(_0x25f855['type']){case'insert':this['_handleInsertOperation'](_0x25f855);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x25f855);break;case'merge':this['_handleMergeOperation'](_0x25f855);break;case'split':this['_handleSplitOperation'](_0x25f855);}}else this['_handleRootOperation'](_0x25f855,_0x21be2c);}['_cloneOperation'](_0x14e43a,_0x34794d){const _0x1a8d5b=_0x14e43a['clone']();return _0x1a8d5b['_authorId']=_0x14e43a['_authorId'],this['_fixOperation'](_0x1a8d5b,_0x34794d),_0x1a8d5b;}['_getBaseVids'](_0x20d7d1){return _0x20d7d1['map'](_0x33759e=>{const _0x2265ff=this['_getVidAttributeName'](_0x33759e);return Number(_0x33759e['item']['getAttribute'](_0x2265ff));});}['_generateTape'](_0x2276c9,_0x35e671){if(_0x2276c9['is']('element','$text'))_0x35e671['push']({'item':_0x2276c9,'type':'text'});else{_0x2276c9['is']('element')&&_0x35e671['push']({'item':_0x2276c9,'type':'elementStart'});for(const _0x4db705 of _0x2276c9['getChildren']())this['_generateTape'](_0x4db705,_0x35e671);_0x2276c9['is']('element')&&_0x35e671['push']({'item':_0x2276c9,'type':'elementEnd'});}return _0x35e671;}['_getState'](){const _0x4f0a7e=new Map(this['_touched']),_0x3cf78e=new Map(_0x4f0a7e),_0x26c546=new Map(),_0x4cc4b8={'insertions':{},'deletions':{}},_0x54b1ad={'insertions':{},'deletions':{}},_0x38b205=new Map(),_0x308073=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x308073['delete']('$graveyard');for(const _0xe4a8f9 of _0x308073){const _0x4b400a=this['_diffRoots']['get'](_0xe4a8f9)||P(_0xe4a8f9,!0x1),_0xcf6bb1=this['_baseRoots']['get'](_0xe4a8f9)||P(_0xe4a8f9,!0x1);_0x4b400a['isAttached']()||_0xcf6bb1['isAttached']()?(_0x4cc4b8['insertions'][_0xe4a8f9]=N(_0x4b400a),_0x4cc4b8['deletions'][_0xe4a8f9]=N(_0xcf6bb1),this['_copyMarkers'](_0x4cc4b8['deletions'][_0xe4a8f9],_0xcf6bb1),this['_copyMarkers'](_0x4cc4b8['insertions'][_0xe4a8f9],_0x4b400a),_0x54b1ad['insertions'][_0xe4a8f9]=this['_generateTape'](this['_idsRoots']['get'](_0xe4a8f9),[]),_0x54b1ad['deletions'][_0xe4a8f9]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xe4a8f9)||P(_0xe4a8f9,!0x1),[])):_0x308073['delete'](_0xe4a8f9);}for(const _0x1e00ec of _0x308073){const _0xaff5bf=_0x54b1ad['insertions'][_0x1e00ec];for(const _0x590484 of _0xaff5bf){const _0x88f4b1=this['_getVidAttributeName'](_0x590484),_0x519614=_0x590484['item']['getAttribute'](_0x88f4b1);_0x3cf78e['delete'](_0x519614),_0x519614>=this['_startingRevisionId']&&_0x26c546['set'](_0x519614,_0x4f0a7e['get'](_0x519614));}}for(const _0x3e6714 of _0x308073){const _0x4e7ff2=_0x54b1ad['insertions'][_0x3e6714],_0x32d79e=this['_getBaseVids'](_0x54b1ad['deletions'][_0x3e6714]);let _0x154e00=0x0;for(const _0x178332 of _0x4e7ff2){const _0x3f1558=this['_getVidAttributeName'](_0x178332),_0x2f7a4a=_0x178332['item']['getAttribute'](_0x3f1558);if(!_0x26c546['has'](_0x2f7a4a)&&!_0x38b205['has'](_0x2f7a4a)){if(_0x3cf78e['has'](_0x2f7a4a))_0x154e00++;else{if(_0x2f7a4a!=_0x32d79e[_0x154e00]){const _0xf579a4=_0x4f0a7e['get'](_0x2f7a4a)||_0x4f0a7e['get'](_0x32d79e[_0x154e00]);for(;_0x2f7a4a!=_0x32d79e[_0x154e00];)_0x3cf78e['has'](_0x32d79e[_0x154e00])||(_0x38b205['set'](_0x32d79e[_0x154e00],_0xf579a4),_0x4f0a7e['set'](_0x32d79e[_0x154e00],_0xf579a4)),_0x154e00++;}_0x154e00++;}}}}for(const _0x4736f6 of _0x308073){const _0x3d4fde=_0x54b1ad['insertions'][_0x4736f6];for(const _0x4a38f5 of _0x3d4fde){const _0x47854b=this['_getVidAttributeName'](_0x4a38f5),_0x3bba23=_0x4a38f5['item']['getAttribute'](_0x47854b);if(_0x38b205['has'](_0x3bba23)){const _0x26ff58=_0x38b205['get'](_0x3bba23);_0x3cf78e['has'](_0x3bba23)||_0x3cf78e['set'](_0x3bba23,{..._0x26ff58}),_0x26c546['set'](_0x3bba23,{..._0x26ff58});}}}for(const _0xa8c2ac of _0x3cf78e['keys']())_0xa8c2ac>=this['_startingRevisionId']&&_0x3cf78e['delete'](_0xa8c2ac);const _0x55710c=new Map();for(const _0x1262e7 of _0x308073){let _0x327feb=_0x54b1ad['insertions'][_0x1262e7];for(const _0x5c187e of _0x327feb)if(_0x5c187e['item']['is']('element','tableCell')){const _0x3f160c=this['_getVidAttributeName'](_0x5c187e),_0xef29cf=_0x5c187e['item']['getAttribute'](_0x3f160c);if(_0x26c546['has'](_0xef29cf)){const _0x4c7ec2=_0x5c187e['item']['parent']['parent']['getAttribute']('vid_start'),_0x2d1bdc=_0x55710c['get'](_0x4c7ec2)||new Set();_0x2d1bdc['add'](_0x26c546['get'](_0xef29cf)['userId']),_0x55710c['set'](_0x4c7ec2,_0x2d1bdc);}}_0x327feb=_0x54b1ad['deletions'][_0x1262e7];for(const _0x1aab03 of _0x327feb)if(_0x1aab03['item']['is']('element','tableCell')){const _0x51a6ac=this['_getVidAttributeName'](_0x1aab03),_0x593b9b=_0x1aab03['item']['getAttribute'](_0x51a6ac);if(_0x3cf78e['has'](_0x593b9b)){const _0x3bf208=_0x1aab03['item']['parent']['parent']['getAttribute']('vid_start'),_0x25ab0b=_0x55710c['get'](_0x3bf208)||new Set();_0x25ab0b['add'](_0x3cf78e['get'](_0x593b9b)['userId']),_0x55710c['set'](_0x3bf208,_0x25ab0b);}}for(const _0x441c26 of _0x55710c['keys']())(_0x26c546['has'](_0x441c26)||_0x3cf78e['has'](_0x441c26))&&_0x55710c['delete'](_0x441c26);}for(const _0x305c0a of _0x308073){const _0x5d1688=_0x54b1ad['insertions'][_0x305c0a];let _0x8de701=null,_0x10b109=null;for(const _0x568a01 of _0x5d1688){const _0x54a254=this['_getVidAttributeName'](_0x568a01),_0x34dde5=_0x568a01['item']['getAttribute'](_0x54a254),_0x435e65=_0x55710c['get'](_0x34dde5);_0x435e65&&'elementStart'==_0x568a01['type']&&(_0x8de701=Array['from'](_0x435e65)[0x0],_0x10b109=_0x568a01['item']['getAttribute']('vid_end')),_0x8de701&&(_0x3cf78e['set'](_0x34dde5,{'userId':_0x8de701}),_0x26c546['set'](_0x34dde5,{'userId':_0x8de701})),_0x34dde5==_0x10b109&&(_0x8de701=null,_0x10b109=null);}}const _0x24c739={},_0x55b633=new Set();for(const _0x31fdb3 of _0x308073){const _0x5b640a=_0x4cc4b8['deletions'][_0x31fdb3],_0x4012e9=_0x4cc4b8['insertions'][_0x31fdb3];for(const {userId:_0x50532a}of this['_touchedMarkers']['values']())null!==_0x50532a&&_0x55b633['add'](_0x50532a);for(const {userId:_0x4ac16b}of this['_touchedRoots']['values']())null!==_0x4ac16b&&_0x55b633['add'](_0x4ac16b);this['_markChanges'](_0x4012e9,_0x54b1ad['insertions'][_0x31fdb3],_0x26c546,'insertion',_0x55b633),this['_markChanges'](_0x5b640a,_0x54b1ad['deletions'][_0x31fdb3],_0x3cf78e,'deletion',_0x55b633),_0x24c739[_0x31fdb3]={'insertions':this['_prepareViewToSave'](_0x4012e9),'deletions':this['_prepareViewToSave'](_0x5b640a),'attachChange':this['_touchedRoots']['get'](_0x31fdb3)||null,'attributesBefore':_0x74c535(this['_baseRootsAttributes']['get'](_0x31fdb3))||{},'attributesAfter':_0x74c535(this['_diffRootsAttributes']['get'](_0x31fdb3))};}return{'diffData':_0x24c739,'authorsIds':Array['from'](_0x55b633)};}['_processRootBeforeSave'](_0x388189){for(const [,_0x389f8c]of _0x388189['markers']){const _0x493a8e=_0x389f8c['start']['getAncestors']()['filter'](_0x2c6e54=>'tableCell'==_0x2c6e54['name']);for(const _0x4edc00 of _0x493a8e)0x1==_0x4edc00['childCount']&&_0x4edc00['getChild'](0x0)['is']('element','paragraph')&&_0x4edc00['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x36efc5){this['_processRootBeforeSave'](_0x36efc5);const _0x3e8f85=this['editor']['data']['toView'](_0x36efc5,{}),_0x1b885c=Array['from'](_0x3e8f85['getChildren']())['map'](_0x213597=>this['_getViewJson'](_0x213597));return JSON['stringify'](_0x1b885c);}['_getViewJson'](_0x41100d){if(_0x41100d['is']('$text'))return _0x41100d['data'];{const _0x43927f=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5d4286=_0x41100d,_0x275d44=this['editor']['data']['htmlProcessor']['domConverter'],_0x3f1ecb={'type':_0x43927f['_getTypeCharForViewElement'](_0x5d4286),'name':_0x5d4286['name'],'attributes':Array['from'](_0x5d4286['getAttributes']()),'children':Array['from'](_0x5d4286['getChildren']())['map'](_0xc0ef6e=>this['_getViewJson'](_0xc0ef6e))};if(_0x41100d['is']('uiElement')&&'$comment'!=_0x41100d['name']){const _0x5af204=_0x41100d['render'](_0x275d44['domDocument'],_0x275d44);_0x3f1ecb['children']['push'](_0x5af204['outerHTML']);}else{if(_0x41100d['is']('rawElement')){const _0x4d4dfb=_0x275d44['domDocument']['createElement'](_0x5d4286['name']);_0x41100d['render'](_0x4d4dfb,_0x275d44),_0x3f1ecb['children']['push'](_0x4d4dfb['innerHTML']);}}const _0x34c90d=Array['from'](_0x5d4286['getCustomProperties']());_0x34c90d['length']>0x0&&(_0x3f1ecb['customProperties']=_0x34c90d);const _0x3a6301=_0x5d4286['getFillerOffset']();return null!==_0x3a6301&&(_0x3f1ecb['fillerOffset']=_0x3a6301),_0x3f1ecb;}}['_markChanges'](_0x70d3da,_0xdc56c6,_0x2422d0,_0x26a8a7,_0x12bd69){let _0x4bf23f=null,_0x1a37f1=null,_0x3f2729=0x0;const _0x15370c=this['editor']['model'];for(let _0x1b57e8=0x0;_0x1b57e8<_0xdc56c6['length'];_0x1b57e8++){const _0x34b1c3=this['_getVidAttributeName'](_0xdc56c6[_0x1b57e8]),_0x4f02aa=_0xdc56c6[_0x1b57e8]['item']['getAttribute'](_0x34b1c3),_0x48427f=_0x2422d0['get'](_0x4f02aa),_0x2d8592=_0x1b57e8==_0xdc56c6['length']-0x1;(!_0x4bf23f&&_0x48427f&&(_0x4bf23f=_0x48427f,_0x1a37f1=_0xdc56c6[_0x1b57e8]),_0x4bf23f&&(!_0x48427f||_0x48427f['userId']!=_0x4bf23f['userId']))&&(_0x507d44(_0x48427f,F(_0x1a37f1,_0x70d3da,_0x15370c),F(_0xdc56c6[_0x1b57e8],_0x70d3da,_0x15370c)),_0x4bf23f=_0x48427f||null,_0x1a37f1=_0x48427f?_0xdc56c6[_0x1b57e8]:null),_0x4bf23f&&_0x2d8592&&_0x507d44(_0x48427f,F(_0x1a37f1,_0x70d3da,_0x15370c),B(_0xdc56c6[_0x1b57e8],_0x70d3da,_0x15370c));}function _0x507d44(_0x3484f2,_0x1ceb8f,_0xcd4de6){const _0x4e24f0=_0x4bf23f['userId'],_0x1a8ca7='revision:'+_0x26a8a7+':'+_0x4e24f0+':'+_0x3f2729++,_0x48403f=_0x15370c['createRange'](_0x1ceb8f,_0xcd4de6);_0x70d3da['markers']['set'](_0x1a8ca7,_0x48403f),null!==_0x4e24f0&&_0x12bd69['add'](_0x4e24f0);}}['_getVidAttributeName'](_0x2dcae3){switch(_0x2dcae3['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x61599d,_0x168bfc){_0x61599d['baseVersion']=null;for(const _0x2a158e in _0x61599d){const _0x564355=_0x61599d[_0x2a158e];if(_0x564355 instanceof ft){const _0x1553c2=_0x168bfc['get'](_0x564355['root']['rootName']);_0x61599d[_0x2a158e]=this['_fixPosition'](_0x564355,_0x1553c2);}if(_0x564355 instanceof lt){const _0x1bcd57=_0x168bfc['get'](_0x564355['root']['rootName']);_0x61599d[_0x2a158e]=this['_fixRange'](_0x564355,_0x1bcd57);}'root'===_0x2a158e&&(_0x61599d['root']=_0x168bfc['get'](_0x61599d['root']['rootName']));}}['_fixRange'](_0x391b94,_0x5ebfda){return this['editor']['model']['createRange'](this['_fixPosition'](_0x391b94['start'],_0x5ebfda),this['_fixPosition'](_0x391b94['end'],_0x5ebfda));}['_fixPosition'](_0xece24a,_0x3d6a1b){return this['editor']['model']['createPositionFromPath'](_0x3d6a1b,_0xece24a['path'],_0xece24a['stickiness']);}['_handleInsertOperation'](_0x80bfe2){const _0x35da92=this['_idsRoots']['get'](_0x80bfe2['position']['root']['rootName']),_0x5dc25d=this['_fixPosition'](_0x80bfe2['position'],_0x35da92),_0x2aa606=null===_0x80bfe2['_authorId']?null:_0x80bfe2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2f172e=_0x5dc25d['parent'],_0x469e8a=this['_revisionId'],_0x25bfb7=[];for(const _0x907c99 of _0x80bfe2['nodes'])if(_0x907c99['is']('element'))_0x25bfb7['push'](this['_makeIdsRoot'](_0x907c99));else{for(let _0x39b02d=0x0;_0x39b02d<_0x907c99['offsetSize'];_0x39b02d++)_0x25bfb7['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0xd28ec6=this['_revisionId'];for(let _0x1cc6c9=_0x469e8a;_0x1cc6c9<_0xd28ec6;_0x1cc6c9++)this['_touched']['set'](_0x1cc6c9,{'userId':_0x2aa606});_0x2f172e['_insertChild'](_0x5dc25d['offset'],_0x25bfb7);}['_handleMoveOperation'](_0x54b6da){(_0x54b6da=this['_cloneOperation'](_0x54b6da,this['_idsRoots']))['_execute']();const _0x4e0854=null===_0x54b6da['_authorId']?null:_0x54b6da['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x493092=_0x54b6da['getMovedRangeStart'](),_0x3497f6=_0x493092['parent'],_0x4d3a4b=_0x493092['offset'];!function _0x1c5bd3(_0x4453ad,_0x5aef36,_0x4d1904,_0xa6890f){for(let _0x792185=_0x4d1904;_0x792185<_0xa6890f;_0x792185++){const _0x565b17=_0x5aef36['getChild'](_0x792185);_0x565b17['is']('element','$text')?_0x4453ad['set'](_0x565b17['getAttribute']('vid'),{'userId':_0x4e0854}):(_0x4453ad['set'](_0x565b17['getAttribute']('vid_start'),{'userId':_0x4e0854}),_0x1c5bd3(_0x4453ad,_0x565b17,0x0,_0x565b17['childCount']),_0x4453ad['set'](_0x565b17['getAttribute']('vid_end'),{'userId':_0x4e0854}));}}(this['_touched'],_0x3497f6,_0x4d3a4b,_0x4d3a4b+_0x54b6da['howMany']);}['_handleMergeOperation'](_0x1253c8){const _0x96f93c=null===(_0x1253c8=this['_cloneOperation'](_0x1253c8,this['_idsRoots']))['_authorId']?null:_0x1253c8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x316573=_0x1253c8['targetPosition']['parent'],_0x19b235=_0x1253c8['sourcePosition']['parent'],_0x22e748=_0x316573['getAttribute']('vid_end'),_0x1d80ff=_0x19b235['getAttribute']('vid_start');_0x316573['_setAttribute']('vid_end',_0x19b235['getAttribute']('vid_end')),_0x19b235['_setAttribute']('vid_end',_0x22e748),this['_touched']['set'](_0x1d80ff,{'userId':_0x96f93c}),this['_touched']['set'](_0x22e748,{'userId':_0x96f93c}),_0x1253c8['_execute']();}['_handleSplitOperation'](_0x365072){const _0x58de47=null===(_0x365072=this['_cloneOperation'](_0x365072,this['_idsRoots']))['_authorId']?null:_0x365072['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1e5a0c=_0x365072['graveyardPosition'],_0x523261=_0x365072['splitPosition']['parent'];_0x365072['_execute']();const _0x57ecd1=_0x523261['getAttribute']('vid_end'),_0x3dbda4=_0x365072['insertionPosition']['nodeAfter'];if(_0x1e5a0c){const _0x3c20e0=_0x3dbda4['getAttribute']('vid_end'),_0x231a4d=_0x523261['getAttribute']('vid_end');_0x523261['_setAttribute']('vid_end',_0x3c20e0),_0x3dbda4['_setAttribute']('vid_end',_0x231a4d),this['_touched']['set'](_0x523261['getAttribute']('vid_end'),{'userId':_0x58de47}),this['_touched']['set'](_0x3dbda4['getAttribute']('vid_start'),{'userId':_0x58de47});}else{const _0x2a3e2b=this['_revisionId']++,_0x1c70ec=this['_revisionId']++;_0x523261['_setAttribute']('vid_end',_0x2a3e2b),_0x3dbda4['_setAttribute']('vid_start',_0x1c70ec),_0x3dbda4['_setAttribute']('vid_end',_0x57ecd1),this['_touched']['set'](_0x2a3e2b,{'userId':_0x58de47}),this['_touched']['set'](_0x1c70ec,{'userId':_0x58de47});}}['_handleMarkerOperation'](_0x4380d5){if(!_0x4380d5['affectsData'])return;const _0x507414=(_0x4380d5=this['_cloneOperation'](_0x4380d5,this['_diffRoots']))['oldRange']?_0x4380d5['oldRange']['root']:null,_0x43ead5=_0x4380d5['newRange']?_0x4380d5['newRange']['root']:null;_0x507414&&this['_markers']['delete'](_0x4380d5['name']),_0x43ead5&&this['_markers']['set'](_0x4380d5['name'],_0x4380d5['newRange']['clone']());const _0x15a80b=null===_0x4380d5['_authorId']?null:_0x4380d5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x29d62f=_0x4380d5['name'];if(!this['_touchedMarkers']['has'](_0x29d62f))return void this['_touchedMarkers']['set'](_0x29d62f,{'range':_0x4380d5['oldRange'],'userId':_0x15a80b});const _0x111fee=this['_touchedMarkers']['get'](_0x29d62f),_0x4c67fe=_0x111fee['range'],_0x3bc34f=_0x4380d5['newRange'];null==_0x4c67fe&&null==_0x3bc34f||_0x4c67fe&&_0x3bc34f&&_0x4c67fe['isEqual'](_0x3bc34f)?this['_touchedMarkers']['delete'](_0x4380d5['name']):_0x111fee['userId']=_0x15a80b;}['_handleRootOperation'](_0xbd239a,_0xb2b633){this['_diffRoots']['has'](_0xbd239a['rootName'])?this['_diffRoots']['get'](_0xbd239a['rootName'])['_isAttached']=_0xbd239a['isAdd']:(this['_diffRoots']['set'](_0xbd239a['rootName'],P(_0xbd239a['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0xbd239a['rootName'],{}),_0xb2b633&&this['_idsRoots']['set'](_0xbd239a['rootName'],P(_0xbd239a['rootName'],!0x0)));const _0xe555e4=null===_0xbd239a['_authorId']?null:_0xbd239a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4810ed=this['_touchedRoots']['get'](_0xbd239a['rootName']);_0x4810ed&&_0x4810ed['userId']===_0xe555e4?this['_touchedRoots']['delete'](_0xbd239a['rootName']):this['_touchedRoots']['set'](_0xbd239a['rootName'],{'userId':_0xe555e4,'isAttached':_0xbd239a['isAdd']});}['_handleRootAttributeOperation'](_0x3c788d){const _0x13fe62=this['_diffRootsAttributes']['get'](_0x3c788d['root']['rootName']);null===_0x3c788d['newValue']?delete _0x13fe62[_0x3c788d['key']]:_0x13fe62[_0x3c788d['key']]=_0x3c788d['newValue'];}}function N(_0x2e37e1){const _0x27eeeb=P(_0x2e37e1['rootName'],_0x2e37e1['isAttached']());for(const _0x35ec92 of _0x2e37e1['getChildren']()){const _0x3d8a09=_0x35ec92['_clone'](!0x0);_0x27eeeb['_appendChild'](_0x3d8a09);}return _0x27eeeb;}function P(_0x4b4f6e,_0x1ed949=!0x0){const _0x1a2409=new vt();return _0x1a2409['rootName']=_0x4b4f6e,_0x1a2409['_isAttached']=_0x1ed949,_0x1a2409['isAttached']=()=>_0x1a2409['_isAttached'],_0x1a2409;}function F(_0x429edd,_0x3e4dca,_0x32d9b6){const _0x47ea9b='elementEnd'==_0x429edd['type']?_0x32d9b6['createPositionAt'](_0x429edd['item'],'end'):_0x32d9b6['createPositionBefore'](_0x429edd['item']);return _0x32d9b6['createPositionFromPath'](_0x3e4dca,_0x47ea9b['path'],_0x47ea9b['stickiness']);}function B(_0x69bade,_0x5c2a3b,_0x4d64cd){const _0x13dcc7='elementStart'==_0x69bade['type']?_0x4d64cd['createPositionAt'](_0x69bade['item'],0x0):_0x4d64cd['createPositionAfter'](_0x69bade['item']);return _0x4d64cd['createPositionFromPath'](_0x5c2a3b,_0x13dcc7['path'],_0x13dcc7['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x239a14,_0x228da1){super(_0x239a14),this['focusTracker']=new _0x1abf6e(),this['keystrokes']=new _0x39fef4(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x228da1),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x57348d(this);}['render'](){super['render'](),_0x28ff76({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x4ac9a7=_0x596911=>_0x596911['stopPropagation']();this['keystrokes']['set']('arrowright',_0x4ac9a7),this['keystrokes']['set']('arrowleft',_0x4ac9a7),this['keystrokes']['set']('arrowup',_0x4ac9a7),this['keystrokes']['set']('arrowdown',_0x4ac9a7);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x47dfc1){this['revisionNameInputView']['fieldView']['element']['value']=_0x47dfc1['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x2c9a78){const _0x502710=new _0x2be6a1(this['locale'],_0x22d3ee),_0x123cb4=_0x502710['fieldView'];_0x123cb4['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x35f99b=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x2c9a78&&(_0x35f99b+='\x20('+g(this['locale'],'optional')+')'),(_0x502710['label']=_0x35f99b,_0x123cb4['on']('input',()=>{this['revisionNameInputValue']=_0x123cb4['element']['value']['trim']();}),_0x502710);}}class f extends _0x37aa98{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x10e9dd=this['editor'],_0x159524=_0x10e9dd['plugins']['get']('RevisionTracker');_0x10e9dd['ui']['componentFactory']['add']('revisionHistory',_0x105495=>{const _0x1e524d=_0x5d6b2b(_0x105495),_0x3d9c31=_0x1e524d['panelView']['children'],_0x207af3=new _0x42b4bf(_0x105495),_0x194e38=new _0x2b9608(_0x105495),_0x1c3bc0=new te(_0x105495),_0xd14a35=new _0x2b9608(_0x105495),_0x1d5886=new te(_0x105495);return _0x1e524d['bind']('isEnabled')['to'](_0x159524,'isReady',_0x159524,'isEnabled',_0x10e9dd,'isReadOnly',(_0x5385dd,_0x4ecee0,_0x176821)=>_0x5385dd&&_0x4ecee0&&!_0x176821),_0x1e524d['buttonView']['set']({'icon':_0x3acfa9,'label':g(_0x105495,'Revision\x20history'),'tooltip':!0x0}),_0x1c3bc0['set']({'label':g(_0x105495,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x1c3bc0['bind']('isEnabled')['to'](_0x159524,'isReady',_0x159524,'isEnabled',_0x10e9dd,'isReadOnly',(_0x3f1e6a,_0x3e1107,_0x2174b8)=>_0x3f1e6a&&_0x3e1107&&!_0x2174b8),_0x1c3bc0['on']('execute',()=>this['_showDialog']()),_0x1d5886['set']({'label':g(_0x105495,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x1d5886['bind']('isEnabled')['to'](_0x159524,'isReady',_0x10e9dd,'isReadOnly',(_0x5837b4,_0x20fcaa)=>_0x5837b4&&!_0x20fcaa),_0x1d5886['on']('execute',()=>{_0x10e9dd['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x1e524d['isOpen']=!0x1,_0x10e9dd['editing']['view']['focus']();}),_0x194e38['children']['add'](_0x1c3bc0),_0xd14a35['children']['add'](_0x1d5886),_0x207af3['role']='menu',_0x207af3['items']['addMany']([_0x194e38,_0xd14a35]),_0x3d9c31['add'](_0x207af3),_0x1e524d;}),_0x10e9dd['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x3397b5=this['editor'],_0x1e1396=_0x3397b5['locale'],_0x65db73=new _0x30700f(_0x1e1396),_0x3c231c=new _0x106d90(_0x1e1396);_0x65db73['buttonView']['set']({'icon':_0x3acfa9,'label':g(_0x1e1396,'Revision\x20history')});const _0x2b999a=new _0x5c4104(_0x1e1396,_0x65db73),_0x1d0b89=new _0x51450e(_0x1e1396);_0x1d0b89['set']({'label':g(_0x1e1396,'Save\x20current\x20revision')}),_0x1d0b89['delegate']('execute')['to'](_0x65db73),_0x1d0b89['on']('execute',()=>{this['_showDialog']();}),_0x2b999a['children']['add'](_0x1d0b89),_0x3c231c['items']['add'](_0x2b999a);const _0x37703d=new _0x5c4104(_0x1e1396,_0x65db73),_0x158bd0=new _0x51450e(_0x1e1396);return _0x158bd0['set']({'label':g(_0x1e1396,'Open\x20revision\x20history')}),_0x158bd0['delegate']('execute')['to'](_0x65db73),_0x158bd0['on']('execute',()=>{_0x3397b5['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x37703d['children']['add'](_0x158bd0),_0x3c231c['items']['add'](_0x37703d),_0x65db73['panelView']['children']['add'](_0x3c231c),_0x65db73;}['_showDialog'](){const _0x1b4e50=this['editor'],_0x518386=_0x1b4e50['locale'],_0x59b344=_0x1b4e50['plugins']['get']('Dialog'),_0x208f71=_0x1b4e50['plugins']['get']('RevisionTracker');function _0x5b1583(_0x1a6aa7){_0x1b4e50['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1a6aa7['revisionName']?_0x1a6aa7['revisionNameInputView']['errorText']=g(_0x518386,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x1b4e50['plugins']['get'](u)['saveRevision']({'name':_0x1a6aa7['revisionName']}),_0x59b344['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5b1583(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x59b344['show']({'id':'revisionSave','title':g(_0x518386,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x1b4e50['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x59b344['hide']()},{'label':g(_0x1b4e50['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3dd4d4){_0x3dd4d4['bind']('isEnabled')['to'](_0x208f71,'isReady',_0x208f71,'isEnabled',_0x1b4e50,'isReadOnly',(_0x5f0f1d,_0x1610d4,_0x2b30fa)=>_0x5f0f1d&&_0x1610d4&&!_0x2b30fa);},'onExecute':()=>_0x5b1583(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0xe01e37=this['editor'],_0x189905=_0xe01e37['locale'];this['_saveRevisionFormView']=new hs(_0x189905,_0xe01e37['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends ts{['changeId'];['_model'];constructor(_0x313863,_0x1573c7){super(_0x313863),this['_model']=_0x1573c7,this['changeId']=_0x1573c7['id'];const _0x1df979=this['bindTemplate'],_0x459085=g(_0x313863,_0x1573c7['data']['isSuggestion']?'Suggested\x20by':'add'==_0x1573c7['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x1573c7['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x1df979['to']('type',_0x3d6e2a=>'ck-revision-change__'+_0x3d6e2a)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x459085}]},{'text':'\x20'+_0x1573c7['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1fae21(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x1f6c60){super(),this['id']=_0x1f6c60['id']||_0x498586(),this['author']=_0x1f6c60['author'],this['type']=_0x1f6c60['type'],this['data']=_0x1f6c60['data']||{},this['rootName']=_0x1f6c60['rootName'],this['set']('createdAt',_0x1f6c60['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(_0x11dae5,_0x33f89f){this['newRevisionId']=_0x11dae5,this['oldRevisionId']=_0x33f89f,this['changes']=new _0x2a9213();}['_setChanges'](_0x14e9c3){for(const _0x551629 of _0x14e9c3)this['changes']['add'](_0x551629);}}class m extends _0x37aa98{['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[_0x3c957c,_0x400c5c,I,V];}constructor(_0x5cbce0){super(_0x5cbce0),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',(_0x2cf128,_0x2561e2,_0x49cde5)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x100fd0=>{for(const _0x506703 of this['editor']['editing']['view']['document']['roots'])_0x49cde5?_0x100fd0['removeClass']('ck-editor__editable__overlay',_0x506703):_0x100fd0['addClass']('ck-editor__editable__overlay',_0x506703);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x784519=>null!==_0x784519),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x53f1fb,_0x2db385,_0x507efa)=>_0x53f1fb&&_0x507efa?_0x2db385['changes']['getIndex'](_0x507efa):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x282a25,_0xb6f862)=>_0x282a25?_0xb6f862['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x400c5c);}['init'](){const _0x8b86b8=this['editor'],_0x17e710=new wt(_0x8b86b8,{'direction':'backward'}),_0x44f06b=new wt(_0x8b86b8,{'direction':'forward'});(_0x8b86b8['commands']['add']('showPreviousChange',_0x17e710),_0x8b86b8['commands']['add']('showNextChange',_0x44f06b),_0x8b86b8['commands']['add']('restoreRevision',new mt(_0x8b86b8)),this['on']('change:numberOfChanges',()=>{_0x17e710['refresh'](),_0x44f06b['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x8b86b8['enableReadOnlyMode']('revision-viewer'),_0x8b86b8['plugins']['has']('WidgetToolbarRepository'))&&_0x8b86b8['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x239ef6){return await this['_utils']['loadRevisionData'](_0x239ef6,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x239ef6);}async['getRevisionRootsAttributes'](_0x8ac952){return await this['_utils']['loadRevisionData'](_0x8ac952,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x8ac952);}async['compare'](_0x1940b2,_0x35f03c,_0x5734f3=!0x1){if(!this['isEnabled'])return;const _0x541868=this['diff'],_0x4ae760=this['repository'],_0x5ccb18='string'==typeof _0x1940b2?_0x4ae760['getRevision'](_0x1940b2):_0x1940b2,_0x36c2dc='string'==typeof _0x35f03c?_0x4ae760['getRevision'](_0x35f03c):_0x35f03c,_0x170974=_0x5ccb18['id'],_0x503775=_0x36c2dc?_0x36c2dc['id']:null;if(!_0x5734f3&&this['diff']&&this['diff']['newRevisionId']===_0x170974&&this['diff']['oldRevisionId']===_0x503775)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x170974,_0x503775);const _0x17cc69=this['_getRevisionsRange'](_0x5ccb18,_0x36c2dc,!0x0)['map'](_0x31027f=>this['_utils']['loadRevisionData'](_0x31027f,this['adapter']));return _0x17cc69['push'](new Promise(_0x1ef2bc=>{setTimeout(_0x1ef2bc,0x14);})),Promise['all'](_0x17cc69)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2d8f0d=this['_getDiff'](_0x170974,_0x503775);for(const _0x17162b of _0x2d8f0d['changes'])this['_changeIdToChange']['set'](_0x17162b['id'],_0x17162b);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xd1c8a2=>{for(const _0x4d862a of this['editor']['model']['document']['getRootNames']())_0xd1c8a2['detachRoot'](_0x4d862a);for(const _0x328957 of Object['keys'](_0x2d8f0d['model'])){const _0x24bea8=_0xd1c8a2['addRoot'](_0x328957);for(const _0x14251a of Object['keys'](_0x2d8f0d['attributes'][_0x328957]))_0xd1c8a2['setAttribute'](_0x14251a,_0x2d8f0d['attributes'][_0x328957][_0x14251a],_0x24bea8);_0xd1c8a2['insert'](_0x2d8f0d['model'][_0x328957],_0x24bea8,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2d8f0d['changes'])),this['isReady']=!0x0;})['catch'](_0x292bb5=>{console['error'](_0x292bb5),this['_cleanUp'](),_0x541868&&(this['diff']=_0x541868),this['isReady']=!0x0;});}['addRevisionData'](_0x56f130,_0x1bd1cd){const _0x253028=this['repository']['createRevision'](_0x56f130);return _0x253028['on']('_update',(_0x3e4fa9,_0x3c22fc,_0x247b62)=>_0x1bd1cd(_0x3c22fc,_0x247b62,_0x253028)),this['repository']['addRevision'](_0x253028),_0x253028;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5b7755=>{for(const _0x111182 of this['editor']['model']['document']['getRootNames']())_0x5b7755['detachRoot'](_0x111182);});}['_sortAndFilterDiffChanges'](_0x6af5b9){const _0x3855a4=[],_0x2fa098=new Map();for(const _0x286e66 of this['editor']['model']['document']['getRootNames']()){const _0x3089f2=this['editor']['editing']['view']['getDomRoot'](_0x286e66);if(!_0x3089f2)continue;const _0x5589c6=_0x3089f2['getClientRects']()['item'](0x0);_0x5589c6&&(_0x3855a4['push'](_0x286e66),_0x2fa098['set'](_0x286e66,_0x5589c6));}return _0x3855a4['sort']((_0xc01201,_0x160cdb)=>{const _0x5a8d8e=_0x2fa098['get'](_0xc01201),_0x520ea8=_0x2fa098['get'](_0x160cdb);return _0x5a8d8e['y']-_0x520ea8['y']||_0x5a8d8e['x']-_0x520ea8['x'];}),(_0x6af5b9=_0x6af5b9['filter'](_0x3af3cc=>_0x3855a4['includes'](_0x3af3cc['rootName'])))['sort']((_0x264979,_0x5a1f1c)=>_0x3855a4['indexOf'](_0x264979['rootName'])-_0x3855a4['indexOf'](_0x5a1f1c['rootName'])),_0x6af5b9;}['_makeTape'](_0x45f7d7){const _0x31895e=Array['from'](_0x45f7d7['markers'])['filter'](([_0x4f9580,_0x111211])=>_0x4f9580['startsWith']('revision:')&&!_0x111211['isCollapsed']),_0x5a7dad=Array['from'](this['editor']['model']['createRangeIn'](_0x45f7d7)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x31895e['length'])for(const _0xbf4382 of _0x5a7dad){const [_0x313c31,_0x413cad]=_0x31895e[0x0],[,_0x5578d3,_0x56be26]=_0x313c31['split'](':');if(_0x413cad['end']['isEqual'](_0xbf4382['nextPosition'])&&_0x31895e['shift'](),(_0xbf4382['previousPosition']['isEqual'](_0x413cad['start'])||_0xbf4382['previousPosition']['isAfter'](_0x413cad['start']))&&('insertion'==_0x5578d3?_0xbf4382['isAdded']={'userId':_0x56be26}:'deletion'==_0x5578d3&&(_0xbf4382['isRemoved']={'userId':_0x56be26})),0x0==_0x31895e['length'])break;}return _0x5a7dad;}['_refreshStartEndIndex'](_0x35c515){const _0x463f9f=new Map();for(let _0x5dd9e4=0x0;_0x5dd9e4<_0x35c515['length'];_0x5dd9e4++)'text'===_0x35c515[_0x5dd9e4]['type']?(_0x35c515[_0x5dd9e4]['item']['startIndex']=_0x5dd9e4,_0x35c515[_0x5dd9e4]['item']['endIndex']=_0x5dd9e4):('elementStart'===_0x35c515[_0x5dd9e4]['type']?_0x35c515[_0x5dd9e4]['item']['startIndex']=_0x5dd9e4:'elementEnd'===_0x35c515[_0x5dd9e4]['type']&&(_0x35c515[_0x5dd9e4]['item']['endIndex']=_0x5dd9e4),_0x463f9f['set'](_0x35c515[_0x5dd9e4]['id'],_0x5dd9e4));for(const _0x553e50 of _0x463f9f['values']())'elementStart'===_0x35c515[_0x553e50]['type']?_0x35c515[_0x553e50]['item']['endIndex']=_0x463f9f['get'](_0x35c515[_0x553e50]['pairId']):'elementEnd'===_0x35c515[_0x553e50]['type']&&(_0x35c515[_0x553e50]['item']['startIndex']=_0x463f9f['get'](_0x35c515[_0x553e50]['pairId']));}['_processTape'](_0x60cb72){for(let _0x5cb65f=0x0;_0x5cb65f<_0x60cb72['length'];_0x5cb65f++){if('elementStart'===_0x60cb72[_0x5cb65f]['type'])_0x60cb72[_0x5cb65f]['item']['startIndex']=_0x5cb65f;else{if('elementEnd'===_0x60cb72[_0x5cb65f]['type']){_0x60cb72[_0x5cb65f]['item']['endIndex']=_0x5cb65f;const _0x41054b=_0x60cb72[_0x5cb65f]['item']['startIndex'];_0x60cb72[_0x41054b]['pairId']=_0x60cb72[_0x5cb65f]['id'],_0x60cb72[_0x5cb65f]['pairId']=_0x60cb72[_0x41054b]['id'];}else _0x60cb72[_0x5cb65f]['item']['startIndex']=_0x5cb65f,_0x60cb72[_0x5cb65f]['item']['endIndex']=_0x5cb65f,_0x60cb72[_0x5cb65f]['pairId']=null;}_0x60cb72[_0x5cb65f]['markersStart']||(_0x60cb72[_0x5cb65f]['markersStart']=[],_0x60cb72[_0x5cb65f]['markersEnd']=[]);}}['_markInsertions'](_0x7272d5,_0x52f720){const _0x5ec1cb=_0x7272d5['filter'](_0x338516=>!_0x338516['isAdded']);for(let _0x33753f=0x0;_0x33753f<_0x52f720['length'];_0x33753f++)_0x52f720[_0x33753f]['isAdded']&&(_0x5ec1cb[_0x33753f]['isAdded']=_0x52f720[_0x33753f]['isAdded']);}['_getDiff'](_0x30021,_0x50d9f9=null){const _0x47e4e3=this['repository']['getRevision'](_0x30021),_0x2d2ecb=_0x50d9f9?this['repository']['getRevision'](_0x50d9f9):null,_0x5aaec5=this['_getRevisionsRange'](_0x47e4e3,_0x2d2ecb),_0x19075c=_0x5aaec5[_0x5aaec5['length']-0x1],_0x5c531a=new Map(),_0x20e199={'model':{},'attributes':{},'changes':[]},_0x5a3908=new Set(),_0x3ee6bf=new Map();for(let _0x27dc26=_0x5aaec5['length']-0x1;_0x27dc26>=0x0;_0x27dc26--){const _0x4d9cb9=_0x5aaec5[_0x27dc26];for(const _0x4aba8f of Object['keys'](_0x4d9cb9['diffData']))if(_0x4d9cb9['diffData'][_0x4aba8f]['attachChange']){const _0xa7076c=_0x4d9cb9['diffData'][_0x4aba8f]['attachChange'];_0xa7076c['isAttached']?(_0x5a3908['add'](_0x4aba8f),_0x3ee6bf['has'](_0x4aba8f)&&_0x3ee6bf['get'](_0x4aba8f)['userId']==_0xa7076c['userId']?_0x3ee6bf['delete'](_0x4aba8f):_0x3ee6bf['set'](_0x4aba8f,_0xa7076c)):_0x3ee6bf['has'](_0x4aba8f)?(_0x5a3908['delete'](_0x4aba8f),_0x3ee6bf['delete'](_0x4aba8f)):(_0x5a3908['add'](_0x4aba8f),_0x3ee6bf['set'](_0x4aba8f,_0xa7076c));}else _0x5a3908['add'](_0x4aba8f);}for(const _0x3465aa of _0x5a3908){const _0x1fc07b=_0x3ee6bf['has'](_0x3465aa)&&!_0x3ee6bf['get'](_0x3465aa)['isAttached'];let _0x41ccba=_0x1fc07b?_0x5aaec5['length']-0x1:0x0;const _0x3ed9fa=_0x1fc07b?-0x1:0x1;for(;_0x5aaec5[_0x41ccba];){const _0x410252=_0x5aaec5[_0x41ccba];if(_0x410252['diffData'][_0x3465aa]){const _0x55147b=_0x1fc07b?_0x410252['diffData'][_0x3465aa]['attributesBefore']:_0x410252['diffData'][_0x3465aa]['attributesAfter'];_0x20e199['attributes'][_0x3465aa]=_0x55147b?_0x74c535(_0x55147b):{};break;}_0x41ccba+=_0x3ed9fa;}}for(const _0x285a72 of _0x5aaec5){_0x285a72['model']={};for(const _0x3b49c5 of _0x285a72['authors'])_0x5c531a['set'](_0x3b49c5['id'],_0x3b49c5);for(const _0x83c185 of _0x5a3908){const _0x4a9d4b=_0x285a72['diffData'][_0x83c185]?_0x285a72['diffData'][_0x83c185]['insertions']:'[]',_0x5e20f1=_0x285a72['diffData'][_0x83c185]?_0x285a72['diffData'][_0x83c185]['deletions']:'[]';_0x285a72['model'][_0x83c185]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4a9d4b),'deletions':this['_utils']['_makeModelFromViewString'](_0x5e20f1)};}}for(const _0x50d49b of _0x5a3908){let _0x217134=null,_0x5ac8e0=0x0;const _0x21b71a=new Map(Array['from'](_0x47e4e3['model'][_0x50d49b]['insertions']['markers'])['filter'](([_0x9e22ad])=>!_0x9e22ad['startsWith']('revision:')));let _0x567a9b=0x0;for(const _0x317bc2 of _0x5aaec5){const _0x470103=this['_makeTape'](_0x317bc2['model'][_0x50d49b]['insertions']);_0x317bc2==_0x47e4e3?(_0x217134=_0x470103,_0x5ac8e0=_0x217134['length'],_0x217134['forEach'](_0x37164f=>{_0x37164f['id']=_0x567a9b++;}),this['_processTape'](_0x217134)):this['_markInsertions'](_0x217134,_0x470103);const _0x4cb473=_0x217134['filter'](_0x1ad117=>!_0x1ad117['isAdded'])['map'](_0x452988=>_0x452988['id']);let _0x31cedf=0x0;const _0xd27ed=this['_makeTape'](_0x317bc2['model'][_0x50d49b]['deletions']);_0xd27ed['forEach'](_0x367e63=>{_0x367e63['isRemoved']?_0x367e63['id']=_0x5ac8e0++:_0x367e63['id']=_0x4cb473[_0x31cedf++];}),this['_processTape'](_0xd27ed),this['_setDistance'](_0x217134,'isAdded'),this['_setDistance'](_0xd27ed,'isRemoved'),_0x317bc2==_0x47e4e3&&this['_markMarkers'](_0x217134,_0x21b71a),_0x217134=this['_joinTapes'](_0x217134,_0xd27ed),this['_refreshStartEndIndex'](_0x217134),this['_setDistance'](_0x217134,'isRemoved');}_0x217134=_0x217134['filter'](_0x5195d8=>!(_0x5195d8['isAdded']&&_0x5195d8['isRemoved']));const _0x4ced36=new Map(_0x19075c['model'][_0x50d49b]['deletions']['markers']),_0x4b8147=new Set(_0x21b71a['keys']());for(const _0x182b63 of _0x4ced36['keys']())_0x4b8147['delete'](_0x182b63);this['_markSuggestions'](_0x217134,_0x4b8147),this['_fixObsoleteTags'](_0x217134),_0x217134=this['_removeMissingPairs'](_0x217134),_0x217134=this['_markMismatchedRemovedTags'](_0x217134),_0x217134=this['_removeUnsupportedChanges'](_0x217134);const {root:_0x4741c2,changes:_0x22bada}=this['_makeModelFromTape'](_0x217134,_0x5c531a,_0x50d49b);_0x20e199['model'][_0x50d49b]=_0x4741c2;const _0x563aca=_0x3ee6bf['get'](_0x50d49b);if(_0x563aca){const _0x1d9852=_0x5c531a['get'](_0x563aca['userId']),_0x2bab56=new r({'author':_0x1d9852,'type':_0x563aca['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x50d49b});_0x22bada['unshift'](_0x2bab56),_0x20e199['attributes'][_0x50d49b]['revisionHistoryAttachChange']=_0x2bab56['id'];}_0x20e199['changes']=_0x20e199['changes']['concat'](_0x22bada);}return _0x20e199;}['_markMarkers'](_0x2fbb33,_0x15b7a8){for(let _0x250d73=0x0;_0x250d73<_0x2fbb33['length'];_0x250d73++)for(const [_0x5b3635,_0x37fb5a]of _0x15b7a8)!_0x37fb5a['isCollapsed']&&_0x37fb5a['start']['isEqual'](_0x2fbb33[_0x250d73]['previousPosition'])&&_0x2fbb33[_0x250d73]['markersStart']['push'](_0x5b3635),_0x37fb5a['end']['isEqual'](_0x2fbb33[_0x250d73]['nextPosition'])&&_0x2fbb33[_0x250d73]['markersEnd']['push'](_0x5b3635);}['_joinTapes'](_0x2ccecb,_0x57a619){let _0x4884b5=[],_0x442b24=0x0,_0x15888c=0x0;for(;_0x442b24<_0x2ccecb['length']||_0x15888c<_0x57a619['length'];){const _0x48d8ee=_0x2ccecb[_0x442b24]||{},_0x20bd1f=_0x57a619[_0x15888c]||{};if(_0x48d8ee['id']==_0x20bd1f['id'])_0x442b24++,_0x15888c++,_0x4884b5['push'](_0x48d8ee);else{if(_0x20bd1f['isRemoved']&&_0x48d8ee['isAdded']){const {commonTape:_0x39deac,iEnd:_0x57c2e1,jEnd:_0x4af538}=this['_threeWayMerge'](_0x2ccecb,_0x442b24,_0x57a619,_0x15888c);_0x4884b5=_0x4884b5['concat'](_0x39deac),_0x442b24=_0x57c2e1,_0x15888c=_0x4af538;}else _0x20bd1f['isRemoved']?(_0x15888c++,_0x4884b5['push'](_0x20bd1f)):(_0x442b24++,_0x4884b5['push'](_0x48d8ee));}}return _0x4884b5;}['_markSuggestions'](_0xf46c28,_0x37ce50){const _0x55028d=[];for(let _0x2fa409=0x0;_0x2fa409<_0xf46c28['length'];_0x2fa409++){for(let _0x7368cb=0x0;_0x7368cb<_0xf46c28[_0x2fa409]['markersStart']['length'];_0x7368cb++){const _0x33ad3e=_0xf46c28[_0x2fa409]['markersStart'][_0x7368cb];if(!_0x37ce50['has'](_0x33ad3e))continue;const {group:_0x367d3b,type:_0x63ea28,authorId:_0x2fcb38}=_0x419f76(_0x33ad3e);'revision-suggestion'!=_0x367d3b||'insertion'!=_0x63ea28&&'deletion'!=_0x63ea28||(_0x55028d['unshift']({'type':_0x63ea28,'name':_0x33ad3e,'userId':_0x2fcb38}),_0xf46c28[_0x2fa409]['markersStart']['splice'](_0x7368cb,0x1),_0x7368cb--);}_0x2b6fa2(_0xf46c28[_0x2fa409]);for(let _0x522a67=0x0;_0x522a67<_0xf46c28[_0x2fa409]['markersEnd']['length'];_0x522a67++){const _0x45ba55=_0xf46c28[_0x2fa409]['markersEnd'][_0x522a67];if(!_0x37ce50['has'](_0x45ba55))continue;const {group:_0x233456,type:_0x1f4a6f}=_0x419f76(_0x45ba55);if('revision-suggestion'!=_0x233456||'insertion'!=_0x1f4a6f&&'deletion'!=_0x1f4a6f)continue;_0xf46c28[_0x2fa409]['markersEnd']['splice'](_0x522a67,0x1),_0x522a67--;const _0x39f8d1=_0x55028d['findIndex'](_0x1ec539=>_0x1ec539['name']==_0x45ba55);_0x39f8d1>-0x1&&_0x55028d['splice'](_0x39f8d1,0x1);}}function _0x419f76(_0x2a230d){const _0x22d5dc=_0x2a230d['split'](':');return{'group':_0x22d5dc[0x0],'type':_0x22d5dc[0x1],'subType':_0x22d5dc['length']>=0x5?_0x22d5dc[0x2]:null,'id':_0x22d5dc['length']<0x5?_0x22d5dc[0x2]:_0x22d5dc[0x3],'authorId':_0x22d5dc['length']<0x5?_0x22d5dc[0x3]:_0x22d5dc[0x4],'markerCount':0x6==_0x22d5dc['length']?_0x22d5dc[0x5]:null};}function _0x2b6fa2(_0x3eb09b){for(let _0x139196=0x0;_0x139196<_0x55028d['length'];_0x139196++){if(_0x3eb09b['isAdded']&&'insertion'==_0x55028d[_0x139196]['type']&&_0x3eb09b['isAdded']['userId']==_0x55028d[_0x139196]['userId'])return _0x3eb09b['isAddSuggestion']=_0x55028d[_0x139196],void delete _0x3eb09b['isAdded'];if(!_0x3eb09b['isAdded']&&!_0x3eb09b['isRemoved']&&'deletion'==_0x55028d[_0x139196]['type'])return void(_0x3eb09b['isRemoveSuggestion']=_0x55028d[_0x139196]);}}}['_setDistance'](_0x5974d4,_0x4043c4){let _0x1978d9=0x0,_0x1740c1=!0x1;const _0x216f4d=new Map();for(const _0x22e22b of _0x5974d4)_0x22e22b[_0x4043c4]?_0x1740c1&&(_0x1978d9++,_0x1740c1=!0x1):(_0x1978d9++,_0x1740c1=!0x0),_0x216f4d['set'](_0x22e22b['id'],_0x1978d9);for(let _0x38e374=0x0;_0x38e374<_0x5974d4['length'];_0x38e374++){if('isRemoved'==_0x4043c4&&_0x5974d4[_0x38e374]['isAdded']||'isAdded'==_0x4043c4&&_0x5974d4[_0x38e374]['isRemoved'])continue;if('text'==_0x5974d4[_0x38e374]['type']){_0x5974d4[_0x38e374]['distance']=0x0;continue;}const _0x4dc2bd=_0x216f4d['get'](_0x5974d4[_0x38e374]['pairId']),_0x521435=_0x216f4d['get'](_0x5974d4[_0x38e374]['id']);_0x5974d4[_0x38e374]['distance']=_0x4dc2bd-_0x521435;}}['_getRevisionsRange'](_0xb7429,_0x2138e5,_0x3ee10b=!0x1){const _0x51d8b7=[];let _0x17174a=this['repository']['getIndex'](_0xb7429),_0x5d593c=this['repository']['getIndex'](_0x2138e5);for(-0x1==_0x5d593c&&(_0x5d593c=this['repository']['_revisions']['length'],_0x3ee10b=!0x1);_0x17174a<_0x5d593c;)_0x51d8b7['push'](this['repository']['getRevision'](_0x17174a)),_0x17174a++;return _0x3ee10b&&_0x51d8b7['push'](this['repository']['getRevision'](_0x17174a)),_0x51d8b7;}['_threeWayMerge'](_0x1104ad,_0x4e9e3e,_0x5013a7,_0x146872){const _0x22a619=this['editor']['model']['schema'];let _0x402ec5=_0x4e9e3e;for(;_0x1104ad[_0x402ec5]&&_0x1104ad[_0x402ec5]['isAdded'];)_0x402ec5++;let _0x2da434=_0x146872;for(;_0x5013a7[_0x2da434]&&_0x5013a7[_0x2da434]['isRemoved'];)_0x2da434++;_0x4797b7(_0x1104ad,_0x4e9e3e,_0x402ec5),_0x4797b7(_0x5013a7,_0x146872,_0x2da434);const _0x1ec16c=_0x5013a7['slice'](_0x146872,_0x2da434)['concat'](_0x1104ad['slice'](_0x4e9e3e,_0x402ec5));return _0x1ec16c['sort']((_0x262a78,_0x2aa107)=>_0x262a78['side']!=_0x2aa107['side']?_0x262a78['side']-_0x2aa107['side']:_0x262a78['level']!=_0x2aa107['level']?_0x262a78['level']-_0x2aa107['level']:_0x262a78['distance']!=_0x2aa107['distance']?_0x2aa107['distance']-_0x262a78['distance']:!!_0x262a78['isAdded']!=!!_0x2aa107['isAdded']?-0x1==_0x262a78['side']||0x0==_0x262a78['side']?_0x262a78['isAdded']?-0x1:0x1:_0x262a78['isAdded']?0x1:-0x1:_0x262a78['index']-_0x2aa107['index']),{'commonTape':_0x1ec16c,'iEnd':_0x402ec5,'jEnd':_0x2da434};function _0x4797b7(_0x574d18,_0x235116,_0x418c61){let _0x323656=-0x1,_0x3db268=Number['POSITIVE_INFINITY'],_0x5d5fc5=!0x0;for(let _0x351932=_0x235116;_0x351932<_0x418c61;_0x351932++)if(_0x22a619['isInline'](_0x574d18[_0x351932]['item'])||(_0x5d5fc5=!0x1),_0x574d18[_0x351932]['item']['startIndex']<_0x235116&&(_0x323656=_0x351932),_0x574d18[_0x351932]['item']['endIndex']>=_0x418c61){_0x3db268=_0x351932;break;}_0x5d5fc5&&(_0x323656=_0x418c61-0x1);for(let _0x5a70ec=_0x235116;_0x5a70ec<_0x418c61;_0x5a70ec++)_0x574d18[_0x5a70ec]['side']=_0x5a70ec<=_0x323656?-0x1:_0x5a70ec<_0x3db268?0x0:0x1,_0x574d18[_0x5a70ec]['index']=_0x5a70ec;let _0x2b7033=0x0;for(let _0x195f6f=_0x235116;_0x195f6f<=_0x323656;_0x195f6f++)0x0==_0x574d18[_0x195f6f]['distance']?_0x574d18[_0x195f6f]['level']=_0x2b7033:(_0x2b7033++,_0x574d18[_0x195f6f]['level']=_0x2b7033,_0x2b7033++);for(let _0xce1e79=_0x235116;_0xce1e79<_0x418c61;_0xce1e79++)0x0==_0x574d18[_0xce1e79]['side']&&(_0x574d18[_0xce1e79]['level']=_0x2b7033);_0x2b7033=0x0;for(let _0x37f97e=_0x418c61-0x1;_0x37f97e>=_0x3db268;_0x37f97e--)0x0==_0x574d18[_0x37f97e]['distance']?_0x574d18[_0x37f97e]['level']=_0x2b7033:(_0x2b7033--,_0x574d18[_0x37f97e]['level']=_0x2b7033,_0x2b7033--);}}['_fixObsoleteTags'](_0x4338c2){const _0xcebbe7=new Map(),_0x50cd85=this['editor']['model']['schema'];for(let _0x19b1ff=0x1;_0x19b1ff<_0x4338c2['length'];_0x19b1ff++){let _0x100e95,_0x38ab15,_0x17535c;const _0x25764a=_0x4338c2[_0x19b1ff],_0x3b23c4=_0x4338c2[_0x19b1ff-0x1];if('text'==_0x25764a['type'])continue;if(_0x25764a['type']!=_0x3b23c4['type'])continue;if(!_0x50cd85['isBlock'](_0x3b23c4['item'])||_0x50cd85['isLimit'](_0x3b23c4['item']))continue;if(!_0x50cd85['isBlock'](_0x25764a['item'])||_0x50cd85['isLimit'](_0x25764a['item']))continue;if((_0x4338c2[_0x19b1ff]['isAdded']||_0x4338c2[_0x19b1ff]['isAddSuggestion'])&&_0x4338c2[_0x19b1ff-0x1]['isRemoved'])_0x100e95=_0x4338c2[_0x19b1ff],_0x38ab15=_0x4338c2[_0x19b1ff-0x1],_0x17535c=_0x19b1ff-0x1;else{if(!_0x4338c2[_0x19b1ff]['isRemoved']||!_0x4338c2[_0x19b1ff-0x1]['isAdded']&&!_0x4338c2[_0x19b1ff-0x1]['isAddSuggestion'])continue;_0x100e95=_0x4338c2[_0x19b1ff-0x1],_0x38ab15=_0x4338c2[_0x19b1ff],_0x17535c=_0x19b1ff;}const _0xf0d700=_0x100e95['level']==_0x38ab15['level'],_0x4e749e=Math['abs'](_0x100e95['level'])<Math['abs'](_0x38ab15['level'])&&0x0==_0x38ab15['distance'];(_0xf0d700||_0x4e749e)&&(_0xcebbe7['set'](_0x38ab15['id'],_0x100e95['id']),_0x4338c2['splice'](_0x17535c,0x1),_0x19b1ff--,_0x100e95['isAdded']=!0x1);}for(let _0x3ff177=0x0;_0x3ff177<_0x4338c2['length'];_0x3ff177++)_0xcebbe7['has'](_0x4338c2[_0x3ff177]['pairId'])&&(_0x4338c2[_0x3ff177]['pairId']=_0xcebbe7['get'](_0x4338c2[_0x3ff177]['pairId']));}['_removeMissingPairs'](_0x130538){const _0x2be2b1=new Set(_0x130538['map'](_0x44fa8b=>_0x44fa8b['id']));for(let _0x33ac20=0x0;_0x33ac20<_0x130538['length'];_0x33ac20++)_0x2be2b1['has'](_0x130538[_0x33ac20]['pairId'])||0x0==_0x130538[_0x33ac20]['distance']||(_0x130538[_0x33ac20]['isIncorrect']=!0x0);return _0x130538['filter'](_0x32e741=>!_0x32e741['isIncorrect']);}['_markMismatchedRemovedTags'](_0x4a6cea){const _0x4b2dd3=new Set();for(let _0x20f806=0x0;_0x20f806<_0x4a6cea['length'];_0x20f806++){if(_0x4b2dd3['has'](_0x4a6cea[_0x20f806]['id'])&&_0x4a6cea[_0x20f806]['isRemoved']&&(_0x4a6cea[_0x20f806]['isIncorrect']=!0x0),_0x4a6cea[_0x20f806]['isIncorrect'])continue;if(0x0==_0x4a6cea[_0x20f806]['distance'])continue;if('elementStart'!=_0x4a6cea[_0x20f806]['type'])continue;if(null==_0x4a6cea[_0x20f806]['pairId'])continue;let _0x4a2099=_0x20f806+0x1,_0x2d5e91=0x0;for(;_0x4a6cea[_0x4a2099]['id']!=_0x4a6cea[_0x20f806]['pairId'];)'elementStart'==_0x4a6cea[_0x4a2099]['type']?_0x2d5e91++:'elementEnd'==_0x4a6cea[_0x4a2099]['type']&&_0x2d5e91--,_0x4a2099++;if(0x0!=_0x2d5e91){if(_0x4a6cea[_0x20f806]['isRemoved'])_0x4a6cea[_0x20f806]['isIncorrect']=!0x0;else{for(;_0x4a2099!=_0x20f806;)_0x4a6cea[_0x4a2099]['isRemoved']&&0x0!=_0x4a6cea[_0x4a2099]['distance']&&(_0x4a6cea[_0x4a2099]['isIncorrect']=!0x0,_0x4b2dd3['add'](_0x4a6cea[_0x4a2099]['pairId'])),_0x4a2099--;}}}return _0x4a6cea['filter'](_0x14402a=>!_0x14402a['isIncorrect']);}['_removeUnsupportedChanges'](_0x182674){const _0x3fb84a=this['editor']['model']['schema'];for(let _0x365393=0x0;_0x365393<_0x182674['length'];_0x365393++){if(!(_0x182674[_0x365393]['isAdded']||_0x182674[_0x365393]['isAddSuggestion']||_0x182674[_0x365393]['isRemoved']||_0x182674[_0x365393]['isRemoveSuggestion']))continue;if(0x0==_0x182674[_0x365393]['distance'])continue;const _0x34cd23=_0x182674[_0x365393]['item'];_0x3fb84a['isBlock'](_0x34cd23)||_0x3fb84a['isLimit'](_0x34cd23)||(_0x182674[_0x365393]['isAdded']&&delete _0x182674[_0x365393]['isAdded'],_0x182674[_0x365393]['isAddSuggestion']&&delete _0x182674[_0x365393]['isAddSuggestion'],_0x182674[_0x365393]['isRemoveSuggestion']&&delete _0x182674[_0x365393]['isRemoveSuggestion'],_0x182674[_0x365393]['isRemoved']&&(_0x182674[_0x365393]['isIncorrect']=!0x0));}return _0x182674['filter'](_0x17a0df=>!_0x17a0df['isIncorrect']);}['_makeModelFromTape'](_0x27c45a,_0x2a455d,_0x1c66bc){const _0x3a5829=new vt(),_0x476fcd=[],_0x52d8da=new Map(),_0x26fb5b=this['editor']['model'],_0x27bc39=_0x26fb5b['schema'],_0x580592=[_0x3a5829],_0x5bd525={},_0x15f430={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x423199=null;const _0x3dda82=[0x0];for(let _0x2b5395=0x0;_0x2b5395<_0x27c45a['length'];_0x2b5395++)if('elementStart'===_0x27c45a[_0x2b5395]['type']){_0x27c45a[_0x2b5395]['previousPosition']=_0x26fb5b['createPositionFromPath'](_0x3a5829,_0x3dda82);const _0x292593=new ut(_0x27c45a[_0x2b5395]['item']['name'],_0x27c45a[_0x2b5395]['item']['getAttributes']());_0x580592[0x0]['_appendChild'](_0x292593),_0x3dda82['push'](0x0),_0x580592['unshift'](_0x292593),_0x27c45a[_0x2b5395]['nextPosition']=_0x26fb5b['createPositionFromPath'](_0x3a5829,_0x3dda82);}else'elementEnd'===_0x27c45a[_0x2b5395]['type']?(_0x580592['shift'](),_0x27c45a[_0x2b5395]['previousPosition']=_0x26fb5b['createPositionFromPath'](_0x3a5829,_0x3dda82),_0x3dda82['pop'](),_0x3dda82[_0x3dda82['length']-0x1]++,_0x27c45a[_0x2b5395]['nextPosition']=_0x26fb5b['createPositionFromPath'](_0x3a5829,_0x3dda82)):(_0x27c45a[_0x2b5395]['previousPosition']=_0x26fb5b['createPositionFromPath'](_0x3a5829,_0x3dda82),_0x423199?_0x423199['_data']+=_0x27c45a[_0x2b5395]['item']['data']:_0x423199=new gt(_0x27c45a[_0x2b5395]['item']['data'],_0x27c45a[_0x2b5395]['item']['getAttributes']()),_0x27c45a[_0x2b5395+0x1]&&'text'===_0x27c45a[_0x2b5395+0x1]['type']&&_0x143d03(_0x423199,_0x27c45a[_0x2b5395+0x1]['item'])||(_0x580592[0x0]['_appendChild'](_0x423199),_0x423199=null),_0x3dda82[_0x3dda82['length']-0x1]+=_0x27c45a[_0x2b5395]['item']['offsetSize'],_0x27c45a[_0x2b5395]['nextPosition']=_0x26fb5b['createPositionFromPath'](_0x3a5829,_0x3dda82));for(let _0x57f514=0x0;_0x57f514<_0x27c45a['length'];_0x57f514++){const _0x4d83b8=_0x27c45a[_0x57f514]['previousPosition'],_0x13b251=_0x27c45a[_0x57f514]['nextPosition'];for(const _0x4d85bd of _0x27c45a[_0x57f514]['markersStart'])_0x52d8da['set'](_0x4d85bd,{'start':_0x4d83b8,'end':null});_0x3cb23f('isRemoveSuggestion',_0x57f514,_0x4d83b8,_0x13b251),_0x3cb23f('isAddSuggestion',_0x57f514,_0x4d83b8,_0x13b251),_0x3cb23f('isRemoved',_0x57f514,_0x4d83b8,_0x13b251),_0x3cb23f('isAdded',_0x57f514,_0x4d83b8,_0x13b251);for(const _0x313dbe of _0x27c45a[_0x57f514]['markersEnd']){const _0x1a942e=_0x52d8da['get'](_0x313dbe);_0x1a942e?_0x1a942e['end']=_0x13b251:_0x52d8da['set'](_0x313dbe,{'start':_0x13b251,'end':_0x13b251});}}for(const [_0x1da9fa,_0x649b9d]of _0x52d8da){const _0x56511e=this['editor']['model']['createRange'](_0x649b9d['start'],_0x649b9d['end']);_0x3a5829['markers']['set'](_0x1da9fa,_0x56511e);}return _0x476fcd['sort']((_0x28f0c4,_0x2ff3f9)=>{const _0x42aca3=_0x3a5829['markers']['get']('revision:'+_0x28f0c4['id']),_0x7578d5=_0x3a5829['markers']['get']('revision:'+_0x2ff3f9['id']);return _0x42aca3['start']['isBefore'](_0x7578d5['start'])?-0x1:_0x42aca3['start']['isAfter'](_0x7578d5['start'])?0x1:_0x42aca3['end']['isBefore'](_0x7578d5['end'])?-0x1:_0x42aca3['end']['isAfter'](_0x7578d5['end'])?0x1:'add'===_0x28f0c4['type']?-0x1:0x1;}),{'root':_0x3a5829,'changes':_0x476fcd};function _0x3cb23f(_0x4fae9c,_0x5e1290,_0x464a2c,_0x4e3707){const _0x3878ed=!!_0x27c45a[_0x5e1290][_0x4fae9c],_0x465487=_0x3878ed?_0x27c45a[_0x5e1290][_0x4fae9c]['userId']:null,_0xc61da6=_0x5e1290===_0x27c45a['length']-0x1,_0x2ddaf5=_0x15f430[_0x4fae9c][0x0],_0x52972a=_0x27bc39['isObject'](_0x27c45a[_0x5e1290]['item']);!_0x5bd525[_0x4fae9c]&&_0x3878ed?_0x5bd525[_0x4fae9c]={'start':_0x464a2c,'tapeItem':_0x27c45a[_0x5e1290],'userId':_0x465487,'type':_0x4fae9c}:_0x5bd525[_0x4fae9c]&&!_0x3878ed?(_0x5bd525[_0x4fae9c]['end']=_0x464a2c,_0xa503b9(_0x5bd525[_0x4fae9c]),_0x5bd525[_0x4fae9c]=null):_0x5bd525[_0x4fae9c]&&_0x3878ed&&_0x5bd525[_0x4fae9c]['userId']!==_0x465487&&(_0x5bd525[_0x4fae9c]['end']=_0x464a2c,_0x2ddaf5&&_0x2ddaf5['userId']===_0x5bd525[_0x4fae9c]['userId']||_0xa503b9(_0x5bd525[_0x4fae9c]),_0x5bd525[_0x4fae9c]={'start':_0x464a2c,'tapeItem':_0x27c45a[_0x5e1290],'userId':_0x465487,'type':_0x4fae9c}),_0x5bd525[_0x4fae9c]&&_0x52972a&&('elementStart'!==_0x27c45a[_0x5e1290]['type']||_0x2ddaf5&&_0x2ddaf5['userId']===_0x465487||_0x15f430[_0x4fae9c]['unshift']({'userId':_0x465487,'object':_0x27c45a[_0x5e1290]['item'],'change':_0x5bd525[_0x4fae9c]}),'elementEnd'===_0x27c45a[_0x5e1290]['type']&&_0x2ddaf5&&_0x2ddaf5['object']===_0x27c45a[_0x5e1290]['item']&&(_0x15f430[_0x4fae9c]['shift'](),_0x5bd525[_0x4fae9c]=_0x2ddaf5['change'])),_0x5bd525[_0x4fae9c]&&_0xc61da6&&(_0x5bd525[_0x4fae9c]['end']=_0x4e3707,_0xa503b9(_0x5bd525[_0x4fae9c]),_0x5bd525[_0x4fae9c]=null);}function _0xa503b9({start:_0x15133b,end:_0x5c5041,tapeItem:_0x38d742,userId:_0x51ac27,type:_0x3a6c3e}){const _0x1ac036=_0x38d742['item'],_0x2e1eb9=_0x26fb5b['schema']['isBlock'](_0x1ac036)&&!_0x26fb5b['schema']['isLimit'](_0x1ac036),_0x2378c3=_0x15133b['nodeAfter']==_0x5c5041['parent']&&_0x5c5041['isAtStart'];if(_0x2e1eb9&&_0x2378c3)return;const _0x384fd4=_0x26fb5b['createRange'](_0x15133b,_0x5c5041),_0xf32aa7=_0x2a455d['get'](_0x51ac27),_0x1b234f=new r({'author':_0xf32aa7,'type':'isAdded'==_0x3a6c3e||'isAddSuggestion'==_0x3a6c3e?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3a6c3e||'isRemoveSuggestion'==_0x3a6c3e},'createdAt':new Date(),'rootName':_0x1c66bc});_0x476fcd['push'](_0x1b234f),_0x3a5829['markers']['set']('revision:'+_0x1b234f['id'],_0x384fd4);}function _0x143d03(_0x528b2f,_0x594ae2){const _0x19a16a=_0x528b2f['getAttributes'](),_0x138849=_0x594ae2['getAttributes']();for(const _0x152a47 of _0x19a16a){if(_0x152a47[0x1]!==_0x594ae2['getAttribute'](_0x152a47[0x0]))return!0x1;_0x138849['next']();}return _0x138849['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xe60bca=>{const _0x37c09a=_0xe60bca['markerName']['split'](':')[0x1],_0x6bebc5=this['_getChangeFromId'](_0x37c09a);if(!_0x6bebc5)return null;const _0x48928d='add'==_0x6bebc5['type']?'insertion':'deletion',_0x3214d2=['ck-suggestion-marker','ck-suggestion-marker-'+_0x48928d];return _0x6bebc5['data']['isSuggestion']&&_0x3214d2['push']('ck-suggestion-marker-'+_0x48928d+'-new'),this['activeChange']==_0x6bebc5&&_0x3214d2['push']('ck-suggestion-marker--active'),{'classes':_0x3214d2,'attributes':{'data-change-id':_0x37c09a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x231a60=>{_0x231a60['on']('element:pre',(_0x30bc11,_0xc34ec7,_0x10d9e6)=>{const _0x182e61=_0xc34ec7['viewItem']['getChild'](0x0);if(!_0x182e61||!_0x182e61['is']('element','code'))return;if(!_0x10d9e6['consumable']['consume'](_0x182e61,{'attributes':['vid_start','vid_end']}))return;const _0x4c2e16=_0xc34ec7['modelRange']['start']['nodeAfter'];_0x10d9e6['writer']['setAttribute']('vid_start',_0x182e61['getAttribute']('vid_start'),_0x4c2e16),_0x10d9e6['writer']['setAttribute']('vid_end',_0x182e61['getAttribute']('vid_end'),_0x4c2e16);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x48deca=>{_0x48deca['on']('element',(_0x3e5b3c,_0x41d360,_0x2589c8)=>{if(!_0x2589c8['consumable']['consume'](_0x41d360['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x41d360['modelRange']['isCollapsed'])return;const _0x2108d1=_0x41d360['modelRange']['start']['nodeAfter'];_0x2108d1['hasAttribute']('vid_start')||_0x2108d1['hasAttribute']('vid')||(_0x2589c8['writer']['setAttribute']('vid_start',_0x41d360['viewItem']['getAttribute']('vid_start'),_0x2108d1),_0x2589c8['writer']['setAttribute']('vid_end',_0x41d360['viewItem']['getAttribute']('vid_end'),_0x2108d1));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x57e7f7=>_0x57e7f7['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x1b5f38,[,_0x31945f])=>{['vid_start','vid_end','vid']['includes'](_0x31945f)&&(_0x1b5f38['return']=!0x0,_0x1b5f38['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3636ea=>{_0x3636ea['on']('attribute:vid',(_0x24ab16,_0x2125c4,_0x158e31)=>{if('\x20'!=_0x2125c4['item']['data']||_0x2125c4['item']['parent']['maxOffset']>0x1)return;if(!_0x158e31['consumable']['consume'](_0x2125c4['item'],_0x24ab16['name']))return;const _0x390abf=_0x158e31['writer'],_0x199aa1=_0x158e31['mapper']['toViewRange'](_0x2125c4['range']);_0x390abf['wrap'](_0x199aa1,_0x390abf['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x3f0e68){const _0x2b3e16=_0x3f0e68['plugins']['get']('RevisionViewer');return(_0xe6683c,_0x141538,_0x6d3104)=>{const _0x4cfbfd=_0x141538['markerName']['split'](':')[0x1],_0x26c1b1=_0x2b3e16['_getChangeFromId'](_0x4cfbfd);if(!_0x26c1b1)return null;const _0x1c7890='add'==_0x26c1b1['type']?'split':'merge';if(!_0x6d3104['consumable']['test'](_0x141538['markerRange'],_0xe6683c['name']))return;const _0x10091d=_0x141538['markerRange']['getWalker'](),_0x74f616=_0x141538['markerRange']['start'],_0x34615b=_0x3f0e68['model']['schema'];let _0x474b33=null,_0x370d7d=null,_0x2c2c6e=!0x1,_0x5da068=!0x1;for(const _0x57b38b of _0x10091d){const _0x158fe1=_0x57b38b['item'];_0x2c2c6e=_0x2c2c6e||_0x34615b['isContent'](_0x158fe1);const _0x1974cd=_0x6d3104['mapper']['toViewElement'](_0x158fe1);if(_0x1974cd&&_0x1974cd['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x57b38b['type']&&(_0x34615b['isBlock'](_0x158fe1)&&!_0x34615b['isLimit'](_0x158fe1)&&(_0x158fe1['nextSibling']||_0x74f616['isAtEnd']?_0x474b33&&_0x474b33['parent']==_0x158fe1||(_0x474b33=_0x158fe1,_0x5e6580(_0x57b38b['previousPosition']),_0x5da068=!0x0):_0x370d7d=_0x370d7d||_0x57b38b['previousPosition']));}function _0x5e6580(_0x1a54ae){const _0x31222c=_0x6d3104['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1c7890}),_0x525454=_0x6d3104['mapper']['toViewPosition'](_0x1a54ae);_0x26c1b1['data']['isSuggestion']&&_0x6d3104['writer']['addClass']('ck-suggestion-marker-'+_0x1c7890+'-new',_0x31222c),_0x2b3e16['activeChange']==_0x26c1b1&&_0x6d3104['writer']['addClass']('ck-suggestion-marker--active',_0x31222c),_0x6d3104['writer']['insert'](_0x525454,_0x31222c),_0x6d3104['mapper']['bindElementToMarker'](_0x31222c,_0x141538['markerName']);}_0x2c2c6e||_0x5da068||!_0x370d7d||_0x5e6580(_0x370d7d);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x9c6c72,_0x5212eb,_0x5aaecc)=>{const _0x24214e=_0x5aaecc['mapper']['markerNameToElements'](_0x5212eb['markerName']);if(_0x24214e){for(const _0x15e491 of _0x24214e)(_0x15e491['hasClass']('ck-suggestion-marker-split')||_0x15e491['hasClass']('ck-suggestion-marker-merge'))&&(_0x5aaecc['mapper']['unbindElementFromMarkerName'](_0x15e491,_0x5212eb['markerName']),_0x5aaecc['writer']['remove'](_0x15e491));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x9fccc4,_0x4ed113,_0x20001e)=>{const _0x22f331=_0x4ed113['markerName']['split'](':')[0x1],_0x211f13=this['_getChangeFromId'](_0x22f331);if(!_0x211f13)return null;const _0x1c17ca='add'==_0x211f13['type']?'split':'merge';if(_0x20001e['consumable']['test'](_0x4ed113['markerRange'],_0x9fccc4['name']))for(const _0x48f6ea of _0x4ed113['markerRange']['getItems']()){if(!_0x48f6ea['is']('element','softBreak'))continue;const _0x201aeb=_0x20001e['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1c17ca}),_0x58f5a3=_0x20001e['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x48f6ea));_0x211f13['data']['isSuggestion']&&_0x20001e['writer']['addClass']('ck-suggestion-marker-'+_0x1c17ca+'-new',_0x201aeb),this['activeChange']==_0x211f13&&_0x20001e['writer']['addClass']('ck-suggestion-marker--active',_0x201aeb),_0x20001e['writer']['insert'](_0x58f5a3,_0x201aeb),_0x20001e['mapper']['bindElementToMarker'](_0x201aeb,_0x4ed113['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0xacedb3=>{for(const _0x187e6b of this['editor']['model']['document']['getRootNames']()){const _0x420b38=this['editor']['model']['document']['getRoot'](_0x187e6b),_0x52362a=this['editor']['editing']['view']['document']['getRoot'](_0x187e6b);if(_0x52362a){const _0x108642=_0x420b38['getAttribute']('revisionHistoryAttachChange');if(_0xacedb3['removeAttribute']('data-change-id',_0x52362a),_0xacedb3['removeClass']('ck-revision-history-root-add',_0x52362a),_0xacedb3['removeClass']('ck-revision-history-root-remove',_0x52362a),_0xacedb3['removeClass']('ck-revision-history-root--active',_0x52362a),_0x108642){const _0x123f98=this['_getChangeFromId'](_0x108642);if(!_0x123f98)return null;_0xacedb3['setAttribute']('data-change-id',_0x108642,_0x52362a),_0xacedb3['addClass']('ck-revision-history-root-'+_0x123f98['type'],_0x52362a),this['activeChange']==_0x123f98&&_0xacedb3['addClass']('ck-revision-history-root--active',_0x52362a);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x421247=>'revision-comment:'+_0x421247,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x33d8cf=>'revision-suggestion:'+_0x33d8cf,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2507d5=>({'name':'suggestion:'+_0x2507d5,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x52e949=>{const _0x2cc2fa=_0x52e949['markerName']['split'](':')[0x1];return'insertion'!=_0x2cc2fa&&'deletion'!=_0x2cc2fa?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2cc2fa]};}}),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',(_0xbc36e8,_0x5e6742,_0x1e2d1f)=>{const _0x52e28c=_0x1e2d1f['mapper']['markerNameToElements'](_0x5e6742['markerName']);if(_0x52e28c){for(const _0x27ebe9 of _0x52e28c)_0x27ebe9['is']('uiElement')&&(_0x1e2d1f['mapper']['unbindElementFromMarkerName'](_0x27ebe9,_0x5e6742['markerName']),_0x1e2d1f['writer']['remove'](_0x27ebe9));}},{'priority':'high'});}['_getChangeFromId'](_0xb954aa){return this['_changeIdToChange']['get'](_0xb954aa);}['_getViewForChange'](_0x370a79){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x370a79),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2c0d41,_0xac2a20,_0x47e8ed,_0x5be253)=>{_0x5be253&&this['_balloon']['remove'](_0x5be253),_0x47e8ed&&(this['_balloon']['add']({'view':_0x47e8ed,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x292626=this['editor']['editing'],_0x438897=this['_getChangeFromId'](_0x47e8ed['changeId']);let _0x2fa101;if(_0x438897['data']['isOnRoot']){const _0x7c0e4d=_0x292626['view']['getDomRoot'](_0x438897['rootName']);_0x2fa101=Array['from'](_0x7c0e4d['getClientRects']());}else{const _0x1e1b82=this['editor']['model']['markers']['get']('revision:'+_0x47e8ed['changeId']);_0x2fa101=Array['from'](_0x292626['mapper']['markerNameToElements'](_0x1e1b82['name']))['map'](_0x3a3575=>_0x292626['view']['domConverter']['mapViewToDom'](_0x3a3575))['map'](_0x140856=>Array['from'](_0x140856['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x2fa101[0x0];return _0x2fa101['find'](_0xb3cde4=>_0xb3cde4['top']-0x3<=this['_activeViewTarget']['y']&&_0xb3cde4['bottom']+0x3>=this['_activeViewTarget']['y']&&_0xb3cde4['left']-0x3<=this['_activeViewTarget']['x']&&_0xb3cde4['right']+0x3>=this['_activeViewTarget']['x'])||_0x2fa101[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4499eb,_0x35a2bd,_0x405fb1,_0x1239b9)=>{this['activeView']=_0x405fb1?this['_getViewForChange'](_0x405fb1):null,this['editor']['model']['change'](()=>{const _0x26f2dd=this['editor']['editing'];_0x1239b9&&(_0x1239b9['data']['isOnRoot']?_0x26f2dd['view']['change'](_0x4c7c31=>{_0x4c7c31['removeClass']('ck-revision-history-root--active',_0x26f2dd['view']['document']['getRoot'](_0x1239b9['rootName']));}):_0x26f2dd['reconvertMarker']('revision:'+_0x1239b9['id'])),_0x405fb1&&(_0x405fb1['data']['isOnRoot']?_0x26f2dd['view']['change'](_0xa1c308=>{_0xa1c308['addClass']('ck-revision-history-root--active',_0x26f2dd['view']['document']['getRoot'](_0x405fb1['rootName']));}):_0x26f2dd['reconvertMarker']('revision:'+_0x405fb1['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x222d16,_0x4ae53c)=>{if(this['activeChange'])return;const _0x283b88=this['_findChangeIdFromDomTarget'](_0x4ae53c['target']),_0x493572=this['_changeIdToChange']['get'](_0x283b88);_0x493572?(this['_activeViewTarget']={'x':_0x4ae53c['domEvent']['x'],'y':_0x4ae53c['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x493572)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x80b1dd,_0x10e8c2)=>{const _0x5c7ffc=this['_findChangeIdFromDomTarget'](_0x10e8c2['target']),_0x2888fc=this['_changeIdToChange']['get'](_0x5c7ffc);_0x2888fc?(this['_activeViewTarget']={'x':_0x10e8c2['domEvent']['x'],'y':_0x10e8c2['domEvent']['y']},_0x2888fc===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2888fc):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x822cad){do{const _0x205c46=_0x822cad['getAttribute']('data-change-id');if(_0x205c46)return _0x205c46;_0x822cad=_0x822cad['parent'];}while(_0x822cad);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x44b60b=>{for(const _0x3c5243 of this['editor']['model']['markers'])_0x44b60b['removeMarker'](_0x3c5243);});}}function X(_0x4f66b5,_0x72a22e){return(_0x42113c,_0x4689da,_0x1ea32e)=>{if(!_0x1ea32e['consumable']['test'](_0x4689da['markerRange'],_0x42113c['name']))return;const _0x56bc0d=_0x4689da['markerRange']['getWalker'](),_0x592a25=_0x4689da['markerRange']['start'],_0x16f85a=_0x4f66b5['model']['schema'];let _0x1cc892=null,_0x284b88=null,_0x2217b=!0x1,_0x1c26eb=!0x1;for(const _0x3cbd59 of _0x56bc0d){const _0xaaa2bb=_0x3cbd59['item'];_0x2217b=_0x2217b||_0x16f85a['isContent'](_0xaaa2bb);const _0x36a6fe=_0x1ea32e['mapper']['toViewElement'](_0xaaa2bb);if(_0x36a6fe&&_0x36a6fe['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3cbd59['type']&&(_0x16f85a['isBlock'](_0xaaa2bb)&&!_0x16f85a['isLimit'](_0xaaa2bb)&&(_0xaaa2bb['nextSibling']||_0x592a25['isAtEnd']?_0x1cc892&&_0x1cc892['parent']==_0xaaa2bb||(_0x1cc892=_0xaaa2bb,_0x33b325(_0x3cbd59['previousPosition']),_0x1c26eb=!0x0):_0x284b88=_0x284b88||_0x3cbd59['previousPosition']));}function _0x33b325(_0x541d29){const _0x255fab=_0x1ea32e['mapper']['toViewPosition'](_0x541d29),_0x2b56d3=_0x1ea32e['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x72a22e});_0x1ea32e['writer']['insert'](_0x255fab,_0x2b56d3),_0x1ea32e['mapper']['bindElementToMarker'](_0x2b56d3,_0x4689da['markerName']);}_0x2217b||_0x1c26eb||!_0x284b88||_0x33b325(_0x284b88);};}class mt extends _0x5123c0{constructor(_0x31081d){super(_0x31081d);const _0x5937b4=_0x31081d['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x5937b4,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5937b4,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x447dd9=this['editor'],_0x3b17c1=_0x447dd9['plugins']['get'](m),_0x1a3706=_0x3b17c1['isReady']?_0x3b17c1['diff']['newRevisionId']:null;_0x447dd9['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1a3706);}['refresh'](){const {isReady:_0x2a6373,isEnabled:_0x93c99b,repository:_0x1ae77c,diff:_0x32dfd9}=this['editor']['plugins']['get'](m),_0x59eee8=_0x32dfd9&&_0x1ae77c['getLaterVisibleRevision'](_0x32dfd9['newRevisionId']);this['isEnabled']=_0x2a6373&&_0x93c99b&&Boolean(_0x59eee8);}}class wt extends _0x5123c0{['_step'];constructor(_0x155907,{direction:_0x256fec}){super(_0x155907);const _0x3cc66c=_0x155907['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x256fec?0x1:-0x1,this['listenTo'](_0x3cc66c,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3cc66c,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3cc66c,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x58fb37=this['editor'],_0x3ca6f2=_0x58fb37['plugins']['get'](m),{isNavigationMode:_0x53aef4,currentChangeNumber:_0x515acb}=_0x3ca6f2;let _0x3a31df;if(_0x3ca6f2['activeChange']=_0x53aef4?_0x3ca6f2['diff']['changes']['get'](_0x515acb+this['_step']):_0x3ca6f2['diff']['changes']['first'],_0x3ca6f2['activeChange']['data']['isOnRoot'])_0x3a31df=_0x58fb37['editing']['view']['getDomRoot'](_0x3ca6f2['activeChange']['rootName']);else{const _0x2d2da9=_0x58fb37['model']['markers']['get']('revision:'+_0x3ca6f2['activeChange']['id']);_0x3a31df=_0x2e5ebc(_0x58fb37['editing'],_0x2d2da9);}_0x40b14f({'target':_0x3a31df,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x23ac04,currentChangeNumber:_0x1be7c7,numberOfChanges:_0x3aacb9,isReady:_0xb2f22d,isEnabled:_0x5b2a66}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x5b2a66&&_0xb2f22d&&_0x3aacb9)&&(!_0x23ac04||(0x1===this['_step']?_0x1be7c7<_0x3aacb9-0x1:_0x1be7c7>0x0));}}class li extends ts{constructor(_0x53cc78){super(_0x53cc78);const _0x2bcb5c=this['bindTemplate'],_0x40e249=new te(_0x53cc78),_0x5c7d38=new te(_0x53cc78);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',(_0xdadbb0,_0x37021f)=>_0xdadbb0&&_0x37021f>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x49ee96,_0x11952f,_0x4179de,_0x27beff)=>{if(!_0x49ee96)return g(_0x53cc78,'Loading...');if(!_0x4179de)return g(_0x53cc78,'No\x20changes');const _0x90170a=g(_0x53cc78,'NUMBER_OF_CHANGES',_0x4179de);return _0x27beff?g(_0x53cc78,'X_OF_Y_CHANGES',[_0x11952f+0x1,_0x4179de]):_0x90170a;}),_0x40e249['set']({'label':g(_0x53cc78,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x29bc7b}),_0x5c7d38['set']({'label':g(_0x53cc78,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x55b434}),_0x40e249['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5c7d38['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x40e249['on']('execute',()=>this['fire']('execute','backward')),_0x5c7d38['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',_0x2bcb5c['if']('_isStatusLabelVisible','ck-hidden',_0x35a946=>!_0x35a946)]},'children':[{'text':_0x2bcb5c['to']('isNavigationMode',_0x18e9ad=>_0x18e9ad?g(_0x53cc78,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x53cc78,'Total')+':\x20')}]},{'text':_0x2bcb5c['to']('_statusText')}]},new _0x4dae21(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x40e249,_0x5c7d38]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x37aa98{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5d3575=this['editor']['editing']['view'];_0x5d3575['change'](_0x92804=>{for(const _0x25c7d3 of _0x5d3575['document']['roots'])_0x92804['addClass'](le,_0x25c7d3);});}['hide'](){const _0x3e7850=this['editor']['editing']['view'];_0x3e7850['change'](_0x53bfb4=>{for(const _0x22e3a5 of _0x3e7850['document']['roots'])_0x53bfb4['removeClass'](le,_0x22e3a5);});}}class R extends _0x37aa98{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,ge];}['init'](){const _0x2c4a86=this['editor'],_0x227910=_0x2c4a86['plugins']['get'](m),_0x371489=_0x2c4a86['plugins']['get'](ge);_0x2c4a86['ui']['componentFactory']['add']('exitToEditing',_0x58bfd6=>{const _0x48bfc7=new te(_0x58bfd6);return _0x48bfc7['set']({'label':g(_0x58bfd6,'Back\x20to\x20editing'),'icon':_0x548abb,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x48bfc7,'execute',()=>{_0x2c4a86['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x48bfc7;}),_0x2c4a86['ui']['componentFactory']['add']('restoreRevision',_0x513d04=>{const _0x5c2cc3=new te(_0x513d04);return _0x5c2cc3['set']({'label':g(_0x513d04,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x5c2cc3['bind']('isEnabled')['to'](_0x2c4a86['commands']['get']('restoreRevision')),this['listenTo'](_0x5c2cc3,'execute',()=>_0x2c4a86['execute']('restoreRevision')),_0x5c2cc3;}),_0x2c4a86['ui']['componentFactory']['add']('changesNavigation',_0x5d1d8a=>{const _0x500df9=new li(_0x5d1d8a),_0x235cc3=_0x2c4a86['commands']['get']('showPreviousChange'),_0x1cf644=_0x2c4a86['commands']['get']('showNextChange');return _0x500df9['bind']('isBackwardNavigationEnabled')['to'](_0x235cc3,'isEnabled'),_0x500df9['bind']('isForwardNavigationEnabled')['to'](_0x1cf644,'isEnabled'),_0x500df9['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x227910),this['listenTo'](_0x500df9,'execute',(_0x572816,_0x5100a3)=>{_0x2c4a86['execute']('forward'===_0x5100a3?'showNextChange':'showPreviousChange');}),_0x500df9;}),_0x371489['show'](),_0x227910['on']('change:isReady',(_0xef4abb,_0x5edcac,_0x4f2d5f)=>{_0x4f2d5f?_0x371489['hide']():_0x371489['show']();});}}class at extends _0x2be6a1{['_resizeObserver']=null;constructor(_0x3ef91d,_0x1d2ad7){super(_0x3ef91d,_0x1d2ad7);const _0x544783=this['bindTemplate'];this['set']({'label':g(_0x3ef91d,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x3ef91d,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x544783['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 _0x28e032=this['fieldView']['element'];this['_tooltipString']=_0x28e032['scrollWidth']>_0x28e032['clientWidth']&&_0x28e032['value']||'';}}class oi extends ts{constructor(_0x53186b,_0x3d081d,_0x448f38){super(_0x53186b);const _0x5cf9d4=new _0xaa104a();_0x5cf9d4['set']({'content':_0x20ebe2,'viewBox':'0\x200\x2011\x2010'});const _0x438684=['ck','ck-revision-history-sidebar__revision-author'];_0x448f38&&_0x438684['push']('ck-revision-history-sidebar__revision-author_creator');const _0x103341=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x53186b,_0x448f38?'Revision\x20creator':'Revision\x20author')},'children':[_0x5cf9d4,_0x3d081d['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x438684},'children':_0x103341});}}function ai(_0x2de1be,_0x549170){const _0x2c7caf=_0x2de1be['bindTemplate'],_0x1755e5=_0x2de1be['locale'],_0x2195b3=_0x5d6b2b(_0x1755e5);_0x2195b3['panelPosition']='sw';const _0x253729=function(_0x1adeff,_0x46f1a5){const _0x494d6f=function(_0x396c00,_0x5ad166){const _0x2a9567=_0x396c00['locale'],_0x4ca245={'Compare\x20against\x20selected':g(_0x2a9567,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x2a9567,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x2a9567,'Restore\x20this\x20revision')};return _0x5ad166['map'](_0x31dff8=>{const _0x571833=_0x4ca245[_0x31dff8['name']];return _0x571833&&_0x571833!==_0x31dff8['name']&&(_0x31dff8['name']=_0x571833),_0x31dff8;});}(_0x1adeff,_0x46f1a5),_0x5596c0=new _0x2a9213();for(const _0x571dcf of _0x494d6f){const _0x17eea4={'type':'button','model':new to({'label':_0x571dcf['name'],'class':_0x571dcf['class'],'withText':!0x0,'role':'menuitem','_action':_0x571dcf['action']})};_0x17eea4['model']['bind']('isEnabled')['to'](_0x1adeff,'isActionsDropdownOpen',_0x2c0016=>'function'!=typeof _0x571dcf['isEnabled']||(!_0x2c0016||_0x571dcf['isEnabled'](_0x1adeff))),_0x5596c0['add'](_0x17eea4);}return _0x5596c0;}(_0x2de1be,_0x549170);return _0x2de1be['bind']('isActionsDropdownOpen')['to'](_0x2195b3,'isOpen'),_0x2195b3['buttonView']['set']({'label':g(_0x1755e5,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x28c97e}),_0x2195b3['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x2c7caf['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x2c7caf['to'](_0x4b3db8=>_0x4b3db8['stopPropagation']())}}),_0x2195b3['on']('execute',_0x21257f=>{_0x2de1be['isReady']&&'function'==typeof _0x21257f['source']['_action']&&_0x21257f['source']['_action'](_0x2de1be);}),_0x548dd5(_0x2195b3,_0x253729,{'role':'menu'}),_0x2195b3['listenTo'](_0x2de1be,'change:isActionsDropdownOpen',(_0x53e412,_0x5d916c,_0x30c7b5)=>{if(_0x30c7b5)for(const _0xeee071 of _0x2195b3['listView']['items']){const _0x48b85f=_0xeee071['children']['first'],_0x56027d=_0x549170['find'](_0x261e59=>_0x261e59['action']===_0x48b85f['_action'])['isVisible'];_0xeee071['isVisible']=void 0x0===_0x56027d||_0x56027d(_0x2de1be);}}),_0x2195b3;}class si extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x36d32c(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x23bdd5,_0x194292,_0x59e59b,_0x5aead5){super(_0x23bdd5);const _0x15ed22=this['bindTemplate'],_0x32346c=function(_0x3abeac,_0x23f748){const _0x260286=Array['from'](_0x23f748['authors'])['filter'](_0x37b766=>_0x37b766!=_0x23f748['creator']);return _0x23f748['creator']&&_0x260286['unshift'](_0x23f748['creator']),_0x260286['map'](_0x3fa4ea=>new oi(_0x3abeac,_0x3fa4ea,_0x3fa4ea==_0x23f748['creator']));}(_0x23bdd5,_0x194292);this['id']=_0x194292['id'],this['_revision']=_0x194292,this['_requireRevisionName']=_0x5aead5,this['bind']('name','createdAt')['to'](_0x194292),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x3f955d=>{return _0x4f1a27=_0x23bdd5['uiLanguage'],(_0x10231a=_0x3f955d)['toLocaleDateString'](_0x4f1a27,{'month':'long','day':'numeric'})+',\x20'+_0x10231a['toLocaleTimeString'](_0x4f1a27,{'hour':'numeric','minute':'numeric'});var _0x4f1a27,_0x10231a;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new at(_0x23bdd5,_0x22d3ee),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x498b4b=>_0x498b4b||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x46d1ed,_0x405056)=>_0x46d1ed&&_0x405056),this['revisionActionsView']=_0x59e59b&&_0x59e59b['length']?ai(this,_0x59e59b):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x15ed22['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x15ed22['if']('isEnabled','ck-disabled',_0x55bd46=>!_0x55bd46),_0x15ed22['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x15ed22['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x15ed22['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':_0x15ed22['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':_0x32346c}]},this['revisionActionsView']],'on':{'click':_0x15ed22['to'](_0x52eca8=>{_0x52eca8['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4c1564=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4c1564,'change',()=>{this['_requireRevisionName']&&!_0x4c1564['value']||this['fire']('setName',{'id':this['id'],'name':_0x4c1564['value']}),_0x4c1564['value']||(_0x4c1564['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ti(_0x3d2d17,_0x469b36){const _0x43a11b=_0x45883b['fromJSDate'](_0x3d2d17)['setLocale'](_0x469b36),_0xdee722=_0x45883b['local'](),_0x46444b=_0xdee722['minus']({'days':0x1})['startOf']('day');let _0x24ed34,_0x44f51a;return _0x43a11b['hasSame'](_0xdee722,'day')?(_0x24ed34=_0x43a11b['startOf']('day')['toJSDate'](),_0x44f51a=_0x43a11b['toRelativeCalendar']()):_0x43a11b['hasSame'](_0x46444b,'day')?(_0x24ed34=_0x46444b['toJSDate'](),_0x44f51a=_0x43a11b['toRelativeCalendar']()):_0x43a11b['hasSame'](_0xdee722,'week')?(_0x24ed34=_0x43a11b['startOf']('week')['toJSDate'](),_0x44f51a=_0x43a11b['weekdayLong']||''):_0x43a11b['hasSame'](_0xdee722,'year')?(_0x24ed34=_0x43a11b['startOf']('month')['toJSDate'](),_0x44f51a=_0x43a11b['monthLong']||''):(_0x24ed34=_0x43a11b['startOf']('year')['toJSDate'](),_0x44f51a=String(_0x43a11b['year'])),{'startDate':_0x24ed34,'localizedPeriodName':_0x44f51a};}class ei extends ts{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x49ca33,_0x1d4765,_0x23af2c,_0xc7b390){super(_0x49ca33);const _0x4aa9ce=ti(_0x1d4765,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x1d4765,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x23af2c,this['_requireRevisionName']=_0xc7b390,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':_0x4aa9ce}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x26da2c){const _0x4c09f1=new si(this['locale'],_0x26da2c,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4c09f1);}['removeRevision'](_0x5cf622){const _0x5babd5=this['revisionViews']['find'](_0x37bcac=>_0x37bcac['id']===_0x5cf622['id']);this['revisionViews']['remove'](_0x5babd5);}}class cs extends ts{constructor(_0x32dca2){super(_0x32dca2);const _0x74da58=new _0xaa104a();_0x74da58['content']=_0x3acfa9,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x74da58,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x32dca2,'Revision\x20history')]}]});}}class ii extends ts{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1fbd94,_0x2127e2,_0xab5b82,_0x39011d){super(_0x1fbd94);const _0x56f0ef=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x2127e2,this['_revisionActions']=_0xab5b82,this['_requireRevisionName']=_0x39011d,this['on']('select',(_0x5f5b15,_0x20b2fe)=>{this['fire']('revisionSelected',_0x20b2fe);}),this['on']('setName',(_0x44d2f3,_0x348d6e)=>{this['fire']('revisionSetName',_0x348d6e);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new cs(_0x1fbd94),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x56f0ef['if']('isEnabled','ck-disabled',_0x578635=>!_0x578635)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x1b1e07 of this['_revisions'])this['_addRevision'](_0x1b1e07);this['_revisions']['on']('add',(_0x6ec10a,_0x5a294f)=>{this['_addRevision'](_0x5a294f);}),this['_revisions']['on']('remove',(_0x3b9588,_0x5495ce)=>{this['_removeRevision'](_0x5495ce);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x10772d=>_0x10772d['revisionViews']['map'](_0x48a771=>_0x48a771))['flat']();}['selectRevision'](_0x57f856){for(const _0xcaaa58 of this['revisionViews'])_0x57f856&&_0x57f856['id']===_0xcaaa58['id']?_0xcaaa58['select']():_0xcaaa58['deselect']();}['highlightRevisions'](_0x5821c9){for(const _0x508bdc of this['revisionViews'])_0x5821c9['some'](({id:_0x9d6b19})=>_0x9d6b19===_0x508bdc['id'])?_0x508bdc['highlight']():_0x508bdc['unhighlight']();}['_addRevision'](_0x2f2e49){const _0x5c34b4=ti(_0x2f2e49['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x4a9e91=this['timePeriodViews']['get'](0x0);_0x4a9e91&&_0x4a9e91['startDate']['getTime']()===_0x5c34b4['getTime']()||(_0x4a9e91=new ei(this['locale'],_0x5c34b4,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x4a9e91)),_0x4a9e91['addRevision'](_0x2f2e49);}['_removeRevision'](_0x265d32){const _0xecb1=ti(_0x265d32['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xecb1)['removeRevision'](_0x265d32);}['_getTimePeriodViewByStartDate'](_0x430792){return this['timePeriodViews']['find'](_0x5e6175=>_0x5e6175['startDate']['getTime']()===_0x430792['getTime']());}}class d extends _0x37aa98{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
|
|
29
|
-
_0x4f1a22(_0x221c46){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4ce76f,_0x30221f){super(_0x30221f),this['sourceElement']=_0x4ce76f,this['model']['document']['createRoot']();const _0x2253fb=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x2253fb);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x34cda8,_0x54c247){const _0x2e7ce9=new this(_0x34cda8,_0x54c247);return await _0x2e7ce9['initPlugins'](),await _0x2e7ce9['ui']['init'](_0x34cda8),await _0x2e7ce9['data']['init'](_0x2e7ce9['config']['get']('initialData')||''),_0x2e7ce9['fire']('ready'),_0x2e7ce9;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x46f453{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4eef13){function _0x93541c(_0x34aad3){return _0x34aad3['map'](_0x4443be=>String['fromCharCode'](_0x4443be))['join']('');}super(_0x4eef13),this['result']='end',_0x4eef13[_0x93541c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x93541c([0x76,0x69,0x65,0x77])][_0x93541c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x93541c([0x61,0x75,0x74,0x6f]),_0x4eef13[_0x93541c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x93541c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x93541c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x93541c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x93541c([0x6f,0x6b])});}}class k extends _0x46f453{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x4beb61){if(super(_0x4beb61),!this['editor']['config']['get']('revisionHistory'))throw new _0x5d8d22('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x1559f0=>this['_showRevisionViewer']({..._0x1559f0,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x12c269=>this['_closeRevisionViewer'](_0x12c269)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x45ccdc=>this['_restoreRevision'](_0x45ccdc)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x4e3fc0){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4e3fc0;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0xd3cbc2){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0xd3cbc2);}['getRevision'](_0x4ea81c){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x4ea81c);}['getRevisions'](_0x4c1f46){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x4c1f46||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x129232=this['editor'],_0x4b4b5a=_0x14e190(_0x129232,p),_0x3eb1c2=_0x129232['plugins']['get']('RevisionTracker'),_0x441ac5=_0x129232['plugins']['get']('Users')['users'];return _0x4b4b5a['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4b4b5a['lazyRoots'],(_0x4b4b5a['plugins']['push'](yt,m,R,class extends _0x46f453{static get['requires'](){return[m,'Users'];}['init'](){const _0x34f842=this['editor']['plugins']['get']('Users');for(const _0x306752 of _0x441ac5)_0x306752['isAnonymous']||_0x34f842['getUser'](_0x306752['id'])||_0x34f842['addUser'](_0x306752);const _0x2424d2=_0x3eb1c2['repository']['getRevisions']();let _0x414b3c=null;const _0x3611e3=this['editor']['plugins']['get']('RevisionViewer');_0x3611e3['adapter']=_0x3eb1c2['adapter'],_0x3611e3['bind']('isEnabled')['to'](_0x3eb1c2),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x129232,'isReadOnly',_0xca000b=>!_0xca000b);for(const _0x2a150f of _0x2424d2){const _0x3dd8d9=null===_0x2a150f['creator'];if(_0x3dd8d9&&_0x2a150f['toVersion']===_0x2a150f['fromVersion'])continue;const _0x1e7ea6=_0x2a150f['toJSON']();_0x3611e3['addRevisionData'](_0x1e7ea6,(_0x35be7b,_0x2bdd60,_0x53323b)=>{if(_0x3dd8d9){if(_0x414b3c)_0x414b3c['_update'](_0x35be7b,_0x2bdd60);else{if(!_0x2bdd60){const _0x440ad8=_0x53323b['toJSON']();_0x440ad8['id']=_0x40eb95(),_0x3eb1c2['saveRevision'](_0x440ad8,_0x53323b['toVersion'])['then'](_0xa7b045=>{_0x414b3c=_0xa7b045;});}}}else _0x2a150f['_update'](_0x35be7b,_0x2bdd60);});}}},d),_0x4b4b5a);}['_enhanceShowRevisionViewerCallback'](){const _0xe12c3=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4e9738=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x2861e3=this['editor']['plugins']['get']('Autosave');await _0x2861e3['save']();}else await _0x4e9738['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x3d0c55=this['editor']['plugins']['get']('Dialog');_0x3d0c55['isOpen']&&_0x3d0c55['hide']();}const _0x46612a=this['_getRevisionViewerEditorConfig']();return _0xe12c3(_0x46612a)['then'](_0x274245=>{return(this['_viewerEditor']=_0x274245,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'),_0x274245);})['catch'](_0x4f997a=>(console['error'](_0x4f997a),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3c947c=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'](),_0x3c947c(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x170f4f=this['editor']['plugins']['get']('Annotations');_0x170f4f['refreshVisibility'](),_0x170f4f['refreshPositioning']();}})));}['_showRevisionViewer'](_0x5472f8){const _0x55b368=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2f53f9=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x5df3c3=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x5df3c3,_0x5472f8)['then'](_0x2f30d2=>(_0x2f53f9['style']['display']='block',_0x55b368['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2f30d2));}['_closeRevisionViewer'](_0x52f26b){const _0xa1f0e7=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0xa1f0e7['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x52f26b['destroy']();}async['_restoreRevision'](_0x1f5795){const _0x403d23=this['editor'],_0x26884e=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x19f56a=_0x403d23['plugins']['get']('RevisionTracker'),_0x43ee59=_0x403d23['plugins']['get']('RevisionHistoryUtils'),_0x512743=_0x26884e['repository']['getRevision'](_0x1f5795);let _0x347783,_0x781e77,_0x410d95;try{await _0x43ee59['loadRevisionData'](_0x512743,this['adapter']),_0x347783=_0x43ee59['getRevisionDocumentData'](_0x512743),_0x781e77=_0x43ee59['getRevisionRootsAttributes'](_0x512743);}catch(_0x10cc28){return void console['error'](_0x10cc28);}_0x403d23['model']['change'](_0x237722=>{for(const _0x2e47c4 of Array['from'](_0x403d23['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x237722['removeMarker'](_0x2e47c4);}),_0x26884e['isReady']=!0x1,_0x403d23['model']['enqueueChange'](_0x39b7cb=>{_0x39b7cb['setSelection'](null),_0x39b7cb['removeSelectionAttribute'](_0x403d23['model']['document']['selection']['getAttributeKeys']());const _0x186895=Object['keys'](_0x347783);for(const _0x195950 of _0x403d23['model']['document']['roots'])'$graveyard'!=_0x195950['rootName']&&_0x195950['isAttached']()&&!_0x186895['includes'](_0x195950['rootName'])&&_0x39b7cb['detachRoot'](_0x195950);for(const _0x4a2dfc of _0x186895){let _0xf7cc5a=_0x403d23['model']['document']['getRoot'](_0x4a2dfc);_0xf7cc5a&&_0xf7cc5a['isAttached']()||(_0xf7cc5a=_0x39b7cb['addRoot'](_0x4a2dfc));const _0x589393=_0x781e77[_0x4a2dfc],_0x372823=Object['keys'](_0x589393),_0x551c75=_0x347783[_0x4a2dfc];for(const _0x537d85 of _0xf7cc5a['getAttributeKeys']())_0x372823['includes'](_0x537d85)||_0x39b7cb['removeAttribute'](_0x537d85,_0xf7cc5a);for(const _0x17d3e3 of _0x372823)_0x39b7cb['setAttribute'](_0x17d3e3,_0x781e77[_0x4a2dfc][_0x17d3e3],_0xf7cc5a);_0x39b7cb['remove'](_0x39b7cb['createRangeIn'](_0xf7cc5a)),_0x39b7cb['insert'](_0x403d23['data']['parse'](_0x551c75,_0xf7cc5a),_0xf7cc5a,0x0);}});const _0x1c278b=g(_0x403d23['locale'],'Restored');if(_0x512743['name'])_0x410d95=-0x1==_0x512743['name']['indexOf'](_0x1c278b)?_0x1c278b+':\x20'+_0x512743['name']:_0x512743['name'];else _0x410d95=_0x1c278b+':\x20'+(_0x512743['createdAt']['toLocaleDateString'](_0x403d23['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x512743['createdAt']['toLocaleTimeString'](_0x403d23['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x19f56a['saveRevision']({'name':_0x410d95}),_0x26884e['isReady']=!0x0,_0x403d23['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(_0x35f865){super(_0x35f865),this['_revisionViewer']=_0x35f865['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xc2e11a=this['_revisionsRepository']['_revisions'],_0xe96b0f=this['_createRevisionActions'](),_0x3391d4=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ii(this['editor']['locale'],_0xc2e11a,_0xe96b0f,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',(_0x284daa,_0x4492b6)=>{_0x4492b6['revisionViews']['on']('add',(_0x1f3183,_0x160a26)=>{_0x160a26['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)),_0x3391d4['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x178a53=this['_revisionsRepository']['getRevision'](0x0);if(_0x178a53){const _0x2f1fe7=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x178a53['id']);this['_revisionViewer']['compare'](_0x178a53,_0x2f1fe7);}}['_handleRevisionSelected'](_0x55d373,_0x212c5a){const _0xa163e2=this['_revisionsRepository']['getRevision'](_0x212c5a['id']),_0x5f1715=this['_revisionsRepository']['getEarlierVisibleRevision'](_0xa163e2['id']);this['_revisionViewer']['compare'](_0xa163e2,_0x5f1715);}['_handleRevisionSetName'](_0x479ad3,_0x2cfbc9){this['_revisionsRepository']['getRevision'](_0x2cfbc9['id'])['setName'](_0x2cfbc9['name']);}['_handleDiffChange'](_0x4c56a6,_0x15ae25,_0x526b6b){const _0x88eeb3=this['_revisionsRepository']['getRevisionsInDiff'](_0x526b6b);_0x88eeb3['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x88eeb3),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x88eeb3[0x0]));}['_createRevisionActions'](){const _0x2b033d=this['editor'],_0x2736d6=d['availableRevisionActions'],_0x541ae4=_0x2b033d['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x541ae4['length'])return _0x541ae4['map'](_0x5c023a=>{const _0x4306d8='string'==typeof _0x5c023a?Object['assign']({},_0x2736d6[_0x5c023a]):_0x5c023a;return _0x4306d8['action']=_0x4306d8['action']['bind'](this,_0x2b033d),_0x4306d8['isVisible']&&(_0x4306d8['isVisible']=_0x4306d8['isVisible']['bind'](this,_0x2b033d)),_0x4306d8;});}}function pt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x7c8cdf},_0x22dabe)=>{const _0xcfe1f5=_0x7c8cdf['get'](m),_0xc22e58=_0xcfe1f5['repository'];let _0x5dc119=_0xcfe1f5['diff']['newRevisionId'],_0x257227=_0x22dabe['id'];_0xc22e58['getIndex'](_0x5dc119)>_0xc22e58['getIndex'](_0x257227)&&([_0x5dc119,_0x257227]=[_0x257227,_0x5dc119]),_0xcfe1f5['compare'](_0x5dc119,_0x257227);},'isVisible':({plugins:_0xf20d63},_0x474b56)=>{const _0x5bcdaf=_0xf20d63['get'](m);return!(_0x5bcdaf['repository']['getRevisionsInDiff'](_0x5bcdaf['diff'])['length']>0x2)&&!_0x474b56['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x3a3c7d,{id:_0x8ad148})=>{_0x3a3c7d['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x8ad148);},'isVisible':({plugins:_0x4d5f43},_0x12b89f)=>!!_0x4d5f43['get'](m)['repository']['getLaterVisibleRevision'](_0x12b89f['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x7ff510},{id:_0x12e3ba,revisionNameView:_0x52722f})=>{const _0x3a95bc=_0x7ff510['get'](m),_0x183deb=_0x3a95bc['repository']['getEarlierVisibleRevision'](_0x12e3ba);_0x3a95bc['compare'](_0x12e3ba,_0x183deb),_0x52722f['focus'](),_0x52722f['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x18f580,_0x4fc2d9){super(_0x18f580),this['_view']=_0x4fc2d9,this['_toolbarConfig']=et(_0x18f580['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x3390f5){const _0x95ce51=this['editor'],_0x469b7f=this['view'],_0x5e7e04=_0x95ce51['editing']['view'],_0x3c981d=_0x469b7f['editable'],_0x3d372a=_0x5e7e04['document']['getRoot']();_0x3c981d['name']=_0x3d372a['rootName'],_0x469b7f['render']();const _0x3a61ee=_0x3c981d['element'];this['setEditableElement'](_0x3c981d['name'],_0x3a61ee),_0x469b7f['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5e7e04['attachDomRoot'](_0x3a61ee),this['_elementReplacer']['replace'](_0x3390f5,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x5a8820=this['view'],_0xa0dd81=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0xa0dd81['detachDomRoot'](_0x5a8820['editable']['name']),_0x5a8820['destroy']();}['_initToolbar'](){const _0x5c94dc=this['view'];_0x5c94dc['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x5c94dc['stickyPanel']['limiterElement']=_0x5c94dc['element'],_0x5c94dc['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x202638})=>_0x202638),_0x5c94dc['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x5c94dc['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x326cec,_0x21e44e,_0x3355f2={}){super(_0x326cec),this['stickyPanel']=new ht(_0x326cec),this['toolbar']=new dt(_0x326cec,{'shouldGroupWhenFull':_0x3355f2['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x326cec,_0x21e44e);}['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
|
+
_0x376351(_0x56567c){['_ui'];get['ui'](){return this['_ui'];}constructor(_0xefbb51,_0x3de2b5){super(_0x3de2b5),this['sourceElement']=_0xefbb51,this['model']['document']['createRoot']();const _0x2f796c=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x2f796c);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x35a6b2,_0x2f9c39){const _0x5cdc83=new this(_0x35a6b2,_0x2f9c39);return await _0x5cdc83['initPlugins'](),await _0x5cdc83['ui']['init'](_0x35a6b2),await _0x5cdc83['data']['init'](_0x5cdc83['config']['get']('initialData')||''),_0x5cdc83['fire']('ready'),_0x5cdc83;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class _t extends _0x37aa98{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5ecce2){function _0x273c74(_0x5cfdc9){return _0x5cfdc9['map'](_0x4c3aed=>String['fromCharCode'](_0x4c3aed))['join']('');}super(_0x5ecce2),this['result']='end',_0x5ecce2[_0x273c74([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x273c74([0x76,0x69,0x65,0x77])][_0x273c74([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x273c74([0x61,0x75,0x74,0x6f]),_0x5ecce2[_0x273c74([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x273c74([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x273c74([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x273c74([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x273c74([0x6f,0x6b])});}}class k extends _0x37aa98{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x455f09){if(super(_0x455f09),!this['editor']['config']['get']('revisionHistory'))throw new _0x2b5225('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x50d7d8=>this['_showRevisionViewer']({..._0x50d7d8,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0xe7fe6a=>this['_closeRevisionViewer'](_0xe7fe6a)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x2e16dd=>this['_restoreRevision'](_0x2e16dd)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x38f382){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x38f382;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x53a6e1){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x53a6e1);}['getRevision'](_0xd7ee2c){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0xd7ee2c);}['getRevisions'](_0x3637ce){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3637ce||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x2c345b=this['editor'],_0x15b025=_0x44ead7(_0x2c345b,p),_0x5ebfae=_0x2c345b['plugins']['get']('RevisionTracker'),_0x521687=_0x2c345b['plugins']['get']('Users')['users'];return _0x15b025['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x15b025['lazyRoots'],(_0x15b025['plugins']['push'](_t,m,R,class extends _0x37aa98{static get['requires'](){return[m,'Users'];}['init'](){const _0x46bc29=this['editor']['plugins']['get']('Users');for(const _0x2e2045 of _0x521687)_0x2e2045['isAnonymous']||_0x46bc29['getUser'](_0x2e2045['id'])||_0x46bc29['addUser'](_0x2e2045);const _0x347b21=_0x5ebfae['repository']['getRevisions']();let _0x3133c7=null;const _0x205cfc=this['editor']['plugins']['get']('RevisionViewer');_0x205cfc['adapter']=_0x5ebfae['adapter'],_0x205cfc['bind']('isEnabled')['to'](_0x5ebfae),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x2c345b,'isReadOnly',_0x594071=>!_0x594071);for(const _0x471d0f of _0x347b21){const _0x177da6=null===_0x471d0f['creator'];if(_0x177da6&&_0x471d0f['toVersion']===_0x471d0f['fromVersion'])continue;const _0x409eae=_0x471d0f['toJSON']();_0x205cfc['addRevisionData'](_0x409eae,(_0x22cd63,_0x154d8b,_0x245773)=>{if(_0x177da6){if(_0x3133c7)_0x3133c7['_update'](_0x22cd63,_0x154d8b);else{if(!_0x154d8b){const _0x295095=_0x245773['toJSON']();_0x295095['id']=_0x498586(),_0x5ebfae['saveRevision'](_0x295095,_0x245773['toVersion'])['then'](_0x285e9b=>{_0x3133c7=_0x285e9b;});}}}else _0x471d0f['_update'](_0x22cd63,_0x154d8b);});}}},d),_0x15b025);}['_enhanceShowRevisionViewerCallback'](){const _0xc98008=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x40a43b=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x3c1901=this['editor']['plugins']['get']('Autosave');await _0x3c1901['save']();}else await _0x40a43b['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0xd20ccc=this['editor']['plugins']['get']('Dialog');_0xd20ccc['isOpen']&&_0xd20ccc['hide']();}const _0x5edc40=this['_getRevisionViewerEditorConfig']();return _0xc98008(_0x5edc40)['then'](_0x139c1b=>{return(this['_viewerEditor']=_0x139c1b,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'),_0x139c1b);})['catch'](_0x2e06b4=>(console['error'](_0x2e06b4),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x26c2d2=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'](),_0x26c2d2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x5a1f04=this['editor']['plugins']['get']('Annotations');_0x5a1f04['refreshVisibility'](),_0x5a1f04['refreshPositioning']();}})));}['_showRevisionViewer'](_0x24c4b1){const _0x2281e7=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2b2c68=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x424cc7=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x424cc7,_0x24c4b1)['then'](_0x590e55=>(_0x2b2c68['style']['display']='block',_0x2281e7['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x590e55));}['_closeRevisionViewer'](_0x4165aa){const _0x2a70b6=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x2a70b6['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x4165aa['destroy']();}async['_restoreRevision'](_0x52217d){const _0x15af80=this['editor'],_0x172048=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x881ab7=_0x15af80['plugins']['get']('RevisionTracker'),_0x10e93b=_0x15af80['plugins']['get']('RevisionHistoryUtils'),_0x6feba3=_0x172048['repository']['getRevision'](_0x52217d);let _0x1bf3a9,_0x54da21,_0x836419;try{await _0x10e93b['loadRevisionData'](_0x6feba3,this['adapter']),_0x1bf3a9=_0x10e93b['getRevisionDocumentData'](_0x6feba3),_0x54da21=_0x10e93b['getRevisionRootsAttributes'](_0x6feba3);}catch(_0x503c37){return void console['error'](_0x503c37);}_0x15af80['model']['change'](_0x1ab8ab=>{for(const _0x22bd41 of Array['from'](_0x15af80['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1ab8ab['removeMarker'](_0x22bd41);}),_0x172048['isReady']=!0x1,_0x15af80['model']['enqueueChange'](_0x1b9c51=>{_0x1b9c51['setSelection'](null),_0x1b9c51['removeSelectionAttribute'](_0x15af80['model']['document']['selection']['getAttributeKeys']());const _0x2168c5=Object['keys'](_0x1bf3a9);for(const _0x189088 of _0x15af80['model']['document']['roots'])'$graveyard'!=_0x189088['rootName']&&_0x189088['isAttached']()&&!_0x2168c5['includes'](_0x189088['rootName'])&&_0x1b9c51['detachRoot'](_0x189088);for(const _0x2d7258 of _0x2168c5){let _0x1952ef=_0x15af80['model']['document']['getRoot'](_0x2d7258);_0x1952ef&&_0x1952ef['isAttached']()||(_0x1952ef=_0x1b9c51['addRoot'](_0x2d7258));const _0x485841=_0x54da21[_0x2d7258],_0x55b0eb=Object['keys'](_0x485841),_0x17781a=_0x1bf3a9[_0x2d7258];for(const _0x512592 of _0x1952ef['getAttributeKeys']())_0x55b0eb['includes'](_0x512592)||_0x1b9c51['removeAttribute'](_0x512592,_0x1952ef);for(const _0x2cd0a1 of _0x55b0eb)_0x1b9c51['setAttribute'](_0x2cd0a1,_0x54da21[_0x2d7258][_0x2cd0a1],_0x1952ef);_0x1b9c51['remove'](_0x1b9c51['createRangeIn'](_0x1952ef)),_0x1b9c51['insert'](_0x15af80['data']['parse'](_0x17781a,_0x1952ef),_0x1952ef,0x0);}});const _0x2edac8=g(_0x15af80['locale'],'Restored');if(_0x6feba3['name'])_0x836419=-0x1==_0x6feba3['name']['indexOf'](_0x2edac8)?_0x2edac8+':\x20'+_0x6feba3['name']:_0x6feba3['name'];else _0x836419=_0x2edac8+':\x20'+(_0x6feba3['createdAt']['toLocaleDateString'](_0x15af80['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x6feba3['createdAt']['toLocaleTimeString'](_0x15af80['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x881ab7['saveRevision']({'name':_0x836419}),_0x172048['isReady']=!0x0,_0x15af80['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};
|