@ckeditor/ckeditor5-revision-history 48.0.0-alpha.8 → 48.0.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/dist/index.js +7 -7
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x5ae268(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2f9537){super(),this['id']=_0x2f9537['id']||_0x423324(),this['creator']=_0x2f9537['creator']||null,this['authors']=_0x2f9537['authors']||[],this['diffData']=_0x2f9537['diffData']||null,this['toVersion']=_0x2f9537['toVersion']||0x0,this['fromVersion']=_0x2f9537['fromVersion']||0x0,this['set']('name',_0x2f9537['name']||''),this['set']('createdAt',_0x2f9537['createdAt']||new Date()),this['set']('attributes',_0x2f9537['attributes']||{});}['setName'](_0x1ff1c0){this['_update']({'name':_0x1ff1c0});}['setAttribute'](_0x55176e,_0x457069){const _0x3d0f51=_0x36af59(this['attributes']);_0x3e976f(_0x3d0f51,_0x55176e,_0x457069),this['_update']({'attributes':_0x3d0f51});}['removeAttribute'](_0x3c81a4){const _0x50fdae=_0x36af59(this['attributes']);_0x24abd6(_0x50fdae,_0x3c81a4),this['_update']({'attributes':_0x50fdae});}['_update'](_0x14824c,_0x1a6630=!0x1){let _0x452ebb=!0x1;const _0x11d8e6={'id':this['id']},_0x4a8915=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x259396 of _0x4a8915){const _0x35d135=_0x14824c[_0x259396];void 0x0!==_0x35d135&&_0x35d135!==this[_0x259396]&&(this[_0x259396]=_0x35d135,_0x11d8e6[_0x259396]=_0x35d135,_0x452ebb=!0x0);}_0x452ebb&&(_0x11d8e6['authors']&&(_0x11d8e6['authorsIds']=_0x11d8e6['authors']['map'](_0xe18847=>_0xe18847['id']),delete _0x11d8e6['authors']),this['fire']('_update',_0x11d8e6,_0x1a6630));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x12b17a=>_0x12b17a['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class gt extends _0x423cf5{['_revisions'];static get['requires'](){return[_0x5c17da];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x493f04){super(_0x493f04),this['_revisions']=new _0x239ef9();}['afterInit'](){!async function(_0x30a8c7){const _0x4970a4=_0x237590([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x3fc7f4=0xeb829,_0x9d0cf6=0x359e09b0,_0x5b9201=0x35998c38^_0x9d0cf6,_0x5c1c97=window[_0x237590([0x44,0x61,0x74,0x65])][_0x237590([0x6e,0x6f,0x77])](),_0x50ab28=_0x30a8c7[_0x237590([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1b3b16=new window[(_0x237590([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x28e605=>{_0x50ab28[_0x237590([0x6f,0x6e,0x63,0x65])](_0x237590([0x72,0x65,0x61,0x64,0x79]),_0x28e605);}),_0xce95df={[_0x237590([0x6b,0x74,0x79])]:_0x237590([0x45,0x43]),[_0x237590([0x75,0x73,0x65])]:_0x237590([0x73,0x69,0x67]),[_0x237590([0x63,0x72,0x76])]:_0x237590([0x50,0x2d,0x32,0x35,0x36]),[_0x237590([0x78])]:_0x237590([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]),[_0x237590([0x79])]:_0x237590([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]),[_0x237590([0x61,0x6c,0x67])]:_0x237590([0x45,0x53,0x32,0x35,0x36])},_0x2556fc=_0x50ab28[_0x237590([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x237590([0x67,0x65,0x74])](_0x237590([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2ef68f(){let _0x478c21,_0x3b91d6=null,_0xbedea7=null;try{if(_0x2556fc==_0x237590([0x47,0x50,0x4c]))return _0x237590([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x478c21=_0x5e0810(),!_0x478c21)return _0x237590([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x478c21[_0x237590([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xbedea7=_0x5093ed(_0x478c21[_0x237590([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x478c21[_0x237590([0x6a,0x74,0x69])])),await _0x586194()?_0x250bbe()?_0x425951()?_0x237590([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xec3bd4()?(_0x478c21[_0x237590([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x237590([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3b91d6=_0x526b49(_0x237590([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2d89a1()):_0x237590([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x237590([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x237590([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x237590([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x425951(){const _0x26dcfb=[_0x237590([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x237590([0x74,0x72,0x69,0x61,0x6c])][_0x237590([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x478c21[_0x237590([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5c1c97/0x3e8:0xe10*_0x5b9201;return _0x478c21[_0x237590([0x65,0x78,0x70])]<_0x26dcfb;}function _0x250bbe(){const _0x3d9daa=_0x478c21[_0x237590([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3d9daa)return!0x1;if(_0x3d9daa[_0x237590([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x237590([0x2a])))return!0x0;if(_0x3d9daa[_0x237590([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x237590([0x52,0x48])))return!0x0;if(_0x3d9daa[_0x237590([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x237590([0x52,0x52,0x48]))){if(_0x180e6d())return!0x0;if(_0x286ef3()||_0x5192ac())return!0x0;}return!0x1;}function _0xec3bd4(){const _0x313b68=_0x478c21[_0x237590([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x313b68||0x0==_0x313b68[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4d3735}=new URL(window[_0x237590([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x313b68[_0x237590([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d3735))return!0x0;const _0x13c986=_0x4d3735[_0x237590([0x73,0x70,0x6c,0x69,0x74])](_0x237590([0x2e]));return _0x313b68[_0x237590([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x282bab=>_0x282bab[_0x237590([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x237590([0x2a])))[_0x237590([0x6d,0x61,0x70])](_0x7b58e3=>_0x7b58e3[_0x237590([0x73,0x70,0x6c,0x69,0x74])](_0x237590([0x2e])))[_0x237590([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3cb58b=>_0x3cb58b[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x13c986[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x237590([0x6d,0x61,0x70])](_0x15ffc3=>Array(_0x13c986[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x15ffc3[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x237590([0x66,0x69,0x6c,0x6c])](_0x15ffc3[0x0]===_0x237590([0x2a])?_0x237590([0x2a]):'')[_0x237590([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x15ffc3))[_0x237590([0x73,0x6f,0x6d,0x65])](_0x3d70b0=>_0x13c986[_0x237590([0x65,0x76,0x65,0x72,0x79])]((_0x4813b6,_0x1b0d7b)=>_0x3d70b0[_0x1b0d7b]===_0x4813b6||_0x3d70b0[_0x1b0d7b]===_0x237590([0x2a])));}function _0x2d89a1(){return _0x3b91d6&&_0xbedea7?new window[(_0x237590([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x776920,_0x59a597)=>{_0x3b91d6[_0x237590([0x74,0x68,0x65,0x6e])](_0x776920,_0x59a597),_0xbedea7[_0x237590([0x74,0x68,0x65,0x6e])](_0x464277=>{_0x464277!=_0x237590([0x56,0x61,0x6c,0x69,0x64])&&_0x776920(_0x464277);},_0x59a597);}):_0x3b91d6||_0xbedea7||_0x237590([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5093ed(_0xcce319,_0x1e32d2){return new window[(_0x237590([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5a04cf=>{if(_0x209865())return _0x5a04cf(_0x237590([0x56,0x61,0x6c,0x69,0x64]));_0x44d2f4(),_0x50ab28[_0x237590([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x237590([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1de719=!0x1;const _0x2bf0b0=_0x423324();function _0x39c68d(_0x431ccb){return!!_0x431ccb&&(typeof _0x431ccb===_0x237590([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x431ccb===_0x237590([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x431ccb[_0x237590([0x74,0x68,0x65,0x6e])]===_0x237590([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x431ccb[_0x237590([0x63,0x61,0x74,0x63,0x68])]===_0x237590([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x35aef0(_0x263f20){_0x272b1f(_0x263f20)[_0x237590([0x74,0x68,0x65,0x6e])](_0x1ca080=>{if(!_0x1ca080||_0x1ca080[_0x237590([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x237590([0x6f,0x6b]))return _0x237590([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x11b3b0(_0x478eb1(_0x2bf0b0+_0x1e32d2))!=_0x1ca080[_0x237590([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x237590([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x237590([0x56,0x61,0x6c,0x69,0x64]);})[_0x237590([0x74,0x68,0x65,0x6e])](_0x6b1af1=>(_0x574510(),_0x6b1af1),()=>{const _0x509d1b=_0xb1cf02();return null==_0x509d1b?(_0x574510(),_0x237590([0x56,0x61,0x6c,0x69,0x64])):_0x237590(_0x5c1c97-_0x509d1b>(0x11928db0^_0x9d0cf6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x237590([0x74,0x68,0x65,0x6e])](_0x5a04cf)[_0x237590([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5a04cf(_0x237590([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xc1c62c=0x35a8e730^_0x9d0cf6;function _0x574510(){const _0x2ee7e7=_0x237590([0x6c,0x6c,0x63,0x74,0x2d])+_0x11b3b0(_0x478eb1(_0xcce319)),_0x1e75fa=_0x476e10(_0x11b3b0(window[_0x237590([0x4d,0x61,0x74,0x68])][_0x237590([0x63,0x65,0x69,0x6c])](_0x5c1c97/_0xc1c62c)));window[_0x237590([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x237590([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2ee7e7,_0x1e75fa);}function _0xb1cf02(){const _0x155200=_0x237590([0x6c,0x6c,0x63,0x74,0x2d])+_0x11b3b0(_0x478eb1(_0xcce319)),_0x5183da=window[_0x237590([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x237590([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x155200);return _0x5183da?window[_0x237590([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x476e10(_0x5183da),0x10)*_0xc1c62c:null;}function _0x272b1f(_0x183373){return new window[(_0x237590([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xb1851,_0x180407)=>{_0x183373[_0x237590([0x74,0x68,0x65,0x6e])](_0xb1851,_0x180407),window[_0x237590([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x180407,0x359fdd70^_0x9d0cf6);});}}_0x50ab28[_0x237590([0x6f,0x6e])](_0x237590([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1e5e7c,_0x172498)=>{if(_0x172498[0x0]!=_0xcce319)return _0x5a04cf(_0x237590([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x172498[0x1]={..._0x172498[0x1],[_0x237590([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2bf0b0};},{[_0x237590([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x237590([0x68,0x69,0x67,0x68])}),_0x50ab28[_0x237590([0x6f,0x6e])](_0x237590([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x36690a=>{_0x39c68d(_0x36690a[_0x237590([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1de719=!0x0,_0x35aef0(_0x36690a[_0x237590([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x237590([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x237590([0x6c,0x6f,0x77])}),_0x1b3b16[_0x237590([0x74,0x68,0x65,0x6e])](()=>{_0x1de719||_0x5a04cf(_0x237590([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x209865(){return _0x50ab28[_0x237590([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x237590([0x76,0x69,0x65,0x77])][_0x237590([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x237590([0x61,0x75,0x74,0x6f]);}function _0x44d2f4(){_0x50ab28[_0x237590([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x237590([0x76,0x69,0x65,0x77])][_0x237590([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x237590([0x61,0x75,0x74,0x6f]);}}function _0x526b49(_0x79493a){const _0x3bd627=[new window[(_0x237590([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x500eeb=>setTimeout(_0x500eeb,0x3597377c^_0x9d0cf6)),_0x1b3b16[_0x237590([0x74,0x68,0x65,0x6e])](()=>new window[(_0x237590([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d8a71=>{const _0x559d1f=0x359e09b7^_0x9d0cf6,_0x5e84c5=_0x30a8c7[_0x237590([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x46bbbf(){_0x5e84c5[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x559d1f&&_0x4d8a71();}_0x46bbbf(),_0x5e84c5[_0x237590([0x6f,0x6e])](_0x237590([0x61,0x64,0x64]),_0x46bbbf);})),new window[(_0x237590([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16a6fa=>{function _0x132628(){for(const _0x476e87 in window)if(window[_0x237590([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x237590([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x476e87))&&window[_0x476e87]==_0x3fc7f4)return _0x16a6fa();_0x50ab28[_0x237590([0x73,0x74,0x61,0x74,0x65])]!=_0x237590([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x237590([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x132628,0x359e1a38^_0x9d0cf6);}_0x4839f6(_0x237590([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x132628();})];return window[_0x237590([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x237590([0x72,0x61,0x63,0x65])](_0x3bd627)[_0x237590([0x74,0x68,0x65,0x6e])](()=>_0x79493a);}async function _0x9ef01e(){if(await _0x1b3b16,_0x4839f6(_0x237590([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x2d4f02=_0x30a8c7[_0x237590([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x455e88=_0x30a8c7[_0x237590([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])](_0x2d4f02[_0x237590([0x69,0x64])]),_0x4f3ffe=_0x5bcd63(_0x237590([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4f3ffe[_0x237590([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x2d4f02['id'],_0x455e88?_0x455e88['id']:null,!0x0),_0x4f3ffe[_0x237590([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x237590([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4f3ffe[_0x237590([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4f3ffe[_0x237590([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x2348e3,void(_0x4f3ffe[_0x237590([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x2348e3);}if(_0x4839f6(_0x237590([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x50b230=_0x5bcd63(_0x237590([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x50b230[_0x237590([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x237590([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x50b230[_0x237590([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x50b230[_0x237590([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x2348e3,_0x50b230[_0x237590([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x2348e3;}_0x50ab28[_0x237590([0x6d,0x6f,0x64,0x65,0x6c])][_0x237590([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2348e3,_0x50ab28[_0x237590([0x6d,0x6f,0x64,0x65,0x6c])][_0x237590([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2348e3,_0x50ab28[_0x237590([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x237590([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x180e6d(){return _0x4839f6(_0x237590([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5bcd63(_0x237590([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x237590([0x73,0x74,0x61,0x74,0x65])]==_0x237590([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x286ef3(){return _0x4839f6(_0x237590([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 _0x5192ac(){return _0x4839f6(_0x237590([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2e6855(_0x307a7c){const _0x4a6e77=_0x49e5aa();_0x50ab28[_0x4a6e77]=_0x237590([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])+_0x307a7c,_0x307a7c[_0x237590([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x237590([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x49e5aa()]=_0x3fc7f4),_0x307a7c!=_0x237590([0x56,0x61,0x6c,0x69,0x64])&&_0x9ef01e();}function _0x49e5aa(){const _0x2c5a31=window[_0x237590([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x237590([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x237590([0x6e,0x6f,0x77])]())[_0x237590([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x237590([0x2e]),'');let _0x3ed3d0=_0x237590([0x76]);for(let _0x3f678e=0x0;_0x3f678e<_0x2c5a31[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3f678e+=0x2){let _0x1f80e9=window[_0x237590([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c5a31[_0x237590([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3f678e,_0x3f678e+0x2));_0x1f80e9>=_0x4970a4[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1f80e9-=_0x4970a4[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3ed3d0+=_0x4970a4[_0x1f80e9];}return _0x3ed3d0;}function _0x5e0810(){const _0x50865b=_0x2556fc[_0x237590([0x73,0x70,0x6c,0x69,0x74])](_0x237590([0x2e]));if(0x3!=_0x50865b[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x70ba96(_0x50865b[0x1]);function _0x70ba96(_0x9bd9bf){const _0x320754=_0x3bdddc(_0x9bd9bf);return _0x320754&&_0x17fd01()?_0x320754:null;function _0x17fd01(){const _0x2fe390=_0x320754[_0x237590([0x6a,0x74,0x69])],_0x75b3c=window[_0x237590([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2fe390[_0x237590([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2fe390[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x368dcc={..._0x320754,[_0x237590([0x6a,0x74,0x69])]:_0x2fe390[_0x237590([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2fe390[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x368dcc[_0x237590([0x76,0x63])],_0x478eb1(_0x368dcc)==_0x75b3c;}}}async function _0x586194(){let _0x47817d=!0x0;try{const _0x1ff56a=_0x2556fc[_0x237590([0x73,0x70,0x6c,0x69,0x74])](_0x237590([0x2e])),[_0x3d30c2,_0x56506c,_0x586c78]=_0x1ff56a;return _0x33a4d9(_0x3d30c2),await _0x4eab5d(_0x3d30c2,_0x56506c,_0x586c78),_0x47817d;}catch{return!0x1;}function _0x33a4d9(_0x282764){const _0x19d366=_0x3bdddc(_0x282764);_0x19d366&&_0x19d366[_0x237590([0x61,0x6c,0x67])]==_0x237590([0x45,0x53,0x32,0x35,0x36])||(_0x47817d=!0x1);}async function _0x4eab5d(_0x102ee0,_0x5c338a,_0x2ac205){const _0x57bc46=window[_0x237590([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x237590([0x66,0x72,0x6f,0x6d])](_0xcd614f(_0x2ac205),_0x10e8ec=>_0x10e8ec[_0x237590([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x7c04ab=new window[(_0x237590([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x237590([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x102ee0+_0x237590([0x2e])+_0x5c338a),_0xe4981b=window[_0x237590([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x237590([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xe4981b)return;const _0x26fb8e=await _0xe4981b[_0x237590([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x237590([0x6a,0x77,0x6b]),_0xce95df,{[_0x237590([0x6e,0x61,0x6d,0x65])]:_0x237590([0x45,0x43,0x44,0x53,0x41]),[_0x237590([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x237590([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x237590([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xe4981b[_0x237590([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x237590([0x6e,0x61,0x6d,0x65])]:_0x237590([0x45,0x43,0x44,0x53,0x41]),[_0x237590([0x68,0x61,0x73,0x68])]:{[_0x237590([0x6e,0x61,0x6d,0x65])]:_0x237590([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x26fb8e,_0x57bc46,_0x7c04ab)||(_0x47817d=!0x1);}}function _0x3bdddc(_0x356a35){return _0x356a35[_0x237590([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x237590([0x65,0x79]))?JSON[_0x237590([0x70,0x61,0x72,0x73,0x65])](_0xcd614f(_0x356a35)):null;}function _0xcd614f(_0x2ecca3){return window[_0x237590([0x61,0x74,0x6f,0x62])](_0x2ecca3[_0x237590([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x237590([0x2b]))[_0x237590([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x237590([0x2f])));}function _0x478eb1(_0x19e5a){let _0x21cd7f=0x1505;function _0xfb081d(_0x351146){for(let _0x50aba4=0x0;_0x50aba4<_0x351146[_0x237590([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x50aba4++){const _0x3e485c=_0x351146[_0x237590([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x50aba4);_0x21cd7f=(_0x21cd7f<<0x5)+_0x21cd7f+_0x3e485c,_0x21cd7f&=_0x21cd7f;}}function _0x37f25b(_0x8ddfdc){Array[_0x237590([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x8ddfdc)?_0x8ddfdc[_0x237590([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x37f25b):_0x8ddfdc&&typeof _0x8ddfdc==_0x237590([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x237590([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x8ddfdc)[_0x237590([0x73,0x6f,0x72,0x74])]()[_0x237590([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x217696,_0x556872])=>{_0xfb081d(_0x217696),_0x37f25b(_0x556872);}):_0xfb081d(window[_0x237590([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x8ddfdc));}return _0x37f25b(_0x19e5a),_0x21cd7f>>>0x0;}function _0x11b3b0(_0x32ec67){return _0x32ec67[_0x237590([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x237590([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x237590([0x30]));}function _0x476e10(_0x38d7ee){return _0x38d7ee[_0x237590([0x73,0x70,0x6c,0x69,0x74])]('')[_0x237590([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x237590([0x6a,0x6f,0x69,0x6e])]('');}function _0x4839f6(_0x4be760){return _0x50ab28[_0x237590([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x237590([0x68,0x61,0x73])](_0x4be760);}function _0x5bcd63(_0x578368){return _0x50ab28[_0x237590([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x237590([0x67,0x65,0x74])](_0x578368);}function _0x2348e3(){}function _0x237590(_0xa54d76){return _0xa54d76['map'](_0x1d7331=>String['fromCharCode'](_0x1d7331))['join']('');}_0x2e6855(await _0x2ef68f());}(this);}['createRevision'](_0x4f7cf6){const _0x350e1a=this['editor']['plugins']['get']('Users');return new vt({'id':_0x4f7cf6['id'],'name':_0x4f7cf6['name'],'creator':_0x4f7cf6['creatorId']?_0x350e1a['getUser'](_0x4f7cf6['creatorId']):null,'diffData':_0x4f7cf6['diffData']||_0x4f7cf6['data'],'authors':_0x4f7cf6['authorsIds']['map'](_0x454276=>_0x350e1a['getUser'](_0x454276)),'createdAt':new Date(_0x4f7cf6['createdAt']),'attributes':_0x4f7cf6['attributes'],'fromVersion':_0x4f7cf6['fromVersion'],'toVersion':_0x4f7cf6['toVersion']});}['addRevision'](_0x14250d,_0x2a19cc=0x0){this['_revisions']['add'](_0x14250d,_0x2a19cc);}['getRevision'](_0x1bb1c4){return this['_revisions']['get'](_0x1bb1c4);}['getRevisions'](_0x1f1a92={'toJSON':!0x1}){const _0x3d9d8c=Array['from'](this['_revisions']);return _0x3d9d8c['reverse'](),_0x1f1a92['toJSON']?_0x3d9d8c['map'](_0x16c0bc=>_0x16c0bc['toJSON']()):_0x3d9d8c;}['getIndex'](_0x2fee10){return this['_revisions']['getIndex'](_0x2fee10);}['getEarlierVisibleRevision'](_0x2ec511){const [,_0x1ad49f]=this['getRevisionsIterator'](_0x2ec511,{'direction':'earlier'});return _0x1ad49f;}['getLaterVisibleRevision'](_0x17cee5){const [,_0x3ddf20]=this['getRevisionsIterator'](_0x17cee5,{'direction':'later'});return _0x3ddf20;}['getRevisionsInDiff'](_0x20f074){const _0x57e3cc=[];for(const _0x113ef of this['getRevisionsIterator'](_0x20f074['newRevisionId']))if(_0x57e3cc['push'](_0x113ef),_0x113ef['id']===_0x20f074['oldRevisionId'])break;return _0x57e3cc;}*['getRevisionsIterator'](_0x33afe1,{direction:_0x583f85='earlier',filter:_0xbc477c=()=>!0x0}={}){const _0x3cc4e6='earlier'===_0x583f85?0x1:-0x1;let _0x30a15e=this['_revisions']['get'](_0x33afe1),_0x13055d=this['getIndex'](_0x30a15e);for(yield _0x30a15e;_0x30a15e;){if(_0x13055d+=_0x3cc4e6,_0x30a15e=this['getRevision'](_0x13055d),!_0x30a15e)return;_0xbc477c(_0x30a15e)&&(yield _0x30a15e);}}}class mt extends _0x423cf5{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0xf01b90,'c'],[_0x25f4ad,'a'],[_0x591033,'e'],[_0xe5c342,'r'],[_0x5b93e8,'u']]);['_typeCharToViewClass']=new Map([['c',_0xf01b90],['a',_0x25f4ad],['e',_0x591033],['r',_0xe5c342],['u',_0x5b93e8]]);async['loadRevisionData'](_0x4d11f7,_0x3e04c2){if(_0x4d11f7['diffData']||!_0x3e04c2)return;const _0x3dd3a1=this['editor']['config']['get']('collaboration.channelId'),_0x4ad48a=await _0x3e04c2['getRevision']({'channelId':_0x3dd3a1,'revisionId':_0x4d11f7['id']});_0x4d11f7['diffData']=_0x4ad48a['diffData'];}['getRevisionDocumentData'](_0x171f4d){const _0x537c43={};for(const _0xf9013 in _0x171f4d['diffData']){if(_0x171f4d['diffData'][_0xf9013]['attachChange']&&!_0x171f4d['diffData'][_0xf9013]['attachChange']['isAttached'])continue;const _0x48b686=this['_removeRevisionMarkers'](JSON['parse'](_0x171f4d['diffData'][_0xf9013]['insertions'])),_0xf5290a=this['editor']['editing']['view']['document'],_0x14927c=new _0x505a46(_0xf5290a,_0x48b686['map'](_0x7cfff0=>this['_getViewFromDiffObj'](_0x7cfff0,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x537c43[_0xf9013]=this['editor']['data']['processor']['toData'](_0x14927c),this['editor']['data']['processor']['useFillerType']('default');}return _0x537c43;}['getRevisionRootsAttributes'](_0x57389c){const _0x1d7620={};for(const _0x44ba25 in _0x57389c['diffData'])_0x57389c['diffData'][_0x44ba25]['attachChange']&&!_0x57389c['diffData'][_0x44ba25]['attachChange']['isAttached']||(_0x1d7620[_0x44ba25]=_0x57389c['diffData'][_0x44ba25]['attributesAfter']||{});return _0x1d7620;}['_getTypeCharForViewElement'](_0x57d8b8){return this['_viewClassToTypeChar']['get'](_0x57d8b8['constructor']);}['_getViewFromDiffObj'](_0x57de50,_0x5ab97b){const _0x552dd3=this['editor']['editing']['view']['document'];if('string'==typeof _0x57de50)return new _0x940430(_0x552dd3,_0x57de50);{let _0x4cd329,_0x2ba216;_0x2ba216='u'==_0x57de50['type']||'r'==_0x57de50['type']?[]:_0x57de50['children']['map'](_0x5242e4=>this['_getViewFromDiffObj'](_0x5242e4,_0x5ab97b));const _0x4b02c6=this['_typeCharToViewClass']['get'](_0x57de50['type'])||_0x4609d7,_0x1f2bf7=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x4cd329=new _0x4b02c6(_0x552dd3,_0x57de50['name'],_0x57de50['attributes'],_0x2ba216),'u'==_0x57de50['type']&&_0x57de50['children'][0x0]){const _0x3d14fa=_0x57de50['children'][0x0];if(_0x4cd329['render']=function(_0x37af86){const _0x1ab6c9=_0x37af86['createElement']('div');return _0x1ab6c9['innerHTML']=_0x3d14fa,_0x1ab6c9['childNodes'][0x0];},_0x5ab97b){const _0x5af3c6=new _0x505a46(_0x552dd3);_0x5af3c6['_appendChild'](_0x4cd329);const _0x42d063=Array['from'](_0x1f2bf7['viewChildrenToDom'](_0x5af3c6,{'bind':!0x1})),_0x580c61=_0x1f2bf7['domDocument']['createElement']('div');_0x580c61['append'](..._0x42d063),_0x4cd329=Array['from'](_0x1f2bf7['domChildrenToView'](_0x580c61))[0x0];}}else{if('r'==_0x57de50['type']&&_0x57de50['children'][0x0]){const _0x55aa59=_0x57de50['children'][0x0];if(_0x4cd329['render']=function(_0x5a65b2){_0x5a65b2['innerHTML']=_0x55aa59;},_0x5ab97b){const _0x12b189=new _0x505a46(_0x552dd3);_0x12b189['_appendChild'](_0x4cd329);const _0xe0c2c5=Array['from'](_0x1f2bf7['viewChildrenToDom'](_0x12b189,{'bind':!0x1})),_0x116b34=_0x1f2bf7['domDocument']['createElement']('div');_0x116b34['append'](..._0xe0c2c5);const _0x4a4089=Array['from'](_0x1f2bf7['domChildrenToView'](_0x116b34));_0x4a4089['length']>0x1?_0x4cd329['_appendChild'](_0x4a4089):_0x4cd329=_0x4a4089[0x0];}}}if(_0x57de50['customProperties']){for(const [_0x1b95eb,_0x2f0697]of _0x57de50['customProperties'])_0x4cd329['_setCustomProperty'](_0x1b95eb,_0x2f0697);}const _0x439d50=void 0x0===_0x57de50['fillerOffset']?null:_0x57de50['fillerOffset'];return null!==_0x439d50&&(_0x4cd329['getFillerOffset']=()=>_0x439d50),_0x4cd329;}}['_makeModelFromViewString'](_0x122b0e){const _0xa795ad=JSON['parse'](_0x122b0e),_0x1bf6a7=this['editor']['editing']['view']['document'],_0x56439a=new _0x505a46(_0x1bf6a7,_0xa795ad['map'](_0x42416f=>this['_getViewFromDiffObj'](_0x42416f,!0x0)));return this['editor']['data']['toModel'](_0x56439a);}['_removeRevisionMarkers'](_0x19e0fa){return(_0x19e0fa=_0x19e0fa['filter'](_0x3233a9=>!_0x3233a9['name']||'revision-start'!==_0x3233a9['name']&&'revision-end'!==_0x3233a9['name']))['forEach'](_0x574fa7=>{'string'!=typeof _0x574fa7&&(_0x574fa7['children']=this['_removeRevisionMarkers'](_0x574fa7['children']),_0x574fa7['attributes']=_0x574fa7['attributes']['filter'](_0x4f7aea=>!_0x4f7aea[0x0]['startsWith']('data-revision-')));}),_0x19e0fa;}}function wt(_0x3934da,_0x1caff2,_0x4ef20d){const t=_0x3934da['t'];switch(_0x1caff2){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'},_0x4ef20d);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x4ef20d);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 pt extends _0x423cf5{['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[_0x5c17da,gt,mt,_0x2d7da0];}constructor(_0x5b687c){super(_0x5b687c),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new _t(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x34a8a7=_0x423324();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x34a8a7},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 _0x9cd1e8=this['repository']['getRevision'](0x0),_0x172289=_0x9cd1e8&&null===_0x9cd1e8['creator']?_0x9cd1e8:null;if(this['_continueCurrentRevision']=!!_0x172289&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4dbff4=this['_source']['getCurrentRevisionId'](),_0x9f9353=this['repository']['getRevision'](_0x4dbff4);if(_0x9f9353)this['_startingVersion']=_0x9f9353['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x48204c=this['_source']['history']['_operations']['find'](_0x151203=>!_0x151203['_isInit']),_0x32a3ff=_0x48204c?_0x48204c['baseVersion']:this['_source']['history']['version'];_0x9cd1e8?(_0x9cd1e8['toVersion']<_0x32a3ff&&_0x9cd1e8['_update']({'toVersion':_0x32a3ff}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x172289['id'],this['_startingVersion']=_0x172289['fromVersion']):(this['_startingVersion']=_0x9cd1e8['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x32a3ff,this['_continueCurrentRevision']=!0x1);}}else _0x172289&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x172289['toVersion'],this['editor']['model']['document']['history']['version']),_0x172289['fromVersion']===_0x172289['toVersion']?(0x0!==_0x172289['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x172289['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x172289['id'],this['_startingVersion']=_0x172289['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',_0x1779e0=>!_0x1779e0),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x358a01=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2d5e9c;for(const _0x5b0256 in _0x358a01){const _0x4000bb=_0x5b0256,_0x1dbc9b=_0x358a01[_0x4000bb];if('revisionHistoryLicenseKeyValid'==_0x1dbc9b||'revisionHistoryLicenseKeyInvalid'==_0x1dbc9b||'revisionHistoryLicenseKeyExpired'==_0x1dbc9b||'revisionHistoryLicenseKeyDomainLimit'==_0x1dbc9b||'revisionHistoryLicenseKeyNotAllowed'==_0x1dbc9b||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1dbc9b||'revisionHistoryLicenseKeyUsageLimit'==_0x1dbc9b){delete _0x358a01[_0x4000bb],_0x2d5e9c=_0x1dbc9b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2d5e9c&&_0x358a01['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2d5e9c&&_0x358a01['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2d5e9c&&_0x358a01['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2d5e9c&&_0x358a01['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2d5e9c&&_0x358a01['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2d5e9c&&_0x358a01['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x49758f=this['repository']['getRevision'](0x0),_0x9b8e79=await this['getRevisionDocumentData'](_0x49758f),_0x1412e4=await this['getRevisionRootsAttributes'](_0x49758f);this['_replaceEditorDataWithRevisionData'](_0x9b8e79,_0x1412e4);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x37fd7a){this['_source']=_0x37fd7a;}async['update'](){const _0x3e9a6b=await this['_source']['getLatestVersion']();if(_0x3e9a6b>this['currentRevision']['toVersion']){await this['_loadState']();const _0x581fbb=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3e9a6b});_0x581fbb['authors']=_0x581fbb['authorsIds']['map'](_0x58dd9c=>this['editor']['plugins']['get']('Users')['getUser'](_0x58dd9c)),this['currentRevision']['_update'](_0x581fbb);}}async['saveRevision'](_0x6dff88={},_0xe93e1=null){const _0x244a57=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xe93e1>this['currentRevision']['toVersion']&&(_0xe93e1=null),null===_0xe93e1&&(_0xe93e1=await this['_source']['getLatestVersion']());const _0x21571f=this['_getFromVersion'](_0xe93e1),_0x41289c=this['buildRevisionData']({'from':_0x21571f,'to':_0xe93e1});if(this['currentRevision']['toVersion']<_0xe93e1){const _0x39a4d4=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xe93e1,'to':_0xe93e1});_0x39a4d4['authors']=[],_0x39a4d4['authorsIds']=[],_0x39a4d4['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x39a4d4,!0x0),delete _0x39a4d4['authors'],_0x244a57['push'](_0x39a4d4);}_0x6dff88['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x6dff88['name']=_0x6dff88['name']||null,_0x6dff88['id']=_0x6dff88['id']||_0x423324(),_0x6dff88={..._0x6dff88,..._0x41289c};const _0x28698a=this['addRevisionData'](_0x6dff88);_0x244a57['push'](_0x6dff88);const _0x24de54=this['repository']['getIndex'](_0x28698a);if(0x0!==_0x24de54){const _0x33fbf3=this['repository']['getRevision'](_0x24de54-0x1);if(_0x33fbf3['fromVersion']!==_0xe93e1){const _0x2ea862=this['_revisionDataBuilder']['getData'](_0xe93e1,_0x33fbf3['toVersion']),_0x588c1e={'id':_0x33fbf3['id'],'diffData':_0x2ea862['diffData'],'authorsIds':_0x2ea862['authorsIds'],'authors':_0x2ea862['authorsIds']['map'](_0x1e9250=>this['editor']['plugins']['get']('Users')['getUser'](_0x1e9250)),'fromVersion':_0xe93e1};_0x33fbf3===this['currentRevision']&&(_0x588c1e['createdAt']=new Date(_0x6dff88['createdAt']['getTime']()+0xa)),_0x33fbf3['_update'](_0x588c1e,!0x0),delete _0x588c1e['authors'],_0x244a57['push'](_0x588c1e);}}if(this['adapter']){for(const _0x167345 of _0x244a57)this['_bufferUpdate'](_0x167345['id'],_0x167345,!0x0);this['sendBufferedUpdates']();}return _0x28698a;}['addRevisionData'](_0x3b73d4){const _0x4cbe28=this['repository']['createRevision'](_0x3b73d4);return this['adapter']&&_0x4cbe28['on']('_update',(_0x245104,_0x17f1d1,_0x1b8d8d)=>{_0x1b8d8d||(this['_bufferUpdate'](_0x17f1d1['id'],_0x17f1d1,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4cbe28,this['_findInsertionIndex'](_0x4cbe28)),_0x4cbe28;}async['getRevisionDocumentData'](_0x4ee511){return await this['_utils']['loadRevisionData'](_0x4ee511,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4ee511);}async['getRevisionRootsAttributes'](_0x5287da){return await this['_utils']['loadRevisionData'](_0x5287da,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5287da);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0xf2e336=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0xb4595f=0x0;_0xb4595f<_0xf2e336['length'];_0xb4595f++){const _0xbec937=_0xf2e336[_0xb4595f];let _0x5626b7=!0x1;for(const _0x1ab34 of Object['keys'](_0xbec937))void 0x0===_0xbec937[_0x1ab34]?delete _0xbec937[_0x1ab34]:'id'!==_0x1ab34&&(_0x5626b7=!0x0);_0x5626b7||(_0xf2e336[_0xb4595f]=null);}if(_0xf2e336=_0xf2e336['filter'](_0x300008=>null!==_0x300008),!_0xf2e336['length'])return;for(let _0x30361b=0x0;_0x30361b<_0xf2e336['length'];_0x30361b++){const _0x44c7d2=_0xf2e336[_0x30361b];void 0x0!==_0x44c7d2['fromVersion']&&void 0x0===_0x44c7d2['toVersion']&&(_0x44c7d2['toVersion']=this['repository']['getRevision'](_0x44c7d2['id'])['toVersion']),void 0x0!==_0x44c7d2['toVersion']&&void 0x0===_0x44c7d2['fromVersion']&&(_0x44c7d2['fromVersion']=this['repository']['getRevision'](_0x44c7d2['id'])['fromVersion']);}const _0xa100c5=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0xf2e336,_0xa100c5)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x245a1c=>{if(_0x245a1c){for(const _0x504a36 of _0x245a1c)this['setRevisionData']({'id':_0x504a36['id'],'createdAt':_0x504a36['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x4f1ad6=null,from:_0x5f347e=null,to:_0x5548d9=null}){_0x5f347e=null!==_0x5f347e?_0x5f347e:_0x4f1ad6['fromVersion'],_0x5548d9=null!==_0x5548d9?_0x5548d9:_0x4f1ad6['toVersion'];const _0x165bc1=this['_revisionDataBuilder']['getData'](_0x5f347e,_0x5548d9),_0x2ea6f9={'diffData':_0x165bc1['diffData'],'authorsIds':_0x165bc1['authorsIds'],'fromVersion':_0x5f347e,'toVersion':_0x5548d9};if(!_0x4f1ad6||_0x5548d9!==_0x4f1ad6['toVersion']){const _0x354242=_0x5548d9-0x1,_0x1c0768=this['_source']['history']['getOperation'](_0x354242);_0x2ea6f9['createdAt']=_0x1c0768&&_0x1c0768['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5f347e===this['_loadedStateData']['fromVersion']){for(const _0xca5a42 of this['_loadedStateData']['authors'])_0x2ea6f9['authorsIds']['includes'](_0xca5a42['id'])||_0x2ea6f9['authorsIds']['push'](_0xca5a42['id']);}return _0x2ea6f9;}['_bufferUpdate'](_0x564115,_0x47a142,_0x330681){if(this['_bufferedUpdates']['has'](_0x564115)){const _0x17e2a6=this['_bufferedUpdates']['get'](_0x564115);_0x47a142=_0x330681?{..._0x17e2a6,..._0x47a142}:{..._0x47a142,..._0x17e2a6};}this['_bufferedUpdates']['set'](_0x564115,_0x47a142);}['setRevisionData'](_0x33a92f){const _0x9700dd=this['repository']['getRevision'](_0x33a92f['id']);if(_0x33a92f['createdAt']&&(_0x33a92f['createdAt']=new Date(_0x33a92f['createdAt'])),_0x33a92f['authorsIds']){const _0x565154=this['editor']['plugins']['get']('Users');_0x33a92f['authors']=_0x33a92f['authorsIds']['map'](_0x12848a=>_0x565154['getUser'](_0x12848a));}_0x9700dd['_update'](_0x33a92f,!0x0);}['_createInitialRevision'](_0x4d62cf){const _0x4de455=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4de455)this['_initialRevisionId']=_0x4de455['id'];else{const _0x107658=!this['editor']['model']['document']['roots']['find'](_0x5db12d=>this['editor']['model']['hasContent'](_0x5db12d)),_0x26d5aa=this['editor']['plugins']['get']('Users')['me']['id'],_0x41d5ba=wt(this['editor']['locale'],_0x107658?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4d62cf,'to':_0x4d62cf,'id':this['_initialRevisionId'],'name':_0x41d5ba,'creatorId':_0x26d5aa});}}['_createCurrentRevision'](_0x5d959f){const _0x5989d5=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x5989d5),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5d959f,'to':_0x5d959f,'id':_0x5989d5,'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'](_0x4cad1e,_0x546f4c){const _0x28f845={},_0x3e0536={},_0x5e9a48=this['editor']['config']['get']('roots')||{};for(const [_0x22295f,_0x2451c6]of Object['entries'](_0x5e9a48))_0x2451c6['lazyLoad']||(_0x28f845[_0x22295f]=_0x2451c6['initialData']??'',_0x3e0536[_0x22295f]=_0x2451c6['modelAttributes']||{});for(const _0x45b1e5 of this['editor']['model']['document']['getRootNames']())_0x28f845[_0x45b1e5]??='',_0x3e0536[_0x45b1e5]??={};let _0x127d15=!0x1;const _0x566ef0=Object['keys'](_0x28f845),_0x3138ab=Object['keys'](_0x4cad1e);for(const _0x3a76d3 of _0x566ef0){if(_0x28f845[_0x3a76d3]!==_0x4cad1e[_0x3a76d3]&&''!==_0x28f845[_0x3a76d3]['trim']()){_0x127d15=!0x0;break;}if(!_0x15cb83(_0x3e0536[_0x3a76d3],_0x546f4c[_0x3a76d3])&&Object['keys'](_0x3e0536[_0x3a76d3])['length']>0x0){_0x127d15=!0x0;break;}}_0x127d15||(_0x127d15=_0x3138ab['some'](_0x2e2a16=>!this['editor']['model']['document']['getRoot'](_0x2e2a16))),_0x127d15&&_0x21c65e('editor-initial-data-replaced-with-revision-data',{'editorData':_0x28f845,'editorRootsAttributes':_0x3e0536,'revisionData':_0x4cad1e,'revisionRootsAttributes':_0x546f4c});for(const [_0x39c301,_0x469564]of Object['entries'](_0x4cad1e))this['editor']['config']['set']('roots.'+_0x39c301+'.initialData',_0x469564);for(const [_0x70f256,_0x230259]of Object['entries'](_0x546f4c))this['editor']['config']['set']('roots.'+_0x70f256+'.modelAttributes',_0x230259);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x1b76fc=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1b76fc['add'](wt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x5b3c67){const _0x5f06ad=this['repository']['getRevisions']();_0x5f06ad['reverse']();let _0x489cc3=0x0;for(;_0x489cc3<_0x5f06ad['length'];){const _0xd32913=_0x5f06ad[_0x489cc3];if(_0xd32913===this['currentRevision']){_0x489cc3++;continue;}if(_0xd32913['id']===this['_initialRevisionId'])break;const _0x36286c=_0x5b3c67['toVersion']-_0xd32913['toVersion']||_0x5b3c67['fromVersion']-_0xd32913['fromVersion'];if(_0x36286c>0x0)break;if(_0x36286c<0x0)_0x489cc3++;else{if(!_0x5b3c67['creator']&&_0xd32913['creator'])break;if(_0xd32913['creator']||!_0x5b3c67['creator']){if(_0x5b3c67['createdAt']>_0xd32913['createdAt'])break;_0x489cc3++;}else _0x489cc3++;}}return _0x489cc3;}['_getFromVersion'](_0x3a29b6){const _0x299f6c=this['repository']['getRevisions']();_0x299f6c['reverse'](),_0x299f6c['shift']();const _0x28e6f3=_0x299f6c['find'](_0x55a5ee=>_0x55a5ee['toVersion']<=_0x3a29b6)['toVersion'];return _0x28e6f3<this['_startingVersion']?this['_startingVersion']:_0x28e6f3;}['_makeRevision']({name:_0xd48bd8,from:_0x58df05,to:_0x33eddf,creatorId:_0x31ac1e,id:_0x2007e6}){const _0x1b4d14=this['buildRevisionData']({'from':_0x58df05,'to':_0x33eddf});_0x1b4d14['name']=_0xd48bd8,_0x1b4d14['creatorId']=_0x31ac1e,_0x1b4d14['id']=_0x2007e6;const _0x48e5da=this['addRevisionData'](_0x1b4d14);return this['adapter']&&this['_bufferUpdate'](_0x1b4d14['id'],_0x1b4d14,!0x0),_0x48e5da;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class _t{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x321e31){this['editor']=_0x321e31,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'](_0xd60f16){this['source']=_0xd60f16;const _0x5bb8ae=new Map(),_0x1c0968=new Map(),_0x426343=this['editor']['model']['document']['roots']['map'](_0x179442=>_0x179442['rootName']);for(const _0x4a5491 of _0x426343){const _0x5aeea7=this['editor']['model']['document']['getRoot'](_0x4a5491),_0x4bb90c=yt(_0x5aeea7);_0x5bb8ae['set'](_0x4a5491,_0x4bb90c),_0x1c0968['set'](_0x4a5491,Object['fromEntries'](_0x5aeea7['getAttributes']()));}const _0x3fc8f7=Array['from'](this['editor']['model']['markers'])['map'](_0x196487=>[_0x196487['name'],_0x196487['getRange']()]),_0x688009=this['source']['version'];this['_saveMetaData'](_0x688009,_0x5bb8ae,_0x3fc8f7,_0x1c0968),this['_startingRevisionId']=this['_revisionId'];const _0x5df98e=new Map(),_0xd16484=new Map();for(const _0x21f678 of _0x426343){const _0x19e157=bt(_0x21f678);_0x5df98e['set'](_0x21f678,_0x19e157),_0xd16484['set'](_0x21f678,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x5df98e,[],_0xd16484);}['getData'](_0x59b74b,_0x41e092){if(this['_lastFrom']===_0x59b74b&&this['_lastTo']<=_0x41e092)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x41e092,!0x0);else{if(!this['_savedMetaData']['has'](_0x59b74b)){const _0x24989a=this['_getPreviousFrom'](_0x59b74b);this['_calculateMetaData'](_0x24989a,_0x59b74b,!0x1);}this['_calculateMetaData'](_0x59b74b,_0x41e092,!0x0);}return this['_lastFrom']=_0x59b74b,this['_lastTo']=_0x41e092,this['_getState']();}['loadState'](_0x179f52){if(!this['_savedMetaData']['has'](_0x179f52['fromVersion'])){const _0x3945ae=this['_getPreviousFrom'](_0x179f52['fromVersion']);this['_calculateMetaData'](_0x3945ae,_0x179f52['fromVersion'],!0x1);}this['_calculateMetaData'](_0x179f52['fromVersion'],_0x179f52['toVersion'],!0x1);const _0x38d485=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x179f52['fromVersion'],this['_lastTo']=_0x179f52['toVersion'];for(const _0x376a1f in _0x179f52['diffData']){const _0x2d20e0=_0x179f52['diffData'][_0x376a1f]['attachChange'],_0xdcf6e2=_0x36af59(_0x179f52['diffData'][_0x376a1f]['attributesBefore'])||{},_0x49c6b5=_0x38d485['_makeModelFromViewString'](_0x179f52['diffData'][_0x376a1f]['deletions']);_0x49c6b5['rootName']=_0x376a1f,_0x49c6b5['_isAttached']=!_0x2d20e0||!_0x2d20e0['isAttached'],_0x49c6b5['isAttached']=()=>_0x49c6b5['_isAttached'],this['_baseRoots']['set'](_0x376a1f,_0x49c6b5),this['_baseRootsAttributes']['set'](_0x376a1f,_0xdcf6e2),_0x2d20e0&&this['_touchedRoots']['set'](_0x376a1f,_0x2d20e0);const _0x46485a=this['_makeIdsRoot'](_0x49c6b5);this['_baseIdsRoots']['set'](_0x376a1f,_0x46485a);for(const [_0x581963,_0xbe1461]of _0x49c6b5['markers']){if(!_0x581963['startsWith']('revision:'))continue;const _0x4fbcae=_0x581963['split'](':')[0x2];for(const _0x2eaaab of _0xbe1461['getWalker']({'singleCharacters':!0x0})){const _0x2226e7=this['_getVidAttributeName'](_0x2eaaab),_0x1b5a22='elementEnd'==_0x2eaaab['type']?_0x2eaaab['previousPosition']['path']['slice'](0x0,-0x1):_0x2eaaab['previousPosition']['path'],_0x723557=_0x46485a['getNodeByPath'](_0x1b5a22)['getAttribute'](_0x2226e7);this['_touched']['set'](_0x723557,{'userId':_0x4fbcae});}_0x49c6b5['markers']['delete'](_0x581963);}}this['_startingRevisionId']=this['_revisionId'];const _0x4b3524=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x14a1a5=>!this['_touched']['has'](_0x14a1a5));let _0x3c691c=0x0;const _0x42e01a=new Map();for(const _0x4f79a7 in _0x179f52['diffData']){const _0xffffc5=_0x179f52['diffData'][_0x4f79a7]['attachChange'],_0x11014e=_0x36af59(_0x179f52['diffData'][_0x4f79a7]['attributesAfter'])||{},_0x4f6624=_0x38d485['_makeModelFromViewString'](_0x179f52['diffData'][_0x4f79a7]['insertions']);_0x4f6624['rootName']=_0x4f79a7,_0x4f6624['_isAttached']=!_0xffffc5||_0xffffc5['isAttached'],_0x4f6624['isAttached']=()=>_0x4f6624['_isAttached'],this['_diffRoots']['set'](_0x4f79a7,_0x4f6624),this['_diffRootsAttributes']['set'](_0x4f79a7,_0x11014e);const _0x5781b0=this['_makeIdsRoot'](_0x4f6624,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4f79a7,_0x5781b0),_0x42e01a['set'](_0x4f79a7,_0x4f6624['isAttached']()?_0x11014e:{});for(const [_0x591803,_0x227283]of _0x4f6624['markers']){if(!_0x591803['startsWith']('revision:'))continue;const _0x2d46e0=_0x591803['split'](':')[0x2];for(const _0x1f2f16 of _0x227283['getWalker']({'singleCharacters':!0x0})){const _0x25856f=this['_getVidAttributeName'](_0x1f2f16),_0x12ff9f=this['_revisionId']++,_0x16c18e='elementEnd'==_0x1f2f16['type']?_0x1f2f16['previousPosition']['path']['slice'](0x0,-0x1):_0x1f2f16['previousPosition']['path'];_0x5781b0['getNodeByPath'](_0x16c18e)['_setAttribute'](_0x25856f,_0x12ff9f),this['_touched']['set'](_0x12ff9f,{'userId':_0x2d46e0});}_0x4f6624['markers']['delete'](_0x591803);}for(const _0x8d7539 of this['editor']['model']['createRangeIn'](_0x4f6624)['getWalker']({'singleCharacters':!0x0})){const _0x461f06=this['_getVidAttributeName'](_0x8d7539),_0x406877='elementEnd'==_0x8d7539['type']?_0x8d7539['previousPosition']['path']['slice'](0x0,-0x1):_0x8d7539['previousPosition']['path'],_0x5357fb=_0x5781b0['getNodeByPath'](_0x406877);_0x5357fb['getAttribute'](_0x461f06)>0x0||_0x5357fb['_setAttribute'](_0x461f06,_0x4b3524[_0x3c691c++]);}for(const [_0x5b0d3f,_0x590483]of _0x4f6624['markers'])_0x5b0d3f['startsWith']('revision:')||this['_markers']['set'](_0x5b0d3f,_0x590483);}const {roots:_0x54bedf}=this['_savedMetaData']['get'](_0x179f52['fromVersion']),{roots:_0x4f1139}=this['_savedMetaData']['get'](_0x179f52['toVersion']),_0x3cd2c4=yt(_0x54bedf['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x3cd2c4),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3cd2c4,Number['NEGATIVE_INFINITY']));const _0x3d9507=yt(_0x4f1139['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x3d9507),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3d9507));const _0x5705e3=Array['from'](this['_diffRoots'])['map'](([_0x129eb6,_0x5daf3f])=>[_0x129eb6,yt(_0x5daf3f)]);this['_saveMetaData'](this['_lastTo'],_0x5705e3,this['_markers'],_0x42e01a);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x709d96,_0x5cf4c8,_0x4c5964,_0xe28b92){const _0x579299=new Map(_0x5cf4c8),_0x1ce5ea=new Map(_0x36af59(_0xe28b92)),_0x49935a=new Map();for(const [_0x11d800,_0x496652]of _0x4c5964)_0x49935a['set'](_0x11d800,{'start':_0x496652['start']['clone'](),'end':_0x496652['end']['clone'](),'rootName':_0x496652['root']['rootName']});this['_savedMetaData']['set'](_0x709d96,{'roots':_0x579299,'markers':_0x49935a,'rootsAttributes':_0x1ce5ea});}['_removeMetaData'](_0x48e0de){this['_savedMetaData']['delete'](_0x48e0de);}['_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'](_0x58ef2c,_0x43acb4=null){let _0x43ad1f=null;_0x58ef2c['is']('documentFragment')||(_0x43ad1f=new _0x5e54e6(_0x58ef2c['name'],{'vid_start':null===_0x43acb4?this['_revisionId']++:_0x43acb4++}));const _0x356dbe=[];for(const _0x201120 of _0x58ef2c['getChildren']())if(_0x201120['is']('element')){_0x356dbe['push'](this['_makeIdsRoot'](_0x201120,_0x43acb4));const _0x55db2b=_0x356dbe[_0x356dbe['length']-0x1];null!==_0x43acb4&&(_0x43acb4=_0x55db2b['is']('element','$text')?_0x55db2b['getAttribute']('vid')+0x1:_0x55db2b['getAttribute']('vid_end')+0x1);}else{for(let _0x280442=0x0;_0x280442<_0x201120['offsetSize'];_0x280442++)_0x356dbe['push'](new _0x5e54e6('$text',{'vid':null===_0x43acb4?this['_revisionId']++:_0x43acb4++}));}if(_0x58ef2c['is']('documentFragment')){const _0x246ad3=bt(_0x58ef2c['rootName']);return _0x246ad3['_insertChild'](0x0,_0x356dbe),_0x246ad3;}return _0x43ad1f['_setAttribute']('vid_end',null===_0x43acb4?this['_revisionId']++:_0x43acb4++),_0x43ad1f['_insertChild'](0x0,_0x356dbe),_0x43ad1f;}['_calculateMetaData'](_0x1b52d3,_0x459234,_0x41b544){this['_reset']();const {roots:_0x19335c,markers:_0x1c9ffe,rootsAttributes:_0x24d56a}=this['_savedMetaData']['get'](_0x1b52d3);this['_baseRoots']=new Map(_0x19335c),this['_baseRootsAttributes']=new Map(_0x36af59(_0x24d56a));for(const [_0x132cd6,_0x39e8cd]of this['_baseRoots'])if('$graveyard'!==_0x132cd6&&(this['_diffRoots']['set'](_0x132cd6,yt(_0x39e8cd)),this['_diffRootsAttributes']=new Map(_0x36af59(_0x24d56a)),_0x41b544)){const _0x402baf=this['_revisionId'];this['_idsRoots']['set'](_0x132cd6,this['_makeIdsRoot'](_0x39e8cd)),this['_baseIdsRoots']['set'](_0x132cd6,this['_makeIdsRoot'](_0x39e8cd,_0x402baf));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',yt(this['_baseRoots']['get']('$graveyard'))),_0x41b544&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1d36ca,_0x1c4559]of _0x1c9ffe){const _0x54e2e0=this['_baseRoots']['get'](_0x1c4559['rootName']),_0x1bdc99=this['_diffRoots']['get'](_0x1c4559['rootName']),_0x37d2e1=new _0x3625bd(this['_fixPosition'](_0x1c4559['start'],_0x54e2e0),this['_fixPosition'](_0x1c4559['end'],_0x54e2e0)),_0x1d8de2=this['_fixRange'](_0x37d2e1,_0x1bdc99);_0x54e2e0['markers']['set'](_0x1d36ca,_0x37d2e1),this['_markers']['set'](_0x1d36ca,_0x1d8de2);}this['_applyOperations'](_0x1b52d3,_0x459234,_0x41b544);}['_applyOperations'](_0x5101b6,_0xf4f3b2,_0x3d4871){for(const _0x2ed0a7 of this['source']['getOperations'](_0x5101b6,_0xf4f3b2))this['_handleOperation'](_0x2ed0a7,_0x3d4871);for(const _0x245860 of this['_diffRoots']['values']())_0x245860['markers']['clear']();for(const [_0xa570d7,_0x7fd26f]of this['_markers']){this['_diffRoots']['get'](_0x7fd26f['root']['rootName'])['markers']['set'](_0xa570d7,_0x7fd26f['clone']());}const _0x4f04e4=new Map(),_0x2c1fd0=new Map();for(const [_0x52e6b1,_0x45460a]of this['_diffRoots'])_0x4f04e4['set'](_0x52e6b1,yt(_0x45460a)),_0x2c1fd0['set'](_0x52e6b1,this['_diffRootsAttributes']['get'](_0x52e6b1));this['_saveMetaData'](_0xf4f3b2,_0x4f04e4,this['_markers'],_0x2c1fd0);}['_getPreviousFrom'](_0x40bac6){const _0x195dcb=Array['from'](this['_savedMetaData']['keys']());_0x195dcb['sort']((_0x29884a,_0x212be0)=>_0x29884a-_0x212be0),_0x195dcb['reverse']();for(const _0xb2a1ea of _0x195dcb)if(_0xb2a1ea<_0x40bac6)return _0xb2a1ea;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x399adc,_0x4f8bd9){const _0x356756=Array['from'](_0x4f8bd9['markers'])['map'](([_0x464768,_0x517d6c])=>[_0x464768,this['_fixRange'](_0x517d6c,_0x399adc)]);_0x399adc['markers']=new Map(_0x356756);}['_transformMarkers'](_0x1f3951){for(const _0x149e47 of this['_markers']['values']()){const _0x3fce74=_0x149e47['getTransformedByOperation'](_0x1f3951),_0xf5ad44=_0x3625bd['_createFromRanges'](_0x3fce74);_0x149e47['start']=_0xf5ad44['start'],_0x149e47['end']=_0xf5ad44['end'];}}['_handleOperation'](_0x2647e9,_0x2e8000){if('addRoot'!=_0x2647e9['type']&&'detachRoot'!=_0x2647e9['type']){if('insert'==_0x2647e9['type']){const _0x665638=_0x2647e9['position']['root']['rootName'];this['_diffRoots']['has'](_0x665638)||(this['_diffRoots']['set'](_0x665638,bt(_0x665638,!0x0)),this['_diffRootsAttributes']['set'](_0x665638,{}),_0x2e8000&&this['_idsRoots']['set'](_0x665638,bt(_0x665638,!0x0)));}else{if('addRootAttribute'==_0x2647e9['type']||'removeRootAttribute'==_0x2647e9['type']||'changeRootAttribute'==_0x2647e9['type'])return void this['_handleRootAttributeOperation'](_0x2647e9);'marker'==_0x2647e9['type']&&this['_handleMarkerOperation'](_0x2647e9);}if('marker'!==_0x2647e9['type']){const _0x2e0265=this['_cloneOperation'](_0x2647e9,this['_diffRoots']);_0x2e0265['_execute'](),this['_transformMarkers'](_0x2e0265);}if(_0x2e8000)switch(_0x2647e9['type']){case'insert':this['_handleInsertOperation'](_0x2647e9);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2647e9);break;case'merge':this['_handleMergeOperation'](_0x2647e9);break;case'split':this['_handleSplitOperation'](_0x2647e9);}}else this['_handleRootOperation'](_0x2647e9,_0x2e8000);}['_cloneOperation'](_0x1a4663,_0x128ae4){const _0x27b884=_0x1a4663['clone']();return _0x27b884['_authorId']=_0x1a4663['_authorId'],this['_fixOperation'](_0x27b884,_0x128ae4),_0x27b884;}['_getBaseVids'](_0x22e06d){return _0x22e06d['map'](_0x5e40e4=>{const _0x59f7d5=this['_getVidAttributeName'](_0x5e40e4);return Number(_0x5e40e4['item']['getAttribute'](_0x59f7d5));});}['_generateTape'](_0x159b1b,_0x2a9851){if(_0x159b1b['is']('element','$text'))_0x2a9851['push']({'item':_0x159b1b,'type':'text'});else{_0x159b1b['is']('element')&&_0x2a9851['push']({'item':_0x159b1b,'type':'elementStart'});for(const _0x399aa8 of _0x159b1b['getChildren']())this['_generateTape'](_0x399aa8,_0x2a9851);_0x159b1b['is']('element')&&_0x2a9851['push']({'item':_0x159b1b,'type':'elementEnd'});}return _0x2a9851;}['_getState'](){const _0x34c52e=new Map(this['_touched']),_0x31b8ae=new Map(_0x34c52e),_0x2c34c1=new Map(),_0x538611={'insertions':{},'deletions':{}},_0x24760c={'insertions':{},'deletions':{}},_0x229a6a=new Map(),_0xbaf91c=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0xbaf91c['delete']('$graveyard');for(const _0x186e28 of _0xbaf91c){const _0x30476a=this['_diffRoots']['get'](_0x186e28)||bt(_0x186e28,!0x1),_0x34912e=this['_baseRoots']['get'](_0x186e28)||bt(_0x186e28,!0x1);_0x30476a['isAttached']()||_0x34912e['isAttached']()?(_0x538611['insertions'][_0x186e28]=yt(_0x30476a),_0x538611['deletions'][_0x186e28]=yt(_0x34912e),this['_copyMarkers'](_0x538611['deletions'][_0x186e28],_0x34912e),this['_copyMarkers'](_0x538611['insertions'][_0x186e28],_0x30476a),_0x24760c['insertions'][_0x186e28]=this['_generateTape'](this['_idsRoots']['get'](_0x186e28),[]),_0x24760c['deletions'][_0x186e28]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x186e28)||bt(_0x186e28,!0x1),[])):_0xbaf91c['delete'](_0x186e28);}for(const _0x4957be of _0xbaf91c){const _0x5ad583=_0x24760c['insertions'][_0x4957be];for(const _0x39926a of _0x5ad583){const _0x4eddc1=this['_getVidAttributeName'](_0x39926a),_0x2a0900=_0x39926a['item']['getAttribute'](_0x4eddc1);_0x31b8ae['delete'](_0x2a0900),_0x2a0900>=this['_startingRevisionId']&&_0x2c34c1['set'](_0x2a0900,_0x34c52e['get'](_0x2a0900));}}for(const _0x55dd47 of _0xbaf91c){const _0xe52369=_0x24760c['insertions'][_0x55dd47],_0x5f5117=this['_getBaseVids'](_0x24760c['deletions'][_0x55dd47]);let _0x553eee=0x0;for(const _0x2d6037 of _0xe52369){const _0x32ad83=this['_getVidAttributeName'](_0x2d6037),_0x3227bb=_0x2d6037['item']['getAttribute'](_0x32ad83);if(!_0x2c34c1['has'](_0x3227bb)&&!_0x229a6a['has'](_0x3227bb)){if(_0x31b8ae['has'](_0x3227bb))_0x553eee++;else{if(_0x3227bb!=_0x5f5117[_0x553eee]){const _0x5f4cf3=_0x34c52e['get'](_0x3227bb)||_0x34c52e['get'](_0x5f5117[_0x553eee]);for(;_0x3227bb!=_0x5f5117[_0x553eee];)_0x31b8ae['has'](_0x5f5117[_0x553eee])||(_0x229a6a['set'](_0x5f5117[_0x553eee],_0x5f4cf3),_0x34c52e['set'](_0x5f5117[_0x553eee],_0x5f4cf3)),_0x553eee++;}_0x553eee++;}}}}for(const _0x26f2d5 of _0xbaf91c){const _0x316173=_0x24760c['insertions'][_0x26f2d5];for(const _0x572e14 of _0x316173){const _0x2bdb79=this['_getVidAttributeName'](_0x572e14),_0x4bc38f=_0x572e14['item']['getAttribute'](_0x2bdb79);if(_0x229a6a['has'](_0x4bc38f)){const _0x5d75ca=_0x229a6a['get'](_0x4bc38f);_0x31b8ae['has'](_0x4bc38f)||_0x31b8ae['set'](_0x4bc38f,{..._0x5d75ca}),_0x2c34c1['set'](_0x4bc38f,{..._0x5d75ca});}}}for(const _0x1dd127 of _0x31b8ae['keys']())_0x1dd127>=this['_startingRevisionId']&&_0x31b8ae['delete'](_0x1dd127);const _0x19831d=new Map();for(const _0x5afe41 of _0xbaf91c){let _0x2f68b2=_0x24760c['insertions'][_0x5afe41];for(const _0x35cc03 of _0x2f68b2)if(_0x35cc03['item']['is']('element','tableCell')){const _0x33016c=this['_getVidAttributeName'](_0x35cc03),_0x59e98a=_0x35cc03['item']['getAttribute'](_0x33016c);if(_0x2c34c1['has'](_0x59e98a)){const _0x2d5655=_0x35cc03['item']['parent']['parent']['getAttribute']('vid_start'),_0x2afd6d=_0x19831d['get'](_0x2d5655)||new Set();_0x2afd6d['add'](_0x2c34c1['get'](_0x59e98a)['userId']),_0x19831d['set'](_0x2d5655,_0x2afd6d);}}_0x2f68b2=_0x24760c['deletions'][_0x5afe41];for(const _0x452ca5 of _0x2f68b2)if(_0x452ca5['item']['is']('element','tableCell')){const _0x55425a=this['_getVidAttributeName'](_0x452ca5),_0x5a1c71=_0x452ca5['item']['getAttribute'](_0x55425a);if(_0x31b8ae['has'](_0x5a1c71)){const _0x4b3b14=_0x452ca5['item']['parent']['parent']['getAttribute']('vid_start'),_0x54c43f=_0x19831d['get'](_0x4b3b14)||new Set();_0x54c43f['add'](_0x31b8ae['get'](_0x5a1c71)['userId']),_0x19831d['set'](_0x4b3b14,_0x54c43f);}}for(const _0x43dc80 of _0x19831d['keys']())(_0x2c34c1['has'](_0x43dc80)||_0x31b8ae['has'](_0x43dc80))&&_0x19831d['delete'](_0x43dc80);}for(const _0x3c5277 of _0xbaf91c){const _0x4c1cfd=_0x24760c['insertions'][_0x3c5277];let _0x2aa750=null,_0x4cc86a=null;for(const _0x1e7418 of _0x4c1cfd){const _0x3892e0=this['_getVidAttributeName'](_0x1e7418),_0x175ba9=_0x1e7418['item']['getAttribute'](_0x3892e0),_0x46418f=_0x19831d['get'](_0x175ba9);_0x46418f&&'elementStart'==_0x1e7418['type']&&(_0x2aa750=Array['from'](_0x46418f)[0x0],_0x4cc86a=_0x1e7418['item']['getAttribute']('vid_end')),_0x2aa750&&(_0x31b8ae['set'](_0x175ba9,{'userId':_0x2aa750}),_0x2c34c1['set'](_0x175ba9,{'userId':_0x2aa750})),_0x175ba9==_0x4cc86a&&(_0x2aa750=null,_0x4cc86a=null);}}const _0x535c6f={},_0x2fdfe8=new Set();for(const _0x24f447 of _0xbaf91c){const _0x213e1e=_0x538611['deletions'][_0x24f447],_0x50aad6=_0x538611['insertions'][_0x24f447];for(const {userId:_0x538f5f}of this['_touchedMarkers']['values']())null!==_0x538f5f&&_0x2fdfe8['add'](_0x538f5f);for(const {userId:_0x45baa6}of this['_touchedRoots']['values']())null!==_0x45baa6&&_0x2fdfe8['add'](_0x45baa6);this['_markChanges'](_0x50aad6,_0x24760c['insertions'][_0x24f447],_0x2c34c1,'insertion',_0x2fdfe8),this['_markChanges'](_0x213e1e,_0x24760c['deletions'][_0x24f447],_0x31b8ae,'deletion',_0x2fdfe8),_0x535c6f[_0x24f447]={'insertions':this['_prepareViewToSave'](_0x50aad6),'deletions':this['_prepareViewToSave'](_0x213e1e),'attachChange':this['_touchedRoots']['get'](_0x24f447)||null,'attributesBefore':_0x36af59(this['_baseRootsAttributes']['get'](_0x24f447))||{},'attributesAfter':_0x36af59(this['_diffRootsAttributes']['get'](_0x24f447))};}return{'diffData':_0x535c6f,'authorsIds':Array['from'](_0x2fdfe8)};}['_processRootBeforeSave'](_0x5e35f8){for(const [,_0x1e2d71]of _0x5e35f8['markers']){const _0x438cc5=_0x1e2d71['start']['getAncestors']()['filter'](_0xcca47b=>'tableCell'==_0xcca47b['name']);for(const _0x6a2194 of _0x438cc5)0x1==_0x6a2194['childCount']&&_0x6a2194['getChild'](0x0)['is']('element','paragraph')&&_0x6a2194['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x2569e0){this['_processRootBeforeSave'](_0x2569e0);const _0x18e3b2=this['editor']['data']['toView'](_0x2569e0,{}),_0x1aca37=Array['from'](_0x18e3b2['getChildren']())['map'](_0x6e94d1=>this['_getViewJson'](_0x6e94d1));return JSON['stringify'](_0x1aca37);}['_getViewJson'](_0x28a09f){if(_0x28a09f['is']('$text'))return _0x28a09f['data'];{const _0x109a30=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x36c719=_0x28a09f,_0x12725e=this['editor']['data']['htmlProcessor']['domConverter'],_0x2dd25a={'type':_0x109a30['_getTypeCharForViewElement'](_0x36c719),'name':_0x36c719['name'],'attributes':Array['from'](_0x36c719['getAttributes']()),'children':Array['from'](_0x36c719['getChildren']())['map'](_0x959259=>this['_getViewJson'](_0x959259))};if(_0x28a09f['is']('uiElement')&&'$comment'!=_0x28a09f['name']){const _0x93828b=_0x28a09f['render'](_0x12725e['domDocument'],_0x12725e);_0x2dd25a['children']['push'](_0x93828b['outerHTML']);}else{if(_0x28a09f['is']('rawElement')){const _0x187302=_0x12725e['domDocument']['createElement'](_0x36c719['name']);_0x28a09f['render'](_0x187302,_0x12725e),_0x2dd25a['children']['push'](_0x187302['innerHTML']);}}const _0x116475=Array['from'](_0x36c719['getCustomProperties']());_0x116475['length']>0x0&&(_0x2dd25a['customProperties']=_0x116475);const _0x3334f2=_0x36c719['getFillerOffset']();return null!==_0x3334f2&&(_0x2dd25a['fillerOffset']=_0x3334f2),_0x2dd25a;}}['_markChanges'](_0x585b1c,_0x1f2de1,_0x41464c,_0x1be3c5,_0x298240){let _0x2f2034=null,_0x15cae8=null,_0x485f52=0x0;const _0x4d9d4d=this['editor']['model'];for(let _0x1560aa=0x0;_0x1560aa<_0x1f2de1['length'];_0x1560aa++){const _0x300b42=this['_getVidAttributeName'](_0x1f2de1[_0x1560aa]),_0x2d668e=_0x1f2de1[_0x1560aa]['item']['getAttribute'](_0x300b42),_0x2d7c5c=_0x41464c['get'](_0x2d668e),_0x472119=_0x1560aa==_0x1f2de1['length']-0x1;(!_0x2f2034&&_0x2d7c5c&&(_0x2f2034=_0x2d7c5c,_0x15cae8=_0x1f2de1[_0x1560aa]),_0x2f2034&&(!_0x2d7c5c||_0x2d7c5c['userId']!=_0x2f2034['userId']))&&(_0x21d51b(_0x2d7c5c,Rt(_0x15cae8,_0x585b1c,_0x4d9d4d),Rt(_0x1f2de1[_0x1560aa],_0x585b1c,_0x4d9d4d)),_0x2f2034=_0x2d7c5c||null,_0x15cae8=_0x2d7c5c?_0x1f2de1[_0x1560aa]:null),_0x2f2034&&_0x472119&&_0x21d51b(_0x2d7c5c,Rt(_0x15cae8,_0x585b1c,_0x4d9d4d),kt(_0x1f2de1[_0x1560aa],_0x585b1c,_0x4d9d4d));}function _0x21d51b(_0x439a42,_0x3557de,_0x54b259){const _0x30363a=_0x2f2034['userId'],_0x5b2c72='revision:'+_0x1be3c5+':'+_0x30363a+':'+_0x485f52++,_0x46d4c8=_0x4d9d4d['createRange'](_0x3557de,_0x54b259);_0x585b1c['markers']['set'](_0x5b2c72,_0x46d4c8),null!==_0x30363a&&_0x298240['add'](_0x30363a);}}['_getVidAttributeName'](_0xed4522){switch(_0xed4522['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x44bc75,_0x1f2a0c){_0x44bc75['baseVersion']=null;for(const _0x3cd6dd in _0x44bc75){const _0x458868=_0x44bc75[_0x3cd6dd];if(_0x458868 instanceof _0x11ee84){const _0x536cae=_0x1f2a0c['get'](_0x458868['root']['rootName']);_0x44bc75[_0x3cd6dd]=this['_fixPosition'](_0x458868,_0x536cae);}if(_0x458868 instanceof _0x3625bd){const _0x33f249=_0x1f2a0c['get'](_0x458868['root']['rootName']);_0x44bc75[_0x3cd6dd]=this['_fixRange'](_0x458868,_0x33f249);}'root'===_0x3cd6dd&&(_0x44bc75['root']=_0x1f2a0c['get'](_0x44bc75['root']['rootName']));}}['_fixRange'](_0x526812,_0x2e96ad){return this['editor']['model']['createRange'](this['_fixPosition'](_0x526812['start'],_0x2e96ad),this['_fixPosition'](_0x526812['end'],_0x2e96ad));}['_fixPosition'](_0x469b74,_0x5c9617){return this['editor']['model']['createPositionFromPath'](_0x5c9617,_0x469b74['path'],_0x469b74['stickiness']);}['_handleInsertOperation'](_0xf2c19){const _0x538b38=this['_idsRoots']['get'](_0xf2c19['position']['root']['rootName']),_0x2facea=this['_fixPosition'](_0xf2c19['position'],_0x538b38),_0x26cdbd=null===_0xf2c19['_authorId']?null:_0xf2c19['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1db01d=_0x2facea['parent'],_0x1e0066=this['_revisionId'],_0x2bb8cd=[];for(const _0x3e956b of _0xf2c19['nodes'])if(_0x3e956b['is']('element'))_0x2bb8cd['push'](this['_makeIdsRoot'](_0x3e956b));else{for(let _0x2286cd=0x0;_0x2286cd<_0x3e956b['offsetSize'];_0x2286cd++)_0x2bb8cd['push'](new _0x5e54e6('$text',{'vid':this['_revisionId']++}));}const _0x3c1e0e=this['_revisionId'];for(let _0x1f1492=_0x1e0066;_0x1f1492<_0x3c1e0e;_0x1f1492++)this['_touched']['set'](_0x1f1492,{'userId':_0x26cdbd});_0x1db01d['_insertChild'](_0x2facea['offset'],_0x2bb8cd);}['_handleMoveOperation'](_0x13ff0f){(_0x13ff0f=this['_cloneOperation'](_0x13ff0f,this['_idsRoots']))['_execute']();const _0x2f981a=null===_0x13ff0f['_authorId']?null:_0x13ff0f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x14df65=_0x13ff0f['getMovedRangeStart'](),_0x57e7b8=_0x14df65['parent'],_0x56bd18=_0x14df65['offset'];!function _0x5de319(_0x139da3,_0x198c71,_0x7d94ed,_0x33f41b){for(let _0x1dc342=_0x7d94ed;_0x1dc342<_0x33f41b;_0x1dc342++){const _0x2a7089=_0x198c71['getChild'](_0x1dc342);_0x2a7089['is']('element','$text')?_0x139da3['set'](_0x2a7089['getAttribute']('vid'),{'userId':_0x2f981a}):(_0x139da3['set'](_0x2a7089['getAttribute']('vid_start'),{'userId':_0x2f981a}),_0x5de319(_0x139da3,_0x2a7089,0x0,_0x2a7089['childCount']),_0x139da3['set'](_0x2a7089['getAttribute']('vid_end'),{'userId':_0x2f981a}));}}(this['_touched'],_0x57e7b8,_0x56bd18,_0x56bd18+_0x13ff0f['howMany']);}['_handleMergeOperation'](_0x335273){const _0x184145=null===(_0x335273=this['_cloneOperation'](_0x335273,this['_idsRoots']))['_authorId']?null:_0x335273['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2e61f5=_0x335273['targetPosition']['parent'],_0x1253c8=_0x335273['sourcePosition']['parent'],_0x2c9f0e=_0x2e61f5['getAttribute']('vid_end'),_0x1fd86d=_0x1253c8['getAttribute']('vid_start');_0x2e61f5['_setAttribute']('vid_end',_0x1253c8['getAttribute']('vid_end')),_0x1253c8['_setAttribute']('vid_end',_0x2c9f0e),this['_touched']['set'](_0x1fd86d,{'userId':_0x184145}),this['_touched']['set'](_0x2c9f0e,{'userId':_0x184145}),_0x335273['_execute']();}['_handleSplitOperation'](_0x3288af){const _0x19370c=null===(_0x3288af=this['_cloneOperation'](_0x3288af,this['_idsRoots']))['_authorId']?null:_0x3288af['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x57d3ed=_0x3288af['graveyardPosition'],_0x360223=_0x3288af['splitPosition']['parent'];_0x3288af['_execute']();const _0x39b070=_0x360223['getAttribute']('vid_end'),_0x53fd40=_0x3288af['insertionPosition']['nodeAfter'];if(_0x57d3ed){const _0x335235=_0x53fd40['getAttribute']('vid_end'),_0x22ee15=_0x360223['getAttribute']('vid_end');_0x360223['_setAttribute']('vid_end',_0x335235),_0x53fd40['_setAttribute']('vid_end',_0x22ee15),this['_touched']['set'](_0x360223['getAttribute']('vid_end'),{'userId':_0x19370c}),this['_touched']['set'](_0x53fd40['getAttribute']('vid_start'),{'userId':_0x19370c});}else{const _0x45ad50=this['_revisionId']++,_0x53d386=this['_revisionId']++;_0x360223['_setAttribute']('vid_end',_0x45ad50),_0x53fd40['_setAttribute']('vid_start',_0x53d386),_0x53fd40['_setAttribute']('vid_end',_0x39b070),this['_touched']['set'](_0x45ad50,{'userId':_0x19370c}),this['_touched']['set'](_0x53d386,{'userId':_0x19370c});}}['_handleMarkerOperation'](_0x580365){if(!_0x580365['affectsData'])return;const _0x77c21b=(_0x580365=this['_cloneOperation'](_0x580365,this['_diffRoots']))['oldRange']?_0x580365['oldRange']['root']:null,_0x222fb4=_0x580365['newRange']?_0x580365['newRange']['root']:null;_0x77c21b&&this['_markers']['delete'](_0x580365['name']),_0x222fb4&&this['_markers']['set'](_0x580365['name'],_0x580365['newRange']['clone']());const _0x19ca22=null===_0x580365['_authorId']?null:_0x580365['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x578bac=_0x580365['name'];if(!this['_touchedMarkers']['has'](_0x578bac))return void this['_touchedMarkers']['set'](_0x578bac,{'range':_0x580365['oldRange'],'userId':_0x19ca22});const _0x5ab6d4=this['_touchedMarkers']['get'](_0x578bac),_0x296abd=_0x5ab6d4['range'],_0x781252=_0x580365['newRange'];null==_0x296abd&&null==_0x781252||_0x296abd&&_0x781252&&_0x296abd['isEqual'](_0x781252)?this['_touchedMarkers']['delete'](_0x580365['name']):_0x5ab6d4['userId']=_0x19ca22;}['_handleRootOperation'](_0x27d516,_0x136e42){this['_diffRoots']['has'](_0x27d516['rootName'])?this['_diffRoots']['get'](_0x27d516['rootName'])['_isAttached']=_0x27d516['isAdd']:(this['_diffRoots']['set'](_0x27d516['rootName'],bt(_0x27d516['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x27d516['rootName'],{}),_0x136e42&&this['_idsRoots']['set'](_0x27d516['rootName'],bt(_0x27d516['rootName'],!0x0)));const _0x228134=null===_0x27d516['_authorId']?null:_0x27d516['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x53d96a=this['_touchedRoots']['get'](_0x27d516['rootName']);_0x53d96a&&_0x53d96a['userId']===_0x228134?this['_touchedRoots']['delete'](_0x27d516['rootName']):this['_touchedRoots']['set'](_0x27d516['rootName'],{'userId':_0x228134,'isAttached':_0x27d516['isAdd']});}['_handleRootAttributeOperation'](_0x5769c7){const _0x4bc4a2=this['_diffRootsAttributes']['get'](_0x5769c7['root']['rootName']);null===_0x5769c7['newValue']?delete _0x4bc4a2[_0x5769c7['key']]:_0x4bc4a2[_0x5769c7['key']]=_0x5769c7['newValue'];}}function yt(_0x4a7157){const _0x46fdff=bt(_0x4a7157['rootName'],_0x4a7157['isAttached']());for(const _0x97d91e of _0x4a7157['getChildren']()){const _0x3c1547=_0x97d91e['_clone'](!0x0);_0x46fdff['_appendChild'](_0x3c1547);}return _0x46fdff;}function bt(_0x4e02de,_0x281cb6=!0x0){const _0x4273b4=new _0x2ed553();return _0x4273b4['rootName']=_0x4e02de,_0x4273b4['_isAttached']=_0x281cb6,_0x4273b4['isAttached']=()=>_0x4273b4['_isAttached'],_0x4273b4;}function Rt(_0x50a27f,_0x105409,_0x5ae261){const _0x11b739='elementEnd'==_0x50a27f['type']?_0x5ae261['createPositionAt'](_0x50a27f['item'],'end'):_0x5ae261['createPositionBefore'](_0x50a27f['item']);return _0x5ae261['createPositionFromPath'](_0x105409,_0x11b739['path'],_0x11b739['stickiness']);}function kt(_0x308191,_0x188a41,_0x21aaeb){const _0x231b7a='elementStart'==_0x308191['type']?_0x21aaeb['createPositionAt'](_0x308191['item'],0x0):_0x21aaeb['createPositionAfter'](_0x308191['item']);return _0x21aaeb['createPositionFromPath'](_0x188a41,_0x231b7a['path'],_0x231b7a['stickiness']);}class At extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x5ae268(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x21e8cf){super(),this['id']=_0x21e8cf['id']||_0x423324(),this['author']=_0x21e8cf['author'],this['type']=_0x21e8cf['type'],this['data']=_0x21e8cf['data']||{},this['rootName']=_0x21e8cf['rootName'],this['set']('createdAt',_0x21e8cf['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class Et{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x4b4687,_0x8467b2){this['newRevisionId']=_0x4b4687,this['oldRevisionId']=_0x8467b2,this['changes']=new _0x239ef9();}['_setChanges'](_0x1de3e9){for(const _0x5db976 of _0x1de3e9)this['changes']['add'](_0x5db976);}}class St extends _0x423cf5{['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[_0x5c17da,st,gt,mt];}constructor(_0x2d3f66){super(_0x2d3f66),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',(_0x45545c,_0x1d11b7,_0xf9c4b5)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0xb28209=>{for(const _0x59e00d of this['editor']['editing']['view']['document']['roots'])_0xf9c4b5?_0xb28209['removeClass']('ck-editor__editable__overlay',_0x59e00d):_0xb28209['addClass']('ck-editor__editable__overlay',_0x59e00d);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x258af5=>null!==_0x258af5),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x227652,_0x1979e9,_0x491011)=>_0x227652&&_0x491011?_0x1979e9['changes']['getIndex'](_0x491011):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x53a56a,_0x4216e8)=>_0x53a56a?_0x4216e8['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](st);}['init'](){const _0x4f8634=this['editor'],_0x4a8cfb=new Mt(_0x4f8634,{'direction':'backward'}),_0x1ba2de=new Mt(_0x4f8634,{'direction':'forward'});(_0x4f8634['commands']['add']('showPreviousChange',_0x4a8cfb),_0x4f8634['commands']['add']('showNextChange',_0x1ba2de),_0x4f8634['commands']['add']('restoreRevision',new Ct(_0x4f8634)),this['on']('change:numberOfChanges',()=>{_0x4a8cfb['refresh'](),_0x1ba2de['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4f8634['enableReadOnlyMode']('revision-viewer'),_0x4f8634['plugins']['has']('WidgetToolbarRepository'))&&_0x4f8634['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x4709e7){return await this['_utils']['loadRevisionData'](_0x4709e7,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4709e7);}async['getRevisionRootsAttributes'](_0x5140cb){return await this['_utils']['loadRevisionData'](_0x5140cb,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5140cb);}async['compare'](_0x4d9213,_0x1ad664,_0x457bf4=!0x1){if(!this['isEnabled'])return;const _0x3e4d9d=this['diff'],_0x260ffa=this['repository'],_0x319d67='string'==typeof _0x4d9213?_0x260ffa['getRevision'](_0x4d9213):_0x4d9213,_0x1e02e4='string'==typeof _0x1ad664?_0x260ffa['getRevision'](_0x1ad664):_0x1ad664,_0x1a40c5=_0x319d67['id'],_0x2f0ef1=_0x1e02e4?_0x1e02e4['id']:null;if(!_0x457bf4&&this['diff']&&this['diff']['newRevisionId']===_0x1a40c5&&this['diff']['oldRevisionId']===_0x2f0ef1)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Et(_0x1a40c5,_0x2f0ef1);const _0x56c66e=this['_getRevisionsRange'](_0x319d67,_0x1e02e4,!0x0)['map'](_0x3ca704=>this['_utils']['loadRevisionData'](_0x3ca704,this['adapter']));return _0x56c66e['push'](new Promise(_0x386463=>{setTimeout(_0x386463,0x14);})),Promise['all'](_0x56c66e)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x5e62d9=this['_getDiff'](_0x1a40c5,_0x2f0ef1);for(const _0x152bae of _0x5e62d9['changes'])this['_changeIdToChange']['set'](_0x152bae['id'],_0x152bae);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x349b99=>{for(const _0xdb2924 of this['editor']['model']['document']['getRootNames']())_0x349b99['detachRoot'](_0xdb2924);for(const _0x3c043e of Object['keys'](_0x5e62d9['model'])){const _0x496cb7=_0x349b99['addRoot'](_0x3c043e);for(const _0x3db24c of Object['keys'](_0x5e62d9['attributes'][_0x3c043e]))_0x349b99['setAttribute'](_0x3db24c,_0x5e62d9['attributes'][_0x3c043e][_0x3db24c],_0x496cb7);_0x349b99['insert'](_0x5e62d9['model'][_0x3c043e],_0x496cb7,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x5e62d9['changes'])),this['isReady']=!0x0;})['catch'](_0xfd69cc=>{console['error'](_0xfd69cc),this['_cleanUp'](),_0x3e4d9d&&(this['diff']=_0x3e4d9d),this['isReady']=!0x0;});}['addRevisionData'](_0x45e4c2,_0x5467aa){const _0x275b6f=this['repository']['createRevision'](_0x45e4c2);return _0x275b6f['on']('_update',(_0x23bcef,_0x36abf5,_0x315776)=>_0x5467aa(_0x36abf5,_0x315776,_0x275b6f)),this['repository']['addRevision'](_0x275b6f),_0x275b6f;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4d364f=>{for(const _0x389767 of this['editor']['model']['document']['getRootNames']())_0x4d364f['detachRoot'](_0x389767);});}['_sortAndFilterDiffChanges'](_0x3cac41){const _0x44bea3=[],_0x142477=new Map();for(const _0x332d84 of this['editor']['model']['document']['getRootNames']()){const _0x379a34=this['editor']['editing']['view']['getDomRoot'](_0x332d84);if(!_0x379a34)continue;const _0x3ba31b=_0x379a34['getClientRects']()['item'](0x0);_0x3ba31b&&(_0x44bea3['push'](_0x332d84),_0x142477['set'](_0x332d84,_0x3ba31b));}return _0x44bea3['sort']((_0x2ccfc4,_0x4f062a)=>{const _0x2e990c=_0x142477['get'](_0x2ccfc4),_0x880cd6=_0x142477['get'](_0x4f062a);return _0x2e990c['y']-_0x880cd6['y']||_0x2e990c['x']-_0x880cd6['x'];}),(_0x3cac41=_0x3cac41['filter'](_0x35a8f2=>_0x44bea3['includes'](_0x35a8f2['rootName'])))['sort']((_0x19984d,_0xe3a83b)=>_0x44bea3['indexOf'](_0x19984d['rootName'])-_0x44bea3['indexOf'](_0xe3a83b['rootName'])),_0x3cac41;}['_makeTape'](_0x27fa10){const _0x53dbac=Array['from'](_0x27fa10['markers'])['filter'](([_0x1c167d,_0x1fc62e])=>_0x1c167d['startsWith']('revision:')&&!_0x1fc62e['isCollapsed']),_0x27914e=Array['from'](this['editor']['model']['createRangeIn'](_0x27fa10)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x53dbac['length'])for(const _0x3ae1b9 of _0x27914e){const [_0x333aff,_0x36d7b8]=_0x53dbac[0x0],[,_0x27f18b,_0x3fb4cf]=_0x333aff['split'](':');if(_0x36d7b8['end']['isEqual'](_0x3ae1b9['nextPosition'])&&_0x53dbac['shift'](),(_0x3ae1b9['previousPosition']['isEqual'](_0x36d7b8['start'])||_0x3ae1b9['previousPosition']['isAfter'](_0x36d7b8['start']))&&('insertion'==_0x27f18b?_0x3ae1b9['isAdded']={'userId':_0x3fb4cf}:'deletion'==_0x27f18b&&(_0x3ae1b9['isRemoved']={'userId':_0x3fb4cf})),0x0==_0x53dbac['length'])break;}return _0x27914e;}['_refreshStartEndIndex'](_0x5454af){const _0x5a1523=new Map();for(let _0x5ca7ec=0x0;_0x5ca7ec<_0x5454af['length'];_0x5ca7ec++)'text'===_0x5454af[_0x5ca7ec]['type']?(_0x5454af[_0x5ca7ec]['item']['startIndex']=_0x5ca7ec,_0x5454af[_0x5ca7ec]['item']['endIndex']=_0x5ca7ec):('elementStart'===_0x5454af[_0x5ca7ec]['type']?_0x5454af[_0x5ca7ec]['item']['startIndex']=_0x5ca7ec:'elementEnd'===_0x5454af[_0x5ca7ec]['type']&&(_0x5454af[_0x5ca7ec]['item']['endIndex']=_0x5ca7ec),_0x5a1523['set'](_0x5454af[_0x5ca7ec]['id'],_0x5ca7ec));for(const _0x3ff0fb of _0x5a1523['values']())'elementStart'===_0x5454af[_0x3ff0fb]['type']?_0x5454af[_0x3ff0fb]['item']['endIndex']=_0x5a1523['get'](_0x5454af[_0x3ff0fb]['pairId']):'elementEnd'===_0x5454af[_0x3ff0fb]['type']&&(_0x5454af[_0x3ff0fb]['item']['startIndex']=_0x5a1523['get'](_0x5454af[_0x3ff0fb]['pairId']));}['_processTape'](_0x5860e7){for(let _0x13cdb4=0x0;_0x13cdb4<_0x5860e7['length'];_0x13cdb4++){if('elementStart'===_0x5860e7[_0x13cdb4]['type'])_0x5860e7[_0x13cdb4]['item']['startIndex']=_0x13cdb4;else{if('elementEnd'===_0x5860e7[_0x13cdb4]['type']){_0x5860e7[_0x13cdb4]['item']['endIndex']=_0x13cdb4;const _0x290962=_0x5860e7[_0x13cdb4]['item']['startIndex'];_0x5860e7[_0x290962]['pairId']=_0x5860e7[_0x13cdb4]['id'],_0x5860e7[_0x13cdb4]['pairId']=_0x5860e7[_0x290962]['id'];}else _0x5860e7[_0x13cdb4]['item']['startIndex']=_0x13cdb4,_0x5860e7[_0x13cdb4]['item']['endIndex']=_0x13cdb4,_0x5860e7[_0x13cdb4]['pairId']=null;}_0x5860e7[_0x13cdb4]['markersStart']||(_0x5860e7[_0x13cdb4]['markersStart']=[],_0x5860e7[_0x13cdb4]['markersEnd']=[]);}}['_markInsertions'](_0x3632d0,_0x3d4cec){const _0x323158=_0x3632d0['filter'](_0x4d999e=>!_0x4d999e['isAdded']);for(let _0x3ec88e=0x0;_0x3ec88e<_0x3d4cec['length'];_0x3ec88e++)_0x3d4cec[_0x3ec88e]['isAdded']&&(_0x323158[_0x3ec88e]['isAdded']=_0x3d4cec[_0x3ec88e]['isAdded']);}['_getDiff'](_0x170c8f,_0x3b2266=null){const _0x5ad6d6=this['repository']['getRevision'](_0x170c8f),_0x1851f9=_0x3b2266?this['repository']['getRevision'](_0x3b2266):null,_0x2fac30=this['_getRevisionsRange'](_0x5ad6d6,_0x1851f9),_0x5031bc=_0x2fac30[_0x2fac30['length']-0x1],_0x48da47=new Map(),_0x2b1811={'model':{},'attributes':{},'changes':[]},_0x279b0c=new Set(),_0x265465=new Map();for(let _0x43599f=_0x2fac30['length']-0x1;_0x43599f>=0x0;_0x43599f--){const _0xc591b6=_0x2fac30[_0x43599f];for(const _0x3b42c3 of Object['keys'](_0xc591b6['diffData']))if(_0xc591b6['diffData'][_0x3b42c3]['attachChange']){const _0x237b08=_0xc591b6['diffData'][_0x3b42c3]['attachChange'];_0x237b08['isAttached']?(_0x279b0c['add'](_0x3b42c3),_0x265465['has'](_0x3b42c3)&&_0x265465['get'](_0x3b42c3)['userId']==_0x237b08['userId']?_0x265465['delete'](_0x3b42c3):_0x265465['set'](_0x3b42c3,_0x237b08)):_0x265465['has'](_0x3b42c3)?(_0x279b0c['delete'](_0x3b42c3),_0x265465['delete'](_0x3b42c3)):(_0x279b0c['add'](_0x3b42c3),_0x265465['set'](_0x3b42c3,_0x237b08));}else _0x279b0c['add'](_0x3b42c3);}for(const _0xd6545a of _0x279b0c){const _0x212746=_0x265465['has'](_0xd6545a)&&!_0x265465['get'](_0xd6545a)['isAttached'];let _0x177f5a=_0x212746?_0x2fac30['length']-0x1:0x0;const _0x484ec0=_0x212746?-0x1:0x1;for(;_0x2fac30[_0x177f5a];){const _0x3c4e3b=_0x2fac30[_0x177f5a];if(_0x3c4e3b['diffData'][_0xd6545a]){const _0x5d716a=_0x212746?_0x3c4e3b['diffData'][_0xd6545a]['attributesBefore']:_0x3c4e3b['diffData'][_0xd6545a]['attributesAfter'];_0x2b1811['attributes'][_0xd6545a]=_0x5d716a?_0x36af59(_0x5d716a):{};break;}_0x177f5a+=_0x484ec0;}}for(const _0x2390c6 of _0x2fac30){_0x2390c6['model']={};for(const _0x404599 of _0x2390c6['authors'])_0x48da47['set'](_0x404599['id'],_0x404599);for(const _0x29088b of _0x279b0c){const _0x1bc989=_0x2390c6['diffData'][_0x29088b]?_0x2390c6['diffData'][_0x29088b]['insertions']:'[]',_0x26e712=_0x2390c6['diffData'][_0x29088b]?_0x2390c6['diffData'][_0x29088b]['deletions']:'[]';_0x2390c6['model'][_0x29088b]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1bc989),'deletions':this['_utils']['_makeModelFromViewString'](_0x26e712)};}}for(const _0x5cbf35 of _0x279b0c){let _0x4f6cc8=null,_0x3e1b3f=0x0;const _0x1e6cd3=new Map(Array['from'](_0x5ad6d6['model'][_0x5cbf35]['insertions']['markers'])['filter'](([_0x433470])=>!_0x433470['startsWith']('revision:')));let _0x5e6f6c=0x0;for(const _0x3dc975 of _0x2fac30){const _0x4a7094=this['_makeTape'](_0x3dc975['model'][_0x5cbf35]['insertions']);_0x3dc975==_0x5ad6d6?(_0x4f6cc8=_0x4a7094,_0x3e1b3f=_0x4f6cc8['length'],_0x4f6cc8['forEach'](_0x406e1b=>{_0x406e1b['id']=_0x5e6f6c++;}),this['_processTape'](_0x4f6cc8)):this['_markInsertions'](_0x4f6cc8,_0x4a7094);const _0x53f4f7=_0x4f6cc8['filter'](_0x1b46b9=>!_0x1b46b9['isAdded'])['map'](_0x3095c8=>_0x3095c8['id']);let _0x42393d=0x0;const _0x105328=this['_makeTape'](_0x3dc975['model'][_0x5cbf35]['deletions']);_0x105328['forEach'](_0x10db21=>{_0x10db21['isRemoved']?_0x10db21['id']=_0x3e1b3f++:_0x10db21['id']=_0x53f4f7[_0x42393d++];}),this['_processTape'](_0x105328),this['_setDistance'](_0x4f6cc8,'isAdded'),this['_setDistance'](_0x105328,'isRemoved'),_0x3dc975==_0x5ad6d6&&this['_markMarkers'](_0x4f6cc8,_0x1e6cd3),_0x4f6cc8=this['_joinTapes'](_0x4f6cc8,_0x105328),this['_refreshStartEndIndex'](_0x4f6cc8),this['_setDistance'](_0x4f6cc8,'isRemoved');}_0x4f6cc8=_0x4f6cc8['filter'](_0x3a12f1=>!(_0x3a12f1['isAdded']&&_0x3a12f1['isRemoved']));const _0x24decd=new Map(_0x5031bc['model'][_0x5cbf35]['deletions']['markers']),_0x45d3d4=new Set(_0x1e6cd3['keys']());for(const _0x1b226c of _0x24decd['keys']())_0x45d3d4['delete'](_0x1b226c);this['_markSuggestions'](_0x4f6cc8,_0x45d3d4),this['_fixObsoleteTags'](_0x4f6cc8),_0x4f6cc8=this['_removeMissingPairs'](_0x4f6cc8),_0x4f6cc8=this['_markMismatchedRemovedTags'](_0x4f6cc8),_0x4f6cc8=this['_removeUnsupportedChanges'](_0x4f6cc8);const {root:_0x35455c,changes:_0x31aef2}=this['_makeModelFromTape'](_0x4f6cc8,_0x48da47,_0x5cbf35);_0x2b1811['model'][_0x5cbf35]=_0x35455c;const _0x1b5ef2=_0x265465['get'](_0x5cbf35);if(_0x1b5ef2){const _0xcb2115=_0x48da47['get'](_0x1b5ef2['userId']),_0x2d9d41=new xt({'author':_0xcb2115,'type':_0x1b5ef2['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5cbf35});_0x31aef2['unshift'](_0x2d9d41),_0x2b1811['attributes'][_0x5cbf35]['revisionHistoryAttachChange']=_0x2d9d41['id'];}_0x2b1811['changes']=_0x2b1811['changes']['concat'](_0x31aef2);}return _0x2b1811;}['_markMarkers'](_0x147036,_0xdaa65f){for(let _0x5ba81c=0x0;_0x5ba81c<_0x147036['length'];_0x5ba81c++)for(const [_0x5c7c94,_0x5cbbf0]of _0xdaa65f)!_0x5cbbf0['isCollapsed']&&_0x5cbbf0['start']['isEqual'](_0x147036[_0x5ba81c]['previousPosition'])&&_0x147036[_0x5ba81c]['markersStart']['push'](_0x5c7c94),_0x5cbbf0['end']['isEqual'](_0x147036[_0x5ba81c]['nextPosition'])&&_0x147036[_0x5ba81c]['markersEnd']['push'](_0x5c7c94);}['_joinTapes'](_0x52bd19,_0x54272d){let _0x3dae9d=[],_0x421206=0x0,_0x59b463=0x0;for(;_0x421206<_0x52bd19['length']||_0x59b463<_0x54272d['length'];){const _0xcb903f=_0x52bd19[_0x421206]||{},_0x48de7a=_0x54272d[_0x59b463]||{};if(_0xcb903f['id']==_0x48de7a['id'])_0x421206++,_0x59b463++,_0x3dae9d['push'](_0xcb903f);else{if(_0x48de7a['isRemoved']&&_0xcb903f['isAdded']){const {commonTape:_0x4607f0,iEnd:_0x465d16,jEnd:_0x34b34f}=this['_threeWayMerge'](_0x52bd19,_0x421206,_0x54272d,_0x59b463);_0x3dae9d=_0x3dae9d['concat'](_0x4607f0),_0x421206=_0x465d16,_0x59b463=_0x34b34f;}else _0x48de7a['isRemoved']?(_0x59b463++,_0x3dae9d['push'](_0x48de7a)):(_0x421206++,_0x3dae9d['push'](_0xcb903f));}}return _0x3dae9d;}['_markSuggestions'](_0x1a06bb,_0x5a62c0){const _0x1a042b=[];for(let _0x564d9c=0x0;_0x564d9c<_0x1a06bb['length'];_0x564d9c++){for(let _0x5f0331=0x0;_0x5f0331<_0x1a06bb[_0x564d9c]['markersStart']['length'];_0x5f0331++){const _0xb64a18=_0x1a06bb[_0x564d9c]['markersStart'][_0x5f0331];if(!_0x5a62c0['has'](_0xb64a18))continue;const {group:_0x449a2f,type:_0x13b735,authorId:_0xb32664}=_0x208308(_0xb64a18);'revision-suggestion'!=_0x449a2f||'insertion'!=_0x13b735&&'deletion'!=_0x13b735||(_0x1a042b['unshift']({'type':_0x13b735,'name':_0xb64a18,'userId':_0xb32664}),_0x1a06bb[_0x564d9c]['markersStart']['splice'](_0x5f0331,0x1),_0x5f0331--);}_0x5366c9(_0x1a06bb[_0x564d9c]);for(let _0x12f844=0x0;_0x12f844<_0x1a06bb[_0x564d9c]['markersEnd']['length'];_0x12f844++){const _0x41f441=_0x1a06bb[_0x564d9c]['markersEnd'][_0x12f844];if(!_0x5a62c0['has'](_0x41f441))continue;const {group:_0x1ba805,type:_0x4315e6}=_0x208308(_0x41f441);if('revision-suggestion'!=_0x1ba805||'insertion'!=_0x4315e6&&'deletion'!=_0x4315e6)continue;_0x1a06bb[_0x564d9c]['markersEnd']['splice'](_0x12f844,0x1),_0x12f844--;const _0x379d01=_0x1a042b['findIndex'](_0x1a8a5d=>_0x1a8a5d['name']==_0x41f441);_0x379d01>-0x1&&_0x1a042b['splice'](_0x379d01,0x1);}}function _0x208308(_0x1b5206){const _0x4fc346=_0x1b5206['split'](':');return{'group':_0x4fc346[0x0],'type':_0x4fc346[0x1],'subType':_0x4fc346['length']>=0x5?_0x4fc346[0x2]:null,'id':_0x4fc346['length']<0x5?_0x4fc346[0x2]:_0x4fc346[0x3],'authorId':_0x4fc346['length']<0x5?_0x4fc346[0x3]:_0x4fc346[0x4],'markerCount':0x6==_0x4fc346['length']?_0x4fc346[0x5]:null};}function _0x5366c9(_0x483a66){for(let _0x45644b=0x0;_0x45644b<_0x1a042b['length'];_0x45644b++){if(_0x483a66['isAdded']&&'insertion'==_0x1a042b[_0x45644b]['type']&&_0x483a66['isAdded']['userId']==_0x1a042b[_0x45644b]['userId'])return _0x483a66['isAddSuggestion']=_0x1a042b[_0x45644b],void delete _0x483a66['isAdded'];if(!_0x483a66['isAdded']&&!_0x483a66['isRemoved']&&'deletion'==_0x1a042b[_0x45644b]['type'])return void(_0x483a66['isRemoveSuggestion']=_0x1a042b[_0x45644b]);}}}['_setDistance'](_0x20f407,_0xa54155){let _0x483056=0x0,_0x31bca7=!0x1;const _0x5bc4d9=new Map();for(const _0x28126d of _0x20f407)_0x28126d[_0xa54155]?_0x31bca7&&(_0x483056++,_0x31bca7=!0x1):(_0x483056++,_0x31bca7=!0x0),_0x5bc4d9['set'](_0x28126d['id'],_0x483056);for(let _0x6a5bec=0x0;_0x6a5bec<_0x20f407['length'];_0x6a5bec++){if('isRemoved'==_0xa54155&&_0x20f407[_0x6a5bec]['isAdded']||'isAdded'==_0xa54155&&_0x20f407[_0x6a5bec]['isRemoved'])continue;if('text'==_0x20f407[_0x6a5bec]['type']){_0x20f407[_0x6a5bec]['distance']=0x0;continue;}const _0x31fb2b=_0x5bc4d9['get'](_0x20f407[_0x6a5bec]['pairId']),_0x4b4e74=_0x5bc4d9['get'](_0x20f407[_0x6a5bec]['id']);_0x20f407[_0x6a5bec]['distance']=_0x31fb2b-_0x4b4e74;}}['_getRevisionsRange'](_0x5bf61a,_0xb94b58,_0x8c49d5=!0x1){const _0x4ed44e=[];let _0x4291cb=this['repository']['getIndex'](_0x5bf61a),_0x5b4c93=this['repository']['getIndex'](_0xb94b58);for(-0x1==_0x5b4c93&&(_0x5b4c93=this['repository']['_revisions']['length'],_0x8c49d5=!0x1);_0x4291cb<_0x5b4c93;)_0x4ed44e['push'](this['repository']['getRevision'](_0x4291cb)),_0x4291cb++;return _0x8c49d5&&_0x4ed44e['push'](this['repository']['getRevision'](_0x4291cb)),_0x4ed44e;}['_threeWayMerge'](_0x11dc26,_0x584a7a,_0x277433,_0x3a7859){const _0x4ce357=this['editor']['model']['schema'];let _0xe51acd=_0x584a7a;for(;_0x11dc26[_0xe51acd]&&_0x11dc26[_0xe51acd]['isAdded'];)_0xe51acd++;let _0x4e3c3f=_0x3a7859;for(;_0x277433[_0x4e3c3f]&&_0x277433[_0x4e3c3f]['isRemoved'];)_0x4e3c3f++;_0x202313(_0x11dc26,_0x584a7a,_0xe51acd),_0x202313(_0x277433,_0x3a7859,_0x4e3c3f);const _0x870d08=_0x277433['slice'](_0x3a7859,_0x4e3c3f)['concat'](_0x11dc26['slice'](_0x584a7a,_0xe51acd));return _0x870d08['sort']((_0x1d89e6,_0x28dbd4)=>_0x1d89e6['side']!=_0x28dbd4['side']?_0x1d89e6['side']-_0x28dbd4['side']:_0x1d89e6['level']!=_0x28dbd4['level']?_0x1d89e6['level']-_0x28dbd4['level']:_0x1d89e6['distance']!=_0x28dbd4['distance']?_0x28dbd4['distance']-_0x1d89e6['distance']:!!_0x1d89e6['isAdded']!=!!_0x28dbd4['isAdded']?-0x1==_0x1d89e6['side']||0x0==_0x1d89e6['side']?_0x1d89e6['isAdded']?-0x1:0x1:_0x1d89e6['isAdded']?0x1:-0x1:_0x1d89e6['index']-_0x28dbd4['index']),{'commonTape':_0x870d08,'iEnd':_0xe51acd,'jEnd':_0x4e3c3f};function _0x202313(_0x420870,_0x57a999,_0x53cbca){let _0x260e01=-0x1,_0x5a37e6=Number['POSITIVE_INFINITY'],_0x5e9e18=!0x0;for(let _0x400ecf=_0x57a999;_0x400ecf<_0x53cbca;_0x400ecf++)if(_0x4ce357['isInline'](_0x420870[_0x400ecf]['item'])||(_0x5e9e18=!0x1),_0x420870[_0x400ecf]['item']['startIndex']<_0x57a999&&(_0x260e01=_0x400ecf),_0x420870[_0x400ecf]['item']['endIndex']>=_0x53cbca){_0x5a37e6=_0x400ecf;break;}_0x5e9e18&&(_0x260e01=_0x53cbca-0x1);for(let _0x1aff2d=_0x57a999;_0x1aff2d<_0x53cbca;_0x1aff2d++)_0x420870[_0x1aff2d]['side']=_0x1aff2d<=_0x260e01?-0x1:_0x1aff2d<_0x5a37e6?0x0:0x1,_0x420870[_0x1aff2d]['index']=_0x1aff2d;let _0x449139=0x0;for(let _0x1eb974=_0x57a999;_0x1eb974<=_0x260e01;_0x1eb974++)0x0==_0x420870[_0x1eb974]['distance']?_0x420870[_0x1eb974]['level']=_0x449139:(_0x449139++,_0x420870[_0x1eb974]['level']=_0x449139,_0x449139++);for(let _0x1585db=_0x57a999;_0x1585db<_0x53cbca;_0x1585db++)0x0==_0x420870[_0x1585db]['side']&&(_0x420870[_0x1585db]['level']=_0x449139);_0x449139=0x0;for(let _0x590aa3=_0x53cbca-0x1;_0x590aa3>=_0x5a37e6;_0x590aa3--)0x0==_0x420870[_0x590aa3]['distance']?_0x420870[_0x590aa3]['level']=_0x449139:(_0x449139--,_0x420870[_0x590aa3]['level']=_0x449139,_0x449139--);}}['_fixObsoleteTags'](_0x5129b0){const _0x3c3f23=new Map(),_0x2f6ef2=this['editor']['model']['schema'];for(let _0x4c06cb=0x1;_0x4c06cb<_0x5129b0['length'];_0x4c06cb++){let _0xae86a5,_0x21b5ec,_0x5b1e7d;const _0x56ea25=_0x5129b0[_0x4c06cb],_0x15fb2b=_0x5129b0[_0x4c06cb-0x1];if('text'==_0x56ea25['type'])continue;if(_0x56ea25['type']!=_0x15fb2b['type'])continue;if(!_0x2f6ef2['isBlock'](_0x15fb2b['item'])||_0x2f6ef2['isLimit'](_0x15fb2b['item']))continue;if(!_0x2f6ef2['isBlock'](_0x56ea25['item'])||_0x2f6ef2['isLimit'](_0x56ea25['item']))continue;if((_0x5129b0[_0x4c06cb]['isAdded']||_0x5129b0[_0x4c06cb]['isAddSuggestion'])&&_0x5129b0[_0x4c06cb-0x1]['isRemoved'])_0xae86a5=_0x5129b0[_0x4c06cb],_0x21b5ec=_0x5129b0[_0x4c06cb-0x1],_0x5b1e7d=_0x4c06cb-0x1;else{if(!_0x5129b0[_0x4c06cb]['isRemoved']||!_0x5129b0[_0x4c06cb-0x1]['isAdded']&&!_0x5129b0[_0x4c06cb-0x1]['isAddSuggestion'])continue;_0xae86a5=_0x5129b0[_0x4c06cb-0x1],_0x21b5ec=_0x5129b0[_0x4c06cb],_0x5b1e7d=_0x4c06cb;}const _0x286a31=_0xae86a5['level']==_0x21b5ec['level'],_0x9945e5=Math['abs'](_0xae86a5['level'])<Math['abs'](_0x21b5ec['level'])&&0x0==_0x21b5ec['distance'];(_0x286a31||_0x9945e5)&&(_0x3c3f23['set'](_0x21b5ec['id'],_0xae86a5['id']),_0x5129b0['splice'](_0x5b1e7d,0x1),_0x4c06cb--,_0xae86a5['isAdded']=!0x1);}for(let _0x29e04f=0x0;_0x29e04f<_0x5129b0['length'];_0x29e04f++)_0x3c3f23['has'](_0x5129b0[_0x29e04f]['pairId'])&&(_0x5129b0[_0x29e04f]['pairId']=_0x3c3f23['get'](_0x5129b0[_0x29e04f]['pairId']));}['_removeMissingPairs'](_0x2d60f9){const _0x379a22=new Set(_0x2d60f9['map'](_0x5cc88b=>_0x5cc88b['id']));for(let _0x3c247a=0x0;_0x3c247a<_0x2d60f9['length'];_0x3c247a++)_0x379a22['has'](_0x2d60f9[_0x3c247a]['pairId'])||0x0==_0x2d60f9[_0x3c247a]['distance']||(_0x2d60f9[_0x3c247a]['isIncorrect']=!0x0);return _0x2d60f9['filter'](_0x592314=>!_0x592314['isIncorrect']);}['_markMismatchedRemovedTags'](_0x5f2c64){const _0x35638e=new Set();for(let _0x48f2f9=0x0;_0x48f2f9<_0x5f2c64['length'];_0x48f2f9++){if(_0x35638e['has'](_0x5f2c64[_0x48f2f9]['id'])&&_0x5f2c64[_0x48f2f9]['isRemoved']&&(_0x5f2c64[_0x48f2f9]['isIncorrect']=!0x0),_0x5f2c64[_0x48f2f9]['isIncorrect'])continue;if(0x0==_0x5f2c64[_0x48f2f9]['distance'])continue;if('elementStart'!=_0x5f2c64[_0x48f2f9]['type'])continue;if(null==_0x5f2c64[_0x48f2f9]['pairId'])continue;let _0x6aa579=_0x48f2f9+0x1,_0x4b3df9=0x0;for(;_0x5f2c64[_0x6aa579]['id']!=_0x5f2c64[_0x48f2f9]['pairId'];)'elementStart'==_0x5f2c64[_0x6aa579]['type']?_0x4b3df9++:'elementEnd'==_0x5f2c64[_0x6aa579]['type']&&_0x4b3df9--,_0x6aa579++;if(0x0!=_0x4b3df9){if(_0x5f2c64[_0x48f2f9]['isRemoved'])_0x5f2c64[_0x48f2f9]['isIncorrect']=!0x0;else{for(;_0x6aa579!=_0x48f2f9;)_0x5f2c64[_0x6aa579]['isRemoved']&&0x0!=_0x5f2c64[_0x6aa579]['distance']&&(_0x5f2c64[_0x6aa579]['isIncorrect']=!0x0,_0x35638e['add'](_0x5f2c64[_0x6aa579]['pairId'])),_0x6aa579--;}}}return _0x5f2c64['filter'](_0x1b04fa=>!_0x1b04fa['isIncorrect']);}['_removeUnsupportedChanges'](_0x978c88){const _0x24e768=this['editor']['model']['schema'];for(let _0x281ea6=0x0;_0x281ea6<_0x978c88['length'];_0x281ea6++){if(!(_0x978c88[_0x281ea6]['isAdded']||_0x978c88[_0x281ea6]['isAddSuggestion']||_0x978c88[_0x281ea6]['isRemoved']||_0x978c88[_0x281ea6]['isRemoveSuggestion']))continue;if(0x0==_0x978c88[_0x281ea6]['distance'])continue;const _0xb43783=_0x978c88[_0x281ea6]['item'];_0x24e768['isBlock'](_0xb43783)||_0x24e768['isLimit'](_0xb43783)||(_0x978c88[_0x281ea6]['isAdded']&&delete _0x978c88[_0x281ea6]['isAdded'],_0x978c88[_0x281ea6]['isAddSuggestion']&&delete _0x978c88[_0x281ea6]['isAddSuggestion'],_0x978c88[_0x281ea6]['isRemoveSuggestion']&&delete _0x978c88[_0x281ea6]['isRemoveSuggestion'],_0x978c88[_0x281ea6]['isRemoved']&&(_0x978c88[_0x281ea6]['isIncorrect']=!0x0));}return _0x978c88['filter'](_0x32cacc=>!_0x32cacc['isIncorrect']);}['_makeModelFromTape'](_0x512f56,_0x3a159e,_0x309fb5){const _0x3901fe=new _0x2ed553(),_0xad9215=[],_0x1bc5f8=new Map(),_0x8ff28d=this['editor']['model'],_0x589a7c=_0x8ff28d['schema'],_0x43dfe4=[_0x3901fe],_0x16a6f6={},_0x1a2aa1={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x26b426=null;const _0x15b70f=[0x0];for(let _0x214540=0x0;_0x214540<_0x512f56['length'];_0x214540++)if('elementStart'===_0x512f56[_0x214540]['type']){_0x512f56[_0x214540]['previousPosition']=_0x8ff28d['createPositionFromPath'](_0x3901fe,_0x15b70f);const _0x3d2893=new _0x5e54e6(_0x512f56[_0x214540]['item']['name'],_0x512f56[_0x214540]['item']['getAttributes']());_0x43dfe4[0x0]['_appendChild'](_0x3d2893),_0x15b70f['push'](0x0),_0x43dfe4['unshift'](_0x3d2893),_0x512f56[_0x214540]['nextPosition']=_0x8ff28d['createPositionFromPath'](_0x3901fe,_0x15b70f);}else'elementEnd'===_0x512f56[_0x214540]['type']?(_0x43dfe4['shift'](),_0x512f56[_0x214540]['previousPosition']=_0x8ff28d['createPositionFromPath'](_0x3901fe,_0x15b70f),_0x15b70f['pop'](),_0x15b70f[_0x15b70f['length']-0x1]++,_0x512f56[_0x214540]['nextPosition']=_0x8ff28d['createPositionFromPath'](_0x3901fe,_0x15b70f)):(_0x512f56[_0x214540]['previousPosition']=_0x8ff28d['createPositionFromPath'](_0x3901fe,_0x15b70f),_0x26b426?_0x26b426['_data']+=_0x512f56[_0x214540]['item']['data']:_0x26b426=new _0x2bb052(_0x512f56[_0x214540]['item']['data'],_0x512f56[_0x214540]['item']['getAttributes']()),_0x512f56[_0x214540+0x1]&&'text'===_0x512f56[_0x214540+0x1]['type']&&_0x2f141e(_0x26b426,_0x512f56[_0x214540+0x1]['item'])||(_0x43dfe4[0x0]['_appendChild'](_0x26b426),_0x26b426=null),_0x15b70f[_0x15b70f['length']-0x1]+=_0x512f56[_0x214540]['item']['offsetSize'],_0x512f56[_0x214540]['nextPosition']=_0x8ff28d['createPositionFromPath'](_0x3901fe,_0x15b70f));for(let _0x13431c=0x0;_0x13431c<_0x512f56['length'];_0x13431c++){const _0x2c6bad=_0x512f56[_0x13431c]['previousPosition'],_0x5e6243=_0x512f56[_0x13431c]['nextPosition'];for(const _0x187874 of _0x512f56[_0x13431c]['markersStart'])_0x1bc5f8['set'](_0x187874,{'start':_0x2c6bad,'end':null});_0x5b5949('isRemoveSuggestion',_0x13431c,_0x2c6bad,_0x5e6243),_0x5b5949('isAddSuggestion',_0x13431c,_0x2c6bad,_0x5e6243),_0x5b5949('isRemoved',_0x13431c,_0x2c6bad,_0x5e6243),_0x5b5949('isAdded',_0x13431c,_0x2c6bad,_0x5e6243);for(const _0x11d098 of _0x512f56[_0x13431c]['markersEnd']){const _0x3f2ce5=_0x1bc5f8['get'](_0x11d098);_0x3f2ce5?_0x3f2ce5['end']=_0x5e6243:_0x1bc5f8['set'](_0x11d098,{'start':_0x5e6243,'end':_0x5e6243});}}for(const [_0x3a5dfc,_0x51f773]of _0x1bc5f8){const _0x33bdd6=this['editor']['model']['createRange'](_0x51f773['start'],_0x51f773['end']);_0x3901fe['markers']['set'](_0x3a5dfc,_0x33bdd6);}return _0xad9215['sort']((_0x3a28aa,_0x17c910)=>{const _0x3070cd=_0x3901fe['markers']['get']('revision:'+_0x3a28aa['id']),_0x5365d1=_0x3901fe['markers']['get']('revision:'+_0x17c910['id']);return _0x3070cd['start']['isBefore'](_0x5365d1['start'])?-0x1:_0x3070cd['start']['isAfter'](_0x5365d1['start'])?0x1:_0x3070cd['end']['isBefore'](_0x5365d1['end'])?-0x1:_0x3070cd['end']['isAfter'](_0x5365d1['end'])?0x1:'add'===_0x3a28aa['type']?-0x1:0x1;}),{'root':_0x3901fe,'changes':_0xad9215};function _0x5b5949(_0x474498,_0x25bc78,_0x26e811,_0x48d749){const _0x1231c8=!!_0x512f56[_0x25bc78][_0x474498],_0x5bfd4c=_0x1231c8?_0x512f56[_0x25bc78][_0x474498]['userId']:null,_0x58ed44=_0x25bc78===_0x512f56['length']-0x1,_0x1a2f80=_0x1a2aa1[_0x474498][0x0],_0xb9f3ce=_0x589a7c['isObject'](_0x512f56[_0x25bc78]['item']);!_0x16a6f6[_0x474498]&&_0x1231c8?_0x16a6f6[_0x474498]={'start':_0x26e811,'tapeItem':_0x512f56[_0x25bc78],'userId':_0x5bfd4c,'type':_0x474498}:_0x16a6f6[_0x474498]&&!_0x1231c8?(_0x16a6f6[_0x474498]['end']=_0x26e811,_0x160fd7(_0x16a6f6[_0x474498]),_0x16a6f6[_0x474498]=null):_0x16a6f6[_0x474498]&&_0x1231c8&&_0x16a6f6[_0x474498]['userId']!==_0x5bfd4c&&(_0x16a6f6[_0x474498]['end']=_0x26e811,_0x1a2f80&&_0x1a2f80['userId']===_0x16a6f6[_0x474498]['userId']||_0x160fd7(_0x16a6f6[_0x474498]),_0x16a6f6[_0x474498]={'start':_0x26e811,'tapeItem':_0x512f56[_0x25bc78],'userId':_0x5bfd4c,'type':_0x474498}),_0x16a6f6[_0x474498]&&_0xb9f3ce&&('elementStart'!==_0x512f56[_0x25bc78]['type']||_0x1a2f80&&_0x1a2f80['userId']===_0x5bfd4c||_0x1a2aa1[_0x474498]['unshift']({'userId':_0x5bfd4c,'object':_0x512f56[_0x25bc78]['item'],'change':_0x16a6f6[_0x474498]}),'elementEnd'===_0x512f56[_0x25bc78]['type']&&_0x1a2f80&&_0x1a2f80['object']===_0x512f56[_0x25bc78]['item']&&(_0x1a2aa1[_0x474498]['shift'](),_0x16a6f6[_0x474498]=_0x1a2f80['change'])),_0x16a6f6[_0x474498]&&_0x58ed44&&(_0x16a6f6[_0x474498]['end']=_0x48d749,_0x160fd7(_0x16a6f6[_0x474498]),_0x16a6f6[_0x474498]=null);}function _0x160fd7({start:_0x786db0,end:_0x19a753,tapeItem:_0x25eeea,userId:_0xef14d,type:_0x158eb6}){const _0x4cf518=_0x25eeea['item'],_0x492d62=_0x8ff28d['schema']['isBlock'](_0x4cf518)&&!_0x8ff28d['schema']['isLimit'](_0x4cf518),_0x127f19=_0x786db0['nodeAfter']==_0x19a753['parent']&&_0x19a753['isAtStart'];if(_0x492d62&&_0x127f19)return;const _0x347b96=_0x8ff28d['createRange'](_0x786db0,_0x19a753),_0x6a476f=_0x3a159e['get'](_0xef14d),_0x95c911=new xt({'author':_0x6a476f,'type':'isAdded'==_0x158eb6||'isAddSuggestion'==_0x158eb6?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x158eb6||'isRemoveSuggestion'==_0x158eb6},'createdAt':new Date(),'rootName':_0x309fb5});_0xad9215['push'](_0x95c911),_0x3901fe['markers']['set']('revision:'+_0x95c911['id'],_0x347b96);}function _0x2f141e(_0x441ba4,_0xed03b8){const _0x4e2d88=_0x441ba4['getAttributes'](),_0x4a54fd=_0xed03b8['getAttributes']();for(const _0x5f39b1 of _0x4e2d88){if(_0x5f39b1[0x1]!==_0xed03b8['getAttribute'](_0x5f39b1[0x0]))return!0x1;_0x4a54fd['next']();}return _0x4a54fd['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x542c4b=>{const _0x2d9218=_0x542c4b['markerName']['split'](':')[0x1],_0x2fe55c=this['_getChangeFromId'](_0x2d9218);if(!_0x2fe55c)return null;const _0x517e44='add'==_0x2fe55c['type']?'insertion':'deletion',_0x36eecb=['ck-suggestion-marker','ck-suggestion-marker-'+_0x517e44];return _0x2fe55c['data']['isSuggestion']&&_0x36eecb['push']('ck-suggestion-marker-'+_0x517e44+'-new'),this['activeChange']==_0x2fe55c&&_0x36eecb['push']('ck-suggestion-marker--active'),{'classes':_0x36eecb,'attributes':{'data-change-id':_0x2d9218}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x1f96c5=>{_0x1f96c5['on']('element:pre',(_0x57f0aa,_0x52fc1e,_0x78129c)=>{const _0x54b2ca=_0x52fc1e['viewItem']['getChild'](0x0);if(!_0x54b2ca||!_0x54b2ca['is']('element','code'))return;if(!_0x78129c['consumable']['consume'](_0x54b2ca,{'attributes':['vid_start','vid_end']}))return;const _0x572f16=_0x52fc1e['modelRange']['start']['nodeAfter'];_0x78129c['writer']['setAttribute']('vid_start',_0x54b2ca['getAttribute']('vid_start'),_0x572f16),_0x78129c['writer']['setAttribute']('vid_end',_0x54b2ca['getAttribute']('vid_end'),_0x572f16);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x282e50=>{_0x282e50['on']('element',(_0x20df48,_0x108465,_0x3e1da6)=>{if(!_0x3e1da6['consumable']['consume'](_0x108465['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x108465['modelRange']['isCollapsed'])return;const _0xf4003e=_0x108465['modelRange']['start']['nodeAfter'];_0xf4003e['hasAttribute']('vid_start')||_0xf4003e['hasAttribute']('vid')||(_0x3e1da6['writer']['setAttribute']('vid_start',_0x108465['viewItem']['getAttribute']('vid_start'),_0xf4003e),_0x3e1da6['writer']['setAttribute']('vid_end',_0x108465['viewItem']['getAttribute']('vid_end'),_0xf4003e));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x5094bb=>_0x5094bb['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x260338,[,_0x5510aa])=>{['vid_start','vid_end','vid']['includes'](_0x5510aa)&&(_0x260338['return']=!0x0,_0x260338['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xee0f5f=>{_0xee0f5f['on']('attribute:vid',(_0x20618b,_0x4f4b75,_0x444551)=>{if('\x20'!=_0x4f4b75['item']['data']||_0x4f4b75['item']['parent']['maxOffset']>0x1)return;if(!_0x444551['consumable']['consume'](_0x4f4b75['item'],_0x20618b['name']))return;const _0x26fe07=_0x444551['writer'],_0x4dd245=_0x444551['mapper']['toViewRange'](_0x4f4b75['range']);_0x26fe07['wrap'](_0x4dd245,_0x26fe07['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x1d762b){const _0x47e38b=_0x1d762b['plugins']['get']('RevisionViewer');return(_0x1b936f,_0xc1a5b8,_0x5cee40)=>{const _0x4883c7=_0xc1a5b8['markerName']['split'](':')[0x1],_0x2f3760=_0x47e38b['_getChangeFromId'](_0x4883c7);if(!_0x2f3760)return null;const _0x2f08cd='add'==_0x2f3760['type']?'split':'merge';if(!_0x5cee40['consumable']['test'](_0xc1a5b8['markerRange'],_0x1b936f['name']))return;const _0x233488=_0xc1a5b8['markerRange']['getWalker'](),_0x13b02f=_0xc1a5b8['markerRange']['start'],_0xed01f4=_0x1d762b['model']['schema'];let _0x34fe3d=null,_0xef1f23=null,_0x1ed55c=!0x1,_0x423009=!0x1;for(const _0x33d5d0 of _0x233488){const _0xbb285a=_0x33d5d0['item'];_0x1ed55c=_0x1ed55c||_0xed01f4['isContent'](_0xbb285a);const _0x315569=_0x5cee40['mapper']['toViewElement'](_0xbb285a);if(_0x315569&&_0x315569['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x33d5d0['type']&&(_0xed01f4['isBlock'](_0xbb285a)&&!_0xed01f4['isLimit'](_0xbb285a)&&(_0xbb285a['nextSibling']||_0x13b02f['isAtEnd']?_0x34fe3d&&_0x34fe3d['parent']==_0xbb285a||(_0x34fe3d=_0xbb285a,_0x34e961(_0x33d5d0['previousPosition']),_0x423009=!0x0):_0xef1f23=_0xef1f23||_0x33d5d0['previousPosition']));}function _0x34e961(_0x53ae9c){const _0x1f1fd4=_0x5cee40['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2f08cd}),_0x281f16=_0x5cee40['mapper']['toViewPosition'](_0x53ae9c);_0x2f3760['data']['isSuggestion']&&_0x5cee40['writer']['addClass']('ck-suggestion-marker-'+_0x2f08cd+'-new',_0x1f1fd4),_0x47e38b['activeChange']==_0x2f3760&&_0x5cee40['writer']['addClass']('ck-suggestion-marker--active',_0x1f1fd4),_0x5cee40['writer']['insert'](_0x281f16,_0x1f1fd4),_0x5cee40['mapper']['bindElementToMarker'](_0x1f1fd4,_0xc1a5b8['markerName']);}_0x1ed55c||_0x423009||!_0xef1f23||_0x34e961(_0xef1f23);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x4832f6,_0x7d44b1,_0x5f0c74)=>{const _0x1843c6=_0x5f0c74['mapper']['markerNameToElements'](_0x7d44b1['markerName']);if(_0x1843c6){for(const _0x4088f7 of _0x1843c6)(_0x4088f7['hasClass']('ck-suggestion-marker-split')||_0x4088f7['hasClass']('ck-suggestion-marker-merge'))&&(_0x5f0c74['mapper']['unbindElementFromMarkerName'](_0x4088f7,_0x7d44b1['markerName']),_0x5f0c74['writer']['remove'](_0x4088f7));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x30a918,_0x4c58ab,_0x5320fb)=>{const _0x11fe1a=_0x4c58ab['markerName']['split'](':')[0x1],_0x2ace29=this['_getChangeFromId'](_0x11fe1a);if(!_0x2ace29)return null;const _0x64ca81='add'==_0x2ace29['type']?'split':'merge';if(_0x5320fb['consumable']['test'](_0x4c58ab['markerRange'],_0x30a918['name']))for(const _0x2e4282 of _0x4c58ab['markerRange']['getItems']()){if(!_0x2e4282['is']('element','softBreak'))continue;const _0x1209f9=_0x5320fb['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x64ca81}),_0x47e5c1=_0x5320fb['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x2e4282));_0x2ace29['data']['isSuggestion']&&_0x5320fb['writer']['addClass']('ck-suggestion-marker-'+_0x64ca81+'-new',_0x1209f9),this['activeChange']==_0x2ace29&&_0x5320fb['writer']['addClass']('ck-suggestion-marker--active',_0x1209f9),_0x5320fb['writer']['insert'](_0x47e5c1,_0x1209f9),_0x5320fb['mapper']['bindElementToMarker'](_0x1209f9,_0x4c58ab['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3a4a67=>{for(const _0x2e8bf0 of this['editor']['model']['document']['getRootNames']()){const _0x170be2=this['editor']['model']['document']['getRoot'](_0x2e8bf0),_0x206ae6=this['editor']['editing']['view']['document']['getRoot'](_0x2e8bf0);if(_0x206ae6){const _0x2f5340=_0x170be2['getAttribute']('revisionHistoryAttachChange');if(_0x3a4a67['removeAttribute']('data-change-id',_0x206ae6),_0x3a4a67['removeClass']('ck-revision-history-root-add',_0x206ae6),_0x3a4a67['removeClass']('ck-revision-history-root-remove',_0x206ae6),_0x3a4a67['removeClass']('ck-revision-history-root--active',_0x206ae6),_0x2f5340){const _0x3a3c06=this['_getChangeFromId'](_0x2f5340);if(!_0x3a3c06)return null;_0x3a4a67['setAttribute']('data-change-id',_0x2f5340,_0x206ae6),_0x3a4a67['addClass']('ck-revision-history-root-'+_0x3a3c06['type'],_0x206ae6),this['activeChange']==_0x3a3c06&&_0x3a4a67['addClass']('ck-revision-history-root--active',_0x206ae6);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x57bcbd=>'revision-comment:'+_0x57bcbd,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x11b6c1=>'revision-suggestion:'+_0x11b6c1,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x745dba=>({'name':'suggestion:'+_0x745dba,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x341e6c=>{const _0x371eec=_0x341e6c['markerName']['split'](':')[0x1];return'insertion'!=_0x371eec&&'deletion'!=_0x371eec?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x371eec]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ot(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ot(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2cf722,_0x2f9022,_0x10107b)=>{const _0x1725ea=_0x10107b['mapper']['markerNameToElements'](_0x2f9022['markerName']);if(_0x1725ea){for(const _0x4644e4 of _0x1725ea)_0x4644e4['is']('uiElement')&&(_0x10107b['mapper']['unbindElementFromMarkerName'](_0x4644e4,_0x2f9022['markerName']),_0x10107b['writer']['remove'](_0x4644e4));}},{'priority':'high'});}['_getChangeFromId'](_0x34b634){return this['_changeIdToChange']['get'](_0x34b634);}['_getViewForChange'](_0x4c13e5){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x4c13e5),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x43a4d1,_0x38b8c9,_0xa2f922,_0x3c4220)=>{_0x3c4220&&this['_balloon']['remove'](_0x3c4220),_0xa2f922&&(this['_balloon']['add']({'view':_0xa2f922,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x49f967=this['editor']['editing'],_0x565916=this['_getChangeFromId'](_0xa2f922['changeId']);let _0x1ebd9b;if(_0x565916['data']['isOnRoot']){const _0x27b7c8=_0x49f967['view']['getDomRoot'](_0x565916['rootName']);_0x1ebd9b=Array['from'](_0x27b7c8['getClientRects']());}else{const _0x396e72=this['editor']['model']['markers']['get']('revision:'+_0xa2f922['changeId']);_0x1ebd9b=Array['from'](_0x49f967['mapper']['markerNameToElements'](_0x396e72['name']))['map'](_0x495778=>_0x49f967['view']['domConverter']['mapViewToDom'](_0x495778))['map'](_0x3fbc29=>Array['from'](_0x3fbc29['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x1ebd9b[0x0];return _0x1ebd9b['find'](_0x32670c=>_0x32670c['top']-0x3<=this['_activeViewTarget']['y']&&_0x32670c['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x32670c['left']-0x3<=this['_activeViewTarget']['x']&&_0x32670c['right']+0x3>=this['_activeViewTarget']['x'])||_0x1ebd9b[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x1d5f00,_0x1c8c6e,_0x6c4b9e,_0x32afab)=>{this['activeView']=_0x6c4b9e?this['_getViewForChange'](_0x6c4b9e):null,this['editor']['model']['change'](()=>{const _0x41e8c1=this['editor']['editing'];_0x32afab&&(_0x32afab['data']['isOnRoot']?_0x41e8c1['view']['change'](_0x3795eb=>{_0x3795eb['removeClass']('ck-revision-history-root--active',_0x41e8c1['view']['document']['getRoot'](_0x32afab['rootName']));}):_0x41e8c1['reconvertMarker']('revision:'+_0x32afab['id'])),_0x6c4b9e&&(_0x6c4b9e['data']['isOnRoot']?_0x41e8c1['view']['change'](_0x16c08a=>{_0x16c08a['addClass']('ck-revision-history-root--active',_0x41e8c1['view']['document']['getRoot'](_0x6c4b9e['rootName']));}):_0x41e8c1['reconvertMarker']('revision:'+_0x6c4b9e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3df7c2,_0x529e65)=>{if(this['activeChange'])return;const _0x2522b9=this['_findChangeIdFromDomTarget'](_0x529e65['target']),_0x3c8ac5=this['_changeIdToChange']['get'](_0x2522b9);_0x3c8ac5?(this['_activeViewTarget']={'x':_0x529e65['domEvent']['x'],'y':_0x529e65['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3c8ac5)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3ffb6d,_0x15b924)=>{const _0x118d77=this['_findChangeIdFromDomTarget'](_0x15b924['target']),_0x1abd11=this['_changeIdToChange']['get'](_0x118d77);_0x1abd11?(this['_activeViewTarget']={'x':_0x15b924['domEvent']['x'],'y':_0x15b924['domEvent']['y']},_0x1abd11===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1abd11):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x54109a){do{const _0x3303c7=_0x54109a['getAttribute']('data-change-id');if(_0x3303c7)return _0x3303c7;_0x54109a=_0x54109a['parent'];}while(_0x54109a);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1b4011=>{for(const _0x2203dd of this['editor']['model']['markers'])_0x1b4011['removeMarker'](_0x2203dd);});}}function Ot(_0x5a207d,_0x5ce76f){return(_0x4c870d,_0x43eb44,_0x125d08)=>{if(!_0x125d08['consumable']['test'](_0x43eb44['markerRange'],_0x4c870d['name']))return;const _0x12c0e4=_0x43eb44['markerRange']['getWalker'](),_0x4c301d=_0x43eb44['markerRange']['start'],_0x3cecec=_0x5a207d['model']['schema'];let _0x2a0da9=null,_0x2c4c22=null,_0x5a291e=!0x1,_0x3cc858=!0x1;for(const _0x48e3e9 of _0x12c0e4){const _0x22d56b=_0x48e3e9['item'];_0x5a291e=_0x5a291e||_0x3cecec['isContent'](_0x22d56b);const _0x352d82=_0x125d08['mapper']['toViewElement'](_0x22d56b);if(_0x352d82&&_0x352d82['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x48e3e9['type']&&(_0x3cecec['isBlock'](_0x22d56b)&&!_0x3cecec['isLimit'](_0x22d56b)&&(_0x22d56b['nextSibling']||_0x4c301d['isAtEnd']?_0x2a0da9&&_0x2a0da9['parent']==_0x22d56b||(_0x2a0da9=_0x22d56b,_0x562eba(_0x48e3e9['previousPosition']),_0x3cc858=!0x0):_0x2c4c22=_0x2c4c22||_0x48e3e9['previousPosition']));}function _0x562eba(_0x43dbbb){const _0x19dbc6=_0x125d08['mapper']['toViewPosition'](_0x43dbbb),_0x38bc62=_0x125d08['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5ce76f});_0x125d08['writer']['insert'](_0x19dbc6,_0x38bc62),_0x125d08['mapper']['bindElementToMarker'](_0x38bc62,_0x43eb44['markerName']);}_0x5a291e||_0x3cc858||!_0x2c4c22||_0x562eba(_0x2c4c22);};}class Ct extends _0x281b05{constructor(_0x31cd1b){super(_0x31cd1b);const _0x5917c1=_0x31cd1b['plugins']['get'](St);this['affectsData']=!0x1,this['listenTo'](_0x5917c1,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5917c1,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3d1af8=this['editor'],_0x44096d=_0x3d1af8['plugins']['get'](St),_0x7c4018=_0x44096d['isReady']?_0x44096d['diff']['newRevisionId']:null;_0x3d1af8['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x7c4018);}['refresh'](){const {isReady:_0x57ad7d,isEnabled:_0x2a2e7c,repository:_0x17feaa,diff:_0x15281b}=this['editor']['plugins']['get'](St),_0x3ab3d2=_0x15281b&&_0x17feaa['getLaterVisibleRevision'](_0x15281b['newRevisionId']);this['isEnabled']=_0x57ad7d&&_0x2a2e7c&&Boolean(_0x3ab3d2);}}class Mt extends _0x281b05{['_step'];constructor(_0x541c96,{direction:_0x4c1005}){super(_0x541c96);const _0x7bc53b=_0x541c96['plugins']['get'](St);this['affectsData']=!0x1,this['_step']='forward'===_0x4c1005?0x1:-0x1,this['listenTo'](_0x7bc53b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x7bc53b,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x7bc53b,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x1fe8be=this['editor'],_0x17f19e=_0x1fe8be['plugins']['get'](St),{isNavigationMode:_0x2feff9,currentChangeNumber:_0x489465}=_0x17f19e;let _0x389987;if(_0x17f19e['activeChange']=_0x2feff9?_0x17f19e['diff']['changes']['get'](_0x489465+this['_step']):_0x17f19e['diff']['changes']['first'],_0x17f19e['activeChange']['data']['isOnRoot'])_0x389987=_0x1fe8be['editing']['view']['getDomRoot'](_0x17f19e['activeChange']['rootName']);else{const _0x23be90=_0x1fe8be['model']['markers']['get']('revision:'+_0x17f19e['activeChange']['id']);_0x389987=_0x3eeddd(_0x1fe8be['editing'],_0x23be90);}_0x37cfc0({'target':_0x389987,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x570686,currentChangeNumber:_0x1f46da,numberOfChanges:_0x792925,isReady:_0x32c9a1,isEnabled:_0x3b7100}=this['editor']['plugins']['get'](St);this['isEnabled']=!!(_0x3b7100&&_0x32c9a1&&_0x792925)&&(!_0x570686||(0x1===this['_step']?_0x1f46da<_0x792925-0x1:_0x1f46da>0x0));}}class Dt extends _0x24e188{constructor(_0x5dd370){super(_0x5dd370);const _0x29099c=this['bindTemplate'],_0x143f32=new _0x10f1f7(_0x5dd370),_0x2177e5=new _0x10f1f7(_0x5dd370);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',(_0x23ef31,_0x343e0d)=>_0x23ef31&&_0x343e0d>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x5e9650,_0x5e8767,_0x25b3dd,_0x509bd7)=>{if(!_0x5e9650)return wt(_0x5dd370,'Loading...');if(!_0x25b3dd)return wt(_0x5dd370,'No\x20changes');const _0x46a3f4=wt(_0x5dd370,'NUMBER_OF_CHANGES',_0x25b3dd);return _0x509bd7?wt(_0x5dd370,'X_OF_Y_CHANGES',[_0x5e8767+0x1,_0x25b3dd]):_0x46a3f4;}),_0x143f32['set']({'label':wt(_0x5dd370,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x554666}),_0x2177e5['set']({'label':wt(_0x5dd370,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x17ddc7}),_0x143f32['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x2177e5['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x143f32['on']('execute',()=>this['fire']('execute','backward')),_0x2177e5['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',_0x29099c['if']('_isStatusLabelVisible','ck-hidden',_0x27aae7=>!_0x27aae7)]},'children':[{'text':_0x29099c['to']('isNavigationMode',_0x921689=>_0x921689?wt(_0x5dd370,'EDIT_X_OF_Y_REVISIONS')+':\x20':wt(_0x5dd370,'Total')+':\x20')}]},{'text':_0x29099c['to']('_statusText')}]},new et(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x143f32,_0x2177e5]}]});}}const Tt='ck-editor__editable__loading-overlay';class Vt extends _0x423cf5{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x3929c3=this['editor']['editing']['view'];_0x3929c3['change'](_0x55dde3=>{for(const _0x117584 of _0x3929c3['document']['roots'])_0x55dde3['addClass'](Tt,_0x117584);});}['hide'](){const _0xb8239b=this['editor']['editing']['view'];_0xb8239b['change'](_0x196129=>{for(const _0x111424 of _0xb8239b['document']['roots'])_0x196129['removeClass'](Tt,_0x111424);});}}class Ht extends _0x423cf5{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[St,Vt];}['init'](){const _0x36e9bc=this['editor'],_0x577084=_0x36e9bc['plugins']['get'](St),_0x5229bf=_0x36e9bc['plugins']['get'](Vt);_0x36e9bc['ui']['componentFactory']['add']('exitToEditing',_0x1f7cf2=>{const _0x32c609=new _0x10f1f7(_0x1f7cf2);return _0x32c609['set']({'label':wt(_0x1f7cf2,'Back\x20to\x20editing'),'icon':_0x4fa6d4,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x32c609,'execute',()=>{_0x36e9bc['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x32c609;}),_0x36e9bc['ui']['componentFactory']['add']('restoreRevision',_0x292163=>{const _0x35f0e4=new _0x10f1f7(_0x292163);return _0x35f0e4['set']({'label':wt(_0x292163,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x35f0e4['bind']('isEnabled')['to'](_0x36e9bc['commands']['get']('restoreRevision')),this['listenTo'](_0x35f0e4,'execute',()=>_0x36e9bc['execute']('restoreRevision')),_0x35f0e4;}),_0x36e9bc['ui']['componentFactory']['add']('changesNavigation',_0x4d3c6d=>{const _0x9d9c18=new Dt(_0x4d3c6d),_0x18cf3c=_0x36e9bc['commands']['get']('showPreviousChange'),_0x4744b9=_0x36e9bc['commands']['get']('showNextChange');return _0x9d9c18['bind']('isBackwardNavigationEnabled')['to'](_0x18cf3c,'isEnabled'),_0x9d9c18['bind']('isForwardNavigationEnabled')['to'](_0x4744b9,'isEnabled'),_0x9d9c18['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x577084),this['listenTo'](_0x9d9c18,'execute',(_0x40da43,_0x1d7683)=>{_0x36e9bc['execute']('forward'===_0x1d7683?'showNextChange':'showPreviousChange');}),_0x9d9c18;}),_0x5229bf['show'](),_0x577084['on']('change:isReady',(_0x564277,_0x270901,_0x3fb4ed)=>{_0x3fb4ed?_0x5229bf['hide']():_0x5229bf['show']();});}}class Pt extends _0x5ebc62{['_resizeObserver']=null;constructor(_0x5afdb8,_0x27f329){super(_0x5afdb8,_0x27f329);const _0x42b2d8=this['bindTemplate'];this['set']({'label':wt(_0x5afdb8,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=wt(_0x5afdb8,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x42b2d8['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x4bf36b(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0xa9f357=this['fieldView']['element'];this['_tooltipString']=_0xa9f357['scrollWidth']>_0xa9f357['clientWidth']&&_0xa9f357['value']||'';}}class Ut extends _0x24e188{constructor(_0x281725,_0x4b0e55,_0x461857){super(_0x281725);const _0x45aa72=new nt();_0x45aa72['set']({'content':_0x5d0931,'viewBox':'0\x200\x2011\x2010'});const _0x5dc51d=['ck','ck-revision-history-sidebar__revision-author'];_0x461857&&_0x5dc51d['push']('ck-revision-history-sidebar__revision-author_creator');const _0x9b63a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':wt(_0x281725,_0x461857?'Revision\x20creator':'Revision\x20author')},'children':[_0x45aa72,_0x4b0e55['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x5dc51d},'children':_0x9b63a});}}function Lt(_0x2fc80f,_0x272823){const _0x24c501=_0x2fc80f['bindTemplate'],_0x4b3434=_0x2fc80f['locale'],_0x3d3faf=_0x1abb83(_0x4b3434);_0x3d3faf['panelPosition']='sw';const _0x341317=function(_0x3489e4,_0x5230b7){const _0x59b3d2=function(_0x5f3183,_0x1b5a19){const _0x1453d0=_0x5f3183['locale'],_0x315aa0={'Compare\x20against\x20selected':wt(_0x1453d0,'Compare\x20against\x20selected'),'Name\x20this\x20revision':wt(_0x1453d0,'Name\x20this\x20revision'),'Restore\x20this\x20revision':wt(_0x1453d0,'Restore\x20this\x20revision')};return _0x1b5a19['map'](_0x6838e2=>{const _0x5833a6=_0x315aa0[_0x6838e2['name']];return _0x5833a6&&_0x5833a6!==_0x6838e2['name']&&(_0x6838e2['name']=_0x5833a6),_0x6838e2;});}(_0x3489e4,_0x5230b7),_0x525004=new _0x239ef9();for(const _0x2fc920 of _0x59b3d2){const _0x415aae={'type':'button','model':new rt({'label':_0x2fc920['name'],'class':_0x2fc920['class'],'withText':!0x0,'role':'menuitem','_action':_0x2fc920['action']})};_0x415aae['model']['bind']('isEnabled')['to'](_0x3489e4,'isActionsDropdownOpen',_0x22741e=>'function'!=typeof _0x2fc920['isEnabled']||(!_0x22741e||_0x2fc920['isEnabled'](_0x3489e4))),_0x525004['add'](_0x415aae);}return _0x525004;}(_0x2fc80f,_0x272823);return _0x2fc80f['bind']('isActionsDropdownOpen')['to'](_0x3d3faf,'isOpen'),_0x3d3faf['buttonView']['set']({'label':wt(_0x4b3434,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1d6e8c}),_0x3d3faf['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x24c501['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x24c501['to'](_0x26f257=>_0x26f257['stopPropagation']())}}),_0x3d3faf['on']('execute',_0x3d1f22=>{_0x2fc80f['isReady']&&'function'==typeof _0x3d1f22['source']['_action']&&_0x3d1f22['source']['_action'](_0x2fc80f);}),ot(_0x3d3faf,_0x341317,{'role':'menu'}),_0x3d3faf['listenTo'](_0x2fc80f,'change:isActionsDropdownOpen',(_0x147ed6,_0x2f26ce,_0x4da20b)=>{if(_0x4da20b)for(const _0x2f8a0e of _0x3d3faf['listView']['items']){const _0x44425d=_0x2f8a0e['children']['first'],_0x43226c=_0x272823['find'](_0x3c2173=>_0x3c2173['action']===_0x44425d['_action'])['isVisible'];_0x2f8a0e['isVisible']=void 0x0===_0x43226c||_0x43226c(_0x2fc80f);}}),_0x3d3faf;}class Ft extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0x1acefc,uid as _0x5c98de,Collection as _0x17e3cb,logWarning as _0x4e5052,FocusTracker as _0x3b43a6,KeystrokeHandler as _0x6b7b7c,scrollViewportToShowTarget as _0x576bae,ResizeObserver as _0x2d8cd3,ElementReplacer as _0x46f688,CKEditorError as _0x1dfaa4}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x3a9bd2,set as _0x3fd1b2,unset as _0x4db77e,isEqual as _0x276e38}from'es-toolkit/compat';import{Plugin as _0x251d17,PendingActions as _0x50dc16,Command as _0x559121,ElementApiMixin as _0x2138f0,Editor as _0x232bce}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x6289f9,getMarkerDomElement as _0x580c97,ConfirmMixin as _0x29a165,sanitizeEditorConfig as _0x4a750c}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x2ce127,ViewAttributeElement as _0x1b83b2,ViewEmptyElement as _0x30ea06,ViewRawElement as _0x1c54e3,ViewUIElement as _0x1245d9,ViewDocumentFragment as _0x1be868,ViewText as _0x44695d,ViewElement as _0x2fd047,ModelElement as _0x4aadeb,ModelRange as _0x5f3a67,ModelPosition as _0x5d605f,ModelDocumentFragment as _0x2be415,ModelText as _0x5b9a55}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x2dfda0,IconChevronUp as _0x247f49,IconChevronDown as _0x5e93a2,IconUndo as _0x3d9e83,IconUser as _0x4eefda,IconThreeVerticalDots as _0x49b3cd}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x4c7419,View as _0x47f08c,submitHandler as _0x19fe4d,LabeledFieldView as _0x771b7d,createLabeledInputText as _0x5ac4e5,createDropdown as _0x534b7c,ListView as _0x4f0ca9,ListItemView as _0x3db38c,ButtonView as _0x3d94f2,MenuBarMenuView as _0x1ccc45,MenuBarMenuListView as _0x3c7407,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as st,ToolbarSeparatorView as et,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as ut,ToolbarView as lt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as ft}from'luxon';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1acefc(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x434d4b){super(),this['id']=_0x434d4b['id']||_0x5c98de(),this['creator']=_0x434d4b['creator']||null,this['authors']=_0x434d4b['authors']||[],this['diffData']=_0x434d4b['diffData']||null,this['toVersion']=_0x434d4b['toVersion']||0x0,this['fromVersion']=_0x434d4b['fromVersion']||0x0,this['set']('name',_0x434d4b['name']||''),this['set']('createdAt',_0x434d4b['createdAt']||new Date()),this['set']('attributes',_0x434d4b['attributes']||{});}['setName'](_0x585cdb){this['_update']({'name':_0x585cdb});}['setAttribute'](_0x3afdbe,_0x131021){const _0x4b0cf9=_0x3a9bd2(this['attributes']);_0x3fd1b2(_0x4b0cf9,_0x3afdbe,_0x131021),this['_update']({'attributes':_0x4b0cf9});}['removeAttribute'](_0x2de637){const _0x1ee465=_0x3a9bd2(this['attributes']);_0x4db77e(_0x1ee465,_0x2de637),this['_update']({'attributes':_0x1ee465});}['_update'](_0x4df5d9,_0x9668f6=!0x1){let _0x47de61=!0x1;const _0x25e7c8={'id':this['id']},_0x3c1897=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x28e937 of _0x3c1897){const _0x3e1d30=_0x4df5d9[_0x28e937];void 0x0!==_0x3e1d30&&_0x3e1d30!==this[_0x28e937]&&(this[_0x28e937]=_0x3e1d30,_0x25e7c8[_0x28e937]=_0x3e1d30,_0x47de61=!0x0);}_0x47de61&&(_0x25e7c8['authors']&&(_0x25e7c8['authorsIds']=_0x25e7c8['authors']['map'](_0xaa8680=>_0xaa8680['id']),delete _0x25e7c8['authors']),this['fire']('_update',_0x25e7c8,_0x9668f6));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x42e240=>_0x42e240['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class gt extends _0x251d17{['_revisions'];static get['requires'](){return[_0x6289f9];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x29d969){super(_0x29d969),this['_revisions']=new _0x17e3cb();}['afterInit'](){!async function(_0x2c50f1){const _0xeee21d=_0x131236([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x47b6bd=0xeb829,_0x31ddc6=0x359e09b0,_0x262cef=0x35998c58^_0x31ddc6,_0x2155d1=window[_0x131236([0x44,0x61,0x74,0x65])][_0x131236([0x6e,0x6f,0x77])](),_0x160507=_0x2c50f1[_0x131236([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4224be=new window[(_0x131236([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x46cb7d=>{_0x160507[_0x131236([0x6f,0x6e,0x63,0x65])](_0x131236([0x72,0x65,0x61,0x64,0x79]),_0x46cb7d);}),_0x54d703={[_0x131236([0x6b,0x74,0x79])]:_0x131236([0x45,0x43]),[_0x131236([0x75,0x73,0x65])]:_0x131236([0x73,0x69,0x67]),[_0x131236([0x63,0x72,0x76])]:_0x131236([0x50,0x2d,0x32,0x35,0x36]),[_0x131236([0x78])]:_0x131236([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]),[_0x131236([0x79])]:_0x131236([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]),[_0x131236([0x61,0x6c,0x67])]:_0x131236([0x45,0x53,0x32,0x35,0x36])},_0x4bc077=_0x160507[_0x131236([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x131236([0x67,0x65,0x74])](_0x131236([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x43e395(){let _0x54f85a,_0x527446=null,_0x37096e=null;try{if(_0x4bc077==_0x131236([0x47,0x50,0x4c]))return _0x131236([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x54f85a=_0xe109e6(),!_0x54f85a)return _0x131236([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x54f85a[_0x131236([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x37096e=_0x47e011(_0x54f85a[_0x131236([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x54f85a[_0x131236([0x6a,0x74,0x69])])),await _0x5a9482()?_0x3662f0()?_0x2f9fd1()?_0x131236([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x36efd9()?(_0x54f85a[_0x131236([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x131236([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x527446=_0x1ae891(_0x131236([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x378ee7()):_0x131236([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x131236([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x131236([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x131236([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2f9fd1(){const _0x187e1d=[_0x131236([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x131236([0x74,0x72,0x69,0x61,0x6c])][_0x131236([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54f85a[_0x131236([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2155d1/0x3e8:0xe10*_0x262cef;return _0x54f85a[_0x131236([0x65,0x78,0x70])]<_0x187e1d;}function _0x3662f0(){const _0x1048de=_0x54f85a[_0x131236([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1048de)return!0x1;if(_0x1048de[_0x131236([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x131236([0x2a])))return!0x0;if(_0x1048de[_0x131236([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x131236([0x52,0x48])))return!0x0;if(_0x1048de[_0x131236([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x131236([0x52,0x52,0x48]))){if(_0x242735())return!0x0;if(_0x5b16d0()||_0x6a71ae())return!0x0;}return!0x1;}function _0x36efd9(){const _0x3a00d9=_0x54f85a[_0x131236([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a00d9||0x0==_0x3a00d9[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x323eec}=new URL(window[_0x131236([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3a00d9[_0x131236([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x323eec))return!0x0;const _0x421023=_0x323eec[_0x131236([0x73,0x70,0x6c,0x69,0x74])](_0x131236([0x2e]));return _0x3a00d9[_0x131236([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x474502=>_0x474502[_0x131236([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x131236([0x2a])))[_0x131236([0x6d,0x61,0x70])](_0x1089f4=>_0x1089f4[_0x131236([0x73,0x70,0x6c,0x69,0x74])](_0x131236([0x2e])))[_0x131236([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1d7ada=>_0x1d7ada[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x421023[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x131236([0x6d,0x61,0x70])](_0x4c9a1c=>Array(_0x421023[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4c9a1c[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x131236([0x66,0x69,0x6c,0x6c])](_0x4c9a1c[0x0]===_0x131236([0x2a])?_0x131236([0x2a]):'')[_0x131236([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4c9a1c))[_0x131236([0x73,0x6f,0x6d,0x65])](_0x3d019a=>_0x421023[_0x131236([0x65,0x76,0x65,0x72,0x79])]((_0x508781,_0x563d4b)=>_0x3d019a[_0x563d4b]===_0x508781||_0x3d019a[_0x563d4b]===_0x131236([0x2a])));}function _0x378ee7(){return _0x527446&&_0x37096e?new window[(_0x131236([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1f3fc3,_0x316534)=>{_0x527446[_0x131236([0x74,0x68,0x65,0x6e])](_0x1f3fc3,_0x316534),_0x37096e[_0x131236([0x74,0x68,0x65,0x6e])](_0x5877d0=>{_0x5877d0!=_0x131236([0x56,0x61,0x6c,0x69,0x64])&&_0x1f3fc3(_0x5877d0);},_0x316534);}):_0x527446||_0x37096e||_0x131236([0x56,0x61,0x6c,0x69,0x64]);}}function _0x47e011(_0x10551b,_0x480475){return new window[(_0x131236([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c4186=>{if(_0x1c1a63())return _0x2c4186(_0x131236([0x56,0x61,0x6c,0x69,0x64]));_0x66b83d(),_0x160507[_0x131236([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x131236([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2a16fd=!0x1;const _0x135ee0=_0x5c98de();function _0x15dc25(_0x49c4bf){return!!_0x49c4bf&&(typeof _0x49c4bf===_0x131236([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x49c4bf===_0x131236([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x49c4bf[_0x131236([0x74,0x68,0x65,0x6e])]===_0x131236([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x49c4bf[_0x131236([0x63,0x61,0x74,0x63,0x68])]===_0x131236([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xf395a(_0x31a541){_0x5309af(_0x31a541)[_0x131236([0x74,0x68,0x65,0x6e])](_0x5965dd=>{if(!_0x5965dd||_0x5965dd[_0x131236([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x131236([0x6f,0x6b]))return _0x131236([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x42b57c(_0x1372b2(_0x135ee0+_0x480475))!=_0x5965dd[_0x131236([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x131236([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x131236([0x56,0x61,0x6c,0x69,0x64]);})[_0x131236([0x74,0x68,0x65,0x6e])](_0x4eb299=>(_0x1ff087(),_0x4eb299),()=>{const _0x1dfc1d=_0x398f2a();return null==_0x1dfc1d?(_0x1ff087(),_0x131236([0x56,0x61,0x6c,0x69,0x64])):_0x131236(_0x2155d1-_0x1dfc1d>(0x11928db0^_0x31ddc6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x131236([0x74,0x68,0x65,0x6e])](_0x2c4186)[_0x131236([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2c4186(_0x131236([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2646af=0x35a8e730^_0x31ddc6;function _0x1ff087(){const _0x1a33dd=_0x131236([0x6c,0x6c,0x63,0x74,0x2d])+_0x42b57c(_0x1372b2(_0x10551b)),_0x4729da=_0xe7be4b(_0x42b57c(window[_0x131236([0x4d,0x61,0x74,0x68])][_0x131236([0x63,0x65,0x69,0x6c])](_0x2155d1/_0x2646af)));window[_0x131236([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x131236([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1a33dd,_0x4729da);}function _0x398f2a(){const _0x109b00=_0x131236([0x6c,0x6c,0x63,0x74,0x2d])+_0x42b57c(_0x1372b2(_0x10551b)),_0x2ea825=window[_0x131236([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x131236([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x109b00);return _0x2ea825?window[_0x131236([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xe7be4b(_0x2ea825),0x10)*_0x2646af:null;}function _0x5309af(_0x2ad20a){return new window[(_0x131236([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2225a1,_0x4fd34b)=>{_0x2ad20a[_0x131236([0x74,0x68,0x65,0x6e])](_0x2225a1,_0x4fd34b),window[_0x131236([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4fd34b,0x359fdd70^_0x31ddc6);});}}_0x160507[_0x131236([0x6f,0x6e])](_0x131236([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x566371,_0xb563e4)=>{if(_0xb563e4[0x0]!=_0x10551b)return _0x2c4186(_0x131236([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xb563e4[0x1]={..._0xb563e4[0x1],[_0x131236([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x135ee0};},{[_0x131236([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x131236([0x68,0x69,0x67,0x68])}),_0x160507[_0x131236([0x6f,0x6e])](_0x131236([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3017d6=>{_0x15dc25(_0x3017d6[_0x131236([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2a16fd=!0x0,_0xf395a(_0x3017d6[_0x131236([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x131236([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x131236([0x6c,0x6f,0x77])}),_0x4224be[_0x131236([0x74,0x68,0x65,0x6e])](()=>{_0x2a16fd||_0x2c4186(_0x131236([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1c1a63(){return _0x160507[_0x131236([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x131236([0x76,0x69,0x65,0x77])][_0x131236([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x131236([0x61,0x75,0x74,0x6f]);}function _0x66b83d(){_0x160507[_0x131236([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x131236([0x76,0x69,0x65,0x77])][_0x131236([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x131236([0x61,0x75,0x74,0x6f]);}}function _0x1ae891(_0x12faf7){const _0x101882=[new window[(_0x131236([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33d6ac=>setTimeout(_0x33d6ac,0x3597377c^_0x31ddc6)),_0x4224be[_0x131236([0x74,0x68,0x65,0x6e])](()=>new window[(_0x131236([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c1bf3=>{const _0x2f6569=0x359e09b7^_0x31ddc6,_0xedc850=_0x2c50f1[_0x131236([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0xde10b5(){_0xedc850[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x2f6569&&_0x5c1bf3();}_0xde10b5(),_0xedc850[_0x131236([0x6f,0x6e])](_0x131236([0x61,0x64,0x64]),_0xde10b5);})),new window[(_0x131236([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d59fe=>{function _0x56efa4(){for(const _0x519208 in window)if(window[_0x131236([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x131236([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x519208))&&window[_0x519208]==_0x47b6bd)return _0x1d59fe();_0x160507[_0x131236([0x73,0x74,0x61,0x74,0x65])]!=_0x131236([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x131236([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x56efa4,0x359e1a38^_0x31ddc6);}_0x6f5cee(_0x131236([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x56efa4();})];return window[_0x131236([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x131236([0x72,0x61,0x63,0x65])](_0x101882)[_0x131236([0x74,0x68,0x65,0x6e])](()=>_0x12faf7);}async function _0x5968a4(){if(await _0x4224be,_0x6f5cee(_0x131236([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x263a56=_0x2c50f1[_0x131236([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x32da7b=_0x2c50f1[_0x131236([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])](_0x263a56[_0x131236([0x69,0x64])]),_0x1e72cb=_0xf02264(_0x131236([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1e72cb[_0x131236([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x263a56['id'],_0x32da7b?_0x32da7b['id']:null,!0x0),_0x1e72cb[_0x131236([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x131236([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1e72cb[_0x131236([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1e72cb[_0x131236([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x165ece,void(_0x1e72cb[_0x131236([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x165ece);}if(_0x6f5cee(_0x131236([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x42ffe6=_0xf02264(_0x131236([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x42ffe6[_0x131236([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x131236([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x42ffe6[_0x131236([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x42ffe6[_0x131236([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x165ece,_0x42ffe6[_0x131236([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x165ece;}_0x160507[_0x131236([0x6d,0x6f,0x64,0x65,0x6c])][_0x131236([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x165ece,_0x160507[_0x131236([0x6d,0x6f,0x64,0x65,0x6c])][_0x131236([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x165ece,_0x160507[_0x131236([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x131236([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x242735(){return _0x6f5cee(_0x131236([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xf02264(_0x131236([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x131236([0x73,0x74,0x61,0x74,0x65])]==_0x131236([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5b16d0(){return _0x6f5cee(_0x131236([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 _0x6a71ae(){return _0x6f5cee(_0x131236([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xd4e77(_0x29d701){const _0x14a7a3=_0x7c6abe();_0x160507[_0x14a7a3]=_0x131236([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])+_0x29d701,_0x29d701[_0x131236([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x131236([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x7c6abe()]=_0x47b6bd),_0x29d701!=_0x131236([0x56,0x61,0x6c,0x69,0x64])&&_0x5968a4();}function _0x7c6abe(){const _0x5bd06b=window[_0x131236([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x131236([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x131236([0x6e,0x6f,0x77])]())[_0x131236([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x131236([0x2e]),'');let _0x285fc9=_0x131236([0x76]);for(let _0x36302d=0x0;_0x36302d<_0x5bd06b[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x36302d+=0x2){let _0x38604c=window[_0x131236([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5bd06b[_0x131236([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x36302d,_0x36302d+0x2));_0x38604c>=_0xeee21d[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x38604c-=_0xeee21d[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x285fc9+=_0xeee21d[_0x38604c];}return _0x285fc9;}function _0xe109e6(){const _0x231d0c=_0x4bc077[_0x131236([0x73,0x70,0x6c,0x69,0x74])](_0x131236([0x2e]));if(0x3!=_0x231d0c[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x48a4f0(_0x231d0c[0x1]);function _0x48a4f0(_0x5381e5){const _0x126bef=_0x449f4b(_0x5381e5);return _0x126bef&&_0x359cb3()?_0x126bef:null;function _0x359cb3(){const _0x3c494d=_0x126bef[_0x131236([0x6a,0x74,0x69])],_0x56e987=window[_0x131236([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3c494d[_0x131236([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3c494d[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x17a595={..._0x126bef,[_0x131236([0x6a,0x74,0x69])]:_0x3c494d[_0x131236([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3c494d[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x17a595[_0x131236([0x76,0x63])],_0x1372b2(_0x17a595)==_0x56e987;}}}async function _0x5a9482(){let _0x5522b5=!0x0;try{const _0x13e532=_0x4bc077[_0x131236([0x73,0x70,0x6c,0x69,0x74])](_0x131236([0x2e])),[_0x4c83b2,_0x38fb7b,_0x12512e]=_0x13e532;return _0x1b26d8(_0x4c83b2),await _0x3e391b(_0x4c83b2,_0x38fb7b,_0x12512e),_0x5522b5;}catch{return!0x1;}function _0x1b26d8(_0x16e7ad){const _0x3e8b6a=_0x449f4b(_0x16e7ad);_0x3e8b6a&&_0x3e8b6a[_0x131236([0x61,0x6c,0x67])]==_0x131236([0x45,0x53,0x32,0x35,0x36])||(_0x5522b5=!0x1);}async function _0x3e391b(_0x402d9c,_0x47993f,_0x13f88a){const _0x3faa3b=window[_0x131236([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x131236([0x66,0x72,0x6f,0x6d])](_0x2c8a05(_0x13f88a),_0x14c389=>_0x14c389[_0x131236([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x28b487=new window[(_0x131236([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x131236([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x402d9c+_0x131236([0x2e])+_0x47993f),_0x307366=window[_0x131236([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x131236([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x307366)return;const _0x178977=await _0x307366[_0x131236([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x131236([0x6a,0x77,0x6b]),_0x54d703,{[_0x131236([0x6e,0x61,0x6d,0x65])]:_0x131236([0x45,0x43,0x44,0x53,0x41]),[_0x131236([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x131236([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x131236([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x307366[_0x131236([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x131236([0x6e,0x61,0x6d,0x65])]:_0x131236([0x45,0x43,0x44,0x53,0x41]),[_0x131236([0x68,0x61,0x73,0x68])]:{[_0x131236([0x6e,0x61,0x6d,0x65])]:_0x131236([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x178977,_0x3faa3b,_0x28b487)||(_0x5522b5=!0x1);}}function _0x449f4b(_0x3bf077){return _0x3bf077[_0x131236([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x131236([0x65,0x79]))?JSON[_0x131236([0x70,0x61,0x72,0x73,0x65])](_0x2c8a05(_0x3bf077)):null;}function _0x2c8a05(_0x160db5){return window[_0x131236([0x61,0x74,0x6f,0x62])](_0x160db5[_0x131236([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x131236([0x2b]))[_0x131236([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x131236([0x2f])));}function _0x1372b2(_0x76de2d){let _0x4053cb=0x1505;function _0x45fb4d(_0x1bb0ca){for(let _0x30c09b=0x0;_0x30c09b<_0x1bb0ca[_0x131236([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x30c09b++){const _0x9b1beb=_0x1bb0ca[_0x131236([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x30c09b);_0x4053cb=(_0x4053cb<<0x5)+_0x4053cb+_0x9b1beb,_0x4053cb&=_0x4053cb;}}function _0x46a96a(_0x55844c){Array[_0x131236([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x55844c)?_0x55844c[_0x131236([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x46a96a):_0x55844c&&typeof _0x55844c==_0x131236([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x131236([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x55844c)[_0x131236([0x73,0x6f,0x72,0x74])]()[_0x131236([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3c2290,_0x1ff7f2])=>{_0x45fb4d(_0x3c2290),_0x46a96a(_0x1ff7f2);}):_0x45fb4d(window[_0x131236([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x55844c));}return _0x46a96a(_0x76de2d),_0x4053cb>>>0x0;}function _0x42b57c(_0x41a6c2){return _0x41a6c2[_0x131236([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x131236([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x131236([0x30]));}function _0xe7be4b(_0x2d0909){return _0x2d0909[_0x131236([0x73,0x70,0x6c,0x69,0x74])]('')[_0x131236([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x131236([0x6a,0x6f,0x69,0x6e])]('');}function _0x6f5cee(_0x459fb3){return _0x160507[_0x131236([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x131236([0x68,0x61,0x73])](_0x459fb3);}function _0xf02264(_0x1d01c0){return _0x160507[_0x131236([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x131236([0x67,0x65,0x74])](_0x1d01c0);}function _0x165ece(){}function _0x131236(_0x467346){return _0x467346['map'](_0x29206b=>String['fromCharCode'](_0x29206b))['join']('');}_0xd4e77(await _0x43e395());}(this);}['createRevision'](_0x2aa5bb){const _0x497cd2=this['editor']['plugins']['get']('Users');return new vt({'id':_0x2aa5bb['id'],'name':_0x2aa5bb['name'],'creator':_0x2aa5bb['creatorId']?_0x497cd2['getUser'](_0x2aa5bb['creatorId']):null,'diffData':_0x2aa5bb['diffData']||_0x2aa5bb['data'],'authors':_0x2aa5bb['authorsIds']['map'](_0x46cc7c=>_0x497cd2['getUser'](_0x46cc7c)),'createdAt':new Date(_0x2aa5bb['createdAt']),'attributes':_0x2aa5bb['attributes'],'fromVersion':_0x2aa5bb['fromVersion'],'toVersion':_0x2aa5bb['toVersion']});}['addRevision'](_0x273de5,_0xd92bd5=0x0){this['_revisions']['add'](_0x273de5,_0xd92bd5);}['getRevision'](_0x1e008d){return this['_revisions']['get'](_0x1e008d);}['getRevisions'](_0x391870={'toJSON':!0x1}){const _0x1b128a=Array['from'](this['_revisions']);return _0x1b128a['reverse'](),_0x391870['toJSON']?_0x1b128a['map'](_0x54ba6f=>_0x54ba6f['toJSON']()):_0x1b128a;}['getIndex'](_0x1b8280){return this['_revisions']['getIndex'](_0x1b8280);}['getEarlierVisibleRevision'](_0x5b4b5a){const [,_0x237f07]=this['getRevisionsIterator'](_0x5b4b5a,{'direction':'earlier'});return _0x237f07;}['getLaterVisibleRevision'](_0x2f9005){const [,_0x4dc6b3]=this['getRevisionsIterator'](_0x2f9005,{'direction':'later'});return _0x4dc6b3;}['getRevisionsInDiff'](_0x30d78e){const _0x21c5ab=[];for(const _0x59d5fc of this['getRevisionsIterator'](_0x30d78e['newRevisionId']))if(_0x21c5ab['push'](_0x59d5fc),_0x59d5fc['id']===_0x30d78e['oldRevisionId'])break;return _0x21c5ab;}*['getRevisionsIterator'](_0x44c85f,{direction:_0x117daa='earlier',filter:_0x4b8bda=()=>!0x0}={}){const _0x4caf81='earlier'===_0x117daa?0x1:-0x1;let _0x459687=this['_revisions']['get'](_0x44c85f),_0x2fd296=this['getIndex'](_0x459687);for(yield _0x459687;_0x459687;){if(_0x2fd296+=_0x4caf81,_0x459687=this['getRevision'](_0x2fd296),!_0x459687)return;_0x4b8bda(_0x459687)&&(yield _0x459687);}}}class mt extends _0x251d17{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2ce127,'c'],[_0x1b83b2,'a'],[_0x30ea06,'e'],[_0x1c54e3,'r'],[_0x1245d9,'u']]);['_typeCharToViewClass']=new Map([['c',_0x2ce127],['a',_0x1b83b2],['e',_0x30ea06],['r',_0x1c54e3],['u',_0x1245d9]]);async['loadRevisionData'](_0x3f6d33,_0x411a3e){if(_0x3f6d33['diffData']||!_0x411a3e)return;const _0x46ff3a=this['editor']['config']['get']('collaboration.channelId'),_0x40d092=await _0x411a3e['getRevision']({'channelId':_0x46ff3a,'revisionId':_0x3f6d33['id']});_0x3f6d33['diffData']=_0x40d092['diffData'];}['getRevisionDocumentData'](_0x305af1){const _0x108663={};for(const _0x4168e2 in _0x305af1['diffData']){if(_0x305af1['diffData'][_0x4168e2]['attachChange']&&!_0x305af1['diffData'][_0x4168e2]['attachChange']['isAttached'])continue;const _0x50ab43=this['_removeRevisionMarkers'](JSON['parse'](_0x305af1['diffData'][_0x4168e2]['insertions'])),_0x49284a=this['editor']['editing']['view']['document'],_0x3fc03c=new _0x1be868(_0x49284a,_0x50ab43['map'](_0x1b3798=>this['_getViewFromDiffObj'](_0x1b3798,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x108663[_0x4168e2]=this['editor']['data']['processor']['toData'](_0x3fc03c),this['editor']['data']['processor']['useFillerType']('default');}return _0x108663;}['getRevisionRootsAttributes'](_0x1526ab){const _0x913073={};for(const _0x5287b5 in _0x1526ab['diffData'])_0x1526ab['diffData'][_0x5287b5]['attachChange']&&!_0x1526ab['diffData'][_0x5287b5]['attachChange']['isAttached']||(_0x913073[_0x5287b5]=_0x1526ab['diffData'][_0x5287b5]['attributesAfter']||{});return _0x913073;}['_getTypeCharForViewElement'](_0x1caa31){return this['_viewClassToTypeChar']['get'](_0x1caa31['constructor']);}['_getViewFromDiffObj'](_0x266e4f,_0x5be4b6){const _0x2abb70=this['editor']['editing']['view']['document'];if('string'==typeof _0x266e4f)return new _0x44695d(_0x2abb70,_0x266e4f);{let _0x46075e,_0x161862;_0x161862='u'==_0x266e4f['type']||'r'==_0x266e4f['type']?[]:_0x266e4f['children']['map'](_0x40de58=>this['_getViewFromDiffObj'](_0x40de58,_0x5be4b6));const _0xeed469=this['_typeCharToViewClass']['get'](_0x266e4f['type'])||_0x2fd047,_0x5aa27e=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x46075e=new _0xeed469(_0x2abb70,_0x266e4f['name'],_0x266e4f['attributes'],_0x161862),'u'==_0x266e4f['type']&&_0x266e4f['children'][0x0]){const _0x3be7cf=_0x266e4f['children'][0x0];if(_0x46075e['render']=function(_0x918ff2){const _0x473773=_0x918ff2['createElement']('div');return _0x473773['innerHTML']=_0x3be7cf,_0x473773['childNodes'][0x0];},_0x5be4b6){const _0x222bfa=new _0x1be868(_0x2abb70);_0x222bfa['_appendChild'](_0x46075e);const _0x45bc65=Array['from'](_0x5aa27e['viewChildrenToDom'](_0x222bfa,{'bind':!0x1})),_0x567bf4=_0x5aa27e['domDocument']['createElement']('div');_0x567bf4['append'](..._0x45bc65),_0x46075e=Array['from'](_0x5aa27e['domChildrenToView'](_0x567bf4))[0x0];}}else{if('r'==_0x266e4f['type']&&_0x266e4f['children'][0x0]){const _0x201ab0=_0x266e4f['children'][0x0];if(_0x46075e['render']=function(_0x28bf8b){_0x28bf8b['innerHTML']=_0x201ab0;},_0x5be4b6){const _0x53884f=new _0x1be868(_0x2abb70);_0x53884f['_appendChild'](_0x46075e);const _0x1a7c43=Array['from'](_0x5aa27e['viewChildrenToDom'](_0x53884f,{'bind':!0x1})),_0x4a6386=_0x5aa27e['domDocument']['createElement']('div');_0x4a6386['append'](..._0x1a7c43);const _0x4f4d30=Array['from'](_0x5aa27e['domChildrenToView'](_0x4a6386));_0x4f4d30['length']>0x1?_0x46075e['_appendChild'](_0x4f4d30):_0x46075e=_0x4f4d30[0x0];}}}if(_0x266e4f['customProperties']){for(const [_0x17587e,_0x5f4d6d]of _0x266e4f['customProperties'])_0x46075e['_setCustomProperty'](_0x17587e,_0x5f4d6d);}const _0xe04f84=void 0x0===_0x266e4f['fillerOffset']?null:_0x266e4f['fillerOffset'];return null!==_0xe04f84&&(_0x46075e['getFillerOffset']=()=>_0xe04f84),_0x46075e;}}['_makeModelFromViewString'](_0x3d0e67){const _0x6c1507=JSON['parse'](_0x3d0e67),_0x156380=this['editor']['editing']['view']['document'],_0x628d80=new _0x1be868(_0x156380,_0x6c1507['map'](_0x4df6e3=>this['_getViewFromDiffObj'](_0x4df6e3,!0x0)));return this['editor']['data']['toModel'](_0x628d80);}['_removeRevisionMarkers'](_0x48e9d9){return(_0x48e9d9=_0x48e9d9['filter'](_0xea0caa=>!_0xea0caa['name']||'revision-start'!==_0xea0caa['name']&&'revision-end'!==_0xea0caa['name']))['forEach'](_0x528be6=>{'string'!=typeof _0x528be6&&(_0x528be6['children']=this['_removeRevisionMarkers'](_0x528be6['children']),_0x528be6['attributes']=_0x528be6['attributes']['filter'](_0x5cdde7=>!_0x5cdde7[0x0]['startsWith']('data-revision-')));}),_0x48e9d9;}}function wt(_0x5c09cc,_0x57ccad,_0x5f4748){const t=_0x5c09cc['t'];switch(_0x57ccad){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'},_0x5f4748);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5f4748);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 pt extends _0x251d17{['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[_0x6289f9,gt,mt,_0x50dc16];}constructor(_0xc7d105){super(_0xc7d105),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new _t(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x34e8dc=_0x5c98de();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x34e8dc},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 _0x39790f=this['repository']['getRevision'](0x0),_0x55944b=_0x39790f&&null===_0x39790f['creator']?_0x39790f:null;if(this['_continueCurrentRevision']=!!_0x55944b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x243de3=this['_source']['getCurrentRevisionId'](),_0x3ee696=this['repository']['getRevision'](_0x243de3);if(_0x3ee696)this['_startingVersion']=_0x3ee696['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x5a13da=this['_source']['history']['_operations']['find'](_0x42ac9c=>!_0x42ac9c['_isInit']),_0x139521=_0x5a13da?_0x5a13da['baseVersion']:this['_source']['history']['version'];_0x39790f?(_0x39790f['toVersion']<_0x139521&&_0x39790f['_update']({'toVersion':_0x139521}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x55944b['id'],this['_startingVersion']=_0x55944b['fromVersion']):(this['_startingVersion']=_0x39790f['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x139521,this['_continueCurrentRevision']=!0x1);}}else _0x55944b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x55944b['toVersion'],this['editor']['model']['document']['history']['version']),_0x55944b['fromVersion']===_0x55944b['toVersion']?(0x0!==_0x55944b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x55944b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x55944b['id'],this['_startingVersion']=_0x55944b['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',_0x324a25=>!_0x324a25),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x354f2c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x240157;for(const _0x29c299 in _0x354f2c){const _0x39f157=_0x29c299,_0x33b85a=_0x354f2c[_0x39f157];if('revisionHistoryLicenseKeyValid'==_0x33b85a||'revisionHistoryLicenseKeyInvalid'==_0x33b85a||'revisionHistoryLicenseKeyExpired'==_0x33b85a||'revisionHistoryLicenseKeyDomainLimit'==_0x33b85a||'revisionHistoryLicenseKeyNotAllowed'==_0x33b85a||'revisionHistoryLicenseKeyEvaluationLimit'==_0x33b85a||'revisionHistoryLicenseKeyUsageLimit'==_0x33b85a){delete _0x354f2c[_0x39f157],_0x240157=_0x33b85a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x240157&&_0x354f2c['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x240157&&_0x354f2c['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x240157&&_0x354f2c['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x240157&&_0x354f2c['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x240157&&_0x354f2c['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x240157&&_0x354f2c['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0xec208d=this['repository']['getRevision'](0x0),_0x3b7d31=await this['getRevisionDocumentData'](_0xec208d),_0xa5da5a=await this['getRevisionRootsAttributes'](_0xec208d);this['_replaceEditorDataWithRevisionData'](_0x3b7d31,_0xa5da5a);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x34e389){this['_source']=_0x34e389;}async['update'](){const _0x6b69ae=await this['_source']['getLatestVersion']();if(_0x6b69ae>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5e00f4=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x6b69ae});_0x5e00f4['authors']=_0x5e00f4['authorsIds']['map'](_0x2293f1=>this['editor']['plugins']['get']('Users')['getUser'](_0x2293f1)),this['currentRevision']['_update'](_0x5e00f4);}}async['saveRevision'](_0x68d138={},_0x440c56=null){const _0x3760ba=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x440c56>this['currentRevision']['toVersion']&&(_0x440c56=null),null===_0x440c56&&(_0x440c56=await this['_source']['getLatestVersion']());const _0x3a4e5e=this['_getFromVersion'](_0x440c56),_0x52f954=this['buildRevisionData']({'from':_0x3a4e5e,'to':_0x440c56});if(this['currentRevision']['toVersion']<_0x440c56){const _0x420234=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x440c56,'to':_0x440c56});_0x420234['authors']=[],_0x420234['authorsIds']=[],_0x420234['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x420234,!0x0),delete _0x420234['authors'],_0x3760ba['push'](_0x420234);}_0x68d138['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x68d138['name']=_0x68d138['name']||null,_0x68d138['id']=_0x68d138['id']||_0x5c98de(),_0x68d138={..._0x68d138,..._0x52f954};const _0x4759e0=this['addRevisionData'](_0x68d138);_0x3760ba['push'](_0x68d138);const _0x438eb2=this['repository']['getIndex'](_0x4759e0);if(0x0!==_0x438eb2){const _0x4b408e=this['repository']['getRevision'](_0x438eb2-0x1);if(_0x4b408e['fromVersion']!==_0x440c56){const _0x2f8abe=this['_revisionDataBuilder']['getData'](_0x440c56,_0x4b408e['toVersion']),_0x5696c0={'id':_0x4b408e['id'],'diffData':_0x2f8abe['diffData'],'authorsIds':_0x2f8abe['authorsIds'],'authors':_0x2f8abe['authorsIds']['map'](_0x379c8f=>this['editor']['plugins']['get']('Users')['getUser'](_0x379c8f)),'fromVersion':_0x440c56};_0x4b408e===this['currentRevision']&&(_0x5696c0['createdAt']=new Date(_0x68d138['createdAt']['getTime']()+0xa)),_0x4b408e['_update'](_0x5696c0,!0x0),delete _0x5696c0['authors'],_0x3760ba['push'](_0x5696c0);}}if(this['adapter']){for(const _0x33762e of _0x3760ba)this['_bufferUpdate'](_0x33762e['id'],_0x33762e,!0x0);this['sendBufferedUpdates']();}return _0x4759e0;}['addRevisionData'](_0x51f534){const _0x472cee=this['repository']['createRevision'](_0x51f534);return this['adapter']&&_0x472cee['on']('_update',(_0x44c6ca,_0xf10567,_0x449ca3)=>{_0x449ca3||(this['_bufferUpdate'](_0xf10567['id'],_0xf10567,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x472cee,this['_findInsertionIndex'](_0x472cee)),_0x472cee;}async['getRevisionDocumentData'](_0xca1649){return await this['_utils']['loadRevisionData'](_0xca1649,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xca1649);}async['getRevisionRootsAttributes'](_0x5a25b0){return await this['_utils']['loadRevisionData'](_0x5a25b0,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5a25b0);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x325472=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x57304a=0x0;_0x57304a<_0x325472['length'];_0x57304a++){const _0x5e4c3b=_0x325472[_0x57304a];let _0x3eca1a=!0x1;for(const _0x241f8f of Object['keys'](_0x5e4c3b))void 0x0===_0x5e4c3b[_0x241f8f]?delete _0x5e4c3b[_0x241f8f]:'id'!==_0x241f8f&&(_0x3eca1a=!0x0);_0x3eca1a||(_0x325472[_0x57304a]=null);}if(_0x325472=_0x325472['filter'](_0x489075=>null!==_0x489075),!_0x325472['length'])return;for(let _0x35177a=0x0;_0x35177a<_0x325472['length'];_0x35177a++){const _0x19cf74=_0x325472[_0x35177a];void 0x0!==_0x19cf74['fromVersion']&&void 0x0===_0x19cf74['toVersion']&&(_0x19cf74['toVersion']=this['repository']['getRevision'](_0x19cf74['id'])['toVersion']),void 0x0!==_0x19cf74['toVersion']&&void 0x0===_0x19cf74['fromVersion']&&(_0x19cf74['fromVersion']=this['repository']['getRevision'](_0x19cf74['id'])['fromVersion']);}const _0x212026=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x325472,_0x212026)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x203a79=>{if(_0x203a79){for(const _0x2bd8b3 of _0x203a79)this['setRevisionData']({'id':_0x2bd8b3['id'],'createdAt':_0x2bd8b3['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x15214f=null,from:_0x33af40=null,to:_0x5ea1bf=null}){_0x33af40=null!==_0x33af40?_0x33af40:_0x15214f['fromVersion'],_0x5ea1bf=null!==_0x5ea1bf?_0x5ea1bf:_0x15214f['toVersion'];const _0x5301d6=this['_revisionDataBuilder']['getData'](_0x33af40,_0x5ea1bf),_0x305579={'diffData':_0x5301d6['diffData'],'authorsIds':_0x5301d6['authorsIds'],'fromVersion':_0x33af40,'toVersion':_0x5ea1bf};if(!_0x15214f||_0x5ea1bf!==_0x15214f['toVersion']){const _0x1cb6fd=_0x5ea1bf-0x1,_0x8b7d0e=this['_source']['history']['getOperation'](_0x1cb6fd);_0x305579['createdAt']=_0x8b7d0e&&_0x8b7d0e['createdAt']||new Date();}if(this['_loadedStateData']&&_0x33af40===this['_loadedStateData']['fromVersion']){for(const _0x4063f9 of this['_loadedStateData']['authors'])_0x305579['authorsIds']['includes'](_0x4063f9['id'])||_0x305579['authorsIds']['push'](_0x4063f9['id']);}return _0x305579;}['_bufferUpdate'](_0x38ba95,_0x3ed9dc,_0x2cb9ef){if(this['_bufferedUpdates']['has'](_0x38ba95)){const _0x12786d=this['_bufferedUpdates']['get'](_0x38ba95);_0x3ed9dc=_0x2cb9ef?{..._0x12786d,..._0x3ed9dc}:{..._0x3ed9dc,..._0x12786d};}this['_bufferedUpdates']['set'](_0x38ba95,_0x3ed9dc);}['setRevisionData'](_0x5edf44){const _0x38ebec=this['repository']['getRevision'](_0x5edf44['id']);if(_0x5edf44['createdAt']&&(_0x5edf44['createdAt']=new Date(_0x5edf44['createdAt'])),_0x5edf44['authorsIds']){const _0x57637b=this['editor']['plugins']['get']('Users');_0x5edf44['authors']=_0x5edf44['authorsIds']['map'](_0x214bc0=>_0x57637b['getUser'](_0x214bc0));}_0x38ebec['_update'](_0x5edf44,!0x0);}['_createInitialRevision'](_0x4ee880){const _0x23a241=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x23a241)this['_initialRevisionId']=_0x23a241['id'];else{const _0x5e0b7b=!this['editor']['model']['document']['roots']['find'](_0x3e51ec=>this['editor']['model']['hasContent'](_0x3e51ec)),_0x433c2d=this['editor']['plugins']['get']('Users')['me']['id'],_0x3f26e9=wt(this['editor']['locale'],_0x5e0b7b?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4ee880,'to':_0x4ee880,'id':this['_initialRevisionId'],'name':_0x3f26e9,'creatorId':_0x433c2d});}}['_createCurrentRevision'](_0x1acd11){const _0x2255b7=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2255b7),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1acd11,'to':_0x1acd11,'id':_0x2255b7,'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'](_0x2e4856,_0x53491b){const _0x5da0ba={},_0x44f46c={},_0x442477=this['editor']['config']['get']('roots')||{};for(const [_0x2b3a63,_0x58ef53]of Object['entries'](_0x442477))_0x58ef53['lazyLoad']||(_0x5da0ba[_0x2b3a63]=_0x58ef53['initialData']??'',_0x44f46c[_0x2b3a63]=_0x58ef53['modelAttributes']||{});for(const _0x13b79e of this['editor']['model']['document']['getRootNames']())_0x5da0ba[_0x13b79e]??='',_0x44f46c[_0x13b79e]??={};let _0x47e8fd=!0x1;const _0x2c2322=Object['keys'](_0x5da0ba),_0x2c81ff=Object['keys'](_0x2e4856);for(const _0x5803b6 of _0x2c2322){if(_0x5da0ba[_0x5803b6]!==_0x2e4856[_0x5803b6]&&''!==_0x5da0ba[_0x5803b6]['trim']()){_0x47e8fd=!0x0;break;}if(!_0x276e38(_0x44f46c[_0x5803b6],_0x53491b[_0x5803b6])&&Object['keys'](_0x44f46c[_0x5803b6])['length']>0x0){_0x47e8fd=!0x0;break;}}_0x47e8fd||(_0x47e8fd=_0x2c81ff['some'](_0x13a7d1=>!this['editor']['model']['document']['getRoot'](_0x13a7d1))),_0x47e8fd&&_0x4e5052('editor-initial-data-replaced-with-revision-data',{'editorData':_0x5da0ba,'editorRootsAttributes':_0x44f46c,'revisionData':_0x2e4856,'revisionRootsAttributes':_0x53491b});for(const [_0x6bb253,_0x1e605d]of Object['entries'](_0x2e4856))this['editor']['config']['set']('roots.'+_0x6bb253+'.initialData',_0x1e605d);for(const [_0x23c6a2,_0x22b8a0]of Object['entries'](_0x53491b))this['editor']['config']['set']('roots.'+_0x23c6a2+'.modelAttributes',_0x22b8a0);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x24b7bb=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x24b7bb['add'](wt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x406ca1){const _0x4c496b=this['repository']['getRevisions']();_0x4c496b['reverse']();let _0x5937c1=0x0;for(;_0x5937c1<_0x4c496b['length'];){const _0x3b46ca=_0x4c496b[_0x5937c1];if(_0x3b46ca===this['currentRevision']){_0x5937c1++;continue;}if(_0x3b46ca['id']===this['_initialRevisionId'])break;const _0x2a4cfb=_0x406ca1['toVersion']-_0x3b46ca['toVersion']||_0x406ca1['fromVersion']-_0x3b46ca['fromVersion'];if(_0x2a4cfb>0x0)break;if(_0x2a4cfb<0x0)_0x5937c1++;else{if(!_0x406ca1['creator']&&_0x3b46ca['creator'])break;if(_0x3b46ca['creator']||!_0x406ca1['creator']){if(_0x406ca1['createdAt']>_0x3b46ca['createdAt'])break;_0x5937c1++;}else _0x5937c1++;}}return _0x5937c1;}['_getFromVersion'](_0x243b9c){const _0x541b6d=this['repository']['getRevisions']();_0x541b6d['reverse'](),_0x541b6d['shift']();const _0x24bf80=_0x541b6d['find'](_0x455ccf=>_0x455ccf['toVersion']<=_0x243b9c)['toVersion'];return _0x24bf80<this['_startingVersion']?this['_startingVersion']:_0x24bf80;}['_makeRevision']({name:_0x544acf,from:_0x185258,to:_0x1040ba,creatorId:_0x329b17,id:_0x94cb25}){const _0x3097e8=this['buildRevisionData']({'from':_0x185258,'to':_0x1040ba});_0x3097e8['name']=_0x544acf,_0x3097e8['creatorId']=_0x329b17,_0x3097e8['id']=_0x94cb25;const _0xfd3328=this['addRevisionData'](_0x3097e8);return this['adapter']&&this['_bufferUpdate'](_0x3097e8['id'],_0x3097e8,!0x0),_0xfd3328;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class _t{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x21e83b){this['editor']=_0x21e83b,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'](_0x2db6a3){this['source']=_0x2db6a3;const _0x56e79a=new Map(),_0x312478=new Map(),_0x29c2b0=this['editor']['model']['document']['roots']['map'](_0xd0e6a0=>_0xd0e6a0['rootName']);for(const _0xa2b0c4 of _0x29c2b0){const _0x32a844=this['editor']['model']['document']['getRoot'](_0xa2b0c4),_0x4c708f=yt(_0x32a844);_0x56e79a['set'](_0xa2b0c4,_0x4c708f),_0x312478['set'](_0xa2b0c4,Object['fromEntries'](_0x32a844['getAttributes']()));}const _0x94aef8=Array['from'](this['editor']['model']['markers'])['map'](_0x16cfac=>[_0x16cfac['name'],_0x16cfac['getRange']()]),_0x5d50ce=this['source']['version'];this['_saveMetaData'](_0x5d50ce,_0x56e79a,_0x94aef8,_0x312478),this['_startingRevisionId']=this['_revisionId'];const _0x2a6e18=new Map(),_0x5194c5=new Map();for(const _0x580b01 of _0x29c2b0){const _0x33a9ce=bt(_0x580b01);_0x2a6e18['set'](_0x580b01,_0x33a9ce),_0x5194c5['set'](_0x580b01,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2a6e18,[],_0x5194c5);}['getData'](_0x41c3f1,_0x166cc2){if(this['_lastFrom']===_0x41c3f1&&this['_lastTo']<=_0x166cc2)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x166cc2,!0x0);else{if(!this['_savedMetaData']['has'](_0x41c3f1)){const _0x4849de=this['_getPreviousFrom'](_0x41c3f1);this['_calculateMetaData'](_0x4849de,_0x41c3f1,!0x1);}this['_calculateMetaData'](_0x41c3f1,_0x166cc2,!0x0);}return this['_lastFrom']=_0x41c3f1,this['_lastTo']=_0x166cc2,this['_getState']();}['loadState'](_0x5975bb){if(!this['_savedMetaData']['has'](_0x5975bb['fromVersion'])){const _0x1a387a=this['_getPreviousFrom'](_0x5975bb['fromVersion']);this['_calculateMetaData'](_0x1a387a,_0x5975bb['fromVersion'],!0x1);}this['_calculateMetaData'](_0x5975bb['fromVersion'],_0x5975bb['toVersion'],!0x1);const _0x11e659=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5975bb['fromVersion'],this['_lastTo']=_0x5975bb['toVersion'];for(const _0x70b00c in _0x5975bb['diffData']){const _0x1b558d=_0x5975bb['diffData'][_0x70b00c]['attachChange'],_0x19a5cc=_0x3a9bd2(_0x5975bb['diffData'][_0x70b00c]['attributesBefore'])||{},_0x8c873=_0x11e659['_makeModelFromViewString'](_0x5975bb['diffData'][_0x70b00c]['deletions']);_0x8c873['rootName']=_0x70b00c,_0x8c873['_isAttached']=!_0x1b558d||!_0x1b558d['isAttached'],_0x8c873['isAttached']=()=>_0x8c873['_isAttached'],this['_baseRoots']['set'](_0x70b00c,_0x8c873),this['_baseRootsAttributes']['set'](_0x70b00c,_0x19a5cc),_0x1b558d&&this['_touchedRoots']['set'](_0x70b00c,_0x1b558d);const _0xe5bdc1=this['_makeIdsRoot'](_0x8c873);this['_baseIdsRoots']['set'](_0x70b00c,_0xe5bdc1);for(const [_0x40a35b,_0xa91fa4]of _0x8c873['markers']){if(!_0x40a35b['startsWith']('revision:'))continue;const _0x41f572=_0x40a35b['split'](':')[0x2];for(const _0x2dbae2 of _0xa91fa4['getWalker']({'singleCharacters':!0x0})){const _0x2fcce6=this['_getVidAttributeName'](_0x2dbae2),_0xad75a9='elementEnd'==_0x2dbae2['type']?_0x2dbae2['previousPosition']['path']['slice'](0x0,-0x1):_0x2dbae2['previousPosition']['path'],_0x229234=_0xe5bdc1['getNodeByPath'](_0xad75a9)['getAttribute'](_0x2fcce6);this['_touched']['set'](_0x229234,{'userId':_0x41f572});}_0x8c873['markers']['delete'](_0x40a35b);}}this['_startingRevisionId']=this['_revisionId'];const _0x35c87b=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x404f11=>!this['_touched']['has'](_0x404f11));let _0x3f3547=0x0;const _0x65d922=new Map();for(const _0x38c70d in _0x5975bb['diffData']){const _0x28fdd1=_0x5975bb['diffData'][_0x38c70d]['attachChange'],_0x30ea00=_0x3a9bd2(_0x5975bb['diffData'][_0x38c70d]['attributesAfter'])||{},_0x35f7f5=_0x11e659['_makeModelFromViewString'](_0x5975bb['diffData'][_0x38c70d]['insertions']);_0x35f7f5['rootName']=_0x38c70d,_0x35f7f5['_isAttached']=!_0x28fdd1||_0x28fdd1['isAttached'],_0x35f7f5['isAttached']=()=>_0x35f7f5['_isAttached'],this['_diffRoots']['set'](_0x38c70d,_0x35f7f5),this['_diffRootsAttributes']['set'](_0x38c70d,_0x30ea00);const _0x21dc86=this['_makeIdsRoot'](_0x35f7f5,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x38c70d,_0x21dc86),_0x65d922['set'](_0x38c70d,_0x35f7f5['isAttached']()?_0x30ea00:{});for(const [_0x8088d1,_0x10cdc6]of _0x35f7f5['markers']){if(!_0x8088d1['startsWith']('revision:'))continue;const _0x5beb82=_0x8088d1['split'](':')[0x2];for(const _0x57a105 of _0x10cdc6['getWalker']({'singleCharacters':!0x0})){const _0x3b1875=this['_getVidAttributeName'](_0x57a105),_0x4fc110=this['_revisionId']++,_0x1fcbc9='elementEnd'==_0x57a105['type']?_0x57a105['previousPosition']['path']['slice'](0x0,-0x1):_0x57a105['previousPosition']['path'];_0x21dc86['getNodeByPath'](_0x1fcbc9)['_setAttribute'](_0x3b1875,_0x4fc110),this['_touched']['set'](_0x4fc110,{'userId':_0x5beb82});}_0x35f7f5['markers']['delete'](_0x8088d1);}for(const _0xa48c5d of this['editor']['model']['createRangeIn'](_0x35f7f5)['getWalker']({'singleCharacters':!0x0})){const _0x14e358=this['_getVidAttributeName'](_0xa48c5d),_0x13297c='elementEnd'==_0xa48c5d['type']?_0xa48c5d['previousPosition']['path']['slice'](0x0,-0x1):_0xa48c5d['previousPosition']['path'],_0x2f031d=_0x21dc86['getNodeByPath'](_0x13297c);_0x2f031d['getAttribute'](_0x14e358)>0x0||_0x2f031d['_setAttribute'](_0x14e358,_0x35c87b[_0x3f3547++]);}for(const [_0x580d18,_0x563d43]of _0x35f7f5['markers'])_0x580d18['startsWith']('revision:')||this['_markers']['set'](_0x580d18,_0x563d43);}const {roots:_0x2eeab4}=this['_savedMetaData']['get'](_0x5975bb['fromVersion']),{roots:_0x56700c}=this['_savedMetaData']['get'](_0x5975bb['toVersion']),_0x8f4740=yt(_0x2eeab4['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x8f4740),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x8f4740,Number['NEGATIVE_INFINITY']));const _0x2252bb=yt(_0x56700c['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2252bb),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2252bb));const _0x5df54f=Array['from'](this['_diffRoots'])['map'](([_0xf695eb,_0x41e569])=>[_0xf695eb,yt(_0x41e569)]);this['_saveMetaData'](this['_lastTo'],_0x5df54f,this['_markers'],_0x65d922);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x5689f9,_0x1ac863,_0x3d248f,_0x35716d){const _0xd2978=new Map(_0x1ac863),_0x3890e7=new Map(_0x3a9bd2(_0x35716d)),_0x3fd30d=new Map();for(const [_0xaf6277,_0xcdc38]of _0x3d248f)_0x3fd30d['set'](_0xaf6277,{'start':_0xcdc38['start']['clone'](),'end':_0xcdc38['end']['clone'](),'rootName':_0xcdc38['root']['rootName']});this['_savedMetaData']['set'](_0x5689f9,{'roots':_0xd2978,'markers':_0x3fd30d,'rootsAttributes':_0x3890e7});}['_removeMetaData'](_0xed3c82){this['_savedMetaData']['delete'](_0xed3c82);}['_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'](_0x5648f6,_0x3098a7=null){let _0x3bbde8=null;_0x5648f6['is']('documentFragment')||(_0x3bbde8=new _0x4aadeb(_0x5648f6['name'],{'vid_start':null===_0x3098a7?this['_revisionId']++:_0x3098a7++}));const _0x59ff6=[];for(const _0x305220 of _0x5648f6['getChildren']())if(_0x305220['is']('element')){_0x59ff6['push'](this['_makeIdsRoot'](_0x305220,_0x3098a7));const _0x5ef8c6=_0x59ff6[_0x59ff6['length']-0x1];null!==_0x3098a7&&(_0x3098a7=_0x5ef8c6['is']('element','$text')?_0x5ef8c6['getAttribute']('vid')+0x1:_0x5ef8c6['getAttribute']('vid_end')+0x1);}else{for(let _0x3e8dba=0x0;_0x3e8dba<_0x305220['offsetSize'];_0x3e8dba++)_0x59ff6['push'](new _0x4aadeb('$text',{'vid':null===_0x3098a7?this['_revisionId']++:_0x3098a7++}));}if(_0x5648f6['is']('documentFragment')){const _0x3cd442=bt(_0x5648f6['rootName']);return _0x3cd442['_insertChild'](0x0,_0x59ff6),_0x3cd442;}return _0x3bbde8['_setAttribute']('vid_end',null===_0x3098a7?this['_revisionId']++:_0x3098a7++),_0x3bbde8['_insertChild'](0x0,_0x59ff6),_0x3bbde8;}['_calculateMetaData'](_0x29df62,_0x4a734e,_0x124f7e){this['_reset']();const {roots:_0xcac00e,markers:_0x5d9c17,rootsAttributes:_0x5921e3}=this['_savedMetaData']['get'](_0x29df62);this['_baseRoots']=new Map(_0xcac00e),this['_baseRootsAttributes']=new Map(_0x3a9bd2(_0x5921e3));for(const [_0xd0777b,_0xd6d98c]of this['_baseRoots'])if('$graveyard'!==_0xd0777b&&(this['_diffRoots']['set'](_0xd0777b,yt(_0xd6d98c)),this['_diffRootsAttributes']=new Map(_0x3a9bd2(_0x5921e3)),_0x124f7e)){const _0x40d90d=this['_revisionId'];this['_idsRoots']['set'](_0xd0777b,this['_makeIdsRoot'](_0xd6d98c)),this['_baseIdsRoots']['set'](_0xd0777b,this['_makeIdsRoot'](_0xd6d98c,_0x40d90d));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',yt(this['_baseRoots']['get']('$graveyard'))),_0x124f7e&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4db1f2,_0x4471eb]of _0x5d9c17){const _0x32bd1a=this['_baseRoots']['get'](_0x4471eb['rootName']),_0x15919c=this['_diffRoots']['get'](_0x4471eb['rootName']),_0x2353ea=new _0x5f3a67(this['_fixPosition'](_0x4471eb['start'],_0x32bd1a),this['_fixPosition'](_0x4471eb['end'],_0x32bd1a)),_0x532293=this['_fixRange'](_0x2353ea,_0x15919c);_0x32bd1a['markers']['set'](_0x4db1f2,_0x2353ea),this['_markers']['set'](_0x4db1f2,_0x532293);}this['_applyOperations'](_0x29df62,_0x4a734e,_0x124f7e);}['_applyOperations'](_0x2221ab,_0x1180dd,_0x2bb135){for(const _0x46a5c3 of this['source']['getOperations'](_0x2221ab,_0x1180dd))this['_handleOperation'](_0x46a5c3,_0x2bb135);for(const _0x1fc5cf of this['_diffRoots']['values']())_0x1fc5cf['markers']['clear']();for(const [_0x16cfd1,_0xdce0dd]of this['_markers']){this['_diffRoots']['get'](_0xdce0dd['root']['rootName'])['markers']['set'](_0x16cfd1,_0xdce0dd['clone']());}const _0x5a08b7=new Map(),_0x45fb09=new Map();for(const [_0x379571,_0x23c204]of this['_diffRoots'])_0x5a08b7['set'](_0x379571,yt(_0x23c204)),_0x45fb09['set'](_0x379571,this['_diffRootsAttributes']['get'](_0x379571));this['_saveMetaData'](_0x1180dd,_0x5a08b7,this['_markers'],_0x45fb09);}['_getPreviousFrom'](_0x13a1cb){const _0x590f9f=Array['from'](this['_savedMetaData']['keys']());_0x590f9f['sort']((_0x1ddf27,_0x334e51)=>_0x1ddf27-_0x334e51),_0x590f9f['reverse']();for(const _0x3a6cda of _0x590f9f)if(_0x3a6cda<_0x13a1cb)return _0x3a6cda;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x30fb6f,_0x5939f7){const _0x76e8c8=Array['from'](_0x5939f7['markers'])['map'](([_0x3b38ff,_0x1e27f9])=>[_0x3b38ff,this['_fixRange'](_0x1e27f9,_0x30fb6f)]);_0x30fb6f['markers']=new Map(_0x76e8c8);}['_transformMarkers'](_0x58c906){for(const _0x5de385 of this['_markers']['values']()){const _0x27177d=_0x5de385['getTransformedByOperation'](_0x58c906),_0x4dec54=_0x5f3a67['_createFromRanges'](_0x27177d);_0x5de385['start']=_0x4dec54['start'],_0x5de385['end']=_0x4dec54['end'];}}['_handleOperation'](_0x4170aa,_0x152553){if('addRoot'!=_0x4170aa['type']&&'detachRoot'!=_0x4170aa['type']){if('insert'==_0x4170aa['type']){const _0x3c6774=_0x4170aa['position']['root']['rootName'];this['_diffRoots']['has'](_0x3c6774)||(this['_diffRoots']['set'](_0x3c6774,bt(_0x3c6774,!0x0)),this['_diffRootsAttributes']['set'](_0x3c6774,{}),_0x152553&&this['_idsRoots']['set'](_0x3c6774,bt(_0x3c6774,!0x0)));}else{if('addRootAttribute'==_0x4170aa['type']||'removeRootAttribute'==_0x4170aa['type']||'changeRootAttribute'==_0x4170aa['type'])return void this['_handleRootAttributeOperation'](_0x4170aa);'marker'==_0x4170aa['type']&&this['_handleMarkerOperation'](_0x4170aa);}if('marker'!==_0x4170aa['type']){const _0x4da4fa=this['_cloneOperation'](_0x4170aa,this['_diffRoots']);_0x4da4fa['_execute'](),this['_transformMarkers'](_0x4da4fa);}if(_0x152553)switch(_0x4170aa['type']){case'insert':this['_handleInsertOperation'](_0x4170aa);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4170aa);break;case'merge':this['_handleMergeOperation'](_0x4170aa);break;case'split':this['_handleSplitOperation'](_0x4170aa);}}else this['_handleRootOperation'](_0x4170aa,_0x152553);}['_cloneOperation'](_0xf43461,_0x708b28){const _0x35305d=_0xf43461['clone']();return _0x35305d['_authorId']=_0xf43461['_authorId'],this['_fixOperation'](_0x35305d,_0x708b28),_0x35305d;}['_getBaseVids'](_0x598f53){return _0x598f53['map'](_0x23b88d=>{const _0x5defa7=this['_getVidAttributeName'](_0x23b88d);return Number(_0x23b88d['item']['getAttribute'](_0x5defa7));});}['_generateTape'](_0x14214f,_0x48d710){if(_0x14214f['is']('element','$text'))_0x48d710['push']({'item':_0x14214f,'type':'text'});else{_0x14214f['is']('element')&&_0x48d710['push']({'item':_0x14214f,'type':'elementStart'});for(const _0x4be735 of _0x14214f['getChildren']())this['_generateTape'](_0x4be735,_0x48d710);_0x14214f['is']('element')&&_0x48d710['push']({'item':_0x14214f,'type':'elementEnd'});}return _0x48d710;}['_getState'](){const _0x323b7d=new Map(this['_touched']),_0x148c35=new Map(_0x323b7d),_0xc44c31=new Map(),_0x23e037={'insertions':{},'deletions':{}},_0x53b5e0={'insertions':{},'deletions':{}},_0x46e8fa=new Map(),_0x40cf71=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x40cf71['delete']('$graveyard');for(const _0x34737b of _0x40cf71){const _0x8adf48=this['_diffRoots']['get'](_0x34737b)||bt(_0x34737b,!0x1),_0x35c34b=this['_baseRoots']['get'](_0x34737b)||bt(_0x34737b,!0x1);_0x8adf48['isAttached']()||_0x35c34b['isAttached']()?(_0x23e037['insertions'][_0x34737b]=yt(_0x8adf48),_0x23e037['deletions'][_0x34737b]=yt(_0x35c34b),this['_copyMarkers'](_0x23e037['deletions'][_0x34737b],_0x35c34b),this['_copyMarkers'](_0x23e037['insertions'][_0x34737b],_0x8adf48),_0x53b5e0['insertions'][_0x34737b]=this['_generateTape'](this['_idsRoots']['get'](_0x34737b),[]),_0x53b5e0['deletions'][_0x34737b]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x34737b)||bt(_0x34737b,!0x1),[])):_0x40cf71['delete'](_0x34737b);}for(const _0x2fbbc6 of _0x40cf71){const _0x5b9ca1=_0x53b5e0['insertions'][_0x2fbbc6];for(const _0x163fbf of _0x5b9ca1){const _0x526564=this['_getVidAttributeName'](_0x163fbf),_0x10a8ee=_0x163fbf['item']['getAttribute'](_0x526564);_0x148c35['delete'](_0x10a8ee),_0x10a8ee>=this['_startingRevisionId']&&_0xc44c31['set'](_0x10a8ee,_0x323b7d['get'](_0x10a8ee));}}for(const _0x2b5c53 of _0x40cf71){const _0x12db55=_0x53b5e0['insertions'][_0x2b5c53],_0x2dc283=this['_getBaseVids'](_0x53b5e0['deletions'][_0x2b5c53]);let _0x1972b6=0x0;for(const _0x3f6dc8 of _0x12db55){const _0x323268=this['_getVidAttributeName'](_0x3f6dc8),_0x43b111=_0x3f6dc8['item']['getAttribute'](_0x323268);if(!_0xc44c31['has'](_0x43b111)&&!_0x46e8fa['has'](_0x43b111)){if(_0x148c35['has'](_0x43b111))_0x1972b6++;else{if(_0x43b111!=_0x2dc283[_0x1972b6]){const _0x32be60=_0x323b7d['get'](_0x43b111)||_0x323b7d['get'](_0x2dc283[_0x1972b6]);for(;_0x43b111!=_0x2dc283[_0x1972b6];)_0x148c35['has'](_0x2dc283[_0x1972b6])||(_0x46e8fa['set'](_0x2dc283[_0x1972b6],_0x32be60),_0x323b7d['set'](_0x2dc283[_0x1972b6],_0x32be60)),_0x1972b6++;}_0x1972b6++;}}}}for(const _0x1a9492 of _0x40cf71){const _0x437455=_0x53b5e0['insertions'][_0x1a9492];for(const _0x37d268 of _0x437455){const _0x5a3807=this['_getVidAttributeName'](_0x37d268),_0x5be213=_0x37d268['item']['getAttribute'](_0x5a3807);if(_0x46e8fa['has'](_0x5be213)){const _0x51c9fa=_0x46e8fa['get'](_0x5be213);_0x148c35['has'](_0x5be213)||_0x148c35['set'](_0x5be213,{..._0x51c9fa}),_0xc44c31['set'](_0x5be213,{..._0x51c9fa});}}}for(const _0x4a8f84 of _0x148c35['keys']())_0x4a8f84>=this['_startingRevisionId']&&_0x148c35['delete'](_0x4a8f84);const _0x5ed518=new Map();for(const _0x2a31e1 of _0x40cf71){let _0x14bd32=_0x53b5e0['insertions'][_0x2a31e1];for(const _0x54cb1c of _0x14bd32)if(_0x54cb1c['item']['is']('element','tableCell')){const _0x3bf524=this['_getVidAttributeName'](_0x54cb1c),_0xf3feca=_0x54cb1c['item']['getAttribute'](_0x3bf524);if(_0xc44c31['has'](_0xf3feca)){const _0x42c668=_0x54cb1c['item']['parent']['parent']['getAttribute']('vid_start'),_0x4c69f7=_0x5ed518['get'](_0x42c668)||new Set();_0x4c69f7['add'](_0xc44c31['get'](_0xf3feca)['userId']),_0x5ed518['set'](_0x42c668,_0x4c69f7);}}_0x14bd32=_0x53b5e0['deletions'][_0x2a31e1];for(const _0x25eb75 of _0x14bd32)if(_0x25eb75['item']['is']('element','tableCell')){const _0x33c458=this['_getVidAttributeName'](_0x25eb75),_0x4b3d75=_0x25eb75['item']['getAttribute'](_0x33c458);if(_0x148c35['has'](_0x4b3d75)){const _0x208acd=_0x25eb75['item']['parent']['parent']['getAttribute']('vid_start'),_0x545c01=_0x5ed518['get'](_0x208acd)||new Set();_0x545c01['add'](_0x148c35['get'](_0x4b3d75)['userId']),_0x5ed518['set'](_0x208acd,_0x545c01);}}for(const _0x4926c9 of _0x5ed518['keys']())(_0xc44c31['has'](_0x4926c9)||_0x148c35['has'](_0x4926c9))&&_0x5ed518['delete'](_0x4926c9);}for(const _0x56026b of _0x40cf71){const _0x57a17a=_0x53b5e0['insertions'][_0x56026b];let _0xa22cf0=null,_0x3ea704=null;for(const _0xb834c9 of _0x57a17a){const _0x454725=this['_getVidAttributeName'](_0xb834c9),_0x4ca695=_0xb834c9['item']['getAttribute'](_0x454725),_0x4ea234=_0x5ed518['get'](_0x4ca695);_0x4ea234&&'elementStart'==_0xb834c9['type']&&(_0xa22cf0=Array['from'](_0x4ea234)[0x0],_0x3ea704=_0xb834c9['item']['getAttribute']('vid_end')),_0xa22cf0&&(_0x148c35['set'](_0x4ca695,{'userId':_0xa22cf0}),_0xc44c31['set'](_0x4ca695,{'userId':_0xa22cf0})),_0x4ca695==_0x3ea704&&(_0xa22cf0=null,_0x3ea704=null);}}const _0x4b5bda={},_0x513878=new Set();for(const _0x3df8a2 of _0x40cf71){const _0x58b0e0=_0x23e037['deletions'][_0x3df8a2],_0x5c6ccb=_0x23e037['insertions'][_0x3df8a2];for(const {userId:_0x384f9d}of this['_touchedMarkers']['values']())null!==_0x384f9d&&_0x513878['add'](_0x384f9d);for(const {userId:_0x599685}of this['_touchedRoots']['values']())null!==_0x599685&&_0x513878['add'](_0x599685);this['_markChanges'](_0x5c6ccb,_0x53b5e0['insertions'][_0x3df8a2],_0xc44c31,'insertion',_0x513878),this['_markChanges'](_0x58b0e0,_0x53b5e0['deletions'][_0x3df8a2],_0x148c35,'deletion',_0x513878),_0x4b5bda[_0x3df8a2]={'insertions':this['_prepareViewToSave'](_0x5c6ccb),'deletions':this['_prepareViewToSave'](_0x58b0e0),'attachChange':this['_touchedRoots']['get'](_0x3df8a2)||null,'attributesBefore':_0x3a9bd2(this['_baseRootsAttributes']['get'](_0x3df8a2))||{},'attributesAfter':_0x3a9bd2(this['_diffRootsAttributes']['get'](_0x3df8a2))};}return{'diffData':_0x4b5bda,'authorsIds':Array['from'](_0x513878)};}['_processRootBeforeSave'](_0x3809e5){for(const [,_0x212229]of _0x3809e5['markers']){const _0x593a0d=_0x212229['start']['getAncestors']()['filter'](_0x15a261=>'tableCell'==_0x15a261['name']);for(const _0x3a5021 of _0x593a0d)0x1==_0x3a5021['childCount']&&_0x3a5021['getChild'](0x0)['is']('element','paragraph')&&_0x3a5021['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4155ca){this['_processRootBeforeSave'](_0x4155ca);const _0x40e8af=this['editor']['data']['toView'](_0x4155ca,{}),_0x135c1d=Array['from'](_0x40e8af['getChildren']())['map'](_0x24d813=>this['_getViewJson'](_0x24d813));return JSON['stringify'](_0x135c1d);}['_getViewJson'](_0x2f4770){if(_0x2f4770['is']('$text'))return _0x2f4770['data'];{const _0x1eff18=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x306c96=_0x2f4770,_0x1ffc8b=this['editor']['data']['htmlProcessor']['domConverter'],_0x2890d9={'type':_0x1eff18['_getTypeCharForViewElement'](_0x306c96),'name':_0x306c96['name'],'attributes':Array['from'](_0x306c96['getAttributes']()),'children':Array['from'](_0x306c96['getChildren']())['map'](_0x228386=>this['_getViewJson'](_0x228386))};if(_0x2f4770['is']('uiElement')&&'$comment'!=_0x2f4770['name']){const _0x1d0b72=_0x2f4770['render'](_0x1ffc8b['domDocument'],_0x1ffc8b);_0x2890d9['children']['push'](_0x1d0b72['outerHTML']);}else{if(_0x2f4770['is']('rawElement')){const _0x2b32a9=_0x1ffc8b['domDocument']['createElement'](_0x306c96['name']);_0x2f4770['render'](_0x2b32a9,_0x1ffc8b),_0x2890d9['children']['push'](_0x2b32a9['innerHTML']);}}const _0x3077aa=Array['from'](_0x306c96['getCustomProperties']());_0x3077aa['length']>0x0&&(_0x2890d9['customProperties']=_0x3077aa);const _0x4184b1=_0x306c96['getFillerOffset']();return null!==_0x4184b1&&(_0x2890d9['fillerOffset']=_0x4184b1),_0x2890d9;}}['_markChanges'](_0x236b5c,_0x50301a,_0x107093,_0xf98e58,_0x553beb){let _0x377d89=null,_0x5a92aa=null,_0x52f0a=0x0;const _0x519157=this['editor']['model'];for(let _0xb5ec1d=0x0;_0xb5ec1d<_0x50301a['length'];_0xb5ec1d++){const _0x3d2620=this['_getVidAttributeName'](_0x50301a[_0xb5ec1d]),_0xb6c361=_0x50301a[_0xb5ec1d]['item']['getAttribute'](_0x3d2620),_0x3f6d62=_0x107093['get'](_0xb6c361),_0x20da11=_0xb5ec1d==_0x50301a['length']-0x1;(!_0x377d89&&_0x3f6d62&&(_0x377d89=_0x3f6d62,_0x5a92aa=_0x50301a[_0xb5ec1d]),_0x377d89&&(!_0x3f6d62||_0x3f6d62['userId']!=_0x377d89['userId']))&&(_0x4d0a96(_0x3f6d62,Rt(_0x5a92aa,_0x236b5c,_0x519157),Rt(_0x50301a[_0xb5ec1d],_0x236b5c,_0x519157)),_0x377d89=_0x3f6d62||null,_0x5a92aa=_0x3f6d62?_0x50301a[_0xb5ec1d]:null),_0x377d89&&_0x20da11&&_0x4d0a96(_0x3f6d62,Rt(_0x5a92aa,_0x236b5c,_0x519157),kt(_0x50301a[_0xb5ec1d],_0x236b5c,_0x519157));}function _0x4d0a96(_0x3942a9,_0x417f65,_0x1aeb0a){const _0x1a0510=_0x377d89['userId'],_0x1cc957='revision:'+_0xf98e58+':'+_0x1a0510+':'+_0x52f0a++,_0x1b3494=_0x519157['createRange'](_0x417f65,_0x1aeb0a);_0x236b5c['markers']['set'](_0x1cc957,_0x1b3494),null!==_0x1a0510&&_0x553beb['add'](_0x1a0510);}}['_getVidAttributeName'](_0x30a4bd){switch(_0x30a4bd['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x17826c,_0x1c4d40){_0x17826c['baseVersion']=null;for(const _0x21752e in _0x17826c){const _0x5b2eab=_0x17826c[_0x21752e];if(_0x5b2eab instanceof _0x5d605f){const _0x3f262d=_0x1c4d40['get'](_0x5b2eab['root']['rootName']);_0x17826c[_0x21752e]=this['_fixPosition'](_0x5b2eab,_0x3f262d);}if(_0x5b2eab instanceof _0x5f3a67){const _0x1ea20a=_0x1c4d40['get'](_0x5b2eab['root']['rootName']);_0x17826c[_0x21752e]=this['_fixRange'](_0x5b2eab,_0x1ea20a);}'root'===_0x21752e&&(_0x17826c['root']=_0x1c4d40['get'](_0x17826c['root']['rootName']));}}['_fixRange'](_0x196b2f,_0x4e301f){return this['editor']['model']['createRange'](this['_fixPosition'](_0x196b2f['start'],_0x4e301f),this['_fixPosition'](_0x196b2f['end'],_0x4e301f));}['_fixPosition'](_0x31ba39,_0xd8d24){return this['editor']['model']['createPositionFromPath'](_0xd8d24,_0x31ba39['path'],_0x31ba39['stickiness']);}['_handleInsertOperation'](_0x1366dd){const _0x446e5c=this['_idsRoots']['get'](_0x1366dd['position']['root']['rootName']),_0x33e04f=this['_fixPosition'](_0x1366dd['position'],_0x446e5c),_0x5ab88e=null===_0x1366dd['_authorId']?null:_0x1366dd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x56fcb8=_0x33e04f['parent'],_0x431ccc=this['_revisionId'],_0x24796c=[];for(const _0x21d850 of _0x1366dd['nodes'])if(_0x21d850['is']('element'))_0x24796c['push'](this['_makeIdsRoot'](_0x21d850));else{for(let _0x126803=0x0;_0x126803<_0x21d850['offsetSize'];_0x126803++)_0x24796c['push'](new _0x4aadeb('$text',{'vid':this['_revisionId']++}));}const _0x3db7a6=this['_revisionId'];for(let _0x207a6e=_0x431ccc;_0x207a6e<_0x3db7a6;_0x207a6e++)this['_touched']['set'](_0x207a6e,{'userId':_0x5ab88e});_0x56fcb8['_insertChild'](_0x33e04f['offset'],_0x24796c);}['_handleMoveOperation'](_0x263e66){(_0x263e66=this['_cloneOperation'](_0x263e66,this['_idsRoots']))['_execute']();const _0x3e7e31=null===_0x263e66['_authorId']?null:_0x263e66['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3a6da8=_0x263e66['getMovedRangeStart'](),_0xbcd5f7=_0x3a6da8['parent'],_0x57877c=_0x3a6da8['offset'];!function _0x2af9ef(_0x32fa5a,_0x21db5a,_0x4f433c,_0x48509f){for(let _0x4c71fc=_0x4f433c;_0x4c71fc<_0x48509f;_0x4c71fc++){const _0x1920fd=_0x21db5a['getChild'](_0x4c71fc);_0x1920fd['is']('element','$text')?_0x32fa5a['set'](_0x1920fd['getAttribute']('vid'),{'userId':_0x3e7e31}):(_0x32fa5a['set'](_0x1920fd['getAttribute']('vid_start'),{'userId':_0x3e7e31}),_0x2af9ef(_0x32fa5a,_0x1920fd,0x0,_0x1920fd['childCount']),_0x32fa5a['set'](_0x1920fd['getAttribute']('vid_end'),{'userId':_0x3e7e31}));}}(this['_touched'],_0xbcd5f7,_0x57877c,_0x57877c+_0x263e66['howMany']);}['_handleMergeOperation'](_0x178d6d){const _0x46400c=null===(_0x178d6d=this['_cloneOperation'](_0x178d6d,this['_idsRoots']))['_authorId']?null:_0x178d6d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x11bf54=_0x178d6d['targetPosition']['parent'],_0x2c1fe3=_0x178d6d['sourcePosition']['parent'],_0x226a44=_0x11bf54['getAttribute']('vid_end'),_0x49dd7e=_0x2c1fe3['getAttribute']('vid_start');_0x11bf54['_setAttribute']('vid_end',_0x2c1fe3['getAttribute']('vid_end')),_0x2c1fe3['_setAttribute']('vid_end',_0x226a44),this['_touched']['set'](_0x49dd7e,{'userId':_0x46400c}),this['_touched']['set'](_0x226a44,{'userId':_0x46400c}),_0x178d6d['_execute']();}['_handleSplitOperation'](_0x22e7d9){const _0x2fa9f8=null===(_0x22e7d9=this['_cloneOperation'](_0x22e7d9,this['_idsRoots']))['_authorId']?null:_0x22e7d9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3ed139=_0x22e7d9['graveyardPosition'],_0x3b923f=_0x22e7d9['splitPosition']['parent'];_0x22e7d9['_execute']();const _0x4e32d8=_0x3b923f['getAttribute']('vid_end'),_0x5f0fc7=_0x22e7d9['insertionPosition']['nodeAfter'];if(_0x3ed139){const _0x28972c=_0x5f0fc7['getAttribute']('vid_end'),_0xe23e5=_0x3b923f['getAttribute']('vid_end');_0x3b923f['_setAttribute']('vid_end',_0x28972c),_0x5f0fc7['_setAttribute']('vid_end',_0xe23e5),this['_touched']['set'](_0x3b923f['getAttribute']('vid_end'),{'userId':_0x2fa9f8}),this['_touched']['set'](_0x5f0fc7['getAttribute']('vid_start'),{'userId':_0x2fa9f8});}else{const _0x840f77=this['_revisionId']++,_0x4eef39=this['_revisionId']++;_0x3b923f['_setAttribute']('vid_end',_0x840f77),_0x5f0fc7['_setAttribute']('vid_start',_0x4eef39),_0x5f0fc7['_setAttribute']('vid_end',_0x4e32d8),this['_touched']['set'](_0x840f77,{'userId':_0x2fa9f8}),this['_touched']['set'](_0x4eef39,{'userId':_0x2fa9f8});}}['_handleMarkerOperation'](_0x23ed93){if(!_0x23ed93['affectsData'])return;const _0x14832e=(_0x23ed93=this['_cloneOperation'](_0x23ed93,this['_diffRoots']))['oldRange']?_0x23ed93['oldRange']['root']:null,_0xc14182=_0x23ed93['newRange']?_0x23ed93['newRange']['root']:null;_0x14832e&&this['_markers']['delete'](_0x23ed93['name']),_0xc14182&&this['_markers']['set'](_0x23ed93['name'],_0x23ed93['newRange']['clone']());const _0xc43812=null===_0x23ed93['_authorId']?null:_0x23ed93['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5c10af=_0x23ed93['name'];if(!this['_touchedMarkers']['has'](_0x5c10af))return void this['_touchedMarkers']['set'](_0x5c10af,{'range':_0x23ed93['oldRange'],'userId':_0xc43812});const _0x580fa3=this['_touchedMarkers']['get'](_0x5c10af),_0x653b09=_0x580fa3['range'],_0x38df20=_0x23ed93['newRange'];null==_0x653b09&&null==_0x38df20||_0x653b09&&_0x38df20&&_0x653b09['isEqual'](_0x38df20)?this['_touchedMarkers']['delete'](_0x23ed93['name']):_0x580fa3['userId']=_0xc43812;}['_handleRootOperation'](_0x4d5cd7,_0xb5e491){this['_diffRoots']['has'](_0x4d5cd7['rootName'])?this['_diffRoots']['get'](_0x4d5cd7['rootName'])['_isAttached']=_0x4d5cd7['isAdd']:(this['_diffRoots']['set'](_0x4d5cd7['rootName'],bt(_0x4d5cd7['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x4d5cd7['rootName'],{}),_0xb5e491&&this['_idsRoots']['set'](_0x4d5cd7['rootName'],bt(_0x4d5cd7['rootName'],!0x0)));const _0x2cfb3e=null===_0x4d5cd7['_authorId']?null:_0x4d5cd7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1e66ce=this['_touchedRoots']['get'](_0x4d5cd7['rootName']);_0x1e66ce&&_0x1e66ce['userId']===_0x2cfb3e?this['_touchedRoots']['delete'](_0x4d5cd7['rootName']):this['_touchedRoots']['set'](_0x4d5cd7['rootName'],{'userId':_0x2cfb3e,'isAttached':_0x4d5cd7['isAdd']});}['_handleRootAttributeOperation'](_0x487d5f){const _0x24b48b=this['_diffRootsAttributes']['get'](_0x487d5f['root']['rootName']);null===_0x487d5f['newValue']?delete _0x24b48b[_0x487d5f['key']]:_0x24b48b[_0x487d5f['key']]=_0x487d5f['newValue'];}}function yt(_0x445b65){const _0x4d4330=bt(_0x445b65['rootName'],_0x445b65['isAttached']());for(const _0x4c48d2 of _0x445b65['getChildren']()){const _0x550be8=_0x4c48d2['_clone'](!0x0);_0x4d4330['_appendChild'](_0x550be8);}return _0x4d4330;}function bt(_0x92fcf2,_0xd601fb=!0x0){const _0x1ad91c=new _0x2be415();return _0x1ad91c['rootName']=_0x92fcf2,_0x1ad91c['_isAttached']=_0xd601fb,_0x1ad91c['isAttached']=()=>_0x1ad91c['_isAttached'],_0x1ad91c;}function Rt(_0x437da0,_0x140203,_0xb63f56){const _0x4c3dd7='elementEnd'==_0x437da0['type']?_0xb63f56['createPositionAt'](_0x437da0['item'],'end'):_0xb63f56['createPositionBefore'](_0x437da0['item']);return _0xb63f56['createPositionFromPath'](_0x140203,_0x4c3dd7['path'],_0x4c3dd7['stickiness']);}function kt(_0x693c15,_0x34cfaf,_0x40dbdc){const _0x4738c5='elementStart'==_0x693c15['type']?_0x40dbdc['createPositionAt'](_0x693c15['item'],0x0):_0x40dbdc['createPositionAfter'](_0x693c15['item']);return _0x40dbdc['createPositionFromPath'](_0x34cfaf,_0x4738c5['path'],_0x4738c5['stickiness']);}class At extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4c7419(_0x47f08c){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x1804f1,_0x23c402){super(_0x1804f1),this['focusTracker']=new _0x3b43a6(),this['keystrokes']=new _0x6b7b7c(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x23c402),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x19fe4d({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x4d8e03=_0xdb570=>_0xdb570['stopPropagation']();this['keystrokes']['set']('arrowright',_0x4d8e03),this['keystrokes']['set']('arrowleft',_0x4d8e03),this['keystrokes']['set']('arrowup',_0x4d8e03),this['keystrokes']['set']('arrowdown',_0x4d8e03);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2e5ff3){this['revisionNameInputView']['fieldView']['element']['value']=_0x2e5ff3['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x157713){const _0x4fdea5=new _0x771b7d(this['locale'],_0x5ac4e5),_0x5b68c8=_0x4fdea5['fieldView'];_0x5b68c8['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4a07c0=wt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x157713&&(_0x4a07c0+='\x20('+wt(this['locale'],'optional')+')'),(_0x4fdea5['label']=_0x4a07c0,_0x5b68c8['on']('input',()=>{this['revisionNameInputValue']=_0x5b68c8['element']['value']['trim']();}),_0x4fdea5);}}class It extends _0x251d17{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[pt];}['_saveRevisionFormView'];['init'](){const _0x220da4=this['editor'],_0x3f3600=_0x220da4['plugins']['get']('RevisionTracker');_0x220da4['ui']['componentFactory']['add']('revisionHistory',_0x6d617=>{const _0x5e8037=_0x534b7c(_0x6d617),_0x5bf023=_0x5e8037['panelView']['children'],_0x279c22=new _0x4f0ca9(_0x6d617),_0x9ef757=new _0x3db38c(_0x6d617),_0x168d0f=this['_createSaveRevisionButton'](_0x3d94f2),_0xe93925=new _0x3db38c(_0x6d617),_0x419c79=this['_createOpenRevisionButton'](_0x3d94f2);return _0x5e8037['bind']('isEnabled')['to'](_0x3f3600,'isReady',_0x3f3600,'isEnabled',_0x220da4,'isReadOnly',(_0x1a6ce8,_0x1b9821,_0x5cf867)=>_0x1a6ce8&&_0x1b9821&&!_0x5cf867),_0x5e8037['buttonView']['set']({'icon':_0x2dfda0,'label':wt(_0x6d617,'Revision\x20history'),'tooltip':!0x0}),_0x168d0f['set']({'withText':!0x0,'role':'menuitem'}),_0x419c79['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x419c79,'execute',()=>{_0x5e8037['isOpen']=!0x1,_0x220da4['editing']['view']['focus']();},{'priority':'low'}),_0x9ef757['children']['add'](_0x168d0f),_0xe93925['children']['add'](_0x419c79),_0x279c22['role']='menu',_0x279c22['items']['addMany']([_0x9ef757,_0xe93925]),_0x5bf023['add'](_0x279c22),_0x5e8037;}),_0x220da4['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x1e22e4=this['editor'],_0x3f7d7f=_0x1e22e4['locale'],_0x51ee45=_0x1e22e4['plugins']['get']('RevisionTracker'),_0x57e071=new _0x1ccc45(_0x3f7d7f),_0x1a1f3f=new _0x3c7407(_0x3f7d7f);_0x57e071['bind']('isEnabled')['to'](_0x51ee45,'isReady',_0x51ee45,'isEnabled',_0x1e22e4,'isReadOnly',(_0x251c43,_0x359f58,_0x242c50)=>_0x251c43&&_0x359f58&&!_0x242c50),_0x57e071['buttonView']['set']({'icon':_0x2dfda0,'label':wt(_0x3f7d7f,'Revision\x20history')});const _0x5cf418=new tt(_0x3f7d7f,_0x57e071),_0x644ced=this['_createSaveRevisionButton'](it);_0x644ced['delegate']('execute')['to'](_0x57e071),_0x5cf418['children']['add'](_0x644ced),_0x1a1f3f['items']['add'](_0x5cf418);const _0x49f06c=new tt(_0x3f7d7f,_0x57e071),_0x49adfe=this['_createOpenRevisionButton'](it);return _0x49adfe['delegate']('execute')['to'](_0x57e071),_0x49f06c['children']['add'](_0x49adfe),_0x1a1f3f['items']['add'](_0x49f06c),_0x57e071['panelView']['children']['add'](_0x1a1f3f),_0x57e071;}['_createSaveRevisionButton'](_0x155305){const _0x56ca6a=this['editor'],_0x3c2211=_0x56ca6a['plugins']['get']('RevisionTracker'),_0x52b434=new _0x155305(_0x56ca6a['locale']);return _0x52b434['set']({'label':wt(_0x56ca6a['locale'],'Save\x20current\x20revision')}),_0x52b434['bind']('isEnabled')['to'](_0x3c2211,'isReady',_0x3c2211,'isEnabled',_0x56ca6a,'isReadOnly',(_0x4eaec4,_0x5605f4,_0x24113c)=>_0x4eaec4&&_0x5605f4&&!_0x24113c),this['listenTo'](_0x52b434,'execute',()=>{this['_showDialog']();}),_0x52b434;}['_createOpenRevisionButton'](_0x3c0ed8){const _0x145152=this['editor'],_0xbcde67=_0x145152['plugins']['get']('RevisionTracker'),_0x140a4c=new _0x3c0ed8(_0x145152['locale']);return _0x140a4c['set']({'label':wt(_0x145152['locale'],'Open\x20revision\x20history')}),_0x140a4c['bind']('isEnabled')['to'](_0xbcde67,'isReady',_0x145152,'isReadOnly',(_0x426ca2,_0x2aaf19)=>_0x426ca2&&!_0x2aaf19),this['listenTo'](_0x140a4c,'execute',()=>{_0x145152['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x140a4c;}['_showDialog'](){const _0x531c3c=this['editor'],_0x2295fb=_0x531c3c['locale'],_0x396c72=_0x531c3c['plugins']['get']('Dialog'),_0xe320ee=_0x531c3c['plugins']['get']('RevisionTracker');function _0x130862(_0x216dbc){_0x531c3c['config']['get']('revisionHistory.requireRevisionName')&&''===_0x216dbc['revisionName']?_0x216dbc['revisionNameInputView']['errorText']=wt(_0x2295fb,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x531c3c['plugins']['get'](pt)['saveRevision']({'name':_0x216dbc['revisionName']}),_0x396c72['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x130862(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x396c72['show']({'id':'revisionSave','title':wt(_0x2295fb,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':wt(_0x531c3c['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x396c72['hide']()},{'label':wt(_0x531c3c['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3b09cd){_0x3b09cd['bind']('isEnabled')['to'](_0xe320ee,'isReady',_0xe320ee,'isEnabled',_0x531c3c,'isReadOnly',(_0x45be0b,_0x416661,_0x477c3d)=>_0x45be0b&&_0x416661&&!_0x477c3d);},'onExecute':()=>_0x130862(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x4c7e64=this['editor'],_0x3d13c2=_0x4c7e64['locale'];this['_saveRevisionFormView']=new At(_0x3d13c2,_0x4c7e64['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Nt extends _0x47f08c{['changeId'];['_model'];constructor(_0x1e410f,_0x4e42bc){super(_0x1e410f),this['_model']=_0x4e42bc,this['changeId']=_0x4e42bc['id'];const _0x1804e6=this['bindTemplate'],_0x47a886=wt(_0x1e410f,_0x4e42bc['data']['isSuggestion']?'Suggested\x20by':'add'==_0x4e42bc['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x4e42bc['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x1804e6['to']('type',_0x163731=>'ck-revision-change__'+_0x163731)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x47a886}]},{'text':'\x20'+_0x4e42bc['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class xt extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x1acefc(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x26210f){super(),this['id']=_0x26210f['id']||_0x5c98de(),this['author']=_0x26210f['author'],this['type']=_0x26210f['type'],this['data']=_0x26210f['data']||{},this['rootName']=_0x26210f['rootName'],this['set']('createdAt',_0x26210f['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class Et{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x5ad98b,_0x3f0192){this['newRevisionId']=_0x5ad98b,this['oldRevisionId']=_0x3f0192,this['changes']=new _0x17e3cb();}['_setChanges'](_0x48de7c){for(const _0x559d89 of _0x48de7c)this['changes']['add'](_0x559d89);}}class St extends _0x251d17{['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[_0x6289f9,st,gt,mt];}constructor(_0x49eef1){super(_0x49eef1),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',(_0x49b9fb,_0x200e41,_0x1110b3)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x198034=>{for(const _0x23817a of this['editor']['editing']['view']['document']['roots'])_0x1110b3?_0x198034['removeClass']('ck-editor__editable__overlay',_0x23817a):_0x198034['addClass']('ck-editor__editable__overlay',_0x23817a);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2af327=>null!==_0x2af327),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5ad6a6,_0xdd9910,_0x1fbf6b)=>_0x5ad6a6&&_0x1fbf6b?_0xdd9910['changes']['getIndex'](_0x1fbf6b):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4f1428,_0x26d0fb)=>_0x4f1428?_0x26d0fb['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](st);}['init'](){const _0x2b6e6a=this['editor'],_0x2ecf0d=new Mt(_0x2b6e6a,{'direction':'backward'}),_0x4b41f2=new Mt(_0x2b6e6a,{'direction':'forward'});(_0x2b6e6a['commands']['add']('showPreviousChange',_0x2ecf0d),_0x2b6e6a['commands']['add']('showNextChange',_0x4b41f2),_0x2b6e6a['commands']['add']('restoreRevision',new Ct(_0x2b6e6a)),this['on']('change:numberOfChanges',()=>{_0x2ecf0d['refresh'](),_0x4b41f2['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x2b6e6a['enableReadOnlyMode']('revision-viewer'),_0x2b6e6a['plugins']['has']('WidgetToolbarRepository'))&&_0x2b6e6a['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x58e679){return await this['_utils']['loadRevisionData'](_0x58e679,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x58e679);}async['getRevisionRootsAttributes'](_0xc7dcef){return await this['_utils']['loadRevisionData'](_0xc7dcef,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xc7dcef);}async['compare'](_0xec315b,_0x4fa775,_0x50a87b=!0x1){if(!this['isEnabled'])return;const _0x45620f=this['diff'],_0x314880=this['repository'],_0x383242='string'==typeof _0xec315b?_0x314880['getRevision'](_0xec315b):_0xec315b,_0x21aea3='string'==typeof _0x4fa775?_0x314880['getRevision'](_0x4fa775):_0x4fa775,_0x5514a1=_0x383242['id'],_0x316f5e=_0x21aea3?_0x21aea3['id']:null;if(!_0x50a87b&&this['diff']&&this['diff']['newRevisionId']===_0x5514a1&&this['diff']['oldRevisionId']===_0x316f5e)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Et(_0x5514a1,_0x316f5e);const _0x3e43a0=this['_getRevisionsRange'](_0x383242,_0x21aea3,!0x0)['map'](_0x3fc929=>this['_utils']['loadRevisionData'](_0x3fc929,this['adapter']));return _0x3e43a0['push'](new Promise(_0xd2bf7a=>{setTimeout(_0xd2bf7a,0x14);})),Promise['all'](_0x3e43a0)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4f0b32=this['_getDiff'](_0x5514a1,_0x316f5e);for(const _0x3cc3af of _0x4f0b32['changes'])this['_changeIdToChange']['set'](_0x3cc3af['id'],_0x3cc3af);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x253c84=>{for(const _0x4e748a of this['editor']['model']['document']['getRootNames']())_0x253c84['detachRoot'](_0x4e748a);for(const _0x5e8928 of Object['keys'](_0x4f0b32['model'])){const _0x2d44bf=_0x253c84['addRoot'](_0x5e8928);for(const _0x30d5d0 of Object['keys'](_0x4f0b32['attributes'][_0x5e8928]))_0x253c84['setAttribute'](_0x30d5d0,_0x4f0b32['attributes'][_0x5e8928][_0x30d5d0],_0x2d44bf);_0x253c84['insert'](_0x4f0b32['model'][_0x5e8928],_0x2d44bf,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4f0b32['changes'])),this['isReady']=!0x0;})['catch'](_0x1413ce=>{console['error'](_0x1413ce),this['_cleanUp'](),_0x45620f&&(this['diff']=_0x45620f),this['isReady']=!0x0;});}['addRevisionData'](_0x1b233c,_0x8d203c){const _0x37ae04=this['repository']['createRevision'](_0x1b233c);return _0x37ae04['on']('_update',(_0x33e581,_0x5dd4e3,_0x59d785)=>_0x8d203c(_0x5dd4e3,_0x59d785,_0x37ae04)),this['repository']['addRevision'](_0x37ae04),_0x37ae04;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x285024=>{for(const _0x486d9e of this['editor']['model']['document']['getRootNames']())_0x285024['detachRoot'](_0x486d9e);});}['_sortAndFilterDiffChanges'](_0x3e4038){const _0x8fe61e=[],_0x367ec0=new Map();for(const _0x56b7b1 of this['editor']['model']['document']['getRootNames']()){const _0x3f631e=this['editor']['editing']['view']['getDomRoot'](_0x56b7b1);if(!_0x3f631e)continue;const _0x46aebc=_0x3f631e['getClientRects']()['item'](0x0);_0x46aebc&&(_0x8fe61e['push'](_0x56b7b1),_0x367ec0['set'](_0x56b7b1,_0x46aebc));}return _0x8fe61e['sort']((_0x32ed0d,_0x5e5526)=>{const _0x388a14=_0x367ec0['get'](_0x32ed0d),_0x781f1c=_0x367ec0['get'](_0x5e5526);return _0x388a14['y']-_0x781f1c['y']||_0x388a14['x']-_0x781f1c['x'];}),(_0x3e4038=_0x3e4038['filter'](_0x4a2142=>_0x8fe61e['includes'](_0x4a2142['rootName'])))['sort']((_0xcbab50,_0x25b33a)=>_0x8fe61e['indexOf'](_0xcbab50['rootName'])-_0x8fe61e['indexOf'](_0x25b33a['rootName'])),_0x3e4038;}['_makeTape'](_0x43b9a5){const _0x2b0833=Array['from'](_0x43b9a5['markers'])['filter'](([_0x62ab43,_0x58ef0b])=>_0x62ab43['startsWith']('revision:')&&!_0x58ef0b['isCollapsed']),_0x5961e0=Array['from'](this['editor']['model']['createRangeIn'](_0x43b9a5)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x2b0833['length'])for(const _0x4a6e97 of _0x5961e0){const [_0x219407,_0x135ff5]=_0x2b0833[0x0],[,_0x30b91f,_0x22a4e5]=_0x219407['split'](':');if(_0x135ff5['end']['isEqual'](_0x4a6e97['nextPosition'])&&_0x2b0833['shift'](),(_0x4a6e97['previousPosition']['isEqual'](_0x135ff5['start'])||_0x4a6e97['previousPosition']['isAfter'](_0x135ff5['start']))&&('insertion'==_0x30b91f?_0x4a6e97['isAdded']={'userId':_0x22a4e5}:'deletion'==_0x30b91f&&(_0x4a6e97['isRemoved']={'userId':_0x22a4e5})),0x0==_0x2b0833['length'])break;}return _0x5961e0;}['_refreshStartEndIndex'](_0xf1d901){const _0x15bc4b=new Map();for(let _0x3e8b02=0x0;_0x3e8b02<_0xf1d901['length'];_0x3e8b02++)'text'===_0xf1d901[_0x3e8b02]['type']?(_0xf1d901[_0x3e8b02]['item']['startIndex']=_0x3e8b02,_0xf1d901[_0x3e8b02]['item']['endIndex']=_0x3e8b02):('elementStart'===_0xf1d901[_0x3e8b02]['type']?_0xf1d901[_0x3e8b02]['item']['startIndex']=_0x3e8b02:'elementEnd'===_0xf1d901[_0x3e8b02]['type']&&(_0xf1d901[_0x3e8b02]['item']['endIndex']=_0x3e8b02),_0x15bc4b['set'](_0xf1d901[_0x3e8b02]['id'],_0x3e8b02));for(const _0x4ff4e0 of _0x15bc4b['values']())'elementStart'===_0xf1d901[_0x4ff4e0]['type']?_0xf1d901[_0x4ff4e0]['item']['endIndex']=_0x15bc4b['get'](_0xf1d901[_0x4ff4e0]['pairId']):'elementEnd'===_0xf1d901[_0x4ff4e0]['type']&&(_0xf1d901[_0x4ff4e0]['item']['startIndex']=_0x15bc4b['get'](_0xf1d901[_0x4ff4e0]['pairId']));}['_processTape'](_0x27ec39){for(let _0x388d32=0x0;_0x388d32<_0x27ec39['length'];_0x388d32++){if('elementStart'===_0x27ec39[_0x388d32]['type'])_0x27ec39[_0x388d32]['item']['startIndex']=_0x388d32;else{if('elementEnd'===_0x27ec39[_0x388d32]['type']){_0x27ec39[_0x388d32]['item']['endIndex']=_0x388d32;const _0x146997=_0x27ec39[_0x388d32]['item']['startIndex'];_0x27ec39[_0x146997]['pairId']=_0x27ec39[_0x388d32]['id'],_0x27ec39[_0x388d32]['pairId']=_0x27ec39[_0x146997]['id'];}else _0x27ec39[_0x388d32]['item']['startIndex']=_0x388d32,_0x27ec39[_0x388d32]['item']['endIndex']=_0x388d32,_0x27ec39[_0x388d32]['pairId']=null;}_0x27ec39[_0x388d32]['markersStart']||(_0x27ec39[_0x388d32]['markersStart']=[],_0x27ec39[_0x388d32]['markersEnd']=[]);}}['_markInsertions'](_0x5937c3,_0x51805f){const _0x7d6060=_0x5937c3['filter'](_0x1a1374=>!_0x1a1374['isAdded']);for(let _0x2f224b=0x0;_0x2f224b<_0x51805f['length'];_0x2f224b++)_0x51805f[_0x2f224b]['isAdded']&&(_0x7d6060[_0x2f224b]['isAdded']=_0x51805f[_0x2f224b]['isAdded']);}['_getDiff'](_0x16dbef,_0x59cfda=null){const _0xb57c03=this['repository']['getRevision'](_0x16dbef),_0x3092a4=_0x59cfda?this['repository']['getRevision'](_0x59cfda):null,_0x33e06d=this['_getRevisionsRange'](_0xb57c03,_0x3092a4),_0xbdd7c8=_0x33e06d[_0x33e06d['length']-0x1],_0x604351=new Map(),_0x5f28f5={'model':{},'attributes':{},'changes':[]},_0x571e86=new Set(),_0x4c5521=new Map();for(let _0x1896dc=_0x33e06d['length']-0x1;_0x1896dc>=0x0;_0x1896dc--){const _0x1df175=_0x33e06d[_0x1896dc];for(const _0x3a14d7 of Object['keys'](_0x1df175['diffData']))if(_0x1df175['diffData'][_0x3a14d7]['attachChange']){const _0x51bc04=_0x1df175['diffData'][_0x3a14d7]['attachChange'];_0x51bc04['isAttached']?(_0x571e86['add'](_0x3a14d7),_0x4c5521['has'](_0x3a14d7)&&_0x4c5521['get'](_0x3a14d7)['userId']==_0x51bc04['userId']?_0x4c5521['delete'](_0x3a14d7):_0x4c5521['set'](_0x3a14d7,_0x51bc04)):_0x4c5521['has'](_0x3a14d7)?(_0x571e86['delete'](_0x3a14d7),_0x4c5521['delete'](_0x3a14d7)):(_0x571e86['add'](_0x3a14d7),_0x4c5521['set'](_0x3a14d7,_0x51bc04));}else _0x571e86['add'](_0x3a14d7);}for(const _0x37eb7f of _0x571e86){const _0x50ba6e=_0x4c5521['has'](_0x37eb7f)&&!_0x4c5521['get'](_0x37eb7f)['isAttached'];let _0x5b9edc=_0x50ba6e?_0x33e06d['length']-0x1:0x0;const _0x19f52c=_0x50ba6e?-0x1:0x1;for(;_0x33e06d[_0x5b9edc];){const _0x33ca3c=_0x33e06d[_0x5b9edc];if(_0x33ca3c['diffData'][_0x37eb7f]){const _0x2431fd=_0x50ba6e?_0x33ca3c['diffData'][_0x37eb7f]['attributesBefore']:_0x33ca3c['diffData'][_0x37eb7f]['attributesAfter'];_0x5f28f5['attributes'][_0x37eb7f]=_0x2431fd?_0x3a9bd2(_0x2431fd):{};break;}_0x5b9edc+=_0x19f52c;}}for(const _0x20dafd of _0x33e06d){_0x20dafd['model']={};for(const _0x3660d8 of _0x20dafd['authors'])_0x604351['set'](_0x3660d8['id'],_0x3660d8);for(const _0x314851 of _0x571e86){const _0x2d1598=_0x20dafd['diffData'][_0x314851]?_0x20dafd['diffData'][_0x314851]['insertions']:'[]',_0xbaa8fb=_0x20dafd['diffData'][_0x314851]?_0x20dafd['diffData'][_0x314851]['deletions']:'[]';_0x20dafd['model'][_0x314851]={'insertions':this['_utils']['_makeModelFromViewString'](_0x2d1598),'deletions':this['_utils']['_makeModelFromViewString'](_0xbaa8fb)};}}for(const _0x40319d of _0x571e86){let _0x468a19=null,_0x162662=0x0;const _0x24b6eb=new Map(Array['from'](_0xb57c03['model'][_0x40319d]['insertions']['markers'])['filter'](([_0x2a589])=>!_0x2a589['startsWith']('revision:')));let _0x46d179=0x0;for(const _0x1d3134 of _0x33e06d){const _0x14b0bf=this['_makeTape'](_0x1d3134['model'][_0x40319d]['insertions']);_0x1d3134==_0xb57c03?(_0x468a19=_0x14b0bf,_0x162662=_0x468a19['length'],_0x468a19['forEach'](_0xeb49a8=>{_0xeb49a8['id']=_0x46d179++;}),this['_processTape'](_0x468a19)):this['_markInsertions'](_0x468a19,_0x14b0bf);const _0x3c9eb1=_0x468a19['filter'](_0x4c9552=>!_0x4c9552['isAdded'])['map'](_0xc3969=>_0xc3969['id']);let _0x3d7466=0x0;const _0x46bc85=this['_makeTape'](_0x1d3134['model'][_0x40319d]['deletions']);_0x46bc85['forEach'](_0x4d8893=>{_0x4d8893['isRemoved']?_0x4d8893['id']=_0x162662++:_0x4d8893['id']=_0x3c9eb1[_0x3d7466++];}),this['_processTape'](_0x46bc85),this['_setDistance'](_0x468a19,'isAdded'),this['_setDistance'](_0x46bc85,'isRemoved'),_0x1d3134==_0xb57c03&&this['_markMarkers'](_0x468a19,_0x24b6eb),_0x468a19=this['_joinTapes'](_0x468a19,_0x46bc85),this['_refreshStartEndIndex'](_0x468a19),this['_setDistance'](_0x468a19,'isRemoved');}_0x468a19=_0x468a19['filter'](_0x456a5c=>!(_0x456a5c['isAdded']&&_0x456a5c['isRemoved']));const _0x336c3f=new Map(_0xbdd7c8['model'][_0x40319d]['deletions']['markers']),_0x543255=new Set(_0x24b6eb['keys']());for(const _0x43e272 of _0x336c3f['keys']())_0x543255['delete'](_0x43e272);this['_markSuggestions'](_0x468a19,_0x543255),this['_fixObsoleteTags'](_0x468a19),_0x468a19=this['_removeMissingPairs'](_0x468a19),_0x468a19=this['_markMismatchedRemovedTags'](_0x468a19),_0x468a19=this['_removeUnsupportedChanges'](_0x468a19);const {root:_0x209a6f,changes:_0xff2e46}=this['_makeModelFromTape'](_0x468a19,_0x604351,_0x40319d);_0x5f28f5['model'][_0x40319d]=_0x209a6f;const _0xede711=_0x4c5521['get'](_0x40319d);if(_0xede711){const _0x1d5c68=_0x604351['get'](_0xede711['userId']),_0x5dd26d=new xt({'author':_0x1d5c68,'type':_0xede711['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x40319d});_0xff2e46['unshift'](_0x5dd26d),_0x5f28f5['attributes'][_0x40319d]['revisionHistoryAttachChange']=_0x5dd26d['id'];}_0x5f28f5['changes']=_0x5f28f5['changes']['concat'](_0xff2e46);}return _0x5f28f5;}['_markMarkers'](_0x5a969b,_0x59f155){for(let _0x164a73=0x0;_0x164a73<_0x5a969b['length'];_0x164a73++)for(const [_0x2e33bb,_0x5e286e]of _0x59f155)!_0x5e286e['isCollapsed']&&_0x5e286e['start']['isEqual'](_0x5a969b[_0x164a73]['previousPosition'])&&_0x5a969b[_0x164a73]['markersStart']['push'](_0x2e33bb),_0x5e286e['end']['isEqual'](_0x5a969b[_0x164a73]['nextPosition'])&&_0x5a969b[_0x164a73]['markersEnd']['push'](_0x2e33bb);}['_joinTapes'](_0x21bc2a,_0x3609a6){let _0x434c57=[],_0x1fc2d6=0x0,_0x4ee201=0x0;for(;_0x1fc2d6<_0x21bc2a['length']||_0x4ee201<_0x3609a6['length'];){const _0x30814b=_0x21bc2a[_0x1fc2d6]||{},_0x27abab=_0x3609a6[_0x4ee201]||{};if(_0x30814b['id']==_0x27abab['id'])_0x1fc2d6++,_0x4ee201++,_0x434c57['push'](_0x30814b);else{if(_0x27abab['isRemoved']&&_0x30814b['isAdded']){const {commonTape:_0x3e2301,iEnd:_0x2d4c46,jEnd:_0xfae93f}=this['_threeWayMerge'](_0x21bc2a,_0x1fc2d6,_0x3609a6,_0x4ee201);_0x434c57=_0x434c57['concat'](_0x3e2301),_0x1fc2d6=_0x2d4c46,_0x4ee201=_0xfae93f;}else _0x27abab['isRemoved']?(_0x4ee201++,_0x434c57['push'](_0x27abab)):(_0x1fc2d6++,_0x434c57['push'](_0x30814b));}}return _0x434c57;}['_markSuggestions'](_0x5a18a5,_0x1bd71d){const _0x50fe4d=[];for(let _0x331a9d=0x0;_0x331a9d<_0x5a18a5['length'];_0x331a9d++){for(let _0x23f17b=0x0;_0x23f17b<_0x5a18a5[_0x331a9d]['markersStart']['length'];_0x23f17b++){const _0x292e00=_0x5a18a5[_0x331a9d]['markersStart'][_0x23f17b];if(!_0x1bd71d['has'](_0x292e00))continue;const {group:_0x18e9a5,type:_0x441b56,authorId:_0x220520}=_0x41d7ed(_0x292e00);'revision-suggestion'!=_0x18e9a5||'insertion'!=_0x441b56&&'deletion'!=_0x441b56||(_0x50fe4d['unshift']({'type':_0x441b56,'name':_0x292e00,'userId':_0x220520}),_0x5a18a5[_0x331a9d]['markersStart']['splice'](_0x23f17b,0x1),_0x23f17b--);}_0x555760(_0x5a18a5[_0x331a9d]);for(let _0x535f8e=0x0;_0x535f8e<_0x5a18a5[_0x331a9d]['markersEnd']['length'];_0x535f8e++){const _0x37f1ee=_0x5a18a5[_0x331a9d]['markersEnd'][_0x535f8e];if(!_0x1bd71d['has'](_0x37f1ee))continue;const {group:_0x39a8ce,type:_0x2735da}=_0x41d7ed(_0x37f1ee);if('revision-suggestion'!=_0x39a8ce||'insertion'!=_0x2735da&&'deletion'!=_0x2735da)continue;_0x5a18a5[_0x331a9d]['markersEnd']['splice'](_0x535f8e,0x1),_0x535f8e--;const _0x4217be=_0x50fe4d['findIndex'](_0x539fa8=>_0x539fa8['name']==_0x37f1ee);_0x4217be>-0x1&&_0x50fe4d['splice'](_0x4217be,0x1);}}function _0x41d7ed(_0x90a64f){const _0x5cd3ae=_0x90a64f['split'](':');return{'group':_0x5cd3ae[0x0],'type':_0x5cd3ae[0x1],'subType':_0x5cd3ae['length']>=0x5?_0x5cd3ae[0x2]:null,'id':_0x5cd3ae['length']<0x5?_0x5cd3ae[0x2]:_0x5cd3ae[0x3],'authorId':_0x5cd3ae['length']<0x5?_0x5cd3ae[0x3]:_0x5cd3ae[0x4],'markerCount':0x6==_0x5cd3ae['length']?_0x5cd3ae[0x5]:null};}function _0x555760(_0x283b4e){for(let _0x1b1dba=0x0;_0x1b1dba<_0x50fe4d['length'];_0x1b1dba++){if(_0x283b4e['isAdded']&&'insertion'==_0x50fe4d[_0x1b1dba]['type']&&_0x283b4e['isAdded']['userId']==_0x50fe4d[_0x1b1dba]['userId'])return _0x283b4e['isAddSuggestion']=_0x50fe4d[_0x1b1dba],void delete _0x283b4e['isAdded'];if(!_0x283b4e['isAdded']&&!_0x283b4e['isRemoved']&&'deletion'==_0x50fe4d[_0x1b1dba]['type'])return void(_0x283b4e['isRemoveSuggestion']=_0x50fe4d[_0x1b1dba]);}}}['_setDistance'](_0x14db53,_0x3751a7){let _0x53900b=0x0,_0xc0c6b5=!0x1;const _0x593844=new Map();for(const _0x1ded01 of _0x14db53)_0x1ded01[_0x3751a7]?_0xc0c6b5&&(_0x53900b++,_0xc0c6b5=!0x1):(_0x53900b++,_0xc0c6b5=!0x0),_0x593844['set'](_0x1ded01['id'],_0x53900b);for(let _0x3268b1=0x0;_0x3268b1<_0x14db53['length'];_0x3268b1++){if('isRemoved'==_0x3751a7&&_0x14db53[_0x3268b1]['isAdded']||'isAdded'==_0x3751a7&&_0x14db53[_0x3268b1]['isRemoved'])continue;if('text'==_0x14db53[_0x3268b1]['type']){_0x14db53[_0x3268b1]['distance']=0x0;continue;}const _0x57265c=_0x593844['get'](_0x14db53[_0x3268b1]['pairId']),_0x35774b=_0x593844['get'](_0x14db53[_0x3268b1]['id']);_0x14db53[_0x3268b1]['distance']=_0x57265c-_0x35774b;}}['_getRevisionsRange'](_0x1455ed,_0x29e267,_0x3225b3=!0x1){const _0x3b009d=[];let _0x561c75=this['repository']['getIndex'](_0x1455ed),_0x10644e=this['repository']['getIndex'](_0x29e267);for(-0x1==_0x10644e&&(_0x10644e=this['repository']['_revisions']['length'],_0x3225b3=!0x1);_0x561c75<_0x10644e;)_0x3b009d['push'](this['repository']['getRevision'](_0x561c75)),_0x561c75++;return _0x3225b3&&_0x3b009d['push'](this['repository']['getRevision'](_0x561c75)),_0x3b009d;}['_threeWayMerge'](_0x170d8f,_0x83a547,_0x20fb06,_0x13ed18){const _0x551d25=this['editor']['model']['schema'];let _0x2b11bf=_0x83a547;for(;_0x170d8f[_0x2b11bf]&&_0x170d8f[_0x2b11bf]['isAdded'];)_0x2b11bf++;let _0x474474=_0x13ed18;for(;_0x20fb06[_0x474474]&&_0x20fb06[_0x474474]['isRemoved'];)_0x474474++;_0x31337e(_0x170d8f,_0x83a547,_0x2b11bf),_0x31337e(_0x20fb06,_0x13ed18,_0x474474);const _0x1912e2=_0x20fb06['slice'](_0x13ed18,_0x474474)['concat'](_0x170d8f['slice'](_0x83a547,_0x2b11bf));return _0x1912e2['sort']((_0x43a720,_0x253646)=>_0x43a720['side']!=_0x253646['side']?_0x43a720['side']-_0x253646['side']:_0x43a720['level']!=_0x253646['level']?_0x43a720['level']-_0x253646['level']:_0x43a720['distance']!=_0x253646['distance']?_0x253646['distance']-_0x43a720['distance']:!!_0x43a720['isAdded']!=!!_0x253646['isAdded']?-0x1==_0x43a720['side']||0x0==_0x43a720['side']?_0x43a720['isAdded']?-0x1:0x1:_0x43a720['isAdded']?0x1:-0x1:_0x43a720['index']-_0x253646['index']),{'commonTape':_0x1912e2,'iEnd':_0x2b11bf,'jEnd':_0x474474};function _0x31337e(_0xcfed12,_0x33ea09,_0x4f2b57){let _0x2839d6=-0x1,_0x13e0d6=Number['POSITIVE_INFINITY'],_0xa72c88=!0x0;for(let _0x2ffc9f=_0x33ea09;_0x2ffc9f<_0x4f2b57;_0x2ffc9f++)if(_0x551d25['isInline'](_0xcfed12[_0x2ffc9f]['item'])||(_0xa72c88=!0x1),_0xcfed12[_0x2ffc9f]['item']['startIndex']<_0x33ea09&&(_0x2839d6=_0x2ffc9f),_0xcfed12[_0x2ffc9f]['item']['endIndex']>=_0x4f2b57){_0x13e0d6=_0x2ffc9f;break;}_0xa72c88&&(_0x2839d6=_0x4f2b57-0x1);for(let _0x1fc470=_0x33ea09;_0x1fc470<_0x4f2b57;_0x1fc470++)_0xcfed12[_0x1fc470]['side']=_0x1fc470<=_0x2839d6?-0x1:_0x1fc470<_0x13e0d6?0x0:0x1,_0xcfed12[_0x1fc470]['index']=_0x1fc470;let _0xedc69f=0x0;for(let _0x2b3d45=_0x33ea09;_0x2b3d45<=_0x2839d6;_0x2b3d45++)0x0==_0xcfed12[_0x2b3d45]['distance']?_0xcfed12[_0x2b3d45]['level']=_0xedc69f:(_0xedc69f++,_0xcfed12[_0x2b3d45]['level']=_0xedc69f,_0xedc69f++);for(let _0x418b49=_0x33ea09;_0x418b49<_0x4f2b57;_0x418b49++)0x0==_0xcfed12[_0x418b49]['side']&&(_0xcfed12[_0x418b49]['level']=_0xedc69f);_0xedc69f=0x0;for(let _0x37f091=_0x4f2b57-0x1;_0x37f091>=_0x13e0d6;_0x37f091--)0x0==_0xcfed12[_0x37f091]['distance']?_0xcfed12[_0x37f091]['level']=_0xedc69f:(_0xedc69f--,_0xcfed12[_0x37f091]['level']=_0xedc69f,_0xedc69f--);}}['_fixObsoleteTags'](_0x32b6fb){const _0x47419f=new Map(),_0x2dd1a2=this['editor']['model']['schema'];for(let _0x5a2919=0x1;_0x5a2919<_0x32b6fb['length'];_0x5a2919++){let _0x4da8e5,_0x3881db,_0x2d554b;const _0x562876=_0x32b6fb[_0x5a2919],_0x54eebc=_0x32b6fb[_0x5a2919-0x1];if('text'==_0x562876['type'])continue;if(_0x562876['type']!=_0x54eebc['type'])continue;if(!_0x2dd1a2['isBlock'](_0x54eebc['item'])||_0x2dd1a2['isLimit'](_0x54eebc['item']))continue;if(!_0x2dd1a2['isBlock'](_0x562876['item'])||_0x2dd1a2['isLimit'](_0x562876['item']))continue;if((_0x32b6fb[_0x5a2919]['isAdded']||_0x32b6fb[_0x5a2919]['isAddSuggestion'])&&_0x32b6fb[_0x5a2919-0x1]['isRemoved'])_0x4da8e5=_0x32b6fb[_0x5a2919],_0x3881db=_0x32b6fb[_0x5a2919-0x1],_0x2d554b=_0x5a2919-0x1;else{if(!_0x32b6fb[_0x5a2919]['isRemoved']||!_0x32b6fb[_0x5a2919-0x1]['isAdded']&&!_0x32b6fb[_0x5a2919-0x1]['isAddSuggestion'])continue;_0x4da8e5=_0x32b6fb[_0x5a2919-0x1],_0x3881db=_0x32b6fb[_0x5a2919],_0x2d554b=_0x5a2919;}const _0x43e4da=_0x4da8e5['level']==_0x3881db['level'],_0x4be15c=Math['abs'](_0x4da8e5['level'])<Math['abs'](_0x3881db['level'])&&0x0==_0x3881db['distance'];(_0x43e4da||_0x4be15c)&&(_0x47419f['set'](_0x3881db['id'],_0x4da8e5['id']),_0x32b6fb['splice'](_0x2d554b,0x1),_0x5a2919--,_0x4da8e5['isAdded']=!0x1);}for(let _0x4e2e04=0x0;_0x4e2e04<_0x32b6fb['length'];_0x4e2e04++)_0x47419f['has'](_0x32b6fb[_0x4e2e04]['pairId'])&&(_0x32b6fb[_0x4e2e04]['pairId']=_0x47419f['get'](_0x32b6fb[_0x4e2e04]['pairId']));}['_removeMissingPairs'](_0xc02b23){const _0x11ec6f=new Set(_0xc02b23['map'](_0x280125=>_0x280125['id']));for(let _0x2752a5=0x0;_0x2752a5<_0xc02b23['length'];_0x2752a5++)_0x11ec6f['has'](_0xc02b23[_0x2752a5]['pairId'])||0x0==_0xc02b23[_0x2752a5]['distance']||(_0xc02b23[_0x2752a5]['isIncorrect']=!0x0);return _0xc02b23['filter'](_0x5b56a5=>!_0x5b56a5['isIncorrect']);}['_markMismatchedRemovedTags'](_0x256cb2){const _0x22702d=new Set();for(let _0x5f320d=0x0;_0x5f320d<_0x256cb2['length'];_0x5f320d++){if(_0x22702d['has'](_0x256cb2[_0x5f320d]['id'])&&_0x256cb2[_0x5f320d]['isRemoved']&&(_0x256cb2[_0x5f320d]['isIncorrect']=!0x0),_0x256cb2[_0x5f320d]['isIncorrect'])continue;if(0x0==_0x256cb2[_0x5f320d]['distance'])continue;if('elementStart'!=_0x256cb2[_0x5f320d]['type'])continue;if(null==_0x256cb2[_0x5f320d]['pairId'])continue;let _0x1c26f6=_0x5f320d+0x1,_0xc92490=0x0;for(;_0x256cb2[_0x1c26f6]['id']!=_0x256cb2[_0x5f320d]['pairId'];)'elementStart'==_0x256cb2[_0x1c26f6]['type']?_0xc92490++:'elementEnd'==_0x256cb2[_0x1c26f6]['type']&&_0xc92490--,_0x1c26f6++;if(0x0!=_0xc92490){if(_0x256cb2[_0x5f320d]['isRemoved'])_0x256cb2[_0x5f320d]['isIncorrect']=!0x0;else{for(;_0x1c26f6!=_0x5f320d;)_0x256cb2[_0x1c26f6]['isRemoved']&&0x0!=_0x256cb2[_0x1c26f6]['distance']&&(_0x256cb2[_0x1c26f6]['isIncorrect']=!0x0,_0x22702d['add'](_0x256cb2[_0x1c26f6]['pairId'])),_0x1c26f6--;}}}return _0x256cb2['filter'](_0x1a9616=>!_0x1a9616['isIncorrect']);}['_removeUnsupportedChanges'](_0x362dee){const _0x40e1f4=this['editor']['model']['schema'];for(let _0x24d1a4=0x0;_0x24d1a4<_0x362dee['length'];_0x24d1a4++){if(!(_0x362dee[_0x24d1a4]['isAdded']||_0x362dee[_0x24d1a4]['isAddSuggestion']||_0x362dee[_0x24d1a4]['isRemoved']||_0x362dee[_0x24d1a4]['isRemoveSuggestion']))continue;if(0x0==_0x362dee[_0x24d1a4]['distance'])continue;const _0x45bd92=_0x362dee[_0x24d1a4]['item'];_0x40e1f4['isBlock'](_0x45bd92)||_0x40e1f4['isLimit'](_0x45bd92)||(_0x362dee[_0x24d1a4]['isAdded']&&delete _0x362dee[_0x24d1a4]['isAdded'],_0x362dee[_0x24d1a4]['isAddSuggestion']&&delete _0x362dee[_0x24d1a4]['isAddSuggestion'],_0x362dee[_0x24d1a4]['isRemoveSuggestion']&&delete _0x362dee[_0x24d1a4]['isRemoveSuggestion'],_0x362dee[_0x24d1a4]['isRemoved']&&(_0x362dee[_0x24d1a4]['isIncorrect']=!0x0));}return _0x362dee['filter'](_0x4c302d=>!_0x4c302d['isIncorrect']);}['_makeModelFromTape'](_0x49c0f7,_0x4e0651,_0x332b39){const _0x5243ea=new _0x2be415(),_0x2add50=[],_0x450b0c=new Map(),_0x15f8be=this['editor']['model'],_0x2541cf=_0x15f8be['schema'],_0x214279=[_0x5243ea],_0x223c7d={},_0x15e9ab={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x75fd42=null;const _0x215ce=[0x0];for(let _0x1a685f=0x0;_0x1a685f<_0x49c0f7['length'];_0x1a685f++)if('elementStart'===_0x49c0f7[_0x1a685f]['type']){_0x49c0f7[_0x1a685f]['previousPosition']=_0x15f8be['createPositionFromPath'](_0x5243ea,_0x215ce);const _0x2dcbcf=new _0x4aadeb(_0x49c0f7[_0x1a685f]['item']['name'],_0x49c0f7[_0x1a685f]['item']['getAttributes']());_0x214279[0x0]['_appendChild'](_0x2dcbcf),_0x215ce['push'](0x0),_0x214279['unshift'](_0x2dcbcf),_0x49c0f7[_0x1a685f]['nextPosition']=_0x15f8be['createPositionFromPath'](_0x5243ea,_0x215ce);}else'elementEnd'===_0x49c0f7[_0x1a685f]['type']?(_0x214279['shift'](),_0x49c0f7[_0x1a685f]['previousPosition']=_0x15f8be['createPositionFromPath'](_0x5243ea,_0x215ce),_0x215ce['pop'](),_0x215ce[_0x215ce['length']-0x1]++,_0x49c0f7[_0x1a685f]['nextPosition']=_0x15f8be['createPositionFromPath'](_0x5243ea,_0x215ce)):(_0x49c0f7[_0x1a685f]['previousPosition']=_0x15f8be['createPositionFromPath'](_0x5243ea,_0x215ce),_0x75fd42?_0x75fd42['_data']+=_0x49c0f7[_0x1a685f]['item']['data']:_0x75fd42=new _0x5b9a55(_0x49c0f7[_0x1a685f]['item']['data'],_0x49c0f7[_0x1a685f]['item']['getAttributes']()),_0x49c0f7[_0x1a685f+0x1]&&'text'===_0x49c0f7[_0x1a685f+0x1]['type']&&_0x473392(_0x75fd42,_0x49c0f7[_0x1a685f+0x1]['item'])||(_0x214279[0x0]['_appendChild'](_0x75fd42),_0x75fd42=null),_0x215ce[_0x215ce['length']-0x1]+=_0x49c0f7[_0x1a685f]['item']['offsetSize'],_0x49c0f7[_0x1a685f]['nextPosition']=_0x15f8be['createPositionFromPath'](_0x5243ea,_0x215ce));for(let _0x2defa8=0x0;_0x2defa8<_0x49c0f7['length'];_0x2defa8++){const _0x4d255e=_0x49c0f7[_0x2defa8]['previousPosition'],_0x1539ae=_0x49c0f7[_0x2defa8]['nextPosition'];for(const _0x29e0d5 of _0x49c0f7[_0x2defa8]['markersStart'])_0x450b0c['set'](_0x29e0d5,{'start':_0x4d255e,'end':null});_0x3e9243('isRemoveSuggestion',_0x2defa8,_0x4d255e,_0x1539ae),_0x3e9243('isAddSuggestion',_0x2defa8,_0x4d255e,_0x1539ae),_0x3e9243('isRemoved',_0x2defa8,_0x4d255e,_0x1539ae),_0x3e9243('isAdded',_0x2defa8,_0x4d255e,_0x1539ae);for(const _0x5175db of _0x49c0f7[_0x2defa8]['markersEnd']){const _0x560fd4=_0x450b0c['get'](_0x5175db);_0x560fd4?_0x560fd4['end']=_0x1539ae:_0x450b0c['set'](_0x5175db,{'start':_0x1539ae,'end':_0x1539ae});}}for(const [_0x131ea1,_0x1a1529]of _0x450b0c){const _0x117338=this['editor']['model']['createRange'](_0x1a1529['start'],_0x1a1529['end']);_0x5243ea['markers']['set'](_0x131ea1,_0x117338);}return _0x2add50['sort']((_0x286812,_0x59e1a6)=>{const _0x5d4fd7=_0x5243ea['markers']['get']('revision:'+_0x286812['id']),_0x88386d=_0x5243ea['markers']['get']('revision:'+_0x59e1a6['id']);return _0x5d4fd7['start']['isBefore'](_0x88386d['start'])?-0x1:_0x5d4fd7['start']['isAfter'](_0x88386d['start'])?0x1:_0x5d4fd7['end']['isBefore'](_0x88386d['end'])?-0x1:_0x5d4fd7['end']['isAfter'](_0x88386d['end'])?0x1:'add'===_0x286812['type']?-0x1:0x1;}),{'root':_0x5243ea,'changes':_0x2add50};function _0x3e9243(_0x550630,_0x19c2f2,_0x1abc0b,_0x5ad9bc){const _0x1c6396=!!_0x49c0f7[_0x19c2f2][_0x550630],_0x470078=_0x1c6396?_0x49c0f7[_0x19c2f2][_0x550630]['userId']:null,_0x1cbbc1=_0x19c2f2===_0x49c0f7['length']-0x1,_0x5eea64=_0x15e9ab[_0x550630][0x0],_0x482e00=_0x2541cf['isObject'](_0x49c0f7[_0x19c2f2]['item']);!_0x223c7d[_0x550630]&&_0x1c6396?_0x223c7d[_0x550630]={'start':_0x1abc0b,'tapeItem':_0x49c0f7[_0x19c2f2],'userId':_0x470078,'type':_0x550630}:_0x223c7d[_0x550630]&&!_0x1c6396?(_0x223c7d[_0x550630]['end']=_0x1abc0b,_0xad49ca(_0x223c7d[_0x550630]),_0x223c7d[_0x550630]=null):_0x223c7d[_0x550630]&&_0x1c6396&&_0x223c7d[_0x550630]['userId']!==_0x470078&&(_0x223c7d[_0x550630]['end']=_0x1abc0b,_0x5eea64&&_0x5eea64['userId']===_0x223c7d[_0x550630]['userId']||_0xad49ca(_0x223c7d[_0x550630]),_0x223c7d[_0x550630]={'start':_0x1abc0b,'tapeItem':_0x49c0f7[_0x19c2f2],'userId':_0x470078,'type':_0x550630}),_0x223c7d[_0x550630]&&_0x482e00&&('elementStart'!==_0x49c0f7[_0x19c2f2]['type']||_0x5eea64&&_0x5eea64['userId']===_0x470078||_0x15e9ab[_0x550630]['unshift']({'userId':_0x470078,'object':_0x49c0f7[_0x19c2f2]['item'],'change':_0x223c7d[_0x550630]}),'elementEnd'===_0x49c0f7[_0x19c2f2]['type']&&_0x5eea64&&_0x5eea64['object']===_0x49c0f7[_0x19c2f2]['item']&&(_0x15e9ab[_0x550630]['shift'](),_0x223c7d[_0x550630]=_0x5eea64['change'])),_0x223c7d[_0x550630]&&_0x1cbbc1&&(_0x223c7d[_0x550630]['end']=_0x5ad9bc,_0xad49ca(_0x223c7d[_0x550630]),_0x223c7d[_0x550630]=null);}function _0xad49ca({start:_0x3d215a,end:_0x5e4f9c,tapeItem:_0x1580a7,userId:_0x1343c1,type:_0x30686a}){const _0x4c886f=_0x1580a7['item'],_0x252b83=_0x15f8be['schema']['isBlock'](_0x4c886f)&&!_0x15f8be['schema']['isLimit'](_0x4c886f),_0x584d40=_0x3d215a['nodeAfter']==_0x5e4f9c['parent']&&_0x5e4f9c['isAtStart'];if(_0x252b83&&_0x584d40)return;const _0x30a1c9=_0x15f8be['createRange'](_0x3d215a,_0x5e4f9c),_0x31f056=_0x4e0651['get'](_0x1343c1),_0x4f4bd4=new xt({'author':_0x31f056,'type':'isAdded'==_0x30686a||'isAddSuggestion'==_0x30686a?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x30686a||'isRemoveSuggestion'==_0x30686a},'createdAt':new Date(),'rootName':_0x332b39});_0x2add50['push'](_0x4f4bd4),_0x5243ea['markers']['set']('revision:'+_0x4f4bd4['id'],_0x30a1c9);}function _0x473392(_0x39db9a,_0x1f0712){const _0x20d583=_0x39db9a['getAttributes'](),_0x4dc580=_0x1f0712['getAttributes']();for(const _0x4e0ea3 of _0x20d583){if(_0x4e0ea3[0x1]!==_0x1f0712['getAttribute'](_0x4e0ea3[0x0]))return!0x1;_0x4dc580['next']();}return _0x4dc580['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x56bca2=>{const _0x42e87a=_0x56bca2['markerName']['split'](':')[0x1],_0x4337dd=this['_getChangeFromId'](_0x42e87a);if(!_0x4337dd)return null;const _0x32c5ff='add'==_0x4337dd['type']?'insertion':'deletion',_0x41c144=['ck-suggestion-marker','ck-suggestion-marker-'+_0x32c5ff];return _0x4337dd['data']['isSuggestion']&&_0x41c144['push']('ck-suggestion-marker-'+_0x32c5ff+'-new'),this['activeChange']==_0x4337dd&&_0x41c144['push']('ck-suggestion-marker--active'),{'classes':_0x41c144,'attributes':{'data-change-id':_0x42e87a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x18d407=>{_0x18d407['on']('element:pre',(_0x49648e,_0x125d13,_0x36b17e)=>{const _0x38f484=_0x125d13['viewItem']['getChild'](0x0);if(!_0x38f484||!_0x38f484['is']('element','code'))return;if(!_0x36b17e['consumable']['consume'](_0x38f484,{'attributes':['vid_start','vid_end']}))return;const _0x4bf9b9=_0x125d13['modelRange']['start']['nodeAfter'];_0x36b17e['writer']['setAttribute']('vid_start',_0x38f484['getAttribute']('vid_start'),_0x4bf9b9),_0x36b17e['writer']['setAttribute']('vid_end',_0x38f484['getAttribute']('vid_end'),_0x4bf9b9);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3f6ef0=>{_0x3f6ef0['on']('element',(_0x287b04,_0x1f988f,_0x4955b4)=>{if(!_0x4955b4['consumable']['consume'](_0x1f988f['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1f988f['modelRange']['isCollapsed'])return;const _0x11112b=_0x1f988f['modelRange']['start']['nodeAfter'];_0x11112b['hasAttribute']('vid_start')||_0x11112b['hasAttribute']('vid')||(_0x4955b4['writer']['setAttribute']('vid_start',_0x1f988f['viewItem']['getAttribute']('vid_start'),_0x11112b),_0x4955b4['writer']['setAttribute']('vid_end',_0x1f988f['viewItem']['getAttribute']('vid_end'),_0x11112b));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1c1e3b=>_0x1c1e3b['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x223c7a,[,_0x5df47e])=>{['vid_start','vid_end','vid']['includes'](_0x5df47e)&&(_0x223c7a['return']=!0x0,_0x223c7a['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x132e41=>{_0x132e41['on']('attribute:vid',(_0x4180b4,_0x501f61,_0x3f6ce5)=>{if('\x20'!=_0x501f61['item']['data']||_0x501f61['item']['parent']['maxOffset']>0x1)return;if(!_0x3f6ce5['consumable']['consume'](_0x501f61['item'],_0x4180b4['name']))return;const _0x32f2c9=_0x3f6ce5['writer'],_0x48f16d=_0x3f6ce5['mapper']['toViewRange'](_0x501f61['range']);_0x32f2c9['wrap'](_0x48f16d,_0x32f2c9['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0xa5f88b){const _0x5712fb=_0xa5f88b['plugins']['get']('RevisionViewer');return(_0x30ec78,_0x8e7f05,_0x5de37b)=>{const _0x388e1d=_0x8e7f05['markerName']['split'](':')[0x1],_0x18efe7=_0x5712fb['_getChangeFromId'](_0x388e1d);if(!_0x18efe7)return null;const _0x32d329='add'==_0x18efe7['type']?'split':'merge';if(!_0x5de37b['consumable']['test'](_0x8e7f05['markerRange'],_0x30ec78['name']))return;const _0x124e0c=_0x8e7f05['markerRange']['getWalker'](),_0x50a68c=_0x8e7f05['markerRange']['start'],_0x4d7136=_0xa5f88b['model']['schema'];let _0x453530=null,_0x29075e=null,_0x389c07=!0x1,_0x798c9e=!0x1;for(const _0x3c9fad of _0x124e0c){const _0x8c1064=_0x3c9fad['item'];_0x389c07=_0x389c07||_0x4d7136['isContent'](_0x8c1064);const _0x28c14c=_0x5de37b['mapper']['toViewElement'](_0x8c1064);if(_0x28c14c&&_0x28c14c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3c9fad['type']&&(_0x4d7136['isBlock'](_0x8c1064)&&!_0x4d7136['isLimit'](_0x8c1064)&&(_0x8c1064['nextSibling']||_0x50a68c['isAtEnd']?_0x453530&&_0x453530['parent']==_0x8c1064||(_0x453530=_0x8c1064,_0x3b9074(_0x3c9fad['previousPosition']),_0x798c9e=!0x0):_0x29075e=_0x29075e||_0x3c9fad['previousPosition']));}function _0x3b9074(_0x101190){const _0x26a3ad=_0x5de37b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x32d329}),_0x14fad=_0x5de37b['mapper']['toViewPosition'](_0x101190);_0x18efe7['data']['isSuggestion']&&_0x5de37b['writer']['addClass']('ck-suggestion-marker-'+_0x32d329+'-new',_0x26a3ad),_0x5712fb['activeChange']==_0x18efe7&&_0x5de37b['writer']['addClass']('ck-suggestion-marker--active',_0x26a3ad),_0x5de37b['writer']['insert'](_0x14fad,_0x26a3ad),_0x5de37b['mapper']['bindElementToMarker'](_0x26a3ad,_0x8e7f05['markerName']);}_0x389c07||_0x798c9e||!_0x29075e||_0x3b9074(_0x29075e);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x28123e,_0x55faba,_0x274a80)=>{const _0x3bebc4=_0x274a80['mapper']['markerNameToElements'](_0x55faba['markerName']);if(_0x3bebc4){for(const _0x1dc76d of _0x3bebc4)(_0x1dc76d['hasClass']('ck-suggestion-marker-split')||_0x1dc76d['hasClass']('ck-suggestion-marker-merge'))&&(_0x274a80['mapper']['unbindElementFromMarkerName'](_0x1dc76d,_0x55faba['markerName']),_0x274a80['writer']['remove'](_0x1dc76d));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x281aca,_0x1b728d,_0x403164)=>{const _0x437e24=_0x1b728d['markerName']['split'](':')[0x1],_0x32bb3e=this['_getChangeFromId'](_0x437e24);if(!_0x32bb3e)return null;const _0x4f1ca2='add'==_0x32bb3e['type']?'split':'merge';if(_0x403164['consumable']['test'](_0x1b728d['markerRange'],_0x281aca['name']))for(const _0x1ba95c of _0x1b728d['markerRange']['getItems']()){if(!_0x1ba95c['is']('element','softBreak'))continue;const _0x417476=_0x403164['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4f1ca2}),_0xdb8de6=_0x403164['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1ba95c));_0x32bb3e['data']['isSuggestion']&&_0x403164['writer']['addClass']('ck-suggestion-marker-'+_0x4f1ca2+'-new',_0x417476),this['activeChange']==_0x32bb3e&&_0x403164['writer']['addClass']('ck-suggestion-marker--active',_0x417476),_0x403164['writer']['insert'](_0xdb8de6,_0x417476),_0x403164['mapper']['bindElementToMarker'](_0x417476,_0x1b728d['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x5d60c6=>{for(const _0x131e7e of this['editor']['model']['document']['getRootNames']()){const _0xf88511=this['editor']['model']['document']['getRoot'](_0x131e7e),_0x5d940e=this['editor']['editing']['view']['document']['getRoot'](_0x131e7e);if(_0x5d940e){const _0x218011=_0xf88511['getAttribute']('revisionHistoryAttachChange');if(_0x5d60c6['removeAttribute']('data-change-id',_0x5d940e),_0x5d60c6['removeClass']('ck-revision-history-root-add',_0x5d940e),_0x5d60c6['removeClass']('ck-revision-history-root-remove',_0x5d940e),_0x5d60c6['removeClass']('ck-revision-history-root--active',_0x5d940e),_0x218011){const _0x4815b0=this['_getChangeFromId'](_0x218011);if(!_0x4815b0)return null;_0x5d60c6['setAttribute']('data-change-id',_0x218011,_0x5d940e),_0x5d60c6['addClass']('ck-revision-history-root-'+_0x4815b0['type'],_0x5d940e),this['activeChange']==_0x4815b0&&_0x5d60c6['addClass']('ck-revision-history-root--active',_0x5d940e);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x16f2e9=>'revision-comment:'+_0x16f2e9,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1e9a53=>'revision-suggestion:'+_0x1e9a53,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x50f49b=>({'name':'suggestion:'+_0x50f49b,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x116c8b=>{const _0x39a738=_0x116c8b['markerName']['split'](':')[0x1];return'insertion'!=_0x39a738&&'deletion'!=_0x39a738?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x39a738]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ot(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ot(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0xd3c9c6,_0x5ed080,_0x3f33d4)=>{const _0x563b97=_0x3f33d4['mapper']['markerNameToElements'](_0x5ed080['markerName']);if(_0x563b97){for(const _0x4b7a72 of _0x563b97)_0x4b7a72['is']('uiElement')&&(_0x3f33d4['mapper']['unbindElementFromMarkerName'](_0x4b7a72,_0x5ed080['markerName']),_0x3f33d4['writer']['remove'](_0x4b7a72));}},{'priority':'high'});}['_getChangeFromId'](_0x1d84a2){return this['_changeIdToChange']['get'](_0x1d84a2);}['_getViewForChange'](_0x2b5c19){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x2b5c19),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x249abb,_0x197fb9,_0x36e266,_0x228b48)=>{_0x228b48&&this['_balloon']['remove'](_0x228b48),_0x36e266&&(this['_balloon']['add']({'view':_0x36e266,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x45f815=this['editor']['editing'],_0x40dc73=this['_getChangeFromId'](_0x36e266['changeId']);let _0x33cd99;if(_0x40dc73['data']['isOnRoot']){const _0x16a184=_0x45f815['view']['getDomRoot'](_0x40dc73['rootName']);_0x33cd99=Array['from'](_0x16a184['getClientRects']());}else{const _0x4fa7f7=this['editor']['model']['markers']['get']('revision:'+_0x36e266['changeId']);_0x33cd99=Array['from'](_0x45f815['mapper']['markerNameToElements'](_0x4fa7f7['name']))['map'](_0x9e3cdf=>_0x45f815['view']['domConverter']['mapViewToDom'](_0x9e3cdf))['map'](_0x1b880c=>Array['from'](_0x1b880c['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x33cd99[0x0];return _0x33cd99['find'](_0x2319de=>_0x2319de['top']-0x3<=this['_activeViewTarget']['y']&&_0x2319de['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2319de['left']-0x3<=this['_activeViewTarget']['x']&&_0x2319de['right']+0x3>=this['_activeViewTarget']['x'])||_0x33cd99[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x311004,_0x395ffb,_0x34858e,_0x241d0a)=>{this['activeView']=_0x34858e?this['_getViewForChange'](_0x34858e):null,this['editor']['model']['change'](()=>{const _0x3841a5=this['editor']['editing'];_0x241d0a&&(_0x241d0a['data']['isOnRoot']?_0x3841a5['view']['change'](_0x5c5504=>{_0x5c5504['removeClass']('ck-revision-history-root--active',_0x3841a5['view']['document']['getRoot'](_0x241d0a['rootName']));}):_0x3841a5['reconvertMarker']('revision:'+_0x241d0a['id'])),_0x34858e&&(_0x34858e['data']['isOnRoot']?_0x3841a5['view']['change'](_0x97d1bb=>{_0x97d1bb['addClass']('ck-revision-history-root--active',_0x3841a5['view']['document']['getRoot'](_0x34858e['rootName']));}):_0x3841a5['reconvertMarker']('revision:'+_0x34858e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x28cb1b,_0x3bd7f2)=>{if(this['activeChange'])return;const _0x38b7e9=this['_findChangeIdFromDomTarget'](_0x3bd7f2['target']),_0x572263=this['_changeIdToChange']['get'](_0x38b7e9);_0x572263?(this['_activeViewTarget']={'x':_0x3bd7f2['domEvent']['x'],'y':_0x3bd7f2['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x572263)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3d2799,_0x44424c)=>{const _0x50a19b=this['_findChangeIdFromDomTarget'](_0x44424c['target']),_0x2866fe=this['_changeIdToChange']['get'](_0x50a19b);_0x2866fe?(this['_activeViewTarget']={'x':_0x44424c['domEvent']['x'],'y':_0x44424c['domEvent']['y']},_0x2866fe===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2866fe):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x36b14b){do{const _0x190295=_0x36b14b['getAttribute']('data-change-id');if(_0x190295)return _0x190295;_0x36b14b=_0x36b14b['parent'];}while(_0x36b14b);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1afbb5=>{for(const _0x1e7ff5 of this['editor']['model']['markers'])_0x1afbb5['removeMarker'](_0x1e7ff5);});}}function Ot(_0x35ed82,_0x6d713c){return(_0x12124e,_0x1c4a65,_0x2c1c31)=>{if(!_0x2c1c31['consumable']['test'](_0x1c4a65['markerRange'],_0x12124e['name']))return;const _0x1721d3=_0x1c4a65['markerRange']['getWalker'](),_0x498e=_0x1c4a65['markerRange']['start'],_0x3c5e06=_0x35ed82['model']['schema'];let _0x432900=null,_0x280103=null,_0x3ec13f=!0x1,_0x47b959=!0x1;for(const _0x1edbcf of _0x1721d3){const _0x248fb4=_0x1edbcf['item'];_0x3ec13f=_0x3ec13f||_0x3c5e06['isContent'](_0x248fb4);const _0x5c4709=_0x2c1c31['mapper']['toViewElement'](_0x248fb4);if(_0x5c4709&&_0x5c4709['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1edbcf['type']&&(_0x3c5e06['isBlock'](_0x248fb4)&&!_0x3c5e06['isLimit'](_0x248fb4)&&(_0x248fb4['nextSibling']||_0x498e['isAtEnd']?_0x432900&&_0x432900['parent']==_0x248fb4||(_0x432900=_0x248fb4,_0x276835(_0x1edbcf['previousPosition']),_0x47b959=!0x0):_0x280103=_0x280103||_0x1edbcf['previousPosition']));}function _0x276835(_0x3a9e69){const _0x25d519=_0x2c1c31['mapper']['toViewPosition'](_0x3a9e69),_0x4896c1=_0x2c1c31['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x6d713c});_0x2c1c31['writer']['insert'](_0x25d519,_0x4896c1),_0x2c1c31['mapper']['bindElementToMarker'](_0x4896c1,_0x1c4a65['markerName']);}_0x3ec13f||_0x47b959||!_0x280103||_0x276835(_0x280103);};}class Ct extends _0x559121{constructor(_0x1a5829){super(_0x1a5829);const _0x4fcb42=_0x1a5829['plugins']['get'](St);this['affectsData']=!0x1,this['listenTo'](_0x4fcb42,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4fcb42,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4b312a=this['editor'],_0x3c6733=_0x4b312a['plugins']['get'](St),_0x20e9d6=_0x3c6733['isReady']?_0x3c6733['diff']['newRevisionId']:null;_0x4b312a['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x20e9d6);}['refresh'](){const {isReady:_0x1f45d4,isEnabled:_0x9ad991,repository:_0x4574da,diff:_0xbc1b32}=this['editor']['plugins']['get'](St),_0x52eda7=_0xbc1b32&&_0x4574da['getLaterVisibleRevision'](_0xbc1b32['newRevisionId']);this['isEnabled']=_0x1f45d4&&_0x9ad991&&Boolean(_0x52eda7);}}class Mt extends _0x559121{['_step'];constructor(_0x12e96f,{direction:_0xb81138}){super(_0x12e96f);const _0x3ed2f9=_0x12e96f['plugins']['get'](St);this['affectsData']=!0x1,this['_step']='forward'===_0xb81138?0x1:-0x1,this['listenTo'](_0x3ed2f9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3ed2f9,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3ed2f9,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4a5205=this['editor'],_0x5ca466=_0x4a5205['plugins']['get'](St),{isNavigationMode:_0x559ce8,currentChangeNumber:_0x4cba66}=_0x5ca466;let _0x4c07c5;if(_0x5ca466['activeChange']=_0x559ce8?_0x5ca466['diff']['changes']['get'](_0x4cba66+this['_step']):_0x5ca466['diff']['changes']['first'],_0x5ca466['activeChange']['data']['isOnRoot'])_0x4c07c5=_0x4a5205['editing']['view']['getDomRoot'](_0x5ca466['activeChange']['rootName']);else{const _0x375711=_0x4a5205['model']['markers']['get']('revision:'+_0x5ca466['activeChange']['id']);_0x4c07c5=_0x580c97(_0x4a5205['editing'],_0x375711);}_0x576bae({'target':_0x4c07c5,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0xd1540f,currentChangeNumber:_0x19edd4,numberOfChanges:_0x598e6a,isReady:_0x2aed3b,isEnabled:_0x260c57}=this['editor']['plugins']['get'](St);this['isEnabled']=!!(_0x260c57&&_0x2aed3b&&_0x598e6a)&&(!_0xd1540f||(0x1===this['_step']?_0x19edd4<_0x598e6a-0x1:_0x19edd4>0x0));}}class Dt extends _0x47f08c{constructor(_0x55ea2d){super(_0x55ea2d);const _0x300e41=this['bindTemplate'],_0x80bd3d=new _0x3d94f2(_0x55ea2d),_0x1c84bd=new _0x3d94f2(_0x55ea2d);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',(_0x21504a,_0x506b3c)=>_0x21504a&&_0x506b3c>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x48a156,_0x8c28ac,_0x42cda5,_0x1f99cc)=>{if(!_0x48a156)return wt(_0x55ea2d,'Loading...');if(!_0x42cda5)return wt(_0x55ea2d,'No\x20changes');const _0x52a988=wt(_0x55ea2d,'NUMBER_OF_CHANGES',_0x42cda5);return _0x1f99cc?wt(_0x55ea2d,'X_OF_Y_CHANGES',[_0x8c28ac+0x1,_0x42cda5]):_0x52a988;}),_0x80bd3d['set']({'label':wt(_0x55ea2d,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x247f49}),_0x1c84bd['set']({'label':wt(_0x55ea2d,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5e93a2}),_0x80bd3d['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1c84bd['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x80bd3d['on']('execute',()=>this['fire']('execute','backward')),_0x1c84bd['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',_0x300e41['if']('_isStatusLabelVisible','ck-hidden',_0x2d1720=>!_0x2d1720)]},'children':[{'text':_0x300e41['to']('isNavigationMode',_0x429d35=>_0x429d35?wt(_0x55ea2d,'EDIT_X_OF_Y_REVISIONS')+':\x20':wt(_0x55ea2d,'Total')+':\x20')}]},{'text':_0x300e41['to']('_statusText')}]},new et(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x80bd3d,_0x1c84bd]}]});}}const Tt='ck-editor__editable__loading-overlay';class Vt extends _0x251d17{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x23343f=this['editor']['editing']['view'];_0x23343f['change'](_0x27ad78=>{for(const _0x2be6a9 of _0x23343f['document']['roots'])_0x27ad78['addClass'](Tt,_0x2be6a9);});}['hide'](){const _0x5b382f=this['editor']['editing']['view'];_0x5b382f['change'](_0x8b0fa0=>{for(const _0x16a131 of _0x5b382f['document']['roots'])_0x8b0fa0['removeClass'](Tt,_0x16a131);});}}class Ht extends _0x251d17{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[St,Vt];}['init'](){const _0x36f7ac=this['editor'],_0x5c3f4a=_0x36f7ac['plugins']['get'](St),_0x356a50=_0x36f7ac['plugins']['get'](Vt);_0x36f7ac['ui']['componentFactory']['add']('exitToEditing',_0xa5df5c=>{const _0xecb8c=new _0x3d94f2(_0xa5df5c);return _0xecb8c['set']({'label':wt(_0xa5df5c,'Back\x20to\x20editing'),'icon':_0x3d9e83,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xecb8c,'execute',()=>{_0x36f7ac['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xecb8c;}),_0x36f7ac['ui']['componentFactory']['add']('restoreRevision',_0x180efc=>{const _0x40d13a=new _0x3d94f2(_0x180efc);return _0x40d13a['set']({'label':wt(_0x180efc,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x40d13a['bind']('isEnabled')['to'](_0x36f7ac['commands']['get']('restoreRevision')),this['listenTo'](_0x40d13a,'execute',()=>_0x36f7ac['execute']('restoreRevision')),_0x40d13a;}),_0x36f7ac['ui']['componentFactory']['add']('changesNavigation',_0x4696c2=>{const _0x2f8ea6=new Dt(_0x4696c2),_0x5cd86a=_0x36f7ac['commands']['get']('showPreviousChange'),_0x4f5fa7=_0x36f7ac['commands']['get']('showNextChange');return _0x2f8ea6['bind']('isBackwardNavigationEnabled')['to'](_0x5cd86a,'isEnabled'),_0x2f8ea6['bind']('isForwardNavigationEnabled')['to'](_0x4f5fa7,'isEnabled'),_0x2f8ea6['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x5c3f4a),this['listenTo'](_0x2f8ea6,'execute',(_0x5242c5,_0xa8992a)=>{_0x36f7ac['execute']('forward'===_0xa8992a?'showNextChange':'showPreviousChange');}),_0x2f8ea6;}),_0x356a50['show'](),_0x5c3f4a['on']('change:isReady',(_0x1c9bb8,_0x31fb20,_0x44d441)=>{_0x44d441?_0x356a50['hide']():_0x356a50['show']();});}}class Pt extends _0x771b7d{['_resizeObserver']=null;constructor(_0x1b34e7,_0x832e04){super(_0x1b34e7,_0x832e04);const _0x678a72=this['bindTemplate'];this['set']({'label':wt(_0x1b34e7,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=wt(_0x1b34e7,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x678a72['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x2d8cd3(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x23189b=this['fieldView']['element'];this['_tooltipString']=_0x23189b['scrollWidth']>_0x23189b['clientWidth']&&_0x23189b['value']||'';}}class Ut extends _0x47f08c{constructor(_0x441003,_0x33cd3f,_0x1c4ac1){super(_0x441003);const _0x215e81=new nt();_0x215e81['set']({'content':_0x4eefda,'viewBox':'0\x200\x2011\x2010'});const _0x14283b=['ck','ck-revision-history-sidebar__revision-author'];_0x1c4ac1&&_0x14283b['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1a63b8=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':wt(_0x441003,_0x1c4ac1?'Revision\x20creator':'Revision\x20author')},'children':[_0x215e81,_0x33cd3f['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x14283b},'children':_0x1a63b8});}}function Lt(_0x4c4a40,_0x15ab59){const _0x1ade94=_0x4c4a40['bindTemplate'],_0x55ee62=_0x4c4a40['locale'],_0x4bb1a5=_0x534b7c(_0x55ee62);_0x4bb1a5['panelPosition']='sw';const _0x3a4ae4=function(_0x1d0f25,_0xc6842b){const _0x58c6bd=function(_0x595f48,_0x161694){const _0x20ea77=_0x595f48['locale'],_0x346357={'Compare\x20against\x20selected':wt(_0x20ea77,'Compare\x20against\x20selected'),'Name\x20this\x20revision':wt(_0x20ea77,'Name\x20this\x20revision'),'Restore\x20this\x20revision':wt(_0x20ea77,'Restore\x20this\x20revision')};return _0x161694['map'](_0x18538b=>{const _0x581277=_0x346357[_0x18538b['name']];return _0x581277&&_0x581277!==_0x18538b['name']&&(_0x18538b['name']=_0x581277),_0x18538b;});}(_0x1d0f25,_0xc6842b),_0x31a7ea=new _0x17e3cb();for(const _0x4010d5 of _0x58c6bd){const _0xc76896={'type':'button','model':new rt({'label':_0x4010d5['name'],'class':_0x4010d5['class'],'withText':!0x0,'role':'menuitem','_action':_0x4010d5['action']})};_0xc76896['model']['bind']('isEnabled')['to'](_0x1d0f25,'isActionsDropdownOpen',_0x31ede2=>'function'!=typeof _0x4010d5['isEnabled']||(!_0x31ede2||_0x4010d5['isEnabled'](_0x1d0f25))),_0x31a7ea['add'](_0xc76896);}return _0x31a7ea;}(_0x4c4a40,_0x15ab59);return _0x4c4a40['bind']('isActionsDropdownOpen')['to'](_0x4bb1a5,'isOpen'),_0x4bb1a5['buttonView']['set']({'label':wt(_0x55ee62,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x49b3cd}),_0x4bb1a5['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1ade94['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1ade94['to'](_0x1431cb=>_0x1431cb['stopPropagation']())}}),_0x4bb1a5['on']('execute',_0x1d94ba=>{_0x4c4a40['isReady']&&'function'==typeof _0x1d94ba['source']['_action']&&_0x1d94ba['source']['_action'](_0x4c4a40);}),ot(_0x4bb1a5,_0x3a4ae4,{'role':'menu'}),_0x4bb1a5['listenTo'](_0x4c4a40,'change:isActionsDropdownOpen',(_0x3af5af,_0x5157be,_0x5b84dd)=>{if(_0x5b84dd)for(const _0x58d9d4 of _0x4bb1a5['listView']['items']){const _0x18ef32=_0x58d9d4['children']['first'],_0x3c0825=_0x15ab59['find'](_0x23aba5=>_0x23aba5['action']===_0x18ef32['_action'])['isVisible'];_0x58d9d4['isVisible']=void 0x0===_0x3c0825||_0x3c0825(_0x4c4a40);}}),_0x4bb1a5;}class Ft extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x29a165(_0x47f08c){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x325af3,_0x16fca2,_0x36c758,_0x327966){super(_0x325af3);const _0x599790=this['bindTemplate'],_0x5ef933=function(_0x702aef,_0x42a0c3){const _0x50e7cd=Array['from'](_0x42a0c3['authors'])['filter'](_0x232a2c=>_0x232a2c!=_0x42a0c3['creator']);return _0x42a0c3['creator']&&_0x50e7cd['unshift'](_0x42a0c3['creator']),_0x50e7cd['map'](_0xad25de=>new Ut(_0x702aef,_0xad25de,_0xad25de==_0x42a0c3['creator']));}(_0x325af3,_0x16fca2);this['id']=_0x16fca2['id'],this['_revision']=_0x16fca2,this['_requireRevisionName']=_0x327966,this['bind']('name','createdAt')['to'](_0x16fca2),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x3186af=>{return _0x146dce=_0x325af3['uiLanguage'],(_0x290c1b=_0x3186af)['toLocaleDateString'](_0x146dce,{'month':'long','day':'numeric'})+',\x20'+_0x290c1b['toLocaleTimeString'](_0x146dce,{'hour':'numeric','minute':'numeric'});var _0x146dce,_0x290c1b;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Pt(_0x325af3,_0x5ac4e5),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0xc75273=>_0xc75273||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x363f93,_0x12992c)=>_0x363f93&&_0x12992c),this['revisionActionsView']=_0x36c758&&_0x36c758['length']?Lt(this,_0x36c758):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x599790['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x599790['if']('isEnabled','ck-disabled',_0x5dc239=>!_0x5dc239),_0x599790['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x599790['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x599790['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':_0x599790['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':_0x5ef933}]},this['revisionActionsView']],'on':{'click':_0x599790['to'](_0x4c7c1f=>{_0x4c7c1f['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x444845=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x444845,'change',()=>{this['_requireRevisionName']&&!_0x444845['value']||this['fire']('setName',{'id':this['id'],'name':_0x444845['value']}),_0x444845['value']||(_0x444845['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function $t(_0x2a0e0d,_0x564f9e){const _0xe2eb2b=ft['fromJSDate'](_0x2a0e0d)['setLocale'](_0x564f9e),_0x5531a1=ft['local'](),_0x130490=_0x5531a1['minus']({'days':0x1})['startOf']('day');let _0x467c39,_0x5d80f4;return _0xe2eb2b['hasSame'](_0x5531a1,'day')?(_0x467c39=_0xe2eb2b['startOf']('day')['toJSDate'](),_0x5d80f4=_0xe2eb2b['toRelativeCalendar']()):_0xe2eb2b['hasSame'](_0x130490,'day')?(_0x467c39=_0x130490['toJSDate'](),_0x5d80f4=_0xe2eb2b['toRelativeCalendar']()):_0xe2eb2b['hasSame'](_0x5531a1,'week')?(_0x467c39=_0xe2eb2b['startOf']('week')['toJSDate'](),_0x5d80f4=_0xe2eb2b['weekdayLong']||''):_0xe2eb2b['hasSame'](_0x5531a1,'year')?(_0x467c39=_0xe2eb2b['startOf']('month')['toJSDate'](),_0x5d80f4=_0xe2eb2b['monthLong']||''):(_0x467c39=_0xe2eb2b['startOf']('year')['toJSDate'](),_0x5d80f4=String(_0xe2eb2b['year'])),{'startDate':_0x467c39,'localizedPeriodName':_0x5d80f4};}class jt extends _0x47f08c{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x673146,_0x59aa28,_0x1825e7,_0x207ae0){super(_0x673146);const _0x5eb329=$t(_0x59aa28,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x59aa28,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x1825e7,this['_requireRevisionName']=_0x207ae0,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':_0x5eb329}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x254650){const _0x59d6e7=new Ft(this['locale'],_0x254650,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x59d6e7);}['removeRevision'](_0x2df2cd){const _0x36c33c=this['revisionViews']['find'](_0x14f063=>_0x14f063['id']===_0x2df2cd['id']);this['revisionViews']['remove'](_0x36c33c);}}class Bt extends _0x47f08c{constructor(_0x16f39a){super(_0x16f39a);const _0x16a458=new nt();_0x16a458['content']=_0x2dfda0,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x16a458,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[wt(_0x16f39a,'Revision\x20history')]}]});}}class Kt extends _0x47f08c{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0xda4c7e,_0x340c1f,_0x5444a8,_0x345a4b){super(_0xda4c7e);const _0x960465=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x340c1f,this['_revisionActions']=_0x5444a8,this['_requireRevisionName']=_0x345a4b,this['on']('select',(_0x34b327,_0x57b846)=>{this['fire']('revisionSelected',_0x57b846);}),this['on']('setName',(_0x16daf1,_0x493cfb)=>{this['fire']('revisionSetName',_0x493cfb);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Bt(_0xda4c7e),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x960465['if']('isEnabled','ck-disabled',_0x3e27b8=>!_0x3e27b8)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x474d2c of this['_revisions'])this['_addRevision'](_0x474d2c);this['_revisions']['on']('add',(_0x482581,_0x56295a)=>{this['_addRevision'](_0x56295a);}),this['_revisions']['on']('remove',(_0x4129b2,_0x1be032)=>{this['_removeRevision'](_0x1be032);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x35663a=>_0x35663a['revisionViews']['map'](_0x3d244b=>_0x3d244b))['flat']();}['selectRevision'](_0x12be0b){for(const _0x5a1e6e of this['revisionViews'])_0x12be0b&&_0x12be0b['id']===_0x5a1e6e['id']?_0x5a1e6e['select']():_0x5a1e6e['deselect']();}['highlightRevisions'](_0x13400a){for(const _0x159515 of this['revisionViews'])_0x13400a['some'](({id:_0x38c7bf})=>_0x38c7bf===_0x159515['id'])?_0x159515['highlight']():_0x159515['unhighlight']();}['_addRevision'](_0x14e71d){const _0x26c067=$t(_0x14e71d['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x3a2193=this['timePeriodViews']['get'](0x0);_0x3a2193&&_0x3a2193['startDate']['getTime']()===_0x26c067['getTime']()||(_0x3a2193=new jt(this['locale'],_0x26c067,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x3a2193)),_0x3a2193['addRevision'](_0x14e71d);}['_removeRevision'](_0x1f989e){const _0x1007a5=$t(_0x1f989e['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x1007a5)['removeRevision'](_0x1f989e);}['_getTimePeriodViewByStartDate'](_0x687265){return this['timePeriodViews']['find'](_0x4e7910=>_0x4e7910['startDate']['getTime']()===_0x687265['getTime']());}}class qt extends _0x251d17{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
Gt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[St];}constructor(
|
|
30
|
-
_0x87127a(_0x1653b2){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1a769b,_0x541ecb){super(_0x541ecb),this['sourceElement']=_0x1a769b,this['model']['document']['createRoot']();const _0x360038=new Yt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Jt(this,_0x360038);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x10807f,_0x2cd329){const _0xbf6197=new this(_0x10807f,_0x2cd329);return await _0xbf6197['initPlugins'](),await _0xbf6197['ui']['init'](_0x10807f),await _0xbf6197['data']['init'](_0xbf6197['config']['get']('initialData')||''),_0xbf6197['fire']('ready'),_0xbf6197;}}const Xt=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class zt extends _0x423cf5{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x6e4c5d){function _0x1eb33c(_0xc0a6ed){return _0xc0a6ed['map'](_0x4aa00e=>String['fromCharCode'](_0x4aa00e))['join']('');}super(_0x6e4c5d),this['result']='end',_0x6e4c5d[_0x1eb33c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1eb33c([0x76,0x69,0x65,0x77])][_0x1eb33c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1eb33c([0x61,0x75,0x74,0x6f]),_0x6e4c5d[_0x1eb33c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1eb33c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1eb33c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1eb33c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1eb33c([0x6f,0x6b])});}}class Qt extends _0x423cf5{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[pt,It];}constructor(_0x2ee9b7){if(super(_0x2ee9b7),!this['editor']['config']['get']('revisionHistory'))throw new _0x37001c('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3b07e8=>this['_showRevisionViewer']({..._0x3b07e8,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x545685=>this['_closeRevisionViewer'](_0x545685)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1675f7=>this['_restoreRevision'](_0x1675f7)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x32aa16){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x32aa16;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0xd87b0d){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0xd87b0d);}['getRevision'](_0x4ae7c4){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x4ae7c4);}['getRevisions'](_0x207534){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x207534||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x137c5d=this['editor'],_0x2fb459=_0x448599(_0x137c5d,Xt),_0x3b7d6f=_0x137c5d['plugins']['get']('RevisionTracker'),_0x594eef=_0x137c5d['plugins']['get'](_0x5c17da)['users'];return _0x2fb459['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2fb459['lazyRoots'],(_0x2fb459['plugins']['push'](zt,St,Ht,class extends _0x423cf5{static get['requires'](){return[St,_0x5c17da];}['init'](){const _0x2c2ff1=this['editor']['plugins']['get'](_0x5c17da);for(const _0x141801 of _0x594eef)_0x141801['isAnonymous']||_0x2c2ff1['getUser'](_0x141801['id'])||_0x2c2ff1['addUser'](_0x141801);const _0x36c85b=_0x3b7d6f['repository']['getRevisions']();let _0x123cba=null;const _0x6e6bf4=this['editor']['plugins']['get']('RevisionViewer');_0x6e6bf4['adapter']=_0x3b7d6f['adapter'],_0x6e6bf4['bind']('isEnabled')['to'](_0x3b7d6f),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x137c5d,'isReadOnly',_0x103a37=>!_0x103a37);for(const _0x4ed07c of _0x36c85b){const _0x94b227=null===_0x4ed07c['creator'];if(_0x94b227&&_0x4ed07c['toVersion']===_0x4ed07c['fromVersion'])continue;const _0x4506bf=_0x4ed07c['toJSON']();_0x6e6bf4['addRevisionData'](_0x4506bf,(_0x9cd907,_0x1e6c6a,_0x3fa22e)=>{if(_0x94b227){if(_0x123cba)_0x123cba['_update'](_0x9cd907,_0x1e6c6a);else{if(!_0x1e6c6a){const _0x177174=_0x3fa22e['toJSON']();_0x177174['id']=_0x423324(),_0x3b7d6f['saveRevision'](_0x177174,_0x3fa22e['toVersion'])['then'](_0x232b71=>{_0x123cba=_0x232b71;});}}}else _0x4ed07c['_update'](_0x9cd907,_0x1e6c6a);});}}},qt),_0x2fb459);}['_enhanceShowRevisionViewerCallback'](){const _0x158702=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xd37f17=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x59528a=this['editor']['plugins']['get']('Autosave');await _0x59528a['save']();}else await _0xd37f17['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x269bab=this['editor']['plugins']['get']('Dialog');_0x269bab['isOpen']&&_0x269bab['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x4d809e=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3d37f2 of _0x4d809e)_0x3d37f2['class']=_0x3d37f2['class']?_0x3d37f2['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x2fccda=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2fccda&&_0x2fccda['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x6d9694=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x6d9694&&_0x6d9694['setAttribute']('tabindex','-1');}}const _0xe234b=this['_getRevisionViewerEditorConfig']();return _0x158702(_0xe234b)['then'](_0x2c7c9f=>{return(this['_viewerEditor']=_0x2c7c9f,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'),_0x2c7c9f);})['catch'](_0x2507c2=>(console['error'](_0x2507c2),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4987f7=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x153db8=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x445a49 of _0x153db8)_0x445a49['class']='ck-tab-panel_disabled'===_0x445a49['class']?'':_0x445a49['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x2ee673=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2ee673&&_0x2ee673['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4f3bb6=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4f3bb6&&_0x4f3bb6['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4987f7(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4eda7e=this['editor']['plugins']['get']('Annotations');_0x4eda7e['refreshVisibility'](),_0x4eda7e['refreshPositioning']();}});});}['_showRevisionViewer'](_0x22bcf4){const _0x24c37f=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x458835=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4bc913=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return Wt['create'](_0x4bc913,_0x22bcf4)['then'](_0x16a462=>(_0x458835['style']['display']='block',_0x24c37f['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x16a462));}['_closeRevisionViewer'](_0x26228a){const _0x5625a1=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5625a1['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x26228a['destroy']();}async['_restoreRevision'](_0x5a2a5a){const _0x2e2136=this['editor'],_0xbeb4c5=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x4c0024=_0x2e2136['plugins']['get']('RevisionTracker'),_0x2d0c27=_0x2e2136['plugins']['get']('RevisionHistoryUtils'),_0x19edbf=_0xbeb4c5['repository']['getRevision'](_0x5a2a5a);let _0x77207,_0x4258ad,_0x10fae9;try{await _0x2d0c27['loadRevisionData'](_0x19edbf,this['adapter']),_0x77207=_0x2d0c27['getRevisionDocumentData'](_0x19edbf),_0x4258ad=_0x2d0c27['getRevisionRootsAttributes'](_0x19edbf);}catch(_0x5ccfac){return void console['error'](_0x5ccfac);}_0x2e2136['model']['change'](_0x11f6c9=>{for(const _0x273724 of Array['from'](_0x2e2136['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x11f6c9['removeMarker'](_0x273724);}),_0xbeb4c5['isReady']=!0x1,_0x2e2136['model']['enqueueChange'](_0x26806a=>{_0x26806a['setSelection'](null),_0x26806a['removeSelectionAttribute'](_0x2e2136['model']['document']['selection']['getAttributeKeys']());const _0xe52e07=Object['keys'](_0x77207);for(const _0xa97e44 of _0x2e2136['model']['document']['roots'])'$graveyard'!=_0xa97e44['rootName']&&_0xa97e44['isAttached']()&&!_0xe52e07['includes'](_0xa97e44['rootName'])&&_0x26806a['detachRoot'](_0xa97e44);for(const _0x5086b2 of _0xe52e07){let _0x26f48e=_0x2e2136['model']['document']['getRoot'](_0x5086b2);_0x26f48e&&_0x26f48e['isAttached']()||(_0x26f48e=_0x26806a['addRoot'](_0x5086b2));const _0x17dbe8=_0x4258ad[_0x5086b2],_0x5af7bb=Object['keys'](_0x17dbe8),_0x3f2c8c=_0x77207[_0x5086b2];for(const _0x3048bd of _0x26f48e['getAttributeKeys']())_0x5af7bb['includes'](_0x3048bd)||_0x26806a['removeAttribute'](_0x3048bd,_0x26f48e);for(const _0x132a00 of _0x5af7bb)_0x26806a['setAttribute'](_0x132a00,_0x4258ad[_0x5086b2][_0x132a00],_0x26f48e);_0x26806a['remove'](_0x26806a['createRangeIn'](_0x26f48e)),_0x26806a['insert'](_0x2e2136['data']['parse'](_0x3f2c8c,_0x26f48e),_0x26f48e,0x0);}});const _0x148f9f=wt(_0x2e2136['locale'],'Restored');if(_0x19edbf['name'])_0x10fae9=-0x1==_0x19edbf['name']['indexOf'](_0x148f9f)?_0x148f9f+':\x20'+_0x19edbf['name']:_0x19edbf['name'];else _0x10fae9=_0x148f9f+':\x20'+(_0x19edbf['createdAt']['toLocaleDateString'](_0x2e2136['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x19edbf['createdAt']['toLocaleTimeString'](_0x2e2136['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x4c0024['saveRevision']({'name':_0x10fae9}),_0xbeb4c5['isReady']=!0x0,_0x2e2136['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{Ct as RestoreRevisionCommand,vt as Revision,Qt as RevisionHistory,It as RevisionHistoryUI,mt as RevisionHistoryUtils,pt as RevisionTracker,St as RevisionViewer,Wt as RevisionViewerEditor,zt as RevisionViewerIntegration,Vt as RevisionViewerLoadingOverlay,Ht as RevisionViewerUI,gt as RevisionsRepository,qt as RevisionsSidebar,Mt as ShowChangeCommand};
|
|
29
|
+
Gt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[St];}constructor(_0x37f1cb){super(_0x37f1cb),this['_revisionViewer']=_0x37f1cb['plugins']['get'](St),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xce9e81=this['_revisionsRepository']['_revisions'],_0x87cfe5=this['_createRevisionActions'](),_0x444c31=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Kt(this['editor']['locale'],_0xce9e81,_0x87cfe5,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',(_0x370841,_0x2ee058)=>{_0x2ee058['revisionViews']['on']('add',(_0x50e6d2,_0x5d0bea)=>{_0x5d0bea['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)),_0x444c31['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x2d302f=this['_revisionsRepository']['getRevision'](0x0);if(_0x2d302f){const _0x5e2c5a=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2d302f['id']);this['_revisionViewer']['compare'](_0x2d302f,_0x5e2c5a);}}['_handleRevisionSelected'](_0x2ab070,_0x48abc1){const _0x567f2c=this['_revisionsRepository']['getRevision'](_0x48abc1['id']),_0x3aa4bf=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x567f2c['id']);this['_revisionViewer']['compare'](_0x567f2c,_0x3aa4bf);}['_handleRevisionSetName'](_0x574ffa,_0x2c2e06){this['_revisionsRepository']['getRevision'](_0x2c2e06['id'])['setName'](_0x2c2e06['name']);}['_handleDiffChange'](_0x2c9186,_0x187bbd,_0x1f5d39){const _0x153f12=this['_revisionsRepository']['getRevisionsInDiff'](_0x1f5d39);_0x153f12['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x153f12),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x153f12[0x0]));}['_createRevisionActions'](){const _0x361f29=this['editor'],_0x27cb35=qt['availableRevisionActions'],_0x22da2c=_0x361f29['config']['get']('revisionHistory.revisionActions')||qt['defaultRevisionActions'];if(_0x22da2c['length'])return _0x22da2c['map'](_0x1bf77c=>{const _0xb59e92='string'==typeof _0x1bf77c?Object['assign']({},_0x27cb35[_0x1bf77c]):_0x1bf77c;return _0xb59e92['action']=_0xb59e92['action']['bind'](this,_0x361f29),_0xb59e92['isVisible']&&(_0xb59e92['isVisible']=_0xb59e92['isVisible']['bind'](this,_0x361f29)),_0xb59e92;});}}function Gt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x287989},_0x43ed08)=>{const _0x6edbfb=_0x287989['get'](St),_0x27dd93=_0x6edbfb['repository'];let _0x5085a5=_0x6edbfb['diff']['newRevisionId'],_0x4913de=_0x43ed08['id'];_0x27dd93['getIndex'](_0x5085a5)>_0x27dd93['getIndex'](_0x4913de)&&([_0x5085a5,_0x4913de]=[_0x4913de,_0x5085a5]),_0x6edbfb['compare'](_0x5085a5,_0x4913de);},'isVisible':({plugins:_0x524120},_0xfcb0b3)=>{const _0x32e062=_0x524120['get'](St);return!(_0x32e062['repository']['getRevisionsInDiff'](_0x32e062['diff'])['length']>0x2)&&!_0xfcb0b3['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x512369,{id:_0xa9964e})=>{_0x512369['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xa9964e);},'isVisible':({plugins:_0x5a43da},_0x1c12f1)=>!!_0x5a43da['get'](St)['repository']['getLaterVisibleRevision'](_0x1c12f1['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xfe9cd6},{id:_0x2d77d4,revisionNameView:_0x4226dc})=>{const _0x2756da=_0xfe9cd6['get'](St),_0x49e578=_0x2756da['repository']['getEarlierVisibleRevision'](_0x2d77d4);_0x2756da['compare'](_0x2d77d4,_0x49e578),_0x4226dc['focus'](),_0x4226dc['fieldView']['select']();}}};}class Jt extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x14b16a,_0x508176){super(_0x14b16a),this['_view']=_0x508176,this['_toolbarConfig']=ht(_0x14b16a['config']['get']('toolbar')),this['_elementReplacer']=new _0x46f688();}get['element'](){return this['view']['element'];}['init'](_0x418ae9){const _0x19db2f=this['editor'],_0x1dd399=this['view'],_0x280c86=_0x19db2f['editing']['view'],_0x467a5d=_0x1dd399['editable'],_0x29fd92=_0x280c86['document']['getRoot']();_0x467a5d['name']=_0x29fd92['rootName'],_0x1dd399['render']();const _0x1adacf=_0x467a5d['element'];this['setEditableElement'](_0x467a5d['name'],_0x1adacf),_0x1dd399['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x280c86['attachDomRoot'](_0x1adacf),this['_elementReplacer']['replace'](_0x418ae9,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x2d4e73=this['view'],_0x3cb603=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x3cb603['detachDomRoot'](_0x2d4e73['editable']['name']),_0x2d4e73['destroy']();}['_initToolbar'](){const _0x33211a=this['view'];_0x33211a['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x33211a['stickyPanel']['limiterElement']=_0x33211a['element'],_0x33211a['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x930d09})=>_0x930d09),_0x33211a['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x33211a['toolbar']);}}class Yt extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x2146ea,_0x11c477,_0x50b361={}){super(_0x2146ea),this['stickyPanel']=new ut(_0x2146ea),this['toolbar']=new lt(_0x2146ea,{'shouldGroupWhenFull':_0x50b361['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x2146ea,_0x11c477);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class Wt extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x2138f0(_0x232bce){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2fcb3f,_0x101feb){super(_0x101feb),this['sourceElement']=_0x2fcb3f,this['model']['document']['createRoot']();const _0x24852d=new Yt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Jt(this,_0x24852d);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x14bba3,_0xbee886){const _0x148d40=new this(_0x14bba3,_0xbee886);return await _0x148d40['initPlugins'](),await _0x148d40['ui']['init'](_0x14bba3),await _0x148d40['data']['init'](_0x148d40['config']['get']('initialData')||''),_0x148d40['fire']('ready'),_0x148d40;}}const Xt=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class zt extends _0x251d17{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xa126ac){function _0x2ed5cb(_0x40eaec){return _0x40eaec['map'](_0x59b36c=>String['fromCharCode'](_0x59b36c))['join']('');}super(_0xa126ac),this['result']='end',_0xa126ac[_0x2ed5cb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2ed5cb([0x76,0x69,0x65,0x77])][_0x2ed5cb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2ed5cb([0x61,0x75,0x74,0x6f]),_0xa126ac[_0x2ed5cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2ed5cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2ed5cb([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2ed5cb([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2ed5cb([0x6f,0x6b])});}}class Qt extends _0x251d17{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[pt,It];}constructor(_0x18102e){if(super(_0x18102e),!this['editor']['config']['get']('revisionHistory'))throw new _0x1dfaa4('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3b62fa=>this['_showRevisionViewer']({..._0x3b62fa,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x48736b=>this['_closeRevisionViewer'](_0x48736b)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1bddcb=>this['_restoreRevision'](_0x1bddcb)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x6fd02c){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x6fd02c;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x560720){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x560720);}['getRevision'](_0x5772a3){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x5772a3);}['getRevisions'](_0x7d258e){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x7d258e||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x34c907=this['editor'],_0x581f2b=_0x4a750c(_0x34c907,Xt),_0x3d0ea6=_0x34c907['plugins']['get']('RevisionTracker'),_0x3f0b74=_0x34c907['plugins']['get'](_0x6289f9)['users'];return _0x581f2b['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x581f2b['lazyRoots'],(_0x581f2b['plugins']['push'](zt,St,Ht,class extends _0x251d17{static get['requires'](){return[St,_0x6289f9];}['init'](){const _0x1c1732=this['editor']['plugins']['get'](_0x6289f9);for(const _0x591063 of _0x3f0b74)_0x591063['isAnonymous']||_0x1c1732['getUser'](_0x591063['id'])||_0x1c1732['addUser'](_0x591063);const _0x4f8de0=_0x3d0ea6['repository']['getRevisions']();let _0x1c8078=null;const _0x5dda44=this['editor']['plugins']['get']('RevisionViewer');_0x5dda44['adapter']=_0x3d0ea6['adapter'],_0x5dda44['bind']('isEnabled')['to'](_0x3d0ea6),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x34c907,'isReadOnly',_0x39c8ed=>!_0x39c8ed);for(const _0x2ba877 of _0x4f8de0){const _0x444300=null===_0x2ba877['creator'];if(_0x444300&&_0x2ba877['toVersion']===_0x2ba877['fromVersion'])continue;const _0x2345c2=_0x2ba877['toJSON']();_0x5dda44['addRevisionData'](_0x2345c2,(_0x1f94d8,_0x1c0627,_0x1e58ad)=>{if(_0x444300){if(_0x1c8078)_0x1c8078['_update'](_0x1f94d8,_0x1c0627);else{if(!_0x1c0627){const _0x50e511=_0x1e58ad['toJSON']();_0x50e511['id']=_0x5c98de(),_0x3d0ea6['saveRevision'](_0x50e511,_0x1e58ad['toVersion'])['then'](_0x450bd3=>{_0x1c8078=_0x450bd3;});}}}else _0x2ba877['_update'](_0x1f94d8,_0x1c0627);});}}},qt),_0x581f2b);}['_enhanceShowRevisionViewerCallback'](){const _0x7026df=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x49240f=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x1b59d9=this['editor']['plugins']['get']('Autosave');await _0x1b59d9['save']();}else await _0x49240f['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x2e4bb7=this['editor']['plugins']['get']('Dialog');_0x2e4bb7['isOpen']&&_0x2e4bb7['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x105616=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x298c27 of _0x105616)_0x298c27['class']=_0x298c27['class']?_0x298c27['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x1833e2=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x1833e2&&_0x1833e2['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xf80609=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xf80609&&_0xf80609['setAttribute']('tabindex','-1');}}const _0xe40166=this['_getRevisionViewerEditorConfig']();return _0x7026df(_0xe40166)['then'](_0x24e560=>{return(this['_viewerEditor']=_0x24e560,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'),_0x24e560);})['catch'](_0x5b7043=>(console['error'](_0x5b7043),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xc2970=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x54914c=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0xc1ad88 of _0x54914c)_0xc1ad88['class']='ck-tab-panel_disabled'===_0xc1ad88['class']?'':_0xc1ad88['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x34fddd=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x34fddd&&_0x34fddd['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x57c7fc=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x57c7fc&&_0x57c7fc['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0xc2970(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3bee72=this['editor']['plugins']['get']('Annotations');_0x3bee72['refreshVisibility'](),_0x3bee72['refreshPositioning']();}});});}['_showRevisionViewer'](_0x1a8e39){const _0x28b7c4=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x15f591=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x5f125f=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return Wt['create'](_0x5f125f,_0x1a8e39)['then'](_0x3d3375=>(_0x15f591['style']['display']='block',_0x28b7c4['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3d3375));}['_closeRevisionViewer'](_0x8dcfd2){const _0x300465=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x300465['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x8dcfd2['destroy']();}async['_restoreRevision'](_0x64c7a3){const _0x14e449=this['editor'],_0x1771ed=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x5de284=_0x14e449['plugins']['get']('RevisionTracker'),_0x1f46af=_0x14e449['plugins']['get']('RevisionHistoryUtils'),_0x11c706=_0x1771ed['repository']['getRevision'](_0x64c7a3);let _0x2d4d07,_0x483f68,_0x5dc0ab;try{await _0x1f46af['loadRevisionData'](_0x11c706,this['adapter']),_0x2d4d07=_0x1f46af['getRevisionDocumentData'](_0x11c706),_0x483f68=_0x1f46af['getRevisionRootsAttributes'](_0x11c706);}catch(_0x55af1f){return void console['error'](_0x55af1f);}_0x14e449['model']['change'](_0x1861c8=>{for(const _0x367377 of Array['from'](_0x14e449['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1861c8['removeMarker'](_0x367377);}),_0x1771ed['isReady']=!0x1,_0x14e449['model']['enqueueChange'](_0x120303=>{_0x120303['setSelection'](null),_0x120303['removeSelectionAttribute'](_0x14e449['model']['document']['selection']['getAttributeKeys']());const _0x58762d=Object['keys'](_0x2d4d07);for(const _0x4981a4 of _0x14e449['model']['document']['roots'])'$graveyard'!=_0x4981a4['rootName']&&_0x4981a4['isAttached']()&&!_0x58762d['includes'](_0x4981a4['rootName'])&&_0x120303['detachRoot'](_0x4981a4);for(const _0x11f663 of _0x58762d){let _0x564e09=_0x14e449['model']['document']['getRoot'](_0x11f663);_0x564e09&&_0x564e09['isAttached']()||(_0x564e09=_0x120303['addRoot'](_0x11f663));const _0x26cd20=_0x483f68[_0x11f663],_0x56d68d=Object['keys'](_0x26cd20),_0x8adc2a=_0x2d4d07[_0x11f663];for(const _0x2095f5 of _0x564e09['getAttributeKeys']())_0x56d68d['includes'](_0x2095f5)||_0x120303['removeAttribute'](_0x2095f5,_0x564e09);for(const _0x17060e of _0x56d68d)_0x120303['setAttribute'](_0x17060e,_0x483f68[_0x11f663][_0x17060e],_0x564e09);_0x120303['remove'](_0x120303['createRangeIn'](_0x564e09)),_0x120303['insert'](_0x14e449['data']['parse'](_0x8adc2a,_0x564e09),_0x564e09,0x0);}});const _0x4be8a6=wt(_0x14e449['locale'],'Restored');if(_0x11c706['name'])_0x5dc0ab=-0x1==_0x11c706['name']['indexOf'](_0x4be8a6)?_0x4be8a6+':\x20'+_0x11c706['name']:_0x11c706['name'];else _0x5dc0ab=_0x4be8a6+':\x20'+(_0x11c706['createdAt']['toLocaleDateString'](_0x14e449['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x11c706['createdAt']['toLocaleTimeString'](_0x14e449['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x5de284['saveRevision']({'name':_0x5dc0ab}),_0x1771ed['isReady']=!0x0,_0x14e449['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{Ct as RestoreRevisionCommand,vt as Revision,Qt as RevisionHistory,It as RevisionHistoryUI,mt as RevisionHistoryUtils,pt as RevisionTracker,St as RevisionViewer,Wt as RevisionViewerEditor,zt as RevisionViewerIntegration,Vt as RevisionViewerLoadingOverlay,Ht as RevisionViewerUI,gt as RevisionsRepository,qt as RevisionsSidebar,Mt as ShowChangeCommand};
|