@ckeditor/ckeditor5-revision-history 47.4.0-alpha.2 → 47.4.0-alpha.3

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 _0x1f5b0f,uid as _0x51ba1f,Collection as _0x2cee73,logWarning as _0xeeb11e,FocusTracker as _0xf1c08a,KeystrokeHandler as _0x275c98,scrollViewportToShowTarget as _0xbbd326,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x70053c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x3a4dea,set as _0x5292cb,unset as _0x1821a3,isEqual as _0x29b1c8}from'es-toolkit/compat';import{Plugin as _0xcfa495,PendingActions as _0x5e2122,Command as _0x3a00a7,ElementApiMixin as _0x5c8f5e,Editor as _0x264d8c}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0xf69155,getMarkerDomElement as _0x4a511e,ConfirmMixin as _0x572ee6,sanitizeEditorConfig as _0x315b3d}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x3618bd,ViewAttributeElement as _0x2338d9,ViewEmptyElement as _0x3c91a7,ViewRawElement as _0x2916a1,ViewUIElement as _0x5965f9,ViewDocumentFragment as _0x1472d0,ViewText as _0x2c0582,ViewElement as _0x15a57d,ModelElement as _0x3d9a08,ModelRange as _0x8b622d,ModelPosition as _0x150022,ModelDocumentFragment as _0x4a21a9,ModelText as _0x2994a}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x1bc09b,IconChevronUp as _0x1f58d8,IconChevronDown as _0x3731cc,IconUndo as _0x3e339e,IconUser as _0x55d462,IconThreeVerticalDots as _0x3daa3a}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x197115,View as _0x212fb1,submitHandler as _0x3f12e2,LabeledFieldView as ti,createLabeledInputText as _0x1cdcaa,createDropdown as _0x57ae92,ListView as _0x188876,ListItemView as _0x56e998,ButtonView as _0x28948f,MenuBarMenuView as _0x40b207,MenuBarMenuListView as _0x4565c8,MenuBarMenuListItemView as _0x3336bb,MenuBarMenuListItemButtonView as _0x3e055a,ContextualBalloon as _0x595ef8,ToolbarSeparatorView as _0x348f81,IconView as _0x5111d3,addListToDropdown as _0x7d9e09,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x36dce6,StickyPanelView as _0x4cd550,ToolbarView as _0x41e7e1,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x16779c}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x1f5b0f(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x53aab7){super(),this['id']=_0x53aab7['id']||_0x51ba1f(),this['creator']=_0x53aab7['creator']||null,this['authors']=_0x53aab7['authors']||[],this['diffData']=_0x53aab7['diffData']||null,this['toVersion']=_0x53aab7['toVersion']||0x0,this['fromVersion']=_0x53aab7['fromVersion']||0x0,this['set']('name',_0x53aab7['name']||''),this['set']('createdAt',_0x53aab7['createdAt']||new Date()),this['set']('attributes',_0x53aab7['attributes']||{});}['setName'](_0x592b77){this['_update']({'name':_0x592b77});}['setAttribute'](_0x5487cf,_0x2b43d4){const _0x5d2833=_0x3a4dea(this['attributes']);_0x5292cb(_0x5d2833,_0x5487cf,_0x2b43d4),this['_update']({'attributes':_0x5d2833});}['removeAttribute'](_0x5e77c1){const _0x53abdb=_0x3a4dea(this['attributes']);_0x1821a3(_0x53abdb,_0x5e77c1),this['_update']({'attributes':_0x53abdb});}['_update'](_0x5f4185,_0x5a9c58=!0x1){let _0x2f4e55=!0x1;const _0x51661b={'id':this['id']},_0x316ec1=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x1bd237 of _0x316ec1){const _0x31b050=_0x5f4185[_0x1bd237];void 0x0!==_0x31b050&&_0x31b050!==this[_0x1bd237]&&(this[_0x1bd237]=_0x31b050,_0x51661b[_0x1bd237]=_0x31b050,_0x2f4e55=!0x0);}_0x2f4e55&&(_0x51661b['authors']&&(_0x51661b['authorsIds']=_0x51661b['authors']['map'](_0x361fd5=>_0x361fd5['id']),delete _0x51661b['authors']),this['fire']('_update',_0x51661b,_0x5a9c58));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x481ff8=>_0x481ff8['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0xcfa495{['_revisions'];static get['requires'](){return[_0xf69155];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x8ccd52){super(_0x8ccd52),this['_revisions']=new _0x2cee73();}['afterInit'](){!async function(_0x34fbfb){const _0x9fe288=_0x46bcd4([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x317feb=0xeb829,_0x4340c9=0x359e09b0,_0x4a74fb=0x359977d8^_0x4340c9,_0x5ebddc=window[_0x46bcd4([0x44,0x61,0x74,0x65])][_0x46bcd4([0x6e,0x6f,0x77])](),_0x3b9fa2=_0x34fbfb[_0x46bcd4([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x38f4dc=new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x335312=>{_0x3b9fa2[_0x46bcd4([0x6f,0x6e,0x63,0x65])](_0x46bcd4([0x72,0x65,0x61,0x64,0x79]),_0x335312);}),_0x4310c6={[_0x46bcd4([0x6b,0x74,0x79])]:_0x46bcd4([0x45,0x43]),[_0x46bcd4([0x75,0x73,0x65])]:_0x46bcd4([0x73,0x69,0x67]),[_0x46bcd4([0x63,0x72,0x76])]:_0x46bcd4([0x50,0x2d,0x32,0x35,0x36]),[_0x46bcd4([0x78])]:_0x46bcd4([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]),[_0x46bcd4([0x79])]:_0x46bcd4([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]),[_0x46bcd4([0x61,0x6c,0x67])]:_0x46bcd4([0x45,0x53,0x32,0x35,0x36])},_0x5d8997=_0x3b9fa2[_0x46bcd4([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x46bcd4([0x67,0x65,0x74])](_0x46bcd4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4ff141(){let _0x59d578,_0x2ef777=null,_0x469e15=null;try{if(_0x5d8997==_0x46bcd4([0x47,0x50,0x4c]))return _0x46bcd4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x59d578=_0x274b5b(),!_0x59d578)return _0x46bcd4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x59d578[_0x46bcd4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x469e15=_0x122d6b(_0x59d578[_0x46bcd4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x59d578[_0x46bcd4([0x6a,0x74,0x69])])),await _0x294a6c()?_0x5a3f43()?_0x31cd87()?_0x46bcd4([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x20f9fe()?(_0x59d578[_0x46bcd4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x46bcd4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2ef777=_0x245f73(_0x46bcd4([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x45673a()):_0x46bcd4([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x46bcd4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x46bcd4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x46bcd4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x31cd87(){const _0x4ffc69=[_0x46bcd4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x46bcd4([0x74,0x72,0x69,0x61,0x6c])][_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59d578[_0x46bcd4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5ebddc/0x3e8:0xe10*_0x4a74fb;return _0x59d578[_0x46bcd4([0x65,0x78,0x70])]<_0x4ffc69;}function _0x5a3f43(){const _0x478305=_0x59d578[_0x46bcd4([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x478305)return!0x1;if(_0x478305[_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46bcd4([0x2a])))return!0x0;if(_0x478305[_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46bcd4([0x52,0x48])))return!0x0;if(_0x478305[_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46bcd4([0x52,0x52,0x48]))){if(_0x39bd82())return!0x0;if(_0x7991fd()||_0x3ef16a())return!0x0;}return!0x1;}function _0x20f9fe(){const _0x4bafe6=_0x59d578[_0x46bcd4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4bafe6||0x0==_0x4bafe6[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x402ff1}=new URL(window[_0x46bcd4([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4bafe6[_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x402ff1))return!0x0;const _0x31b53e=_0x402ff1[_0x46bcd4([0x73,0x70,0x6c,0x69,0x74])](_0x46bcd4([0x2e]));return _0x4bafe6[_0x46bcd4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4ece4a=>_0x4ece4a[_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46bcd4([0x2a])))[_0x46bcd4([0x6d,0x61,0x70])](_0xff1ae5=>_0xff1ae5[_0x46bcd4([0x73,0x70,0x6c,0x69,0x74])](_0x46bcd4([0x2e])))[_0x46bcd4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x531c25=>_0x531c25[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x31b53e[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x46bcd4([0x6d,0x61,0x70])](_0x36c081=>Array(_0x31b53e[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x36c081[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x46bcd4([0x66,0x69,0x6c,0x6c])](_0x36c081[0x0]===_0x46bcd4([0x2a])?_0x46bcd4([0x2a]):'')[_0x46bcd4([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x36c081))[_0x46bcd4([0x73,0x6f,0x6d,0x65])](_0x49f7d7=>_0x31b53e[_0x46bcd4([0x65,0x76,0x65,0x72,0x79])]((_0x9b9e4,_0xf4ac8b)=>_0x49f7d7[_0xf4ac8b]===_0x9b9e4||_0x49f7d7[_0xf4ac8b]===_0x46bcd4([0x2a])));}function _0x45673a(){return _0x2ef777&&_0x469e15?new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc956,_0x4182fe)=>{_0x2ef777[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0xc956,_0x4182fe),_0x469e15[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0x51b0d7=>{_0x51b0d7!=_0x46bcd4([0x56,0x61,0x6c,0x69,0x64])&&_0xc956(_0x51b0d7);},_0x4182fe);}):_0x2ef777||_0x469e15||_0x46bcd4([0x56,0x61,0x6c,0x69,0x64]);}}function _0x122d6b(_0x1cccc5,_0xb38fa6){return new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x254532=>{if(_0x2e911b())return _0x254532(_0x46bcd4([0x56,0x61,0x6c,0x69,0x64]));_0x3c9e91(),_0x3b9fa2[_0x46bcd4([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x46bcd4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5d46fe=!0x1;const _0x1570c9=_0x51ba1f();function _0x382607(_0x4c588e){return!!_0x4c588e&&(typeof _0x4c588e===_0x46bcd4([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4c588e===_0x46bcd4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4c588e[_0x46bcd4([0x74,0x68,0x65,0x6e])]===_0x46bcd4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4c588e[_0x46bcd4([0x63,0x61,0x74,0x63,0x68])]===_0x46bcd4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x24de61(_0x36c1b3){_0x29737f(_0x36c1b3)[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0x44e9f2=>{if(!_0x44e9f2||_0x44e9f2[_0x46bcd4([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x46bcd4([0x6f,0x6b]))return _0x46bcd4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1804a3(_0x510271(_0x1570c9+_0xb38fa6))!=_0x44e9f2[_0x46bcd4([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x46bcd4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x46bcd4([0x56,0x61,0x6c,0x69,0x64]);})[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0x30b1ac=>(_0x5c6b83(),_0x30b1ac),()=>{const _0x3d825a=_0xfa1293();return null==_0x3d825a?(_0x5c6b83(),_0x46bcd4([0x56,0x61,0x6c,0x69,0x64])):_0x46bcd4(_0x5ebddc-_0x3d825a>(0x11928db0^_0x4340c9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0x254532)[_0x46bcd4([0x63,0x61,0x74,0x63,0x68])](()=>{_0x254532(_0x46bcd4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d1080=0x35a8e730^_0x4340c9;function _0x5c6b83(){const _0x5c8ed9=_0x46bcd4([0x6c,0x6c,0x63,0x74,0x2d])+_0x1804a3(_0x510271(_0x1cccc5)),_0x29a0f7=_0x596f8c(_0x1804a3(window[_0x46bcd4([0x4d,0x61,0x74,0x68])][_0x46bcd4([0x63,0x65,0x69,0x6c])](_0x5ebddc/_0x3d1080)));window[_0x46bcd4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x46bcd4([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5c8ed9,_0x29a0f7);}function _0xfa1293(){const _0x1d422c=_0x46bcd4([0x6c,0x6c,0x63,0x74,0x2d])+_0x1804a3(_0x510271(_0x1cccc5)),_0x10df2c=window[_0x46bcd4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x46bcd4([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1d422c);return _0x10df2c?window[_0x46bcd4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x596f8c(_0x10df2c),0x10)*_0x3d1080:null;}function _0x29737f(_0xf8496d){return new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d0ef1,_0x45e0b9)=>{_0xf8496d[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0x3d0ef1,_0x45e0b9),window[_0x46bcd4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x45e0b9,0x359fdd70^_0x4340c9);});}}_0x3b9fa2[_0x46bcd4([0x6f,0x6e])](_0x46bcd4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x31b168,_0x904c54)=>{if(_0x904c54[0x0]!=_0x1cccc5)return _0x254532(_0x46bcd4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x904c54[0x1]={..._0x904c54[0x1],[_0x46bcd4([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1570c9};},{[_0x46bcd4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x46bcd4([0x68,0x69,0x67,0x68])}),_0x3b9fa2[_0x46bcd4([0x6f,0x6e])](_0x46bcd4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2c1069=>{_0x382607(_0x2c1069[_0x46bcd4([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5d46fe=!0x0,_0x24de61(_0x2c1069[_0x46bcd4([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x46bcd4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x46bcd4([0x6c,0x6f,0x77])}),_0x38f4dc[_0x46bcd4([0x74,0x68,0x65,0x6e])](()=>{_0x5d46fe||_0x254532(_0x46bcd4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2e911b(){return _0x3b9fa2[_0x46bcd4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x46bcd4([0x76,0x69,0x65,0x77])][_0x46bcd4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x46bcd4([0x61,0x75,0x74,0x6f]);}function _0x3c9e91(){_0x3b9fa2[_0x46bcd4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x46bcd4([0x76,0x69,0x65,0x77])][_0x46bcd4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x46bcd4([0x61,0x75,0x74,0x6f]);}}function _0x245f73(_0x579cb0){const _0x51f113=[new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d3535=>setTimeout(_0x1d3535,0x3597377c^_0x4340c9)),_0x38f4dc[_0x46bcd4([0x74,0x68,0x65,0x6e])](()=>new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x240647=>{const _0xf8c76d=0x359e09b7^_0x4340c9,_0x5b357d=_0x34fbfb[_0x46bcd4([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x4db41d(){_0x5b357d[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0xf8c76d&&_0x240647();}_0x4db41d(),_0x5b357d[_0x46bcd4([0x6f,0x6e])](_0x46bcd4([0x61,0x64,0x64]),_0x4db41d);})),new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2be77b=>{function _0xabb8a6(){for(const _0x48ed12 in window)if(window[_0x46bcd4([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x46bcd4([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x48ed12))&&window[_0x48ed12]==_0x317feb)return _0x2be77b();_0x3b9fa2[_0x46bcd4([0x73,0x74,0x61,0x74,0x65])]!=_0x46bcd4([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x46bcd4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xabb8a6,0x359e1a38^_0x4340c9);}_0x170fd4(_0x46bcd4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0xabb8a6();})];return window[_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x46bcd4([0x72,0x61,0x63,0x65])](_0x51f113)[_0x46bcd4([0x74,0x68,0x65,0x6e])](()=>_0x579cb0);}async function _0xe3f27(){if(await _0x38f4dc,_0x170fd4(_0x46bcd4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x2aed39=_0x34fbfb[_0x46bcd4([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x5b3450=_0x34fbfb[_0x46bcd4([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])](_0x2aed39[_0x46bcd4([0x69,0x64])]),_0x2cc743=_0x33790f(_0x46bcd4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x2cc743[_0x46bcd4([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x2aed39['id'],_0x5b3450?_0x5b3450['id']:null,!0x0),_0x2cc743[_0x46bcd4([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x46bcd4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2cc743[_0x46bcd4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2cc743[_0x46bcd4([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x12beea,void(_0x2cc743[_0x46bcd4([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x12beea);}if(_0x170fd4(_0x46bcd4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x26bc57=_0x33790f(_0x46bcd4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x26bc57[_0x46bcd4([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x46bcd4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x26bc57[_0x46bcd4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x26bc57[_0x46bcd4([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x12beea,_0x26bc57[_0x46bcd4([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x12beea;}_0x3b9fa2[_0x46bcd4([0x6d,0x6f,0x64,0x65,0x6c])][_0x46bcd4([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x12beea,_0x3b9fa2[_0x46bcd4([0x6d,0x6f,0x64,0x65,0x6c])][_0x46bcd4([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x12beea,_0x3b9fa2[_0x46bcd4([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x46bcd4([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x39bd82(){return _0x170fd4(_0x46bcd4([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x33790f(_0x46bcd4([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x46bcd4([0x73,0x74,0x61,0x74,0x65])]==_0x46bcd4([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x7991fd(){return _0x170fd4(_0x46bcd4([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 _0x3ef16a(){return _0x170fd4(_0x46bcd4([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5336ad(_0x4ba12f){const _0x46bf42=_0x5a8a6b();_0x3b9fa2[_0x46bf42]=_0x46bcd4([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])+_0x4ba12f,_0x4ba12f[_0x46bcd4([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x46bcd4([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x5a8a6b()]=_0x317feb),_0x4ba12f!=_0x46bcd4([0x56,0x61,0x6c,0x69,0x64])&&_0xe3f27();}function _0x5a8a6b(){const _0x349ac9=window[_0x46bcd4([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x46bcd4([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x46bcd4([0x6e,0x6f,0x77])]())[_0x46bcd4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x46bcd4([0x2e]),'');let _0x517125=_0x46bcd4([0x76]);for(let _0x494fb4=0x0;_0x494fb4<_0x349ac9[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x494fb4+=0x2){let _0x2091e4=window[_0x46bcd4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x349ac9[_0x46bcd4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x494fb4,_0x494fb4+0x2));_0x2091e4>=_0x9fe288[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2091e4-=_0x9fe288[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x517125+=_0x9fe288[_0x2091e4];}return _0x517125;}function _0x274b5b(){const _0x28ffa1=_0x5d8997[_0x46bcd4([0x73,0x70,0x6c,0x69,0x74])](_0x46bcd4([0x2e]));if(0x3!=_0x28ffa1[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x18f05f(_0x28ffa1[0x1]);function _0x18f05f(_0x54f8b6){const _0x27202a=_0x550774(_0x54f8b6);return _0x27202a&&_0x4ca348()?_0x27202a:null;function _0x4ca348(){const _0x42cfd7=_0x27202a[_0x46bcd4([0x6a,0x74,0x69])],_0x2c8846=window[_0x46bcd4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x42cfd7[_0x46bcd4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x42cfd7[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4bb760={..._0x27202a,[_0x46bcd4([0x6a,0x74,0x69])]:_0x42cfd7[_0x46bcd4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x42cfd7[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4bb760[_0x46bcd4([0x76,0x63])],_0x510271(_0x4bb760)==_0x2c8846;}}}async function _0x294a6c(){let _0xceb9f4=!0x0;try{const _0xcbb92f=_0x5d8997[_0x46bcd4([0x73,0x70,0x6c,0x69,0x74])](_0x46bcd4([0x2e])),[_0x59bdfd,_0x4d2ae7,_0x350db4]=_0xcbb92f;return _0x261f4d(_0x59bdfd),await _0x257bd4(_0x59bdfd,_0x4d2ae7,_0x350db4),_0xceb9f4;}catch{return!0x1;}function _0x261f4d(_0x3792a6){const _0x24fcc2=_0x550774(_0x3792a6);_0x24fcc2&&_0x24fcc2[_0x46bcd4([0x61,0x6c,0x67])]==_0x46bcd4([0x45,0x53,0x32,0x35,0x36])||(_0xceb9f4=!0x1);}async function _0x257bd4(_0x10faed,_0x32d6ab,_0x178407){const _0x5f12a2=window[_0x46bcd4([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x46bcd4([0x66,0x72,0x6f,0x6d])](_0x2e96e7(_0x178407),_0x6911a3=>_0x6911a3[_0x46bcd4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x200899=new window[(_0x46bcd4([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x46bcd4([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x10faed+_0x46bcd4([0x2e])+_0x32d6ab),_0x101ede=window[_0x46bcd4([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x46bcd4([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x101ede)return;const _0x2eb1eb=await _0x101ede[_0x46bcd4([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x46bcd4([0x6a,0x77,0x6b]),_0x4310c6,{[_0x46bcd4([0x6e,0x61,0x6d,0x65])]:_0x46bcd4([0x45,0x43,0x44,0x53,0x41]),[_0x46bcd4([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x46bcd4([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x46bcd4([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x101ede[_0x46bcd4([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x46bcd4([0x6e,0x61,0x6d,0x65])]:_0x46bcd4([0x45,0x43,0x44,0x53,0x41]),[_0x46bcd4([0x68,0x61,0x73,0x68])]:{[_0x46bcd4([0x6e,0x61,0x6d,0x65])]:_0x46bcd4([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2eb1eb,_0x5f12a2,_0x200899)||(_0xceb9f4=!0x1);}}function _0x550774(_0x12e04d){return _0x12e04d[_0x46bcd4([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x46bcd4([0x65,0x79]))?JSON[_0x46bcd4([0x70,0x61,0x72,0x73,0x65])](_0x2e96e7(_0x12e04d)):null;}function _0x2e96e7(_0x25c582){return window[_0x46bcd4([0x61,0x74,0x6f,0x62])](_0x25c582[_0x46bcd4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x46bcd4([0x2b]))[_0x46bcd4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x46bcd4([0x2f])));}function _0x510271(_0x11a763){let _0x25fa3b=0x1505;function _0x245962(_0x592c4e){for(let _0x5c7ec8=0x0;_0x5c7ec8<_0x592c4e[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5c7ec8++){const _0x185966=_0x592c4e[_0x46bcd4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5c7ec8);_0x25fa3b=(_0x25fa3b<<0x5)+_0x25fa3b+_0x185966,_0x25fa3b&=_0x25fa3b;}}function _0x59c30b(_0x59c2d0){Array[_0x46bcd4([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x59c2d0)?_0x59c2d0[_0x46bcd4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x59c30b):_0x59c2d0&&typeof _0x59c2d0==_0x46bcd4([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x46bcd4([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x59c2d0)[_0x46bcd4([0x73,0x6f,0x72,0x74])]()[_0x46bcd4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x50c46d,_0x3ea3d3])=>{_0x245962(_0x50c46d),_0x59c30b(_0x3ea3d3);}):_0x245962(window[_0x46bcd4([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x59c2d0));}return _0x59c30b(_0x11a763),_0x25fa3b>>>0x0;}function _0x1804a3(_0x1560a3){return _0x1560a3[_0x46bcd4([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x46bcd4([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x46bcd4([0x30]));}function _0x596f8c(_0x1d046d){return _0x1d046d[_0x46bcd4([0x73,0x70,0x6c,0x69,0x74])]('')[_0x46bcd4([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x46bcd4([0x6a,0x6f,0x69,0x6e])]('');}function _0x170fd4(_0x719a09){return _0x3b9fa2[_0x46bcd4([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x46bcd4([0x68,0x61,0x73])](_0x719a09);}function _0x33790f(_0x15c406){return _0x3b9fa2[_0x46bcd4([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x46bcd4([0x67,0x65,0x74])](_0x15c406);}function _0x12beea(){}function _0x46bcd4(_0x3ac479){return _0x3ac479['map'](_0x5939ba=>String['fromCharCode'](_0x5939ba))['join']('');}_0x5336ad(await _0x4ff141());}(this);}['createRevision'](_0x1aed84){const _0x305286=this['editor']['plugins']['get']('Users');return new I({'id':_0x1aed84['id'],'name':_0x1aed84['name'],'creator':_0x1aed84['creatorId']?_0x305286['getUser'](_0x1aed84['creatorId']):null,'diffData':_0x1aed84['diffData']||_0x1aed84['data'],'authors':_0x1aed84['authorsIds']['map'](_0x561958=>_0x305286['getUser'](_0x561958)),'createdAt':new Date(_0x1aed84['createdAt']),'attributes':_0x1aed84['attributes'],'fromVersion':_0x1aed84['fromVersion'],'toVersion':_0x1aed84['toVersion']});}['addRevision'](_0x5a5085,_0x52ef6a=0x0){this['_revisions']['add'](_0x5a5085,_0x52ef6a);}['getRevision'](_0x40474c){return this['_revisions']['get'](_0x40474c);}['getRevisions'](_0x1f729e={'toJSON':!0x1}){const _0x357d14=Array['from'](this['_revisions']);return _0x357d14['reverse'](),_0x1f729e['toJSON']?_0x357d14['map'](_0x4d41e5=>_0x4d41e5['toJSON']()):_0x357d14;}['getIndex'](_0x295c0f){return this['_revisions']['getIndex'](_0x295c0f);}['getEarlierVisibleRevision'](_0x4c9600){const [,_0x31270d]=this['getRevisionsIterator'](_0x4c9600,{'direction':'earlier'});return _0x31270d;}['getLaterVisibleRevision'](_0x1b3239){const [,_0x2ea5dd]=this['getRevisionsIterator'](_0x1b3239,{'direction':'later'});return _0x2ea5dd;}['getRevisionsInDiff'](_0xcca39b){const _0x14c34c=[];for(const _0x2b8bf0 of this['getRevisionsIterator'](_0xcca39b['newRevisionId']))if(_0x14c34c['push'](_0x2b8bf0),_0x2b8bf0['id']===_0xcca39b['oldRevisionId'])break;return _0x14c34c;}*['getRevisionsIterator'](_0x5c595e,{direction:_0x3d151e='earlier',filter:_0x3074a6=()=>!0x0}={}){const _0x1920ff='earlier'===_0x3d151e?0x1:-0x1;let _0x11c698=this['_revisions']['get'](_0x5c595e),_0x4fdb5d=this['getIndex'](_0x11c698);for(yield _0x11c698;_0x11c698;){if(_0x4fdb5d+=_0x1920ff,_0x11c698=this['getRevision'](_0x4fdb5d),!_0x11c698)return;_0x3074a6(_0x11c698)&&(yield _0x11c698);}}}class $ extends _0xcfa495{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3618bd,'c'],[_0x2338d9,'a'],[_0x3c91a7,'e'],[_0x2916a1,'r'],[_0x5965f9,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3618bd],['a',_0x2338d9],['e',_0x3c91a7],['r',_0x2916a1],['u',_0x5965f9]]);async['loadRevisionData'](_0x32e8a0,_0x3b7645){if(_0x32e8a0['diffData']||!_0x3b7645)return;const _0x1d7e0c=this['editor']['config']['get']('collaboration.channelId'),_0x491656=await _0x3b7645['getRevision']({'channelId':_0x1d7e0c,'revisionId':_0x32e8a0['id']});_0x32e8a0['diffData']=_0x491656['diffData'];}['getRevisionDocumentData'](_0x4c0fb4){const _0x10bb9f={};for(const _0x278aa7 in _0x4c0fb4['diffData']){if(_0x4c0fb4['diffData'][_0x278aa7]['attachChange']&&!_0x4c0fb4['diffData'][_0x278aa7]['attachChange']['isAttached'])continue;const _0x5aed5f=this['_removeRevisionMarkers'](JSON['parse'](_0x4c0fb4['diffData'][_0x278aa7]['insertions'])),_0x53a5f8=this['editor']['editing']['view']['document'],_0x21b1c9=new _0x1472d0(_0x53a5f8,_0x5aed5f['map'](_0x3ff4f3=>this['_getViewFromDiffObj'](_0x3ff4f3,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x10bb9f[_0x278aa7]=this['editor']['data']['processor']['toData'](_0x21b1c9),this['editor']['data']['processor']['useFillerType']('default');}return _0x10bb9f;}['getRevisionRootsAttributes'](_0x3a7240){const _0x24ccd3={};for(const _0x4365f5 in _0x3a7240['diffData'])_0x3a7240['diffData'][_0x4365f5]['attachChange']&&!_0x3a7240['diffData'][_0x4365f5]['attachChange']['isAttached']||(_0x24ccd3[_0x4365f5]=_0x3a7240['diffData'][_0x4365f5]['attributesAfter']||{});return _0x24ccd3;}['_getTypeCharForViewElement'](_0x45da68){return this['_viewClassToTypeChar']['get'](_0x45da68['constructor']);}['_getViewFromDiffObj'](_0x5afa12,_0x20c9fd){const _0x431ac=this['editor']['editing']['view']['document'];if('string'==typeof _0x5afa12)return new _0x2c0582(_0x431ac,_0x5afa12);{let _0x5d1368,_0x2ecad8;_0x2ecad8='u'==_0x5afa12['type']||'r'==_0x5afa12['type']?[]:_0x5afa12['children']['map'](_0x3b117a=>this['_getViewFromDiffObj'](_0x3b117a,_0x20c9fd));const _0x3a4bda=this['_typeCharToViewClass']['get'](_0x5afa12['type'])||_0x15a57d,_0x4e80f9=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x5d1368=new _0x3a4bda(_0x431ac,_0x5afa12['name'],_0x5afa12['attributes'],_0x2ecad8),'u'==_0x5afa12['type']&&_0x5afa12['children'][0x0]){const _0x8a1778=_0x5afa12['children'][0x0];if(_0x5d1368['render']=function(_0x3b9e86){const _0x53cecd=_0x3b9e86['createElement']('div');return _0x53cecd['innerHTML']=_0x8a1778,_0x53cecd['childNodes'][0x0];},_0x20c9fd){const _0x46ac7d=new _0x1472d0(_0x431ac);_0x46ac7d['_appendChild'](_0x5d1368);const _0x8230fd=Array['from'](_0x4e80f9['viewChildrenToDom'](_0x46ac7d,{'bind':!0x1})),_0x6d9764=_0x4e80f9['domDocument']['createElement']('div');_0x6d9764['append'](..._0x8230fd),_0x5d1368=Array['from'](_0x4e80f9['domChildrenToView'](_0x6d9764))[0x0];}}else{if('r'==_0x5afa12['type']&&_0x5afa12['children'][0x0]){const _0x250473=_0x5afa12['children'][0x0];if(_0x5d1368['render']=function(_0x598afc){_0x598afc['innerHTML']=_0x250473;},_0x20c9fd){const _0x30f666=new _0x1472d0(_0x431ac);_0x30f666['_appendChild'](_0x5d1368);const _0x59b9df=Array['from'](_0x4e80f9['viewChildrenToDom'](_0x30f666,{'bind':!0x1})),_0x154ae3=_0x4e80f9['domDocument']['createElement']('div');_0x154ae3['append'](..._0x59b9df);const _0x3578d8=Array['from'](_0x4e80f9['domChildrenToView'](_0x154ae3));_0x3578d8['length']>0x1?_0x5d1368['_appendChild'](_0x3578d8):_0x5d1368=_0x3578d8[0x0];}}}if(_0x5afa12['customProperties']){for(const [_0x115ec4,_0x1e866c]of _0x5afa12['customProperties'])_0x5d1368['_setCustomProperty'](_0x115ec4,_0x1e866c);}const _0x4cc45b=void 0x0===_0x5afa12['fillerOffset']?null:_0x5afa12['fillerOffset'];return null!==_0x4cc45b&&(_0x5d1368['getFillerOffset']=()=>_0x4cc45b),_0x5d1368;}}['_makeModelFromViewString'](_0x3a2278){const _0x4985ac=JSON['parse'](_0x3a2278),_0x1cfd43=this['editor']['editing']['view']['document'],_0x61be47=new _0x1472d0(_0x1cfd43,_0x4985ac['map'](_0x3a77c4=>this['_getViewFromDiffObj'](_0x3a77c4,!0x0)));return this['editor']['data']['toModel'](_0x61be47);}['_removeRevisionMarkers'](_0x5d8125){return(_0x5d8125=_0x5d8125['filter'](_0x1142ac=>!_0x1142ac['name']||'revision-start'!==_0x1142ac['name']&&'revision-end'!==_0x1142ac['name']))['forEach'](_0x12b55f=>{'string'!=typeof _0x12b55f&&(_0x12b55f['children']=this['_removeRevisionMarkers'](_0x12b55f['children']),_0x12b55f['attributes']=_0x12b55f['attributes']['filter'](_0x17aa3a=>!_0x17aa3a[0x0]['startsWith']('data-revision-')));}),_0x5d8125;}}function m(_0x3014f7,_0x11e1f5,_0xdf2b95){const t=_0x3014f7['t'];switch(_0x11e1f5){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'},_0xdf2b95);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xdf2b95);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 _0xcfa495{['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[_0xf69155,S,$,_0x5e2122];}constructor(_0x2a520e){super(_0x2a520e),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x35b345=_0x51ba1f();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x35b345},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 _0x2a939a=this['repository']['getRevision'](0x0),_0x38a02f=_0x2a939a&&null===_0x2a939a['creator']?_0x2a939a:null;if(this['_continueCurrentRevision']=!!_0x38a02f&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x45f526=this['_source']['getCurrentRevisionId'](),_0x1bc7c1=this['repository']['getRevision'](_0x45f526);if(_0x1bc7c1)this['_startingVersion']=_0x1bc7c1['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x2e1ff0=this['_source']['history']['_operations']['find'](_0x37c1be=>!_0x37c1be['_isInit']),_0x4903e1=_0x2e1ff0?_0x2e1ff0['baseVersion']:this['_source']['history']['version'];_0x2a939a?(_0x2a939a['toVersion']<_0x4903e1&&_0x2a939a['_update']({'toVersion':_0x4903e1}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x38a02f['id'],this['_startingVersion']=_0x38a02f['fromVersion']):(this['_startingVersion']=_0x2a939a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4903e1,this['_continueCurrentRevision']=!0x1);}}else _0x38a02f&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x38a02f['toVersion'],this['editor']['model']['document']['history']['version']),_0x38a02f['fromVersion']===_0x38a02f['toVersion']?(0x0!==_0x38a02f['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x38a02f['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x38a02f['id'],this['_startingVersion']=_0x38a02f['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',_0x512b94=>!_0x512b94),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x558497=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3762c1;for(const _0x2bb080 in _0x558497){const _0x24d546=_0x2bb080,_0x238818=_0x558497[_0x24d546];if('revisionHistoryLicenseKeyValid'==_0x238818||'revisionHistoryLicenseKeyInvalid'==_0x238818||'revisionHistoryLicenseKeyExpired'==_0x238818||'revisionHistoryLicenseKeyDomainLimit'==_0x238818||'revisionHistoryLicenseKeyNotAllowed'==_0x238818||'revisionHistoryLicenseKeyEvaluationLimit'==_0x238818||'revisionHistoryLicenseKeyUsageLimit'==_0x238818){delete _0x558497[_0x24d546],_0x3762c1=_0x238818,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x3762c1&&_0x558497['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x3762c1&&_0x558497['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x3762c1&&_0x558497['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x3762c1&&_0x558497['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x3762c1&&_0x558497['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x3762c1&&_0x558497['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x18a812=this['repository']['getRevision'](0x0),_0x328a97=await this['getRevisionDocumentData'](_0x18a812),_0xd63d6c=await this['getRevisionRootsAttributes'](_0x18a812);this['_replaceEditorDataWithRevisionData'](_0x328a97,_0xd63d6c);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0xc02f17){this['_source']=_0xc02f17;}async['update'](){const _0x35d399=await this['_source']['getLatestVersion']();if(_0x35d399>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5c440a=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x35d399});_0x5c440a['authors']=_0x5c440a['authorsIds']['map'](_0x505482=>this['editor']['plugins']['get']('Users')['getUser'](_0x505482)),this['currentRevision']['_update'](_0x5c440a);}}async['saveRevision'](_0x5a7d15={},_0x42031f=null){const _0xb03bde=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x42031f>this['currentRevision']['toVersion']&&(_0x42031f=null),null===_0x42031f&&(_0x42031f=await this['_source']['getLatestVersion']());const _0x2996a9=this['_getFromVersion'](_0x42031f),_0x3f646f=this['buildRevisionData']({'from':_0x2996a9,'to':_0x42031f});if(this['currentRevision']['toVersion']<_0x42031f){const _0x3cc3b0=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x42031f,'to':_0x42031f});_0x3cc3b0['authors']=[],_0x3cc3b0['authorsIds']=[],_0x3cc3b0['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3cc3b0,!0x0),delete _0x3cc3b0['authors'],_0xb03bde['push'](_0x3cc3b0);}_0x5a7d15['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x5a7d15['name']=_0x5a7d15['name']||null,_0x5a7d15['id']=_0x5a7d15['id']||_0x51ba1f(),_0x5a7d15={..._0x5a7d15,..._0x3f646f};const _0x573f7f=this['addRevisionData'](_0x5a7d15);_0xb03bde['push'](_0x5a7d15);const _0x337eb5=this['repository']['getIndex'](_0x573f7f);if(0x0!==_0x337eb5){const _0x56d0b0=this['repository']['getRevision'](_0x337eb5-0x1);if(_0x56d0b0['fromVersion']!==_0x42031f){const _0x2e9812=this['_revisionDataBuilder']['getData'](_0x42031f,_0x56d0b0['toVersion']),_0x507d58={'id':_0x56d0b0['id'],'diffData':_0x2e9812['diffData'],'authorsIds':_0x2e9812['authorsIds'],'authors':_0x2e9812['authorsIds']['map'](_0x4c6491=>this['editor']['plugins']['get']('Users')['getUser'](_0x4c6491)),'fromVersion':_0x42031f};_0x56d0b0===this['currentRevision']&&(_0x507d58['createdAt']=new Date(_0x5a7d15['createdAt']['getTime']()+0xa)),_0x56d0b0['_update'](_0x507d58,!0x0),delete _0x507d58['authors'],_0xb03bde['push'](_0x507d58);}}if(this['adapter']){for(const _0x272444 of _0xb03bde)this['_bufferUpdate'](_0x272444['id'],_0x272444,!0x0);this['sendBufferedUpdates']();}return _0x573f7f;}['addRevisionData'](_0x803101){const _0x26c01e=this['repository']['createRevision'](_0x803101);return this['adapter']&&_0x26c01e['on']('_update',(_0x49c34a,_0x477554,_0x3aeab9)=>{_0x3aeab9||(this['_bufferUpdate'](_0x477554['id'],_0x477554,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x26c01e,this['_findInsertionIndex'](_0x26c01e)),_0x26c01e;}async['getRevisionDocumentData'](_0x5eab4a){return await this['_utils']['loadRevisionData'](_0x5eab4a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5eab4a);}async['getRevisionRootsAttributes'](_0x5df154){return await this['_utils']['loadRevisionData'](_0x5df154,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5df154);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0xfcb01c=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x4a2aeb=0x0;_0x4a2aeb<_0xfcb01c['length'];_0x4a2aeb++){const _0x4531f1=_0xfcb01c[_0x4a2aeb];let _0x5b49f3=!0x1;for(const _0x162a15 of Object['keys'](_0x4531f1))void 0x0===_0x4531f1[_0x162a15]?delete _0x4531f1[_0x162a15]:'id'!==_0x162a15&&(_0x5b49f3=!0x0);_0x5b49f3||(_0xfcb01c[_0x4a2aeb]=null);}if(_0xfcb01c=_0xfcb01c['filter'](_0x58144c=>null!==_0x58144c),!_0xfcb01c['length'])return;for(let _0x443c53=0x0;_0x443c53<_0xfcb01c['length'];_0x443c53++){const _0x357435=_0xfcb01c[_0x443c53];void 0x0!==_0x357435['fromVersion']&&void 0x0===_0x357435['toVersion']&&(_0x357435['toVersion']=this['repository']['getRevision'](_0x357435['id'])['toVersion']),void 0x0!==_0x357435['toVersion']&&void 0x0===_0x357435['fromVersion']&&(_0x357435['fromVersion']=this['repository']['getRevision'](_0x357435['id'])['fromVersion']);}const _0x1327f9=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0xfcb01c,_0x1327f9)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x2fb48d=>{if(_0x2fb48d){for(const _0x31cdba of _0x2fb48d)this['setRevisionData']({'id':_0x31cdba['id'],'createdAt':_0x31cdba['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x50998c=null,from:_0x1231fa=null,to:_0x266ed3=null}){_0x1231fa=null!==_0x1231fa?_0x1231fa:_0x50998c['fromVersion'],_0x266ed3=null!==_0x266ed3?_0x266ed3:_0x50998c['toVersion'];const _0x3fc317=this['_revisionDataBuilder']['getData'](_0x1231fa,_0x266ed3),_0x40f36b={'diffData':_0x3fc317['diffData'],'authorsIds':_0x3fc317['authorsIds'],'fromVersion':_0x1231fa,'toVersion':_0x266ed3};if(!_0x50998c||_0x266ed3!==_0x50998c['toVersion']){const _0x28ea85=_0x266ed3-0x1,_0x2c1ac7=this['_source']['history']['getOperation'](_0x28ea85);_0x40f36b['createdAt']=_0x2c1ac7&&_0x2c1ac7['createdAt']||new Date();}if(this['_loadedStateData']&&_0x1231fa===this['_loadedStateData']['fromVersion']){for(const _0x3b2adb of this['_loadedStateData']['authors'])_0x40f36b['authorsIds']['includes'](_0x3b2adb['id'])||_0x40f36b['authorsIds']['push'](_0x3b2adb['id']);}return _0x40f36b;}['_bufferUpdate'](_0x224bf2,_0x5c3e98,_0x315492){if(this['_bufferedUpdates']['has'](_0x224bf2)){const _0x5a9f3b=this['_bufferedUpdates']['get'](_0x224bf2);_0x5c3e98=_0x315492?{..._0x5a9f3b,..._0x5c3e98}:{..._0x5c3e98,..._0x5a9f3b};}this['_bufferedUpdates']['set'](_0x224bf2,_0x5c3e98);}['setRevisionData'](_0x35ea97){const _0x50a1b4=this['repository']['getRevision'](_0x35ea97['id']);if(_0x35ea97['createdAt']&&(_0x35ea97['createdAt']=new Date(_0x35ea97['createdAt'])),_0x35ea97['authorsIds']){const _0x16e5f9=this['editor']['plugins']['get']('Users');_0x35ea97['authors']=_0x35ea97['authorsIds']['map'](_0x107aa7=>_0x16e5f9['getUser'](_0x107aa7));}_0x50a1b4['_update'](_0x35ea97,!0x0);}['_createInitialRevision'](_0x117670){const _0x3722=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3722)this['_initialRevisionId']=_0x3722['id'];else{const _0x3a4248=!this['editor']['model']['document']['roots']['find'](_0x36b1d3=>this['editor']['model']['hasContent'](_0x36b1d3)),_0xb7bd24=this['editor']['plugins']['get']('Users')['me']['id'],_0x5f1b6b=m(this['editor']['locale'],_0x3a4248?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x117670,'to':_0x117670,'id':this['_initialRevisionId'],'name':_0x5f1b6b,'creatorId':_0xb7bd24});}}['_createCurrentRevision'](_0x14d40c){const _0x24889d=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x24889d),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x14d40c,'to':_0x14d40c,'id':_0x24889d,'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'](_0x88884f,_0x5ccfec){let _0x2ef38a=this['editor']['config']['get']('initialData'),_0x2bff97=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x2ef38a){_0x2ef38a={};for(const _0x52919f of this['editor']['model']['document']['getRootNames']())_0x2ef38a[_0x52919f]='';}if('string'==typeof _0x2ef38a&&(_0x2ef38a={'main':_0x2ef38a}),void 0x0===_0x2bff97){_0x2bff97={};for(const _0x2e14e1 of this['editor']['model']['document']['getRootNames']())_0x2bff97[_0x2e14e1]={};}let _0x94be5c=!0x1;const _0x473bf4=Object['keys'](_0x2ef38a),_0x5a7077=Object['keys'](_0x88884f);for(const _0x249f12 of _0x473bf4){if(_0x2ef38a[_0x249f12]!==_0x88884f[_0x249f12]&&''!==_0x2ef38a[_0x249f12]['trim']()){_0x94be5c=!0x0;break;}if(!_0x29b1c8(_0x2bff97[_0x249f12],_0x5ccfec[_0x249f12])&&Object['keys'](_0x2bff97[_0x249f12])['length']>0x0){_0x94be5c=!0x0;break;}}_0x94be5c||(_0x94be5c=_0x5a7077['some'](_0x5e306e=>!this['editor']['model']['document']['getRoot'](_0x5e306e))),_0x94be5c&&_0xeeb11e('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2ef38a,'editorRootsAttributes':_0x2bff97,'revisionData':_0x88884f,'revisionRootsAttributes':_0x5ccfec}),this['editor']['config']['set']('initialData',_0x88884f),this['editor']['config']['set']('rootsAttributes',_0x5ccfec);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x565595=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x565595['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x45b8b9){const _0x439069=this['repository']['getRevisions']();_0x439069['reverse']();let _0x3aa428=0x0;for(;_0x3aa428<_0x439069['length'];){const _0x4988fa=_0x439069[_0x3aa428];if(_0x4988fa===this['currentRevision']){_0x3aa428++;continue;}if(_0x4988fa['id']===this['_initialRevisionId'])break;const _0x2ff1f1=_0x45b8b9['toVersion']-_0x4988fa['toVersion']||_0x45b8b9['fromVersion']-_0x4988fa['fromVersion'];if(_0x2ff1f1>0x0)break;if(_0x2ff1f1<0x0)_0x3aa428++;else{if(!_0x45b8b9['creator']&&_0x4988fa['creator'])break;if(_0x4988fa['creator']||!_0x45b8b9['creator']){if(_0x45b8b9['createdAt']>_0x4988fa['createdAt'])break;_0x3aa428++;}else _0x3aa428++;}}return _0x3aa428;}['_getFromVersion'](_0x219837){const _0xce35c4=this['repository']['getRevisions']();_0xce35c4['reverse'](),_0xce35c4['shift']();const _0x2d58ee=_0xce35c4['find'](_0x2415cd=>_0x2415cd['toVersion']<=_0x219837)['toVersion'];return _0x2d58ee<this['_startingVersion']?this['_startingVersion']:_0x2d58ee;}['_makeRevision']({name:_0xf644c5,from:_0x420deb,to:_0x3abfb9,creatorId:_0x124a5e,id:_0x1fa5f4}){const _0x32ebea=this['buildRevisionData']({'from':_0x420deb,'to':_0x3abfb9});_0x32ebea['name']=_0xf644c5,_0x32ebea['creatorId']=_0x124a5e,_0x32ebea['id']=_0x1fa5f4;const _0x136810=this['addRevisionData'](_0x32ebea);return this['adapter']&&this['_bufferUpdate'](_0x32ebea['id'],_0x32ebea,!0x0),_0x136810;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x20c63e){this['editor']=_0x20c63e,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'](_0x47c535){this['source']=_0x47c535;const _0x259d4d=new Map(),_0x14fc40=new Map(),_0x2b78ab=this['editor']['model']['document']['roots']['map'](_0x64abf1=>_0x64abf1['rootName']);for(const _0x57c0f0 of _0x2b78ab){const _0x2fd32f=this['editor']['model']['document']['getRoot'](_0x57c0f0),_0x5aa91b=K(_0x2fd32f);_0x259d4d['set'](_0x57c0f0,_0x5aa91b),_0x14fc40['set'](_0x57c0f0,Object['fromEntries'](_0x2fd32f['getAttributes']()));}const _0x4a7756=Array['from'](this['editor']['model']['markers'])['map'](_0xfda4f6=>[_0xfda4f6['name'],_0xfda4f6['getRange']()]),_0x9b638e=this['source']['version'];this['_saveMetaData'](_0x9b638e,_0x259d4d,_0x4a7756,_0x14fc40),this['_startingRevisionId']=this['_revisionId'];const _0x489a69=new Map(),_0x335d0d=new Map();for(const _0x354871 of _0x2b78ab){const _0x24e12a=N(_0x354871);_0x489a69['set'](_0x354871,_0x24e12a),_0x335d0d['set'](_0x354871,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x489a69,[],_0x335d0d);}['getData'](_0x5ed197,_0x278808){if(this['_lastFrom']===_0x5ed197&&this['_lastTo']<=_0x278808)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x278808,!0x0);else{if(!this['_savedMetaData']['has'](_0x5ed197)){const _0x1619a8=this['_getPreviousFrom'](_0x5ed197);this['_calculateMetaData'](_0x1619a8,_0x5ed197,!0x1);}this['_calculateMetaData'](_0x5ed197,_0x278808,!0x0);}return this['_lastFrom']=_0x5ed197,this['_lastTo']=_0x278808,this['_getState']();}['loadState'](_0x5618fa){if(!this['_savedMetaData']['has'](_0x5618fa['fromVersion'])){const _0x2a20a4=this['_getPreviousFrom'](_0x5618fa['fromVersion']);this['_calculateMetaData'](_0x2a20a4,_0x5618fa['fromVersion'],!0x1);}this['_calculateMetaData'](_0x5618fa['fromVersion'],_0x5618fa['toVersion'],!0x1);const _0x420a0b=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5618fa['fromVersion'],this['_lastTo']=_0x5618fa['toVersion'];for(const _0x2ada78 in _0x5618fa['diffData']){const _0x2d084b=_0x5618fa['diffData'][_0x2ada78]['attachChange'],_0x330614=_0x3a4dea(_0x5618fa['diffData'][_0x2ada78]['attributesBefore'])||{},_0x260405=_0x420a0b['_makeModelFromViewString'](_0x5618fa['diffData'][_0x2ada78]['deletions']);_0x260405['rootName']=_0x2ada78,_0x260405['_isAttached']=!_0x2d084b||!_0x2d084b['isAttached'],_0x260405['isAttached']=()=>_0x260405['_isAttached'],this['_baseRoots']['set'](_0x2ada78,_0x260405),this['_baseRootsAttributes']['set'](_0x2ada78,_0x330614),_0x2d084b&&this['_touchedRoots']['set'](_0x2ada78,_0x2d084b);const _0x15505b=this['_makeIdsRoot'](_0x260405);this['_baseIdsRoots']['set'](_0x2ada78,_0x15505b);for(const [_0x4f32e6,_0x2e5d06]of _0x260405['markers']){if(!_0x4f32e6['startsWith']('revision:'))continue;const _0x577a9f=_0x4f32e6['split'](':')[0x2];for(const _0x3d6d69 of _0x2e5d06['getWalker']({'singleCharacters':!0x0})){const _0x26c0eb=this['_getVidAttributeName'](_0x3d6d69),_0x35183f='elementEnd'==_0x3d6d69['type']?_0x3d6d69['previousPosition']['path']['slice'](0x0,-0x1):_0x3d6d69['previousPosition']['path'],_0x133409=_0x15505b['getNodeByPath'](_0x35183f)['getAttribute'](_0x26c0eb);this['_touched']['set'](_0x133409,{'userId':_0x577a9f});}_0x260405['markers']['delete'](_0x4f32e6);}}this['_startingRevisionId']=this['_revisionId'];const _0x77f109=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3be412=>!this['_touched']['has'](_0x3be412));let _0x44ecc7=0x0;const _0x4e3b09=new Map();for(const _0x26ee6f in _0x5618fa['diffData']){const _0x34082c=_0x5618fa['diffData'][_0x26ee6f]['attachChange'],_0x29d5a9=_0x3a4dea(_0x5618fa['diffData'][_0x26ee6f]['attributesAfter'])||{},_0x204787=_0x420a0b['_makeModelFromViewString'](_0x5618fa['diffData'][_0x26ee6f]['insertions']);_0x204787['rootName']=_0x26ee6f,_0x204787['_isAttached']=!_0x34082c||_0x34082c['isAttached'],_0x204787['isAttached']=()=>_0x204787['_isAttached'],this['_diffRoots']['set'](_0x26ee6f,_0x204787),this['_diffRootsAttributes']['set'](_0x26ee6f,_0x29d5a9);const _0x42ebab=this['_makeIdsRoot'](_0x204787,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x26ee6f,_0x42ebab),_0x4e3b09['set'](_0x26ee6f,_0x204787['isAttached']()?_0x29d5a9:{});for(const [_0x5353f1,_0x4e5bdf]of _0x204787['markers']){if(!_0x5353f1['startsWith']('revision:'))continue;const _0x109ead=_0x5353f1['split'](':')[0x2];for(const _0x484fd4 of _0x4e5bdf['getWalker']({'singleCharacters':!0x0})){const _0x425249=this['_getVidAttributeName'](_0x484fd4),_0x279fb3=this['_revisionId']++,_0x1672cd='elementEnd'==_0x484fd4['type']?_0x484fd4['previousPosition']['path']['slice'](0x0,-0x1):_0x484fd4['previousPosition']['path'];_0x42ebab['getNodeByPath'](_0x1672cd)['_setAttribute'](_0x425249,_0x279fb3),this['_touched']['set'](_0x279fb3,{'userId':_0x109ead});}_0x204787['markers']['delete'](_0x5353f1);}for(const _0x251329 of this['editor']['model']['createRangeIn'](_0x204787)['getWalker']({'singleCharacters':!0x0})){const _0x51e71c=this['_getVidAttributeName'](_0x251329),_0x2ffe0b='elementEnd'==_0x251329['type']?_0x251329['previousPosition']['path']['slice'](0x0,-0x1):_0x251329['previousPosition']['path'],_0x1685d7=_0x42ebab['getNodeByPath'](_0x2ffe0b);_0x1685d7['getAttribute'](_0x51e71c)>0x0||_0x1685d7['_setAttribute'](_0x51e71c,_0x77f109[_0x44ecc7++]);}for(const [_0x332ab2,_0x4edbfa]of _0x204787['markers'])_0x332ab2['startsWith']('revision:')||this['_markers']['set'](_0x332ab2,_0x4edbfa);}const {roots:_0x2653b9}=this['_savedMetaData']['get'](_0x5618fa['fromVersion']),{roots:_0x2064e9}=this['_savedMetaData']['get'](_0x5618fa['toVersion']),_0x5eacf4=K(_0x2653b9['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x5eacf4),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5eacf4,Number['NEGATIVE_INFINITY']));const _0x25d5d5=K(_0x2064e9['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x25d5d5),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x25d5d5));const _0x6729a4=Array['from'](this['_diffRoots'])['map'](([_0x2f47c5,_0x5ead54])=>[_0x2f47c5,K(_0x5ead54)]);this['_saveMetaData'](this['_lastTo'],_0x6729a4,this['_markers'],_0x4e3b09);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x5dc619,_0x1be1fd,_0x5e9918,_0x3b8013){const _0x5e25ea=new Map(_0x1be1fd),_0x4ccfb4=new Map(_0x3a4dea(_0x3b8013)),_0x1b9c99=new Map();for(const [_0x1eb553,_0x2bcb43]of _0x5e9918)_0x1b9c99['set'](_0x1eb553,{'start':_0x2bcb43['start']['clone'](),'end':_0x2bcb43['end']['clone'](),'rootName':_0x2bcb43['root']['rootName']});this['_savedMetaData']['set'](_0x5dc619,{'roots':_0x5e25ea,'markers':_0x1b9c99,'rootsAttributes':_0x4ccfb4});}['_removeMetaData'](_0x3d63e7){this['_savedMetaData']['delete'](_0x3d63e7);}['_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'](_0x32f1da,_0x1f23dd=null){let _0x362a05=null;_0x32f1da['is']('documentFragment')||(_0x362a05=new _0x3d9a08(_0x32f1da['name'],{'vid_start':null===_0x1f23dd?this['_revisionId']++:_0x1f23dd++}));const _0x33870e=[];for(const _0x1755be of _0x32f1da['getChildren']())if(_0x1755be['is']('element')){_0x33870e['push'](this['_makeIdsRoot'](_0x1755be,_0x1f23dd));const _0x32b60c=_0x33870e[_0x33870e['length']-0x1];null!==_0x1f23dd&&(_0x1f23dd=_0x32b60c['is']('element','$text')?_0x32b60c['getAttribute']('vid')+0x1:_0x32b60c['getAttribute']('vid_end')+0x1);}else{for(let _0x3fec41=0x0;_0x3fec41<_0x1755be['offsetSize'];_0x3fec41++)_0x33870e['push'](new _0x3d9a08('$text',{'vid':null===_0x1f23dd?this['_revisionId']++:_0x1f23dd++}));}if(_0x32f1da['is']('documentFragment')){const _0x5d997b=N(_0x32f1da['rootName']);return _0x5d997b['_insertChild'](0x0,_0x33870e),_0x5d997b;}return _0x362a05['_setAttribute']('vid_end',null===_0x1f23dd?this['_revisionId']++:_0x1f23dd++),_0x362a05['_insertChild'](0x0,_0x33870e),_0x362a05;}['_calculateMetaData'](_0x39defb,_0x48c409,_0x289f80){this['_reset']();const {roots:_0x583f91,markers:_0x3b3a36,rootsAttributes:_0x53da0b}=this['_savedMetaData']['get'](_0x39defb);this['_baseRoots']=new Map(_0x583f91),this['_baseRootsAttributes']=new Map(_0x3a4dea(_0x53da0b));for(const [_0x116db4,_0x59d1d3]of this['_baseRoots'])if('$graveyard'!==_0x116db4&&(this['_diffRoots']['set'](_0x116db4,K(_0x59d1d3)),this['_diffRootsAttributes']=new Map(_0x3a4dea(_0x53da0b)),_0x289f80)){const _0x25f30d=this['_revisionId'];this['_idsRoots']['set'](_0x116db4,this['_makeIdsRoot'](_0x59d1d3)),this['_baseIdsRoots']['set'](_0x116db4,this['_makeIdsRoot'](_0x59d1d3,_0x25f30d));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',K(this['_baseRoots']['get']('$graveyard'))),_0x289f80&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1f875d,_0x137937]of _0x3b3a36){const _0x3f3070=this['_baseRoots']['get'](_0x137937['rootName']),_0x59ff92=this['_diffRoots']['get'](_0x137937['rootName']),_0x322670=new _0x8b622d(this['_fixPosition'](_0x137937['start'],_0x3f3070),this['_fixPosition'](_0x137937['end'],_0x3f3070)),_0x1493b4=this['_fixRange'](_0x322670,_0x59ff92);_0x3f3070['markers']['set'](_0x1f875d,_0x322670),this['_markers']['set'](_0x1f875d,_0x1493b4);}this['_applyOperations'](_0x39defb,_0x48c409,_0x289f80);}['_applyOperations'](_0xa32f27,_0xcd86e,_0x48b9a0){for(const _0x393ea6 of this['source']['getOperations'](_0xa32f27,_0xcd86e))this['_handleOperation'](_0x393ea6,_0x48b9a0);for(const _0x571b7e of this['_diffRoots']['values']())_0x571b7e['markers']['clear']();for(const [_0x3e2f86,_0x5c0c84]of this['_markers']){this['_diffRoots']['get'](_0x5c0c84['root']['rootName'])['markers']['set'](_0x3e2f86,_0x5c0c84['clone']());}const _0x58d080=new Map(),_0x3a5584=new Map();for(const [_0x3a3522,_0x2713a4]of this['_diffRoots'])_0x58d080['set'](_0x3a3522,K(_0x2713a4)),_0x3a5584['set'](_0x3a3522,this['_diffRootsAttributes']['get'](_0x3a3522));this['_saveMetaData'](_0xcd86e,_0x58d080,this['_markers'],_0x3a5584);}['_getPreviousFrom'](_0x50ccd5){const _0x3a1b90=Array['from'](this['_savedMetaData']['keys']());_0x3a1b90['sort']((_0x59886c,_0x54d162)=>_0x59886c-_0x54d162),_0x3a1b90['reverse']();for(const _0x394d01 of _0x3a1b90)if(_0x394d01<_0x50ccd5)return _0x394d01;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1b2209,_0x146e3c){const _0x5ca3f8=Array['from'](_0x146e3c['markers'])['map'](([_0x142572,_0x17a32c])=>[_0x142572,this['_fixRange'](_0x17a32c,_0x1b2209)]);_0x1b2209['markers']=new Map(_0x5ca3f8);}['_transformMarkers'](_0x2093d3){for(const _0x50b6c4 of this['_markers']['values']()){const _0x1f3898=_0x50b6c4['getTransformedByOperation'](_0x2093d3),_0x14e187=_0x8b622d['_createFromRanges'](_0x1f3898);_0x50b6c4['start']=_0x14e187['start'],_0x50b6c4['end']=_0x14e187['end'];}}['_handleOperation'](_0x1ca43e,_0x47ff95){if('addRoot'!=_0x1ca43e['type']&&'detachRoot'!=_0x1ca43e['type']){if('insert'==_0x1ca43e['type']){const _0x5dcdf1=_0x1ca43e['position']['root']['rootName'];this['_diffRoots']['has'](_0x5dcdf1)||(this['_diffRoots']['set'](_0x5dcdf1,N(_0x5dcdf1,!0x0)),this['_diffRootsAttributes']['set'](_0x5dcdf1,{}),_0x47ff95&&this['_idsRoots']['set'](_0x5dcdf1,N(_0x5dcdf1,!0x0)));}else{if('addRootAttribute'==_0x1ca43e['type']||'removeRootAttribute'==_0x1ca43e['type']||'changeRootAttribute'==_0x1ca43e['type'])return void this['_handleRootAttributeOperation'](_0x1ca43e);'marker'==_0x1ca43e['type']&&this['_handleMarkerOperation'](_0x1ca43e);}if('marker'!==_0x1ca43e['type']){const _0x4d14f1=this['_cloneOperation'](_0x1ca43e,this['_diffRoots']);_0x4d14f1['_execute'](),this['_transformMarkers'](_0x4d14f1);}if(_0x47ff95)switch(_0x1ca43e['type']){case'insert':this['_handleInsertOperation'](_0x1ca43e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1ca43e);break;case'merge':this['_handleMergeOperation'](_0x1ca43e);break;case'split':this['_handleSplitOperation'](_0x1ca43e);}}else this['_handleRootOperation'](_0x1ca43e,_0x47ff95);}['_cloneOperation'](_0x38c265,_0x4bcceb){const _0x2397e6=_0x38c265['clone']();return _0x2397e6['_authorId']=_0x38c265['_authorId'],this['_fixOperation'](_0x2397e6,_0x4bcceb),_0x2397e6;}['_getBaseVids'](_0x28cccb){return _0x28cccb['map'](_0x24a9e6=>{const _0x167dc6=this['_getVidAttributeName'](_0x24a9e6);return Number(_0x24a9e6['item']['getAttribute'](_0x167dc6));});}['_generateTape'](_0x45cc6e,_0x2142ca){if(_0x45cc6e['is']('element','$text'))_0x2142ca['push']({'item':_0x45cc6e,'type':'text'});else{_0x45cc6e['is']('element')&&_0x2142ca['push']({'item':_0x45cc6e,'type':'elementStart'});for(const _0x27034d of _0x45cc6e['getChildren']())this['_generateTape'](_0x27034d,_0x2142ca);_0x45cc6e['is']('element')&&_0x2142ca['push']({'item':_0x45cc6e,'type':'elementEnd'});}return _0x2142ca;}['_getState'](){const _0x161878=new Map(this['_touched']),_0x3904e6=new Map(_0x161878),_0x4f0ed0=new Map(),_0x381e25={'insertions':{},'deletions':{}},_0x2bb20c={'insertions':{},'deletions':{}},_0x28d933=new Map(),_0x3514d0=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3514d0['delete']('$graveyard');for(const _0x5cc42a of _0x3514d0){const _0x461213=this['_diffRoots']['get'](_0x5cc42a)||N(_0x5cc42a,!0x1),_0x15832a=this['_baseRoots']['get'](_0x5cc42a)||N(_0x5cc42a,!0x1);_0x461213['isAttached']()||_0x15832a['isAttached']()?(_0x381e25['insertions'][_0x5cc42a]=K(_0x461213),_0x381e25['deletions'][_0x5cc42a]=K(_0x15832a),this['_copyMarkers'](_0x381e25['deletions'][_0x5cc42a],_0x15832a),this['_copyMarkers'](_0x381e25['insertions'][_0x5cc42a],_0x461213),_0x2bb20c['insertions'][_0x5cc42a]=this['_generateTape'](this['_idsRoots']['get'](_0x5cc42a),[]),_0x2bb20c['deletions'][_0x5cc42a]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x5cc42a)||N(_0x5cc42a,!0x1),[])):_0x3514d0['delete'](_0x5cc42a);}for(const _0x12edca of _0x3514d0){const _0x116862=_0x2bb20c['insertions'][_0x12edca];for(const _0x1a1ac0 of _0x116862){const _0x204a18=this['_getVidAttributeName'](_0x1a1ac0),_0x5f0b03=_0x1a1ac0['item']['getAttribute'](_0x204a18);_0x3904e6['delete'](_0x5f0b03),_0x5f0b03>=this['_startingRevisionId']&&_0x4f0ed0['set'](_0x5f0b03,_0x161878['get'](_0x5f0b03));}}for(const _0x50e8fb of _0x3514d0){const _0x116e45=_0x2bb20c['insertions'][_0x50e8fb],_0x248b11=this['_getBaseVids'](_0x2bb20c['deletions'][_0x50e8fb]);let _0x35ea8e=0x0;for(const _0x21050d of _0x116e45){const _0x2f80c8=this['_getVidAttributeName'](_0x21050d),_0x3b1e87=_0x21050d['item']['getAttribute'](_0x2f80c8);if(!_0x4f0ed0['has'](_0x3b1e87)&&!_0x28d933['has'](_0x3b1e87)){if(_0x3904e6['has'](_0x3b1e87))_0x35ea8e++;else{if(_0x3b1e87!=_0x248b11[_0x35ea8e]){const _0x3130a2=_0x161878['get'](_0x3b1e87)||_0x161878['get'](_0x248b11[_0x35ea8e]);for(;_0x3b1e87!=_0x248b11[_0x35ea8e];)_0x3904e6['has'](_0x248b11[_0x35ea8e])||(_0x28d933['set'](_0x248b11[_0x35ea8e],_0x3130a2),_0x161878['set'](_0x248b11[_0x35ea8e],_0x3130a2)),_0x35ea8e++;}_0x35ea8e++;}}}}for(const _0x3b4561 of _0x3514d0){const _0x2c0d8a=_0x2bb20c['insertions'][_0x3b4561];for(const _0xcb5479 of _0x2c0d8a){const _0x310492=this['_getVidAttributeName'](_0xcb5479),_0x20e931=_0xcb5479['item']['getAttribute'](_0x310492);if(_0x28d933['has'](_0x20e931)){const _0x339e0e=_0x28d933['get'](_0x20e931);_0x3904e6['has'](_0x20e931)||_0x3904e6['set'](_0x20e931,{..._0x339e0e}),_0x4f0ed0['set'](_0x20e931,{..._0x339e0e});}}}for(const _0x145afd of _0x3904e6['keys']())_0x145afd>=this['_startingRevisionId']&&_0x3904e6['delete'](_0x145afd);const _0x4ef116=new Map();for(const _0x3204ef of _0x3514d0){let _0xb63235=_0x2bb20c['insertions'][_0x3204ef];for(const _0xd13cbd of _0xb63235)if(_0xd13cbd['item']['is']('element','tableCell')){const _0x475ffd=this['_getVidAttributeName'](_0xd13cbd),_0x29e790=_0xd13cbd['item']['getAttribute'](_0x475ffd);if(_0x4f0ed0['has'](_0x29e790)){const _0x3216fc=_0xd13cbd['item']['parent']['parent']['getAttribute']('vid_start'),_0x164e00=_0x4ef116['get'](_0x3216fc)||new Set();_0x164e00['add'](_0x4f0ed0['get'](_0x29e790)['userId']),_0x4ef116['set'](_0x3216fc,_0x164e00);}}_0xb63235=_0x2bb20c['deletions'][_0x3204ef];for(const _0x308ca9 of _0xb63235)if(_0x308ca9['item']['is']('element','tableCell')){const _0x1eafe1=this['_getVidAttributeName'](_0x308ca9),_0x323f11=_0x308ca9['item']['getAttribute'](_0x1eafe1);if(_0x3904e6['has'](_0x323f11)){const _0x1275ec=_0x308ca9['item']['parent']['parent']['getAttribute']('vid_start'),_0x5ef538=_0x4ef116['get'](_0x1275ec)||new Set();_0x5ef538['add'](_0x3904e6['get'](_0x323f11)['userId']),_0x4ef116['set'](_0x1275ec,_0x5ef538);}}for(const _0x307dcb of _0x4ef116['keys']())(_0x4f0ed0['has'](_0x307dcb)||_0x3904e6['has'](_0x307dcb))&&_0x4ef116['delete'](_0x307dcb);}for(const _0x4cd4e8 of _0x3514d0){const _0xf63acb=_0x2bb20c['insertions'][_0x4cd4e8];let _0x3cb637=null,_0x26f48a=null;for(const _0x469c4a of _0xf63acb){const _0x345d8c=this['_getVidAttributeName'](_0x469c4a),_0x2e792d=_0x469c4a['item']['getAttribute'](_0x345d8c),_0x1cacad=_0x4ef116['get'](_0x2e792d);_0x1cacad&&'elementStart'==_0x469c4a['type']&&(_0x3cb637=Array['from'](_0x1cacad)[0x0],_0x26f48a=_0x469c4a['item']['getAttribute']('vid_end')),_0x3cb637&&(_0x3904e6['set'](_0x2e792d,{'userId':_0x3cb637}),_0x4f0ed0['set'](_0x2e792d,{'userId':_0x3cb637})),_0x2e792d==_0x26f48a&&(_0x3cb637=null,_0x26f48a=null);}}const _0x6e8f82={},_0x3e54a7=new Set();for(const _0x2908cc of _0x3514d0){const _0x4f973b=_0x381e25['deletions'][_0x2908cc],_0x2a67eb=_0x381e25['insertions'][_0x2908cc];for(const {userId:_0x117db4}of this['_touchedMarkers']['values']())null!==_0x117db4&&_0x3e54a7['add'](_0x117db4);for(const {userId:_0x170789}of this['_touchedRoots']['values']())null!==_0x170789&&_0x3e54a7['add'](_0x170789);this['_markChanges'](_0x2a67eb,_0x2bb20c['insertions'][_0x2908cc],_0x4f0ed0,'insertion',_0x3e54a7),this['_markChanges'](_0x4f973b,_0x2bb20c['deletions'][_0x2908cc],_0x3904e6,'deletion',_0x3e54a7),_0x6e8f82[_0x2908cc]={'insertions':this['_prepareViewToSave'](_0x2a67eb),'deletions':this['_prepareViewToSave'](_0x4f973b),'attachChange':this['_touchedRoots']['get'](_0x2908cc)||null,'attributesBefore':_0x3a4dea(this['_baseRootsAttributes']['get'](_0x2908cc))||{},'attributesAfter':_0x3a4dea(this['_diffRootsAttributes']['get'](_0x2908cc))};}return{'diffData':_0x6e8f82,'authorsIds':Array['from'](_0x3e54a7)};}['_processRootBeforeSave'](_0x547ba4){for(const [,_0x556740]of _0x547ba4['markers']){const _0xb68ac3=_0x556740['start']['getAncestors']()['filter'](_0x4f3605=>'tableCell'==_0x4f3605['name']);for(const _0xe81a6a of _0xb68ac3)0x1==_0xe81a6a['childCount']&&_0xe81a6a['getChild'](0x0)['is']('element','paragraph')&&_0xe81a6a['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x35f167){this['_processRootBeforeSave'](_0x35f167);const _0x2bc4b3=this['editor']['data']['toView'](_0x35f167,{}),_0x332c03=Array['from'](_0x2bc4b3['getChildren']())['map'](_0x3d43eb=>this['_getViewJson'](_0x3d43eb));return JSON['stringify'](_0x332c03);}['_getViewJson'](_0x2fe523){if(_0x2fe523['is']('$text'))return _0x2fe523['data'];{const _0x1dcc9c=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x897252=_0x2fe523,_0x3735a7=this['editor']['data']['htmlProcessor']['domConverter'],_0x47c633={'type':_0x1dcc9c['_getTypeCharForViewElement'](_0x897252),'name':_0x897252['name'],'attributes':Array['from'](_0x897252['getAttributes']()),'children':Array['from'](_0x897252['getChildren']())['map'](_0x2f2655=>this['_getViewJson'](_0x2f2655))};if(_0x2fe523['is']('uiElement')&&'$comment'!=_0x2fe523['name']){const _0x5a39ee=_0x2fe523['render'](_0x3735a7['domDocument'],_0x3735a7);_0x47c633['children']['push'](_0x5a39ee['outerHTML']);}else{if(_0x2fe523['is']('rawElement')){const _0x3eb6fa=_0x3735a7['domDocument']['createElement'](_0x897252['name']);_0x2fe523['render'](_0x3eb6fa,_0x3735a7),_0x47c633['children']['push'](_0x3eb6fa['innerHTML']);}}const _0x554c96=Array['from'](_0x897252['getCustomProperties']());_0x554c96['length']>0x0&&(_0x47c633['customProperties']=_0x554c96);const _0x36f20d=_0x897252['getFillerOffset']();return null!==_0x36f20d&&(_0x47c633['fillerOffset']=_0x36f20d),_0x47c633;}}['_markChanges'](_0x2c1b12,_0x540dc6,_0x1db9e7,_0x14282b,_0x6ef2ca){let _0x8ae86f=null,_0x37e780=null,_0xe809d=0x0;const _0x135b39=this['editor']['model'];for(let _0x1d53c5=0x0;_0x1d53c5<_0x540dc6['length'];_0x1d53c5++){const _0x1995ee=this['_getVidAttributeName'](_0x540dc6[_0x1d53c5]),_0x1f7caf=_0x540dc6[_0x1d53c5]['item']['getAttribute'](_0x1995ee),_0x38f3bd=_0x1db9e7['get'](_0x1f7caf),_0x1fd328=_0x1d53c5==_0x540dc6['length']-0x1;(!_0x8ae86f&&_0x38f3bd&&(_0x8ae86f=_0x38f3bd,_0x37e780=_0x540dc6[_0x1d53c5]),_0x8ae86f&&(!_0x38f3bd||_0x38f3bd['userId']!=_0x8ae86f['userId']))&&(_0x471881(_0x38f3bd,P(_0x37e780,_0x2c1b12,_0x135b39),P(_0x540dc6[_0x1d53c5],_0x2c1b12,_0x135b39)),_0x8ae86f=_0x38f3bd||null,_0x37e780=_0x38f3bd?_0x540dc6[_0x1d53c5]:null),_0x8ae86f&&_0x1fd328&&_0x471881(_0x38f3bd,P(_0x37e780,_0x2c1b12,_0x135b39),V(_0x540dc6[_0x1d53c5],_0x2c1b12,_0x135b39));}function _0x471881(_0x1aa81b,_0x1f99c8,_0x2e9c6e){const _0x48dfbd=_0x8ae86f['userId'],_0x4159cf='revision:'+_0x14282b+':'+_0x48dfbd+':'+_0xe809d++,_0x4f5662=_0x135b39['createRange'](_0x1f99c8,_0x2e9c6e);_0x2c1b12['markers']['set'](_0x4159cf,_0x4f5662),null!==_0x48dfbd&&_0x6ef2ca['add'](_0x48dfbd);}}['_getVidAttributeName'](_0x552613){switch(_0x552613['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x4c7618,_0x8c7e13){_0x4c7618['baseVersion']=null;for(const _0x125431 in _0x4c7618){const _0x248aa0=_0x4c7618[_0x125431];if(_0x248aa0 instanceof _0x150022){const _0x594883=_0x8c7e13['get'](_0x248aa0['root']['rootName']);_0x4c7618[_0x125431]=this['_fixPosition'](_0x248aa0,_0x594883);}if(_0x248aa0 instanceof _0x8b622d){const _0x361202=_0x8c7e13['get'](_0x248aa0['root']['rootName']);_0x4c7618[_0x125431]=this['_fixRange'](_0x248aa0,_0x361202);}'root'===_0x125431&&(_0x4c7618['root']=_0x8c7e13['get'](_0x4c7618['root']['rootName']));}}['_fixRange'](_0x119588,_0x2d54c3){return this['editor']['model']['createRange'](this['_fixPosition'](_0x119588['start'],_0x2d54c3),this['_fixPosition'](_0x119588['end'],_0x2d54c3));}['_fixPosition'](_0x552199,_0x33fda7){return this['editor']['model']['createPositionFromPath'](_0x33fda7,_0x552199['path'],_0x552199['stickiness']);}['_handleInsertOperation'](_0x2ff4ac){const _0x8076c5=this['_idsRoots']['get'](_0x2ff4ac['position']['root']['rootName']),_0x2fc64c=this['_fixPosition'](_0x2ff4ac['position'],_0x8076c5),_0x2adb34=null===_0x2ff4ac['_authorId']?null:_0x2ff4ac['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x29ca52=_0x2fc64c['parent'],_0x4a83a4=this['_revisionId'],_0x3f40c2=[];for(const _0x33aca3 of _0x2ff4ac['nodes'])if(_0x33aca3['is']('element'))_0x3f40c2['push'](this['_makeIdsRoot'](_0x33aca3));else{for(let _0x4e7e06=0x0;_0x4e7e06<_0x33aca3['offsetSize'];_0x4e7e06++)_0x3f40c2['push'](new _0x3d9a08('$text',{'vid':this['_revisionId']++}));}const _0x3ffddc=this['_revisionId'];for(let _0x415e0e=_0x4a83a4;_0x415e0e<_0x3ffddc;_0x415e0e++)this['_touched']['set'](_0x415e0e,{'userId':_0x2adb34});_0x29ca52['_insertChild'](_0x2fc64c['offset'],_0x3f40c2);}['_handleMoveOperation'](_0x50c694){(_0x50c694=this['_cloneOperation'](_0x50c694,this['_idsRoots']))['_execute']();const _0x1f0174=null===_0x50c694['_authorId']?null:_0x50c694['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x19df12=_0x50c694['getMovedRangeStart'](),_0x48af37=_0x19df12['parent'],_0x46d6fc=_0x19df12['offset'];!function _0xe0edf5(_0x3daaf9,_0x5ce171,_0x431189,_0x1cd7d5){for(let _0x11013a=_0x431189;_0x11013a<_0x1cd7d5;_0x11013a++){const _0x201d0c=_0x5ce171['getChild'](_0x11013a);_0x201d0c['is']('element','$text')?_0x3daaf9['set'](_0x201d0c['getAttribute']('vid'),{'userId':_0x1f0174}):(_0x3daaf9['set'](_0x201d0c['getAttribute']('vid_start'),{'userId':_0x1f0174}),_0xe0edf5(_0x3daaf9,_0x201d0c,0x0,_0x201d0c['childCount']),_0x3daaf9['set'](_0x201d0c['getAttribute']('vid_end'),{'userId':_0x1f0174}));}}(this['_touched'],_0x48af37,_0x46d6fc,_0x46d6fc+_0x50c694['howMany']);}['_handleMergeOperation'](_0x57cdbd){const _0x4dd6be=null===(_0x57cdbd=this['_cloneOperation'](_0x57cdbd,this['_idsRoots']))['_authorId']?null:_0x57cdbd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2693c9=_0x57cdbd['targetPosition']['parent'],_0x420d73=_0x57cdbd['sourcePosition']['parent'],_0x8095b3=_0x2693c9['getAttribute']('vid_end'),_0x4b57d9=_0x420d73['getAttribute']('vid_start');_0x2693c9['_setAttribute']('vid_end',_0x420d73['getAttribute']('vid_end')),_0x420d73['_setAttribute']('vid_end',_0x8095b3),this['_touched']['set'](_0x4b57d9,{'userId':_0x4dd6be}),this['_touched']['set'](_0x8095b3,{'userId':_0x4dd6be}),_0x57cdbd['_execute']();}['_handleSplitOperation'](_0x58d018){const _0x4919e4=null===(_0x58d018=this['_cloneOperation'](_0x58d018,this['_idsRoots']))['_authorId']?null:_0x58d018['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x18e531=_0x58d018['graveyardPosition'],_0x2b48a5=_0x58d018['splitPosition']['parent'];_0x58d018['_execute']();const _0x1933d5=_0x2b48a5['getAttribute']('vid_end'),_0x2a517c=_0x58d018['insertionPosition']['nodeAfter'];if(_0x18e531){const _0x14b28d=_0x2a517c['getAttribute']('vid_end'),_0x2caa79=_0x2b48a5['getAttribute']('vid_end');_0x2b48a5['_setAttribute']('vid_end',_0x14b28d),_0x2a517c['_setAttribute']('vid_end',_0x2caa79),this['_touched']['set'](_0x2b48a5['getAttribute']('vid_end'),{'userId':_0x4919e4}),this['_touched']['set'](_0x2a517c['getAttribute']('vid_start'),{'userId':_0x4919e4});}else{const _0x53e8eb=this['_revisionId']++,_0xe4cb4c=this['_revisionId']++;_0x2b48a5['_setAttribute']('vid_end',_0x53e8eb),_0x2a517c['_setAttribute']('vid_start',_0xe4cb4c),_0x2a517c['_setAttribute']('vid_end',_0x1933d5),this['_touched']['set'](_0x53e8eb,{'userId':_0x4919e4}),this['_touched']['set'](_0xe4cb4c,{'userId':_0x4919e4});}}['_handleMarkerOperation'](_0x1cdb79){if(!_0x1cdb79['affectsData'])return;const _0x3122a2=(_0x1cdb79=this['_cloneOperation'](_0x1cdb79,this['_diffRoots']))['oldRange']?_0x1cdb79['oldRange']['root']:null,_0x2152f7=_0x1cdb79['newRange']?_0x1cdb79['newRange']['root']:null;_0x3122a2&&this['_markers']['delete'](_0x1cdb79['name']),_0x2152f7&&this['_markers']['set'](_0x1cdb79['name'],_0x1cdb79['newRange']['clone']());const _0x9d2725=null===_0x1cdb79['_authorId']?null:_0x1cdb79['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1f90f1=_0x1cdb79['name'];if(!this['_touchedMarkers']['has'](_0x1f90f1))return void this['_touchedMarkers']['set'](_0x1f90f1,{'range':_0x1cdb79['oldRange'],'userId':_0x9d2725});const _0xdb5176=this['_touchedMarkers']['get'](_0x1f90f1),_0x4781a1=_0xdb5176['range'],_0x436ffd=_0x1cdb79['newRange'];null==_0x4781a1&&null==_0x436ffd||_0x4781a1&&_0x436ffd&&_0x4781a1['isEqual'](_0x436ffd)?this['_touchedMarkers']['delete'](_0x1cdb79['name']):_0xdb5176['userId']=_0x9d2725;}['_handleRootOperation'](_0x3a7e05,_0x1130b7){this['_diffRoots']['has'](_0x3a7e05['rootName'])?this['_diffRoots']['get'](_0x3a7e05['rootName'])['_isAttached']=_0x3a7e05['isAdd']:(this['_diffRoots']['set'](_0x3a7e05['rootName'],N(_0x3a7e05['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3a7e05['rootName'],{}),_0x1130b7&&this['_idsRoots']['set'](_0x3a7e05['rootName'],N(_0x3a7e05['rootName'],!0x0)));const _0x324577=null===_0x3a7e05['_authorId']?null:_0x3a7e05['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4ad6c0=this['_touchedRoots']['get'](_0x3a7e05['rootName']);_0x4ad6c0&&_0x4ad6c0['userId']===_0x324577?this['_touchedRoots']['delete'](_0x3a7e05['rootName']):this['_touchedRoots']['set'](_0x3a7e05['rootName'],{'userId':_0x324577,'isAttached':_0x3a7e05['isAdd']});}['_handleRootAttributeOperation'](_0x1b2652){const _0x2427bc=this['_diffRootsAttributes']['get'](_0x1b2652['root']['rootName']);null===_0x1b2652['newValue']?delete _0x2427bc[_0x1b2652['key']]:_0x2427bc[_0x1b2652['key']]=_0x1b2652['newValue'];}}function K(_0x2d5752){const _0x314884=N(_0x2d5752['rootName'],_0x2d5752['isAttached']());for(const _0x35ea5e of _0x2d5752['getChildren']()){const _0x3c52da=_0x35ea5e['_clone'](!0x0);_0x314884['_appendChild'](_0x3c52da);}return _0x314884;}function N(_0x59b7f7,_0x3b8c8f=!0x0){const _0x3a6722=new _0x4a21a9();return _0x3a6722['rootName']=_0x59b7f7,_0x3a6722['_isAttached']=_0x3b8c8f,_0x3a6722['isAttached']=()=>_0x3a6722['_isAttached'],_0x3a6722;}function P(_0x542da7,_0x4911f2,_0x3e9f52){const _0x3edf40='elementEnd'==_0x542da7['type']?_0x3e9f52['createPositionAt'](_0x542da7['item'],'end'):_0x3e9f52['createPositionBefore'](_0x542da7['item']);return _0x3e9f52['createPositionFromPath'](_0x4911f2,_0x3edf40['path'],_0x3edf40['stickiness']);}function V(_0x1bcfc5,_0x303483,_0x9e4429){const _0x5a8356='elementStart'==_0x1bcfc5['type']?_0x9e4429['createPositionAt'](_0x1bcfc5['item'],0x0):_0x9e4429['createPositionAfter'](_0x1bcfc5['item']);return _0x9e4429['createPositionFromPath'](_0x303483,_0x5a8356['path'],_0x5a8356['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
- _0x197115(_0x212fb1){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x10aed5,_0x54cb1d){super(_0x10aed5),this['focusTracker']=new _0xf1c08a(),this['keystrokes']=new _0x275c98(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x54cb1d),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'](),_0x3f12e2({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x347f2f=_0x4fba4a=>_0x4fba4a['stopPropagation']();this['keystrokes']['set']('arrowright',_0x347f2f),this['keystrokes']['set']('arrowleft',_0x347f2f),this['keystrokes']['set']('arrowup',_0x347f2f),this['keystrokes']['set']('arrowdown',_0x347f2f);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x4f4fea){this['revisionNameInputView']['fieldView']['element']['value']=_0x4f4fea['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x48a209){const _0x47950c=new ti(this['locale'],_0x1cdcaa),_0x2275e0=_0x47950c['fieldView'];_0x2275e0['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4741a9=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x48a209&&(_0x4741a9+='\x20('+m(this['locale'],'optional')+')'),(_0x47950c['label']=_0x4741a9,_0x2275e0['on']('input',()=>{this['revisionNameInputValue']=_0x2275e0['element']['value']['trim']();}),_0x47950c);}}class l extends _0xcfa495{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x458a3f=this['editor'],_0x355ff1=_0x458a3f['plugins']['get']('RevisionTracker');_0x458a3f['ui']['componentFactory']['add']('revisionHistory',_0x533ba9=>{const _0x1c2509=_0x57ae92(_0x533ba9),_0x267228=_0x1c2509['panelView']['children'],_0x253146=new _0x188876(_0x533ba9),_0x6f50ec=new _0x56e998(_0x533ba9),_0x3a823e=this['_createSaveRevisionButton'](_0x28948f),_0x30baae=new _0x56e998(_0x533ba9),_0x35bfdd=this['_createOpenRevisionButton'](_0x28948f);return _0x1c2509['bind']('isEnabled')['to'](_0x355ff1,'isReady',_0x355ff1,'isEnabled',_0x458a3f,'isReadOnly',(_0x5194ae,_0xecd9ec,_0x579475)=>_0x5194ae&&_0xecd9ec&&!_0x579475),_0x1c2509['buttonView']['set']({'icon':_0x1bc09b,'label':m(_0x533ba9,'Revision\x20history'),'tooltip':!0x0}),_0x3a823e['set']({'withText':!0x0,'role':'menuitem'}),_0x35bfdd['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x35bfdd,'execute',()=>{_0x1c2509['isOpen']=!0x1,_0x458a3f['editing']['view']['focus']();},{'priority':'low'}),_0x6f50ec['children']['add'](_0x3a823e),_0x30baae['children']['add'](_0x35bfdd),_0x253146['role']='menu',_0x253146['items']['addMany']([_0x6f50ec,_0x30baae]),_0x267228['add'](_0x253146),_0x1c2509;}),_0x458a3f['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x3d2ab9=this['editor'],_0x567f4=_0x3d2ab9['locale'],_0x487e24=_0x3d2ab9['plugins']['get']('RevisionTracker'),_0x514538=new _0x40b207(_0x567f4),_0x31ae23=new _0x4565c8(_0x567f4);_0x514538['bind']('isEnabled')['to'](_0x487e24,'isReady',_0x487e24,'isEnabled',_0x3d2ab9,'isReadOnly',(_0x4d279c,_0x424cf9,_0x5648cb)=>_0x4d279c&&_0x424cf9&&!_0x5648cb),_0x514538['buttonView']['set']({'icon':_0x1bc09b,'label':m(_0x567f4,'Revision\x20history')});const _0x43d80d=new _0x3336bb(_0x567f4,_0x514538),_0x5e7740=this['_createSaveRevisionButton'](_0x3e055a);_0x5e7740['delegate']('execute')['to'](_0x514538),_0x43d80d['children']['add'](_0x5e7740),_0x31ae23['items']['add'](_0x43d80d);const _0x599574=new _0x3336bb(_0x567f4,_0x514538),_0x151d62=this['_createOpenRevisionButton'](_0x3e055a);return _0x151d62['delegate']('execute')['to'](_0x514538),_0x599574['children']['add'](_0x151d62),_0x31ae23['items']['add'](_0x599574),_0x514538['panelView']['children']['add'](_0x31ae23),_0x514538;}['_createSaveRevisionButton'](_0x3f544d){const _0x4f4e4a=this['editor'],_0x2fd859=_0x4f4e4a['plugins']['get']('RevisionTracker'),_0x565543=new _0x3f544d(_0x4f4e4a['locale']);return _0x565543['set']({'label':m(_0x4f4e4a['locale'],'Save\x20current\x20revision')}),_0x565543['bind']('isEnabled')['to'](_0x2fd859,'isReady',_0x2fd859,'isEnabled',_0x4f4e4a,'isReadOnly',(_0x547e87,_0x14038a,_0x32dd49)=>_0x547e87&&_0x14038a&&!_0x32dd49),this['listenTo'](_0x565543,'execute',()=>{this['_showDialog']();}),_0x565543;}['_createOpenRevisionButton'](_0x41ee92){const _0x44a6ff=this['editor'],_0x38f624=_0x44a6ff['plugins']['get']('RevisionTracker'),_0x12d4b9=new _0x41ee92(_0x44a6ff['locale']);return _0x12d4b9['set']({'label':m(_0x44a6ff['locale'],'Open\x20revision\x20history')}),_0x12d4b9['bind']('isEnabled')['to'](_0x38f624,'isReady',_0x44a6ff,'isReadOnly',(_0x46003c,_0x529890)=>_0x46003c&&!_0x529890),this['listenTo'](_0x12d4b9,'execute',()=>{_0x44a6ff['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x12d4b9;}['_showDialog'](){const _0x4dedfd=this['editor'],_0x221e17=_0x4dedfd['locale'],_0x52b35b=_0x4dedfd['plugins']['get']('Dialog'),_0xebe67f=_0x4dedfd['plugins']['get']('RevisionTracker');function _0x39ca2f(_0x186016){_0x4dedfd['config']['get']('revisionHistory.requireRevisionName')&&''===_0x186016['revisionName']?_0x186016['revisionNameInputView']['errorText']=m(_0x221e17,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4dedfd['plugins']['get'](h)['saveRevision']({'name':_0x186016['revisionName']}),_0x52b35b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x39ca2f(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x52b35b['show']({'id':'revisionSave','title':m(_0x221e17,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x4dedfd['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x52b35b['hide']()},{'label':m(_0x4dedfd['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x57bd50){_0x57bd50['bind']('isEnabled')['to'](_0xebe67f,'isReady',_0xebe67f,'isEnabled',_0x4dedfd,'isReadOnly',(_0x2b1491,_0x8b71,_0x54d310)=>_0x2b1491&&_0x8b71&&!_0x54d310);},'onExecute':()=>_0x39ca2f(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0xda571e=this['editor'],_0x4e3a0d=_0xda571e['locale'];this['_saveRevisionFormView']=new me(_0x4e3a0d,_0xda571e['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x212fb1{['changeId'];['_model'];constructor(_0xc27fd0,_0x377343){super(_0xc27fd0),this['_model']=_0x377343,this['changeId']=_0x377343['id'];const _0x377a12=this['bindTemplate'],_0x562514=m(_0xc27fd0,_0x377343['data']['isSuggestion']?'Suggested\x20by':'add'==_0x377343['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x377343['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x377a12['to']('type',_0x43e230=>'ck-revision-change__'+_0x43e230)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x562514}]},{'text':'\x20'+_0x377343['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x1f5b0f(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2d9bbf){super(),this['id']=_0x2d9bbf['id']||_0x51ba1f(),this['author']=_0x2d9bbf['author'],this['type']=_0x2d9bbf['type'],this['data']=_0x2d9bbf['data']||{},this['rootName']=_0x2d9bbf['rootName'],this['set']('createdAt',_0x2d9bbf['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(_0x4cddb8,_0x83c7d){this['newRevisionId']=_0x4cddb8,this['oldRevisionId']=_0x83c7d,this['changes']=new _0x2cee73();}['_setChanges'](_0x3d7ab8){for(const _0x526cee of _0x3d7ab8)this['changes']['add'](_0x526cee);}}class u extends _0xcfa495{['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[_0xf69155,_0x595ef8,S,$];}constructor(_0x252bec){super(_0x252bec),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',(_0x468288,_0x56473e,_0x284cfd)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2bb5fc=>{for(const _0x160a6c of this['editor']['editing']['view']['document']['roots'])_0x284cfd?_0x2bb5fc['removeClass']('ck-editor__editable__overlay',_0x160a6c):_0x2bb5fc['addClass']('ck-editor__editable__overlay',_0x160a6c);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x71f2d4=>null!==_0x71f2d4),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1fc969,_0x17ef9c,_0x118208)=>_0x1fc969&&_0x118208?_0x17ef9c['changes']['getIndex'](_0x118208):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3c0491,_0x2870c4)=>_0x3c0491?_0x2870c4['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x595ef8);}['init'](){const _0x50ebc9=this['editor'],_0x12b351=new ot(_0x50ebc9,{'direction':'backward'}),_0x4d6d70=new ot(_0x50ebc9,{'direction':'forward'});(_0x50ebc9['commands']['add']('showPreviousChange',_0x12b351),_0x50ebc9['commands']['add']('showNextChange',_0x4d6d70),_0x50ebc9['commands']['add']('restoreRevision',new nt(_0x50ebc9)),this['on']('change:numberOfChanges',()=>{_0x12b351['refresh'](),_0x4d6d70['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x50ebc9['enableReadOnlyMode']('revision-viewer'),_0x50ebc9['plugins']['has']('WidgetToolbarRepository'))&&_0x50ebc9['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x20ba4a){return await this['_utils']['loadRevisionData'](_0x20ba4a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x20ba4a);}async['getRevisionRootsAttributes'](_0x3f59b9){return await this['_utils']['loadRevisionData'](_0x3f59b9,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3f59b9);}async['compare'](_0x1d7d7c,_0x27e209,_0x4b6bed=!0x1){if(!this['isEnabled'])return;const _0x445c8b=this['diff'],_0x3c45d6=this['repository'],_0x63a8cc='string'==typeof _0x1d7d7c?_0x3c45d6['getRevision'](_0x1d7d7c):_0x1d7d7c,_0x524955='string'==typeof _0x27e209?_0x3c45d6['getRevision'](_0x27e209):_0x27e209,_0x1999dd=_0x63a8cc['id'],_0x1e6ca0=_0x524955?_0x524955['id']:null;if(!_0x4b6bed&&this['diff']&&this['diff']['newRevisionId']===_0x1999dd&&this['diff']['oldRevisionId']===_0x1e6ca0)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x1999dd,_0x1e6ca0);const _0x39eaf9=this['_getRevisionsRange'](_0x63a8cc,_0x524955,!0x0)['map'](_0x456621=>this['_utils']['loadRevisionData'](_0x456621,this['adapter']));return _0x39eaf9['push'](new Promise(_0x30d367=>{setTimeout(_0x30d367,0x14);})),Promise['all'](_0x39eaf9)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x20f49c=this['_getDiff'](_0x1999dd,_0x1e6ca0);for(const _0x2f22e7 of _0x20f49c['changes'])this['_changeIdToChange']['set'](_0x2f22e7['id'],_0x2f22e7);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x57c772=>{for(const _0x5cafd9 of this['editor']['model']['document']['getRootNames']())_0x57c772['detachRoot'](_0x5cafd9);for(const _0x333867 of Object['keys'](_0x20f49c['model'])){const _0x22a520=_0x57c772['addRoot'](_0x333867);for(const _0x37562f of Object['keys'](_0x20f49c['attributes'][_0x333867]))_0x57c772['setAttribute'](_0x37562f,_0x20f49c['attributes'][_0x333867][_0x37562f],_0x22a520);_0x57c772['insert'](_0x20f49c['model'][_0x333867],_0x22a520,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x20f49c['changes'])),this['isReady']=!0x0;})['catch'](_0x21dc41=>{console['error'](_0x21dc41),this['_cleanUp'](),_0x445c8b&&(this['diff']=_0x445c8b),this['isReady']=!0x0;});}['addRevisionData'](_0x30babf,_0x1f609c){const _0x2e137b=this['repository']['createRevision'](_0x30babf);return _0x2e137b['on']('_update',(_0x38de35,_0x13a2a3,_0x2fd2a2)=>_0x1f609c(_0x13a2a3,_0x2fd2a2,_0x2e137b)),this['repository']['addRevision'](_0x2e137b),_0x2e137b;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3cbf7f=>{for(const _0x1c47a2 of this['editor']['model']['document']['getRootNames']())_0x3cbf7f['detachRoot'](_0x1c47a2);});}['_sortAndFilterDiffChanges'](_0x276a34){const _0x3a793d=[],_0x1cef31=new Map();for(const _0x557683 of this['editor']['model']['document']['getRootNames']()){const _0x2d3cda=this['editor']['editing']['view']['getDomRoot'](_0x557683);if(!_0x2d3cda)continue;const _0x43dcef=_0x2d3cda['getClientRects']()['item'](0x0);_0x43dcef&&(_0x3a793d['push'](_0x557683),_0x1cef31['set'](_0x557683,_0x43dcef));}return _0x3a793d['sort']((_0x31c0fa,_0x137c97)=>{const _0x2cc4bd=_0x1cef31['get'](_0x31c0fa),_0x2453c5=_0x1cef31['get'](_0x137c97);return _0x2cc4bd['y']-_0x2453c5['y']||_0x2cc4bd['x']-_0x2453c5['x'];}),(_0x276a34=_0x276a34['filter'](_0x20b420=>_0x3a793d['includes'](_0x20b420['rootName'])))['sort']((_0x4bbd45,_0x41d2ed)=>_0x3a793d['indexOf'](_0x4bbd45['rootName'])-_0x3a793d['indexOf'](_0x41d2ed['rootName'])),_0x276a34;}['_makeTape'](_0x35a6b3){const _0x1edec1=Array['from'](_0x35a6b3['markers'])['filter'](([_0xc91d38,_0x277291])=>_0xc91d38['startsWith']('revision:')&&!_0x277291['isCollapsed']),_0x598a1b=Array['from'](this['editor']['model']['createRangeIn'](_0x35a6b3)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1edec1['length'])for(const _0xa3c5db of _0x598a1b){const [_0x4a1ee3,_0x2d8655]=_0x1edec1[0x0],[,_0x575368,_0x1a08be]=_0x4a1ee3['split'](':');if(_0x2d8655['end']['isEqual'](_0xa3c5db['nextPosition'])&&_0x1edec1['shift'](),(_0xa3c5db['previousPosition']['isEqual'](_0x2d8655['start'])||_0xa3c5db['previousPosition']['isAfter'](_0x2d8655['start']))&&('insertion'==_0x575368?_0xa3c5db['isAdded']={'userId':_0x1a08be}:'deletion'==_0x575368&&(_0xa3c5db['isRemoved']={'userId':_0x1a08be})),0x0==_0x1edec1['length'])break;}return _0x598a1b;}['_refreshStartEndIndex'](_0x4b5494){const _0x37f934=new Map();for(let _0x473848=0x0;_0x473848<_0x4b5494['length'];_0x473848++)'text'===_0x4b5494[_0x473848]['type']?(_0x4b5494[_0x473848]['item']['startIndex']=_0x473848,_0x4b5494[_0x473848]['item']['endIndex']=_0x473848):('elementStart'===_0x4b5494[_0x473848]['type']?_0x4b5494[_0x473848]['item']['startIndex']=_0x473848:'elementEnd'===_0x4b5494[_0x473848]['type']&&(_0x4b5494[_0x473848]['item']['endIndex']=_0x473848),_0x37f934['set'](_0x4b5494[_0x473848]['id'],_0x473848));for(const _0x55ce90 of _0x37f934['values']())'elementStart'===_0x4b5494[_0x55ce90]['type']?_0x4b5494[_0x55ce90]['item']['endIndex']=_0x37f934['get'](_0x4b5494[_0x55ce90]['pairId']):'elementEnd'===_0x4b5494[_0x55ce90]['type']&&(_0x4b5494[_0x55ce90]['item']['startIndex']=_0x37f934['get'](_0x4b5494[_0x55ce90]['pairId']));}['_processTape'](_0x127636){for(let _0x229c37=0x0;_0x229c37<_0x127636['length'];_0x229c37++){if('elementStart'===_0x127636[_0x229c37]['type'])_0x127636[_0x229c37]['item']['startIndex']=_0x229c37;else{if('elementEnd'===_0x127636[_0x229c37]['type']){_0x127636[_0x229c37]['item']['endIndex']=_0x229c37;const _0x117798=_0x127636[_0x229c37]['item']['startIndex'];_0x127636[_0x117798]['pairId']=_0x127636[_0x229c37]['id'],_0x127636[_0x229c37]['pairId']=_0x127636[_0x117798]['id'];}else _0x127636[_0x229c37]['item']['startIndex']=_0x229c37,_0x127636[_0x229c37]['item']['endIndex']=_0x229c37,_0x127636[_0x229c37]['pairId']=null;}_0x127636[_0x229c37]['markersStart']||(_0x127636[_0x229c37]['markersStart']=[],_0x127636[_0x229c37]['markersEnd']=[]);}}['_markInsertions'](_0x17998b,_0x408d52){const _0x36c553=_0x17998b['filter'](_0x5b1374=>!_0x5b1374['isAdded']);for(let _0x11c95e=0x0;_0x11c95e<_0x408d52['length'];_0x11c95e++)_0x408d52[_0x11c95e]['isAdded']&&(_0x36c553[_0x11c95e]['isAdded']=_0x408d52[_0x11c95e]['isAdded']);}['_getDiff'](_0x16c1a0,_0x76e3d3=null){const _0x528344=this['repository']['getRevision'](_0x16c1a0),_0x4654d3=_0x76e3d3?this['repository']['getRevision'](_0x76e3d3):null,_0x4827f1=this['_getRevisionsRange'](_0x528344,_0x4654d3),_0x46614d=_0x4827f1[_0x4827f1['length']-0x1],_0x2f4a13=new Map(),_0xd8326d={'model':{},'attributes':{},'changes':[]},_0x506f58=new Set(),_0x70798f=new Map();for(let _0x4f4449=_0x4827f1['length']-0x1;_0x4f4449>=0x0;_0x4f4449--){const _0x43e368=_0x4827f1[_0x4f4449];for(const _0x3415f3 of Object['keys'](_0x43e368['diffData']))if(_0x43e368['diffData'][_0x3415f3]['attachChange']){const _0xcf37ed=_0x43e368['diffData'][_0x3415f3]['attachChange'];_0xcf37ed['isAttached']?(_0x506f58['add'](_0x3415f3),_0x70798f['has'](_0x3415f3)&&_0x70798f['get'](_0x3415f3)['userId']==_0xcf37ed['userId']?_0x70798f['delete'](_0x3415f3):_0x70798f['set'](_0x3415f3,_0xcf37ed)):_0x70798f['has'](_0x3415f3)?(_0x506f58['delete'](_0x3415f3),_0x70798f['delete'](_0x3415f3)):(_0x506f58['add'](_0x3415f3),_0x70798f['set'](_0x3415f3,_0xcf37ed));}else _0x506f58['add'](_0x3415f3);}for(const _0x26192e of _0x506f58){const _0x3c6a47=_0x70798f['has'](_0x26192e)&&!_0x70798f['get'](_0x26192e)['isAttached'];let _0x36ad22=_0x3c6a47?_0x4827f1['length']-0x1:0x0;const _0x1f375d=_0x3c6a47?-0x1:0x1;for(;_0x4827f1[_0x36ad22];){const _0x4b8c48=_0x4827f1[_0x36ad22];if(_0x4b8c48['diffData'][_0x26192e]){const _0x386854=_0x3c6a47?_0x4b8c48['diffData'][_0x26192e]['attributesBefore']:_0x4b8c48['diffData'][_0x26192e]['attributesAfter'];_0xd8326d['attributes'][_0x26192e]=_0x386854?_0x3a4dea(_0x386854):{};break;}_0x36ad22+=_0x1f375d;}}for(const _0x37376b of _0x4827f1){_0x37376b['model']={};for(const _0x13953b of _0x37376b['authors'])_0x2f4a13['set'](_0x13953b['id'],_0x13953b);for(const _0x4bb205 of _0x506f58){const _0xa2b130=_0x37376b['diffData'][_0x4bb205]?_0x37376b['diffData'][_0x4bb205]['insertions']:'[]',_0xf9ac3a=_0x37376b['diffData'][_0x4bb205]?_0x37376b['diffData'][_0x4bb205]['deletions']:'[]';_0x37376b['model'][_0x4bb205]={'insertions':this['_utils']['_makeModelFromViewString'](_0xa2b130),'deletions':this['_utils']['_makeModelFromViewString'](_0xf9ac3a)};}}for(const _0x3423fb of _0x506f58){let _0x864f74=null,_0x28c06c=0x0;const _0x185bd3=new Map(Array['from'](_0x528344['model'][_0x3423fb]['insertions']['markers'])['filter'](([_0x3726fe])=>!_0x3726fe['startsWith']('revision:')));let _0x274158=0x0;for(const _0x49941f of _0x4827f1){const _0x17573b=this['_makeTape'](_0x49941f['model'][_0x3423fb]['insertions']);_0x49941f==_0x528344?(_0x864f74=_0x17573b,_0x28c06c=_0x864f74['length'],_0x864f74['forEach'](_0x1f7e4b=>{_0x1f7e4b['id']=_0x274158++;}),this['_processTape'](_0x864f74)):this['_markInsertions'](_0x864f74,_0x17573b);const _0x36b258=_0x864f74['filter'](_0x4114b3=>!_0x4114b3['isAdded'])['map'](_0x461e14=>_0x461e14['id']);let _0x4cfeb5=0x0;const _0xad47e3=this['_makeTape'](_0x49941f['model'][_0x3423fb]['deletions']);_0xad47e3['forEach'](_0x4be907=>{_0x4be907['isRemoved']?_0x4be907['id']=_0x28c06c++:_0x4be907['id']=_0x36b258[_0x4cfeb5++];}),this['_processTape'](_0xad47e3),this['_setDistance'](_0x864f74,'isAdded'),this['_setDistance'](_0xad47e3,'isRemoved'),_0x49941f==_0x528344&&this['_markMarkers'](_0x864f74,_0x185bd3),_0x864f74=this['_joinTapes'](_0x864f74,_0xad47e3),this['_refreshStartEndIndex'](_0x864f74),this['_setDistance'](_0x864f74,'isRemoved');}_0x864f74=_0x864f74['filter'](_0x471951=>!(_0x471951['isAdded']&&_0x471951['isRemoved']));const _0x525ec8=new Map(_0x46614d['model'][_0x3423fb]['deletions']['markers']),_0x9b502a=new Set(_0x185bd3['keys']());for(const _0x5d46d9 of _0x525ec8['keys']())_0x9b502a['delete'](_0x5d46d9);this['_markSuggestions'](_0x864f74,_0x9b502a),this['_fixObsoleteTags'](_0x864f74),_0x864f74=this['_removeMissingPairs'](_0x864f74),_0x864f74=this['_markMismatchedRemovedTags'](_0x864f74),_0x864f74=this['_removeUnsupportedChanges'](_0x864f74);const {root:_0x3c93e3,changes:_0x292bf2}=this['_makeModelFromTape'](_0x864f74,_0x2f4a13,_0x3423fb);_0xd8326d['model'][_0x3423fb]=_0x3c93e3;const _0x1f41ac=_0x70798f['get'](_0x3423fb);if(_0x1f41ac){const _0x3769bc=_0x2f4a13['get'](_0x1f41ac['userId']),_0x293054=new G({'author':_0x3769bc,'type':_0x1f41ac['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x3423fb});_0x292bf2['unshift'](_0x293054),_0xd8326d['attributes'][_0x3423fb]['revisionHistoryAttachChange']=_0x293054['id'];}_0xd8326d['changes']=_0xd8326d['changes']['concat'](_0x292bf2);}return _0xd8326d;}['_markMarkers'](_0x22cba3,_0x32dea6){for(let _0x22d586=0x0;_0x22d586<_0x22cba3['length'];_0x22d586++)for(const [_0x4928aa,_0x156676]of _0x32dea6)!_0x156676['isCollapsed']&&_0x156676['start']['isEqual'](_0x22cba3[_0x22d586]['previousPosition'])&&_0x22cba3[_0x22d586]['markersStart']['push'](_0x4928aa),_0x156676['end']['isEqual'](_0x22cba3[_0x22d586]['nextPosition'])&&_0x22cba3[_0x22d586]['markersEnd']['push'](_0x4928aa);}['_joinTapes'](_0x35d423,_0x54c69a){let _0x5ba2f9=[],_0x3f4fff=0x0,_0x373172=0x0;for(;_0x3f4fff<_0x35d423['length']||_0x373172<_0x54c69a['length'];){const _0x119798=_0x35d423[_0x3f4fff]||{},_0x1f85d0=_0x54c69a[_0x373172]||{};if(_0x119798['id']==_0x1f85d0['id'])_0x3f4fff++,_0x373172++,_0x5ba2f9['push'](_0x119798);else{if(_0x1f85d0['isRemoved']&&_0x119798['isAdded']){const {commonTape:_0x2e1407,iEnd:_0x2c0e7e,jEnd:_0x130434}=this['_threeWayMerge'](_0x35d423,_0x3f4fff,_0x54c69a,_0x373172);_0x5ba2f9=_0x5ba2f9['concat'](_0x2e1407),_0x3f4fff=_0x2c0e7e,_0x373172=_0x130434;}else _0x1f85d0['isRemoved']?(_0x373172++,_0x5ba2f9['push'](_0x1f85d0)):(_0x3f4fff++,_0x5ba2f9['push'](_0x119798));}}return _0x5ba2f9;}['_markSuggestions'](_0x2a8300,_0x5a7fe8){const _0x59e64b=[];for(let _0x3ddffd=0x0;_0x3ddffd<_0x2a8300['length'];_0x3ddffd++){for(let _0x210bef=0x0;_0x210bef<_0x2a8300[_0x3ddffd]['markersStart']['length'];_0x210bef++){const _0x1529e1=_0x2a8300[_0x3ddffd]['markersStart'][_0x210bef];if(!_0x5a7fe8['has'](_0x1529e1))continue;const {group:_0x1ef300,type:_0x1c9fd9,authorId:_0x2628e6}=_0xef23fb(_0x1529e1);'revision-suggestion'!=_0x1ef300||'insertion'!=_0x1c9fd9&&'deletion'!=_0x1c9fd9||(_0x59e64b['unshift']({'type':_0x1c9fd9,'name':_0x1529e1,'userId':_0x2628e6}),_0x2a8300[_0x3ddffd]['markersStart']['splice'](_0x210bef,0x1),_0x210bef--);}_0x1ae9d6(_0x2a8300[_0x3ddffd]);for(let _0x2690f7=0x0;_0x2690f7<_0x2a8300[_0x3ddffd]['markersEnd']['length'];_0x2690f7++){const _0x316a7c=_0x2a8300[_0x3ddffd]['markersEnd'][_0x2690f7];if(!_0x5a7fe8['has'](_0x316a7c))continue;const {group:_0x1b39d0,type:_0x356eb5}=_0xef23fb(_0x316a7c);if('revision-suggestion'!=_0x1b39d0||'insertion'!=_0x356eb5&&'deletion'!=_0x356eb5)continue;_0x2a8300[_0x3ddffd]['markersEnd']['splice'](_0x2690f7,0x1),_0x2690f7--;const _0x5ccabc=_0x59e64b['findIndex'](_0x11261e=>_0x11261e['name']==_0x316a7c);_0x5ccabc>-0x1&&_0x59e64b['splice'](_0x5ccabc,0x1);}}function _0xef23fb(_0x1e5b1f){const _0x4c7694=_0x1e5b1f['split'](':');return{'group':_0x4c7694[0x0],'type':_0x4c7694[0x1],'subType':_0x4c7694['length']>=0x5?_0x4c7694[0x2]:null,'id':_0x4c7694['length']<0x5?_0x4c7694[0x2]:_0x4c7694[0x3],'authorId':_0x4c7694['length']<0x5?_0x4c7694[0x3]:_0x4c7694[0x4],'markerCount':0x6==_0x4c7694['length']?_0x4c7694[0x5]:null};}function _0x1ae9d6(_0x31276f){for(let _0x2a9b86=0x0;_0x2a9b86<_0x59e64b['length'];_0x2a9b86++){if(_0x31276f['isAdded']&&'insertion'==_0x59e64b[_0x2a9b86]['type']&&_0x31276f['isAdded']['userId']==_0x59e64b[_0x2a9b86]['userId'])return _0x31276f['isAddSuggestion']=_0x59e64b[_0x2a9b86],void delete _0x31276f['isAdded'];if(!_0x31276f['isAdded']&&!_0x31276f['isRemoved']&&'deletion'==_0x59e64b[_0x2a9b86]['type'])return void(_0x31276f['isRemoveSuggestion']=_0x59e64b[_0x2a9b86]);}}}['_setDistance'](_0x4444a1,_0x105431){let _0x27a94b=0x0,_0x5c04a7=!0x1;const _0x5cdef8=new Map();for(const _0x49a972 of _0x4444a1)_0x49a972[_0x105431]?_0x5c04a7&&(_0x27a94b++,_0x5c04a7=!0x1):(_0x27a94b++,_0x5c04a7=!0x0),_0x5cdef8['set'](_0x49a972['id'],_0x27a94b);for(let _0x2daccc=0x0;_0x2daccc<_0x4444a1['length'];_0x2daccc++){if('isRemoved'==_0x105431&&_0x4444a1[_0x2daccc]['isAdded']||'isAdded'==_0x105431&&_0x4444a1[_0x2daccc]['isRemoved'])continue;if('text'==_0x4444a1[_0x2daccc]['type']){_0x4444a1[_0x2daccc]['distance']=0x0;continue;}const _0xcd1e61=_0x5cdef8['get'](_0x4444a1[_0x2daccc]['pairId']),_0x324f58=_0x5cdef8['get'](_0x4444a1[_0x2daccc]['id']);_0x4444a1[_0x2daccc]['distance']=_0xcd1e61-_0x324f58;}}['_getRevisionsRange'](_0x4bb7e9,_0x4cf2ef,_0x23203a=!0x1){const _0x1f6342=[];let _0x21e8b5=this['repository']['getIndex'](_0x4bb7e9),_0x47405e=this['repository']['getIndex'](_0x4cf2ef);for(-0x1==_0x47405e&&(_0x47405e=this['repository']['_revisions']['length'],_0x23203a=!0x1);_0x21e8b5<_0x47405e;)_0x1f6342['push'](this['repository']['getRevision'](_0x21e8b5)),_0x21e8b5++;return _0x23203a&&_0x1f6342['push'](this['repository']['getRevision'](_0x21e8b5)),_0x1f6342;}['_threeWayMerge'](_0xb824a1,_0x4e2d6c,_0x518618,_0x43de80){const _0x65451b=this['editor']['model']['schema'];let _0x19a35f=_0x4e2d6c;for(;_0xb824a1[_0x19a35f]&&_0xb824a1[_0x19a35f]['isAdded'];)_0x19a35f++;let _0x4681fc=_0x43de80;for(;_0x518618[_0x4681fc]&&_0x518618[_0x4681fc]['isRemoved'];)_0x4681fc++;_0x3ee74c(_0xb824a1,_0x4e2d6c,_0x19a35f),_0x3ee74c(_0x518618,_0x43de80,_0x4681fc);const _0x5466d9=_0x518618['slice'](_0x43de80,_0x4681fc)['concat'](_0xb824a1['slice'](_0x4e2d6c,_0x19a35f));return _0x5466d9['sort']((_0x6e0676,_0x30a769)=>_0x6e0676['side']!=_0x30a769['side']?_0x6e0676['side']-_0x30a769['side']:_0x6e0676['level']!=_0x30a769['level']?_0x6e0676['level']-_0x30a769['level']:_0x6e0676['distance']!=_0x30a769['distance']?_0x30a769['distance']-_0x6e0676['distance']:!!_0x6e0676['isAdded']!=!!_0x30a769['isAdded']?-0x1==_0x6e0676['side']||0x0==_0x6e0676['side']?_0x6e0676['isAdded']?-0x1:0x1:_0x6e0676['isAdded']?0x1:-0x1:_0x6e0676['index']-_0x30a769['index']),{'commonTape':_0x5466d9,'iEnd':_0x19a35f,'jEnd':_0x4681fc};function _0x3ee74c(_0x5df729,_0x6b20c6,_0x3615fa){let _0x379bea=-0x1,_0x1d4bb5=Number['POSITIVE_INFINITY'],_0x244420=!0x0;for(let _0x1b36b7=_0x6b20c6;_0x1b36b7<_0x3615fa;_0x1b36b7++)if(_0x65451b['isInline'](_0x5df729[_0x1b36b7]['item'])||(_0x244420=!0x1),_0x5df729[_0x1b36b7]['item']['startIndex']<_0x6b20c6&&(_0x379bea=_0x1b36b7),_0x5df729[_0x1b36b7]['item']['endIndex']>=_0x3615fa){_0x1d4bb5=_0x1b36b7;break;}_0x244420&&(_0x379bea=_0x3615fa-0x1);for(let _0x56507c=_0x6b20c6;_0x56507c<_0x3615fa;_0x56507c++)_0x5df729[_0x56507c]['side']=_0x56507c<=_0x379bea?-0x1:_0x56507c<_0x1d4bb5?0x0:0x1,_0x5df729[_0x56507c]['index']=_0x56507c;let _0x15a43e=0x0;for(let _0x3e179f=_0x6b20c6;_0x3e179f<=_0x379bea;_0x3e179f++)0x0==_0x5df729[_0x3e179f]['distance']?_0x5df729[_0x3e179f]['level']=_0x15a43e:(_0x15a43e++,_0x5df729[_0x3e179f]['level']=_0x15a43e,_0x15a43e++);for(let _0x46c0bd=_0x6b20c6;_0x46c0bd<_0x3615fa;_0x46c0bd++)0x0==_0x5df729[_0x46c0bd]['side']&&(_0x5df729[_0x46c0bd]['level']=_0x15a43e);_0x15a43e=0x0;for(let _0x413804=_0x3615fa-0x1;_0x413804>=_0x1d4bb5;_0x413804--)0x0==_0x5df729[_0x413804]['distance']?_0x5df729[_0x413804]['level']=_0x15a43e:(_0x15a43e--,_0x5df729[_0x413804]['level']=_0x15a43e,_0x15a43e--);}}['_fixObsoleteTags'](_0x111a52){const _0x5d826a=new Map(),_0x8e3b0f=this['editor']['model']['schema'];for(let _0x3f9415=0x1;_0x3f9415<_0x111a52['length'];_0x3f9415++){let _0x54e138,_0x20de69,_0x22ec64;const _0x36e1d4=_0x111a52[_0x3f9415],_0x35bd99=_0x111a52[_0x3f9415-0x1];if('text'==_0x36e1d4['type'])continue;if(_0x36e1d4['type']!=_0x35bd99['type'])continue;if(!_0x8e3b0f['isBlock'](_0x35bd99['item'])||_0x8e3b0f['isLimit'](_0x35bd99['item']))continue;if(!_0x8e3b0f['isBlock'](_0x36e1d4['item'])||_0x8e3b0f['isLimit'](_0x36e1d4['item']))continue;if((_0x111a52[_0x3f9415]['isAdded']||_0x111a52[_0x3f9415]['isAddSuggestion'])&&_0x111a52[_0x3f9415-0x1]['isRemoved'])_0x54e138=_0x111a52[_0x3f9415],_0x20de69=_0x111a52[_0x3f9415-0x1],_0x22ec64=_0x3f9415-0x1;else{if(!_0x111a52[_0x3f9415]['isRemoved']||!_0x111a52[_0x3f9415-0x1]['isAdded']&&!_0x111a52[_0x3f9415-0x1]['isAddSuggestion'])continue;_0x54e138=_0x111a52[_0x3f9415-0x1],_0x20de69=_0x111a52[_0x3f9415],_0x22ec64=_0x3f9415;}const _0x1d1aba=_0x54e138['level']==_0x20de69['level'],_0x215091=Math['abs'](_0x54e138['level'])<Math['abs'](_0x20de69['level'])&&0x0==_0x20de69['distance'];(_0x1d1aba||_0x215091)&&(_0x5d826a['set'](_0x20de69['id'],_0x54e138['id']),_0x111a52['splice'](_0x22ec64,0x1),_0x3f9415--,_0x54e138['isAdded']=!0x1);}for(let _0xcdd4d8=0x0;_0xcdd4d8<_0x111a52['length'];_0xcdd4d8++)_0x5d826a['has'](_0x111a52[_0xcdd4d8]['pairId'])&&(_0x111a52[_0xcdd4d8]['pairId']=_0x5d826a['get'](_0x111a52[_0xcdd4d8]['pairId']));}['_removeMissingPairs'](_0xc4db65){const _0x302222=new Set(_0xc4db65['map'](_0x44f27e=>_0x44f27e['id']));for(let _0x289c05=0x0;_0x289c05<_0xc4db65['length'];_0x289c05++)_0x302222['has'](_0xc4db65[_0x289c05]['pairId'])||0x0==_0xc4db65[_0x289c05]['distance']||(_0xc4db65[_0x289c05]['isIncorrect']=!0x0);return _0xc4db65['filter'](_0x36d951=>!_0x36d951['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2078d0){const _0x4e9a95=new Set();for(let _0x3c3726=0x0;_0x3c3726<_0x2078d0['length'];_0x3c3726++){if(_0x4e9a95['has'](_0x2078d0[_0x3c3726]['id'])&&_0x2078d0[_0x3c3726]['isRemoved']&&(_0x2078d0[_0x3c3726]['isIncorrect']=!0x0),_0x2078d0[_0x3c3726]['isIncorrect'])continue;if(0x0==_0x2078d0[_0x3c3726]['distance'])continue;if('elementStart'!=_0x2078d0[_0x3c3726]['type'])continue;if(null==_0x2078d0[_0x3c3726]['pairId'])continue;let _0x3ac07e=_0x3c3726+0x1,_0xbd6904=0x0;for(;_0x2078d0[_0x3ac07e]['id']!=_0x2078d0[_0x3c3726]['pairId'];)'elementStart'==_0x2078d0[_0x3ac07e]['type']?_0xbd6904++:'elementEnd'==_0x2078d0[_0x3ac07e]['type']&&_0xbd6904--,_0x3ac07e++;if(0x0!=_0xbd6904){if(_0x2078d0[_0x3c3726]['isRemoved'])_0x2078d0[_0x3c3726]['isIncorrect']=!0x0;else{for(;_0x3ac07e!=_0x3c3726;)_0x2078d0[_0x3ac07e]['isRemoved']&&0x0!=_0x2078d0[_0x3ac07e]['distance']&&(_0x2078d0[_0x3ac07e]['isIncorrect']=!0x0,_0x4e9a95['add'](_0x2078d0[_0x3ac07e]['pairId'])),_0x3ac07e--;}}}return _0x2078d0['filter'](_0x262893=>!_0x262893['isIncorrect']);}['_removeUnsupportedChanges'](_0x59435f){const _0x4ecf5c=this['editor']['model']['schema'];for(let _0x5b6ab8=0x0;_0x5b6ab8<_0x59435f['length'];_0x5b6ab8++){if(!(_0x59435f[_0x5b6ab8]['isAdded']||_0x59435f[_0x5b6ab8]['isAddSuggestion']||_0x59435f[_0x5b6ab8]['isRemoved']||_0x59435f[_0x5b6ab8]['isRemoveSuggestion']))continue;if(0x0==_0x59435f[_0x5b6ab8]['distance'])continue;const _0x2e5e14=_0x59435f[_0x5b6ab8]['item'];_0x4ecf5c['isBlock'](_0x2e5e14)||_0x4ecf5c['isLimit'](_0x2e5e14)||(_0x59435f[_0x5b6ab8]['isAdded']&&delete _0x59435f[_0x5b6ab8]['isAdded'],_0x59435f[_0x5b6ab8]['isAddSuggestion']&&delete _0x59435f[_0x5b6ab8]['isAddSuggestion'],_0x59435f[_0x5b6ab8]['isRemoveSuggestion']&&delete _0x59435f[_0x5b6ab8]['isRemoveSuggestion'],_0x59435f[_0x5b6ab8]['isRemoved']&&(_0x59435f[_0x5b6ab8]['isIncorrect']=!0x0));}return _0x59435f['filter'](_0x120f6f=>!_0x120f6f['isIncorrect']);}['_makeModelFromTape'](_0x5367d7,_0x51629b,_0x3a5074){const _0x4aadca=new _0x4a21a9(),_0x51ec83=[],_0x5193be=new Map(),_0x2f090c=this['editor']['model'],_0x1695ca=_0x2f090c['schema'],_0x1e6912=[_0x4aadca],_0x2443ed={},_0x4c99d8={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x20e05f=null;const _0x3eb9b1=[0x0];for(let _0x3e81f6=0x0;_0x3e81f6<_0x5367d7['length'];_0x3e81f6++)if('elementStart'===_0x5367d7[_0x3e81f6]['type']){_0x5367d7[_0x3e81f6]['previousPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1);const _0x28bec4=new _0x3d9a08(_0x5367d7[_0x3e81f6]['item']['name'],_0x5367d7[_0x3e81f6]['item']['getAttributes']());_0x1e6912[0x0]['_appendChild'](_0x28bec4),_0x3eb9b1['push'](0x0),_0x1e6912['unshift'](_0x28bec4),_0x5367d7[_0x3e81f6]['nextPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1);}else'elementEnd'===_0x5367d7[_0x3e81f6]['type']?(_0x1e6912['shift'](),_0x5367d7[_0x3e81f6]['previousPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1),_0x3eb9b1['pop'](),_0x3eb9b1[_0x3eb9b1['length']-0x1]++,_0x5367d7[_0x3e81f6]['nextPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1)):(_0x5367d7[_0x3e81f6]['previousPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1),_0x20e05f?_0x20e05f['_data']+=_0x5367d7[_0x3e81f6]['item']['data']:_0x20e05f=new _0x2994a(_0x5367d7[_0x3e81f6]['item']['data'],_0x5367d7[_0x3e81f6]['item']['getAttributes']()),_0x5367d7[_0x3e81f6+0x1]&&'text'===_0x5367d7[_0x3e81f6+0x1]['type']&&_0x5ef834(_0x20e05f,_0x5367d7[_0x3e81f6+0x1]['item'])||(_0x1e6912[0x0]['_appendChild'](_0x20e05f),_0x20e05f=null),_0x3eb9b1[_0x3eb9b1['length']-0x1]+=_0x5367d7[_0x3e81f6]['item']['offsetSize'],_0x5367d7[_0x3e81f6]['nextPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1));for(let _0x1f9437=0x0;_0x1f9437<_0x5367d7['length'];_0x1f9437++){const _0x2cd524=_0x5367d7[_0x1f9437]['previousPosition'],_0x2fc0d2=_0x5367d7[_0x1f9437]['nextPosition'];for(const _0x3ad6b1 of _0x5367d7[_0x1f9437]['markersStart'])_0x5193be['set'](_0x3ad6b1,{'start':_0x2cd524,'end':null});_0x48bb0a('isRemoveSuggestion',_0x1f9437,_0x2cd524,_0x2fc0d2),_0x48bb0a('isAddSuggestion',_0x1f9437,_0x2cd524,_0x2fc0d2),_0x48bb0a('isRemoved',_0x1f9437,_0x2cd524,_0x2fc0d2),_0x48bb0a('isAdded',_0x1f9437,_0x2cd524,_0x2fc0d2);for(const _0x3b6f03 of _0x5367d7[_0x1f9437]['markersEnd']){const _0x56dd15=_0x5193be['get'](_0x3b6f03);_0x56dd15?_0x56dd15['end']=_0x2fc0d2:_0x5193be['set'](_0x3b6f03,{'start':_0x2fc0d2,'end':_0x2fc0d2});}}for(const [_0xa333ac,_0x2309ee]of _0x5193be){const _0x234bfc=this['editor']['model']['createRange'](_0x2309ee['start'],_0x2309ee['end']);_0x4aadca['markers']['set'](_0xa333ac,_0x234bfc);}return _0x51ec83['sort']((_0xdb0404,_0x3bd5f5)=>{const _0x1bd2f3=_0x4aadca['markers']['get']('revision:'+_0xdb0404['id']),_0x1948ea=_0x4aadca['markers']['get']('revision:'+_0x3bd5f5['id']);return _0x1bd2f3['start']['isBefore'](_0x1948ea['start'])?-0x1:_0x1bd2f3['start']['isAfter'](_0x1948ea['start'])?0x1:_0x1bd2f3['end']['isBefore'](_0x1948ea['end'])?-0x1:_0x1bd2f3['end']['isAfter'](_0x1948ea['end'])?0x1:'add'===_0xdb0404['type']?-0x1:0x1;}),{'root':_0x4aadca,'changes':_0x51ec83};function _0x48bb0a(_0x36b854,_0x474e9c,_0x5bf705,_0x449413){const _0x12e7a4=!!_0x5367d7[_0x474e9c][_0x36b854],_0x9f1af1=_0x12e7a4?_0x5367d7[_0x474e9c][_0x36b854]['userId']:null,_0xda03ad=_0x474e9c===_0x5367d7['length']-0x1,_0x5970e5=_0x4c99d8[_0x36b854][0x0],_0xcb627e=_0x1695ca['isObject'](_0x5367d7[_0x474e9c]['item']);!_0x2443ed[_0x36b854]&&_0x12e7a4?_0x2443ed[_0x36b854]={'start':_0x5bf705,'tapeItem':_0x5367d7[_0x474e9c],'userId':_0x9f1af1,'type':_0x36b854}:_0x2443ed[_0x36b854]&&!_0x12e7a4?(_0x2443ed[_0x36b854]['end']=_0x5bf705,_0x160e06(_0x2443ed[_0x36b854]),_0x2443ed[_0x36b854]=null):_0x2443ed[_0x36b854]&&_0x12e7a4&&_0x2443ed[_0x36b854]['userId']!==_0x9f1af1&&(_0x2443ed[_0x36b854]['end']=_0x5bf705,_0x5970e5&&_0x5970e5['userId']===_0x2443ed[_0x36b854]['userId']||_0x160e06(_0x2443ed[_0x36b854]),_0x2443ed[_0x36b854]={'start':_0x5bf705,'tapeItem':_0x5367d7[_0x474e9c],'userId':_0x9f1af1,'type':_0x36b854}),_0x2443ed[_0x36b854]&&_0xcb627e&&('elementStart'!==_0x5367d7[_0x474e9c]['type']||_0x5970e5&&_0x5970e5['userId']===_0x9f1af1||_0x4c99d8[_0x36b854]['unshift']({'userId':_0x9f1af1,'object':_0x5367d7[_0x474e9c]['item'],'change':_0x2443ed[_0x36b854]}),'elementEnd'===_0x5367d7[_0x474e9c]['type']&&_0x5970e5&&_0x5970e5['object']===_0x5367d7[_0x474e9c]['item']&&(_0x4c99d8[_0x36b854]['shift'](),_0x2443ed[_0x36b854]=_0x5970e5['change'])),_0x2443ed[_0x36b854]&&_0xda03ad&&(_0x2443ed[_0x36b854]['end']=_0x449413,_0x160e06(_0x2443ed[_0x36b854]),_0x2443ed[_0x36b854]=null);}function _0x160e06({start:_0x4377c3,end:_0x1aa67b,tapeItem:_0x4ec69b,userId:_0x2d5e59,type:_0x53a41c}){const _0x582d80=_0x4ec69b['item'],_0x4330fd=_0x2f090c['schema']['isBlock'](_0x582d80)&&!_0x2f090c['schema']['isLimit'](_0x582d80),_0x1b00fc=_0x4377c3['nodeAfter']==_0x1aa67b['parent']&&_0x1aa67b['isAtStart'];if(_0x4330fd&&_0x1b00fc)return;const _0x2a25ef=_0x2f090c['createRange'](_0x4377c3,_0x1aa67b),_0x22aa6e=_0x51629b['get'](_0x2d5e59),_0x2b970a=new G({'author':_0x22aa6e,'type':'isAdded'==_0x53a41c||'isAddSuggestion'==_0x53a41c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x53a41c||'isRemoveSuggestion'==_0x53a41c},'createdAt':new Date(),'rootName':_0x3a5074});_0x51ec83['push'](_0x2b970a),_0x4aadca['markers']['set']('revision:'+_0x2b970a['id'],_0x2a25ef);}function _0x5ef834(_0x324c52,_0x130043){const _0x4031b6=_0x324c52['getAttributes'](),_0x2933f4=_0x130043['getAttributes']();for(const _0x24e296 of _0x4031b6){if(_0x24e296[0x1]!==_0x130043['getAttribute'](_0x24e296[0x0]))return!0x1;_0x2933f4['next']();}return _0x2933f4['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x18f49e=>{const _0x520193=_0x18f49e['markerName']['split'](':')[0x1],_0x491603=this['_getChangeFromId'](_0x520193);if(!_0x491603)return null;const _0x478e45='add'==_0x491603['type']?'insertion':'deletion',_0xa9a179=['ck-suggestion-marker','ck-suggestion-marker-'+_0x478e45];return _0x491603['data']['isSuggestion']&&_0xa9a179['push']('ck-suggestion-marker-'+_0x478e45+'-new'),this['activeChange']==_0x491603&&_0xa9a179['push']('ck-suggestion-marker--active'),{'classes':_0xa9a179,'attributes':{'data-change-id':_0x520193}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x466d08=>{_0x466d08['on']('element:pre',(_0x4bfb49,_0x25f170,_0x59c0bc)=>{const _0x33257a=_0x25f170['viewItem']['getChild'](0x0);if(!_0x33257a||!_0x33257a['is']('element','code'))return;if(!_0x59c0bc['consumable']['consume'](_0x33257a,{'attributes':['vid_start','vid_end']}))return;const _0x25b7f7=_0x25f170['modelRange']['start']['nodeAfter'];_0x59c0bc['writer']['setAttribute']('vid_start',_0x33257a['getAttribute']('vid_start'),_0x25b7f7),_0x59c0bc['writer']['setAttribute']('vid_end',_0x33257a['getAttribute']('vid_end'),_0x25b7f7);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x2ea4ce=>{_0x2ea4ce['on']('element',(_0x3af1ee,_0x586cbb,_0x2e63d2)=>{if(!_0x2e63d2['consumable']['consume'](_0x586cbb['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x586cbb['modelRange']['isCollapsed'])return;const _0x588f94=_0x586cbb['modelRange']['start']['nodeAfter'];_0x588f94['hasAttribute']('vid_start')||_0x588f94['hasAttribute']('vid')||(_0x2e63d2['writer']['setAttribute']('vid_start',_0x586cbb['viewItem']['getAttribute']('vid_start'),_0x588f94),_0x2e63d2['writer']['setAttribute']('vid_end',_0x586cbb['viewItem']['getAttribute']('vid_end'),_0x588f94));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1d79eb=>_0x1d79eb['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x2e76b4,[,_0x43dd99])=>{['vid_start','vid_end','vid']['includes'](_0x43dd99)&&(_0x2e76b4['return']=!0x0,_0x2e76b4['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x37c735=>{_0x37c735['on']('attribute:vid',(_0x25ad21,_0x5c963e,_0x2b077b)=>{if('\x20'!=_0x5c963e['item']['data']||_0x5c963e['item']['parent']['maxOffset']>0x1)return;if(!_0x2b077b['consumable']['consume'](_0x5c963e['item'],_0x25ad21['name']))return;const _0x1bca41=_0x2b077b['writer'],_0x112f9e=_0x2b077b['mapper']['toViewRange'](_0x5c963e['range']);_0x1bca41['wrap'](_0x112f9e,_0x1bca41['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x33c24d){const _0xdd30d1=_0x33c24d['plugins']['get']('RevisionViewer');return(_0x3ebe4a,_0x20e69f,_0x203cf3)=>{const _0x5b3989=_0x20e69f['markerName']['split'](':')[0x1],_0x38f19a=_0xdd30d1['_getChangeFromId'](_0x5b3989);if(!_0x38f19a)return null;const _0x8ab474='add'==_0x38f19a['type']?'split':'merge';if(!_0x203cf3['consumable']['test'](_0x20e69f['markerRange'],_0x3ebe4a['name']))return;const _0x1500eb=_0x20e69f['markerRange']['getWalker'](),_0x3f31d0=_0x20e69f['markerRange']['start'],_0x3d80ad=_0x33c24d['model']['schema'];let _0x3e349c=null,_0x3d0c9c=null,_0x25f351=!0x1,_0x3a9dbe=!0x1;for(const _0x4cd0bc of _0x1500eb){const _0xa15d8=_0x4cd0bc['item'];_0x25f351=_0x25f351||_0x3d80ad['isContent'](_0xa15d8);const _0x3f380c=_0x203cf3['mapper']['toViewElement'](_0xa15d8);if(_0x3f380c&&_0x3f380c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4cd0bc['type']&&(_0x3d80ad['isBlock'](_0xa15d8)&&!_0x3d80ad['isLimit'](_0xa15d8)&&(_0xa15d8['nextSibling']||_0x3f31d0['isAtEnd']?_0x3e349c&&_0x3e349c['parent']==_0xa15d8||(_0x3e349c=_0xa15d8,_0x54918f(_0x4cd0bc['previousPosition']),_0x3a9dbe=!0x0):_0x3d0c9c=_0x3d0c9c||_0x4cd0bc['previousPosition']));}function _0x54918f(_0x390697){const _0x2818ab=_0x203cf3['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x8ab474}),_0x1baa7f=_0x203cf3['mapper']['toViewPosition'](_0x390697);_0x38f19a['data']['isSuggestion']&&_0x203cf3['writer']['addClass']('ck-suggestion-marker-'+_0x8ab474+'-new',_0x2818ab),_0xdd30d1['activeChange']==_0x38f19a&&_0x203cf3['writer']['addClass']('ck-suggestion-marker--active',_0x2818ab),_0x203cf3['writer']['insert'](_0x1baa7f,_0x2818ab),_0x203cf3['mapper']['bindElementToMarker'](_0x2818ab,_0x20e69f['markerName']);}_0x25f351||_0x3a9dbe||!_0x3d0c9c||_0x54918f(_0x3d0c9c);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x5d2be0,_0x59a44e,_0x20ce18)=>{const _0x1016a1=_0x20ce18['mapper']['markerNameToElements'](_0x59a44e['markerName']);if(_0x1016a1){for(const _0x10b6c5 of _0x1016a1)(_0x10b6c5['hasClass']('ck-suggestion-marker-split')||_0x10b6c5['hasClass']('ck-suggestion-marker-merge'))&&(_0x20ce18['mapper']['unbindElementFromMarkerName'](_0x10b6c5,_0x59a44e['markerName']),_0x20ce18['writer']['remove'](_0x10b6c5));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1ee41a,_0x2fa819,_0x5b6ee5)=>{const _0x5e7566=_0x2fa819['markerName']['split'](':')[0x1],_0x104af6=this['_getChangeFromId'](_0x5e7566);if(!_0x104af6)return null;const _0x3aef18='add'==_0x104af6['type']?'split':'merge';if(_0x5b6ee5['consumable']['test'](_0x2fa819['markerRange'],_0x1ee41a['name']))for(const _0x13e23d of _0x2fa819['markerRange']['getItems']()){if(!_0x13e23d['is']('element','softBreak'))continue;const _0xecc052=_0x5b6ee5['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3aef18}),_0x4ee739=_0x5b6ee5['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x13e23d));_0x104af6['data']['isSuggestion']&&_0x5b6ee5['writer']['addClass']('ck-suggestion-marker-'+_0x3aef18+'-new',_0xecc052),this['activeChange']==_0x104af6&&_0x5b6ee5['writer']['addClass']('ck-suggestion-marker--active',_0xecc052),_0x5b6ee5['writer']['insert'](_0x4ee739,_0xecc052),_0x5b6ee5['mapper']['bindElementToMarker'](_0xecc052,_0x2fa819['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x26042b=>{for(const _0x334082 of this['editor']['model']['document']['getRootNames']()){const _0x52e1fd=this['editor']['model']['document']['getRoot'](_0x334082),_0x1b5245=this['editor']['editing']['view']['document']['getRoot'](_0x334082);if(_0x1b5245){const _0x2e7883=_0x52e1fd['getAttribute']('revisionHistoryAttachChange');if(_0x26042b['removeAttribute']('data-change-id',_0x1b5245),_0x26042b['removeClass']('ck-revision-history-root-add',_0x1b5245),_0x26042b['removeClass']('ck-revision-history-root-remove',_0x1b5245),_0x26042b['removeClass']('ck-revision-history-root--active',_0x1b5245),_0x2e7883){const _0x1b7690=this['_getChangeFromId'](_0x2e7883);if(!_0x1b7690)return null;_0x26042b['setAttribute']('data-change-id',_0x2e7883,_0x1b5245),_0x26042b['addClass']('ck-revision-history-root-'+_0x1b7690['type'],_0x1b5245),this['activeChange']==_0x1b7690&&_0x26042b['addClass']('ck-revision-history-root--active',_0x1b5245);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xad2f7b=>'revision-comment:'+_0xad2f7b,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5285da=>'revision-suggestion:'+_0x5285da,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x1dbd40=>({'name':'suggestion:'+_0x1dbd40,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x2d8463=>{const _0x33bd44=_0x2d8463['markerName']['split'](':')[0x1];return'insertion'!=_0x33bd44&&'deletion'!=_0x33bd44?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x33bd44]};}}),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',(_0x380da4,_0x1a1b59,_0x3c85e4)=>{const _0x1107d9=_0x3c85e4['mapper']['markerNameToElements'](_0x1a1b59['markerName']);if(_0x1107d9){for(const _0x3ee497 of _0x1107d9)_0x3ee497['is']('uiElement')&&(_0x3c85e4['mapper']['unbindElementFromMarkerName'](_0x3ee497,_0x1a1b59['markerName']),_0x3c85e4['writer']['remove'](_0x3ee497));}},{'priority':'high'});}['_getChangeFromId'](_0x2fa577){return this['_changeIdToChange']['get'](_0x2fa577);}['_getViewForChange'](_0xd675fd){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0xd675fd),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4e5166,_0x51af77,_0x307f1b,_0x4dde43)=>{_0x4dde43&&this['_balloon']['remove'](_0x4dde43),_0x307f1b&&(this['_balloon']['add']({'view':_0x307f1b,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1d3ee9=this['editor']['editing'],_0xe1874c=this['_getChangeFromId'](_0x307f1b['changeId']);let _0x46100a;if(_0xe1874c['data']['isOnRoot']){const _0x3e44d1=_0x1d3ee9['view']['getDomRoot'](_0xe1874c['rootName']);_0x46100a=Array['from'](_0x3e44d1['getClientRects']());}else{const _0x440805=this['editor']['model']['markers']['get']('revision:'+_0x307f1b['changeId']);_0x46100a=Array['from'](_0x1d3ee9['mapper']['markerNameToElements'](_0x440805['name']))['map'](_0x29273f=>_0x1d3ee9['view']['domConverter']['mapViewToDom'](_0x29273f))['map'](_0x559f30=>Array['from'](_0x559f30['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x46100a[0x0];return _0x46100a['find'](_0x216ad3=>_0x216ad3['top']-0x3<=this['_activeViewTarget']['y']&&_0x216ad3['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x216ad3['left']-0x3<=this['_activeViewTarget']['x']&&_0x216ad3['right']+0x3>=this['_activeViewTarget']['x'])||_0x46100a[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x8556cd,_0x52bf18,_0x209dbc,_0x4c9d2e)=>{this['activeView']=_0x209dbc?this['_getViewForChange'](_0x209dbc):null,this['editor']['model']['change'](()=>{const _0x18e0d7=this['editor']['editing'];_0x4c9d2e&&(_0x4c9d2e['data']['isOnRoot']?_0x18e0d7['view']['change'](_0x81017f=>{_0x81017f['removeClass']('ck-revision-history-root--active',_0x18e0d7['view']['document']['getRoot'](_0x4c9d2e['rootName']));}):_0x18e0d7['reconvertMarker']('revision:'+_0x4c9d2e['id'])),_0x209dbc&&(_0x209dbc['data']['isOnRoot']?_0x18e0d7['view']['change'](_0x41b841=>{_0x41b841['addClass']('ck-revision-history-root--active',_0x18e0d7['view']['document']['getRoot'](_0x209dbc['rootName']));}):_0x18e0d7['reconvertMarker']('revision:'+_0x209dbc['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3f99c2,_0x1212f9)=>{if(this['activeChange'])return;const _0xbd3269=this['_findChangeIdFromDomTarget'](_0x1212f9['target']),_0x2b53c4=this['_changeIdToChange']['get'](_0xbd3269);_0x2b53c4?(this['_activeViewTarget']={'x':_0x1212f9['domEvent']['x'],'y':_0x1212f9['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x2b53c4)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3e9f50,_0x19e402)=>{const _0xe821f7=this['_findChangeIdFromDomTarget'](_0x19e402['target']),_0x183910=this['_changeIdToChange']['get'](_0xe821f7);_0x183910?(this['_activeViewTarget']={'x':_0x19e402['domEvent']['x'],'y':_0x19e402['domEvent']['y']},_0x183910===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x183910):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x34c12b){do{const _0x42eb26=_0x34c12b['getAttribute']('data-change-id');if(_0x42eb26)return _0x42eb26;_0x34c12b=_0x34c12b['parent'];}while(_0x34c12b);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5242ea=>{for(const _0x28c222 of this['editor']['model']['markers'])_0x5242ea['removeMarker'](_0x28c222);});}}function Q(_0x344a77,_0x580292){return(_0x363826,_0xb70248,_0x3af08f)=>{if(!_0x3af08f['consumable']['test'](_0xb70248['markerRange'],_0x363826['name']))return;const _0x4c095a=_0xb70248['markerRange']['getWalker'](),_0x22b2a4=_0xb70248['markerRange']['start'],_0x3aabce=_0x344a77['model']['schema'];let _0x3daa34=null,_0x3051f2=null,_0x2117ce=!0x1,_0x590b87=!0x1;for(const _0x4077ee of _0x4c095a){const _0x288985=_0x4077ee['item'];_0x2117ce=_0x2117ce||_0x3aabce['isContent'](_0x288985);const _0x3a0efc=_0x3af08f['mapper']['toViewElement'](_0x288985);if(_0x3a0efc&&_0x3a0efc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4077ee['type']&&(_0x3aabce['isBlock'](_0x288985)&&!_0x3aabce['isLimit'](_0x288985)&&(_0x288985['nextSibling']||_0x22b2a4['isAtEnd']?_0x3daa34&&_0x3daa34['parent']==_0x288985||(_0x3daa34=_0x288985,_0x28fad7(_0x4077ee['previousPosition']),_0x590b87=!0x0):_0x3051f2=_0x3051f2||_0x4077ee['previousPosition']));}function _0x28fad7(_0x398c12){const _0x5a8d5e=_0x3af08f['mapper']['toViewPosition'](_0x398c12),_0x384ad6=_0x3af08f['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x580292});_0x3af08f['writer']['insert'](_0x5a8d5e,_0x384ad6),_0x3af08f['mapper']['bindElementToMarker'](_0x384ad6,_0xb70248['markerName']);}_0x2117ce||_0x590b87||!_0x3051f2||_0x28fad7(_0x3051f2);};}class nt extends _0x3a00a7{constructor(_0x5d4ab2){super(_0x5d4ab2);const _0x2acd65=_0x5d4ab2['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x2acd65,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2acd65,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x2dc624=this['editor'],_0x7d4f21=_0x2dc624['plugins']['get'](u),_0x29d5d0=_0x7d4f21['isReady']?_0x7d4f21['diff']['newRevisionId']:null;_0x2dc624['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x29d5d0);}['refresh'](){const {isReady:_0x49ccfd,isEnabled:_0x444f5e,repository:_0x39ea13,diff:_0x39cf6e}=this['editor']['plugins']['get'](u),_0x2ab777=_0x39cf6e&&_0x39ea13['getLaterVisibleRevision'](_0x39cf6e['newRevisionId']);this['isEnabled']=_0x49ccfd&&_0x444f5e&&Boolean(_0x2ab777);}}class ot extends _0x3a00a7{['_step'];constructor(_0x182c97,{direction:_0x28b80c}){super(_0x182c97);const _0x550fa9=_0x182c97['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x28b80c?0x1:-0x1,this['listenTo'](_0x550fa9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x550fa9,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x550fa9,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x2d9279=this['editor'],_0x42150c=_0x2d9279['plugins']['get'](u),{isNavigationMode:_0x25d312,currentChangeNumber:_0xe77d8b}=_0x42150c;let _0x41ac80;if(_0x42150c['activeChange']=_0x25d312?_0x42150c['diff']['changes']['get'](_0xe77d8b+this['_step']):_0x42150c['diff']['changes']['first'],_0x42150c['activeChange']['data']['isOnRoot'])_0x41ac80=_0x2d9279['editing']['view']['getDomRoot'](_0x42150c['activeChange']['rootName']);else{const _0x1e61aa=_0x2d9279['model']['markers']['get']('revision:'+_0x42150c['activeChange']['id']);_0x41ac80=_0x4a511e(_0x2d9279['editing'],_0x1e61aa);}_0xbbd326({'target':_0x41ac80,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x2672c1,currentChangeNumber:_0x4ddc2f,numberOfChanges:_0x31d9bc,isReady:_0xc7e676,isEnabled:_0x36142b}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x36142b&&_0xc7e676&&_0x31d9bc)&&(!_0x2672c1||(0x1===this['_step']?_0x4ddc2f<_0x31d9bc-0x1:_0x4ddc2f>0x0));}}class xi extends _0x212fb1{constructor(_0x23cd43){super(_0x23cd43);const _0x116fa=this['bindTemplate'],_0x5eadea=new _0x28948f(_0x23cd43),_0x3a1f7d=new _0x28948f(_0x23cd43);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',(_0x5e3d13,_0xd85ce0)=>_0x5e3d13&&_0xd85ce0>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x44d904,_0x3f74f6,_0x591ba0,_0x722e77)=>{if(!_0x44d904)return m(_0x23cd43,'Loading...');if(!_0x591ba0)return m(_0x23cd43,'No\x20changes');const _0x381141=m(_0x23cd43,'NUMBER_OF_CHANGES',_0x591ba0);return _0x722e77?m(_0x23cd43,'X_OF_Y_CHANGES',[_0x3f74f6+0x1,_0x591ba0]):_0x381141;}),_0x5eadea['set']({'label':m(_0x23cd43,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1f58d8}),_0x3a1f7d['set']({'label':m(_0x23cd43,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3731cc}),_0x5eadea['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x3a1f7d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x5eadea['on']('execute',()=>this['fire']('execute','backward')),_0x3a1f7d['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',_0x116fa['if']('_isStatusLabelVisible','ck-hidden',_0x30d052=>!_0x30d052)]},'children':[{'text':_0x116fa['to']('isNavigationMode',_0x5aab97=>_0x5aab97?m(_0x23cd43,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x23cd43,'Total')+':\x20')}]},{'text':_0x116fa['to']('_statusText')}]},new _0x348f81(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x5eadea,_0x3a1f7d]}]});}}const ge='ck-editor__editable__loading-overlay';class Ri extends _0xcfa495{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x41d88d=this['editor']['editing']['view'];_0x41d88d['change'](_0x246992=>{for(const _0x1424ba of _0x41d88d['document']['roots'])_0x246992['addClass'](ge,_0x1424ba);});}['hide'](){const _0x58a6b2=this['editor']['editing']['view'];_0x58a6b2['change'](_0x412317=>{for(const _0x1f19b3 of _0x58a6b2['document']['roots'])_0x412317['removeClass'](ge,_0x1f19b3);});}}class v extends _0xcfa495{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,Ri];}['init'](){const _0x167863=this['editor'],_0x423d46=_0x167863['plugins']['get'](u),_0x54927c=_0x167863['plugins']['get'](Ri);_0x167863['ui']['componentFactory']['add']('exitToEditing',_0x3b52f5=>{const _0x24f30c=new _0x28948f(_0x3b52f5);return _0x24f30c['set']({'label':m(_0x3b52f5,'Back\x20to\x20editing'),'icon':_0x3e339e,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x24f30c,'execute',()=>{_0x167863['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x24f30c;}),_0x167863['ui']['componentFactory']['add']('restoreRevision',_0x187680=>{const _0x30e5dc=new _0x28948f(_0x187680);return _0x30e5dc['set']({'label':m(_0x187680,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x30e5dc['bind']('isEnabled')['to'](_0x167863['commands']['get']('restoreRevision')),this['listenTo'](_0x30e5dc,'execute',()=>_0x167863['execute']('restoreRevision')),_0x30e5dc;}),_0x167863['ui']['componentFactory']['add']('changesNavigation',_0x3b3938=>{const _0xf2f322=new xi(_0x3b3938),_0x372e08=_0x167863['commands']['get']('showPreviousChange'),_0x3b9bd5=_0x167863['commands']['get']('showNextChange');return _0xf2f322['bind']('isBackwardNavigationEnabled')['to'](_0x372e08,'isEnabled'),_0xf2f322['bind']('isForwardNavigationEnabled')['to'](_0x3b9bd5,'isEnabled'),_0xf2f322['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x423d46),this['listenTo'](_0xf2f322,'execute',(_0x536106,_0x546686)=>{_0x167863['execute']('forward'===_0x546686?'showNextChange':'showPreviousChange');}),_0xf2f322;}),_0x54927c['show'](),_0x423d46['on']('change:isReady',(_0x2f6a14,_0x1fea47,_0x3bbe25)=>{_0x3bbe25?_0x54927c['hide']():_0x54927c['show']();});}}class _i extends ti{['_resizeObserver']=null;constructor(_0x26324a,_0x497aab){super(_0x26324a,_0x497aab);const _0x5f5074=this['bindTemplate'];this['set']({'label':m(_0x26324a,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x26324a,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5f5074['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 _0x578aa1=this['fieldView']['element'];this['_tooltipString']=_0x578aa1['scrollWidth']>_0x578aa1['clientWidth']&&_0x578aa1['value']||'';}}class bi extends _0x212fb1{constructor(_0x5526d6,_0x12c674,_0x1fc537){super(_0x5526d6);const _0x357d15=new _0x5111d3();_0x357d15['set']({'content':_0x55d462,'viewBox':'0\x200\x2011\x2010'});const _0x338613=['ck','ck-revision-history-sidebar__revision-author'];_0x1fc537&&_0x338613['push']('ck-revision-history-sidebar__revision-author_creator');const _0x18a143=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x5526d6,_0x1fc537?'Revision\x20creator':'Revision\x20author')},'children':[_0x357d15,_0x12c674['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x338613},'children':_0x18a143});}}function ki(_0x39104,_0x30fd2b){const _0x227aae=_0x39104['bindTemplate'],_0x4095a4=_0x39104['locale'],_0x8033c2=_0x57ae92(_0x4095a4);_0x8033c2['panelPosition']='sw';const _0x5c0691=function(_0xedbae5,_0x19c6a3){const _0x2b0389=function(_0xc998ca,_0x342b0d){const _0x1d2dc4=_0xc998ca['locale'],_0x9d9f8a={'Compare\x20against\x20selected':m(_0x1d2dc4,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x1d2dc4,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x1d2dc4,'Restore\x20this\x20revision')};return _0x342b0d['map'](_0x47f249=>{const _0x4d1ca2=_0x9d9f8a[_0x47f249['name']];return _0x4d1ca2&&_0x4d1ca2!==_0x47f249['name']&&(_0x47f249['name']=_0x4d1ca2),_0x47f249;});}(_0xedbae5,_0x19c6a3),_0x5efd34=new _0x2cee73();for(const _0x4e8dd9 of _0x2b0389){const _0x3ffbef={'type':'button','model':new to({'label':_0x4e8dd9['name'],'class':_0x4e8dd9['class'],'withText':!0x0,'role':'menuitem','_action':_0x4e8dd9['action']})};_0x3ffbef['model']['bind']('isEnabled')['to'](_0xedbae5,'isActionsDropdownOpen',_0x29aa64=>'function'!=typeof _0x4e8dd9['isEnabled']||(!_0x29aa64||_0x4e8dd9['isEnabled'](_0xedbae5))),_0x5efd34['add'](_0x3ffbef);}return _0x5efd34;}(_0x39104,_0x30fd2b);return _0x39104['bind']('isActionsDropdownOpen')['to'](_0x8033c2,'isOpen'),_0x8033c2['buttonView']['set']({'label':m(_0x4095a4,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3daa3a}),_0x8033c2['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x227aae['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x227aae['to'](_0x82467f=>_0x82467f['stopPropagation']())}}),_0x8033c2['on']('execute',_0x4a75f4=>{_0x39104['isReady']&&'function'==typeof _0x4a75f4['source']['_action']&&_0x4a75f4['source']['_action'](_0x39104);}),_0x7d9e09(_0x8033c2,_0x5c0691,{'role':'menu'}),_0x8033c2['listenTo'](_0x39104,'change:isActionsDropdownOpen',(_0x4b2f1a,_0x35c62f,_0x233751)=>{if(_0x233751)for(const _0x17e703 of _0x8033c2['listView']['items']){const _0x49966e=_0x17e703['children']['first'],_0x5252cd=_0x30fd2b['find'](_0x466bac=>_0x466bac['action']===_0x49966e['_action'])['isVisible'];_0x17e703['isVisible']=void 0x0===_0x5252cd||_0x5252cd(_0x39104);}}),_0x8033c2;}class ci extends/* #__PURE__ -- @preserve */
27
- _0x572ee6(_0x212fb1){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x5884af,_0x2133bd,_0x44d066,_0x5b5067){super(_0x5884af);const _0x28c161=this['bindTemplate'],_0x1929d3=function(_0x465932,_0x1ed0b1){const _0x3d77ea=Array['from'](_0x1ed0b1['authors'])['filter'](_0x54d05f=>_0x54d05f!=_0x1ed0b1['creator']);return _0x1ed0b1['creator']&&_0x3d77ea['unshift'](_0x1ed0b1['creator']),_0x3d77ea['map'](_0x3badf5=>new bi(_0x465932,_0x3badf5,_0x3badf5==_0x1ed0b1['creator']));}(_0x5884af,_0x2133bd);this['id']=_0x2133bd['id'],this['_revision']=_0x2133bd,this['_requireRevisionName']=_0x5b5067,this['bind']('name','createdAt')['to'](_0x2133bd),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x8c3731=>{return _0x3d35f6=_0x5884af['uiLanguage'],(_0x44f6e0=_0x8c3731)['toLocaleDateString'](_0x3d35f6,{'month':'long','day':'numeric'})+',\x20'+_0x44f6e0['toLocaleTimeString'](_0x3d35f6,{'hour':'numeric','minute':'numeric'});var _0x3d35f6,_0x44f6e0;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new _i(_0x5884af,_0x1cdcaa),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x786b66=>_0x786b66||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x207332,_0x3e4008)=>_0x207332&&_0x3e4008),this['revisionActionsView']=_0x44d066&&_0x44d066['length']?ki(this,_0x44d066):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x28c161['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x28c161['if']('isEnabled','ck-disabled',_0x197492=>!_0x197492),_0x28c161['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x28c161['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x28c161['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':_0x28c161['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':_0x1929d3}]},this['revisionActionsView']],'on':{'click':_0x28c161['to'](_0x14d893=>{_0x14d893['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x41dccd=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x41dccd,'change',()=>{this['_requireRevisionName']&&!_0x41dccd['value']||this['fire']('setName',{'id':this['id'],'name':_0x41dccd['value']}),_0x41dccd['value']||(_0x41dccd['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function di(_0x510c9b,_0x32d10e){const _0x362843=_0x16779c['fromJSDate'](_0x510c9b)['setLocale'](_0x32d10e),_0x5ed5bd=_0x16779c['local'](),_0x1a5b15=_0x5ed5bd['minus']({'days':0x1})['startOf']('day');let _0x4dc677,_0x31f684;return _0x362843['hasSame'](_0x5ed5bd,'day')?(_0x4dc677=_0x362843['startOf']('day')['toJSDate'](),_0x31f684=_0x362843['toRelativeCalendar']()):_0x362843['hasSame'](_0x1a5b15,'day')?(_0x4dc677=_0x1a5b15['toJSDate'](),_0x31f684=_0x362843['toRelativeCalendar']()):_0x362843['hasSame'](_0x5ed5bd,'week')?(_0x4dc677=_0x362843['startOf']('week')['toJSDate'](),_0x31f684=_0x362843['weekdayLong']||''):_0x362843['hasSame'](_0x5ed5bd,'year')?(_0x4dc677=_0x362843['startOf']('month')['toJSDate'](),_0x31f684=_0x362843['monthLong']||''):(_0x4dc677=_0x362843['startOf']('year')['toJSDate'](),_0x31f684=String(_0x362843['year'])),{'startDate':_0x4dc677,'localizedPeriodName':_0x31f684};}class vi extends _0x212fb1{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x478d81,_0x4cf374,_0x25772a,_0x5af14d){super(_0x478d81);const _0x485c82=di(_0x4cf374,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4cf374,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x25772a,this['_requireRevisionName']=_0x5af14d,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':_0x485c82}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1f3c55){const _0x41e70c=new ci(this['locale'],_0x1f3c55,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x41e70c);}['removeRevision'](_0x471b13){const _0x512309=this['revisionViews']['find'](_0x102cec=>_0x102cec['id']===_0x471b13['id']);this['revisionViews']['remove'](_0x512309);}}class mi extends _0x212fb1{constructor(_0x318f7b){super(_0x318f7b);const _0x2ac0be=new _0x5111d3();_0x2ac0be['content']=_0x1bc09b,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x2ac0be,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x318f7b,'Revision\x20history')]}]});}}class ai extends _0x212fb1{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x311ac8,_0x5875a7,_0x47e7c1,_0x51d5e2){super(_0x311ac8);const _0x2a1247=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x5875a7,this['_revisionActions']=_0x47e7c1,this['_requireRevisionName']=_0x51d5e2,this['on']('select',(_0x47145d,_0x14e7cb)=>{this['fire']('revisionSelected',_0x14e7cb);}),this['on']('setName',(_0x8d54df,_0x4f6b11)=>{this['fire']('revisionSetName',_0x4f6b11);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new mi(_0x311ac8),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x2a1247['if']('isEnabled','ck-disabled',_0x1bbdba=>!_0x1bbdba)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x13c1b7 of this['_revisions'])this['_addRevision'](_0x13c1b7);this['_revisions']['on']('add',(_0x486455,_0x44957a)=>{this['_addRevision'](_0x44957a);}),this['_revisions']['on']('remove',(_0x593733,_0x29ff23)=>{this['_removeRevision'](_0x29ff23);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x38ed80=>_0x38ed80['revisionViews']['map'](_0x1e7ce7=>_0x1e7ce7))['flat']();}['selectRevision'](_0x4a73c9){for(const _0x25b79d of this['revisionViews'])_0x4a73c9&&_0x4a73c9['id']===_0x25b79d['id']?_0x25b79d['select']():_0x25b79d['deselect']();}['highlightRevisions'](_0x2e84f4){for(const _0x2a9dee of this['revisionViews'])_0x2e84f4['some'](({id:_0x4abe3e})=>_0x4abe3e===_0x2a9dee['id'])?_0x2a9dee['highlight']():_0x2a9dee['unhighlight']();}['_addRevision'](_0x3118d5){const _0x1249b7=di(_0x3118d5['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5d3b1d=this['timePeriodViews']['get'](0x0);_0x5d3b1d&&_0x5d3b1d['startDate']['getTime']()===_0x1249b7['getTime']()||(_0x5d3b1d=new vi(this['locale'],_0x1249b7,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5d3b1d)),_0x5d3b1d['addRevision'](_0x3118d5);}['_removeRevision'](_0x38e351){const _0x76f185=di(_0x38e351['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x76f185)['removeRevision'](_0x38e351);}['_getTimePeriodViewByStartDate'](_0x32fc1c){return this['timePeriodViews']['find'](_0x2a94c4=>_0x2a94c4['startDate']['getTime']()===_0x32fc1c['getTime']());}}class d extends _0xcfa495{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x113f03,uid as _0x532896,Collection as _0x504df2,logWarning as _0x47c187,FocusTracker as _0x30890a,KeystrokeHandler as _0x34a3da,scrollViewportToShowTarget as _0x3a5a7e,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x1d6810}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x83ca90,set as _0x4fdd88,unset as _0x48e3b0,isEqual as _0x3c0bf9}from'es-toolkit/compat';import{Plugin as _0xbe21c4,PendingActions as _0x71dee9,Command as _0x4856a5,ElementApiMixin as _0x28570d,Editor as _0x1dbeab}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x416e9c,getMarkerDomElement as _0x1f08bc,ConfirmMixin as _0x43b418,sanitizeEditorConfig as _0x45ed39}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x184b8e,ViewAttributeElement as _0x1205ba,ViewEmptyElement as _0x470df9,ViewRawElement as _0x510a8d,ViewUIElement as _0x4555eb,ViewDocumentFragment as _0x164cef,ViewText as _0x4e7f12,ViewElement as _0x451dcb,ModelElement as _0x36b445,ModelRange as _0xb3cd0f,ModelPosition as _0x517828,ModelDocumentFragment as _0x8c84c8,ModelText as _0x367598}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x672cd0,IconChevronUp as _0x4fea33,IconChevronDown as _0xaf50d4,IconUndo as _0x31592a,IconUser as _0x21d8a3,IconThreeVerticalDots as _0x3f675d}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x5aa04a,View as _0x4eb8a3,submitHandler as _0xccd7c3,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x1e23a0,ListView as _0x4b2173,ListItemView as _0x55af41,ButtonView as _0x41a1a9,MenuBarMenuView as _0x22ce88,MenuBarMenuListView as _0x3b6094,MenuBarMenuListItemView as _0x360a69,MenuBarMenuListItemButtonView as _0x1b7074,ContextualBalloon as _0x3e3e3f,ToolbarSeparatorView as _0x4bb486,IconView as _0x517cab,addListToDropdown as _0x105741,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x20cce1,StickyPanelView as _0x82d6c7,ToolbarView as _0x392eb7,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x275244}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x113f03(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x122a79){super(),this['id']=_0x122a79['id']||_0x532896(),this['creator']=_0x122a79['creator']||null,this['authors']=_0x122a79['authors']||[],this['diffData']=_0x122a79['diffData']||null,this['toVersion']=_0x122a79['toVersion']||0x0,this['fromVersion']=_0x122a79['fromVersion']||0x0,this['set']('name',_0x122a79['name']||''),this['set']('createdAt',_0x122a79['createdAt']||new Date()),this['set']('attributes',_0x122a79['attributes']||{});}['setName'](_0xdfe461){this['_update']({'name':_0xdfe461});}['setAttribute'](_0x417e6a,_0x26cb13){const _0x1b5460=_0x83ca90(this['attributes']);_0x4fdd88(_0x1b5460,_0x417e6a,_0x26cb13),this['_update']({'attributes':_0x1b5460});}['removeAttribute'](_0x5c0ec4){const _0x35dc69=_0x83ca90(this['attributes']);_0x48e3b0(_0x35dc69,_0x5c0ec4),this['_update']({'attributes':_0x35dc69});}['_update'](_0x34a76,_0x40aebc=!0x1){let _0x4eb16e=!0x1;const _0x56fa11={'id':this['id']},_0xc15135=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x31f3a5 of _0xc15135){const _0x56b90f=_0x34a76[_0x31f3a5];void 0x0!==_0x56b90f&&_0x56b90f!==this[_0x31f3a5]&&(this[_0x31f3a5]=_0x56b90f,_0x56fa11[_0x31f3a5]=_0x56b90f,_0x4eb16e=!0x0);}_0x4eb16e&&(_0x56fa11['authors']&&(_0x56fa11['authorsIds']=_0x56fa11['authors']['map'](_0x1946de=>_0x1946de['id']),delete _0x56fa11['authors']),this['fire']('_update',_0x56fa11,_0x40aebc));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x32f8b8=>_0x32f8b8['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0xbe21c4{['_revisions'];static get['requires'](){return[_0x416e9c];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x167d67){super(_0x167d67),this['_revisions']=new _0x504df2();}['afterInit'](){!async function(_0x1be641){const _0xc6de19=_0x16bffc([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x1d691c=0xeb829,_0x4e350b=0x359e09b0,_0x7ee81c=0x35997730^_0x4e350b,_0x4df571=window[_0x16bffc([0x44,0x61,0x74,0x65])][_0x16bffc([0x6e,0x6f,0x77])](),_0x3df50e=_0x1be641[_0x16bffc([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4a977f=new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xaee380=>{_0x3df50e[_0x16bffc([0x6f,0x6e,0x63,0x65])](_0x16bffc([0x72,0x65,0x61,0x64,0x79]),_0xaee380);}),_0x27555d={[_0x16bffc([0x6b,0x74,0x79])]:_0x16bffc([0x45,0x43]),[_0x16bffc([0x75,0x73,0x65])]:_0x16bffc([0x73,0x69,0x67]),[_0x16bffc([0x63,0x72,0x76])]:_0x16bffc([0x50,0x2d,0x32,0x35,0x36]),[_0x16bffc([0x78])]:_0x16bffc([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]),[_0x16bffc([0x79])]:_0x16bffc([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]),[_0x16bffc([0x61,0x6c,0x67])]:_0x16bffc([0x45,0x53,0x32,0x35,0x36])},_0x268ad2=_0x3df50e[_0x16bffc([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x16bffc([0x67,0x65,0x74])](_0x16bffc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4904d0(){let _0x346122,_0xa02b58=null,_0x2d2f4b=null;try{if(_0x268ad2==_0x16bffc([0x47,0x50,0x4c]))return _0x16bffc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x346122=_0x2b1b08(),!_0x346122)return _0x16bffc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x346122[_0x16bffc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2d2f4b=_0x44e40a(_0x346122[_0x16bffc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x346122[_0x16bffc([0x6a,0x74,0x69])])),await _0x10f76d()?_0x56ba78()?_0x239d44()?_0x16bffc([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x313799()?(_0x346122[_0x16bffc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x16bffc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xa02b58=_0x12a5c7(_0x16bffc([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x293170()):_0x16bffc([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x16bffc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x16bffc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x16bffc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x239d44(){const _0x1d19ee=[_0x16bffc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x16bffc([0x74,0x72,0x69,0x61,0x6c])][_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x346122[_0x16bffc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4df571/0x3e8:0xe10*_0x7ee81c;return _0x346122[_0x16bffc([0x65,0x78,0x70])]<_0x1d19ee;}function _0x56ba78(){const _0x2718e9=_0x346122[_0x16bffc([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2718e9)return!0x1;if(_0x2718e9[_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16bffc([0x2a])))return!0x0;if(_0x2718e9[_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16bffc([0x52,0x48])))return!0x0;if(_0x2718e9[_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16bffc([0x52,0x52,0x48]))){if(_0x4da140())return!0x0;if(_0x57cec7()||_0x4a3e4c())return!0x0;}return!0x1;}function _0x313799(){const _0x26209f=_0x346122[_0x16bffc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x26209f||0x0==_0x26209f[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1a5b33}=new URL(window[_0x16bffc([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x26209f[_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a5b33))return!0x0;const _0x16ee4b=_0x1a5b33[_0x16bffc([0x73,0x70,0x6c,0x69,0x74])](_0x16bffc([0x2e]));return _0x26209f[_0x16bffc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x49c42b=>_0x49c42b[_0x16bffc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16bffc([0x2a])))[_0x16bffc([0x6d,0x61,0x70])](_0x2b60eb=>_0x2b60eb[_0x16bffc([0x73,0x70,0x6c,0x69,0x74])](_0x16bffc([0x2e])))[_0x16bffc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x8813cd=>_0x8813cd[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x16ee4b[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x16bffc([0x6d,0x61,0x70])](_0x594487=>Array(_0x16ee4b[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x594487[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x16bffc([0x66,0x69,0x6c,0x6c])](_0x594487[0x0]===_0x16bffc([0x2a])?_0x16bffc([0x2a]):'')[_0x16bffc([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x594487))[_0x16bffc([0x73,0x6f,0x6d,0x65])](_0x231205=>_0x16ee4b[_0x16bffc([0x65,0x76,0x65,0x72,0x79])]((_0x2c2176,_0x5da9fd)=>_0x231205[_0x5da9fd]===_0x2c2176||_0x231205[_0x5da9fd]===_0x16bffc([0x2a])));}function _0x293170(){return _0xa02b58&&_0x2d2f4b?new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4b9324,_0x244662)=>{_0xa02b58[_0x16bffc([0x74,0x68,0x65,0x6e])](_0x4b9324,_0x244662),_0x2d2f4b[_0x16bffc([0x74,0x68,0x65,0x6e])](_0xe338fc=>{_0xe338fc!=_0x16bffc([0x56,0x61,0x6c,0x69,0x64])&&_0x4b9324(_0xe338fc);},_0x244662);}):_0xa02b58||_0x2d2f4b||_0x16bffc([0x56,0x61,0x6c,0x69,0x64]);}}function _0x44e40a(_0x2e8af7,_0x4b8a72){return new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x563948=>{if(_0xbb56d8())return _0x563948(_0x16bffc([0x56,0x61,0x6c,0x69,0x64]));_0x263a24(),_0x3df50e[_0x16bffc([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x16bffc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5336a6=!0x1;const _0x1b32c0=_0x532896();function _0x3369e1(_0x3dee3a){return!!_0x3dee3a&&(typeof _0x3dee3a===_0x16bffc([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3dee3a===_0x16bffc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3dee3a[_0x16bffc([0x74,0x68,0x65,0x6e])]===_0x16bffc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3dee3a[_0x16bffc([0x63,0x61,0x74,0x63,0x68])]===_0x16bffc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5ceafd(_0x203889){_0x3c554d(_0x203889)[_0x16bffc([0x74,0x68,0x65,0x6e])](_0x327eae=>{if(!_0x327eae||_0x327eae[_0x16bffc([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x16bffc([0x6f,0x6b]))return _0x16bffc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1ea563(_0x54756b(_0x1b32c0+_0x4b8a72))!=_0x327eae[_0x16bffc([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x16bffc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x16bffc([0x56,0x61,0x6c,0x69,0x64]);})[_0x16bffc([0x74,0x68,0x65,0x6e])](_0x2b87b9=>(_0x50e41d(),_0x2b87b9),()=>{const _0x5c44c0=_0x5a73d8();return null==_0x5c44c0?(_0x50e41d(),_0x16bffc([0x56,0x61,0x6c,0x69,0x64])):_0x16bffc(_0x4df571-_0x5c44c0>(0x11928db0^_0x4e350b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x16bffc([0x74,0x68,0x65,0x6e])](_0x563948)[_0x16bffc([0x63,0x61,0x74,0x63,0x68])](()=>{_0x563948(_0x16bffc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x27fa3c=0x35a8e730^_0x4e350b;function _0x50e41d(){const _0xe85ebc=_0x16bffc([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ea563(_0x54756b(_0x2e8af7)),_0x3537f4=_0x269398(_0x1ea563(window[_0x16bffc([0x4d,0x61,0x74,0x68])][_0x16bffc([0x63,0x65,0x69,0x6c])](_0x4df571/_0x27fa3c)));window[_0x16bffc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x16bffc([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xe85ebc,_0x3537f4);}function _0x5a73d8(){const _0x3ddbb0=_0x16bffc([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ea563(_0x54756b(_0x2e8af7)),_0x6da89a=window[_0x16bffc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x16bffc([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3ddbb0);return _0x6da89a?window[_0x16bffc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x269398(_0x6da89a),0x10)*_0x27fa3c:null;}function _0x3c554d(_0x583d73){return new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x554530,_0x345818)=>{_0x583d73[_0x16bffc([0x74,0x68,0x65,0x6e])](_0x554530,_0x345818),window[_0x16bffc([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x345818,0x359fdd70^_0x4e350b);});}}_0x3df50e[_0x16bffc([0x6f,0x6e])](_0x16bffc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x205b7f,_0x4b7370)=>{if(_0x4b7370[0x0]!=_0x2e8af7)return _0x563948(_0x16bffc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4b7370[0x1]={..._0x4b7370[0x1],[_0x16bffc([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1b32c0};},{[_0x16bffc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x16bffc([0x68,0x69,0x67,0x68])}),_0x3df50e[_0x16bffc([0x6f,0x6e])](_0x16bffc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2bc05a=>{_0x3369e1(_0x2bc05a[_0x16bffc([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5336a6=!0x0,_0x5ceafd(_0x2bc05a[_0x16bffc([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x16bffc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x16bffc([0x6c,0x6f,0x77])}),_0x4a977f[_0x16bffc([0x74,0x68,0x65,0x6e])](()=>{_0x5336a6||_0x563948(_0x16bffc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xbb56d8(){return _0x3df50e[_0x16bffc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x16bffc([0x76,0x69,0x65,0x77])][_0x16bffc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x16bffc([0x61,0x75,0x74,0x6f]);}function _0x263a24(){_0x3df50e[_0x16bffc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x16bffc([0x76,0x69,0x65,0x77])][_0x16bffc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x16bffc([0x61,0x75,0x74,0x6f]);}}function _0x12a5c7(_0x3f3cec){const _0x39b26a=[new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54cdf9=>setTimeout(_0x54cdf9,0x3597377c^_0x4e350b)),_0x4a977f[_0x16bffc([0x74,0x68,0x65,0x6e])](()=>new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x423ffc=>{const _0xac76c0=0x359e09b7^_0x4e350b,_0x20f67d=_0x1be641[_0x16bffc([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x5f5e41(){_0x20f67d[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0xac76c0&&_0x423ffc();}_0x5f5e41(),_0x20f67d[_0x16bffc([0x6f,0x6e])](_0x16bffc([0x61,0x64,0x64]),_0x5f5e41);})),new window[(_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd3e923=>{function _0x94cbc8(){for(const _0x358ec1 in window)if(window[_0x16bffc([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x16bffc([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x358ec1))&&window[_0x358ec1]==_0x1d691c)return _0xd3e923();_0x3df50e[_0x16bffc([0x73,0x74,0x61,0x74,0x65])]!=_0x16bffc([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x16bffc([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x94cbc8,0x359e1a38^_0x4e350b);}_0x3e5cbd(_0x16bffc([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x94cbc8();})];return window[_0x16bffc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x16bffc([0x72,0x61,0x63,0x65])](_0x39b26a)[_0x16bffc([0x74,0x68,0x65,0x6e])](()=>_0x3f3cec);}async function _0x40773d(){if(await _0x4a977f,_0x3e5cbd(_0x16bffc([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x38ee98=_0x1be641[_0x16bffc([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x393396=_0x1be641[_0x16bffc([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])](_0x38ee98[_0x16bffc([0x69,0x64])]),_0x3cf109=_0x526d1b(_0x16bffc([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3cf109[_0x16bffc([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x38ee98['id'],_0x393396?_0x393396['id']:null,!0x0),_0x3cf109[_0x16bffc([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x16bffc([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3cf109[_0x16bffc([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3cf109[_0x16bffc([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x2ddc71,void(_0x3cf109[_0x16bffc([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x2ddc71);}if(_0x3e5cbd(_0x16bffc([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x4539a8=_0x526d1b(_0x16bffc([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x4539a8[_0x16bffc([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x16bffc([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4539a8[_0x16bffc([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4539a8[_0x16bffc([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x2ddc71,_0x4539a8[_0x16bffc([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x2ddc71;}_0x3df50e[_0x16bffc([0x6d,0x6f,0x64,0x65,0x6c])][_0x16bffc([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2ddc71,_0x3df50e[_0x16bffc([0x6d,0x6f,0x64,0x65,0x6c])][_0x16bffc([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2ddc71,_0x3df50e[_0x16bffc([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x16bffc([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4da140(){return _0x3e5cbd(_0x16bffc([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x526d1b(_0x16bffc([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x16bffc([0x73,0x74,0x61,0x74,0x65])]==_0x16bffc([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x57cec7(){return _0x3e5cbd(_0x16bffc([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 _0x4a3e4c(){return _0x3e5cbd(_0x16bffc([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2cc5ad(_0x1634c1){const _0x303ee7=_0x357c0a();_0x3df50e[_0x303ee7]=_0x16bffc([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])+_0x1634c1,_0x1634c1[_0x16bffc([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x16bffc([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x357c0a()]=_0x1d691c),_0x1634c1!=_0x16bffc([0x56,0x61,0x6c,0x69,0x64])&&_0x40773d();}function _0x357c0a(){const _0x1e0942=window[_0x16bffc([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x16bffc([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x16bffc([0x6e,0x6f,0x77])]())[_0x16bffc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x16bffc([0x2e]),'');let _0x457de2=_0x16bffc([0x76]);for(let _0x52be66=0x0;_0x52be66<_0x1e0942[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x52be66+=0x2){let _0x3bbb3f=window[_0x16bffc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1e0942[_0x16bffc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x52be66,_0x52be66+0x2));_0x3bbb3f>=_0xc6de19[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3bbb3f-=_0xc6de19[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x457de2+=_0xc6de19[_0x3bbb3f];}return _0x457de2;}function _0x2b1b08(){const _0x3b755f=_0x268ad2[_0x16bffc([0x73,0x70,0x6c,0x69,0x74])](_0x16bffc([0x2e]));if(0x3!=_0x3b755f[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5c2210(_0x3b755f[0x1]);function _0x5c2210(_0x44a8c1){const _0x112d5a=_0x5bd43a(_0x44a8c1);return _0x112d5a&&_0x496faa()?_0x112d5a:null;function _0x496faa(){const _0x1d396f=_0x112d5a[_0x16bffc([0x6a,0x74,0x69])],_0x556a68=window[_0x16bffc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1d396f[_0x16bffc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1d396f[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x15d924={..._0x112d5a,[_0x16bffc([0x6a,0x74,0x69])]:_0x1d396f[_0x16bffc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1d396f[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x15d924[_0x16bffc([0x76,0x63])],_0x54756b(_0x15d924)==_0x556a68;}}}async function _0x10f76d(){let _0x216826=!0x0;try{const _0x2d056f=_0x268ad2[_0x16bffc([0x73,0x70,0x6c,0x69,0x74])](_0x16bffc([0x2e])),[_0x5e5e89,_0x230645,_0x434ccb]=_0x2d056f;return _0x51d052(_0x5e5e89),await _0x54ef66(_0x5e5e89,_0x230645,_0x434ccb),_0x216826;}catch{return!0x1;}function _0x51d052(_0x54226f){const _0x3cbe75=_0x5bd43a(_0x54226f);_0x3cbe75&&_0x3cbe75[_0x16bffc([0x61,0x6c,0x67])]==_0x16bffc([0x45,0x53,0x32,0x35,0x36])||(_0x216826=!0x1);}async function _0x54ef66(_0x475bd6,_0x50590f,_0x5a2724){const _0x520217=window[_0x16bffc([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x16bffc([0x66,0x72,0x6f,0x6d])](_0x3de5a0(_0x5a2724),_0x32fd81=>_0x32fd81[_0x16bffc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x38a64f=new window[(_0x16bffc([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x16bffc([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x475bd6+_0x16bffc([0x2e])+_0x50590f),_0x145587=window[_0x16bffc([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x16bffc([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x145587)return;const _0x2597f0=await _0x145587[_0x16bffc([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x16bffc([0x6a,0x77,0x6b]),_0x27555d,{[_0x16bffc([0x6e,0x61,0x6d,0x65])]:_0x16bffc([0x45,0x43,0x44,0x53,0x41]),[_0x16bffc([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x16bffc([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x16bffc([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x145587[_0x16bffc([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x16bffc([0x6e,0x61,0x6d,0x65])]:_0x16bffc([0x45,0x43,0x44,0x53,0x41]),[_0x16bffc([0x68,0x61,0x73,0x68])]:{[_0x16bffc([0x6e,0x61,0x6d,0x65])]:_0x16bffc([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2597f0,_0x520217,_0x38a64f)||(_0x216826=!0x1);}}function _0x5bd43a(_0x104e5a){return _0x104e5a[_0x16bffc([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x16bffc([0x65,0x79]))?JSON[_0x16bffc([0x70,0x61,0x72,0x73,0x65])](_0x3de5a0(_0x104e5a)):null;}function _0x3de5a0(_0x346411){return window[_0x16bffc([0x61,0x74,0x6f,0x62])](_0x346411[_0x16bffc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x16bffc([0x2b]))[_0x16bffc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x16bffc([0x2f])));}function _0x54756b(_0x2c07db){let _0x21f488=0x1505;function _0x316a22(_0xdbdae){for(let _0x550cee=0x0;_0x550cee<_0xdbdae[_0x16bffc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x550cee++){const _0x1d09b7=_0xdbdae[_0x16bffc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x550cee);_0x21f488=(_0x21f488<<0x5)+_0x21f488+_0x1d09b7,_0x21f488&=_0x21f488;}}function _0x4768e3(_0x18f046){Array[_0x16bffc([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x18f046)?_0x18f046[_0x16bffc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4768e3):_0x18f046&&typeof _0x18f046==_0x16bffc([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x16bffc([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x18f046)[_0x16bffc([0x73,0x6f,0x72,0x74])]()[_0x16bffc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x277389,_0x52b922])=>{_0x316a22(_0x277389),_0x4768e3(_0x52b922);}):_0x316a22(window[_0x16bffc([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x18f046));}return _0x4768e3(_0x2c07db),_0x21f488>>>0x0;}function _0x1ea563(_0x59a14d){return _0x59a14d[_0x16bffc([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x16bffc([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x16bffc([0x30]));}function _0x269398(_0x31b363){return _0x31b363[_0x16bffc([0x73,0x70,0x6c,0x69,0x74])]('')[_0x16bffc([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x16bffc([0x6a,0x6f,0x69,0x6e])]('');}function _0x3e5cbd(_0x194e26){return _0x3df50e[_0x16bffc([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x16bffc([0x68,0x61,0x73])](_0x194e26);}function _0x526d1b(_0x50ae14){return _0x3df50e[_0x16bffc([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x16bffc([0x67,0x65,0x74])](_0x50ae14);}function _0x2ddc71(){}function _0x16bffc(_0x1067d3){return _0x1067d3['map'](_0x126e76=>String['fromCharCode'](_0x126e76))['join']('');}_0x2cc5ad(await _0x4904d0());}(this);}['createRevision'](_0xfd9879){const _0x1d7005=this['editor']['plugins']['get']('Users');return new I({'id':_0xfd9879['id'],'name':_0xfd9879['name'],'creator':_0xfd9879['creatorId']?_0x1d7005['getUser'](_0xfd9879['creatorId']):null,'diffData':_0xfd9879['diffData']||_0xfd9879['data'],'authors':_0xfd9879['authorsIds']['map'](_0x1f1af5=>_0x1d7005['getUser'](_0x1f1af5)),'createdAt':new Date(_0xfd9879['createdAt']),'attributes':_0xfd9879['attributes'],'fromVersion':_0xfd9879['fromVersion'],'toVersion':_0xfd9879['toVersion']});}['addRevision'](_0xc1c8af,_0x577ef0=0x0){this['_revisions']['add'](_0xc1c8af,_0x577ef0);}['getRevision'](_0xa05bcb){return this['_revisions']['get'](_0xa05bcb);}['getRevisions'](_0x37b8cd={'toJSON':!0x1}){const _0x3e72cd=Array['from'](this['_revisions']);return _0x3e72cd['reverse'](),_0x37b8cd['toJSON']?_0x3e72cd['map'](_0x4d0f9b=>_0x4d0f9b['toJSON']()):_0x3e72cd;}['getIndex'](_0x2eb159){return this['_revisions']['getIndex'](_0x2eb159);}['getEarlierVisibleRevision'](_0x141fab){const [,_0x30ca81]=this['getRevisionsIterator'](_0x141fab,{'direction':'earlier'});return _0x30ca81;}['getLaterVisibleRevision'](_0x5c0bdd){const [,_0x1dcd50]=this['getRevisionsIterator'](_0x5c0bdd,{'direction':'later'});return _0x1dcd50;}['getRevisionsInDiff'](_0x860894){const _0x39ffb8=[];for(const _0x162ac7 of this['getRevisionsIterator'](_0x860894['newRevisionId']))if(_0x39ffb8['push'](_0x162ac7),_0x162ac7['id']===_0x860894['oldRevisionId'])break;return _0x39ffb8;}*['getRevisionsIterator'](_0x5ec5ba,{direction:_0x11c4f1='earlier',filter:_0xb9a0f3=()=>!0x0}={}){const _0xd7fe22='earlier'===_0x11c4f1?0x1:-0x1;let _0x4599fb=this['_revisions']['get'](_0x5ec5ba),_0x145a82=this['getIndex'](_0x4599fb);for(yield _0x4599fb;_0x4599fb;){if(_0x145a82+=_0xd7fe22,_0x4599fb=this['getRevision'](_0x145a82),!_0x4599fb)return;_0xb9a0f3(_0x4599fb)&&(yield _0x4599fb);}}}class $ extends _0xbe21c4{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x184b8e,'c'],[_0x1205ba,'a'],[_0x470df9,'e'],[_0x510a8d,'r'],[_0x4555eb,'u']]);['_typeCharToViewClass']=new Map([['c',_0x184b8e],['a',_0x1205ba],['e',_0x470df9],['r',_0x510a8d],['u',_0x4555eb]]);async['loadRevisionData'](_0x120bae,_0x3ff57c){if(_0x120bae['diffData']||!_0x3ff57c)return;const _0x281afb=this['editor']['config']['get']('collaboration.channelId'),_0x3b9f96=await _0x3ff57c['getRevision']({'channelId':_0x281afb,'revisionId':_0x120bae['id']});_0x120bae['diffData']=_0x3b9f96['diffData'];}['getRevisionDocumentData'](_0x1ef2f0){const _0x4e9980={};for(const _0x516468 in _0x1ef2f0['diffData']){if(_0x1ef2f0['diffData'][_0x516468]['attachChange']&&!_0x1ef2f0['diffData'][_0x516468]['attachChange']['isAttached'])continue;const _0x3fe9d0=this['_removeRevisionMarkers'](JSON['parse'](_0x1ef2f0['diffData'][_0x516468]['insertions'])),_0x154c43=this['editor']['editing']['view']['document'],_0x50a4e4=new _0x164cef(_0x154c43,_0x3fe9d0['map'](_0x456637=>this['_getViewFromDiffObj'](_0x456637,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4e9980[_0x516468]=this['editor']['data']['processor']['toData'](_0x50a4e4),this['editor']['data']['processor']['useFillerType']('default');}return _0x4e9980;}['getRevisionRootsAttributes'](_0x35b480){const _0x29858a={};for(const _0x15566e in _0x35b480['diffData'])_0x35b480['diffData'][_0x15566e]['attachChange']&&!_0x35b480['diffData'][_0x15566e]['attachChange']['isAttached']||(_0x29858a[_0x15566e]=_0x35b480['diffData'][_0x15566e]['attributesAfter']||{});return _0x29858a;}['_getTypeCharForViewElement'](_0x49d350){return this['_viewClassToTypeChar']['get'](_0x49d350['constructor']);}['_getViewFromDiffObj'](_0x4fc9e7,_0x5614b3){const _0x4402d0=this['editor']['editing']['view']['document'];if('string'==typeof _0x4fc9e7)return new _0x4e7f12(_0x4402d0,_0x4fc9e7);{let _0x28e7d7,_0x10896e;_0x10896e='u'==_0x4fc9e7['type']||'r'==_0x4fc9e7['type']?[]:_0x4fc9e7['children']['map'](_0x470ab6=>this['_getViewFromDiffObj'](_0x470ab6,_0x5614b3));const _0x318e8e=this['_typeCharToViewClass']['get'](_0x4fc9e7['type'])||_0x451dcb,_0x2f0508=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x28e7d7=new _0x318e8e(_0x4402d0,_0x4fc9e7['name'],_0x4fc9e7['attributes'],_0x10896e),'u'==_0x4fc9e7['type']&&_0x4fc9e7['children'][0x0]){const _0x621f43=_0x4fc9e7['children'][0x0];if(_0x28e7d7['render']=function(_0x4814ad){const _0x579127=_0x4814ad['createElement']('div');return _0x579127['innerHTML']=_0x621f43,_0x579127['childNodes'][0x0];},_0x5614b3){const _0x3ac14b=new _0x164cef(_0x4402d0);_0x3ac14b['_appendChild'](_0x28e7d7);const _0x320d21=Array['from'](_0x2f0508['viewChildrenToDom'](_0x3ac14b,{'bind':!0x1})),_0x12bc04=_0x2f0508['domDocument']['createElement']('div');_0x12bc04['append'](..._0x320d21),_0x28e7d7=Array['from'](_0x2f0508['domChildrenToView'](_0x12bc04))[0x0];}}else{if('r'==_0x4fc9e7['type']&&_0x4fc9e7['children'][0x0]){const _0x3e4000=_0x4fc9e7['children'][0x0];if(_0x28e7d7['render']=function(_0x429c7c){_0x429c7c['innerHTML']=_0x3e4000;},_0x5614b3){const _0x2107df=new _0x164cef(_0x4402d0);_0x2107df['_appendChild'](_0x28e7d7);const _0x480c56=Array['from'](_0x2f0508['viewChildrenToDom'](_0x2107df,{'bind':!0x1})),_0x5b4e61=_0x2f0508['domDocument']['createElement']('div');_0x5b4e61['append'](..._0x480c56);const _0x2fb648=Array['from'](_0x2f0508['domChildrenToView'](_0x5b4e61));_0x2fb648['length']>0x1?_0x28e7d7['_appendChild'](_0x2fb648):_0x28e7d7=_0x2fb648[0x0];}}}if(_0x4fc9e7['customProperties']){for(const [_0x59ec91,_0x16c1d9]of _0x4fc9e7['customProperties'])_0x28e7d7['_setCustomProperty'](_0x59ec91,_0x16c1d9);}const _0x1f8c28=void 0x0===_0x4fc9e7['fillerOffset']?null:_0x4fc9e7['fillerOffset'];return null!==_0x1f8c28&&(_0x28e7d7['getFillerOffset']=()=>_0x1f8c28),_0x28e7d7;}}['_makeModelFromViewString'](_0xc43205){const _0x52d8b8=JSON['parse'](_0xc43205),_0x4cab25=this['editor']['editing']['view']['document'],_0x5694ca=new _0x164cef(_0x4cab25,_0x52d8b8['map'](_0x425ee4=>this['_getViewFromDiffObj'](_0x425ee4,!0x0)));return this['editor']['data']['toModel'](_0x5694ca);}['_removeRevisionMarkers'](_0x419569){return(_0x419569=_0x419569['filter'](_0x4899ba=>!_0x4899ba['name']||'revision-start'!==_0x4899ba['name']&&'revision-end'!==_0x4899ba['name']))['forEach'](_0x5d908d=>{'string'!=typeof _0x5d908d&&(_0x5d908d['children']=this['_removeRevisionMarkers'](_0x5d908d['children']),_0x5d908d['attributes']=_0x5d908d['attributes']['filter'](_0x5275e=>!_0x5275e[0x0]['startsWith']('data-revision-')));}),_0x419569;}}function m(_0x2ed78e,_0xd6e66e,_0x3f540b){const t=_0x2ed78e['t'];switch(_0xd6e66e){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'},_0x3f540b);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3f540b);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 _0xbe21c4{['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[_0x416e9c,S,$,_0x71dee9];}constructor(_0x2db966){super(_0x2db966),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x18a338=_0x532896();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x18a338},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 _0x4267c8=this['repository']['getRevision'](0x0),_0xe3cc48=_0x4267c8&&null===_0x4267c8['creator']?_0x4267c8:null;if(this['_continueCurrentRevision']=!!_0xe3cc48&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x30594b=this['_source']['getCurrentRevisionId'](),_0x46b8d0=this['repository']['getRevision'](_0x30594b);if(_0x46b8d0)this['_startingVersion']=_0x46b8d0['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x373bd1=this['_source']['history']['_operations']['find'](_0x29ce7a=>!_0x29ce7a['_isInit']),_0x520955=_0x373bd1?_0x373bd1['baseVersion']:this['_source']['history']['version'];_0x4267c8?(_0x4267c8['toVersion']<_0x520955&&_0x4267c8['_update']({'toVersion':_0x520955}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xe3cc48['id'],this['_startingVersion']=_0xe3cc48['fromVersion']):(this['_startingVersion']=_0x4267c8['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x520955,this['_continueCurrentRevision']=!0x1);}}else _0xe3cc48&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xe3cc48['toVersion'],this['editor']['model']['document']['history']['version']),_0xe3cc48['fromVersion']===_0xe3cc48['toVersion']?(0x0!==_0xe3cc48['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xe3cc48['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xe3cc48['id'],this['_startingVersion']=_0xe3cc48['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',_0x8f0c33=>!_0x8f0c33),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x23b94e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5377d9;for(const _0x2effed in _0x23b94e){const _0x40ed74=_0x2effed,_0x41a530=_0x23b94e[_0x40ed74];if('revisionHistoryLicenseKeyValid'==_0x41a530||'revisionHistoryLicenseKeyInvalid'==_0x41a530||'revisionHistoryLicenseKeyExpired'==_0x41a530||'revisionHistoryLicenseKeyDomainLimit'==_0x41a530||'revisionHistoryLicenseKeyNotAllowed'==_0x41a530||'revisionHistoryLicenseKeyEvaluationLimit'==_0x41a530||'revisionHistoryLicenseKeyUsageLimit'==_0x41a530){delete _0x23b94e[_0x40ed74],_0x5377d9=_0x41a530,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5377d9&&_0x23b94e['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5377d9&&_0x23b94e['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5377d9&&_0x23b94e['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5377d9&&_0x23b94e['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5377d9&&_0x23b94e['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5377d9&&_0x23b94e['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x3e7bfc=this['repository']['getRevision'](0x0),_0x40414a=await this['getRevisionDocumentData'](_0x3e7bfc),_0x5b293f=await this['getRevisionRootsAttributes'](_0x3e7bfc);this['_replaceEditorDataWithRevisionData'](_0x40414a,_0x5b293f);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2a9a04){this['_source']=_0x2a9a04;}async['update'](){const _0x5e39b6=await this['_source']['getLatestVersion']();if(_0x5e39b6>this['currentRevision']['toVersion']){await this['_loadState']();const _0x38fe5f=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5e39b6});_0x38fe5f['authors']=_0x38fe5f['authorsIds']['map'](_0x416864=>this['editor']['plugins']['get']('Users')['getUser'](_0x416864)),this['currentRevision']['_update'](_0x38fe5f);}}async['saveRevision'](_0x5dae2d={},_0x3847fe=null){const _0x3d3bbe=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3847fe>this['currentRevision']['toVersion']&&(_0x3847fe=null),null===_0x3847fe&&(_0x3847fe=await this['_source']['getLatestVersion']());const _0x42894b=this['_getFromVersion'](_0x3847fe),_0x553eb8=this['buildRevisionData']({'from':_0x42894b,'to':_0x3847fe});if(this['currentRevision']['toVersion']<_0x3847fe){const _0x101f12=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3847fe,'to':_0x3847fe});_0x101f12['authors']=[],_0x101f12['authorsIds']=[],_0x101f12['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x101f12,!0x0),delete _0x101f12['authors'],_0x3d3bbe['push'](_0x101f12);}_0x5dae2d['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x5dae2d['name']=_0x5dae2d['name']||null,_0x5dae2d['id']=_0x5dae2d['id']||_0x532896(),_0x5dae2d={..._0x5dae2d,..._0x553eb8};const _0x1d5cfa=this['addRevisionData'](_0x5dae2d);_0x3d3bbe['push'](_0x5dae2d);const _0x5771b4=this['repository']['getIndex'](_0x1d5cfa);if(0x0!==_0x5771b4){const _0x8b211f=this['repository']['getRevision'](_0x5771b4-0x1);if(_0x8b211f['fromVersion']!==_0x3847fe){const _0x4c8470=this['_revisionDataBuilder']['getData'](_0x3847fe,_0x8b211f['toVersion']),_0x53ea99={'id':_0x8b211f['id'],'diffData':_0x4c8470['diffData'],'authorsIds':_0x4c8470['authorsIds'],'authors':_0x4c8470['authorsIds']['map'](_0x5d7641=>this['editor']['plugins']['get']('Users')['getUser'](_0x5d7641)),'fromVersion':_0x3847fe};_0x8b211f===this['currentRevision']&&(_0x53ea99['createdAt']=new Date(_0x5dae2d['createdAt']['getTime']()+0xa)),_0x8b211f['_update'](_0x53ea99,!0x0),delete _0x53ea99['authors'],_0x3d3bbe['push'](_0x53ea99);}}if(this['adapter']){for(const _0x551639 of _0x3d3bbe)this['_bufferUpdate'](_0x551639['id'],_0x551639,!0x0);this['sendBufferedUpdates']();}return _0x1d5cfa;}['addRevisionData'](_0x2e80a6){const _0x202d48=this['repository']['createRevision'](_0x2e80a6);return this['adapter']&&_0x202d48['on']('_update',(_0x3688bc,_0xdbd41c,_0x1d7fec)=>{_0x1d7fec||(this['_bufferUpdate'](_0xdbd41c['id'],_0xdbd41c,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x202d48,this['_findInsertionIndex'](_0x202d48)),_0x202d48;}async['getRevisionDocumentData'](_0x350a1d){return await this['_utils']['loadRevisionData'](_0x350a1d,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x350a1d);}async['getRevisionRootsAttributes'](_0x23bd45){return await this['_utils']['loadRevisionData'](_0x23bd45,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x23bd45);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2702ff=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x540516=0x0;_0x540516<_0x2702ff['length'];_0x540516++){const _0x130b93=_0x2702ff[_0x540516];let _0x52b01c=!0x1;for(const _0x1c33f7 of Object['keys'](_0x130b93))void 0x0===_0x130b93[_0x1c33f7]?delete _0x130b93[_0x1c33f7]:'id'!==_0x1c33f7&&(_0x52b01c=!0x0);_0x52b01c||(_0x2702ff[_0x540516]=null);}if(_0x2702ff=_0x2702ff['filter'](_0x2bfcb7=>null!==_0x2bfcb7),!_0x2702ff['length'])return;for(let _0x4592b2=0x0;_0x4592b2<_0x2702ff['length'];_0x4592b2++){const _0x1748c1=_0x2702ff[_0x4592b2];void 0x0!==_0x1748c1['fromVersion']&&void 0x0===_0x1748c1['toVersion']&&(_0x1748c1['toVersion']=this['repository']['getRevision'](_0x1748c1['id'])['toVersion']),void 0x0!==_0x1748c1['toVersion']&&void 0x0===_0x1748c1['fromVersion']&&(_0x1748c1['fromVersion']=this['repository']['getRevision'](_0x1748c1['id'])['fromVersion']);}const _0x36b8af=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2702ff,_0x36b8af)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x5d372d=>{if(_0x5d372d){for(const _0x15497f of _0x5d372d)this['setRevisionData']({'id':_0x15497f['id'],'createdAt':_0x15497f['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x1cdf43=null,from:_0x21385a=null,to:_0x438429=null}){_0x21385a=null!==_0x21385a?_0x21385a:_0x1cdf43['fromVersion'],_0x438429=null!==_0x438429?_0x438429:_0x1cdf43['toVersion'];const _0x2d843c=this['_revisionDataBuilder']['getData'](_0x21385a,_0x438429),_0x28cc6e={'diffData':_0x2d843c['diffData'],'authorsIds':_0x2d843c['authorsIds'],'fromVersion':_0x21385a,'toVersion':_0x438429};if(!_0x1cdf43||_0x438429!==_0x1cdf43['toVersion']){const _0x58ce99=_0x438429-0x1,_0x5e13d7=this['_source']['history']['getOperation'](_0x58ce99);_0x28cc6e['createdAt']=_0x5e13d7&&_0x5e13d7['createdAt']||new Date();}if(this['_loadedStateData']&&_0x21385a===this['_loadedStateData']['fromVersion']){for(const _0x2c6c46 of this['_loadedStateData']['authors'])_0x28cc6e['authorsIds']['includes'](_0x2c6c46['id'])||_0x28cc6e['authorsIds']['push'](_0x2c6c46['id']);}return _0x28cc6e;}['_bufferUpdate'](_0x53f216,_0x1b6827,_0x2b95c6){if(this['_bufferedUpdates']['has'](_0x53f216)){const _0x541a2a=this['_bufferedUpdates']['get'](_0x53f216);_0x1b6827=_0x2b95c6?{..._0x541a2a,..._0x1b6827}:{..._0x1b6827,..._0x541a2a};}this['_bufferedUpdates']['set'](_0x53f216,_0x1b6827);}['setRevisionData'](_0x724595){const _0x503256=this['repository']['getRevision'](_0x724595['id']);if(_0x724595['createdAt']&&(_0x724595['createdAt']=new Date(_0x724595['createdAt'])),_0x724595['authorsIds']){const _0x382d9c=this['editor']['plugins']['get']('Users');_0x724595['authors']=_0x724595['authorsIds']['map'](_0x11cea2=>_0x382d9c['getUser'](_0x11cea2));}_0x503256['_update'](_0x724595,!0x0);}['_createInitialRevision'](_0x5bc260){const _0x4aab5f=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4aab5f)this['_initialRevisionId']=_0x4aab5f['id'];else{const _0x120adb=!this['editor']['model']['document']['roots']['find'](_0x1aa0e3=>this['editor']['model']['hasContent'](_0x1aa0e3)),_0x5af50c=this['editor']['plugins']['get']('Users')['me']['id'],_0x534fd6=m(this['editor']['locale'],_0x120adb?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5bc260,'to':_0x5bc260,'id':this['_initialRevisionId'],'name':_0x534fd6,'creatorId':_0x5af50c});}}['_createCurrentRevision'](_0x4b6530){const _0x3eef85=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x3eef85),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4b6530,'to':_0x4b6530,'id':_0x3eef85,'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'](_0x51c113,_0x291039){let _0x56fdf0=this['editor']['config']['get']('initialData'),_0x57f866=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x56fdf0){_0x56fdf0={};for(const _0x256f15 of this['editor']['model']['document']['getRootNames']())_0x56fdf0[_0x256f15]='';}if('string'==typeof _0x56fdf0&&(_0x56fdf0={'main':_0x56fdf0}),void 0x0===_0x57f866){_0x57f866={};for(const _0x19e0f6 of this['editor']['model']['document']['getRootNames']())_0x57f866[_0x19e0f6]={};}let _0x52e77a=!0x1;const _0x24a0cb=Object['keys'](_0x56fdf0),_0x5182f0=Object['keys'](_0x51c113);for(const _0x3d426e of _0x24a0cb){if(_0x56fdf0[_0x3d426e]!==_0x51c113[_0x3d426e]&&''!==_0x56fdf0[_0x3d426e]['trim']()){_0x52e77a=!0x0;break;}if(!_0x3c0bf9(_0x57f866[_0x3d426e],_0x291039[_0x3d426e])&&Object['keys'](_0x57f866[_0x3d426e])['length']>0x0){_0x52e77a=!0x0;break;}}_0x52e77a||(_0x52e77a=_0x5182f0['some'](_0x2342a2=>!this['editor']['model']['document']['getRoot'](_0x2342a2))),_0x52e77a&&_0x47c187('editor-initial-data-replaced-with-revision-data',{'editorData':_0x56fdf0,'editorRootsAttributes':_0x57f866,'revisionData':_0x51c113,'revisionRootsAttributes':_0x291039}),this['editor']['config']['set']('initialData',_0x51c113),this['editor']['config']['set']('rootsAttributes',_0x291039);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x58ed7e=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x58ed7e['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4ff9a7){const _0x56411c=this['repository']['getRevisions']();_0x56411c['reverse']();let _0x43b13e=0x0;for(;_0x43b13e<_0x56411c['length'];){const _0x574fb9=_0x56411c[_0x43b13e];if(_0x574fb9===this['currentRevision']){_0x43b13e++;continue;}if(_0x574fb9['id']===this['_initialRevisionId'])break;const _0x1644d4=_0x4ff9a7['toVersion']-_0x574fb9['toVersion']||_0x4ff9a7['fromVersion']-_0x574fb9['fromVersion'];if(_0x1644d4>0x0)break;if(_0x1644d4<0x0)_0x43b13e++;else{if(!_0x4ff9a7['creator']&&_0x574fb9['creator'])break;if(_0x574fb9['creator']||!_0x4ff9a7['creator']){if(_0x4ff9a7['createdAt']>_0x574fb9['createdAt'])break;_0x43b13e++;}else _0x43b13e++;}}return _0x43b13e;}['_getFromVersion'](_0x1318ac){const _0x3192c2=this['repository']['getRevisions']();_0x3192c2['reverse'](),_0x3192c2['shift']();const _0x3fffeb=_0x3192c2['find'](_0x389d38=>_0x389d38['toVersion']<=_0x1318ac)['toVersion'];return _0x3fffeb<this['_startingVersion']?this['_startingVersion']:_0x3fffeb;}['_makeRevision']({name:_0x54b5b4,from:_0x32ca53,to:_0x2c619e,creatorId:_0x5b6155,id:_0x791788}){const _0x1b9ce6=this['buildRevisionData']({'from':_0x32ca53,'to':_0x2c619e});_0x1b9ce6['name']=_0x54b5b4,_0x1b9ce6['creatorId']=_0x5b6155,_0x1b9ce6['id']=_0x791788;const _0x5ecb93=this['addRevisionData'](_0x1b9ce6);return this['adapter']&&this['_bufferUpdate'](_0x1b9ce6['id'],_0x1b9ce6,!0x0),_0x5ecb93;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x455bf9){this['editor']=_0x455bf9,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'](_0x23359e){this['source']=_0x23359e;const _0x369ab4=new Map(),_0x5197f2=new Map(),_0x13c9bc=this['editor']['model']['document']['roots']['map'](_0x2dc1d7=>_0x2dc1d7['rootName']);for(const _0x15be98 of _0x13c9bc){const _0x48cca6=this['editor']['model']['document']['getRoot'](_0x15be98),_0x1ee668=K(_0x48cca6);_0x369ab4['set'](_0x15be98,_0x1ee668),_0x5197f2['set'](_0x15be98,Object['fromEntries'](_0x48cca6['getAttributes']()));}const _0x4b1a57=Array['from'](this['editor']['model']['markers'])['map'](_0x5b9ac3=>[_0x5b9ac3['name'],_0x5b9ac3['getRange']()]),_0x2eed4b=this['source']['version'];this['_saveMetaData'](_0x2eed4b,_0x369ab4,_0x4b1a57,_0x5197f2),this['_startingRevisionId']=this['_revisionId'];const _0x14fff3=new Map(),_0x293d4e=new Map();for(const _0x145b88 of _0x13c9bc){const _0x304249=N(_0x145b88);_0x14fff3['set'](_0x145b88,_0x304249),_0x293d4e['set'](_0x145b88,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x14fff3,[],_0x293d4e);}['getData'](_0x2442fd,_0x1678c6){if(this['_lastFrom']===_0x2442fd&&this['_lastTo']<=_0x1678c6)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1678c6,!0x0);else{if(!this['_savedMetaData']['has'](_0x2442fd)){const _0x2734ff=this['_getPreviousFrom'](_0x2442fd);this['_calculateMetaData'](_0x2734ff,_0x2442fd,!0x1);}this['_calculateMetaData'](_0x2442fd,_0x1678c6,!0x0);}return this['_lastFrom']=_0x2442fd,this['_lastTo']=_0x1678c6,this['_getState']();}['loadState'](_0x3ef080){if(!this['_savedMetaData']['has'](_0x3ef080['fromVersion'])){const _0x265897=this['_getPreviousFrom'](_0x3ef080['fromVersion']);this['_calculateMetaData'](_0x265897,_0x3ef080['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3ef080['fromVersion'],_0x3ef080['toVersion'],!0x1);const _0x225578=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3ef080['fromVersion'],this['_lastTo']=_0x3ef080['toVersion'];for(const _0x3527dd in _0x3ef080['diffData']){const _0x583e71=_0x3ef080['diffData'][_0x3527dd]['attachChange'],_0x6d5933=_0x83ca90(_0x3ef080['diffData'][_0x3527dd]['attributesBefore'])||{},_0x515379=_0x225578['_makeModelFromViewString'](_0x3ef080['diffData'][_0x3527dd]['deletions']);_0x515379['rootName']=_0x3527dd,_0x515379['_isAttached']=!_0x583e71||!_0x583e71['isAttached'],_0x515379['isAttached']=()=>_0x515379['_isAttached'],this['_baseRoots']['set'](_0x3527dd,_0x515379),this['_baseRootsAttributes']['set'](_0x3527dd,_0x6d5933),_0x583e71&&this['_touchedRoots']['set'](_0x3527dd,_0x583e71);const _0x58e1eb=this['_makeIdsRoot'](_0x515379);this['_baseIdsRoots']['set'](_0x3527dd,_0x58e1eb);for(const [_0x26707d,_0x170f6b]of _0x515379['markers']){if(!_0x26707d['startsWith']('revision:'))continue;const _0xe352e2=_0x26707d['split'](':')[0x2];for(const _0x5c6971 of _0x170f6b['getWalker']({'singleCharacters':!0x0})){const _0x34822a=this['_getVidAttributeName'](_0x5c6971),_0x34add7='elementEnd'==_0x5c6971['type']?_0x5c6971['previousPosition']['path']['slice'](0x0,-0x1):_0x5c6971['previousPosition']['path'],_0xa40361=_0x58e1eb['getNodeByPath'](_0x34add7)['getAttribute'](_0x34822a);this['_touched']['set'](_0xa40361,{'userId':_0xe352e2});}_0x515379['markers']['delete'](_0x26707d);}}this['_startingRevisionId']=this['_revisionId'];const _0x5e3883=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x23e068=>!this['_touched']['has'](_0x23e068));let _0xfa8a6b=0x0;const _0x5b12bb=new Map();for(const _0x4e1b1a in _0x3ef080['diffData']){const _0x537891=_0x3ef080['diffData'][_0x4e1b1a]['attachChange'],_0x384aa5=_0x83ca90(_0x3ef080['diffData'][_0x4e1b1a]['attributesAfter'])||{},_0x563285=_0x225578['_makeModelFromViewString'](_0x3ef080['diffData'][_0x4e1b1a]['insertions']);_0x563285['rootName']=_0x4e1b1a,_0x563285['_isAttached']=!_0x537891||_0x537891['isAttached'],_0x563285['isAttached']=()=>_0x563285['_isAttached'],this['_diffRoots']['set'](_0x4e1b1a,_0x563285),this['_diffRootsAttributes']['set'](_0x4e1b1a,_0x384aa5);const _0x2e93dd=this['_makeIdsRoot'](_0x563285,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4e1b1a,_0x2e93dd),_0x5b12bb['set'](_0x4e1b1a,_0x563285['isAttached']()?_0x384aa5:{});for(const [_0x3d32df,_0x38c07d]of _0x563285['markers']){if(!_0x3d32df['startsWith']('revision:'))continue;const _0x3dd72f=_0x3d32df['split'](':')[0x2];for(const _0x2f1880 of _0x38c07d['getWalker']({'singleCharacters':!0x0})){const _0x3d131d=this['_getVidAttributeName'](_0x2f1880),_0x476b53=this['_revisionId']++,_0x188fc2='elementEnd'==_0x2f1880['type']?_0x2f1880['previousPosition']['path']['slice'](0x0,-0x1):_0x2f1880['previousPosition']['path'];_0x2e93dd['getNodeByPath'](_0x188fc2)['_setAttribute'](_0x3d131d,_0x476b53),this['_touched']['set'](_0x476b53,{'userId':_0x3dd72f});}_0x563285['markers']['delete'](_0x3d32df);}for(const _0x1d6593 of this['editor']['model']['createRangeIn'](_0x563285)['getWalker']({'singleCharacters':!0x0})){const _0x534ee3=this['_getVidAttributeName'](_0x1d6593),_0x1b4013='elementEnd'==_0x1d6593['type']?_0x1d6593['previousPosition']['path']['slice'](0x0,-0x1):_0x1d6593['previousPosition']['path'],_0x136197=_0x2e93dd['getNodeByPath'](_0x1b4013);_0x136197['getAttribute'](_0x534ee3)>0x0||_0x136197['_setAttribute'](_0x534ee3,_0x5e3883[_0xfa8a6b++]);}for(const [_0x1e9498,_0x182c4f]of _0x563285['markers'])_0x1e9498['startsWith']('revision:')||this['_markers']['set'](_0x1e9498,_0x182c4f);}const {roots:_0x5e87bd}=this['_savedMetaData']['get'](_0x3ef080['fromVersion']),{roots:_0x4ff668}=this['_savedMetaData']['get'](_0x3ef080['toVersion']),_0x4f3ef2=K(_0x5e87bd['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x4f3ef2),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4f3ef2,Number['NEGATIVE_INFINITY']));const _0x550458=K(_0x4ff668['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x550458),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x550458));const _0x3e171a=Array['from'](this['_diffRoots'])['map'](([_0x4c1a62,_0x1017de])=>[_0x4c1a62,K(_0x1017de)]);this['_saveMetaData'](this['_lastTo'],_0x3e171a,this['_markers'],_0x5b12bb);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x51437d,_0x225239,_0x3eeff0,_0x59422d){const _0x4621a9=new Map(_0x225239),_0x51a746=new Map(_0x83ca90(_0x59422d)),_0xb7266f=new Map();for(const [_0x13f2a4,_0x1da3da]of _0x3eeff0)_0xb7266f['set'](_0x13f2a4,{'start':_0x1da3da['start']['clone'](),'end':_0x1da3da['end']['clone'](),'rootName':_0x1da3da['root']['rootName']});this['_savedMetaData']['set'](_0x51437d,{'roots':_0x4621a9,'markers':_0xb7266f,'rootsAttributes':_0x51a746});}['_removeMetaData'](_0x254c16){this['_savedMetaData']['delete'](_0x254c16);}['_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'](_0x2869b5,_0xe4cc53=null){let _0x1bf7a3=null;_0x2869b5['is']('documentFragment')||(_0x1bf7a3=new _0x36b445(_0x2869b5['name'],{'vid_start':null===_0xe4cc53?this['_revisionId']++:_0xe4cc53++}));const _0x25e7c7=[];for(const _0x1ab04b of _0x2869b5['getChildren']())if(_0x1ab04b['is']('element')){_0x25e7c7['push'](this['_makeIdsRoot'](_0x1ab04b,_0xe4cc53));const _0x280ffb=_0x25e7c7[_0x25e7c7['length']-0x1];null!==_0xe4cc53&&(_0xe4cc53=_0x280ffb['is']('element','$text')?_0x280ffb['getAttribute']('vid')+0x1:_0x280ffb['getAttribute']('vid_end')+0x1);}else{for(let _0x54a2eb=0x0;_0x54a2eb<_0x1ab04b['offsetSize'];_0x54a2eb++)_0x25e7c7['push'](new _0x36b445('$text',{'vid':null===_0xe4cc53?this['_revisionId']++:_0xe4cc53++}));}if(_0x2869b5['is']('documentFragment')){const _0x59bf46=N(_0x2869b5['rootName']);return _0x59bf46['_insertChild'](0x0,_0x25e7c7),_0x59bf46;}return _0x1bf7a3['_setAttribute']('vid_end',null===_0xe4cc53?this['_revisionId']++:_0xe4cc53++),_0x1bf7a3['_insertChild'](0x0,_0x25e7c7),_0x1bf7a3;}['_calculateMetaData'](_0x2233f2,_0x5b0fdc,_0x18c2a3){this['_reset']();const {roots:_0x151a9e,markers:_0x231aa2,rootsAttributes:_0x2f5d8b}=this['_savedMetaData']['get'](_0x2233f2);this['_baseRoots']=new Map(_0x151a9e),this['_baseRootsAttributes']=new Map(_0x83ca90(_0x2f5d8b));for(const [_0x27ea13,_0x5dc5d2]of this['_baseRoots'])if('$graveyard'!==_0x27ea13&&(this['_diffRoots']['set'](_0x27ea13,K(_0x5dc5d2)),this['_diffRootsAttributes']=new Map(_0x83ca90(_0x2f5d8b)),_0x18c2a3)){const _0x55a298=this['_revisionId'];this['_idsRoots']['set'](_0x27ea13,this['_makeIdsRoot'](_0x5dc5d2)),this['_baseIdsRoots']['set'](_0x27ea13,this['_makeIdsRoot'](_0x5dc5d2,_0x55a298));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',K(this['_baseRoots']['get']('$graveyard'))),_0x18c2a3&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4f8b0e,_0x1fe864]of _0x231aa2){const _0x369834=this['_baseRoots']['get'](_0x1fe864['rootName']),_0xcb6465=this['_diffRoots']['get'](_0x1fe864['rootName']),_0x54fa77=new _0xb3cd0f(this['_fixPosition'](_0x1fe864['start'],_0x369834),this['_fixPosition'](_0x1fe864['end'],_0x369834)),_0x1e1c95=this['_fixRange'](_0x54fa77,_0xcb6465);_0x369834['markers']['set'](_0x4f8b0e,_0x54fa77),this['_markers']['set'](_0x4f8b0e,_0x1e1c95);}this['_applyOperations'](_0x2233f2,_0x5b0fdc,_0x18c2a3);}['_applyOperations'](_0x254d82,_0x16d251,_0x244468){for(const _0x44d1ba of this['source']['getOperations'](_0x254d82,_0x16d251))this['_handleOperation'](_0x44d1ba,_0x244468);for(const _0x322f96 of this['_diffRoots']['values']())_0x322f96['markers']['clear']();for(const [_0x275bfe,_0x2b5b5d]of this['_markers']){this['_diffRoots']['get'](_0x2b5b5d['root']['rootName'])['markers']['set'](_0x275bfe,_0x2b5b5d['clone']());}const _0x143413=new Map(),_0x36e317=new Map();for(const [_0x177330,_0x1df78e]of this['_diffRoots'])_0x143413['set'](_0x177330,K(_0x1df78e)),_0x36e317['set'](_0x177330,this['_diffRootsAttributes']['get'](_0x177330));this['_saveMetaData'](_0x16d251,_0x143413,this['_markers'],_0x36e317);}['_getPreviousFrom'](_0xf89bb3){const _0x1cc276=Array['from'](this['_savedMetaData']['keys']());_0x1cc276['sort']((_0x7cf7,_0x569cf2)=>_0x7cf7-_0x569cf2),_0x1cc276['reverse']();for(const _0x5027d5 of _0x1cc276)if(_0x5027d5<_0xf89bb3)return _0x5027d5;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x450716,_0x28bb56){const _0x2e89a8=Array['from'](_0x28bb56['markers'])['map'](([_0x233fe8,_0x2a6d36])=>[_0x233fe8,this['_fixRange'](_0x2a6d36,_0x450716)]);_0x450716['markers']=new Map(_0x2e89a8);}['_transformMarkers'](_0x3d69b6){for(const _0xde39d8 of this['_markers']['values']()){const _0x146838=_0xde39d8['getTransformedByOperation'](_0x3d69b6),_0x2d0eb2=_0xb3cd0f['_createFromRanges'](_0x146838);_0xde39d8['start']=_0x2d0eb2['start'],_0xde39d8['end']=_0x2d0eb2['end'];}}['_handleOperation'](_0x11269e,_0x21d0bb){if('addRoot'!=_0x11269e['type']&&'detachRoot'!=_0x11269e['type']){if('insert'==_0x11269e['type']){const _0x2e2502=_0x11269e['position']['root']['rootName'];this['_diffRoots']['has'](_0x2e2502)||(this['_diffRoots']['set'](_0x2e2502,N(_0x2e2502,!0x0)),this['_diffRootsAttributes']['set'](_0x2e2502,{}),_0x21d0bb&&this['_idsRoots']['set'](_0x2e2502,N(_0x2e2502,!0x0)));}else{if('addRootAttribute'==_0x11269e['type']||'removeRootAttribute'==_0x11269e['type']||'changeRootAttribute'==_0x11269e['type'])return void this['_handleRootAttributeOperation'](_0x11269e);'marker'==_0x11269e['type']&&this['_handleMarkerOperation'](_0x11269e);}if('marker'!==_0x11269e['type']){const _0x2269fe=this['_cloneOperation'](_0x11269e,this['_diffRoots']);_0x2269fe['_execute'](),this['_transformMarkers'](_0x2269fe);}if(_0x21d0bb)switch(_0x11269e['type']){case'insert':this['_handleInsertOperation'](_0x11269e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x11269e);break;case'merge':this['_handleMergeOperation'](_0x11269e);break;case'split':this['_handleSplitOperation'](_0x11269e);}}else this['_handleRootOperation'](_0x11269e,_0x21d0bb);}['_cloneOperation'](_0x1d91bf,_0x217bbf){const _0x5b4b5e=_0x1d91bf['clone']();return _0x5b4b5e['_authorId']=_0x1d91bf['_authorId'],this['_fixOperation'](_0x5b4b5e,_0x217bbf),_0x5b4b5e;}['_getBaseVids'](_0x4d49ad){return _0x4d49ad['map'](_0x1339d1=>{const _0x379be9=this['_getVidAttributeName'](_0x1339d1);return Number(_0x1339d1['item']['getAttribute'](_0x379be9));});}['_generateTape'](_0x13485,_0x2156c2){if(_0x13485['is']('element','$text'))_0x2156c2['push']({'item':_0x13485,'type':'text'});else{_0x13485['is']('element')&&_0x2156c2['push']({'item':_0x13485,'type':'elementStart'});for(const _0x1830d7 of _0x13485['getChildren']())this['_generateTape'](_0x1830d7,_0x2156c2);_0x13485['is']('element')&&_0x2156c2['push']({'item':_0x13485,'type':'elementEnd'});}return _0x2156c2;}['_getState'](){const _0x48c365=new Map(this['_touched']),_0x43767a=new Map(_0x48c365),_0x29cb9a=new Map(),_0x36c9bb={'insertions':{},'deletions':{}},_0x37d1d4={'insertions':{},'deletions':{}},_0x38424f=new Map(),_0x33bab5=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x33bab5['delete']('$graveyard');for(const _0x23630e of _0x33bab5){const _0x45bb33=this['_diffRoots']['get'](_0x23630e)||N(_0x23630e,!0x1),_0x42de8a=this['_baseRoots']['get'](_0x23630e)||N(_0x23630e,!0x1);_0x45bb33['isAttached']()||_0x42de8a['isAttached']()?(_0x36c9bb['insertions'][_0x23630e]=K(_0x45bb33),_0x36c9bb['deletions'][_0x23630e]=K(_0x42de8a),this['_copyMarkers'](_0x36c9bb['deletions'][_0x23630e],_0x42de8a),this['_copyMarkers'](_0x36c9bb['insertions'][_0x23630e],_0x45bb33),_0x37d1d4['insertions'][_0x23630e]=this['_generateTape'](this['_idsRoots']['get'](_0x23630e),[]),_0x37d1d4['deletions'][_0x23630e]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x23630e)||N(_0x23630e,!0x1),[])):_0x33bab5['delete'](_0x23630e);}for(const _0x349884 of _0x33bab5){const _0x53cc23=_0x37d1d4['insertions'][_0x349884];for(const _0x3fa61d of _0x53cc23){const _0x1b103b=this['_getVidAttributeName'](_0x3fa61d),_0xbcb78a=_0x3fa61d['item']['getAttribute'](_0x1b103b);_0x43767a['delete'](_0xbcb78a),_0xbcb78a>=this['_startingRevisionId']&&_0x29cb9a['set'](_0xbcb78a,_0x48c365['get'](_0xbcb78a));}}for(const _0x1757b3 of _0x33bab5){const _0x32db57=_0x37d1d4['insertions'][_0x1757b3],_0x507775=this['_getBaseVids'](_0x37d1d4['deletions'][_0x1757b3]);let _0x4893b0=0x0;for(const _0x2bbd4c of _0x32db57){const _0x3d1886=this['_getVidAttributeName'](_0x2bbd4c),_0xa8a885=_0x2bbd4c['item']['getAttribute'](_0x3d1886);if(!_0x29cb9a['has'](_0xa8a885)&&!_0x38424f['has'](_0xa8a885)){if(_0x43767a['has'](_0xa8a885))_0x4893b0++;else{if(_0xa8a885!=_0x507775[_0x4893b0]){const _0x5b9d03=_0x48c365['get'](_0xa8a885)||_0x48c365['get'](_0x507775[_0x4893b0]);for(;_0xa8a885!=_0x507775[_0x4893b0];)_0x43767a['has'](_0x507775[_0x4893b0])||(_0x38424f['set'](_0x507775[_0x4893b0],_0x5b9d03),_0x48c365['set'](_0x507775[_0x4893b0],_0x5b9d03)),_0x4893b0++;}_0x4893b0++;}}}}for(const _0x37bd66 of _0x33bab5){const _0x26da32=_0x37d1d4['insertions'][_0x37bd66];for(const _0x2b5502 of _0x26da32){const _0xc5c5ef=this['_getVidAttributeName'](_0x2b5502),_0x449b9c=_0x2b5502['item']['getAttribute'](_0xc5c5ef);if(_0x38424f['has'](_0x449b9c)){const _0x320267=_0x38424f['get'](_0x449b9c);_0x43767a['has'](_0x449b9c)||_0x43767a['set'](_0x449b9c,{..._0x320267}),_0x29cb9a['set'](_0x449b9c,{..._0x320267});}}}for(const _0x45f9f6 of _0x43767a['keys']())_0x45f9f6>=this['_startingRevisionId']&&_0x43767a['delete'](_0x45f9f6);const _0x146735=new Map();for(const _0x114d40 of _0x33bab5){let _0x42b8c1=_0x37d1d4['insertions'][_0x114d40];for(const _0xf561b0 of _0x42b8c1)if(_0xf561b0['item']['is']('element','tableCell')){const _0x30a3b0=this['_getVidAttributeName'](_0xf561b0),_0xf11172=_0xf561b0['item']['getAttribute'](_0x30a3b0);if(_0x29cb9a['has'](_0xf11172)){const _0xb2905d=_0xf561b0['item']['parent']['parent']['getAttribute']('vid_start'),_0x203314=_0x146735['get'](_0xb2905d)||new Set();_0x203314['add'](_0x29cb9a['get'](_0xf11172)['userId']),_0x146735['set'](_0xb2905d,_0x203314);}}_0x42b8c1=_0x37d1d4['deletions'][_0x114d40];for(const _0x1dc351 of _0x42b8c1)if(_0x1dc351['item']['is']('element','tableCell')){const _0x239fb7=this['_getVidAttributeName'](_0x1dc351),_0x5410e3=_0x1dc351['item']['getAttribute'](_0x239fb7);if(_0x43767a['has'](_0x5410e3)){const _0x58d5a3=_0x1dc351['item']['parent']['parent']['getAttribute']('vid_start'),_0x333f25=_0x146735['get'](_0x58d5a3)||new Set();_0x333f25['add'](_0x43767a['get'](_0x5410e3)['userId']),_0x146735['set'](_0x58d5a3,_0x333f25);}}for(const _0x24b095 of _0x146735['keys']())(_0x29cb9a['has'](_0x24b095)||_0x43767a['has'](_0x24b095))&&_0x146735['delete'](_0x24b095);}for(const _0xd3c3f6 of _0x33bab5){const _0x3a141c=_0x37d1d4['insertions'][_0xd3c3f6];let _0x2e16c3=null,_0x27723c=null;for(const _0x4327ed of _0x3a141c){const _0x26e106=this['_getVidAttributeName'](_0x4327ed),_0x1824d2=_0x4327ed['item']['getAttribute'](_0x26e106),_0x3e44b8=_0x146735['get'](_0x1824d2);_0x3e44b8&&'elementStart'==_0x4327ed['type']&&(_0x2e16c3=Array['from'](_0x3e44b8)[0x0],_0x27723c=_0x4327ed['item']['getAttribute']('vid_end')),_0x2e16c3&&(_0x43767a['set'](_0x1824d2,{'userId':_0x2e16c3}),_0x29cb9a['set'](_0x1824d2,{'userId':_0x2e16c3})),_0x1824d2==_0x27723c&&(_0x2e16c3=null,_0x27723c=null);}}const _0x567751={},_0x321465=new Set();for(const _0x1dabdb of _0x33bab5){const _0x423266=_0x36c9bb['deletions'][_0x1dabdb],_0x28bea9=_0x36c9bb['insertions'][_0x1dabdb];for(const {userId:_0x1ba1a1}of this['_touchedMarkers']['values']())null!==_0x1ba1a1&&_0x321465['add'](_0x1ba1a1);for(const {userId:_0x215bec}of this['_touchedRoots']['values']())null!==_0x215bec&&_0x321465['add'](_0x215bec);this['_markChanges'](_0x28bea9,_0x37d1d4['insertions'][_0x1dabdb],_0x29cb9a,'insertion',_0x321465),this['_markChanges'](_0x423266,_0x37d1d4['deletions'][_0x1dabdb],_0x43767a,'deletion',_0x321465),_0x567751[_0x1dabdb]={'insertions':this['_prepareViewToSave'](_0x28bea9),'deletions':this['_prepareViewToSave'](_0x423266),'attachChange':this['_touchedRoots']['get'](_0x1dabdb)||null,'attributesBefore':_0x83ca90(this['_baseRootsAttributes']['get'](_0x1dabdb))||{},'attributesAfter':_0x83ca90(this['_diffRootsAttributes']['get'](_0x1dabdb))};}return{'diffData':_0x567751,'authorsIds':Array['from'](_0x321465)};}['_processRootBeforeSave'](_0x14530f){for(const [,_0x431705]of _0x14530f['markers']){const _0x577e83=_0x431705['start']['getAncestors']()['filter'](_0x49f7b1=>'tableCell'==_0x49f7b1['name']);for(const _0x450a98 of _0x577e83)0x1==_0x450a98['childCount']&&_0x450a98['getChild'](0x0)['is']('element','paragraph')&&_0x450a98['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x11c429){this['_processRootBeforeSave'](_0x11c429);const _0x59d0b2=this['editor']['data']['toView'](_0x11c429,{}),_0x226ed6=Array['from'](_0x59d0b2['getChildren']())['map'](_0x5cbef2=>this['_getViewJson'](_0x5cbef2));return JSON['stringify'](_0x226ed6);}['_getViewJson'](_0x519ebc){if(_0x519ebc['is']('$text'))return _0x519ebc['data'];{const _0x544f62=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x34b89b=_0x519ebc,_0x1d6b90=this['editor']['data']['htmlProcessor']['domConverter'],_0x4eb9ca={'type':_0x544f62['_getTypeCharForViewElement'](_0x34b89b),'name':_0x34b89b['name'],'attributes':Array['from'](_0x34b89b['getAttributes']()),'children':Array['from'](_0x34b89b['getChildren']())['map'](_0x30b9c9=>this['_getViewJson'](_0x30b9c9))};if(_0x519ebc['is']('uiElement')&&'$comment'!=_0x519ebc['name']){const _0x1f6b23=_0x519ebc['render'](_0x1d6b90['domDocument'],_0x1d6b90);_0x4eb9ca['children']['push'](_0x1f6b23['outerHTML']);}else{if(_0x519ebc['is']('rawElement')){const _0x31314a=_0x1d6b90['domDocument']['createElement'](_0x34b89b['name']);_0x519ebc['render'](_0x31314a,_0x1d6b90),_0x4eb9ca['children']['push'](_0x31314a['innerHTML']);}}const _0x4350b3=Array['from'](_0x34b89b['getCustomProperties']());_0x4350b3['length']>0x0&&(_0x4eb9ca['customProperties']=_0x4350b3);const _0x279f30=_0x34b89b['getFillerOffset']();return null!==_0x279f30&&(_0x4eb9ca['fillerOffset']=_0x279f30),_0x4eb9ca;}}['_markChanges'](_0xb9e136,_0x518b55,_0x359d2c,_0x396d10,_0x39705b){let _0x59ce78=null,_0x2bc6f7=null,_0x4b9bae=0x0;const _0x43481a=this['editor']['model'];for(let _0xcfe135=0x0;_0xcfe135<_0x518b55['length'];_0xcfe135++){const _0x4f3648=this['_getVidAttributeName'](_0x518b55[_0xcfe135]),_0x1ecd27=_0x518b55[_0xcfe135]['item']['getAttribute'](_0x4f3648),_0x2541b7=_0x359d2c['get'](_0x1ecd27),_0x1fd5e0=_0xcfe135==_0x518b55['length']-0x1;(!_0x59ce78&&_0x2541b7&&(_0x59ce78=_0x2541b7,_0x2bc6f7=_0x518b55[_0xcfe135]),_0x59ce78&&(!_0x2541b7||_0x2541b7['userId']!=_0x59ce78['userId']))&&(_0x917453(_0x2541b7,P(_0x2bc6f7,_0xb9e136,_0x43481a),P(_0x518b55[_0xcfe135],_0xb9e136,_0x43481a)),_0x59ce78=_0x2541b7||null,_0x2bc6f7=_0x2541b7?_0x518b55[_0xcfe135]:null),_0x59ce78&&_0x1fd5e0&&_0x917453(_0x2541b7,P(_0x2bc6f7,_0xb9e136,_0x43481a),V(_0x518b55[_0xcfe135],_0xb9e136,_0x43481a));}function _0x917453(_0x50c3b5,_0x2adedc,_0x5724db){const _0x448be5=_0x59ce78['userId'],_0x1791c8='revision:'+_0x396d10+':'+_0x448be5+':'+_0x4b9bae++,_0x32f692=_0x43481a['createRange'](_0x2adedc,_0x5724db);_0xb9e136['markers']['set'](_0x1791c8,_0x32f692),null!==_0x448be5&&_0x39705b['add'](_0x448be5);}}['_getVidAttributeName'](_0x59cba4){switch(_0x59cba4['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x487c1f,_0x206f9f){_0x487c1f['baseVersion']=null;for(const _0x46a900 in _0x487c1f){const _0x2dbb13=_0x487c1f[_0x46a900];if(_0x2dbb13 instanceof _0x517828){const _0x4a9100=_0x206f9f['get'](_0x2dbb13['root']['rootName']);_0x487c1f[_0x46a900]=this['_fixPosition'](_0x2dbb13,_0x4a9100);}if(_0x2dbb13 instanceof _0xb3cd0f){const _0xaf12b3=_0x206f9f['get'](_0x2dbb13['root']['rootName']);_0x487c1f[_0x46a900]=this['_fixRange'](_0x2dbb13,_0xaf12b3);}'root'===_0x46a900&&(_0x487c1f['root']=_0x206f9f['get'](_0x487c1f['root']['rootName']));}}['_fixRange'](_0x515121,_0x539921){return this['editor']['model']['createRange'](this['_fixPosition'](_0x515121['start'],_0x539921),this['_fixPosition'](_0x515121['end'],_0x539921));}['_fixPosition'](_0x4254d1,_0x3d717c){return this['editor']['model']['createPositionFromPath'](_0x3d717c,_0x4254d1['path'],_0x4254d1['stickiness']);}['_handleInsertOperation'](_0x3bab9e){const _0x5eaaae=this['_idsRoots']['get'](_0x3bab9e['position']['root']['rootName']),_0x435620=this['_fixPosition'](_0x3bab9e['position'],_0x5eaaae),_0x27ee77=null===_0x3bab9e['_authorId']?null:_0x3bab9e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1b53e7=_0x435620['parent'],_0x4b9c92=this['_revisionId'],_0x3639d7=[];for(const _0x2a1655 of _0x3bab9e['nodes'])if(_0x2a1655['is']('element'))_0x3639d7['push'](this['_makeIdsRoot'](_0x2a1655));else{for(let _0x1b6d6e=0x0;_0x1b6d6e<_0x2a1655['offsetSize'];_0x1b6d6e++)_0x3639d7['push'](new _0x36b445('$text',{'vid':this['_revisionId']++}));}const _0x90ff4e=this['_revisionId'];for(let _0x3a08e3=_0x4b9c92;_0x3a08e3<_0x90ff4e;_0x3a08e3++)this['_touched']['set'](_0x3a08e3,{'userId':_0x27ee77});_0x1b53e7['_insertChild'](_0x435620['offset'],_0x3639d7);}['_handleMoveOperation'](_0x2d30c5){(_0x2d30c5=this['_cloneOperation'](_0x2d30c5,this['_idsRoots']))['_execute']();const _0xa1ca57=null===_0x2d30c5['_authorId']?null:_0x2d30c5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4e52fd=_0x2d30c5['getMovedRangeStart'](),_0x5dfb93=_0x4e52fd['parent'],_0x3dba44=_0x4e52fd['offset'];!function _0x28aaed(_0x47af67,_0x5206e2,_0x304373,_0x2e7c96){for(let _0x1fe3e2=_0x304373;_0x1fe3e2<_0x2e7c96;_0x1fe3e2++){const _0x251219=_0x5206e2['getChild'](_0x1fe3e2);_0x251219['is']('element','$text')?_0x47af67['set'](_0x251219['getAttribute']('vid'),{'userId':_0xa1ca57}):(_0x47af67['set'](_0x251219['getAttribute']('vid_start'),{'userId':_0xa1ca57}),_0x28aaed(_0x47af67,_0x251219,0x0,_0x251219['childCount']),_0x47af67['set'](_0x251219['getAttribute']('vid_end'),{'userId':_0xa1ca57}));}}(this['_touched'],_0x5dfb93,_0x3dba44,_0x3dba44+_0x2d30c5['howMany']);}['_handleMergeOperation'](_0x5c5d48){const _0x1bca2e=null===(_0x5c5d48=this['_cloneOperation'](_0x5c5d48,this['_idsRoots']))['_authorId']?null:_0x5c5d48['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x169f14=_0x5c5d48['targetPosition']['parent'],_0x5a6381=_0x5c5d48['sourcePosition']['parent'],_0x48c88a=_0x169f14['getAttribute']('vid_end'),_0x415fe3=_0x5a6381['getAttribute']('vid_start');_0x169f14['_setAttribute']('vid_end',_0x5a6381['getAttribute']('vid_end')),_0x5a6381['_setAttribute']('vid_end',_0x48c88a),this['_touched']['set'](_0x415fe3,{'userId':_0x1bca2e}),this['_touched']['set'](_0x48c88a,{'userId':_0x1bca2e}),_0x5c5d48['_execute']();}['_handleSplitOperation'](_0x34f335){const _0x39035f=null===(_0x34f335=this['_cloneOperation'](_0x34f335,this['_idsRoots']))['_authorId']?null:_0x34f335['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1b5368=_0x34f335['graveyardPosition'],_0xeab941=_0x34f335['splitPosition']['parent'];_0x34f335['_execute']();const _0x13ccac=_0xeab941['getAttribute']('vid_end'),_0x3cd0d4=_0x34f335['insertionPosition']['nodeAfter'];if(_0x1b5368){const _0x137eb3=_0x3cd0d4['getAttribute']('vid_end'),_0x24febe=_0xeab941['getAttribute']('vid_end');_0xeab941['_setAttribute']('vid_end',_0x137eb3),_0x3cd0d4['_setAttribute']('vid_end',_0x24febe),this['_touched']['set'](_0xeab941['getAttribute']('vid_end'),{'userId':_0x39035f}),this['_touched']['set'](_0x3cd0d4['getAttribute']('vid_start'),{'userId':_0x39035f});}else{const _0x384d79=this['_revisionId']++,_0x3d08e0=this['_revisionId']++;_0xeab941['_setAttribute']('vid_end',_0x384d79),_0x3cd0d4['_setAttribute']('vid_start',_0x3d08e0),_0x3cd0d4['_setAttribute']('vid_end',_0x13ccac),this['_touched']['set'](_0x384d79,{'userId':_0x39035f}),this['_touched']['set'](_0x3d08e0,{'userId':_0x39035f});}}['_handleMarkerOperation'](_0x49e574){if(!_0x49e574['affectsData'])return;const _0x4508e0=(_0x49e574=this['_cloneOperation'](_0x49e574,this['_diffRoots']))['oldRange']?_0x49e574['oldRange']['root']:null,_0x4410da=_0x49e574['newRange']?_0x49e574['newRange']['root']:null;_0x4508e0&&this['_markers']['delete'](_0x49e574['name']),_0x4410da&&this['_markers']['set'](_0x49e574['name'],_0x49e574['newRange']['clone']());const _0x305c63=null===_0x49e574['_authorId']?null:_0x49e574['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x44600f=_0x49e574['name'];if(!this['_touchedMarkers']['has'](_0x44600f))return void this['_touchedMarkers']['set'](_0x44600f,{'range':_0x49e574['oldRange'],'userId':_0x305c63});const _0xc1c0a9=this['_touchedMarkers']['get'](_0x44600f),_0x13aa3c=_0xc1c0a9['range'],_0x23a68b=_0x49e574['newRange'];null==_0x13aa3c&&null==_0x23a68b||_0x13aa3c&&_0x23a68b&&_0x13aa3c['isEqual'](_0x23a68b)?this['_touchedMarkers']['delete'](_0x49e574['name']):_0xc1c0a9['userId']=_0x305c63;}['_handleRootOperation'](_0x283731,_0x4c7f7c){this['_diffRoots']['has'](_0x283731['rootName'])?this['_diffRoots']['get'](_0x283731['rootName'])['_isAttached']=_0x283731['isAdd']:(this['_diffRoots']['set'](_0x283731['rootName'],N(_0x283731['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x283731['rootName'],{}),_0x4c7f7c&&this['_idsRoots']['set'](_0x283731['rootName'],N(_0x283731['rootName'],!0x0)));const _0x487d06=null===_0x283731['_authorId']?null:_0x283731['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xa36e37=this['_touchedRoots']['get'](_0x283731['rootName']);_0xa36e37&&_0xa36e37['userId']===_0x487d06?this['_touchedRoots']['delete'](_0x283731['rootName']):this['_touchedRoots']['set'](_0x283731['rootName'],{'userId':_0x487d06,'isAttached':_0x283731['isAdd']});}['_handleRootAttributeOperation'](_0x37c385){const _0x261190=this['_diffRootsAttributes']['get'](_0x37c385['root']['rootName']);null===_0x37c385['newValue']?delete _0x261190[_0x37c385['key']]:_0x261190[_0x37c385['key']]=_0x37c385['newValue'];}}function K(_0x2b08cd){const _0x5943c6=N(_0x2b08cd['rootName'],_0x2b08cd['isAttached']());for(const _0xdf00bf of _0x2b08cd['getChildren']()){const _0x3024b9=_0xdf00bf['_clone'](!0x0);_0x5943c6['_appendChild'](_0x3024b9);}return _0x5943c6;}function N(_0x5bccbb,_0xc48329=!0x0){const _0x43ac14=new _0x8c84c8();return _0x43ac14['rootName']=_0x5bccbb,_0x43ac14['_isAttached']=_0xc48329,_0x43ac14['isAttached']=()=>_0x43ac14['_isAttached'],_0x43ac14;}function P(_0x78770d,_0x2c5c2f,_0x4214ad){const _0x3b2d4f='elementEnd'==_0x78770d['type']?_0x4214ad['createPositionAt'](_0x78770d['item'],'end'):_0x4214ad['createPositionBefore'](_0x78770d['item']);return _0x4214ad['createPositionFromPath'](_0x2c5c2f,_0x3b2d4f['path'],_0x3b2d4f['stickiness']);}function V(_0xa157f1,_0x2de73b,_0x10407c){const _0x3b4fed='elementStart'==_0xa157f1['type']?_0x10407c['createPositionAt'](_0xa157f1['item'],0x0):_0x10407c['createPositionAfter'](_0xa157f1['item']);return _0x10407c['createPositionFromPath'](_0x2de73b,_0x3b4fed['path'],_0x3b4fed['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
+ _0x5aa04a(_0x4eb8a3){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4244cf,_0x1c5f1c){super(_0x4244cf),this['focusTracker']=new _0x30890a(),this['keystrokes']=new _0x34a3da(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1c5f1c),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'](),_0xccd7c3({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x2c5de2=_0x50a2b5=>_0x50a2b5['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2c5de2),this['keystrokes']['set']('arrowleft',_0x2c5de2),this['keystrokes']['set']('arrowup',_0x2c5de2),this['keystrokes']['set']('arrowdown',_0x2c5de2);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x14abd6){this['revisionNameInputView']['fieldView']['element']['value']=_0x14abd6['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x222267){const _0x2d412b=new et(this['locale'],ti),_0xcbfc1e=_0x2d412b['fieldView'];_0xcbfc1e['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4b9df7=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x222267&&(_0x4b9df7+='\x20('+m(this['locale'],'optional')+')'),(_0x2d412b['label']=_0x4b9df7,_0xcbfc1e['on']('input',()=>{this['revisionNameInputValue']=_0xcbfc1e['element']['value']['trim']();}),_0x2d412b);}}class l extends _0xbe21c4{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x2f3c18=this['editor'],_0x23c3d0=_0x2f3c18['plugins']['get']('RevisionTracker');_0x2f3c18['ui']['componentFactory']['add']('revisionHistory',_0x5c8f0e=>{const _0x41e46c=_0x1e23a0(_0x5c8f0e),_0x1b9334=_0x41e46c['panelView']['children'],_0x7ce969=new _0x4b2173(_0x5c8f0e),_0x11d5f0=new _0x55af41(_0x5c8f0e),_0x24eebd=this['_createSaveRevisionButton'](_0x41a1a9),_0x5a60b4=new _0x55af41(_0x5c8f0e),_0x456a66=this['_createOpenRevisionButton'](_0x41a1a9);return _0x41e46c['bind']('isEnabled')['to'](_0x23c3d0,'isReady',_0x23c3d0,'isEnabled',_0x2f3c18,'isReadOnly',(_0x5efc6e,_0x2df569,_0x458ec1)=>_0x5efc6e&&_0x2df569&&!_0x458ec1),_0x41e46c['buttonView']['set']({'icon':_0x672cd0,'label':m(_0x5c8f0e,'Revision\x20history'),'tooltip':!0x0}),_0x24eebd['set']({'withText':!0x0,'role':'menuitem'}),_0x456a66['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x456a66,'execute',()=>{_0x41e46c['isOpen']=!0x1,_0x2f3c18['editing']['view']['focus']();},{'priority':'low'}),_0x11d5f0['children']['add'](_0x24eebd),_0x5a60b4['children']['add'](_0x456a66),_0x7ce969['role']='menu',_0x7ce969['items']['addMany']([_0x11d5f0,_0x5a60b4]),_0x1b9334['add'](_0x7ce969),_0x41e46c;}),_0x2f3c18['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0xe7dc57=this['editor'],_0x9f75aa=_0xe7dc57['locale'],_0x587f28=_0xe7dc57['plugins']['get']('RevisionTracker'),_0x55d4fc=new _0x22ce88(_0x9f75aa),_0xee4282=new _0x3b6094(_0x9f75aa);_0x55d4fc['bind']('isEnabled')['to'](_0x587f28,'isReady',_0x587f28,'isEnabled',_0xe7dc57,'isReadOnly',(_0x13875c,_0x498b33,_0x230f7a)=>_0x13875c&&_0x498b33&&!_0x230f7a),_0x55d4fc['buttonView']['set']({'icon':_0x672cd0,'label':m(_0x9f75aa,'Revision\x20history')});const _0x353c1a=new _0x360a69(_0x9f75aa,_0x55d4fc),_0x546900=this['_createSaveRevisionButton'](_0x1b7074);_0x546900['delegate']('execute')['to'](_0x55d4fc),_0x353c1a['children']['add'](_0x546900),_0xee4282['items']['add'](_0x353c1a);const _0x1fe6f2=new _0x360a69(_0x9f75aa,_0x55d4fc),_0x12bb31=this['_createOpenRevisionButton'](_0x1b7074);return _0x12bb31['delegate']('execute')['to'](_0x55d4fc),_0x1fe6f2['children']['add'](_0x12bb31),_0xee4282['items']['add'](_0x1fe6f2),_0x55d4fc['panelView']['children']['add'](_0xee4282),_0x55d4fc;}['_createSaveRevisionButton'](_0x548efa){const _0x418e19=this['editor'],_0xa1f81c=_0x418e19['plugins']['get']('RevisionTracker'),_0x4ec41e=new _0x548efa(_0x418e19['locale']);return _0x4ec41e['set']({'label':m(_0x418e19['locale'],'Save\x20current\x20revision')}),_0x4ec41e['bind']('isEnabled')['to'](_0xa1f81c,'isReady',_0xa1f81c,'isEnabled',_0x418e19,'isReadOnly',(_0x23bcf6,_0x1347ab,_0x466ca2)=>_0x23bcf6&&_0x1347ab&&!_0x466ca2),this['listenTo'](_0x4ec41e,'execute',()=>{this['_showDialog']();}),_0x4ec41e;}['_createOpenRevisionButton'](_0x3e7d97){const _0x4a6b04=this['editor'],_0xc789d9=_0x4a6b04['plugins']['get']('RevisionTracker'),_0x29b565=new _0x3e7d97(_0x4a6b04['locale']);return _0x29b565['set']({'label':m(_0x4a6b04['locale'],'Open\x20revision\x20history')}),_0x29b565['bind']('isEnabled')['to'](_0xc789d9,'isReady',_0x4a6b04,'isReadOnly',(_0x8f3dd3,_0x203346)=>_0x8f3dd3&&!_0x203346),this['listenTo'](_0x29b565,'execute',()=>{_0x4a6b04['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x29b565;}['_showDialog'](){const _0x2035fc=this['editor'],_0x162edc=_0x2035fc['locale'],_0x1b075e=_0x2035fc['plugins']['get']('Dialog'),_0x43bbb9=_0x2035fc['plugins']['get']('RevisionTracker');function _0xf6c3d8(_0x22a39a){_0x2035fc['config']['get']('revisionHistory.requireRevisionName')&&''===_0x22a39a['revisionName']?_0x22a39a['revisionNameInputView']['errorText']=m(_0x162edc,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2035fc['plugins']['get'](h)['saveRevision']({'name':_0x22a39a['revisionName']}),_0x1b075e['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xf6c3d8(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x1b075e['show']({'id':'revisionSave','title':m(_0x162edc,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x2035fc['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x1b075e['hide']()},{'label':m(_0x2035fc['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x234a24){_0x234a24['bind']('isEnabled')['to'](_0x43bbb9,'isReady',_0x43bbb9,'isEnabled',_0x2035fc,'isReadOnly',(_0x172116,_0xbfc1ba,_0x5d0468)=>_0x172116&&_0xbfc1ba&&!_0x5d0468);},'onExecute':()=>_0xf6c3d8(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x4b9b04=this['editor'],_0x1d5ba5=_0x4b9b04['locale'];this['_saveRevisionFormView']=new he(_0x1d5ba5,_0x4b9b04['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x4eb8a3{['changeId'];['_model'];constructor(_0x1b5a14,_0x35544b){super(_0x1b5a14),this['_model']=_0x35544b,this['changeId']=_0x35544b['id'];const _0x84d038=this['bindTemplate'],_0x14590f=m(_0x1b5a14,_0x35544b['data']['isSuggestion']?'Suggested\x20by':'add'==_0x35544b['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x35544b['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x84d038['to']('type',_0x3bf403=>'ck-revision-change__'+_0x3bf403)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x14590f}]},{'text':'\x20'+_0x35544b['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x113f03(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x36dc02){super(),this['id']=_0x36dc02['id']||_0x532896(),this['author']=_0x36dc02['author'],this['type']=_0x36dc02['type'],this['data']=_0x36dc02['data']||{},this['rootName']=_0x36dc02['rootName'],this['set']('createdAt',_0x36dc02['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(_0x38d6e3,_0x1e926e){this['newRevisionId']=_0x38d6e3,this['oldRevisionId']=_0x1e926e,this['changes']=new _0x504df2();}['_setChanges'](_0x50a448){for(const _0x192f61 of _0x50a448)this['changes']['add'](_0x192f61);}}class u extends _0xbe21c4{['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[_0x416e9c,_0x3e3e3f,S,$];}constructor(_0x42dc1b){super(_0x42dc1b),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',(_0x3d4002,_0x4860c0,_0x256624)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x566a16=>{for(const _0x3fbb41 of this['editor']['editing']['view']['document']['roots'])_0x256624?_0x566a16['removeClass']('ck-editor__editable__overlay',_0x3fbb41):_0x566a16['addClass']('ck-editor__editable__overlay',_0x3fbb41);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5e724f=>null!==_0x5e724f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5b2d33,_0x5844de,_0x470c5c)=>_0x5b2d33&&_0x470c5c?_0x5844de['changes']['getIndex'](_0x470c5c):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x56ccfa,_0x547445)=>_0x56ccfa?_0x547445['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3e3e3f);}['init'](){const _0xb24340=this['editor'],_0x340fff=new rt(_0xb24340,{'direction':'backward'}),_0xf509f6=new rt(_0xb24340,{'direction':'forward'});(_0xb24340['commands']['add']('showPreviousChange',_0x340fff),_0xb24340['commands']['add']('showNextChange',_0xf509f6),_0xb24340['commands']['add']('restoreRevision',new nt(_0xb24340)),this['on']('change:numberOfChanges',()=>{_0x340fff['refresh'](),_0xf509f6['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0xb24340['enableReadOnlyMode']('revision-viewer'),_0xb24340['plugins']['has']('WidgetToolbarRepository'))&&_0xb24340['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x3e3c02){return await this['_utils']['loadRevisionData'](_0x3e3c02,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3e3c02);}async['getRevisionRootsAttributes'](_0x3104df){return await this['_utils']['loadRevisionData'](_0x3104df,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3104df);}async['compare'](_0x447d7a,_0x452dbd,_0x44d824=!0x1){if(!this['isEnabled'])return;const _0x546dec=this['diff'],_0x45a055=this['repository'],_0x10841e='string'==typeof _0x447d7a?_0x45a055['getRevision'](_0x447d7a):_0x447d7a,_0x7967ed='string'==typeof _0x452dbd?_0x45a055['getRevision'](_0x452dbd):_0x452dbd,_0x277450=_0x10841e['id'],_0x358404=_0x7967ed?_0x7967ed['id']:null;if(!_0x44d824&&this['diff']&&this['diff']['newRevisionId']===_0x277450&&this['diff']['oldRevisionId']===_0x358404)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x277450,_0x358404);const _0x1d280a=this['_getRevisionsRange'](_0x10841e,_0x7967ed,!0x0)['map'](_0x5b4f82=>this['_utils']['loadRevisionData'](_0x5b4f82,this['adapter']));return _0x1d280a['push'](new Promise(_0x317a70=>{setTimeout(_0x317a70,0x14);})),Promise['all'](_0x1d280a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x551b65=this['_getDiff'](_0x277450,_0x358404);for(const _0x4f94df of _0x551b65['changes'])this['_changeIdToChange']['set'](_0x4f94df['id'],_0x4f94df);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3e9ccf=>{for(const _0x5b0982 of this['editor']['model']['document']['getRootNames']())_0x3e9ccf['detachRoot'](_0x5b0982);for(const _0x22f309 of Object['keys'](_0x551b65['model'])){const _0x278d1a=_0x3e9ccf['addRoot'](_0x22f309);for(const _0x4decca of Object['keys'](_0x551b65['attributes'][_0x22f309]))_0x3e9ccf['setAttribute'](_0x4decca,_0x551b65['attributes'][_0x22f309][_0x4decca],_0x278d1a);_0x3e9ccf['insert'](_0x551b65['model'][_0x22f309],_0x278d1a,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x551b65['changes'])),this['isReady']=!0x0;})['catch'](_0x422a0a=>{console['error'](_0x422a0a),this['_cleanUp'](),_0x546dec&&(this['diff']=_0x546dec),this['isReady']=!0x0;});}['addRevisionData'](_0x5e0f84,_0x5b9619){const _0x5ec505=this['repository']['createRevision'](_0x5e0f84);return _0x5ec505['on']('_update',(_0x4a7fe6,_0x1d0517,_0x3ce82c)=>_0x5b9619(_0x1d0517,_0x3ce82c,_0x5ec505)),this['repository']['addRevision'](_0x5ec505),_0x5ec505;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4b1596=>{for(const _0x5e926f of this['editor']['model']['document']['getRootNames']())_0x4b1596['detachRoot'](_0x5e926f);});}['_sortAndFilterDiffChanges'](_0x2e4e85){const _0x19b937=[],_0x51f1c8=new Map();for(const _0x467291 of this['editor']['model']['document']['getRootNames']()){const _0x1051e1=this['editor']['editing']['view']['getDomRoot'](_0x467291);if(!_0x1051e1)continue;const _0x1f64ec=_0x1051e1['getClientRects']()['item'](0x0);_0x1f64ec&&(_0x19b937['push'](_0x467291),_0x51f1c8['set'](_0x467291,_0x1f64ec));}return _0x19b937['sort']((_0x5a14c9,_0x4b3419)=>{const _0x30a2ce=_0x51f1c8['get'](_0x5a14c9),_0x3b6503=_0x51f1c8['get'](_0x4b3419);return _0x30a2ce['y']-_0x3b6503['y']||_0x30a2ce['x']-_0x3b6503['x'];}),(_0x2e4e85=_0x2e4e85['filter'](_0x4f77fd=>_0x19b937['includes'](_0x4f77fd['rootName'])))['sort']((_0x45bde8,_0x4a3386)=>_0x19b937['indexOf'](_0x45bde8['rootName'])-_0x19b937['indexOf'](_0x4a3386['rootName'])),_0x2e4e85;}['_makeTape'](_0x232772){const _0x40b918=Array['from'](_0x232772['markers'])['filter'](([_0x11c4bf,_0x3a5370])=>_0x11c4bf['startsWith']('revision:')&&!_0x3a5370['isCollapsed']),_0x4435e2=Array['from'](this['editor']['model']['createRangeIn'](_0x232772)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x40b918['length'])for(const _0x2e68ff of _0x4435e2){const [_0x36e547,_0x511590]=_0x40b918[0x0],[,_0x4889f3,_0x41622f]=_0x36e547['split'](':');if(_0x511590['end']['isEqual'](_0x2e68ff['nextPosition'])&&_0x40b918['shift'](),(_0x2e68ff['previousPosition']['isEqual'](_0x511590['start'])||_0x2e68ff['previousPosition']['isAfter'](_0x511590['start']))&&('insertion'==_0x4889f3?_0x2e68ff['isAdded']={'userId':_0x41622f}:'deletion'==_0x4889f3&&(_0x2e68ff['isRemoved']={'userId':_0x41622f})),0x0==_0x40b918['length'])break;}return _0x4435e2;}['_refreshStartEndIndex'](_0x235f84){const _0x1bf2f8=new Map();for(let _0x2d2217=0x0;_0x2d2217<_0x235f84['length'];_0x2d2217++)'text'===_0x235f84[_0x2d2217]['type']?(_0x235f84[_0x2d2217]['item']['startIndex']=_0x2d2217,_0x235f84[_0x2d2217]['item']['endIndex']=_0x2d2217):('elementStart'===_0x235f84[_0x2d2217]['type']?_0x235f84[_0x2d2217]['item']['startIndex']=_0x2d2217:'elementEnd'===_0x235f84[_0x2d2217]['type']&&(_0x235f84[_0x2d2217]['item']['endIndex']=_0x2d2217),_0x1bf2f8['set'](_0x235f84[_0x2d2217]['id'],_0x2d2217));for(const _0x39fc6c of _0x1bf2f8['values']())'elementStart'===_0x235f84[_0x39fc6c]['type']?_0x235f84[_0x39fc6c]['item']['endIndex']=_0x1bf2f8['get'](_0x235f84[_0x39fc6c]['pairId']):'elementEnd'===_0x235f84[_0x39fc6c]['type']&&(_0x235f84[_0x39fc6c]['item']['startIndex']=_0x1bf2f8['get'](_0x235f84[_0x39fc6c]['pairId']));}['_processTape'](_0xea2618){for(let _0x1e618e=0x0;_0x1e618e<_0xea2618['length'];_0x1e618e++){if('elementStart'===_0xea2618[_0x1e618e]['type'])_0xea2618[_0x1e618e]['item']['startIndex']=_0x1e618e;else{if('elementEnd'===_0xea2618[_0x1e618e]['type']){_0xea2618[_0x1e618e]['item']['endIndex']=_0x1e618e;const _0x2451b1=_0xea2618[_0x1e618e]['item']['startIndex'];_0xea2618[_0x2451b1]['pairId']=_0xea2618[_0x1e618e]['id'],_0xea2618[_0x1e618e]['pairId']=_0xea2618[_0x2451b1]['id'];}else _0xea2618[_0x1e618e]['item']['startIndex']=_0x1e618e,_0xea2618[_0x1e618e]['item']['endIndex']=_0x1e618e,_0xea2618[_0x1e618e]['pairId']=null;}_0xea2618[_0x1e618e]['markersStart']||(_0xea2618[_0x1e618e]['markersStart']=[],_0xea2618[_0x1e618e]['markersEnd']=[]);}}['_markInsertions'](_0x1461f7,_0x4a2d2c){const _0x4bc7b7=_0x1461f7['filter'](_0x51f5eb=>!_0x51f5eb['isAdded']);for(let _0x649d0e=0x0;_0x649d0e<_0x4a2d2c['length'];_0x649d0e++)_0x4a2d2c[_0x649d0e]['isAdded']&&(_0x4bc7b7[_0x649d0e]['isAdded']=_0x4a2d2c[_0x649d0e]['isAdded']);}['_getDiff'](_0x48cc3a,_0x4b4d00=null){const _0xaa364c=this['repository']['getRevision'](_0x48cc3a),_0x47f869=_0x4b4d00?this['repository']['getRevision'](_0x4b4d00):null,_0x3e68b2=this['_getRevisionsRange'](_0xaa364c,_0x47f869),_0x19616e=_0x3e68b2[_0x3e68b2['length']-0x1],_0xf21a58=new Map(),_0x5e0650={'model':{},'attributes':{},'changes':[]},_0x209d07=new Set(),_0x52f2b6=new Map();for(let _0x4c4270=_0x3e68b2['length']-0x1;_0x4c4270>=0x0;_0x4c4270--){const _0x15c685=_0x3e68b2[_0x4c4270];for(const _0x268447 of Object['keys'](_0x15c685['diffData']))if(_0x15c685['diffData'][_0x268447]['attachChange']){const _0x271210=_0x15c685['diffData'][_0x268447]['attachChange'];_0x271210['isAttached']?(_0x209d07['add'](_0x268447),_0x52f2b6['has'](_0x268447)&&_0x52f2b6['get'](_0x268447)['userId']==_0x271210['userId']?_0x52f2b6['delete'](_0x268447):_0x52f2b6['set'](_0x268447,_0x271210)):_0x52f2b6['has'](_0x268447)?(_0x209d07['delete'](_0x268447),_0x52f2b6['delete'](_0x268447)):(_0x209d07['add'](_0x268447),_0x52f2b6['set'](_0x268447,_0x271210));}else _0x209d07['add'](_0x268447);}for(const _0x5789d1 of _0x209d07){const _0x16c971=_0x52f2b6['has'](_0x5789d1)&&!_0x52f2b6['get'](_0x5789d1)['isAttached'];let _0x3f497c=_0x16c971?_0x3e68b2['length']-0x1:0x0;const _0x21d77d=_0x16c971?-0x1:0x1;for(;_0x3e68b2[_0x3f497c];){const _0x489e7d=_0x3e68b2[_0x3f497c];if(_0x489e7d['diffData'][_0x5789d1]){const _0x2fc44f=_0x16c971?_0x489e7d['diffData'][_0x5789d1]['attributesBefore']:_0x489e7d['diffData'][_0x5789d1]['attributesAfter'];_0x5e0650['attributes'][_0x5789d1]=_0x2fc44f?_0x83ca90(_0x2fc44f):{};break;}_0x3f497c+=_0x21d77d;}}for(const _0x5ea4bc of _0x3e68b2){_0x5ea4bc['model']={};for(const _0x20f631 of _0x5ea4bc['authors'])_0xf21a58['set'](_0x20f631['id'],_0x20f631);for(const _0x5746c4 of _0x209d07){const _0x37de87=_0x5ea4bc['diffData'][_0x5746c4]?_0x5ea4bc['diffData'][_0x5746c4]['insertions']:'[]',_0x4a150f=_0x5ea4bc['diffData'][_0x5746c4]?_0x5ea4bc['diffData'][_0x5746c4]['deletions']:'[]';_0x5ea4bc['model'][_0x5746c4]={'insertions':this['_utils']['_makeModelFromViewString'](_0x37de87),'deletions':this['_utils']['_makeModelFromViewString'](_0x4a150f)};}}for(const _0x5d3150 of _0x209d07){let _0x5d1042=null,_0x316e87=0x0;const _0xb7bbab=new Map(Array['from'](_0xaa364c['model'][_0x5d3150]['insertions']['markers'])['filter'](([_0x412a57])=>!_0x412a57['startsWith']('revision:')));let _0x2782a3=0x0;for(const _0x190117 of _0x3e68b2){const _0x350cf1=this['_makeTape'](_0x190117['model'][_0x5d3150]['insertions']);_0x190117==_0xaa364c?(_0x5d1042=_0x350cf1,_0x316e87=_0x5d1042['length'],_0x5d1042['forEach'](_0x2cd237=>{_0x2cd237['id']=_0x2782a3++;}),this['_processTape'](_0x5d1042)):this['_markInsertions'](_0x5d1042,_0x350cf1);const _0x2e62e5=_0x5d1042['filter'](_0x1c70be=>!_0x1c70be['isAdded'])['map'](_0xd5d499=>_0xd5d499['id']);let _0x3e5cac=0x0;const _0x464ab1=this['_makeTape'](_0x190117['model'][_0x5d3150]['deletions']);_0x464ab1['forEach'](_0x3afe80=>{_0x3afe80['isRemoved']?_0x3afe80['id']=_0x316e87++:_0x3afe80['id']=_0x2e62e5[_0x3e5cac++];}),this['_processTape'](_0x464ab1),this['_setDistance'](_0x5d1042,'isAdded'),this['_setDistance'](_0x464ab1,'isRemoved'),_0x190117==_0xaa364c&&this['_markMarkers'](_0x5d1042,_0xb7bbab),_0x5d1042=this['_joinTapes'](_0x5d1042,_0x464ab1),this['_refreshStartEndIndex'](_0x5d1042),this['_setDistance'](_0x5d1042,'isRemoved');}_0x5d1042=_0x5d1042['filter'](_0x16efe8=>!(_0x16efe8['isAdded']&&_0x16efe8['isRemoved']));const _0x3ca3c2=new Map(_0x19616e['model'][_0x5d3150]['deletions']['markers']),_0x1163e4=new Set(_0xb7bbab['keys']());for(const _0x3b92f3 of _0x3ca3c2['keys']())_0x1163e4['delete'](_0x3b92f3);this['_markSuggestions'](_0x5d1042,_0x1163e4),this['_fixObsoleteTags'](_0x5d1042),_0x5d1042=this['_removeMissingPairs'](_0x5d1042),_0x5d1042=this['_markMismatchedRemovedTags'](_0x5d1042),_0x5d1042=this['_removeUnsupportedChanges'](_0x5d1042);const {root:_0x5c7105,changes:_0x49a6bd}=this['_makeModelFromTape'](_0x5d1042,_0xf21a58,_0x5d3150);_0x5e0650['model'][_0x5d3150]=_0x5c7105;const _0x1f32d4=_0x52f2b6['get'](_0x5d3150);if(_0x1f32d4){const _0x5698ad=_0xf21a58['get'](_0x1f32d4['userId']),_0x9bb7ff=new G({'author':_0x5698ad,'type':_0x1f32d4['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5d3150});_0x49a6bd['unshift'](_0x9bb7ff),_0x5e0650['attributes'][_0x5d3150]['revisionHistoryAttachChange']=_0x9bb7ff['id'];}_0x5e0650['changes']=_0x5e0650['changes']['concat'](_0x49a6bd);}return _0x5e0650;}['_markMarkers'](_0x585f5e,_0x461ff3){for(let _0x2fe530=0x0;_0x2fe530<_0x585f5e['length'];_0x2fe530++)for(const [_0x4c4b29,_0x460f58]of _0x461ff3)!_0x460f58['isCollapsed']&&_0x460f58['start']['isEqual'](_0x585f5e[_0x2fe530]['previousPosition'])&&_0x585f5e[_0x2fe530]['markersStart']['push'](_0x4c4b29),_0x460f58['end']['isEqual'](_0x585f5e[_0x2fe530]['nextPosition'])&&_0x585f5e[_0x2fe530]['markersEnd']['push'](_0x4c4b29);}['_joinTapes'](_0x2431ce,_0xfc2934){let _0x50e7b1=[],_0x4db0e7=0x0,_0x3302e2=0x0;for(;_0x4db0e7<_0x2431ce['length']||_0x3302e2<_0xfc2934['length'];){const _0x59a21e=_0x2431ce[_0x4db0e7]||{},_0x2e767d=_0xfc2934[_0x3302e2]||{};if(_0x59a21e['id']==_0x2e767d['id'])_0x4db0e7++,_0x3302e2++,_0x50e7b1['push'](_0x59a21e);else{if(_0x2e767d['isRemoved']&&_0x59a21e['isAdded']){const {commonTape:_0x520cf6,iEnd:_0x21f42f,jEnd:_0xdf697b}=this['_threeWayMerge'](_0x2431ce,_0x4db0e7,_0xfc2934,_0x3302e2);_0x50e7b1=_0x50e7b1['concat'](_0x520cf6),_0x4db0e7=_0x21f42f,_0x3302e2=_0xdf697b;}else _0x2e767d['isRemoved']?(_0x3302e2++,_0x50e7b1['push'](_0x2e767d)):(_0x4db0e7++,_0x50e7b1['push'](_0x59a21e));}}return _0x50e7b1;}['_markSuggestions'](_0x207a93,_0x4e243a){const _0x52e946=[];for(let _0x40cb7c=0x0;_0x40cb7c<_0x207a93['length'];_0x40cb7c++){for(let _0x868842=0x0;_0x868842<_0x207a93[_0x40cb7c]['markersStart']['length'];_0x868842++){const _0x217480=_0x207a93[_0x40cb7c]['markersStart'][_0x868842];if(!_0x4e243a['has'](_0x217480))continue;const {group:_0x4447fa,type:_0x3ac6c7,authorId:_0x44b987}=_0x4fd0e4(_0x217480);'revision-suggestion'!=_0x4447fa||'insertion'!=_0x3ac6c7&&'deletion'!=_0x3ac6c7||(_0x52e946['unshift']({'type':_0x3ac6c7,'name':_0x217480,'userId':_0x44b987}),_0x207a93[_0x40cb7c]['markersStart']['splice'](_0x868842,0x1),_0x868842--);}_0x3b7615(_0x207a93[_0x40cb7c]);for(let _0x419152=0x0;_0x419152<_0x207a93[_0x40cb7c]['markersEnd']['length'];_0x419152++){const _0x1e0f81=_0x207a93[_0x40cb7c]['markersEnd'][_0x419152];if(!_0x4e243a['has'](_0x1e0f81))continue;const {group:_0x2ead52,type:_0x17cdb6}=_0x4fd0e4(_0x1e0f81);if('revision-suggestion'!=_0x2ead52||'insertion'!=_0x17cdb6&&'deletion'!=_0x17cdb6)continue;_0x207a93[_0x40cb7c]['markersEnd']['splice'](_0x419152,0x1),_0x419152--;const _0x3613b6=_0x52e946['findIndex'](_0x27a88b=>_0x27a88b['name']==_0x1e0f81);_0x3613b6>-0x1&&_0x52e946['splice'](_0x3613b6,0x1);}}function _0x4fd0e4(_0x3b419f){const _0x5d0cc4=_0x3b419f['split'](':');return{'group':_0x5d0cc4[0x0],'type':_0x5d0cc4[0x1],'subType':_0x5d0cc4['length']>=0x5?_0x5d0cc4[0x2]:null,'id':_0x5d0cc4['length']<0x5?_0x5d0cc4[0x2]:_0x5d0cc4[0x3],'authorId':_0x5d0cc4['length']<0x5?_0x5d0cc4[0x3]:_0x5d0cc4[0x4],'markerCount':0x6==_0x5d0cc4['length']?_0x5d0cc4[0x5]:null};}function _0x3b7615(_0x2739fc){for(let _0x2beb9e=0x0;_0x2beb9e<_0x52e946['length'];_0x2beb9e++){if(_0x2739fc['isAdded']&&'insertion'==_0x52e946[_0x2beb9e]['type']&&_0x2739fc['isAdded']['userId']==_0x52e946[_0x2beb9e]['userId'])return _0x2739fc['isAddSuggestion']=_0x52e946[_0x2beb9e],void delete _0x2739fc['isAdded'];if(!_0x2739fc['isAdded']&&!_0x2739fc['isRemoved']&&'deletion'==_0x52e946[_0x2beb9e]['type'])return void(_0x2739fc['isRemoveSuggestion']=_0x52e946[_0x2beb9e]);}}}['_setDistance'](_0x53d07c,_0x11fa35){let _0x2ce6ac=0x0,_0x1be4a4=!0x1;const _0x16fcfa=new Map();for(const _0x52f2a3 of _0x53d07c)_0x52f2a3[_0x11fa35]?_0x1be4a4&&(_0x2ce6ac++,_0x1be4a4=!0x1):(_0x2ce6ac++,_0x1be4a4=!0x0),_0x16fcfa['set'](_0x52f2a3['id'],_0x2ce6ac);for(let _0x1e8814=0x0;_0x1e8814<_0x53d07c['length'];_0x1e8814++){if('isRemoved'==_0x11fa35&&_0x53d07c[_0x1e8814]['isAdded']||'isAdded'==_0x11fa35&&_0x53d07c[_0x1e8814]['isRemoved'])continue;if('text'==_0x53d07c[_0x1e8814]['type']){_0x53d07c[_0x1e8814]['distance']=0x0;continue;}const _0x6e4e20=_0x16fcfa['get'](_0x53d07c[_0x1e8814]['pairId']),_0x3c6ec7=_0x16fcfa['get'](_0x53d07c[_0x1e8814]['id']);_0x53d07c[_0x1e8814]['distance']=_0x6e4e20-_0x3c6ec7;}}['_getRevisionsRange'](_0x1e9c99,_0x30d1d7,_0x11dd07=!0x1){const _0x48e332=[];let _0x3d7c95=this['repository']['getIndex'](_0x1e9c99),_0x310e96=this['repository']['getIndex'](_0x30d1d7);for(-0x1==_0x310e96&&(_0x310e96=this['repository']['_revisions']['length'],_0x11dd07=!0x1);_0x3d7c95<_0x310e96;)_0x48e332['push'](this['repository']['getRevision'](_0x3d7c95)),_0x3d7c95++;return _0x11dd07&&_0x48e332['push'](this['repository']['getRevision'](_0x3d7c95)),_0x48e332;}['_threeWayMerge'](_0x71854b,_0x4fc031,_0x1d8416,_0x223a6f){const _0x3b0c30=this['editor']['model']['schema'];let _0x5f1710=_0x4fc031;for(;_0x71854b[_0x5f1710]&&_0x71854b[_0x5f1710]['isAdded'];)_0x5f1710++;let _0x2a6e3a=_0x223a6f;for(;_0x1d8416[_0x2a6e3a]&&_0x1d8416[_0x2a6e3a]['isRemoved'];)_0x2a6e3a++;_0x57a686(_0x71854b,_0x4fc031,_0x5f1710),_0x57a686(_0x1d8416,_0x223a6f,_0x2a6e3a);const _0x38cc87=_0x1d8416['slice'](_0x223a6f,_0x2a6e3a)['concat'](_0x71854b['slice'](_0x4fc031,_0x5f1710));return _0x38cc87['sort']((_0x45d5b3,_0x2659bd)=>_0x45d5b3['side']!=_0x2659bd['side']?_0x45d5b3['side']-_0x2659bd['side']:_0x45d5b3['level']!=_0x2659bd['level']?_0x45d5b3['level']-_0x2659bd['level']:_0x45d5b3['distance']!=_0x2659bd['distance']?_0x2659bd['distance']-_0x45d5b3['distance']:!!_0x45d5b3['isAdded']!=!!_0x2659bd['isAdded']?-0x1==_0x45d5b3['side']||0x0==_0x45d5b3['side']?_0x45d5b3['isAdded']?-0x1:0x1:_0x45d5b3['isAdded']?0x1:-0x1:_0x45d5b3['index']-_0x2659bd['index']),{'commonTape':_0x38cc87,'iEnd':_0x5f1710,'jEnd':_0x2a6e3a};function _0x57a686(_0xcd567e,_0x5badae,_0x3fa5de){let _0x187e8d=-0x1,_0x476670=Number['POSITIVE_INFINITY'],_0x8b2185=!0x0;for(let _0x273f53=_0x5badae;_0x273f53<_0x3fa5de;_0x273f53++)if(_0x3b0c30['isInline'](_0xcd567e[_0x273f53]['item'])||(_0x8b2185=!0x1),_0xcd567e[_0x273f53]['item']['startIndex']<_0x5badae&&(_0x187e8d=_0x273f53),_0xcd567e[_0x273f53]['item']['endIndex']>=_0x3fa5de){_0x476670=_0x273f53;break;}_0x8b2185&&(_0x187e8d=_0x3fa5de-0x1);for(let _0x43d0f7=_0x5badae;_0x43d0f7<_0x3fa5de;_0x43d0f7++)_0xcd567e[_0x43d0f7]['side']=_0x43d0f7<=_0x187e8d?-0x1:_0x43d0f7<_0x476670?0x0:0x1,_0xcd567e[_0x43d0f7]['index']=_0x43d0f7;let _0x5a1d88=0x0;for(let _0x7505c=_0x5badae;_0x7505c<=_0x187e8d;_0x7505c++)0x0==_0xcd567e[_0x7505c]['distance']?_0xcd567e[_0x7505c]['level']=_0x5a1d88:(_0x5a1d88++,_0xcd567e[_0x7505c]['level']=_0x5a1d88,_0x5a1d88++);for(let _0x9f02df=_0x5badae;_0x9f02df<_0x3fa5de;_0x9f02df++)0x0==_0xcd567e[_0x9f02df]['side']&&(_0xcd567e[_0x9f02df]['level']=_0x5a1d88);_0x5a1d88=0x0;for(let _0x257562=_0x3fa5de-0x1;_0x257562>=_0x476670;_0x257562--)0x0==_0xcd567e[_0x257562]['distance']?_0xcd567e[_0x257562]['level']=_0x5a1d88:(_0x5a1d88--,_0xcd567e[_0x257562]['level']=_0x5a1d88,_0x5a1d88--);}}['_fixObsoleteTags'](_0x480dae){const _0x29f12c=new Map(),_0x19b692=this['editor']['model']['schema'];for(let _0x3528d9=0x1;_0x3528d9<_0x480dae['length'];_0x3528d9++){let _0x40303a,_0x3541c2,_0x9d0b21;const _0x17dde3=_0x480dae[_0x3528d9],_0x11fed8=_0x480dae[_0x3528d9-0x1];if('text'==_0x17dde3['type'])continue;if(_0x17dde3['type']!=_0x11fed8['type'])continue;if(!_0x19b692['isBlock'](_0x11fed8['item'])||_0x19b692['isLimit'](_0x11fed8['item']))continue;if(!_0x19b692['isBlock'](_0x17dde3['item'])||_0x19b692['isLimit'](_0x17dde3['item']))continue;if((_0x480dae[_0x3528d9]['isAdded']||_0x480dae[_0x3528d9]['isAddSuggestion'])&&_0x480dae[_0x3528d9-0x1]['isRemoved'])_0x40303a=_0x480dae[_0x3528d9],_0x3541c2=_0x480dae[_0x3528d9-0x1],_0x9d0b21=_0x3528d9-0x1;else{if(!_0x480dae[_0x3528d9]['isRemoved']||!_0x480dae[_0x3528d9-0x1]['isAdded']&&!_0x480dae[_0x3528d9-0x1]['isAddSuggestion'])continue;_0x40303a=_0x480dae[_0x3528d9-0x1],_0x3541c2=_0x480dae[_0x3528d9],_0x9d0b21=_0x3528d9;}const _0x50157e=_0x40303a['level']==_0x3541c2['level'],_0x4433fc=Math['abs'](_0x40303a['level'])<Math['abs'](_0x3541c2['level'])&&0x0==_0x3541c2['distance'];(_0x50157e||_0x4433fc)&&(_0x29f12c['set'](_0x3541c2['id'],_0x40303a['id']),_0x480dae['splice'](_0x9d0b21,0x1),_0x3528d9--,_0x40303a['isAdded']=!0x1);}for(let _0x59d72c=0x0;_0x59d72c<_0x480dae['length'];_0x59d72c++)_0x29f12c['has'](_0x480dae[_0x59d72c]['pairId'])&&(_0x480dae[_0x59d72c]['pairId']=_0x29f12c['get'](_0x480dae[_0x59d72c]['pairId']));}['_removeMissingPairs'](_0x314b93){const _0x3e7624=new Set(_0x314b93['map'](_0x4db8c9=>_0x4db8c9['id']));for(let _0x4ce20c=0x0;_0x4ce20c<_0x314b93['length'];_0x4ce20c++)_0x3e7624['has'](_0x314b93[_0x4ce20c]['pairId'])||0x0==_0x314b93[_0x4ce20c]['distance']||(_0x314b93[_0x4ce20c]['isIncorrect']=!0x0);return _0x314b93['filter'](_0x646294=>!_0x646294['isIncorrect']);}['_markMismatchedRemovedTags'](_0x36827c){const _0x44ba71=new Set();for(let _0x75294b=0x0;_0x75294b<_0x36827c['length'];_0x75294b++){if(_0x44ba71['has'](_0x36827c[_0x75294b]['id'])&&_0x36827c[_0x75294b]['isRemoved']&&(_0x36827c[_0x75294b]['isIncorrect']=!0x0),_0x36827c[_0x75294b]['isIncorrect'])continue;if(0x0==_0x36827c[_0x75294b]['distance'])continue;if('elementStart'!=_0x36827c[_0x75294b]['type'])continue;if(null==_0x36827c[_0x75294b]['pairId'])continue;let _0x5c1208=_0x75294b+0x1,_0x171e3c=0x0;for(;_0x36827c[_0x5c1208]['id']!=_0x36827c[_0x75294b]['pairId'];)'elementStart'==_0x36827c[_0x5c1208]['type']?_0x171e3c++:'elementEnd'==_0x36827c[_0x5c1208]['type']&&_0x171e3c--,_0x5c1208++;if(0x0!=_0x171e3c){if(_0x36827c[_0x75294b]['isRemoved'])_0x36827c[_0x75294b]['isIncorrect']=!0x0;else{for(;_0x5c1208!=_0x75294b;)_0x36827c[_0x5c1208]['isRemoved']&&0x0!=_0x36827c[_0x5c1208]['distance']&&(_0x36827c[_0x5c1208]['isIncorrect']=!0x0,_0x44ba71['add'](_0x36827c[_0x5c1208]['pairId'])),_0x5c1208--;}}}return _0x36827c['filter'](_0x178d6d=>!_0x178d6d['isIncorrect']);}['_removeUnsupportedChanges'](_0x5c96d5){const _0x4225e8=this['editor']['model']['schema'];for(let _0x4d5cf4=0x0;_0x4d5cf4<_0x5c96d5['length'];_0x4d5cf4++){if(!(_0x5c96d5[_0x4d5cf4]['isAdded']||_0x5c96d5[_0x4d5cf4]['isAddSuggestion']||_0x5c96d5[_0x4d5cf4]['isRemoved']||_0x5c96d5[_0x4d5cf4]['isRemoveSuggestion']))continue;if(0x0==_0x5c96d5[_0x4d5cf4]['distance'])continue;const _0x2ef8a7=_0x5c96d5[_0x4d5cf4]['item'];_0x4225e8['isBlock'](_0x2ef8a7)||_0x4225e8['isLimit'](_0x2ef8a7)||(_0x5c96d5[_0x4d5cf4]['isAdded']&&delete _0x5c96d5[_0x4d5cf4]['isAdded'],_0x5c96d5[_0x4d5cf4]['isAddSuggestion']&&delete _0x5c96d5[_0x4d5cf4]['isAddSuggestion'],_0x5c96d5[_0x4d5cf4]['isRemoveSuggestion']&&delete _0x5c96d5[_0x4d5cf4]['isRemoveSuggestion'],_0x5c96d5[_0x4d5cf4]['isRemoved']&&(_0x5c96d5[_0x4d5cf4]['isIncorrect']=!0x0));}return _0x5c96d5['filter'](_0x1efbc0=>!_0x1efbc0['isIncorrect']);}['_makeModelFromTape'](_0x2e8ccb,_0x8d7b0b,_0x5cc86a){const _0x242bca=new _0x8c84c8(),_0x58c932=[],_0x53ea10=new Map(),_0x32694c=this['editor']['model'],_0x5aaa67=_0x32694c['schema'],_0x57c8a8=[_0x242bca],_0x52f2ab={},_0x1782a7={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x58b069=null;const _0x1b408d=[0x0];for(let _0x317674=0x0;_0x317674<_0x2e8ccb['length'];_0x317674++)if('elementStart'===_0x2e8ccb[_0x317674]['type']){_0x2e8ccb[_0x317674]['previousPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d);const _0x4905da=new _0x36b445(_0x2e8ccb[_0x317674]['item']['name'],_0x2e8ccb[_0x317674]['item']['getAttributes']());_0x57c8a8[0x0]['_appendChild'](_0x4905da),_0x1b408d['push'](0x0),_0x57c8a8['unshift'](_0x4905da),_0x2e8ccb[_0x317674]['nextPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d);}else'elementEnd'===_0x2e8ccb[_0x317674]['type']?(_0x57c8a8['shift'](),_0x2e8ccb[_0x317674]['previousPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d),_0x1b408d['pop'](),_0x1b408d[_0x1b408d['length']-0x1]++,_0x2e8ccb[_0x317674]['nextPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d)):(_0x2e8ccb[_0x317674]['previousPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d),_0x58b069?_0x58b069['_data']+=_0x2e8ccb[_0x317674]['item']['data']:_0x58b069=new _0x367598(_0x2e8ccb[_0x317674]['item']['data'],_0x2e8ccb[_0x317674]['item']['getAttributes']()),_0x2e8ccb[_0x317674+0x1]&&'text'===_0x2e8ccb[_0x317674+0x1]['type']&&_0x252208(_0x58b069,_0x2e8ccb[_0x317674+0x1]['item'])||(_0x57c8a8[0x0]['_appendChild'](_0x58b069),_0x58b069=null),_0x1b408d[_0x1b408d['length']-0x1]+=_0x2e8ccb[_0x317674]['item']['offsetSize'],_0x2e8ccb[_0x317674]['nextPosition']=_0x32694c['createPositionFromPath'](_0x242bca,_0x1b408d));for(let _0x5624b6=0x0;_0x5624b6<_0x2e8ccb['length'];_0x5624b6++){const _0x3a23f6=_0x2e8ccb[_0x5624b6]['previousPosition'],_0x1266d2=_0x2e8ccb[_0x5624b6]['nextPosition'];for(const _0x62e343 of _0x2e8ccb[_0x5624b6]['markersStart'])_0x53ea10['set'](_0x62e343,{'start':_0x3a23f6,'end':null});_0x178c3c('isRemoveSuggestion',_0x5624b6,_0x3a23f6,_0x1266d2),_0x178c3c('isAddSuggestion',_0x5624b6,_0x3a23f6,_0x1266d2),_0x178c3c('isRemoved',_0x5624b6,_0x3a23f6,_0x1266d2),_0x178c3c('isAdded',_0x5624b6,_0x3a23f6,_0x1266d2);for(const _0x18ec44 of _0x2e8ccb[_0x5624b6]['markersEnd']){const _0x320da4=_0x53ea10['get'](_0x18ec44);_0x320da4?_0x320da4['end']=_0x1266d2:_0x53ea10['set'](_0x18ec44,{'start':_0x1266d2,'end':_0x1266d2});}}for(const [_0x17730e,_0x2432d1]of _0x53ea10){const _0x790c5f=this['editor']['model']['createRange'](_0x2432d1['start'],_0x2432d1['end']);_0x242bca['markers']['set'](_0x17730e,_0x790c5f);}return _0x58c932['sort']((_0x3fc501,_0x21e4ed)=>{const _0x468630=_0x242bca['markers']['get']('revision:'+_0x3fc501['id']),_0x33221e=_0x242bca['markers']['get']('revision:'+_0x21e4ed['id']);return _0x468630['start']['isBefore'](_0x33221e['start'])?-0x1:_0x468630['start']['isAfter'](_0x33221e['start'])?0x1:_0x468630['end']['isBefore'](_0x33221e['end'])?-0x1:_0x468630['end']['isAfter'](_0x33221e['end'])?0x1:'add'===_0x3fc501['type']?-0x1:0x1;}),{'root':_0x242bca,'changes':_0x58c932};function _0x178c3c(_0x3d81aa,_0x5434c0,_0x2a497c,_0x59d5ca){const _0xb83d97=!!_0x2e8ccb[_0x5434c0][_0x3d81aa],_0x5f6cee=_0xb83d97?_0x2e8ccb[_0x5434c0][_0x3d81aa]['userId']:null,_0x27bfeb=_0x5434c0===_0x2e8ccb['length']-0x1,_0x5678a9=_0x1782a7[_0x3d81aa][0x0],_0x9e1cc=_0x5aaa67['isObject'](_0x2e8ccb[_0x5434c0]['item']);!_0x52f2ab[_0x3d81aa]&&_0xb83d97?_0x52f2ab[_0x3d81aa]={'start':_0x2a497c,'tapeItem':_0x2e8ccb[_0x5434c0],'userId':_0x5f6cee,'type':_0x3d81aa}:_0x52f2ab[_0x3d81aa]&&!_0xb83d97?(_0x52f2ab[_0x3d81aa]['end']=_0x2a497c,_0x438d1c(_0x52f2ab[_0x3d81aa]),_0x52f2ab[_0x3d81aa]=null):_0x52f2ab[_0x3d81aa]&&_0xb83d97&&_0x52f2ab[_0x3d81aa]['userId']!==_0x5f6cee&&(_0x52f2ab[_0x3d81aa]['end']=_0x2a497c,_0x5678a9&&_0x5678a9['userId']===_0x52f2ab[_0x3d81aa]['userId']||_0x438d1c(_0x52f2ab[_0x3d81aa]),_0x52f2ab[_0x3d81aa]={'start':_0x2a497c,'tapeItem':_0x2e8ccb[_0x5434c0],'userId':_0x5f6cee,'type':_0x3d81aa}),_0x52f2ab[_0x3d81aa]&&_0x9e1cc&&('elementStart'!==_0x2e8ccb[_0x5434c0]['type']||_0x5678a9&&_0x5678a9['userId']===_0x5f6cee||_0x1782a7[_0x3d81aa]['unshift']({'userId':_0x5f6cee,'object':_0x2e8ccb[_0x5434c0]['item'],'change':_0x52f2ab[_0x3d81aa]}),'elementEnd'===_0x2e8ccb[_0x5434c0]['type']&&_0x5678a9&&_0x5678a9['object']===_0x2e8ccb[_0x5434c0]['item']&&(_0x1782a7[_0x3d81aa]['shift'](),_0x52f2ab[_0x3d81aa]=_0x5678a9['change'])),_0x52f2ab[_0x3d81aa]&&_0x27bfeb&&(_0x52f2ab[_0x3d81aa]['end']=_0x59d5ca,_0x438d1c(_0x52f2ab[_0x3d81aa]),_0x52f2ab[_0x3d81aa]=null);}function _0x438d1c({start:_0x5b3cfc,end:_0x55475a,tapeItem:_0x1baeee,userId:_0x5e6ba1,type:_0x5c6f1d}){const _0x17076b=_0x1baeee['item'],_0x1d1e95=_0x32694c['schema']['isBlock'](_0x17076b)&&!_0x32694c['schema']['isLimit'](_0x17076b),_0x2c3f84=_0x5b3cfc['nodeAfter']==_0x55475a['parent']&&_0x55475a['isAtStart'];if(_0x1d1e95&&_0x2c3f84)return;const _0xb1ebe5=_0x32694c['createRange'](_0x5b3cfc,_0x55475a),_0x21bbb9=_0x8d7b0b['get'](_0x5e6ba1),_0x4306ec=new G({'author':_0x21bbb9,'type':'isAdded'==_0x5c6f1d||'isAddSuggestion'==_0x5c6f1d?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5c6f1d||'isRemoveSuggestion'==_0x5c6f1d},'createdAt':new Date(),'rootName':_0x5cc86a});_0x58c932['push'](_0x4306ec),_0x242bca['markers']['set']('revision:'+_0x4306ec['id'],_0xb1ebe5);}function _0x252208(_0x4ad7f4,_0x41aa8f){const _0xadb9e5=_0x4ad7f4['getAttributes'](),_0x43f893=_0x41aa8f['getAttributes']();for(const _0x4decf4 of _0xadb9e5){if(_0x4decf4[0x1]!==_0x41aa8f['getAttribute'](_0x4decf4[0x0]))return!0x1;_0x43f893['next']();}return _0x43f893['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3ca752=>{const _0x515370=_0x3ca752['markerName']['split'](':')[0x1],_0xf18685=this['_getChangeFromId'](_0x515370);if(!_0xf18685)return null;const _0x3719fc='add'==_0xf18685['type']?'insertion':'deletion',_0x2327b6=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3719fc];return _0xf18685['data']['isSuggestion']&&_0x2327b6['push']('ck-suggestion-marker-'+_0x3719fc+'-new'),this['activeChange']==_0xf18685&&_0x2327b6['push']('ck-suggestion-marker--active'),{'classes':_0x2327b6,'attributes':{'data-change-id':_0x515370}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xb60797=>{_0xb60797['on']('element:pre',(_0x5846ca,_0x1563f1,_0x594613)=>{const _0x1d509b=_0x1563f1['viewItem']['getChild'](0x0);if(!_0x1d509b||!_0x1d509b['is']('element','code'))return;if(!_0x594613['consumable']['consume'](_0x1d509b,{'attributes':['vid_start','vid_end']}))return;const _0x5b3714=_0x1563f1['modelRange']['start']['nodeAfter'];_0x594613['writer']['setAttribute']('vid_start',_0x1d509b['getAttribute']('vid_start'),_0x5b3714),_0x594613['writer']['setAttribute']('vid_end',_0x1d509b['getAttribute']('vid_end'),_0x5b3714);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x19ac0d=>{_0x19ac0d['on']('element',(_0x1bf9e6,_0x1db0d3,_0x154304)=>{if(!_0x154304['consumable']['consume'](_0x1db0d3['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1db0d3['modelRange']['isCollapsed'])return;const _0x285298=_0x1db0d3['modelRange']['start']['nodeAfter'];_0x285298['hasAttribute']('vid_start')||_0x285298['hasAttribute']('vid')||(_0x154304['writer']['setAttribute']('vid_start',_0x1db0d3['viewItem']['getAttribute']('vid_start'),_0x285298),_0x154304['writer']['setAttribute']('vid_end',_0x1db0d3['viewItem']['getAttribute']('vid_end'),_0x285298));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x323620=>_0x323620['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3acb4d,[,_0x386ea7])=>{['vid_start','vid_end','vid']['includes'](_0x386ea7)&&(_0x3acb4d['return']=!0x0,_0x3acb4d['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x30b250=>{_0x30b250['on']('attribute:vid',(_0x28e68a,_0x599c91,_0x56eac2)=>{if('\x20'!=_0x599c91['item']['data']||_0x599c91['item']['parent']['maxOffset']>0x1)return;if(!_0x56eac2['consumable']['consume'](_0x599c91['item'],_0x28e68a['name']))return;const _0x4d2df0=_0x56eac2['writer'],_0x574ae3=_0x56eac2['mapper']['toViewRange'](_0x599c91['range']);_0x4d2df0['wrap'](_0x574ae3,_0x4d2df0['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x399ccd){const _0x2d1cc5=_0x399ccd['plugins']['get']('RevisionViewer');return(_0x872862,_0x5143d3,_0x3cb4a9)=>{const _0x15246e=_0x5143d3['markerName']['split'](':')[0x1],_0xe12c9e=_0x2d1cc5['_getChangeFromId'](_0x15246e);if(!_0xe12c9e)return null;const _0x5934a='add'==_0xe12c9e['type']?'split':'merge';if(!_0x3cb4a9['consumable']['test'](_0x5143d3['markerRange'],_0x872862['name']))return;const _0xbdf84a=_0x5143d3['markerRange']['getWalker'](),_0x29e168=_0x5143d3['markerRange']['start'],_0x58fe55=_0x399ccd['model']['schema'];let _0x3fb43a=null,_0x141865=null,_0x2399a0=!0x1,_0x2d1a62=!0x1;for(const _0x5661a2 of _0xbdf84a){const _0xb00293=_0x5661a2['item'];_0x2399a0=_0x2399a0||_0x58fe55['isContent'](_0xb00293);const _0x470e68=_0x3cb4a9['mapper']['toViewElement'](_0xb00293);if(_0x470e68&&_0x470e68['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5661a2['type']&&(_0x58fe55['isBlock'](_0xb00293)&&!_0x58fe55['isLimit'](_0xb00293)&&(_0xb00293['nextSibling']||_0x29e168['isAtEnd']?_0x3fb43a&&_0x3fb43a['parent']==_0xb00293||(_0x3fb43a=_0xb00293,_0x3eecd5(_0x5661a2['previousPosition']),_0x2d1a62=!0x0):_0x141865=_0x141865||_0x5661a2['previousPosition']));}function _0x3eecd5(_0x5ebfd9){const _0xb022d9=_0x3cb4a9['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5934a}),_0x4bad47=_0x3cb4a9['mapper']['toViewPosition'](_0x5ebfd9);_0xe12c9e['data']['isSuggestion']&&_0x3cb4a9['writer']['addClass']('ck-suggestion-marker-'+_0x5934a+'-new',_0xb022d9),_0x2d1cc5['activeChange']==_0xe12c9e&&_0x3cb4a9['writer']['addClass']('ck-suggestion-marker--active',_0xb022d9),_0x3cb4a9['writer']['insert'](_0x4bad47,_0xb022d9),_0x3cb4a9['mapper']['bindElementToMarker'](_0xb022d9,_0x5143d3['markerName']);}_0x2399a0||_0x2d1a62||!_0x141865||_0x3eecd5(_0x141865);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x183929,_0x2b990a,_0x4f7066)=>{const _0x547f02=_0x4f7066['mapper']['markerNameToElements'](_0x2b990a['markerName']);if(_0x547f02){for(const _0x207779 of _0x547f02)(_0x207779['hasClass']('ck-suggestion-marker-split')||_0x207779['hasClass']('ck-suggestion-marker-merge'))&&(_0x4f7066['mapper']['unbindElementFromMarkerName'](_0x207779,_0x2b990a['markerName']),_0x4f7066['writer']['remove'](_0x207779));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x185518,_0x548ec4,_0x222d58)=>{const _0x5577a4=_0x548ec4['markerName']['split'](':')[0x1],_0x3c8e0e=this['_getChangeFromId'](_0x5577a4);if(!_0x3c8e0e)return null;const _0x2c8ad5='add'==_0x3c8e0e['type']?'split':'merge';if(_0x222d58['consumable']['test'](_0x548ec4['markerRange'],_0x185518['name']))for(const _0x410e76 of _0x548ec4['markerRange']['getItems']()){if(!_0x410e76['is']('element','softBreak'))continue;const _0x37213b=_0x222d58['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2c8ad5}),_0x27016b=_0x222d58['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x410e76));_0x3c8e0e['data']['isSuggestion']&&_0x222d58['writer']['addClass']('ck-suggestion-marker-'+_0x2c8ad5+'-new',_0x37213b),this['activeChange']==_0x3c8e0e&&_0x222d58['writer']['addClass']('ck-suggestion-marker--active',_0x37213b),_0x222d58['writer']['insert'](_0x27016b,_0x37213b),_0x222d58['mapper']['bindElementToMarker'](_0x37213b,_0x548ec4['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1fe74b=>{for(const _0x58301d of this['editor']['model']['document']['getRootNames']()){const _0x5d66f5=this['editor']['model']['document']['getRoot'](_0x58301d),_0x1aa0fc=this['editor']['editing']['view']['document']['getRoot'](_0x58301d);if(_0x1aa0fc){const _0x357bab=_0x5d66f5['getAttribute']('revisionHistoryAttachChange');if(_0x1fe74b['removeAttribute']('data-change-id',_0x1aa0fc),_0x1fe74b['removeClass']('ck-revision-history-root-add',_0x1aa0fc),_0x1fe74b['removeClass']('ck-revision-history-root-remove',_0x1aa0fc),_0x1fe74b['removeClass']('ck-revision-history-root--active',_0x1aa0fc),_0x357bab){const _0x379e1b=this['_getChangeFromId'](_0x357bab);if(!_0x379e1b)return null;_0x1fe74b['setAttribute']('data-change-id',_0x357bab,_0x1aa0fc),_0x1fe74b['addClass']('ck-revision-history-root-'+_0x379e1b['type'],_0x1aa0fc),this['activeChange']==_0x379e1b&&_0x1fe74b['addClass']('ck-revision-history-root--active',_0x1aa0fc);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2d0112=>'revision-comment:'+_0x2d0112,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x522cf0=>'revision-suggestion:'+_0x522cf0,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x20f2ef=>({'name':'suggestion:'+_0x20f2ef,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3dffae=>{const _0x5402b6=_0x3dffae['markerName']['split'](':')[0x1];return'insertion'!=_0x5402b6&&'deletion'!=_0x5402b6?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5402b6]};}}),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',(_0x3a635d,_0x4f6660,_0x515f20)=>{const _0x51b963=_0x515f20['mapper']['markerNameToElements'](_0x4f6660['markerName']);if(_0x51b963){for(const _0xc45d2c of _0x51b963)_0xc45d2c['is']('uiElement')&&(_0x515f20['mapper']['unbindElementFromMarkerName'](_0xc45d2c,_0x4f6660['markerName']),_0x515f20['writer']['remove'](_0xc45d2c));}},{'priority':'high'});}['_getChangeFromId'](_0xe1d884){return this['_changeIdToChange']['get'](_0xe1d884);}['_getViewForChange'](_0x18239d){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x18239d),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4d78ea,_0xc4c29,_0x179e7a,_0x27805b)=>{_0x27805b&&this['_balloon']['remove'](_0x27805b),_0x179e7a&&(this['_balloon']['add']({'view':_0x179e7a,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1ccd8c=this['editor']['editing'],_0xbd6ce0=this['_getChangeFromId'](_0x179e7a['changeId']);let _0x38c267;if(_0xbd6ce0['data']['isOnRoot']){const _0x2280b4=_0x1ccd8c['view']['getDomRoot'](_0xbd6ce0['rootName']);_0x38c267=Array['from'](_0x2280b4['getClientRects']());}else{const _0x51b47c=this['editor']['model']['markers']['get']('revision:'+_0x179e7a['changeId']);_0x38c267=Array['from'](_0x1ccd8c['mapper']['markerNameToElements'](_0x51b47c['name']))['map'](_0x37d9a8=>_0x1ccd8c['view']['domConverter']['mapViewToDom'](_0x37d9a8))['map'](_0x31a09d=>Array['from'](_0x31a09d['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x38c267[0x0];return _0x38c267['find'](_0x351c2b=>_0x351c2b['top']-0x3<=this['_activeViewTarget']['y']&&_0x351c2b['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x351c2b['left']-0x3<=this['_activeViewTarget']['x']&&_0x351c2b['right']+0x3>=this['_activeViewTarget']['x'])||_0x38c267[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x54a2b5,_0x29ac9f,_0x405df6,_0x19f4e7)=>{this['activeView']=_0x405df6?this['_getViewForChange'](_0x405df6):null,this['editor']['model']['change'](()=>{const _0x41a091=this['editor']['editing'];_0x19f4e7&&(_0x19f4e7['data']['isOnRoot']?_0x41a091['view']['change'](_0x5a8929=>{_0x5a8929['removeClass']('ck-revision-history-root--active',_0x41a091['view']['document']['getRoot'](_0x19f4e7['rootName']));}):_0x41a091['reconvertMarker']('revision:'+_0x19f4e7['id'])),_0x405df6&&(_0x405df6['data']['isOnRoot']?_0x41a091['view']['change'](_0x4bc1cc=>{_0x4bc1cc['addClass']('ck-revision-history-root--active',_0x41a091['view']['document']['getRoot'](_0x405df6['rootName']));}):_0x41a091['reconvertMarker']('revision:'+_0x405df6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3a1c39,_0x3ccd40)=>{if(this['activeChange'])return;const _0x2a2581=this['_findChangeIdFromDomTarget'](_0x3ccd40['target']),_0xc968f0=this['_changeIdToChange']['get'](_0x2a2581);_0xc968f0?(this['_activeViewTarget']={'x':_0x3ccd40['domEvent']['x'],'y':_0x3ccd40['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0xc968f0)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x527deb,_0x1cd368)=>{const _0x25a75b=this['_findChangeIdFromDomTarget'](_0x1cd368['target']),_0x45bf4e=this['_changeIdToChange']['get'](_0x25a75b);_0x45bf4e?(this['_activeViewTarget']={'x':_0x1cd368['domEvent']['x'],'y':_0x1cd368['domEvent']['y']},_0x45bf4e===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x45bf4e):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x10b218){do{const _0x5a8e05=_0x10b218['getAttribute']('data-change-id');if(_0x5a8e05)return _0x5a8e05;_0x10b218=_0x10b218['parent'];}while(_0x10b218);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x453dd6=>{for(const _0x777f07 of this['editor']['model']['markers'])_0x453dd6['removeMarker'](_0x777f07);});}}function Q(_0x52ba96,_0x236b13){return(_0x15d129,_0x3c68b5,_0x5581f5)=>{if(!_0x5581f5['consumable']['test'](_0x3c68b5['markerRange'],_0x15d129['name']))return;const _0x4e2b24=_0x3c68b5['markerRange']['getWalker'](),_0x68fe75=_0x3c68b5['markerRange']['start'],_0x26882a=_0x52ba96['model']['schema'];let _0x50dcde=null,_0xe56afb=null,_0x5e3145=!0x1,_0x18f6f6=!0x1;for(const _0x1ff4d2 of _0x4e2b24){const _0x3b5a15=_0x1ff4d2['item'];_0x5e3145=_0x5e3145||_0x26882a['isContent'](_0x3b5a15);const _0x179d45=_0x5581f5['mapper']['toViewElement'](_0x3b5a15);if(_0x179d45&&_0x179d45['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1ff4d2['type']&&(_0x26882a['isBlock'](_0x3b5a15)&&!_0x26882a['isLimit'](_0x3b5a15)&&(_0x3b5a15['nextSibling']||_0x68fe75['isAtEnd']?_0x50dcde&&_0x50dcde['parent']==_0x3b5a15||(_0x50dcde=_0x3b5a15,_0x2c999a(_0x1ff4d2['previousPosition']),_0x18f6f6=!0x0):_0xe56afb=_0xe56afb||_0x1ff4d2['previousPosition']));}function _0x2c999a(_0x4e8fd9){const _0x1a88e6=_0x5581f5['mapper']['toViewPosition'](_0x4e8fd9),_0x41f318=_0x5581f5['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x236b13});_0x5581f5['writer']['insert'](_0x1a88e6,_0x41f318),_0x5581f5['mapper']['bindElementToMarker'](_0x41f318,_0x3c68b5['markerName']);}_0x5e3145||_0x18f6f6||!_0xe56afb||_0x2c999a(_0xe56afb);};}class nt extends _0x4856a5{constructor(_0xd479fc){super(_0xd479fc);const _0x1027a2=_0xd479fc['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x1027a2,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1027a2,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5daa20=this['editor'],_0x2d6715=_0x5daa20['plugins']['get'](u),_0x3f7f50=_0x2d6715['isReady']?_0x2d6715['diff']['newRevisionId']:null;_0x5daa20['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3f7f50);}['refresh'](){const {isReady:_0x415a69,isEnabled:_0x4da55a,repository:_0x45a023,diff:_0x19bc19}=this['editor']['plugins']['get'](u),_0x1c47da=_0x19bc19&&_0x45a023['getLaterVisibleRevision'](_0x19bc19['newRevisionId']);this['isEnabled']=_0x415a69&&_0x4da55a&&Boolean(_0x1c47da);}}class rt extends _0x4856a5{['_step'];constructor(_0x33233a,{direction:_0x23d726}){super(_0x33233a);const _0x3b9753=_0x33233a['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x23d726?0x1:-0x1,this['listenTo'](_0x3b9753,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3b9753,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3b9753,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4d2802=this['editor'],_0x4dd573=_0x4d2802['plugins']['get'](u),{isNavigationMode:_0x1dfc10,currentChangeNumber:_0x558584}=_0x4dd573;let _0x4f2fc0;if(_0x4dd573['activeChange']=_0x1dfc10?_0x4dd573['diff']['changes']['get'](_0x558584+this['_step']):_0x4dd573['diff']['changes']['first'],_0x4dd573['activeChange']['data']['isOnRoot'])_0x4f2fc0=_0x4d2802['editing']['view']['getDomRoot'](_0x4dd573['activeChange']['rootName']);else{const _0x5bd95f=_0x4d2802['model']['markers']['get']('revision:'+_0x4dd573['activeChange']['id']);_0x4f2fc0=_0x1f08bc(_0x4d2802['editing'],_0x5bd95f);}_0x3a5a7e({'target':_0x4f2fc0,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4d73fd,currentChangeNumber:_0xc345de,numberOfChanges:_0x23bd13,isReady:_0xcca12f,isEnabled:_0x2b3934}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x2b3934&&_0xcca12f&&_0x23bd13)&&(!_0x4d73fd||(0x1===this['_step']?_0xc345de<_0x23bd13-0x1:_0xc345de>0x0));}}class Ri extends _0x4eb8a3{constructor(_0x460c68){super(_0x460c68);const _0x515c83=this['bindTemplate'],_0x37329f=new _0x41a1a9(_0x460c68),_0x40a43e=new _0x41a1a9(_0x460c68);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',(_0x49761c,_0x4be9d6)=>_0x49761c&&_0x4be9d6>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2feee6,_0x67075a,_0x2e25ec,_0x11d09a)=>{if(!_0x2feee6)return m(_0x460c68,'Loading...');if(!_0x2e25ec)return m(_0x460c68,'No\x20changes');const _0x5a272d=m(_0x460c68,'NUMBER_OF_CHANGES',_0x2e25ec);return _0x11d09a?m(_0x460c68,'X_OF_Y_CHANGES',[_0x67075a+0x1,_0x2e25ec]):_0x5a272d;}),_0x37329f['set']({'label':m(_0x460c68,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x4fea33}),_0x40a43e['set']({'label':m(_0x460c68,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xaf50d4}),_0x37329f['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x40a43e['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x37329f['on']('execute',()=>this['fire']('execute','backward')),_0x40a43e['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',_0x515c83['if']('_isStatusLabelVisible','ck-hidden',_0x5218d2=>!_0x5218d2)]},'children':[{'text':_0x515c83['to']('isNavigationMode',_0x49ef1f=>_0x49ef1f?m(_0x460c68,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x460c68,'Total')+':\x20')}]},{'text':_0x515c83['to']('_statusText')}]},new _0x4bb486(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x37329f,_0x40a43e]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0xbe21c4{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x29c48c=this['editor']['editing']['view'];_0x29c48c['change'](_0x5382f2=>{for(const _0x1e0da5 of _0x29c48c['document']['roots'])_0x5382f2['addClass'](ge,_0x1e0da5);});}['hide'](){const _0x449639=this['editor']['editing']['view'];_0x449639['change'](_0x212952=>{for(const _0x433201 of _0x449639['document']['roots'])_0x212952['removeClass'](ge,_0x433201);});}}class v extends _0xbe21c4{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,ji];}['init'](){const _0x56a944=this['editor'],_0x2acc35=_0x56a944['plugins']['get'](u),_0x19b829=_0x56a944['plugins']['get'](ji);_0x56a944['ui']['componentFactory']['add']('exitToEditing',_0x45271f=>{const _0x579d13=new _0x41a1a9(_0x45271f);return _0x579d13['set']({'label':m(_0x45271f,'Back\x20to\x20editing'),'icon':_0x31592a,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x579d13,'execute',()=>{_0x56a944['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x579d13;}),_0x56a944['ui']['componentFactory']['add']('restoreRevision',_0x3b269a=>{const _0x332dd8=new _0x41a1a9(_0x3b269a);return _0x332dd8['set']({'label':m(_0x3b269a,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x332dd8['bind']('isEnabled')['to'](_0x56a944['commands']['get']('restoreRevision')),this['listenTo'](_0x332dd8,'execute',()=>_0x56a944['execute']('restoreRevision')),_0x332dd8;}),_0x56a944['ui']['componentFactory']['add']('changesNavigation',_0x39b333=>{const _0x44eebf=new Ri(_0x39b333),_0x174861=_0x56a944['commands']['get']('showPreviousChange'),_0x547a8c=_0x56a944['commands']['get']('showNextChange');return _0x44eebf['bind']('isBackwardNavigationEnabled')['to'](_0x174861,'isEnabled'),_0x44eebf['bind']('isForwardNavigationEnabled')['to'](_0x547a8c,'isEnabled'),_0x44eebf['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2acc35),this['listenTo'](_0x44eebf,'execute',(_0x141e24,_0x14415c)=>{_0x56a944['execute']('forward'===_0x14415c?'showNextChange':'showPreviousChange');}),_0x44eebf;}),_0x19b829['show'](),_0x2acc35['on']('change:isReady',(_0xf8b8f2,_0x3d69c0,_0x9bb713)=>{_0x9bb713?_0x19b829['hide']():_0x19b829['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x414a77,_0x4d7b57){super(_0x414a77,_0x4d7b57);const _0x29c568=this['bindTemplate'];this['set']({'label':m(_0x414a77,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x414a77,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x29c568['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 _0x45d5e2=this['fieldView']['element'];this['_tooltipString']=_0x45d5e2['scrollWidth']>_0x45d5e2['clientWidth']&&_0x45d5e2['value']||'';}}class ni extends _0x4eb8a3{constructor(_0x4bd174,_0xda9fea,_0x3f11ee){super(_0x4bd174);const _0x5f5485=new _0x517cab();_0x5f5485['set']({'content':_0x21d8a3,'viewBox':'0\x200\x2011\x2010'});const _0xe4b36=['ck','ck-revision-history-sidebar__revision-author'];_0x3f11ee&&_0xe4b36['push']('ck-revision-history-sidebar__revision-author_creator');const _0x385da0=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x4bd174,_0x3f11ee?'Revision\x20creator':'Revision\x20author')},'children':[_0x5f5485,_0xda9fea['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xe4b36},'children':_0x385da0});}}function ai(_0x60784d,_0x3d95c5){const _0x1adb1f=_0x60784d['bindTemplate'],_0x35618a=_0x60784d['locale'],_0xe876a5=_0x1e23a0(_0x35618a);_0xe876a5['panelPosition']='sw';const _0x205617=function(_0x3df2cd,_0x5957d4){const _0x5f50f4=function(_0x3294e7,_0x22045c){const _0x5af13e=_0x3294e7['locale'],_0x17e885={'Compare\x20against\x20selected':m(_0x5af13e,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x5af13e,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x5af13e,'Restore\x20this\x20revision')};return _0x22045c['map'](_0x426ed8=>{const _0x508b45=_0x17e885[_0x426ed8['name']];return _0x508b45&&_0x508b45!==_0x426ed8['name']&&(_0x426ed8['name']=_0x508b45),_0x426ed8;});}(_0x3df2cd,_0x5957d4),_0x31ba26=new _0x504df2();for(const _0x40fea9 of _0x5f50f4){const _0x3fb40d={'type':'button','model':new to({'label':_0x40fea9['name'],'class':_0x40fea9['class'],'withText':!0x0,'role':'menuitem','_action':_0x40fea9['action']})};_0x3fb40d['model']['bind']('isEnabled')['to'](_0x3df2cd,'isActionsDropdownOpen',_0x1e462e=>'function'!=typeof _0x40fea9['isEnabled']||(!_0x1e462e||_0x40fea9['isEnabled'](_0x3df2cd))),_0x31ba26['add'](_0x3fb40d);}return _0x31ba26;}(_0x60784d,_0x3d95c5);return _0x60784d['bind']('isActionsDropdownOpen')['to'](_0xe876a5,'isOpen'),_0xe876a5['buttonView']['set']({'label':m(_0x35618a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3f675d}),_0xe876a5['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1adb1f['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1adb1f['to'](_0xa5d333=>_0xa5d333['stopPropagation']())}}),_0xe876a5['on']('execute',_0x4bfb7e=>{_0x60784d['isReady']&&'function'==typeof _0x4bfb7e['source']['_action']&&_0x4bfb7e['source']['_action'](_0x60784d);}),_0x105741(_0xe876a5,_0x205617,{'role':'menu'}),_0xe876a5['listenTo'](_0x60784d,'change:isActionsDropdownOpen',(_0x1b383a,_0x3da273,_0x12bdc7)=>{if(_0x12bdc7)for(const _0x21f683 of _0xe876a5['listView']['items']){const _0x5325a1=_0x21f683['children']['first'],_0xeafb9f=_0x3d95c5['find'](_0x2511a1=>_0x2511a1['action']===_0x5325a1['_action'])['isVisible'];_0x21f683['isVisible']=void 0x0===_0xeafb9f||_0xeafb9f(_0x60784d);}}),_0xe876a5;}class _i extends/* #__PURE__ -- @preserve */
27
+ _0x43b418(_0x4eb8a3){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x5738c6,_0x5b97df,_0x4d84a6,_0xc41357){super(_0x5738c6);const _0x1e17f5=this['bindTemplate'],_0x13e4e2=function(_0x3a8e67,_0x56c60e){const _0x1cff2f=Array['from'](_0x56c60e['authors'])['filter'](_0x8d36a7=>_0x8d36a7!=_0x56c60e['creator']);return _0x56c60e['creator']&&_0x1cff2f['unshift'](_0x56c60e['creator']),_0x1cff2f['map'](_0x19f14f=>new ni(_0x3a8e67,_0x19f14f,_0x19f14f==_0x56c60e['creator']));}(_0x5738c6,_0x5b97df);this['id']=_0x5b97df['id'],this['_revision']=_0x5b97df,this['_requireRevisionName']=_0xc41357,this['bind']('name','createdAt')['to'](_0x5b97df),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x12c4c9=>{return _0x7a894a=_0x5738c6['uiLanguage'],(_0x33ccb7=_0x12c4c9)['toLocaleDateString'](_0x7a894a,{'month':'long','day':'numeric'})+',\x20'+_0x33ccb7['toLocaleTimeString'](_0x7a894a,{'hour':'numeric','minute':'numeric'});var _0x7a894a,_0x33ccb7;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x5738c6,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x12b581=>_0x12b581||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x27086c,_0x4633b6)=>_0x27086c&&_0x4633b6),this['revisionActionsView']=_0x4d84a6&&_0x4d84a6['length']?ai(this,_0x4d84a6):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x1e17f5['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x1e17f5['if']('isEnabled','ck-disabled',_0x4b7288=>!_0x4b7288),_0x1e17f5['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x1e17f5['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x1e17f5['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':_0x1e17f5['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':_0x13e4e2}]},this['revisionActionsView']],'on':{'click':_0x1e17f5['to'](_0x28f86e=>{_0x28f86e['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x13d4ec=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x13d4ec,'change',()=>{this['_requireRevisionName']&&!_0x13d4ec['value']||this['fire']('setName',{'id':this['id'],'name':_0x13d4ec['value']}),_0x13d4ec['value']||(_0x13d4ec['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function li(_0x18435a,_0x2b122d){const _0x367910=_0x275244['fromJSDate'](_0x18435a)['setLocale'](_0x2b122d),_0x14f443=_0x275244['local'](),_0x32045f=_0x14f443['minus']({'days':0x1})['startOf']('day');let _0x29eeaa,_0x569009;return _0x367910['hasSame'](_0x14f443,'day')?(_0x29eeaa=_0x367910['startOf']('day')['toJSDate'](),_0x569009=_0x367910['toRelativeCalendar']()):_0x367910['hasSame'](_0x32045f,'day')?(_0x29eeaa=_0x32045f['toJSDate'](),_0x569009=_0x367910['toRelativeCalendar']()):_0x367910['hasSame'](_0x14f443,'week')?(_0x29eeaa=_0x367910['startOf']('week')['toJSDate'](),_0x569009=_0x367910['weekdayLong']||''):_0x367910['hasSame'](_0x14f443,'year')?(_0x29eeaa=_0x367910['startOf']('month')['toJSDate'](),_0x569009=_0x367910['monthLong']||''):(_0x29eeaa=_0x367910['startOf']('year')['toJSDate'](),_0x569009=String(_0x367910['year'])),{'startDate':_0x29eeaa,'localizedPeriodName':_0x569009};}class bi extends _0x4eb8a3{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3059d7,_0xdeb8f9,_0x304654,_0x4f7d57){super(_0x3059d7);const _0x36f166=li(_0xdeb8f9,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0xdeb8f9,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x304654,this['_requireRevisionName']=_0x4f7d57,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':_0x36f166}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x344626){const _0x5c4019=new _i(this['locale'],_0x344626,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x5c4019);}['removeRevision'](_0x4efe99){const _0x3eae06=this['revisionViews']['find'](_0xaa8716=>_0xaa8716['id']===_0x4efe99['id']);this['revisionViews']['remove'](_0x3eae06);}}class fi extends _0x4eb8a3{constructor(_0x259d88){super(_0x259d88);const _0x3fc5c5=new _0x517cab();_0x3fc5c5['content']=_0x672cd0,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x3fc5c5,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x259d88,'Revision\x20history')]}]});}}class di extends _0x4eb8a3{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1dc235,_0x55de06,_0x312992,_0x2314cf){super(_0x1dc235);const _0x4ae934=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x55de06,this['_revisionActions']=_0x312992,this['_requireRevisionName']=_0x2314cf,this['on']('select',(_0x1b6688,_0x34db07)=>{this['fire']('revisionSelected',_0x34db07);}),this['on']('setName',(_0x317f7d,_0x45ea94)=>{this['fire']('revisionSetName',_0x45ea94);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new fi(_0x1dc235),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4ae934['if']('isEnabled','ck-disabled',_0x3e6253=>!_0x3e6253)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x383695 of this['_revisions'])this['_addRevision'](_0x383695);this['_revisions']['on']('add',(_0x89542c,_0x5baa9b)=>{this['_addRevision'](_0x5baa9b);}),this['_revisions']['on']('remove',(_0x2e7fdb,_0x43f4f4)=>{this['_removeRevision'](_0x43f4f4);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2b8f0d=>_0x2b8f0d['revisionViews']['map'](_0xdcc3f9=>_0xdcc3f9))['flat']();}['selectRevision'](_0x3fea49){for(const _0x37bd0a of this['revisionViews'])_0x3fea49&&_0x3fea49['id']===_0x37bd0a['id']?_0x37bd0a['select']():_0x37bd0a['deselect']();}['highlightRevisions'](_0x1f5965){for(const _0x4266e1 of this['revisionViews'])_0x1f5965['some'](({id:_0x331499})=>_0x331499===_0x4266e1['id'])?_0x4266e1['highlight']():_0x4266e1['unhighlight']();}['_addRevision'](_0x57916a){const _0x8d6df1=li(_0x57916a['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x2cbaff=this['timePeriodViews']['get'](0x0);_0x2cbaff&&_0x2cbaff['startDate']['getTime']()===_0x8d6df1['getTime']()||(_0x2cbaff=new bi(this['locale'],_0x8d6df1,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x2cbaff)),_0x2cbaff['addRevision'](_0x57916a);}['_removeRevision'](_0x2219da){const _0x1b873d=li(_0x2219da['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x1b873d)['removeRevision'](_0x2219da);}['_getTimePeriodViewByStartDate'](_0x1f3f6c){return this['timePeriodViews']['find'](_0x58756f=>_0x58756f['startDate']['getTime']()===_0x1f3f6c['getTime']());}}class d extends _0xbe21c4{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x457af1){super(_0x457af1),this['_revisionViewer']=_0x457af1['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xb8c21e=this['_revisionsRepository']['_revisions'],_0x1fe34b=this['_createRevisionActions'](),_0x1fffbe=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ai(this['editor']['locale'],_0xb8c21e,_0x1fe34b,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',(_0x2e4f98,_0x3e8f5f)=>{_0x3e8f5f['revisionViews']['on']('add',(_0x2f5391,_0x3f7227)=>{_0x3f7227['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)),_0x1fffbe['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x40be3b=this['_revisionsRepository']['getRevision'](0x0);if(_0x40be3b){const _0x323dc2=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x40be3b['id']);this['_revisionViewer']['compare'](_0x40be3b,_0x323dc2);}}['_handleRevisionSelected'](_0x1f20d1,_0x2f0e09){const _0x207695=this['_revisionsRepository']['getRevision'](_0x2f0e09['id']),_0x2c6fd4=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x207695['id']);this['_revisionViewer']['compare'](_0x207695,_0x2c6fd4);}['_handleRevisionSetName'](_0x114bea,_0x6e514b){this['_revisionsRepository']['getRevision'](_0x6e514b['id'])['setName'](_0x6e514b['name']);}['_handleDiffChange'](_0x2dbabe,_0x583082,_0x16d7c9){const _0xae2c85=this['_revisionsRepository']['getRevisionsInDiff'](_0x16d7c9);_0xae2c85['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0xae2c85),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0xae2c85[0x0]));}['_createRevisionActions'](){const _0x10aeec=this['editor'],_0x4f0978=d['availableRevisionActions'],_0x566daf=_0x10aeec['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x566daf['length'])return _0x566daf['map'](_0x63d609=>{const _0x404ff9='string'==typeof _0x63d609?Object['assign']({},_0x4f0978[_0x63d609]):_0x63d609;return _0x404ff9['action']=_0x404ff9['action']['bind'](this,_0x10aeec),_0x404ff9['isVisible']&&(_0x404ff9['isVisible']=_0x404ff9['isVisible']['bind'](this,_0x10aeec)),_0x404ff9;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x41e82c},_0x272eda)=>{const _0x46fcdb=_0x41e82c['get'](u),_0x6163dd=_0x46fcdb['repository'];let _0x6005e9=_0x46fcdb['diff']['newRevisionId'],_0x35e904=_0x272eda['id'];_0x6163dd['getIndex'](_0x6005e9)>_0x6163dd['getIndex'](_0x35e904)&&([_0x6005e9,_0x35e904]=[_0x35e904,_0x6005e9]),_0x46fcdb['compare'](_0x6005e9,_0x35e904);},'isVisible':({plugins:_0x4596bb},_0x307797)=>{const _0x93528d=_0x4596bb['get'](u);return!(_0x93528d['repository']['getRevisionsInDiff'](_0x93528d['diff'])['length']>0x2)&&!_0x307797['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x96664a,{id:_0x161ef6})=>{_0x96664a['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x161ef6);},'isVisible':({plugins:_0x3fa212},_0x5cfdff)=>!!_0x3fa212['get'](u)['repository']['getLaterVisibleRevision'](_0x5cfdff['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xb4f842},{id:_0x216e99,revisionNameView:_0x3b7dfa})=>{const _0x3cd260=_0xb4f842['get'](u),_0x39820e=_0x3cd260['repository']['getEarlierVisibleRevision'](_0x216e99);_0x3cd260['compare'](_0x216e99,_0x39820e),_0x3b7dfa['focus'](),_0x3b7dfa['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x3baaea,_0x8d095a){super(_0x3baaea),this['_view']=_0x8d095a,this['_toolbarConfig']=st(_0x3baaea['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x4180e2){const _0x333884=this['editor'],_0x33e5c6=this['view'],_0x5187a3=_0x333884['editing']['view'],_0x121255=_0x33e5c6['editable'],_0x35aa7e=_0x5187a3['document']['getRoot']();_0x121255['name']=_0x35aa7e['rootName'],_0x33e5c6['render']();const _0x1f48a6=_0x121255['element'];this['setEditableElement'](_0x121255['name'],_0x1f48a6),_0x33e5c6['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5187a3['attachDomRoot'](_0x1f48a6),this['_elementReplacer']['replace'](_0x4180e2,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x22d7fa=this['view'],_0x5565ea=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x5565ea['detachDomRoot'](_0x22d7fa['editable']['name']),_0x22d7fa['destroy']();}['_initToolbar'](){const _0x3f6bc2=this['view'];_0x3f6bc2['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3f6bc2['stickyPanel']['limiterElement']=_0x3f6bc2['element'],_0x3f6bc2['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x2422dd})=>_0x2422dd),_0x3f6bc2['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3f6bc2['toolbar']);}}class ii extends _0x36dce6{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x3ecaae,_0x1f602c,_0x5749ba={}){super(_0x3ecaae),this['stickyPanel']=new _0x4cd550(_0x3ecaae),this['toolbar']=new _0x41e7e1(_0x3ecaae,{'shouldGroupWhenFull':_0x5749ba['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x3ecaae,_0x1f602c);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
30
- _0x5c8f5e(_0x264d8c){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x413e27,_0x1d01c9){super(_0x1d01c9),this['sourceElement']=_0x413e27,this['model']['document']['createRoot']();const _0x8679f7=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x8679f7);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0xa7ad79,_0xb2e1bc){const _0x47d321=new this(_0xa7ad79,_0xb2e1bc);return await _0x47d321['initPlugins'](),await _0x47d321['ui']['init'](_0xa7ad79),await _0x47d321['data']['init'](_0x47d321['config']['get']('initialData')||''),_0x47d321['fire']('ready'),_0x47d321;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class at extends _0xcfa495{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x941c7){function _0x4d6626(_0x380ab4){return _0x380ab4['map'](_0x3ddf66=>String['fromCharCode'](_0x3ddf66))['join']('');}super(_0x941c7),this['result']='end',_0x941c7[_0x4d6626([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d6626([0x76,0x69,0x65,0x77])][_0x4d6626([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4d6626([0x61,0x75,0x74,0x6f]),_0x941c7[_0x4d6626([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4d6626([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4d6626([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4d6626([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4d6626([0x6f,0x6b])});}}class ht extends _0xcfa495{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x5ebfb4){if(super(_0x5ebfb4),!this['editor']['config']['get']('revisionHistory'))throw new _0x70053c('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x211d1f=>this['_showRevisionViewer']({..._0x211d1f,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x3e6092=>this['_closeRevisionViewer'](_0x3e6092)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4c8ca0=>this['_restoreRevision'](_0x4c8ca0)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2d6dc1){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2d6dc1;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x249474){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x249474);}['getRevision'](_0x5d4e41){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x5d4e41);}['getRevisions'](_0x4c1917){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x4c1917||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x49bd88=this['editor'],_0x1b875b=_0x315b3d(_0x49bd88,p),_0x3609b6=_0x49bd88['plugins']['get']('RevisionTracker'),_0x401013=_0x49bd88['plugins']['get']('Users')['users'];return _0x1b875b['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1b875b['lazyRoots'],(_0x1b875b['plugins']['push'](at,u,v,class extends _0xcfa495{static get['requires'](){return[u,'Users'];}['init'](){const _0x40b7cb=this['editor']['plugins']['get']('Users');for(const _0x5d5a01 of _0x401013)_0x5d5a01['isAnonymous']||_0x40b7cb['getUser'](_0x5d5a01['id'])||_0x40b7cb['addUser'](_0x5d5a01);const _0x19791b=_0x3609b6['repository']['getRevisions']();let _0x58eb08=null;const _0x504576=this['editor']['plugins']['get']('RevisionViewer');_0x504576['adapter']=_0x3609b6['adapter'],_0x504576['bind']('isEnabled')['to'](_0x3609b6),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x49bd88,'isReadOnly',_0x4c8917=>!_0x4c8917);for(const _0x3bce6a of _0x19791b){const _0x57626b=null===_0x3bce6a['creator'];if(_0x57626b&&_0x3bce6a['toVersion']===_0x3bce6a['fromVersion'])continue;const _0x250a01=_0x3bce6a['toJSON']();_0x504576['addRevisionData'](_0x250a01,(_0x946eec,_0x166d50,_0x1176f6)=>{if(_0x57626b){if(_0x58eb08)_0x58eb08['_update'](_0x946eec,_0x166d50);else{if(!_0x166d50){const _0x48f5d6=_0x1176f6['toJSON']();_0x48f5d6['id']=_0x51ba1f(),_0x3609b6['saveRevision'](_0x48f5d6,_0x1176f6['toVersion'])['then'](_0x2940d5=>{_0x58eb08=_0x2940d5;});}}}else _0x3bce6a['_update'](_0x946eec,_0x166d50);});}}},d),_0x1b875b);}['_enhanceShowRevisionViewerCallback'](){const _0x586138=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x5f3420=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x64cd2b=this['editor']['plugins']['get']('Autosave');await _0x64cd2b['save']();}else await _0x5f3420['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5a5f29=this['editor']['plugins']['get']('Dialog');_0x5a5f29['isOpen']&&_0x5a5f29['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x344504=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x162bc0 of _0x344504)_0x162bc0['class']=_0x162bc0['class']?_0x162bc0['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x537ee8=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x537ee8&&_0x537ee8['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xcd5ef7=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xcd5ef7&&_0xcd5ef7['setAttribute']('tabindex','-1');}}const _0x26b951=this['_getRevisionViewerEditorConfig']();return _0x586138(_0x26b951)['then'](_0xf0e76e=>{return(this['_viewerEditor']=_0xf0e76e,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'),_0xf0e76e);})['catch'](_0x3f9e3a=>(console['error'](_0x3f9e3a),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x27989f=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x5a2ac0=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x47f670 of _0x5a2ac0)_0x47f670['class']='ck-tab-panel_disabled'===_0x47f670['class']?'':_0x47f670['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x289ecf=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x289ecf&&_0x289ecf['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x5a40a9=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x5a40a9&&_0x5a40a9['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x27989f(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2a24ed=this['editor']['plugins']['get']('Annotations');_0x2a24ed['refreshVisibility'](),_0x2a24ed['refreshPositioning']();}});});}['_showRevisionViewer'](_0x4c6c71){const _0x29147d=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x41a6a0=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2381cd=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x2381cd,_0x4c6c71)['then'](_0x99822a=>(_0x41a6a0['style']['display']='block',_0x29147d['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x99822a));}['_closeRevisionViewer'](_0xf4d92d){const _0x34e7d7=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x34e7d7['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xf4d92d['destroy']();}async['_restoreRevision'](_0x1acd25){const _0x3cefe6=this['editor'],_0x2da3d7=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x780cb1=_0x3cefe6['plugins']['get']('RevisionTracker'),_0x47682d=_0x3cefe6['plugins']['get']('RevisionHistoryUtils'),_0x174d96=_0x2da3d7['repository']['getRevision'](_0x1acd25);let _0x2260c5,_0x5b9edc,_0xe508a0;try{await _0x47682d['loadRevisionData'](_0x174d96,this['adapter']),_0x2260c5=_0x47682d['getRevisionDocumentData'](_0x174d96),_0x5b9edc=_0x47682d['getRevisionRootsAttributes'](_0x174d96);}catch(_0x1a7e63){return void console['error'](_0x1a7e63);}_0x3cefe6['model']['change'](_0x431da7=>{for(const _0x1a377f of Array['from'](_0x3cefe6['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x431da7['removeMarker'](_0x1a377f);}),_0x2da3d7['isReady']=!0x1,_0x3cefe6['model']['enqueueChange'](_0xb47284=>{_0xb47284['setSelection'](null),_0xb47284['removeSelectionAttribute'](_0x3cefe6['model']['document']['selection']['getAttributeKeys']());const _0x37151f=Object['keys'](_0x2260c5);for(const _0x62ac3 of _0x3cefe6['model']['document']['roots'])'$graveyard'!=_0x62ac3['rootName']&&_0x62ac3['isAttached']()&&!_0x37151f['includes'](_0x62ac3['rootName'])&&_0xb47284['detachRoot'](_0x62ac3);for(const _0xe7862a of _0x37151f){let _0x3a90fc=_0x3cefe6['model']['document']['getRoot'](_0xe7862a);_0x3a90fc&&_0x3a90fc['isAttached']()||(_0x3a90fc=_0xb47284['addRoot'](_0xe7862a));const _0x3f75f3=_0x5b9edc[_0xe7862a],_0x4d70b0=Object['keys'](_0x3f75f3),_0x4be697=_0x2260c5[_0xe7862a];for(const _0xc01e6 of _0x3a90fc['getAttributeKeys']())_0x4d70b0['includes'](_0xc01e6)||_0xb47284['removeAttribute'](_0xc01e6,_0x3a90fc);for(const _0x92fa6 of _0x4d70b0)_0xb47284['setAttribute'](_0x92fa6,_0x5b9edc[_0xe7862a][_0x92fa6],_0x3a90fc);_0xb47284['remove'](_0xb47284['createRangeIn'](_0x3a90fc)),_0xb47284['insert'](_0x3cefe6['data']['parse'](_0x4be697,_0x3a90fc),_0x3a90fc,0x0);}});const _0x2c9489=m(_0x3cefe6['locale'],'Restored');if(_0x174d96['name'])_0xe508a0=-0x1==_0x174d96['name']['indexOf'](_0x2c9489)?_0x2c9489+':\x20'+_0x174d96['name']:_0x174d96['name'];else _0xe508a0=_0x2c9489+':\x20'+(_0x174d96['createdAt']['toLocaleDateString'](_0x3cefe6['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x174d96['createdAt']['toLocaleTimeString'](_0x3cefe6['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x780cb1['saveRevision']({'name':_0xe508a0}),_0x2da3d7['isReady']=!0x0,_0x3cefe6['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ht as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,at as RevisionViewerIntegration,Ri as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,ot as ShowChangeCommand};
29
+ at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x2267a3){super(_0x2267a3),this['_revisionViewer']=_0x2267a3['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x168338=this['_revisionsRepository']['_revisions'],_0x542329=this['_createRevisionActions'](),_0x5d4d33=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x168338,_0x542329,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',(_0x7bc7df,_0x1da32e)=>{_0x1da32e['revisionViews']['on']('add',(_0x30c471,_0x1c4069)=>{_0x1c4069['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)),_0x5d4d33['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x1ccf28=this['_revisionsRepository']['getRevision'](0x0);if(_0x1ccf28){const _0x44c85c=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1ccf28['id']);this['_revisionViewer']['compare'](_0x1ccf28,_0x44c85c);}}['_handleRevisionSelected'](_0x2b6440,_0x109022){const _0x36851d=this['_revisionsRepository']['getRevision'](_0x109022['id']),_0x474575=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x36851d['id']);this['_revisionViewer']['compare'](_0x36851d,_0x474575);}['_handleRevisionSetName'](_0x144eb4,_0x324fa8){this['_revisionsRepository']['getRevision'](_0x324fa8['id'])['setName'](_0x324fa8['name']);}['_handleDiffChange'](_0x3da5b4,_0x12f878,_0x334a98){const _0x12ea71=this['_revisionsRepository']['getRevisionsInDiff'](_0x334a98);_0x12ea71['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x12ea71),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x12ea71[0x0]));}['_createRevisionActions'](){const _0x3e9f5a=this['editor'],_0x423ac3=d['availableRevisionActions'],_0x3ed7f9=_0x3e9f5a['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x3ed7f9['length'])return _0x3ed7f9['map'](_0x3b34cd=>{const _0x26f724='string'==typeof _0x3b34cd?Object['assign']({},_0x423ac3[_0x3b34cd]):_0x3b34cd;return _0x26f724['action']=_0x26f724['action']['bind'](this,_0x3e9f5a),_0x26f724['isVisible']&&(_0x26f724['isVisible']=_0x26f724['isVisible']['bind'](this,_0x3e9f5a)),_0x26f724;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x255071},_0x1ae674)=>{const _0x368d20=_0x255071['get'](u),_0x13fa56=_0x368d20['repository'];let _0x5c9aee=_0x368d20['diff']['newRevisionId'],_0x4c6260=_0x1ae674['id'];_0x13fa56['getIndex'](_0x5c9aee)>_0x13fa56['getIndex'](_0x4c6260)&&([_0x5c9aee,_0x4c6260]=[_0x4c6260,_0x5c9aee]),_0x368d20['compare'](_0x5c9aee,_0x4c6260);},'isVisible':({plugins:_0x4c41ed},_0x15069a)=>{const _0x272c57=_0x4c41ed['get'](u);return!(_0x272c57['repository']['getRevisionsInDiff'](_0x272c57['diff'])['length']>0x2)&&!_0x15069a['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x77e712,{id:_0x48e0e1})=>{_0x77e712['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x48e0e1);},'isVisible':({plugins:_0x529462},_0x45ca07)=>!!_0x529462['get'](u)['repository']['getLaterVisibleRevision'](_0x45ca07['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4a2888},{id:_0x53f0f4,revisionNameView:_0x1b5a00})=>{const _0x5436b2=_0x4a2888['get'](u),_0x4bc70f=_0x5436b2['repository']['getEarlierVisibleRevision'](_0x53f0f4);_0x5436b2['compare'](_0x53f0f4,_0x4bc70f),_0x1b5a00['focus'](),_0x1b5a00['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x8ecdf2,_0x44732b){super(_0x8ecdf2),this['_view']=_0x44732b,this['_toolbarConfig']=st(_0x8ecdf2['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x40ba78){const _0x5c7713=this['editor'],_0xe396d3=this['view'],_0x5dc76c=_0x5c7713['editing']['view'],_0x299ba9=_0xe396d3['editable'],_0x31599d=_0x5dc76c['document']['getRoot']();_0x299ba9['name']=_0x31599d['rootName'],_0xe396d3['render']();const _0x5df5ae=_0x299ba9['element'];this['setEditableElement'](_0x299ba9['name'],_0x5df5ae),_0xe396d3['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5dc76c['attachDomRoot'](_0x5df5ae),this['_elementReplacer']['replace'](_0x40ba78,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x1bd4cd=this['view'],_0x31c0d8=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x31c0d8['detachDomRoot'](_0x1bd4cd['editable']['name']),_0x1bd4cd['destroy']();}['_initToolbar'](){const _0xfb7ad0=this['view'];_0xfb7ad0['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0xfb7ad0['stickyPanel']['limiterElement']=_0xfb7ad0['element'],_0xfb7ad0['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x20cf39})=>_0x20cf39),_0xfb7ad0['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0xfb7ad0['toolbar']);}}class ii extends _0x20cce1{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x4fc2e0,_0x4c47eb,_0xcbe9b={}){super(_0x4fc2e0),this['stickyPanel']=new _0x82d6c7(_0x4fc2e0),this['toolbar']=new _0x392eb7(_0x4fc2e0,{'shouldGroupWhenFull':_0xcbe9b['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x4fc2e0,_0x4c47eb);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
30
+ _0x28570d(_0x1dbeab){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1c2cf6,_0x627cc3){super(_0x627cc3),this['sourceElement']=_0x1c2cf6,this['model']['document']['createRoot']();const _0x562f10=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x562f10);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x5d29c2,_0x241194){const _0x4a8436=new this(_0x5d29c2,_0x241194);return await _0x4a8436['initPlugins'](),await _0x4a8436['ui']['init'](_0x5d29c2),await _0x4a8436['data']['init'](_0x4a8436['config']['get']('initialData')||''),_0x4a8436['fire']('ready'),_0x4a8436;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class ht extends _0xbe21c4{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5148ce){function _0x36d76a(_0x50c02f){return _0x50c02f['map'](_0x53b80b=>String['fromCharCode'](_0x53b80b))['join']('');}super(_0x5148ce),this['result']='end',_0x5148ce[_0x36d76a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36d76a([0x76,0x69,0x65,0x77])][_0x36d76a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36d76a([0x61,0x75,0x74,0x6f]),_0x5148ce[_0x36d76a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x36d76a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36d76a([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x36d76a([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x36d76a([0x6f,0x6b])});}}class ct extends _0xbe21c4{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x13869e){if(super(_0x13869e),!this['editor']['config']['get']('revisionHistory'))throw new _0x1d6810('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xa1b671=>this['_showRevisionViewer']({..._0xa1b671,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2b8422=>this['_closeRevisionViewer'](_0x2b8422)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x204016=>this['_restoreRevision'](_0x204016)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x52c9a9){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x52c9a9;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x379ad1){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x379ad1);}['getRevision'](_0xa2ebb3){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0xa2ebb3);}['getRevisions'](_0x39eafb){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x39eafb||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x484705=this['editor'],_0x21d22c=_0x45ed39(_0x484705,p),_0x559d7f=_0x484705['plugins']['get']('RevisionTracker'),_0x5f4089=_0x484705['plugins']['get']('Users')['users'];return _0x21d22c['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x21d22c['lazyRoots'],(_0x21d22c['plugins']['push'](ht,u,v,class extends _0xbe21c4{static get['requires'](){return[u,'Users'];}['init'](){const _0x35816d=this['editor']['plugins']['get']('Users');for(const _0xf53218 of _0x5f4089)_0xf53218['isAnonymous']||_0x35816d['getUser'](_0xf53218['id'])||_0x35816d['addUser'](_0xf53218);const _0xc84228=_0x559d7f['repository']['getRevisions']();let _0x46bb10=null;const _0x5ad9f3=this['editor']['plugins']['get']('RevisionViewer');_0x5ad9f3['adapter']=_0x559d7f['adapter'],_0x5ad9f3['bind']('isEnabled')['to'](_0x559d7f),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x484705,'isReadOnly',_0x272815=>!_0x272815);for(const _0x4f97a5 of _0xc84228){const _0x227662=null===_0x4f97a5['creator'];if(_0x227662&&_0x4f97a5['toVersion']===_0x4f97a5['fromVersion'])continue;const _0x589586=_0x4f97a5['toJSON']();_0x5ad9f3['addRevisionData'](_0x589586,(_0x193a44,_0x10f71a,_0x1c637d)=>{if(_0x227662){if(_0x46bb10)_0x46bb10['_update'](_0x193a44,_0x10f71a);else{if(!_0x10f71a){const _0x2aaef3=_0x1c637d['toJSON']();_0x2aaef3['id']=_0x532896(),_0x559d7f['saveRevision'](_0x2aaef3,_0x1c637d['toVersion'])['then'](_0x31a9a2=>{_0x46bb10=_0x31a9a2;});}}}else _0x4f97a5['_update'](_0x193a44,_0x10f71a);});}}},d),_0x21d22c);}['_enhanceShowRevisionViewerCallback'](){const _0x2f6936=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x38da09=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x459461=this['editor']['plugins']['get']('Autosave');await _0x459461['save']();}else await _0x38da09['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x48bcfa=this['editor']['plugins']['get']('Dialog');_0x48bcfa['isOpen']&&_0x48bcfa['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5d2367=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3dde0e of _0x5d2367)_0x3dde0e['class']=_0x3dde0e['class']?_0x3dde0e['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x424946=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x424946&&_0x424946['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3a19ab=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3a19ab&&_0x3a19ab['setAttribute']('tabindex','-1');}}const _0x4a710f=this['_getRevisionViewerEditorConfig']();return _0x2f6936(_0x4a710f)['then'](_0x4d2c7a=>{return(this['_viewerEditor']=_0x4d2c7a,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'),_0x4d2c7a);})['catch'](_0x3c37e8=>(console['error'](_0x3c37e8),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x35a9df=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x1d2171=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1b22ee of _0x1d2171)_0x1b22ee['class']='ck-tab-panel_disabled'===_0x1b22ee['class']?'':_0x1b22ee['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x90fd37=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x90fd37&&_0x90fd37['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x22f6ba=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x22f6ba&&_0x22f6ba['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x35a9df(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3cc76d=this['editor']['plugins']['get']('Annotations');_0x3cc76d['refreshVisibility'](),_0x3cc76d['refreshPositioning']();}});});}['_showRevisionViewer'](_0x12dbd7){const _0x1ec0a5=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x23c032=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1a0798=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x1a0798,_0x12dbd7)['then'](_0x3aac38=>(_0x23c032['style']['display']='block',_0x1ec0a5['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3aac38));}['_closeRevisionViewer'](_0xfd6539){const _0x175ce3=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x175ce3['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xfd6539['destroy']();}async['_restoreRevision'](_0x2e4545){const _0x237011=this['editor'],_0x3a0657=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2e460b=_0x237011['plugins']['get']('RevisionTracker'),_0x11fca4=_0x237011['plugins']['get']('RevisionHistoryUtils'),_0x45c50f=_0x3a0657['repository']['getRevision'](_0x2e4545);let _0x58a0b2,_0x624875,_0x5f455a;try{await _0x11fca4['loadRevisionData'](_0x45c50f,this['adapter']),_0x58a0b2=_0x11fca4['getRevisionDocumentData'](_0x45c50f),_0x624875=_0x11fca4['getRevisionRootsAttributes'](_0x45c50f);}catch(_0x3a663){return void console['error'](_0x3a663);}_0x237011['model']['change'](_0x1e8174=>{for(const _0x1d49ea of Array['from'](_0x237011['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1e8174['removeMarker'](_0x1d49ea);}),_0x3a0657['isReady']=!0x1,_0x237011['model']['enqueueChange'](_0x957351=>{_0x957351['setSelection'](null),_0x957351['removeSelectionAttribute'](_0x237011['model']['document']['selection']['getAttributeKeys']());const _0xeece7c=Object['keys'](_0x58a0b2);for(const _0x1c1c51 of _0x237011['model']['document']['roots'])'$graveyard'!=_0x1c1c51['rootName']&&_0x1c1c51['isAttached']()&&!_0xeece7c['includes'](_0x1c1c51['rootName'])&&_0x957351['detachRoot'](_0x1c1c51);for(const _0x202c96 of _0xeece7c){let _0x20161a=_0x237011['model']['document']['getRoot'](_0x202c96);_0x20161a&&_0x20161a['isAttached']()||(_0x20161a=_0x957351['addRoot'](_0x202c96));const _0x2d1e97=_0x624875[_0x202c96],_0x331296=Object['keys'](_0x2d1e97),_0x3d3300=_0x58a0b2[_0x202c96];for(const _0x443159 of _0x20161a['getAttributeKeys']())_0x331296['includes'](_0x443159)||_0x957351['removeAttribute'](_0x443159,_0x20161a);for(const _0x569b16 of _0x331296)_0x957351['setAttribute'](_0x569b16,_0x624875[_0x202c96][_0x569b16],_0x20161a);_0x957351['remove'](_0x957351['createRangeIn'](_0x20161a)),_0x957351['insert'](_0x237011['data']['parse'](_0x3d3300,_0x20161a),_0x20161a,0x0);}});const _0x3ceeb8=m(_0x237011['locale'],'Restored');if(_0x45c50f['name'])_0x5f455a=-0x1==_0x45c50f['name']['indexOf'](_0x3ceeb8)?_0x3ceeb8+':\x20'+_0x45c50f['name']:_0x45c50f['name'];else _0x5f455a=_0x3ceeb8+':\x20'+(_0x45c50f['createdAt']['toLocaleDateString'](_0x237011['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x45c50f['createdAt']['toLocaleTimeString'](_0x237011['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2e460b['saveRevision']({'name':_0x5f455a}),_0x3a0657['isReady']=!0x0,_0x237011['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,ht as RevisionViewerIntegration,ji as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,rt as ShowChangeCommand};