@ckeditor/ckeditor5-revision-history 46.0.1-alpha.2 → 46.0.1-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x19732a,uid as _0x119620,Collection as _0x477179,logWarning as _0x57f496,FocusTracker as _0x676549,KeystrokeHandler as _0x456b84,scrollViewportToShowTarget as _0x34209d,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x1f8480}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x5c6456,set as _0x2b8800,unset as _0x1ad4d3,isEqual as _0x4277fb}from'es-toolkit/compat';import{Plugin as _0x44d0e2,PendingActions as _0x31f3e7,Command as _0x49e138,ElementApiMixin as _0x5f17a6,Editor as _0x3d9918}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x1a0d59,getMarkerDomElement as _0x6110c4,ConfirmMixin as _0x1cdb06,sanitizeEditorConfig as _0x2c8308}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x4f64a2,ViewAttributeElement as _0x539649,ViewEmptyElement as _0x1d558d,ViewRawElement as _0x283caa,ViewUIElement as _0x29c740,ViewDocumentFragment as _0x5c1af8,ViewText as _0x2e2020,ViewElement as _0x4dca85,ModelElement as _0x5758d3,ModelRange as _0x5d0daf,ModelPosition as _0x1d26da,ModelDocumentFragment as _0x381023,ModelText as _0x5759ad}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x409e84,IconChevronUp as _0x1a0a1b,IconChevronDown as _0x3f3f77,IconUndo as _0x519511,IconUser as _0x1d9021,IconThreeVerticalDots as _0x1cbb2d}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x3026b1,View as _0x167129,submitHandler as _0x45f638,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x12688f,ListView as _0x26aff7,ListItemView as _0x53946c,ButtonView as _0x231e90,MenuBarMenuView as _0x106187,MenuBarMenuListView as _0x3d6a57,MenuBarMenuListItemView as _0x183175,MenuBarMenuListItemButtonView as _0x502070,ContextualBalloon as _0x7c568a,ToolbarSeparatorView as _0x2c6fc8,IconView as _0x56ed66,addListToDropdown as _0x39d58c,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x183434,StickyPanelView as _0x4f4a3a,ToolbarView as _0x10ea70,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x28f13a}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x19732a(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x3ec6e6){super(),this['id']=_0x3ec6e6['id']||_0x119620(),this['creator']=_0x3ec6e6['creator']||null,this['authors']=_0x3ec6e6['authors']||[],this['diffData']=_0x3ec6e6['diffData']||null,this['toVersion']=_0x3ec6e6['toVersion']||0x0,this['fromVersion']=_0x3ec6e6['fromVersion']||0x0,this['set']('name',_0x3ec6e6['name']||''),this['set']('createdAt',_0x3ec6e6['createdAt']||new Date()),this['set']('attributes',_0x3ec6e6['attributes']||{});}['setName'](_0x3460bf){this['_update']({'name':_0x3460bf});}['setAttribute'](_0x5a9dab,_0x22320c){const _0x30d25f=_0x5c6456(this['attributes']);_0x2b8800(_0x30d25f,_0x5a9dab,_0x22320c),this['_update']({'attributes':_0x30d25f});}['removeAttribute'](_0x2b6c6d){const _0x1d1cef=_0x5c6456(this['attributes']);_0x1ad4d3(_0x1d1cef,_0x2b6c6d),this['_update']({'attributes':_0x1d1cef});}['_update'](_0xe7bedf,_0x3f216d=!0x1){let _0x2f3a27=!0x1;const _0x1193b9={'id':this['id']},_0x2a38d5=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x1cb4b7 of _0x2a38d5){const _0x245965=_0xe7bedf[_0x1cb4b7];void 0x0!==_0x245965&&_0x245965!==this[_0x1cb4b7]&&(this[_0x1cb4b7]=_0x245965,_0x1193b9[_0x1cb4b7]=_0x245965,_0x2f3a27=!0x0);}_0x2f3a27&&(_0x1193b9['authors']&&(_0x1193b9['authorsIds']=_0x1193b9['authors']['map'](_0x292ed8=>_0x292ed8['id']),delete _0x1193b9['authors']),this['fire']('_update',_0x1193b9,_0x3f216d));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0xeb9935=>_0xeb9935['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x44d0e2{['_revisions'];static get['requires'](){return[_0x1a0d59];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0xa40ca4){super(_0xa40ca4),this['_revisions']=new _0x477179();}['afterInit'](){!async function(_0x7d4dfc){const _0x47240b=_0x36500c([0x71,0x6d,0x55,0x44,0x4c,0x65,0x4b,0x64,0x62,0x41,0x34,0x63,0x4d,0x46,0x32,0x59,0x4f,0x77,0x56,0x38,0x70,0x35,0x31,0x39,0x6b,0x6c,0x42,0x68,0x54,0x58,0x4a,0x74,0x73,0x4e,0x6a,0x52,0x53,0x36,0x72,0x76,0x51,0x43,0x57,0x50,0x30,0x61,0x67,0x6f,0x49,0x48,0x7a,0x5a,0x66,0x37,0x69,0x78,0x33,0x6e,0x79,0x47,0x45,0x75]),_0x552524=0xeb829,_0x561f36=0x6d653ed,_0x3689cf=0x6d13cd5^_0x561f36,_0x435673=window[_0x36500c([0x44,0x61,0x74,0x65])][_0x36500c([0x6e,0x6f,0x77])](),_0x4c9dd8=_0x7d4dfc[_0x36500c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3d0a4c=new window[(_0x36500c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44ac73=>{_0x4c9dd8[_0x36500c([0x6f,0x6e,0x63,0x65])](_0x36500c([0x72,0x65,0x61,0x64,0x79]),_0x44ac73);}),_0x632f24={[_0x36500c([0x6b,0x74,0x79])]:_0x36500c([0x45,0x43]),[_0x36500c([0x75,0x73,0x65])]:_0x36500c([0x73,0x69,0x67]),[_0x36500c([0x63,0x72,0x76])]:_0x36500c([0x50,0x2d,0x32,0x35,0x36]),[_0x36500c([0x78])]:_0x36500c([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]),[_0x36500c([0x79])]:_0x36500c([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]),[_0x36500c([0x61,0x6c,0x67])]:_0x36500c([0x45,0x53,0x32,0x35,0x36])},_0x406b7e=_0x4c9dd8[_0x36500c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x36500c([0x67,0x65,0x74])](_0x36500c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1f224f(){let _0x485cfb,_0x1f9879=null,_0x3f9b98=null;try{if(_0x406b7e==_0x36500c([0x47,0x50,0x4c]))return _0x36500c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x485cfb=_0x42a2fe(),!_0x485cfb)return _0x36500c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x485cfb[_0x36500c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3f9b98=_0x373b12(_0x485cfb[_0x36500c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x485cfb[_0x36500c([0x6a,0x74,0x69])])),await _0x311acf()?_0x594abf()?_0x256a55()?_0x36500c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x27850f()?(_0x485cfb[_0x36500c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36500c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1f9879=_0x515821(_0x36500c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x485cfb[_0x36500c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36500c([0x74,0x72,0x69,0x61,0x6c])&&(_0x1f9879=_0x515821(_0x36500c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x465a82()):_0x36500c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x36500c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x36500c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x36500c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x256a55(){const _0x3105ca=[_0x36500c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x36500c([0x74,0x72,0x69,0x61,0x6c])][_0x36500c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x485cfb[_0x36500c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x435673/0x3e8:0xe10*_0x3689cf;return _0x485cfb[_0x36500c([0x65,0x78,0x70])]<_0x3105ca;}function _0x594abf(){const _0x4bee2d=_0x485cfb[_0x36500c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4bee2d)return!0x1;if(_0x4bee2d[_0x36500c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36500c([0x2a])))return!0x0;if(_0x4bee2d[_0x36500c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36500c([0x52,0x48])))return!0x0;if(_0x4bee2d[_0x36500c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36500c([0x52,0x52,0x48]))){if(_0x1b24dd())return!0x0;if(_0x5c7602()||_0x4e29be())return!0x0;}return!0x1;}function _0x27850f(){const _0x1516c1=_0x485cfb[_0x36500c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1516c1||0x0==_0x1516c1[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x27401d}=new URL(window[_0x36500c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1516c1[_0x36500c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27401d))return!0x0;const _0x3c6b6d=_0x27401d[_0x36500c([0x73,0x70,0x6c,0x69,0x74])](_0x36500c([0x2e]));return _0x1516c1[_0x36500c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x6c7b18=>_0x6c7b18[_0x36500c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36500c([0x2a])))[_0x36500c([0x6d,0x61,0x70])](_0x43c14a=>_0x43c14a[_0x36500c([0x73,0x70,0x6c,0x69,0x74])](_0x36500c([0x2e])))[_0x36500c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2fc376=>_0x2fc376[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3c6b6d[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x36500c([0x6d,0x61,0x70])](_0x5be85b=>Array(_0x3c6b6d[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5be85b[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x36500c([0x66,0x69,0x6c,0x6c])](_0x5be85b[0x0]===_0x36500c([0x2a])?_0x36500c([0x2a]):'')[_0x36500c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5be85b))[_0x36500c([0x73,0x6f,0x6d,0x65])](_0x366327=>_0x3c6b6d[_0x36500c([0x65,0x76,0x65,0x72,0x79])]((_0x30aedd,_0x50a541)=>_0x366327[_0x50a541]===_0x30aedd||_0x366327[_0x50a541]===_0x36500c([0x2a])));}function _0x465a82(){return _0x1f9879&&_0x3f9b98?new window[(_0x36500c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3941d8,_0x2d9735)=>{_0x1f9879[_0x36500c([0x74,0x68,0x65,0x6e])](_0x3941d8,_0x2d9735),_0x3f9b98[_0x36500c([0x74,0x68,0x65,0x6e])](_0x5a02ce=>{_0x5a02ce!=_0x36500c([0x56,0x61,0x6c,0x69,0x64])&&_0x3941d8(_0x5a02ce);},_0x2d9735);}):_0x1f9879||_0x3f9b98||_0x36500c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x373b12(_0x263605,_0x40af1e){return new window[(_0x36500c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1eb05e=>{if(_0x2b5195())return _0x1eb05e(_0x36500c([0x56,0x61,0x6c,0x69,0x64]));_0x46c745(),_0x4c9dd8[_0x36500c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x36500c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xec7c3d=!0x1;const _0x5c3d9e=_0x119620();function _0x5d7bef(_0x3c8b7d){return!!_0x3c8b7d&&(typeof _0x3c8b7d===_0x36500c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3c8b7d===_0x36500c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3c8b7d[_0x36500c([0x74,0x68,0x65,0x6e])]===_0x36500c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3c8b7d[_0x36500c([0x63,0x61,0x74,0x63,0x68])]===_0x36500c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x18dbc2(_0x8bfcef){_0x4c0b68(_0x8bfcef)[_0x36500c([0x74,0x68,0x65,0x6e])](_0x239268=>{if(!_0x239268||_0x239268[_0x36500c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x36500c([0x6f,0x6b]))return _0x36500c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x441dd0(_0x21c3d2(_0x5c3d9e+_0x40af1e))!=_0x239268[_0x36500c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x36500c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x36500c([0x56,0x61,0x6c,0x69,0x64]);})[_0x36500c([0x74,0x68,0x65,0x6e])](_0x1a3351=>(_0x776f(),_0x1a3351),()=>{const _0xddd3c0=_0x16a171();return null==_0xddd3c0?(_0x776f(),_0x36500c([0x56,0x61,0x6c,0x69,0x64])):_0x36500c(_0x435673-_0xddd3c0>(0x22dad7ed^_0x561f36)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x36500c([0x74,0x68,0x65,0x6e])](_0x1eb05e)[_0x36500c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1eb05e(_0x36500c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x51fd19=0x6e0bd6d^_0x561f36;function _0x776f(){const _0xfa907e=_0x36500c([0x6c,0x6c,0x63,0x74,0x2d])+_0x441dd0(_0x21c3d2(_0x263605)),_0x5c919a=_0x3acc9d(_0x441dd0(window[_0x36500c([0x4d,0x61,0x74,0x68])][_0x36500c([0x63,0x65,0x69,0x6c])](_0x435673/_0x51fd19)));window[_0x36500c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36500c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xfa907e,_0x5c919a);}function _0x16a171(){const _0x46743d=_0x36500c([0x6c,0x6c,0x63,0x74,0x2d])+_0x441dd0(_0x21c3d2(_0x263605)),_0xf299b1=window[_0x36500c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36500c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x46743d);return _0xf299b1?window[_0x36500c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3acc9d(_0xf299b1),0x10)*_0x51fd19:null;}function _0x4c0b68(_0x5de1e1){return new window[(_0x36500c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x74a3ff,_0x520fa7)=>{_0x5de1e1[_0x36500c([0x74,0x68,0x65,0x6e])](_0x74a3ff,_0x520fa7),window[_0x36500c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x520fa7,0x6d7872d^_0x561f36);});}}_0x4c9dd8[_0x36500c([0x6f,0x6e])](_0x36500c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x46bf8b,_0x770962)=>{if(_0x770962[0x0]!=_0x263605)return _0x1eb05e(_0x36500c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x770962[0x1]={..._0x770962[0x1],[_0x36500c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5c3d9e};},{[_0x36500c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36500c([0x68,0x69,0x67,0x68])}),_0x4c9dd8[_0x36500c([0x6f,0x6e])](_0x36500c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x38ea87=>{_0x5d7bef(_0x38ea87[_0x36500c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xec7c3d=!0x0,_0x18dbc2(_0x38ea87[_0x36500c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x36500c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36500c([0x6c,0x6f,0x77])}),_0x3d0a4c[_0x36500c([0x74,0x68,0x65,0x6e])](()=>{_0xec7c3d||_0x1eb05e(_0x36500c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2b5195(){return _0x4c9dd8[_0x36500c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36500c([0x76,0x69,0x65,0x77])][_0x36500c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x36500c([0x61,0x75,0x74,0x6f]);}function _0x46c745(){_0x4c9dd8[_0x36500c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36500c([0x76,0x69,0x65,0x77])][_0x36500c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36500c([0x61,0x75,0x74,0x6f]);}}function _0x515821(_0x2d60ee){const _0x17635f=[new window[(_0x36500c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x404080=>setTimeout(_0x404080,0x6df6d21^_0x561f36)),_0x3d0a4c[_0x36500c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x36500c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x23af2e=>{const _0x526165=0x6d653ea^_0x561f36,_0x5781d3=_0x7d4dfc[_0x36500c([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x4584ee(){_0x5781d3[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x526165&&_0x23af2e();}_0x4584ee(),_0x5781d3[_0x36500c([0x6f,0x6e])](_0x36500c([0x61,0x64,0x64]),_0x4584ee);})),new window[(_0x36500c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1baefe=>{function _0x33a4e6(){for(const _0x478a3a in window)if(window[_0x36500c([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x36500c([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x478a3a))&&window[_0x478a3a]==_0x552524)return _0x1baefe();_0x4c9dd8[_0x36500c([0x73,0x74,0x61,0x74,0x65])]!=_0x36500c([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x36500c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x33a4e6,0x6d64065^_0x561f36);}_0x3b6d76(_0x36500c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x33a4e6();})];return window[_0x36500c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36500c([0x72,0x61,0x63,0x65])](_0x17635f)[_0x36500c([0x74,0x68,0x65,0x6e])](()=>_0x2d60ee);}async function _0x36f79d(){if(await _0x3d0a4c,_0x3b6d76(_0x36500c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x47c05f=_0x7d4dfc[_0x36500c([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x2273f9=_0x7d4dfc[_0x36500c([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])](_0x47c05f[_0x36500c([0x69,0x64])]),_0x1dd96c=_0x79f693(_0x36500c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1dd96c[_0x36500c([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x47c05f['id'],_0x2273f9?_0x2273f9['id']:null,!0x0),_0x1dd96c[_0x36500c([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x36500c([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1dd96c[_0x36500c([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1dd96c[_0x36500c([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x1e2df5,void(_0x1dd96c[_0x36500c([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x1e2df5);}if(_0x3b6d76(_0x36500c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2e9aeb=_0x79f693(_0x36500c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2e9aeb[_0x36500c([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x36500c([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2e9aeb[_0x36500c([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2e9aeb[_0x36500c([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x1e2df5,_0x2e9aeb[_0x36500c([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x1e2df5;}_0x4c9dd8[_0x36500c([0x6d,0x6f,0x64,0x65,0x6c])][_0x36500c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1e2df5,_0x4c9dd8[_0x36500c([0x6d,0x6f,0x64,0x65,0x6c])][_0x36500c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1e2df5,_0x4c9dd8[_0x36500c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x36500c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1b24dd(){return _0x3b6d76(_0x36500c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x79f693(_0x36500c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x36500c([0x73,0x74,0x61,0x74,0x65])]==_0x36500c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5c7602(){return _0x3b6d76(_0x36500c([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 _0x4e29be(){return _0x3b6d76(_0x36500c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x244009(_0x4cf55e){const _0x8036eb=_0x60ee16();_0x4c9dd8[_0x8036eb]=_0x36500c([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])+_0x4cf55e,_0x4cf55e[_0x36500c([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x36500c([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x60ee16()]=_0x552524),_0x4cf55e!=_0x36500c([0x56,0x61,0x6c,0x69,0x64])&&_0x36f79d();}function _0x60ee16(){const _0x548c06=window[_0x36500c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x36500c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x36500c([0x6e,0x6f,0x77])]())[_0x36500c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x36500c([0x2e]),'');let _0x5e1206=_0x36500c([0x71]);for(let _0x4a33fa=0x0;_0x4a33fa<_0x548c06[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4a33fa+=0x2){let _0x1eb851=window[_0x36500c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x548c06[_0x36500c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4a33fa,_0x4a33fa+0x2));_0x1eb851>=_0x47240b[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1eb851-=_0x47240b[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5e1206+=_0x47240b[_0x1eb851];}return _0x5e1206;}function _0x42a2fe(){const _0x2fded2=_0x406b7e[_0x36500c([0x73,0x70,0x6c,0x69,0x74])](_0x36500c([0x2e]));if(0x3!=_0x2fded2[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x379334(_0x2fded2[0x1]);function _0x379334(_0x298173){const _0x5af65f=_0x3ded5c(_0x298173);return _0x5af65f&&_0x2917d4()?_0x5af65f:null;function _0x2917d4(){const _0xed6c2c=_0x5af65f[_0x36500c([0x6a,0x74,0x69])],_0x3d6441=window[_0x36500c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xed6c2c[_0x36500c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xed6c2c[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x350632={..._0x5af65f,[_0x36500c([0x6a,0x74,0x69])]:_0xed6c2c[_0x36500c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xed6c2c[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x350632[_0x36500c([0x76,0x63])],_0x21c3d2(_0x350632)==_0x3d6441;}}}async function _0x311acf(){let _0x540b68=!0x0;try{const _0x59b226=_0x406b7e[_0x36500c([0x73,0x70,0x6c,0x69,0x74])](_0x36500c([0x2e])),[_0x1338dd,_0x2a1bc9,_0x30bc65]=_0x59b226;return _0x3ed9df(_0x1338dd),await _0x2d427e(_0x1338dd,_0x2a1bc9,_0x30bc65),_0x540b68;}catch{return!0x1;}function _0x3ed9df(_0x15362c){const _0x1d92ca=_0x3ded5c(_0x15362c);_0x1d92ca&&_0x1d92ca[_0x36500c([0x61,0x6c,0x67])]==_0x36500c([0x45,0x53,0x32,0x35,0x36])||(_0x540b68=!0x1);}async function _0x2d427e(_0x3959e4,_0xbec6b,_0x227ac1){const _0x5aa7d0=window[_0x36500c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x36500c([0x66,0x72,0x6f,0x6d])](_0x5d98f7(_0x227ac1),_0x358ba3=>_0x358ba3[_0x36500c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x131f54=new window[(_0x36500c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x36500c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3959e4+_0x36500c([0x2e])+_0xbec6b),_0x3ccb23=window[_0x36500c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x36500c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3ccb23)return;const _0xc3ecc5=await _0x3ccb23[_0x36500c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x36500c([0x6a,0x77,0x6b]),_0x632f24,{[_0x36500c([0x6e,0x61,0x6d,0x65])]:_0x36500c([0x45,0x43,0x44,0x53,0x41]),[_0x36500c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x36500c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x36500c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3ccb23[_0x36500c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x36500c([0x6e,0x61,0x6d,0x65])]:_0x36500c([0x45,0x43,0x44,0x53,0x41]),[_0x36500c([0x68,0x61,0x73,0x68])]:{[_0x36500c([0x6e,0x61,0x6d,0x65])]:_0x36500c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xc3ecc5,_0x5aa7d0,_0x131f54)||(_0x540b68=!0x1);}}function _0x3ded5c(_0x3ba24a){return _0x3ba24a[_0x36500c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x36500c([0x65,0x79]))?JSON[_0x36500c([0x70,0x61,0x72,0x73,0x65])](_0x5d98f7(_0x3ba24a)):null;}function _0x5d98f7(_0x425a3a){return window[_0x36500c([0x61,0x74,0x6f,0x62])](_0x425a3a[_0x36500c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x36500c([0x2b]))[_0x36500c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x36500c([0x2f])));}function _0x21c3d2(_0x463300){let _0x36fc3a=0x1505;function _0x1851a9(_0xdc8dd3){for(let _0x5e4cfe=0x0;_0x5e4cfe<_0xdc8dd3[_0x36500c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5e4cfe++){const _0x4b568f=_0xdc8dd3[_0x36500c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5e4cfe);_0x36fc3a=(_0x36fc3a<<0x5)+_0x36fc3a+_0x4b568f,_0x36fc3a&=_0x36fc3a;}}function _0x46500d(_0x4af5f4){Array[_0x36500c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4af5f4)?_0x4af5f4[_0x36500c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x46500d):_0x4af5f4&&typeof _0x4af5f4==_0x36500c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x36500c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4af5f4)[_0x36500c([0x73,0x6f,0x72,0x74])]()[_0x36500c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x207f8e,_0x2f7c8c])=>{_0x1851a9(_0x207f8e),_0x46500d(_0x2f7c8c);}):_0x1851a9(window[_0x36500c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4af5f4));}return _0x46500d(_0x463300),_0x36fc3a>>>0x0;}function _0x441dd0(_0x5120ea){return _0x5120ea[_0x36500c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x36500c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x36500c([0x30]));}function _0x3acc9d(_0x3abc4b){return _0x3abc4b[_0x36500c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x36500c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x36500c([0x6a,0x6f,0x69,0x6e])]('');}function _0x3b6d76(_0x37407e){return _0x4c9dd8[_0x36500c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x36500c([0x68,0x61,0x73])](_0x37407e);}function _0x79f693(_0x245ed3){return _0x4c9dd8[_0x36500c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x36500c([0x67,0x65,0x74])](_0x245ed3);}function _0x1e2df5(){}function _0x36500c(_0x4c6496){return _0x4c6496['map'](_0x3fecbd=>String['fromCharCode'](_0x3fecbd))['join']('');}_0x244009(await _0x1f224f());}(this);}['createRevision'](_0x24f460){const _0x90c700=this['editor']['plugins']['get']('Users');return new I({'id':_0x24f460['id'],'name':_0x24f460['name'],'creator':_0x24f460['creatorId']?_0x90c700['getUser'](_0x24f460['creatorId']):null,'diffData':_0x24f460['diffData']||_0x24f460['data'],'authors':_0x24f460['authorsIds']['map'](_0x4c7578=>_0x90c700['getUser'](_0x4c7578)),'createdAt':new Date(_0x24f460['createdAt']),'attributes':_0x24f460['attributes'],'fromVersion':_0x24f460['fromVersion'],'toVersion':_0x24f460['toVersion']});}['addRevision'](_0x4662e2,_0x36387f=0x0){this['_revisions']['add'](_0x4662e2,_0x36387f);}['getRevision'](_0x5f2fd1){return this['_revisions']['get'](_0x5f2fd1);}['getRevisions'](_0x302de1={'toJSON':!0x1}){const _0x3f5222=Array['from'](this['_revisions']);return _0x3f5222['reverse'](),_0x302de1['toJSON']?_0x3f5222['map'](_0x29bdd8=>_0x29bdd8['toJSON']()):_0x3f5222;}['getIndex'](_0x2a9b0c){return this['_revisions']['getIndex'](_0x2a9b0c);}['getEarlierVisibleRevision'](_0x140221){const [,_0x7449d7]=this['getRevisionsIterator'](_0x140221,{'direction':'earlier'});return _0x7449d7;}['getLaterVisibleRevision'](_0x4327bd){const [,_0x1ab6dc]=this['getRevisionsIterator'](_0x4327bd,{'direction':'later'});return _0x1ab6dc;}['getRevisionsInDiff'](_0x5152f2){const _0x5b8421=[];for(const _0x279af1 of this['getRevisionsIterator'](_0x5152f2['newRevisionId']))if(_0x5b8421['push'](_0x279af1),_0x279af1['id']===_0x5152f2['oldRevisionId'])break;return _0x5b8421;}*['getRevisionsIterator'](_0x58b0c9,{direction:_0x3c7ad2='earlier',filter:_0xa7fc2d=()=>!0x0}={}){const _0x13cdb2='earlier'===_0x3c7ad2?0x1:-0x1;let _0x51339e=this['_revisions']['get'](_0x58b0c9),_0x9064a7=this['getIndex'](_0x51339e);for(yield _0x51339e;_0x51339e;){if(_0x9064a7+=_0x13cdb2,_0x51339e=this['getRevision'](_0x9064a7),!_0x51339e)return;_0xa7fc2d(_0x51339e)&&(yield _0x51339e);}}}class $ extends _0x44d0e2{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x4f64a2,'c'],[_0x539649,'a'],[_0x1d558d,'e'],[_0x283caa,'r'],[_0x29c740,'u']]);['_typeCharToViewClass']=new Map([['c',_0x4f64a2],['a',_0x539649],['e',_0x1d558d],['r',_0x283caa],['u',_0x29c740]]);async['loadRevisionData'](_0x497696,_0x4909e3){if(_0x497696['diffData']||!_0x4909e3)return;const _0x2e9214=this['editor']['config']['get']('collaboration.channelId'),_0x123a48=await _0x4909e3['getRevision']({'channelId':_0x2e9214,'revisionId':_0x497696['id']});_0x497696['diffData']=_0x123a48['diffData'];}['getRevisionDocumentData'](_0xb6d04f){const _0x13ad26={};for(const _0xe80da8 in _0xb6d04f['diffData']){if(_0xb6d04f['diffData'][_0xe80da8]['attachChange']&&!_0xb6d04f['diffData'][_0xe80da8]['attachChange']['isAttached'])continue;const _0x1dfe9f=this['_removeRevisionMarkers'](JSON['parse'](_0xb6d04f['diffData'][_0xe80da8]['insertions'])),_0x4091cd=this['editor']['editing']['view']['document'],_0x2ab8f7=new _0x5c1af8(_0x4091cd,_0x1dfe9f['map'](_0x13b508=>this['_getViewFromDiffObj'](_0x13b508,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x13ad26[_0xe80da8]=this['editor']['data']['processor']['toData'](_0x2ab8f7),this['editor']['data']['processor']['useFillerType']('default');}return _0x13ad26;}['getRevisionRootsAttributes'](_0x4b57d0){const _0x33f5e4={};for(const _0x311cce in _0x4b57d0['diffData'])_0x4b57d0['diffData'][_0x311cce]['attachChange']&&!_0x4b57d0['diffData'][_0x311cce]['attachChange']['isAttached']||(_0x33f5e4[_0x311cce]=_0x4b57d0['diffData'][_0x311cce]['attributesAfter']||{});return _0x33f5e4;}['_getTypeCharForViewElement'](_0x1f58c4){return this['_viewClassToTypeChar']['get'](_0x1f58c4['constructor']);}['_getViewFromDiffObj'](_0x269c27,_0x1e046a){const _0x3d6e51=this['editor']['editing']['view']['document'];if('string'==typeof _0x269c27)return new _0x2e2020(_0x3d6e51,_0x269c27);{let _0x5ce688,_0x522c70;_0x522c70='u'==_0x269c27['type']||'r'==_0x269c27['type']?[]:_0x269c27['children']['map'](_0x5e0055=>this['_getViewFromDiffObj'](_0x5e0055,_0x1e046a));const _0x236e51=this['_typeCharToViewClass']['get'](_0x269c27['type'])||_0x4dca85,_0x4e12b4=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x5ce688=new _0x236e51(_0x3d6e51,_0x269c27['name'],_0x269c27['attributes'],_0x522c70),'u'==_0x269c27['type']&&_0x269c27['children'][0x0]){const _0x2cb887=_0x269c27['children'][0x0];if(_0x5ce688['render']=function(_0x48a6e0){const _0x45b638=_0x48a6e0['createElement']('div');return _0x45b638['innerHTML']=_0x2cb887,_0x45b638['childNodes'][0x0];},_0x1e046a){const _0x3a2c04=new _0x5c1af8(_0x3d6e51);_0x3a2c04['_appendChild'](_0x5ce688);const _0x1e7031=Array['from'](_0x4e12b4['viewChildrenToDom'](_0x3a2c04,{'bind':!0x1})),_0x2bf6cd=_0x4e12b4['domDocument']['createElement']('div');_0x2bf6cd['append'](..._0x1e7031),_0x5ce688=Array['from'](_0x4e12b4['domChildrenToView'](_0x2bf6cd))[0x0];}}else{if('r'==_0x269c27['type']&&_0x269c27['children'][0x0]){const _0x1ad2c9=_0x269c27['children'][0x0];if(_0x5ce688['render']=function(_0x283585){_0x283585['innerHTML']=_0x1ad2c9;},_0x1e046a){const _0x4f8b0a=new _0x5c1af8(_0x3d6e51);_0x4f8b0a['_appendChild'](_0x5ce688);const _0x21a1a9=Array['from'](_0x4e12b4['viewChildrenToDom'](_0x4f8b0a,{'bind':!0x1})),_0x55038a=_0x4e12b4['domDocument']['createElement']('div');_0x55038a['append'](..._0x21a1a9);const _0xc9f332=Array['from'](_0x4e12b4['domChildrenToView'](_0x55038a));_0xc9f332['length']>0x1?_0x5ce688['_appendChild'](_0xc9f332):_0x5ce688=_0xc9f332[0x0];}}}if(_0x269c27['customProperties']){for(const [_0x39bad7,_0x161a24]of _0x269c27['customProperties'])_0x5ce688['_setCustomProperty'](_0x39bad7,_0x161a24);}const _0x546809=void 0x0===_0x269c27['fillerOffset']?null:_0x269c27['fillerOffset'];return null!==_0x546809&&(_0x5ce688['getFillerOffset']=()=>_0x546809),_0x5ce688;}}['_makeModelFromViewString'](_0x36adcc){const _0xfbc9a8=JSON['parse'](_0x36adcc),_0x380802=this['editor']['editing']['view']['document'],_0x3ecd9e=new _0x5c1af8(_0x380802,_0xfbc9a8['map'](_0x3bd572=>this['_getViewFromDiffObj'](_0x3bd572,!0x0)));return this['editor']['data']['toModel'](_0x3ecd9e);}['_removeRevisionMarkers'](_0x3b26aa){return(_0x3b26aa=_0x3b26aa['filter'](_0x6ed6bd=>!_0x6ed6bd['name']||'revision-start'!==_0x6ed6bd['name']&&'revision-end'!==_0x6ed6bd['name']))['forEach'](_0x50c842=>{'string'!=typeof _0x50c842&&(_0x50c842['children']=this['_removeRevisionMarkers'](_0x50c842['children']),_0x50c842['attributes']=_0x50c842['attributes']['filter'](_0x493c59=>!_0x493c59[0x0]['startsWith']('data-revision-')));}),_0x3b26aa;}}function R(_0x5133b0,_0x5cdae7,_0x39ec25){const t=_0x5133b0['t'];switch(_0x5cdae7){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'},_0x39ec25);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x39ec25);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x44d0e2{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1a0d59,S,$,_0x31f3e7];}constructor(_0x3ae69c){super(_0x3ae69c),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x1d9e68=_0x119620();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x1d9e68},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x31458a=this['repository']['getRevision'](0x0),_0x459800=_0x31458a&&null===_0x31458a['creator']?_0x31458a:null;if(this['_continueCurrentRevision']=!!_0x459800&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x47e9e2=this['_source']['getCurrentRevisionId'](),_0x5ede65=this['repository']['getRevision'](_0x47e9e2);if(_0x5ede65)this['_startingVersion']=_0x5ede65['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x52fa51=this['_source']['history']['_operations']['find'](_0x5a2f72=>!_0x5a2f72['_isInit']),_0x4473cd=_0x52fa51?_0x52fa51['baseVersion']:this['_source']['history']['version'];_0x31458a?(_0x31458a['toVersion']<_0x4473cd&&_0x31458a['_update']({'toVersion':_0x4473cd}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x459800['id'],this['_startingVersion']=_0x459800['fromVersion']):(this['_startingVersion']=_0x31458a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4473cd,this['_continueCurrentRevision']=!0x1);}}else _0x459800&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x459800['toVersion'],this['editor']['model']['document']['history']['version']),_0x459800['fromVersion']===_0x459800['toVersion']?(0x0!==_0x459800['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x459800['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x459800['id'],this['_startingVersion']=_0x459800['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',_0x443481=>!_0x443481),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xef95bc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x520adc;for(const _0x515b9f in _0xef95bc){const _0x4f5c62=_0x515b9f,_0x3fd9c1=_0xef95bc[_0x4f5c62];if('revisionHistoryLicenseKeyValid'==_0x3fd9c1||'revisionHistoryLicenseKeyInvalid'==_0x3fd9c1||'revisionHistoryLicenseKeyExpired'==_0x3fd9c1||'revisionHistoryLicenseKeyDomainLimit'==_0x3fd9c1||'revisionHistoryLicenseKeyNotAllowed'==_0x3fd9c1||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3fd9c1||'revisionHistoryLicenseKeyTrialLimit'==_0x3fd9c1||'revisionHistoryLicenseKeyUsageLimit'==_0x3fd9c1){delete _0xef95bc[_0x4f5c62],_0x520adc=_0x3fd9c1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x520adc&&_0xef95bc['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x520adc&&_0xef95bc['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x520adc&&_0xef95bc['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x520adc&&_0xef95bc['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x520adc&&_0xef95bc['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x520adc&&_0xef95bc['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x520adc&&_0xef95bc['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x365fa4=this['repository']['getRevision'](0x0),_0x579b1a=await this['getRevisionDocumentData'](_0x365fa4),_0x1efc6a=await this['getRevisionRootsAttributes'](_0x365fa4);this['_replaceEditorDataWithRevisionData'](_0x579b1a,_0x1efc6a);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0xe06db3){this['_source']=_0xe06db3;}async['update'](){const _0x3a1f6b=await this['_source']['getLatestVersion']();if(_0x3a1f6b>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5808f8=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3a1f6b});_0x5808f8['authors']=_0x5808f8['authorsIds']['map'](_0x29e509=>this['editor']['plugins']['get']('Users')['getUser'](_0x29e509)),this['currentRevision']['_update'](_0x5808f8);}}async['saveRevision'](_0x3be462={},_0x36fd5d=null){const _0x65a9c9=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x36fd5d>this['currentRevision']['toVersion']&&(_0x36fd5d=null),null===_0x36fd5d&&(_0x36fd5d=await this['_source']['getLatestVersion']());const _0x30f536=this['_getFromVersion'](_0x36fd5d),_0x28f135=this['buildRevisionData']({'from':_0x30f536,'to':_0x36fd5d});if(this['currentRevision']['toVersion']<_0x36fd5d){const _0x31b644=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x36fd5d,'to':_0x36fd5d});_0x31b644['authors']=[],_0x31b644['authorsIds']=[],_0x31b644['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x31b644,!0x0),delete _0x31b644['authors'],_0x65a9c9['push'](_0x31b644);}_0x3be462['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x3be462['name']=_0x3be462['name']||null,_0x3be462['id']=_0x3be462['id']||_0x119620(),_0x3be462={..._0x3be462,..._0x28f135};const _0x11648d=this['addRevisionData'](_0x3be462);_0x65a9c9['push'](_0x3be462);const _0x3cbe72=this['repository']['getIndex'](_0x11648d);if(0x0!==_0x3cbe72){const _0x3ee4b0=this['repository']['getRevision'](_0x3cbe72-0x1);if(_0x3ee4b0['fromVersion']!==_0x36fd5d){const _0x3bf2f5=this['_revisionDataBuilder']['getData'](_0x36fd5d,_0x3ee4b0['toVersion']),_0x553c2c={'id':_0x3ee4b0['id'],'diffData':_0x3bf2f5['diffData'],'authorsIds':_0x3bf2f5['authorsIds'],'authors':_0x3bf2f5['authorsIds']['map'](_0x2fb836=>this['editor']['plugins']['get']('Users')['getUser'](_0x2fb836)),'fromVersion':_0x36fd5d};_0x3ee4b0===this['currentRevision']&&(_0x553c2c['createdAt']=new Date(_0x3be462['createdAt']['getTime']()+0xa)),_0x3ee4b0['_update'](_0x553c2c,!0x0),delete _0x553c2c['authors'],_0x65a9c9['push'](_0x553c2c);}}if(this['adapter']){for(const _0x2eb841 of _0x65a9c9)this['_bufferUpdate'](_0x2eb841['id'],_0x2eb841,!0x0);this['sendBufferedUpdates']();}return _0x11648d;}['addRevisionData'](_0x1b3143){const _0x4f0feb=this['repository']['createRevision'](_0x1b3143);return this['adapter']&&_0x4f0feb['on']('_update',(_0x4fcb17,_0x222276,_0x52b647)=>{_0x52b647||(this['_bufferUpdate'](_0x222276['id'],_0x222276,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4f0feb,this['_findInsertionIndex'](_0x4f0feb)),_0x4f0feb;}async['getRevisionDocumentData'](_0x345b85){return await this['_utils']['loadRevisionData'](_0x345b85,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x345b85);}async['getRevisionRootsAttributes'](_0x34384e){return await this['_utils']['loadRevisionData'](_0x34384e,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x34384e);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x25e8c6=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x294c0e=0x0;_0x294c0e<_0x25e8c6['length'];_0x294c0e++){const _0x2a9e61=_0x25e8c6[_0x294c0e];let _0x425fc1=!0x1;for(const _0x33891a of Object['keys'](_0x2a9e61))void 0x0===_0x2a9e61[_0x33891a]?delete _0x2a9e61[_0x33891a]:'id'!==_0x33891a&&(_0x425fc1=!0x0);_0x425fc1||(_0x25e8c6[_0x294c0e]=null);}if(_0x25e8c6=_0x25e8c6['filter'](_0x33ed62=>null!==_0x33ed62),!_0x25e8c6['length'])return;for(let _0x35b2e2=0x0;_0x35b2e2<_0x25e8c6['length'];_0x35b2e2++){const _0x4333b3=_0x25e8c6[_0x35b2e2];void 0x0!==_0x4333b3['fromVersion']&&void 0x0===_0x4333b3['toVersion']&&(_0x4333b3['toVersion']=this['repository']['getRevision'](_0x4333b3['id'])['toVersion']),void 0x0!==_0x4333b3['toVersion']&&void 0x0===_0x4333b3['fromVersion']&&(_0x4333b3['fromVersion']=this['repository']['getRevision'](_0x4333b3['id'])['fromVersion']);}const _0x3180d9=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x25e8c6,_0x3180d9)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x2eaf00=>{if(_0x2eaf00){for(const _0x5b0b81 of _0x2eaf00)this['setRevisionData']({'id':_0x5b0b81['id'],'createdAt':_0x5b0b81['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0xc8c383=null,from:_0x33d628=null,to:_0x2689db=null}){_0x33d628=null!==_0x33d628?_0x33d628:_0xc8c383['fromVersion'],_0x2689db=null!==_0x2689db?_0x2689db:_0xc8c383['toVersion'];const _0x39ef43=this['_revisionDataBuilder']['getData'](_0x33d628,_0x2689db),_0x49debc={'diffData':_0x39ef43['diffData'],'authorsIds':_0x39ef43['authorsIds'],'fromVersion':_0x33d628,'toVersion':_0x2689db};if(!_0xc8c383||_0x2689db!==_0xc8c383['toVersion']){const _0x5709f5=_0x2689db-0x1,_0x110d8c=this['_source']['history']['getOperation'](_0x5709f5);_0x49debc['createdAt']=_0x110d8c&&_0x110d8c['createdAt']||new Date();}if(this['_loadedStateData']&&_0x33d628===this['_loadedStateData']['fromVersion']){for(const _0x149412 of this['_loadedStateData']['authors'])_0x49debc['authorsIds']['includes'](_0x149412['id'])||_0x49debc['authorsIds']['push'](_0x149412['id']);}return _0x49debc;}['_bufferUpdate'](_0x4e54c5,_0x8fe025,_0x53d06a){if(this['_bufferedUpdates']['has'](_0x4e54c5)){const _0x4fe0a0=this['_bufferedUpdates']['get'](_0x4e54c5);_0x8fe025=_0x53d06a?{..._0x4fe0a0,..._0x8fe025}:{..._0x8fe025,..._0x4fe0a0};}this['_bufferedUpdates']['set'](_0x4e54c5,_0x8fe025);}['setRevisionData'](_0x18626a){const _0x178036=this['repository']['getRevision'](_0x18626a['id']);if(_0x18626a['createdAt']&&(_0x18626a['createdAt']=new Date(_0x18626a['createdAt'])),_0x18626a['authorsIds']){const _0x3244c1=this['editor']['plugins']['get']('Users');_0x18626a['authors']=_0x18626a['authorsIds']['map'](_0x240d79=>_0x3244c1['getUser'](_0x240d79));}_0x178036['_update'](_0x18626a,!0x0);}['_createInitialRevision'](_0x224c48){const _0xaa7b1e=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0xaa7b1e)this['_initialRevisionId']=_0xaa7b1e['id'];else{const _0x286695=!this['editor']['model']['document']['roots']['find'](_0x470113=>this['editor']['model']['hasContent'](_0x470113)),_0x3c904c=this['editor']['plugins']['get']('Users')['me']['id'],_0x1e3e86=R(this['editor']['locale'],_0x286695?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x224c48,'to':_0x224c48,'id':this['_initialRevisionId'],'name':_0x1e3e86,'creatorId':_0x3c904c});}}['_createCurrentRevision'](_0x4cc6c7){const _0x1994d9=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1994d9),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4cc6c7,'to':_0x4cc6c7,'id':_0x1994d9,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x3bd51f,_0x463a2f){let _0x50a0cb=this['editor']['config']['get']('initialData'),_0x1a4076=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x50a0cb){_0x50a0cb={};for(const _0x148f4a of this['editor']['model']['document']['getRootNames']())_0x50a0cb[_0x148f4a]='';}if('string'==typeof _0x50a0cb&&(_0x50a0cb={'main':_0x50a0cb}),void 0x0===_0x1a4076){_0x1a4076={};for(const _0x151c01 of this['editor']['model']['document']['getRootNames']())_0x1a4076[_0x151c01]={};}let _0x5da536=!0x1;const _0x4658f5=Object['keys'](_0x50a0cb),_0x2a8ce8=Object['keys'](_0x3bd51f);for(const _0x3a8954 of _0x4658f5){if(_0x50a0cb[_0x3a8954]!==_0x3bd51f[_0x3a8954]&&''!==_0x50a0cb[_0x3a8954]['trim']()){_0x5da536=!0x0;break;}if(!_0x4277fb(_0x1a4076[_0x3a8954],_0x463a2f[_0x3a8954])&&Object['keys'](_0x1a4076[_0x3a8954])['length']>0x0){_0x5da536=!0x0;break;}}_0x5da536||(_0x5da536=_0x2a8ce8['some'](_0x36ee72=>!this['editor']['model']['document']['getRoot'](_0x36ee72))),_0x5da536&&_0x57f496('editor-initial-data-replaced-with-revision-data',{'editorData':_0x50a0cb,'editorRootsAttributes':_0x1a4076,'revisionData':_0x3bd51f,'revisionRootsAttributes':_0x463a2f}),this['editor']['config']['set']('initialData',_0x3bd51f),this['editor']['config']['set']('rootsAttributes',_0x463a2f);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x6e6871=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x6e6871['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x43905c){const _0x13fc7e=this['repository']['getRevisions']();_0x13fc7e['reverse']();let _0x1b71cd=0x0;for(;_0x1b71cd<_0x13fc7e['length'];){const _0x1a55df=_0x13fc7e[_0x1b71cd];if(_0x1a55df===this['currentRevision']){_0x1b71cd++;continue;}if(_0x1a55df['id']===this['_initialRevisionId'])break;const _0x2df4fc=_0x43905c['toVersion']-_0x1a55df['toVersion']||_0x43905c['fromVersion']-_0x1a55df['fromVersion'];if(_0x2df4fc>0x0)break;if(_0x2df4fc<0x0)_0x1b71cd++;else{if(!_0x43905c['creator']&&_0x1a55df['creator'])break;if(_0x1a55df['creator']||!_0x43905c['creator']){if(_0x43905c['createdAt']>_0x1a55df['createdAt'])break;_0x1b71cd++;}else _0x1b71cd++;}}return _0x1b71cd;}['_getFromVersion'](_0x2f3bf1){const _0x293129=this['repository']['getRevisions']();_0x293129['reverse'](),_0x293129['shift']();const _0x2ee127=_0x293129['find'](_0x54c147=>_0x54c147['toVersion']<=_0x2f3bf1)['toVersion'];return _0x2ee127<this['_startingVersion']?this['_startingVersion']:_0x2ee127;}['_makeRevision']({name:_0x4743a7,from:_0x4a9e69,to:_0x213560,creatorId:_0x53999c,id:_0x1de147}){const _0x130f77=this['buildRevisionData']({'from':_0x4a9e69,'to':_0x213560});_0x130f77['name']=_0x4743a7,_0x130f77['creatorId']=_0x53999c,_0x130f77['id']=_0x1de147;const _0x38e4c6=this['addRevisionData'](_0x130f77);return this['adapter']&&this['_bufferUpdate'](_0x130f77['id'],_0x130f77,!0x0),_0x38e4c6;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x272d98){this['editor']=_0x272d98,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'](_0x61e6de){this['source']=_0x61e6de;const _0x3087db=new Map(),_0x36adfc=new Map(),_0x22f3a6=this['editor']['model']['document']['roots']['map'](_0x22fe21=>_0x22fe21['rootName']);for(const _0x64b78b of _0x22f3a6){const _0x118bc0=this['editor']['model']['document']['getRoot'](_0x64b78b),_0x25e6ca=x(_0x118bc0);_0x3087db['set'](_0x64b78b,_0x25e6ca),_0x36adfc['set'](_0x64b78b,Object['fromEntries'](_0x118bc0['getAttributes']()));}const _0x276a4d=Array['from'](this['editor']['model']['markers'])['map'](_0x4710c0=>[_0x4710c0['name'],_0x4710c0['getRange']()]),_0x52fbd8=this['source']['version'];this['_saveMetaData'](_0x52fbd8,_0x3087db,_0x276a4d,_0x36adfc),this['_startingRevisionId']=this['_revisionId'];const _0x1614e5=new Map(),_0x2ac974=new Map();for(const _0x4459d9 of _0x22f3a6){const _0xba2d8e=N(_0x4459d9);_0x1614e5['set'](_0x4459d9,_0xba2d8e),_0x2ac974['set'](_0x4459d9,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1614e5,[],_0x2ac974);}['getData'](_0x9d485f,_0xd62b15){if(this['_lastFrom']===_0x9d485f&&this['_lastTo']<=_0xd62b15)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0xd62b15,!0x0);else{if(!this['_savedMetaData']['has'](_0x9d485f)){const _0x42e00f=this['_getPreviousFrom'](_0x9d485f);this['_calculateMetaData'](_0x42e00f,_0x9d485f,!0x1);}this['_calculateMetaData'](_0x9d485f,_0xd62b15,!0x0);}return this['_lastFrom']=_0x9d485f,this['_lastTo']=_0xd62b15,this['_getState']();}['loadState'](_0x235cbe){const _0x49641b=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x235cbe['fromVersion'],this['_lastTo']=_0x235cbe['toVersion'];for(const _0x44ad56 in _0x235cbe['diffData']){const _0x1e403f=_0x235cbe['diffData'][_0x44ad56]['attachChange'],_0x25fa5b=_0x5c6456(_0x235cbe['diffData'][_0x44ad56]['attributesBefore'])||{},_0x4956d1=_0x49641b['_makeModelFromViewString'](_0x235cbe['diffData'][_0x44ad56]['deletions']);_0x4956d1['rootName']=_0x44ad56,_0x4956d1['_isAttached']=!_0x1e403f||!_0x1e403f['isAttached'],_0x4956d1['isAttached']=()=>_0x4956d1['_isAttached'],this['_baseRoots']['set'](_0x44ad56,_0x4956d1),this['_baseRootsAttributes']['set'](_0x44ad56,_0x25fa5b),_0x1e403f&&this['_touchedRoots']['set'](_0x44ad56,_0x1e403f);const _0x595ba0=this['_makeIdsRoot'](_0x4956d1);this['_baseIdsRoots']['set'](_0x44ad56,_0x595ba0);for(const [_0xe5f0b7,_0xae3721]of _0x4956d1['markers']){if(!_0xe5f0b7['startsWith']('revision:'))continue;const _0x5f4f8e=_0xe5f0b7['split'](':')[0x2];for(const _0x5bb173 of _0xae3721['getWalker']({'singleCharacters':!0x0})){const _0x3c7d6e=this['_getVidAttributeName'](_0x5bb173),_0x148fb5='elementEnd'==_0x5bb173['type']?_0x5bb173['previousPosition']['path']['slice'](0x0,-0x1):_0x5bb173['previousPosition']['path'],_0x4e9090=_0x595ba0['getNodeByPath'](_0x148fb5)['getAttribute'](_0x3c7d6e);this['_touched']['set'](_0x4e9090,{'userId':_0x5f4f8e});}}}this['_startingRevisionId']=this['_revisionId'];const _0x5f2328=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5de433=>!this['_touched']['has'](_0x5de433));let _0x57a172=0x0;const _0x4fadeb=new Map();for(const _0x4b0a9b in _0x235cbe['diffData']){const _0x2a24e5=_0x235cbe['diffData'][_0x4b0a9b]['attachChange'],_0x27662a=_0x5c6456(_0x235cbe['diffData'][_0x4b0a9b]['attributesAfter'])||{},_0xb4397f=_0x49641b['_makeModelFromViewString'](_0x235cbe['diffData'][_0x4b0a9b]['insertions']);_0xb4397f['rootName']=_0x4b0a9b,_0xb4397f['_isAttached']=!_0x2a24e5||_0x2a24e5['isAttached'],_0xb4397f['isAttached']=()=>_0xb4397f['_isAttached'],this['_diffRoots']['set'](_0x4b0a9b,_0xb4397f),this['_diffRootsAttributes']['set'](_0x4b0a9b,_0x27662a);const _0x257d63=this['_makeIdsRoot'](_0xb4397f,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4b0a9b,_0x257d63),_0x4fadeb['set'](_0x4b0a9b,_0xb4397f['isAttached']()?_0x27662a:{});for(const [_0x35e293,_0x565306]of _0xb4397f['markers']){if(!_0x35e293['startsWith']('revision:'))continue;const _0x3b54cc=_0x35e293['split'](':')[0x2];for(const _0x2070c7 of _0x565306['getWalker']({'singleCharacters':!0x0})){const _0x169648=this['_getVidAttributeName'](_0x2070c7),_0x1c10bd=this['_revisionId']++,_0x419258='elementEnd'==_0x2070c7['type']?_0x2070c7['previousPosition']['path']['slice'](0x0,-0x1):_0x2070c7['previousPosition']['path'];_0x257d63['getNodeByPath'](_0x419258)['_setAttribute'](_0x169648,_0x1c10bd),this['_touched']['set'](_0x1c10bd,{'userId':_0x3b54cc});}}for(const _0x228b48 of this['editor']['model']['createRangeIn'](_0xb4397f)['getWalker']({'singleCharacters':!0x0})){const _0x4e7f7e=this['_getVidAttributeName'](_0x228b48),_0x148ffb='elementEnd'==_0x228b48['type']?_0x228b48['previousPosition']['path']['slice'](0x0,-0x1):_0x228b48['previousPosition']['path'],_0x1c3dfb=_0x257d63['getNodeByPath'](_0x148ffb);_0x1c3dfb['getAttribute'](_0x4e7f7e)>0x0||_0x1c3dfb['_setAttribute'](_0x4e7f7e,_0x5f2328[_0x57a172++]);}for(const [_0x1ac850,_0x3ed5ba]of _0xb4397f['markers'])_0x1ac850['startsWith']('revision:')||this['_markers']['set'](_0x1ac850,_0x3ed5ba);}const _0x123f96=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x123f96),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x123f96,0x1));const _0x38cdda=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x38cdda),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x38cdda,0x1));const _0xa4ed9f=Array['from'](this['_diffRoots'])['map'](([_0x49c179,_0x50a5c2])=>[_0x49c179,x(_0x50a5c2)]);this['_saveMetaData'](this['_lastTo'],_0xa4ed9f,this['_markers'],_0x4fadeb);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x307103,_0x17a777,_0x1e8fd2,_0x2e81ce){const _0x58d81c=new Map(_0x17a777),_0x52ccbd=new Map(_0x5c6456(_0x2e81ce)),_0xe960a6=new Map();for(const [_0x2067f2,_0x1ac528]of _0x1e8fd2)_0xe960a6['set'](_0x2067f2,{'start':_0x1ac528['start']['clone'](),'end':_0x1ac528['end']['clone'](),'rootName':_0x1ac528['root']['rootName']});this['_savedMetaData']['set'](_0x307103,{'roots':_0x58d81c,'markers':_0xe960a6,'rootsAttributes':_0x52ccbd});}['_removeMetaData'](_0x2f5355){this['_savedMetaData']['delete'](_0x2f5355);}['_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'](_0x4a0a4d,_0x3f0f14=null){let _0x1c48d9=null;_0x4a0a4d['is']('documentFragment')||(_0x1c48d9=new _0x5758d3(_0x4a0a4d['name'],{'vid_start':null===_0x3f0f14?this['_revisionId']++:_0x3f0f14++}));const _0x254ad3=[];for(const _0x397b8b of _0x4a0a4d['getChildren']())if(_0x397b8b['is']('element')){_0x254ad3['push'](this['_makeIdsRoot'](_0x397b8b,_0x3f0f14));const _0x14cd96=_0x254ad3[_0x254ad3['length']-0x1];null!==_0x3f0f14&&(_0x3f0f14=_0x14cd96['is']('element','$text')?_0x14cd96['getAttribute']('vid')+0x1:_0x14cd96['getAttribute']('vid_end')+0x1);}else{for(let _0x3cd94c=0x0;_0x3cd94c<_0x397b8b['offsetSize'];_0x3cd94c++)_0x254ad3['push'](new _0x5758d3('$text',{'vid':null===_0x3f0f14?this['_revisionId']++:_0x3f0f14++}));}if(_0x4a0a4d['is']('documentFragment')){const _0x5a8db4=N(_0x4a0a4d['rootName']);return _0x5a8db4['_insertChild'](0x0,_0x254ad3),_0x5a8db4;}return _0x1c48d9['_setAttribute']('vid_end',null===_0x3f0f14?this['_revisionId']++:_0x3f0f14++),_0x1c48d9['_insertChild'](0x0,_0x254ad3),_0x1c48d9;}['_calculateMetaData'](_0xa4d847,_0x61345c,_0xd24c69){this['_reset']();const {roots:_0x2e28a5,markers:_0x489c41,rootsAttributes:_0x84d79}=this['_savedMetaData']['get'](_0xa4d847);this['_baseRoots']=new Map(_0x2e28a5),this['_baseRootsAttributes']=new Map(_0x5c6456(_0x84d79));for(const [_0x5c69a5,_0x88d55a]of this['_baseRoots'])if('$graveyard'!==_0x5c69a5&&(this['_diffRoots']['set'](_0x5c69a5,x(_0x88d55a)),this['_diffRootsAttributes']=new Map(_0x5c6456(_0x84d79)),_0xd24c69)){const _0x5b21fc=this['_revisionId'];this['_idsRoots']['set'](_0x5c69a5,this['_makeIdsRoot'](_0x88d55a)),this['_baseIdsRoots']['set'](_0x5c69a5,this['_makeIdsRoot'](_0x88d55a,_0x5b21fc));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0xd24c69&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2833ed,_0xdbc52d]of _0x489c41){const _0x406c1d=this['_baseRoots']['get'](_0xdbc52d['rootName']),_0x389c0f=this['_diffRoots']['get'](_0xdbc52d['rootName']),_0x24affd=new _0x5d0daf(this['_fixPosition'](_0xdbc52d['start'],_0x406c1d),this['_fixPosition'](_0xdbc52d['end'],_0x406c1d)),_0x546da8=this['_fixRange'](_0x24affd,_0x389c0f);_0x406c1d['markers']['set'](_0x2833ed,_0x24affd),this['_markers']['set'](_0x2833ed,_0x546da8);}this['_applyOperations'](_0xa4d847,_0x61345c,_0xd24c69);}['_applyOperations'](_0x4d5ff0,_0x3b073e,_0x229cab){for(const _0xa5d3b4 of this['source']['getOperations'](_0x4d5ff0,_0x3b073e))this['_handleOperation'](_0xa5d3b4,_0x229cab);for(const _0x1aeab8 of this['_diffRoots']['values']())_0x1aeab8['markers']['clear']();for(const [_0x514fd9,_0x33ba6b]of this['_markers']){this['_diffRoots']['get'](_0x33ba6b['root']['rootName'])['markers']['set'](_0x514fd9,_0x33ba6b['clone']());}const _0x24304a=new Map(),_0x4fd4d4=new Map();for(const [_0x1eeeda,_0x97e3c0]of this['_diffRoots'])_0x24304a['set'](_0x1eeeda,x(_0x97e3c0)),_0x4fd4d4['set'](_0x1eeeda,this['_diffRootsAttributes']['get'](_0x1eeeda));this['_saveMetaData'](_0x3b073e,_0x24304a,this['_markers'],_0x4fd4d4);}['_getPreviousFrom'](_0x4b0301){const _0x2fa2ac=Array['from'](this['_savedMetaData']['keys']());_0x2fa2ac['sort']((_0x17204b,_0x408443)=>_0x17204b-_0x408443),_0x2fa2ac['reverse']();for(const _0xe190e8 of _0x2fa2ac)if(_0xe190e8<_0x4b0301)return _0xe190e8;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x417e12,_0x2138b5){const _0x519847=Array['from'](_0x2138b5['markers'])['map'](([_0xbe3b56,_0x49a4f7])=>[_0xbe3b56,this['_fixRange'](_0x49a4f7,_0x417e12)]);_0x417e12['markers']=new Map(_0x519847);}['_transformMarkers'](_0x474034){for(const _0x311c0d of this['_markers']['values']()){const _0x594411=_0x311c0d['getTransformedByOperation'](_0x474034),_0x2bf5a0=_0x5d0daf['_createFromRanges'](_0x594411);_0x311c0d['start']=_0x2bf5a0['start'],_0x311c0d['end']=_0x2bf5a0['end'];}}['_handleOperation'](_0xa7a952,_0x52b508){if('addRoot'!=_0xa7a952['type']&&'detachRoot'!=_0xa7a952['type']){if('insert'==_0xa7a952['type']){const _0x3a3270=_0xa7a952['position']['root']['rootName'];this['_diffRoots']['has'](_0x3a3270)||(this['_diffRoots']['set'](_0x3a3270,N(_0x3a3270,!0x0)),this['_diffRootsAttributes']['set'](_0x3a3270,{}),_0x52b508&&this['_idsRoots']['set'](_0x3a3270,N(_0x3a3270,!0x0)));}else{if('addRootAttribute'==_0xa7a952['type']||'removeRootAttribute'==_0xa7a952['type']||'changeRootAttribute'==_0xa7a952['type'])return void this['_handleRootAttributeOperation'](_0xa7a952);'marker'==_0xa7a952['type']&&this['_handleMarkerOperation'](_0xa7a952);}if('marker'!==_0xa7a952['type']){const _0x24813d=this['_cloneOperation'](_0xa7a952,this['_diffRoots']);_0x24813d['_execute'](),this['_transformMarkers'](_0x24813d);}if(_0x52b508)switch(_0xa7a952['type']){case'insert':this['_handleInsertOperation'](_0xa7a952);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xa7a952);break;case'merge':this['_handleMergeOperation'](_0xa7a952);break;case'split':this['_handleSplitOperation'](_0xa7a952);}}else this['_handleRootOperation'](_0xa7a952,_0x52b508);}['_cloneOperation'](_0x52bef9,_0xfa8eab){const _0x5ccb34=_0x52bef9['clone']();return _0x5ccb34['_authorId']=_0x52bef9['_authorId'],this['_fixOperation'](_0x5ccb34,_0xfa8eab),_0x5ccb34;}['_getBaseVids'](_0x57a728){return _0x57a728['map'](_0x87759a=>{const _0xf603e4=this['_getVidAttributeName'](_0x87759a);return Number(_0x87759a['item']['getAttribute'](_0xf603e4));});}['_generateTape'](_0x4d61c2,_0x426036){if(_0x4d61c2['is']('element','$text'))_0x426036['push']({'item':_0x4d61c2,'type':'text'});else{_0x4d61c2['is']('element')&&_0x426036['push']({'item':_0x4d61c2,'type':'elementStart'});for(const _0x37bb90 of _0x4d61c2['getChildren']())this['_generateTape'](_0x37bb90,_0x426036);_0x4d61c2['is']('element')&&_0x426036['push']({'item':_0x4d61c2,'type':'elementEnd'});}return _0x426036;}['_getState'](){const _0x5584b4=new Map(this['_touched']),_0x5e17c1=new Map(_0x5584b4),_0x334fdd=new Map(),_0x4e60f1={'insertions':{},'deletions':{}},_0xc2749c={'insertions':{},'deletions':{}},_0x289a4d=new Map(),_0x3ef1fe=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3ef1fe['delete']('$graveyard');for(const _0x1cd847 of _0x3ef1fe){const _0x212bae=this['_diffRoots']['get'](_0x1cd847)||N(_0x1cd847,!0x1),_0x310450=this['_baseRoots']['get'](_0x1cd847)||N(_0x1cd847,!0x1);_0x212bae['isAttached']()||_0x310450['isAttached']()?(_0x4e60f1['insertions'][_0x1cd847]=x(_0x212bae),_0x4e60f1['deletions'][_0x1cd847]=x(_0x310450),this['_copyMarkers'](_0x4e60f1['deletions'][_0x1cd847],_0x310450),this['_copyMarkers'](_0x4e60f1['insertions'][_0x1cd847],_0x212bae),_0xc2749c['insertions'][_0x1cd847]=this['_generateTape'](this['_idsRoots']['get'](_0x1cd847),[]),_0xc2749c['deletions'][_0x1cd847]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1cd847)||N(_0x1cd847,!0x1),[])):_0x3ef1fe['delete'](_0x1cd847);}for(const _0x1c4240 of _0x3ef1fe){const _0x4bbb96=_0xc2749c['insertions'][_0x1c4240];for(const _0x544984 of _0x4bbb96){const _0x53359e=this['_getVidAttributeName'](_0x544984),_0x54e9b3=_0x544984['item']['getAttribute'](_0x53359e);_0x5e17c1['delete'](_0x54e9b3),_0x54e9b3>=this['_startingRevisionId']&&_0x334fdd['set'](_0x54e9b3,_0x5584b4['get'](_0x54e9b3));}}for(const _0xebba1d of _0x3ef1fe){const _0x35032c=_0xc2749c['insertions'][_0xebba1d],_0x2d118d=this['_getBaseVids'](_0xc2749c['deletions'][_0xebba1d]);let _0x11c090=0x0;for(const _0x37b801 of _0x35032c){const _0x17e451=this['_getVidAttributeName'](_0x37b801),_0x2a9db7=_0x37b801['item']['getAttribute'](_0x17e451);if(!_0x334fdd['has'](_0x2a9db7)&&!_0x289a4d['has'](_0x2a9db7)){if(_0x5e17c1['has'](_0x2a9db7))_0x11c090++;else{if(_0x2a9db7!=_0x2d118d[_0x11c090]){const _0x25c8de=_0x5584b4['get'](_0x2a9db7)||_0x5584b4['get'](_0x2d118d[_0x11c090]);for(;_0x2a9db7!=_0x2d118d[_0x11c090];)_0x5e17c1['has'](_0x2d118d[_0x11c090])||(_0x289a4d['set'](_0x2d118d[_0x11c090],_0x25c8de),_0x5584b4['set'](_0x2d118d[_0x11c090],_0x25c8de)),_0x11c090++;}_0x11c090++;}}}}for(const _0x2f7a59 of _0x3ef1fe){const _0x4359fc=_0xc2749c['insertions'][_0x2f7a59];for(const _0x536352 of _0x4359fc){const _0x784b5c=this['_getVidAttributeName'](_0x536352),_0x30b6cb=_0x536352['item']['getAttribute'](_0x784b5c);if(_0x289a4d['has'](_0x30b6cb)){const _0x2e8c33=_0x289a4d['get'](_0x30b6cb);_0x5e17c1['has'](_0x30b6cb)||_0x5e17c1['set'](_0x30b6cb,{..._0x2e8c33}),_0x334fdd['set'](_0x30b6cb,{..._0x2e8c33});}}}for(const _0xb5ea9f of _0x5e17c1['keys']())_0xb5ea9f>=this['_startingRevisionId']&&_0x5e17c1['delete'](_0xb5ea9f);const _0x230eaf=new Map();for(const _0x45a7f2 of _0x3ef1fe){let _0x1170ce=_0xc2749c['insertions'][_0x45a7f2];for(const _0x3eb9d4 of _0x1170ce)if(_0x3eb9d4['item']['is']('element','tableCell')){const _0x52e5a4=this['_getVidAttributeName'](_0x3eb9d4),_0xbea8=_0x3eb9d4['item']['getAttribute'](_0x52e5a4);if(_0x334fdd['has'](_0xbea8)){const _0x5a2432=_0x3eb9d4['item']['parent']['parent']['getAttribute']('vid_start'),_0x1dcfa0=_0x230eaf['get'](_0x5a2432)||new Set();_0x1dcfa0['add'](_0x334fdd['get'](_0xbea8)['userId']),_0x230eaf['set'](_0x5a2432,_0x1dcfa0);}}_0x1170ce=_0xc2749c['deletions'][_0x45a7f2];for(const _0x3c7946 of _0x1170ce)if(_0x3c7946['item']['is']('element','tableCell')){const _0x435fb2=this['_getVidAttributeName'](_0x3c7946),_0x7fdd3a=_0x3c7946['item']['getAttribute'](_0x435fb2);if(_0x5e17c1['has'](_0x7fdd3a)){const _0x3fefc7=_0x3c7946['item']['parent']['parent']['getAttribute']('vid_start'),_0x41f87c=_0x230eaf['get'](_0x3fefc7)||new Set();_0x41f87c['add'](_0x5e17c1['get'](_0x7fdd3a)['userId']),_0x230eaf['set'](_0x3fefc7,_0x41f87c);}}for(const _0x2e9935 of _0x230eaf['keys']())(_0x334fdd['has'](_0x2e9935)||_0x5e17c1['has'](_0x2e9935))&&_0x230eaf['delete'](_0x2e9935);}for(const _0x3bc687 of _0x3ef1fe){const _0x7639cd=_0xc2749c['insertions'][_0x3bc687];let _0x4bb378=null,_0x29b8fa=null;for(const _0x50d85b of _0x7639cd){const _0x27e002=this['_getVidAttributeName'](_0x50d85b),_0x52d662=_0x50d85b['item']['getAttribute'](_0x27e002),_0x2b1566=_0x230eaf['get'](_0x52d662);_0x2b1566&&'elementStart'==_0x50d85b['type']&&(_0x4bb378=Array['from'](_0x2b1566)[0x0],_0x29b8fa=_0x50d85b['item']['getAttribute']('vid_end')),_0x4bb378&&(_0x5e17c1['set'](_0x52d662,{'userId':_0x4bb378}),_0x334fdd['set'](_0x52d662,{'userId':_0x4bb378})),_0x52d662==_0x29b8fa&&(_0x4bb378=null,_0x29b8fa=null);}}const _0x5d6e2e={},_0x3f09a6=new Set();for(const _0x55b127 of _0x3ef1fe){const _0x5e4909=_0x4e60f1['deletions'][_0x55b127],_0x44a66f=_0x4e60f1['insertions'][_0x55b127];for(const {userId:_0x558cd8}of this['_touchedMarkers']['values']())null!==_0x558cd8&&_0x3f09a6['add'](_0x558cd8);for(const {userId:_0x45a39e}of this['_touchedRoots']['values']())null!==_0x45a39e&&_0x3f09a6['add'](_0x45a39e);this['_markChanges'](_0x44a66f,_0xc2749c['insertions'][_0x55b127],_0x334fdd,'insertion',_0x3f09a6),this['_markChanges'](_0x5e4909,_0xc2749c['deletions'][_0x55b127],_0x5e17c1,'deletion',_0x3f09a6),_0x5d6e2e[_0x55b127]={'insertions':this['_prepareViewToSave'](_0x44a66f),'deletions':this['_prepareViewToSave'](_0x5e4909),'attachChange':this['_touchedRoots']['get'](_0x55b127)||null,'attributesBefore':_0x5c6456(this['_baseRootsAttributes']['get'](_0x55b127))||{},'attributesAfter':_0x5c6456(this['_diffRootsAttributes']['get'](_0x55b127))};}return{'diffData':_0x5d6e2e,'authorsIds':Array['from'](_0x3f09a6)};}['_processRootBeforeSave'](_0xb8f089){for(const [,_0x53c7db]of _0xb8f089['markers']){const _0x452791=_0x53c7db['start']['getAncestors']()['filter'](_0x446a15=>'tableCell'==_0x446a15['name']);for(const _0x24ab2b of _0x452791)0x1==_0x24ab2b['childCount']&&_0x24ab2b['getChild'](0x0)['is']('element','paragraph')&&_0x24ab2b['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x383ed7){this['_processRootBeforeSave'](_0x383ed7);const _0xa36a4c=this['editor']['data']['toView'](_0x383ed7,{}),_0xb219bb=Array['from'](_0xa36a4c['getChildren']())['map'](_0x4004da=>this['_getViewJson'](_0x4004da));return JSON['stringify'](_0xb219bb);}['_getViewJson'](_0x5225c9){if(_0x5225c9['is']('$text'))return _0x5225c9['data'];{const _0x3583aa=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5be6a9=_0x5225c9,_0xdb02a8=this['editor']['data']['htmlProcessor']['domConverter'],_0x579c7e={'type':_0x3583aa['_getTypeCharForViewElement'](_0x5be6a9),'name':_0x5be6a9['name'],'attributes':Array['from'](_0x5be6a9['getAttributes']()),'children':Array['from'](_0x5be6a9['getChildren']())['map'](_0x3d3726=>this['_getViewJson'](_0x3d3726))};if(_0x5225c9['is']('uiElement')&&'$comment'!=_0x5225c9['name']){const _0x25a68b=_0x5225c9['render'](_0xdb02a8['domDocument'],_0xdb02a8);_0x579c7e['children']['push'](_0x25a68b['outerHTML']);}else{if(_0x5225c9['is']('rawElement')){const _0x327e2f=_0xdb02a8['domDocument']['createElement'](_0x5be6a9['name']);_0x5225c9['render'](_0x327e2f,_0xdb02a8),_0x579c7e['children']['push'](_0x327e2f['innerHTML']);}}const _0x28bd51=Array['from'](_0x5be6a9['getCustomProperties']());_0x28bd51['length']>0x0&&(_0x579c7e['customProperties']=_0x28bd51);const _0x184ace=_0x5be6a9['getFillerOffset']();return null!==_0x184ace&&(_0x579c7e['fillerOffset']=_0x184ace),_0x579c7e;}}['_markChanges'](_0x2113b4,_0x15786c,_0x1780d7,_0x855342,_0x2ed459){let _0x21fe89=null,_0x5cab7f=null,_0x29e469=0x0;const _0x5bfb01=this['editor']['model'];for(let _0x8d5cf4=0x0;_0x8d5cf4<_0x15786c['length'];_0x8d5cf4++){const _0xee42a4=this['_getVidAttributeName'](_0x15786c[_0x8d5cf4]),_0x3b3eae=_0x15786c[_0x8d5cf4]['item']['getAttribute'](_0xee42a4),_0x30c1be=_0x1780d7['get'](_0x3b3eae),_0x51162d=_0x8d5cf4==_0x15786c['length']-0x1;(!_0x21fe89&&_0x30c1be&&(_0x21fe89=_0x30c1be,_0x5cab7f=_0x15786c[_0x8d5cf4]),_0x21fe89&&(!_0x30c1be||_0x30c1be['userId']!=_0x21fe89['userId']))&&(_0x2d5bbb(_0x30c1be,P(_0x5cab7f,_0x2113b4,_0x5bfb01),P(_0x15786c[_0x8d5cf4],_0x2113b4,_0x5bfb01)),_0x21fe89=_0x30c1be||null,_0x5cab7f=_0x30c1be?_0x15786c[_0x8d5cf4]:null),_0x21fe89&&_0x51162d&&_0x2d5bbb(_0x30c1be,P(_0x5cab7f,_0x2113b4,_0x5bfb01),V(_0x15786c[_0x8d5cf4],_0x2113b4,_0x5bfb01));}function _0x2d5bbb(_0x571667,_0x4ac6b1,_0x241b35){const _0x67200d=_0x21fe89['userId'],_0x290eed='revision:'+_0x855342+':'+_0x67200d+':'+_0x29e469++,_0x190d3d=_0x5bfb01['createRange'](_0x4ac6b1,_0x241b35);_0x2113b4['markers']['set'](_0x290eed,_0x190d3d),null!==_0x67200d&&_0x2ed459['add'](_0x67200d);}}['_getVidAttributeName'](_0x20e95c){switch(_0x20e95c['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x3c1f40,_0x5cc612){_0x3c1f40['baseVersion']=null;for(const _0x31e4b3 in _0x3c1f40){const _0x5647c8=_0x3c1f40[_0x31e4b3];if(_0x5647c8 instanceof _0x1d26da){const _0x3e3d11=_0x5cc612['get'](_0x5647c8['root']['rootName']);_0x3c1f40[_0x31e4b3]=this['_fixPosition'](_0x5647c8,_0x3e3d11);}if(_0x5647c8 instanceof _0x5d0daf){const _0x5e3835=_0x5cc612['get'](_0x5647c8['root']['rootName']);_0x3c1f40[_0x31e4b3]=this['_fixRange'](_0x5647c8,_0x5e3835);}'root'===_0x31e4b3&&(_0x3c1f40['root']=_0x5cc612['get'](_0x3c1f40['root']['rootName']));}}['_fixRange'](_0x505a8e,_0xa01150){return this['editor']['model']['createRange'](this['_fixPosition'](_0x505a8e['start'],_0xa01150),this['_fixPosition'](_0x505a8e['end'],_0xa01150));}['_fixPosition'](_0x5645dd,_0x1e6fc6){return this['editor']['model']['createPositionFromPath'](_0x1e6fc6,_0x5645dd['path'],_0x5645dd['stickiness']);}['_handleInsertOperation'](_0x3a6d1f){const _0x51c3f3=this['_idsRoots']['get'](_0x3a6d1f['position']['root']['rootName']),_0x243497=this['_fixPosition'](_0x3a6d1f['position'],_0x51c3f3),_0x33413e=null===_0x3a6d1f['_authorId']?null:_0x3a6d1f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x22cadc=_0x243497['parent'],_0x8f7a6f=this['_revisionId'],_0x13d61e=[];for(const _0x89fd5c of _0x3a6d1f['nodes'])if(_0x89fd5c['is']('element'))_0x13d61e['push'](this['_makeIdsRoot'](_0x89fd5c));else{for(let _0xf16399=0x0;_0xf16399<_0x89fd5c['offsetSize'];_0xf16399++)_0x13d61e['push'](new _0x5758d3('$text',{'vid':this['_revisionId']++}));}const _0x41b195=this['_revisionId'];for(let _0x3a375c=_0x8f7a6f;_0x3a375c<_0x41b195;_0x3a375c++)this['_touched']['set'](_0x3a375c,{'userId':_0x33413e});_0x22cadc['_insertChild'](_0x243497['offset'],_0x13d61e);}['_handleMoveOperation'](_0x157af8){(_0x157af8=this['_cloneOperation'](_0x157af8,this['_idsRoots']))['_execute']();const _0x388581=null===_0x157af8['_authorId']?null:_0x157af8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3f52f3=_0x157af8['getMovedRangeStart'](),_0x425478=_0x3f52f3['parent'],_0x46afa7=_0x3f52f3['offset'];!function _0xe63bb6(_0xd28a01,_0x5e1740,_0x387b05,_0x1b6335){for(let _0x1153f3=_0x387b05;_0x1153f3<_0x1b6335;_0x1153f3++){const _0xca563e=_0x5e1740['getChild'](_0x1153f3);_0xca563e['is']('element','$text')?_0xd28a01['set'](_0xca563e['getAttribute']('vid'),{'userId':_0x388581}):(_0xd28a01['set'](_0xca563e['getAttribute']('vid_start'),{'userId':_0x388581}),_0xe63bb6(_0xd28a01,_0xca563e,0x0,_0xca563e['childCount']),_0xd28a01['set'](_0xca563e['getAttribute']('vid_end'),{'userId':_0x388581}));}}(this['_touched'],_0x425478,_0x46afa7,_0x46afa7+_0x157af8['howMany']);}['_handleMergeOperation'](_0x2f4bf5){const _0x477795=null===(_0x2f4bf5=this['_cloneOperation'](_0x2f4bf5,this['_idsRoots']))['_authorId']?null:_0x2f4bf5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x40f20b=_0x2f4bf5['targetPosition']['parent'],_0x3380c4=_0x2f4bf5['sourcePosition']['parent'],_0x1c67a1=_0x40f20b['getAttribute']('vid_end'),_0x2b5b5f=_0x3380c4['getAttribute']('vid_start');_0x40f20b['_setAttribute']('vid_end',_0x3380c4['getAttribute']('vid_end')),_0x3380c4['_setAttribute']('vid_end',_0x1c67a1),this['_touched']['set'](_0x2b5b5f,{'userId':_0x477795}),this['_touched']['set'](_0x1c67a1,{'userId':_0x477795}),_0x2f4bf5['_execute']();}['_handleSplitOperation'](_0x36ae07){const _0x225a44=null===(_0x36ae07=this['_cloneOperation'](_0x36ae07,this['_idsRoots']))['_authorId']?null:_0x36ae07['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x21ce51=_0x36ae07['graveyardPosition'],_0x4cb836=_0x36ae07['splitPosition']['parent'];_0x36ae07['_execute']();const _0x112d04=_0x4cb836['getAttribute']('vid_end'),_0x6acd89=_0x36ae07['insertionPosition']['nodeAfter'];if(_0x21ce51){const _0x28e163=_0x6acd89['getAttribute']('vid_end'),_0x9c9736=_0x4cb836['getAttribute']('vid_end');_0x4cb836['_setAttribute']('vid_end',_0x28e163),_0x6acd89['_setAttribute']('vid_end',_0x9c9736),this['_touched']['set'](_0x4cb836['getAttribute']('vid_end'),{'userId':_0x225a44}),this['_touched']['set'](_0x6acd89['getAttribute']('vid_start'),{'userId':_0x225a44});}else{const _0x3d9ce3=this['_revisionId']++,_0x499464=this['_revisionId']++;_0x4cb836['_setAttribute']('vid_end',_0x3d9ce3),_0x6acd89['_setAttribute']('vid_start',_0x499464),_0x6acd89['_setAttribute']('vid_end',_0x112d04),this['_touched']['set'](_0x3d9ce3,{'userId':_0x225a44}),this['_touched']['set'](_0x499464,{'userId':_0x225a44});}}['_handleMarkerOperation'](_0x209670){if(!_0x209670['affectsData'])return;const _0x2f2155=(_0x209670=this['_cloneOperation'](_0x209670,this['_diffRoots']))['oldRange']?_0x209670['oldRange']['root']:null,_0x340742=_0x209670['newRange']?_0x209670['newRange']['root']:null;_0x2f2155&&this['_markers']['delete'](_0x209670['name']),_0x340742&&this['_markers']['set'](_0x209670['name'],_0x209670['newRange']['clone']());const _0x22196a=null===_0x209670['_authorId']?null:_0x209670['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5871bd=_0x209670['name'];if(!this['_touchedMarkers']['has'](_0x5871bd))return void this['_touchedMarkers']['set'](_0x5871bd,{'range':_0x209670['oldRange'],'userId':_0x22196a});const _0x452d78=this['_touchedMarkers']['get'](_0x5871bd),_0x2d4772=_0x452d78['range'],_0x50a933=_0x209670['newRange'];null==_0x2d4772&&null==_0x50a933||_0x2d4772&&_0x50a933&&_0x2d4772['isEqual'](_0x50a933)?this['_touchedMarkers']['delete'](_0x209670['name']):_0x452d78['userId']=_0x22196a;}['_handleRootOperation'](_0x1124ac,_0x260926){this['_diffRoots']['has'](_0x1124ac['rootName'])?this['_diffRoots']['get'](_0x1124ac['rootName'])['_isAttached']=_0x1124ac['isAdd']:(this['_diffRoots']['set'](_0x1124ac['rootName'],N(_0x1124ac['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1124ac['rootName'],{}),_0x260926&&this['_idsRoots']['set'](_0x1124ac['rootName'],N(_0x1124ac['rootName'],!0x0)));const _0x3e7c50=null===_0x1124ac['_authorId']?null:_0x1124ac['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4ff887=this['_touchedRoots']['get'](_0x1124ac['rootName']);_0x4ff887&&_0x4ff887['userId']===_0x3e7c50?this['_touchedRoots']['delete'](_0x1124ac['rootName']):this['_touchedRoots']['set'](_0x1124ac['rootName'],{'userId':_0x3e7c50,'isAttached':_0x1124ac['isAdd']});}['_handleRootAttributeOperation'](_0x1d6004){const _0x371c7b=this['_diffRootsAttributes']['get'](_0x1d6004['root']['rootName']);null===_0x1d6004['newValue']?delete _0x371c7b[_0x1d6004['key']]:_0x371c7b[_0x1d6004['key']]=_0x1d6004['newValue'];}}function x(_0x1e9bac){const _0x4ed23c=N(_0x1e9bac['rootName'],_0x1e9bac['isAttached']());for(const _0xf4113b of _0x1e9bac['getChildren']()){const _0x2bee0a=_0xf4113b['_clone'](!0x0);_0x4ed23c['_appendChild'](_0x2bee0a);}return _0x4ed23c;}function N(_0x193164,_0x501eec=!0x0){const _0x9d15ed=new _0x381023();return _0x9d15ed['rootName']=_0x193164,_0x9d15ed['_isAttached']=_0x501eec,_0x9d15ed['isAttached']=()=>_0x9d15ed['_isAttached'],_0x9d15ed;}function P(_0x277d15,_0x218c97,_0x5c71bc){const _0x5c4395='elementEnd'==_0x277d15['type']?_0x5c71bc['createPositionAt'](_0x277d15['item'],'end'):_0x5c71bc['createPositionBefore'](_0x277d15['item']);return _0x5c71bc['createPositionFromPath'](_0x218c97,_0x5c4395['path'],_0x5c4395['stickiness']);}function V(_0x53e0c2,_0x2ec898,_0x5f1805){const _0x95c038='elementStart'==_0x53e0c2['type']?_0x5f1805['createPositionAt'](_0x53e0c2['item'],0x0):_0x5f1805['createPositionAfter'](_0x53e0c2['item']);return _0x5f1805['createPositionFromPath'](_0x2ec898,_0x95c038['path'],_0x95c038['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
- _0x3026b1(_0x167129){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4334c8,_0x52205d){super(_0x4334c8),this['focusTracker']=new _0x676549(),this['keystrokes']=new _0x456b84(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x52205d),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x45f638({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0xcc4921=_0x3af93e=>_0x3af93e['stopPropagation']();this['keystrokes']['set']('arrowright',_0xcc4921),this['keystrokes']['set']('arrowleft',_0xcc4921),this['keystrokes']['set']('arrowup',_0xcc4921),this['keystrokes']['set']('arrowdown',_0xcc4921);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x1b5c01){this['revisionNameInputView']['fieldView']['element']['value']=_0x1b5c01['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x3e4798){const _0x12ca2e=new et(this['locale'],ti),_0x3844b4=_0x12ca2e['fieldView'];_0x3844b4['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1f1b6f=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x3e4798&&(_0x1f1b6f+='\x20('+R(this['locale'],'optional')+')'),(_0x12ca2e['label']=_0x1f1b6f,_0x3844b4['on']('input',()=>{this['revisionNameInputValue']=_0x3844b4['element']['value']['trim']();}),_0x12ca2e);}}class v extends _0x44d0e2{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x2215e5=this['editor'],_0x328dab=_0x2215e5['plugins']['get']('RevisionTracker');_0x2215e5['ui']['componentFactory']['add']('revisionHistory',_0x46d164=>{const _0x271649=_0x12688f(_0x46d164),_0x4dd824=_0x271649['panelView']['children'],_0x4b7a0a=new _0x26aff7(_0x46d164),_0x39ef99=new _0x53946c(_0x46d164),_0x46cb4c=new _0x231e90(_0x46d164),_0x3f4f54=new _0x53946c(_0x46d164),_0x8b75e=new _0x231e90(_0x46d164);return _0x271649['bind']('isEnabled')['to'](_0x328dab,'isReady',_0x328dab,'isEnabled',_0x2215e5,'isReadOnly',(_0x44f4d6,_0x1946f3,_0x475994)=>_0x44f4d6&&_0x1946f3&&!_0x475994),_0x271649['buttonView']['set']({'icon':_0x409e84,'label':R(_0x46d164,'Revision\x20history'),'tooltip':!0x0}),_0x46cb4c['set']({'label':R(_0x46d164,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x46cb4c['bind']('isEnabled')['to'](_0x328dab,'isReady',_0x328dab,'isEnabled',_0x2215e5,'isReadOnly',(_0x3bcc8f,_0x32be57,_0xa9450e)=>_0x3bcc8f&&_0x32be57&&!_0xa9450e),_0x46cb4c['on']('execute',()=>this['_showDialog']()),_0x8b75e['set']({'label':R(_0x46d164,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x8b75e['bind']('isEnabled')['to'](_0x328dab,'isReady',_0x2215e5,'isReadOnly',(_0x2a6a35,_0x386c93)=>_0x2a6a35&&!_0x386c93),_0x8b75e['on']('execute',()=>{_0x2215e5['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x271649['isOpen']=!0x1,_0x2215e5['editing']['view']['focus']();}),_0x39ef99['children']['add'](_0x46cb4c),_0x3f4f54['children']['add'](_0x8b75e),_0x4b7a0a['role']='menu',_0x4b7a0a['items']['addMany']([_0x39ef99,_0x3f4f54]),_0x4dd824['add'](_0x4b7a0a),_0x271649;}),_0x2215e5['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x29432e=this['editor'],_0x22febe=_0x29432e['locale'],_0x111c61=new _0x106187(_0x22febe),_0x5379f0=new _0x3d6a57(_0x22febe);_0x111c61['buttonView']['set']({'icon':_0x409e84,'label':R(_0x22febe,'Revision\x20history')});const _0x55908a=new _0x183175(_0x22febe,_0x111c61),_0x5a4d70=new _0x502070(_0x22febe);_0x5a4d70['set']({'label':R(_0x22febe,'Save\x20current\x20revision')}),_0x5a4d70['delegate']('execute')['to'](_0x111c61),_0x5a4d70['on']('execute',()=>{this['_showDialog']();}),_0x55908a['children']['add'](_0x5a4d70),_0x5379f0['items']['add'](_0x55908a);const _0x1f923c=new _0x183175(_0x22febe,_0x111c61),_0x3e7f40=new _0x502070(_0x22febe);return _0x3e7f40['set']({'label':R(_0x22febe,'Open\x20revision\x20history')}),_0x3e7f40['delegate']('execute')['to'](_0x111c61),_0x3e7f40['on']('execute',()=>{_0x29432e['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x1f923c['children']['add'](_0x3e7f40),_0x5379f0['items']['add'](_0x1f923c),_0x111c61['panelView']['children']['add'](_0x5379f0),_0x111c61;}['_showDialog'](){const _0x2d6992=this['editor'],_0x2f86a0=_0x2d6992['locale'],_0x39afb2=_0x2d6992['plugins']['get']('Dialog'),_0x41e00a=_0x2d6992['plugins']['get']('RevisionTracker');function _0x1c380a(_0x3afb1e){_0x2d6992['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3afb1e['revisionName']?_0x3afb1e['revisionNameInputView']['errorText']=R(_0x2f86a0,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2d6992['plugins']['get'](h)['saveRevision']({'name':_0x3afb1e['revisionName']}),_0x39afb2['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1c380a(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x39afb2['show']({'id':'revisionSave','title':R(_0x2f86a0,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x2d6992['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x39afb2['hide']()},{'label':R(_0x2d6992['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x5efd69){_0x5efd69['bind']('isEnabled')['to'](_0x41e00a,'isReady',_0x41e00a,'isEnabled',_0x2d6992,'isReadOnly',(_0x5d34c7,_0x21c2c6,_0x459fd8)=>_0x5d34c7&&_0x21c2c6&&!_0x459fd8);},'onExecute':()=>_0x1c380a(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x1b6aad=this['editor'],_0x1b5084=_0x1b6aad['locale'];this['_saveRevisionFormView']=new me(_0x1b5084,_0x1b6aad['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x167129{['changeId'];['_model'];constructor(_0x2ead06,_0x17f377){super(_0x2ead06),this['_model']=_0x17f377,this['changeId']=_0x17f377['id'];const _0x5d6088=this['bindTemplate'],_0x35526b=R(_0x2ead06,_0x17f377['data']['isSuggestion']?'Suggested\x20by':'add'==_0x17f377['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x17f377['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5d6088['to']('type',_0x292721=>'ck-revision-change__'+_0x292721)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x35526b}]},{'text':'\x20'+_0x17f377['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x19732a(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x25e15e){super(),this['id']=_0x25e15e['id']||_0x119620(),this['author']=_0x25e15e['author'],this['type']=_0x25e15e['type'],this['data']=_0x25e15e['data']||{},this['rootName']=_0x25e15e['rootName'],this['set']('createdAt',_0x25e15e['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xa26103,_0x54f4d7){this['newRevisionId']=_0xa26103,this['oldRevisionId']=_0x54f4d7,this['changes']=new _0x477179();}['_setChanges'](_0x31635b){for(const _0x148fc2 of _0x31635b)this['changes']['add'](_0x148fc2);}}class l extends _0x44d0e2{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1a0d59,_0x7c568a,S,$];}constructor(_0x6baf95){super(_0x6baf95),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x31704d,_0x43aba1,_0x246e4c)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x52708d=>{for(const _0x337f95 of this['editor']['editing']['view']['document']['roots'])_0x246e4c?_0x52708d['removeClass']('ck-editor__editable__overlay',_0x337f95):_0x52708d['addClass']('ck-editor__editable__overlay',_0x337f95);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x532c85=>null!==_0x532c85),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x11e06d,_0x17d88f,_0x1dcec1)=>_0x11e06d&&_0x1dcec1?_0x17d88f['changes']['getIndex'](_0x1dcec1):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x2a6973,_0x36a79e)=>_0x2a6973?_0x36a79e['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x7c568a);}['init'](){const _0x3b2856=this['editor'],_0x39f7a7=new rt(_0x3b2856,{'direction':'backward'}),_0x42ce2c=new rt(_0x3b2856,{'direction':'forward'});(_0x3b2856['commands']['add']('showPreviousChange',_0x39f7a7),_0x3b2856['commands']['add']('showNextChange',_0x42ce2c),_0x3b2856['commands']['add']('restoreRevision',new nt(_0x3b2856)),this['on']('change:numberOfChanges',()=>{_0x39f7a7['refresh'](),_0x42ce2c['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x3b2856['enableReadOnlyMode']('revision-viewer'),_0x3b2856['plugins']['has']('WidgetToolbarRepository'))&&_0x3b2856['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x39e3c0){return await this['_utils']['loadRevisionData'](_0x39e3c0,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x39e3c0);}async['getRevisionRootsAttributes'](_0x8ef83f){return await this['_utils']['loadRevisionData'](_0x8ef83f,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x8ef83f);}async['compare'](_0x5b8feb,_0x339452,_0x149ff8=!0x1){if(!this['isEnabled'])return;const _0x3cb775=this['diff'],_0x3d6699=this['repository'],_0x49037c='string'==typeof _0x5b8feb?_0x3d6699['getRevision'](_0x5b8feb):_0x5b8feb,_0x3649d3='string'==typeof _0x339452?_0x3d6699['getRevision'](_0x339452):_0x339452,_0x4f7167=_0x49037c['id'],_0xe266e3=_0x3649d3?_0x3649d3['id']:null;if(!_0x149ff8&&this['diff']&&this['diff']['newRevisionId']===_0x4f7167&&this['diff']['oldRevisionId']===_0xe266e3)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x4f7167,_0xe266e3);const _0xa6ca6=this['_getRevisionsRange'](_0x49037c,_0x3649d3,!0x0)['map'](_0x235642=>this['_utils']['loadRevisionData'](_0x235642,this['adapter']));return _0xa6ca6['push'](new Promise(_0x1e8270=>{setTimeout(_0x1e8270,0x14);})),Promise['all'](_0xa6ca6)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x7409c1=this['_getDiff'](_0x4f7167,_0xe266e3);for(const _0x2936ba of _0x7409c1['changes'])this['_changeIdToChange']['set'](_0x2936ba['id'],_0x2936ba);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x412cf5=>{for(const _0x581e59 of this['editor']['model']['document']['getRootNames']())_0x412cf5['detachRoot'](_0x581e59);for(const _0x2f1645 of Object['keys'](_0x7409c1['model'])){const _0xef30ec=_0x412cf5['addRoot'](_0x2f1645);for(const _0x1dc57e of Object['keys'](_0x7409c1['attributes'][_0x2f1645]))_0x412cf5['setAttribute'](_0x1dc57e,_0x7409c1['attributes'][_0x2f1645][_0x1dc57e],_0xef30ec);_0x412cf5['insert'](_0x7409c1['model'][_0x2f1645],_0xef30ec,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x7409c1['changes'])),this['isReady']=!0x0;})['catch'](_0x57dca1=>{console['error'](_0x57dca1),this['_cleanUp'](),_0x3cb775&&(this['diff']=_0x3cb775),this['isReady']=!0x0;});}['addRevisionData'](_0x53ba13,_0x45018e){const _0x257ee2=this['repository']['createRevision'](_0x53ba13);return _0x257ee2['on']('_update',(_0x385a88,_0x3c382c,_0x10d877)=>_0x45018e(_0x3c382c,_0x10d877,_0x257ee2)),this['repository']['addRevision'](_0x257ee2),_0x257ee2;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x31003c=>{for(const _0x42998d of this['editor']['model']['document']['getRootNames']())_0x31003c['detachRoot'](_0x42998d);});}['_sortAndFilterDiffChanges'](_0x3cd019){const _0x2ed866=[],_0x1af853=new Map();for(const _0x41cef4 of this['editor']['model']['document']['getRootNames']()){const _0x5d81a2=this['editor']['editing']['view']['getDomRoot'](_0x41cef4);if(!_0x5d81a2)continue;const _0x32a69f=_0x5d81a2['getClientRects']()['item'](0x0);_0x32a69f&&(_0x2ed866['push'](_0x41cef4),_0x1af853['set'](_0x41cef4,_0x32a69f));}return _0x2ed866['sort']((_0x14bc51,_0xc50ffe)=>{const _0x17dbe1=_0x1af853['get'](_0x14bc51),_0x55fc5a=_0x1af853['get'](_0xc50ffe);return _0x17dbe1['y']-_0x55fc5a['y']||_0x17dbe1['x']-_0x55fc5a['x'];}),(_0x3cd019=_0x3cd019['filter'](_0x137fe8=>_0x2ed866['includes'](_0x137fe8['rootName'])))['sort']((_0x28fedc,_0x5b910f)=>_0x2ed866['indexOf'](_0x28fedc['rootName'])-_0x2ed866['indexOf'](_0x5b910f['rootName'])),_0x3cd019;}['_makeTape'](_0x28b98f){const _0x42ea44=Array['from'](_0x28b98f['markers'])['filter'](([_0x22d790,_0x52b816])=>_0x22d790['startsWith']('revision:')&&!_0x52b816['isCollapsed']),_0x463412=Array['from'](this['editor']['model']['createRangeIn'](_0x28b98f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x42ea44['length'])for(const _0x2f41a7 of _0x463412){const [_0xfb8e6,_0x2d455b]=_0x42ea44[0x0],[,_0x36d8d9,_0x1294f5]=_0xfb8e6['split'](':');if(_0x2d455b['end']['isEqual'](_0x2f41a7['nextPosition'])&&_0x42ea44['shift'](),(_0x2f41a7['previousPosition']['isEqual'](_0x2d455b['start'])||_0x2f41a7['previousPosition']['isAfter'](_0x2d455b['start']))&&('insertion'==_0x36d8d9?_0x2f41a7['isAdded']={'userId':_0x1294f5}:'deletion'==_0x36d8d9&&(_0x2f41a7['isRemoved']={'userId':_0x1294f5})),0x0==_0x42ea44['length'])break;}return _0x463412;}['_refreshStartEndIndex'](_0x44f09c){const _0x3f46fa=new Map();for(let _0x445f0e=0x0;_0x445f0e<_0x44f09c['length'];_0x445f0e++)'text'===_0x44f09c[_0x445f0e]['type']?(_0x44f09c[_0x445f0e]['item']['startIndex']=_0x445f0e,_0x44f09c[_0x445f0e]['item']['endIndex']=_0x445f0e):('elementStart'===_0x44f09c[_0x445f0e]['type']?_0x44f09c[_0x445f0e]['item']['startIndex']=_0x445f0e:'elementEnd'===_0x44f09c[_0x445f0e]['type']&&(_0x44f09c[_0x445f0e]['item']['endIndex']=_0x445f0e),_0x3f46fa['set'](_0x44f09c[_0x445f0e]['id'],_0x445f0e));for(const _0x579301 of _0x3f46fa['values']())'elementStart'===_0x44f09c[_0x579301]['type']?_0x44f09c[_0x579301]['item']['endIndex']=_0x3f46fa['get'](_0x44f09c[_0x579301]['pairId']):'elementEnd'===_0x44f09c[_0x579301]['type']&&(_0x44f09c[_0x579301]['item']['startIndex']=_0x3f46fa['get'](_0x44f09c[_0x579301]['pairId']));}['_processTape'](_0x23670a){for(let _0x6fcd08=0x0;_0x6fcd08<_0x23670a['length'];_0x6fcd08++){if('elementStart'===_0x23670a[_0x6fcd08]['type'])_0x23670a[_0x6fcd08]['item']['startIndex']=_0x6fcd08;else{if('elementEnd'===_0x23670a[_0x6fcd08]['type']){_0x23670a[_0x6fcd08]['item']['endIndex']=_0x6fcd08;const _0x4fa79f=_0x23670a[_0x6fcd08]['item']['startIndex'];_0x23670a[_0x4fa79f]['pairId']=_0x23670a[_0x6fcd08]['id'],_0x23670a[_0x6fcd08]['pairId']=_0x23670a[_0x4fa79f]['id'];}else _0x23670a[_0x6fcd08]['item']['startIndex']=_0x6fcd08,_0x23670a[_0x6fcd08]['item']['endIndex']=_0x6fcd08,_0x23670a[_0x6fcd08]['pairId']=null;}_0x23670a[_0x6fcd08]['markersStart']||(_0x23670a[_0x6fcd08]['markersStart']=[],_0x23670a[_0x6fcd08]['markersEnd']=[]);}}['_markInsertions'](_0x10b609,_0x63bc0a){const _0x16b40a=_0x10b609['filter'](_0x20628b=>!_0x20628b['isAdded']);for(let _0xf4ed76=0x0;_0xf4ed76<_0x63bc0a['length'];_0xf4ed76++)_0x63bc0a[_0xf4ed76]['isAdded']&&(_0x16b40a[_0xf4ed76]['isAdded']=_0x63bc0a[_0xf4ed76]['isAdded']);}['_getDiff'](_0x2322ca,_0x5370db=null){const _0x3c57a1=this['repository']['getRevision'](_0x2322ca),_0x564976=_0x5370db?this['repository']['getRevision'](_0x5370db):null,_0x3e385b=this['_getRevisionsRange'](_0x3c57a1,_0x564976),_0x30405c=_0x3e385b[_0x3e385b['length']-0x1],_0x5830eb=new Map(),_0x249707={'model':{},'attributes':{},'changes':[]},_0x485a42=new Set(),_0x310bd9=new Map();for(let _0x46c383=_0x3e385b['length']-0x1;_0x46c383>=0x0;_0x46c383--){const _0x315b55=_0x3e385b[_0x46c383];for(const _0x548fed of Object['keys'](_0x315b55['diffData']))if(_0x315b55['diffData'][_0x548fed]['attachChange']){const _0x3310e6=_0x315b55['diffData'][_0x548fed]['attachChange'];_0x3310e6['isAttached']?(_0x485a42['add'](_0x548fed),_0x310bd9['has'](_0x548fed)&&_0x310bd9['get'](_0x548fed)['userId']==_0x3310e6['userId']?_0x310bd9['delete'](_0x548fed):_0x310bd9['set'](_0x548fed,_0x3310e6)):_0x310bd9['has'](_0x548fed)?(_0x485a42['delete'](_0x548fed),_0x310bd9['delete'](_0x548fed)):(_0x485a42['add'](_0x548fed),_0x310bd9['set'](_0x548fed,_0x3310e6));}else _0x485a42['add'](_0x548fed);}for(const _0x1e56e0 of _0x485a42){const _0x2b2ec2=_0x310bd9['has'](_0x1e56e0)&&!_0x310bd9['get'](_0x1e56e0)['isAttached'];let _0x5d8250=_0x2b2ec2?_0x3e385b['length']-0x1:0x0;const _0x3da9a6=_0x2b2ec2?-0x1:0x1;for(;_0x3e385b[_0x5d8250];){const _0x18a6d9=_0x3e385b[_0x5d8250];if(_0x18a6d9['diffData'][_0x1e56e0]){const _0x4fe8b9=_0x2b2ec2?_0x18a6d9['diffData'][_0x1e56e0]['attributesBefore']:_0x18a6d9['diffData'][_0x1e56e0]['attributesAfter'];_0x249707['attributes'][_0x1e56e0]=_0x4fe8b9?_0x5c6456(_0x4fe8b9):{};break;}_0x5d8250+=_0x3da9a6;}}for(const _0x10f1d9 of _0x3e385b){_0x10f1d9['model']={};for(const _0x47b652 of _0x10f1d9['authors'])_0x5830eb['set'](_0x47b652['id'],_0x47b652);for(const _0x1d55a2 of _0x485a42){const _0x29a6b7=_0x10f1d9['diffData'][_0x1d55a2]?_0x10f1d9['diffData'][_0x1d55a2]['insertions']:'[]',_0x27546d=_0x10f1d9['diffData'][_0x1d55a2]?_0x10f1d9['diffData'][_0x1d55a2]['deletions']:'[]';_0x10f1d9['model'][_0x1d55a2]={'insertions':this['_utils']['_makeModelFromViewString'](_0x29a6b7),'deletions':this['_utils']['_makeModelFromViewString'](_0x27546d)};}}for(const _0x28b071 of _0x485a42){let _0x5e499b=null,_0x13dd88=0x0;const _0x290ccc=new Map(Array['from'](_0x3c57a1['model'][_0x28b071]['insertions']['markers'])['filter'](([_0x4533b6])=>!_0x4533b6['startsWith']('revision:')));let _0x1e875a=0x0;for(const _0x251b29 of _0x3e385b){const _0x46d960=this['_makeTape'](_0x251b29['model'][_0x28b071]['insertions']);_0x251b29==_0x3c57a1?(_0x5e499b=_0x46d960,_0x13dd88=_0x5e499b['length'],_0x5e499b['forEach'](_0x1777df=>{_0x1777df['id']=_0x1e875a++;}),this['_processTape'](_0x5e499b)):this['_markInsertions'](_0x5e499b,_0x46d960);const _0x534bdb=_0x5e499b['filter'](_0x487871=>!_0x487871['isAdded'])['map'](_0x13f231=>_0x13f231['id']);let _0x27e209=0x0;const _0xc72bbd=this['_makeTape'](_0x251b29['model'][_0x28b071]['deletions']);_0xc72bbd['forEach'](_0x53f4d0=>{_0x53f4d0['isRemoved']?_0x53f4d0['id']=_0x13dd88++:_0x53f4d0['id']=_0x534bdb[_0x27e209++];}),this['_processTape'](_0xc72bbd),this['_setDistance'](_0x5e499b,'isAdded'),this['_setDistance'](_0xc72bbd,'isRemoved'),_0x251b29==_0x3c57a1&&this['_markMarkers'](_0x5e499b,_0x290ccc),_0x5e499b=this['_joinTapes'](_0x5e499b,_0xc72bbd),this['_refreshStartEndIndex'](_0x5e499b),this['_setDistance'](_0x5e499b,'isRemoved');}_0x5e499b=_0x5e499b['filter'](_0x7fe3e8=>!(_0x7fe3e8['isAdded']&&_0x7fe3e8['isRemoved']));const _0x243889=new Map(_0x30405c['model'][_0x28b071]['deletions']['markers']),_0x25f442=new Set(_0x290ccc['keys']());for(const _0x3e2c2b of _0x243889['keys']())_0x25f442['delete'](_0x3e2c2b);this['_markSuggestions'](_0x5e499b,_0x25f442),this['_fixObsoleteTags'](_0x5e499b),_0x5e499b=this['_removeMissingPairs'](_0x5e499b),_0x5e499b=this['_markMismatchedRemovedTags'](_0x5e499b),_0x5e499b=this['_removeUnsupportedChanges'](_0x5e499b);const {root:_0x383849,changes:_0x38f732}=this['_makeModelFromTape'](_0x5e499b,_0x5830eb,_0x28b071);_0x249707['model'][_0x28b071]=_0x383849;const _0x132df4=_0x310bd9['get'](_0x28b071);if(_0x132df4){const _0x439966=_0x5830eb['get'](_0x132df4['userId']),_0xae1d7a=new G({'author':_0x439966,'type':_0x132df4['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x28b071});_0x38f732['unshift'](_0xae1d7a),_0x249707['attributes'][_0x28b071]['revisionHistoryAttachChange']=_0xae1d7a['id'];}_0x249707['changes']=_0x249707['changes']['concat'](_0x38f732);}return _0x249707;}['_markMarkers'](_0x4b6c11,_0x2ae2d9){for(let _0x1696b5=0x0;_0x1696b5<_0x4b6c11['length'];_0x1696b5++)for(const [_0x43c301,_0x35116e]of _0x2ae2d9)!_0x35116e['isCollapsed']&&_0x35116e['start']['isEqual'](_0x4b6c11[_0x1696b5]['previousPosition'])&&_0x4b6c11[_0x1696b5]['markersStart']['push'](_0x43c301),_0x35116e['end']['isEqual'](_0x4b6c11[_0x1696b5]['nextPosition'])&&_0x4b6c11[_0x1696b5]['markersEnd']['push'](_0x43c301);}['_joinTapes'](_0x439bc9,_0x5c200d){let _0x4ca8a8=[],_0x483798=0x0,_0x1ca546=0x0;for(;_0x483798<_0x439bc9['length']||_0x1ca546<_0x5c200d['length'];){const _0x266edc=_0x439bc9[_0x483798]||{},_0x3465a9=_0x5c200d[_0x1ca546]||{};if(_0x266edc['id']==_0x3465a9['id'])_0x483798++,_0x1ca546++,_0x4ca8a8['push'](_0x266edc);else{if(_0x3465a9['isRemoved']&&_0x266edc['isAdded']){const {commonTape:_0x52d9c7,iEnd:_0x65187b,jEnd:_0x118ce4}=this['_threeWayMerge'](_0x439bc9,_0x483798,_0x5c200d,_0x1ca546);_0x4ca8a8=_0x4ca8a8['concat'](_0x52d9c7),_0x483798=_0x65187b,_0x1ca546=_0x118ce4;}else _0x3465a9['isRemoved']?(_0x1ca546++,_0x4ca8a8['push'](_0x3465a9)):(_0x483798++,_0x4ca8a8['push'](_0x266edc));}}return _0x4ca8a8;}['_markSuggestions'](_0xb68727,_0x36ca7b){const _0x2e157a=[];for(let _0x22dab0=0x0;_0x22dab0<_0xb68727['length'];_0x22dab0++){for(let _0x45302e=0x0;_0x45302e<_0xb68727[_0x22dab0]['markersStart']['length'];_0x45302e++){const _0x2dabe2=_0xb68727[_0x22dab0]['markersStart'][_0x45302e];if(!_0x36ca7b['has'](_0x2dabe2))continue;const {group:_0x11eb91,type:_0x32c1da,authorId:_0x1daab7}=_0x24068a(_0x2dabe2);'revision-suggestion'!=_0x11eb91||'insertion'!=_0x32c1da&&'deletion'!=_0x32c1da||(_0x2e157a['unshift']({'type':_0x32c1da,'name':_0x2dabe2,'userId':_0x1daab7}),_0xb68727[_0x22dab0]['markersStart']['splice'](_0x45302e,0x1),_0x45302e--);}_0x46030f(_0xb68727[_0x22dab0]);for(let _0x36b15f=0x0;_0x36b15f<_0xb68727[_0x22dab0]['markersEnd']['length'];_0x36b15f++){const _0x22e115=_0xb68727[_0x22dab0]['markersEnd'][_0x36b15f];if(!_0x36ca7b['has'](_0x22e115))continue;const {group:_0x11d4da,type:_0x495476}=_0x24068a(_0x22e115);if('revision-suggestion'!=_0x11d4da||'insertion'!=_0x495476&&'deletion'!=_0x495476)continue;_0xb68727[_0x22dab0]['markersEnd']['splice'](_0x36b15f,0x1),_0x36b15f--;const _0x42b4f8=_0x2e157a['findIndex'](_0x3f2bfc=>_0x3f2bfc['name']==_0x22e115);_0x42b4f8>-0x1&&_0x2e157a['splice'](_0x42b4f8,0x1);}}function _0x24068a(_0x5a9bb6){const _0x5f5c3c=_0x5a9bb6['split'](':');return{'group':_0x5f5c3c[0x0],'type':_0x5f5c3c[0x1],'subType':_0x5f5c3c['length']>=0x5?_0x5f5c3c[0x2]:null,'id':_0x5f5c3c['length']<0x5?_0x5f5c3c[0x2]:_0x5f5c3c[0x3],'authorId':_0x5f5c3c['length']<0x5?_0x5f5c3c[0x3]:_0x5f5c3c[0x4],'markerCount':0x6==_0x5f5c3c['length']?_0x5f5c3c[0x5]:null};}function _0x46030f(_0x74cec9){for(let _0x15c66f=0x0;_0x15c66f<_0x2e157a['length'];_0x15c66f++){if(_0x74cec9['isAdded']&&'insertion'==_0x2e157a[_0x15c66f]['type']&&_0x74cec9['isAdded']['userId']==_0x2e157a[_0x15c66f]['userId'])return _0x74cec9['isAddSuggestion']=_0x2e157a[_0x15c66f],void delete _0x74cec9['isAdded'];if(!_0x74cec9['isAdded']&&!_0x74cec9['isRemoved']&&'deletion'==_0x2e157a[_0x15c66f]['type'])return void(_0x74cec9['isRemoveSuggestion']=_0x2e157a[_0x15c66f]);}}}['_setDistance'](_0x354f32,_0x8d9339){let _0x1ee8db=0x0,_0x32da41=!0x1;const _0x46ef90=new Map();for(const _0xcc2685 of _0x354f32)_0xcc2685[_0x8d9339]?_0x32da41&&(_0x1ee8db++,_0x32da41=!0x1):(_0x1ee8db++,_0x32da41=!0x0),_0x46ef90['set'](_0xcc2685['id'],_0x1ee8db);for(let _0xc7c0f1=0x0;_0xc7c0f1<_0x354f32['length'];_0xc7c0f1++){if('isRemoved'==_0x8d9339&&_0x354f32[_0xc7c0f1]['isAdded']||'isAdded'==_0x8d9339&&_0x354f32[_0xc7c0f1]['isRemoved'])continue;if('text'==_0x354f32[_0xc7c0f1]['type']){_0x354f32[_0xc7c0f1]['distance']=0x0;continue;}const _0x2df9f4=_0x46ef90['get'](_0x354f32[_0xc7c0f1]['pairId']),_0x3920e7=_0x46ef90['get'](_0x354f32[_0xc7c0f1]['id']);_0x354f32[_0xc7c0f1]['distance']=_0x2df9f4-_0x3920e7;}}['_getRevisionsRange'](_0x3d0a55,_0x3f1738,_0x2da5fa=!0x1){const _0x587653=[];let _0x48aed3=this['repository']['getIndex'](_0x3d0a55),_0xe8616e=this['repository']['getIndex'](_0x3f1738);for(-0x1==_0xe8616e&&(_0xe8616e=this['repository']['_revisions']['length'],_0x2da5fa=!0x1);_0x48aed3<_0xe8616e;)_0x587653['push'](this['repository']['getRevision'](_0x48aed3)),_0x48aed3++;return _0x2da5fa&&_0x587653['push'](this['repository']['getRevision'](_0x48aed3)),_0x587653;}['_threeWayMerge'](_0x10dcee,_0x1b8975,_0x23539f,_0x31fef1){const _0xc9517a=this['editor']['model']['schema'];let _0xf0e5fd=_0x1b8975;for(;_0x10dcee[_0xf0e5fd]&&_0x10dcee[_0xf0e5fd]['isAdded'];)_0xf0e5fd++;let _0x5f3243=_0x31fef1;for(;_0x23539f[_0x5f3243]&&_0x23539f[_0x5f3243]['isRemoved'];)_0x5f3243++;_0x3f2432(_0x10dcee,_0x1b8975,_0xf0e5fd),_0x3f2432(_0x23539f,_0x31fef1,_0x5f3243);const _0x27630a=_0x23539f['slice'](_0x31fef1,_0x5f3243)['concat'](_0x10dcee['slice'](_0x1b8975,_0xf0e5fd));return _0x27630a['sort']((_0x381c9c,_0x3d3aa2)=>_0x381c9c['side']!=_0x3d3aa2['side']?_0x381c9c['side']-_0x3d3aa2['side']:_0x381c9c['level']!=_0x3d3aa2['level']?_0x381c9c['level']-_0x3d3aa2['level']:_0x381c9c['distance']!=_0x3d3aa2['distance']?_0x3d3aa2['distance']-_0x381c9c['distance']:!!_0x381c9c['isAdded']!=!!_0x3d3aa2['isAdded']?-0x1==_0x381c9c['side']||0x0==_0x381c9c['side']?_0x381c9c['isAdded']?-0x1:0x1:_0x381c9c['isAdded']?0x1:-0x1:_0x381c9c['index']-_0x3d3aa2['index']),{'commonTape':_0x27630a,'iEnd':_0xf0e5fd,'jEnd':_0x5f3243};function _0x3f2432(_0xa275c5,_0xfcc575,_0x5c093d){let _0x39a2fd=-0x1,_0x400f66=Number['POSITIVE_INFINITY'],_0xc3ce1f=!0x0;for(let _0xafcf32=_0xfcc575;_0xafcf32<_0x5c093d;_0xafcf32++)if(_0xc9517a['isInline'](_0xa275c5[_0xafcf32]['item'])||(_0xc3ce1f=!0x1),_0xa275c5[_0xafcf32]['item']['startIndex']<_0xfcc575&&(_0x39a2fd=_0xafcf32),_0xa275c5[_0xafcf32]['item']['endIndex']>=_0x5c093d){_0x400f66=_0xafcf32;break;}_0xc3ce1f&&(_0x39a2fd=_0x5c093d-0x1);for(let _0xe57e7=_0xfcc575;_0xe57e7<_0x5c093d;_0xe57e7++)_0xa275c5[_0xe57e7]['side']=_0xe57e7<=_0x39a2fd?-0x1:_0xe57e7<_0x400f66?0x0:0x1,_0xa275c5[_0xe57e7]['index']=_0xe57e7;let _0x76c405=0x0;for(let _0x356b6a=_0xfcc575;_0x356b6a<=_0x39a2fd;_0x356b6a++)0x0==_0xa275c5[_0x356b6a]['distance']?_0xa275c5[_0x356b6a]['level']=_0x76c405:(_0x76c405++,_0xa275c5[_0x356b6a]['level']=_0x76c405,_0x76c405++);for(let _0x2f43ec=_0xfcc575;_0x2f43ec<_0x5c093d;_0x2f43ec++)0x0==_0xa275c5[_0x2f43ec]['side']&&(_0xa275c5[_0x2f43ec]['level']=_0x76c405);_0x76c405=0x0;for(let _0x376b5e=_0x5c093d-0x1;_0x376b5e>=_0x400f66;_0x376b5e--)0x0==_0xa275c5[_0x376b5e]['distance']?_0xa275c5[_0x376b5e]['level']=_0x76c405:(_0x76c405--,_0xa275c5[_0x376b5e]['level']=_0x76c405,_0x76c405--);}}['_fixObsoleteTags'](_0x3e2d2d){const _0x1591e6=new Map(),_0x33f53e=this['editor']['model']['schema'];for(let _0x2588b5=0x1;_0x2588b5<_0x3e2d2d['length'];_0x2588b5++){let _0x4a6944,_0x3f2467,_0x1f438b;const _0x5c1d45=_0x3e2d2d[_0x2588b5],_0x33501e=_0x3e2d2d[_0x2588b5-0x1];if('text'==_0x5c1d45['type'])continue;if(_0x5c1d45['type']!=_0x33501e['type'])continue;if(!_0x33f53e['isBlock'](_0x33501e['item'])||_0x33f53e['isLimit'](_0x33501e['item']))continue;if(!_0x33f53e['isBlock'](_0x5c1d45['item'])||_0x33f53e['isLimit'](_0x5c1d45['item']))continue;if((_0x3e2d2d[_0x2588b5]['isAdded']||_0x3e2d2d[_0x2588b5]['isAddSuggestion'])&&_0x3e2d2d[_0x2588b5-0x1]['isRemoved'])_0x4a6944=_0x3e2d2d[_0x2588b5],_0x3f2467=_0x3e2d2d[_0x2588b5-0x1],_0x1f438b=_0x2588b5-0x1;else{if(!_0x3e2d2d[_0x2588b5]['isRemoved']||!_0x3e2d2d[_0x2588b5-0x1]['isAdded']&&!_0x3e2d2d[_0x2588b5-0x1]['isAddSuggestion'])continue;_0x4a6944=_0x3e2d2d[_0x2588b5-0x1],_0x3f2467=_0x3e2d2d[_0x2588b5],_0x1f438b=_0x2588b5;}const _0x36397a=_0x4a6944['level']==_0x3f2467['level'],_0x1cedc1=Math['abs'](_0x4a6944['level'])<Math['abs'](_0x3f2467['level'])&&0x0==_0x3f2467['distance'];(_0x36397a||_0x1cedc1)&&(_0x1591e6['set'](_0x3f2467['id'],_0x4a6944['id']),_0x3e2d2d['splice'](_0x1f438b,0x1),_0x2588b5--,_0x4a6944['isAdded']=!0x1);}for(let _0x3546e6=0x0;_0x3546e6<_0x3e2d2d['length'];_0x3546e6++)_0x1591e6['has'](_0x3e2d2d[_0x3546e6]['pairId'])&&(_0x3e2d2d[_0x3546e6]['pairId']=_0x1591e6['get'](_0x3e2d2d[_0x3546e6]['pairId']));}['_removeMissingPairs'](_0x29fe8e){const _0x18847d=new Set(_0x29fe8e['map'](_0xba89d6=>_0xba89d6['id']));for(let _0x529937=0x0;_0x529937<_0x29fe8e['length'];_0x529937++)_0x18847d['has'](_0x29fe8e[_0x529937]['pairId'])||0x0==_0x29fe8e[_0x529937]['distance']||(_0x29fe8e[_0x529937]['isIncorrect']=!0x0);return _0x29fe8e['filter'](_0x43fabf=>!_0x43fabf['isIncorrect']);}['_markMismatchedRemovedTags'](_0x23960a){const _0x12867c=new Set();for(let _0x4f068d=0x0;_0x4f068d<_0x23960a['length'];_0x4f068d++){if(_0x12867c['has'](_0x23960a[_0x4f068d]['id'])&&_0x23960a[_0x4f068d]['isRemoved']&&(_0x23960a[_0x4f068d]['isIncorrect']=!0x0),_0x23960a[_0x4f068d]['isIncorrect'])continue;if(0x0==_0x23960a[_0x4f068d]['distance'])continue;if('elementStart'!=_0x23960a[_0x4f068d]['type'])continue;if(null==_0x23960a[_0x4f068d]['pairId'])continue;let _0x236f2a=_0x4f068d+0x1,_0x42b1a4=0x0;for(;_0x23960a[_0x236f2a]['id']!=_0x23960a[_0x4f068d]['pairId'];)'elementStart'==_0x23960a[_0x236f2a]['type']?_0x42b1a4++:'elementEnd'==_0x23960a[_0x236f2a]['type']&&_0x42b1a4--,_0x236f2a++;if(0x0!=_0x42b1a4){if(_0x23960a[_0x4f068d]['isRemoved'])_0x23960a[_0x4f068d]['isIncorrect']=!0x0;else{for(;_0x236f2a!=_0x4f068d;)_0x23960a[_0x236f2a]['isRemoved']&&0x0!=_0x23960a[_0x236f2a]['distance']&&(_0x23960a[_0x236f2a]['isIncorrect']=!0x0,_0x12867c['add'](_0x23960a[_0x236f2a]['pairId'])),_0x236f2a--;}}}return _0x23960a['filter'](_0x57bce8=>!_0x57bce8['isIncorrect']);}['_removeUnsupportedChanges'](_0x3fe9f4){const _0xf381ce=this['editor']['model']['schema'];for(let _0x4e62a3=0x0;_0x4e62a3<_0x3fe9f4['length'];_0x4e62a3++){if(!(_0x3fe9f4[_0x4e62a3]['isAdded']||_0x3fe9f4[_0x4e62a3]['isAddSuggestion']||_0x3fe9f4[_0x4e62a3]['isRemoved']||_0x3fe9f4[_0x4e62a3]['isRemoveSuggestion']))continue;if(0x0==_0x3fe9f4[_0x4e62a3]['distance'])continue;const _0x213333=_0x3fe9f4[_0x4e62a3]['item'];_0xf381ce['isBlock'](_0x213333)||_0xf381ce['isLimit'](_0x213333)||(_0x3fe9f4[_0x4e62a3]['isAdded']&&delete _0x3fe9f4[_0x4e62a3]['isAdded'],_0x3fe9f4[_0x4e62a3]['isAddSuggestion']&&delete _0x3fe9f4[_0x4e62a3]['isAddSuggestion'],_0x3fe9f4[_0x4e62a3]['isRemoveSuggestion']&&delete _0x3fe9f4[_0x4e62a3]['isRemoveSuggestion'],_0x3fe9f4[_0x4e62a3]['isRemoved']&&(_0x3fe9f4[_0x4e62a3]['isIncorrect']=!0x0));}return _0x3fe9f4['filter'](_0x182138=>!_0x182138['isIncorrect']);}['_makeModelFromTape'](_0x57e377,_0x3f0a90,_0xdd29e2){const _0x1fbfea=new _0x381023(),_0x26a2ee=[],_0xa1dc6b=new Map(),_0x344e73=this['editor']['model'],_0x37435d=_0x344e73['schema'],_0x1cc737=[_0x1fbfea],_0x430e3e={},_0x509406={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x1cdaf3=null;const _0x3d3e35=[0x0];for(let _0x254fc3=0x0;_0x254fc3<_0x57e377['length'];_0x254fc3++)if('elementStart'===_0x57e377[_0x254fc3]['type']){_0x57e377[_0x254fc3]['previousPosition']=_0x344e73['createPositionFromPath'](_0x1fbfea,_0x3d3e35);const _0x3eed9b=new _0x5758d3(_0x57e377[_0x254fc3]['item']['name'],_0x57e377[_0x254fc3]['item']['getAttributes']());_0x1cc737[0x0]['_appendChild'](_0x3eed9b),_0x3d3e35['push'](0x0),_0x1cc737['unshift'](_0x3eed9b),_0x57e377[_0x254fc3]['nextPosition']=_0x344e73['createPositionFromPath'](_0x1fbfea,_0x3d3e35);}else'elementEnd'===_0x57e377[_0x254fc3]['type']?(_0x1cc737['shift'](),_0x57e377[_0x254fc3]['previousPosition']=_0x344e73['createPositionFromPath'](_0x1fbfea,_0x3d3e35),_0x3d3e35['pop'](),_0x3d3e35[_0x3d3e35['length']-0x1]++,_0x57e377[_0x254fc3]['nextPosition']=_0x344e73['createPositionFromPath'](_0x1fbfea,_0x3d3e35)):(_0x57e377[_0x254fc3]['previousPosition']=_0x344e73['createPositionFromPath'](_0x1fbfea,_0x3d3e35),_0x1cdaf3?_0x1cdaf3['_data']+=_0x57e377[_0x254fc3]['item']['data']:_0x1cdaf3=new _0x5759ad(_0x57e377[_0x254fc3]['item']['data'],_0x57e377[_0x254fc3]['item']['getAttributes']()),_0x57e377[_0x254fc3+0x1]&&'text'===_0x57e377[_0x254fc3+0x1]['type']&&_0x1545b2(_0x1cdaf3,_0x57e377[_0x254fc3+0x1]['item'])||(_0x1cc737[0x0]['_appendChild'](_0x1cdaf3),_0x1cdaf3=null),_0x3d3e35[_0x3d3e35['length']-0x1]+=_0x57e377[_0x254fc3]['item']['offsetSize'],_0x57e377[_0x254fc3]['nextPosition']=_0x344e73['createPositionFromPath'](_0x1fbfea,_0x3d3e35));for(let _0x4b8804=0x0;_0x4b8804<_0x57e377['length'];_0x4b8804++){const _0x2afda7=_0x57e377[_0x4b8804]['previousPosition'],_0x28968c=_0x57e377[_0x4b8804]['nextPosition'];for(const _0x338b73 of _0x57e377[_0x4b8804]['markersStart'])_0xa1dc6b['set'](_0x338b73,{'start':_0x2afda7,'end':null});_0x2b25fc('isRemoveSuggestion',_0x4b8804,_0x2afda7,_0x28968c),_0x2b25fc('isAddSuggestion',_0x4b8804,_0x2afda7,_0x28968c),_0x2b25fc('isRemoved',_0x4b8804,_0x2afda7,_0x28968c),_0x2b25fc('isAdded',_0x4b8804,_0x2afda7,_0x28968c);for(const _0x336089 of _0x57e377[_0x4b8804]['markersEnd']){const _0x1e18fa=_0xa1dc6b['get'](_0x336089);_0x1e18fa?_0x1e18fa['end']=_0x28968c:_0xa1dc6b['set'](_0x336089,{'start':_0x28968c,'end':_0x28968c});}}for(const [_0x4edb36,_0x26fd73]of _0xa1dc6b){const _0x3371ad=this['editor']['model']['createRange'](_0x26fd73['start'],_0x26fd73['end']);_0x1fbfea['markers']['set'](_0x4edb36,_0x3371ad);}return _0x26a2ee['sort']((_0x1856ff,_0x20939b)=>{const _0x4fa3dc=_0x1fbfea['markers']['get']('revision:'+_0x1856ff['id']),_0x34ade5=_0x1fbfea['markers']['get']('revision:'+_0x20939b['id']);return _0x4fa3dc['start']['isBefore'](_0x34ade5['start'])?-0x1:_0x4fa3dc['start']['isAfter'](_0x34ade5['start'])?0x1:_0x4fa3dc['end']['isBefore'](_0x34ade5['end'])?-0x1:_0x4fa3dc['end']['isAfter'](_0x34ade5['end'])?0x1:'add'===_0x1856ff['type']?-0x1:0x1;}),{'root':_0x1fbfea,'changes':_0x26a2ee};function _0x2b25fc(_0x4b221f,_0x17765e,_0x5818d6,_0x5ddd95){const _0x114d3f=!!_0x57e377[_0x17765e][_0x4b221f],_0x2bf2de=_0x114d3f?_0x57e377[_0x17765e][_0x4b221f]['userId']:null,_0x45d3b9=_0x17765e===_0x57e377['length']-0x1,_0xd78b71=_0x509406[_0x4b221f][0x0],_0x4bb3bf=_0x37435d['isObject'](_0x57e377[_0x17765e]['item']);!_0x430e3e[_0x4b221f]&&_0x114d3f?_0x430e3e[_0x4b221f]={'start':_0x5818d6,'tapeItem':_0x57e377[_0x17765e],'userId':_0x2bf2de,'type':_0x4b221f}:_0x430e3e[_0x4b221f]&&!_0x114d3f?(_0x430e3e[_0x4b221f]['end']=_0x5818d6,_0x402666(_0x430e3e[_0x4b221f]),_0x430e3e[_0x4b221f]=null):_0x430e3e[_0x4b221f]&&_0x114d3f&&_0x430e3e[_0x4b221f]['userId']!==_0x2bf2de&&(_0x430e3e[_0x4b221f]['end']=_0x5818d6,_0xd78b71&&_0xd78b71['userId']===_0x430e3e[_0x4b221f]['userId']||_0x402666(_0x430e3e[_0x4b221f]),_0x430e3e[_0x4b221f]={'start':_0x5818d6,'tapeItem':_0x57e377[_0x17765e],'userId':_0x2bf2de,'type':_0x4b221f}),_0x430e3e[_0x4b221f]&&_0x4bb3bf&&('elementStart'!==_0x57e377[_0x17765e]['type']||_0xd78b71&&_0xd78b71['userId']===_0x2bf2de||_0x509406[_0x4b221f]['unshift']({'userId':_0x2bf2de,'object':_0x57e377[_0x17765e]['item'],'change':_0x430e3e[_0x4b221f]}),'elementEnd'===_0x57e377[_0x17765e]['type']&&_0xd78b71&&_0xd78b71['object']===_0x57e377[_0x17765e]['item']&&(_0x509406[_0x4b221f]['shift'](),_0x430e3e[_0x4b221f]=_0xd78b71['change'])),_0x430e3e[_0x4b221f]&&_0x45d3b9&&(_0x430e3e[_0x4b221f]['end']=_0x5ddd95,_0x402666(_0x430e3e[_0x4b221f]),_0x430e3e[_0x4b221f]=null);}function _0x402666({start:_0x48f35a,end:_0x126a50,tapeItem:_0xa1e80,userId:_0x250a22,type:_0x3ad47c}){const _0x41e874=_0xa1e80['item'],_0xc33bbf=_0x344e73['schema']['isBlock'](_0x41e874)&&!_0x344e73['schema']['isLimit'](_0x41e874),_0x2a2083=_0x48f35a['nodeAfter']==_0x126a50['parent']&&_0x126a50['isAtStart'];if(_0xc33bbf&&_0x2a2083)return;const _0x5315f4=_0x344e73['createRange'](_0x48f35a,_0x126a50),_0x32edd5=_0x3f0a90['get'](_0x250a22),_0x2850dd=new G({'author':_0x32edd5,'type':'isAdded'==_0x3ad47c||'isAddSuggestion'==_0x3ad47c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3ad47c||'isRemoveSuggestion'==_0x3ad47c},'createdAt':new Date(),'rootName':_0xdd29e2});_0x26a2ee['push'](_0x2850dd),_0x1fbfea['markers']['set']('revision:'+_0x2850dd['id'],_0x5315f4);}function _0x1545b2(_0x29330e,_0x90e4dd){const _0x52c11b=_0x29330e['getAttributes'](),_0x1b933f=_0x90e4dd['getAttributes']();for(const _0x5eb205 of _0x52c11b){if(_0x5eb205[0x1]!==_0x90e4dd['getAttribute'](_0x5eb205[0x0]))return!0x1;_0x1b933f['next']();}return _0x1b933f['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x5c51b4=>{const _0x57e876=_0x5c51b4['markerName']['split'](':')[0x1],_0x1acec0=this['_getChangeFromId'](_0x57e876);if(!_0x1acec0)return null;const _0x4feef2='add'==_0x1acec0['type']?'insertion':'deletion',_0x234484=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4feef2];return _0x1acec0['data']['isSuggestion']&&_0x234484['push']('ck-suggestion-marker-'+_0x4feef2+'-new'),this['activeChange']==_0x1acec0&&_0x234484['push']('ck-suggestion-marker--active'),{'classes':_0x234484,'attributes':{'data-change-id':_0x57e876}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x1637b8=>{_0x1637b8['on']('element:pre',(_0x57b8bc,_0xfd5d33,_0x4673e5)=>{const _0x5864c6=_0xfd5d33['viewItem']['getChild'](0x0);if(!_0x5864c6||!_0x5864c6['is']('element','code'))return;if(!_0x4673e5['consumable']['consume'](_0x5864c6,{'attributes':['vid_start','vid_end']}))return;const _0x16abf2=_0xfd5d33['modelRange']['start']['nodeAfter'];_0x4673e5['writer']['setAttribute']('vid_start',_0x5864c6['getAttribute']('vid_start'),_0x16abf2),_0x4673e5['writer']['setAttribute']('vid_end',_0x5864c6['getAttribute']('vid_end'),_0x16abf2);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0xa7b5df=>{_0xa7b5df['on']('element',(_0x538060,_0xc690ea,_0x168a2a)=>{if(!_0x168a2a['consumable']['consume'](_0xc690ea['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0xc690ea['modelRange']['isCollapsed'])return;const _0x48b2a6=_0xc690ea['modelRange']['start']['nodeAfter'];_0x48b2a6['hasAttribute']('vid_start')||_0x48b2a6['hasAttribute']('vid')||(_0x168a2a['writer']['setAttribute']('vid_start',_0xc690ea['viewItem']['getAttribute']('vid_start'),_0x48b2a6),_0x168a2a['writer']['setAttribute']('vid_end',_0xc690ea['viewItem']['getAttribute']('vid_end'),_0x48b2a6));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2cbebc=>_0x2cbebc['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3ec1e2,[,_0x549d63])=>{['vid_start','vid_end','vid']['includes'](_0x549d63)&&(_0x3ec1e2['return']=!0x0,_0x3ec1e2['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xe09ec8=>{_0xe09ec8['on']('attribute:vid',(_0x50a0c2,_0x309041,_0x441e88)=>{if('\x20'!=_0x309041['item']['data']||_0x309041['item']['parent']['maxOffset']>0x1)return;if(!_0x441e88['consumable']['consume'](_0x309041['item'],_0x50a0c2['name']))return;const _0xf3c11c=_0x441e88['writer'],_0x577afd=_0x441e88['mapper']['toViewRange'](_0x309041['range']);_0xf3c11c['wrap'](_0x577afd,_0xf3c11c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x3c6ca2){const _0x50b979=_0x3c6ca2['plugins']['get']('RevisionViewer');return(_0x2345e5,_0x48215d,_0x548609)=>{const _0xcf0f0b=_0x48215d['markerName']['split'](':')[0x1],_0x38fbcc=_0x50b979['_getChangeFromId'](_0xcf0f0b);if(!_0x38fbcc)return null;const _0x42a5dc='add'==_0x38fbcc['type']?'split':'merge';if(!_0x548609['consumable']['test'](_0x48215d['markerRange'],_0x2345e5['name']))return;const _0x1d599e=_0x48215d['markerRange']['getWalker'](),_0x474891=_0x48215d['markerRange']['start'],_0x5638b7=_0x3c6ca2['model']['schema'];let _0x176226=null,_0x5210cf=null,_0x29d162=!0x1,_0x1910f8=!0x1;for(const _0x3f3f26 of _0x1d599e){const _0x3deffe=_0x3f3f26['item'];_0x29d162=_0x29d162||_0x5638b7['isContent'](_0x3deffe);const _0x2b5b09=_0x548609['mapper']['toViewElement'](_0x3deffe);if(_0x2b5b09&&_0x2b5b09['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3f3f26['type']&&(_0x5638b7['isBlock'](_0x3deffe)&&!_0x5638b7['isLimit'](_0x3deffe)&&(_0x3deffe['nextSibling']||_0x474891['isAtEnd']?_0x176226&&_0x176226['parent']==_0x3deffe||(_0x176226=_0x3deffe,_0x222adf(_0x3f3f26['previousPosition']),_0x1910f8=!0x0):_0x5210cf=_0x5210cf||_0x3f3f26['previousPosition']));}function _0x222adf(_0x3795a7){const _0x186eb8=_0x548609['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x42a5dc}),_0xc2bf3b=_0x548609['mapper']['toViewPosition'](_0x3795a7);_0x38fbcc['data']['isSuggestion']&&_0x548609['writer']['addClass']('ck-suggestion-marker-'+_0x42a5dc+'-new',_0x186eb8),_0x50b979['activeChange']==_0x38fbcc&&_0x548609['writer']['addClass']('ck-suggestion-marker--active',_0x186eb8),_0x548609['writer']['insert'](_0xc2bf3b,_0x186eb8),_0x548609['mapper']['bindElementToMarker'](_0x186eb8,_0x48215d['markerName']);}_0x29d162||_0x1910f8||!_0x5210cf||_0x222adf(_0x5210cf);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x30626e,_0x44c9d4,_0x50cc9b)=>{const _0x2b8bf3=_0x50cc9b['mapper']['markerNameToElements'](_0x44c9d4['markerName']);if(_0x2b8bf3){for(const _0x4f4ca9 of _0x2b8bf3)(_0x4f4ca9['hasClass']('ck-suggestion-marker-split')||_0x4f4ca9['hasClass']('ck-suggestion-marker-merge'))&&(_0x50cc9b['mapper']['unbindElementFromMarkerName'](_0x4f4ca9,_0x44c9d4['markerName']),_0x50cc9b['writer']['remove'](_0x4f4ca9));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x237b03,_0x5f425e,_0x2c62c9)=>{const _0x13659a=_0x5f425e['markerName']['split'](':')[0x1],_0x4e53ea=this['_getChangeFromId'](_0x13659a);if(!_0x4e53ea)return null;const _0x2de002='add'==_0x4e53ea['type']?'split':'merge';if(_0x2c62c9['consumable']['test'](_0x5f425e['markerRange'],_0x237b03['name']))for(const _0x15708d of _0x5f425e['markerRange']['getItems']()){if(!_0x15708d['is']('element','softBreak'))continue;const _0x1608d4=_0x2c62c9['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2de002}),_0x33e0d2=_0x2c62c9['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x15708d));_0x4e53ea['data']['isSuggestion']&&_0x2c62c9['writer']['addClass']('ck-suggestion-marker-'+_0x2de002+'-new',_0x1608d4),this['activeChange']==_0x4e53ea&&_0x2c62c9['writer']['addClass']('ck-suggestion-marker--active',_0x1608d4),_0x2c62c9['writer']['insert'](_0x33e0d2,_0x1608d4),_0x2c62c9['mapper']['bindElementToMarker'](_0x1608d4,_0x5f425e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x28fa53=>{for(const _0x5c93b7 of this['editor']['model']['document']['getRootNames']()){const _0x271018=this['editor']['model']['document']['getRoot'](_0x5c93b7),_0x5397a0=this['editor']['editing']['view']['document']['getRoot'](_0x5c93b7);if(_0x5397a0){const _0x314882=_0x271018['getAttribute']('revisionHistoryAttachChange');if(_0x28fa53['removeAttribute']('data-change-id',_0x5397a0),_0x28fa53['removeClass']('ck-revision-history-root-add',_0x5397a0),_0x28fa53['removeClass']('ck-revision-history-root-remove',_0x5397a0),_0x28fa53['removeClass']('ck-revision-history-root--active',_0x5397a0),_0x314882){const _0x4a331d=this['_getChangeFromId'](_0x314882);if(!_0x4a331d)return null;_0x28fa53['setAttribute']('data-change-id',_0x314882,_0x5397a0),_0x28fa53['addClass']('ck-revision-history-root-'+_0x4a331d['type'],_0x5397a0),this['activeChange']==_0x4a331d&&_0x28fa53['addClass']('ck-revision-history-root--active',_0x5397a0);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x145389=>'revision-comment:'+_0x145389,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x552bbb=>'revision-suggestion:'+_0x552bbb,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x13b6af=>({'name':'suggestion:'+_0x13b6af,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x1eafe9=>{const _0x8e9964=_0x1eafe9['markerName']['split'](':')[0x1];return'insertion'!=_0x8e9964&&'deletion'!=_0x8e9964?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x8e9964]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x57fb7d,_0x8fc14b,_0x26d25c)=>{const _0x661608=_0x26d25c['mapper']['markerNameToElements'](_0x8fc14b['markerName']);if(_0x661608){for(const _0x232550 of _0x661608)_0x232550['is']('uiElement')&&(_0x26d25c['mapper']['unbindElementFromMarkerName'](_0x232550,_0x8fc14b['markerName']),_0x26d25c['writer']['remove'](_0x232550));}},{'priority':'high'});}['_getChangeFromId'](_0x2b0adb){return this['_changeIdToChange']['get'](_0x2b0adb);}['_getViewForChange'](_0x54aea9){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x54aea9),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x16b1fe,_0x27e26c,_0x1aa1d2,_0x2db397)=>{_0x2db397&&this['_balloon']['remove'](_0x2db397),_0x1aa1d2&&(this['_balloon']['add']({'view':_0x1aa1d2,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x9f81e6=this['editor']['editing'],_0x3339e0=this['_getChangeFromId'](_0x1aa1d2['changeId']);let _0x38e7a3;if(_0x3339e0['data']['isOnRoot']){const _0x3c202a=_0x9f81e6['view']['getDomRoot'](_0x3339e0['rootName']);_0x38e7a3=Array['from'](_0x3c202a['getClientRects']());}else{const _0x410f20=this['editor']['model']['markers']['get']('revision:'+_0x1aa1d2['changeId']);_0x38e7a3=Array['from'](_0x9f81e6['mapper']['markerNameToElements'](_0x410f20['name']))['map'](_0x4ae121=>_0x9f81e6['view']['domConverter']['mapViewToDom'](_0x4ae121))['map'](_0x3a6a86=>Array['from'](_0x3a6a86['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x38e7a3[0x0];return _0x38e7a3['find'](_0x4958c5=>_0x4958c5['top']-0x3<=this['_activeViewTarget']['y']&&_0x4958c5['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4958c5['left']-0x3<=this['_activeViewTarget']['x']&&_0x4958c5['right']+0x3>=this['_activeViewTarget']['x'])||_0x38e7a3[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x381874,_0xd27219,_0x557da4,_0x5a37ed)=>{this['activeView']=_0x557da4?this['_getViewForChange'](_0x557da4):null,this['editor']['model']['change'](()=>{const _0xd39990=this['editor']['editing'];_0x5a37ed&&(_0x5a37ed['data']['isOnRoot']?_0xd39990['view']['change'](_0x298579=>{_0x298579['removeClass']('ck-revision-history-root--active',_0xd39990['view']['document']['getRoot'](_0x5a37ed['rootName']));}):_0xd39990['reconvertMarker']('revision:'+_0x5a37ed['id'])),_0x557da4&&(_0x557da4['data']['isOnRoot']?_0xd39990['view']['change'](_0x47406d=>{_0x47406d['addClass']('ck-revision-history-root--active',_0xd39990['view']['document']['getRoot'](_0x557da4['rootName']));}):_0xd39990['reconvertMarker']('revision:'+_0x557da4['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x536a4e,_0x54b869)=>{if(this['activeChange'])return;const _0x112537=this['_findChangeIdFromDomTarget'](_0x54b869['target']),_0x574282=this['_changeIdToChange']['get'](_0x112537);_0x574282?(this['_activeViewTarget']={'x':_0x54b869['domEvent']['x'],'y':_0x54b869['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x574282)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2456e8,_0x49f689)=>{const _0x42ecf3=this['_findChangeIdFromDomTarget'](_0x49f689['target']),_0x2d39fe=this['_changeIdToChange']['get'](_0x42ecf3);_0x2d39fe?(this['_activeViewTarget']={'x':_0x49f689['domEvent']['x'],'y':_0x49f689['domEvent']['y']},_0x2d39fe===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2d39fe):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0xcfd20b){do{const _0x8577b3=_0xcfd20b['getAttribute']('data-change-id');if(_0x8577b3)return _0x8577b3;_0xcfd20b=_0xcfd20b['parent'];}while(_0xcfd20b);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x925708=>{for(const _0x5ec9dc of this['editor']['model']['markers'])_0x925708['removeMarker'](_0x5ec9dc);});}}function Q(_0x3fa262,_0x298054){return(_0x1b6396,_0x4d8d4b,_0x34dc88)=>{if(!_0x34dc88['consumable']['test'](_0x4d8d4b['markerRange'],_0x1b6396['name']))return;const _0x53e92a=_0x4d8d4b['markerRange']['getWalker'](),_0x182c42=_0x4d8d4b['markerRange']['start'],_0x198480=_0x3fa262['model']['schema'];let _0x53e34d=null,_0x184591=null,_0x158717=!0x1,_0x52d3b5=!0x1;for(const _0xcfdf13 of _0x53e92a){const _0x337021=_0xcfdf13['item'];_0x158717=_0x158717||_0x198480['isContent'](_0x337021);const _0x197979=_0x34dc88['mapper']['toViewElement'](_0x337021);if(_0x197979&&_0x197979['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xcfdf13['type']&&(_0x198480['isBlock'](_0x337021)&&!_0x198480['isLimit'](_0x337021)&&(_0x337021['nextSibling']||_0x182c42['isAtEnd']?_0x53e34d&&_0x53e34d['parent']==_0x337021||(_0x53e34d=_0x337021,_0x8ed9a1(_0xcfdf13['previousPosition']),_0x52d3b5=!0x0):_0x184591=_0x184591||_0xcfdf13['previousPosition']));}function _0x8ed9a1(_0x2a1336){const _0x5b76d5=_0x34dc88['mapper']['toViewPosition'](_0x2a1336),_0xa2e066=_0x34dc88['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x298054});_0x34dc88['writer']['insert'](_0x5b76d5,_0xa2e066),_0x34dc88['mapper']['bindElementToMarker'](_0xa2e066,_0x4d8d4b['markerName']);}_0x158717||_0x52d3b5||!_0x184591||_0x8ed9a1(_0x184591);};}class nt extends _0x49e138{constructor(_0xf4eba3){super(_0xf4eba3);const _0x5811e7=_0xf4eba3['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0x5811e7,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5811e7,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3ab370=this['editor'],_0x1c624f=_0x3ab370['plugins']['get'](l),_0x559c6c=_0x1c624f['isReady']?_0x1c624f['diff']['newRevisionId']:null;_0x3ab370['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x559c6c);}['refresh'](){const {isReady:_0x1722bd,isEnabled:_0x2c6513,repository:_0xf8880e,diff:_0x185a32}=this['editor']['plugins']['get'](l),_0x4d6e70=_0x185a32&&_0xf8880e['getLaterVisibleRevision'](_0x185a32['newRevisionId']);this['isEnabled']=_0x1722bd&&_0x2c6513&&Boolean(_0x4d6e70);}}class rt extends _0x49e138{['_step'];constructor(_0xb57e1e,{direction:_0x291726}){super(_0xb57e1e);const _0x8e045b=_0xb57e1e['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x291726?0x1:-0x1,this['listenTo'](_0x8e045b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x8e045b,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x8e045b,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x438632=this['editor'],_0xd6695e=_0x438632['plugins']['get'](l),{isNavigationMode:_0x5f4982,currentChangeNumber:_0x162226}=_0xd6695e;let _0x580fa0;if(_0xd6695e['activeChange']=_0x5f4982?_0xd6695e['diff']['changes']['get'](_0x162226+this['_step']):_0xd6695e['diff']['changes']['first'],_0xd6695e['activeChange']['data']['isOnRoot'])_0x580fa0=_0x438632['editing']['view']['getDomRoot'](_0xd6695e['activeChange']['rootName']);else{const _0x51e7e7=_0x438632['model']['markers']['get']('revision:'+_0xd6695e['activeChange']['id']);_0x580fa0=_0x6110c4(_0x438632['editing'],_0x51e7e7);}_0x34209d({'target':_0x580fa0,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x5746b2,currentChangeNumber:_0x256240,numberOfChanges:_0x1b90b7,isReady:_0x42725c,isEnabled:_0x1f4420}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x1f4420&&_0x42725c&&_0x1b90b7)&&(!_0x5746b2||(0x1===this['_step']?_0x256240<_0x1b90b7-0x1:_0x256240>0x0));}}class fi extends _0x167129{constructor(_0xe17e44){super(_0xe17e44);const _0x544356=this['bindTemplate'],_0x5b90d7=new _0x231e90(_0xe17e44),_0x139b87=new _0x231e90(_0xe17e44);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',(_0x36bff5,_0x2047dc)=>_0x36bff5&&_0x2047dc>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2fef95,_0x496b00,_0xb3ebc6,_0x55a2d4)=>{if(!_0x2fef95)return R(_0xe17e44,'Loading...');if(!_0xb3ebc6)return R(_0xe17e44,'No\x20changes');const _0x9b2c20=R(_0xe17e44,'NUMBER_OF_CHANGES',_0xb3ebc6);return _0x55a2d4?R(_0xe17e44,'X_OF_Y_CHANGES',[_0x496b00+0x1,_0xb3ebc6]):_0x9b2c20;}),_0x5b90d7['set']({'label':R(_0xe17e44,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1a0a1b}),_0x139b87['set']({'label':R(_0xe17e44,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3f3f77}),_0x5b90d7['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x139b87['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x5b90d7['on']('execute',()=>this['fire']('execute','backward')),_0x139b87['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',_0x544356['if']('_isStatusLabelVisible','ck-hidden',_0xea5d78=>!_0xea5d78)]},'children':[{'text':_0x544356['to']('isNavigationMode',_0x3119d8=>_0x3119d8?R(_0xe17e44,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0xe17e44,'Total')+':\x20')}]},{'text':_0x544356['to']('_statusText')}]},new _0x2c6fc8(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x5b90d7,_0x139b87]}]});}}const ge='ck-editor__editable__loading-overlay';class bi extends _0x44d0e2{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4dee34=this['editor']['editing']['view'];_0x4dee34['change'](_0xb9b3e0=>{for(const _0x944f00 of _0x4dee34['document']['roots'])_0xb9b3e0['addClass'](ge,_0x944f00);});}['hide'](){const _0x4f63db=this['editor']['editing']['view'];_0x4f63db['change'](_0x5580be=>{for(const _0x4947ea of _0x4f63db['document']['roots'])_0x5580be['removeClass'](ge,_0x4947ea);});}}class u extends _0x44d0e2{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,bi];}['init'](){const _0x298ac2=this['editor'],_0x34556d=_0x298ac2['plugins']['get'](l),_0x20f1cd=_0x298ac2['plugins']['get'](bi);_0x298ac2['ui']['componentFactory']['add']('exitToEditing',_0x14d1ea=>{const _0x3868c6=new _0x231e90(_0x14d1ea);return _0x3868c6['set']({'label':R(_0x14d1ea,'Back\x20to\x20editing'),'icon':_0x519511,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3868c6,'execute',()=>{_0x298ac2['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3868c6;}),_0x298ac2['ui']['componentFactory']['add']('restoreRevision',_0x435ebd=>{const _0x5167ed=new _0x231e90(_0x435ebd);return _0x5167ed['set']({'label':R(_0x435ebd,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x5167ed['bind']('isEnabled')['to'](_0x298ac2['commands']['get']('restoreRevision')),this['listenTo'](_0x5167ed,'execute',()=>_0x298ac2['execute']('restoreRevision')),_0x5167ed;}),_0x298ac2['ui']['componentFactory']['add']('changesNavigation',_0x2c2361=>{const _0x37ad6e=new fi(_0x2c2361),_0x47bc29=_0x298ac2['commands']['get']('showPreviousChange'),_0x6c83d4=_0x298ac2['commands']['get']('showNextChange');return _0x37ad6e['bind']('isBackwardNavigationEnabled')['to'](_0x47bc29,'isEnabled'),_0x37ad6e['bind']('isForwardNavigationEnabled')['to'](_0x6c83d4,'isEnabled'),_0x37ad6e['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x34556d),this['listenTo'](_0x37ad6e,'execute',(_0x1babdf,_0x4829b0)=>{_0x298ac2['execute']('forward'===_0x4829b0?'showNextChange':'showPreviousChange');}),_0x37ad6e;}),_0x20f1cd['show'](),_0x34556d['on']('change:isReady',(_0x21efcd,_0x3e54f7,_0x3ea4be)=>{_0x3ea4be?_0x20f1cd['hide']():_0x20f1cd['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x56e156,_0x1003a7){super(_0x56e156,_0x1003a7);const _0x46b51a=this['bindTemplate'];this['set']({'label':R(_0x56e156,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x56e156,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x46b51a['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x1da51a=this['fieldView']['element'];this['_tooltipString']=_0x1da51a['scrollWidth']>_0x1da51a['clientWidth']&&_0x1da51a['value']||'';}}class ni extends _0x167129{constructor(_0x250cca,_0x46dad9,_0x1c864a){super(_0x250cca);const _0x295a85=new _0x56ed66();_0x295a85['set']({'content':_0x1d9021,'viewBox':'0\x200\x2011\x2010'});const _0x1dcb29=['ck','ck-revision-history-sidebar__revision-author'];_0x1c864a&&_0x1dcb29['push']('ck-revision-history-sidebar__revision-author_creator');const _0x45d40e=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x250cca,_0x1c864a?'Revision\x20creator':'Revision\x20author')},'children':[_0x295a85,_0x46dad9['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x1dcb29},'children':_0x45d40e});}}function ci(_0x103c09,_0x3bee02){const _0x34bb24=_0x103c09['bindTemplate'],_0x27b6a4=_0x103c09['locale'],_0x71f379=_0x12688f(_0x27b6a4);_0x71f379['panelPosition']='sw';const _0x2d622d=function(_0x59c880,_0x5d883d){const _0x1dba8c=function(_0x522c7f,_0x56128b){const _0x4c60b7=_0x522c7f['locale'],_0x7366a4={'Compare\x20against\x20selected':R(_0x4c60b7,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x4c60b7,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x4c60b7,'Restore\x20this\x20revision')};return _0x56128b['map'](_0x42656e=>{const _0x378a34=_0x7366a4[_0x42656e['name']];return _0x378a34&&_0x378a34!==_0x42656e['name']&&(_0x42656e['name']=_0x378a34),_0x42656e;});}(_0x59c880,_0x5d883d),_0x3954f8=new _0x477179();for(const _0x30f910 of _0x1dba8c){const _0x199988={'type':'button','model':new to({'label':_0x30f910['name'],'class':_0x30f910['class'],'withText':!0x0,'role':'menuitem','_action':_0x30f910['action']})};_0x199988['model']['bind']('isEnabled')['to'](_0x59c880,'isActionsDropdownOpen',_0x52dd00=>'function'!=typeof _0x30f910['isEnabled']||(!_0x52dd00||_0x30f910['isEnabled'](_0x59c880))),_0x3954f8['add'](_0x199988);}return _0x3954f8;}(_0x103c09,_0x3bee02);return _0x103c09['bind']('isActionsDropdownOpen')['to'](_0x71f379,'isOpen'),_0x71f379['buttonView']['set']({'label':R(_0x27b6a4,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1cbb2d}),_0x71f379['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x34bb24['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x34bb24['to'](_0x540dad=>_0x540dad['stopPropagation']())}}),_0x71f379['on']('execute',_0x2a3e86=>{_0x103c09['isReady']&&'function'==typeof _0x2a3e86['source']['_action']&&_0x2a3e86['source']['_action'](_0x103c09);}),_0x39d58c(_0x71f379,_0x2d622d,{'role':'menu'}),_0x71f379['listenTo'](_0x103c09,'change:isActionsDropdownOpen',(_0x123fcd,_0x5c98cf,_0x23805c)=>{if(_0x23805c)for(const _0x3d62d0 of _0x71f379['listView']['items']){const _0x3fb515=_0x3d62d0['children']['first'],_0x12860d=_0x3bee02['find'](_0x251728=>_0x251728['action']===_0x3fb515['_action'])['isVisible'];_0x3d62d0['isVisible']=void 0x0===_0x12860d||_0x12860d(_0x103c09);}}),_0x71f379;}class _i extends/* #__PURE__ -- @preserve */
27
- _0x1cdb06(_0x167129){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x456754,_0x3aa819,_0x229ae,_0x2a1122){super(_0x456754);const _0x4855f2=this['bindTemplate'],_0x5f5ba4=function(_0x4b8d41,_0x1de624){const _0x2578b8=Array['from'](_0x1de624['authors'])['filter'](_0x123683=>_0x123683!=_0x1de624['creator']);return _0x1de624['creator']&&_0x2578b8['unshift'](_0x1de624['creator']),_0x2578b8['map'](_0xc32e41=>new ni(_0x4b8d41,_0xc32e41,_0xc32e41==_0x1de624['creator']));}(_0x456754,_0x3aa819);this['id']=_0x3aa819['id'],this['_revision']=_0x3aa819,this['_requireRevisionName']=_0x2a1122,this['bind']('name','createdAt')['to'](_0x3aa819),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x56fc8f=>{return _0x43f776=_0x456754['uiLanguage'],(_0x4fd661=_0x56fc8f)['toLocaleDateString'](_0x43f776,{'month':'long','day':'numeric'})+',\x20'+_0x4fd661['toLocaleTimeString'](_0x43f776,{'hour':'numeric','minute':'numeric'});var _0x43f776,_0x4fd661;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x456754,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4e5d62=>_0x4e5d62||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x4a7ed5,_0x49252b)=>_0x4a7ed5&&_0x49252b),this['revisionActionsView']=_0x229ae&&_0x229ae['length']?ci(this,_0x229ae):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x4855f2['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x4855f2['if']('isEnabled','ck-disabled',_0x11669f=>!_0x11669f),_0x4855f2['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x4855f2['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x4855f2['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':_0x4855f2['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':_0x5f5ba4}]},this['revisionActionsView']],'on':{'click':_0x4855f2['to'](_0x23e7ae=>{_0x23e7ae['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x5d4eb2=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x5d4eb2,'change',()=>{this['_requireRevisionName']&&!_0x5d4eb2['value']||this['fire']('setName',{'id':this['id'],'name':_0x5d4eb2['value']}),_0x5d4eb2['value']||(_0x5d4eb2['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ki(_0x5661d1,_0x3f5d90){const _0x223df3=_0x28f13a['fromJSDate'](_0x5661d1)['setLocale'](_0x3f5d90),_0x1b706b=_0x28f13a['local'](),_0x4cb64f=_0x1b706b['minus']({'days':0x1})['startOf']('day');let _0x45caed,_0x3a8dff;return _0x223df3['hasSame'](_0x1b706b,'day')?(_0x45caed=_0x223df3['startOf']('day')['toJSDate'](),_0x3a8dff=_0x223df3['toRelativeCalendar']()):_0x223df3['hasSame'](_0x4cb64f,'day')?(_0x45caed=_0x4cb64f['toJSDate'](),_0x3a8dff=_0x223df3['toRelativeCalendar']()):_0x223df3['hasSame'](_0x1b706b,'week')?(_0x45caed=_0x223df3['startOf']('week')['toJSDate'](),_0x3a8dff=_0x223df3['weekdayLong']||''):_0x223df3['hasSame'](_0x1b706b,'year')?(_0x45caed=_0x223df3['startOf']('month')['toJSDate'](),_0x3a8dff=_0x223df3['monthLong']||''):(_0x45caed=_0x223df3['startOf']('year')['toJSDate'](),_0x3a8dff=String(_0x223df3['year'])),{'startDate':_0x45caed,'localizedPeriodName':_0x3a8dff};}class ji extends _0x167129{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x264f10,_0x3cf4f8,_0x8042a8,_0x5eac71){super(_0x264f10);const _0xedfeef=ki(_0x3cf4f8,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x3cf4f8,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x8042a8,this['_requireRevisionName']=_0x5eac71,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':_0xedfeef}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x366cf0){const _0x4abc58=new _i(this['locale'],_0x366cf0,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4abc58);}['removeRevision'](_0x1fae3e){const _0x18e9f9=this['revisionViews']['find'](_0x2121e7=>_0x2121e7['id']===_0x1fae3e['id']);this['revisionViews']['remove'](_0x18e9f9);}}class Ni extends _0x167129{constructor(_0x60a149){super(_0x60a149);const _0x542b0f=new _0x56ed66();_0x542b0f['content']=_0x409e84,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x542b0f,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x60a149,'Revision\x20history')]}]});}}class Ri extends _0x167129{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x56aeb2,_0x3bcd97,_0x564624,_0x318493){super(_0x56aeb2);const _0x42daee=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x3bcd97,this['_revisionActions']=_0x564624,this['_requireRevisionName']=_0x318493,this['on']('select',(_0x26b233,_0x2dcb94)=>{this['fire']('revisionSelected',_0x2dcb94);}),this['on']('setName',(_0x14292c,_0x1c2e64)=>{this['fire']('revisionSetName',_0x1c2e64);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Ni(_0x56aeb2),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x42daee['if']('isEnabled','ck-disabled',_0x4ae4c8=>!_0x4ae4c8)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x22fadc of this['_revisions'])this['_addRevision'](_0x22fadc);this['_revisions']['on']('add',(_0x427e13,_0x56148f)=>{this['_addRevision'](_0x56148f);}),this['_revisions']['on']('remove',(_0x252b34,_0x45099e)=>{this['_removeRevision'](_0x45099e);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0xe89cdf=>_0xe89cdf['revisionViews']['map'](_0x53d172=>_0x53d172))['flat']();}['selectRevision'](_0x45d193){for(const _0x2afab3 of this['revisionViews'])_0x45d193&&_0x45d193['id']===_0x2afab3['id']?_0x2afab3['select']():_0x2afab3['deselect']();}['highlightRevisions'](_0x15ba04){for(const _0x27a0cb of this['revisionViews'])_0x15ba04['some'](({id:_0x2547d6})=>_0x2547d6===_0x27a0cb['id'])?_0x27a0cb['highlight']():_0x27a0cb['unhighlight']();}['_addRevision'](_0x1ee13f){const _0x240b27=ki(_0x1ee13f['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5c5c72=this['timePeriodViews']['get'](0x0);_0x5c5c72&&_0x5c5c72['startDate']['getTime']()===_0x240b27['getTime']()||(_0x5c5c72=new ji(this['locale'],_0x240b27,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5c5c72)),_0x5c5c72['addRevision'](_0x1ee13f);}['_removeRevision'](_0x1c53f7){const _0x3cc174=ki(_0x1c53f7['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x3cc174)['removeRevision'](_0x1c53f7);}['_getTimePeriodViewByStartDate'](_0x5e73b7){return this['timePeriodViews']['find'](_0x306260=>_0x306260['startDate']['getTime']()===_0x5e73b7['getTime']());}}class f extends _0x44d0e2{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x46d461,uid as _0x4de09f,Collection as _0x3455f1,logWarning as _0x29a30c,FocusTracker as _0x22eada,KeystrokeHandler as _0x27fdae,scrollViewportToShowTarget as _0x1c4b70,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0xe7e073}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x2f320b,set as _0x169b13,unset as _0x198dca,isEqual as _0x4a85bd}from'es-toolkit/compat';import{Plugin as _0x5e8bcb,PendingActions as _0x302a30,Command as _0x44fa3d,ElementApiMixin as _0x489004,Editor as _0x1f4a2c}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x42a9a2,getMarkerDomElement as _0x19750e,ConfirmMixin as _0x4de50b,sanitizeEditorConfig as _0x13bb37}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x43fe3e,ViewAttributeElement as _0x2d96e4,ViewEmptyElement as _0x15fce2,ViewRawElement as _0x375b39,ViewUIElement as _0x5e9b8d,ViewDocumentFragment as _0x2d289e,ViewText as _0x578e61,ViewElement as _0x2fe4da,ModelElement as _0x1c89c2,ModelRange as _0x35853a,ModelPosition as _0x41e47c,ModelDocumentFragment as _0x42921b,ModelText as _0x213f4e}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x5e53f9,IconChevronUp as _0x3985f9,IconChevronDown as _0x2a9948,IconUndo as _0x20ce7f,IconUser as _0x3d4b77,IconThreeVerticalDots as _0x21ffc2}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0xd18b2e,View as _0x4691c3,submitHandler as _0x49fff6,LabeledFieldView as _0x506965,createLabeledInputText as _0x1340c0,createDropdown as _0x5b24c1,ListView as _0x65fa40,ListItemView as _0xd6f348,ButtonView as _0x304d89,MenuBarMenuView as _0x543c93,MenuBarMenuListView as _0x5cc111,MenuBarMenuListItemView as _0x41ed97,MenuBarMenuListItemButtonView as _0x5cdee7,ContextualBalloon as _0x53db58,ToolbarSeparatorView as _0x41f145,IconView as _0xd894e8,addListToDropdown as _0x24538a,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x313843,StickyPanelView as _0x436b55,ToolbarView as _0x3a21fd,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x4ca622}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x46d461(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x14a45a){super(),this['id']=_0x14a45a['id']||_0x4de09f(),this['creator']=_0x14a45a['creator']||null,this['authors']=_0x14a45a['authors']||[],this['diffData']=_0x14a45a['diffData']||null,this['toVersion']=_0x14a45a['toVersion']||0x0,this['fromVersion']=_0x14a45a['fromVersion']||0x0,this['set']('name',_0x14a45a['name']||''),this['set']('createdAt',_0x14a45a['createdAt']||new Date()),this['set']('attributes',_0x14a45a['attributes']||{});}['setName'](_0x5b4775){this['_update']({'name':_0x5b4775});}['setAttribute'](_0x5f4a10,_0xd4e3ed){const _0x4245ca=_0x2f320b(this['attributes']);_0x169b13(_0x4245ca,_0x5f4a10,_0xd4e3ed),this['_update']({'attributes':_0x4245ca});}['removeAttribute'](_0x36a30f){const _0x2d3baa=_0x2f320b(this['attributes']);_0x198dca(_0x2d3baa,_0x36a30f),this['_update']({'attributes':_0x2d3baa});}['_update'](_0x14da40,_0x266d9d=!0x1){let _0x56dc98=!0x1;const _0x153401={'id':this['id']},_0x34c098=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x5a3280 of _0x34c098){const _0xf40014=_0x14da40[_0x5a3280];void 0x0!==_0xf40014&&_0xf40014!==this[_0x5a3280]&&(this[_0x5a3280]=_0xf40014,_0x153401[_0x5a3280]=_0xf40014,_0x56dc98=!0x0);}_0x56dc98&&(_0x153401['authors']&&(_0x153401['authorsIds']=_0x153401['authors']['map'](_0x286243=>_0x286243['id']),delete _0x153401['authors']),this['fire']('_update',_0x153401,_0x266d9d));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x547ee9=>_0x547ee9['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x5e8bcb{['_revisions'];static get['requires'](){return[_0x42a9a2];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x41423b){super(_0x41423b),this['_revisions']=new _0x3455f1();}['afterInit'](){!async function(_0x1d906e){const _0x192a4e=_0xea0d84([0x4c,0x75,0x54,0x30,0x42,0x79,0x72,0x41,0x52,0x49,0x38,0x6e,0x63,0x6a,0x69,0x70,0x59,0x76,0x73,0x6f,0x48,0x64,0x58,0x34,0x53,0x33,0x71,0x4f,0x66,0x39,0x56,0x62,0x68,0x36,0x35,0x57,0x78,0x4d,0x4b,0x7a,0x61,0x67,0x51,0x74,0x6c,0x4a,0x43,0x46,0x47,0x32,0x6b,0x5a,0x31,0x77,0x4e,0x45,0x44,0x50,0x55,0x6d,0x37,0x65]),_0x16033b=0xeb829,_0x5a000f=0x5f0629ff,_0x3845c8=0x5f014697^_0x5a000f,_0x28f0a3=window[_0xea0d84([0x44,0x61,0x74,0x65])][_0xea0d84([0x6e,0x6f,0x77])](),_0x18fcca=_0x1d906e[_0xea0d84([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x444ec6=new window[(_0xea0d84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x23320f=>{_0x18fcca[_0xea0d84([0x6f,0x6e,0x63,0x65])](_0xea0d84([0x72,0x65,0x61,0x64,0x79]),_0x23320f);}),_0x528d1f={[_0xea0d84([0x6b,0x74,0x79])]:_0xea0d84([0x45,0x43]),[_0xea0d84([0x75,0x73,0x65])]:_0xea0d84([0x73,0x69,0x67]),[_0xea0d84([0x63,0x72,0x76])]:_0xea0d84([0x50,0x2d,0x32,0x35,0x36]),[_0xea0d84([0x78])]:_0xea0d84([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]),[_0xea0d84([0x79])]:_0xea0d84([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]),[_0xea0d84([0x61,0x6c,0x67])]:_0xea0d84([0x45,0x53,0x32,0x35,0x36])},_0x12938b=_0x18fcca[_0xea0d84([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xea0d84([0x67,0x65,0x74])](_0xea0d84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1f634e(){let _0x3e6bfb,_0x313431=null,_0x3e21ef=null;try{if(_0x12938b==_0xea0d84([0x47,0x50,0x4c]))return _0xea0d84([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3e6bfb=_0x384b72(),!_0x3e6bfb)return _0xea0d84([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3e6bfb[_0xea0d84([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3e21ef=_0x28c31b(_0x3e6bfb[_0xea0d84([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3e6bfb[_0xea0d84([0x6a,0x74,0x69])])),await _0x5e9bc6()?_0x28434a()?_0x240331()?_0xea0d84([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x17d4c1()?(_0x3e6bfb[_0xea0d84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xea0d84([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x313431=_0x4200ec(_0xea0d84([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3e6bfb[_0xea0d84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xea0d84([0x74,0x72,0x69,0x61,0x6c])&&(_0x313431=_0x4200ec(_0xea0d84([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3e6fdb()):_0xea0d84([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xea0d84([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xea0d84([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xea0d84([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x240331(){const _0x23830f=[_0xea0d84([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xea0d84([0x74,0x72,0x69,0x61,0x6c])][_0xea0d84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3e6bfb[_0xea0d84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x28f0a3/0x3e8:0xe10*_0x3845c8;return _0x3e6bfb[_0xea0d84([0x65,0x78,0x70])]<_0x23830f;}function _0x28434a(){const _0x420491=_0x3e6bfb[_0xea0d84([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x420491)return!0x1;if(_0x420491[_0xea0d84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xea0d84([0x2a])))return!0x0;if(_0x420491[_0xea0d84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xea0d84([0x52,0x48])))return!0x0;if(_0x420491[_0xea0d84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xea0d84([0x52,0x52,0x48]))){if(_0x17ff59())return!0x0;if(_0xdea8fd()||_0x255aa5())return!0x0;}return!0x1;}function _0x17d4c1(){const _0x29c283=_0x3e6bfb[_0xea0d84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x29c283||0x0==_0x29c283[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x576f50}=new URL(window[_0xea0d84([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x29c283[_0xea0d84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x576f50))return!0x0;const _0x4749fd=_0x576f50[_0xea0d84([0x73,0x70,0x6c,0x69,0x74])](_0xea0d84([0x2e]));return _0x29c283[_0xea0d84([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3e2b1f=>_0x3e2b1f[_0xea0d84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xea0d84([0x2a])))[_0xea0d84([0x6d,0x61,0x70])](_0x3fa853=>_0x3fa853[_0xea0d84([0x73,0x70,0x6c,0x69,0x74])](_0xea0d84([0x2e])))[_0xea0d84([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf9e167=>_0xf9e167[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4749fd[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xea0d84([0x6d,0x61,0x70])](_0x2cd8a6=>Array(_0x4749fd[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2cd8a6[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xea0d84([0x66,0x69,0x6c,0x6c])](_0x2cd8a6[0x0]===_0xea0d84([0x2a])?_0xea0d84([0x2a]):'')[_0xea0d84([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2cd8a6))[_0xea0d84([0x73,0x6f,0x6d,0x65])](_0x3e1970=>_0x4749fd[_0xea0d84([0x65,0x76,0x65,0x72,0x79])]((_0x470089,_0x1503b5)=>_0x3e1970[_0x1503b5]===_0x470089||_0x3e1970[_0x1503b5]===_0xea0d84([0x2a])));}function _0x3e6fdb(){return _0x313431&&_0x3e21ef?new window[(_0xea0d84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x9b7982,_0x26a109)=>{_0x313431[_0xea0d84([0x74,0x68,0x65,0x6e])](_0x9b7982,_0x26a109),_0x3e21ef[_0xea0d84([0x74,0x68,0x65,0x6e])](_0x480fd5=>{_0x480fd5!=_0xea0d84([0x56,0x61,0x6c,0x69,0x64])&&_0x9b7982(_0x480fd5);},_0x26a109);}):_0x313431||_0x3e21ef||_0xea0d84([0x56,0x61,0x6c,0x69,0x64]);}}function _0x28c31b(_0x1d75e7,_0x3dbb0b){return new window[(_0xea0d84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31976f=>{if(_0xd270a2())return _0x31976f(_0xea0d84([0x56,0x61,0x6c,0x69,0x64]));_0x19ae49(),_0x18fcca[_0xea0d84([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xea0d84([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x16357a=!0x1;const _0x209980=_0x4de09f();function _0x27b697(_0x28f553){return!!_0x28f553&&(typeof _0x28f553===_0xea0d84([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x28f553===_0xea0d84([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x28f553[_0xea0d84([0x74,0x68,0x65,0x6e])]===_0xea0d84([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x28f553[_0xea0d84([0x63,0x61,0x74,0x63,0x68])]===_0xea0d84([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x21d282(_0x3e428c){_0x249820(_0x3e428c)[_0xea0d84([0x74,0x68,0x65,0x6e])](_0x5c18f7=>{if(!_0x5c18f7||_0x5c18f7[_0xea0d84([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xea0d84([0x6f,0x6b]))return _0xea0d84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x139243(_0x2713d9(_0x209980+_0x3dbb0b))!=_0x5c18f7[_0xea0d84([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xea0d84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xea0d84([0x56,0x61,0x6c,0x69,0x64]);})[_0xea0d84([0x74,0x68,0x65,0x6e])](_0x5570cc=>(_0x29cb4b(),_0x5570cc),()=>{const _0x5703e8=_0x172c06();return null==_0x5703e8?(_0x29cb4b(),_0xea0d84([0x56,0x61,0x6c,0x69,0x64])):_0xea0d84(_0x28f0a3-_0x5703e8>(0x7b0aadff^_0x5a000f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xea0d84([0x74,0x68,0x65,0x6e])](_0x31976f)[_0xea0d84([0x63,0x61,0x74,0x63,0x68])](()=>{_0x31976f(_0xea0d84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1329eb=0x5f30c77f^_0x5a000f;function _0x29cb4b(){const _0x3a6397=_0xea0d84([0x6c,0x6c,0x63,0x74,0x2d])+_0x139243(_0x2713d9(_0x1d75e7)),_0x5d9608=_0x526833(_0x139243(window[_0xea0d84([0x4d,0x61,0x74,0x68])][_0xea0d84([0x63,0x65,0x69,0x6c])](_0x28f0a3/_0x1329eb)));window[_0xea0d84([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xea0d84([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3a6397,_0x5d9608);}function _0x172c06(){const _0x413395=_0xea0d84([0x6c,0x6c,0x63,0x74,0x2d])+_0x139243(_0x2713d9(_0x1d75e7)),_0x83b522=window[_0xea0d84([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xea0d84([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x413395);return _0x83b522?window[_0xea0d84([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x526833(_0x83b522),0x10)*_0x1329eb:null;}function _0x249820(_0x3cee97){return new window[(_0xea0d84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3e2bf6,_0x452b30)=>{_0x3cee97[_0xea0d84([0x74,0x68,0x65,0x6e])](_0x3e2bf6,_0x452b30),window[_0xea0d84([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x452b30,0x5f07fd3f^_0x5a000f);});}}_0x18fcca[_0xea0d84([0x6f,0x6e])](_0xea0d84([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x36a46b,_0x24fb13)=>{if(_0x24fb13[0x0]!=_0x1d75e7)return _0x31976f(_0xea0d84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x24fb13[0x1]={..._0x24fb13[0x1],[_0xea0d84([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x209980};},{[_0xea0d84([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xea0d84([0x68,0x69,0x67,0x68])}),_0x18fcca[_0xea0d84([0x6f,0x6e])](_0xea0d84([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x214999=>{_0x27b697(_0x214999[_0xea0d84([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x16357a=!0x0,_0x21d282(_0x214999[_0xea0d84([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xea0d84([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xea0d84([0x6c,0x6f,0x77])}),_0x444ec6[_0xea0d84([0x74,0x68,0x65,0x6e])](()=>{_0x16357a||_0x31976f(_0xea0d84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xd270a2(){return _0x18fcca[_0xea0d84([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xea0d84([0x76,0x69,0x65,0x77])][_0xea0d84([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xea0d84([0x61,0x75,0x74,0x6f]);}function _0x19ae49(){_0x18fcca[_0xea0d84([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xea0d84([0x76,0x69,0x65,0x77])][_0xea0d84([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xea0d84([0x61,0x75,0x74,0x6f]);}}function _0x4200ec(_0x330a0e){const _0x167058=[new window[(_0xea0d84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55f052=>setTimeout(_0x55f052,0x5f0f1733^_0x5a000f)),_0x444ec6[_0xea0d84([0x74,0x68,0x65,0x6e])](()=>new window[(_0xea0d84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x452319=>{const _0x5800b4=0x5f0629f8^_0x5a000f,_0xdde71a=_0x1d906e[_0xea0d84([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x7d1a24(){_0xdde71a[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x5800b4&&_0x452319();}_0x7d1a24(),_0xdde71a[_0xea0d84([0x6f,0x6e])](_0xea0d84([0x61,0x64,0x64]),_0x7d1a24);})),new window[(_0xea0d84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3db4f2=>{function _0x4c98e4(){for(const _0xc26710 in window)if(window[_0xea0d84([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0xea0d84([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0xc26710))&&window[_0xc26710]==_0x16033b)return _0x3db4f2();_0x18fcca[_0xea0d84([0x73,0x74,0x61,0x74,0x65])]!=_0xea0d84([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0xea0d84([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4c98e4,0x5f063a77^_0x5a000f);}_0x2af29a(_0xea0d84([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x4c98e4();})];return window[_0xea0d84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xea0d84([0x72,0x61,0x63,0x65])](_0x167058)[_0xea0d84([0x74,0x68,0x65,0x6e])](()=>_0x330a0e);}async function _0x396d0e(){if(await _0x444ec6,_0x2af29a(_0xea0d84([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x258994=_0x1d906e[_0xea0d84([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x19bdb1=_0x1d906e[_0xea0d84([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])](_0x258994[_0xea0d84([0x69,0x64])]),_0x20faac=_0x342ea1(_0xea0d84([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x20faac[_0xea0d84([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x258994['id'],_0x19bdb1?_0x19bdb1['id']:null,!0x0),_0x20faac[_0xea0d84([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0xea0d84([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x20faac[_0xea0d84([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x20faac[_0xea0d84([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x2053b3,void(_0x20faac[_0xea0d84([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x2053b3);}if(_0x2af29a(_0xea0d84([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x5d2df0=_0x342ea1(_0xea0d84([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x5d2df0[_0xea0d84([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0xea0d84([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5d2df0[_0xea0d84([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5d2df0[_0xea0d84([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x2053b3,_0x5d2df0[_0xea0d84([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x2053b3;}_0x18fcca[_0xea0d84([0x6d,0x6f,0x64,0x65,0x6c])][_0xea0d84([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2053b3,_0x18fcca[_0xea0d84([0x6d,0x6f,0x64,0x65,0x6c])][_0xea0d84([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2053b3,_0x18fcca[_0xea0d84([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xea0d84([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x17ff59(){return _0x2af29a(_0xea0d84([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x342ea1(_0xea0d84([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xea0d84([0x73,0x74,0x61,0x74,0x65])]==_0xea0d84([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xdea8fd(){return _0x2af29a(_0xea0d84([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 _0x255aa5(){return _0x2af29a(_0xea0d84([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x597610(_0x1eb7ab){const _0x343f11=_0x360cb9();_0x18fcca[_0x343f11]=_0xea0d84([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])+_0x1eb7ab,_0x1eb7ab[_0xea0d84([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0xea0d84([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x360cb9()]=_0x16033b),_0x1eb7ab!=_0xea0d84([0x56,0x61,0x6c,0x69,0x64])&&_0x396d0e();}function _0x360cb9(){const _0x9cb004=window[_0xea0d84([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xea0d84([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xea0d84([0x6e,0x6f,0x77])]())[_0xea0d84([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xea0d84([0x2e]),'');let _0x1f2a5c=_0xea0d84([0x4c]);for(let _0x2c419d=0x0;_0x2c419d<_0x9cb004[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2c419d+=0x2){let _0x4e4b5e=window[_0xea0d84([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x9cb004[_0xea0d84([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2c419d,_0x2c419d+0x2));_0x4e4b5e>=_0x192a4e[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4e4b5e-=_0x192a4e[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1f2a5c+=_0x192a4e[_0x4e4b5e];}return _0x1f2a5c;}function _0x384b72(){const _0x27da0e=_0x12938b[_0xea0d84([0x73,0x70,0x6c,0x69,0x74])](_0xea0d84([0x2e]));if(0x3!=_0x27da0e[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2bc8c3(_0x27da0e[0x1]);function _0x2bc8c3(_0x5b4adb){const _0x405c61=_0x2ea874(_0x5b4adb);return _0x405c61&&_0x1f45ea()?_0x405c61:null;function _0x1f45ea(){const _0x14d012=_0x405c61[_0xea0d84([0x6a,0x74,0x69])],_0x3bcd2d=window[_0xea0d84([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x14d012[_0xea0d84([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x14d012[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x17aa9e={..._0x405c61,[_0xea0d84([0x6a,0x74,0x69])]:_0x14d012[_0xea0d84([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x14d012[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x17aa9e[_0xea0d84([0x76,0x63])],_0x2713d9(_0x17aa9e)==_0x3bcd2d;}}}async function _0x5e9bc6(){let _0xf8bfb9=!0x0;try{const _0x50318d=_0x12938b[_0xea0d84([0x73,0x70,0x6c,0x69,0x74])](_0xea0d84([0x2e])),[_0x5584eb,_0x3f3041,_0x29438c]=_0x50318d;return _0x89525d(_0x5584eb),await _0x1eedfc(_0x5584eb,_0x3f3041,_0x29438c),_0xf8bfb9;}catch{return!0x1;}function _0x89525d(_0x2fec29){const _0x2be719=_0x2ea874(_0x2fec29);_0x2be719&&_0x2be719[_0xea0d84([0x61,0x6c,0x67])]==_0xea0d84([0x45,0x53,0x32,0x35,0x36])||(_0xf8bfb9=!0x1);}async function _0x1eedfc(_0x5973e3,_0x2a9b04,_0x5dec39){const _0x5eea24=window[_0xea0d84([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xea0d84([0x66,0x72,0x6f,0x6d])](_0x44c964(_0x5dec39),_0x18db43=>_0x18db43[_0xea0d84([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1a3120=new window[(_0xea0d84([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xea0d84([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5973e3+_0xea0d84([0x2e])+_0x2a9b04),_0x1f2215=window[_0xea0d84([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xea0d84([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1f2215)return;const _0x4322f1=await _0x1f2215[_0xea0d84([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xea0d84([0x6a,0x77,0x6b]),_0x528d1f,{[_0xea0d84([0x6e,0x61,0x6d,0x65])]:_0xea0d84([0x45,0x43,0x44,0x53,0x41]),[_0xea0d84([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xea0d84([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xea0d84([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1f2215[_0xea0d84([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xea0d84([0x6e,0x61,0x6d,0x65])]:_0xea0d84([0x45,0x43,0x44,0x53,0x41]),[_0xea0d84([0x68,0x61,0x73,0x68])]:{[_0xea0d84([0x6e,0x61,0x6d,0x65])]:_0xea0d84([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4322f1,_0x5eea24,_0x1a3120)||(_0xf8bfb9=!0x1);}}function _0x2ea874(_0x4a5f73){return _0x4a5f73[_0xea0d84([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xea0d84([0x65,0x79]))?JSON[_0xea0d84([0x70,0x61,0x72,0x73,0x65])](_0x44c964(_0x4a5f73)):null;}function _0x44c964(_0x4a731f){return window[_0xea0d84([0x61,0x74,0x6f,0x62])](_0x4a731f[_0xea0d84([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xea0d84([0x2b]))[_0xea0d84([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xea0d84([0x2f])));}function _0x2713d9(_0x53cd52){let _0x20484b=0x1505;function _0x277c8f(_0x415b66){for(let _0x11eb77=0x0;_0x11eb77<_0x415b66[_0xea0d84([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x11eb77++){const _0x145a83=_0x415b66[_0xea0d84([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x11eb77);_0x20484b=(_0x20484b<<0x5)+_0x20484b+_0x145a83,_0x20484b&=_0x20484b;}}function _0x403bba(_0x1b9cd3){Array[_0xea0d84([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1b9cd3)?_0x1b9cd3[_0xea0d84([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x403bba):_0x1b9cd3&&typeof _0x1b9cd3==_0xea0d84([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xea0d84([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1b9cd3)[_0xea0d84([0x73,0x6f,0x72,0x74])]()[_0xea0d84([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x39aa28,_0xfc12f7])=>{_0x277c8f(_0x39aa28),_0x403bba(_0xfc12f7);}):_0x277c8f(window[_0xea0d84([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1b9cd3));}return _0x403bba(_0x53cd52),_0x20484b>>>0x0;}function _0x139243(_0x49291f){return _0x49291f[_0xea0d84([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xea0d84([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xea0d84([0x30]));}function _0x526833(_0x57778c){return _0x57778c[_0xea0d84([0x73,0x70,0x6c,0x69,0x74])]('')[_0xea0d84([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xea0d84([0x6a,0x6f,0x69,0x6e])]('');}function _0x2af29a(_0xc3f38e){return _0x18fcca[_0xea0d84([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xea0d84([0x68,0x61,0x73])](_0xc3f38e);}function _0x342ea1(_0x4ff8dc){return _0x18fcca[_0xea0d84([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xea0d84([0x67,0x65,0x74])](_0x4ff8dc);}function _0x2053b3(){}function _0xea0d84(_0x3686c8){return _0x3686c8['map'](_0x4a6735=>String['fromCharCode'](_0x4a6735))['join']('');}_0x597610(await _0x1f634e());}(this);}['createRevision'](_0x2e23ce){const _0x4c5ea0=this['editor']['plugins']['get']('Users');return new I({'id':_0x2e23ce['id'],'name':_0x2e23ce['name'],'creator':_0x2e23ce['creatorId']?_0x4c5ea0['getUser'](_0x2e23ce['creatorId']):null,'diffData':_0x2e23ce['diffData']||_0x2e23ce['data'],'authors':_0x2e23ce['authorsIds']['map'](_0x440771=>_0x4c5ea0['getUser'](_0x440771)),'createdAt':new Date(_0x2e23ce['createdAt']),'attributes':_0x2e23ce['attributes'],'fromVersion':_0x2e23ce['fromVersion'],'toVersion':_0x2e23ce['toVersion']});}['addRevision'](_0x2bcff9,_0x212028=0x0){this['_revisions']['add'](_0x2bcff9,_0x212028);}['getRevision'](_0x147732){return this['_revisions']['get'](_0x147732);}['getRevisions'](_0x3b4706={'toJSON':!0x1}){const _0x90d76c=Array['from'](this['_revisions']);return _0x90d76c['reverse'](),_0x3b4706['toJSON']?_0x90d76c['map'](_0x26a51a=>_0x26a51a['toJSON']()):_0x90d76c;}['getIndex'](_0x30232f){return this['_revisions']['getIndex'](_0x30232f);}['getEarlierVisibleRevision'](_0x4b7534){const [,_0x34e56f]=this['getRevisionsIterator'](_0x4b7534,{'direction':'earlier'});return _0x34e56f;}['getLaterVisibleRevision'](_0x4205a0){const [,_0x5d0747]=this['getRevisionsIterator'](_0x4205a0,{'direction':'later'});return _0x5d0747;}['getRevisionsInDiff'](_0x5b4a55){const _0x3abd83=[];for(const _0x1e34cc of this['getRevisionsIterator'](_0x5b4a55['newRevisionId']))if(_0x3abd83['push'](_0x1e34cc),_0x1e34cc['id']===_0x5b4a55['oldRevisionId'])break;return _0x3abd83;}*['getRevisionsIterator'](_0x4320c5,{direction:_0x39b283='earlier',filter:_0x4ef5a0=()=>!0x0}={}){const _0x16affb='earlier'===_0x39b283?0x1:-0x1;let _0x70ce60=this['_revisions']['get'](_0x4320c5),_0x51fb1d=this['getIndex'](_0x70ce60);for(yield _0x70ce60;_0x70ce60;){if(_0x51fb1d+=_0x16affb,_0x70ce60=this['getRevision'](_0x51fb1d),!_0x70ce60)return;_0x4ef5a0(_0x70ce60)&&(yield _0x70ce60);}}}class $ extends _0x5e8bcb{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x43fe3e,'c'],[_0x2d96e4,'a'],[_0x15fce2,'e'],[_0x375b39,'r'],[_0x5e9b8d,'u']]);['_typeCharToViewClass']=new Map([['c',_0x43fe3e],['a',_0x2d96e4],['e',_0x15fce2],['r',_0x375b39],['u',_0x5e9b8d]]);async['loadRevisionData'](_0x37c466,_0x27bb80){if(_0x37c466['diffData']||!_0x27bb80)return;const _0xa1ea97=this['editor']['config']['get']('collaboration.channelId'),_0xa345da=await _0x27bb80['getRevision']({'channelId':_0xa1ea97,'revisionId':_0x37c466['id']});_0x37c466['diffData']=_0xa345da['diffData'];}['getRevisionDocumentData'](_0x43c50b){const _0x57bd16={};for(const _0x22bb9c in _0x43c50b['diffData']){if(_0x43c50b['diffData'][_0x22bb9c]['attachChange']&&!_0x43c50b['diffData'][_0x22bb9c]['attachChange']['isAttached'])continue;const _0xd313a3=this['_removeRevisionMarkers'](JSON['parse'](_0x43c50b['diffData'][_0x22bb9c]['insertions'])),_0x4cf477=this['editor']['editing']['view']['document'],_0x4c8bbb=new _0x2d289e(_0x4cf477,_0xd313a3['map'](_0x1997f5=>this['_getViewFromDiffObj'](_0x1997f5,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x57bd16[_0x22bb9c]=this['editor']['data']['processor']['toData'](_0x4c8bbb),this['editor']['data']['processor']['useFillerType']('default');}return _0x57bd16;}['getRevisionRootsAttributes'](_0x48cb7a){const _0x590989={};for(const _0x29cb8c in _0x48cb7a['diffData'])_0x48cb7a['diffData'][_0x29cb8c]['attachChange']&&!_0x48cb7a['diffData'][_0x29cb8c]['attachChange']['isAttached']||(_0x590989[_0x29cb8c]=_0x48cb7a['diffData'][_0x29cb8c]['attributesAfter']||{});return _0x590989;}['_getTypeCharForViewElement'](_0x463c23){return this['_viewClassToTypeChar']['get'](_0x463c23['constructor']);}['_getViewFromDiffObj'](_0x1e5c8b,_0x530a52){const _0x13e7b5=this['editor']['editing']['view']['document'];if('string'==typeof _0x1e5c8b)return new _0x578e61(_0x13e7b5,_0x1e5c8b);{let _0x37378f,_0xd2b6f7;_0xd2b6f7='u'==_0x1e5c8b['type']||'r'==_0x1e5c8b['type']?[]:_0x1e5c8b['children']['map'](_0xaecfe7=>this['_getViewFromDiffObj'](_0xaecfe7,_0x530a52));const _0x1fb440=this['_typeCharToViewClass']['get'](_0x1e5c8b['type'])||_0x2fe4da,_0x534ad4=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x37378f=new _0x1fb440(_0x13e7b5,_0x1e5c8b['name'],_0x1e5c8b['attributes'],_0xd2b6f7),'u'==_0x1e5c8b['type']&&_0x1e5c8b['children'][0x0]){const _0x44b189=_0x1e5c8b['children'][0x0];if(_0x37378f['render']=function(_0x5736b1){const _0x533b48=_0x5736b1['createElement']('div');return _0x533b48['innerHTML']=_0x44b189,_0x533b48['childNodes'][0x0];},_0x530a52){const _0x3ed2f3=new _0x2d289e(_0x13e7b5);_0x3ed2f3['_appendChild'](_0x37378f);const _0xc2dc1a=Array['from'](_0x534ad4['viewChildrenToDom'](_0x3ed2f3,{'bind':!0x1})),_0x4cd4c8=_0x534ad4['domDocument']['createElement']('div');_0x4cd4c8['append'](..._0xc2dc1a),_0x37378f=Array['from'](_0x534ad4['domChildrenToView'](_0x4cd4c8))[0x0];}}else{if('r'==_0x1e5c8b['type']&&_0x1e5c8b['children'][0x0]){const _0x1c6de0=_0x1e5c8b['children'][0x0];if(_0x37378f['render']=function(_0x51ffb8){_0x51ffb8['innerHTML']=_0x1c6de0;},_0x530a52){const _0x41f947=new _0x2d289e(_0x13e7b5);_0x41f947['_appendChild'](_0x37378f);const _0x1030ea=Array['from'](_0x534ad4['viewChildrenToDom'](_0x41f947,{'bind':!0x1})),_0x46f663=_0x534ad4['domDocument']['createElement']('div');_0x46f663['append'](..._0x1030ea);const _0x23c1df=Array['from'](_0x534ad4['domChildrenToView'](_0x46f663));_0x23c1df['length']>0x1?_0x37378f['_appendChild'](_0x23c1df):_0x37378f=_0x23c1df[0x0];}}}if(_0x1e5c8b['customProperties']){for(const [_0x457d7d,_0x538711]of _0x1e5c8b['customProperties'])_0x37378f['_setCustomProperty'](_0x457d7d,_0x538711);}const _0x1d2980=void 0x0===_0x1e5c8b['fillerOffset']?null:_0x1e5c8b['fillerOffset'];return null!==_0x1d2980&&(_0x37378f['getFillerOffset']=()=>_0x1d2980),_0x37378f;}}['_makeModelFromViewString'](_0x1a1a95){const _0x4cc3d0=JSON['parse'](_0x1a1a95),_0x5ab087=this['editor']['editing']['view']['document'],_0x69500c=new _0x2d289e(_0x5ab087,_0x4cc3d0['map'](_0xfb5056=>this['_getViewFromDiffObj'](_0xfb5056,!0x0)));return this['editor']['data']['toModel'](_0x69500c);}['_removeRevisionMarkers'](_0x349586){return(_0x349586=_0x349586['filter'](_0x48a98d=>!_0x48a98d['name']||'revision-start'!==_0x48a98d['name']&&'revision-end'!==_0x48a98d['name']))['forEach'](_0x1b625e=>{'string'!=typeof _0x1b625e&&(_0x1b625e['children']=this['_removeRevisionMarkers'](_0x1b625e['children']),_0x1b625e['attributes']=_0x1b625e['attributes']['filter'](_0x2af81b=>!_0x2af81b[0x0]['startsWith']('data-revision-')));}),_0x349586;}}function R(_0x4403bc,_0x449c7e,_0x892cf0){const t=_0x4403bc['t'];switch(_0x449c7e){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'},_0x892cf0);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x892cf0);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x5e8bcb{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x42a9a2,S,$,_0x302a30];}constructor(_0x3d3e2f){super(_0x3d3e2f),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x1ea516=_0x4de09f();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x1ea516},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x1dfb17=this['repository']['getRevision'](0x0),_0x1ab570=_0x1dfb17&&null===_0x1dfb17['creator']?_0x1dfb17:null;if(this['_continueCurrentRevision']=!!_0x1ab570&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4e46f4=this['_source']['getCurrentRevisionId'](),_0x2c0686=this['repository']['getRevision'](_0x4e46f4);if(_0x2c0686)this['_startingVersion']=_0x2c0686['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x381115=this['_source']['history']['_operations']['find'](_0x384110=>!_0x384110['_isInit']),_0x200522=_0x381115?_0x381115['baseVersion']:this['_source']['history']['version'];_0x1dfb17?(_0x1dfb17['toVersion']<_0x200522&&_0x1dfb17['_update']({'toVersion':_0x200522}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x1ab570['id'],this['_startingVersion']=_0x1ab570['fromVersion']):(this['_startingVersion']=_0x1dfb17['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x200522,this['_continueCurrentRevision']=!0x1);}}else _0x1ab570&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x1ab570['toVersion'],this['editor']['model']['document']['history']['version']),_0x1ab570['fromVersion']===_0x1ab570['toVersion']?(0x0!==_0x1ab570['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x1ab570['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x1ab570['id'],this['_startingVersion']=_0x1ab570['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',_0x53fbc0=>!_0x53fbc0),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xc0fe4b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xd098e5;for(const _0xded78b in _0xc0fe4b){const _0x45aecf=_0xded78b,_0x43dad3=_0xc0fe4b[_0x45aecf];if('revisionHistoryLicenseKeyValid'==_0x43dad3||'revisionHistoryLicenseKeyInvalid'==_0x43dad3||'revisionHistoryLicenseKeyExpired'==_0x43dad3||'revisionHistoryLicenseKeyDomainLimit'==_0x43dad3||'revisionHistoryLicenseKeyNotAllowed'==_0x43dad3||'revisionHistoryLicenseKeyEvaluationLimit'==_0x43dad3||'revisionHistoryLicenseKeyTrialLimit'==_0x43dad3||'revisionHistoryLicenseKeyUsageLimit'==_0x43dad3){delete _0xc0fe4b[_0x45aecf],_0xd098e5=_0x43dad3,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0xd098e5&&_0xc0fe4b['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0xd098e5&&_0xc0fe4b['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0xd098e5&&_0xc0fe4b['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0xd098e5&&_0xc0fe4b['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0xd098e5&&_0xc0fe4b['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0xd098e5&&_0xc0fe4b['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0xd098e5&&_0xc0fe4b['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x303b57=this['repository']['getRevision'](0x0),_0x16615c=await this['getRevisionDocumentData'](_0x303b57),_0x25ece1=await this['getRevisionRootsAttributes'](_0x303b57);this['_replaceEditorDataWithRevisionData'](_0x16615c,_0x25ece1);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x33a39d){this['_source']=_0x33a39d;}async['update'](){const _0x2b76b6=await this['_source']['getLatestVersion']();if(_0x2b76b6>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3b7f97=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x2b76b6});_0x3b7f97['authors']=_0x3b7f97['authorsIds']['map'](_0x48ee50=>this['editor']['plugins']['get']('Users')['getUser'](_0x48ee50)),this['currentRevision']['_update'](_0x3b7f97);}}async['saveRevision'](_0x17a210={},_0x2ac268=null){const _0x760ae9=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2ac268>this['currentRevision']['toVersion']&&(_0x2ac268=null),null===_0x2ac268&&(_0x2ac268=await this['_source']['getLatestVersion']());const _0x43aa46=this['_getFromVersion'](_0x2ac268),_0x53bcce=this['buildRevisionData']({'from':_0x43aa46,'to':_0x2ac268});if(this['currentRevision']['toVersion']<_0x2ac268){const _0x130209=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2ac268,'to':_0x2ac268});_0x130209['authors']=[],_0x130209['authorsIds']=[],_0x130209['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x130209,!0x0),delete _0x130209['authors'],_0x760ae9['push'](_0x130209);}_0x17a210['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x17a210['name']=_0x17a210['name']||null,_0x17a210['id']=_0x17a210['id']||_0x4de09f(),_0x17a210={..._0x17a210,..._0x53bcce};const _0x543e0d=this['addRevisionData'](_0x17a210);_0x760ae9['push'](_0x17a210);const _0x263de1=this['repository']['getIndex'](_0x543e0d);if(0x0!==_0x263de1){const _0x431ae8=this['repository']['getRevision'](_0x263de1-0x1);if(_0x431ae8['fromVersion']!==_0x2ac268){const _0xc6d6a=this['_revisionDataBuilder']['getData'](_0x2ac268,_0x431ae8['toVersion']),_0x5bfb02={'id':_0x431ae8['id'],'diffData':_0xc6d6a['diffData'],'authorsIds':_0xc6d6a['authorsIds'],'authors':_0xc6d6a['authorsIds']['map'](_0x10d1b7=>this['editor']['plugins']['get']('Users')['getUser'](_0x10d1b7)),'fromVersion':_0x2ac268};_0x431ae8===this['currentRevision']&&(_0x5bfb02['createdAt']=new Date(_0x17a210['createdAt']['getTime']()+0xa)),_0x431ae8['_update'](_0x5bfb02,!0x0),delete _0x5bfb02['authors'],_0x760ae9['push'](_0x5bfb02);}}if(this['adapter']){for(const _0x2354ec of _0x760ae9)this['_bufferUpdate'](_0x2354ec['id'],_0x2354ec,!0x0);this['sendBufferedUpdates']();}return _0x543e0d;}['addRevisionData'](_0x11bd08){const _0x1b0532=this['repository']['createRevision'](_0x11bd08);return this['adapter']&&_0x1b0532['on']('_update',(_0x3088d7,_0x2a8894,_0x129274)=>{_0x129274||(this['_bufferUpdate'](_0x2a8894['id'],_0x2a8894,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1b0532,this['_findInsertionIndex'](_0x1b0532)),_0x1b0532;}async['getRevisionDocumentData'](_0x5c890f){return await this['_utils']['loadRevisionData'](_0x5c890f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5c890f);}async['getRevisionRootsAttributes'](_0x27e37c){return await this['_utils']['loadRevisionData'](_0x27e37c,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x27e37c);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x7794e0=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1ad204=0x0;_0x1ad204<_0x7794e0['length'];_0x1ad204++){const _0x9d0376=_0x7794e0[_0x1ad204];let _0x5c36f6=!0x1;for(const _0x4677c8 of Object['keys'](_0x9d0376))void 0x0===_0x9d0376[_0x4677c8]?delete _0x9d0376[_0x4677c8]:'id'!==_0x4677c8&&(_0x5c36f6=!0x0);_0x5c36f6||(_0x7794e0[_0x1ad204]=null);}if(_0x7794e0=_0x7794e0['filter'](_0x4fc5cb=>null!==_0x4fc5cb),!_0x7794e0['length'])return;for(let _0x5e673b=0x0;_0x5e673b<_0x7794e0['length'];_0x5e673b++){const _0x5a53f5=_0x7794e0[_0x5e673b];void 0x0!==_0x5a53f5['fromVersion']&&void 0x0===_0x5a53f5['toVersion']&&(_0x5a53f5['toVersion']=this['repository']['getRevision'](_0x5a53f5['id'])['toVersion']),void 0x0!==_0x5a53f5['toVersion']&&void 0x0===_0x5a53f5['fromVersion']&&(_0x5a53f5['fromVersion']=this['repository']['getRevision'](_0x5a53f5['id'])['fromVersion']);}const _0x218873=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x7794e0,_0x218873)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x22d816=>{if(_0x22d816){for(const _0x399207 of _0x22d816)this['setRevisionData']({'id':_0x399207['id'],'createdAt':_0x399207['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x2e2b52=null,from:_0x552fe2=null,to:_0x1b6f54=null}){_0x552fe2=null!==_0x552fe2?_0x552fe2:_0x2e2b52['fromVersion'],_0x1b6f54=null!==_0x1b6f54?_0x1b6f54:_0x2e2b52['toVersion'];const _0x5e1611=this['_revisionDataBuilder']['getData'](_0x552fe2,_0x1b6f54),_0x33bc0b={'diffData':_0x5e1611['diffData'],'authorsIds':_0x5e1611['authorsIds'],'fromVersion':_0x552fe2,'toVersion':_0x1b6f54};if(!_0x2e2b52||_0x1b6f54!==_0x2e2b52['toVersion']){const _0x9446b5=_0x1b6f54-0x1,_0x3ce75e=this['_source']['history']['getOperation'](_0x9446b5);_0x33bc0b['createdAt']=_0x3ce75e&&_0x3ce75e['createdAt']||new Date();}if(this['_loadedStateData']&&_0x552fe2===this['_loadedStateData']['fromVersion']){for(const _0x108d9d of this['_loadedStateData']['authors'])_0x33bc0b['authorsIds']['includes'](_0x108d9d['id'])||_0x33bc0b['authorsIds']['push'](_0x108d9d['id']);}return _0x33bc0b;}['_bufferUpdate'](_0x4e2c3a,_0x2f18fa,_0x33c60f){if(this['_bufferedUpdates']['has'](_0x4e2c3a)){const _0x56c0f3=this['_bufferedUpdates']['get'](_0x4e2c3a);_0x2f18fa=_0x33c60f?{..._0x56c0f3,..._0x2f18fa}:{..._0x2f18fa,..._0x56c0f3};}this['_bufferedUpdates']['set'](_0x4e2c3a,_0x2f18fa);}['setRevisionData'](_0x52cc4e){const _0x297722=this['repository']['getRevision'](_0x52cc4e['id']);if(_0x52cc4e['createdAt']&&(_0x52cc4e['createdAt']=new Date(_0x52cc4e['createdAt'])),_0x52cc4e['authorsIds']){const _0x2f9b9b=this['editor']['plugins']['get']('Users');_0x52cc4e['authors']=_0x52cc4e['authorsIds']['map'](_0x441a32=>_0x2f9b9b['getUser'](_0x441a32));}_0x297722['_update'](_0x52cc4e,!0x0);}['_createInitialRevision'](_0x5f257f){const _0x284ca5=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x284ca5)this['_initialRevisionId']=_0x284ca5['id'];else{const _0x271c03=!this['editor']['model']['document']['roots']['find'](_0x2074b1=>this['editor']['model']['hasContent'](_0x2074b1)),_0x4e2c40=this['editor']['plugins']['get']('Users')['me']['id'],_0x35f8df=R(this['editor']['locale'],_0x271c03?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5f257f,'to':_0x5f257f,'id':this['_initialRevisionId'],'name':_0x35f8df,'creatorId':_0x4e2c40});}}['_createCurrentRevision'](_0x3325d1){const _0x1ddffd=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1ddffd),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x3325d1,'to':_0x3325d1,'id':_0x1ddffd,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x51da44,_0x1dd994){let _0x9d8146=this['editor']['config']['get']('initialData'),_0x3f2364=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x9d8146){_0x9d8146={};for(const _0x4da8f1 of this['editor']['model']['document']['getRootNames']())_0x9d8146[_0x4da8f1]='';}if('string'==typeof _0x9d8146&&(_0x9d8146={'main':_0x9d8146}),void 0x0===_0x3f2364){_0x3f2364={};for(const _0x485f91 of this['editor']['model']['document']['getRootNames']())_0x3f2364[_0x485f91]={};}let _0x37ae20=!0x1;const _0x1b40ea=Object['keys'](_0x9d8146),_0x5b6a87=Object['keys'](_0x51da44);for(const _0x55ac72 of _0x1b40ea){if(_0x9d8146[_0x55ac72]!==_0x51da44[_0x55ac72]&&''!==_0x9d8146[_0x55ac72]['trim']()){_0x37ae20=!0x0;break;}if(!_0x4a85bd(_0x3f2364[_0x55ac72],_0x1dd994[_0x55ac72])&&Object['keys'](_0x3f2364[_0x55ac72])['length']>0x0){_0x37ae20=!0x0;break;}}_0x37ae20||(_0x37ae20=_0x5b6a87['some'](_0x49b235=>!this['editor']['model']['document']['getRoot'](_0x49b235))),_0x37ae20&&_0x29a30c('editor-initial-data-replaced-with-revision-data',{'editorData':_0x9d8146,'editorRootsAttributes':_0x3f2364,'revisionData':_0x51da44,'revisionRootsAttributes':_0x1dd994}),this['editor']['config']['set']('initialData',_0x51da44),this['editor']['config']['set']('rootsAttributes',_0x1dd994);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x134d96=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x134d96['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x3de5ec){const _0xc65212=this['repository']['getRevisions']();_0xc65212['reverse']();let _0x343016=0x0;for(;_0x343016<_0xc65212['length'];){const _0x1bb864=_0xc65212[_0x343016];if(_0x1bb864===this['currentRevision']){_0x343016++;continue;}if(_0x1bb864['id']===this['_initialRevisionId'])break;const _0x3478f6=_0x3de5ec['toVersion']-_0x1bb864['toVersion']||_0x3de5ec['fromVersion']-_0x1bb864['fromVersion'];if(_0x3478f6>0x0)break;if(_0x3478f6<0x0)_0x343016++;else{if(!_0x3de5ec['creator']&&_0x1bb864['creator'])break;if(_0x1bb864['creator']||!_0x3de5ec['creator']){if(_0x3de5ec['createdAt']>_0x1bb864['createdAt'])break;_0x343016++;}else _0x343016++;}}return _0x343016;}['_getFromVersion'](_0x502881){const _0x54da7d=this['repository']['getRevisions']();_0x54da7d['reverse'](),_0x54da7d['shift']();const _0x192105=_0x54da7d['find'](_0x51f7cf=>_0x51f7cf['toVersion']<=_0x502881)['toVersion'];return _0x192105<this['_startingVersion']?this['_startingVersion']:_0x192105;}['_makeRevision']({name:_0x57a6f2,from:_0x528065,to:_0x54784a,creatorId:_0x363bce,id:_0x5d5dca}){const _0x503c68=this['buildRevisionData']({'from':_0x528065,'to':_0x54784a});_0x503c68['name']=_0x57a6f2,_0x503c68['creatorId']=_0x363bce,_0x503c68['id']=_0x5d5dca;const _0x4c8793=this['addRevisionData'](_0x503c68);return this['adapter']&&this['_bufferUpdate'](_0x503c68['id'],_0x503c68,!0x0),_0x4c8793;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x51d1d5){this['editor']=_0x51d1d5,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'](_0x4541c8){this['source']=_0x4541c8;const _0x4b5555=new Map(),_0x2f7b54=new Map(),_0x3ebe99=this['editor']['model']['document']['roots']['map'](_0xd571aa=>_0xd571aa['rootName']);for(const _0x27fcfa of _0x3ebe99){const _0x35088b=this['editor']['model']['document']['getRoot'](_0x27fcfa),_0x30cc6f=x(_0x35088b);_0x4b5555['set'](_0x27fcfa,_0x30cc6f),_0x2f7b54['set'](_0x27fcfa,Object['fromEntries'](_0x35088b['getAttributes']()));}const _0xd80bc6=Array['from'](this['editor']['model']['markers'])['map'](_0x112191=>[_0x112191['name'],_0x112191['getRange']()]),_0x588f80=this['source']['version'];this['_saveMetaData'](_0x588f80,_0x4b5555,_0xd80bc6,_0x2f7b54),this['_startingRevisionId']=this['_revisionId'];const _0x431874=new Map(),_0x3ac1b6=new Map();for(const _0x6d796e of _0x3ebe99){const _0x196bd8=N(_0x6d796e);_0x431874['set'](_0x6d796e,_0x196bd8),_0x3ac1b6['set'](_0x6d796e,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x431874,[],_0x3ac1b6);}['getData'](_0x7971eb,_0x320ccf){if(this['_lastFrom']===_0x7971eb&&this['_lastTo']<=_0x320ccf)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x320ccf,!0x0);else{if(!this['_savedMetaData']['has'](_0x7971eb)){const _0x5b5f9a=this['_getPreviousFrom'](_0x7971eb);this['_calculateMetaData'](_0x5b5f9a,_0x7971eb,!0x1);}this['_calculateMetaData'](_0x7971eb,_0x320ccf,!0x0);}return this['_lastFrom']=_0x7971eb,this['_lastTo']=_0x320ccf,this['_getState']();}['loadState'](_0x30707c){const _0x323071=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x30707c['fromVersion'],this['_lastTo']=_0x30707c['toVersion'];for(const _0x50518c in _0x30707c['diffData']){const _0x3751c2=_0x30707c['diffData'][_0x50518c]['attachChange'],_0x518906=_0x2f320b(_0x30707c['diffData'][_0x50518c]['attributesBefore'])||{},_0x1fab41=_0x323071['_makeModelFromViewString'](_0x30707c['diffData'][_0x50518c]['deletions']);_0x1fab41['rootName']=_0x50518c,_0x1fab41['_isAttached']=!_0x3751c2||!_0x3751c2['isAttached'],_0x1fab41['isAttached']=()=>_0x1fab41['_isAttached'],this['_baseRoots']['set'](_0x50518c,_0x1fab41),this['_baseRootsAttributes']['set'](_0x50518c,_0x518906),_0x3751c2&&this['_touchedRoots']['set'](_0x50518c,_0x3751c2);const _0x373fb0=this['_makeIdsRoot'](_0x1fab41);this['_baseIdsRoots']['set'](_0x50518c,_0x373fb0);for(const [_0x1bdf81,_0x2d7208]of _0x1fab41['markers']){if(!_0x1bdf81['startsWith']('revision:'))continue;const _0x49d7fa=_0x1bdf81['split'](':')[0x2];for(const _0x35a9bf of _0x2d7208['getWalker']({'singleCharacters':!0x0})){const _0x519dcd=this['_getVidAttributeName'](_0x35a9bf),_0x580fb7='elementEnd'==_0x35a9bf['type']?_0x35a9bf['previousPosition']['path']['slice'](0x0,-0x1):_0x35a9bf['previousPosition']['path'],_0x4943a9=_0x373fb0['getNodeByPath'](_0x580fb7)['getAttribute'](_0x519dcd);this['_touched']['set'](_0x4943a9,{'userId':_0x49d7fa});}}}this['_startingRevisionId']=this['_revisionId'];const _0x38c41e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x388cb2=>!this['_touched']['has'](_0x388cb2));let _0xe35485=0x0;const _0x2ec305=new Map();for(const _0x3eff31 in _0x30707c['diffData']){const _0x52aac8=_0x30707c['diffData'][_0x3eff31]['attachChange'],_0x1dc42e=_0x2f320b(_0x30707c['diffData'][_0x3eff31]['attributesAfter'])||{},_0x410167=_0x323071['_makeModelFromViewString'](_0x30707c['diffData'][_0x3eff31]['insertions']);_0x410167['rootName']=_0x3eff31,_0x410167['_isAttached']=!_0x52aac8||_0x52aac8['isAttached'],_0x410167['isAttached']=()=>_0x410167['_isAttached'],this['_diffRoots']['set'](_0x3eff31,_0x410167),this['_diffRootsAttributes']['set'](_0x3eff31,_0x1dc42e);const _0x22f5db=this['_makeIdsRoot'](_0x410167,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x3eff31,_0x22f5db),_0x2ec305['set'](_0x3eff31,_0x410167['isAttached']()?_0x1dc42e:{});for(const [_0x7b1ac8,_0x21f126]of _0x410167['markers']){if(!_0x7b1ac8['startsWith']('revision:'))continue;const _0x52c652=_0x7b1ac8['split'](':')[0x2];for(const _0x2bf3c0 of _0x21f126['getWalker']({'singleCharacters':!0x0})){const _0x59f425=this['_getVidAttributeName'](_0x2bf3c0),_0x4485d6=this['_revisionId']++,_0x5d0274='elementEnd'==_0x2bf3c0['type']?_0x2bf3c0['previousPosition']['path']['slice'](0x0,-0x1):_0x2bf3c0['previousPosition']['path'];_0x22f5db['getNodeByPath'](_0x5d0274)['_setAttribute'](_0x59f425,_0x4485d6),this['_touched']['set'](_0x4485d6,{'userId':_0x52c652});}}for(const _0x4af693 of this['editor']['model']['createRangeIn'](_0x410167)['getWalker']({'singleCharacters':!0x0})){const _0x21b809=this['_getVidAttributeName'](_0x4af693),_0x4c3021='elementEnd'==_0x4af693['type']?_0x4af693['previousPosition']['path']['slice'](0x0,-0x1):_0x4af693['previousPosition']['path'],_0x3a9061=_0x22f5db['getNodeByPath'](_0x4c3021);_0x3a9061['getAttribute'](_0x21b809)>0x0||_0x3a9061['_setAttribute'](_0x21b809,_0x38c41e[_0xe35485++]);}for(const [_0x5655ab,_0x582de9]of _0x410167['markers'])_0x5655ab['startsWith']('revision:')||this['_markers']['set'](_0x5655ab,_0x582de9);}const _0x1225c7=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x1225c7),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1225c7,0x1));const _0x2cf8f8=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x2cf8f8),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2cf8f8,0x1));const _0x40e442=Array['from'](this['_diffRoots'])['map'](([_0x2cb2be,_0x106005])=>[_0x2cb2be,x(_0x106005)]);this['_saveMetaData'](this['_lastTo'],_0x40e442,this['_markers'],_0x2ec305);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1ca2f0,_0x40d40f,_0x6ba1ff,_0x282910){const _0x5f2eb0=new Map(_0x40d40f),_0xed7b75=new Map(_0x2f320b(_0x282910)),_0x1887ef=new Map();for(const [_0x177b56,_0x23626a]of _0x6ba1ff)_0x1887ef['set'](_0x177b56,{'start':_0x23626a['start']['clone'](),'end':_0x23626a['end']['clone'](),'rootName':_0x23626a['root']['rootName']});this['_savedMetaData']['set'](_0x1ca2f0,{'roots':_0x5f2eb0,'markers':_0x1887ef,'rootsAttributes':_0xed7b75});}['_removeMetaData'](_0x37876){this['_savedMetaData']['delete'](_0x37876);}['_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'](_0x1a1648,_0x516904=null){let _0x57c269=null;_0x1a1648['is']('documentFragment')||(_0x57c269=new _0x1c89c2(_0x1a1648['name'],{'vid_start':null===_0x516904?this['_revisionId']++:_0x516904++}));const _0x5fc974=[];for(const _0x53e082 of _0x1a1648['getChildren']())if(_0x53e082['is']('element')){_0x5fc974['push'](this['_makeIdsRoot'](_0x53e082,_0x516904));const _0x218d3c=_0x5fc974[_0x5fc974['length']-0x1];null!==_0x516904&&(_0x516904=_0x218d3c['is']('element','$text')?_0x218d3c['getAttribute']('vid')+0x1:_0x218d3c['getAttribute']('vid_end')+0x1);}else{for(let _0x2f55fb=0x0;_0x2f55fb<_0x53e082['offsetSize'];_0x2f55fb++)_0x5fc974['push'](new _0x1c89c2('$text',{'vid':null===_0x516904?this['_revisionId']++:_0x516904++}));}if(_0x1a1648['is']('documentFragment')){const _0x1710a4=N(_0x1a1648['rootName']);return _0x1710a4['_insertChild'](0x0,_0x5fc974),_0x1710a4;}return _0x57c269['_setAttribute']('vid_end',null===_0x516904?this['_revisionId']++:_0x516904++),_0x57c269['_insertChild'](0x0,_0x5fc974),_0x57c269;}['_calculateMetaData'](_0x2e5543,_0x5b435c,_0x1a4418){this['_reset']();const {roots:_0x4c3f59,markers:_0x2fe465,rootsAttributes:_0x1edfe5}=this['_savedMetaData']['get'](_0x2e5543);this['_baseRoots']=new Map(_0x4c3f59),this['_baseRootsAttributes']=new Map(_0x2f320b(_0x1edfe5));for(const [_0x48f6a9,_0x4f96ae]of this['_baseRoots'])if('$graveyard'!==_0x48f6a9&&(this['_diffRoots']['set'](_0x48f6a9,x(_0x4f96ae)),this['_diffRootsAttributes']=new Map(_0x2f320b(_0x1edfe5)),_0x1a4418)){const _0x3f245c=this['_revisionId'];this['_idsRoots']['set'](_0x48f6a9,this['_makeIdsRoot'](_0x4f96ae)),this['_baseIdsRoots']['set'](_0x48f6a9,this['_makeIdsRoot'](_0x4f96ae,_0x3f245c));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x1a4418&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0xd1e567,_0x1f6aa0]of _0x2fe465){const _0x1df4b1=this['_baseRoots']['get'](_0x1f6aa0['rootName']),_0x22bb2d=this['_diffRoots']['get'](_0x1f6aa0['rootName']),_0x4872a6=new _0x35853a(this['_fixPosition'](_0x1f6aa0['start'],_0x1df4b1),this['_fixPosition'](_0x1f6aa0['end'],_0x1df4b1)),_0x45df57=this['_fixRange'](_0x4872a6,_0x22bb2d);_0x1df4b1['markers']['set'](_0xd1e567,_0x4872a6),this['_markers']['set'](_0xd1e567,_0x45df57);}this['_applyOperations'](_0x2e5543,_0x5b435c,_0x1a4418);}['_applyOperations'](_0x5a32d4,_0x140141,_0x4e3132){for(const _0x35153f of this['source']['getOperations'](_0x5a32d4,_0x140141))this['_handleOperation'](_0x35153f,_0x4e3132);for(const _0x28689c of this['_diffRoots']['values']())_0x28689c['markers']['clear']();for(const [_0x53a002,_0xb3cd77]of this['_markers']){this['_diffRoots']['get'](_0xb3cd77['root']['rootName'])['markers']['set'](_0x53a002,_0xb3cd77['clone']());}const _0x11c729=new Map(),_0x4becf5=new Map();for(const [_0x127d32,_0x36f5ba]of this['_diffRoots'])_0x11c729['set'](_0x127d32,x(_0x36f5ba)),_0x4becf5['set'](_0x127d32,this['_diffRootsAttributes']['get'](_0x127d32));this['_saveMetaData'](_0x140141,_0x11c729,this['_markers'],_0x4becf5);}['_getPreviousFrom'](_0x1c5429){const _0x2e29bb=Array['from'](this['_savedMetaData']['keys']());_0x2e29bb['sort']((_0x51f9c9,_0x5c5a45)=>_0x51f9c9-_0x5c5a45),_0x2e29bb['reverse']();for(const _0x1a35b1 of _0x2e29bb)if(_0x1a35b1<_0x1c5429)return _0x1a35b1;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x49ccfd,_0x164702){const _0x2ea0f7=Array['from'](_0x164702['markers'])['map'](([_0x3fe34b,_0x50585d])=>[_0x3fe34b,this['_fixRange'](_0x50585d,_0x49ccfd)]);_0x49ccfd['markers']=new Map(_0x2ea0f7);}['_transformMarkers'](_0x167872){for(const _0x883107 of this['_markers']['values']()){const _0x1e04a8=_0x883107['getTransformedByOperation'](_0x167872),_0x108f2b=_0x35853a['_createFromRanges'](_0x1e04a8);_0x883107['start']=_0x108f2b['start'],_0x883107['end']=_0x108f2b['end'];}}['_handleOperation'](_0x4e10fd,_0x49b070){if('addRoot'!=_0x4e10fd['type']&&'detachRoot'!=_0x4e10fd['type']){if('insert'==_0x4e10fd['type']){const _0x2b0627=_0x4e10fd['position']['root']['rootName'];this['_diffRoots']['has'](_0x2b0627)||(this['_diffRoots']['set'](_0x2b0627,N(_0x2b0627,!0x0)),this['_diffRootsAttributes']['set'](_0x2b0627,{}),_0x49b070&&this['_idsRoots']['set'](_0x2b0627,N(_0x2b0627,!0x0)));}else{if('addRootAttribute'==_0x4e10fd['type']||'removeRootAttribute'==_0x4e10fd['type']||'changeRootAttribute'==_0x4e10fd['type'])return void this['_handleRootAttributeOperation'](_0x4e10fd);'marker'==_0x4e10fd['type']&&this['_handleMarkerOperation'](_0x4e10fd);}if('marker'!==_0x4e10fd['type']){const _0x31ce55=this['_cloneOperation'](_0x4e10fd,this['_diffRoots']);_0x31ce55['_execute'](),this['_transformMarkers'](_0x31ce55);}if(_0x49b070)switch(_0x4e10fd['type']){case'insert':this['_handleInsertOperation'](_0x4e10fd);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4e10fd);break;case'merge':this['_handleMergeOperation'](_0x4e10fd);break;case'split':this['_handleSplitOperation'](_0x4e10fd);}}else this['_handleRootOperation'](_0x4e10fd,_0x49b070);}['_cloneOperation'](_0x410ece,_0x11781b){const _0xe79459=_0x410ece['clone']();return _0xe79459['_authorId']=_0x410ece['_authorId'],this['_fixOperation'](_0xe79459,_0x11781b),_0xe79459;}['_getBaseVids'](_0x53cbbe){return _0x53cbbe['map'](_0x2c9764=>{const _0x1d781f=this['_getVidAttributeName'](_0x2c9764);return Number(_0x2c9764['item']['getAttribute'](_0x1d781f));});}['_generateTape'](_0x528359,_0x481158){if(_0x528359['is']('element','$text'))_0x481158['push']({'item':_0x528359,'type':'text'});else{_0x528359['is']('element')&&_0x481158['push']({'item':_0x528359,'type':'elementStart'});for(const _0x39b8cb of _0x528359['getChildren']())this['_generateTape'](_0x39b8cb,_0x481158);_0x528359['is']('element')&&_0x481158['push']({'item':_0x528359,'type':'elementEnd'});}return _0x481158;}['_getState'](){const _0xa6fcbd=new Map(this['_touched']),_0x41b89d=new Map(_0xa6fcbd),_0x25278a=new Map(),_0x2b61f1={'insertions':{},'deletions':{}},_0x227767={'insertions':{},'deletions':{}},_0x54075b=new Map(),_0x253fc7=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x253fc7['delete']('$graveyard');for(const _0x906a6d of _0x253fc7){const _0x5ae8ef=this['_diffRoots']['get'](_0x906a6d)||N(_0x906a6d,!0x1),_0x3567a4=this['_baseRoots']['get'](_0x906a6d)||N(_0x906a6d,!0x1);_0x5ae8ef['isAttached']()||_0x3567a4['isAttached']()?(_0x2b61f1['insertions'][_0x906a6d]=x(_0x5ae8ef),_0x2b61f1['deletions'][_0x906a6d]=x(_0x3567a4),this['_copyMarkers'](_0x2b61f1['deletions'][_0x906a6d],_0x3567a4),this['_copyMarkers'](_0x2b61f1['insertions'][_0x906a6d],_0x5ae8ef),_0x227767['insertions'][_0x906a6d]=this['_generateTape'](this['_idsRoots']['get'](_0x906a6d),[]),_0x227767['deletions'][_0x906a6d]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x906a6d)||N(_0x906a6d,!0x1),[])):_0x253fc7['delete'](_0x906a6d);}for(const _0x3dab8e of _0x253fc7){const _0x18a7a4=_0x227767['insertions'][_0x3dab8e];for(const _0x2d55a9 of _0x18a7a4){const _0x260436=this['_getVidAttributeName'](_0x2d55a9),_0x55323b=_0x2d55a9['item']['getAttribute'](_0x260436);_0x41b89d['delete'](_0x55323b),_0x55323b>=this['_startingRevisionId']&&_0x25278a['set'](_0x55323b,_0xa6fcbd['get'](_0x55323b));}}for(const _0x243dcd of _0x253fc7){const _0x30d842=_0x227767['insertions'][_0x243dcd],_0x9f3b8c=this['_getBaseVids'](_0x227767['deletions'][_0x243dcd]);let _0x49930c=0x0;for(const _0x4e1686 of _0x30d842){const _0x436aa1=this['_getVidAttributeName'](_0x4e1686),_0xd3974=_0x4e1686['item']['getAttribute'](_0x436aa1);if(!_0x25278a['has'](_0xd3974)&&!_0x54075b['has'](_0xd3974)){if(_0x41b89d['has'](_0xd3974))_0x49930c++;else{if(_0xd3974!=_0x9f3b8c[_0x49930c]){const _0x4eecb8=_0xa6fcbd['get'](_0xd3974)||_0xa6fcbd['get'](_0x9f3b8c[_0x49930c]);for(;_0xd3974!=_0x9f3b8c[_0x49930c];)_0x41b89d['has'](_0x9f3b8c[_0x49930c])||(_0x54075b['set'](_0x9f3b8c[_0x49930c],_0x4eecb8),_0xa6fcbd['set'](_0x9f3b8c[_0x49930c],_0x4eecb8)),_0x49930c++;}_0x49930c++;}}}}for(const _0x563f63 of _0x253fc7){const _0x579693=_0x227767['insertions'][_0x563f63];for(const _0x25eb63 of _0x579693){const _0x2840b8=this['_getVidAttributeName'](_0x25eb63),_0x3eca52=_0x25eb63['item']['getAttribute'](_0x2840b8);if(_0x54075b['has'](_0x3eca52)){const _0x10612f=_0x54075b['get'](_0x3eca52);_0x41b89d['has'](_0x3eca52)||_0x41b89d['set'](_0x3eca52,{..._0x10612f}),_0x25278a['set'](_0x3eca52,{..._0x10612f});}}}for(const _0x42a45e of _0x41b89d['keys']())_0x42a45e>=this['_startingRevisionId']&&_0x41b89d['delete'](_0x42a45e);const _0x1025e7=new Map();for(const _0x2ed048 of _0x253fc7){let _0x4e548a=_0x227767['insertions'][_0x2ed048];for(const _0xec5082 of _0x4e548a)if(_0xec5082['item']['is']('element','tableCell')){const _0x3947f5=this['_getVidAttributeName'](_0xec5082),_0x2999aa=_0xec5082['item']['getAttribute'](_0x3947f5);if(_0x25278a['has'](_0x2999aa)){const _0x5bdcde=_0xec5082['item']['parent']['parent']['getAttribute']('vid_start'),_0x5d1312=_0x1025e7['get'](_0x5bdcde)||new Set();_0x5d1312['add'](_0x25278a['get'](_0x2999aa)['userId']),_0x1025e7['set'](_0x5bdcde,_0x5d1312);}}_0x4e548a=_0x227767['deletions'][_0x2ed048];for(const _0x918163 of _0x4e548a)if(_0x918163['item']['is']('element','tableCell')){const _0x5bb48f=this['_getVidAttributeName'](_0x918163),_0x7e340c=_0x918163['item']['getAttribute'](_0x5bb48f);if(_0x41b89d['has'](_0x7e340c)){const _0x400b61=_0x918163['item']['parent']['parent']['getAttribute']('vid_start'),_0x1c8af3=_0x1025e7['get'](_0x400b61)||new Set();_0x1c8af3['add'](_0x41b89d['get'](_0x7e340c)['userId']),_0x1025e7['set'](_0x400b61,_0x1c8af3);}}for(const _0x2bf17d of _0x1025e7['keys']())(_0x25278a['has'](_0x2bf17d)||_0x41b89d['has'](_0x2bf17d))&&_0x1025e7['delete'](_0x2bf17d);}for(const _0x3e406f of _0x253fc7){const _0x5b5e4e=_0x227767['insertions'][_0x3e406f];let _0x595cb4=null,_0x185c33=null;for(const _0x2d06f0 of _0x5b5e4e){const _0xc50fe6=this['_getVidAttributeName'](_0x2d06f0),_0x2ba9e6=_0x2d06f0['item']['getAttribute'](_0xc50fe6),_0x52b0c7=_0x1025e7['get'](_0x2ba9e6);_0x52b0c7&&'elementStart'==_0x2d06f0['type']&&(_0x595cb4=Array['from'](_0x52b0c7)[0x0],_0x185c33=_0x2d06f0['item']['getAttribute']('vid_end')),_0x595cb4&&(_0x41b89d['set'](_0x2ba9e6,{'userId':_0x595cb4}),_0x25278a['set'](_0x2ba9e6,{'userId':_0x595cb4})),_0x2ba9e6==_0x185c33&&(_0x595cb4=null,_0x185c33=null);}}const _0x168800={},_0x3c2606=new Set();for(const _0xbc0447 of _0x253fc7){const _0x1d874b=_0x2b61f1['deletions'][_0xbc0447],_0x1e4f76=_0x2b61f1['insertions'][_0xbc0447];for(const {userId:_0x803e42}of this['_touchedMarkers']['values']())null!==_0x803e42&&_0x3c2606['add'](_0x803e42);for(const {userId:_0x293558}of this['_touchedRoots']['values']())null!==_0x293558&&_0x3c2606['add'](_0x293558);this['_markChanges'](_0x1e4f76,_0x227767['insertions'][_0xbc0447],_0x25278a,'insertion',_0x3c2606),this['_markChanges'](_0x1d874b,_0x227767['deletions'][_0xbc0447],_0x41b89d,'deletion',_0x3c2606),_0x168800[_0xbc0447]={'insertions':this['_prepareViewToSave'](_0x1e4f76),'deletions':this['_prepareViewToSave'](_0x1d874b),'attachChange':this['_touchedRoots']['get'](_0xbc0447)||null,'attributesBefore':_0x2f320b(this['_baseRootsAttributes']['get'](_0xbc0447))||{},'attributesAfter':_0x2f320b(this['_diffRootsAttributes']['get'](_0xbc0447))};}return{'diffData':_0x168800,'authorsIds':Array['from'](_0x3c2606)};}['_processRootBeforeSave'](_0x1736db){for(const [,_0x1736e0]of _0x1736db['markers']){const _0x295f4b=_0x1736e0['start']['getAncestors']()['filter'](_0x1f84db=>'tableCell'==_0x1f84db['name']);for(const _0x123d47 of _0x295f4b)0x1==_0x123d47['childCount']&&_0x123d47['getChild'](0x0)['is']('element','paragraph')&&_0x123d47['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x45df5f){this['_processRootBeforeSave'](_0x45df5f);const _0x466e18=this['editor']['data']['toView'](_0x45df5f,{}),_0x58ad71=Array['from'](_0x466e18['getChildren']())['map'](_0x5d9319=>this['_getViewJson'](_0x5d9319));return JSON['stringify'](_0x58ad71);}['_getViewJson'](_0x19cd90){if(_0x19cd90['is']('$text'))return _0x19cd90['data'];{const _0x52f379=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x17882c=_0x19cd90,_0x8bfe16=this['editor']['data']['htmlProcessor']['domConverter'],_0x16c7a1={'type':_0x52f379['_getTypeCharForViewElement'](_0x17882c),'name':_0x17882c['name'],'attributes':Array['from'](_0x17882c['getAttributes']()),'children':Array['from'](_0x17882c['getChildren']())['map'](_0x5d0515=>this['_getViewJson'](_0x5d0515))};if(_0x19cd90['is']('uiElement')&&'$comment'!=_0x19cd90['name']){const _0x2f93bc=_0x19cd90['render'](_0x8bfe16['domDocument'],_0x8bfe16);_0x16c7a1['children']['push'](_0x2f93bc['outerHTML']);}else{if(_0x19cd90['is']('rawElement')){const _0x5bef99=_0x8bfe16['domDocument']['createElement'](_0x17882c['name']);_0x19cd90['render'](_0x5bef99,_0x8bfe16),_0x16c7a1['children']['push'](_0x5bef99['innerHTML']);}}const _0x8648bb=Array['from'](_0x17882c['getCustomProperties']());_0x8648bb['length']>0x0&&(_0x16c7a1['customProperties']=_0x8648bb);const _0x481141=_0x17882c['getFillerOffset']();return null!==_0x481141&&(_0x16c7a1['fillerOffset']=_0x481141),_0x16c7a1;}}['_markChanges'](_0x31f019,_0x3d1809,_0x37bf0e,_0xb9bd8a,_0x106854){let _0x3fbd95=null,_0xd7e7a2=null,_0x741e27=0x0;const _0x329ea7=this['editor']['model'];for(let _0x458f9f=0x0;_0x458f9f<_0x3d1809['length'];_0x458f9f++){const _0x2b1e1b=this['_getVidAttributeName'](_0x3d1809[_0x458f9f]),_0x58498d=_0x3d1809[_0x458f9f]['item']['getAttribute'](_0x2b1e1b),_0x426271=_0x37bf0e['get'](_0x58498d),_0x25773e=_0x458f9f==_0x3d1809['length']-0x1;(!_0x3fbd95&&_0x426271&&(_0x3fbd95=_0x426271,_0xd7e7a2=_0x3d1809[_0x458f9f]),_0x3fbd95&&(!_0x426271||_0x426271['userId']!=_0x3fbd95['userId']))&&(_0x3167c2(_0x426271,P(_0xd7e7a2,_0x31f019,_0x329ea7),P(_0x3d1809[_0x458f9f],_0x31f019,_0x329ea7)),_0x3fbd95=_0x426271||null,_0xd7e7a2=_0x426271?_0x3d1809[_0x458f9f]:null),_0x3fbd95&&_0x25773e&&_0x3167c2(_0x426271,P(_0xd7e7a2,_0x31f019,_0x329ea7),V(_0x3d1809[_0x458f9f],_0x31f019,_0x329ea7));}function _0x3167c2(_0x48f74f,_0x42fa9c,_0x529568){const _0x587cb5=_0x3fbd95['userId'],_0x1dda9b='revision:'+_0xb9bd8a+':'+_0x587cb5+':'+_0x741e27++,_0x46808c=_0x329ea7['createRange'](_0x42fa9c,_0x529568);_0x31f019['markers']['set'](_0x1dda9b,_0x46808c),null!==_0x587cb5&&_0x106854['add'](_0x587cb5);}}['_getVidAttributeName'](_0x53177b){switch(_0x53177b['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x5e188c,_0x4bf105){_0x5e188c['baseVersion']=null;for(const _0x208f89 in _0x5e188c){const _0xb14f43=_0x5e188c[_0x208f89];if(_0xb14f43 instanceof _0x41e47c){const _0x35aee3=_0x4bf105['get'](_0xb14f43['root']['rootName']);_0x5e188c[_0x208f89]=this['_fixPosition'](_0xb14f43,_0x35aee3);}if(_0xb14f43 instanceof _0x35853a){const _0x25498e=_0x4bf105['get'](_0xb14f43['root']['rootName']);_0x5e188c[_0x208f89]=this['_fixRange'](_0xb14f43,_0x25498e);}'root'===_0x208f89&&(_0x5e188c['root']=_0x4bf105['get'](_0x5e188c['root']['rootName']));}}['_fixRange'](_0x1775d4,_0x5c5f6c){return this['editor']['model']['createRange'](this['_fixPosition'](_0x1775d4['start'],_0x5c5f6c),this['_fixPosition'](_0x1775d4['end'],_0x5c5f6c));}['_fixPosition'](_0x16daec,_0x40fe8e){return this['editor']['model']['createPositionFromPath'](_0x40fe8e,_0x16daec['path'],_0x16daec['stickiness']);}['_handleInsertOperation'](_0x50fdda){const _0x5c9aa1=this['_idsRoots']['get'](_0x50fdda['position']['root']['rootName']),_0xe1bb6d=this['_fixPosition'](_0x50fdda['position'],_0x5c9aa1),_0x549ae8=null===_0x50fdda['_authorId']?null:_0x50fdda['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5525ca=_0xe1bb6d['parent'],_0x122c52=this['_revisionId'],_0x249e2b=[];for(const _0x222ba4 of _0x50fdda['nodes'])if(_0x222ba4['is']('element'))_0x249e2b['push'](this['_makeIdsRoot'](_0x222ba4));else{for(let _0x49209e=0x0;_0x49209e<_0x222ba4['offsetSize'];_0x49209e++)_0x249e2b['push'](new _0x1c89c2('$text',{'vid':this['_revisionId']++}));}const _0x4fc117=this['_revisionId'];for(let _0x1fee43=_0x122c52;_0x1fee43<_0x4fc117;_0x1fee43++)this['_touched']['set'](_0x1fee43,{'userId':_0x549ae8});_0x5525ca['_insertChild'](_0xe1bb6d['offset'],_0x249e2b);}['_handleMoveOperation'](_0x276f7a){(_0x276f7a=this['_cloneOperation'](_0x276f7a,this['_idsRoots']))['_execute']();const _0x2e01d7=null===_0x276f7a['_authorId']?null:_0x276f7a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1378ac=_0x276f7a['getMovedRangeStart'](),_0x33df75=_0x1378ac['parent'],_0x34a788=_0x1378ac['offset'];!function _0x1b99fb(_0xe7f0aa,_0x1a840f,_0xfdc638,_0x4b7409){for(let _0x1cfe27=_0xfdc638;_0x1cfe27<_0x4b7409;_0x1cfe27++){const _0x363ae3=_0x1a840f['getChild'](_0x1cfe27);_0x363ae3['is']('element','$text')?_0xe7f0aa['set'](_0x363ae3['getAttribute']('vid'),{'userId':_0x2e01d7}):(_0xe7f0aa['set'](_0x363ae3['getAttribute']('vid_start'),{'userId':_0x2e01d7}),_0x1b99fb(_0xe7f0aa,_0x363ae3,0x0,_0x363ae3['childCount']),_0xe7f0aa['set'](_0x363ae3['getAttribute']('vid_end'),{'userId':_0x2e01d7}));}}(this['_touched'],_0x33df75,_0x34a788,_0x34a788+_0x276f7a['howMany']);}['_handleMergeOperation'](_0x541e28){const _0x1f2e54=null===(_0x541e28=this['_cloneOperation'](_0x541e28,this['_idsRoots']))['_authorId']?null:_0x541e28['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3ff865=_0x541e28['targetPosition']['parent'],_0x38c2ef=_0x541e28['sourcePosition']['parent'],_0x239159=_0x3ff865['getAttribute']('vid_end'),_0x5a9f26=_0x38c2ef['getAttribute']('vid_start');_0x3ff865['_setAttribute']('vid_end',_0x38c2ef['getAttribute']('vid_end')),_0x38c2ef['_setAttribute']('vid_end',_0x239159),this['_touched']['set'](_0x5a9f26,{'userId':_0x1f2e54}),this['_touched']['set'](_0x239159,{'userId':_0x1f2e54}),_0x541e28['_execute']();}['_handleSplitOperation'](_0x330379){const _0x2328b0=null===(_0x330379=this['_cloneOperation'](_0x330379,this['_idsRoots']))['_authorId']?null:_0x330379['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4cd06e=_0x330379['graveyardPosition'],_0x39318b=_0x330379['splitPosition']['parent'];_0x330379['_execute']();const _0x17328a=_0x39318b['getAttribute']('vid_end'),_0x19dc87=_0x330379['insertionPosition']['nodeAfter'];if(_0x4cd06e){const _0x17fd56=_0x19dc87['getAttribute']('vid_end'),_0x2d4124=_0x39318b['getAttribute']('vid_end');_0x39318b['_setAttribute']('vid_end',_0x17fd56),_0x19dc87['_setAttribute']('vid_end',_0x2d4124),this['_touched']['set'](_0x39318b['getAttribute']('vid_end'),{'userId':_0x2328b0}),this['_touched']['set'](_0x19dc87['getAttribute']('vid_start'),{'userId':_0x2328b0});}else{const _0xe95b6a=this['_revisionId']++,_0x399211=this['_revisionId']++;_0x39318b['_setAttribute']('vid_end',_0xe95b6a),_0x19dc87['_setAttribute']('vid_start',_0x399211),_0x19dc87['_setAttribute']('vid_end',_0x17328a),this['_touched']['set'](_0xe95b6a,{'userId':_0x2328b0}),this['_touched']['set'](_0x399211,{'userId':_0x2328b0});}}['_handleMarkerOperation'](_0x58157e){if(!_0x58157e['affectsData'])return;const _0x1fa328=(_0x58157e=this['_cloneOperation'](_0x58157e,this['_diffRoots']))['oldRange']?_0x58157e['oldRange']['root']:null,_0x1d6c08=_0x58157e['newRange']?_0x58157e['newRange']['root']:null;_0x1fa328&&this['_markers']['delete'](_0x58157e['name']),_0x1d6c08&&this['_markers']['set'](_0x58157e['name'],_0x58157e['newRange']['clone']());const _0x43fcaa=null===_0x58157e['_authorId']?null:_0x58157e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x216a89=_0x58157e['name'];if(!this['_touchedMarkers']['has'](_0x216a89))return void this['_touchedMarkers']['set'](_0x216a89,{'range':_0x58157e['oldRange'],'userId':_0x43fcaa});const _0x550737=this['_touchedMarkers']['get'](_0x216a89),_0x2b03ab=_0x550737['range'],_0x8b278d=_0x58157e['newRange'];null==_0x2b03ab&&null==_0x8b278d||_0x2b03ab&&_0x8b278d&&_0x2b03ab['isEqual'](_0x8b278d)?this['_touchedMarkers']['delete'](_0x58157e['name']):_0x550737['userId']=_0x43fcaa;}['_handleRootOperation'](_0x1688ff,_0x4a10cf){this['_diffRoots']['has'](_0x1688ff['rootName'])?this['_diffRoots']['get'](_0x1688ff['rootName'])['_isAttached']=_0x1688ff['isAdd']:(this['_diffRoots']['set'](_0x1688ff['rootName'],N(_0x1688ff['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1688ff['rootName'],{}),_0x4a10cf&&this['_idsRoots']['set'](_0x1688ff['rootName'],N(_0x1688ff['rootName'],!0x0)));const _0x49c5a0=null===_0x1688ff['_authorId']?null:_0x1688ff['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x40c3e0=this['_touchedRoots']['get'](_0x1688ff['rootName']);_0x40c3e0&&_0x40c3e0['userId']===_0x49c5a0?this['_touchedRoots']['delete'](_0x1688ff['rootName']):this['_touchedRoots']['set'](_0x1688ff['rootName'],{'userId':_0x49c5a0,'isAttached':_0x1688ff['isAdd']});}['_handleRootAttributeOperation'](_0x569e99){const _0x14d508=this['_diffRootsAttributes']['get'](_0x569e99['root']['rootName']);null===_0x569e99['newValue']?delete _0x14d508[_0x569e99['key']]:_0x14d508[_0x569e99['key']]=_0x569e99['newValue'];}}function x(_0x4b54ef){const _0x5bb8d1=N(_0x4b54ef['rootName'],_0x4b54ef['isAttached']());for(const _0x1dde2c of _0x4b54ef['getChildren']()){const _0x43f685=_0x1dde2c['_clone'](!0x0);_0x5bb8d1['_appendChild'](_0x43f685);}return _0x5bb8d1;}function N(_0x54750c,_0x42565a=!0x0){const _0x30a905=new _0x42921b();return _0x30a905['rootName']=_0x54750c,_0x30a905['_isAttached']=_0x42565a,_0x30a905['isAttached']=()=>_0x30a905['_isAttached'],_0x30a905;}function P(_0x22fb07,_0x58d80c,_0x11a2d9){const _0x2ac1f2='elementEnd'==_0x22fb07['type']?_0x11a2d9['createPositionAt'](_0x22fb07['item'],'end'):_0x11a2d9['createPositionBefore'](_0x22fb07['item']);return _0x11a2d9['createPositionFromPath'](_0x58d80c,_0x2ac1f2['path'],_0x2ac1f2['stickiness']);}function V(_0x313339,_0x32e259,_0xe6e136){const _0x5fb44c='elementStart'==_0x313339['type']?_0xe6e136['createPositionAt'](_0x313339['item'],0x0):_0xe6e136['createPositionAfter'](_0x313339['item']);return _0xe6e136['createPositionFromPath'](_0x32e259,_0x5fb44c['path'],_0x5fb44c['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
+ _0xd18b2e(_0x4691c3){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4e1a42,_0x5eab06){super(_0x4e1a42),this['focusTracker']=new _0x22eada(),this['keystrokes']=new _0x27fdae(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x5eab06),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x49fff6({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x90c49b=_0xcec550=>_0xcec550['stopPropagation']();this['keystrokes']['set']('arrowright',_0x90c49b),this['keystrokes']['set']('arrowleft',_0x90c49b),this['keystrokes']['set']('arrowup',_0x90c49b),this['keystrokes']['set']('arrowdown',_0x90c49b);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x11e45e){this['revisionNameInputView']['fieldView']['element']['value']=_0x11e45e['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x2a7f5d){const _0x4df131=new _0x506965(this['locale'],_0x1340c0),_0x224d25=_0x4df131['fieldView'];_0x224d25['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x3014fb=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x2a7f5d&&(_0x3014fb+='\x20('+R(this['locale'],'optional')+')'),(_0x4df131['label']=_0x3014fb,_0x224d25['on']('input',()=>{this['revisionNameInputValue']=_0x224d25['element']['value']['trim']();}),_0x4df131);}}class v extends _0x5e8bcb{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x4b2809=this['editor'],_0x12cc8e=_0x4b2809['plugins']['get']('RevisionTracker');_0x4b2809['ui']['componentFactory']['add']('revisionHistory',_0x57dfdd=>{const _0x9bc0f7=_0x5b24c1(_0x57dfdd),_0x232b0b=_0x9bc0f7['panelView']['children'],_0x466f17=new _0x65fa40(_0x57dfdd),_0x1df04a=new _0xd6f348(_0x57dfdd),_0x5f35ae=new _0x304d89(_0x57dfdd),_0x43baeb=new _0xd6f348(_0x57dfdd),_0x2193b3=new _0x304d89(_0x57dfdd);return _0x9bc0f7['bind']('isEnabled')['to'](_0x12cc8e,'isReady',_0x12cc8e,'isEnabled',_0x4b2809,'isReadOnly',(_0x52aeb4,_0x5ffc5,_0x25e243)=>_0x52aeb4&&_0x5ffc5&&!_0x25e243),_0x9bc0f7['buttonView']['set']({'icon':_0x5e53f9,'label':R(_0x57dfdd,'Revision\x20history'),'tooltip':!0x0}),_0x5f35ae['set']({'label':R(_0x57dfdd,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x5f35ae['bind']('isEnabled')['to'](_0x12cc8e,'isReady',_0x12cc8e,'isEnabled',_0x4b2809,'isReadOnly',(_0x17ecc3,_0x2df67f,_0x4cfcea)=>_0x17ecc3&&_0x2df67f&&!_0x4cfcea),_0x5f35ae['on']('execute',()=>this['_showDialog']()),_0x2193b3['set']({'label':R(_0x57dfdd,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x2193b3['bind']('isEnabled')['to'](_0x12cc8e,'isReady',_0x4b2809,'isReadOnly',(_0x109180,_0x1aa03c)=>_0x109180&&!_0x1aa03c),_0x2193b3['on']('execute',()=>{_0x4b2809['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x9bc0f7['isOpen']=!0x1,_0x4b2809['editing']['view']['focus']();}),_0x1df04a['children']['add'](_0x5f35ae),_0x43baeb['children']['add'](_0x2193b3),_0x466f17['role']='menu',_0x466f17['items']['addMany']([_0x1df04a,_0x43baeb]),_0x232b0b['add'](_0x466f17),_0x9bc0f7;}),_0x4b2809['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x538a9b=this['editor'],_0x15d0a1=_0x538a9b['locale'],_0xd8ecb8=new _0x543c93(_0x15d0a1),_0x30d0e0=new _0x5cc111(_0x15d0a1);_0xd8ecb8['buttonView']['set']({'icon':_0x5e53f9,'label':R(_0x15d0a1,'Revision\x20history')});const _0x2705f5=new _0x41ed97(_0x15d0a1,_0xd8ecb8),_0xf0e7ab=new _0x5cdee7(_0x15d0a1);_0xf0e7ab['set']({'label':R(_0x15d0a1,'Save\x20current\x20revision')}),_0xf0e7ab['delegate']('execute')['to'](_0xd8ecb8),_0xf0e7ab['on']('execute',()=>{this['_showDialog']();}),_0x2705f5['children']['add'](_0xf0e7ab),_0x30d0e0['items']['add'](_0x2705f5);const _0x597199=new _0x41ed97(_0x15d0a1,_0xd8ecb8),_0x399d75=new _0x5cdee7(_0x15d0a1);return _0x399d75['set']({'label':R(_0x15d0a1,'Open\x20revision\x20history')}),_0x399d75['delegate']('execute')['to'](_0xd8ecb8),_0x399d75['on']('execute',()=>{_0x538a9b['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x597199['children']['add'](_0x399d75),_0x30d0e0['items']['add'](_0x597199),_0xd8ecb8['panelView']['children']['add'](_0x30d0e0),_0xd8ecb8;}['_showDialog'](){const _0x2e1964=this['editor'],_0x363a94=_0x2e1964['locale'],_0x97e328=_0x2e1964['plugins']['get']('Dialog'),_0x2205a4=_0x2e1964['plugins']['get']('RevisionTracker');function _0x5ede5d(_0x2a976d){_0x2e1964['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2a976d['revisionName']?_0x2a976d['revisionNameInputView']['errorText']=R(_0x363a94,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2e1964['plugins']['get'](h)['saveRevision']({'name':_0x2a976d['revisionName']}),_0x97e328['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5ede5d(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x97e328['show']({'id':'revisionSave','title':R(_0x363a94,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x2e1964['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x97e328['hide']()},{'label':R(_0x2e1964['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x6d1a21){_0x6d1a21['bind']('isEnabled')['to'](_0x2205a4,'isReady',_0x2205a4,'isEnabled',_0x2e1964,'isReadOnly',(_0x3fe116,_0x58a8ab,_0x53be07)=>_0x3fe116&&_0x58a8ab&&!_0x53be07);},'onExecute':()=>_0x5ede5d(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x391047=this['editor'],_0x40bf91=_0x391047['locale'];this['_saveRevisionFormView']=new he(_0x40bf91,_0x391047['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x4691c3{['changeId'];['_model'];constructor(_0x241cb0,_0x5db1cf){super(_0x241cb0),this['_model']=_0x5db1cf,this['changeId']=_0x5db1cf['id'];const _0x71e8c7=this['bindTemplate'],_0x5df1b2=R(_0x241cb0,_0x5db1cf['data']['isSuggestion']?'Suggested\x20by':'add'==_0x5db1cf['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x5db1cf['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x71e8c7['to']('type',_0x1466ab=>'ck-revision-change__'+_0x1466ab)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5df1b2}]},{'text':'\x20'+_0x5db1cf['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x46d461(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x285855){super(),this['id']=_0x285855['id']||_0x4de09f(),this['author']=_0x285855['author'],this['type']=_0x285855['type'],this['data']=_0x285855['data']||{},this['rootName']=_0x285855['rootName'],this['set']('createdAt',_0x285855['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x138a7c,_0x5a2027){this['newRevisionId']=_0x138a7c,this['oldRevisionId']=_0x5a2027,this['changes']=new _0x3455f1();}['_setChanges'](_0x211a79){for(const _0x1c82e8 of _0x211a79)this['changes']['add'](_0x1c82e8);}}class l extends _0x5e8bcb{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x42a9a2,_0x53db58,S,$];}constructor(_0x585d79){super(_0x585d79),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x1af552,_0x1423b5,_0x289476)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0xd5587a=>{for(const _0x3a1135 of this['editor']['editing']['view']['document']['roots'])_0x289476?_0xd5587a['removeClass']('ck-editor__editable__overlay',_0x3a1135):_0xd5587a['addClass']('ck-editor__editable__overlay',_0x3a1135);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5395a1=>null!==_0x5395a1),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x4caf89,_0x32acfa,_0xf82bd3)=>_0x4caf89&&_0xf82bd3?_0x32acfa['changes']['getIndex'](_0xf82bd3):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x35dc79,_0x523587)=>_0x35dc79?_0x523587['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x53db58);}['init'](){const _0x4d850c=this['editor'],_0x30e9a4=new ot(_0x4d850c,{'direction':'backward'}),_0x7664d7=new ot(_0x4d850c,{'direction':'forward'});(_0x4d850c['commands']['add']('showPreviousChange',_0x30e9a4),_0x4d850c['commands']['add']('showNextChange',_0x7664d7),_0x4d850c['commands']['add']('restoreRevision',new nt(_0x4d850c)),this['on']('change:numberOfChanges',()=>{_0x30e9a4['refresh'](),_0x7664d7['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4d850c['enableReadOnlyMode']('revision-viewer'),_0x4d850c['plugins']['has']('WidgetToolbarRepository'))&&_0x4d850c['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x574dad){return await this['_utils']['loadRevisionData'](_0x574dad,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x574dad);}async['getRevisionRootsAttributes'](_0x4c53a9){return await this['_utils']['loadRevisionData'](_0x4c53a9,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4c53a9);}async['compare'](_0xa0084a,_0x14306a,_0x279a58=!0x1){if(!this['isEnabled'])return;const _0x269d3b=this['diff'],_0x40d5e3=this['repository'],_0x4deca5='string'==typeof _0xa0084a?_0x40d5e3['getRevision'](_0xa0084a):_0xa0084a,_0x5ac1d9='string'==typeof _0x14306a?_0x40d5e3['getRevision'](_0x14306a):_0x14306a,_0x3d6141=_0x4deca5['id'],_0x3981e3=_0x5ac1d9?_0x5ac1d9['id']:null;if(!_0x279a58&&this['diff']&&this['diff']['newRevisionId']===_0x3d6141&&this['diff']['oldRevisionId']===_0x3981e3)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x3d6141,_0x3981e3);const _0x3ab6c9=this['_getRevisionsRange'](_0x4deca5,_0x5ac1d9,!0x0)['map'](_0x510821=>this['_utils']['loadRevisionData'](_0x510821,this['adapter']));return _0x3ab6c9['push'](new Promise(_0x184cb8=>{setTimeout(_0x184cb8,0x14);})),Promise['all'](_0x3ab6c9)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2ebad0=this['_getDiff'](_0x3d6141,_0x3981e3);for(const _0x2ffbfd of _0x2ebad0['changes'])this['_changeIdToChange']['set'](_0x2ffbfd['id'],_0x2ffbfd);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x161c12=>{for(const _0xf135d3 of this['editor']['model']['document']['getRootNames']())_0x161c12['detachRoot'](_0xf135d3);for(const _0x367319 of Object['keys'](_0x2ebad0['model'])){const _0x5dc2a2=_0x161c12['addRoot'](_0x367319);for(const _0x42fb2a of Object['keys'](_0x2ebad0['attributes'][_0x367319]))_0x161c12['setAttribute'](_0x42fb2a,_0x2ebad0['attributes'][_0x367319][_0x42fb2a],_0x5dc2a2);_0x161c12['insert'](_0x2ebad0['model'][_0x367319],_0x5dc2a2,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2ebad0['changes'])),this['isReady']=!0x0;})['catch'](_0xd46936=>{console['error'](_0xd46936),this['_cleanUp'](),_0x269d3b&&(this['diff']=_0x269d3b),this['isReady']=!0x0;});}['addRevisionData'](_0x240bd0,_0x41533e){const _0x5c16e2=this['repository']['createRevision'](_0x240bd0);return _0x5c16e2['on']('_update',(_0x3b3222,_0x19e47f,_0x4ab0bc)=>_0x41533e(_0x19e47f,_0x4ab0bc,_0x5c16e2)),this['repository']['addRevision'](_0x5c16e2),_0x5c16e2;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xb558f2=>{for(const _0x2f38da of this['editor']['model']['document']['getRootNames']())_0xb558f2['detachRoot'](_0x2f38da);});}['_sortAndFilterDiffChanges'](_0x2e9bd3){const _0x472688=[],_0x1974dd=new Map();for(const _0x3ada3e of this['editor']['model']['document']['getRootNames']()){const _0x2698f7=this['editor']['editing']['view']['getDomRoot'](_0x3ada3e);if(!_0x2698f7)continue;const _0x5096f1=_0x2698f7['getClientRects']()['item'](0x0);_0x5096f1&&(_0x472688['push'](_0x3ada3e),_0x1974dd['set'](_0x3ada3e,_0x5096f1));}return _0x472688['sort']((_0xef8a5d,_0x46ef71)=>{const _0x15d6ea=_0x1974dd['get'](_0xef8a5d),_0x370760=_0x1974dd['get'](_0x46ef71);return _0x15d6ea['y']-_0x370760['y']||_0x15d6ea['x']-_0x370760['x'];}),(_0x2e9bd3=_0x2e9bd3['filter'](_0x490698=>_0x472688['includes'](_0x490698['rootName'])))['sort']((_0x695693,_0x566f89)=>_0x472688['indexOf'](_0x695693['rootName'])-_0x472688['indexOf'](_0x566f89['rootName'])),_0x2e9bd3;}['_makeTape'](_0x4e08b8){const _0x192035=Array['from'](_0x4e08b8['markers'])['filter'](([_0x55c435,_0x30d056])=>_0x55c435['startsWith']('revision:')&&!_0x30d056['isCollapsed']),_0x11c9b3=Array['from'](this['editor']['model']['createRangeIn'](_0x4e08b8)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x192035['length'])for(const _0x16b6ec of _0x11c9b3){const [_0x285735,_0x2f4c5f]=_0x192035[0x0],[,_0x359f41,_0x2be5d1]=_0x285735['split'](':');if(_0x2f4c5f['end']['isEqual'](_0x16b6ec['nextPosition'])&&_0x192035['shift'](),(_0x16b6ec['previousPosition']['isEqual'](_0x2f4c5f['start'])||_0x16b6ec['previousPosition']['isAfter'](_0x2f4c5f['start']))&&('insertion'==_0x359f41?_0x16b6ec['isAdded']={'userId':_0x2be5d1}:'deletion'==_0x359f41&&(_0x16b6ec['isRemoved']={'userId':_0x2be5d1})),0x0==_0x192035['length'])break;}return _0x11c9b3;}['_refreshStartEndIndex'](_0x334772){const _0x21d690=new Map();for(let _0x4cc950=0x0;_0x4cc950<_0x334772['length'];_0x4cc950++)'text'===_0x334772[_0x4cc950]['type']?(_0x334772[_0x4cc950]['item']['startIndex']=_0x4cc950,_0x334772[_0x4cc950]['item']['endIndex']=_0x4cc950):('elementStart'===_0x334772[_0x4cc950]['type']?_0x334772[_0x4cc950]['item']['startIndex']=_0x4cc950:'elementEnd'===_0x334772[_0x4cc950]['type']&&(_0x334772[_0x4cc950]['item']['endIndex']=_0x4cc950),_0x21d690['set'](_0x334772[_0x4cc950]['id'],_0x4cc950));for(const _0x45b2d1 of _0x21d690['values']())'elementStart'===_0x334772[_0x45b2d1]['type']?_0x334772[_0x45b2d1]['item']['endIndex']=_0x21d690['get'](_0x334772[_0x45b2d1]['pairId']):'elementEnd'===_0x334772[_0x45b2d1]['type']&&(_0x334772[_0x45b2d1]['item']['startIndex']=_0x21d690['get'](_0x334772[_0x45b2d1]['pairId']));}['_processTape'](_0x11c463){for(let _0x4fbc80=0x0;_0x4fbc80<_0x11c463['length'];_0x4fbc80++){if('elementStart'===_0x11c463[_0x4fbc80]['type'])_0x11c463[_0x4fbc80]['item']['startIndex']=_0x4fbc80;else{if('elementEnd'===_0x11c463[_0x4fbc80]['type']){_0x11c463[_0x4fbc80]['item']['endIndex']=_0x4fbc80;const _0xb13f5a=_0x11c463[_0x4fbc80]['item']['startIndex'];_0x11c463[_0xb13f5a]['pairId']=_0x11c463[_0x4fbc80]['id'],_0x11c463[_0x4fbc80]['pairId']=_0x11c463[_0xb13f5a]['id'];}else _0x11c463[_0x4fbc80]['item']['startIndex']=_0x4fbc80,_0x11c463[_0x4fbc80]['item']['endIndex']=_0x4fbc80,_0x11c463[_0x4fbc80]['pairId']=null;}_0x11c463[_0x4fbc80]['markersStart']||(_0x11c463[_0x4fbc80]['markersStart']=[],_0x11c463[_0x4fbc80]['markersEnd']=[]);}}['_markInsertions'](_0x47b818,_0x2b526a){const _0x4a76ce=_0x47b818['filter'](_0x29511f=>!_0x29511f['isAdded']);for(let _0xa6b581=0x0;_0xa6b581<_0x2b526a['length'];_0xa6b581++)_0x2b526a[_0xa6b581]['isAdded']&&(_0x4a76ce[_0xa6b581]['isAdded']=_0x2b526a[_0xa6b581]['isAdded']);}['_getDiff'](_0x74dda,_0x11c307=null){const _0x2d6281=this['repository']['getRevision'](_0x74dda),_0x1b3f2a=_0x11c307?this['repository']['getRevision'](_0x11c307):null,_0x5110c9=this['_getRevisionsRange'](_0x2d6281,_0x1b3f2a),_0x1401f4=_0x5110c9[_0x5110c9['length']-0x1],_0x393c2c=new Map(),_0x67b557={'model':{},'attributes':{},'changes':[]},_0x4245f7=new Set(),_0x45a47d=new Map();for(let _0x80a7a0=_0x5110c9['length']-0x1;_0x80a7a0>=0x0;_0x80a7a0--){const _0x35adbf=_0x5110c9[_0x80a7a0];for(const _0x4f6373 of Object['keys'](_0x35adbf['diffData']))if(_0x35adbf['diffData'][_0x4f6373]['attachChange']){const _0xc5d802=_0x35adbf['diffData'][_0x4f6373]['attachChange'];_0xc5d802['isAttached']?(_0x4245f7['add'](_0x4f6373),_0x45a47d['has'](_0x4f6373)&&_0x45a47d['get'](_0x4f6373)['userId']==_0xc5d802['userId']?_0x45a47d['delete'](_0x4f6373):_0x45a47d['set'](_0x4f6373,_0xc5d802)):_0x45a47d['has'](_0x4f6373)?(_0x4245f7['delete'](_0x4f6373),_0x45a47d['delete'](_0x4f6373)):(_0x4245f7['add'](_0x4f6373),_0x45a47d['set'](_0x4f6373,_0xc5d802));}else _0x4245f7['add'](_0x4f6373);}for(const _0x24bc26 of _0x4245f7){const _0x284266=_0x45a47d['has'](_0x24bc26)&&!_0x45a47d['get'](_0x24bc26)['isAttached'];let _0x480617=_0x284266?_0x5110c9['length']-0x1:0x0;const _0x29e0b1=_0x284266?-0x1:0x1;for(;_0x5110c9[_0x480617];){const _0x4e8ec5=_0x5110c9[_0x480617];if(_0x4e8ec5['diffData'][_0x24bc26]){const _0x1aa125=_0x284266?_0x4e8ec5['diffData'][_0x24bc26]['attributesBefore']:_0x4e8ec5['diffData'][_0x24bc26]['attributesAfter'];_0x67b557['attributes'][_0x24bc26]=_0x1aa125?_0x2f320b(_0x1aa125):{};break;}_0x480617+=_0x29e0b1;}}for(const _0x32ce99 of _0x5110c9){_0x32ce99['model']={};for(const _0x1c6d23 of _0x32ce99['authors'])_0x393c2c['set'](_0x1c6d23['id'],_0x1c6d23);for(const _0x1aa8fd of _0x4245f7){const _0x5308bb=_0x32ce99['diffData'][_0x1aa8fd]?_0x32ce99['diffData'][_0x1aa8fd]['insertions']:'[]',_0x263818=_0x32ce99['diffData'][_0x1aa8fd]?_0x32ce99['diffData'][_0x1aa8fd]['deletions']:'[]';_0x32ce99['model'][_0x1aa8fd]={'insertions':this['_utils']['_makeModelFromViewString'](_0x5308bb),'deletions':this['_utils']['_makeModelFromViewString'](_0x263818)};}}for(const _0xe03925 of _0x4245f7){let _0x27b2ff=null,_0x3f77a4=0x0;const _0x17025d=new Map(Array['from'](_0x2d6281['model'][_0xe03925]['insertions']['markers'])['filter'](([_0x509732])=>!_0x509732['startsWith']('revision:')));let _0x3be6f1=0x0;for(const _0x3f6057 of _0x5110c9){const _0x57d1d2=this['_makeTape'](_0x3f6057['model'][_0xe03925]['insertions']);_0x3f6057==_0x2d6281?(_0x27b2ff=_0x57d1d2,_0x3f77a4=_0x27b2ff['length'],_0x27b2ff['forEach'](_0x2dc821=>{_0x2dc821['id']=_0x3be6f1++;}),this['_processTape'](_0x27b2ff)):this['_markInsertions'](_0x27b2ff,_0x57d1d2);const _0x1257c0=_0x27b2ff['filter'](_0xdc06b=>!_0xdc06b['isAdded'])['map'](_0x561328=>_0x561328['id']);let _0x3462bd=0x0;const _0x38eb9f=this['_makeTape'](_0x3f6057['model'][_0xe03925]['deletions']);_0x38eb9f['forEach'](_0x48c3f5=>{_0x48c3f5['isRemoved']?_0x48c3f5['id']=_0x3f77a4++:_0x48c3f5['id']=_0x1257c0[_0x3462bd++];}),this['_processTape'](_0x38eb9f),this['_setDistance'](_0x27b2ff,'isAdded'),this['_setDistance'](_0x38eb9f,'isRemoved'),_0x3f6057==_0x2d6281&&this['_markMarkers'](_0x27b2ff,_0x17025d),_0x27b2ff=this['_joinTapes'](_0x27b2ff,_0x38eb9f),this['_refreshStartEndIndex'](_0x27b2ff),this['_setDistance'](_0x27b2ff,'isRemoved');}_0x27b2ff=_0x27b2ff['filter'](_0x2f154e=>!(_0x2f154e['isAdded']&&_0x2f154e['isRemoved']));const _0x256a5e=new Map(_0x1401f4['model'][_0xe03925]['deletions']['markers']),_0x477e67=new Set(_0x17025d['keys']());for(const _0x3cd0fd of _0x256a5e['keys']())_0x477e67['delete'](_0x3cd0fd);this['_markSuggestions'](_0x27b2ff,_0x477e67),this['_fixObsoleteTags'](_0x27b2ff),_0x27b2ff=this['_removeMissingPairs'](_0x27b2ff),_0x27b2ff=this['_markMismatchedRemovedTags'](_0x27b2ff),_0x27b2ff=this['_removeUnsupportedChanges'](_0x27b2ff);const {root:_0x1ca6ed,changes:_0x5a103d}=this['_makeModelFromTape'](_0x27b2ff,_0x393c2c,_0xe03925);_0x67b557['model'][_0xe03925]=_0x1ca6ed;const _0x4a2ff8=_0x45a47d['get'](_0xe03925);if(_0x4a2ff8){const _0x262871=_0x393c2c['get'](_0x4a2ff8['userId']),_0x304edd=new G({'author':_0x262871,'type':_0x4a2ff8['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0xe03925});_0x5a103d['unshift'](_0x304edd),_0x67b557['attributes'][_0xe03925]['revisionHistoryAttachChange']=_0x304edd['id'];}_0x67b557['changes']=_0x67b557['changes']['concat'](_0x5a103d);}return _0x67b557;}['_markMarkers'](_0x2bc90f,_0x5c5325){for(let _0x2d57ac=0x0;_0x2d57ac<_0x2bc90f['length'];_0x2d57ac++)for(const [_0x2d4886,_0x4adce5]of _0x5c5325)!_0x4adce5['isCollapsed']&&_0x4adce5['start']['isEqual'](_0x2bc90f[_0x2d57ac]['previousPosition'])&&_0x2bc90f[_0x2d57ac]['markersStart']['push'](_0x2d4886),_0x4adce5['end']['isEqual'](_0x2bc90f[_0x2d57ac]['nextPosition'])&&_0x2bc90f[_0x2d57ac]['markersEnd']['push'](_0x2d4886);}['_joinTapes'](_0x4279b1,_0x21ac3b){let _0x58edc8=[],_0x38fd9b=0x0,_0xa93955=0x0;for(;_0x38fd9b<_0x4279b1['length']||_0xa93955<_0x21ac3b['length'];){const _0x353006=_0x4279b1[_0x38fd9b]||{},_0xe62661=_0x21ac3b[_0xa93955]||{};if(_0x353006['id']==_0xe62661['id'])_0x38fd9b++,_0xa93955++,_0x58edc8['push'](_0x353006);else{if(_0xe62661['isRemoved']&&_0x353006['isAdded']){const {commonTape:_0x369756,iEnd:_0xcc2444,jEnd:_0x11b0f1}=this['_threeWayMerge'](_0x4279b1,_0x38fd9b,_0x21ac3b,_0xa93955);_0x58edc8=_0x58edc8['concat'](_0x369756),_0x38fd9b=_0xcc2444,_0xa93955=_0x11b0f1;}else _0xe62661['isRemoved']?(_0xa93955++,_0x58edc8['push'](_0xe62661)):(_0x38fd9b++,_0x58edc8['push'](_0x353006));}}return _0x58edc8;}['_markSuggestions'](_0x5e76b7,_0x77d947){const _0x27e035=[];for(let _0x2b4e28=0x0;_0x2b4e28<_0x5e76b7['length'];_0x2b4e28++){for(let _0x185715=0x0;_0x185715<_0x5e76b7[_0x2b4e28]['markersStart']['length'];_0x185715++){const _0x58f137=_0x5e76b7[_0x2b4e28]['markersStart'][_0x185715];if(!_0x77d947['has'](_0x58f137))continue;const {group:_0x219c5b,type:_0xfd7a14,authorId:_0x4f4d50}=_0x18ba4c(_0x58f137);'revision-suggestion'!=_0x219c5b||'insertion'!=_0xfd7a14&&'deletion'!=_0xfd7a14||(_0x27e035['unshift']({'type':_0xfd7a14,'name':_0x58f137,'userId':_0x4f4d50}),_0x5e76b7[_0x2b4e28]['markersStart']['splice'](_0x185715,0x1),_0x185715--);}_0x5cb339(_0x5e76b7[_0x2b4e28]);for(let _0x226ed4=0x0;_0x226ed4<_0x5e76b7[_0x2b4e28]['markersEnd']['length'];_0x226ed4++){const _0x3a0f77=_0x5e76b7[_0x2b4e28]['markersEnd'][_0x226ed4];if(!_0x77d947['has'](_0x3a0f77))continue;const {group:_0x51236c,type:_0x3bb16f}=_0x18ba4c(_0x3a0f77);if('revision-suggestion'!=_0x51236c||'insertion'!=_0x3bb16f&&'deletion'!=_0x3bb16f)continue;_0x5e76b7[_0x2b4e28]['markersEnd']['splice'](_0x226ed4,0x1),_0x226ed4--;const _0x51dc3e=_0x27e035['findIndex'](_0x39acf3=>_0x39acf3['name']==_0x3a0f77);_0x51dc3e>-0x1&&_0x27e035['splice'](_0x51dc3e,0x1);}}function _0x18ba4c(_0x44b538){const _0xaed503=_0x44b538['split'](':');return{'group':_0xaed503[0x0],'type':_0xaed503[0x1],'subType':_0xaed503['length']>=0x5?_0xaed503[0x2]:null,'id':_0xaed503['length']<0x5?_0xaed503[0x2]:_0xaed503[0x3],'authorId':_0xaed503['length']<0x5?_0xaed503[0x3]:_0xaed503[0x4],'markerCount':0x6==_0xaed503['length']?_0xaed503[0x5]:null};}function _0x5cb339(_0x59e36d){for(let _0x4c302a=0x0;_0x4c302a<_0x27e035['length'];_0x4c302a++){if(_0x59e36d['isAdded']&&'insertion'==_0x27e035[_0x4c302a]['type']&&_0x59e36d['isAdded']['userId']==_0x27e035[_0x4c302a]['userId'])return _0x59e36d['isAddSuggestion']=_0x27e035[_0x4c302a],void delete _0x59e36d['isAdded'];if(!_0x59e36d['isAdded']&&!_0x59e36d['isRemoved']&&'deletion'==_0x27e035[_0x4c302a]['type'])return void(_0x59e36d['isRemoveSuggestion']=_0x27e035[_0x4c302a]);}}}['_setDistance'](_0xc32d6f,_0xebe1b2){let _0x4bc6c8=0x0,_0xf80167=!0x1;const _0x19b9e1=new Map();for(const _0x1b66f9 of _0xc32d6f)_0x1b66f9[_0xebe1b2]?_0xf80167&&(_0x4bc6c8++,_0xf80167=!0x1):(_0x4bc6c8++,_0xf80167=!0x0),_0x19b9e1['set'](_0x1b66f9['id'],_0x4bc6c8);for(let _0xcd96ea=0x0;_0xcd96ea<_0xc32d6f['length'];_0xcd96ea++){if('isRemoved'==_0xebe1b2&&_0xc32d6f[_0xcd96ea]['isAdded']||'isAdded'==_0xebe1b2&&_0xc32d6f[_0xcd96ea]['isRemoved'])continue;if('text'==_0xc32d6f[_0xcd96ea]['type']){_0xc32d6f[_0xcd96ea]['distance']=0x0;continue;}const _0x1760fa=_0x19b9e1['get'](_0xc32d6f[_0xcd96ea]['pairId']),_0xdbeb3e=_0x19b9e1['get'](_0xc32d6f[_0xcd96ea]['id']);_0xc32d6f[_0xcd96ea]['distance']=_0x1760fa-_0xdbeb3e;}}['_getRevisionsRange'](_0x2ab8be,_0x360daa,_0x37538c=!0x1){const _0x4a744c=[];let _0x3831a9=this['repository']['getIndex'](_0x2ab8be),_0x2bc020=this['repository']['getIndex'](_0x360daa);for(-0x1==_0x2bc020&&(_0x2bc020=this['repository']['_revisions']['length'],_0x37538c=!0x1);_0x3831a9<_0x2bc020;)_0x4a744c['push'](this['repository']['getRevision'](_0x3831a9)),_0x3831a9++;return _0x37538c&&_0x4a744c['push'](this['repository']['getRevision'](_0x3831a9)),_0x4a744c;}['_threeWayMerge'](_0x83c2a2,_0x374362,_0x5f0082,_0x4c5afd){const _0xce238d=this['editor']['model']['schema'];let _0x4a259a=_0x374362;for(;_0x83c2a2[_0x4a259a]&&_0x83c2a2[_0x4a259a]['isAdded'];)_0x4a259a++;let _0x5df75f=_0x4c5afd;for(;_0x5f0082[_0x5df75f]&&_0x5f0082[_0x5df75f]['isRemoved'];)_0x5df75f++;_0x5d05b6(_0x83c2a2,_0x374362,_0x4a259a),_0x5d05b6(_0x5f0082,_0x4c5afd,_0x5df75f);const _0x235996=_0x5f0082['slice'](_0x4c5afd,_0x5df75f)['concat'](_0x83c2a2['slice'](_0x374362,_0x4a259a));return _0x235996['sort']((_0x14119a,_0x347178)=>_0x14119a['side']!=_0x347178['side']?_0x14119a['side']-_0x347178['side']:_0x14119a['level']!=_0x347178['level']?_0x14119a['level']-_0x347178['level']:_0x14119a['distance']!=_0x347178['distance']?_0x347178['distance']-_0x14119a['distance']:!!_0x14119a['isAdded']!=!!_0x347178['isAdded']?-0x1==_0x14119a['side']||0x0==_0x14119a['side']?_0x14119a['isAdded']?-0x1:0x1:_0x14119a['isAdded']?0x1:-0x1:_0x14119a['index']-_0x347178['index']),{'commonTape':_0x235996,'iEnd':_0x4a259a,'jEnd':_0x5df75f};function _0x5d05b6(_0x5c1f79,_0x2fa530,_0x53cb7e){let _0x8a7cc0=-0x1,_0x4ad5ef=Number['POSITIVE_INFINITY'],_0x1f2a75=!0x0;for(let _0x4f2b7e=_0x2fa530;_0x4f2b7e<_0x53cb7e;_0x4f2b7e++)if(_0xce238d['isInline'](_0x5c1f79[_0x4f2b7e]['item'])||(_0x1f2a75=!0x1),_0x5c1f79[_0x4f2b7e]['item']['startIndex']<_0x2fa530&&(_0x8a7cc0=_0x4f2b7e),_0x5c1f79[_0x4f2b7e]['item']['endIndex']>=_0x53cb7e){_0x4ad5ef=_0x4f2b7e;break;}_0x1f2a75&&(_0x8a7cc0=_0x53cb7e-0x1);for(let _0x7c2113=_0x2fa530;_0x7c2113<_0x53cb7e;_0x7c2113++)_0x5c1f79[_0x7c2113]['side']=_0x7c2113<=_0x8a7cc0?-0x1:_0x7c2113<_0x4ad5ef?0x0:0x1,_0x5c1f79[_0x7c2113]['index']=_0x7c2113;let _0x235526=0x0;for(let _0x1cb467=_0x2fa530;_0x1cb467<=_0x8a7cc0;_0x1cb467++)0x0==_0x5c1f79[_0x1cb467]['distance']?_0x5c1f79[_0x1cb467]['level']=_0x235526:(_0x235526++,_0x5c1f79[_0x1cb467]['level']=_0x235526,_0x235526++);for(let _0x5c5cdb=_0x2fa530;_0x5c5cdb<_0x53cb7e;_0x5c5cdb++)0x0==_0x5c1f79[_0x5c5cdb]['side']&&(_0x5c1f79[_0x5c5cdb]['level']=_0x235526);_0x235526=0x0;for(let _0xf63e3=_0x53cb7e-0x1;_0xf63e3>=_0x4ad5ef;_0xf63e3--)0x0==_0x5c1f79[_0xf63e3]['distance']?_0x5c1f79[_0xf63e3]['level']=_0x235526:(_0x235526--,_0x5c1f79[_0xf63e3]['level']=_0x235526,_0x235526--);}}['_fixObsoleteTags'](_0x546afc){const _0x3f295c=new Map(),_0x4140ea=this['editor']['model']['schema'];for(let _0x1e346d=0x1;_0x1e346d<_0x546afc['length'];_0x1e346d++){let _0xe2d116,_0x1ca652,_0x114480;const _0xc760da=_0x546afc[_0x1e346d],_0x3e0859=_0x546afc[_0x1e346d-0x1];if('text'==_0xc760da['type'])continue;if(_0xc760da['type']!=_0x3e0859['type'])continue;if(!_0x4140ea['isBlock'](_0x3e0859['item'])||_0x4140ea['isLimit'](_0x3e0859['item']))continue;if(!_0x4140ea['isBlock'](_0xc760da['item'])||_0x4140ea['isLimit'](_0xc760da['item']))continue;if((_0x546afc[_0x1e346d]['isAdded']||_0x546afc[_0x1e346d]['isAddSuggestion'])&&_0x546afc[_0x1e346d-0x1]['isRemoved'])_0xe2d116=_0x546afc[_0x1e346d],_0x1ca652=_0x546afc[_0x1e346d-0x1],_0x114480=_0x1e346d-0x1;else{if(!_0x546afc[_0x1e346d]['isRemoved']||!_0x546afc[_0x1e346d-0x1]['isAdded']&&!_0x546afc[_0x1e346d-0x1]['isAddSuggestion'])continue;_0xe2d116=_0x546afc[_0x1e346d-0x1],_0x1ca652=_0x546afc[_0x1e346d],_0x114480=_0x1e346d;}const _0x2f016b=_0xe2d116['level']==_0x1ca652['level'],_0x423754=Math['abs'](_0xe2d116['level'])<Math['abs'](_0x1ca652['level'])&&0x0==_0x1ca652['distance'];(_0x2f016b||_0x423754)&&(_0x3f295c['set'](_0x1ca652['id'],_0xe2d116['id']),_0x546afc['splice'](_0x114480,0x1),_0x1e346d--,_0xe2d116['isAdded']=!0x1);}for(let _0x5a4d30=0x0;_0x5a4d30<_0x546afc['length'];_0x5a4d30++)_0x3f295c['has'](_0x546afc[_0x5a4d30]['pairId'])&&(_0x546afc[_0x5a4d30]['pairId']=_0x3f295c['get'](_0x546afc[_0x5a4d30]['pairId']));}['_removeMissingPairs'](_0x1bf23a){const _0x75e528=new Set(_0x1bf23a['map'](_0x54b880=>_0x54b880['id']));for(let _0x363460=0x0;_0x363460<_0x1bf23a['length'];_0x363460++)_0x75e528['has'](_0x1bf23a[_0x363460]['pairId'])||0x0==_0x1bf23a[_0x363460]['distance']||(_0x1bf23a[_0x363460]['isIncorrect']=!0x0);return _0x1bf23a['filter'](_0x3b2afe=>!_0x3b2afe['isIncorrect']);}['_markMismatchedRemovedTags'](_0x5e132e){const _0x567c6c=new Set();for(let _0x23927b=0x0;_0x23927b<_0x5e132e['length'];_0x23927b++){if(_0x567c6c['has'](_0x5e132e[_0x23927b]['id'])&&_0x5e132e[_0x23927b]['isRemoved']&&(_0x5e132e[_0x23927b]['isIncorrect']=!0x0),_0x5e132e[_0x23927b]['isIncorrect'])continue;if(0x0==_0x5e132e[_0x23927b]['distance'])continue;if('elementStart'!=_0x5e132e[_0x23927b]['type'])continue;if(null==_0x5e132e[_0x23927b]['pairId'])continue;let _0xd8ce26=_0x23927b+0x1,_0x196140=0x0;for(;_0x5e132e[_0xd8ce26]['id']!=_0x5e132e[_0x23927b]['pairId'];)'elementStart'==_0x5e132e[_0xd8ce26]['type']?_0x196140++:'elementEnd'==_0x5e132e[_0xd8ce26]['type']&&_0x196140--,_0xd8ce26++;if(0x0!=_0x196140){if(_0x5e132e[_0x23927b]['isRemoved'])_0x5e132e[_0x23927b]['isIncorrect']=!0x0;else{for(;_0xd8ce26!=_0x23927b;)_0x5e132e[_0xd8ce26]['isRemoved']&&0x0!=_0x5e132e[_0xd8ce26]['distance']&&(_0x5e132e[_0xd8ce26]['isIncorrect']=!0x0,_0x567c6c['add'](_0x5e132e[_0xd8ce26]['pairId'])),_0xd8ce26--;}}}return _0x5e132e['filter'](_0x2aef67=>!_0x2aef67['isIncorrect']);}['_removeUnsupportedChanges'](_0x2615e8){const _0xa7602d=this['editor']['model']['schema'];for(let _0x2f8dea=0x0;_0x2f8dea<_0x2615e8['length'];_0x2f8dea++){if(!(_0x2615e8[_0x2f8dea]['isAdded']||_0x2615e8[_0x2f8dea]['isAddSuggestion']||_0x2615e8[_0x2f8dea]['isRemoved']||_0x2615e8[_0x2f8dea]['isRemoveSuggestion']))continue;if(0x0==_0x2615e8[_0x2f8dea]['distance'])continue;const _0x4c23ad=_0x2615e8[_0x2f8dea]['item'];_0xa7602d['isBlock'](_0x4c23ad)||_0xa7602d['isLimit'](_0x4c23ad)||(_0x2615e8[_0x2f8dea]['isAdded']&&delete _0x2615e8[_0x2f8dea]['isAdded'],_0x2615e8[_0x2f8dea]['isAddSuggestion']&&delete _0x2615e8[_0x2f8dea]['isAddSuggestion'],_0x2615e8[_0x2f8dea]['isRemoveSuggestion']&&delete _0x2615e8[_0x2f8dea]['isRemoveSuggestion'],_0x2615e8[_0x2f8dea]['isRemoved']&&(_0x2615e8[_0x2f8dea]['isIncorrect']=!0x0));}return _0x2615e8['filter'](_0x5b6e90=>!_0x5b6e90['isIncorrect']);}['_makeModelFromTape'](_0x377071,_0x4e7cc2,_0x283e67){const _0x916404=new _0x42921b(),_0x30fb5e=[],_0x25463d=new Map(),_0x40d64c=this['editor']['model'],_0x89b457=_0x40d64c['schema'],_0x2dce0d=[_0x916404],_0x181f15={},_0x211e2c={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x514688=null;const _0x30c990=[0x0];for(let _0x4727ea=0x0;_0x4727ea<_0x377071['length'];_0x4727ea++)if('elementStart'===_0x377071[_0x4727ea]['type']){_0x377071[_0x4727ea]['previousPosition']=_0x40d64c['createPositionFromPath'](_0x916404,_0x30c990);const _0x2b9db5=new _0x1c89c2(_0x377071[_0x4727ea]['item']['name'],_0x377071[_0x4727ea]['item']['getAttributes']());_0x2dce0d[0x0]['_appendChild'](_0x2b9db5),_0x30c990['push'](0x0),_0x2dce0d['unshift'](_0x2b9db5),_0x377071[_0x4727ea]['nextPosition']=_0x40d64c['createPositionFromPath'](_0x916404,_0x30c990);}else'elementEnd'===_0x377071[_0x4727ea]['type']?(_0x2dce0d['shift'](),_0x377071[_0x4727ea]['previousPosition']=_0x40d64c['createPositionFromPath'](_0x916404,_0x30c990),_0x30c990['pop'](),_0x30c990[_0x30c990['length']-0x1]++,_0x377071[_0x4727ea]['nextPosition']=_0x40d64c['createPositionFromPath'](_0x916404,_0x30c990)):(_0x377071[_0x4727ea]['previousPosition']=_0x40d64c['createPositionFromPath'](_0x916404,_0x30c990),_0x514688?_0x514688['_data']+=_0x377071[_0x4727ea]['item']['data']:_0x514688=new _0x213f4e(_0x377071[_0x4727ea]['item']['data'],_0x377071[_0x4727ea]['item']['getAttributes']()),_0x377071[_0x4727ea+0x1]&&'text'===_0x377071[_0x4727ea+0x1]['type']&&_0x21a654(_0x514688,_0x377071[_0x4727ea+0x1]['item'])||(_0x2dce0d[0x0]['_appendChild'](_0x514688),_0x514688=null),_0x30c990[_0x30c990['length']-0x1]+=_0x377071[_0x4727ea]['item']['offsetSize'],_0x377071[_0x4727ea]['nextPosition']=_0x40d64c['createPositionFromPath'](_0x916404,_0x30c990));for(let _0x17fd3c=0x0;_0x17fd3c<_0x377071['length'];_0x17fd3c++){const _0x2c4d5c=_0x377071[_0x17fd3c]['previousPosition'],_0x2b6ef3=_0x377071[_0x17fd3c]['nextPosition'];for(const _0x4441c5 of _0x377071[_0x17fd3c]['markersStart'])_0x25463d['set'](_0x4441c5,{'start':_0x2c4d5c,'end':null});_0x9b0c4b('isRemoveSuggestion',_0x17fd3c,_0x2c4d5c,_0x2b6ef3),_0x9b0c4b('isAddSuggestion',_0x17fd3c,_0x2c4d5c,_0x2b6ef3),_0x9b0c4b('isRemoved',_0x17fd3c,_0x2c4d5c,_0x2b6ef3),_0x9b0c4b('isAdded',_0x17fd3c,_0x2c4d5c,_0x2b6ef3);for(const _0xe0a761 of _0x377071[_0x17fd3c]['markersEnd']){const _0xfa47d3=_0x25463d['get'](_0xe0a761);_0xfa47d3?_0xfa47d3['end']=_0x2b6ef3:_0x25463d['set'](_0xe0a761,{'start':_0x2b6ef3,'end':_0x2b6ef3});}}for(const [_0x1d3e3e,_0x335e79]of _0x25463d){const _0xc6319=this['editor']['model']['createRange'](_0x335e79['start'],_0x335e79['end']);_0x916404['markers']['set'](_0x1d3e3e,_0xc6319);}return _0x30fb5e['sort']((_0x40b52b,_0xb48fee)=>{const _0x554ab7=_0x916404['markers']['get']('revision:'+_0x40b52b['id']),_0x53d0f2=_0x916404['markers']['get']('revision:'+_0xb48fee['id']);return _0x554ab7['start']['isBefore'](_0x53d0f2['start'])?-0x1:_0x554ab7['start']['isAfter'](_0x53d0f2['start'])?0x1:_0x554ab7['end']['isBefore'](_0x53d0f2['end'])?-0x1:_0x554ab7['end']['isAfter'](_0x53d0f2['end'])?0x1:'add'===_0x40b52b['type']?-0x1:0x1;}),{'root':_0x916404,'changes':_0x30fb5e};function _0x9b0c4b(_0x1dac61,_0x2db1bd,_0x3fe272,_0x27fc61){const _0x12ff0f=!!_0x377071[_0x2db1bd][_0x1dac61],_0x2a28e7=_0x12ff0f?_0x377071[_0x2db1bd][_0x1dac61]['userId']:null,_0x515e4a=_0x2db1bd===_0x377071['length']-0x1,_0x342606=_0x211e2c[_0x1dac61][0x0],_0x2d6c6b=_0x89b457['isObject'](_0x377071[_0x2db1bd]['item']);!_0x181f15[_0x1dac61]&&_0x12ff0f?_0x181f15[_0x1dac61]={'start':_0x3fe272,'tapeItem':_0x377071[_0x2db1bd],'userId':_0x2a28e7,'type':_0x1dac61}:_0x181f15[_0x1dac61]&&!_0x12ff0f?(_0x181f15[_0x1dac61]['end']=_0x3fe272,_0x27eb78(_0x181f15[_0x1dac61]),_0x181f15[_0x1dac61]=null):_0x181f15[_0x1dac61]&&_0x12ff0f&&_0x181f15[_0x1dac61]['userId']!==_0x2a28e7&&(_0x181f15[_0x1dac61]['end']=_0x3fe272,_0x342606&&_0x342606['userId']===_0x181f15[_0x1dac61]['userId']||_0x27eb78(_0x181f15[_0x1dac61]),_0x181f15[_0x1dac61]={'start':_0x3fe272,'tapeItem':_0x377071[_0x2db1bd],'userId':_0x2a28e7,'type':_0x1dac61}),_0x181f15[_0x1dac61]&&_0x2d6c6b&&('elementStart'!==_0x377071[_0x2db1bd]['type']||_0x342606&&_0x342606['userId']===_0x2a28e7||_0x211e2c[_0x1dac61]['unshift']({'userId':_0x2a28e7,'object':_0x377071[_0x2db1bd]['item'],'change':_0x181f15[_0x1dac61]}),'elementEnd'===_0x377071[_0x2db1bd]['type']&&_0x342606&&_0x342606['object']===_0x377071[_0x2db1bd]['item']&&(_0x211e2c[_0x1dac61]['shift'](),_0x181f15[_0x1dac61]=_0x342606['change'])),_0x181f15[_0x1dac61]&&_0x515e4a&&(_0x181f15[_0x1dac61]['end']=_0x27fc61,_0x27eb78(_0x181f15[_0x1dac61]),_0x181f15[_0x1dac61]=null);}function _0x27eb78({start:_0x412b07,end:_0x134aba,tapeItem:_0x28d058,userId:_0x10f786,type:_0x1d0c5c}){const _0x2c3c5d=_0x28d058['item'],_0x1c681e=_0x40d64c['schema']['isBlock'](_0x2c3c5d)&&!_0x40d64c['schema']['isLimit'](_0x2c3c5d),_0x29fc66=_0x412b07['nodeAfter']==_0x134aba['parent']&&_0x134aba['isAtStart'];if(_0x1c681e&&_0x29fc66)return;const _0x1e578f=_0x40d64c['createRange'](_0x412b07,_0x134aba),_0x1ed336=_0x4e7cc2['get'](_0x10f786),_0xae8c4e=new G({'author':_0x1ed336,'type':'isAdded'==_0x1d0c5c||'isAddSuggestion'==_0x1d0c5c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x1d0c5c||'isRemoveSuggestion'==_0x1d0c5c},'createdAt':new Date(),'rootName':_0x283e67});_0x30fb5e['push'](_0xae8c4e),_0x916404['markers']['set']('revision:'+_0xae8c4e['id'],_0x1e578f);}function _0x21a654(_0x461b3,_0x1324af){const _0x228183=_0x461b3['getAttributes'](),_0x36cb3a=_0x1324af['getAttributes']();for(const _0x1b8eaa of _0x228183){if(_0x1b8eaa[0x1]!==_0x1324af['getAttribute'](_0x1b8eaa[0x0]))return!0x1;_0x36cb3a['next']();}return _0x36cb3a['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x4be54c=>{const _0x119e4e=_0x4be54c['markerName']['split'](':')[0x1],_0x56351d=this['_getChangeFromId'](_0x119e4e);if(!_0x56351d)return null;const _0x4c960f='add'==_0x56351d['type']?'insertion':'deletion',_0x2d9f04=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4c960f];return _0x56351d['data']['isSuggestion']&&_0x2d9f04['push']('ck-suggestion-marker-'+_0x4c960f+'-new'),this['activeChange']==_0x56351d&&_0x2d9f04['push']('ck-suggestion-marker--active'),{'classes':_0x2d9f04,'attributes':{'data-change-id':_0x119e4e}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x54927a=>{_0x54927a['on']('element:pre',(_0x85b77e,_0x1bb27a,_0x4d2b46)=>{const _0x4ab3ae=_0x1bb27a['viewItem']['getChild'](0x0);if(!_0x4ab3ae||!_0x4ab3ae['is']('element','code'))return;if(!_0x4d2b46['consumable']['consume'](_0x4ab3ae,{'attributes':['vid_start','vid_end']}))return;const _0x427a58=_0x1bb27a['modelRange']['start']['nodeAfter'];_0x4d2b46['writer']['setAttribute']('vid_start',_0x4ab3ae['getAttribute']('vid_start'),_0x427a58),_0x4d2b46['writer']['setAttribute']('vid_end',_0x4ab3ae['getAttribute']('vid_end'),_0x427a58);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x4b5b57=>{_0x4b5b57['on']('element',(_0x21bed9,_0x11eaf3,_0x2c5892)=>{if(!_0x2c5892['consumable']['consume'](_0x11eaf3['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x11eaf3['modelRange']['isCollapsed'])return;const _0xdcdaaf=_0x11eaf3['modelRange']['start']['nodeAfter'];_0xdcdaaf['hasAttribute']('vid_start')||_0xdcdaaf['hasAttribute']('vid')||(_0x2c5892['writer']['setAttribute']('vid_start',_0x11eaf3['viewItem']['getAttribute']('vid_start'),_0xdcdaaf),_0x2c5892['writer']['setAttribute']('vid_end',_0x11eaf3['viewItem']['getAttribute']('vid_end'),_0xdcdaaf));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1dc6a4=>_0x1dc6a4['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x134893,[,_0x3ed86a])=>{['vid_start','vid_end','vid']['includes'](_0x3ed86a)&&(_0x134893['return']=!0x0,_0x134893['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1b8385=>{_0x1b8385['on']('attribute:vid',(_0x204e3d,_0x51ce98,_0x39d821)=>{if('\x20'!=_0x51ce98['item']['data']||_0x51ce98['item']['parent']['maxOffset']>0x1)return;if(!_0x39d821['consumable']['consume'](_0x51ce98['item'],_0x204e3d['name']))return;const _0x2ffff2=_0x39d821['writer'],_0x3e542a=_0x39d821['mapper']['toViewRange'](_0x51ce98['range']);_0x2ffff2['wrap'](_0x3e542a,_0x2ffff2['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x483f6d){const _0x40f6d4=_0x483f6d['plugins']['get']('RevisionViewer');return(_0x10533a,_0x4b1199,_0x4b33fa)=>{const _0x560247=_0x4b1199['markerName']['split'](':')[0x1],_0x5abc28=_0x40f6d4['_getChangeFromId'](_0x560247);if(!_0x5abc28)return null;const _0x1cf34d='add'==_0x5abc28['type']?'split':'merge';if(!_0x4b33fa['consumable']['test'](_0x4b1199['markerRange'],_0x10533a['name']))return;const _0x10c12d=_0x4b1199['markerRange']['getWalker'](),_0x5371c8=_0x4b1199['markerRange']['start'],_0x42883f=_0x483f6d['model']['schema'];let _0x5cf51d=null,_0x5a7318=null,_0x575204=!0x1,_0x25dc6a=!0x1;for(const _0x291f66 of _0x10c12d){const _0x30a0e0=_0x291f66['item'];_0x575204=_0x575204||_0x42883f['isContent'](_0x30a0e0);const _0x174186=_0x4b33fa['mapper']['toViewElement'](_0x30a0e0);if(_0x174186&&_0x174186['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x291f66['type']&&(_0x42883f['isBlock'](_0x30a0e0)&&!_0x42883f['isLimit'](_0x30a0e0)&&(_0x30a0e0['nextSibling']||_0x5371c8['isAtEnd']?_0x5cf51d&&_0x5cf51d['parent']==_0x30a0e0||(_0x5cf51d=_0x30a0e0,_0x235b09(_0x291f66['previousPosition']),_0x25dc6a=!0x0):_0x5a7318=_0x5a7318||_0x291f66['previousPosition']));}function _0x235b09(_0x4be18b){const _0x55aa99=_0x4b33fa['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1cf34d}),_0x2ce9f5=_0x4b33fa['mapper']['toViewPosition'](_0x4be18b);_0x5abc28['data']['isSuggestion']&&_0x4b33fa['writer']['addClass']('ck-suggestion-marker-'+_0x1cf34d+'-new',_0x55aa99),_0x40f6d4['activeChange']==_0x5abc28&&_0x4b33fa['writer']['addClass']('ck-suggestion-marker--active',_0x55aa99),_0x4b33fa['writer']['insert'](_0x2ce9f5,_0x55aa99),_0x4b33fa['mapper']['bindElementToMarker'](_0x55aa99,_0x4b1199['markerName']);}_0x575204||_0x25dc6a||!_0x5a7318||_0x235b09(_0x5a7318);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x4e0798,_0x1f892d,_0x579d20)=>{const _0x44aae7=_0x579d20['mapper']['markerNameToElements'](_0x1f892d['markerName']);if(_0x44aae7){for(const _0x3bf6fe of _0x44aae7)(_0x3bf6fe['hasClass']('ck-suggestion-marker-split')||_0x3bf6fe['hasClass']('ck-suggestion-marker-merge'))&&(_0x579d20['mapper']['unbindElementFromMarkerName'](_0x3bf6fe,_0x1f892d['markerName']),_0x579d20['writer']['remove'](_0x3bf6fe));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3c09b9,_0x3f80e3,_0x5c107d)=>{const _0x2bbab=_0x3f80e3['markerName']['split'](':')[0x1],_0x18c4c9=this['_getChangeFromId'](_0x2bbab);if(!_0x18c4c9)return null;const _0x274684='add'==_0x18c4c9['type']?'split':'merge';if(_0x5c107d['consumable']['test'](_0x3f80e3['markerRange'],_0x3c09b9['name']))for(const _0x8a3367 of _0x3f80e3['markerRange']['getItems']()){if(!_0x8a3367['is']('element','softBreak'))continue;const _0x3e894b=_0x5c107d['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x274684}),_0x1fde75=_0x5c107d['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x8a3367));_0x18c4c9['data']['isSuggestion']&&_0x5c107d['writer']['addClass']('ck-suggestion-marker-'+_0x274684+'-new',_0x3e894b),this['activeChange']==_0x18c4c9&&_0x5c107d['writer']['addClass']('ck-suggestion-marker--active',_0x3e894b),_0x5c107d['writer']['insert'](_0x1fde75,_0x3e894b),_0x5c107d['mapper']['bindElementToMarker'](_0x3e894b,_0x3f80e3['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4c1752=>{for(const _0x1776f7 of this['editor']['model']['document']['getRootNames']()){const _0x1e92ef=this['editor']['model']['document']['getRoot'](_0x1776f7),_0x4aaf99=this['editor']['editing']['view']['document']['getRoot'](_0x1776f7);if(_0x4aaf99){const _0x18452f=_0x1e92ef['getAttribute']('revisionHistoryAttachChange');if(_0x4c1752['removeAttribute']('data-change-id',_0x4aaf99),_0x4c1752['removeClass']('ck-revision-history-root-add',_0x4aaf99),_0x4c1752['removeClass']('ck-revision-history-root-remove',_0x4aaf99),_0x4c1752['removeClass']('ck-revision-history-root--active',_0x4aaf99),_0x18452f){const _0x70bef5=this['_getChangeFromId'](_0x18452f);if(!_0x70bef5)return null;_0x4c1752['setAttribute']('data-change-id',_0x18452f,_0x4aaf99),_0x4c1752['addClass']('ck-revision-history-root-'+_0x70bef5['type'],_0x4aaf99),this['activeChange']==_0x70bef5&&_0x4c1752['addClass']('ck-revision-history-root--active',_0x4aaf99);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x580e0e=>'revision-comment:'+_0x580e0e,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x143558=>'revision-suggestion:'+_0x143558,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x381a32=>({'name':'suggestion:'+_0x381a32,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x26b20a=>{const _0x31cffc=_0x26b20a['markerName']['split'](':')[0x1];return'insertion'!=_0x31cffc&&'deletion'!=_0x31cffc?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x31cffc]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1bbfca,_0x28a103,_0x3c3925)=>{const _0x1ce7f9=_0x3c3925['mapper']['markerNameToElements'](_0x28a103['markerName']);if(_0x1ce7f9){for(const _0x5501f3 of _0x1ce7f9)_0x5501f3['is']('uiElement')&&(_0x3c3925['mapper']['unbindElementFromMarkerName'](_0x5501f3,_0x28a103['markerName']),_0x3c3925['writer']['remove'](_0x5501f3));}},{'priority':'high'});}['_getChangeFromId'](_0x251984){return this['_changeIdToChange']['get'](_0x251984);}['_getViewForChange'](_0x2b5735){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x2b5735),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x59916d,_0x1817e5,_0x2f6179,_0x424dc8)=>{_0x424dc8&&this['_balloon']['remove'](_0x424dc8),_0x2f6179&&(this['_balloon']['add']({'view':_0x2f6179,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x598b7e=this['editor']['editing'],_0x36da88=this['_getChangeFromId'](_0x2f6179['changeId']);let _0x2b3b5d;if(_0x36da88['data']['isOnRoot']){const _0x2ea7c3=_0x598b7e['view']['getDomRoot'](_0x36da88['rootName']);_0x2b3b5d=Array['from'](_0x2ea7c3['getClientRects']());}else{const _0x560383=this['editor']['model']['markers']['get']('revision:'+_0x2f6179['changeId']);_0x2b3b5d=Array['from'](_0x598b7e['mapper']['markerNameToElements'](_0x560383['name']))['map'](_0x9d012=>_0x598b7e['view']['domConverter']['mapViewToDom'](_0x9d012))['map'](_0x3b84a2=>Array['from'](_0x3b84a2['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x2b3b5d[0x0];return _0x2b3b5d['find'](_0x2f794f=>_0x2f794f['top']-0x3<=this['_activeViewTarget']['y']&&_0x2f794f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2f794f['left']-0x3<=this['_activeViewTarget']['x']&&_0x2f794f['right']+0x3>=this['_activeViewTarget']['x'])||_0x2b3b5d[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x17b4aa,_0x150370,_0x5888fb,_0x11e21e)=>{this['activeView']=_0x5888fb?this['_getViewForChange'](_0x5888fb):null,this['editor']['model']['change'](()=>{const _0x45692c=this['editor']['editing'];_0x11e21e&&(_0x11e21e['data']['isOnRoot']?_0x45692c['view']['change'](_0x3b777f=>{_0x3b777f['removeClass']('ck-revision-history-root--active',_0x45692c['view']['document']['getRoot'](_0x11e21e['rootName']));}):_0x45692c['reconvertMarker']('revision:'+_0x11e21e['id'])),_0x5888fb&&(_0x5888fb['data']['isOnRoot']?_0x45692c['view']['change'](_0x5b22c1=>{_0x5b22c1['addClass']('ck-revision-history-root--active',_0x45692c['view']['document']['getRoot'](_0x5888fb['rootName']));}):_0x45692c['reconvertMarker']('revision:'+_0x5888fb['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x8aeab0,_0x2637d6)=>{if(this['activeChange'])return;const _0x58c675=this['_findChangeIdFromDomTarget'](_0x2637d6['target']),_0x33a9eb=this['_changeIdToChange']['get'](_0x58c675);_0x33a9eb?(this['_activeViewTarget']={'x':_0x2637d6['domEvent']['x'],'y':_0x2637d6['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x33a9eb)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4207cc,_0x322936)=>{const _0x15847d=this['_findChangeIdFromDomTarget'](_0x322936['target']),_0x38891c=this['_changeIdToChange']['get'](_0x15847d);_0x38891c?(this['_activeViewTarget']={'x':_0x322936['domEvent']['x'],'y':_0x322936['domEvent']['y']},_0x38891c===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x38891c):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x5ef5fa){do{const _0x1147d4=_0x5ef5fa['getAttribute']('data-change-id');if(_0x1147d4)return _0x1147d4;_0x5ef5fa=_0x5ef5fa['parent'];}while(_0x5ef5fa);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1545d0=>{for(const _0x2d5ae0 of this['editor']['model']['markers'])_0x1545d0['removeMarker'](_0x2d5ae0);});}}function Q(_0x3c22b4,_0x5b576b){return(_0x345da2,_0x50a428,_0x36c1d4)=>{if(!_0x36c1d4['consumable']['test'](_0x50a428['markerRange'],_0x345da2['name']))return;const _0x43b1aa=_0x50a428['markerRange']['getWalker'](),_0xc10e00=_0x50a428['markerRange']['start'],_0x8cc52c=_0x3c22b4['model']['schema'];let _0x1cd087=null,_0x16e26e=null,_0x5a5bd2=!0x1,_0x42ab39=!0x1;for(const _0x1eb71e of _0x43b1aa){const _0x46f570=_0x1eb71e['item'];_0x5a5bd2=_0x5a5bd2||_0x8cc52c['isContent'](_0x46f570);const _0x361052=_0x36c1d4['mapper']['toViewElement'](_0x46f570);if(_0x361052&&_0x361052['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1eb71e['type']&&(_0x8cc52c['isBlock'](_0x46f570)&&!_0x8cc52c['isLimit'](_0x46f570)&&(_0x46f570['nextSibling']||_0xc10e00['isAtEnd']?_0x1cd087&&_0x1cd087['parent']==_0x46f570||(_0x1cd087=_0x46f570,_0xde97d7(_0x1eb71e['previousPosition']),_0x42ab39=!0x0):_0x16e26e=_0x16e26e||_0x1eb71e['previousPosition']));}function _0xde97d7(_0x40bbff){const _0x4c81f8=_0x36c1d4['mapper']['toViewPosition'](_0x40bbff),_0x4be62e=_0x36c1d4['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5b576b});_0x36c1d4['writer']['insert'](_0x4c81f8,_0x4be62e),_0x36c1d4['mapper']['bindElementToMarker'](_0x4be62e,_0x50a428['markerName']);}_0x5a5bd2||_0x42ab39||!_0x16e26e||_0xde97d7(_0x16e26e);};}class nt extends _0x44fa3d{constructor(_0x12430d){super(_0x12430d);const _0x462765=_0x12430d['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0x462765,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x462765,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4c2728=this['editor'],_0x219190=_0x4c2728['plugins']['get'](l),_0x4966b8=_0x219190['isReady']?_0x219190['diff']['newRevisionId']:null;_0x4c2728['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4966b8);}['refresh'](){const {isReady:_0x425f39,isEnabled:_0x10f68d,repository:_0x21421c,diff:_0x105fc8}=this['editor']['plugins']['get'](l),_0x2c5245=_0x105fc8&&_0x21421c['getLaterVisibleRevision'](_0x105fc8['newRevisionId']);this['isEnabled']=_0x425f39&&_0x10f68d&&Boolean(_0x2c5245);}}class ot extends _0x44fa3d{['_step'];constructor(_0x1f9288,{direction:_0x22b4d4}){super(_0x1f9288);const _0x200cc4=_0x1f9288['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x22b4d4?0x1:-0x1,this['listenTo'](_0x200cc4,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x200cc4,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x200cc4,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x53a8cf=this['editor'],_0x162731=_0x53a8cf['plugins']['get'](l),{isNavigationMode:_0x42b94d,currentChangeNumber:_0x32bbe7}=_0x162731;let _0x2fe25c;if(_0x162731['activeChange']=_0x42b94d?_0x162731['diff']['changes']['get'](_0x32bbe7+this['_step']):_0x162731['diff']['changes']['first'],_0x162731['activeChange']['data']['isOnRoot'])_0x2fe25c=_0x53a8cf['editing']['view']['getDomRoot'](_0x162731['activeChange']['rootName']);else{const _0xabbcb5=_0x53a8cf['model']['markers']['get']('revision:'+_0x162731['activeChange']['id']);_0x2fe25c=_0x19750e(_0x53a8cf['editing'],_0xabbcb5);}_0x1c4b70({'target':_0x2fe25c,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x387b80,currentChangeNumber:_0x2e144b,numberOfChanges:_0x1cb0d1,isReady:_0x506da1,isEnabled:_0x200f4f}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x200f4f&&_0x506da1&&_0x1cb0d1)&&(!_0x387b80||(0x1===this['_step']?_0x2e144b<_0x1cb0d1-0x1:_0x2e144b>0x0));}}class xi extends _0x4691c3{constructor(_0x7b5bee){super(_0x7b5bee);const _0x180cc6=this['bindTemplate'],_0xf0a0c2=new _0x304d89(_0x7b5bee),_0x5efbc6=new _0x304d89(_0x7b5bee);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',(_0x204a64,_0xe93da7)=>_0x204a64&&_0xe93da7>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0xa0b61e,_0x47919d,_0x5b5012,_0x42cd14)=>{if(!_0xa0b61e)return R(_0x7b5bee,'Loading...');if(!_0x5b5012)return R(_0x7b5bee,'No\x20changes');const _0x4b87c0=R(_0x7b5bee,'NUMBER_OF_CHANGES',_0x5b5012);return _0x42cd14?R(_0x7b5bee,'X_OF_Y_CHANGES',[_0x47919d+0x1,_0x5b5012]):_0x4b87c0;}),_0xf0a0c2['set']({'label':R(_0x7b5bee,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3985f9}),_0x5efbc6['set']({'label':R(_0x7b5bee,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x2a9948}),_0xf0a0c2['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5efbc6['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xf0a0c2['on']('execute',()=>this['fire']('execute','backward')),_0x5efbc6['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',_0x180cc6['if']('_isStatusLabelVisible','ck-hidden',_0x44ef26=>!_0x44ef26)]},'children':[{'text':_0x180cc6['to']('isNavigationMode',_0x1128a3=>_0x1128a3?R(_0x7b5bee,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x7b5bee,'Total')+':\x20')}]},{'text':_0x180cc6['to']('_statusText')}]},new _0x41f145(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xf0a0c2,_0x5efbc6]}]});}}const ge='ck-editor__editable__loading-overlay';class Ri extends _0x5e8bcb{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4f8903=this['editor']['editing']['view'];_0x4f8903['change'](_0x1408aa=>{for(const _0x17682b of _0x4f8903['document']['roots'])_0x1408aa['addClass'](ge,_0x17682b);});}['hide'](){const _0x49e979=this['editor']['editing']['view'];_0x49e979['change'](_0x178a60=>{for(const _0x35303a of _0x49e979['document']['roots'])_0x178a60['removeClass'](ge,_0x35303a);});}}class u extends _0x5e8bcb{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,Ri];}['init'](){const _0x152d07=this['editor'],_0x59b9e4=_0x152d07['plugins']['get'](l),_0x528325=_0x152d07['plugins']['get'](Ri);_0x152d07['ui']['componentFactory']['add']('exitToEditing',_0x277f4f=>{const _0x53d09c=new _0x304d89(_0x277f4f);return _0x53d09c['set']({'label':R(_0x277f4f,'Back\x20to\x20editing'),'icon':_0x20ce7f,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x53d09c,'execute',()=>{_0x152d07['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x53d09c;}),_0x152d07['ui']['componentFactory']['add']('restoreRevision',_0x5b8e5b=>{const _0x212b17=new _0x304d89(_0x5b8e5b);return _0x212b17['set']({'label':R(_0x5b8e5b,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x212b17['bind']('isEnabled')['to'](_0x152d07['commands']['get']('restoreRevision')),this['listenTo'](_0x212b17,'execute',()=>_0x152d07['execute']('restoreRevision')),_0x212b17;}),_0x152d07['ui']['componentFactory']['add']('changesNavigation',_0x1cda5f=>{const _0x340e80=new xi(_0x1cda5f),_0x36b610=_0x152d07['commands']['get']('showPreviousChange'),_0x3ffd55=_0x152d07['commands']['get']('showNextChange');return _0x340e80['bind']('isBackwardNavigationEnabled')['to'](_0x36b610,'isEnabled'),_0x340e80['bind']('isForwardNavigationEnabled')['to'](_0x3ffd55,'isEnabled'),_0x340e80['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x59b9e4),this['listenTo'](_0x340e80,'execute',(_0x1fccca,_0x25751e)=>{_0x152d07['execute']('forward'===_0x25751e?'showNextChange':'showPreviousChange');}),_0x340e80;}),_0x528325['show'](),_0x59b9e4['on']('change:isReady',(_0x2fef3d,_0xea7e54,_0x961d6f)=>{_0x961d6f?_0x528325['hide']():_0x528325['show']();});}}class li extends _0x506965{['_resizeObserver']=null;constructor(_0x4a7e7f,_0x51beed){super(_0x4a7e7f,_0x51beed);const _0x5be69f=this['bindTemplate'];this['set']({'label':R(_0x4a7e7f,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x4a7e7f,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5be69f['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new et(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4f0c07=this['fieldView']['element'];this['_tooltipString']=_0x4f0c07['scrollWidth']>_0x4f0c07['clientWidth']&&_0x4f0c07['value']||'';}}class _i extends _0x4691c3{constructor(_0x61124b,_0x3abc76,_0x2d3af0){super(_0x61124b);const _0x37b05f=new _0xd894e8();_0x37b05f['set']({'content':_0x3d4b77,'viewBox':'0\x200\x2011\x2010'});const _0x55f4a4=['ck','ck-revision-history-sidebar__revision-author'];_0x2d3af0&&_0x55f4a4['push']('ck-revision-history-sidebar__revision-author_creator');const _0xfedb7a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x61124b,_0x2d3af0?'Revision\x20creator':'Revision\x20author')},'children':[_0x37b05f,_0x3abc76['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x55f4a4},'children':_0xfedb7a});}}function pi(_0x10eab2,_0x13e9e5){const _0x421234=_0x10eab2['bindTemplate'],_0x5e3334=_0x10eab2['locale'],_0x2d3e35=_0x5b24c1(_0x5e3334);_0x2d3e35['panelPosition']='sw';const _0x322312=function(_0x1ef89b,_0x424b95){const _0x326e67=function(_0x43fd18,_0x33c503){const _0x3fa421=_0x43fd18['locale'],_0x2a0f09={'Compare\x20against\x20selected':R(_0x3fa421,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x3fa421,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x3fa421,'Restore\x20this\x20revision')};return _0x33c503['map'](_0x4cd3ba=>{const _0x2bc561=_0x2a0f09[_0x4cd3ba['name']];return _0x2bc561&&_0x2bc561!==_0x4cd3ba['name']&&(_0x4cd3ba['name']=_0x2bc561),_0x4cd3ba;});}(_0x1ef89b,_0x424b95),_0x315190=new _0x3455f1();for(const _0x36e2c8 of _0x326e67){const _0x160e02={'type':'button','model':new to({'label':_0x36e2c8['name'],'class':_0x36e2c8['class'],'withText':!0x0,'role':'menuitem','_action':_0x36e2c8['action']})};_0x160e02['model']['bind']('isEnabled')['to'](_0x1ef89b,'isActionsDropdownOpen',_0x23d213=>'function'!=typeof _0x36e2c8['isEnabled']||(!_0x23d213||_0x36e2c8['isEnabled'](_0x1ef89b))),_0x315190['add'](_0x160e02);}return _0x315190;}(_0x10eab2,_0x13e9e5);return _0x10eab2['bind']('isActionsDropdownOpen')['to'](_0x2d3e35,'isOpen'),_0x2d3e35['buttonView']['set']({'label':R(_0x5e3334,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x21ffc2}),_0x2d3e35['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x421234['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x421234['to'](_0x49a271=>_0x49a271['stopPropagation']())}}),_0x2d3e35['on']('execute',_0x3ab8ea=>{_0x10eab2['isReady']&&'function'==typeof _0x3ab8ea['source']['_action']&&_0x3ab8ea['source']['_action'](_0x10eab2);}),_0x24538a(_0x2d3e35,_0x322312,{'role':'menu'}),_0x2d3e35['listenTo'](_0x10eab2,'change:isActionsDropdownOpen',(_0x45f9ef,_0x2ad5b8,_0x1af17d)=>{if(_0x1af17d)for(const _0x236e93 of _0x2d3e35['listView']['items']){const _0x13339a=_0x236e93['children']['first'],_0x188994=_0x13e9e5['find'](_0x35e3dc=>_0x35e3dc['action']===_0x13339a['_action'])['isVisible'];_0x236e93['isVisible']=void 0x0===_0x188994||_0x188994(_0x10eab2);}}),_0x2d3e35;}class ei extends/* #__PURE__ -- @preserve */
27
+ _0x4de50b(_0x4691c3){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x383854,_0x384144,_0x563881,_0x15c1bd){super(_0x383854);const _0x3f235f=this['bindTemplate'],_0x96a833=function(_0x289b93,_0x3f3a8e){const _0x4b5186=Array['from'](_0x3f3a8e['authors'])['filter'](_0x2bf5ff=>_0x2bf5ff!=_0x3f3a8e['creator']);return _0x3f3a8e['creator']&&_0x4b5186['unshift'](_0x3f3a8e['creator']),_0x4b5186['map'](_0x2f5a33=>new _i(_0x289b93,_0x2f5a33,_0x2f5a33==_0x3f3a8e['creator']));}(_0x383854,_0x384144);this['id']=_0x384144['id'],this['_revision']=_0x384144,this['_requireRevisionName']=_0x15c1bd,this['bind']('name','createdAt')['to'](_0x384144),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x19d2d=>{return _0x33168a=_0x383854['uiLanguage'],(_0x74148f=_0x19d2d)['toLocaleDateString'](_0x33168a,{'month':'long','day':'numeric'})+',\x20'+_0x74148f['toLocaleTimeString'](_0x33168a,{'hour':'numeric','minute':'numeric'});var _0x33168a,_0x74148f;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new li(_0x383854,_0x1340c0),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x13a810=>_0x13a810||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x1ac089,_0x417251)=>_0x1ac089&&_0x417251),this['revisionActionsView']=_0x563881&&_0x563881['length']?pi(this,_0x563881):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x3f235f['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x3f235f['if']('isEnabled','ck-disabled',_0x51c8a8=>!_0x51c8a8),_0x3f235f['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x3f235f['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x3f235f['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':_0x3f235f['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':_0x96a833}]},this['revisionActionsView']],'on':{'click':_0x3f235f['to'](_0x127bb7=>{_0x127bb7['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x35448b=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x35448b,'change',()=>{this['_requireRevisionName']&&!_0x35448b['value']||this['fire']('setName',{'id':this['id'],'name':_0x35448b['value']}),_0x35448b['value']||(_0x35448b['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ti(_0x5ea0b6,_0x14b133){const _0x607bc6=_0x4ca622['fromJSDate'](_0x5ea0b6)['setLocale'](_0x14b133),_0x438ca7=_0x4ca622['local'](),_0x2f1e3a=_0x438ca7['minus']({'days':0x1})['startOf']('day');let _0x4bac4d,_0x9bd998;return _0x607bc6['hasSame'](_0x438ca7,'day')?(_0x4bac4d=_0x607bc6['startOf']('day')['toJSDate'](),_0x9bd998=_0x607bc6['toRelativeCalendar']()):_0x607bc6['hasSame'](_0x2f1e3a,'day')?(_0x4bac4d=_0x2f1e3a['toJSDate'](),_0x9bd998=_0x607bc6['toRelativeCalendar']()):_0x607bc6['hasSame'](_0x438ca7,'week')?(_0x4bac4d=_0x607bc6['startOf']('week')['toJSDate'](),_0x9bd998=_0x607bc6['weekdayLong']||''):_0x607bc6['hasSame'](_0x438ca7,'year')?(_0x4bac4d=_0x607bc6['startOf']('month')['toJSDate'](),_0x9bd998=_0x607bc6['monthLong']||''):(_0x4bac4d=_0x607bc6['startOf']('year')['toJSDate'](),_0x9bd998=String(_0x607bc6['year'])),{'startDate':_0x4bac4d,'localizedPeriodName':_0x9bd998};}class ri extends _0x4691c3{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3381fc,_0x5bd608,_0x36ce2f,_0x3fc429){super(_0x3381fc);const _0xf9378d=ti(_0x5bd608,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5bd608,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x36ce2f,this['_requireRevisionName']=_0x3fc429,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':_0xf9378d}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x13b8ed){const _0x221ae4=new ei(this['locale'],_0x13b8ed,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x221ae4);}['removeRevision'](_0x1981a0){const _0x2fe154=this['revisionViews']['find'](_0x528fc1=>_0x528fc1['id']===_0x1981a0['id']);this['revisionViews']['remove'](_0x2fe154);}}class oi extends _0x4691c3{constructor(_0x3ea17c){super(_0x3ea17c);const _0x4167ac=new _0xd894e8();_0x4167ac['content']=_0x5e53f9,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x4167ac,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x3ea17c,'Revision\x20history')]}]});}}class si extends _0x4691c3{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4c1b27,_0x5d117d,_0x2fb82b,_0x1cdfb6){super(_0x4c1b27);const _0x1e0de1=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x5d117d,this['_revisionActions']=_0x2fb82b,this['_requireRevisionName']=_0x1cdfb6,this['on']('select',(_0xc1ef46,_0xd809c1)=>{this['fire']('revisionSelected',_0xd809c1);}),this['on']('setName',(_0x46eef9,_0x20eaac)=>{this['fire']('revisionSetName',_0x20eaac);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new oi(_0x4c1b27),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x1e0de1['if']('isEnabled','ck-disabled',_0x1e20ed=>!_0x1e20ed)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x5f4826 of this['_revisions'])this['_addRevision'](_0x5f4826);this['_revisions']['on']('add',(_0x435d57,_0x39ea60)=>{this['_addRevision'](_0x39ea60);}),this['_revisions']['on']('remove',(_0x223d69,_0x7079f3)=>{this['_removeRevision'](_0x7079f3);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x18630e=>_0x18630e['revisionViews']['map'](_0x5c2d3a=>_0x5c2d3a))['flat']();}['selectRevision'](_0x17b77f){for(const _0x338dd5 of this['revisionViews'])_0x17b77f&&_0x17b77f['id']===_0x338dd5['id']?_0x338dd5['select']():_0x338dd5['deselect']();}['highlightRevisions'](_0x20305a){for(const _0xf7d9c2 of this['revisionViews'])_0x20305a['some'](({id:_0x3ccd13})=>_0x3ccd13===_0xf7d9c2['id'])?_0xf7d9c2['highlight']():_0xf7d9c2['unhighlight']();}['_addRevision'](_0x55996c){const _0x1a3825=ti(_0x55996c['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x31b287=this['timePeriodViews']['get'](0x0);_0x31b287&&_0x31b287['startDate']['getTime']()===_0x1a3825['getTime']()||(_0x31b287=new ri(this['locale'],_0x1a3825,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x31b287)),_0x31b287['addRevision'](_0x55996c);}['_removeRevision'](_0x15a3d7){const _0x10f143=ti(_0x15a3d7['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x10f143)['removeRevision'](_0x15a3d7);}['_getTimePeriodViewByStartDate'](_0x533d41){return this['timePeriodViews']['find'](_0x51b8f1=>_0x51b8f1['startDate']['getTime']()===_0x533d41['getTime']());}}class f extends _0x5e8bcb{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}constructor(_0x524e7e){super(_0x524e7e),this['_revisionViewer']=_0x524e7e['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x405d7c=this['_revisionsRepository']['_revisions'],_0x27c139=this['_createRevisionActions'](),_0x6025e9=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Ri(this['editor']['locale'],_0x405d7c,_0x27c139,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',(_0x2fa0b6,_0x52f9b6)=>{_0x52f9b6['revisionViews']['on']('add',(_0x187612,_0x5b41f8)=>{_0x5b41f8['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)),_0x6025e9['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x4cd43d=this['_revisionsRepository']['getRevision'](0x0);if(_0x4cd43d){const _0x4016e1=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4cd43d['id']);this['_revisionViewer']['compare'](_0x4cd43d,_0x4016e1);}}['_handleRevisionSelected'](_0x265846,_0x19881a){const _0x199c9d=this['_revisionsRepository']['getRevision'](_0x19881a['id']),_0x2b0213=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x199c9d['id']);this['_revisionViewer']['compare'](_0x199c9d,_0x2b0213);}['_handleRevisionSetName'](_0x10dd61,_0xeded41){this['_revisionsRepository']['getRevision'](_0xeded41['id'])['setName'](_0xeded41['name']);}['_handleDiffChange'](_0x3cd44f,_0x4687bf,_0x1bd172){const _0x592118=this['_revisionsRepository']['getRevisionsInDiff'](_0x1bd172);_0x592118['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x592118),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x592118[0x0]));}['_createRevisionActions'](){const _0xb6470f=this['editor'],_0x3b5f05=f['availableRevisionActions'],_0x3166f3=_0xb6470f['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0x3166f3['length'])return _0x3166f3['map'](_0x556eae=>{const _0x17d678='string'==typeof _0x556eae?Object['assign']({},_0x3b5f05[_0x556eae]):_0x556eae;return _0x17d678['action']=_0x17d678['action']['bind'](this,_0xb6470f),_0x17d678['isVisible']&&(_0x17d678['isVisible']=_0x17d678['isVisible']['bind'](this,_0xb6470f)),_0x17d678;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x5807cb},_0x5ec25d)=>{const _0x3c669f=_0x5807cb['get'](l),_0x58f1b8=_0x3c669f['repository'];let _0x57fe6e=_0x3c669f['diff']['newRevisionId'],_0x24fa8e=_0x5ec25d['id'];_0x58f1b8['getIndex'](_0x57fe6e)>_0x58f1b8['getIndex'](_0x24fa8e)&&([_0x57fe6e,_0x24fa8e]=[_0x24fa8e,_0x57fe6e]),_0x3c669f['compare'](_0x57fe6e,_0x24fa8e);},'isVisible':({plugins:_0x3e6075},_0x3f7a4c)=>{const _0x5bd35e=_0x3e6075['get'](l);return!(_0x5bd35e['repository']['getRevisionsInDiff'](_0x5bd35e['diff'])['length']>0x2)&&!_0x3f7a4c['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x5dcd4b,{id:_0x24e9c2})=>{_0x5dcd4b['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x24e9c2);},'isVisible':({plugins:_0x1ca36b},_0x226cfb)=>!!_0x1ca36b['get'](l)['repository']['getLaterVisibleRevision'](_0x226cfb['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x42e222},{id:_0x467172,revisionNameView:_0x32f70b})=>{const _0x416d3a=_0x42e222['get'](l),_0x2571de=_0x416d3a['repository']['getEarlierVisibleRevision'](_0x467172);_0x416d3a['compare'](_0x467172,_0x2571de),_0x32f70b['focus'](),_0x32f70b['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x3f3cbc,_0x157b8d){super(_0x3f3cbc),this['_view']=_0x157b8d,this['_toolbarConfig']=st(_0x3f3cbc['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x209490){const _0x1bd5bd=this['editor'],_0xd4ad51=this['view'],_0xedb73c=_0x1bd5bd['editing']['view'],_0x36bb8c=_0xd4ad51['editable'],_0x499265=_0xedb73c['document']['getRoot']();_0x36bb8c['name']=_0x499265['rootName'],_0xd4ad51['render']();const _0x1a5e60=_0x36bb8c['element'];this['setEditableElement'](_0x36bb8c['name'],_0x1a5e60),_0xd4ad51['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xedb73c['attachDomRoot'](_0x1a5e60),this['_elementReplacer']['replace'](_0x209490,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x969b2a=this['view'],_0x546d9a=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x546d9a['detachDomRoot'](_0x969b2a['editable']['name']),_0x969b2a['destroy']();}['_initToolbar'](){const _0x154107=this['view'];_0x154107['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x154107['stickyPanel']['limiterElement']=_0x154107['element'],_0x154107['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x50cdbd})=>_0x50cdbd),_0x154107['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x154107['toolbar']);}}class ii extends _0x183434{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x1cd78e,_0x26f9ac,_0x258db4={}){super(_0x1cd78e),this['stickyPanel']=new _0x4f4a3a(_0x1cd78e),this['toolbar']=new _0x10ea70(_0x1cd78e,{'shouldGroupWhenFull':_0x258db4['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x1cd78e,_0x26f9ac);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class m extends/* #__PURE__ -- @preserve */
30
- _0x5f17a6(_0x3d9918){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5bc01c,_0x23bd2e){super(_0x23bd2e),this['sourceElement']=_0x5bc01c,this['model']['document']['createRoot']();const _0xa0484=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0xa0484);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x2b7c6c,_0x340231){const _0x18a730=new this(_0x2b7c6c,_0x340231);return await _0x18a730['initPlugins'](),await _0x18a730['ui']['init'](_0x2b7c6c),await _0x18a730['data']['init'](_0x18a730['config']['get']('initialData')||''),_0x18a730['fire']('ready'),_0x18a730;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class ht extends _0x44d0e2{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20888d){function _0x116882(_0x2a1294){return _0x2a1294['map'](_0x3a795d=>String['fromCharCode'](_0x3a795d))['join']('');}super(_0x20888d),this['result']='end',_0x20888d[_0x116882([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x116882([0x76,0x69,0x65,0x77])][_0x116882([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x116882([0x61,0x75,0x74,0x6f]),_0x20888d[_0x116882([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x116882([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x116882([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x116882([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x116882([0x6f,0x6b])});}}class ct extends _0x44d0e2{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x3b7af7){if(super(_0x3b7af7),!this['editor']['config']['get']('revisionHistory'))throw new _0x1f8480('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x7f9028=>this['_showRevisionViewer']({..._0x7f9028,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x5ca04b=>this['_closeRevisionViewer'](_0x5ca04b)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x55445e=>this['_restoreRevision'](_0x55445e)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x4b2cae){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4b2cae;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3983fe){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3983fe);}['getRevision'](_0x2213cc){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x2213cc);}['getRevisions'](_0x246def){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x246def||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x1cda25=this['editor'],_0x269265=_0x2c8308(_0x1cda25,d),_0x27306e=_0x1cda25['plugins']['get']('RevisionTracker'),_0x33b8e3=_0x1cda25['plugins']['get']('Users')['users'];return _0x269265['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x269265['lazyRoots'],(_0x269265['plugins']['push'](ht,l,u,class extends _0x44d0e2{static get['requires'](){return[l,'Users'];}['init'](){const _0x181ce5=this['editor']['plugins']['get']('Users');for(const _0x49210b of _0x33b8e3)_0x49210b['isAnonymous']||_0x181ce5['getUser'](_0x49210b['id'])||_0x181ce5['addUser'](_0x49210b);const _0x193b1e=_0x27306e['repository']['getRevisions']();let _0x5bf725=null;const _0x2a6be2=this['editor']['plugins']['get']('RevisionViewer');_0x2a6be2['adapter']=_0x27306e['adapter'],_0x2a6be2['bind']('isEnabled')['to'](_0x27306e),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x1cda25,'isReadOnly',_0x43ffdc=>!_0x43ffdc);for(const _0x2de766 of _0x193b1e){const _0x178dee=null===_0x2de766['creator'];if(_0x178dee&&_0x2de766['toVersion']===_0x2de766['fromVersion'])continue;const _0x4d72ac=_0x2de766['toJSON']();_0x2a6be2['addRevisionData'](_0x4d72ac,(_0x2b00ee,_0x47e180,_0x1919d2)=>{if(_0x178dee){if(_0x5bf725)_0x5bf725['_update'](_0x2b00ee,_0x47e180);else{if(!_0x47e180){const _0x57bf99=_0x1919d2['toJSON']();_0x57bf99['id']=_0x119620(),_0x27306e['saveRevision'](_0x57bf99,_0x1919d2['toVersion'])['then'](_0x4c4a26=>{_0x5bf725=_0x4c4a26;});}}}else _0x2de766['_update'](_0x2b00ee,_0x47e180);});}}},f),_0x269265);}['_enhanceShowRevisionViewerCallback'](){const _0x50a6eb=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4cad22=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x15c929=this['editor']['plugins']['get']('Autosave');await _0x15c929['save']();}else await _0x4cad22['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0xf81a21=this['editor']['plugins']['get']('Dialog');_0xf81a21['isOpen']&&_0xf81a21['hide']();}const _0x462554=this['_getRevisionViewerEditorConfig']();return _0x50a6eb(_0x462554)['then'](_0x15340e=>{return(this['_viewerEditor']=_0x15340e,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x15340e);})['catch'](_0x2096fb=>(console['error'](_0x2096fb),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x27f0ac=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x27f0ac(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xd9573e=this['editor']['plugins']['get']('Annotations');_0xd9573e['refreshVisibility'](),_0xd9573e['refreshPositioning']();}})));}['_showRevisionViewer'](_0x3e2f4c){const _0x24e0fd=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2e97ec=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3c5932=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x3c5932,_0x3e2f4c)['then'](_0x16aa01=>(_0x2e97ec['style']['display']='block',_0x24e0fd['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x16aa01));}['_closeRevisionViewer'](_0x3bdab9){const _0x45b647=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x45b647['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x3bdab9['destroy']();}async['_restoreRevision'](_0x4fdb63){const _0x39525b=this['editor'],_0x3fce01=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x59a4a8=_0x39525b['plugins']['get']('RevisionTracker'),_0x26b8a9=_0x39525b['plugins']['get']('RevisionHistoryUtils'),_0x2fee78=_0x3fce01['repository']['getRevision'](_0x4fdb63);let _0x2f868d,_0x55f084,_0x4b9d9f;try{await _0x26b8a9['loadRevisionData'](_0x2fee78,this['adapter']),_0x2f868d=_0x26b8a9['getRevisionDocumentData'](_0x2fee78),_0x55f084=_0x26b8a9['getRevisionRootsAttributes'](_0x2fee78);}catch(_0x292277){return void console['error'](_0x292277);}_0x39525b['model']['change'](_0x7e22d5=>{for(const _0x5b83ad of Array['from'](_0x39525b['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x7e22d5['removeMarker'](_0x5b83ad);}),_0x3fce01['isReady']=!0x1,_0x39525b['model']['enqueueChange'](_0x1ffab1=>{_0x1ffab1['setSelection'](null),_0x1ffab1['removeSelectionAttribute'](_0x39525b['model']['document']['selection']['getAttributeKeys']());const _0x5de034=Object['keys'](_0x2f868d);for(const _0x2a71e3 of _0x39525b['model']['document']['roots'])'$graveyard'!=_0x2a71e3['rootName']&&_0x2a71e3['isAttached']()&&!_0x5de034['includes'](_0x2a71e3['rootName'])&&_0x1ffab1['detachRoot'](_0x2a71e3);for(const _0x40c566 of _0x5de034){let _0xb03ab2=_0x39525b['model']['document']['getRoot'](_0x40c566);_0xb03ab2&&_0xb03ab2['isAttached']()||(_0xb03ab2=_0x1ffab1['addRoot'](_0x40c566));const _0x2c9e23=_0x55f084[_0x40c566],_0x2f7821=Object['keys'](_0x2c9e23),_0x1e5eb4=_0x2f868d[_0x40c566];for(const _0x458319 of _0xb03ab2['getAttributeKeys']())_0x2f7821['includes'](_0x458319)||_0x1ffab1['removeAttribute'](_0x458319,_0xb03ab2);for(const _0x526c65 of _0x2f7821)_0x1ffab1['setAttribute'](_0x526c65,_0x55f084[_0x40c566][_0x526c65],_0xb03ab2);_0x1ffab1['remove'](_0x1ffab1['createRangeIn'](_0xb03ab2)),_0x1ffab1['insert'](_0x39525b['data']['parse'](_0x1e5eb4,_0xb03ab2),_0xb03ab2,0x0);}});const _0x27a7b3=R(_0x39525b['locale'],'Restored');if(_0x2fee78['name'])_0x4b9d9f=-0x1==_0x2fee78['name']['indexOf'](_0x27a7b3)?_0x27a7b3+':\x20'+_0x2fee78['name']:_0x2fee78['name'];else _0x4b9d9f=_0x27a7b3+':\x20'+(_0x2fee78['createdAt']['toLocaleDateString'](_0x39525b['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x2fee78['createdAt']['toLocaleTimeString'](_0x39525b['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x59a4a8['saveRevision']({'name':_0x4b9d9f}),_0x3fce01['isReady']=!0x0,_0x39525b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,v as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,l as RevisionViewer,m as RevisionViewerEditor,ht as RevisionViewerIntegration,bi as RevisionViewerLoadingOverlay,u as RevisionViewerUI,S as RevisionsRepository,f as RevisionsSidebar,rt as ShowChangeCommand};
29
+ rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}constructor(_0x3e7c8d){super(_0x3e7c8d),this['_revisionViewer']=_0x3e7c8d['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1bd1a9=this['_revisionsRepository']['_revisions'],_0x17e61a=this['_createRevisionActions'](),_0x136efe=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new si(this['editor']['locale'],_0x1bd1a9,_0x17e61a,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',(_0x3a2ab6,_0x25e652)=>{_0x25e652['revisionViews']['on']('add',(_0x483980,_0x1089c0)=>{_0x1089c0['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)),_0x136efe['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x1c5569=this['_revisionsRepository']['getRevision'](0x0);if(_0x1c5569){const _0x1d1951=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1c5569['id']);this['_revisionViewer']['compare'](_0x1c5569,_0x1d1951);}}['_handleRevisionSelected'](_0x30bf05,_0x21de4e){const _0x6a3cf8=this['_revisionsRepository']['getRevision'](_0x21de4e['id']),_0x151969=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x6a3cf8['id']);this['_revisionViewer']['compare'](_0x6a3cf8,_0x151969);}['_handleRevisionSetName'](_0x138af8,_0x3a263){this['_revisionsRepository']['getRevision'](_0x3a263['id'])['setName'](_0x3a263['name']);}['_handleDiffChange'](_0x8e8802,_0x3d99e8,_0x289c53){const _0x399228=this['_revisionsRepository']['getRevisionsInDiff'](_0x289c53);_0x399228['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x399228),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x399228[0x0]));}['_createRevisionActions'](){const _0x2c2d57=this['editor'],_0x269cf6=f['availableRevisionActions'],_0x4cde85=_0x2c2d57['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0x4cde85['length'])return _0x4cde85['map'](_0x15626f=>{const _0x1c7645='string'==typeof _0x15626f?Object['assign']({},_0x269cf6[_0x15626f]):_0x15626f;return _0x1c7645['action']=_0x1c7645['action']['bind'](this,_0x2c2d57),_0x1c7645['isVisible']&&(_0x1c7645['isVisible']=_0x1c7645['isVisible']['bind'](this,_0x2c2d57)),_0x1c7645;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x1ef5ea},_0x5ba86b)=>{const _0x2e33e2=_0x1ef5ea['get'](l),_0x57f1dd=_0x2e33e2['repository'];let _0x11b3e7=_0x2e33e2['diff']['newRevisionId'],_0x1595cd=_0x5ba86b['id'];_0x57f1dd['getIndex'](_0x11b3e7)>_0x57f1dd['getIndex'](_0x1595cd)&&([_0x11b3e7,_0x1595cd]=[_0x1595cd,_0x11b3e7]),_0x2e33e2['compare'](_0x11b3e7,_0x1595cd);},'isVisible':({plugins:_0x56b34c},_0x47c217)=>{const _0x305244=_0x56b34c['get'](l);return!(_0x305244['repository']['getRevisionsInDiff'](_0x305244['diff'])['length']>0x2)&&!_0x47c217['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x230887,{id:_0x4c7360})=>{_0x230887['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4c7360);},'isVisible':({plugins:_0x23f9ed},_0xfca6ad)=>!!_0x23f9ed['get'](l)['repository']['getLaterVisibleRevision'](_0xfca6ad['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x449c2d},{id:_0x8e5d0a,revisionNameView:_0x5627aa})=>{const _0x215cb0=_0x449c2d['get'](l),_0x42d1ea=_0x215cb0['repository']['getEarlierVisibleRevision'](_0x8e5d0a);_0x215cb0['compare'](_0x8e5d0a,_0x42d1ea),_0x5627aa['focus'](),_0x5627aa['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x430519,_0x49b0bc){super(_0x430519),this['_view']=_0x49b0bc,this['_toolbarConfig']=st(_0x430519['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x15e959){const _0x26b8a2=this['editor'],_0x5cd424=this['view'],_0x1440b7=_0x26b8a2['editing']['view'],_0x1816aa=_0x5cd424['editable'],_0x336837=_0x1440b7['document']['getRoot']();_0x1816aa['name']=_0x336837['rootName'],_0x5cd424['render']();const _0x2b59ca=_0x1816aa['element'];this['setEditableElement'](_0x1816aa['name'],_0x2b59ca),_0x5cd424['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1440b7['attachDomRoot'](_0x2b59ca),this['_elementReplacer']['replace'](_0x15e959,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x5db330=this['view'],_0x2b6d7f=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x2b6d7f['detachDomRoot'](_0x5db330['editable']['name']),_0x5db330['destroy']();}['_initToolbar'](){const _0x1ba5dd=this['view'];_0x1ba5dd['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x1ba5dd['stickyPanel']['limiterElement']=_0x1ba5dd['element'],_0x1ba5dd['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x1f3b85})=>_0x1f3b85),_0x1ba5dd['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x1ba5dd['toolbar']);}}class ii extends _0x313843{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x4e743c,_0x5d0718,_0x578618={}){super(_0x4e743c),this['stickyPanel']=new _0x436b55(_0x4e743c),this['toolbar']=new _0x3a21fd(_0x4e743c,{'shouldGroupWhenFull':_0x578618['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x4e743c,_0x5d0718);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class m extends/* #__PURE__ -- @preserve */
30
+ _0x489004(_0x1f4a2c){['_ui'];get['ui'](){return this['_ui'];}constructor(_0xe9cf5d,_0xafc357){super(_0xafc357),this['sourceElement']=_0xe9cf5d,this['model']['document']['createRoot']();const _0x3ef2fa=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x3ef2fa);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x24d6d7,_0x519ddb){const _0x2f268e=new this(_0x24d6d7,_0x519ddb);return await _0x2f268e['initPlugins'](),await _0x2f268e['ui']['init'](_0x24d6d7),await _0x2f268e['data']['init'](_0x2f268e['config']['get']('initialData')||''),_0x2f268e['fire']('ready'),_0x2f268e;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class at extends _0x5e8bcb{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2bb341){function _0x11f9f0(_0x4ecb98){return _0x4ecb98['map'](_0xfe0508=>String['fromCharCode'](_0xfe0508))['join']('');}super(_0x2bb341),this['result']='end',_0x2bb341[_0x11f9f0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x11f9f0([0x76,0x69,0x65,0x77])][_0x11f9f0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x11f9f0([0x61,0x75,0x74,0x6f]),_0x2bb341[_0x11f9f0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x11f9f0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x11f9f0([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x11f9f0([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x11f9f0([0x6f,0x6b])});}}class ht extends _0x5e8bcb{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x38b325){if(super(_0x38b325),!this['editor']['config']['get']('revisionHistory'))throw new _0xe7e073('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x1262d7=>this['_showRevisionViewer']({..._0x1262d7,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x35ecab=>this['_closeRevisionViewer'](_0x35ecab)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xaf2a7b=>this['_restoreRevision'](_0xaf2a7b)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x30a5ee){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x30a5ee;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x42bc1c){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x42bc1c);}['getRevision'](_0x28b1f9){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x28b1f9);}['getRevisions'](_0x2f4156){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2f4156||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x578497=this['editor'],_0x2aaac4=_0x13bb37(_0x578497,d),_0x3dc542=_0x578497['plugins']['get']('RevisionTracker'),_0x599ff6=_0x578497['plugins']['get']('Users')['users'];return _0x2aaac4['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2aaac4['lazyRoots'],(_0x2aaac4['plugins']['push'](at,l,u,class extends _0x5e8bcb{static get['requires'](){return[l,'Users'];}['init'](){const _0x7ed615=this['editor']['plugins']['get']('Users');for(const _0x455efd of _0x599ff6)_0x455efd['isAnonymous']||_0x7ed615['getUser'](_0x455efd['id'])||_0x7ed615['addUser'](_0x455efd);const _0x47ff5a=_0x3dc542['repository']['getRevisions']();let _0x97aef1=null;const _0x11a08e=this['editor']['plugins']['get']('RevisionViewer');_0x11a08e['adapter']=_0x3dc542['adapter'],_0x11a08e['bind']('isEnabled')['to'](_0x3dc542),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x578497,'isReadOnly',_0xac0b00=>!_0xac0b00);for(const _0x50b20b of _0x47ff5a){const _0x4adec3=null===_0x50b20b['creator'];if(_0x4adec3&&_0x50b20b['toVersion']===_0x50b20b['fromVersion'])continue;const _0xaeeba5=_0x50b20b['toJSON']();_0x11a08e['addRevisionData'](_0xaeeba5,(_0x51997b,_0x1b7526,_0x1332fb)=>{if(_0x4adec3){if(_0x97aef1)_0x97aef1['_update'](_0x51997b,_0x1b7526);else{if(!_0x1b7526){const _0x2e882e=_0x1332fb['toJSON']();_0x2e882e['id']=_0x4de09f(),_0x3dc542['saveRevision'](_0x2e882e,_0x1332fb['toVersion'])['then'](_0x558412=>{_0x97aef1=_0x558412;});}}}else _0x50b20b['_update'](_0x51997b,_0x1b7526);});}}},f),_0x2aaac4);}['_enhanceShowRevisionViewerCallback'](){const _0x1131d2=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x203900=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x4aebf5=this['editor']['plugins']['get']('Autosave');await _0x4aebf5['save']();}else await _0x203900['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x4e76ea=this['editor']['plugins']['get']('Dialog');_0x4e76ea['isOpen']&&_0x4e76ea['hide']();}const _0x4642fc=this['_getRevisionViewerEditorConfig']();return _0x1131d2(_0x4642fc)['then'](_0x4b4f8d=>{return(this['_viewerEditor']=_0x4b4f8d,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x4b4f8d);})['catch'](_0x44de41=>(console['error'](_0x44de41),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3b56e9=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x3b56e9(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x1749bf=this['editor']['plugins']['get']('Annotations');_0x1749bf['refreshVisibility'](),_0x1749bf['refreshPositioning']();}})));}['_showRevisionViewer'](_0x390b19){const _0x5cde3a=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x5748b3=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1f758a=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x1f758a,_0x390b19)['then'](_0x54e358=>(_0x5748b3['style']['display']='block',_0x5cde3a['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x54e358));}['_closeRevisionViewer'](_0x52cc54){const _0x35aa63=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x35aa63['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x52cc54['destroy']();}async['_restoreRevision'](_0x3d85ae){const _0x42519d=this['editor'],_0x6a52f1=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3915e7=_0x42519d['plugins']['get']('RevisionTracker'),_0x4a2911=_0x42519d['plugins']['get']('RevisionHistoryUtils'),_0x3c2f2c=_0x6a52f1['repository']['getRevision'](_0x3d85ae);let _0x2abed3,_0x485168,_0x2dc98b;try{await _0x4a2911['loadRevisionData'](_0x3c2f2c,this['adapter']),_0x2abed3=_0x4a2911['getRevisionDocumentData'](_0x3c2f2c),_0x485168=_0x4a2911['getRevisionRootsAttributes'](_0x3c2f2c);}catch(_0x3e47bd){return void console['error'](_0x3e47bd);}_0x42519d['model']['change'](_0x4f2cb4=>{for(const _0x1a70cf of Array['from'](_0x42519d['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4f2cb4['removeMarker'](_0x1a70cf);}),_0x6a52f1['isReady']=!0x1,_0x42519d['model']['enqueueChange'](_0x56ee75=>{_0x56ee75['setSelection'](null),_0x56ee75['removeSelectionAttribute'](_0x42519d['model']['document']['selection']['getAttributeKeys']());const _0x1ae0cd=Object['keys'](_0x2abed3);for(const _0x3b1cf2 of _0x42519d['model']['document']['roots'])'$graveyard'!=_0x3b1cf2['rootName']&&_0x3b1cf2['isAttached']()&&!_0x1ae0cd['includes'](_0x3b1cf2['rootName'])&&_0x56ee75['detachRoot'](_0x3b1cf2);for(const _0x3923a5 of _0x1ae0cd){let _0x4a0c45=_0x42519d['model']['document']['getRoot'](_0x3923a5);_0x4a0c45&&_0x4a0c45['isAttached']()||(_0x4a0c45=_0x56ee75['addRoot'](_0x3923a5));const _0x4b5536=_0x485168[_0x3923a5],_0x455262=Object['keys'](_0x4b5536),_0x12761a=_0x2abed3[_0x3923a5];for(const _0x3e0411 of _0x4a0c45['getAttributeKeys']())_0x455262['includes'](_0x3e0411)||_0x56ee75['removeAttribute'](_0x3e0411,_0x4a0c45);for(const _0x357ee8 of _0x455262)_0x56ee75['setAttribute'](_0x357ee8,_0x485168[_0x3923a5][_0x357ee8],_0x4a0c45);_0x56ee75['remove'](_0x56ee75['createRangeIn'](_0x4a0c45)),_0x56ee75['insert'](_0x42519d['data']['parse'](_0x12761a,_0x4a0c45),_0x4a0c45,0x0);}});const _0x17b8bc=R(_0x42519d['locale'],'Restored');if(_0x3c2f2c['name'])_0x2dc98b=-0x1==_0x3c2f2c['name']['indexOf'](_0x17b8bc)?_0x17b8bc+':\x20'+_0x3c2f2c['name']:_0x3c2f2c['name'];else _0x2dc98b=_0x17b8bc+':\x20'+(_0x3c2f2c['createdAt']['toLocaleDateString'](_0x42519d['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3c2f2c['createdAt']['toLocaleTimeString'](_0x42519d['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3915e7['saveRevision']({'name':_0x2dc98b}),_0x6a52f1['isReady']=!0x0,_0x42519d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ht as RevisionHistory,v as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,l as RevisionViewer,m as RevisionViewerEditor,at as RevisionViewerIntegration,Ri as RevisionViewerLoadingOverlay,u as RevisionViewerUI,S as RevisionsRepository,f as RevisionsSidebar,ot as ShowChangeCommand};