@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20241230.0 → 0.0.0-nightly-20241231.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/dist/index.js +6 -6
- package/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/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 +8 -8
- package/src/changeitem.js +2 -2
- package/src/editor/revisionviewereditor.js +2 -2
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.js +1 -1
- package/src/revision.js +2 -2
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.js +1 -1
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x40e57d(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2be24e){super(),this['id']=_0x2be24e['id']||_0xd77ba2(),this['creator']=_0x2be24e['creator']||null,this['authors']=_0x2be24e['authors']||[],this['diffData']=_0x2be24e['diffData']||null,this['toVersion']=_0x2be24e['toVersion']||0x0,this['fromVersion']=_0x2be24e['fromVersion']||0x0,this['set']('name',_0x2be24e['name']||''),this['set']('createdAt',_0x2be24e['createdAt']||new Date()),this['set']('attributes',_0x2be24e['attributes']||{});}['setName'](_0x32afa0){this['_update']({'name':_0x32afa0});}['setAttribute'](_0x37829d,_0x113b46){const _0x8261d6=_0x7b7393(this['attributes']);_0x428a4b(_0x8261d6,_0x37829d,_0x113b46),this['_update']({'attributes':_0x8261d6});}['removeAttribute'](_0x489be8){const _0x3abf48=_0x7b7393(this['attributes']);_0x1b3b88(_0x3abf48,_0x489be8),this['_update']({'attributes':_0x3abf48});}['_update'](_0x5ea242,_0x362785=!0x1){let _0x26c086=!0x1;const _0x220071={'id':this['id']},_0x440952=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x5d52c8 of _0x440952){const _0x572c46=_0x5ea242[_0x5d52c8];void 0x0!==_0x572c46&&_0x572c46!==this[_0x5d52c8]&&(this[_0x5d52c8]=_0x572c46,_0x220071[_0x5d52c8]=_0x572c46,_0x26c086=!0x0);}_0x26c086&&(_0x220071['authors']&&(_0x220071['authorsIds']=_0x220071['authors']['map'](_0x2b3e54=>_0x2b3e54['id']),delete _0x220071['authors']),this['fire']('_update',_0x220071,_0x362785));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2641da=>_0x2641da['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x506060{['_revisions'];static get['requires'](){return[_0x45562e];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x106104){super(_0x106104),this['_revisions']=new _0x3861d2();}['afterInit'](){!async function(_0x535776){const _0x6274f8=_0x1c6546([0x71,0x62,0x52,0x4f,0x45,0x6b,0x68,0x48,0x6c,0x32,0x30,0x59,0x37,0x6e,0x65,0x44,0x38,0x34,0x77,0x61,0x4b,0x58,0x49,0x78,0x43,0x53,0x50,0x76,0x6a,0x5a,0x72,0x4d,0x66,0x35,0x56,0x55,0x42,0x54,0x41,0x4a,0x31,0x4e,0x63,0x64,0x4c,0x79,0x70,0x74,0x47,0x33,0x73,0x7a,0x51,0x39,0x69,0x46,0x6f,0x75,0x36,0x6d,0x67,0x57]),_0xb00ba3=0xeb829,_0x51a553=0x66a283,_0x54ee27=0x61f9ab^_0x51a553,_0x1d44ba=window[_0x1c6546([0x44,0x61,0x74,0x65])][_0x1c6546([0x6e,0x6f,0x77])](),_0x483272=_0x535776[_0x1c6546([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x57166d=new window[(_0x1c6546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe8655d=>{_0x483272[_0x1c6546([0x6f,0x6e,0x63,0x65])](_0x1c6546([0x72,0x65,0x61,0x64,0x79]),_0xe8655d);}),_0x549619={[_0x1c6546([0x6b,0x74,0x79])]:_0x1c6546([0x45,0x43]),[_0x1c6546([0x75,0x73,0x65])]:_0x1c6546([0x73,0x69,0x67]),[_0x1c6546([0x63,0x72,0x76])]:_0x1c6546([0x50,0x2d,0x32,0x35,0x36]),[_0x1c6546([0x78])]:_0x1c6546([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]),[_0x1c6546([0x79])]:_0x1c6546([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]),[_0x1c6546([0x61,0x6c,0x67])]:_0x1c6546([0x45,0x53,0x32,0x35,0x36])},_0x18c28f=_0x483272[_0x1c6546([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1c6546([0x67,0x65,0x74])](_0x1c6546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xa84761(){let _0x3eae76,_0x73294c=null,_0x253dba=null;try{if(_0x18c28f==_0x1c6546([0x47,0x50,0x4c]))return _0x1c6546([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3eae76=_0x1772d1(),!_0x3eae76)return _0x1c6546([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3eae76[_0x1c6546([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x253dba=_0x14c440(_0x3eae76[_0x1c6546([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3eae76[_0x1c6546([0x6a,0x74,0x69])])),await _0x1d4174()?_0xe0b5fd()?_0x1a95c1()?_0x1c6546([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2d6d2f()?(_0x3eae76[_0x1c6546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c6546([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x73294c=_0x2169d9(_0x1c6546([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3eae76[_0x1c6546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c6546([0x74,0x72,0x69,0x61,0x6c])&&(_0x73294c=_0x2169d9(_0x1c6546([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x3eae76[_0x1c6546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c6546([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x73294c=_0x2169d9(_0x1c6546([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3c6d0b()):_0x1c6546([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1c6546([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1c6546([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x3e308f){return _0x1c6546([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1a95c1(){const _0x46bbfe=[_0x1c6546([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1c6546([0x74,0x72,0x69,0x61,0x6c])][_0x1c6546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3eae76[_0x1c6546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1d44ba/0x3e8:0xe10*_0x54ee27;return _0x3eae76[_0x1c6546([0x65,0x78,0x70])]<_0x46bbfe;}function _0xe0b5fd(){const _0xd92fc4=_0x3eae76[_0x1c6546([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xd92fc4)return!0x1;if(_0xd92fc4[_0x1c6546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c6546([0x2a])))return!0x0;if(_0xd92fc4[_0x1c6546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c6546([0x52,0x48])))return!0x0;if(_0xd92fc4[_0x1c6546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c6546([0x52,0x52,0x48]))){if(_0x2bad66())return!0x0;if(_0x11f9e4()||_0x8daa0c())return!0x0;}return!0x1;}function _0x2d6d2f(){const _0x556b52=_0x3eae76[_0x1c6546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x556b52||0x0==_0x556b52[_0x1c6546([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5a0592}=new URL(window[_0x1c6546([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x556b52[_0x1c6546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a0592))return!0x0;const _0x68ca6=_0x5a0592[_0x1c6546([0x73,0x70,0x6c,0x69,0x74])](_0x1c6546([0x2e]));return _0x556b52[_0x1c6546([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x22035f=>_0x22035f[_0x1c6546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c6546([0x2a])))[_0x1c6546([0x6d,0x61,0x70])](_0x4f0ee3=>_0x4f0ee3[_0x1c6546([0x73,0x70,0x6c,0x69,0x74])](_0x1c6546([0x2e])))[_0x1c6546([0x73,0x6f,0x6d,0x65])](_0x428a00=>_0x68ca6[_0x1c6546([0x65,0x76,0x65,0x72,0x79])]((_0xf59556,_0x105ae4)=>_0x428a00[_0x105ae4]===_0xf59556||_0x428a00[_0x105ae4]===_0x1c6546([0x2a])));}function _0x3c6d0b(){return _0x73294c&&_0x253dba?new window[(_0x1c6546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x33d7d1,_0x34c0fe)=>{_0x73294c[_0x1c6546([0x74,0x68,0x65,0x6e])](_0x33d7d1,_0x34c0fe),_0x253dba[_0x1c6546([0x74,0x68,0x65,0x6e])](_0x56fb9b=>{_0x56fb9b!=_0x1c6546([0x56,0x61,0x6c,0x69,0x64])&&_0x33d7d1(_0x56fb9b);},_0x34c0fe);}):_0x73294c||_0x253dba||_0x1c6546([0x56,0x61,0x6c,0x69,0x64]);}}function _0x14c440(_0xbd5dcf,_0x4da91d){return new window[(_0x1c6546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x567710=>{if(_0x33c7d4())return _0x567710(_0x1c6546([0x56,0x61,0x6c,0x69,0x64]));_0x4875ab(),_0x483272[_0x1c6546([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1c6546([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x19a887=!0x1;const _0x5c7661=_0xd77ba2();function _0xfbd89f(_0x40142f){return!!_0x40142f&&(typeof _0x40142f===_0x1c6546([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x40142f===_0x1c6546([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x40142f[_0x1c6546([0x74,0x68,0x65,0x6e])]===_0x1c6546([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x40142f[_0x1c6546([0x63,0x61,0x74,0x63,0x68])]===_0x1c6546([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x163929(_0x14cadf){_0x2b1423(_0x14cadf)[_0x1c6546([0x74,0x68,0x65,0x6e])](_0x381863=>{if(!_0x381863||_0x381863[_0x1c6546([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1c6546([0x6f,0x6b]))return _0x1c6546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x579aae(_0xf16b44(_0x5c7661+_0x4da91d))!=_0x381863[_0x1c6546([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1c6546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1c6546([0x56,0x61,0x6c,0x69,0x64]);})[_0x1c6546([0x74,0x68,0x65,0x6e])](_0x56d005=>(_0x585951(),_0x56d005),()=>{const _0x575936=_0x4d5b57();return null==_0x575936?(_0x585951(),_0x1c6546([0x56,0x61,0x6c,0x69,0x64])):_0x1c6546(_0x1d44ba-_0x575936>(0x246a2683^_0x51a553)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1c6546([0x74,0x68,0x65,0x6e])](_0x567710)[_0x1c6546([0x63,0x61,0x74,0x63,0x68])](()=>{_0x567710(_0x1c6546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x44193f=0x504c03^_0x51a553;function _0x585951(){const _0x31ec99=_0x1c6546([0x6c,0x6c,0x63,0x74,0x2d])+_0x579aae(_0xf16b44(_0xbd5dcf)),_0xce2ba3=_0x2882b2(_0x579aae(window[_0x1c6546([0x4d,0x61,0x74,0x68])][_0x1c6546([0x63,0x65,0x69,0x6c])](_0x1d44ba/_0x44193f)));window[_0x1c6546([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1c6546([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x31ec99,_0xce2ba3);}function _0x4d5b57(){const _0x44b750=_0x1c6546([0x6c,0x6c,0x63,0x74,0x2d])+_0x579aae(_0xf16b44(_0xbd5dcf)),_0xbdc9aa=window[_0x1c6546([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1c6546([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x44b750);return _0xbdc9aa?window[_0x1c6546([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2882b2(_0xbdc9aa),0x10)*_0x44193f:null;}function _0x2b1423(_0x3ccba7){return new window[(_0x1c6546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4b6b3d,_0x120b8f)=>{_0x3ccba7[_0x1c6546([0x74,0x68,0x65,0x6e])](_0x4b6b3d,_0x120b8f),window[_0x1c6546([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x120b8f,0x677643^_0x51a553);});}}_0x483272[_0x1c6546([0x6f,0x6e])](_0x1c6546([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x54f583,_0x591516)=>{if(_0x591516[0x0]!=_0xbd5dcf)return _0x567710(_0x1c6546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x591516[0x1]={..._0x591516[0x1],[_0x1c6546([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5c7661};},{[_0x1c6546([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1c6546([0x68,0x69,0x67,0x68])}),_0x483272[_0x1c6546([0x6f,0x6e])](_0x1c6546([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2343af=>{_0xfbd89f(_0x2343af[_0x1c6546([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x19a887=!0x0,_0x163929(_0x2343af[_0x1c6546([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1c6546([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1c6546([0x6c,0x6f,0x77])}),_0x57166d[_0x1c6546([0x74,0x68,0x65,0x6e])](()=>{_0x19a887||_0x567710(_0x1c6546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x33c7d4(){return _0x483272[_0x1c6546([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c6546([0x76,0x69,0x65,0x77])][_0x1c6546([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1c6546([0x61,0x75,0x74,0x6f]);}function _0x4875ab(){_0x483272[_0x1c6546([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c6546([0x76,0x69,0x65,0x77])][_0x1c6546([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1c6546([0x61,0x75,0x74,0x6f]);}}function _0x2169d9(_0x5b2b9a){const _0x4e0b00=[new window[(_0x1c6546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x127483=>setTimeout(_0x127483,0x6f9c4f^_0x51a553)),_0x57166d[_0x1c6546([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1c6546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43e3d9=>{const _0x295e34=0x66a284^_0x51a553,_0x3496d6=_0x535776[_0x1c6546([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x44247a(){_0x3496d6[_0x1c6546([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x295e34&&_0x43e3d9();}_0x44247a(),_0x3496d6[_0x1c6546([0x6f,0x6e])](_0x1c6546([0x61,0x64,0x64]),_0x44247a);})),new window[(_0x1c6546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3cdda6=>{function _0x4e6720(){for(const _0x461d92 in window)if(window[_0x1c6546([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x1c6546([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x461d92))&&window[_0x461d92]==_0xb00ba3)return _0x3cdda6();_0x483272[_0x1c6546([0x73,0x74,0x61,0x74,0x65])]!=_0x1c6546([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x1c6546([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4e6720,0x66b10b^_0x51a553);}_0x45f331(_0x1c6546([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x4e6720();})];return window[_0x1c6546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1c6546([0x72,0x61,0x63,0x65])](_0x4e0b00)[_0x1c6546([0x74,0x68,0x65,0x6e])](()=>_0x5b2b9a);}async function _0x2a404f(){if(await _0x57166d,_0x45f331(_0x1c6546([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x1f6b5b=_0x535776[_0x1c6546([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x443f38=_0x535776[_0x1c6546([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])](_0x1f6b5b[_0x1c6546([0x69,0x64])]),_0x3df9e6=_0x104844(_0x1c6546([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3df9e6[_0x1c6546([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x1f6b5b['id'],_0x443f38?_0x443f38['id']:null,!0x0),_0x3df9e6[_0x1c6546([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1c6546([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3df9e6[_0x1c6546([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3df9e6[_0x1c6546([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x395d52,void(_0x3df9e6[_0x1c6546([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x395d52);}if(_0x45f331(_0x1c6546([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x3bb1ae=_0x104844(_0x1c6546([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x3bb1ae[_0x1c6546([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1c6546([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3bb1ae[_0x1c6546([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3bb1ae[_0x1c6546([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x395d52,_0x3bb1ae[_0x1c6546([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x395d52;}_0x483272[_0x1c6546([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c6546([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x395d52,_0x483272[_0x1c6546([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c6546([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x395d52,_0x483272[_0x1c6546([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1c6546([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2bad66(){return _0x45f331(_0x1c6546([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x104844(_0x1c6546([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x1c6546([0x73,0x74,0x61,0x74,0x65])]==_0x1c6546([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x11f9e4(){return _0x45f331(_0x1c6546([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 _0x8daa0c(){return _0x45f331(_0x1c6546([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x147a58(_0x32f51f){const _0x1044d3=_0x2ab89c();_0x483272[_0x1044d3]=_0x1c6546([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])+_0x32f51f,_0x32f51f[_0x1c6546([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x1c6546([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x2ab89c()]=_0xb00ba3),_0x32f51f!=_0x1c6546([0x56,0x61,0x6c,0x69,0x64])&&_0x2a404f();}function _0x2ab89c(){const _0x54702e=window[_0x1c6546([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1c6546([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1c6546([0x6e,0x6f,0x77])]())[_0x1c6546([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1c6546([0x2e]),'');let _0x2d7ade=_0x1c6546([0x71]);for(let _0x2f35ea=0x0;_0x2f35ea<_0x54702e[_0x1c6546([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2f35ea+=0x2){let _0x75b67a=window[_0x1c6546([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54702e[_0x1c6546([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2f35ea,_0x2f35ea+0x2));_0x75b67a>=_0x6274f8[_0x1c6546([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x75b67a-=_0x6274f8[_0x1c6546([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2d7ade+=_0x6274f8[_0x75b67a];}return _0x2d7ade;}function _0x1772d1(){const _0x2d4749=_0x18c28f[_0x1c6546([0x73,0x70,0x6c,0x69,0x74])](_0x1c6546([0x2e]));if(0x3!=_0x2d4749[_0x1c6546([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5eb814(_0x2d4749[0x1]);function _0x5eb814(_0x2f3e3a){const _0x3d78f1=_0x59a43c(_0x2f3e3a);return _0x3d78f1&&_0x49ea3b()?_0x3d78f1:null;function _0x49ea3b(){const _0x46d0bd=_0x3d78f1[_0x1c6546([0x6a,0x74,0x69])],_0x46e09f=window[_0x1c6546([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x46d0bd[_0x1c6546([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x46d0bd[_0x1c6546([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x8aa0eb={..._0x3d78f1,[_0x1c6546([0x6a,0x74,0x69])]:_0x46d0bd[_0x1c6546([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x46d0bd[_0x1c6546([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x8aa0eb[_0x1c6546([0x76,0x63])],_0xf16b44(_0x8aa0eb)==_0x46e09f;}}}async function _0x1d4174(){let _0x1c264b=!0x0;try{const _0x425942=_0x18c28f[_0x1c6546([0x73,0x70,0x6c,0x69,0x74])](_0x1c6546([0x2e])),[_0x13e6a3,_0x365da3,_0x5e9126]=_0x425942;return _0x4504bf(_0x13e6a3),await _0x20c0da(_0x13e6a3,_0x365da3,_0x5e9126),_0x1c264b;}catch(_0x68149b){return!0x1;}function _0x4504bf(_0x17c080){const _0x5374cc=_0x59a43c(_0x17c080);_0x5374cc&&_0x5374cc[_0x1c6546([0x61,0x6c,0x67])]==_0x1c6546([0x45,0x53,0x32,0x35,0x36])||(_0x1c264b=!0x1);}async function _0x20c0da(_0x341ca0,_0x2cc99e,_0x55d788){const _0x1f4fad=window[_0x1c6546([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1c6546([0x66,0x72,0x6f,0x6d])](_0x3bfb44(_0x55d788),_0x465b7d=>_0x465b7d[_0x1c6546([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2b787e=new window[(_0x1c6546([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1c6546([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x341ca0+_0x1c6546([0x2e])+_0x2cc99e),_0x299184=window[_0x1c6546([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1c6546([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x299184)return;const _0x2414e2=await _0x299184[_0x1c6546([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1c6546([0x6a,0x77,0x6b]),_0x549619,{[_0x1c6546([0x6e,0x61,0x6d,0x65])]:_0x1c6546([0x45,0x43,0x44,0x53,0x41]),[_0x1c6546([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1c6546([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1c6546([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x299184[_0x1c6546([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1c6546([0x6e,0x61,0x6d,0x65])]:_0x1c6546([0x45,0x43,0x44,0x53,0x41]),[_0x1c6546([0x68,0x61,0x73,0x68])]:{[_0x1c6546([0x6e,0x61,0x6d,0x65])]:_0x1c6546([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2414e2,_0x1f4fad,_0x2b787e)||(_0x1c264b=!0x1);}}function _0x59a43c(_0x5d2b8e){return _0x5d2b8e[_0x1c6546([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1c6546([0x65,0x79]))?JSON[_0x1c6546([0x70,0x61,0x72,0x73,0x65])](_0x3bfb44(_0x5d2b8e)):null;}function _0x3bfb44(_0x4fe312){return window[_0x1c6546([0x61,0x74,0x6f,0x62])](_0x4fe312[_0x1c6546([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1c6546([0x2b]))[_0x1c6546([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1c6546([0x2f])));}function _0xf16b44(_0x350e30){let _0x216e65=0x1505;function _0x398828(_0x319ddc){for(let _0x340bec=0x0;_0x340bec<_0x319ddc[_0x1c6546([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x340bec++){const _0x3ea203=_0x319ddc[_0x1c6546([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x340bec);_0x216e65=(_0x216e65<<0x5)+_0x216e65+_0x3ea203,_0x216e65&=_0x216e65;}}function _0x19eb3c(_0x46e8e9){Array[_0x1c6546([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x46e8e9)?_0x46e8e9[_0x1c6546([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x19eb3c):_0x46e8e9&&typeof _0x46e8e9==_0x1c6546([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1c6546([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x46e8e9)[_0x1c6546([0x73,0x6f,0x72,0x74])]()[_0x1c6546([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x145cce,_0x16dde4])=>{_0x398828(_0x145cce),_0x19eb3c(_0x16dde4);}):_0x398828(window[_0x1c6546([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x46e8e9));}return _0x19eb3c(_0x350e30),_0x216e65>>>0x0;}function _0x579aae(_0x3cd14f){return _0x3cd14f[_0x1c6546([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1c6546([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1c6546([0x30]));}function _0x2882b2(_0x4a3fc8){return _0x4a3fc8[_0x1c6546([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1c6546([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1c6546([0x6a,0x6f,0x69,0x6e])]('');}function _0x45f331(_0x2ec00e){return _0x483272[_0x1c6546([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1c6546([0x68,0x61,0x73])](_0x2ec00e);}function _0x104844(_0x1a023e){return _0x483272[_0x1c6546([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1c6546([0x67,0x65,0x74])](_0x1a023e);}function _0x395d52(){}function _0x1c6546(_0x3b720d){return _0x3b720d['map'](_0x48325e=>String['fromCharCode'](_0x48325e))['join']('');}_0x147a58(await _0xa84761());}(this);}['createRevision'](_0x19290b){const _0x2806ad=this['editor']['plugins']['get']('Users');return new a({'id':_0x19290b['id'],'name':_0x19290b['name'],'creator':_0x19290b['creatorId']?_0x2806ad['getUser'](_0x19290b['creatorId']):null,'diffData':_0x19290b['diffData']||_0x19290b['data'],'authors':_0x19290b['authorsIds']['map'](_0x3204ad=>_0x2806ad['getUser'](_0x3204ad)),'createdAt':new Date(_0x19290b['createdAt']),'attributes':_0x19290b['attributes'],'fromVersion':_0x19290b['fromVersion'],'toVersion':_0x19290b['toVersion']});}['addRevision'](_0x399392,_0x4d2d0e=0x0){this['_revisions']['add'](_0x399392,_0x4d2d0e);}['getRevision'](_0x2371b8){return this['_revisions']['get'](_0x2371b8);}['getRevisions'](_0xbf39fb={'toJSON':!0x1}){const _0x377cba=Array['from'](this['_revisions']);return _0x377cba['reverse'](),_0xbf39fb['toJSON']?_0x377cba['map'](_0x1a81d3=>_0x1a81d3['toJSON']()):_0x377cba;}['getIndex'](_0x44d8c5){return this['_revisions']['getIndex'](_0x44d8c5);}['getEarlierVisibleRevision'](_0x4f50ea){const [,_0x2b2bfe]=this['getRevisionsIterator'](_0x4f50ea,{'direction':'earlier'});return _0x2b2bfe;}['getLaterVisibleRevision'](_0x3ee2be){const [,_0x5413e4]=this['getRevisionsIterator'](_0x3ee2be,{'direction':'later'});return _0x5413e4;}['getRevisionsInDiff'](_0x5c5f2f){const _0x152fb2=[];for(const _0x1cfb2b of this['getRevisionsIterator'](_0x5c5f2f['newRevisionId']))if(_0x152fb2['push'](_0x1cfb2b),_0x1cfb2b['id']===_0x5c5f2f['oldRevisionId'])break;return _0x152fb2;}*['getRevisionsIterator'](_0x62888a,{direction:_0x28c782='earlier',filter:_0x15e5be=()=>!0x0}={}){const _0x3ca5cc='earlier'===_0x28c782?0x1:-0x1;let _0x59ad1e=this['_revisions']['get'](_0x62888a),_0x5b0598=this['getIndex'](_0x59ad1e);for(yield _0x59ad1e;_0x59ad1e;){if(_0x5b0598+=_0x3ca5cc,_0x59ad1e=this['getRevision'](_0x5b0598),!_0x59ad1e)return;_0x15e5be(_0x59ad1e)&&(yield _0x59ad1e);}}}function R(_0x1d0b48,_0x48b112,_0x38513b){const t=_0x1d0b48['t'];switch(_0x48b112){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'},_0x38513b);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x38513b);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'';}}const C={'c':_0xfe2fa6,'a':_0x256c79,'e':_0x4e561c,'r':_0x3b1bb5,'u':_0x78b40f};class l extends _0x506060{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x45562e,j,_0x452237];}constructor(_0x23da03){super(_0x23da03),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new T(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3e517a=_0xd77ba2();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3e517a},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['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x31f2bd=this['repository']['getRevision'](0x0),_0x10933b=_0x31f2bd&&null===_0x31f2bd['creator']?_0x31f2bd:null;if(this['_continueCurrentRevision']=!!_0x10933b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x2ad61e=this['_source']['getCurrentRevisionId'](),_0x26b6e1=this['repository']['getRevision'](_0x2ad61e);if(_0x26b6e1)this['_startingVersion']=_0x26b6e1['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x30540e=this['_source']['history']['_operations']['find'](_0x33a930=>!_0x33a930['_isInit']),_0xe8b541=_0x30540e?_0x30540e['baseVersion']:this['_source']['history']['version'];_0x31f2bd?(_0x31f2bd['toVersion']<_0xe8b541&&_0x31f2bd['_update']({'toVersion':_0xe8b541}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x10933b['id'],this['_startingVersion']=_0x10933b['fromVersion']):(this['_startingVersion']=_0x31f2bd['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0xe8b541,this['_continueCurrentRevision']=!0x1);}}else _0x10933b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x10933b['toVersion'],this['editor']['model']['document']['history']['version']),_0x10933b['fromVersion']===_0x10933b['toVersion']?(0x0!==_0x10933b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x10933b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x10933b['id'],this['_startingVersion']=_0x10933b['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',_0x3f2c21=>!_0x3f2c21),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x53d3ad=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x399e9c;for(const _0x14d8c3 in _0x53d3ad){const _0x557741=_0x14d8c3,_0x1b5d06=_0x53d3ad[_0x557741];if('revisionHistoryLicenseKeyValid'==_0x1b5d06||'revisionHistoryLicenseKeyInvalid'==_0x1b5d06||'revisionHistoryLicenseKeyExpired'==_0x1b5d06||'revisionHistoryLicenseKeyDomainLimit'==_0x1b5d06||'revisionHistoryLicenseKeyNotAllowed'==_0x1b5d06||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1b5d06||'revisionHistoryLicenseKeyTrialLimit'==_0x1b5d06||'revisionHistoryLicenseKeyDevelopmentLimit'==_0x1b5d06||'revisionHistoryLicenseKeyUsageLimit'==_0x1b5d06){delete _0x53d3ad[_0x557741],_0x399e9c=_0x1b5d06,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x399e9c&&_0x53d3ad['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x399e9c&&_0x53d3ad['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x399e9c&&_0x53d3ad['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x399e9c&&_0x53d3ad['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x399e9c&&_0x53d3ad['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x399e9c&&_0x53d3ad['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyDevelopmentLimit'==_0x399e9c&&_0x53d3ad['_showLicenseError']('developmentLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x399e9c&&_0x53d3ad['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x321214=this['repository']['getRevision'](0x0),_0x43ad4e=await this['getRevisionDocumentData'](_0x321214),_0x5a6110=await this['getRevisionRootsAttributes'](_0x321214);this['_replaceEditorDataWithRevisionData'](_0x43ad4e,_0x5a6110);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x1f5118){this['_source']=_0x1f5118;}async['update'](){const _0x35dc21=await this['_source']['getLatestVersion']();if(_0x35dc21>this['currentRevision']['toVersion']){await this['_loadState']();const _0x23af87=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x35dc21});_0x23af87['authors']=_0x23af87['authorsIds']['map'](_0xaf4340=>this['editor']['plugins']['get']('Users')['getUser'](_0xaf4340)),this['currentRevision']['_update'](_0x23af87);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x8bb01f={},_0x3556c5=null){const _0x42f634=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3556c5>this['currentRevision']['toVersion']&&(_0x3556c5=null),null===_0x3556c5&&(_0x3556c5=await this['_source']['getLatestVersion']());const _0x36e3b9=this['_getFromVersion'](_0x3556c5),_0x20a854=this['buildRevisionData']({'from':_0x36e3b9,'to':_0x3556c5});if(this['currentRevision']['toVersion']<_0x3556c5){const _0xb1de2b=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3556c5,'to':_0x3556c5});_0xb1de2b['authors']=[],_0xb1de2b['authorsIds']=[],_0xb1de2b['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xb1de2b,!0x0),delete _0xb1de2b['authors'],_0x42f634['push'](_0xb1de2b);}_0x8bb01f['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x8bb01f['name']=_0x8bb01f['name']||null,_0x8bb01f['id']=_0x8bb01f['id']||_0xd77ba2(),_0x8bb01f={..._0x8bb01f,..._0x20a854};const _0x2114f6=this['addRevisionData'](_0x8bb01f);_0x42f634['push'](_0x8bb01f);const _0x993a3b=this['repository']['getIndex'](_0x2114f6);if(0x0!==_0x993a3b){const _0x56e87b=this['repository']['getRevision'](_0x993a3b-0x1);if(_0x56e87b['fromVersion']!==_0x3556c5){const _0x2f05f4=this['_revisionDataBuilder']['getData'](_0x3556c5,_0x56e87b['toVersion']),_0x3a18e6={'id':_0x56e87b['id'],'diffData':_0x2f05f4['diffData'],'authorsIds':_0x2f05f4['authorsIds'],'authors':_0x2f05f4['authorsIds']['map'](_0x38bd15=>this['editor']['plugins']['get']('Users')['getUser'](_0x38bd15)),'fromVersion':_0x3556c5};_0x56e87b===this['currentRevision']&&(_0x3a18e6['createdAt']=new Date(_0x8bb01f['createdAt']['getTime']()+0xa)),_0x56e87b['_update'](_0x3a18e6,!0x0),delete _0x3a18e6['authors'],_0x42f634['push'](_0x3a18e6);}}if(this['adapter']){for(const _0x5497de of _0x42f634)this['_bufferUpdate'](_0x5497de['id'],_0x5497de,!0x0);this['sendBufferedUpdates']();}return _0x2114f6;}['addRevisionData'](_0x4f04a9){const _0x5eab8b=this['repository']['createRevision'](_0x4f04a9);return this['adapter']&&_0x5eab8b['on']('_update',(_0x2dd166,_0x666809,_0x3a8974)=>{_0x3a8974||(this['_bufferUpdate'](_0x666809['id'],_0x666809,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5eab8b,this['_findInsertionIndex'](_0x5eab8b)),_0x5eab8b;}async['getRevisionDocumentData'](_0x534c9d){await this['_loadRevisionData'](_0x534c9d);const _0x15f67d={};for(const _0x593a7f in _0x534c9d['diffData']){if(_0x534c9d['diffData'][_0x593a7f]['attachChange']&&!_0x534c9d['diffData'][_0x593a7f]['attachChange']['isAttached'])continue;const _0xf898bf=this['_removeRevisionMarkers'](JSON['parse'](_0x534c9d['diffData'][_0x593a7f]['insertions'])),_0x367cdc=this['editor']['editing']['view']['document'],_0x584397=new _0x7dcfee(_0x367cdc,_0xf898bf['map'](_0x10046c=>V(_0x10046c,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x15f67d[_0x593a7f]=this['editor']['data']['processor']['toData'](_0x584397),this['editor']['data']['processor']['useFillerType']('default');}return _0x15f67d;}async['getRevisionRootsAttributes'](_0x585313){await this['_loadRevisionData'](_0x585313);const _0x1f0622={};for(const _0x540d41 in _0x585313['diffData'])_0x585313['diffData'][_0x540d41]['attachChange']&&!_0x585313['diffData'][_0x540d41]['attachChange']['isAttached']||(_0x1f0622[_0x540d41]=_0x585313['diffData'][_0x540d41]['attributesAfter']||{});return _0x1f0622;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x1faa43=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x54a9fa=0x0;_0x54a9fa<_0x1faa43['length'];_0x54a9fa++){const _0x42df0b=_0x1faa43[_0x54a9fa];let _0x5b4197=!0x1;for(const _0x130954 of Object['keys'](_0x42df0b))void 0x0===_0x42df0b[_0x130954]?delete _0x42df0b[_0x130954]:'id'!==_0x130954&&(_0x5b4197=!0x0);_0x5b4197||(_0x1faa43[_0x54a9fa]=null);}if(_0x1faa43=_0x1faa43['filter'](_0x45c463=>null!==_0x45c463),!_0x1faa43['length'])return;for(let _0x2fd892=0x0;_0x2fd892<_0x1faa43['length'];_0x2fd892++){const _0x2414ad=_0x1faa43[_0x2fd892];void 0x0!==_0x2414ad['fromVersion']&&void 0x0===_0x2414ad['toVersion']&&(_0x2414ad['toVersion']=this['repository']['getRevision'](_0x2414ad['id'])['toVersion']),void 0x0!==_0x2414ad['toVersion']&&void 0x0===_0x2414ad['fromVersion']&&(_0x2414ad['fromVersion']=this['repository']['getRevision'](_0x2414ad['id'])['fromVersion']);}const _0x1720cb=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x1faa43,_0x1720cb)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x201a54=>{if(_0x201a54){for(const _0x3228c6 of _0x201a54)this['setRevisionData']({'id':_0x3228c6['id'],'createdAt':_0x3228c6['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x5df8ea,_0x516789){let _0x5b1ef4=this['editor']['config']['get']('initialData'),_0x26797a=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x5b1ef4){_0x5b1ef4={};for(const _0x3b9704 of this['editor']['model']['document']['getRootNames']())_0x5b1ef4[_0x3b9704]='';}if('string'==typeof _0x5b1ef4&&(_0x5b1ef4={'main':_0x5b1ef4}),void 0x0===_0x26797a){_0x26797a={};for(const _0x200eb7 of this['editor']['model']['document']['getRootNames']())_0x26797a[_0x200eb7]={};}let _0x3ef122=!0x1;const _0x36d284=Object['keys'](_0x5b1ef4),_0x34a752=Object['keys'](_0x5df8ea);for(const _0x1d3a5e of _0x36d284){if(_0x5b1ef4[_0x1d3a5e]!==_0x5df8ea[_0x1d3a5e]&&''!==_0x5b1ef4[_0x1d3a5e]['trim']()){_0x3ef122=!0x0;break;}if(!_0xa1c9(_0x26797a[_0x1d3a5e],_0x516789[_0x1d3a5e])&&Object['keys'](_0x26797a[_0x1d3a5e])['length']>0x0){_0x3ef122=!0x0;break;}}_0x3ef122||(_0x3ef122=_0x34a752['some'](_0x1a00ae=>!this['editor']['model']['document']['getRoot'](_0x1a00ae))),_0x3ef122&&_0x32c901('editor-initial-data-replaced-with-revision-data',{'editorData':_0x5b1ef4,'editorRootsAttributes':_0x26797a,'revisionData':_0x5df8ea,'revisionRootsAttributes':_0x516789}),this['editor']['config']['set']('initialData',_0x5df8ea),this['editor']['config']['set']('rootsAttributes',_0x516789);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x420ef6=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x420ef6['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4043e7){const _0x841771=this['repository']['getRevisions']();_0x841771['reverse']();let _0x3a8b06=0x0;for(;_0x3a8b06<_0x841771['length'];){const _0x49adf5=_0x841771[_0x3a8b06];if(_0x49adf5===this['currentRevision']){_0x3a8b06++;continue;}if(_0x49adf5['id']===this['_initialRevisionId'])break;const _0x1982df=_0x4043e7['toVersion']-_0x49adf5['toVersion']||_0x4043e7['fromVersion']-_0x49adf5['fromVersion'];if(_0x1982df>0x0)break;if(_0x1982df<0x0)_0x3a8b06++;else{if(!_0x4043e7['creator']&&_0x49adf5['creator'])break;if(_0x49adf5['creator']||!_0x4043e7['creator']){if(_0x4043e7['createdAt']>_0x49adf5['createdAt'])break;_0x3a8b06++;}else _0x3a8b06++;}}return _0x3a8b06;}['setRevisionData'](_0x52adf7){const _0x1c0a92=this['repository']['getRevision'](_0x52adf7['id']);if(_0x52adf7['createdAt']&&(_0x52adf7['createdAt']=new Date(_0x52adf7['createdAt'])),_0x52adf7['authorsIds']){const _0x18dc79=this['editor']['plugins']['get']('Users');_0x52adf7['authors']=_0x52adf7['authorsIds']['map'](_0x18107b=>_0x18dc79['getUser'](_0x18107b));}_0x1c0a92['_update'](_0x52adf7,!0x0);}['buildRevisionData']({revision:_0x3e01ce=null,from:_0x2693f9=null,to:_0x2ab99a=null}){_0x2693f9=null!==_0x2693f9?_0x2693f9:_0x3e01ce['fromVersion'],_0x2ab99a=null!==_0x2ab99a?_0x2ab99a:_0x3e01ce['toVersion'];const _0x1b98a1=this['_revisionDataBuilder']['getData'](_0x2693f9,_0x2ab99a),_0x1eba70={'diffData':_0x1b98a1['diffData'],'authorsIds':_0x1b98a1['authorsIds'],'fromVersion':_0x2693f9,'toVersion':_0x2ab99a};if(!_0x3e01ce||_0x2ab99a!==_0x3e01ce['toVersion']){const _0xb3afca=_0x2ab99a-0x1,_0x2c5488=this['_source']['history']['getOperation'](_0xb3afca);_0x1eba70['createdAt']=_0x2c5488&&_0x2c5488['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2693f9===this['_loadedStateData']['fromVersion']){for(const _0x2e5290 of this['_loadedStateData']['authors'])_0x1eba70['authorsIds']['includes'](_0x2e5290['id'])||_0x1eba70['authorsIds']['push'](_0x2e5290['id']);}return _0x1eba70;}['_loadRevisionData'](_0x39dd4f){if(!_0x39dd4f||_0x39dd4f['diffData'])return Promise['resolve']();{const _0x21fc1d=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x21fc1d,'revisionId':_0x39dd4f['id']})['then'](_0x2ef7cc=>{_0x39dd4f['diffData']=_0x2ef7cc['diffData'];});}}['_bufferUpdate'](_0x39aca6,_0x38b391,_0x280875){if(this['_bufferedUpdates']['has'](_0x39aca6)){const _0x549fa6=this['_bufferedUpdates']['get'](_0x39aca6);_0x38b391=_0x280875?{..._0x549fa6,..._0x38b391}:{..._0x38b391,..._0x549fa6};}this['_bufferedUpdates']['set'](_0x39aca6,_0x38b391);}['_getFromVersion'](_0x10cebb){const _0x2f077c=this['repository']['getRevisions']();_0x2f077c['reverse'](),_0x2f077c['shift']();const _0x277b5d=_0x2f077c['find'](_0x322aa2=>_0x322aa2['toVersion']<=_0x10cebb)['toVersion'];return _0x277b5d<this['_startingVersion']?this['_startingVersion']:_0x277b5d;}['_createInitialRevision'](_0x4954b7){const _0x3e62ad=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3e62ad)this['_initialRevisionId']=_0x3e62ad['id'];else{const _0x220e7b=!this['editor']['model']['document']['roots']['find'](_0x2e9ba7=>this['editor']['model']['hasContent'](_0x2e9ba7)),_0x563893=this['editor']['plugins']['get']('Users')['me']['id'],_0x427f56=R(this['editor']['locale'],_0x220e7b?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4954b7,'to':_0x4954b7,'id':this['_initialRevisionId'],'name':_0x427f56,'creatorId':_0x563893});}}['_createCurrentRevision'](_0xa3a40b){const _0x5b92af=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x5b92af),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xa3a40b,'to':_0xa3a40b,'id':_0x5b92af,'name':'','creatorId':null}));}['_makeRevision']({name:_0x1d1ace,from:_0x141a0c,to:_0x517f2e,creatorId:_0x176ccb,id:_0x3ec754}){const _0x3a79fd=this['buildRevisionData']({'from':_0x141a0c,'to':_0x517f2e});_0x3a79fd['name']=_0x1d1ace,_0x3a79fd['creatorId']=_0x176ccb,_0x3a79fd['id']=_0x3ec754;const _0x5fd9ae=this['addRevisionData'](_0x3a79fd);return this['adapter']&&this['_bufferUpdate'](_0x3a79fd['id'],_0x3a79fd,!0x0),_0x5fd9ae;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x5d56af){return(_0x5d56af=_0x5d56af['filter'](_0x152e8f=>!_0x152e8f['name']||'revision-start'!==_0x152e8f['name']&&'revision-end'!==_0x152e8f['name']))['forEach'](_0x448531=>{'string'!=typeof _0x448531&&(_0x448531['children']=this['_removeRevisionMarkers'](_0x448531['children']),_0x448531['attributes']=_0x448531['attributes']['filter'](_0x1b9cc7=>!_0x1b9cc7[0x0]['startsWith']('data-revision-')));}),_0x5d56af;}}function V(_0x423d1a,_0x2fe247){const _0x1cd651=_0x2fe247['editing']['view']['document'];if('string'==typeof _0x423d1a)return new _0x28b5de(_0x1cd651,_0x423d1a);{const _0x3da8a2=_0x423d1a['children']['map'](_0x497703=>V(_0x497703,_0x2fe247));return new(C[_0x423d1a['type']]||_0x3e257f)(_0x1cd651,_0x423d1a['name'],_0x423d1a['attributes'],_0x3da8a2);}}class T{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x5bc41f){this['editor']=_0x5bc41f,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'](_0x1b79d7){this['source']=_0x1b79d7;const _0x154380=new Map(),_0x141297=new Map(),_0x4b90e5=this['editor']['model']['document']['roots']['map'](_0x5e9181=>_0x5e9181['rootName']);for(const _0x39f215 of _0x4b90e5){const _0x164822=this['editor']['model']['document']['getRoot'](_0x39f215),_0x4df6da=F(_0x164822);_0x154380['set'](_0x39f215,_0x4df6da),_0x141297['set'](_0x39f215,Object['fromEntries'](_0x164822['getAttributes']()));}const _0x3d4207=Array['from'](this['editor']['model']['markers'])['map'](_0x5b0a94=>[_0x5b0a94['name'],_0x5b0a94['getRange']()]),_0x461bb2=this['source']['version'];this['_saveMetaData'](_0x461bb2,_0x154380,_0x3d4207,_0x141297),this['_startingRevisionId']=this['_revisionId'];const _0x1e4894=new Map(),_0x1ac3b5=new Map();for(const _0x2b9b81 of _0x4b90e5){const _0x5d834a=B(_0x2b9b81);_0x1e4894['set'](_0x2b9b81,_0x5d834a),_0x1ac3b5['set'](_0x2b9b81,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1e4894,[],_0x1ac3b5);}['getData'](_0x4f0223,_0x205687){if(this['_lastFrom']===_0x4f0223&&this['_lastTo']<=_0x205687)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x205687,!0x0);else{if(!this['_savedMetaData']['has'](_0x4f0223)){const _0x3cf525=this['_getPreviousFrom'](_0x4f0223);this['_calculateMetaData'](_0x3cf525,_0x4f0223,!0x1);}this['_calculateMetaData'](_0x4f0223,_0x205687,!0x0);}return this['_lastFrom']=_0x4f0223,this['_lastTo']=_0x205687,this['_getState']();}['loadState'](_0x333f63){this['_reset'](),this['_lastFrom']=_0x333f63['fromVersion'],this['_lastTo']=_0x333f63['toVersion'];for(const _0x15dfa7 in _0x333f63['diffData']){const _0x2d36c8=_0x333f63['diffData'][_0x15dfa7]['attachChange'],_0x12e85a=_0x7b7393(_0x333f63['diffData'][_0x15dfa7]['attributesBefore'])||{},_0x6b8812=this['_makeModelFromViewString'](_0x333f63['diffData'][_0x15dfa7]['deletions']);_0x6b8812['rootName']=_0x15dfa7,_0x6b8812['_isAttached']=!_0x2d36c8||!_0x2d36c8['isAttached'],_0x6b8812['isAttached']=()=>_0x6b8812['_isAttached'],this['_baseRoots']['set'](_0x15dfa7,_0x6b8812),this['_baseRootsAttributes']['set'](_0x15dfa7,_0x12e85a),_0x2d36c8&&this['_touchedRoots']['set'](_0x15dfa7,_0x2d36c8);const _0x5ce9f2=this['_makeIdsRoot'](_0x6b8812);this['_baseIdsRoots']['set'](_0x15dfa7,_0x5ce9f2);for(const [_0x2bfaec,_0x15a1ec]of _0x6b8812['markers']){if(!_0x2bfaec['startsWith']('revision:'))continue;const _0x3083e2=_0x2bfaec['split'](':')[0x2];for(const _0x2e6d56 of _0x15a1ec['getWalker']({'singleCharacters':!0x0})){const _0x26fcba=this['_getVidAttributeName'](_0x2e6d56),_0x4385ac='elementEnd'==_0x2e6d56['type']?_0x2e6d56['previousPosition']['path']['slice'](0x0,-0x1):_0x2e6d56['previousPosition']['path'],_0x551b02=_0x5ce9f2['getNodeByPath'](_0x4385ac)['getAttribute'](_0x26fcba);this['_touched']['set'](_0x551b02,{'userId':_0x3083e2});}}}this['_startingRevisionId']=this['_revisionId'];const _0x43986c=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4c2980=>!this['_touched']['has'](_0x4c2980));let _0x490f=0x0;const _0x321e74=new Map();for(const _0x5663ea in _0x333f63['diffData']){const _0x4d70ad=_0x333f63['diffData'][_0x5663ea]['attachChange'],_0x6b7df7=_0x7b7393(_0x333f63['diffData'][_0x5663ea]['attributesAfter'])||{},_0x21e000=this['_makeModelFromViewString'](_0x333f63['diffData'][_0x5663ea]['insertions']);_0x21e000['rootName']=_0x5663ea,_0x21e000['_isAttached']=!_0x4d70ad||_0x4d70ad['isAttached'],_0x21e000['isAttached']=()=>_0x21e000['_isAttached'],this['_diffRoots']['set'](_0x5663ea,_0x21e000),this['_diffRootsAttributes']['set'](_0x5663ea,_0x6b7df7);const _0x21d1dd=this['_makeIdsRoot'](_0x21e000,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5663ea,_0x21d1dd),_0x321e74['set'](_0x5663ea,_0x21e000['isAttached']()?_0x6b7df7:{});for(const [_0x376762,_0x1f4aa1]of _0x21e000['markers']){if(!_0x376762['startsWith']('revision:'))continue;const _0x1deeca=_0x376762['split'](':')[0x2];for(const _0x5e7fa8 of _0x1f4aa1['getWalker']({'singleCharacters':!0x0})){const _0x50b894=this['_getVidAttributeName'](_0x5e7fa8),_0x98fb18=this['_revisionId']++,_0xdcd7ea='elementEnd'==_0x5e7fa8['type']?_0x5e7fa8['previousPosition']['path']['slice'](0x0,-0x1):_0x5e7fa8['previousPosition']['path'];_0x21d1dd['getNodeByPath'](_0xdcd7ea)['_setAttribute'](_0x50b894,_0x98fb18),this['_touched']['set'](_0x98fb18,{'userId':_0x1deeca});}}for(const _0x43608a of this['editor']['model']['createRangeIn'](_0x21e000)['getWalker']({'singleCharacters':!0x0})){const _0x2b8757=this['_getVidAttributeName'](_0x43608a),_0x4d189d='elementEnd'==_0x43608a['type']?_0x43608a['previousPosition']['path']['slice'](0x0,-0x1):_0x43608a['previousPosition']['path'],_0x564005=_0x21d1dd['getNodeByPath'](_0x4d189d);_0x564005['getAttribute'](_0x2b8757)>0x0||_0x564005['_setAttribute'](_0x2b8757,_0x43986c[_0x490f++]);}for(const [_0x2f4b4d,_0x492345]of _0x21e000['markers'])_0x2f4b4d['startsWith']('revision:')||this['_markers']['set'](_0x2f4b4d,_0x492345);}const _0x348a4b=B('$graveyard');this['_baseRoots']['set']('$graveyard',_0x348a4b),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x348a4b,0x1));const _0xb85bb8=B('$graveyard');this['_diffRoots']['set']('$graveyard',_0xb85bb8),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xb85bb8,0x1));const _0x56a399=Array['from'](this['_diffRoots'])['map'](([_0x22586e,_0x358014])=>[_0x22586e,F(_0x358014)]);this['_saveMetaData'](this['_lastTo'],_0x56a399,this['_markers'],_0x321e74);}['_makeModelFromViewString'](_0x425eea){const _0x143785=JSON['parse'](_0x425eea),_0x15f05b=this['editor']['editing']['view']['document'],_0x26e17a=new _0x7dcfee(_0x15f05b,_0x143785['map'](_0x3f35c4=>V(_0x3f35c4,this['editor'])));return this['editor']['data']['toModel'](_0x26e17a);}['_saveMetaData'](_0x7f71ff,_0x447e10,_0xaa3f13,_0x1c0e85){const _0x5ca67d=new Map(_0x447e10),_0x177f11=new Map(_0x7b7393(_0x1c0e85)),_0xf7b2a7=new Map();for(const [_0x554ab5,_0x198ea9]of _0xaa3f13)_0xf7b2a7['set'](_0x554ab5,{'start':_0x198ea9['start']['clone'](),'end':_0x198ea9['end']['clone'](),'rootName':_0x198ea9['root']['rootName']});this['_savedMetaData']['set'](_0x7f71ff,{'roots':_0x5ca67d,'markers':_0xf7b2a7,'rootsAttributes':_0x177f11});}['_removeMetaData'](_0x134d84){this['_savedMetaData']['delete'](_0x134d84);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_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'](_0xaecdc6,_0x400cf6=null){let _0x29b8a8=null;_0xaecdc6['is']('documentFragment')||(_0x29b8a8=new ft(_0xaecdc6['name'],{'vid_start':null===_0x400cf6?this['_revisionId']++:_0x400cf6++}));const _0x1cb206=[];for(const _0x1f305e of _0xaecdc6['getChildren']())if(_0x1f305e['is']('element')){_0x1cb206['push'](this['_makeIdsRoot'](_0x1f305e,_0x400cf6));const _0x1efee0=_0x1cb206[_0x1cb206['length']-0x1];null!==_0x400cf6&&(_0x400cf6=_0x1efee0['is']('element','$text')?_0x1efee0['getAttribute']('vid')+0x1:_0x1efee0['getAttribute']('vid_end')+0x1);}else{for(let _0x3c114d=0x0;_0x3c114d<_0x1f305e['offsetSize'];_0x3c114d++)_0x1cb206['push'](new ft('$text',{'vid':null===_0x400cf6?this['_revisionId']++:_0x400cf6++}));}if(_0xaecdc6['is']('documentFragment')){const _0x2f3d6f=B(_0xaecdc6['rootName']);return _0x2f3d6f['_insertChild'](0x0,_0x1cb206),_0x2f3d6f;}return _0x29b8a8['_setAttribute']('vid_end',null===_0x400cf6?this['_revisionId']++:_0x400cf6++),_0x29b8a8['_insertChild'](0x0,_0x1cb206),_0x29b8a8;}['_calculateMetaData'](_0xad0e47,_0x3b7087,_0x263d84){this['_reset']();const {roots:_0x2260a7,markers:_0x576a2d,rootsAttributes:_0x342f41}=this['_savedMetaData']['get'](_0xad0e47);this['_baseRoots']=new Map(_0x2260a7),this['_baseRootsAttributes']=new Map(_0x7b7393(_0x342f41));for(const [_0x49dc4b,_0x36bbfc]of this['_baseRoots'])if('$graveyard'!==_0x49dc4b&&(this['_diffRoots']['set'](_0x49dc4b,F(_0x36bbfc)),this['_diffRootsAttributes']=new Map(_0x7b7393(_0x342f41)),_0x263d84)){const _0x1feea2=this['_revisionId'];this['_idsRoots']['set'](_0x49dc4b,this['_makeIdsRoot'](_0x36bbfc)),this['_baseIdsRoots']['set'](_0x49dc4b,this['_makeIdsRoot'](_0x36bbfc,_0x1feea2));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',F(this['_baseRoots']['get']('$graveyard'))),_0x263d84&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x184928,_0x2babaf]of _0x576a2d){const _0x2c8ee8=this['_baseRoots']['get'](_0x2babaf['rootName']),_0x4e683e=this['_diffRoots']['get'](_0x2babaf['rootName']),_0x4ff81d=new vt(this['_fixPosition'](_0x2babaf['start'],_0x2c8ee8),this['_fixPosition'](_0x2babaf['end'],_0x2c8ee8)),_0x688eca=this['_fixRange'](_0x4ff81d,_0x4e683e);_0x2c8ee8['markers']['set'](_0x184928,_0x4ff81d),this['_markers']['set'](_0x184928,_0x688eca);}this['_applyOperations'](_0xad0e47,_0x3b7087,_0x263d84);}['_applyOperations'](_0x2a2e03,_0x349fae,_0x5447c0){for(const _0x213b75 of this['source']['getOperations'](_0x2a2e03,_0x349fae))this['_handleOperation'](_0x213b75,_0x5447c0);for(const _0xb448a9 of this['_diffRoots']['values']())_0xb448a9['markers']['clear']();for(const [_0x404bf7,_0x2491d5]of this['_markers']){this['_diffRoots']['get'](_0x2491d5['root']['rootName'])['markers']['set'](_0x404bf7,_0x2491d5['clone']());}const _0x298de4=new Map(),_0x3fac66=new Map();for(const [_0x389ae4,_0x37ca8d]of this['_diffRoots'])_0x298de4['set'](_0x389ae4,F(_0x37ca8d)),_0x3fac66['set'](_0x389ae4,this['_diffRootsAttributes']['get'](_0x389ae4));this['_saveMetaData'](_0x349fae,_0x298de4,this['_markers'],_0x3fac66);}['_getPreviousFrom'](_0x2b4f49){const _0x26fc15=Array['from'](this['_savedMetaData']['keys']());_0x26fc15['sort']((_0x579565,_0x3da23c)=>_0x579565-_0x3da23c),_0x26fc15['reverse']();for(const _0x3d8b24 of _0x26fc15)if(_0x3d8b24<_0x2b4f49)return _0x3d8b24;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5a5fdd,_0x2d96bf){const _0x2ee23f=Array['from'](_0x2d96bf['markers'])['map'](([_0x3a957c,_0x3a74c4])=>[_0x3a957c,this['_fixRange'](_0x3a74c4,_0x5a5fdd)]);_0x5a5fdd['markers']=new Map(_0x2ee23f);}['_transformMarkers'](_0xbd2372){for(const _0x10fd2f of this['_markers']['values']()){const _0x3958da=_0x10fd2f['getTransformedByOperation'](_0xbd2372),_0x1dec86=vt['_createFromRanges'](_0x3958da);_0x10fd2f['start']=_0x1dec86['start'],_0x10fd2f['end']=_0x1dec86['end'];}}['_handleOperation'](_0x849850,_0x195bfb){if('addRoot'!=_0x849850['type']&&'detachRoot'!=_0x849850['type']){if('insert'==_0x849850['type']){const _0x464f07=_0x849850['position']['root']['rootName'];this['_diffRoots']['has'](_0x464f07)||(this['_diffRoots']['set'](_0x464f07,B(_0x464f07,!0x0)),this['_diffRootsAttributes']['set'](_0x464f07,{}),_0x195bfb&&this['_idsRoots']['set'](_0x464f07,B(_0x464f07,!0x0)));}else{if('addRootAttribute'==_0x849850['type']||'removeRootAttribute'==_0x849850['type']||'changeRootAttribute'==_0x849850['type'])return void this['_handleRootAttributeOperation'](_0x849850);'marker'==_0x849850['type']&&this['_handleMarkerOperation'](_0x849850);}if('marker'!==_0x849850['type']){const _0x594da2=this['_cloneOperation'](_0x849850,this['_diffRoots']);_0x594da2['_execute'](),this['_transformMarkers'](_0x594da2);}if(_0x195bfb)switch(_0x849850['type']){case'insert':this['_handleInsertOperation'](_0x849850);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x849850);break;case'merge':this['_handleMergeOperation'](_0x849850);break;case'split':this['_handleSplitOperation'](_0x849850);}}else this['_handleRootOperation'](_0x849850,_0x195bfb);}['_cloneOperation'](_0x12148c,_0x566d28){const _0x1b4e15=_0x12148c['clone']();return _0x1b4e15['_authorId']=_0x12148c['_authorId'],this['_fixOperation'](_0x1b4e15,_0x566d28),_0x1b4e15;}['_getBaseVids'](_0x1836d6){return _0x1836d6['map'](_0x97db52=>{const _0xf0d62d=this['_getVidAttributeName'](_0x97db52);return Number(_0x97db52['item']['getAttribute'](_0xf0d62d));});}['_generateTape'](_0x3f4867,_0xa19443){if(_0x3f4867['is']('element','$text'))_0xa19443['push']({'item':_0x3f4867,'type':'text'});else{_0x3f4867['is']('element')&&_0xa19443['push']({'item':_0x3f4867,'type':'elementStart'});for(const _0x4ce887 of _0x3f4867['getChildren']())this['_generateTape'](_0x4ce887,_0xa19443);_0x3f4867['is']('element')&&_0xa19443['push']({'item':_0x3f4867,'type':'elementEnd'});}return _0xa19443;}['_getState'](){const _0x2e0a12=new Map(this['_touched']),_0x2d0cab=new Map(_0x2e0a12),_0x1dabd5=new Map(),_0x51557b={'insertions':{},'deletions':{}},_0x128be6={'insertions':{},'deletions':{}},_0x1b768f=new Map(),_0x33f25a=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x33f25a['delete']('$graveyard');for(const _0x4c3784 of _0x33f25a){const _0x24d782=this['_diffRoots']['get'](_0x4c3784)||B(_0x4c3784,!0x1),_0xea8ab5=this['_baseRoots']['get'](_0x4c3784)||B(_0x4c3784,!0x1);_0x24d782['isAttached']()||_0xea8ab5['isAttached']()?(_0x51557b['insertions'][_0x4c3784]=F(_0x24d782),_0x51557b['deletions'][_0x4c3784]=F(_0xea8ab5),this['_copyMarkers'](_0x51557b['deletions'][_0x4c3784],_0xea8ab5),this['_copyMarkers'](_0x51557b['insertions'][_0x4c3784],_0x24d782),_0x128be6['insertions'][_0x4c3784]=this['_generateTape'](this['_idsRoots']['get'](_0x4c3784),[]),_0x128be6['deletions'][_0x4c3784]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x4c3784)||B(_0x4c3784,!0x1),[])):_0x33f25a['delete'](_0x4c3784);}for(const _0xdf59fd of _0x33f25a){const _0x3bc391=_0x128be6['insertions'][_0xdf59fd];for(const _0x3378da of _0x3bc391){const _0x9fef26=this['_getVidAttributeName'](_0x3378da),_0xecf187=_0x3378da['item']['getAttribute'](_0x9fef26);_0x2d0cab['delete'](_0xecf187),_0xecf187>=this['_startingRevisionId']&&_0x1dabd5['set'](_0xecf187,_0x2e0a12['get'](_0xecf187));}}for(const _0x1e0240 of _0x33f25a){const _0x86aef3=_0x128be6['insertions'][_0x1e0240],_0x41ebe3=this['_getBaseVids'](_0x128be6['deletions'][_0x1e0240]);let _0x437b77=0x0;for(const _0x2014bc of _0x86aef3){const _0x38851c=this['_getVidAttributeName'](_0x2014bc),_0x49f733=_0x2014bc['item']['getAttribute'](_0x38851c);if(!_0x1dabd5['has'](_0x49f733)&&!_0x1b768f['has'](_0x49f733)){if(_0x2d0cab['has'](_0x49f733))_0x437b77++;else{if(_0x49f733!=_0x41ebe3[_0x437b77]){const _0x4ff0f4=_0x2e0a12['get'](_0x49f733)||_0x2e0a12['get'](_0x41ebe3[_0x437b77]);for(;_0x49f733!=_0x41ebe3[_0x437b77];)_0x2d0cab['has'](_0x41ebe3[_0x437b77])||(_0x1b768f['set'](_0x41ebe3[_0x437b77],_0x4ff0f4),_0x2e0a12['set'](_0x41ebe3[_0x437b77],_0x4ff0f4)),_0x437b77++;}_0x437b77++;}}}}for(const _0x2fb0a7 of _0x33f25a){const _0x5a5303=_0x128be6['insertions'][_0x2fb0a7];for(const _0x1c97d2 of _0x5a5303){const _0x3aaa15=this['_getVidAttributeName'](_0x1c97d2),_0x1878dd=_0x1c97d2['item']['getAttribute'](_0x3aaa15);if(_0x1b768f['has'](_0x1878dd)){const _0x68a53a=_0x1b768f['get'](_0x1878dd);_0x2d0cab['has'](_0x1878dd)||_0x2d0cab['set'](_0x1878dd,{..._0x68a53a}),_0x1dabd5['set'](_0x1878dd,{..._0x68a53a});}}}for(const _0x326123 of _0x2d0cab['keys']())_0x326123>=this['_startingRevisionId']&&_0x2d0cab['delete'](_0x326123);const _0x41660d=new Map();for(const _0x21c2f3 of _0x33f25a){let _0x4c1cc2=_0x128be6['insertions'][_0x21c2f3];for(const _0x18ae8d of _0x4c1cc2)if(_0x18ae8d['item']['is']('element','tableCell')){const _0xe14539=this['_getVidAttributeName'](_0x18ae8d),_0x247cf4=_0x18ae8d['item']['getAttribute'](_0xe14539);if(_0x1dabd5['has'](_0x247cf4)){const _0x4284e9=_0x18ae8d['item']['parent']['parent']['getAttribute']('vid_start'),_0x56c4bd=_0x41660d['get'](_0x4284e9)||new Set();_0x56c4bd['add'](_0x1dabd5['get'](_0x247cf4)['userId']),_0x41660d['set'](_0x4284e9,_0x56c4bd);}}_0x4c1cc2=_0x128be6['deletions'][_0x21c2f3];for(const _0x1c72ef of _0x4c1cc2)if(_0x1c72ef['item']['is']('element','tableCell')){const _0x2b6e37=this['_getVidAttributeName'](_0x1c72ef),_0x3517a0=_0x1c72ef['item']['getAttribute'](_0x2b6e37);if(_0x2d0cab['has'](_0x3517a0)){const _0x1902dd=_0x1c72ef['item']['parent']['parent']['getAttribute']('vid_start'),_0x359af9=_0x41660d['get'](_0x1902dd)||new Set();_0x359af9['add'](_0x2d0cab['get'](_0x3517a0)['userId']),_0x41660d['set'](_0x1902dd,_0x359af9);}}for(const _0x3a172d of _0x41660d['keys']())(_0x1dabd5['has'](_0x3a172d)||_0x2d0cab['has'](_0x3a172d))&&_0x41660d['delete'](_0x3a172d);}for(const _0x16de58 of _0x33f25a){const _0x307d5c=_0x128be6['insertions'][_0x16de58];let _0x5b54de=null,_0x3eb09f=null;for(const _0x2fc172 of _0x307d5c){const _0x24a354=this['_getVidAttributeName'](_0x2fc172),_0x2f47f8=_0x2fc172['item']['getAttribute'](_0x24a354),_0x27a2f2=_0x41660d['get'](_0x2f47f8);_0x27a2f2&&'elementStart'==_0x2fc172['type']&&(_0x5b54de=Array['from'](_0x27a2f2)[0x0],_0x3eb09f=_0x2fc172['item']['getAttribute']('vid_end')),_0x5b54de&&(_0x2d0cab['set'](_0x2f47f8,{'userId':_0x5b54de}),_0x1dabd5['set'](_0x2f47f8,{'userId':_0x5b54de})),_0x2f47f8==_0x3eb09f&&(_0x5b54de=null,_0x3eb09f=null);}}const _0x597dd5={},_0x59f256=new Set();for(const _0x184b2f of _0x33f25a){const _0x4712e4=_0x51557b['deletions'][_0x184b2f],_0x10ee76=_0x51557b['insertions'][_0x184b2f];for(const {userId:_0x3081ef}of this['_touchedMarkers']['values']())null!==_0x3081ef&&_0x59f256['add'](_0x3081ef);for(const {userId:_0x6023a1}of this['_touchedRoots']['values']())null!==_0x6023a1&&_0x59f256['add'](_0x6023a1);this['_markChanges'](_0x10ee76,_0x128be6['insertions'][_0x184b2f],_0x1dabd5,'insertion',_0x59f256),this['_markChanges'](_0x4712e4,_0x128be6['deletions'][_0x184b2f],_0x2d0cab,'deletion',_0x59f256),_0x597dd5[_0x184b2f]={'insertions':this['_prepareViewToSave'](_0x10ee76),'deletions':this['_prepareViewToSave'](_0x4712e4),'attachChange':this['_touchedRoots']['get'](_0x184b2f)||null,'attributesBefore':_0x7b7393(this['_baseRootsAttributes']['get'](_0x184b2f))||{},'attributesAfter':_0x7b7393(this['_diffRootsAttributes']['get'](_0x184b2f))};}return{'diffData':_0x597dd5,'authorsIds':Array['from'](_0x59f256)};}['_processRootBeforeSave'](_0x41186f){for(const [,_0x26a15]of _0x41186f['markers']){const _0x50ff20=_0x26a15['start']['getAncestors']()['filter'](_0x1289ee=>'tableCell'==_0x1289ee['name']);for(const _0x54cd91 of _0x50ff20)0x1==_0x54cd91['childCount']&&_0x54cd91['getChild'](0x0)['is']('element','paragraph')&&_0x54cd91['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x319e34){this['_processRootBeforeSave'](_0x319e34);const _0x49e7d2=this['editor']['data']['toView'](_0x319e34,{}),_0x2bd5cc=Array['from'](_0x49e7d2['getChildren']())['map'](_0x59d390=>this['_getViewJson'](_0x59d390));return JSON['stringify'](_0x2bd5cc);}['_getViewJson'](_0x5b5393){if(_0x5b5393['is']('$text'))return _0x5b5393['data'];{const _0x87cb52=_0x5b5393;return{'type':Object['keys'](C)['find'](_0x2fc91d=>_0x5b5393 instanceof C[_0x2fc91d]),'name':_0x87cb52['name'],'attributes':Array['from'](_0x87cb52['getAttributes']()),'children':Array['from'](_0x87cb52['getChildren']())['map'](_0x1e66a9=>this['_getViewJson'](_0x1e66a9))};}}['_markChanges'](_0x43866a,_0x4351d5,_0x2eed31,_0x4a525d,_0x52581f){let _0x4d1a56=null,_0x36b099=null,_0x4b1f73=0x0;const _0x10c59d=this['editor']['model'];for(let _0x289125=0x0;_0x289125<_0x4351d5['length'];_0x289125++){const _0x222428=this['_getVidAttributeName'](_0x4351d5[_0x289125]),_0x46b560=_0x4351d5[_0x289125]['item']['getAttribute'](_0x222428),_0x17d20b=_0x2eed31['get'](_0x46b560),_0x5ccb10=_0x289125==_0x4351d5['length']-0x1;(!_0x4d1a56&&_0x17d20b&&(_0x4d1a56=_0x17d20b,_0x36b099=_0x4351d5[_0x289125]),_0x4d1a56&&(!_0x17d20b||_0x17d20b['userId']!=_0x4d1a56['userId']))&&(_0x260619(_0x17d20b,J(_0x36b099,_0x43866a,_0x10c59d),J(_0x4351d5[_0x289125],_0x43866a,_0x10c59d)),_0x4d1a56=_0x17d20b||null,_0x36b099=_0x17d20b?_0x4351d5[_0x289125]:null),_0x4d1a56&&_0x5ccb10&&_0x260619(_0x17d20b,J(_0x36b099,_0x43866a,_0x10c59d),q(_0x4351d5[_0x289125],_0x43866a,_0x10c59d));}function _0x260619(_0x356434,_0x5c4c35,_0x4364c6){const _0x556c3e=_0x4d1a56['userId'],_0x31fdea='revision:'+_0x4a525d+':'+_0x556c3e+':'+_0x4b1f73++,_0x186232=_0x10c59d['createRange'](_0x5c4c35,_0x4364c6);_0x43866a['markers']['set'](_0x31fdea,_0x186232),null!==_0x556c3e&&_0x52581f['add'](_0x556c3e);}}['_getVidAttributeName'](_0x40b74f){switch(_0x40b74f['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x5533a8,_0x2c9a69){_0x5533a8['baseVersion']=null;for(const _0x4faf1b in _0x5533a8){const _0x304813=_0x5533a8[_0x4faf1b];if(_0x304813 instanceof gt){const _0x221ffc=_0x2c9a69['get'](_0x304813['root']['rootName']);_0x5533a8[_0x4faf1b]=this['_fixPosition'](_0x304813,_0x221ffc);}if(_0x304813 instanceof vt){const _0x47ae35=_0x2c9a69['get'](_0x304813['root']['rootName']);_0x5533a8[_0x4faf1b]=this['_fixRange'](_0x304813,_0x47ae35);}'root'===_0x4faf1b&&(_0x5533a8['root']=_0x2c9a69['get'](_0x5533a8['root']['rootName']));}}['_fixRange'](_0x50de9f,_0x26aaff){return this['editor']['model']['createRange'](this['_fixPosition'](_0x50de9f['start'],_0x26aaff),this['_fixPosition'](_0x50de9f['end'],_0x26aaff));}['_fixPosition'](_0x4f128c,_0x39dc85){return this['editor']['model']['createPositionFromPath'](_0x39dc85,_0x4f128c['path'],_0x4f128c['stickiness']);}['_handleInsertOperation'](_0xa53e){const _0x12b423=this['_idsRoots']['get'](_0xa53e['position']['root']['rootName']),_0xd85ab3=this['_fixPosition'](_0xa53e['position'],_0x12b423),_0x47744c=null===_0xa53e['_authorId']?null:_0xa53e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2bfac2=_0xd85ab3['parent'],_0x1218ef=this['_revisionId'],_0x576d90=[];for(const _0x2981fe of _0xa53e['nodes'])if(_0x2981fe['is']('element'))_0x576d90['push'](this['_makeIdsRoot'](_0x2981fe));else{for(let _0x5f12e3=0x0;_0x5f12e3<_0x2981fe['offsetSize'];_0x5f12e3++)_0x576d90['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x580d44=this['_revisionId'];for(let _0x4db589=_0x1218ef;_0x4db589<_0x580d44;_0x4db589++)this['_touched']['set'](_0x4db589,{'userId':_0x47744c});_0x2bfac2['_insertChild'](_0xd85ab3['offset'],_0x576d90);}['_handleMoveOperation'](_0xdba6a7){(_0xdba6a7=this['_cloneOperation'](_0xdba6a7,this['_idsRoots']))['_execute']();const _0x5978d3=null===_0xdba6a7['_authorId']?null:_0xdba6a7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4f4350=_0xdba6a7['getMovedRangeStart'](),_0x1e6b2a=_0x4f4350['parent'],_0x1c8791=_0x4f4350['offset'];!function _0x1051fe(_0x1b990e,_0x13d2bd,_0x3b04fc,_0x57f04c){for(let _0x509384=_0x3b04fc;_0x509384<_0x57f04c;_0x509384++){const _0x1fd20e=_0x13d2bd['getChild'](_0x509384);_0x1fd20e['is']('element','$text')?_0x1b990e['set'](_0x1fd20e['getAttribute']('vid'),{'userId':_0x5978d3}):(_0x1b990e['set'](_0x1fd20e['getAttribute']('vid_start'),{'userId':_0x5978d3}),_0x1051fe(_0x1b990e,_0x1fd20e,0x0,_0x1fd20e['childCount']),_0x1b990e['set'](_0x1fd20e['getAttribute']('vid_end'),{'userId':_0x5978d3}));}}(this['_touched'],_0x1e6b2a,_0x1c8791,_0x1c8791+_0xdba6a7['howMany']);}['_handleMergeOperation'](_0x4e1feb){const _0x460758=null===(_0x4e1feb=this['_cloneOperation'](_0x4e1feb,this['_idsRoots']))['_authorId']?null:_0x4e1feb['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x53e253=_0x4e1feb['targetPosition']['parent'],_0x362755=_0x4e1feb['sourcePosition']['parent'],_0x1b8a5c=_0x53e253['getAttribute']('vid_end'),_0x472de2=_0x362755['getAttribute']('vid_start');_0x53e253['_setAttribute']('vid_end',_0x362755['getAttribute']('vid_end')),_0x362755['_setAttribute']('vid_end',_0x1b8a5c),this['_touched']['set'](_0x472de2,{'userId':_0x460758}),this['_touched']['set'](_0x1b8a5c,{'userId':_0x460758}),_0x4e1feb['_execute']();}['_handleSplitOperation'](_0x1393a2){const _0x3c0761=null===(_0x1393a2=this['_cloneOperation'](_0x1393a2,this['_idsRoots']))['_authorId']?null:_0x1393a2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x52a081=_0x1393a2['graveyardPosition'],_0x3ccff7=_0x1393a2['splitPosition']['parent'];_0x1393a2['_execute']();const _0x338b46=_0x3ccff7['getAttribute']('vid_end'),_0xcb091d=_0x1393a2['insertionPosition']['nodeAfter'];if(_0x52a081){const _0x5b9b54=_0xcb091d['getAttribute']('vid_end'),_0x150dd9=_0x3ccff7['getAttribute']('vid_end');_0x3ccff7['_setAttribute']('vid_end',_0x5b9b54),_0xcb091d['_setAttribute']('vid_end',_0x150dd9),this['_touched']['set'](_0x3ccff7['getAttribute']('vid_end'),{'userId':_0x3c0761}),this['_touched']['set'](_0xcb091d['getAttribute']('vid_start'),{'userId':_0x3c0761});}else{const _0x38e23a=this['_revisionId']++,_0x6f4e5e=this['_revisionId']++;_0x3ccff7['_setAttribute']('vid_end',_0x38e23a),_0xcb091d['_setAttribute']('vid_start',_0x6f4e5e),_0xcb091d['_setAttribute']('vid_end',_0x338b46),this['_touched']['set'](_0x38e23a,{'userId':_0x3c0761}),this['_touched']['set'](_0x6f4e5e,{'userId':_0x3c0761});}}['_handleMarkerOperation'](_0x1bcf68){if(!_0x1bcf68['affectsData'])return;const _0xcbed57=(_0x1bcf68=this['_cloneOperation'](_0x1bcf68,this['_diffRoots']))['oldRange']?_0x1bcf68['oldRange']['root']:null,_0xbdc9de=_0x1bcf68['newRange']?_0x1bcf68['newRange']['root']:null;_0xcbed57&&this['_markers']['delete'](_0x1bcf68['name']),_0xbdc9de&&this['_markers']['set'](_0x1bcf68['name'],_0x1bcf68['newRange']['clone']());const _0x5a21c2=null===_0x1bcf68['_authorId']?null:_0x1bcf68['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3c669a=_0x1bcf68['name'];if(!this['_touchedMarkers']['has'](_0x3c669a))return void this['_touchedMarkers']['set'](_0x3c669a,{'range':_0x1bcf68['oldRange'],'userId':_0x5a21c2});const _0x4c079a=this['_touchedMarkers']['get'](_0x3c669a),_0x57ff84=_0x4c079a['range'],_0x578484=_0x1bcf68['newRange'];null==_0x57ff84&&null==_0x578484||_0x57ff84&&_0x578484&&_0x57ff84['isEqual'](_0x578484)?this['_touchedMarkers']['delete'](_0x1bcf68['name']):_0x4c079a['userId']=_0x5a21c2;}['_handleRootOperation'](_0x35a7be,_0x17a98b){this['_diffRoots']['has'](_0x35a7be['rootName'])?this['_diffRoots']['get'](_0x35a7be['rootName'])['_isAttached']=_0x35a7be['isAdd']:(this['_diffRoots']['set'](_0x35a7be['rootName'],B(_0x35a7be['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x35a7be['rootName'],{}),_0x17a98b&&this['_idsRoots']['set'](_0x35a7be['rootName'],B(_0x35a7be['rootName'],!0x0)));const _0x3c3930=null===_0x35a7be['_authorId']?null:_0x35a7be['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1b5d12=this['_touchedRoots']['get'](_0x35a7be['rootName']);_0x1b5d12&&_0x1b5d12['userId']===_0x3c3930?this['_touchedRoots']['delete'](_0x35a7be['rootName']):this['_touchedRoots']['set'](_0x35a7be['rootName'],{'userId':_0x3c3930,'isAttached':_0x35a7be['isAdd']});}['_handleRootAttributeOperation'](_0x4e3c4d){const _0x216d74=this['_diffRootsAttributes']['get'](_0x4e3c4d['root']['rootName']);null===_0x4e3c4d['newValue']?delete _0x216d74[_0x4e3c4d['key']]:_0x216d74[_0x4e3c4d['key']]=_0x4e3c4d['newValue'];}}function F(_0x4e5b00){const _0x5b9ccd=B(_0x4e5b00['rootName'],_0x4e5b00['isAttached']());for(const _0x3c95e9 of _0x4e5b00['getChildren']()){const _0x53c0e3=_0x3c95e9['_clone'](!0x0);_0x5b9ccd['_appendChild'](_0x53c0e3);}return _0x5b9ccd;}function B(_0x546a42,_0x56ad65=!0x0){const _0x7b7762=new mt();return _0x7b7762['rootName']=_0x546a42,_0x7b7762['_isAttached']=_0x56ad65,_0x7b7762['isAttached']=()=>_0x7b7762['_isAttached'],_0x7b7762;}function J(_0x44362d,_0x52cea2,_0xa651e9){const _0x5c9bc9='elementEnd'==_0x44362d['type']?_0xa651e9['createPositionAt'](_0x44362d['item'],'end'):_0xa651e9['createPositionBefore'](_0x44362d['item']);return _0xa651e9['createPositionFromPath'](_0x52cea2,_0x5c9bc9['path'],_0x5c9bc9['stickiness']);}function q(_0x1a64fd,_0x46abe4,_0xcb696){const _0x19c38d='elementStart'==_0x1a64fd['type']?_0xcb696['createPositionAt'](_0x1a64fd['item'],0x0):_0xcb696['createPositionAfter'](_0x1a64fd['item']);return _0xcb696['createPositionFromPath'](_0x46abe4,_0x19c38d['path'],_0x19c38d['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x43238d,_0x50ab56){super(_0x43238d),this['focusTracker']=new _0x2b66cf(),this['keystrokes']=new _0x46ea2c(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x50ab56),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x4f03f3(this);}['render'](){super['render'](),_0x42944a({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x11c744=_0x57ac8b=>_0x57ac8b['stopPropagation']();this['keystrokes']['set']('arrowright',_0x11c744),this['keystrokes']['set']('arrowleft',_0x11c744),this['keystrokes']['set']('arrowup',_0x11c744),this['keystrokes']['set']('arrowdown',_0x11c744);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xef8db4){this['revisionNameInputView']['fieldView']['element']['value']=_0xef8db4['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x126630){const _0x3642e7=new _0x484b6d(this['locale'],_0x49da71),_0x4ab832=_0x3642e7['fieldView'];_0x4ab832['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x440d1e=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x126630&&(_0x440d1e+='\x20('+R(this['locale'],'optional')+')'),(_0x3642e7['label']=_0x440d1e,_0x4ab832['on']('input',()=>{this['revisionNameInputValue']=_0x4ab832['element']['value']['trim']();}),_0x3642e7);}}class u extends _0x506060{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x3d71a1=this['editor'],_0x2a1422=_0x3d71a1['plugins']['get']('RevisionTracker');_0x3d71a1['ui']['componentFactory']['add']('revisionHistory',_0x16761f=>{const _0x1ea1fd=_0x1f59c4(_0x16761f),_0x3ba972=_0x1ea1fd['panelView']['children'],_0x3a534e=new _0x139e5(_0x16761f),_0x554de=new _0x5c603c(_0x16761f),_0x295860=new te(_0x16761f),_0x429207=new _0x5c603c(_0x16761f),_0x74f757=new te(_0x16761f);return _0x1ea1fd['bind']('isEnabled')['to'](_0x2a1422,'isReady',_0x2a1422,'isEnabled',_0x3d71a1,'isReadOnly',(_0x91a4ee,_0x22efd5,_0x3a2b39)=>_0x91a4ee&&_0x22efd5&&!_0x3a2b39),_0x1ea1fd['buttonView']['set']({'icon':_0x593280['history'],'label':R(_0x16761f,'Revision\x20history'),'tooltip':!0x0}),_0x295860['set']({'label':R(_0x16761f,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x295860['bind']('isEnabled')['to'](_0x2a1422,'isReady',_0x2a1422,'isEnabled',_0x3d71a1,'isReadOnly',(_0x43b679,_0x38832a,_0x20ae73)=>_0x43b679&&_0x38832a&&!_0x20ae73),_0x295860['on']('execute',()=>this['_showDialog']()),_0x74f757['set']({'label':R(_0x16761f,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x74f757['bind']('isEnabled')['to'](_0x2a1422,'isReady',_0x3d71a1,'isReadOnly',(_0x4fe860,_0x25a2b0)=>_0x4fe860&&!_0x25a2b0),_0x74f757['on']('execute',()=>{_0x3d71a1['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x1ea1fd['isOpen']=!0x1,_0x3d71a1['editing']['view']['focus']();}),_0x554de['children']['add'](_0x295860),_0x429207['children']['add'](_0x74f757),_0x3a534e['role']='menu',_0x3a534e['items']['addMany']([_0x554de,_0x429207]),_0x3ba972['add'](_0x3a534e),_0x1ea1fd;}),_0x3d71a1['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x51adec=this['editor'],_0x17bf53=_0x51adec['locale'],_0x21b250=new _0x5f2de9(_0x17bf53),_0x2ae09f=new _0x547c45(_0x17bf53);_0x21b250['buttonView']['set']({'icon':_0x593280['history'],'label':R(_0x17bf53,'Revision\x20history')});const _0x3c0035=new _0x3cac34(_0x17bf53,_0x21b250),_0x1d0d9b=new _0x3b9d8d(_0x17bf53);_0x1d0d9b['set']({'label':R(_0x17bf53,'Save\x20current\x20revision')}),_0x1d0d9b['delegate']('execute')['to'](_0x21b250),_0x1d0d9b['on']('execute',()=>{this['_showDialog']();}),_0x3c0035['children']['add'](_0x1d0d9b),_0x2ae09f['items']['add'](_0x3c0035);const _0x275f03=new _0x3cac34(_0x17bf53,_0x21b250),_0x41a63b=new _0x3b9d8d(_0x17bf53);return _0x41a63b['set']({'label':R(_0x17bf53,'Open\x20revision\x20history')}),_0x41a63b['delegate']('execute')['to'](_0x21b250),_0x41a63b['on']('execute',()=>{_0x51adec['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x275f03['children']['add'](_0x41a63b),_0x2ae09f['items']['add'](_0x275f03),_0x21b250['panelView']['children']['add'](_0x2ae09f),_0x21b250;}['_showDialog'](){const _0x46b763=this['editor'],_0x567c05=_0x46b763['locale'],_0x100275=_0x46b763['plugins']['get']('Dialog'),_0x31083=_0x46b763['plugins']['get']('RevisionTracker');function _0x3b4159(_0x3c13fe){_0x46b763['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3c13fe['revisionName']?_0x3c13fe['revisionNameInputView']['errorText']=R(_0x567c05,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x46b763['plugins']['get'](l)['saveRevision']({'name':_0x3c13fe['revisionName']}),_0x100275['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3b4159(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x100275['show']({'id':'revisionSave','title':R(_0x567c05,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x46b763['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x100275['hide']()},{'label':R(_0x46b763['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x594669){_0x594669['bind']('isEnabled')['to'](_0x31083,'isReady',_0x31083,'isEnabled',_0x46b763,'isReadOnly',(_0x4b1841,_0xf0ede3,_0x4e6065)=>_0x4b1841&&_0xf0ede3&&!_0x4e6065);},'onExecute':()=>_0x3b4159(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2867b0=this['editor'],_0x33c9d0=_0x2867b0['locale'];this['_saveRevisionFormView']=new hs(_0x33c9d0,_0x2867b0['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Y extends ts{['changeId'];['_model'];constructor(_0x4d3df0,_0x3420a4){super(_0x4d3df0),this['_model']=_0x3420a4,this['changeId']=_0x3420a4['id'];const _0x2e849d=this['bindTemplate'],_0x385bbc=R(_0x4d3df0,_0x3420a4['data']['isSuggestion']?'Suggested\x20by':'add'==_0x3420a4['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x3420a4['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x2e849d['to']('type',_0x1301b3=>'ck-revision-change__'+_0x1301b3)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x385bbc}]},{'text':'\x20'+_0x3420a4['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x40e57d(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x29f45b){super(),this['id']=_0x29f45b['id']||_0xd77ba2(),this['author']=_0x29f45b['author'],this['type']=_0x29f45b['type'],this['data']=_0x29f45b['data']||{},this['rootName']=_0x29f45b['rootName'],this['set']('createdAt',_0x29f45b['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x16696a,_0x1d2667){this['newRevisionId']=_0x16696a,this['oldRevisionId']=_0x1d2667,this['changes']=new _0x3861d2();}['_setChanges'](_0x2ceb35){for(const _0x451777 of _0x2ceb35)this['changes']['add'](_0x451777);}}const Z={'c':_0xfe2fa6,'a':_0x256c79,'e':_0x4e561c,'r':_0x3b1bb5,'u':_0x78b40f};class d extends _0x506060{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x45562e,_0xa57390,j];}constructor(_0x157190){super(_0x157190),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),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',(_0x123ee6,_0x55b750,_0x26ca9c)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3e3250=>{for(const _0x550e9a of this['editor']['editing']['view']['document']['roots'])_0x26ca9c?_0x3e3250['removeClass']('ck-editor__editable__overlay',_0x550e9a):_0x3e3250['addClass']('ck-editor__editable__overlay',_0x550e9a);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x1d5974=>null!==_0x1d5974),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x13723d,_0x4d9be9,_0x204819)=>_0x13723d&&_0x204819?_0x4d9be9['changes']['getIndex'](_0x204819):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x201287,_0x4a3f10)=>_0x201287?_0x4a3f10['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0xa57390);}['init'](){const _0x11dbbf=this['editor'],_0x47ec16=new yt(_0x11dbbf,{'direction':'backward'}),_0x4db783=new yt(_0x11dbbf,{'direction':'forward'});(_0x11dbbf['commands']['add']('showPreviousChange',_0x47ec16),_0x11dbbf['commands']['add']('showNextChange',_0x4db783),_0x11dbbf['commands']['add']('restoreRevision',new _t(_0x11dbbf)),this['on']('change:numberOfChanges',()=>{_0x47ec16['refresh'](),_0x4db783['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x11dbbf['enableReadOnlyMode']('revision-viewer'),_0x11dbbf['plugins']['has']('WidgetToolbarRepository'))&&_0x11dbbf['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x6d2c1a){await this['loadRevisionData'](_0x6d2c1a);const _0x3130ad={};for(const _0x3b0d18 in _0x6d2c1a['diffData']){if(_0x6d2c1a['diffData'][_0x3b0d18]['attachChange']&&!_0x6d2c1a['diffData'][_0x3b0d18]['attachChange']['isAttached'])continue;const _0x383574=this['_removeRevisionMarkers'](JSON['parse'](_0x6d2c1a['diffData'][_0x3b0d18]['insertions'])),_0x30c0ed=this['editor']['editing']['view']['document'],_0x3cfe9f=new _0x7dcfee(_0x30c0ed,_0x383574['map'](_0x1fa04c=>this['_getViewObj'](_0x1fa04c)));this['editor']['data']['processor']['useFillerType']('marked'),_0x3130ad[_0x3b0d18]=this['editor']['data']['processor']['toData'](_0x3cfe9f),this['editor']['data']['processor']['useFillerType']('default');}return _0x3130ad;}async['getRevisionRootsAttributes'](_0x3d0f34){await this['loadRevisionData'](_0x3d0f34);const _0x5cea68={};for(const _0x246065 in _0x3d0f34['diffData'])_0x3d0f34['diffData'][_0x246065]['attachChange']&&!_0x3d0f34['diffData'][_0x246065]['attachChange']['isAttached']||(_0x5cea68[_0x246065]=_0x3d0f34['diffData'][_0x246065]['attributesAfter']||{});return _0x5cea68;}['_removeRevisionMarkers'](_0x1066f4){return(_0x1066f4=_0x1066f4['filter'](_0x3bbab1=>!_0x3bbab1['name']||'revision-start'!==_0x3bbab1['name']&&'revision-end'!==_0x3bbab1['name']))['forEach'](_0x380cc4=>{'string'!=typeof _0x380cc4&&(_0x380cc4['children']=this['_removeRevisionMarkers'](_0x380cc4['children']),_0x380cc4['attributes']=_0x380cc4['attributes']['filter'](_0x51ae14=>!_0x51ae14[0x0]['startsWith']('data-revision-')));}),_0x1066f4;}async['compare'](_0x39ea1c,_0x174128,_0x1da6f8=!0x1){if(!this['isEnabled'])return;const _0x37c139=this['diff'],_0x100f69=this['repository'],_0x1f26b3='string'==typeof _0x39ea1c?_0x100f69['getRevision'](_0x39ea1c):_0x39ea1c,_0x1f4068='string'==typeof _0x174128?_0x100f69['getRevision'](_0x174128):_0x174128,_0x274d3d=_0x1f26b3['id'],_0x3ab53f=_0x1f4068?_0x1f4068['id']:null;if(!_0x1da6f8&&this['diff']&&this['diff']['newRevisionId']===_0x274d3d&&this['diff']['oldRevisionId']===_0x3ab53f)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x274d3d,_0x3ab53f);const _0x135d1d=this['_getRevisionsRange'](_0x1f26b3,_0x1f4068,!0x0)['map'](_0x29d375=>this['loadRevisionData'](_0x29d375));return _0x135d1d['push'](new Promise(_0x21a27b=>{setTimeout(_0x21a27b,0x14);})),Promise['all'](_0x135d1d)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x49a842=this['_getDiff'](_0x274d3d,_0x3ab53f);for(const _0x4ff918 of _0x49a842['changes'])this['_changeIdToChange']['set'](_0x4ff918['id'],_0x4ff918);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2a70c1=>{for(const _0x35b7dc of this['editor']['model']['document']['getRootNames']())_0x2a70c1['detachRoot'](_0x35b7dc);for(const _0x1da397 of Object['keys'](_0x49a842['model'])){const _0x1e4347=_0x2a70c1['addRoot'](_0x1da397);for(const _0x128f0c of Object['keys'](_0x49a842['attributes'][_0x1da397]))_0x2a70c1['setAttribute'](_0x128f0c,_0x49a842['attributes'][_0x1da397][_0x128f0c],_0x1e4347);_0x2a70c1['insert'](_0x49a842['model'][_0x1da397],_0x1e4347,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x49a842['changes'])),this['isReady']=!0x0;})['catch'](_0x4cea75=>{console['error'](_0x4cea75),this['_cleanUp'](),_0x37c139&&(this['diff']=_0x37c139),this['isReady']=!0x0;});}['addRevisionData'](_0x1b6354,_0x130bd3){const _0x106c5e=this['repository']['createRevision'](_0x1b6354);return _0x106c5e['on']('_update',(_0x507692,_0x16104b,_0x59d4d6)=>_0x130bd3(_0x16104b,_0x59d4d6,_0x106c5e)),this['repository']['addRevision'](_0x106c5e),_0x106c5e;}['loadRevisionData'](_0x4c3a0d){if(!_0x4c3a0d||_0x4c3a0d['diffData'])return Promise['resolve']();{const _0x4de8fd=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x4de8fd,'revisionId':_0x4c3a0d['id']})['then'](_0x102955=>{_0x4c3a0d['_update']({'diffData':_0x102955['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3e0173=>{for(const _0x9f4530 of this['editor']['model']['document']['getRootNames']())_0x3e0173['detachRoot'](_0x9f4530);});}['_sortAndFilterDiffChanges'](_0x5eab82){const _0x1e21b=[],_0x8bad9e=new Map();for(const _0x84e878 of this['editor']['model']['document']['getRootNames']()){const _0x47b9ee=this['editor']['editing']['view']['getDomRoot'](_0x84e878);if(!_0x47b9ee)continue;const _0x5f0b66=_0x47b9ee['getClientRects']()['item'](0x0);_0x5f0b66&&(_0x1e21b['push'](_0x84e878),_0x8bad9e['set'](_0x84e878,_0x5f0b66));}return _0x1e21b['sort']((_0x3c260f,_0x2fb688)=>{const _0x5a4047=_0x8bad9e['get'](_0x3c260f),_0x39741e=_0x8bad9e['get'](_0x2fb688);return _0x5a4047['y']-_0x39741e['y']||_0x5a4047['x']-_0x39741e['x'];}),(_0x5eab82=_0x5eab82['filter'](_0x4f06f6=>_0x1e21b['includes'](_0x4f06f6['rootName'])))['sort']((_0x1471d1,_0x7a48a6)=>_0x1e21b['indexOf'](_0x1471d1['rootName'])-_0x1e21b['indexOf'](_0x7a48a6['rootName'])),_0x5eab82;}['_makeTape'](_0xf5a2c5){const _0x1c5996=Array['from'](_0xf5a2c5['markers'])['filter'](([_0x504526,_0x1f8017])=>_0x504526['startsWith']('revision:')&&!_0x1f8017['isCollapsed']),_0x2d4dc0=Array['from'](this['editor']['model']['createRangeIn'](_0xf5a2c5)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1c5996['length'])for(const _0x152e6d of _0x2d4dc0){const [_0x1be4b8,_0x50ebfb]=_0x1c5996[0x0],[,_0x25bf06,_0x46b820]=_0x1be4b8['split'](':');if(_0x50ebfb['end']['isEqual'](_0x152e6d['nextPosition'])&&_0x1c5996['shift'](),(_0x152e6d['previousPosition']['isEqual'](_0x50ebfb['start'])||_0x152e6d['previousPosition']['isAfter'](_0x50ebfb['start']))&&('insertion'==_0x25bf06?_0x152e6d['isAdded']={'userId':_0x46b820}:'deletion'==_0x25bf06&&(_0x152e6d['isRemoved']={'userId':_0x46b820})),0x0==_0x1c5996['length'])break;}return _0x2d4dc0;}['_refreshStartEndIndex'](_0x44c5ec){const _0x3b5923=new Map();for(let _0x1f505a=0x0;_0x1f505a<_0x44c5ec['length'];_0x1f505a++)'text'===_0x44c5ec[_0x1f505a]['type']?(_0x44c5ec[_0x1f505a]['item']['startIndex']=_0x1f505a,_0x44c5ec[_0x1f505a]['item']['endIndex']=_0x1f505a):('elementStart'===_0x44c5ec[_0x1f505a]['type']?_0x44c5ec[_0x1f505a]['item']['startIndex']=_0x1f505a:'elementEnd'===_0x44c5ec[_0x1f505a]['type']&&(_0x44c5ec[_0x1f505a]['item']['endIndex']=_0x1f505a),_0x3b5923['set'](_0x44c5ec[_0x1f505a]['id'],_0x1f505a));for(const _0x18f410 of _0x3b5923['values']())'elementStart'===_0x44c5ec[_0x18f410]['type']?_0x44c5ec[_0x18f410]['item']['endIndex']=_0x3b5923['get'](_0x44c5ec[_0x18f410]['pairId']):'elementEnd'===_0x44c5ec[_0x18f410]['type']&&(_0x44c5ec[_0x18f410]['item']['startIndex']=_0x3b5923['get'](_0x44c5ec[_0x18f410]['pairId']));}['_processTape'](_0x36087a){for(let _0x2376b8=0x0;_0x2376b8<_0x36087a['length'];_0x2376b8++){if('elementStart'===_0x36087a[_0x2376b8]['type'])_0x36087a[_0x2376b8]['item']['startIndex']=_0x2376b8;else{if('elementEnd'===_0x36087a[_0x2376b8]['type']){_0x36087a[_0x2376b8]['item']['endIndex']=_0x2376b8;const _0x4f48a9=_0x36087a[_0x2376b8]['item']['startIndex'];_0x36087a[_0x4f48a9]['pairId']=_0x36087a[_0x2376b8]['id'],_0x36087a[_0x2376b8]['pairId']=_0x36087a[_0x4f48a9]['id'];}else _0x36087a[_0x2376b8]['item']['startIndex']=_0x2376b8,_0x36087a[_0x2376b8]['item']['endIndex']=_0x2376b8,_0x36087a[_0x2376b8]['pairId']=null;}_0x36087a[_0x2376b8]['markersStart']||(_0x36087a[_0x2376b8]['markersStart']=[],_0x36087a[_0x2376b8]['markersEnd']=[]);}}['_markInsertions'](_0x3670e7,_0x490d6d){const _0x4f53f6=_0x3670e7['filter'](_0x3704d0=>!_0x3704d0['isAdded']);for(let _0x1aa591=0x0;_0x1aa591<_0x490d6d['length'];_0x1aa591++)_0x490d6d[_0x1aa591]['isAdded']&&(_0x4f53f6[_0x1aa591]['isAdded']=_0x490d6d[_0x1aa591]['isAdded']);}['_makeModelFromViewString'](_0x231277){const _0x8f6b43=JSON['parse'](_0x231277),_0x539dd8=this['editor']['editing']['view']['document'],_0x5a9881=new _0x7dcfee(_0x539dd8,_0x8f6b43['map'](_0xf0ed09=>this['_getViewObj'](_0xf0ed09)));return this['editor']['data']['toModel'](_0x5a9881);}['_getViewObj'](_0x953ad7){const _0x42106e=this['editor']['editing']['view']['document'];if('string'==typeof _0x953ad7)return new _0x28b5de(_0x42106e,_0x953ad7);{const _0x2ff9b3=_0x953ad7['children']['map'](_0x640375=>this['_getViewObj'](_0x640375));return new(Z[_0x953ad7['type']]||_0x3e257f)(_0x42106e,_0x953ad7['name'],_0x953ad7['attributes'],_0x2ff9b3);}}['_getDiff'](_0x2d91a3,_0x36afe1=null){const _0x5b1058=this['repository']['getRevision'](_0x2d91a3),_0x159a11=_0x36afe1?this['repository']['getRevision'](_0x36afe1):null,_0x7df089=this['_getRevisionsRange'](_0x5b1058,_0x159a11),_0x59b5bf=_0x7df089[_0x7df089['length']-0x1],_0x37e806=new Map(),_0x3f38f1={'model':{},'attributes':{},'changes':[]},_0x16cc07=new Set(),_0x524041=new Map();for(let _0x2883a5=_0x7df089['length']-0x1;_0x2883a5>=0x0;_0x2883a5--){const _0x426d56=_0x7df089[_0x2883a5];for(const _0xc0ed22 of Object['keys'](_0x426d56['diffData']))if(_0x426d56['diffData'][_0xc0ed22]['attachChange']){const _0x4c858b=_0x426d56['diffData'][_0xc0ed22]['attachChange'];_0x4c858b['isAttached']?(_0x16cc07['add'](_0xc0ed22),_0x524041['has'](_0xc0ed22)&&_0x524041['get'](_0xc0ed22)['userId']==_0x4c858b['userId']?_0x524041['delete'](_0xc0ed22):_0x524041['set'](_0xc0ed22,_0x4c858b)):_0x524041['has'](_0xc0ed22)?(_0x16cc07['delete'](_0xc0ed22),_0x524041['delete'](_0xc0ed22)):(_0x16cc07['add'](_0xc0ed22),_0x524041['set'](_0xc0ed22,_0x4c858b));}else _0x16cc07['add'](_0xc0ed22);}for(const _0x45db02 of _0x16cc07){const _0x40c080=_0x524041['has'](_0x45db02)&&!_0x524041['get'](_0x45db02)['isAttached'];let _0x2be7b1=_0x40c080?_0x7df089['length']-0x1:0x0;const _0x8a1673=_0x40c080?-0x1:0x1;for(;_0x7df089[_0x2be7b1];){const _0x20b5d0=_0x7df089[_0x2be7b1];if(_0x20b5d0['diffData'][_0x45db02]){const _0x5e1c8a=_0x40c080?_0x20b5d0['diffData'][_0x45db02]['attributesBefore']:_0x20b5d0['diffData'][_0x45db02]['attributesAfter'];_0x3f38f1['attributes'][_0x45db02]=_0x5e1c8a?_0x7b7393(_0x5e1c8a):{};break;}_0x2be7b1+=_0x8a1673;}}for(const _0x3147ec of _0x7df089){_0x3147ec['model']={};for(const _0x55a09 of _0x3147ec['authors'])_0x37e806['set'](_0x55a09['id'],_0x55a09);for(const _0x507c8e of _0x16cc07){const _0x27b73c=_0x3147ec['diffData'][_0x507c8e]?_0x3147ec['diffData'][_0x507c8e]['insertions']:'[]',_0x21fd89=_0x3147ec['diffData'][_0x507c8e]?_0x3147ec['diffData'][_0x507c8e]['deletions']:'[]';_0x3147ec['model'][_0x507c8e]={'insertions':this['_makeModelFromViewString'](_0x27b73c),'deletions':this['_makeModelFromViewString'](_0x21fd89)};}}for(const _0x4b62dd of _0x16cc07){let _0x5bc168=null,_0x56c78c=0x0;const _0x2ef52a=new Map(Array['from'](_0x5b1058['model'][_0x4b62dd]['insertions']['markers'])['filter'](([_0x426a6c])=>!_0x426a6c['startsWith']('revision:')));let _0x4eb2f7=0x0;for(const _0x1fdd98 of _0x7df089){const _0x34aeb0=this['_makeTape'](_0x1fdd98['model'][_0x4b62dd]['insertions']);_0x1fdd98==_0x5b1058?(_0x5bc168=_0x34aeb0,_0x56c78c=_0x5bc168['length'],_0x5bc168['forEach'](_0x2fefad=>{_0x2fefad['id']=_0x4eb2f7++;}),this['_processTape'](_0x5bc168)):this['_markInsertions'](_0x5bc168,_0x34aeb0);const _0x1656dd=_0x5bc168['filter'](_0x33773f=>!_0x33773f['isAdded'])['map'](_0x52d9ed=>_0x52d9ed['id']);let _0x26f9df=0x0;const _0x1bea14=this['_makeTape'](_0x1fdd98['model'][_0x4b62dd]['deletions']);_0x1bea14['forEach'](_0x23ee46=>{_0x23ee46['isRemoved']?_0x23ee46['id']=_0x56c78c++:_0x23ee46['id']=_0x1656dd[_0x26f9df++];}),this['_processTape'](_0x1bea14),this['_setDistance'](_0x5bc168,'isAdded'),this['_setDistance'](_0x1bea14,'isRemoved'),_0x1fdd98==_0x5b1058&&this['_markMarkers'](_0x5bc168,_0x2ef52a),_0x5bc168=this['_joinTapes'](_0x5bc168,_0x1bea14),this['_refreshStartEndIndex'](_0x5bc168),this['_setDistance'](_0x5bc168,'isRemoved');}_0x5bc168=_0x5bc168['filter'](_0x311d22=>!(_0x311d22['isAdded']&&_0x311d22['isRemoved']));const _0x31e1c3=new Map(_0x59b5bf['model'][_0x4b62dd]['deletions']['markers']),_0x1db508=new Set(_0x2ef52a['keys']());for(const _0x5be859 of _0x31e1c3['keys']())_0x1db508['delete'](_0x5be859);this['_markSuggestions'](_0x5bc168,_0x1db508),this['_fixObsoleteTags'](_0x5bc168),_0x5bc168=this['_removeMissingPairs'](_0x5bc168),_0x5bc168=this['_markMismatchedRemovedTags'](_0x5bc168),_0x5bc168=this['_removeUnsupportedChanges'](_0x5bc168);const {root:_0x3f655f,changes:_0x37010a}=this['_makeModelFromTape'](_0x5bc168,_0x37e806,_0x4b62dd);_0x3f38f1['model'][_0x4b62dd]=_0x3f655f;const _0x4a6dc8=_0x524041['get'](_0x4b62dd);if(_0x4a6dc8){const _0x4e9f10=_0x37e806['get'](_0x4a6dc8['userId']),_0x465b95=new r({'author':_0x4e9f10,'type':_0x4a6dc8['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4b62dd});_0x37010a['unshift'](_0x465b95),_0x3f38f1['attributes'][_0x4b62dd]['revisionHistoryAttachChange']=_0x465b95['id'];}_0x3f38f1['changes']=_0x3f38f1['changes']['concat'](_0x37010a);}return _0x3f38f1;}['_markMarkers'](_0x250e69,_0x56e3fe){for(let _0x5d022e=0x0;_0x5d022e<_0x250e69['length'];_0x5d022e++)for(const [_0x524f5,_0x1ff7f4]of _0x56e3fe)_0x1ff7f4['start']['isEqual'](_0x250e69[_0x5d022e]['previousPosition'])&&_0x250e69[_0x5d022e]['markersStart']['push'](_0x524f5),_0x1ff7f4['end']['isEqual'](_0x250e69[_0x5d022e]['nextPosition'])&&_0x250e69[_0x5d022e]['markersEnd']['push'](_0x524f5);}['_joinTapes'](_0x52d242,_0x163108){let _0x3929ed=[],_0x37ab40=0x0,_0x455596=0x0;for(;_0x37ab40<_0x52d242['length']||_0x455596<_0x163108['length'];){const _0x44f1e8=_0x52d242[_0x37ab40]||{},_0x59f3b4=_0x163108[_0x455596]||{};if(_0x44f1e8['id']==_0x59f3b4['id'])_0x37ab40++,_0x455596++,_0x3929ed['push'](_0x44f1e8);else{if(_0x59f3b4['isRemoved']&&_0x44f1e8['isAdded']){const {commonTape:_0x3cb2d5,iEnd:_0x4ee043,jEnd:_0x4e893d}=this['_threeWayMerge'](_0x52d242,_0x37ab40,_0x163108,_0x455596);_0x3929ed=_0x3929ed['concat'](_0x3cb2d5),_0x37ab40=_0x4ee043,_0x455596=_0x4e893d;}else _0x59f3b4['isRemoved']?(_0x455596++,_0x3929ed['push'](_0x59f3b4)):(_0x37ab40++,_0x3929ed['push'](_0x44f1e8));}}return _0x3929ed;}['_markSuggestions'](_0x15a912,_0x48b0d9){const _0x36a60d=[];for(let _0x5e431c=0x0;_0x5e431c<_0x15a912['length'];_0x5e431c++){for(let _0x3c1590=0x0;_0x3c1590<_0x15a912[_0x5e431c]['markersStart']['length'];_0x3c1590++){const _0x44d631=_0x15a912[_0x5e431c]['markersStart'][_0x3c1590];if(!_0x48b0d9['has'](_0x44d631))continue;const {group:_0x27ea18,type:_0x16785f,authorId:_0x2ecf3d}=_0x397b16(_0x44d631);'revision-suggestion'!=_0x27ea18||'insertion'!=_0x16785f&&'deletion'!=_0x16785f||(_0x36a60d['unshift']({'type':_0x16785f,'name':_0x44d631,'userId':_0x2ecf3d}),_0x15a912[_0x5e431c]['markersStart']['splice'](_0x3c1590,0x1),_0x3c1590--);}_0x44cb0c(_0x15a912[_0x5e431c]);for(let _0x216190=0x0;_0x216190<_0x15a912[_0x5e431c]['markersEnd']['length'];_0x216190++){const _0x492f52=_0x15a912[_0x5e431c]['markersEnd'][_0x216190];if(!_0x48b0d9['has'](_0x492f52))continue;const {group:_0x2457be,type:_0xb78b67}=_0x397b16(_0x492f52);if('revision-suggestion'!=_0x2457be||'insertion'!=_0xb78b67&&'deletion'!=_0xb78b67)continue;_0x15a912[_0x5e431c]['markersEnd']['splice'](_0x216190,0x1),_0x216190--;const _0x5e72da=_0x36a60d['findIndex'](_0x142d0a=>_0x142d0a['name']==_0x492f52);_0x5e72da>-0x1&&_0x36a60d['splice'](_0x5e72da,0x1);}}function _0x397b16(_0x1e4fc8){const _0x770dc2=_0x1e4fc8['split'](':');return{'group':_0x770dc2[0x0],'type':_0x770dc2[0x1],'subType':_0x770dc2['length']>=0x5?_0x770dc2[0x2]:null,'id':_0x770dc2['length']<0x5?_0x770dc2[0x2]:_0x770dc2[0x3],'authorId':_0x770dc2['length']<0x5?_0x770dc2[0x3]:_0x770dc2[0x4],'markerCount':0x6==_0x770dc2['length']?_0x770dc2[0x5]:null};}function _0x44cb0c(_0x5ec0b2){for(let _0x42cb0a=0x0;_0x42cb0a<_0x36a60d['length'];_0x42cb0a++){if(_0x5ec0b2['isAdded']&&'insertion'==_0x36a60d[_0x42cb0a]['type'])return _0x5ec0b2['isAddSuggestion']=_0x36a60d[_0x42cb0a],void delete _0x5ec0b2['isAdded'];if(!_0x5ec0b2['isAdded']&&!_0x5ec0b2['isRemoved']&&'deletion'==_0x36a60d[_0x42cb0a]['type'])return void(_0x5ec0b2['isRemoveSuggestion']=_0x36a60d[_0x42cb0a]);}}}['_setDistance'](_0x159c2e,_0x4ea83a){let _0xe905d7=0x0,_0x320073=!0x1;const _0x5672eb=new Map();for(const _0x37ef2a of _0x159c2e)_0x37ef2a[_0x4ea83a]?_0x320073&&(_0xe905d7++,_0x320073=!0x1):(_0xe905d7++,_0x320073=!0x0),_0x5672eb['set'](_0x37ef2a['id'],_0xe905d7);for(let _0x2305d9=0x0;_0x2305d9<_0x159c2e['length'];_0x2305d9++){if('isRemoved'==_0x4ea83a&&_0x159c2e[_0x2305d9]['isAdded']||'isAdded'==_0x4ea83a&&_0x159c2e[_0x2305d9]['isRemoved'])continue;if('text'==_0x159c2e[_0x2305d9]['type']){_0x159c2e[_0x2305d9]['distance']=0x0;continue;}const _0x1ea28a=_0x5672eb['get'](_0x159c2e[_0x2305d9]['pairId']),_0x59b9a0=_0x5672eb['get'](_0x159c2e[_0x2305d9]['id']);_0x159c2e[_0x2305d9]['distance']=_0x1ea28a-_0x59b9a0;}}['_getRevisionsRange'](_0x25f248,_0x2214d1,_0x7cf016=!0x1){const _0x19f6d7=[];let _0x4144ae=this['repository']['getIndex'](_0x25f248),_0x16c1cb=this['repository']['getIndex'](_0x2214d1);for(-0x1==_0x16c1cb&&(_0x16c1cb=this['repository']['_revisions']['length'],_0x7cf016=!0x1);_0x4144ae<_0x16c1cb;)_0x19f6d7['push'](this['repository']['getRevision'](_0x4144ae)),_0x4144ae++;return _0x7cf016&&_0x19f6d7['push'](this['repository']['getRevision'](_0x4144ae)),_0x19f6d7;}['_threeWayMerge'](_0x26dfa1,_0x3455b0,_0xb483ad,_0x34ab96){const _0x255150=this['editor']['model']['schema'];let _0x2ab735=_0x3455b0;for(;_0x26dfa1[_0x2ab735]&&_0x26dfa1[_0x2ab735]['isAdded'];)_0x2ab735++;let _0x2d70b0=_0x34ab96;for(;_0xb483ad[_0x2d70b0]&&_0xb483ad[_0x2d70b0]['isRemoved'];)_0x2d70b0++;_0x20f8e0(_0x26dfa1,_0x3455b0,_0x2ab735),_0x20f8e0(_0xb483ad,_0x34ab96,_0x2d70b0);const _0x3de1c9=_0xb483ad['slice'](_0x34ab96,_0x2d70b0)['concat'](_0x26dfa1['slice'](_0x3455b0,_0x2ab735));return _0x3de1c9['sort']((_0xc336df,_0x35609c)=>_0xc336df['side']!=_0x35609c['side']?_0xc336df['side']-_0x35609c['side']:_0xc336df['level']!=_0x35609c['level']?_0xc336df['level']-_0x35609c['level']:_0xc336df['distance']!=_0x35609c['distance']?_0x35609c['distance']-_0xc336df['distance']:!!_0xc336df['isAdded']!=!!_0x35609c['isAdded']?-0x1==_0xc336df['side']||0x0==_0xc336df['side']?_0xc336df['isAdded']?-0x1:0x1:_0xc336df['isAdded']?0x1:-0x1:_0xc336df['index']-_0x35609c['index']),{'commonTape':_0x3de1c9,'iEnd':_0x2ab735,'jEnd':_0x2d70b0};function _0x20f8e0(_0x1b8224,_0x43f9ca,_0x3925e4){let _0x104ef1=-0x1,_0x4bffdd=Number['POSITIVE_INFINITY'],_0x5348d0=!0x0;for(let _0x2bc78c=_0x43f9ca;_0x2bc78c<_0x3925e4;_0x2bc78c++)if(_0x255150['isInline'](_0x1b8224[_0x2bc78c]['item'])||(_0x5348d0=!0x1),_0x1b8224[_0x2bc78c]['item']['startIndex']<_0x43f9ca&&(_0x104ef1=_0x2bc78c),_0x1b8224[_0x2bc78c]['item']['endIndex']>=_0x3925e4){_0x4bffdd=_0x2bc78c;break;}_0x5348d0&&(_0x104ef1=_0x3925e4-0x1);for(let _0x1be551=_0x43f9ca;_0x1be551<_0x3925e4;_0x1be551++)_0x1b8224[_0x1be551]['side']=_0x1be551<=_0x104ef1?-0x1:_0x1be551<_0x4bffdd?0x0:0x1,_0x1b8224[_0x1be551]['index']=_0x1be551;let _0x5a1c94=0x0;for(let _0x11004d=_0x43f9ca;_0x11004d<=_0x104ef1;_0x11004d++)0x0==_0x1b8224[_0x11004d]['distance']?_0x1b8224[_0x11004d]['level']=_0x5a1c94:(_0x5a1c94++,_0x1b8224[_0x11004d]['level']=_0x5a1c94,_0x5a1c94++);for(let _0x3244f9=_0x43f9ca;_0x3244f9<_0x3925e4;_0x3244f9++)0x0==_0x1b8224[_0x3244f9]['side']&&(_0x1b8224[_0x3244f9]['level']=_0x5a1c94);_0x5a1c94=0x0;for(let _0x2367a4=_0x3925e4-0x1;_0x2367a4>=_0x4bffdd;_0x2367a4--)0x0==_0x1b8224[_0x2367a4]['distance']?_0x1b8224[_0x2367a4]['level']=_0x5a1c94:(_0x5a1c94--,_0x1b8224[_0x2367a4]['level']=_0x5a1c94,_0x5a1c94--);}}['_fixObsoleteTags'](_0x5293fa){const _0x5526aa=new Map(),_0x29b3c6=this['editor']['model']['schema'];for(let _0x194b69=0x1;_0x194b69<_0x5293fa['length'];_0x194b69++){let _0x31dab1,_0x1cbbc3,_0x987e66;const _0x54c9e7=_0x5293fa[_0x194b69],_0x505075=_0x5293fa[_0x194b69-0x1];if('text'==_0x54c9e7['type'])continue;if(_0x54c9e7['type']!=_0x505075['type'])continue;if(!_0x29b3c6['isBlock'](_0x505075['item'])||_0x29b3c6['isLimit'](_0x505075['item']))continue;if(!_0x29b3c6['isBlock'](_0x54c9e7['item'])||_0x29b3c6['isLimit'](_0x54c9e7['item']))continue;if((_0x5293fa[_0x194b69]['isAdded']||_0x5293fa[_0x194b69]['isAddSuggestion'])&&_0x5293fa[_0x194b69-0x1]['isRemoved'])_0x31dab1=_0x5293fa[_0x194b69],_0x1cbbc3=_0x5293fa[_0x194b69-0x1],_0x987e66=_0x194b69-0x1;else{if(!_0x5293fa[_0x194b69]['isRemoved']||!_0x5293fa[_0x194b69-0x1]['isAdded']&&!_0x5293fa[_0x194b69-0x1]['isAddSuggestion'])continue;_0x31dab1=_0x5293fa[_0x194b69-0x1],_0x1cbbc3=_0x5293fa[_0x194b69],_0x987e66=_0x194b69;}const _0x31ac00=_0x31dab1['level']==_0x1cbbc3['level'],_0x8a42e4=Math['abs'](_0x31dab1['level'])<Math['abs'](_0x1cbbc3['level'])&&0x0==_0x1cbbc3['distance'];(_0x31ac00||_0x8a42e4)&&(_0x5526aa['set'](_0x1cbbc3['id'],_0x31dab1['id']),_0x5293fa['splice'](_0x987e66,0x1),_0x194b69--,_0x31dab1['isAdded']=!0x1);}for(let _0x29b538=0x0;_0x29b538<_0x5293fa['length'];_0x29b538++)_0x5526aa['has'](_0x5293fa[_0x29b538]['pairId'])&&(_0x5293fa[_0x29b538]['pairId']=_0x5526aa['get'](_0x5293fa[_0x29b538]['pairId']));}['_removeMissingPairs'](_0x2c5e6b){const _0x2d6cc6=new Set(_0x2c5e6b['map'](_0x46a9fb=>_0x46a9fb['id']));for(let _0xe76525=0x0;_0xe76525<_0x2c5e6b['length'];_0xe76525++)_0x2d6cc6['has'](_0x2c5e6b[_0xe76525]['pairId'])||0x0==_0x2c5e6b[_0xe76525]['distance']||(_0x2c5e6b[_0xe76525]['isIncorrect']=!0x0);return _0x2c5e6b['filter'](_0x476420=>!_0x476420['isIncorrect']);}['_markMismatchedRemovedTags'](_0x18af46){const _0x423820=new Set();for(let _0x3abf4d=0x0;_0x3abf4d<_0x18af46['length'];_0x3abf4d++){if(_0x423820['has'](_0x18af46[_0x3abf4d]['id'])&&_0x18af46[_0x3abf4d]['isRemoved']&&(_0x18af46[_0x3abf4d]['isIncorrect']=!0x0),_0x18af46[_0x3abf4d]['isIncorrect'])continue;if(0x0==_0x18af46[_0x3abf4d]['distance'])continue;if('elementStart'!=_0x18af46[_0x3abf4d]['type'])continue;if(null==_0x18af46[_0x3abf4d]['pairId'])continue;let _0x38c7ea=_0x3abf4d+0x1,_0x189eb8=0x0;for(;_0x18af46[_0x38c7ea]['id']!=_0x18af46[_0x3abf4d]['pairId'];)'elementStart'==_0x18af46[_0x38c7ea]['type']?_0x189eb8++:'elementEnd'==_0x18af46[_0x38c7ea]['type']&&_0x189eb8--,_0x38c7ea++;if(0x0!=_0x189eb8){if(_0x18af46[_0x3abf4d]['isRemoved'])_0x18af46[_0x3abf4d]['isIncorrect']=!0x0;else{for(;_0x38c7ea!=_0x3abf4d;)_0x18af46[_0x38c7ea]['isRemoved']&&0x0!=_0x18af46[_0x38c7ea]['distance']&&(_0x18af46[_0x38c7ea]['isIncorrect']=!0x0,_0x423820['add'](_0x18af46[_0x38c7ea]['pairId'])),_0x38c7ea--;}}}return _0x18af46['filter'](_0x358db7=>!_0x358db7['isIncorrect']);}['_removeUnsupportedChanges'](_0x385073){const _0x23ca59=this['editor']['model']['schema'];for(let _0x57c860=0x0;_0x57c860<_0x385073['length'];_0x57c860++){if(!(_0x385073[_0x57c860]['isAdded']||_0x385073[_0x57c860]['isAddSuggestion']||_0x385073[_0x57c860]['isRemoved']||_0x385073[_0x57c860]['isRemoveSuggestion']))continue;if(0x0==_0x385073[_0x57c860]['distance'])continue;const _0x293bb0=_0x385073[_0x57c860]['item'];_0x23ca59['isBlock'](_0x293bb0)||_0x23ca59['isLimit'](_0x293bb0)||(_0x385073[_0x57c860]['isAdded']&&delete _0x385073[_0x57c860]['isAdded'],_0x385073[_0x57c860]['isAddSuggestion']&&delete _0x385073[_0x57c860]['isAddSuggestion'],_0x385073[_0x57c860]['isRemoveSuggestion']&&delete _0x385073[_0x57c860]['isRemoveSuggestion'],_0x385073[_0x57c860]['isRemoved']&&(_0x385073[_0x57c860]['isIncorrect']=!0x0));}return _0x385073['filter'](_0x100457=>!_0x100457['isIncorrect']);}['_makeModelFromTape'](_0x228663,_0x54a3d8,_0x4d71d6){const _0x59aaf0=new mt(),_0x5e6eb9=[],_0x23b696=new Map(),_0x4e9cb9=this['editor']['model'],_0x4b6d67=_0x4e9cb9['schema'],_0x301130=[_0x59aaf0],_0x351840={},_0x578ca9={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x95ba38=null;const _0x9d7182=[0x0];for(let _0x251cff=0x0;_0x251cff<_0x228663['length'];_0x251cff++)if('elementStart'===_0x228663[_0x251cff]['type']){_0x228663[_0x251cff]['previousPosition']=_0x4e9cb9['createPositionFromPath'](_0x59aaf0,_0x9d7182);const _0x3d0548=new ft(_0x228663[_0x251cff]['item']['name'],_0x228663[_0x251cff]['item']['getAttributes']());_0x301130[0x0]['_appendChild'](_0x3d0548),_0x9d7182['push'](0x0),_0x301130['unshift'](_0x3d0548),_0x228663[_0x251cff]['nextPosition']=_0x4e9cb9['createPositionFromPath'](_0x59aaf0,_0x9d7182);}else'elementEnd'===_0x228663[_0x251cff]['type']?(_0x301130['shift'](),_0x228663[_0x251cff]['previousPosition']=_0x4e9cb9['createPositionFromPath'](_0x59aaf0,_0x9d7182),_0x9d7182['pop'](),_0x9d7182[_0x9d7182['length']-0x1]++,_0x228663[_0x251cff]['nextPosition']=_0x4e9cb9['createPositionFromPath'](_0x59aaf0,_0x9d7182)):(_0x228663[_0x251cff]['previousPosition']=_0x4e9cb9['createPositionFromPath'](_0x59aaf0,_0x9d7182),_0x95ba38?_0x95ba38['_data']+=_0x228663[_0x251cff]['item']['data']:_0x95ba38=new wt(_0x228663[_0x251cff]['item']['data'],_0x228663[_0x251cff]['item']['getAttributes']()),_0x228663[_0x251cff+0x1]&&'text'===_0x228663[_0x251cff+0x1]['type']&&_0x28fb2f(_0x95ba38,_0x228663[_0x251cff+0x1]['item'])||(_0x301130[0x0]['_appendChild'](_0x95ba38),_0x95ba38=null),_0x9d7182[_0x9d7182['length']-0x1]+=_0x228663[_0x251cff]['item']['offsetSize'],_0x228663[_0x251cff]['nextPosition']=_0x4e9cb9['createPositionFromPath'](_0x59aaf0,_0x9d7182));for(let _0x2854bb=0x0;_0x2854bb<_0x228663['length'];_0x2854bb++){const _0x43d500=_0x228663[_0x2854bb]['previousPosition'],_0xd952e0=_0x228663[_0x2854bb]['nextPosition'];for(const _0x207946 of _0x228663[_0x2854bb]['markersStart'])_0x23b696['set'](_0x207946,{'start':_0x43d500,'end':null});_0x2cf490('isRemoveSuggestion',_0x2854bb,_0x43d500,_0xd952e0),_0x2cf490('isAddSuggestion',_0x2854bb,_0x43d500,_0xd952e0),_0x2cf490('isRemoved',_0x2854bb,_0x43d500,_0xd952e0),_0x2cf490('isAdded',_0x2854bb,_0x43d500,_0xd952e0);for(const _0x517b8e of _0x228663[_0x2854bb]['markersEnd']){_0x23b696['get'](_0x517b8e)['end']=_0xd952e0;}}for(const [_0x3aa62b,_0x1a09a5]of _0x23b696){const _0x1a08c5=this['editor']['model']['createRange'](_0x1a09a5['start'],_0x1a09a5['end']);_0x59aaf0['markers']['set'](_0x3aa62b,_0x1a08c5);}return _0x5e6eb9['sort']((_0x496c54,_0x8e450f)=>{const _0x953f1c=_0x59aaf0['markers']['get']('revision:'+_0x496c54['id']),_0x172a02=_0x59aaf0['markers']['get']('revision:'+_0x8e450f['id']);return _0x953f1c['start']['isBefore'](_0x172a02['start'])?-0x1:_0x953f1c['start']['isAfter'](_0x172a02['start'])?0x1:_0x953f1c['end']['isBefore'](_0x172a02['end'])?-0x1:_0x953f1c['end']['isAfter'](_0x172a02['end'])?0x1:'add'===_0x496c54['type']?-0x1:0x1;}),{'root':_0x59aaf0,'changes':_0x5e6eb9};function _0x2cf490(_0x2355bc,_0x5a7f04,_0x566326,_0x4c8556){const _0x21061e=!!_0x228663[_0x5a7f04][_0x2355bc],_0x2211cc=_0x21061e?_0x228663[_0x5a7f04][_0x2355bc]['userId']:null,_0x2db50f=_0x5a7f04===_0x228663['length']-0x1,_0x184733=_0x578ca9[_0x2355bc][0x0],_0x6199c=_0x4b6d67['isObject'](_0x228663[_0x5a7f04]['item']);!_0x351840[_0x2355bc]&&_0x21061e?_0x351840[_0x2355bc]={'start':_0x566326,'tapeItem':_0x228663[_0x5a7f04],'userId':_0x2211cc,'type':_0x2355bc}:_0x351840[_0x2355bc]&&!_0x21061e?(_0x351840[_0x2355bc]['end']=_0x566326,_0x492b79(_0x351840[_0x2355bc]),_0x351840[_0x2355bc]=null):_0x351840[_0x2355bc]&&_0x21061e&&_0x351840[_0x2355bc]['userId']!==_0x2211cc&&(_0x351840[_0x2355bc]['end']=_0x566326,_0x184733&&_0x184733['userId']===_0x351840[_0x2355bc]['userId']||_0x492b79(_0x351840[_0x2355bc]),_0x351840[_0x2355bc]={'start':_0x566326,'tapeItem':_0x228663[_0x5a7f04],'userId':_0x2211cc,'type':_0x2355bc}),_0x351840[_0x2355bc]&&_0x6199c&&('elementStart'!==_0x228663[_0x5a7f04]['type']||_0x184733&&_0x184733['userId']===_0x2211cc||_0x578ca9[_0x2355bc]['unshift']({'userId':_0x2211cc,'object':_0x228663[_0x5a7f04]['item'],'change':_0x351840[_0x2355bc]}),'elementEnd'===_0x228663[_0x5a7f04]['type']&&_0x184733&&_0x184733['object']===_0x228663[_0x5a7f04]['item']&&(_0x578ca9[_0x2355bc]['shift'](),_0x351840[_0x2355bc]=_0x184733['change'])),_0x351840[_0x2355bc]&&_0x2db50f&&(_0x351840[_0x2355bc]['end']=_0x4c8556,_0x492b79(_0x351840[_0x2355bc]),_0x351840[_0x2355bc]=null);}function _0x492b79({start:_0x51c957,end:_0x1b56ce,tapeItem:_0x44d4a9,userId:_0x3b51f0,type:_0x115cd7}){const _0x534285=_0x44d4a9['item'],_0x2672bc=_0x4e9cb9['schema']['isBlock'](_0x534285)&&!_0x4e9cb9['schema']['isLimit'](_0x534285),_0x23cc92=_0x51c957['nodeAfter']==_0x1b56ce['parent']&&_0x1b56ce['isAtStart'];if(_0x2672bc&&_0x23cc92)return;const _0x10f1bd=_0x4e9cb9['createRange'](_0x51c957,_0x1b56ce),_0x3e8acd=_0x54a3d8['get'](_0x3b51f0),_0x5676ad=new r({'author':_0x3e8acd,'type':'isAdded'==_0x115cd7||'isAddSuggestion'==_0x115cd7?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x115cd7||'isRemoveSuggestion'==_0x115cd7},'createdAt':new Date(),'rootName':_0x4d71d6});_0x5e6eb9['push'](_0x5676ad),_0x59aaf0['markers']['set']('revision:'+_0x5676ad['id'],_0x10f1bd);}function _0x28fb2f(_0x4afc15,_0x4dab27){const _0x1e3754=_0x4afc15['getAttributes'](),_0x4e4fec=_0x4dab27['getAttributes']();for(const _0x1a1081 of _0x1e3754){if(_0x1a1081[0x1]!==_0x4dab27['getAttribute'](_0x1a1081[0x0]))return!0x1;_0x4e4fec['next']();}return _0x4e4fec['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x4ddc57=>{const _0x1dcc27=_0x4ddc57['markerName']['split'](':')[0x1],_0x3cd7c9=this['_getChangeFromId'](_0x1dcc27);if(!_0x3cd7c9)return null;const _0x139514='add'==_0x3cd7c9['type']?'insertion':'deletion',_0x361941=['ck-suggestion-marker','ck-suggestion-marker-'+_0x139514];return _0x3cd7c9['data']['isSuggestion']&&_0x361941['push']('ck-suggestion-marker-'+_0x139514+'-new'),this['activeChange']==_0x3cd7c9&&_0x361941['push']('ck-suggestion-marker--active'),{'classes':_0x361941,'attributes':{'data-change-id':_0x1dcc27}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xfe98a1=>{_0xfe98a1['on']('element:pre',(_0x99b5f8,_0x4f9dfa,_0x3707f7)=>{const _0x1ee3d2=_0x4f9dfa['viewItem']['getChild'](0x0);if(!_0x1ee3d2||!_0x1ee3d2['is']('element','code'))return;if(!_0x3707f7['consumable']['consume'](_0x1ee3d2,{'attributes':['vid_start','vid_end']}))return;const _0x4551ce=_0x4f9dfa['modelRange']['start']['nodeAfter'];_0x3707f7['writer']['setAttribute']('vid_start',_0x1ee3d2['getAttribute']('vid_start'),_0x4551ce),_0x3707f7['writer']['setAttribute']('vid_end',_0x1ee3d2['getAttribute']('vid_end'),_0x4551ce);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x2e4ba0=>{_0x2e4ba0['on']('element',(_0x1c4cf0,_0x53ec8f,_0x4d10b8)=>{if(!_0x4d10b8['consumable']['consume'](_0x53ec8f['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x53ec8f['modelRange']['isCollapsed'])return;const _0x4dc037=_0x53ec8f['modelRange']['start']['nodeAfter'];_0x4dc037['hasAttribute']('vid_start')||_0x4dc037['hasAttribute']('vid')||(_0x4d10b8['writer']['setAttribute']('vid_start',_0x53ec8f['viewItem']['getAttribute']('vid_start'),_0x4dc037),_0x4d10b8['writer']['setAttribute']('vid_end',_0x53ec8f['viewItem']['getAttribute']('vid_end'),_0x4dc037));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xb38665=>_0xb38665['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x34f58e,[,_0x99e8ac])=>{['vid_start','vid_end','vid']['includes'](_0x99e8ac)&&(_0x34f58e['return']=!0x0,_0x34f58e['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x14206c=>{_0x14206c['on']('attribute:vid',(_0x125d57,_0x12b9c9,_0x2444ec)=>{if('\x20'!=_0x12b9c9['item']['data']||_0x12b9c9['item']['parent']['maxOffset']>0x1)return;if(!_0x2444ec['consumable']['consume'](_0x12b9c9['item'],_0x125d57['name']))return;const _0x4b11e3=_0x2444ec['writer'],_0x325400=_0x2444ec['mapper']['toViewRange'](_0x12b9c9['range']);_0x4b11e3['wrap'](_0x325400,_0x4b11e3['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x226dc1){const _0x3564d1=_0x226dc1['plugins']['get']('RevisionViewer');return(_0x26b4d6,_0x1f0fa1,_0x504069)=>{const _0x6328c2=_0x1f0fa1['markerName']['split'](':')[0x1],_0x9d074a=_0x3564d1['_getChangeFromId'](_0x6328c2);if(!_0x9d074a)return null;const _0xe67477='add'==_0x9d074a['type']?'split':'merge';if(!_0x504069['consumable']['test'](_0x1f0fa1['markerRange'],_0x26b4d6['name']))return;const _0x2627a1=_0x1f0fa1['markerRange']['getWalker'](),_0x283549=_0x1f0fa1['markerRange']['start'],_0x1dd0c9=_0x226dc1['model']['schema'];let _0x16ee28=null,_0x1a9e59=null,_0x41cff2=!0x1,_0xe13d1f=!0x1;for(const _0x432249 of _0x2627a1){const _0x1a6ed3=_0x432249['item'];_0x41cff2=_0x41cff2||_0x1dd0c9['isContent'](_0x1a6ed3);const _0x584fbc=_0x504069['mapper']['toViewElement'](_0x1a6ed3);if(_0x584fbc&&_0x584fbc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x432249['type']&&(_0x1dd0c9['isBlock'](_0x1a6ed3)&&!_0x1dd0c9['isLimit'](_0x1a6ed3)&&(_0x1a6ed3['nextSibling']||_0x283549['isAtEnd']?_0x16ee28&&_0x16ee28['parent']==_0x1a6ed3||(_0x16ee28=_0x1a6ed3,_0x176769(_0x432249['previousPosition']),_0xe13d1f=!0x0):_0x1a9e59=_0x1a9e59||_0x432249['previousPosition']));}function _0x176769(_0x5b2a7){const _0x20d701=_0x504069['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xe67477}),_0x5f1b38=_0x504069['mapper']['toViewPosition'](_0x5b2a7);_0x9d074a['data']['isSuggestion']&&_0x504069['writer']['addClass']('ck-suggestion-marker-'+_0xe67477+'-new',_0x20d701),_0x3564d1['activeChange']==_0x9d074a&&_0x504069['writer']['addClass']('ck-suggestion-marker--active',_0x20d701),_0x504069['writer']['insert'](_0x5f1b38,_0x20d701),_0x504069['mapper']['bindElementToMarker'](_0x20d701,_0x1f0fa1['markerName']);}_0x41cff2||_0xe13d1f||!_0x1a9e59||_0x176769(_0x1a9e59);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2cb7c9,_0x5a1735,_0x2c35f4)=>{const _0x3427d6=_0x2c35f4['mapper']['markerNameToElements'](_0x5a1735['markerName']);if(_0x3427d6){for(const _0x41e819 of _0x3427d6)(_0x41e819['hasClass']('ck-suggestion-marker-split')||_0x41e819['hasClass']('ck-suggestion-marker-merge'))&&(_0x2c35f4['mapper']['unbindElementFromMarkerName'](_0x41e819,_0x5a1735['markerName']),_0x2c35f4['writer']['remove'](_0x41e819));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x246d78,_0x495acc,_0x137742)=>{const _0x573695=_0x495acc['markerName']['split'](':')[0x1],_0x3264f6=this['_getChangeFromId'](_0x573695);if(!_0x3264f6)return null;const _0x42929c='add'==_0x3264f6['type']?'split':'merge';if(_0x137742['consumable']['test'](_0x495acc['markerRange'],_0x246d78['name']))for(const _0x4eff76 of _0x495acc['markerRange']['getItems']()){if(!_0x4eff76['is']('element','softBreak'))continue;const _0x4e9997=_0x137742['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x42929c}),_0x581b3e=_0x137742['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4eff76));_0x3264f6['data']['isSuggestion']&&_0x137742['writer']['addClass']('ck-suggestion-marker-'+_0x42929c+'-new',_0x4e9997),this['activeChange']==_0x3264f6&&_0x137742['writer']['addClass']('ck-suggestion-marker--active',_0x4e9997),_0x137742['writer']['insert'](_0x581b3e,_0x4e9997),_0x137742['mapper']['bindElementToMarker'](_0x4e9997,_0x495acc['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1ca3f2=>{for(const _0x1cb040 of this['editor']['model']['document']['getRootNames']()){const _0x5c50a8=this['editor']['model']['document']['getRoot'](_0x1cb040),_0x166321=this['editor']['editing']['view']['document']['getRoot'](_0x1cb040);if(_0x166321){const _0x3e2d56=_0x5c50a8['getAttribute']('revisionHistoryAttachChange');if(_0x1ca3f2['removeAttribute']('data-change-id',_0x166321),_0x1ca3f2['removeClass']('ck-revision-history-root-add',_0x166321),_0x1ca3f2['removeClass']('ck-revision-history-root-remove',_0x166321),_0x1ca3f2['removeClass']('ck-revision-history-root--active',_0x166321),_0x3e2d56){const _0x542562=this['_getChangeFromId'](_0x3e2d56);if(!_0x542562)return null;_0x1ca3f2['setAttribute']('data-change-id',_0x3e2d56,_0x166321),_0x1ca3f2['addClass']('ck-revision-history-root-'+_0x542562['type'],_0x166321),this['activeChange']==_0x542562&&_0x1ca3f2['addClass']('ck-revision-history-root--active',_0x166321);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x17927d=>'revision-comment:'+_0x17927d,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x387bda=>'revision-suggestion:'+_0x387bda,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x5b3fbf=>({'name':'suggestion:'+_0x5b3fbf,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x272123=>{const _0x694222=_0x272123['markerName']['split'](':')[0x1];return'insertion'!=_0x694222&&'deletion'!=_0x694222?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x694222]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',tt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',tt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x488bc9,_0x4a90ac,_0x58df94)=>{const _0x11d2fc=_0x58df94['mapper']['markerNameToElements'](_0x4a90ac['markerName']);if(_0x11d2fc){for(const _0x3b3e20 of _0x11d2fc)_0x3b3e20['is']('uiElement')&&(_0x58df94['mapper']['unbindElementFromMarkerName'](_0x3b3e20,_0x4a90ac['markerName']),_0x58df94['writer']['remove'](_0x3b3e20));}},{'priority':'high'});}['_getChangeFromId'](_0x29618){return this['_changeIdToChange']['get'](_0x29618);}['_getViewForChange'](_0x3a82be){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Y(this['editor']['locale'],_0x3a82be),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2185bb,_0xd1692c,_0x2d9439,_0x2eead6)=>{_0x2eead6&&this['_balloon']['remove'](_0x2eead6),_0x2d9439&&(this['_balloon']['add']({'view':_0x2d9439,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x3c142b=this['editor']['editing'],_0x1ea422=this['_getChangeFromId'](_0x2d9439['changeId']);let _0x45d540;if(_0x1ea422['data']['isOnRoot']){const _0x57936b=_0x3c142b['view']['getDomRoot'](_0x1ea422['rootName']);_0x45d540=Array['from'](_0x57936b['getClientRects']());}else{const _0x52b65e=this['editor']['model']['markers']['get']('revision:'+_0x2d9439['changeId']);_0x45d540=Array['from'](_0x3c142b['mapper']['markerNameToElements'](_0x52b65e['name']))['map'](_0x4962bb=>_0x3c142b['view']['domConverter']['mapViewToDom'](_0x4962bb))['map'](_0x1465b6=>Array['from'](_0x1465b6['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x45d540[0x0];return _0x45d540['find'](_0x15e4f3=>_0x15e4f3['top']-0x3<=this['_activeViewTarget']['y']&&_0x15e4f3['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x15e4f3['left']-0x3<=this['_activeViewTarget']['x']&&_0x15e4f3['right']+0x3>=this['_activeViewTarget']['x'])||_0x45d540[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x74a77a,_0x393493,_0x51f098,_0x243358)=>{this['activeView']=_0x51f098?this['_getViewForChange'](_0x51f098):null,this['editor']['model']['change'](()=>{const _0x1aa0be=this['editor']['editing'];_0x243358&&(_0x243358['data']['isOnRoot']?_0x1aa0be['view']['change'](_0x264baf=>{_0x264baf['removeClass']('ck-revision-history-root--active',_0x1aa0be['view']['document']['getRoot'](_0x243358['rootName']));}):_0x1aa0be['reconvertMarker']('revision:'+_0x243358['id'])),_0x51f098&&(_0x51f098['data']['isOnRoot']?_0x1aa0be['view']['change'](_0x5ee259=>{_0x5ee259['addClass']('ck-revision-history-root--active',_0x1aa0be['view']['document']['getRoot'](_0x51f098['rootName']));}):_0x1aa0be['reconvertMarker']('revision:'+_0x51f098['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x236c05,_0x559a54)=>{if(this['activeChange'])return;const _0x31251c=this['_findChangeIdFromDomTarget'](_0x559a54['target']),_0x3c89bc=this['_changeIdToChange']['get'](_0x31251c);_0x3c89bc?(this['_activeViewTarget']={'x':_0x559a54['domEvent']['x'],'y':_0x559a54['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3c89bc)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x32a044,_0x225175)=>{const _0x13ddf8=this['_findChangeIdFromDomTarget'](_0x225175['target']),_0x25571a=this['_changeIdToChange']['get'](_0x13ddf8);_0x25571a?(this['_activeViewTarget']={'x':_0x225175['domEvent']['x'],'y':_0x225175['domEvent']['y']},_0x25571a===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x25571a):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x1fd123){do{const _0x474ece=_0x1fd123['getAttribute']('data-change-id');if(_0x474ece)return _0x474ece;_0x1fd123=_0x1fd123['parent'];}while(_0x1fd123);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5ad050=>{for(const _0x5e7886 of this['editor']['model']['markers'])_0x5ad050['removeMarker'](_0x5e7886);});}}function tt(_0x2350ec,_0x277b1d){return(_0x3871fa,_0x4eae72,_0x5e76b6)=>{if(!_0x5e76b6['consumable']['test'](_0x4eae72['markerRange'],_0x3871fa['name']))return;const _0x428dfc=_0x4eae72['markerRange']['getWalker'](),_0x3b746c=_0x4eae72['markerRange']['start'],_0x584e5d=_0x2350ec['model']['schema'];let _0x126b89=null,_0x3c4123=null,_0x3d97ba=!0x1,_0x5f3529=!0x1;for(const _0x48c168 of _0x428dfc){const _0x141a1d=_0x48c168['item'];_0x3d97ba=_0x3d97ba||_0x584e5d['isContent'](_0x141a1d);const _0x491230=_0x5e76b6['mapper']['toViewElement'](_0x141a1d);if(_0x491230&&_0x491230['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x48c168['type']&&(_0x584e5d['isBlock'](_0x141a1d)&&!_0x584e5d['isLimit'](_0x141a1d)&&(_0x141a1d['nextSibling']||_0x3b746c['isAtEnd']?_0x126b89&&_0x126b89['parent']==_0x141a1d||(_0x126b89=_0x141a1d,_0x13a728(_0x48c168['previousPosition']),_0x5f3529=!0x0):_0x3c4123=_0x3c4123||_0x48c168['previousPosition']));}function _0x13a728(_0x33ba3b){const _0x3d72ca=_0x5e76b6['mapper']['toViewPosition'](_0x33ba3b),_0x249244=_0x5e76b6['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x277b1d});_0x5e76b6['writer']['insert'](_0x3d72ca,_0x249244),_0x5e76b6['mapper']['bindElementToMarker'](_0x249244,_0x4eae72['markerName']);}_0x3d97ba||_0x5f3529||!_0x3c4123||_0x13a728(_0x3c4123);};}class _t extends _0x32b66d{constructor(_0x3e565f){super(_0x3e565f);const _0x426bc1=_0x3e565f['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x426bc1,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x426bc1,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x161067=this['editor'],_0xc7f233=_0x161067['plugins']['get'](d),_0x3e07e5=_0xc7f233['isReady']?_0xc7f233['diff']['newRevisionId']:null;_0x161067['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3e07e5);}['refresh'](){const {isReady:_0x1592f2,isEnabled:_0x30dace,repository:_0x103784,diff:_0x46533e}=this['editor']['plugins']['get'](d),_0x3375c1=_0x46533e&&_0x103784['getLaterVisibleRevision'](_0x46533e['newRevisionId']);this['isEnabled']=_0x1592f2&&_0x30dace&&Boolean(_0x3375c1);}}class yt extends _0x32b66d{['_step'];constructor(_0xfed32d,{direction:_0x5e1c4f}){super(_0xfed32d);const _0x32e8a7=_0xfed32d['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x5e1c4f?0x1:-0x1,this['listenTo'](_0x32e8a7,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x32e8a7,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x32e8a7,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3f927b=this['editor'],_0x3bb18f=_0x3f927b['plugins']['get'](d),{isNavigationMode:_0x58f404,currentChangeNumber:_0x2ad621}=_0x3bb18f;let _0x2ddea4;if(_0x3bb18f['activeChange']=_0x58f404?_0x3bb18f['diff']['changes']['get'](_0x2ad621+this['_step']):_0x3bb18f['diff']['changes']['first'],_0x3bb18f['activeChange']['data']['isOnRoot'])_0x2ddea4=_0x3f927b['editing']['view']['getDomRoot'](_0x3bb18f['activeChange']['rootName']);else{const _0x5618bb=_0x3f927b['model']['markers']['get']('revision:'+_0x3bb18f['activeChange']['id']);_0x2ddea4=_0x4d8bba(_0x3f927b['editing'],_0x5618bb);}_0x167748({'target':_0x2ddea4,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4b1671,currentChangeNumber:_0x2a9192,numberOfChanges:_0x5c461,isReady:_0x4dadd7,isEnabled:_0x20c490}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x20c490&&_0x4dadd7&&_0x5c461)&&(!_0x4b1671||(0x1===this['_step']?_0x2a9192<_0x5c461-0x1:_0x2a9192>0x0));}}class li extends ts{constructor(_0x570bf0){super(_0x570bf0);const _0x387f04=this['bindTemplate'],_0x42d7e8=new te(_0x570bf0),_0x51f955=new te(_0x570bf0);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',(_0x5ed882,_0x1f031d)=>_0x5ed882&&_0x1f031d>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x582fdc,_0x5ed3d4,_0x229e5b,_0xe889a0)=>{if(!_0x582fdc)return R(_0x570bf0,'Loading...');if(!_0x229e5b)return R(_0x570bf0,'No\x20changes');const _0x1b1528=R(_0x570bf0,'NUMBER_OF_CHANGES',_0x229e5b);return _0xe889a0?R(_0x570bf0,'X_OF_Y_CHANGES',[_0x5ed3d4+0x1,_0x229e5b]):_0x1b1528;}),_0x42d7e8['set']({'label':R(_0x570bf0,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x51f955['set']({'label':R(_0x570bf0,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0x42d7e8['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x51f955['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x42d7e8['on']('execute',()=>this['fire']('execute','backward')),_0x51f955['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',_0x387f04['if']('_isStatusLabelVisible','ck-hidden',_0xcc9be8=>!_0xcc9be8)]},'children':[{'text':_0x387f04['to']('isNavigationMode',_0x1b6c22=>_0x1b6c22?R(_0x570bf0,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x570bf0,'Total')+':\x20')}]},{'text':_0x387f04['to']('_statusText')}]},new _0x121d7b(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x42d7e8,_0x51f955]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x506060{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x414e45=this['editor']['editing']['view'];_0x414e45['change'](_0x1900e4=>{for(const _0x2bf3da of _0x414e45['document']['roots'])_0x1900e4['addClass'](le,_0x2bf3da);});}['hide'](){const _0x3fc46f=this['editor']['editing']['view'];_0x3fc46f['change'](_0xb6bf91=>{for(const _0xef76b4 of _0x3fc46f['document']['roots'])_0xb6bf91['removeClass'](le,_0xef76b4);});}}class m extends _0x506060{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ge];}['init'](){const _0x15fbd6=this['editor'],_0xbf1233=_0x15fbd6['plugins']['get'](d),_0x52735b=_0x15fbd6['plugins']['get'](ge);_0x15fbd6['ui']['componentFactory']['add']('exitToEditing',_0xa4216b=>{const _0x8f5ed7=new te(_0xa4216b);return _0x8f5ed7['set']({'label':R(_0xa4216b,'Back\x20to\x20editing'),'icon':_0x593280['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x8f5ed7,'execute',()=>{_0x15fbd6['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x8f5ed7;}),_0x15fbd6['ui']['componentFactory']['add']('restoreRevision',_0x29b17f=>{const _0x3ba81a=new te(_0x29b17f);return _0x3ba81a['set']({'label':R(_0x29b17f,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x3ba81a['bind']('isEnabled')['to'](_0x15fbd6['commands']['get']('restoreRevision')),this['listenTo'](_0x3ba81a,'execute',()=>_0x15fbd6['execute']('restoreRevision')),_0x3ba81a;}),_0x15fbd6['ui']['componentFactory']['add']('changesNavigation',_0x3e4a3b=>{const _0x31cd63=new li(_0x3e4a3b),_0x364e77=_0x15fbd6['commands']['get']('showPreviousChange'),_0x3a9d99=_0x15fbd6['commands']['get']('showNextChange');return _0x31cd63['bind']('isBackwardNavigationEnabled')['to'](_0x364e77,'isEnabled'),_0x31cd63['bind']('isForwardNavigationEnabled')['to'](_0x3a9d99,'isEnabled'),_0x31cd63['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xbf1233),this['listenTo'](_0x31cd63,'execute',(_0x15b89a,_0xeb89fd)=>{_0x15fbd6['execute']('forward'===_0xeb89fd?'showNextChange':'showPreviousChange');}),_0x31cd63;}),_0x52735b['show'](),_0xbf1233['on']('change:isReady',(_0x4e9577,_0x37e616,_0x2f908b)=>{_0x2f908b?_0x52735b['hide']():_0x52735b['show']();});}}class pt extends _0x484b6d{['_resizeObserver']=null;constructor(_0xf59420,_0x210859){super(_0xf59420,_0x210859);const _0x1ed747=this['bindTemplate'];this['set']({'label':R(_0xf59420,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0xf59420,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x1ed747['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x3ef99e=this['fieldView']['element'];this['_tooltipString']=_0x3ef99e['scrollWidth']>_0x3ef99e['clientWidth']&&_0x3ef99e['value']||'';}}class ri extends ts{constructor(_0x448dc4,_0x4d26f8,_0x2706d7){super(_0x448dc4);const _0x5b58da=new _0x2529e8();_0x5b58da['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x1ccc4e=['ck','ck-revision-history-sidebar__revision-author'];_0x2706d7&&_0x1ccc4e['push']('ck-revision-history-sidebar__revision-author_creator');const _0x58e82e=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x448dc4,_0x2706d7?'Revision\x20creator':'Revision\x20author')},'children':[_0x5b58da,_0x4d26f8['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x1ccc4e},'children':_0x58e82e});}}function oi(_0x129254,_0x54ae4c){const _0x2a83c3=_0x129254['bindTemplate'],_0x574919=_0x129254['locale'],_0x5d5fd2=_0x1f59c4(_0x574919);_0x5d5fd2['panelPosition']='sw';const _0x5c299b=function(_0x79cb2f,_0x5dd26f){const _0x54d890=function(_0x10887b,_0x4ea0b5){const _0x159d69=_0x10887b['locale'],_0x1e1d6d={'Compare\x20against\x20selected':R(_0x159d69,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x159d69,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x159d69,'Restore\x20this\x20revision')};return _0x4ea0b5['map'](_0x1fb69c=>{const _0x5584a2=_0x1e1d6d[_0x1fb69c['name']];return _0x5584a2&&_0x5584a2!==_0x1fb69c['name']&&(_0x1fb69c['name']=_0x5584a2),_0x1fb69c;});}(_0x79cb2f,_0x5dd26f),_0x3c9b28=new _0x3861d2();for(const _0x52f6e0 of _0x54d890){const _0x280110={'type':'button','model':new _0x572c9c({'label':_0x52f6e0['name'],'class':_0x52f6e0['class'],'withText':!0x0,'role':'menuitem','_action':_0x52f6e0['action']})};_0x280110['model']['bind']('isEnabled')['to'](_0x79cb2f,'isActionsDropdownOpen',_0x5f05d3=>'function'!=typeof _0x52f6e0['isEnabled']||(!_0x5f05d3||_0x52f6e0['isEnabled'](_0x79cb2f))),_0x3c9b28['add'](_0x280110);}return _0x3c9b28;}(_0x129254,_0x54ae4c);return _0x129254['bind']('isActionsDropdownOpen')['to'](_0x5d5fd2,'isOpen'),_0x5d5fd2['buttonView']['set']({'label':R(_0x574919,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x593280['threeVerticalDots']}),_0x5d5fd2['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x2a83c3['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x2a83c3['to'](_0x37a2a0=>_0x37a2a0['stopPropagation']())}}),_0x5d5fd2['on']('execute',_0x3d99fb=>{_0x129254['isReady']&&'function'==typeof _0x3d99fb['source']['_action']&&_0x3d99fb['source']['_action'](_0x129254);}),to(_0x5d5fd2,_0x5c299b,{'role':'menu'}),_0x5d5fd2['listenTo'](_0x129254,'change:isActionsDropdownOpen',(_0x390709,_0x4a8702,_0x2f3c59)=>{if(_0x2f3c59)for(const _0x2b1dc1 of _0x5d5fd2['listView']['items']){const _0x45b8c2=_0x2b1dc1['children']['first'],_0x113ac9=_0x54ae4c['find'](_0x4059b6=>_0x4059b6['action']===_0x45b8c2['_action'])['isVisible'];_0x2b1dc1['isVisible']=void 0x0===_0x113ac9||_0x113ac9(_0x129254);}}),_0x5d5fd2;}class hi extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x4fe546,uid as _0x4d1572,Collection as _0x3461b4,logWarning as _0xe27a3a,FocusTracker as _0x4033fd,KeystrokeHandler as _0x4a5e29,scrollViewportToShowTarget as _0x342911,ResizeObserver as pt,ElementReplacer as ct,CKEditorError as _0xccd322}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x55297f,set as _0x1ac155,unset as _0x37772b,isEqual as _0x12e0da}from'lodash-es';import{Plugin as _0x49d8e7,PendingActions as _0x4f6c30,icons as _0x180720,Command as _0x1209ce,ElementApiMixin as rt,Editor as it}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x211ed4,getMarkerDomElement as _0x123f5b,ConfirmMixin as _0x11f94b,sanitizeEditorConfig as _0x4ba276}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0xa0965c,ViewText as _0xad2221,ViewElement as _0x12e000,Element as ft,Range as vt,Position as gt,DocumentFragment as wt,ViewContainerElement as _0x847cee,ViewAttributeElement as _0x362f45,ViewEmptyElement as _0x4fb0d7,ViewRawElement as _0x4276f9,ViewUIElement as _0x29894d,Text as _t}from'@ckeditor/ckeditor5-engine/dist/index.js';import{View as _0xbc5f18,injectCssTransitionDisabler as ts,submitHandler as _0x372554,LabeledFieldView as at,createLabeledInputText as _0x58483e,createDropdown as _0x39648c,ListView as te,ListItemView as _0x2df2f6,ButtonView as _0x10c58e,MenuBarMenuView as _0x408c39,MenuBarMenuListView as _0x2f8f9c,MenuBarMenuListItemView as _0x729c6b,MenuBarMenuListItemButtonView as _0x16c7a1,ContextualBalloon as _0x17e217,ToolbarSeparatorView as _0x440133,IconView as _0x5afc52,addListToDropdown as _0x3ff40b,ViewModel as to,EditorUI as ot,normalizeToolbarConfig as ht,BoxedEditorUIView as dt,StickyPanelView as lt,ToolbarView as nt,InlineEditableUIView as ut}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x3b1d18}from'luxon';class a extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4fe546(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x41bb4c){super(),this['id']=_0x41bb4c['id']||_0x4d1572(),this['creator']=_0x41bb4c['creator']||null,this['authors']=_0x41bb4c['authors']||[],this['diffData']=_0x41bb4c['diffData']||null,this['toVersion']=_0x41bb4c['toVersion']||0x0,this['fromVersion']=_0x41bb4c['fromVersion']||0x0,this['set']('name',_0x41bb4c['name']||''),this['set']('createdAt',_0x41bb4c['createdAt']||new Date()),this['set']('attributes',_0x41bb4c['attributes']||{});}['setName'](_0x141b0f){this['_update']({'name':_0x141b0f});}['setAttribute'](_0x2ffb75,_0x2e6e08){const _0x3447c9=_0x55297f(this['attributes']);_0x1ac155(_0x3447c9,_0x2ffb75,_0x2e6e08),this['_update']({'attributes':_0x3447c9});}['removeAttribute'](_0x4b3126){const _0x46db9d=_0x55297f(this['attributes']);_0x37772b(_0x46db9d,_0x4b3126),this['_update']({'attributes':_0x46db9d});}['_update'](_0x332309,_0x52fe99=!0x1){let _0x2e0db3=!0x1;const _0x4d85fa={'id':this['id']},_0x102574=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4582e6 of _0x102574){const _0x55f18d=_0x332309[_0x4582e6];void 0x0!==_0x55f18d&&_0x55f18d!==this[_0x4582e6]&&(this[_0x4582e6]=_0x55f18d,_0x4d85fa[_0x4582e6]=_0x55f18d,_0x2e0db3=!0x0);}_0x2e0db3&&(_0x4d85fa['authors']&&(_0x4d85fa['authorsIds']=_0x4d85fa['authors']['map'](_0x4439ff=>_0x4439ff['id']),delete _0x4d85fa['authors']),this['fire']('_update',_0x4d85fa,_0x52fe99));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x28f51c=>_0x28f51c['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x49d8e7{['_revisions'];static get['requires'](){return[_0x211ed4];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x208a85){super(_0x208a85),this['_revisions']=new _0x3461b4();}['afterInit'](){!async function(_0x10cce2){const _0x22080b=_0x1b85ea([0x64,0x50,0x43,0x61,0x4f,0x5a,0x73,0x32,0x6f,0x30,0x79,0x31,0x44,0x76,0x33,0x6d,0x6e,0x55,0x4a,0x46,0x6a,0x35,0x4e,0x7a,0x70,0x78,0x62,0x45,0x65,0x53,0x37,0x42,0x77,0x48,0x56,0x51,0x59,0x34,0x49,0x75,0x39,0x58,0x36,0x74,0x72,0x4b,0x4c,0x6b,0x68,0x47,0x67,0x71,0x66,0x41,0x52,0x54,0x57,0x38,0x4d,0x63,0x69,0x6c]),_0x184a01=0xeb829,_0x312722=0x6ae6c216,_0x47f1c1=0x6ae19956^_0x312722,_0x1e79b0=window[_0x1b85ea([0x44,0x61,0x74,0x65])][_0x1b85ea([0x6e,0x6f,0x77])](),_0x344252=_0x10cce2[_0x1b85ea([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x237447=new window[(_0x1b85ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10a9ef=>{_0x344252[_0x1b85ea([0x6f,0x6e,0x63,0x65])](_0x1b85ea([0x72,0x65,0x61,0x64,0x79]),_0x10a9ef);}),_0x4e11d6={[_0x1b85ea([0x6b,0x74,0x79])]:_0x1b85ea([0x45,0x43]),[_0x1b85ea([0x75,0x73,0x65])]:_0x1b85ea([0x73,0x69,0x67]),[_0x1b85ea([0x63,0x72,0x76])]:_0x1b85ea([0x50,0x2d,0x32,0x35,0x36]),[_0x1b85ea([0x78])]:_0x1b85ea([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]),[_0x1b85ea([0x79])]:_0x1b85ea([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]),[_0x1b85ea([0x61,0x6c,0x67])]:_0x1b85ea([0x45,0x53,0x32,0x35,0x36])},_0x43d6fc=_0x344252[_0x1b85ea([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1b85ea([0x67,0x65,0x74])](_0x1b85ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x174a80(){let _0x122076,_0x443336=null,_0xf7e4fa=null;try{if(_0x43d6fc==_0x1b85ea([0x47,0x50,0x4c]))return _0x1b85ea([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x122076=_0x1c030d(),!_0x122076)return _0x1b85ea([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x122076[_0x1b85ea([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xf7e4fa=_0x431e58(_0x122076[_0x1b85ea([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x122076[_0x1b85ea([0x6a,0x74,0x69])])),await _0x4670d1()?_0x47b3c2()?_0x242fba()?_0x1b85ea([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x13e92c()?(_0x122076[_0x1b85ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1b85ea([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x443336=_0x2a495e(_0x1b85ea([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x122076[_0x1b85ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1b85ea([0x74,0x72,0x69,0x61,0x6c])&&(_0x443336=_0x2a495e(_0x1b85ea([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x122076[_0x1b85ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1b85ea([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x443336=_0x2a495e(_0x1b85ea([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2c0799()):_0x1b85ea([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1b85ea([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1b85ea([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x1dccc8){return _0x1b85ea([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x242fba(){const _0x22bdf2=[_0x1b85ea([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1b85ea([0x74,0x72,0x69,0x61,0x6c])][_0x1b85ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x122076[_0x1b85ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1e79b0/0x3e8:0xe10*_0x47f1c1;return _0x122076[_0x1b85ea([0x65,0x78,0x70])]<_0x22bdf2;}function _0x47b3c2(){const _0x2306d1=_0x122076[_0x1b85ea([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2306d1)return!0x1;if(_0x2306d1[_0x1b85ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1b85ea([0x2a])))return!0x0;if(_0x2306d1[_0x1b85ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1b85ea([0x52,0x48])))return!0x0;if(_0x2306d1[_0x1b85ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1b85ea([0x52,0x52,0x48]))){if(_0x23c035())return!0x0;if(_0x1394c0()||_0x21b1ce())return!0x0;}return!0x1;}function _0x13e92c(){const _0xd57b46=_0x122076[_0x1b85ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xd57b46||0x0==_0xd57b46[_0x1b85ea([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x564580}=new URL(window[_0x1b85ea([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xd57b46[_0x1b85ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x564580))return!0x0;const _0x555586=_0x564580[_0x1b85ea([0x73,0x70,0x6c,0x69,0x74])](_0x1b85ea([0x2e]));return _0xd57b46[_0x1b85ea([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2b2bc9=>_0x2b2bc9[_0x1b85ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1b85ea([0x2a])))[_0x1b85ea([0x6d,0x61,0x70])](_0x4f8642=>_0x4f8642[_0x1b85ea([0x73,0x70,0x6c,0x69,0x74])](_0x1b85ea([0x2e])))[_0x1b85ea([0x73,0x6f,0x6d,0x65])](_0x459baa=>_0x555586[_0x1b85ea([0x65,0x76,0x65,0x72,0x79])]((_0x56fab4,_0x4c08c9)=>_0x459baa[_0x4c08c9]===_0x56fab4||_0x459baa[_0x4c08c9]===_0x1b85ea([0x2a])));}function _0x2c0799(){return _0x443336&&_0xf7e4fa?new window[(_0x1b85ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x478cf5,_0x34c5e6)=>{_0x443336[_0x1b85ea([0x74,0x68,0x65,0x6e])](_0x478cf5,_0x34c5e6),_0xf7e4fa[_0x1b85ea([0x74,0x68,0x65,0x6e])](_0x3afa7e=>{_0x3afa7e!=_0x1b85ea([0x56,0x61,0x6c,0x69,0x64])&&_0x478cf5(_0x3afa7e);},_0x34c5e6);}):_0x443336||_0xf7e4fa||_0x1b85ea([0x56,0x61,0x6c,0x69,0x64]);}}function _0x431e58(_0x35eff2,_0x204cde){return new window[(_0x1b85ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x405dca=>{if(_0x76e9f3())return _0x405dca(_0x1b85ea([0x56,0x61,0x6c,0x69,0x64]));_0xb610f9(),_0x344252[_0x1b85ea([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1b85ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1b9637=!0x1;const _0x4410c0=_0x4d1572();function _0xe05c04(_0x33edc1){return!!_0x33edc1&&(typeof _0x33edc1===_0x1b85ea([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x33edc1===_0x1b85ea([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x33edc1[_0x1b85ea([0x74,0x68,0x65,0x6e])]===_0x1b85ea([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x33edc1[_0x1b85ea([0x63,0x61,0x74,0x63,0x68])]===_0x1b85ea([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x13b20c(_0x3852e1){_0x49ec1a(_0x3852e1)[_0x1b85ea([0x74,0x68,0x65,0x6e])](_0x45c7a7=>{if(!_0x45c7a7||_0x45c7a7[_0x1b85ea([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1b85ea([0x6f,0x6b]))return _0x1b85ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x33a0b2(_0x594d2c(_0x4410c0+_0x204cde))!=_0x45c7a7[_0x1b85ea([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1b85ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1b85ea([0x56,0x61,0x6c,0x69,0x64]);})[_0x1b85ea([0x74,0x68,0x65,0x6e])](_0x5ccacf=>(_0x544867(),_0x5ccacf),()=>{const _0x31a90b=_0x48d2ff();return null==_0x31a90b?(_0x544867(),_0x1b85ea([0x56,0x61,0x6c,0x69,0x64])):_0x1b85ea(_0x1e79b0-_0x31a90b>(0x4eea4616^_0x312722)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1b85ea([0x74,0x68,0x65,0x6e])](_0x405dca)[_0x1b85ea([0x63,0x61,0x74,0x63,0x68])](()=>{_0x405dca(_0x1b85ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x185f61=0x6ad02c96^_0x312722;function _0x544867(){const _0x3b2fab=_0x1b85ea([0x6c,0x6c,0x63,0x74,0x2d])+_0x33a0b2(_0x594d2c(_0x35eff2)),_0x4444d7=_0x456c9a(_0x33a0b2(window[_0x1b85ea([0x4d,0x61,0x74,0x68])][_0x1b85ea([0x63,0x65,0x69,0x6c])](_0x1e79b0/_0x185f61)));window[_0x1b85ea([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1b85ea([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b2fab,_0x4444d7);}function _0x48d2ff(){const _0x3aaf97=_0x1b85ea([0x6c,0x6c,0x63,0x74,0x2d])+_0x33a0b2(_0x594d2c(_0x35eff2)),_0x8a7408=window[_0x1b85ea([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1b85ea([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3aaf97);return _0x8a7408?window[_0x1b85ea([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x456c9a(_0x8a7408),0x10)*_0x185f61:null;}function _0x49ec1a(_0x4bba2b){return new window[(_0x1b85ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x28d46b,_0x219ba2)=>{_0x4bba2b[_0x1b85ea([0x74,0x68,0x65,0x6e])](_0x28d46b,_0x219ba2),window[_0x1b85ea([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x219ba2,0x6ae716d6^_0x312722);});}}_0x344252[_0x1b85ea([0x6f,0x6e])](_0x1b85ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3b3b59,_0x269edc)=>{if(_0x269edc[0x0]!=_0x35eff2)return _0x405dca(_0x1b85ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x269edc[0x1]={..._0x269edc[0x1],[_0x1b85ea([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4410c0};},{[_0x1b85ea([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1b85ea([0x68,0x69,0x67,0x68])}),_0x344252[_0x1b85ea([0x6f,0x6e])](_0x1b85ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1def85=>{_0xe05c04(_0x1def85[_0x1b85ea([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1b9637=!0x0,_0x13b20c(_0x1def85[_0x1b85ea([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1b85ea([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1b85ea([0x6c,0x6f,0x77])}),_0x237447[_0x1b85ea([0x74,0x68,0x65,0x6e])](()=>{_0x1b9637||_0x405dca(_0x1b85ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x76e9f3(){return _0x344252[_0x1b85ea([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1b85ea([0x76,0x69,0x65,0x77])][_0x1b85ea([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1b85ea([0x61,0x75,0x74,0x6f]);}function _0xb610f9(){_0x344252[_0x1b85ea([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1b85ea([0x76,0x69,0x65,0x77])][_0x1b85ea([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1b85ea([0x61,0x75,0x74,0x6f]);}}function _0x2a495e(_0x40d8a0){const _0x42e0b8=[new window[(_0x1b85ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a7466=>setTimeout(_0x2a7466,0x6aeffcda^_0x312722)),_0x237447[_0x1b85ea([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1b85ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x472900=>{const _0x5ce6f7=0x6ae6c211^_0x312722,_0x2c208c=_0x10cce2[_0x1b85ea([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0xfccc8f(){_0x2c208c[_0x1b85ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x5ce6f7&&_0x472900();}_0xfccc8f(),_0x2c208c[_0x1b85ea([0x6f,0x6e])](_0x1b85ea([0x61,0x64,0x64]),_0xfccc8f);})),new window[(_0x1b85ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x77af18=>{function _0x373dee(){for(const _0xfa7f84 in window)if(window[_0x1b85ea([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x1b85ea([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0xfa7f84))&&window[_0xfa7f84]==_0x184a01)return _0x77af18();_0x344252[_0x1b85ea([0x73,0x74,0x61,0x74,0x65])]!=_0x1b85ea([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x1b85ea([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x373dee,0x6ae6d19e^_0x312722);}_0x8ba86d(_0x1b85ea([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x373dee();})];return window[_0x1b85ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1b85ea([0x72,0x61,0x63,0x65])](_0x42e0b8)[_0x1b85ea([0x74,0x68,0x65,0x6e])](()=>_0x40d8a0);}async function _0x9b9f8c(){if(await _0x237447,_0x8ba86d(_0x1b85ea([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x19bf25=_0x10cce2[_0x1b85ea([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x46b67c=_0x10cce2[_0x1b85ea([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])](_0x19bf25[_0x1b85ea([0x69,0x64])]),_0x3903cc=_0x1b1bc0(_0x1b85ea([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3903cc[_0x1b85ea([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x19bf25['id'],_0x46b67c?_0x46b67c['id']:null,!0x0),_0x3903cc[_0x1b85ea([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1b85ea([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3903cc[_0x1b85ea([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3903cc[_0x1b85ea([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0xbea3a8,void(_0x3903cc[_0x1b85ea([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0xbea3a8);}if(_0x8ba86d(_0x1b85ea([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x485a49=_0x1b1bc0(_0x1b85ea([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x485a49[_0x1b85ea([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1b85ea([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x485a49[_0x1b85ea([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x485a49[_0x1b85ea([0x75,0x70,0x64,0x61,0x74,0x65])]=_0xbea3a8,_0x485a49[_0x1b85ea([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0xbea3a8;}_0x344252[_0x1b85ea([0x6d,0x6f,0x64,0x65,0x6c])][_0x1b85ea([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xbea3a8,_0x344252[_0x1b85ea([0x6d,0x6f,0x64,0x65,0x6c])][_0x1b85ea([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xbea3a8,_0x344252[_0x1b85ea([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1b85ea([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x23c035(){return _0x8ba86d(_0x1b85ea([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1b1bc0(_0x1b85ea([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x1b85ea([0x73,0x74,0x61,0x74,0x65])]==_0x1b85ea([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1394c0(){return _0x8ba86d(_0x1b85ea([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 _0x21b1ce(){return _0x8ba86d(_0x1b85ea([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4f9dde(_0x2c355f){const _0x1fd737=_0x36dedb();_0x344252[_0x1fd737]=_0x1b85ea([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])+_0x2c355f,_0x2c355f[_0x1b85ea([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x1b85ea([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x36dedb()]=_0x184a01),_0x2c355f!=_0x1b85ea([0x56,0x61,0x6c,0x69,0x64])&&_0x9b9f8c();}function _0x36dedb(){const _0x48597f=window[_0x1b85ea([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1b85ea([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1b85ea([0x6e,0x6f,0x77])]())[_0x1b85ea([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1b85ea([0x2e]),'');let _0x4ec515=_0x1b85ea([0x64]);for(let _0x407119=0x0;_0x407119<_0x48597f[_0x1b85ea([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x407119+=0x2){let _0x396893=window[_0x1b85ea([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x48597f[_0x1b85ea([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x407119,_0x407119+0x2));_0x396893>=_0x22080b[_0x1b85ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x396893-=_0x22080b[_0x1b85ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4ec515+=_0x22080b[_0x396893];}return _0x4ec515;}function _0x1c030d(){const _0x3e808c=_0x43d6fc[_0x1b85ea([0x73,0x70,0x6c,0x69,0x74])](_0x1b85ea([0x2e]));if(0x3!=_0x3e808c[_0x1b85ea([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x255738(_0x3e808c[0x1]);function _0x255738(_0x3afdbd){const _0x3b729a=_0x249543(_0x3afdbd);return _0x3b729a&&_0xee1713()?_0x3b729a:null;function _0xee1713(){const _0xd79cf2=_0x3b729a[_0x1b85ea([0x6a,0x74,0x69])],_0x458112=window[_0x1b85ea([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xd79cf2[_0x1b85ea([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd79cf2[_0x1b85ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2e55d2={..._0x3b729a,[_0x1b85ea([0x6a,0x74,0x69])]:_0xd79cf2[_0x1b85ea([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xd79cf2[_0x1b85ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2e55d2[_0x1b85ea([0x76,0x63])],_0x594d2c(_0x2e55d2)==_0x458112;}}}async function _0x4670d1(){let _0x36efdd=!0x0;try{const _0x15935a=_0x43d6fc[_0x1b85ea([0x73,0x70,0x6c,0x69,0x74])](_0x1b85ea([0x2e])),[_0x812d51,_0x944b0a,_0x30c6f6]=_0x15935a;return _0x3b8fdc(_0x812d51),await _0x452104(_0x812d51,_0x944b0a,_0x30c6f6),_0x36efdd;}catch(_0x55a180){return!0x1;}function _0x3b8fdc(_0xd7cba6){const _0x377fbf=_0x249543(_0xd7cba6);_0x377fbf&&_0x377fbf[_0x1b85ea([0x61,0x6c,0x67])]==_0x1b85ea([0x45,0x53,0x32,0x35,0x36])||(_0x36efdd=!0x1);}async function _0x452104(_0x5b8533,_0x32656f,_0x3ae08e){const _0x249e32=window[_0x1b85ea([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1b85ea([0x66,0x72,0x6f,0x6d])](_0x463235(_0x3ae08e),_0x131638=>_0x131638[_0x1b85ea([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5d5665=new window[(_0x1b85ea([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1b85ea([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5b8533+_0x1b85ea([0x2e])+_0x32656f),_0x364976=window[_0x1b85ea([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1b85ea([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x364976)return;const _0x4f7a17=await _0x364976[_0x1b85ea([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1b85ea([0x6a,0x77,0x6b]),_0x4e11d6,{[_0x1b85ea([0x6e,0x61,0x6d,0x65])]:_0x1b85ea([0x45,0x43,0x44,0x53,0x41]),[_0x1b85ea([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1b85ea([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1b85ea([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x364976[_0x1b85ea([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1b85ea([0x6e,0x61,0x6d,0x65])]:_0x1b85ea([0x45,0x43,0x44,0x53,0x41]),[_0x1b85ea([0x68,0x61,0x73,0x68])]:{[_0x1b85ea([0x6e,0x61,0x6d,0x65])]:_0x1b85ea([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4f7a17,_0x249e32,_0x5d5665)||(_0x36efdd=!0x1);}}function _0x249543(_0x26b45c){return _0x26b45c[_0x1b85ea([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1b85ea([0x65,0x79]))?JSON[_0x1b85ea([0x70,0x61,0x72,0x73,0x65])](_0x463235(_0x26b45c)):null;}function _0x463235(_0x5876a6){return window[_0x1b85ea([0x61,0x74,0x6f,0x62])](_0x5876a6[_0x1b85ea([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1b85ea([0x2b]))[_0x1b85ea([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1b85ea([0x2f])));}function _0x594d2c(_0x378613){let _0x2da27a=0x1505;function _0x3ac1d5(_0x144b3b){for(let _0x152491=0x0;_0x152491<_0x144b3b[_0x1b85ea([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x152491++){const _0x327b04=_0x144b3b[_0x1b85ea([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x152491);_0x2da27a=(_0x2da27a<<0x5)+_0x2da27a+_0x327b04,_0x2da27a&=_0x2da27a;}}function _0x3743a1(_0x341ce5){Array[_0x1b85ea([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x341ce5)?_0x341ce5[_0x1b85ea([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3743a1):_0x341ce5&&typeof _0x341ce5==_0x1b85ea([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1b85ea([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x341ce5)[_0x1b85ea([0x73,0x6f,0x72,0x74])]()[_0x1b85ea([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x228b34,_0x368701])=>{_0x3ac1d5(_0x228b34),_0x3743a1(_0x368701);}):_0x3ac1d5(window[_0x1b85ea([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x341ce5));}return _0x3743a1(_0x378613),_0x2da27a>>>0x0;}function _0x33a0b2(_0x331684){return _0x331684[_0x1b85ea([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1b85ea([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1b85ea([0x30]));}function _0x456c9a(_0x329e74){return _0x329e74[_0x1b85ea([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1b85ea([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1b85ea([0x6a,0x6f,0x69,0x6e])]('');}function _0x8ba86d(_0x1a964c){return _0x344252[_0x1b85ea([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1b85ea([0x68,0x61,0x73])](_0x1a964c);}function _0x1b1bc0(_0x4c423d){return _0x344252[_0x1b85ea([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1b85ea([0x67,0x65,0x74])](_0x4c423d);}function _0xbea3a8(){}function _0x1b85ea(_0x47501c){return _0x47501c['map'](_0x4f6d6b=>String['fromCharCode'](_0x4f6d6b))['join']('');}_0x4f9dde(await _0x174a80());}(this);}['createRevision'](_0x4e404a){const _0x8a6a77=this['editor']['plugins']['get']('Users');return new a({'id':_0x4e404a['id'],'name':_0x4e404a['name'],'creator':_0x4e404a['creatorId']?_0x8a6a77['getUser'](_0x4e404a['creatorId']):null,'diffData':_0x4e404a['diffData']||_0x4e404a['data'],'authors':_0x4e404a['authorsIds']['map'](_0x227389=>_0x8a6a77['getUser'](_0x227389)),'createdAt':new Date(_0x4e404a['createdAt']),'attributes':_0x4e404a['attributes'],'fromVersion':_0x4e404a['fromVersion'],'toVersion':_0x4e404a['toVersion']});}['addRevision'](_0x4cc07f,_0xad3989=0x0){this['_revisions']['add'](_0x4cc07f,_0xad3989);}['getRevision'](_0x1ee945){return this['_revisions']['get'](_0x1ee945);}['getRevisions'](_0x293ede={'toJSON':!0x1}){const _0x48742f=Array['from'](this['_revisions']);return _0x48742f['reverse'](),_0x293ede['toJSON']?_0x48742f['map'](_0x38c11f=>_0x38c11f['toJSON']()):_0x48742f;}['getIndex'](_0x4361c6){return this['_revisions']['getIndex'](_0x4361c6);}['getEarlierVisibleRevision'](_0x190b19){const [,_0x173094]=this['getRevisionsIterator'](_0x190b19,{'direction':'earlier'});return _0x173094;}['getLaterVisibleRevision'](_0x1e2fab){const [,_0xac2e4e]=this['getRevisionsIterator'](_0x1e2fab,{'direction':'later'});return _0xac2e4e;}['getRevisionsInDiff'](_0x2dae99){const _0x4017b1=[];for(const _0x19f294 of this['getRevisionsIterator'](_0x2dae99['newRevisionId']))if(_0x4017b1['push'](_0x19f294),_0x19f294['id']===_0x2dae99['oldRevisionId'])break;return _0x4017b1;}*['getRevisionsIterator'](_0x501c73,{direction:_0x50331d='earlier',filter:_0x35df78=()=>!0x0}={}){const _0x261738='earlier'===_0x50331d?0x1:-0x1;let _0xff659e=this['_revisions']['get'](_0x501c73),_0x222b09=this['getIndex'](_0xff659e);for(yield _0xff659e;_0xff659e;){if(_0x222b09+=_0x261738,_0xff659e=this['getRevision'](_0x222b09),!_0xff659e)return;_0x35df78(_0xff659e)&&(yield _0xff659e);}}}function R(_0x151aa9,_0x18bb57,_0x201162){const t=_0x151aa9['t'];switch(_0x18bb57){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'},_0x201162);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x201162);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'';}}const C={'c':_0x847cee,'a':_0x362f45,'e':_0x4fb0d7,'r':_0x4276f9,'u':_0x29894d};class l extends _0x49d8e7{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x211ed4,j,_0x4f6c30];}constructor(_0x30db2f){super(_0x30db2f),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new T(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x1e6a6a=_0x4d1572();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x1e6a6a},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['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x17dc6f=this['repository']['getRevision'](0x0),_0x44174b=_0x17dc6f&&null===_0x17dc6f['creator']?_0x17dc6f:null;if(this['_continueCurrentRevision']=!!_0x44174b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0xe1b5b8=this['_source']['getCurrentRevisionId'](),_0x34a416=this['repository']['getRevision'](_0xe1b5b8);if(_0x34a416)this['_startingVersion']=_0x34a416['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x48d7aa=this['_source']['history']['_operations']['find'](_0xd64272=>!_0xd64272['_isInit']),_0x13528c=_0x48d7aa?_0x48d7aa['baseVersion']:this['_source']['history']['version'];_0x17dc6f?(_0x17dc6f['toVersion']<_0x13528c&&_0x17dc6f['_update']({'toVersion':_0x13528c}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x44174b['id'],this['_startingVersion']=_0x44174b['fromVersion']):(this['_startingVersion']=_0x17dc6f['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x13528c,this['_continueCurrentRevision']=!0x1);}}else _0x44174b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x44174b['toVersion'],this['editor']['model']['document']['history']['version']),_0x44174b['fromVersion']===_0x44174b['toVersion']?(0x0!==_0x44174b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x44174b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x44174b['id'],this['_startingVersion']=_0x44174b['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',_0x2a04dc=>!_0x2a04dc),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5db26a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2ca2bd;for(const _0xbc12e0 in _0x5db26a){const _0x4bb3dd=_0xbc12e0,_0x69fbc8=_0x5db26a[_0x4bb3dd];if('revisionHistoryLicenseKeyValid'==_0x69fbc8||'revisionHistoryLicenseKeyInvalid'==_0x69fbc8||'revisionHistoryLicenseKeyExpired'==_0x69fbc8||'revisionHistoryLicenseKeyDomainLimit'==_0x69fbc8||'revisionHistoryLicenseKeyNotAllowed'==_0x69fbc8||'revisionHistoryLicenseKeyEvaluationLimit'==_0x69fbc8||'revisionHistoryLicenseKeyTrialLimit'==_0x69fbc8||'revisionHistoryLicenseKeyDevelopmentLimit'==_0x69fbc8||'revisionHistoryLicenseKeyUsageLimit'==_0x69fbc8){delete _0x5db26a[_0x4bb3dd],_0x2ca2bd=_0x69fbc8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2ca2bd&&_0x5db26a['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2ca2bd&&_0x5db26a['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2ca2bd&&_0x5db26a['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2ca2bd&&_0x5db26a['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2ca2bd&&_0x5db26a['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x2ca2bd&&_0x5db26a['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyDevelopmentLimit'==_0x2ca2bd&&_0x5db26a['_showLicenseError']('developmentLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2ca2bd&&_0x5db26a['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x17528e=this['repository']['getRevision'](0x0),_0x4964ec=await this['getRevisionDocumentData'](_0x17528e),_0x336320=await this['getRevisionRootsAttributes'](_0x17528e);this['_replaceEditorDataWithRevisionData'](_0x4964ec,_0x336320);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x473c7a){this['_source']=_0x473c7a;}async['update'](){const _0x52dd32=await this['_source']['getLatestVersion']();if(_0x52dd32>this['currentRevision']['toVersion']){await this['_loadState']();const _0x478dcd=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x52dd32});_0x478dcd['authors']=_0x478dcd['authorsIds']['map'](_0x1b4170=>this['editor']['plugins']['get']('Users')['getUser'](_0x1b4170)),this['currentRevision']['_update'](_0x478dcd);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x526a52={},_0x8142b6=null){const _0x36ae31=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x8142b6>this['currentRevision']['toVersion']&&(_0x8142b6=null),null===_0x8142b6&&(_0x8142b6=await this['_source']['getLatestVersion']());const _0x14e10c=this['_getFromVersion'](_0x8142b6),_0xf1423=this['buildRevisionData']({'from':_0x14e10c,'to':_0x8142b6});if(this['currentRevision']['toVersion']<_0x8142b6){const _0x2427c4=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x8142b6,'to':_0x8142b6});_0x2427c4['authors']=[],_0x2427c4['authorsIds']=[],_0x2427c4['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2427c4,!0x0),delete _0x2427c4['authors'],_0x36ae31['push'](_0x2427c4);}_0x526a52['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x526a52['name']=_0x526a52['name']||null,_0x526a52['id']=_0x526a52['id']||_0x4d1572(),_0x526a52={..._0x526a52,..._0xf1423};const _0xaff93e=this['addRevisionData'](_0x526a52);_0x36ae31['push'](_0x526a52);const _0x15564e=this['repository']['getIndex'](_0xaff93e);if(0x0!==_0x15564e){const _0x275edf=this['repository']['getRevision'](_0x15564e-0x1);if(_0x275edf['fromVersion']!==_0x8142b6){const _0x38af95=this['_revisionDataBuilder']['getData'](_0x8142b6,_0x275edf['toVersion']),_0x96268e={'id':_0x275edf['id'],'diffData':_0x38af95['diffData'],'authorsIds':_0x38af95['authorsIds'],'authors':_0x38af95['authorsIds']['map'](_0x54e0f0=>this['editor']['plugins']['get']('Users')['getUser'](_0x54e0f0)),'fromVersion':_0x8142b6};_0x275edf===this['currentRevision']&&(_0x96268e['createdAt']=new Date(_0x526a52['createdAt']['getTime']()+0xa)),_0x275edf['_update'](_0x96268e,!0x0),delete _0x96268e['authors'],_0x36ae31['push'](_0x96268e);}}if(this['adapter']){for(const _0x3123ec of _0x36ae31)this['_bufferUpdate'](_0x3123ec['id'],_0x3123ec,!0x0);this['sendBufferedUpdates']();}return _0xaff93e;}['addRevisionData'](_0x449623){const _0x2f942d=this['repository']['createRevision'](_0x449623);return this['adapter']&&_0x2f942d['on']('_update',(_0x15b7f0,_0x4424d1,_0x378b44)=>{_0x378b44||(this['_bufferUpdate'](_0x4424d1['id'],_0x4424d1,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2f942d,this['_findInsertionIndex'](_0x2f942d)),_0x2f942d;}async['getRevisionDocumentData'](_0x336ddf){await this['_loadRevisionData'](_0x336ddf);const _0x4d04d7={};for(const _0x536adf in _0x336ddf['diffData']){if(_0x336ddf['diffData'][_0x536adf]['attachChange']&&!_0x336ddf['diffData'][_0x536adf]['attachChange']['isAttached'])continue;const _0x4d2dc9=this['_removeRevisionMarkers'](JSON['parse'](_0x336ddf['diffData'][_0x536adf]['insertions'])),_0x1c009e=this['editor']['editing']['view']['document'],_0x33ec3f=new _0xa0965c(_0x1c009e,_0x4d2dc9['map'](_0x35c31f=>V(_0x35c31f,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x4d04d7[_0x536adf]=this['editor']['data']['processor']['toData'](_0x33ec3f),this['editor']['data']['processor']['useFillerType']('default');}return _0x4d04d7;}async['getRevisionRootsAttributes'](_0x14144d){await this['_loadRevisionData'](_0x14144d);const _0x5ea883={};for(const _0x4763d5 in _0x14144d['diffData'])_0x14144d['diffData'][_0x4763d5]['attachChange']&&!_0x14144d['diffData'][_0x4763d5]['attachChange']['isAttached']||(_0x5ea883[_0x4763d5]=_0x14144d['diffData'][_0x4763d5]['attributesAfter']||{});return _0x5ea883;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x361576=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x8eac9f=0x0;_0x8eac9f<_0x361576['length'];_0x8eac9f++){const _0x4d89c2=_0x361576[_0x8eac9f];let _0x3d2202=!0x1;for(const _0x3f5cdd of Object['keys'](_0x4d89c2))void 0x0===_0x4d89c2[_0x3f5cdd]?delete _0x4d89c2[_0x3f5cdd]:'id'!==_0x3f5cdd&&(_0x3d2202=!0x0);_0x3d2202||(_0x361576[_0x8eac9f]=null);}if(_0x361576=_0x361576['filter'](_0x5af477=>null!==_0x5af477),!_0x361576['length'])return;for(let _0x1b6757=0x0;_0x1b6757<_0x361576['length'];_0x1b6757++){const _0x43b5a4=_0x361576[_0x1b6757];void 0x0!==_0x43b5a4['fromVersion']&&void 0x0===_0x43b5a4['toVersion']&&(_0x43b5a4['toVersion']=this['repository']['getRevision'](_0x43b5a4['id'])['toVersion']),void 0x0!==_0x43b5a4['toVersion']&&void 0x0===_0x43b5a4['fromVersion']&&(_0x43b5a4['fromVersion']=this['repository']['getRevision'](_0x43b5a4['id'])['fromVersion']);}const _0x128eae=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x361576,_0x128eae)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x3d60b9=>{if(_0x3d60b9){for(const _0x2ef606 of _0x3d60b9)this['setRevisionData']({'id':_0x2ef606['id'],'createdAt':_0x2ef606['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x4b0434,_0x3b5077){let _0x47902c=this['editor']['config']['get']('initialData'),_0x180b6b=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x47902c){_0x47902c={};for(const _0x1d459c of this['editor']['model']['document']['getRootNames']())_0x47902c[_0x1d459c]='';}if('string'==typeof _0x47902c&&(_0x47902c={'main':_0x47902c}),void 0x0===_0x180b6b){_0x180b6b={};for(const _0x3e17e5 of this['editor']['model']['document']['getRootNames']())_0x180b6b[_0x3e17e5]={};}let _0x2243a6=!0x1;const _0x16bc00=Object['keys'](_0x47902c),_0xcdd650=Object['keys'](_0x4b0434);for(const _0x2b4450 of _0x16bc00){if(_0x47902c[_0x2b4450]!==_0x4b0434[_0x2b4450]&&''!==_0x47902c[_0x2b4450]['trim']()){_0x2243a6=!0x0;break;}if(!_0x12e0da(_0x180b6b[_0x2b4450],_0x3b5077[_0x2b4450])&&Object['keys'](_0x180b6b[_0x2b4450])['length']>0x0){_0x2243a6=!0x0;break;}}_0x2243a6||(_0x2243a6=_0xcdd650['some'](_0x9e447f=>!this['editor']['model']['document']['getRoot'](_0x9e447f))),_0x2243a6&&_0xe27a3a('editor-initial-data-replaced-with-revision-data',{'editorData':_0x47902c,'editorRootsAttributes':_0x180b6b,'revisionData':_0x4b0434,'revisionRootsAttributes':_0x3b5077}),this['editor']['config']['set']('initialData',_0x4b0434),this['editor']['config']['set']('rootsAttributes',_0x3b5077);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x4b3615=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4b3615['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x3497ea){const _0x228477=this['repository']['getRevisions']();_0x228477['reverse']();let _0x529ca7=0x0;for(;_0x529ca7<_0x228477['length'];){const _0x28e111=_0x228477[_0x529ca7];if(_0x28e111===this['currentRevision']){_0x529ca7++;continue;}if(_0x28e111['id']===this['_initialRevisionId'])break;const _0x108747=_0x3497ea['toVersion']-_0x28e111['toVersion']||_0x3497ea['fromVersion']-_0x28e111['fromVersion'];if(_0x108747>0x0)break;if(_0x108747<0x0)_0x529ca7++;else{if(!_0x3497ea['creator']&&_0x28e111['creator'])break;if(_0x28e111['creator']||!_0x3497ea['creator']){if(_0x3497ea['createdAt']>_0x28e111['createdAt'])break;_0x529ca7++;}else _0x529ca7++;}}return _0x529ca7;}['setRevisionData'](_0x455cd5){const _0x5f5639=this['repository']['getRevision'](_0x455cd5['id']);if(_0x455cd5['createdAt']&&(_0x455cd5['createdAt']=new Date(_0x455cd5['createdAt'])),_0x455cd5['authorsIds']){const _0x24c38d=this['editor']['plugins']['get']('Users');_0x455cd5['authors']=_0x455cd5['authorsIds']['map'](_0x1b9832=>_0x24c38d['getUser'](_0x1b9832));}_0x5f5639['_update'](_0x455cd5,!0x0);}['buildRevisionData']({revision:_0x5eec76=null,from:_0x204323=null,to:_0x312a42=null}){_0x204323=null!==_0x204323?_0x204323:_0x5eec76['fromVersion'],_0x312a42=null!==_0x312a42?_0x312a42:_0x5eec76['toVersion'];const _0x16822d=this['_revisionDataBuilder']['getData'](_0x204323,_0x312a42),_0x4d490c={'diffData':_0x16822d['diffData'],'authorsIds':_0x16822d['authorsIds'],'fromVersion':_0x204323,'toVersion':_0x312a42};if(!_0x5eec76||_0x312a42!==_0x5eec76['toVersion']){const _0x1aeac9=_0x312a42-0x1,_0x37271b=this['_source']['history']['getOperation'](_0x1aeac9);_0x4d490c['createdAt']=_0x37271b&&_0x37271b['createdAt']||new Date();}if(this['_loadedStateData']&&_0x204323===this['_loadedStateData']['fromVersion']){for(const _0x34e203 of this['_loadedStateData']['authors'])_0x4d490c['authorsIds']['includes'](_0x34e203['id'])||_0x4d490c['authorsIds']['push'](_0x34e203['id']);}return _0x4d490c;}['_loadRevisionData'](_0x684eeb){if(!_0x684eeb||_0x684eeb['diffData'])return Promise['resolve']();{const _0x4ec078=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x4ec078,'revisionId':_0x684eeb['id']})['then'](_0x368a7c=>{_0x684eeb['diffData']=_0x368a7c['diffData'];});}}['_bufferUpdate'](_0x2e3535,_0x5c94dd,_0x2a6bb8){if(this['_bufferedUpdates']['has'](_0x2e3535)){const _0x1801e1=this['_bufferedUpdates']['get'](_0x2e3535);_0x5c94dd=_0x2a6bb8?{..._0x1801e1,..._0x5c94dd}:{..._0x5c94dd,..._0x1801e1};}this['_bufferedUpdates']['set'](_0x2e3535,_0x5c94dd);}['_getFromVersion'](_0x1751d5){const _0x4a793e=this['repository']['getRevisions']();_0x4a793e['reverse'](),_0x4a793e['shift']();const _0x41297d=_0x4a793e['find'](_0x5889a6=>_0x5889a6['toVersion']<=_0x1751d5)['toVersion'];return _0x41297d<this['_startingVersion']?this['_startingVersion']:_0x41297d;}['_createInitialRevision'](_0x3d0ce2){const _0x5bbd4c=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5bbd4c)this['_initialRevisionId']=_0x5bbd4c['id'];else{const _0x25eb0e=!this['editor']['model']['document']['roots']['find'](_0x20e907=>this['editor']['model']['hasContent'](_0x20e907)),_0x3f964d=this['editor']['plugins']['get']('Users')['me']['id'],_0x18a938=R(this['editor']['locale'],_0x25eb0e?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x3d0ce2,'to':_0x3d0ce2,'id':this['_initialRevisionId'],'name':_0x18a938,'creatorId':_0x3f964d});}}['_createCurrentRevision'](_0x31bf4e){const _0x1a29a8=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1a29a8),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x31bf4e,'to':_0x31bf4e,'id':_0x1a29a8,'name':'','creatorId':null}));}['_makeRevision']({name:_0x34aac1,from:_0x3f0239,to:_0x25a45e,creatorId:_0xc8ef38,id:_0x7fd78}){const _0x1db0cf=this['buildRevisionData']({'from':_0x3f0239,'to':_0x25a45e});_0x1db0cf['name']=_0x34aac1,_0x1db0cf['creatorId']=_0xc8ef38,_0x1db0cf['id']=_0x7fd78;const _0x7456c9=this['addRevisionData'](_0x1db0cf);return this['adapter']&&this['_bufferUpdate'](_0x1db0cf['id'],_0x1db0cf,!0x0),_0x7456c9;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x569fb9){return(_0x569fb9=_0x569fb9['filter'](_0x39ef89=>!_0x39ef89['name']||'revision-start'!==_0x39ef89['name']&&'revision-end'!==_0x39ef89['name']))['forEach'](_0x28feef=>{'string'!=typeof _0x28feef&&(_0x28feef['children']=this['_removeRevisionMarkers'](_0x28feef['children']),_0x28feef['attributes']=_0x28feef['attributes']['filter'](_0x1ee0a5=>!_0x1ee0a5[0x0]['startsWith']('data-revision-')));}),_0x569fb9;}}function V(_0x24f8e5,_0x5c6c24){const _0x49fc8d=_0x5c6c24['editing']['view']['document'];if('string'==typeof _0x24f8e5)return new _0xad2221(_0x49fc8d,_0x24f8e5);{const _0x4984bc=_0x24f8e5['children']['map'](_0x1e46f4=>V(_0x1e46f4,_0x5c6c24));return new(C[_0x24f8e5['type']]||_0x12e000)(_0x49fc8d,_0x24f8e5['name'],_0x24f8e5['attributes'],_0x4984bc);}}class T{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x5a04a7){this['editor']=_0x5a04a7,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'](_0x5a23f1){this['source']=_0x5a23f1;const _0x319936=new Map(),_0x684c7d=new Map(),_0xc118=this['editor']['model']['document']['roots']['map'](_0x104bfb=>_0x104bfb['rootName']);for(const _0x59d573 of _0xc118){const _0x4979a8=this['editor']['model']['document']['getRoot'](_0x59d573),_0x479efb=F(_0x4979a8);_0x319936['set'](_0x59d573,_0x479efb),_0x684c7d['set'](_0x59d573,Object['fromEntries'](_0x4979a8['getAttributes']()));}const _0x533a2e=Array['from'](this['editor']['model']['markers'])['map'](_0x2b752a=>[_0x2b752a['name'],_0x2b752a['getRange']()]),_0x27244d=this['source']['version'];this['_saveMetaData'](_0x27244d,_0x319936,_0x533a2e,_0x684c7d),this['_startingRevisionId']=this['_revisionId'];const _0x325830=new Map(),_0x263888=new Map();for(const _0x42b1a5 of _0xc118){const _0x354129=B(_0x42b1a5);_0x325830['set'](_0x42b1a5,_0x354129),_0x263888['set'](_0x42b1a5,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x325830,[],_0x263888);}['getData'](_0x52d6bb,_0xd35128){if(this['_lastFrom']===_0x52d6bb&&this['_lastTo']<=_0xd35128)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0xd35128,!0x0);else{if(!this['_savedMetaData']['has'](_0x52d6bb)){const _0x5ca27b=this['_getPreviousFrom'](_0x52d6bb);this['_calculateMetaData'](_0x5ca27b,_0x52d6bb,!0x1);}this['_calculateMetaData'](_0x52d6bb,_0xd35128,!0x0);}return this['_lastFrom']=_0x52d6bb,this['_lastTo']=_0xd35128,this['_getState']();}['loadState'](_0x3c0798){this['_reset'](),this['_lastFrom']=_0x3c0798['fromVersion'],this['_lastTo']=_0x3c0798['toVersion'];for(const _0x1d649e in _0x3c0798['diffData']){const _0x59297b=_0x3c0798['diffData'][_0x1d649e]['attachChange'],_0x134f16=_0x55297f(_0x3c0798['diffData'][_0x1d649e]['attributesBefore'])||{},_0x7ec839=this['_makeModelFromViewString'](_0x3c0798['diffData'][_0x1d649e]['deletions']);_0x7ec839['rootName']=_0x1d649e,_0x7ec839['_isAttached']=!_0x59297b||!_0x59297b['isAttached'],_0x7ec839['isAttached']=()=>_0x7ec839['_isAttached'],this['_baseRoots']['set'](_0x1d649e,_0x7ec839),this['_baseRootsAttributes']['set'](_0x1d649e,_0x134f16),_0x59297b&&this['_touchedRoots']['set'](_0x1d649e,_0x59297b);const _0x141e3=this['_makeIdsRoot'](_0x7ec839);this['_baseIdsRoots']['set'](_0x1d649e,_0x141e3);for(const [_0x535fb0,_0x419bf8]of _0x7ec839['markers']){if(!_0x535fb0['startsWith']('revision:'))continue;const _0x5d281c=_0x535fb0['split'](':')[0x2];for(const _0x2e7a2b of _0x419bf8['getWalker']({'singleCharacters':!0x0})){const _0x5a20ab=this['_getVidAttributeName'](_0x2e7a2b),_0xbf056f='elementEnd'==_0x2e7a2b['type']?_0x2e7a2b['previousPosition']['path']['slice'](0x0,-0x1):_0x2e7a2b['previousPosition']['path'],_0x276597=_0x141e3['getNodeByPath'](_0xbf056f)['getAttribute'](_0x5a20ab);this['_touched']['set'](_0x276597,{'userId':_0x5d281c});}}}this['_startingRevisionId']=this['_revisionId'];const _0x277bf6=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3c51f2=>!this['_touched']['has'](_0x3c51f2));let _0x3d6d3c=0x0;const _0x5f05e4=new Map();for(const _0x21234f in _0x3c0798['diffData']){const _0x4a5449=_0x3c0798['diffData'][_0x21234f]['attachChange'],_0x100879=_0x55297f(_0x3c0798['diffData'][_0x21234f]['attributesAfter'])||{},_0x5445b9=this['_makeModelFromViewString'](_0x3c0798['diffData'][_0x21234f]['insertions']);_0x5445b9['rootName']=_0x21234f,_0x5445b9['_isAttached']=!_0x4a5449||_0x4a5449['isAttached'],_0x5445b9['isAttached']=()=>_0x5445b9['_isAttached'],this['_diffRoots']['set'](_0x21234f,_0x5445b9),this['_diffRootsAttributes']['set'](_0x21234f,_0x100879);const _0x1b04df=this['_makeIdsRoot'](_0x5445b9,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x21234f,_0x1b04df),_0x5f05e4['set'](_0x21234f,_0x5445b9['isAttached']()?_0x100879:{});for(const [_0x451524,_0x3e8c7b]of _0x5445b9['markers']){if(!_0x451524['startsWith']('revision:'))continue;const _0x3dedb1=_0x451524['split'](':')[0x2];for(const _0x142fac of _0x3e8c7b['getWalker']({'singleCharacters':!0x0})){const _0xa1901=this['_getVidAttributeName'](_0x142fac),_0x2a86b5=this['_revisionId']++,_0xb2055a='elementEnd'==_0x142fac['type']?_0x142fac['previousPosition']['path']['slice'](0x0,-0x1):_0x142fac['previousPosition']['path'];_0x1b04df['getNodeByPath'](_0xb2055a)['_setAttribute'](_0xa1901,_0x2a86b5),this['_touched']['set'](_0x2a86b5,{'userId':_0x3dedb1});}}for(const _0x4b1edc of this['editor']['model']['createRangeIn'](_0x5445b9)['getWalker']({'singleCharacters':!0x0})){const _0x53ab7f=this['_getVidAttributeName'](_0x4b1edc),_0x2bca11='elementEnd'==_0x4b1edc['type']?_0x4b1edc['previousPosition']['path']['slice'](0x0,-0x1):_0x4b1edc['previousPosition']['path'],_0xec5bdf=_0x1b04df['getNodeByPath'](_0x2bca11);_0xec5bdf['getAttribute'](_0x53ab7f)>0x0||_0xec5bdf['_setAttribute'](_0x53ab7f,_0x277bf6[_0x3d6d3c++]);}for(const [_0x478dde,_0x4c75c8]of _0x5445b9['markers'])_0x478dde['startsWith']('revision:')||this['_markers']['set'](_0x478dde,_0x4c75c8);}const _0x5c2629=B('$graveyard');this['_baseRoots']['set']('$graveyard',_0x5c2629),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5c2629,0x1));const _0x5a0015=B('$graveyard');this['_diffRoots']['set']('$graveyard',_0x5a0015),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5a0015,0x1));const _0x30be41=Array['from'](this['_diffRoots'])['map'](([_0x455854,_0x334d7d])=>[_0x455854,F(_0x334d7d)]);this['_saveMetaData'](this['_lastTo'],_0x30be41,this['_markers'],_0x5f05e4);}['_makeModelFromViewString'](_0x5bb026){const _0x2f82cb=JSON['parse'](_0x5bb026),_0x198bc5=this['editor']['editing']['view']['document'],_0x2576a1=new _0xa0965c(_0x198bc5,_0x2f82cb['map'](_0x4a8310=>V(_0x4a8310,this['editor'])));return this['editor']['data']['toModel'](_0x2576a1);}['_saveMetaData'](_0x51b960,_0x4002b3,_0x153b5b,_0xef5b1d){const _0x53b242=new Map(_0x4002b3),_0x3aee03=new Map(_0x55297f(_0xef5b1d)),_0x5167f1=new Map();for(const [_0x141e81,_0x117fcf]of _0x153b5b)_0x5167f1['set'](_0x141e81,{'start':_0x117fcf['start']['clone'](),'end':_0x117fcf['end']['clone'](),'rootName':_0x117fcf['root']['rootName']});this['_savedMetaData']['set'](_0x51b960,{'roots':_0x53b242,'markers':_0x5167f1,'rootsAttributes':_0x3aee03});}['_removeMetaData'](_0x23fcc9){this['_savedMetaData']['delete'](_0x23fcc9);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_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'](_0x33a2b7,_0x54e103=null){let _0x2d8a18=null;_0x33a2b7['is']('documentFragment')||(_0x2d8a18=new ft(_0x33a2b7['name'],{'vid_start':null===_0x54e103?this['_revisionId']++:_0x54e103++}));const _0x4156fb=[];for(const _0x17b13b of _0x33a2b7['getChildren']())if(_0x17b13b['is']('element')){_0x4156fb['push'](this['_makeIdsRoot'](_0x17b13b,_0x54e103));const _0x2da078=_0x4156fb[_0x4156fb['length']-0x1];null!==_0x54e103&&(_0x54e103=_0x2da078['is']('element','$text')?_0x2da078['getAttribute']('vid')+0x1:_0x2da078['getAttribute']('vid_end')+0x1);}else{for(let _0xb80d74=0x0;_0xb80d74<_0x17b13b['offsetSize'];_0xb80d74++)_0x4156fb['push'](new ft('$text',{'vid':null===_0x54e103?this['_revisionId']++:_0x54e103++}));}if(_0x33a2b7['is']('documentFragment')){const _0x29c399=B(_0x33a2b7['rootName']);return _0x29c399['_insertChild'](0x0,_0x4156fb),_0x29c399;}return _0x2d8a18['_setAttribute']('vid_end',null===_0x54e103?this['_revisionId']++:_0x54e103++),_0x2d8a18['_insertChild'](0x0,_0x4156fb),_0x2d8a18;}['_calculateMetaData'](_0x169d02,_0x4d33c1,_0x121a8c){this['_reset']();const {roots:_0x294c87,markers:_0xc5b704,rootsAttributes:_0x4b24f1}=this['_savedMetaData']['get'](_0x169d02);this['_baseRoots']=new Map(_0x294c87),this['_baseRootsAttributes']=new Map(_0x55297f(_0x4b24f1));for(const [_0x24c069,_0x29d0de]of this['_baseRoots'])if('$graveyard'!==_0x24c069&&(this['_diffRoots']['set'](_0x24c069,F(_0x29d0de)),this['_diffRootsAttributes']=new Map(_0x55297f(_0x4b24f1)),_0x121a8c)){const _0x10898d=this['_revisionId'];this['_idsRoots']['set'](_0x24c069,this['_makeIdsRoot'](_0x29d0de)),this['_baseIdsRoots']['set'](_0x24c069,this['_makeIdsRoot'](_0x29d0de,_0x10898d));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',F(this['_baseRoots']['get']('$graveyard'))),_0x121a8c&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2deaea,_0x40e0d9]of _0xc5b704){const _0x56f6fc=this['_baseRoots']['get'](_0x40e0d9['rootName']),_0x4e6249=this['_diffRoots']['get'](_0x40e0d9['rootName']),_0x1db10c=new vt(this['_fixPosition'](_0x40e0d9['start'],_0x56f6fc),this['_fixPosition'](_0x40e0d9['end'],_0x56f6fc)),_0x3a7681=this['_fixRange'](_0x1db10c,_0x4e6249);_0x56f6fc['markers']['set'](_0x2deaea,_0x1db10c),this['_markers']['set'](_0x2deaea,_0x3a7681);}this['_applyOperations'](_0x169d02,_0x4d33c1,_0x121a8c);}['_applyOperations'](_0x26dab7,_0x1d9fed,_0x15b904){for(const _0x2ad27a of this['source']['getOperations'](_0x26dab7,_0x1d9fed))this['_handleOperation'](_0x2ad27a,_0x15b904);for(const _0x4ad47f of this['_diffRoots']['values']())_0x4ad47f['markers']['clear']();for(const [_0xd149fd,_0x453d4d]of this['_markers']){this['_diffRoots']['get'](_0x453d4d['root']['rootName'])['markers']['set'](_0xd149fd,_0x453d4d['clone']());}const _0x17b766=new Map(),_0x4b12af=new Map();for(const [_0x22a693,_0x1a35fc]of this['_diffRoots'])_0x17b766['set'](_0x22a693,F(_0x1a35fc)),_0x4b12af['set'](_0x22a693,this['_diffRootsAttributes']['get'](_0x22a693));this['_saveMetaData'](_0x1d9fed,_0x17b766,this['_markers'],_0x4b12af);}['_getPreviousFrom'](_0x9a6d43){const _0x40a8ac=Array['from'](this['_savedMetaData']['keys']());_0x40a8ac['sort']((_0x38b3a0,_0x5ecb5d)=>_0x38b3a0-_0x5ecb5d),_0x40a8ac['reverse']();for(const _0x2a7ef4 of _0x40a8ac)if(_0x2a7ef4<_0x9a6d43)return _0x2a7ef4;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x30e580,_0x5bbbc4){const _0x5d8a9a=Array['from'](_0x5bbbc4['markers'])['map'](([_0x4e5896,_0x5d5c1f])=>[_0x4e5896,this['_fixRange'](_0x5d5c1f,_0x30e580)]);_0x30e580['markers']=new Map(_0x5d8a9a);}['_transformMarkers'](_0x4d3b46){for(const _0x449ccd of this['_markers']['values']()){const _0x168013=_0x449ccd['getTransformedByOperation'](_0x4d3b46),_0x18903e=vt['_createFromRanges'](_0x168013);_0x449ccd['start']=_0x18903e['start'],_0x449ccd['end']=_0x18903e['end'];}}['_handleOperation'](_0x54ff35,_0x52185b){if('addRoot'!=_0x54ff35['type']&&'detachRoot'!=_0x54ff35['type']){if('insert'==_0x54ff35['type']){const _0x1096cc=_0x54ff35['position']['root']['rootName'];this['_diffRoots']['has'](_0x1096cc)||(this['_diffRoots']['set'](_0x1096cc,B(_0x1096cc,!0x0)),this['_diffRootsAttributes']['set'](_0x1096cc,{}),_0x52185b&&this['_idsRoots']['set'](_0x1096cc,B(_0x1096cc,!0x0)));}else{if('addRootAttribute'==_0x54ff35['type']||'removeRootAttribute'==_0x54ff35['type']||'changeRootAttribute'==_0x54ff35['type'])return void this['_handleRootAttributeOperation'](_0x54ff35);'marker'==_0x54ff35['type']&&this['_handleMarkerOperation'](_0x54ff35);}if('marker'!==_0x54ff35['type']){const _0x590853=this['_cloneOperation'](_0x54ff35,this['_diffRoots']);_0x590853['_execute'](),this['_transformMarkers'](_0x590853);}if(_0x52185b)switch(_0x54ff35['type']){case'insert':this['_handleInsertOperation'](_0x54ff35);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x54ff35);break;case'merge':this['_handleMergeOperation'](_0x54ff35);break;case'split':this['_handleSplitOperation'](_0x54ff35);}}else this['_handleRootOperation'](_0x54ff35,_0x52185b);}['_cloneOperation'](_0x59b716,_0x1ac1bc){const _0x2fb04c=_0x59b716['clone']();return _0x2fb04c['_authorId']=_0x59b716['_authorId'],this['_fixOperation'](_0x2fb04c,_0x1ac1bc),_0x2fb04c;}['_getBaseVids'](_0x1dab9e){return _0x1dab9e['map'](_0x2be254=>{const _0x2a550b=this['_getVidAttributeName'](_0x2be254);return Number(_0x2be254['item']['getAttribute'](_0x2a550b));});}['_generateTape'](_0x1afbe9,_0x4481c4){if(_0x1afbe9['is']('element','$text'))_0x4481c4['push']({'item':_0x1afbe9,'type':'text'});else{_0x1afbe9['is']('element')&&_0x4481c4['push']({'item':_0x1afbe9,'type':'elementStart'});for(const _0x1e4776 of _0x1afbe9['getChildren']())this['_generateTape'](_0x1e4776,_0x4481c4);_0x1afbe9['is']('element')&&_0x4481c4['push']({'item':_0x1afbe9,'type':'elementEnd'});}return _0x4481c4;}['_getState'](){const _0x253ad7=new Map(this['_touched']),_0x114b7d=new Map(_0x253ad7),_0x1c1eac=new Map(),_0x3f6676={'insertions':{},'deletions':{}},_0x13898e={'insertions':{},'deletions':{}},_0x44de6b=new Map(),_0x58e13e=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x58e13e['delete']('$graveyard');for(const _0x5d616b of _0x58e13e){const _0x2a9b8b=this['_diffRoots']['get'](_0x5d616b)||B(_0x5d616b,!0x1),_0xefa9c8=this['_baseRoots']['get'](_0x5d616b)||B(_0x5d616b,!0x1);_0x2a9b8b['isAttached']()||_0xefa9c8['isAttached']()?(_0x3f6676['insertions'][_0x5d616b]=F(_0x2a9b8b),_0x3f6676['deletions'][_0x5d616b]=F(_0xefa9c8),this['_copyMarkers'](_0x3f6676['deletions'][_0x5d616b],_0xefa9c8),this['_copyMarkers'](_0x3f6676['insertions'][_0x5d616b],_0x2a9b8b),_0x13898e['insertions'][_0x5d616b]=this['_generateTape'](this['_idsRoots']['get'](_0x5d616b),[]),_0x13898e['deletions'][_0x5d616b]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x5d616b)||B(_0x5d616b,!0x1),[])):_0x58e13e['delete'](_0x5d616b);}for(const _0x414ba8 of _0x58e13e){const _0x303dd7=_0x13898e['insertions'][_0x414ba8];for(const _0xefbb5e of _0x303dd7){const _0x4240db=this['_getVidAttributeName'](_0xefbb5e),_0x2c092c=_0xefbb5e['item']['getAttribute'](_0x4240db);_0x114b7d['delete'](_0x2c092c),_0x2c092c>=this['_startingRevisionId']&&_0x1c1eac['set'](_0x2c092c,_0x253ad7['get'](_0x2c092c));}}for(const _0x3b3ba0 of _0x58e13e){const _0x5c604e=_0x13898e['insertions'][_0x3b3ba0],_0x5a52f8=this['_getBaseVids'](_0x13898e['deletions'][_0x3b3ba0]);let _0x885a2a=0x0;for(const _0x27c3ec of _0x5c604e){const _0x5a02c1=this['_getVidAttributeName'](_0x27c3ec),_0x2fe779=_0x27c3ec['item']['getAttribute'](_0x5a02c1);if(!_0x1c1eac['has'](_0x2fe779)&&!_0x44de6b['has'](_0x2fe779)){if(_0x114b7d['has'](_0x2fe779))_0x885a2a++;else{if(_0x2fe779!=_0x5a52f8[_0x885a2a]){const _0x2c52dd=_0x253ad7['get'](_0x2fe779)||_0x253ad7['get'](_0x5a52f8[_0x885a2a]);for(;_0x2fe779!=_0x5a52f8[_0x885a2a];)_0x114b7d['has'](_0x5a52f8[_0x885a2a])||(_0x44de6b['set'](_0x5a52f8[_0x885a2a],_0x2c52dd),_0x253ad7['set'](_0x5a52f8[_0x885a2a],_0x2c52dd)),_0x885a2a++;}_0x885a2a++;}}}}for(const _0x5b80d0 of _0x58e13e){const _0x19980e=_0x13898e['insertions'][_0x5b80d0];for(const _0x11eb84 of _0x19980e){const _0x495513=this['_getVidAttributeName'](_0x11eb84),_0x48008d=_0x11eb84['item']['getAttribute'](_0x495513);if(_0x44de6b['has'](_0x48008d)){const _0x23898a=_0x44de6b['get'](_0x48008d);_0x114b7d['has'](_0x48008d)||_0x114b7d['set'](_0x48008d,{..._0x23898a}),_0x1c1eac['set'](_0x48008d,{..._0x23898a});}}}for(const _0x2a947b of _0x114b7d['keys']())_0x2a947b>=this['_startingRevisionId']&&_0x114b7d['delete'](_0x2a947b);const _0x5ce927=new Map();for(const _0x2fc666 of _0x58e13e){let _0xa4f33=_0x13898e['insertions'][_0x2fc666];for(const _0x308c66 of _0xa4f33)if(_0x308c66['item']['is']('element','tableCell')){const _0xfde284=this['_getVidAttributeName'](_0x308c66),_0x352628=_0x308c66['item']['getAttribute'](_0xfde284);if(_0x1c1eac['has'](_0x352628)){const _0x341867=_0x308c66['item']['parent']['parent']['getAttribute']('vid_start'),_0xef2ea8=_0x5ce927['get'](_0x341867)||new Set();_0xef2ea8['add'](_0x1c1eac['get'](_0x352628)['userId']),_0x5ce927['set'](_0x341867,_0xef2ea8);}}_0xa4f33=_0x13898e['deletions'][_0x2fc666];for(const _0x3f48cb of _0xa4f33)if(_0x3f48cb['item']['is']('element','tableCell')){const _0x5d5d6d=this['_getVidAttributeName'](_0x3f48cb),_0x554844=_0x3f48cb['item']['getAttribute'](_0x5d5d6d);if(_0x114b7d['has'](_0x554844)){const _0x354f16=_0x3f48cb['item']['parent']['parent']['getAttribute']('vid_start'),_0x4aca5a=_0x5ce927['get'](_0x354f16)||new Set();_0x4aca5a['add'](_0x114b7d['get'](_0x554844)['userId']),_0x5ce927['set'](_0x354f16,_0x4aca5a);}}for(const _0x28613e of _0x5ce927['keys']())(_0x1c1eac['has'](_0x28613e)||_0x114b7d['has'](_0x28613e))&&_0x5ce927['delete'](_0x28613e);}for(const _0x420ed5 of _0x58e13e){const _0x56adf4=_0x13898e['insertions'][_0x420ed5];let _0x261f9d=null,_0x367543=null;for(const _0x12219f of _0x56adf4){const _0x205bf8=this['_getVidAttributeName'](_0x12219f),_0x5b17fb=_0x12219f['item']['getAttribute'](_0x205bf8),_0xc78218=_0x5ce927['get'](_0x5b17fb);_0xc78218&&'elementStart'==_0x12219f['type']&&(_0x261f9d=Array['from'](_0xc78218)[0x0],_0x367543=_0x12219f['item']['getAttribute']('vid_end')),_0x261f9d&&(_0x114b7d['set'](_0x5b17fb,{'userId':_0x261f9d}),_0x1c1eac['set'](_0x5b17fb,{'userId':_0x261f9d})),_0x5b17fb==_0x367543&&(_0x261f9d=null,_0x367543=null);}}const _0x196069={},_0x5b9f7a=new Set();for(const _0x18b835 of _0x58e13e){const _0x922c0e=_0x3f6676['deletions'][_0x18b835],_0x141463=_0x3f6676['insertions'][_0x18b835];for(const {userId:_0x13db78}of this['_touchedMarkers']['values']())null!==_0x13db78&&_0x5b9f7a['add'](_0x13db78);for(const {userId:_0x450592}of this['_touchedRoots']['values']())null!==_0x450592&&_0x5b9f7a['add'](_0x450592);this['_markChanges'](_0x141463,_0x13898e['insertions'][_0x18b835],_0x1c1eac,'insertion',_0x5b9f7a),this['_markChanges'](_0x922c0e,_0x13898e['deletions'][_0x18b835],_0x114b7d,'deletion',_0x5b9f7a),_0x196069[_0x18b835]={'insertions':this['_prepareViewToSave'](_0x141463),'deletions':this['_prepareViewToSave'](_0x922c0e),'attachChange':this['_touchedRoots']['get'](_0x18b835)||null,'attributesBefore':_0x55297f(this['_baseRootsAttributes']['get'](_0x18b835))||{},'attributesAfter':_0x55297f(this['_diffRootsAttributes']['get'](_0x18b835))};}return{'diffData':_0x196069,'authorsIds':Array['from'](_0x5b9f7a)};}['_processRootBeforeSave'](_0x3e4bf4){for(const [,_0x37dae3]of _0x3e4bf4['markers']){const _0x4ccf43=_0x37dae3['start']['getAncestors']()['filter'](_0x27a181=>'tableCell'==_0x27a181['name']);for(const _0x290af6 of _0x4ccf43)0x1==_0x290af6['childCount']&&_0x290af6['getChild'](0x0)['is']('element','paragraph')&&_0x290af6['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x186dcc){this['_processRootBeforeSave'](_0x186dcc);const _0x43d1e5=this['editor']['data']['toView'](_0x186dcc,{}),_0x15545e=Array['from'](_0x43d1e5['getChildren']())['map'](_0x2a1fda=>this['_getViewJson'](_0x2a1fda));return JSON['stringify'](_0x15545e);}['_getViewJson'](_0x11b1d8){if(_0x11b1d8['is']('$text'))return _0x11b1d8['data'];{const _0x4fe2e0=_0x11b1d8;return{'type':Object['keys'](C)['find'](_0x16c364=>_0x11b1d8 instanceof C[_0x16c364]),'name':_0x4fe2e0['name'],'attributes':Array['from'](_0x4fe2e0['getAttributes']()),'children':Array['from'](_0x4fe2e0['getChildren']())['map'](_0x30cdff=>this['_getViewJson'](_0x30cdff))};}}['_markChanges'](_0x2b6639,_0x3dd141,_0x501748,_0x133304,_0x11d149){let _0x13048d=null,_0x745bd7=null,_0x506e1d=0x0;const _0x7a9f75=this['editor']['model'];for(let _0x1d412d=0x0;_0x1d412d<_0x3dd141['length'];_0x1d412d++){const _0xdea71b=this['_getVidAttributeName'](_0x3dd141[_0x1d412d]),_0x42c23d=_0x3dd141[_0x1d412d]['item']['getAttribute'](_0xdea71b),_0x2c5dea=_0x501748['get'](_0x42c23d),_0x393cec=_0x1d412d==_0x3dd141['length']-0x1;(!_0x13048d&&_0x2c5dea&&(_0x13048d=_0x2c5dea,_0x745bd7=_0x3dd141[_0x1d412d]),_0x13048d&&(!_0x2c5dea||_0x2c5dea['userId']!=_0x13048d['userId']))&&(_0x597179(_0x2c5dea,J(_0x745bd7,_0x2b6639,_0x7a9f75),J(_0x3dd141[_0x1d412d],_0x2b6639,_0x7a9f75)),_0x13048d=_0x2c5dea||null,_0x745bd7=_0x2c5dea?_0x3dd141[_0x1d412d]:null),_0x13048d&&_0x393cec&&_0x597179(_0x2c5dea,J(_0x745bd7,_0x2b6639,_0x7a9f75),q(_0x3dd141[_0x1d412d],_0x2b6639,_0x7a9f75));}function _0x597179(_0x574d91,_0x37dbe9,_0x46a8f9){const _0xe0afd8=_0x13048d['userId'],_0x5268cb='revision:'+_0x133304+':'+_0xe0afd8+':'+_0x506e1d++,_0x98e53=_0x7a9f75['createRange'](_0x37dbe9,_0x46a8f9);_0x2b6639['markers']['set'](_0x5268cb,_0x98e53),null!==_0xe0afd8&&_0x11d149['add'](_0xe0afd8);}}['_getVidAttributeName'](_0x44f5a8){switch(_0x44f5a8['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x14e63f,_0x1a06d0){_0x14e63f['baseVersion']=null;for(const _0x40d66b in _0x14e63f){const _0x4f450b=_0x14e63f[_0x40d66b];if(_0x4f450b instanceof gt){const _0x4bbfb5=_0x1a06d0['get'](_0x4f450b['root']['rootName']);_0x14e63f[_0x40d66b]=this['_fixPosition'](_0x4f450b,_0x4bbfb5);}if(_0x4f450b instanceof vt){const _0x501178=_0x1a06d0['get'](_0x4f450b['root']['rootName']);_0x14e63f[_0x40d66b]=this['_fixRange'](_0x4f450b,_0x501178);}'root'===_0x40d66b&&(_0x14e63f['root']=_0x1a06d0['get'](_0x14e63f['root']['rootName']));}}['_fixRange'](_0x48ab3b,_0x3acb65){return this['editor']['model']['createRange'](this['_fixPosition'](_0x48ab3b['start'],_0x3acb65),this['_fixPosition'](_0x48ab3b['end'],_0x3acb65));}['_fixPosition'](_0x2ca903,_0x53be8b){return this['editor']['model']['createPositionFromPath'](_0x53be8b,_0x2ca903['path'],_0x2ca903['stickiness']);}['_handleInsertOperation'](_0x586a6d){const _0x11843b=this['_idsRoots']['get'](_0x586a6d['position']['root']['rootName']),_0x184688=this['_fixPosition'](_0x586a6d['position'],_0x11843b),_0x4751ac=null===_0x586a6d['_authorId']?null:_0x586a6d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2e3bcc=_0x184688['parent'],_0x36b6f5=this['_revisionId'],_0x553c2f=[];for(const _0x3ae5ba of _0x586a6d['nodes'])if(_0x3ae5ba['is']('element'))_0x553c2f['push'](this['_makeIdsRoot'](_0x3ae5ba));else{for(let _0x303810=0x0;_0x303810<_0x3ae5ba['offsetSize'];_0x303810++)_0x553c2f['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x249579=this['_revisionId'];for(let _0x5dc63e=_0x36b6f5;_0x5dc63e<_0x249579;_0x5dc63e++)this['_touched']['set'](_0x5dc63e,{'userId':_0x4751ac});_0x2e3bcc['_insertChild'](_0x184688['offset'],_0x553c2f);}['_handleMoveOperation'](_0x3d8a89){(_0x3d8a89=this['_cloneOperation'](_0x3d8a89,this['_idsRoots']))['_execute']();const _0x267a7f=null===_0x3d8a89['_authorId']?null:_0x3d8a89['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x33ca90=_0x3d8a89['getMovedRangeStart'](),_0x1b9770=_0x33ca90['parent'],_0x45c5b5=_0x33ca90['offset'];!function _0x411a05(_0x51d9dc,_0x51bcfc,_0x3a1a89,_0x1bde17){for(let _0x4093cb=_0x3a1a89;_0x4093cb<_0x1bde17;_0x4093cb++){const _0x35f2fc=_0x51bcfc['getChild'](_0x4093cb);_0x35f2fc['is']('element','$text')?_0x51d9dc['set'](_0x35f2fc['getAttribute']('vid'),{'userId':_0x267a7f}):(_0x51d9dc['set'](_0x35f2fc['getAttribute']('vid_start'),{'userId':_0x267a7f}),_0x411a05(_0x51d9dc,_0x35f2fc,0x0,_0x35f2fc['childCount']),_0x51d9dc['set'](_0x35f2fc['getAttribute']('vid_end'),{'userId':_0x267a7f}));}}(this['_touched'],_0x1b9770,_0x45c5b5,_0x45c5b5+_0x3d8a89['howMany']);}['_handleMergeOperation'](_0x3c82cc){const _0x2e2b71=null===(_0x3c82cc=this['_cloneOperation'](_0x3c82cc,this['_idsRoots']))['_authorId']?null:_0x3c82cc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x21c7fd=_0x3c82cc['targetPosition']['parent'],_0x4e7138=_0x3c82cc['sourcePosition']['parent'],_0x4779fc=_0x21c7fd['getAttribute']('vid_end'),_0x42eeee=_0x4e7138['getAttribute']('vid_start');_0x21c7fd['_setAttribute']('vid_end',_0x4e7138['getAttribute']('vid_end')),_0x4e7138['_setAttribute']('vid_end',_0x4779fc),this['_touched']['set'](_0x42eeee,{'userId':_0x2e2b71}),this['_touched']['set'](_0x4779fc,{'userId':_0x2e2b71}),_0x3c82cc['_execute']();}['_handleSplitOperation'](_0x47ac17){const _0x2bac79=null===(_0x47ac17=this['_cloneOperation'](_0x47ac17,this['_idsRoots']))['_authorId']?null:_0x47ac17['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x273ea7=_0x47ac17['graveyardPosition'],_0x14790f=_0x47ac17['splitPosition']['parent'];_0x47ac17['_execute']();const _0x3bccd9=_0x14790f['getAttribute']('vid_end'),_0x1e1a5c=_0x47ac17['insertionPosition']['nodeAfter'];if(_0x273ea7){const _0x1f2b93=_0x1e1a5c['getAttribute']('vid_end'),_0x58124d=_0x14790f['getAttribute']('vid_end');_0x14790f['_setAttribute']('vid_end',_0x1f2b93),_0x1e1a5c['_setAttribute']('vid_end',_0x58124d),this['_touched']['set'](_0x14790f['getAttribute']('vid_end'),{'userId':_0x2bac79}),this['_touched']['set'](_0x1e1a5c['getAttribute']('vid_start'),{'userId':_0x2bac79});}else{const _0x1c4e8f=this['_revisionId']++,_0x1e6acd=this['_revisionId']++;_0x14790f['_setAttribute']('vid_end',_0x1c4e8f),_0x1e1a5c['_setAttribute']('vid_start',_0x1e6acd),_0x1e1a5c['_setAttribute']('vid_end',_0x3bccd9),this['_touched']['set'](_0x1c4e8f,{'userId':_0x2bac79}),this['_touched']['set'](_0x1e6acd,{'userId':_0x2bac79});}}['_handleMarkerOperation'](_0x2834e6){if(!_0x2834e6['affectsData'])return;const _0x282ad6=(_0x2834e6=this['_cloneOperation'](_0x2834e6,this['_diffRoots']))['oldRange']?_0x2834e6['oldRange']['root']:null,_0x1f7ac2=_0x2834e6['newRange']?_0x2834e6['newRange']['root']:null;_0x282ad6&&this['_markers']['delete'](_0x2834e6['name']),_0x1f7ac2&&this['_markers']['set'](_0x2834e6['name'],_0x2834e6['newRange']['clone']());const _0x542f76=null===_0x2834e6['_authorId']?null:_0x2834e6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x18a72a=_0x2834e6['name'];if(!this['_touchedMarkers']['has'](_0x18a72a))return void this['_touchedMarkers']['set'](_0x18a72a,{'range':_0x2834e6['oldRange'],'userId':_0x542f76});const _0x43777c=this['_touchedMarkers']['get'](_0x18a72a),_0xa2f217=_0x43777c['range'],_0x42f2fa=_0x2834e6['newRange'];null==_0xa2f217&&null==_0x42f2fa||_0xa2f217&&_0x42f2fa&&_0xa2f217['isEqual'](_0x42f2fa)?this['_touchedMarkers']['delete'](_0x2834e6['name']):_0x43777c['userId']=_0x542f76;}['_handleRootOperation'](_0x161d4a,_0x2141cd){this['_diffRoots']['has'](_0x161d4a['rootName'])?this['_diffRoots']['get'](_0x161d4a['rootName'])['_isAttached']=_0x161d4a['isAdd']:(this['_diffRoots']['set'](_0x161d4a['rootName'],B(_0x161d4a['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x161d4a['rootName'],{}),_0x2141cd&&this['_idsRoots']['set'](_0x161d4a['rootName'],B(_0x161d4a['rootName'],!0x0)));const _0x1b53d5=null===_0x161d4a['_authorId']?null:_0x161d4a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x480f4c=this['_touchedRoots']['get'](_0x161d4a['rootName']);_0x480f4c&&_0x480f4c['userId']===_0x1b53d5?this['_touchedRoots']['delete'](_0x161d4a['rootName']):this['_touchedRoots']['set'](_0x161d4a['rootName'],{'userId':_0x1b53d5,'isAttached':_0x161d4a['isAdd']});}['_handleRootAttributeOperation'](_0x1037b5){const _0x401b7c=this['_diffRootsAttributes']['get'](_0x1037b5['root']['rootName']);null===_0x1037b5['newValue']?delete _0x401b7c[_0x1037b5['key']]:_0x401b7c[_0x1037b5['key']]=_0x1037b5['newValue'];}}function F(_0x68d3cb){const _0x2829d4=B(_0x68d3cb['rootName'],_0x68d3cb['isAttached']());for(const _0x3d95ce of _0x68d3cb['getChildren']()){const _0x2a78ac=_0x3d95ce['_clone'](!0x0);_0x2829d4['_appendChild'](_0x2a78ac);}return _0x2829d4;}function B(_0x2b65c8,_0x1dfe5b=!0x0){const _0x17c18e=new wt();return _0x17c18e['rootName']=_0x2b65c8,_0x17c18e['_isAttached']=_0x1dfe5b,_0x17c18e['isAttached']=()=>_0x17c18e['_isAttached'],_0x17c18e;}function J(_0x4083d1,_0x24dec0,_0x67e46){const _0x4016c4='elementEnd'==_0x4083d1['type']?_0x67e46['createPositionAt'](_0x4083d1['item'],'end'):_0x67e46['createPositionBefore'](_0x4083d1['item']);return _0x67e46['createPositionFromPath'](_0x24dec0,_0x4016c4['path'],_0x4016c4['stickiness']);}function q(_0x59cfd9,_0x2adc8f,_0x295e2d){const _0x228151='elementStart'==_0x59cfd9['type']?_0x295e2d['createPositionAt'](_0x59cfd9['item'],0x0):_0x295e2d['createPositionAfter'](_0x59cfd9['item']);return _0x295e2d['createPositionFromPath'](_0x2adc8f,_0x228151['path'],_0x228151['stickiness']);}class ns extends _0xbc5f18{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x3b54b3,_0x4662a8){super(_0x3b54b3),this['focusTracker']=new _0x4033fd(),this['keystrokes']=new _0x4a5e29(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x4662a8),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x372554({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5d49f1=_0x2fb9e9=>_0x2fb9e9['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5d49f1),this['keystrokes']['set']('arrowleft',_0x5d49f1),this['keystrokes']['set']('arrowup',_0x5d49f1),this['keystrokes']['set']('arrowdown',_0x5d49f1);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xa4723b){this['revisionNameInputView']['fieldView']['element']['value']=_0xa4723b['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x5833ed){const _0xe57170=new at(this['locale'],_0x58483e),_0x38d7e1=_0xe57170['fieldView'];_0x38d7e1['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4fab2c=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x5833ed&&(_0x4fab2c+='\x20('+R(this['locale'],'optional')+')'),(_0xe57170['label']=_0x4fab2c,_0x38d7e1['on']('input',()=>{this['revisionNameInputValue']=_0x38d7e1['element']['value']['trim']();}),_0xe57170);}}class u extends _0x49d8e7{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x1a0ef9=this['editor'],_0x20ae63=_0x1a0ef9['plugins']['get']('RevisionTracker');_0x1a0ef9['ui']['componentFactory']['add']('revisionHistory',_0xfe2609=>{const _0x495988=_0x39648c(_0xfe2609),_0x347e9a=_0x495988['panelView']['children'],_0x1f0893=new te(_0xfe2609),_0x3e459c=new _0x2df2f6(_0xfe2609),_0x48ce24=new _0x10c58e(_0xfe2609),_0x3f456f=new _0x2df2f6(_0xfe2609),_0x3d9357=new _0x10c58e(_0xfe2609);return _0x495988['bind']('isEnabled')['to'](_0x20ae63,'isReady',_0x20ae63,'isEnabled',_0x1a0ef9,'isReadOnly',(_0x2f7f11,_0x5e28d4,_0x24f53e)=>_0x2f7f11&&_0x5e28d4&&!_0x24f53e),_0x495988['buttonView']['set']({'icon':_0x180720['history'],'label':R(_0xfe2609,'Revision\x20history'),'tooltip':!0x0}),_0x48ce24['set']({'label':R(_0xfe2609,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x48ce24['bind']('isEnabled')['to'](_0x20ae63,'isReady',_0x20ae63,'isEnabled',_0x1a0ef9,'isReadOnly',(_0x1724cd,_0x1c2399,_0x1575ad)=>_0x1724cd&&_0x1c2399&&!_0x1575ad),_0x48ce24['on']('execute',()=>this['_showDialog']()),_0x3d9357['set']({'label':R(_0xfe2609,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x3d9357['bind']('isEnabled')['to'](_0x20ae63,'isReady',_0x1a0ef9,'isReadOnly',(_0x376bb0,_0x35aea7)=>_0x376bb0&&!_0x35aea7),_0x3d9357['on']('execute',()=>{_0x1a0ef9['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x495988['isOpen']=!0x1,_0x1a0ef9['editing']['view']['focus']();}),_0x3e459c['children']['add'](_0x48ce24),_0x3f456f['children']['add'](_0x3d9357),_0x1f0893['role']='menu',_0x1f0893['items']['addMany']([_0x3e459c,_0x3f456f]),_0x347e9a['add'](_0x1f0893),_0x495988;}),_0x1a0ef9['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x48bed2=this['editor'],_0x453f3b=_0x48bed2['locale'],_0x4b0d7e=new _0x408c39(_0x453f3b),_0xe6cc4d=new _0x2f8f9c(_0x453f3b);_0x4b0d7e['buttonView']['set']({'icon':_0x180720['history'],'label':R(_0x453f3b,'Revision\x20history')});const _0x16a656=new _0x729c6b(_0x453f3b,_0x4b0d7e),_0x264ab6=new _0x16c7a1(_0x453f3b);_0x264ab6['set']({'label':R(_0x453f3b,'Save\x20current\x20revision')}),_0x264ab6['delegate']('execute')['to'](_0x4b0d7e),_0x264ab6['on']('execute',()=>{this['_showDialog']();}),_0x16a656['children']['add'](_0x264ab6),_0xe6cc4d['items']['add'](_0x16a656);const _0xce0138=new _0x729c6b(_0x453f3b,_0x4b0d7e),_0x34568a=new _0x16c7a1(_0x453f3b);return _0x34568a['set']({'label':R(_0x453f3b,'Open\x20revision\x20history')}),_0x34568a['delegate']('execute')['to'](_0x4b0d7e),_0x34568a['on']('execute',()=>{_0x48bed2['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0xce0138['children']['add'](_0x34568a),_0xe6cc4d['items']['add'](_0xce0138),_0x4b0d7e['panelView']['children']['add'](_0xe6cc4d),_0x4b0d7e;}['_showDialog'](){const _0x2375d1=this['editor'],_0x4e5f01=_0x2375d1['locale'],_0x23414e=_0x2375d1['plugins']['get']('Dialog'),_0xd168f6=_0x2375d1['plugins']['get']('RevisionTracker');function _0x40e4b6(_0x492fd5){_0x2375d1['config']['get']('revisionHistory.requireRevisionName')&&''===_0x492fd5['revisionName']?_0x492fd5['revisionNameInputView']['errorText']=R(_0x4e5f01,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2375d1['plugins']['get'](l)['saveRevision']({'name':_0x492fd5['revisionName']}),_0x23414e['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x40e4b6(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x23414e['show']({'id':'revisionSave','title':R(_0x4e5f01,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x2375d1['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x23414e['hide']()},{'label':R(_0x2375d1['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x2c865a){_0x2c865a['bind']('isEnabled')['to'](_0xd168f6,'isReady',_0xd168f6,'isEnabled',_0x2375d1,'isReadOnly',(_0x3875be,_0x4211ac,_0x49082e)=>_0x3875be&&_0x4211ac&&!_0x49082e);},'onExecute':()=>_0x40e4b6(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x445e72=this['editor'],_0x31a723=_0x445e72['locale'];this['_saveRevisionFormView']=new ns(_0x31a723,_0x445e72['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Y extends _0xbc5f18{['changeId'];['_model'];constructor(_0xbe7eba,_0x4bb9c3){super(_0xbe7eba),this['_model']=_0x4bb9c3,this['changeId']=_0x4bb9c3['id'];const _0x5f3970=this['bindTemplate'],_0x347621=R(_0xbe7eba,_0x4bb9c3['data']['isSuggestion']?'Suggested\x20by':'add'==_0x4bb9c3['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x4bb9c3['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5f3970['to']('type',_0x44edbe=>'ck-revision-change__'+_0x44edbe)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x347621}]},{'text':'\x20'+_0x4bb9c3['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4fe546(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x545509){super(),this['id']=_0x545509['id']||_0x4d1572(),this['author']=_0x545509['author'],this['type']=_0x545509['type'],this['data']=_0x545509['data']||{},this['rootName']=_0x545509['rootName'],this['set']('createdAt',_0x545509['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x5c5f47,_0x5c1931){this['newRevisionId']=_0x5c5f47,this['oldRevisionId']=_0x5c1931,this['changes']=new _0x3461b4();}['_setChanges'](_0x6d5829){for(const _0x509930 of _0x6d5829)this['changes']['add'](_0x509930);}}const Z={'c':_0x847cee,'a':_0x362f45,'e':_0x4fb0d7,'r':_0x4276f9,'u':_0x29894d};class d extends _0x49d8e7{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x211ed4,_0x17e217,j];}constructor(_0xe2cc7b){super(_0xe2cc7b),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),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',(_0x5277c3,_0x1c7a9c,_0x5d88ff)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x15f931=>{for(const _0x3c9cf4 of this['editor']['editing']['view']['document']['roots'])_0x5d88ff?_0x15f931['removeClass']('ck-editor__editable__overlay',_0x3c9cf4):_0x15f931['addClass']('ck-editor__editable__overlay',_0x3c9cf4);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x277163=>null!==_0x277163),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x54d621,_0x3528f5,_0xbbcb1f)=>_0x54d621&&_0xbbcb1f?_0x3528f5['changes']['getIndex'](_0xbbcb1f):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x5ec11e,_0x12c461)=>_0x5ec11e?_0x12c461['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x17e217);}['init'](){const _0x33d24d=this['editor'],_0x4b3240=new bt(_0x33d24d,{'direction':'backward'}),_0x56b921=new bt(_0x33d24d,{'direction':'forward'});(_0x33d24d['commands']['add']('showPreviousChange',_0x4b3240),_0x33d24d['commands']['add']('showNextChange',_0x56b921),_0x33d24d['commands']['add']('restoreRevision',new yt(_0x33d24d)),this['on']('change:numberOfChanges',()=>{_0x4b3240['refresh'](),_0x56b921['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x33d24d['enableReadOnlyMode']('revision-viewer'),_0x33d24d['plugins']['has']('WidgetToolbarRepository'))&&_0x33d24d['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x376045){await this['loadRevisionData'](_0x376045);const _0x14f657={};for(const _0x30251b in _0x376045['diffData']){if(_0x376045['diffData'][_0x30251b]['attachChange']&&!_0x376045['diffData'][_0x30251b]['attachChange']['isAttached'])continue;const _0x1bf760=this['_removeRevisionMarkers'](JSON['parse'](_0x376045['diffData'][_0x30251b]['insertions'])),_0xee3d34=this['editor']['editing']['view']['document'],_0x3072ad=new _0xa0965c(_0xee3d34,_0x1bf760['map'](_0x26ff90=>this['_getViewObj'](_0x26ff90)));this['editor']['data']['processor']['useFillerType']('marked'),_0x14f657[_0x30251b]=this['editor']['data']['processor']['toData'](_0x3072ad),this['editor']['data']['processor']['useFillerType']('default');}return _0x14f657;}async['getRevisionRootsAttributes'](_0x4fbef1){await this['loadRevisionData'](_0x4fbef1);const _0x70d300={};for(const _0x5d106f in _0x4fbef1['diffData'])_0x4fbef1['diffData'][_0x5d106f]['attachChange']&&!_0x4fbef1['diffData'][_0x5d106f]['attachChange']['isAttached']||(_0x70d300[_0x5d106f]=_0x4fbef1['diffData'][_0x5d106f]['attributesAfter']||{});return _0x70d300;}['_removeRevisionMarkers'](_0xa87e2d){return(_0xa87e2d=_0xa87e2d['filter'](_0x46d6b6=>!_0x46d6b6['name']||'revision-start'!==_0x46d6b6['name']&&'revision-end'!==_0x46d6b6['name']))['forEach'](_0x1b3854=>{'string'!=typeof _0x1b3854&&(_0x1b3854['children']=this['_removeRevisionMarkers'](_0x1b3854['children']),_0x1b3854['attributes']=_0x1b3854['attributes']['filter'](_0x559e2f=>!_0x559e2f[0x0]['startsWith']('data-revision-')));}),_0xa87e2d;}async['compare'](_0x2e6705,_0x2395aa,_0x5766f7=!0x1){if(!this['isEnabled'])return;const _0x3fecaa=this['diff'],_0x3f706b=this['repository'],_0x105932='string'==typeof _0x2e6705?_0x3f706b['getRevision'](_0x2e6705):_0x2e6705,_0x580a40='string'==typeof _0x2395aa?_0x3f706b['getRevision'](_0x2395aa):_0x2395aa,_0x2d5758=_0x105932['id'],_0x38cb49=_0x580a40?_0x580a40['id']:null;if(!_0x5766f7&&this['diff']&&this['diff']['newRevisionId']===_0x2d5758&&this['diff']['oldRevisionId']===_0x38cb49)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x2d5758,_0x38cb49);const _0x1881e1=this['_getRevisionsRange'](_0x105932,_0x580a40,!0x0)['map'](_0x44de19=>this['loadRevisionData'](_0x44de19));return _0x1881e1['push'](new Promise(_0x47083e=>{setTimeout(_0x47083e,0x14);})),Promise['all'](_0x1881e1)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x145e56=this['_getDiff'](_0x2d5758,_0x38cb49);for(const _0x27269e of _0x145e56['changes'])this['_changeIdToChange']['set'](_0x27269e['id'],_0x27269e);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4abde0=>{for(const _0x1a4fa3 of this['editor']['model']['document']['getRootNames']())_0x4abde0['detachRoot'](_0x1a4fa3);for(const _0x3d2104 of Object['keys'](_0x145e56['model'])){const _0x5952c5=_0x4abde0['addRoot'](_0x3d2104);for(const _0x28d61d of Object['keys'](_0x145e56['attributes'][_0x3d2104]))_0x4abde0['setAttribute'](_0x28d61d,_0x145e56['attributes'][_0x3d2104][_0x28d61d],_0x5952c5);_0x4abde0['insert'](_0x145e56['model'][_0x3d2104],_0x5952c5,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x145e56['changes'])),this['isReady']=!0x0;})['catch'](_0x3dddc6=>{console['error'](_0x3dddc6),this['_cleanUp'](),_0x3fecaa&&(this['diff']=_0x3fecaa),this['isReady']=!0x0;});}['addRevisionData'](_0x4c579c,_0x4a52f4){const _0x19ee21=this['repository']['createRevision'](_0x4c579c);return _0x19ee21['on']('_update',(_0x179478,_0x508708,_0x50ab81)=>_0x4a52f4(_0x508708,_0x50ab81,_0x19ee21)),this['repository']['addRevision'](_0x19ee21),_0x19ee21;}['loadRevisionData'](_0x40ed44){if(!_0x40ed44||_0x40ed44['diffData'])return Promise['resolve']();{const _0xe78c28=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0xe78c28,'revisionId':_0x40ed44['id']})['then'](_0x215a09=>{_0x40ed44['_update']({'diffData':_0x215a09['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x37a0b7=>{for(const _0x396a5f of this['editor']['model']['document']['getRootNames']())_0x37a0b7['detachRoot'](_0x396a5f);});}['_sortAndFilterDiffChanges'](_0x4c8e21){const _0x21db6e=[],_0x457022=new Map();for(const _0x47071c of this['editor']['model']['document']['getRootNames']()){const _0x1d8425=this['editor']['editing']['view']['getDomRoot'](_0x47071c);if(!_0x1d8425)continue;const _0x290dde=_0x1d8425['getClientRects']()['item'](0x0);_0x290dde&&(_0x21db6e['push'](_0x47071c),_0x457022['set'](_0x47071c,_0x290dde));}return _0x21db6e['sort']((_0x262e7b,_0x4d6c2d)=>{const _0x16e404=_0x457022['get'](_0x262e7b),_0x4078f1=_0x457022['get'](_0x4d6c2d);return _0x16e404['y']-_0x4078f1['y']||_0x16e404['x']-_0x4078f1['x'];}),(_0x4c8e21=_0x4c8e21['filter'](_0x2264bd=>_0x21db6e['includes'](_0x2264bd['rootName'])))['sort']((_0x14fccf,_0xf7dd8a)=>_0x21db6e['indexOf'](_0x14fccf['rootName'])-_0x21db6e['indexOf'](_0xf7dd8a['rootName'])),_0x4c8e21;}['_makeTape'](_0xc1f0ae){const _0xe5f094=Array['from'](_0xc1f0ae['markers'])['filter'](([_0x25ad7a,_0x273a23])=>_0x25ad7a['startsWith']('revision:')&&!_0x273a23['isCollapsed']),_0x25284c=Array['from'](this['editor']['model']['createRangeIn'](_0xc1f0ae)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0xe5f094['length'])for(const _0x4ae9f8 of _0x25284c){const [_0x436060,_0x34058b]=_0xe5f094[0x0],[,_0x256ae5,_0x541454]=_0x436060['split'](':');if(_0x34058b['end']['isEqual'](_0x4ae9f8['nextPosition'])&&_0xe5f094['shift'](),(_0x4ae9f8['previousPosition']['isEqual'](_0x34058b['start'])||_0x4ae9f8['previousPosition']['isAfter'](_0x34058b['start']))&&('insertion'==_0x256ae5?_0x4ae9f8['isAdded']={'userId':_0x541454}:'deletion'==_0x256ae5&&(_0x4ae9f8['isRemoved']={'userId':_0x541454})),0x0==_0xe5f094['length'])break;}return _0x25284c;}['_refreshStartEndIndex'](_0x229a22){const _0x1f1165=new Map();for(let _0x50f8ff=0x0;_0x50f8ff<_0x229a22['length'];_0x50f8ff++)'text'===_0x229a22[_0x50f8ff]['type']?(_0x229a22[_0x50f8ff]['item']['startIndex']=_0x50f8ff,_0x229a22[_0x50f8ff]['item']['endIndex']=_0x50f8ff):('elementStart'===_0x229a22[_0x50f8ff]['type']?_0x229a22[_0x50f8ff]['item']['startIndex']=_0x50f8ff:'elementEnd'===_0x229a22[_0x50f8ff]['type']&&(_0x229a22[_0x50f8ff]['item']['endIndex']=_0x50f8ff),_0x1f1165['set'](_0x229a22[_0x50f8ff]['id'],_0x50f8ff));for(const _0x36d1cc of _0x1f1165['values']())'elementStart'===_0x229a22[_0x36d1cc]['type']?_0x229a22[_0x36d1cc]['item']['endIndex']=_0x1f1165['get'](_0x229a22[_0x36d1cc]['pairId']):'elementEnd'===_0x229a22[_0x36d1cc]['type']&&(_0x229a22[_0x36d1cc]['item']['startIndex']=_0x1f1165['get'](_0x229a22[_0x36d1cc]['pairId']));}['_processTape'](_0x55c063){for(let _0x1c6dce=0x0;_0x1c6dce<_0x55c063['length'];_0x1c6dce++){if('elementStart'===_0x55c063[_0x1c6dce]['type'])_0x55c063[_0x1c6dce]['item']['startIndex']=_0x1c6dce;else{if('elementEnd'===_0x55c063[_0x1c6dce]['type']){_0x55c063[_0x1c6dce]['item']['endIndex']=_0x1c6dce;const _0x16fc84=_0x55c063[_0x1c6dce]['item']['startIndex'];_0x55c063[_0x16fc84]['pairId']=_0x55c063[_0x1c6dce]['id'],_0x55c063[_0x1c6dce]['pairId']=_0x55c063[_0x16fc84]['id'];}else _0x55c063[_0x1c6dce]['item']['startIndex']=_0x1c6dce,_0x55c063[_0x1c6dce]['item']['endIndex']=_0x1c6dce,_0x55c063[_0x1c6dce]['pairId']=null;}_0x55c063[_0x1c6dce]['markersStart']||(_0x55c063[_0x1c6dce]['markersStart']=[],_0x55c063[_0x1c6dce]['markersEnd']=[]);}}['_markInsertions'](_0xcc6e5,_0x4c5cde){const _0x39aa5a=_0xcc6e5['filter'](_0x17fd9f=>!_0x17fd9f['isAdded']);for(let _0x1fb9b3=0x0;_0x1fb9b3<_0x4c5cde['length'];_0x1fb9b3++)_0x4c5cde[_0x1fb9b3]['isAdded']&&(_0x39aa5a[_0x1fb9b3]['isAdded']=_0x4c5cde[_0x1fb9b3]['isAdded']);}['_makeModelFromViewString'](_0x13d7b7){const _0x23b771=JSON['parse'](_0x13d7b7),_0x599b65=this['editor']['editing']['view']['document'],_0x207e73=new _0xa0965c(_0x599b65,_0x23b771['map'](_0x31b107=>this['_getViewObj'](_0x31b107)));return this['editor']['data']['toModel'](_0x207e73);}['_getViewObj'](_0x5a32d1){const _0x1773fe=this['editor']['editing']['view']['document'];if('string'==typeof _0x5a32d1)return new _0xad2221(_0x1773fe,_0x5a32d1);{const _0x549a4b=_0x5a32d1['children']['map'](_0x1507fb=>this['_getViewObj'](_0x1507fb));return new(Z[_0x5a32d1['type']]||_0x12e000)(_0x1773fe,_0x5a32d1['name'],_0x5a32d1['attributes'],_0x549a4b);}}['_getDiff'](_0x464de2,_0x4cbead=null){const _0x5564e4=this['repository']['getRevision'](_0x464de2),_0x1bc5c9=_0x4cbead?this['repository']['getRevision'](_0x4cbead):null,_0x418da1=this['_getRevisionsRange'](_0x5564e4,_0x1bc5c9),_0x383c7b=_0x418da1[_0x418da1['length']-0x1],_0x503a3e=new Map(),_0x38fbb4={'model':{},'attributes':{},'changes':[]},_0x43d8fa=new Set(),_0x546dcf=new Map();for(let _0x23da13=_0x418da1['length']-0x1;_0x23da13>=0x0;_0x23da13--){const _0x2eefb9=_0x418da1[_0x23da13];for(const _0x3db89f of Object['keys'](_0x2eefb9['diffData']))if(_0x2eefb9['diffData'][_0x3db89f]['attachChange']){const _0x25beea=_0x2eefb9['diffData'][_0x3db89f]['attachChange'];_0x25beea['isAttached']?(_0x43d8fa['add'](_0x3db89f),_0x546dcf['has'](_0x3db89f)&&_0x546dcf['get'](_0x3db89f)['userId']==_0x25beea['userId']?_0x546dcf['delete'](_0x3db89f):_0x546dcf['set'](_0x3db89f,_0x25beea)):_0x546dcf['has'](_0x3db89f)?(_0x43d8fa['delete'](_0x3db89f),_0x546dcf['delete'](_0x3db89f)):(_0x43d8fa['add'](_0x3db89f),_0x546dcf['set'](_0x3db89f,_0x25beea));}else _0x43d8fa['add'](_0x3db89f);}for(const _0x4ab8a9 of _0x43d8fa){const _0x1f0f62=_0x546dcf['has'](_0x4ab8a9)&&!_0x546dcf['get'](_0x4ab8a9)['isAttached'];let _0x579f81=_0x1f0f62?_0x418da1['length']-0x1:0x0;const _0x5c9646=_0x1f0f62?-0x1:0x1;for(;_0x418da1[_0x579f81];){const _0x122f5e=_0x418da1[_0x579f81];if(_0x122f5e['diffData'][_0x4ab8a9]){const _0x500e60=_0x1f0f62?_0x122f5e['diffData'][_0x4ab8a9]['attributesBefore']:_0x122f5e['diffData'][_0x4ab8a9]['attributesAfter'];_0x38fbb4['attributes'][_0x4ab8a9]=_0x500e60?_0x55297f(_0x500e60):{};break;}_0x579f81+=_0x5c9646;}}for(const _0x59a4de of _0x418da1){_0x59a4de['model']={};for(const _0x500cad of _0x59a4de['authors'])_0x503a3e['set'](_0x500cad['id'],_0x500cad);for(const _0x24d987 of _0x43d8fa){const _0x24ac39=_0x59a4de['diffData'][_0x24d987]?_0x59a4de['diffData'][_0x24d987]['insertions']:'[]',_0x269f7a=_0x59a4de['diffData'][_0x24d987]?_0x59a4de['diffData'][_0x24d987]['deletions']:'[]';_0x59a4de['model'][_0x24d987]={'insertions':this['_makeModelFromViewString'](_0x24ac39),'deletions':this['_makeModelFromViewString'](_0x269f7a)};}}for(const _0x47dcb0 of _0x43d8fa){let _0x49cf3c=null,_0xf5c70c=0x0;const _0x1a69ed=new Map(Array['from'](_0x5564e4['model'][_0x47dcb0]['insertions']['markers'])['filter'](([_0x2244a5])=>!_0x2244a5['startsWith']('revision:')));let _0xa7460a=0x0;for(const _0x2f3484 of _0x418da1){const _0x200585=this['_makeTape'](_0x2f3484['model'][_0x47dcb0]['insertions']);_0x2f3484==_0x5564e4?(_0x49cf3c=_0x200585,_0xf5c70c=_0x49cf3c['length'],_0x49cf3c['forEach'](_0x550363=>{_0x550363['id']=_0xa7460a++;}),this['_processTape'](_0x49cf3c)):this['_markInsertions'](_0x49cf3c,_0x200585);const _0x2ab8df=_0x49cf3c['filter'](_0x1f1894=>!_0x1f1894['isAdded'])['map'](_0x4fee18=>_0x4fee18['id']);let _0x351fa8=0x0;const _0x5c03f0=this['_makeTape'](_0x2f3484['model'][_0x47dcb0]['deletions']);_0x5c03f0['forEach'](_0x2a4e83=>{_0x2a4e83['isRemoved']?_0x2a4e83['id']=_0xf5c70c++:_0x2a4e83['id']=_0x2ab8df[_0x351fa8++];}),this['_processTape'](_0x5c03f0),this['_setDistance'](_0x49cf3c,'isAdded'),this['_setDistance'](_0x5c03f0,'isRemoved'),_0x2f3484==_0x5564e4&&this['_markMarkers'](_0x49cf3c,_0x1a69ed),_0x49cf3c=this['_joinTapes'](_0x49cf3c,_0x5c03f0),this['_refreshStartEndIndex'](_0x49cf3c),this['_setDistance'](_0x49cf3c,'isRemoved');}_0x49cf3c=_0x49cf3c['filter'](_0x3a5844=>!(_0x3a5844['isAdded']&&_0x3a5844['isRemoved']));const _0x18df74=new Map(_0x383c7b['model'][_0x47dcb0]['deletions']['markers']),_0x5cd180=new Set(_0x1a69ed['keys']());for(const _0x3e359c of _0x18df74['keys']())_0x5cd180['delete'](_0x3e359c);this['_markSuggestions'](_0x49cf3c,_0x5cd180),this['_fixObsoleteTags'](_0x49cf3c),_0x49cf3c=this['_removeMissingPairs'](_0x49cf3c),_0x49cf3c=this['_markMismatchedRemovedTags'](_0x49cf3c),_0x49cf3c=this['_removeUnsupportedChanges'](_0x49cf3c);const {root:_0x3d2e29,changes:_0x81d25c}=this['_makeModelFromTape'](_0x49cf3c,_0x503a3e,_0x47dcb0);_0x38fbb4['model'][_0x47dcb0]=_0x3d2e29;const _0x4a255d=_0x546dcf['get'](_0x47dcb0);if(_0x4a255d){const _0x167810=_0x503a3e['get'](_0x4a255d['userId']),_0x180ba2=new r({'author':_0x167810,'type':_0x4a255d['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x47dcb0});_0x81d25c['unshift'](_0x180ba2),_0x38fbb4['attributes'][_0x47dcb0]['revisionHistoryAttachChange']=_0x180ba2['id'];}_0x38fbb4['changes']=_0x38fbb4['changes']['concat'](_0x81d25c);}return _0x38fbb4;}['_markMarkers'](_0xc91a68,_0x4e27fc){for(let _0x4548cb=0x0;_0x4548cb<_0xc91a68['length'];_0x4548cb++)for(const [_0xc6cd08,_0x1e570d]of _0x4e27fc)_0x1e570d['start']['isEqual'](_0xc91a68[_0x4548cb]['previousPosition'])&&_0xc91a68[_0x4548cb]['markersStart']['push'](_0xc6cd08),_0x1e570d['end']['isEqual'](_0xc91a68[_0x4548cb]['nextPosition'])&&_0xc91a68[_0x4548cb]['markersEnd']['push'](_0xc6cd08);}['_joinTapes'](_0x1dfc88,_0x300f49){let _0x31347e=[],_0x409903=0x0,_0x5c924d=0x0;for(;_0x409903<_0x1dfc88['length']||_0x5c924d<_0x300f49['length'];){const _0x466a5e=_0x1dfc88[_0x409903]||{},_0x4900ec=_0x300f49[_0x5c924d]||{};if(_0x466a5e['id']==_0x4900ec['id'])_0x409903++,_0x5c924d++,_0x31347e['push'](_0x466a5e);else{if(_0x4900ec['isRemoved']&&_0x466a5e['isAdded']){const {commonTape:_0x314faf,iEnd:_0xdf0667,jEnd:_0x124ccc}=this['_threeWayMerge'](_0x1dfc88,_0x409903,_0x300f49,_0x5c924d);_0x31347e=_0x31347e['concat'](_0x314faf),_0x409903=_0xdf0667,_0x5c924d=_0x124ccc;}else _0x4900ec['isRemoved']?(_0x5c924d++,_0x31347e['push'](_0x4900ec)):(_0x409903++,_0x31347e['push'](_0x466a5e));}}return _0x31347e;}['_markSuggestions'](_0x22fbed,_0x36dfd2){const _0x3eebe6=[];for(let _0x1265c9=0x0;_0x1265c9<_0x22fbed['length'];_0x1265c9++){for(let _0x12022b=0x0;_0x12022b<_0x22fbed[_0x1265c9]['markersStart']['length'];_0x12022b++){const _0x1ca55e=_0x22fbed[_0x1265c9]['markersStart'][_0x12022b];if(!_0x36dfd2['has'](_0x1ca55e))continue;const {group:_0x36e0d,type:_0xe8344,authorId:_0x5c97a2}=_0x316f89(_0x1ca55e);'revision-suggestion'!=_0x36e0d||'insertion'!=_0xe8344&&'deletion'!=_0xe8344||(_0x3eebe6['unshift']({'type':_0xe8344,'name':_0x1ca55e,'userId':_0x5c97a2}),_0x22fbed[_0x1265c9]['markersStart']['splice'](_0x12022b,0x1),_0x12022b--);}_0x12d1f8(_0x22fbed[_0x1265c9]);for(let _0x18b1b3=0x0;_0x18b1b3<_0x22fbed[_0x1265c9]['markersEnd']['length'];_0x18b1b3++){const _0x1de632=_0x22fbed[_0x1265c9]['markersEnd'][_0x18b1b3];if(!_0x36dfd2['has'](_0x1de632))continue;const {group:_0x4ab477,type:_0x3f497c}=_0x316f89(_0x1de632);if('revision-suggestion'!=_0x4ab477||'insertion'!=_0x3f497c&&'deletion'!=_0x3f497c)continue;_0x22fbed[_0x1265c9]['markersEnd']['splice'](_0x18b1b3,0x1),_0x18b1b3--;const _0x45d6a1=_0x3eebe6['findIndex'](_0x1fbe91=>_0x1fbe91['name']==_0x1de632);_0x45d6a1>-0x1&&_0x3eebe6['splice'](_0x45d6a1,0x1);}}function _0x316f89(_0x1f24ed){const _0x312711=_0x1f24ed['split'](':');return{'group':_0x312711[0x0],'type':_0x312711[0x1],'subType':_0x312711['length']>=0x5?_0x312711[0x2]:null,'id':_0x312711['length']<0x5?_0x312711[0x2]:_0x312711[0x3],'authorId':_0x312711['length']<0x5?_0x312711[0x3]:_0x312711[0x4],'markerCount':0x6==_0x312711['length']?_0x312711[0x5]:null};}function _0x12d1f8(_0x1795b1){for(let _0x2b86bc=0x0;_0x2b86bc<_0x3eebe6['length'];_0x2b86bc++){if(_0x1795b1['isAdded']&&'insertion'==_0x3eebe6[_0x2b86bc]['type'])return _0x1795b1['isAddSuggestion']=_0x3eebe6[_0x2b86bc],void delete _0x1795b1['isAdded'];if(!_0x1795b1['isAdded']&&!_0x1795b1['isRemoved']&&'deletion'==_0x3eebe6[_0x2b86bc]['type'])return void(_0x1795b1['isRemoveSuggestion']=_0x3eebe6[_0x2b86bc]);}}}['_setDistance'](_0x605cd5,_0x10f254){let _0x38decc=0x0,_0x249302=!0x1;const _0x14e231=new Map();for(const _0x46bd4b of _0x605cd5)_0x46bd4b[_0x10f254]?_0x249302&&(_0x38decc++,_0x249302=!0x1):(_0x38decc++,_0x249302=!0x0),_0x14e231['set'](_0x46bd4b['id'],_0x38decc);for(let _0x2427c8=0x0;_0x2427c8<_0x605cd5['length'];_0x2427c8++){if('isRemoved'==_0x10f254&&_0x605cd5[_0x2427c8]['isAdded']||'isAdded'==_0x10f254&&_0x605cd5[_0x2427c8]['isRemoved'])continue;if('text'==_0x605cd5[_0x2427c8]['type']){_0x605cd5[_0x2427c8]['distance']=0x0;continue;}const _0x32b8ff=_0x14e231['get'](_0x605cd5[_0x2427c8]['pairId']),_0x503f7f=_0x14e231['get'](_0x605cd5[_0x2427c8]['id']);_0x605cd5[_0x2427c8]['distance']=_0x32b8ff-_0x503f7f;}}['_getRevisionsRange'](_0x204964,_0x119649,_0x7b0dbb=!0x1){const _0x233ed1=[];let _0x428ba2=this['repository']['getIndex'](_0x204964),_0x513f9b=this['repository']['getIndex'](_0x119649);for(-0x1==_0x513f9b&&(_0x513f9b=this['repository']['_revisions']['length'],_0x7b0dbb=!0x1);_0x428ba2<_0x513f9b;)_0x233ed1['push'](this['repository']['getRevision'](_0x428ba2)),_0x428ba2++;return _0x7b0dbb&&_0x233ed1['push'](this['repository']['getRevision'](_0x428ba2)),_0x233ed1;}['_threeWayMerge'](_0x4185fa,_0x944a3a,_0x54e1d8,_0x5999ca){const _0x28a44f=this['editor']['model']['schema'];let _0x2519fa=_0x944a3a;for(;_0x4185fa[_0x2519fa]&&_0x4185fa[_0x2519fa]['isAdded'];)_0x2519fa++;let _0x2ec46b=_0x5999ca;for(;_0x54e1d8[_0x2ec46b]&&_0x54e1d8[_0x2ec46b]['isRemoved'];)_0x2ec46b++;_0x233636(_0x4185fa,_0x944a3a,_0x2519fa),_0x233636(_0x54e1d8,_0x5999ca,_0x2ec46b);const _0xc29082=_0x54e1d8['slice'](_0x5999ca,_0x2ec46b)['concat'](_0x4185fa['slice'](_0x944a3a,_0x2519fa));return _0xc29082['sort']((_0x74da57,_0x2c6655)=>_0x74da57['side']!=_0x2c6655['side']?_0x74da57['side']-_0x2c6655['side']:_0x74da57['level']!=_0x2c6655['level']?_0x74da57['level']-_0x2c6655['level']:_0x74da57['distance']!=_0x2c6655['distance']?_0x2c6655['distance']-_0x74da57['distance']:!!_0x74da57['isAdded']!=!!_0x2c6655['isAdded']?-0x1==_0x74da57['side']||0x0==_0x74da57['side']?_0x74da57['isAdded']?-0x1:0x1:_0x74da57['isAdded']?0x1:-0x1:_0x74da57['index']-_0x2c6655['index']),{'commonTape':_0xc29082,'iEnd':_0x2519fa,'jEnd':_0x2ec46b};function _0x233636(_0x1c029a,_0x1333de,_0x4ee846){let _0x3b0efc=-0x1,_0x279dde=Number['POSITIVE_INFINITY'],_0x1eff22=!0x0;for(let _0x6a78ac=_0x1333de;_0x6a78ac<_0x4ee846;_0x6a78ac++)if(_0x28a44f['isInline'](_0x1c029a[_0x6a78ac]['item'])||(_0x1eff22=!0x1),_0x1c029a[_0x6a78ac]['item']['startIndex']<_0x1333de&&(_0x3b0efc=_0x6a78ac),_0x1c029a[_0x6a78ac]['item']['endIndex']>=_0x4ee846){_0x279dde=_0x6a78ac;break;}_0x1eff22&&(_0x3b0efc=_0x4ee846-0x1);for(let _0x4e71c6=_0x1333de;_0x4e71c6<_0x4ee846;_0x4e71c6++)_0x1c029a[_0x4e71c6]['side']=_0x4e71c6<=_0x3b0efc?-0x1:_0x4e71c6<_0x279dde?0x0:0x1,_0x1c029a[_0x4e71c6]['index']=_0x4e71c6;let _0x1973c3=0x0;for(let _0x32d022=_0x1333de;_0x32d022<=_0x3b0efc;_0x32d022++)0x0==_0x1c029a[_0x32d022]['distance']?_0x1c029a[_0x32d022]['level']=_0x1973c3:(_0x1973c3++,_0x1c029a[_0x32d022]['level']=_0x1973c3,_0x1973c3++);for(let _0x58d8d9=_0x1333de;_0x58d8d9<_0x4ee846;_0x58d8d9++)0x0==_0x1c029a[_0x58d8d9]['side']&&(_0x1c029a[_0x58d8d9]['level']=_0x1973c3);_0x1973c3=0x0;for(let _0x1cb547=_0x4ee846-0x1;_0x1cb547>=_0x279dde;_0x1cb547--)0x0==_0x1c029a[_0x1cb547]['distance']?_0x1c029a[_0x1cb547]['level']=_0x1973c3:(_0x1973c3--,_0x1c029a[_0x1cb547]['level']=_0x1973c3,_0x1973c3--);}}['_fixObsoleteTags'](_0x156116){const _0x129cf0=new Map(),_0x191c1c=this['editor']['model']['schema'];for(let _0x507d53=0x1;_0x507d53<_0x156116['length'];_0x507d53++){let _0x28f56c,_0x209d41,_0x32eefb;const _0x3d3ef5=_0x156116[_0x507d53],_0x278c39=_0x156116[_0x507d53-0x1];if('text'==_0x3d3ef5['type'])continue;if(_0x3d3ef5['type']!=_0x278c39['type'])continue;if(!_0x191c1c['isBlock'](_0x278c39['item'])||_0x191c1c['isLimit'](_0x278c39['item']))continue;if(!_0x191c1c['isBlock'](_0x3d3ef5['item'])||_0x191c1c['isLimit'](_0x3d3ef5['item']))continue;if((_0x156116[_0x507d53]['isAdded']||_0x156116[_0x507d53]['isAddSuggestion'])&&_0x156116[_0x507d53-0x1]['isRemoved'])_0x28f56c=_0x156116[_0x507d53],_0x209d41=_0x156116[_0x507d53-0x1],_0x32eefb=_0x507d53-0x1;else{if(!_0x156116[_0x507d53]['isRemoved']||!_0x156116[_0x507d53-0x1]['isAdded']&&!_0x156116[_0x507d53-0x1]['isAddSuggestion'])continue;_0x28f56c=_0x156116[_0x507d53-0x1],_0x209d41=_0x156116[_0x507d53],_0x32eefb=_0x507d53;}const _0x48dadb=_0x28f56c['level']==_0x209d41['level'],_0x1d21ae=Math['abs'](_0x28f56c['level'])<Math['abs'](_0x209d41['level'])&&0x0==_0x209d41['distance'];(_0x48dadb||_0x1d21ae)&&(_0x129cf0['set'](_0x209d41['id'],_0x28f56c['id']),_0x156116['splice'](_0x32eefb,0x1),_0x507d53--,_0x28f56c['isAdded']=!0x1);}for(let _0x2b6b12=0x0;_0x2b6b12<_0x156116['length'];_0x2b6b12++)_0x129cf0['has'](_0x156116[_0x2b6b12]['pairId'])&&(_0x156116[_0x2b6b12]['pairId']=_0x129cf0['get'](_0x156116[_0x2b6b12]['pairId']));}['_removeMissingPairs'](_0x9f11b6){const _0x518a00=new Set(_0x9f11b6['map'](_0x445068=>_0x445068['id']));for(let _0x1d5c40=0x0;_0x1d5c40<_0x9f11b6['length'];_0x1d5c40++)_0x518a00['has'](_0x9f11b6[_0x1d5c40]['pairId'])||0x0==_0x9f11b6[_0x1d5c40]['distance']||(_0x9f11b6[_0x1d5c40]['isIncorrect']=!0x0);return _0x9f11b6['filter'](_0x1d7e55=>!_0x1d7e55['isIncorrect']);}['_markMismatchedRemovedTags'](_0xd47609){const _0x9d5af9=new Set();for(let _0x43110f=0x0;_0x43110f<_0xd47609['length'];_0x43110f++){if(_0x9d5af9['has'](_0xd47609[_0x43110f]['id'])&&_0xd47609[_0x43110f]['isRemoved']&&(_0xd47609[_0x43110f]['isIncorrect']=!0x0),_0xd47609[_0x43110f]['isIncorrect'])continue;if(0x0==_0xd47609[_0x43110f]['distance'])continue;if('elementStart'!=_0xd47609[_0x43110f]['type'])continue;if(null==_0xd47609[_0x43110f]['pairId'])continue;let _0x4a8bcc=_0x43110f+0x1,_0x7277c4=0x0;for(;_0xd47609[_0x4a8bcc]['id']!=_0xd47609[_0x43110f]['pairId'];)'elementStart'==_0xd47609[_0x4a8bcc]['type']?_0x7277c4++:'elementEnd'==_0xd47609[_0x4a8bcc]['type']&&_0x7277c4--,_0x4a8bcc++;if(0x0!=_0x7277c4){if(_0xd47609[_0x43110f]['isRemoved'])_0xd47609[_0x43110f]['isIncorrect']=!0x0;else{for(;_0x4a8bcc!=_0x43110f;)_0xd47609[_0x4a8bcc]['isRemoved']&&0x0!=_0xd47609[_0x4a8bcc]['distance']&&(_0xd47609[_0x4a8bcc]['isIncorrect']=!0x0,_0x9d5af9['add'](_0xd47609[_0x4a8bcc]['pairId'])),_0x4a8bcc--;}}}return _0xd47609['filter'](_0x3247ab=>!_0x3247ab['isIncorrect']);}['_removeUnsupportedChanges'](_0x5e0046){const _0xafb6ce=this['editor']['model']['schema'];for(let _0x4dd003=0x0;_0x4dd003<_0x5e0046['length'];_0x4dd003++){if(!(_0x5e0046[_0x4dd003]['isAdded']||_0x5e0046[_0x4dd003]['isAddSuggestion']||_0x5e0046[_0x4dd003]['isRemoved']||_0x5e0046[_0x4dd003]['isRemoveSuggestion']))continue;if(0x0==_0x5e0046[_0x4dd003]['distance'])continue;const _0x1b8909=_0x5e0046[_0x4dd003]['item'];_0xafb6ce['isBlock'](_0x1b8909)||_0xafb6ce['isLimit'](_0x1b8909)||(_0x5e0046[_0x4dd003]['isAdded']&&delete _0x5e0046[_0x4dd003]['isAdded'],_0x5e0046[_0x4dd003]['isAddSuggestion']&&delete _0x5e0046[_0x4dd003]['isAddSuggestion'],_0x5e0046[_0x4dd003]['isRemoveSuggestion']&&delete _0x5e0046[_0x4dd003]['isRemoveSuggestion'],_0x5e0046[_0x4dd003]['isRemoved']&&(_0x5e0046[_0x4dd003]['isIncorrect']=!0x0));}return _0x5e0046['filter'](_0x59f20f=>!_0x59f20f['isIncorrect']);}['_makeModelFromTape'](_0x41c46c,_0x5878d6,_0x58fb81){const _0x19533d=new wt(),_0x45307f=[],_0x32f0a6=new Map(),_0x521597=this['editor']['model'],_0xd07678=_0x521597['schema'],_0x3e1264=[_0x19533d],_0x225e96={},_0x2be31a={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x3937a1=null;const _0x4d8b32=[0x0];for(let _0x118d2f=0x0;_0x118d2f<_0x41c46c['length'];_0x118d2f++)if('elementStart'===_0x41c46c[_0x118d2f]['type']){_0x41c46c[_0x118d2f]['previousPosition']=_0x521597['createPositionFromPath'](_0x19533d,_0x4d8b32);const _0x1082f8=new ft(_0x41c46c[_0x118d2f]['item']['name'],_0x41c46c[_0x118d2f]['item']['getAttributes']());_0x3e1264[0x0]['_appendChild'](_0x1082f8),_0x4d8b32['push'](0x0),_0x3e1264['unshift'](_0x1082f8),_0x41c46c[_0x118d2f]['nextPosition']=_0x521597['createPositionFromPath'](_0x19533d,_0x4d8b32);}else'elementEnd'===_0x41c46c[_0x118d2f]['type']?(_0x3e1264['shift'](),_0x41c46c[_0x118d2f]['previousPosition']=_0x521597['createPositionFromPath'](_0x19533d,_0x4d8b32),_0x4d8b32['pop'](),_0x4d8b32[_0x4d8b32['length']-0x1]++,_0x41c46c[_0x118d2f]['nextPosition']=_0x521597['createPositionFromPath'](_0x19533d,_0x4d8b32)):(_0x41c46c[_0x118d2f]['previousPosition']=_0x521597['createPositionFromPath'](_0x19533d,_0x4d8b32),_0x3937a1?_0x3937a1['_data']+=_0x41c46c[_0x118d2f]['item']['data']:_0x3937a1=new _t(_0x41c46c[_0x118d2f]['item']['data'],_0x41c46c[_0x118d2f]['item']['getAttributes']()),_0x41c46c[_0x118d2f+0x1]&&'text'===_0x41c46c[_0x118d2f+0x1]['type']&&_0x132ef1(_0x3937a1,_0x41c46c[_0x118d2f+0x1]['item'])||(_0x3e1264[0x0]['_appendChild'](_0x3937a1),_0x3937a1=null),_0x4d8b32[_0x4d8b32['length']-0x1]+=_0x41c46c[_0x118d2f]['item']['offsetSize'],_0x41c46c[_0x118d2f]['nextPosition']=_0x521597['createPositionFromPath'](_0x19533d,_0x4d8b32));for(let _0x5b6101=0x0;_0x5b6101<_0x41c46c['length'];_0x5b6101++){const _0xe953c7=_0x41c46c[_0x5b6101]['previousPosition'],_0x50cbc7=_0x41c46c[_0x5b6101]['nextPosition'];for(const _0x5a6124 of _0x41c46c[_0x5b6101]['markersStart'])_0x32f0a6['set'](_0x5a6124,{'start':_0xe953c7,'end':null});_0x24e63a('isRemoveSuggestion',_0x5b6101,_0xe953c7,_0x50cbc7),_0x24e63a('isAddSuggestion',_0x5b6101,_0xe953c7,_0x50cbc7),_0x24e63a('isRemoved',_0x5b6101,_0xe953c7,_0x50cbc7),_0x24e63a('isAdded',_0x5b6101,_0xe953c7,_0x50cbc7);for(const _0x43013c of _0x41c46c[_0x5b6101]['markersEnd']){_0x32f0a6['get'](_0x43013c)['end']=_0x50cbc7;}}for(const [_0x1c59b4,_0x435ff1]of _0x32f0a6){const _0xb2d109=this['editor']['model']['createRange'](_0x435ff1['start'],_0x435ff1['end']);_0x19533d['markers']['set'](_0x1c59b4,_0xb2d109);}return _0x45307f['sort']((_0x203708,_0x38aefb)=>{const _0x34fb20=_0x19533d['markers']['get']('revision:'+_0x203708['id']),_0x4719ef=_0x19533d['markers']['get']('revision:'+_0x38aefb['id']);return _0x34fb20['start']['isBefore'](_0x4719ef['start'])?-0x1:_0x34fb20['start']['isAfter'](_0x4719ef['start'])?0x1:_0x34fb20['end']['isBefore'](_0x4719ef['end'])?-0x1:_0x34fb20['end']['isAfter'](_0x4719ef['end'])?0x1:'add'===_0x203708['type']?-0x1:0x1;}),{'root':_0x19533d,'changes':_0x45307f};function _0x24e63a(_0x47756a,_0x3c681a,_0x5e7131,_0x15b23b){const _0x43fec6=!!_0x41c46c[_0x3c681a][_0x47756a],_0x5103a9=_0x43fec6?_0x41c46c[_0x3c681a][_0x47756a]['userId']:null,_0x5b93be=_0x3c681a===_0x41c46c['length']-0x1,_0x5578ed=_0x2be31a[_0x47756a][0x0],_0x4b80a6=_0xd07678['isObject'](_0x41c46c[_0x3c681a]['item']);!_0x225e96[_0x47756a]&&_0x43fec6?_0x225e96[_0x47756a]={'start':_0x5e7131,'tapeItem':_0x41c46c[_0x3c681a],'userId':_0x5103a9,'type':_0x47756a}:_0x225e96[_0x47756a]&&!_0x43fec6?(_0x225e96[_0x47756a]['end']=_0x5e7131,_0x312be7(_0x225e96[_0x47756a]),_0x225e96[_0x47756a]=null):_0x225e96[_0x47756a]&&_0x43fec6&&_0x225e96[_0x47756a]['userId']!==_0x5103a9&&(_0x225e96[_0x47756a]['end']=_0x5e7131,_0x5578ed&&_0x5578ed['userId']===_0x225e96[_0x47756a]['userId']||_0x312be7(_0x225e96[_0x47756a]),_0x225e96[_0x47756a]={'start':_0x5e7131,'tapeItem':_0x41c46c[_0x3c681a],'userId':_0x5103a9,'type':_0x47756a}),_0x225e96[_0x47756a]&&_0x4b80a6&&('elementStart'!==_0x41c46c[_0x3c681a]['type']||_0x5578ed&&_0x5578ed['userId']===_0x5103a9||_0x2be31a[_0x47756a]['unshift']({'userId':_0x5103a9,'object':_0x41c46c[_0x3c681a]['item'],'change':_0x225e96[_0x47756a]}),'elementEnd'===_0x41c46c[_0x3c681a]['type']&&_0x5578ed&&_0x5578ed['object']===_0x41c46c[_0x3c681a]['item']&&(_0x2be31a[_0x47756a]['shift'](),_0x225e96[_0x47756a]=_0x5578ed['change'])),_0x225e96[_0x47756a]&&_0x5b93be&&(_0x225e96[_0x47756a]['end']=_0x15b23b,_0x312be7(_0x225e96[_0x47756a]),_0x225e96[_0x47756a]=null);}function _0x312be7({start:_0x248615,end:_0x4d4b4b,tapeItem:_0x3d2b32,userId:_0x209a6a,type:_0x353c0a}){const _0x2d3aa9=_0x3d2b32['item'],_0x5bf27d=_0x521597['schema']['isBlock'](_0x2d3aa9)&&!_0x521597['schema']['isLimit'](_0x2d3aa9),_0x3e129d=_0x248615['nodeAfter']==_0x4d4b4b['parent']&&_0x4d4b4b['isAtStart'];if(_0x5bf27d&&_0x3e129d)return;const _0x31f40e=_0x521597['createRange'](_0x248615,_0x4d4b4b),_0x344907=_0x5878d6['get'](_0x209a6a),_0x1291c4=new r({'author':_0x344907,'type':'isAdded'==_0x353c0a||'isAddSuggestion'==_0x353c0a?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x353c0a||'isRemoveSuggestion'==_0x353c0a},'createdAt':new Date(),'rootName':_0x58fb81});_0x45307f['push'](_0x1291c4),_0x19533d['markers']['set']('revision:'+_0x1291c4['id'],_0x31f40e);}function _0x132ef1(_0xd8194d,_0x456f04){const _0x45d869=_0xd8194d['getAttributes'](),_0x33ec7d=_0x456f04['getAttributes']();for(const _0x48aefd of _0x45d869){if(_0x48aefd[0x1]!==_0x456f04['getAttribute'](_0x48aefd[0x0]))return!0x1;_0x33ec7d['next']();}return _0x33ec7d['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x4b7334=>{const _0x316a52=_0x4b7334['markerName']['split'](':')[0x1],_0x26672c=this['_getChangeFromId'](_0x316a52);if(!_0x26672c)return null;const _0x420240='add'==_0x26672c['type']?'insertion':'deletion',_0x5605f4=['ck-suggestion-marker','ck-suggestion-marker-'+_0x420240];return _0x26672c['data']['isSuggestion']&&_0x5605f4['push']('ck-suggestion-marker-'+_0x420240+'-new'),this['activeChange']==_0x26672c&&_0x5605f4['push']('ck-suggestion-marker--active'),{'classes':_0x5605f4,'attributes':{'data-change-id':_0x316a52}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x410f27=>{_0x410f27['on']('element:pre',(_0x476a48,_0x170532,_0x5130c5)=>{const _0x1f3737=_0x170532['viewItem']['getChild'](0x0);if(!_0x1f3737||!_0x1f3737['is']('element','code'))return;if(!_0x5130c5['consumable']['consume'](_0x1f3737,{'attributes':['vid_start','vid_end']}))return;const _0x46b1b8=_0x170532['modelRange']['start']['nodeAfter'];_0x5130c5['writer']['setAttribute']('vid_start',_0x1f3737['getAttribute']('vid_start'),_0x46b1b8),_0x5130c5['writer']['setAttribute']('vid_end',_0x1f3737['getAttribute']('vid_end'),_0x46b1b8);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0xd70b5c=>{_0xd70b5c['on']('element',(_0x26bc96,_0x1a88b0,_0x44ccaf)=>{if(!_0x44ccaf['consumable']['consume'](_0x1a88b0['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1a88b0['modelRange']['isCollapsed'])return;const _0x394b63=_0x1a88b0['modelRange']['start']['nodeAfter'];_0x394b63['hasAttribute']('vid_start')||_0x394b63['hasAttribute']('vid')||(_0x44ccaf['writer']['setAttribute']('vid_start',_0x1a88b0['viewItem']['getAttribute']('vid_start'),_0x394b63),_0x44ccaf['writer']['setAttribute']('vid_end',_0x1a88b0['viewItem']['getAttribute']('vid_end'),_0x394b63));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x4407e7=>_0x4407e7['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x8559d8,[,_0x13f619])=>{['vid_start','vid_end','vid']['includes'](_0x13f619)&&(_0x8559d8['return']=!0x0,_0x8559d8['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x36ac36=>{_0x36ac36['on']('attribute:vid',(_0xac463f,_0x52e2df,_0x554167)=>{if('\x20'!=_0x52e2df['item']['data']||_0x52e2df['item']['parent']['maxOffset']>0x1)return;if(!_0x554167['consumable']['consume'](_0x52e2df['item'],_0xac463f['name']))return;const _0x42ab09=_0x554167['writer'],_0x1f6f5e=_0x554167['mapper']['toViewRange'](_0x52e2df['range']);_0x42ab09['wrap'](_0x1f6f5e,_0x42ab09['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x582a4c){const _0x8430d7=_0x582a4c['plugins']['get']('RevisionViewer');return(_0x2032d6,_0x1cc5eb,_0x3af471)=>{const _0x1833f8=_0x1cc5eb['markerName']['split'](':')[0x1],_0x5c09b7=_0x8430d7['_getChangeFromId'](_0x1833f8);if(!_0x5c09b7)return null;const _0x5a7542='add'==_0x5c09b7['type']?'split':'merge';if(!_0x3af471['consumable']['test'](_0x1cc5eb['markerRange'],_0x2032d6['name']))return;const _0x3776fb=_0x1cc5eb['markerRange']['getWalker'](),_0x142ee9=_0x1cc5eb['markerRange']['start'],_0x4d8f2e=_0x582a4c['model']['schema'];let _0x427081=null,_0x3215af=null,_0x6511a=!0x1,_0x235738=!0x1;for(const _0x3328e2 of _0x3776fb){const _0x19c286=_0x3328e2['item'];_0x6511a=_0x6511a||_0x4d8f2e['isContent'](_0x19c286);const _0x439745=_0x3af471['mapper']['toViewElement'](_0x19c286);if(_0x439745&&_0x439745['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3328e2['type']&&(_0x4d8f2e['isBlock'](_0x19c286)&&!_0x4d8f2e['isLimit'](_0x19c286)&&(_0x19c286['nextSibling']||_0x142ee9['isAtEnd']?_0x427081&&_0x427081['parent']==_0x19c286||(_0x427081=_0x19c286,_0x407edf(_0x3328e2['previousPosition']),_0x235738=!0x0):_0x3215af=_0x3215af||_0x3328e2['previousPosition']));}function _0x407edf(_0xfa06a4){const _0x132830=_0x3af471['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5a7542}),_0x5f4c2b=_0x3af471['mapper']['toViewPosition'](_0xfa06a4);_0x5c09b7['data']['isSuggestion']&&_0x3af471['writer']['addClass']('ck-suggestion-marker-'+_0x5a7542+'-new',_0x132830),_0x8430d7['activeChange']==_0x5c09b7&&_0x3af471['writer']['addClass']('ck-suggestion-marker--active',_0x132830),_0x3af471['writer']['insert'](_0x5f4c2b,_0x132830),_0x3af471['mapper']['bindElementToMarker'](_0x132830,_0x1cc5eb['markerName']);}_0x6511a||_0x235738||!_0x3215af||_0x407edf(_0x3215af);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x116dcb,_0x3b4cc8,_0x240be8)=>{const _0x9b88f7=_0x240be8['mapper']['markerNameToElements'](_0x3b4cc8['markerName']);if(_0x9b88f7){for(const _0x4e2ff3 of _0x9b88f7)(_0x4e2ff3['hasClass']('ck-suggestion-marker-split')||_0x4e2ff3['hasClass']('ck-suggestion-marker-merge'))&&(_0x240be8['mapper']['unbindElementFromMarkerName'](_0x4e2ff3,_0x3b4cc8['markerName']),_0x240be8['writer']['remove'](_0x4e2ff3));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x311c95,_0x5a779f,_0x121ffe)=>{const _0x556d47=_0x5a779f['markerName']['split'](':')[0x1],_0x14b619=this['_getChangeFromId'](_0x556d47);if(!_0x14b619)return null;const _0x4faff5='add'==_0x14b619['type']?'split':'merge';if(_0x121ffe['consumable']['test'](_0x5a779f['markerRange'],_0x311c95['name']))for(const _0x54343e of _0x5a779f['markerRange']['getItems']()){if(!_0x54343e['is']('element','softBreak'))continue;const _0x21a9a8=_0x121ffe['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4faff5}),_0x63f21c=_0x121ffe['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x54343e));_0x14b619['data']['isSuggestion']&&_0x121ffe['writer']['addClass']('ck-suggestion-marker-'+_0x4faff5+'-new',_0x21a9a8),this['activeChange']==_0x14b619&&_0x121ffe['writer']['addClass']('ck-suggestion-marker--active',_0x21a9a8),_0x121ffe['writer']['insert'](_0x63f21c,_0x21a9a8),_0x121ffe['mapper']['bindElementToMarker'](_0x21a9a8,_0x5a779f['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x20fe6e=>{for(const _0x4af5b0 of this['editor']['model']['document']['getRootNames']()){const _0x10b57e=this['editor']['model']['document']['getRoot'](_0x4af5b0),_0x441716=this['editor']['editing']['view']['document']['getRoot'](_0x4af5b0);if(_0x441716){const _0x1a754d=_0x10b57e['getAttribute']('revisionHistoryAttachChange');if(_0x20fe6e['removeAttribute']('data-change-id',_0x441716),_0x20fe6e['removeClass']('ck-revision-history-root-add',_0x441716),_0x20fe6e['removeClass']('ck-revision-history-root-remove',_0x441716),_0x20fe6e['removeClass']('ck-revision-history-root--active',_0x441716),_0x1a754d){const _0x364267=this['_getChangeFromId'](_0x1a754d);if(!_0x364267)return null;_0x20fe6e['setAttribute']('data-change-id',_0x1a754d,_0x441716),_0x20fe6e['addClass']('ck-revision-history-root-'+_0x364267['type'],_0x441716),this['activeChange']==_0x364267&&_0x20fe6e['addClass']('ck-revision-history-root--active',_0x441716);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x595d93=>'revision-comment:'+_0x595d93,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x372ada=>'revision-suggestion:'+_0x372ada,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x59312d=>({'name':'suggestion:'+_0x59312d,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3b4ff7=>{const _0x5644=_0x3b4ff7['markerName']['split'](':')[0x1];return'insertion'!=_0x5644&&'deletion'!=_0x5644?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5644]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',tt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',tt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2fe8bb,_0x350b68,_0x131ece)=>{const _0x24bef6=_0x131ece['mapper']['markerNameToElements'](_0x350b68['markerName']);if(_0x24bef6){for(const _0x27a433 of _0x24bef6)_0x27a433['is']('uiElement')&&(_0x131ece['mapper']['unbindElementFromMarkerName'](_0x27a433,_0x350b68['markerName']),_0x131ece['writer']['remove'](_0x27a433));}},{'priority':'high'});}['_getChangeFromId'](_0x386f07){return this['_changeIdToChange']['get'](_0x386f07);}['_getViewForChange'](_0x120a3b){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Y(this['editor']['locale'],_0x120a3b),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x33d7e5,_0x2b5e70,_0x5454d1,_0x5e32b2)=>{_0x5e32b2&&this['_balloon']['remove'](_0x5e32b2),_0x5454d1&&(this['_balloon']['add']({'view':_0x5454d1,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x33e030=this['editor']['editing'],_0x2415b1=this['_getChangeFromId'](_0x5454d1['changeId']);let _0x2041e3;if(_0x2415b1['data']['isOnRoot']){const _0x56389c=_0x33e030['view']['getDomRoot'](_0x2415b1['rootName']);_0x2041e3=Array['from'](_0x56389c['getClientRects']());}else{const _0x5b72fa=this['editor']['model']['markers']['get']('revision:'+_0x5454d1['changeId']);_0x2041e3=Array['from'](_0x33e030['mapper']['markerNameToElements'](_0x5b72fa['name']))['map'](_0x2dae25=>_0x33e030['view']['domConverter']['mapViewToDom'](_0x2dae25))['map'](_0x47a9fc=>Array['from'](_0x47a9fc['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x2041e3[0x0];return _0x2041e3['find'](_0x5731ce=>_0x5731ce['top']-0x3<=this['_activeViewTarget']['y']&&_0x5731ce['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x5731ce['left']-0x3<=this['_activeViewTarget']['x']&&_0x5731ce['right']+0x3>=this['_activeViewTarget']['x'])||_0x2041e3[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x470ca9,_0x203da5,_0x3e88ad,_0x20d1d7)=>{this['activeView']=_0x3e88ad?this['_getViewForChange'](_0x3e88ad):null,this['editor']['model']['change'](()=>{const _0xea6154=this['editor']['editing'];_0x20d1d7&&(_0x20d1d7['data']['isOnRoot']?_0xea6154['view']['change'](_0x20fac7=>{_0x20fac7['removeClass']('ck-revision-history-root--active',_0xea6154['view']['document']['getRoot'](_0x20d1d7['rootName']));}):_0xea6154['reconvertMarker']('revision:'+_0x20d1d7['id'])),_0x3e88ad&&(_0x3e88ad['data']['isOnRoot']?_0xea6154['view']['change'](_0x24bec8=>{_0x24bec8['addClass']('ck-revision-history-root--active',_0xea6154['view']['document']['getRoot'](_0x3e88ad['rootName']));}):_0xea6154['reconvertMarker']('revision:'+_0x3e88ad['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x573783,_0x3b5212)=>{if(this['activeChange'])return;const _0x5b0017=this['_findChangeIdFromDomTarget'](_0x3b5212['target']),_0x4fa498=this['_changeIdToChange']['get'](_0x5b0017);_0x4fa498?(this['_activeViewTarget']={'x':_0x3b5212['domEvent']['x'],'y':_0x3b5212['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x4fa498)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3e4d05,_0x4b965d)=>{const _0x4b4631=this['_findChangeIdFromDomTarget'](_0x4b965d['target']),_0x5bf161=this['_changeIdToChange']['get'](_0x4b4631);_0x5bf161?(this['_activeViewTarget']={'x':_0x4b965d['domEvent']['x'],'y':_0x4b965d['domEvent']['y']},_0x5bf161===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x5bf161):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x4ef2b2){do{const _0x39c20d=_0x4ef2b2['getAttribute']('data-change-id');if(_0x39c20d)return _0x39c20d;_0x4ef2b2=_0x4ef2b2['parent'];}while(_0x4ef2b2);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x3950d5=>{for(const _0x566a8d of this['editor']['model']['markers'])_0x3950d5['removeMarker'](_0x566a8d);});}}function tt(_0x546054,_0x4c2ab8){return(_0x51f047,_0x4af7cf,_0x5bbe68)=>{if(!_0x5bbe68['consumable']['test'](_0x4af7cf['markerRange'],_0x51f047['name']))return;const _0x308786=_0x4af7cf['markerRange']['getWalker'](),_0xc48cab=_0x4af7cf['markerRange']['start'],_0x49dfe4=_0x546054['model']['schema'];let _0x14577c=null,_0x2b9a57=null,_0x3a15b4=!0x1,_0x4af19d=!0x1;for(const _0xb42322 of _0x308786){const _0x859f64=_0xb42322['item'];_0x3a15b4=_0x3a15b4||_0x49dfe4['isContent'](_0x859f64);const _0x38b6f3=_0x5bbe68['mapper']['toViewElement'](_0x859f64);if(_0x38b6f3&&_0x38b6f3['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xb42322['type']&&(_0x49dfe4['isBlock'](_0x859f64)&&!_0x49dfe4['isLimit'](_0x859f64)&&(_0x859f64['nextSibling']||_0xc48cab['isAtEnd']?_0x14577c&&_0x14577c['parent']==_0x859f64||(_0x14577c=_0x859f64,_0x246e0d(_0xb42322['previousPosition']),_0x4af19d=!0x0):_0x2b9a57=_0x2b9a57||_0xb42322['previousPosition']));}function _0x246e0d(_0x22db84){const _0xd02cbc=_0x5bbe68['mapper']['toViewPosition'](_0x22db84),_0x2f03fc=_0x5bbe68['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x4c2ab8});_0x5bbe68['writer']['insert'](_0xd02cbc,_0x2f03fc),_0x5bbe68['mapper']['bindElementToMarker'](_0x2f03fc,_0x4af7cf['markerName']);}_0x3a15b4||_0x4af19d||!_0x2b9a57||_0x246e0d(_0x2b9a57);};}class yt extends _0x1209ce{constructor(_0x206b7b){super(_0x206b7b);const _0x31563e=_0x206b7b['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x31563e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x31563e,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5c41ce=this['editor'],_0x55f519=_0x5c41ce['plugins']['get'](d),_0x9874a7=_0x55f519['isReady']?_0x55f519['diff']['newRevisionId']:null;_0x5c41ce['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x9874a7);}['refresh'](){const {isReady:_0x45afcd,isEnabled:_0x40b336,repository:_0x4fa29a,diff:_0x2e3de3}=this['editor']['plugins']['get'](d),_0x3878d0=_0x2e3de3&&_0x4fa29a['getLaterVisibleRevision'](_0x2e3de3['newRevisionId']);this['isEnabled']=_0x45afcd&&_0x40b336&&Boolean(_0x3878d0);}}class bt extends _0x1209ce{['_step'];constructor(_0xbb7a5d,{direction:_0x493abe}){super(_0xbb7a5d);const _0x7e1df6=_0xbb7a5d['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x493abe?0x1:-0x1,this['listenTo'](_0x7e1df6,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x7e1df6,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x7e1df6,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xb80eaa=this['editor'],_0x359ee8=_0xb80eaa['plugins']['get'](d),{isNavigationMode:_0x5a8ec2,currentChangeNumber:_0x2f373f}=_0x359ee8;let _0x9e47f5;if(_0x359ee8['activeChange']=_0x5a8ec2?_0x359ee8['diff']['changes']['get'](_0x2f373f+this['_step']):_0x359ee8['diff']['changes']['first'],_0x359ee8['activeChange']['data']['isOnRoot'])_0x9e47f5=_0xb80eaa['editing']['view']['getDomRoot'](_0x359ee8['activeChange']['rootName']);else{const _0x1b23b7=_0xb80eaa['model']['markers']['get']('revision:'+_0x359ee8['activeChange']['id']);_0x9e47f5=_0x123f5b(_0xb80eaa['editing'],_0x1b23b7);}_0x342911({'target':_0x9e47f5,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0xedc712,currentChangeNumber:_0x4c568,numberOfChanges:_0x292730,isReady:_0x40fa5c,isEnabled:_0x2ba38e}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x2ba38e&&_0x40fa5c&&_0x292730)&&(!_0xedc712||(0x1===this['_step']?_0x4c568<_0x292730-0x1:_0x4c568>0x0));}}class di extends _0xbc5f18{constructor(_0x35def8){super(_0x35def8);const _0x2dcd96=this['bindTemplate'],_0x18af22=new _0x10c58e(_0x35def8),_0x482ad3=new _0x10c58e(_0x35def8);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',(_0x5253e7,_0x15e477)=>_0x5253e7&&_0x15e477>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x15d86d,_0x2b7133,_0x3e05b7,_0x24b3b5)=>{if(!_0x15d86d)return R(_0x35def8,'Loading...');if(!_0x3e05b7)return R(_0x35def8,'No\x20changes');const _0xe4f320=R(_0x35def8,'NUMBER_OF_CHANGES',_0x3e05b7);return _0x24b3b5?R(_0x35def8,'X_OF_Y_CHANGES',[_0x2b7133+0x1,_0x3e05b7]):_0xe4f320;}),_0x18af22['set']({'label':R(_0x35def8,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x482ad3['set']({'label':R(_0x35def8,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0x18af22['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x482ad3['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x18af22['on']('execute',()=>this['fire']('execute','backward')),_0x482ad3['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',_0x2dcd96['if']('_isStatusLabelVisible','ck-hidden',_0x51b83c=>!_0x51b83c)]},'children':[{'text':_0x2dcd96['to']('isNavigationMode',_0x178b81=>_0x178b81?R(_0x35def8,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x35def8,'Total')+':\x20')}]},{'text':_0x2dcd96['to']('_statusText')}]},new _0x440133(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x18af22,_0x482ad3]}]});}}const ce='ck-editor__editable__loading-overlay';class ae extends _0x49d8e7{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5f1c60=this['editor']['editing']['view'];_0x5f1c60['change'](_0x49438f=>{for(const _0x3cfcd1 of _0x5f1c60['document']['roots'])_0x49438f['addClass'](ce,_0x3cfcd1);});}['hide'](){const _0x11821c=this['editor']['editing']['view'];_0x11821c['change'](_0x307750=>{for(const _0x3561f2 of _0x11821c['document']['roots'])_0x307750['removeClass'](ce,_0x3561f2);});}}class m extends _0x49d8e7{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ae];}['init'](){const _0x5272eb=this['editor'],_0x2eb286=_0x5272eb['plugins']['get'](d),_0x536138=_0x5272eb['plugins']['get'](ae);_0x5272eb['ui']['componentFactory']['add']('exitToEditing',_0x3d684e=>{const _0x3de9fa=new _0x10c58e(_0x3d684e);return _0x3de9fa['set']({'label':R(_0x3d684e,'Back\x20to\x20editing'),'icon':_0x180720['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3de9fa,'execute',()=>{_0x5272eb['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3de9fa;}),_0x5272eb['ui']['componentFactory']['add']('restoreRevision',_0x34ad52=>{const _0x3db68c=new _0x10c58e(_0x34ad52);return _0x3db68c['set']({'label':R(_0x34ad52,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x3db68c['bind']('isEnabled')['to'](_0x5272eb['commands']['get']('restoreRevision')),this['listenTo'](_0x3db68c,'execute',()=>_0x5272eb['execute']('restoreRevision')),_0x3db68c;}),_0x5272eb['ui']['componentFactory']['add']('changesNavigation',_0x31cc1c=>{const _0x59f187=new di(_0x31cc1c),_0x5af0a5=_0x5272eb['commands']['get']('showPreviousChange'),_0x410057=_0x5272eb['commands']['get']('showNextChange');return _0x59f187['bind']('isBackwardNavigationEnabled')['to'](_0x5af0a5,'isEnabled'),_0x59f187['bind']('isForwardNavigationEnabled')['to'](_0x410057,'isEnabled'),_0x59f187['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2eb286),this['listenTo'](_0x59f187,'execute',(_0x280b88,_0xfd3b9d)=>{_0x5272eb['execute']('forward'===_0xfd3b9d?'showNextChange':'showPreviousChange');}),_0x59f187;}),_0x536138['show'](),_0x2eb286['on']('change:isReady',(_0x144fce,_0x14e589,_0x3766c5)=>{_0x3766c5?_0x536138['hide']():_0x536138['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x5654fa,_0x11b9d3){super(_0x5654fa,_0x11b9d3);const _0x497a33=this['bindTemplate'];this['set']({'label':R(_0x5654fa,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x5654fa,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x497a33['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new pt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x16bce7=this['fieldView']['element'];this['_tooltipString']=_0x16bce7['scrollWidth']>_0x16bce7['clientWidth']&&_0x16bce7['value']||'';}}class ti extends _0xbc5f18{constructor(_0x1331fc,_0x34ffa2,_0x193c17){super(_0x1331fc);const _0xcd9202=new _0x5afc52();_0xcd9202['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0xdceda3=['ck','ck-revision-history-sidebar__revision-author'];_0x193c17&&_0xdceda3['push']('ck-revision-history-sidebar__revision-author_creator');const _0x2d0b06=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x1331fc,_0x193c17?'Revision\x20creator':'Revision\x20author')},'children':[_0xcd9202,_0x34ffa2['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xdceda3},'children':_0x2d0b06});}}function ni(_0x1a77cd,_0x38c21e){const _0x14d581=_0x1a77cd['bindTemplate'],_0x140746=_0x1a77cd['locale'],_0x7b184=_0x39648c(_0x140746);_0x7b184['panelPosition']='sw';const _0x440751=function(_0x3cc6b6,_0x3a04c5){const _0x17d2d0=function(_0x43f21d,_0x2cc2b9){const _0x1d4e63=_0x43f21d['locale'],_0x3a8de6={'Compare\x20against\x20selected':R(_0x1d4e63,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x1d4e63,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x1d4e63,'Restore\x20this\x20revision')};return _0x2cc2b9['map'](_0x15fe8e=>{const _0x2334ee=_0x3a8de6[_0x15fe8e['name']];return _0x2334ee&&_0x2334ee!==_0x15fe8e['name']&&(_0x15fe8e['name']=_0x2334ee),_0x15fe8e;});}(_0x3cc6b6,_0x3a04c5),_0x1b865f=new _0x3461b4();for(const _0x219182 of _0x17d2d0){const _0x218e3b={'type':'button','model':new to({'label':_0x219182['name'],'class':_0x219182['class'],'withText':!0x0,'role':'menuitem','_action':_0x219182['action']})};_0x218e3b['model']['bind']('isEnabled')['to'](_0x3cc6b6,'isActionsDropdownOpen',_0x58ed2b=>'function'!=typeof _0x219182['isEnabled']||(!_0x58ed2b||_0x219182['isEnabled'](_0x3cc6b6))),_0x1b865f['add'](_0x218e3b);}return _0x1b865f;}(_0x1a77cd,_0x38c21e);return _0x1a77cd['bind']('isActionsDropdownOpen')['to'](_0x7b184,'isOpen'),_0x7b184['buttonView']['set']({'label':R(_0x140746,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x180720['threeVerticalDots']}),_0x7b184['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x14d581['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x14d581['to'](_0x51f31c=>_0x51f31c['stopPropagation']())}}),_0x7b184['on']('execute',_0x1d834d=>{_0x1a77cd['isReady']&&'function'==typeof _0x1d834d['source']['_action']&&_0x1d834d['source']['_action'](_0x1a77cd);}),_0x3ff40b(_0x7b184,_0x440751,{'role':'menu'}),_0x7b184['listenTo'](_0x1a77cd,'change:isActionsDropdownOpen',(_0x2ab381,_0x3d06ca,_0x2e036f)=>{if(_0x2e036f)for(const _0x481d85 of _0x7b184['listView']['items']){const _0x296a80=_0x481d85['children']['first'],_0x2ac0a7=_0x38c21e['find'](_0x8d88ff=>_0x8d88ff['action']===_0x296a80['_action'])['isVisible'];_0x481d85['isVisible']=void 0x0===_0x2ac0a7||_0x2ac0a7(_0x1a77cd);}}),_0x7b184;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x11f94b(_0xbc5f18){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x1da1a2,_0x21c030,_0x38f7f2,_0x29e38f){super(_0x1da1a2);const _0x38e2cc=this['bindTemplate'],_0xdfd580=function(_0x51b93b,_0x499248){const _0x3e3b48=Array['from'](_0x499248['authors'])['filter'](_0x28f4c7=>_0x28f4c7!=_0x499248['creator']);return _0x499248['creator']&&_0x3e3b48['unshift'](_0x499248['creator']),_0x3e3b48['map'](_0x37e995=>new ti(_0x51b93b,_0x37e995,_0x37e995==_0x499248['creator']));}(_0x1da1a2,_0x21c030);this['id']=_0x21c030['id'],this['_revision']=_0x21c030,this['_requireRevisionName']=_0x29e38f,this['bind']('name','createdAt')['to'](_0x21c030),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0xe99069=>{return _0x3130c8=_0x1da1a2['uiLanguage'],(_0x54ac72=_0xe99069)['toLocaleDateString'](_0x3130c8,{'month':'long','day':'numeric'})+',\x20'+_0x54ac72['toLocaleTimeString'](_0x3130c8,{'hour':'numeric','minute':'numeric'});var _0x3130c8,_0x54ac72;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new mt(_0x1da1a2,_0x58483e),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4c45c9=>_0x4c45c9||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x5ad0ae,_0x40455a)=>_0x5ad0ae&&_0x40455a),this['revisionActionsView']=_0x38f7f2&&_0x38f7f2['length']?ni(this,_0x38f7f2):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x38e2cc['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x38e2cc['if']('isEnabled','ck-disabled',_0x306db3=>!_0x306db3),_0x38e2cc['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x38e2cc['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x38e2cc['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':_0x38e2cc['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':_0xdfd580}]},this['revisionActionsView']],'on':{'click':_0x38e2cc['to'](_0x48eedb=>{_0x48eedb['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x26fe60=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x26fe60,'change',()=>{this['_requireRevisionName']&&!_0x26fe60['value']||this['fire']('setName',{'id':this['id'],'name':_0x26fe60['value']}),_0x26fe60['value']||(_0x26fe60['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function mi(_0x49179a,_0x480fa3){const _0x296641=_0x3b1d18['fromJSDate'](_0x49179a)['setLocale'](_0x480fa3),_0x2ce268=_0x3b1d18['local'](),_0x169e0f=_0x2ce268['minus']({'days':0x1})['startOf']('day');let _0x42fcb5,_0x1b724f;return _0x296641['hasSame'](_0x2ce268,'day')?(_0x42fcb5=_0x296641['startOf']('day')['toJSDate'](),_0x1b724f=_0x296641['toRelativeCalendar']()):_0x296641['hasSame'](_0x169e0f,'day')?(_0x42fcb5=_0x169e0f['toJSDate'](),_0x1b724f=_0x296641['toRelativeCalendar']()):_0x296641['hasSame'](_0x2ce268,'week')?(_0x42fcb5=_0x296641['startOf']('week')['toJSDate'](),_0x1b724f=_0x296641['weekdayLong']||''):_0x296641['hasSame'](_0x2ce268,'year')?(_0x42fcb5=_0x296641['startOf']('month')['toJSDate'](),_0x1b724f=_0x296641['monthLong']||''):(_0x42fcb5=_0x296641['startOf']('year')['toJSDate'](),_0x1b724f=String(_0x296641['year'])),{'startDate':_0x42fcb5,'localizedPeriodName':_0x1b724f};}class vi extends _0xbc5f18{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2c229e,_0x59ff54,_0x468ac3,_0x1b1b7e){super(_0x2c229e);const _0x3f48f7=mi(_0x59ff54,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x59ff54,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x468ac3,this['_requireRevisionName']=_0x1b1b7e,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':_0x3f48f7}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x5b1584){const _0x9eb9ea=new ai(this['locale'],_0x5b1584,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x9eb9ea);}['removeRevision'](_0x162d65){const _0x31c48d=this['revisionViews']['find'](_0x46cf29=>_0x46cf29['id']===_0x162d65['id']);this['revisionViews']['remove'](_0x31c48d);}}class as extends _0xbc5f18{constructor(_0x7c2717){super(_0x7c2717);const _0x39c835=new _0x5afc52();_0x39c835['content']=_0x180720['history'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x39c835,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x7c2717,'Revision\x20history')]}]});}}class li extends _0xbc5f18{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0xf57bf0,_0x53f40b,_0x1956cc,_0x491d25){super(_0xf57bf0);const _0x23cee9=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x53f40b,this['_revisionActions']=_0x1956cc,this['_requireRevisionName']=_0x491d25,this['on']('select',(_0xef3975,_0x2a0bd8)=>{this['fire']('revisionSelected',_0x2a0bd8);}),this['on']('setName',(_0x164341,_0x5739c4)=>{this['fire']('revisionSetName',_0x5739c4);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0xf57bf0),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x23cee9['if']('isEnabled','ck-disabled',_0x41412a=>!_0x41412a)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x47656c of this['_revisions'])this['_addRevision'](_0x47656c);this['_revisions']['on']('add',(_0x2f4ca5,_0x1810fe)=>{this['_addRevision'](_0x1810fe);}),this['_revisions']['on']('remove',(_0x19d3fc,_0x59e776)=>{this['_removeRevision'](_0x59e776);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x5a9882=>_0x5a9882['revisionViews']['map'](_0x3c754b=>_0x3c754b))['flat']();}['selectRevision'](_0x279e7d){for(const _0xc3013 of this['revisionViews'])_0x279e7d&&_0x279e7d['id']===_0xc3013['id']?_0xc3013['select']():_0xc3013['deselect']();}['highlightRevisions'](_0x5ea8a9){for(const _0x58cfd9 of this['revisionViews'])_0x5ea8a9['some'](({id:_0xcd87fc})=>_0xcd87fc===_0x58cfd9['id'])?_0x58cfd9['highlight']():_0x58cfd9['unhighlight']();}['_addRevision'](_0x37e212){const _0x1f19b4=mi(_0x37e212['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x22652e=this['timePeriodViews']['get'](0x0);_0x22652e&&_0x22652e['startDate']['getTime']()===_0x1f19b4['getTime']()||(_0x22652e=new vi(this['locale'],_0x1f19b4,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x22652e)),_0x22652e['addRevision'](_0x37e212);}['_removeRevision'](_0x1e977b){const _0x2ee3b7=mi(_0x1e977b['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x2ee3b7)['removeRevision'](_0x1e977b);}['_getTimePeriodViewByStartDate'](_0x45eb01){return this['timePeriodViews']['find'](_0x1d299a=>_0x1d299a['startDate']['getTime']()===_0x45eb01['getTime']());}}class g extends _0x49d8e7{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
|
|
29
|
-
rt(it){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2da91e,_0x1ded93){super(_0x1ded93),this['sourceElement']=_0x2da91e,this['model']['document']['createRoot']();const _0x21fdf7=new st(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new et(this,_0x21fdf7);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x21fd73,_0x4af47b){const _0x3b9529=new this(_0x21fd73,_0x4af47b);return await _0x3b9529['initPlugins'](),await _0x3b9529['ui']['init'](_0x21fd73),await _0x3b9529['data']['init'](_0x3b9529['config']['get']('initialData')||''),_0x3b9529['fire']('ready'),_0x3b9529;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class k extends _0x506060{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf32ff7){function _0x5ea6b9(_0xe8b5dd){return _0xe8b5dd['map'](_0x560b05=>String['fromCharCode'](_0x560b05))['join']('');}super(_0xf32ff7),this['result']='end',_0xf32ff7[_0x5ea6b9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ea6b9([0x76,0x69,0x65,0x77])][_0x5ea6b9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5ea6b9([0x61,0x75,0x74,0x6f]),_0xf32ff7[_0x5ea6b9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5ea6b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5ea6b9([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5ea6b9([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5ea6b9([0x6f,0x6b])});}}class H extends _0x506060{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x344bdd){if(super(_0x344bdd),!this['editor']['config']['get']('revisionHistory'))throw new _0x20b947('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x11a5ab=>this['_showRevisionViewer']({..._0x11a5ab,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4181fe=>this['_closeRevisionViewer'](_0x4181fe)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x318cdb=>this['_restoreRevision'](_0x318cdb)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0xc127f4){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0xc127f4;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x5b8c7c){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x5b8c7c);}['getRevision'](_0xd7007f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0xd7007f);}['getRevisions'](_0x22d07e){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x22d07e||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x33cd41=this['editor'],_0x56985f=_0x142309(_0x33cd41,p),_0x5704f7=_0x33cd41['plugins']['get']('RevisionTracker'),_0x36d8bb=_0x33cd41['plugins']['get']('Users')['users'];return _0x56985f['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x56985f['lazyRoots'],(_0x56985f['plugins']['push'](k,d,m,class extends _0x506060{static get['requires'](){return[d,'Users'];}['init'](){const _0x4177c1=this['editor']['plugins']['get']('Users');for(const _0x59bf4a of _0x36d8bb)_0x59bf4a['isAnonymous']||_0x4177c1['getUser'](_0x59bf4a['id'])||_0x4177c1['addUser'](_0x59bf4a);const _0x1a033f=_0x5704f7['repository']['getRevisions']();let _0x5c6b45=null;const _0x82d4e9=this['editor']['plugins']['get']('RevisionViewer');_0x82d4e9['adapter']=_0x5704f7['adapter'],_0x82d4e9['bind']('isEnabled')['to'](_0x5704f7),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x33cd41,'isReadOnly',_0x2a856b=>!_0x2a856b);for(const _0x51c01e of _0x1a033f){const _0x26fd0f=null===_0x51c01e['creator'];if(_0x26fd0f&&_0x51c01e['toVersion']===_0x51c01e['fromVersion'])continue;const _0x3c8413=_0x51c01e['toJSON']();_0x82d4e9['addRevisionData'](_0x3c8413,(_0x393c7f,_0x2a2223,_0x493bb5)=>{if(_0x26fd0f){if(_0x5c6b45)_0x5c6b45['_update'](_0x393c7f,_0x2a2223);else{if(!_0x2a2223){const _0x2d5f6a=_0x493bb5['toJSON']();_0x2d5f6a['id']=_0xd77ba2(),_0x5704f7['saveRevision'](_0x2d5f6a,_0x493bb5['toVersion'])['then'](_0x11e526=>{_0x5c6b45=_0x11e526;});}}}else _0x51c01e['_update'](_0x393c7f,_0x2a2223);});}}},g),_0x56985f);}['_enhanceShowRevisionViewerCallback'](){const _0x3de63d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xedf68a=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x3fdda1=this['editor']['plugins']['get']('Autosave');await _0x3fdda1['save']();}else await _0xedf68a['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1e2f2e=this['editor']['plugins']['get']('Dialog');_0x1e2f2e['isOpen']&&_0x1e2f2e['hide']();}const _0x5ccb6a=this['_getRevisionViewerEditorConfig']();return _0x3de63d(_0x5ccb6a)['then'](_0x29c54d=>{return(this['_viewerEditor']=_0x29c54d,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x29c54d;})['catch'](_0x34a8a6=>(console['error'](_0x34a8a6),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x2f2a93=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x2f2a93(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4cb9d4=this['editor']['plugins']['get']('Annotations');_0x4cb9d4['refreshVisibility'](),_0x4cb9d4['refreshPositioning']();}})));}['_showRevisionViewer'](_0x3345ce){const _0x213d8e=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xb7cc6=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0xae26d6=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0xae26d6,_0x3345ce)['then'](_0x154f90=>(_0xb7cc6['style']['display']='block',_0x213d8e['style']['display']='none',_0x154f90));}['_closeRevisionViewer'](_0x4c6d86){const _0x32ec75=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x32ec75['style']['display']='',_0x4c6d86['destroy']();}async['_restoreRevision'](_0x20f656){const _0x564f40=this['editor'],_0x2a3daf=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3b8540=_0x564f40['plugins']['get']('RevisionTracker'),_0x1226fe=_0x2a3daf['repository']['getRevision'](_0x20f656);let _0x1508e6,_0x52445f,_0x296f4e;try{_0x1508e6=await _0x2a3daf['getRevisionData'](_0x1226fe),_0x52445f=await _0x2a3daf['getRevisionRootsAttributes'](_0x1226fe);}catch(_0x32995d){return void console['error'](_0x32995d);}_0x564f40['model']['change'](_0x18c037=>{for(const _0x58b22f of Array['from'](_0x564f40['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x18c037['removeMarker'](_0x58b22f);}),_0x2a3daf['isReady']=!0x1,_0x564f40['model']['enqueueChange'](_0x470726=>{_0x470726['setSelection'](null),_0x470726['removeSelectionAttribute'](_0x564f40['model']['document']['selection']['getAttributeKeys']());const _0x32a5de=Object['keys'](_0x1508e6);for(const _0x36fe28 of _0x564f40['model']['document']['roots'])'$graveyard'!=_0x36fe28['rootName']&&_0x36fe28['isAttached']()&&!_0x32a5de['includes'](_0x36fe28['rootName'])&&_0x470726['detachRoot'](_0x36fe28);for(const _0x7039fc of _0x32a5de){let _0x20928e=_0x564f40['model']['document']['getRoot'](_0x7039fc);_0x20928e&&_0x20928e['isAttached']()||(_0x20928e=_0x470726['addRoot'](_0x7039fc));const _0x13875a=_0x52445f[_0x7039fc],_0x16fdec=Object['keys'](_0x13875a),_0x4506d4=_0x1508e6[_0x7039fc];for(const _0x4a2168 of _0x20928e['getAttributeKeys']())_0x16fdec['includes'](_0x4a2168)||_0x470726['removeAttribute'](_0x4a2168,_0x20928e);for(const _0x28e664 of _0x16fdec)_0x470726['setAttribute'](_0x28e664,_0x52445f[_0x7039fc][_0x28e664],_0x20928e);_0x470726['remove'](_0x470726['createRangeIn'](_0x20928e)),_0x470726['insert'](_0x564f40['data']['parse'](_0x4506d4,_0x20928e),_0x20928e,0x0);}});const _0x13ee65=R(_0x564f40['locale'],'Restored');if(_0x1226fe['name'])_0x296f4e=-0x1==_0x1226fe['name']['indexOf'](_0x13ee65)?_0x13ee65+':\x20'+_0x1226fe['name']:_0x1226fe['name'];else _0x296f4e=_0x13ee65+':\x20'+(_0x1226fe['createdAt']['toLocaleDateString'](_0x564f40['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x1226fe['createdAt']['toLocaleTimeString'](_0x564f40['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3b8540['saveRevision']({'name':_0x296f4e}),_0x2a3daf['isReady']=!0x0,_0x564f40['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,H as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,ge as RevisionViewerLoadingOverlay,m as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
|
|
28
|
+
Rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x303e57){super(_0x303e57),this['_revisionViewer']=_0x303e57['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xb2fd90=this['_revisionsRepository']['_revisions'],_0x520a32=this['_createRevisionActions'](),_0x5216e4=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new li(this['editor']['locale'],_0xb2fd90,_0x520a32,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',(_0x3928f2,_0x5392fe)=>{_0x5392fe['revisionViews']['on']('add',(_0xdc9c8,_0x18c740)=>{_0x18c740['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)),_0x5216e4['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x26f7b9=this['_revisionsRepository']['getRevision'](0x0);if(_0x26f7b9){const _0xed270=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x26f7b9['id']);this['_revisionViewer']['compare'](_0x26f7b9,_0xed270);}}['_handleRevisionSelected'](_0x4ab5f5,_0x4602a6){const _0x3ba180=this['_revisionsRepository']['getRevision'](_0x4602a6['id']),_0x2a93c4=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3ba180['id']);this['_revisionViewer']['compare'](_0x3ba180,_0x2a93c4);}['_handleRevisionSetName'](_0x482ef1,_0x18c9be){this['_revisionsRepository']['getRevision'](_0x18c9be['id'])['setName'](_0x18c9be['name']);}['_handleDiffChange'](_0x33ce4d,_0x3b83ea,_0x3d54a4){const _0x3efa0d=this['_revisionsRepository']['getRevisionsInDiff'](_0x3d54a4);_0x3efa0d['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x3efa0d),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x3efa0d[0x0]));}['_createRevisionActions'](){const _0x3ca2e9=this['editor'],_0x12b7e3=g['availableRevisionActions'],_0x24bd9e=_0x3ca2e9['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0x24bd9e['length'])return _0x24bd9e['map'](_0x4b6165=>{const _0x25733e='string'==typeof _0x4b6165?Object['assign']({},_0x12b7e3[_0x4b6165]):_0x4b6165;return _0x25733e['action']=_0x25733e['action']['bind'](this,_0x3ca2e9),_0x25733e['isVisible']&&(_0x25733e['isVisible']=_0x25733e['isVisible']['bind'](this,_0x3ca2e9)),_0x25733e;});}}function Rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x462e94},_0x3a15f4)=>{const _0x5c94bd=_0x462e94['get'](d),_0x1b728c=_0x5c94bd['repository'];let _0x4f3c13=_0x5c94bd['diff']['newRevisionId'],_0x91a1b2=_0x3a15f4['id'];_0x1b728c['getIndex'](_0x4f3c13)>_0x1b728c['getIndex'](_0x91a1b2)&&([_0x4f3c13,_0x91a1b2]=[_0x91a1b2,_0x4f3c13]),_0x5c94bd['compare'](_0x4f3c13,_0x91a1b2);},'isVisible':({plugins:_0x5a7693},_0x6bd97b)=>{const _0x93a6e2=_0x5a7693['get'](d);return!(_0x93a6e2['repository']['getRevisionsInDiff'](_0x93a6e2['diff'])['length']>0x2)&&!_0x6bd97b['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x16c78b,{id:_0x463967})=>{_0x16c78b['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x463967);},'isVisible':({plugins:_0x112b5b},_0x264845)=>!!_0x112b5b['get'](d)['repository']['getLaterVisibleRevision'](_0x264845['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4dd54c},{id:_0x2cb1af,revisionNameView:_0x2f8b3c})=>{const _0x4eb84a=_0x4dd54c['get'](d),_0x7a0b09=_0x4eb84a['repository']['getEarlierVisibleRevision'](_0x2cb1af);_0x4eb84a['compare'](_0x2cb1af,_0x7a0b09),_0x2f8b3c['focus'](),_0x2f8b3c['fieldView']['select']();}}};}class et extends ot{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x1641cf,_0x5d15a9){super(_0x1641cf),this['_view']=_0x5d15a9,this['_toolbarConfig']=ht(_0x1641cf['config']['get']('toolbar')),this['_elementReplacer']=new ct();}get['element'](){return this['view']['element'];}['init'](_0x4e108e){const _0x360461=this['editor'],_0x45c35d=this['view'],_0x2dcfdc=_0x360461['editing']['view'],_0x209ce1=_0x45c35d['editable'],_0x35fa62=_0x2dcfdc['document']['getRoot']();_0x209ce1['name']=_0x35fa62['rootName'],_0x45c35d['render']();const _0x2a0a11=_0x209ce1['element'];this['setEditableElement'](_0x209ce1['name'],_0x2a0a11),_0x45c35d['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2dcfdc['attachDomRoot'](_0x2a0a11),this['_elementReplacer']['replace'](_0x4e108e,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x469cd3=this['view'],_0x1b862e=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x1b862e['detachDomRoot'](_0x469cd3['editable']['name']),_0x469cd3['destroy']();}['_initToolbar'](){const _0x15d520=this['view'];_0x15d520['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x15d520['stickyPanel']['limiterElement']=_0x15d520['element'],_0x15d520['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x4abafe})=>_0x4abafe),_0x15d520['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x15d520['toolbar']);}}class st extends dt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x3f926a,_0xde324,_0x104f63={}){super(_0x3f926a),this['stickyPanel']=new lt(_0x3f926a),this['toolbar']=new nt(_0x3f926a,{'shouldGroupWhenFull':_0x104f63['shouldToolbarGroupWhenFull']}),this['_editable']=new ut(_0x3f926a,_0xde324);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class w extends/* #__PURE__ -- @preserve */
|
|
29
|
+
rt(it){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x3e32a7,_0x160909){super(_0x160909),this['sourceElement']=_0x3e32a7,this['model']['document']['createRoot']();const _0x173c51=new st(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new et(this,_0x173c51);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x12d15a,_0x4cf4fd){const _0x191abb=new this(_0x12d15a,_0x4cf4fd);return await _0x191abb['initPlugins'](),await _0x191abb['ui']['init'](_0x12d15a),await _0x191abb['data']['init'](_0x191abb['config']['get']('initialData')||''),_0x191abb['fire']('ready'),_0x191abb;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class k extends _0x49d8e7{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x258b16){function _0xedca5c(_0x444070){return _0x444070['map'](_0xab79e6=>String['fromCharCode'](_0xab79e6))['join']('');}super(_0x258b16),this['result']='end',_0x258b16[_0xedca5c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xedca5c([0x76,0x69,0x65,0x77])][_0xedca5c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xedca5c([0x61,0x75,0x74,0x6f]),_0x258b16[_0xedca5c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xedca5c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xedca5c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xedca5c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xedca5c([0x6f,0x6b])});}}class H extends _0x49d8e7{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x57cac3){if(super(_0x57cac3),!this['editor']['config']['get']('revisionHistory'))throw new _0xccd322('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x40ed1e=>this['_showRevisionViewer']({..._0x40ed1e,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x971bd=>this['_closeRevisionViewer'](_0x971bd)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3e7830=>this['_restoreRevision'](_0x3e7830)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x20fdff){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x20fdff;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x1e86cb){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1e86cb);}['getRevision'](_0x29bf93){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x29bf93);}['getRevisions'](_0x3d58fe){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3d58fe||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x24d3ba=this['editor'],_0x4ceef4=_0x4ba276(_0x24d3ba,p),_0x45beee=_0x24d3ba['plugins']['get']('RevisionTracker'),_0x195227=_0x24d3ba['plugins']['get']('Users')['users'];return _0x4ceef4['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4ceef4['lazyRoots'],(_0x4ceef4['plugins']['push'](k,d,m,class extends _0x49d8e7{static get['requires'](){return[d,'Users'];}['init'](){const _0x5d599c=this['editor']['plugins']['get']('Users');for(const _0x3f27d5 of _0x195227)_0x3f27d5['isAnonymous']||_0x5d599c['getUser'](_0x3f27d5['id'])||_0x5d599c['addUser'](_0x3f27d5);const _0x4cddd0=_0x45beee['repository']['getRevisions']();let _0x54d7f1=null;const _0x5c7f2d=this['editor']['plugins']['get']('RevisionViewer');_0x5c7f2d['adapter']=_0x45beee['adapter'],_0x5c7f2d['bind']('isEnabled')['to'](_0x45beee),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x24d3ba,'isReadOnly',_0xe2f4e9=>!_0xe2f4e9);for(const _0x4cdc4f of _0x4cddd0){const _0x46780f=null===_0x4cdc4f['creator'];if(_0x46780f&&_0x4cdc4f['toVersion']===_0x4cdc4f['fromVersion'])continue;const _0x53a704=_0x4cdc4f['toJSON']();_0x5c7f2d['addRevisionData'](_0x53a704,(_0x4c713b,_0xdbc1dd,_0x12d135)=>{if(_0x46780f){if(_0x54d7f1)_0x54d7f1['_update'](_0x4c713b,_0xdbc1dd);else{if(!_0xdbc1dd){const _0x292927=_0x12d135['toJSON']();_0x292927['id']=_0x4d1572(),_0x45beee['saveRevision'](_0x292927,_0x12d135['toVersion'])['then'](_0x36663b=>{_0x54d7f1=_0x36663b;});}}}else _0x4cdc4f['_update'](_0x4c713b,_0xdbc1dd);});}}},g),_0x4ceef4);}['_enhanceShowRevisionViewerCallback'](){const _0x8aa1d3=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x18a414=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x741472=this['editor']['plugins']['get']('Autosave');await _0x741472['save']();}else await _0x18a414['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x4186ce=this['editor']['plugins']['get']('Dialog');_0x4186ce['isOpen']&&_0x4186ce['hide']();}const _0x387b66=this['_getRevisionViewerEditorConfig']();return _0x8aa1d3(_0x387b66)['then'](_0x1e46ca=>{return(this['_viewerEditor']=_0x1e46ca,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x1e46ca;})['catch'](_0xbcca9c=>(console['error'](_0xbcca9c),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x159733=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x159733(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x46b32e=this['editor']['plugins']['get']('Annotations');_0x46b32e['refreshVisibility'](),_0x46b32e['refreshPositioning']();}})));}['_showRevisionViewer'](_0x3b771d){const _0x529cb7=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4402ec=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x174554=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x174554,_0x3b771d)['then'](_0x445155=>(_0x4402ec['style']['display']='block',_0x529cb7['style']['display']='none',_0x445155));}['_closeRevisionViewer'](_0x3904d6){const _0x3322a9=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3322a9['style']['display']='',_0x3904d6['destroy']();}async['_restoreRevision'](_0x4be4df){const _0x40aca4=this['editor'],_0x575302=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2310f9=_0x40aca4['plugins']['get']('RevisionTracker'),_0x3eb0e2=_0x575302['repository']['getRevision'](_0x4be4df);let _0x5286be,_0x3e46b0,_0xb5bda8;try{_0x5286be=await _0x575302['getRevisionData'](_0x3eb0e2),_0x3e46b0=await _0x575302['getRevisionRootsAttributes'](_0x3eb0e2);}catch(_0x3f0434){return void console['error'](_0x3f0434);}_0x40aca4['model']['change'](_0x24307a=>{for(const _0x1d1e41 of Array['from'](_0x40aca4['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x24307a['removeMarker'](_0x1d1e41);}),_0x575302['isReady']=!0x1,_0x40aca4['model']['enqueueChange'](_0x585cfa=>{_0x585cfa['setSelection'](null),_0x585cfa['removeSelectionAttribute'](_0x40aca4['model']['document']['selection']['getAttributeKeys']());const _0x5d6b60=Object['keys'](_0x5286be);for(const _0x13b699 of _0x40aca4['model']['document']['roots'])'$graveyard'!=_0x13b699['rootName']&&_0x13b699['isAttached']()&&!_0x5d6b60['includes'](_0x13b699['rootName'])&&_0x585cfa['detachRoot'](_0x13b699);for(const _0x3d6b57 of _0x5d6b60){let _0x14b4ff=_0x40aca4['model']['document']['getRoot'](_0x3d6b57);_0x14b4ff&&_0x14b4ff['isAttached']()||(_0x14b4ff=_0x585cfa['addRoot'](_0x3d6b57));const _0x3f22c9=_0x3e46b0[_0x3d6b57],_0xa8226d=Object['keys'](_0x3f22c9),_0x2426c6=_0x5286be[_0x3d6b57];for(const _0x10ec08 of _0x14b4ff['getAttributeKeys']())_0xa8226d['includes'](_0x10ec08)||_0x585cfa['removeAttribute'](_0x10ec08,_0x14b4ff);for(const _0x248a92 of _0xa8226d)_0x585cfa['setAttribute'](_0x248a92,_0x3e46b0[_0x3d6b57][_0x248a92],_0x14b4ff);_0x585cfa['remove'](_0x585cfa['createRangeIn'](_0x14b4ff)),_0x585cfa['insert'](_0x40aca4['data']['parse'](_0x2426c6,_0x14b4ff),_0x14b4ff,0x0);}});const _0xf25929=R(_0x40aca4['locale'],'Restored');if(_0x3eb0e2['name'])_0xb5bda8=-0x1==_0x3eb0e2['name']['indexOf'](_0xf25929)?_0xf25929+':\x20'+_0x3eb0e2['name']:_0x3eb0e2['name'];else _0xb5bda8=_0xf25929+':\x20'+(_0x3eb0e2['createdAt']['toLocaleDateString'](_0x40aca4['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3eb0e2['createdAt']['toLocaleTimeString'](_0x40aca4['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2310f9['saveRevision']({'name':_0xb5bda8}),_0x575302['isReady']=!0x0,_0x40aca4['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,H as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,ae as RevisionViewerLoadingOverlay,m as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
|