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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _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 _0x4526a4,uid as _0x7da10a,Collection as _0x5c2418,logWarning as _0x50cc7e,FocusTracker as _0x5e371b,KeystrokeHandler as _0x1758ab,scrollViewportToShowTarget as _0x511ff8,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x307a19}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x37c447,set as _0x3e45f0,unset as _0x3bfaf3,isEqual as _0x218d59}from'es-toolkit/compat';import{Plugin as _0x5d9b40,PendingActions as _0x524b99,Command as _0x170f10,ElementApiMixin as _0x5a628a,Editor as _0x527c10}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x48917f,getMarkerDomElement as _0x4cd219,ConfirmMixin as _0x501c59,sanitizeEditorConfig as _0x214800}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0xa5fb42,ViewAttributeElement as _0xb7ce6e,ViewEmptyElement as _0x38066c,ViewRawElement as _0x5a91d4,ViewUIElement as _0x30fb5,ViewDocumentFragment as _0x436c2b,ViewText as _0x203872,ViewElement as _0x34185c,ModelElement as _0x5e7691,ModelRange as _0x209563,ModelPosition as _0x2d3910,ModelDocumentFragment as _0x1eaa31,ModelText as _0x125fca}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x23a599,IconChevronUp as _0x17ec06,IconChevronDown as _0x395705,IconUndo as _0x2e404c,IconUser as _0x3ea8ae,IconThreeVerticalDots as _0x5ab55c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x4086f9,View as _0x23ebf3,submitHandler as _0x58385d,LabeledFieldView as ti,createLabeledInputText as _0x5dd4bb,createDropdown as _0x1f2a8d,ListView as _0x175cc8,ListItemView as _0x4f78bd,ButtonView as _0x25e13b,MenuBarMenuView as _0x3be7f4,MenuBarMenuListView as _0x30e8c5,MenuBarMenuListItemView as _0x4f5764,MenuBarMenuListItemButtonView as _0x546e60,ContextualBalloon as _0x3e5dc6,ToolbarSeparatorView as _0x48fedf,IconView as _0x212a7e,addListToDropdown as _0x249ef5,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x24a91a,StickyPanelView as _0x23ce19,ToolbarView as _0x29b212,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x4a7254}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x4526a4(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x22b6ef){super(),this['id']=_0x22b6ef['id']||_0x7da10a(),this['creator']=_0x22b6ef['creator']||null,this['authors']=_0x22b6ef['authors']||[],this['diffData']=_0x22b6ef['diffData']||null,this['toVersion']=_0x22b6ef['toVersion']||0x0,this['fromVersion']=_0x22b6ef['fromVersion']||0x0,this['set']('name',_0x22b6ef['name']||''),this['set']('createdAt',_0x22b6ef['createdAt']||new Date()),this['set']('attributes',_0x22b6ef['attributes']||{});}['setName'](_0x5e63a7){this['_update']({'name':_0x5e63a7});}['setAttribute'](_0x14cd97,_0x10b4ce){const _0x5c944b=_0x37c447(this['attributes']);_0x3e45f0(_0x5c944b,_0x14cd97,_0x10b4ce),this['_update']({'attributes':_0x5c944b});}['removeAttribute'](_0x3976ae){const _0xda50cd=_0x37c447(this['attributes']);_0x3bfaf3(_0xda50cd,_0x3976ae),this['_update']({'attributes':_0xda50cd});}['_update'](_0x51cde1,_0x5a9d75=!0x1){let _0x4762ab=!0x1;const _0x342cde={'id':this['id']},_0x49cd08=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x514335 of _0x49cd08){const _0x537625=_0x51cde1[_0x514335];void 0x0!==_0x537625&&_0x537625!==this[_0x514335]&&(this[_0x514335]=_0x537625,_0x342cde[_0x514335]=_0x537625,_0x4762ab=!0x0);}_0x4762ab&&(_0x342cde['authors']&&(_0x342cde['authorsIds']=_0x342cde['authors']['map'](_0x4052f9=>_0x4052f9['id']),delete _0x342cde['authors']),this['fire']('_update',_0x342cde,_0x5a9d75));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x1beacd=>_0x1beacd['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x5d9b40{['_revisions'];static get['requires'](){return[_0x48917f];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1e42cf){super(_0x1e42cf),this['_revisions']=new _0x5c2418();}['afterInit'](){!async function(_0x499114){const _0x28a5d6=_0x4503fe([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]),_0x13f85c=0xeb829,_0x314131=0x359e09b0,_0x20564c=0x35997728^_0x314131,_0xc89be8=window[_0x4503fe([0x44,0x61,0x74,0x65])][_0x4503fe([0x6e,0x6f,0x77])](),_0x3fbd10=_0x499114[_0x4503fe([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4bf02b=new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2d41e4=>{_0x3fbd10[_0x4503fe([0x6f,0x6e,0x63,0x65])](_0x4503fe([0x72,0x65,0x61,0x64,0x79]),_0x2d41e4);}),_0x12b875={[_0x4503fe([0x6b,0x74,0x79])]:_0x4503fe([0x45,0x43]),[_0x4503fe([0x75,0x73,0x65])]:_0x4503fe([0x73,0x69,0x67]),[_0x4503fe([0x63,0x72,0x76])]:_0x4503fe([0x50,0x2d,0x32,0x35,0x36]),[_0x4503fe([0x78])]:_0x4503fe([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]),[_0x4503fe([0x79])]:_0x4503fe([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]),[_0x4503fe([0x61,0x6c,0x67])]:_0x4503fe([0x45,0x53,0x32,0x35,0x36])},_0x48c14c=_0x3fbd10[_0x4503fe([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4503fe([0x67,0x65,0x74])](_0x4503fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x22d863(){let _0x3a9870,_0x4d1da1=null,_0x5d69e9=null;try{if(_0x48c14c==_0x4503fe([0x47,0x50,0x4c]))return _0x4503fe([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3a9870=_0x21863c(),!_0x3a9870)return _0x4503fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3a9870[_0x4503fe([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5d69e9=_0x290c18(_0x3a9870[_0x4503fe([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3a9870[_0x4503fe([0x6a,0x74,0x69])])),await _0x374a4d()?_0xa8906e()?_0x1b864b()?_0x4503fe([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1e4b4f()?(_0x3a9870[_0x4503fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4503fe([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4d1da1=_0x131339(_0x4503fe([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x438d7f()):_0x4503fe([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4503fe([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4503fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4503fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1b864b(){const _0x219761=[_0x4503fe([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4503fe([0x74,0x72,0x69,0x61,0x6c])][_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a9870[_0x4503fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xc89be8/0x3e8:0xe10*_0x20564c;return _0x3a9870[_0x4503fe([0x65,0x78,0x70])]<_0x219761;}function _0xa8906e(){const _0x378172=_0x3a9870[_0x4503fe([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x378172)return!0x1;if(_0x378172[_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4503fe([0x2a])))return!0x0;if(_0x378172[_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4503fe([0x52,0x48])))return!0x0;if(_0x378172[_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4503fe([0x52,0x52,0x48]))){if(_0x1fb019())return!0x0;if(_0x1d3d96()||_0x225dff())return!0x0;}return!0x1;}function _0x1e4b4f(){const _0x5ddae3=_0x3a9870[_0x4503fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5ddae3||0x0==_0x5ddae3[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x423ec2}=new URL(window[_0x4503fe([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5ddae3[_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x423ec2))return!0x0;const _0x1fe960=_0x423ec2[_0x4503fe([0x73,0x70,0x6c,0x69,0x74])](_0x4503fe([0x2e]));return _0x5ddae3[_0x4503fe([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3312ba=>_0x3312ba[_0x4503fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4503fe([0x2a])))[_0x4503fe([0x6d,0x61,0x70])](_0x361c7a=>_0x361c7a[_0x4503fe([0x73,0x70,0x6c,0x69,0x74])](_0x4503fe([0x2e])))[_0x4503fe([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a777c=>_0x5a777c[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1fe960[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4503fe([0x6d,0x61,0x70])](_0x26ea98=>Array(_0x1fe960[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x26ea98[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4503fe([0x66,0x69,0x6c,0x6c])](_0x26ea98[0x0]===_0x4503fe([0x2a])?_0x4503fe([0x2a]):'')[_0x4503fe([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x26ea98))[_0x4503fe([0x73,0x6f,0x6d,0x65])](_0x334ee2=>_0x1fe960[_0x4503fe([0x65,0x76,0x65,0x72,0x79])]((_0x1a61e0,_0x44b496)=>_0x334ee2[_0x44b496]===_0x1a61e0||_0x334ee2[_0x44b496]===_0x4503fe([0x2a])));}function _0x438d7f(){return _0x4d1da1&&_0x5d69e9?new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d6e16,_0x1742a9)=>{_0x4d1da1[_0x4503fe([0x74,0x68,0x65,0x6e])](_0x2d6e16,_0x1742a9),_0x5d69e9[_0x4503fe([0x74,0x68,0x65,0x6e])](_0x228b1b=>{_0x228b1b!=_0x4503fe([0x56,0x61,0x6c,0x69,0x64])&&_0x2d6e16(_0x228b1b);},_0x1742a9);}):_0x4d1da1||_0x5d69e9||_0x4503fe([0x56,0x61,0x6c,0x69,0x64]);}}function _0x290c18(_0x3529b2,_0x28dff2){return new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x313b47=>{if(_0x3881a3())return _0x313b47(_0x4503fe([0x56,0x61,0x6c,0x69,0x64]));_0x5a27e6(),_0x3fbd10[_0x4503fe([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4503fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x42c772=!0x1;const _0x1c95f7=_0x7da10a();function _0xdc049b(_0x248612){return!!_0x248612&&(typeof _0x248612===_0x4503fe([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x248612===_0x4503fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x248612[_0x4503fe([0x74,0x68,0x65,0x6e])]===_0x4503fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x248612[_0x4503fe([0x63,0x61,0x74,0x63,0x68])]===_0x4503fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x300e6c(_0x2fc0c7){_0x9c3d52(_0x2fc0c7)[_0x4503fe([0x74,0x68,0x65,0x6e])](_0x3e94f2=>{if(!_0x3e94f2||_0x3e94f2[_0x4503fe([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4503fe([0x6f,0x6b]))return _0x4503fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3fb4b6(_0x2dc06f(_0x1c95f7+_0x28dff2))!=_0x3e94f2[_0x4503fe([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4503fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4503fe([0x56,0x61,0x6c,0x69,0x64]);})[_0x4503fe([0x74,0x68,0x65,0x6e])](_0x2c3a20=>(_0x30f7d6(),_0x2c3a20),()=>{const _0x51e5ad=_0x3fa48f();return null==_0x51e5ad?(_0x30f7d6(),_0x4503fe([0x56,0x61,0x6c,0x69,0x64])):_0x4503fe(_0xc89be8-_0x51e5ad>(0x11928db0^_0x314131)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4503fe([0x74,0x68,0x65,0x6e])](_0x313b47)[_0x4503fe([0x63,0x61,0x74,0x63,0x68])](()=>{_0x313b47(_0x4503fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2cc537=0x35a8e730^_0x314131;function _0x30f7d6(){const _0x1f538a=_0x4503fe([0x6c,0x6c,0x63,0x74,0x2d])+_0x3fb4b6(_0x2dc06f(_0x3529b2)),_0x367d45=_0x59fdf7(_0x3fb4b6(window[_0x4503fe([0x4d,0x61,0x74,0x68])][_0x4503fe([0x63,0x65,0x69,0x6c])](_0xc89be8/_0x2cc537)));window[_0x4503fe([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4503fe([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1f538a,_0x367d45);}function _0x3fa48f(){const _0x5bb193=_0x4503fe([0x6c,0x6c,0x63,0x74,0x2d])+_0x3fb4b6(_0x2dc06f(_0x3529b2)),_0x5eeb22=window[_0x4503fe([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4503fe([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5bb193);return _0x5eeb22?window[_0x4503fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x59fdf7(_0x5eeb22),0x10)*_0x2cc537:null;}function _0x9c3d52(_0x245ea4){return new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xfd4972,_0x8967ab)=>{_0x245ea4[_0x4503fe([0x74,0x68,0x65,0x6e])](_0xfd4972,_0x8967ab),window[_0x4503fe([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x8967ab,0x359fdd70^_0x314131);});}}_0x3fbd10[_0x4503fe([0x6f,0x6e])](_0x4503fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4c89f4,_0xa06da6)=>{if(_0xa06da6[0x0]!=_0x3529b2)return _0x313b47(_0x4503fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xa06da6[0x1]={..._0xa06da6[0x1],[_0x4503fe([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1c95f7};},{[_0x4503fe([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4503fe([0x68,0x69,0x67,0x68])}),_0x3fbd10[_0x4503fe([0x6f,0x6e])](_0x4503fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x148a7b=>{_0xdc049b(_0x148a7b[_0x4503fe([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x42c772=!0x0,_0x300e6c(_0x148a7b[_0x4503fe([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4503fe([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4503fe([0x6c,0x6f,0x77])}),_0x4bf02b[_0x4503fe([0x74,0x68,0x65,0x6e])](()=>{_0x42c772||_0x313b47(_0x4503fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3881a3(){return _0x3fbd10[_0x4503fe([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4503fe([0x76,0x69,0x65,0x77])][_0x4503fe([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4503fe([0x61,0x75,0x74,0x6f]);}function _0x5a27e6(){_0x3fbd10[_0x4503fe([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4503fe([0x76,0x69,0x65,0x77])][_0x4503fe([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4503fe([0x61,0x75,0x74,0x6f]);}}function _0x131339(_0x1623a6){const _0x4d4d81=[new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x121a68=>setTimeout(_0x121a68,0x3597377c^_0x314131)),_0x4bf02b[_0x4503fe([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3bf93d=>{const _0x1b67de=0x359e09b7^_0x314131,_0x385e97=_0x499114[_0x4503fe([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x52ffcc(){_0x385e97[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x1b67de&&_0x3bf93d();}_0x52ffcc(),_0x385e97[_0x4503fe([0x6f,0x6e])](_0x4503fe([0x61,0x64,0x64]),_0x52ffcc);})),new window[(_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x356912=>{function _0x35e23d(){for(const _0x1fb7b4 in window)if(window[_0x4503fe([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4503fe([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1fb7b4))&&window[_0x1fb7b4]==_0x13f85c)return _0x356912();_0x3fbd10[_0x4503fe([0x73,0x74,0x61,0x74,0x65])]!=_0x4503fe([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4503fe([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x35e23d,0x359e1a38^_0x314131);}_0x4d1355(_0x4503fe([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x35e23d();})];return window[_0x4503fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4503fe([0x72,0x61,0x63,0x65])](_0x4d4d81)[_0x4503fe([0x74,0x68,0x65,0x6e])](()=>_0x1623a6);}async function _0x332638(){if(await _0x4bf02b,_0x4d1355(_0x4503fe([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x39c9f5=_0x499114[_0x4503fe([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0xa0cb05=_0x499114[_0x4503fe([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])](_0x39c9f5[_0x4503fe([0x69,0x64])]),_0x5b8c92=_0x30870a(_0x4503fe([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x5b8c92[_0x4503fe([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x39c9f5['id'],_0xa0cb05?_0xa0cb05['id']:null,!0x0),_0x5b8c92[_0x4503fe([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4503fe([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5b8c92[_0x4503fe([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5b8c92[_0x4503fe([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x196f7a,void(_0x5b8c92[_0x4503fe([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x196f7a);}if(_0x4d1355(_0x4503fe([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x331c79=_0x30870a(_0x4503fe([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x331c79[_0x4503fe([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4503fe([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x331c79[_0x4503fe([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x331c79[_0x4503fe([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x196f7a,_0x331c79[_0x4503fe([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x196f7a;}_0x3fbd10[_0x4503fe([0x6d,0x6f,0x64,0x65,0x6c])][_0x4503fe([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x196f7a,_0x3fbd10[_0x4503fe([0x6d,0x6f,0x64,0x65,0x6c])][_0x4503fe([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x196f7a,_0x3fbd10[_0x4503fe([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4503fe([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1fb019(){return _0x4d1355(_0x4503fe([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x30870a(_0x4503fe([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4503fe([0x73,0x74,0x61,0x74,0x65])]==_0x4503fe([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1d3d96(){return _0x4d1355(_0x4503fe([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 _0x225dff(){return _0x4d1355(_0x4503fe([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x57bedb(_0x189806){const _0x5f349a=_0x10e4a1();_0x3fbd10[_0x5f349a]=_0x4503fe([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])+_0x189806,_0x189806[_0x4503fe([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4503fe([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x10e4a1()]=_0x13f85c),_0x189806!=_0x4503fe([0x56,0x61,0x6c,0x69,0x64])&&_0x332638();}function _0x10e4a1(){const _0x1382a5=window[_0x4503fe([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4503fe([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4503fe([0x6e,0x6f,0x77])]())[_0x4503fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4503fe([0x2e]),'');let _0xe43f08=_0x4503fe([0x76]);for(let _0x401b7b=0x0;_0x401b7b<_0x1382a5[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x401b7b+=0x2){let _0x45424e=window[_0x4503fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1382a5[_0x4503fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x401b7b,_0x401b7b+0x2));_0x45424e>=_0x28a5d6[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x45424e-=_0x28a5d6[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xe43f08+=_0x28a5d6[_0x45424e];}return _0xe43f08;}function _0x21863c(){const _0x1bf142=_0x48c14c[_0x4503fe([0x73,0x70,0x6c,0x69,0x74])](_0x4503fe([0x2e]));if(0x3!=_0x1bf142[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1ef0fa(_0x1bf142[0x1]);function _0x1ef0fa(_0x5bec68){const _0x562ca6=_0xd11c26(_0x5bec68);return _0x562ca6&&_0x68cbde()?_0x562ca6:null;function _0x68cbde(){const _0x4f360f=_0x562ca6[_0x4503fe([0x6a,0x74,0x69])],_0x5af0d2=window[_0x4503fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f360f[_0x4503fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4f360f[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5796b3={..._0x562ca6,[_0x4503fe([0x6a,0x74,0x69])]:_0x4f360f[_0x4503fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4f360f[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5796b3[_0x4503fe([0x76,0x63])],_0x2dc06f(_0x5796b3)==_0x5af0d2;}}}async function _0x374a4d(){let _0x30421d=!0x0;try{const _0x1b249b=_0x48c14c[_0x4503fe([0x73,0x70,0x6c,0x69,0x74])](_0x4503fe([0x2e])),[_0xbd9af9,_0x49f27c,_0x385f69]=_0x1b249b;return _0x5e0555(_0xbd9af9),await _0x368563(_0xbd9af9,_0x49f27c,_0x385f69),_0x30421d;}catch{return!0x1;}function _0x5e0555(_0xba95c7){const _0x23366a=_0xd11c26(_0xba95c7);_0x23366a&&_0x23366a[_0x4503fe([0x61,0x6c,0x67])]==_0x4503fe([0x45,0x53,0x32,0x35,0x36])||(_0x30421d=!0x1);}async function _0x368563(_0x64d0b1,_0x2ba3cd,_0x2d03e3){const _0x28ad8e=window[_0x4503fe([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4503fe([0x66,0x72,0x6f,0x6d])](_0x3dc04a(_0x2d03e3),_0x1e9bdd=>_0x1e9bdd[_0x4503fe([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xba5af5=new window[(_0x4503fe([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4503fe([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x64d0b1+_0x4503fe([0x2e])+_0x2ba3cd),_0x3de630=window[_0x4503fe([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4503fe([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3de630)return;const _0x14a6c3=await _0x3de630[_0x4503fe([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4503fe([0x6a,0x77,0x6b]),_0x12b875,{[_0x4503fe([0x6e,0x61,0x6d,0x65])]:_0x4503fe([0x45,0x43,0x44,0x53,0x41]),[_0x4503fe([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4503fe([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4503fe([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3de630[_0x4503fe([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4503fe([0x6e,0x61,0x6d,0x65])]:_0x4503fe([0x45,0x43,0x44,0x53,0x41]),[_0x4503fe([0x68,0x61,0x73,0x68])]:{[_0x4503fe([0x6e,0x61,0x6d,0x65])]:_0x4503fe([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x14a6c3,_0x28ad8e,_0xba5af5)||(_0x30421d=!0x1);}}function _0xd11c26(_0x5634c2){return _0x5634c2[_0x4503fe([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4503fe([0x65,0x79]))?JSON[_0x4503fe([0x70,0x61,0x72,0x73,0x65])](_0x3dc04a(_0x5634c2)):null;}function _0x3dc04a(_0xee41c6){return window[_0x4503fe([0x61,0x74,0x6f,0x62])](_0xee41c6[_0x4503fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4503fe([0x2b]))[_0x4503fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4503fe([0x2f])));}function _0x2dc06f(_0x5c745b){let _0x2a154a=0x1505;function _0x405ac3(_0x2193d4){for(let _0x425cf2=0x0;_0x425cf2<_0x2193d4[_0x4503fe([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x425cf2++){const _0x7a898c=_0x2193d4[_0x4503fe([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x425cf2);_0x2a154a=(_0x2a154a<<0x5)+_0x2a154a+_0x7a898c,_0x2a154a&=_0x2a154a;}}function _0x423a8a(_0x5b7a21){Array[_0x4503fe([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5b7a21)?_0x5b7a21[_0x4503fe([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x423a8a):_0x5b7a21&&typeof _0x5b7a21==_0x4503fe([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4503fe([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5b7a21)[_0x4503fe([0x73,0x6f,0x72,0x74])]()[_0x4503fe([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x19b08a,_0x308615])=>{_0x405ac3(_0x19b08a),_0x423a8a(_0x308615);}):_0x405ac3(window[_0x4503fe([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5b7a21));}return _0x423a8a(_0x5c745b),_0x2a154a>>>0x0;}function _0x3fb4b6(_0x3f5caa){return _0x3f5caa[_0x4503fe([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4503fe([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4503fe([0x30]));}function _0x59fdf7(_0x4db254){return _0x4db254[_0x4503fe([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4503fe([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4503fe([0x6a,0x6f,0x69,0x6e])]('');}function _0x4d1355(_0x9cb1f6){return _0x3fbd10[_0x4503fe([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4503fe([0x68,0x61,0x73])](_0x9cb1f6);}function _0x30870a(_0x1001a9){return _0x3fbd10[_0x4503fe([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4503fe([0x67,0x65,0x74])](_0x1001a9);}function _0x196f7a(){}function _0x4503fe(_0x3230bc){return _0x3230bc['map'](_0x3b1764=>String['fromCharCode'](_0x3b1764))['join']('');}_0x57bedb(await _0x22d863());}(this);}['createRevision'](_0x2a41a3){const _0x225cc0=this['editor']['plugins']['get']('Users');return new I({'id':_0x2a41a3['id'],'name':_0x2a41a3['name'],'creator':_0x2a41a3['creatorId']?_0x225cc0['getUser'](_0x2a41a3['creatorId']):null,'diffData':_0x2a41a3['diffData']||_0x2a41a3['data'],'authors':_0x2a41a3['authorsIds']['map'](_0x26338d=>_0x225cc0['getUser'](_0x26338d)),'createdAt':new Date(_0x2a41a3['createdAt']),'attributes':_0x2a41a3['attributes'],'fromVersion':_0x2a41a3['fromVersion'],'toVersion':_0x2a41a3['toVersion']});}['addRevision'](_0x624356,_0x5d0e4b=0x0){this['_revisions']['add'](_0x624356,_0x5d0e4b);}['getRevision'](_0x416bd8){return this['_revisions']['get'](_0x416bd8);}['getRevisions'](_0x239a40={'toJSON':!0x1}){const _0x476e12=Array['from'](this['_revisions']);return _0x476e12['reverse'](),_0x239a40['toJSON']?_0x476e12['map'](_0x5d028e=>_0x5d028e['toJSON']()):_0x476e12;}['getIndex'](_0x53a7da){return this['_revisions']['getIndex'](_0x53a7da);}['getEarlierVisibleRevision'](_0x48354a){const [,_0x1ad509]=this['getRevisionsIterator'](_0x48354a,{'direction':'earlier'});return _0x1ad509;}['getLaterVisibleRevision'](_0x5984b2){const [,_0x3aefa2]=this['getRevisionsIterator'](_0x5984b2,{'direction':'later'});return _0x3aefa2;}['getRevisionsInDiff'](_0x42eb9a){const _0x286f10=[];for(const _0x52b6e2 of this['getRevisionsIterator'](_0x42eb9a['newRevisionId']))if(_0x286f10['push'](_0x52b6e2),_0x52b6e2['id']===_0x42eb9a['oldRevisionId'])break;return _0x286f10;}*['getRevisionsIterator'](_0x3ddce0,{direction:_0x42ccf6='earlier',filter:_0x2b2dd9=()=>!0x0}={}){const _0x10e715='earlier'===_0x42ccf6?0x1:-0x1;let _0xa07f9e=this['_revisions']['get'](_0x3ddce0),_0x182634=this['getIndex'](_0xa07f9e);for(yield _0xa07f9e;_0xa07f9e;){if(_0x182634+=_0x10e715,_0xa07f9e=this['getRevision'](_0x182634),!_0xa07f9e)return;_0x2b2dd9(_0xa07f9e)&&(yield _0xa07f9e);}}}class $ extends _0x5d9b40{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0xa5fb42,'c'],[_0xb7ce6e,'a'],[_0x38066c,'e'],[_0x5a91d4,'r'],[_0x30fb5,'u']]);['_typeCharToViewClass']=new Map([['c',_0xa5fb42],['a',_0xb7ce6e],['e',_0x38066c],['r',_0x5a91d4],['u',_0x30fb5]]);async['loadRevisionData'](_0x2a58a0,_0x3d6a74){if(_0x2a58a0['diffData']||!_0x3d6a74)return;const _0x3a3313=this['editor']['config']['get']('collaboration.channelId'),_0x5dc23e=await _0x3d6a74['getRevision']({'channelId':_0x3a3313,'revisionId':_0x2a58a0['id']});_0x2a58a0['diffData']=_0x5dc23e['diffData'];}['getRevisionDocumentData'](_0xdbfadc){const _0x5b8e9d={};for(const _0x5ddb7c in _0xdbfadc['diffData']){if(_0xdbfadc['diffData'][_0x5ddb7c]['attachChange']&&!_0xdbfadc['diffData'][_0x5ddb7c]['attachChange']['isAttached'])continue;const _0x42075d=this['_removeRevisionMarkers'](JSON['parse'](_0xdbfadc['diffData'][_0x5ddb7c]['insertions'])),_0x179a4a=this['editor']['editing']['view']['document'],_0xa28929=new _0x436c2b(_0x179a4a,_0x42075d['map'](_0x3da9e6=>this['_getViewFromDiffObj'](_0x3da9e6,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x5b8e9d[_0x5ddb7c]=this['editor']['data']['processor']['toData'](_0xa28929),this['editor']['data']['processor']['useFillerType']('default');}return _0x5b8e9d;}['getRevisionRootsAttributes'](_0x15ff89){const _0x3abec8={};for(const _0x3fe873 in _0x15ff89['diffData'])_0x15ff89['diffData'][_0x3fe873]['attachChange']&&!_0x15ff89['diffData'][_0x3fe873]['attachChange']['isAttached']||(_0x3abec8[_0x3fe873]=_0x15ff89['diffData'][_0x3fe873]['attributesAfter']||{});return _0x3abec8;}['_getTypeCharForViewElement'](_0x3c8c20){return this['_viewClassToTypeChar']['get'](_0x3c8c20['constructor']);}['_getViewFromDiffObj'](_0x27de18,_0x46315d){const _0x4422e6=this['editor']['editing']['view']['document'];if('string'==typeof _0x27de18)return new _0x203872(_0x4422e6,_0x27de18);{let _0x22c770,_0x76dde4;_0x76dde4='u'==_0x27de18['type']||'r'==_0x27de18['type']?[]:_0x27de18['children']['map'](_0x3e3b0f=>this['_getViewFromDiffObj'](_0x3e3b0f,_0x46315d));const _0x2ee8aa=this['_typeCharToViewClass']['get'](_0x27de18['type'])||_0x34185c,_0x1a0ee1=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x22c770=new _0x2ee8aa(_0x4422e6,_0x27de18['name'],_0x27de18['attributes'],_0x76dde4),'u'==_0x27de18['type']&&_0x27de18['children'][0x0]){const _0xf9f9b0=_0x27de18['children'][0x0];if(_0x22c770['render']=function(_0x145903){const _0x128c94=_0x145903['createElement']('div');return _0x128c94['innerHTML']=_0xf9f9b0,_0x128c94['childNodes'][0x0];},_0x46315d){const _0x3664fa=new _0x436c2b(_0x4422e6);_0x3664fa['_appendChild'](_0x22c770);const _0x47deea=Array['from'](_0x1a0ee1['viewChildrenToDom'](_0x3664fa,{'bind':!0x1})),_0x38692c=_0x1a0ee1['domDocument']['createElement']('div');_0x38692c['append'](..._0x47deea),_0x22c770=Array['from'](_0x1a0ee1['domChildrenToView'](_0x38692c))[0x0];}}else{if('r'==_0x27de18['type']&&_0x27de18['children'][0x0]){const _0x2f7684=_0x27de18['children'][0x0];if(_0x22c770['render']=function(_0x988cc7){_0x988cc7['innerHTML']=_0x2f7684;},_0x46315d){const _0x2f9abc=new _0x436c2b(_0x4422e6);_0x2f9abc['_appendChild'](_0x22c770);const _0xcfef8b=Array['from'](_0x1a0ee1['viewChildrenToDom'](_0x2f9abc,{'bind':!0x1})),_0x40cbc6=_0x1a0ee1['domDocument']['createElement']('div');_0x40cbc6['append'](..._0xcfef8b);const _0x2f615b=Array['from'](_0x1a0ee1['domChildrenToView'](_0x40cbc6));_0x2f615b['length']>0x1?_0x22c770['_appendChild'](_0x2f615b):_0x22c770=_0x2f615b[0x0];}}}if(_0x27de18['customProperties']){for(const [_0x25bde0,_0x5653c5]of _0x27de18['customProperties'])_0x22c770['_setCustomProperty'](_0x25bde0,_0x5653c5);}const _0x3b3d36=void 0x0===_0x27de18['fillerOffset']?null:_0x27de18['fillerOffset'];return null!==_0x3b3d36&&(_0x22c770['getFillerOffset']=()=>_0x3b3d36),_0x22c770;}}['_makeModelFromViewString'](_0x551a40){const _0x10b9bb=JSON['parse'](_0x551a40),_0x20c151=this['editor']['editing']['view']['document'],_0x52b008=new _0x436c2b(_0x20c151,_0x10b9bb['map'](_0xa3ec5e=>this['_getViewFromDiffObj'](_0xa3ec5e,!0x0)));return this['editor']['data']['toModel'](_0x52b008);}['_removeRevisionMarkers'](_0x1e5bec){return(_0x1e5bec=_0x1e5bec['filter'](_0x4b2c66=>!_0x4b2c66['name']||'revision-start'!==_0x4b2c66['name']&&'revision-end'!==_0x4b2c66['name']))['forEach'](_0x2660a4=>{'string'!=typeof _0x2660a4&&(_0x2660a4['children']=this['_removeRevisionMarkers'](_0x2660a4['children']),_0x2660a4['attributes']=_0x2660a4['attributes']['filter'](_0x3f2804=>!_0x3f2804[0x0]['startsWith']('data-revision-')));}),_0x1e5bec;}}function m(_0x1f2601,_0xad9158,_0xf41987){const t=_0x1f2601['t'];switch(_0xad9158){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'},_0xf41987);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xf41987);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 _0x5d9b40{['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[_0x48917f,S,$,_0x524b99];}constructor(_0x32a560){super(_0x32a560),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 _0x2fd593=_0x7da10a();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2fd593},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 _0xf6a489=this['repository']['getRevision'](0x0),_0x263d29=_0xf6a489&&null===_0xf6a489['creator']?_0xf6a489:null;if(this['_continueCurrentRevision']=!!_0x263d29&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x565b86=this['_source']['getCurrentRevisionId'](),_0x4dc3fc=this['repository']['getRevision'](_0x565b86);if(_0x4dc3fc)this['_startingVersion']=_0x4dc3fc['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x398000=this['_source']['history']['_operations']['find'](_0x59b0d9=>!_0x59b0d9['_isInit']),_0x5c66fc=_0x398000?_0x398000['baseVersion']:this['_source']['history']['version'];_0xf6a489?(_0xf6a489['toVersion']<_0x5c66fc&&_0xf6a489['_update']({'toVersion':_0x5c66fc}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x263d29['id'],this['_startingVersion']=_0x263d29['fromVersion']):(this['_startingVersion']=_0xf6a489['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x5c66fc,this['_continueCurrentRevision']=!0x1);}}else _0x263d29&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x263d29['toVersion'],this['editor']['model']['document']['history']['version']),_0x263d29['fromVersion']===_0x263d29['toVersion']?(0x0!==_0x263d29['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x263d29['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x263d29['id'],this['_startingVersion']=_0x263d29['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',_0x301a8e=>!_0x301a8e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x50277c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x48f865;for(const _0x1b7206 in _0x50277c){const _0x45c51d=_0x1b7206,_0x5817c7=_0x50277c[_0x45c51d];if('revisionHistoryLicenseKeyValid'==_0x5817c7||'revisionHistoryLicenseKeyInvalid'==_0x5817c7||'revisionHistoryLicenseKeyExpired'==_0x5817c7||'revisionHistoryLicenseKeyDomainLimit'==_0x5817c7||'revisionHistoryLicenseKeyNotAllowed'==_0x5817c7||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5817c7||'revisionHistoryLicenseKeyUsageLimit'==_0x5817c7){delete _0x50277c[_0x45c51d],_0x48f865=_0x5817c7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x48f865&&_0x50277c['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x48f865&&_0x50277c['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x48f865&&_0x50277c['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x48f865&&_0x50277c['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x48f865&&_0x50277c['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x48f865&&_0x50277c['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x120868=this['repository']['getRevision'](0x0),_0x6a2602=await this['getRevisionDocumentData'](_0x120868),_0x244c9a=await this['getRevisionRootsAttributes'](_0x120868);this['_replaceEditorDataWithRevisionData'](_0x6a2602,_0x244c9a);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x51426c){this['_source']=_0x51426c;}async['update'](){const _0x35b6ad=await this['_source']['getLatestVersion']();if(_0x35b6ad>this['currentRevision']['toVersion']){await this['_loadState']();const _0x21134d=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x35b6ad});_0x21134d['authors']=_0x21134d['authorsIds']['map'](_0x3b527b=>this['editor']['plugins']['get']('Users')['getUser'](_0x3b527b)),this['currentRevision']['_update'](_0x21134d);}}async['saveRevision'](_0x424a5a={},_0x35f411=null){const _0x8b7426=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x35f411>this['currentRevision']['toVersion']&&(_0x35f411=null),null===_0x35f411&&(_0x35f411=await this['_source']['getLatestVersion']());const _0x3622ca=this['_getFromVersion'](_0x35f411),_0x52f9ba=this['buildRevisionData']({'from':_0x3622ca,'to':_0x35f411});if(this['currentRevision']['toVersion']<_0x35f411){const _0xc1288f=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x35f411,'to':_0x35f411});_0xc1288f['authors']=[],_0xc1288f['authorsIds']=[],_0xc1288f['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xc1288f,!0x0),delete _0xc1288f['authors'],_0x8b7426['push'](_0xc1288f);}_0x424a5a['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x424a5a['name']=_0x424a5a['name']||null,_0x424a5a['id']=_0x424a5a['id']||_0x7da10a(),_0x424a5a={..._0x424a5a,..._0x52f9ba};const _0x1d576c=this['addRevisionData'](_0x424a5a);_0x8b7426['push'](_0x424a5a);const _0x4094c5=this['repository']['getIndex'](_0x1d576c);if(0x0!==_0x4094c5){const _0x54f52b=this['repository']['getRevision'](_0x4094c5-0x1);if(_0x54f52b['fromVersion']!==_0x35f411){const _0x367b6c=this['_revisionDataBuilder']['getData'](_0x35f411,_0x54f52b['toVersion']),_0x3f88ef={'id':_0x54f52b['id'],'diffData':_0x367b6c['diffData'],'authorsIds':_0x367b6c['authorsIds'],'authors':_0x367b6c['authorsIds']['map'](_0x4597fd=>this['editor']['plugins']['get']('Users')['getUser'](_0x4597fd)),'fromVersion':_0x35f411};_0x54f52b===this['currentRevision']&&(_0x3f88ef['createdAt']=new Date(_0x424a5a['createdAt']['getTime']()+0xa)),_0x54f52b['_update'](_0x3f88ef,!0x0),delete _0x3f88ef['authors'],_0x8b7426['push'](_0x3f88ef);}}if(this['adapter']){for(const _0x4c225e of _0x8b7426)this['_bufferUpdate'](_0x4c225e['id'],_0x4c225e,!0x0);this['sendBufferedUpdates']();}return _0x1d576c;}['addRevisionData'](_0x4fa1c1){const _0x1da188=this['repository']['createRevision'](_0x4fa1c1);return this['adapter']&&_0x1da188['on']('_update',(_0x1d7e61,_0x26da2f,_0x3d35eb)=>{_0x3d35eb||(this['_bufferUpdate'](_0x26da2f['id'],_0x26da2f,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1da188,this['_findInsertionIndex'](_0x1da188)),_0x1da188;}async['getRevisionDocumentData'](_0x4c0709){return await this['_utils']['loadRevisionData'](_0x4c0709,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4c0709);}async['getRevisionRootsAttributes'](_0x57efe1){return await this['_utils']['loadRevisionData'](_0x57efe1,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x57efe1);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x54cd97=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x335336=0x0;_0x335336<_0x54cd97['length'];_0x335336++){const _0x4e3009=_0x54cd97[_0x335336];let _0x5c809f=!0x1;for(const _0x2c5d39 of Object['keys'](_0x4e3009))void 0x0===_0x4e3009[_0x2c5d39]?delete _0x4e3009[_0x2c5d39]:'id'!==_0x2c5d39&&(_0x5c809f=!0x0);_0x5c809f||(_0x54cd97[_0x335336]=null);}if(_0x54cd97=_0x54cd97['filter'](_0x5e984e=>null!==_0x5e984e),!_0x54cd97['length'])return;for(let _0x11a964=0x0;_0x11a964<_0x54cd97['length'];_0x11a964++){const _0xf26785=_0x54cd97[_0x11a964];void 0x0!==_0xf26785['fromVersion']&&void 0x0===_0xf26785['toVersion']&&(_0xf26785['toVersion']=this['repository']['getRevision'](_0xf26785['id'])['toVersion']),void 0x0!==_0xf26785['toVersion']&&void 0x0===_0xf26785['fromVersion']&&(_0xf26785['fromVersion']=this['repository']['getRevision'](_0xf26785['id'])['fromVersion']);}const _0x4e9510=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x54cd97,_0x4e9510)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4ab156=>{if(_0x4ab156){for(const _0x4432af of _0x4ab156)this['setRevisionData']({'id':_0x4432af['id'],'createdAt':_0x4432af['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x27c87a=null,from:_0x5b14b0=null,to:_0x4583f7=null}){_0x5b14b0=null!==_0x5b14b0?_0x5b14b0:_0x27c87a['fromVersion'],_0x4583f7=null!==_0x4583f7?_0x4583f7:_0x27c87a['toVersion'];const _0x11eb93=this['_revisionDataBuilder']['getData'](_0x5b14b0,_0x4583f7),_0xcc8a9b={'diffData':_0x11eb93['diffData'],'authorsIds':_0x11eb93['authorsIds'],'fromVersion':_0x5b14b0,'toVersion':_0x4583f7};if(!_0x27c87a||_0x4583f7!==_0x27c87a['toVersion']){const _0x3f808f=_0x4583f7-0x1,_0x599498=this['_source']['history']['getOperation'](_0x3f808f);_0xcc8a9b['createdAt']=_0x599498&&_0x599498['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5b14b0===this['_loadedStateData']['fromVersion']){for(const _0x221dd5 of this['_loadedStateData']['authors'])_0xcc8a9b['authorsIds']['includes'](_0x221dd5['id'])||_0xcc8a9b['authorsIds']['push'](_0x221dd5['id']);}return _0xcc8a9b;}['_bufferUpdate'](_0x1ed20b,_0x55c615,_0x2eeabd){if(this['_bufferedUpdates']['has'](_0x1ed20b)){const _0x4065f2=this['_bufferedUpdates']['get'](_0x1ed20b);_0x55c615=_0x2eeabd?{..._0x4065f2,..._0x55c615}:{..._0x55c615,..._0x4065f2};}this['_bufferedUpdates']['set'](_0x1ed20b,_0x55c615);}['setRevisionData'](_0x2dfe66){const _0x43e297=this['repository']['getRevision'](_0x2dfe66['id']);if(_0x2dfe66['createdAt']&&(_0x2dfe66['createdAt']=new Date(_0x2dfe66['createdAt'])),_0x2dfe66['authorsIds']){const _0x2cc8ef=this['editor']['plugins']['get']('Users');_0x2dfe66['authors']=_0x2dfe66['authorsIds']['map'](_0x2d959e=>_0x2cc8ef['getUser'](_0x2d959e));}_0x43e297['_update'](_0x2dfe66,!0x0);}['_createInitialRevision'](_0x33e557){const _0x5c7730=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5c7730)this['_initialRevisionId']=_0x5c7730['id'];else{const _0x2f60a1=!this['editor']['model']['document']['roots']['find'](_0x551c60=>this['editor']['model']['hasContent'](_0x551c60)),_0x1608d4=this['editor']['plugins']['get']('Users')['me']['id'],_0x3f8a46=m(this['editor']['locale'],_0x2f60a1?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x33e557,'to':_0x33e557,'id':this['_initialRevisionId'],'name':_0x3f8a46,'creatorId':_0x1608d4});}}['_createCurrentRevision'](_0xc5f865){const _0x2c5c25=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2c5c25),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xc5f865,'to':_0xc5f865,'id':_0x2c5c25,'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'](_0x362f05,_0x329880){let _0x9d844e=this['editor']['config']['get']('initialData'),_0x3b6902=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x9d844e){_0x9d844e={};for(const _0x5cf782 of this['editor']['model']['document']['getRootNames']())_0x9d844e[_0x5cf782]='';}if('string'==typeof _0x9d844e&&(_0x9d844e={'main':_0x9d844e}),void 0x0===_0x3b6902){_0x3b6902={};for(const _0x138fa0 of this['editor']['model']['document']['getRootNames']())_0x3b6902[_0x138fa0]={};}let _0x848f1e=!0x1;const _0x437268=Object['keys'](_0x9d844e),_0x42942c=Object['keys'](_0x362f05);for(const _0x161bde of _0x437268){if(_0x9d844e[_0x161bde]!==_0x362f05[_0x161bde]&&''!==_0x9d844e[_0x161bde]['trim']()){_0x848f1e=!0x0;break;}if(!_0x218d59(_0x3b6902[_0x161bde],_0x329880[_0x161bde])&&Object['keys'](_0x3b6902[_0x161bde])['length']>0x0){_0x848f1e=!0x0;break;}}_0x848f1e||(_0x848f1e=_0x42942c['some'](_0x4b1722=>!this['editor']['model']['document']['getRoot'](_0x4b1722))),_0x848f1e&&_0x50cc7e('editor-initial-data-replaced-with-revision-data',{'editorData':_0x9d844e,'editorRootsAttributes':_0x3b6902,'revisionData':_0x362f05,'revisionRootsAttributes':_0x329880}),this['editor']['config']['set']('initialData',_0x362f05),this['editor']['config']['set']('rootsAttributes',_0x329880);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x2f6793=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2f6793['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x55f267){const _0x57b793=this['repository']['getRevisions']();_0x57b793['reverse']();let _0x27ba79=0x0;for(;_0x27ba79<_0x57b793['length'];){const _0x1e62ea=_0x57b793[_0x27ba79];if(_0x1e62ea===this['currentRevision']){_0x27ba79++;continue;}if(_0x1e62ea['id']===this['_initialRevisionId'])break;const _0x24cc71=_0x55f267['toVersion']-_0x1e62ea['toVersion']||_0x55f267['fromVersion']-_0x1e62ea['fromVersion'];if(_0x24cc71>0x0)break;if(_0x24cc71<0x0)_0x27ba79++;else{if(!_0x55f267['creator']&&_0x1e62ea['creator'])break;if(_0x1e62ea['creator']||!_0x55f267['creator']){if(_0x55f267['createdAt']>_0x1e62ea['createdAt'])break;_0x27ba79++;}else _0x27ba79++;}}return _0x27ba79;}['_getFromVersion'](_0x183b30){const _0x3ec630=this['repository']['getRevisions']();_0x3ec630['reverse'](),_0x3ec630['shift']();const _0x1a2335=_0x3ec630['find'](_0x5da22a=>_0x5da22a['toVersion']<=_0x183b30)['toVersion'];return _0x1a2335<this['_startingVersion']?this['_startingVersion']:_0x1a2335;}['_makeRevision']({name:_0x24bd87,from:_0x86bdcc,to:_0x2fc28d,creatorId:_0x27e6f8,id:_0x400338}){const _0x5c7322=this['buildRevisionData']({'from':_0x86bdcc,'to':_0x2fc28d});_0x5c7322['name']=_0x24bd87,_0x5c7322['creatorId']=_0x27e6f8,_0x5c7322['id']=_0x400338;const _0x581958=this['addRevisionData'](_0x5c7322);return this['adapter']&&this['_bufferUpdate'](_0x5c7322['id'],_0x5c7322,!0x0),_0x581958;}['_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(_0x5d3595){this['editor']=_0x5d3595,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'](_0x2b72fb){this['source']=_0x2b72fb;const _0x7f6d3f=new Map(),_0x2c66cc=new Map(),_0x126360=this['editor']['model']['document']['roots']['map'](_0x31741a=>_0x31741a['rootName']);for(const _0x464d25 of _0x126360){const _0x3f6148=this['editor']['model']['document']['getRoot'](_0x464d25),_0x4ab618=K(_0x3f6148);_0x7f6d3f['set'](_0x464d25,_0x4ab618),_0x2c66cc['set'](_0x464d25,Object['fromEntries'](_0x3f6148['getAttributes']()));}const _0x19e7aa=Array['from'](this['editor']['model']['markers'])['map'](_0x554f93=>[_0x554f93['name'],_0x554f93['getRange']()]),_0x3d66c=this['source']['version'];this['_saveMetaData'](_0x3d66c,_0x7f6d3f,_0x19e7aa,_0x2c66cc),this['_startingRevisionId']=this['_revisionId'];const _0x279a49=new Map(),_0x1cec15=new Map();for(const _0x32fee2 of _0x126360){const _0x14bbd6=N(_0x32fee2);_0x279a49['set'](_0x32fee2,_0x14bbd6),_0x1cec15['set'](_0x32fee2,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x279a49,[],_0x1cec15);}['getData'](_0x4d8a0c,_0x4bcddb){if(this['_lastFrom']===_0x4d8a0c&&this['_lastTo']<=_0x4bcddb)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x4bcddb,!0x0);else{if(!this['_savedMetaData']['has'](_0x4d8a0c)){const _0x79cf21=this['_getPreviousFrom'](_0x4d8a0c);this['_calculateMetaData'](_0x79cf21,_0x4d8a0c,!0x1);}this['_calculateMetaData'](_0x4d8a0c,_0x4bcddb,!0x0);}return this['_lastFrom']=_0x4d8a0c,this['_lastTo']=_0x4bcddb,this['_getState']();}['loadState'](_0x3b97a8){if(!this['_savedMetaData']['has'](_0x3b97a8['fromVersion'])){const _0x3084b5=this['_getPreviousFrom'](_0x3b97a8['fromVersion']);this['_calculateMetaData'](_0x3084b5,_0x3b97a8['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3b97a8['fromVersion'],_0x3b97a8['toVersion'],!0x1);const _0x391568=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3b97a8['fromVersion'],this['_lastTo']=_0x3b97a8['toVersion'];for(const _0x1c2d2f in _0x3b97a8['diffData']){const _0x11cca6=_0x3b97a8['diffData'][_0x1c2d2f]['attachChange'],_0x807ec8=_0x37c447(_0x3b97a8['diffData'][_0x1c2d2f]['attributesBefore'])||{},_0x79831b=_0x391568['_makeModelFromViewString'](_0x3b97a8['diffData'][_0x1c2d2f]['deletions']);_0x79831b['rootName']=_0x1c2d2f,_0x79831b['_isAttached']=!_0x11cca6||!_0x11cca6['isAttached'],_0x79831b['isAttached']=()=>_0x79831b['_isAttached'],this['_baseRoots']['set'](_0x1c2d2f,_0x79831b),this['_baseRootsAttributes']['set'](_0x1c2d2f,_0x807ec8),_0x11cca6&&this['_touchedRoots']['set'](_0x1c2d2f,_0x11cca6);const _0x383426=this['_makeIdsRoot'](_0x79831b);this['_baseIdsRoots']['set'](_0x1c2d2f,_0x383426);for(const [_0x2b8d3d,_0x2e8b25]of _0x79831b['markers']){if(!_0x2b8d3d['startsWith']('revision:'))continue;const _0x1bc623=_0x2b8d3d['split'](':')[0x2];for(const _0x2de64a of _0x2e8b25['getWalker']({'singleCharacters':!0x0})){const _0x3f7d35=this['_getVidAttributeName'](_0x2de64a),_0x37b5d2='elementEnd'==_0x2de64a['type']?_0x2de64a['previousPosition']['path']['slice'](0x0,-0x1):_0x2de64a['previousPosition']['path'],_0x437bc1=_0x383426['getNodeByPath'](_0x37b5d2)['getAttribute'](_0x3f7d35);this['_touched']['set'](_0x437bc1,{'userId':_0x1bc623});}_0x79831b['markers']['delete'](_0x2b8d3d);}}this['_startingRevisionId']=this['_revisionId'];const _0x5d7fbf=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5bccb8=>!this['_touched']['has'](_0x5bccb8));let _0x3c3e84=0x0;const _0x545f08=new Map();for(const _0x4d5b04 in _0x3b97a8['diffData']){const _0x20c085=_0x3b97a8['diffData'][_0x4d5b04]['attachChange'],_0x4bbc85=_0x37c447(_0x3b97a8['diffData'][_0x4d5b04]['attributesAfter'])||{},_0x515ba9=_0x391568['_makeModelFromViewString'](_0x3b97a8['diffData'][_0x4d5b04]['insertions']);_0x515ba9['rootName']=_0x4d5b04,_0x515ba9['_isAttached']=!_0x20c085||_0x20c085['isAttached'],_0x515ba9['isAttached']=()=>_0x515ba9['_isAttached'],this['_diffRoots']['set'](_0x4d5b04,_0x515ba9),this['_diffRootsAttributes']['set'](_0x4d5b04,_0x4bbc85);const _0x2b81f5=this['_makeIdsRoot'](_0x515ba9,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4d5b04,_0x2b81f5),_0x545f08['set'](_0x4d5b04,_0x515ba9['isAttached']()?_0x4bbc85:{});for(const [_0x1621b8,_0x4f35bb]of _0x515ba9['markers']){if(!_0x1621b8['startsWith']('revision:'))continue;const _0x3dc2ce=_0x1621b8['split'](':')[0x2];for(const _0x56236c of _0x4f35bb['getWalker']({'singleCharacters':!0x0})){const _0x1331ef=this['_getVidAttributeName'](_0x56236c),_0x4927ed=this['_revisionId']++,_0x15a7be='elementEnd'==_0x56236c['type']?_0x56236c['previousPosition']['path']['slice'](0x0,-0x1):_0x56236c['previousPosition']['path'];_0x2b81f5['getNodeByPath'](_0x15a7be)['_setAttribute'](_0x1331ef,_0x4927ed),this['_touched']['set'](_0x4927ed,{'userId':_0x3dc2ce});}_0x515ba9['markers']['delete'](_0x1621b8);}for(const _0x4f819c of this['editor']['model']['createRangeIn'](_0x515ba9)['getWalker']({'singleCharacters':!0x0})){const _0x1f93f5=this['_getVidAttributeName'](_0x4f819c),_0x247a8b='elementEnd'==_0x4f819c['type']?_0x4f819c['previousPosition']['path']['slice'](0x0,-0x1):_0x4f819c['previousPosition']['path'],_0x56ede9=_0x2b81f5['getNodeByPath'](_0x247a8b);_0x56ede9['getAttribute'](_0x1f93f5)>0x0||_0x56ede9['_setAttribute'](_0x1f93f5,_0x5d7fbf[_0x3c3e84++]);}for(const [_0x18b589,_0x8fb676]of _0x515ba9['markers'])_0x18b589['startsWith']('revision:')||this['_markers']['set'](_0x18b589,_0x8fb676);}const {roots:_0x19081a}=this['_savedMetaData']['get'](_0x3b97a8['fromVersion']),{roots:_0x17d5e1}=this['_savedMetaData']['get'](_0x3b97a8['toVersion']),_0x8633ac=K(_0x19081a['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x8633ac),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x8633ac,Number['NEGATIVE_INFINITY']));const _0x2d13ca=K(_0x17d5e1['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2d13ca),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2d13ca));const _0x18802c=Array['from'](this['_diffRoots'])['map'](([_0x335028,_0x35c554])=>[_0x335028,K(_0x35c554)]);this['_saveMetaData'](this['_lastTo'],_0x18802c,this['_markers'],_0x545f08);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x510515,_0x4ede3c,_0x2807b6,_0x318846){const _0xcffea4=new Map(_0x4ede3c),_0x59b4e1=new Map(_0x37c447(_0x318846)),_0x4d8ac2=new Map();for(const [_0x1e24a2,_0x313844]of _0x2807b6)_0x4d8ac2['set'](_0x1e24a2,{'start':_0x313844['start']['clone'](),'end':_0x313844['end']['clone'](),'rootName':_0x313844['root']['rootName']});this['_savedMetaData']['set'](_0x510515,{'roots':_0xcffea4,'markers':_0x4d8ac2,'rootsAttributes':_0x59b4e1});}['_removeMetaData'](_0x1e60b7){this['_savedMetaData']['delete'](_0x1e60b7);}['_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'](_0x1b2baf,_0x1e20b6=null){let _0x557573=null;_0x1b2baf['is']('documentFragment')||(_0x557573=new _0x5e7691(_0x1b2baf['name'],{'vid_start':null===_0x1e20b6?this['_revisionId']++:_0x1e20b6++}));const _0xd09c56=[];for(const _0x183153 of _0x1b2baf['getChildren']())if(_0x183153['is']('element')){_0xd09c56['push'](this['_makeIdsRoot'](_0x183153,_0x1e20b6));const _0x561f1d=_0xd09c56[_0xd09c56['length']-0x1];null!==_0x1e20b6&&(_0x1e20b6=_0x561f1d['is']('element','$text')?_0x561f1d['getAttribute']('vid')+0x1:_0x561f1d['getAttribute']('vid_end')+0x1);}else{for(let _0x2468c2=0x0;_0x2468c2<_0x183153['offsetSize'];_0x2468c2++)_0xd09c56['push'](new _0x5e7691('$text',{'vid':null===_0x1e20b6?this['_revisionId']++:_0x1e20b6++}));}if(_0x1b2baf['is']('documentFragment')){const _0x27021c=N(_0x1b2baf['rootName']);return _0x27021c['_insertChild'](0x0,_0xd09c56),_0x27021c;}return _0x557573['_setAttribute']('vid_end',null===_0x1e20b6?this['_revisionId']++:_0x1e20b6++),_0x557573['_insertChild'](0x0,_0xd09c56),_0x557573;}['_calculateMetaData'](_0x28f501,_0x1fa0ce,_0x314f37){this['_reset']();const {roots:_0x269e9a,markers:_0x56f3f4,rootsAttributes:_0x36e196}=this['_savedMetaData']['get'](_0x28f501);this['_baseRoots']=new Map(_0x269e9a),this['_baseRootsAttributes']=new Map(_0x37c447(_0x36e196));for(const [_0x10f365,_0x1f1432]of this['_baseRoots'])if('$graveyard'!==_0x10f365&&(this['_diffRoots']['set'](_0x10f365,K(_0x1f1432)),this['_diffRootsAttributes']=new Map(_0x37c447(_0x36e196)),_0x314f37)){const _0x4e6aa8=this['_revisionId'];this['_idsRoots']['set'](_0x10f365,this['_makeIdsRoot'](_0x1f1432)),this['_baseIdsRoots']['set'](_0x10f365,this['_makeIdsRoot'](_0x1f1432,_0x4e6aa8));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',K(this['_baseRoots']['get']('$graveyard'))),_0x314f37&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4ab6c8,_0x37dedd]of _0x56f3f4){const _0xfcf401=this['_baseRoots']['get'](_0x37dedd['rootName']),_0xd16be4=this['_diffRoots']['get'](_0x37dedd['rootName']),_0xf8493b=new _0x209563(this['_fixPosition'](_0x37dedd['start'],_0xfcf401),this['_fixPosition'](_0x37dedd['end'],_0xfcf401)),_0x406626=this['_fixRange'](_0xf8493b,_0xd16be4);_0xfcf401['markers']['set'](_0x4ab6c8,_0xf8493b),this['_markers']['set'](_0x4ab6c8,_0x406626);}this['_applyOperations'](_0x28f501,_0x1fa0ce,_0x314f37);}['_applyOperations'](_0x4073df,_0x2230bb,_0x13626e){for(const _0x408318 of this['source']['getOperations'](_0x4073df,_0x2230bb))this['_handleOperation'](_0x408318,_0x13626e);for(const _0x5d0d22 of this['_diffRoots']['values']())_0x5d0d22['markers']['clear']();for(const [_0x447980,_0x19e780]of this['_markers']){this['_diffRoots']['get'](_0x19e780['root']['rootName'])['markers']['set'](_0x447980,_0x19e780['clone']());}const _0x380844=new Map(),_0x44ca83=new Map();for(const [_0x104244,_0x5ce1f1]of this['_diffRoots'])_0x380844['set'](_0x104244,K(_0x5ce1f1)),_0x44ca83['set'](_0x104244,this['_diffRootsAttributes']['get'](_0x104244));this['_saveMetaData'](_0x2230bb,_0x380844,this['_markers'],_0x44ca83);}['_getPreviousFrom'](_0x1651a4){const _0x45d342=Array['from'](this['_savedMetaData']['keys']());_0x45d342['sort']((_0x27d131,_0x4eaabd)=>_0x27d131-_0x4eaabd),_0x45d342['reverse']();for(const _0x2ea756 of _0x45d342)if(_0x2ea756<_0x1651a4)return _0x2ea756;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x202c95,_0x2cc592){const _0x3395a7=Array['from'](_0x2cc592['markers'])['map'](([_0x184521,_0x22705c])=>[_0x184521,this['_fixRange'](_0x22705c,_0x202c95)]);_0x202c95['markers']=new Map(_0x3395a7);}['_transformMarkers'](_0xc94f15){for(const _0xbab09d of this['_markers']['values']()){const _0x1ea036=_0xbab09d['getTransformedByOperation'](_0xc94f15),_0x4165b3=_0x209563['_createFromRanges'](_0x1ea036);_0xbab09d['start']=_0x4165b3['start'],_0xbab09d['end']=_0x4165b3['end'];}}['_handleOperation'](_0x59a8d8,_0x33c0ea){if('addRoot'!=_0x59a8d8['type']&&'detachRoot'!=_0x59a8d8['type']){if('insert'==_0x59a8d8['type']){const _0x5ec993=_0x59a8d8['position']['root']['rootName'];this['_diffRoots']['has'](_0x5ec993)||(this['_diffRoots']['set'](_0x5ec993,N(_0x5ec993,!0x0)),this['_diffRootsAttributes']['set'](_0x5ec993,{}),_0x33c0ea&&this['_idsRoots']['set'](_0x5ec993,N(_0x5ec993,!0x0)));}else{if('addRootAttribute'==_0x59a8d8['type']||'removeRootAttribute'==_0x59a8d8['type']||'changeRootAttribute'==_0x59a8d8['type'])return void this['_handleRootAttributeOperation'](_0x59a8d8);'marker'==_0x59a8d8['type']&&this['_handleMarkerOperation'](_0x59a8d8);}if('marker'!==_0x59a8d8['type']){const _0x3e4180=this['_cloneOperation'](_0x59a8d8,this['_diffRoots']);_0x3e4180['_execute'](),this['_transformMarkers'](_0x3e4180);}if(_0x33c0ea)switch(_0x59a8d8['type']){case'insert':this['_handleInsertOperation'](_0x59a8d8);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x59a8d8);break;case'merge':this['_handleMergeOperation'](_0x59a8d8);break;case'split':this['_handleSplitOperation'](_0x59a8d8);}}else this['_handleRootOperation'](_0x59a8d8,_0x33c0ea);}['_cloneOperation'](_0x10d508,_0x492696){const _0x149991=_0x10d508['clone']();return _0x149991['_authorId']=_0x10d508['_authorId'],this['_fixOperation'](_0x149991,_0x492696),_0x149991;}['_getBaseVids'](_0x3408da){return _0x3408da['map'](_0x2153ee=>{const _0x2f79a8=this['_getVidAttributeName'](_0x2153ee);return Number(_0x2153ee['item']['getAttribute'](_0x2f79a8));});}['_generateTape'](_0x19443c,_0x85b48f){if(_0x19443c['is']('element','$text'))_0x85b48f['push']({'item':_0x19443c,'type':'text'});else{_0x19443c['is']('element')&&_0x85b48f['push']({'item':_0x19443c,'type':'elementStart'});for(const _0x85adce of _0x19443c['getChildren']())this['_generateTape'](_0x85adce,_0x85b48f);_0x19443c['is']('element')&&_0x85b48f['push']({'item':_0x19443c,'type':'elementEnd'});}return _0x85b48f;}['_getState'](){const _0x4c0f0f=new Map(this['_touched']),_0x2ffba6=new Map(_0x4c0f0f),_0x4aa407=new Map(),_0x41d9a5={'insertions':{},'deletions':{}},_0x5868f8={'insertions':{},'deletions':{}},_0x1ebc8f=new Map(),_0x366923=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x366923['delete']('$graveyard');for(const _0x1b8573 of _0x366923){const _0xfeaf48=this['_diffRoots']['get'](_0x1b8573)||N(_0x1b8573,!0x1),_0x469d96=this['_baseRoots']['get'](_0x1b8573)||N(_0x1b8573,!0x1);_0xfeaf48['isAttached']()||_0x469d96['isAttached']()?(_0x41d9a5['insertions'][_0x1b8573]=K(_0xfeaf48),_0x41d9a5['deletions'][_0x1b8573]=K(_0x469d96),this['_copyMarkers'](_0x41d9a5['deletions'][_0x1b8573],_0x469d96),this['_copyMarkers'](_0x41d9a5['insertions'][_0x1b8573],_0xfeaf48),_0x5868f8['insertions'][_0x1b8573]=this['_generateTape'](this['_idsRoots']['get'](_0x1b8573),[]),_0x5868f8['deletions'][_0x1b8573]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1b8573)||N(_0x1b8573,!0x1),[])):_0x366923['delete'](_0x1b8573);}for(const _0x29906c of _0x366923){const _0x4c5454=_0x5868f8['insertions'][_0x29906c];for(const _0x1e9878 of _0x4c5454){const _0x505ca4=this['_getVidAttributeName'](_0x1e9878),_0x2c7a84=_0x1e9878['item']['getAttribute'](_0x505ca4);_0x2ffba6['delete'](_0x2c7a84),_0x2c7a84>=this['_startingRevisionId']&&_0x4aa407['set'](_0x2c7a84,_0x4c0f0f['get'](_0x2c7a84));}}for(const _0x2f726a of _0x366923){const _0x415200=_0x5868f8['insertions'][_0x2f726a],_0x22bceb=this['_getBaseVids'](_0x5868f8['deletions'][_0x2f726a]);let _0x9b9ee3=0x0;for(const _0x1d309d of _0x415200){const _0x510ca6=this['_getVidAttributeName'](_0x1d309d),_0x39e8d1=_0x1d309d['item']['getAttribute'](_0x510ca6);if(!_0x4aa407['has'](_0x39e8d1)&&!_0x1ebc8f['has'](_0x39e8d1)){if(_0x2ffba6['has'](_0x39e8d1))_0x9b9ee3++;else{if(_0x39e8d1!=_0x22bceb[_0x9b9ee3]){const _0x3c468b=_0x4c0f0f['get'](_0x39e8d1)||_0x4c0f0f['get'](_0x22bceb[_0x9b9ee3]);for(;_0x39e8d1!=_0x22bceb[_0x9b9ee3];)_0x2ffba6['has'](_0x22bceb[_0x9b9ee3])||(_0x1ebc8f['set'](_0x22bceb[_0x9b9ee3],_0x3c468b),_0x4c0f0f['set'](_0x22bceb[_0x9b9ee3],_0x3c468b)),_0x9b9ee3++;}_0x9b9ee3++;}}}}for(const _0x58aaec of _0x366923){const _0x159fb3=_0x5868f8['insertions'][_0x58aaec];for(const _0x46ba45 of _0x159fb3){const _0x4bf348=this['_getVidAttributeName'](_0x46ba45),_0x667b1b=_0x46ba45['item']['getAttribute'](_0x4bf348);if(_0x1ebc8f['has'](_0x667b1b)){const _0x81e9e4=_0x1ebc8f['get'](_0x667b1b);_0x2ffba6['has'](_0x667b1b)||_0x2ffba6['set'](_0x667b1b,{..._0x81e9e4}),_0x4aa407['set'](_0x667b1b,{..._0x81e9e4});}}}for(const _0x58b222 of _0x2ffba6['keys']())_0x58b222>=this['_startingRevisionId']&&_0x2ffba6['delete'](_0x58b222);const _0x439688=new Map();for(const _0x12ac55 of _0x366923){let _0x554229=_0x5868f8['insertions'][_0x12ac55];for(const _0x20b293 of _0x554229)if(_0x20b293['item']['is']('element','tableCell')){const _0x3df220=this['_getVidAttributeName'](_0x20b293),_0x1f87e0=_0x20b293['item']['getAttribute'](_0x3df220);if(_0x4aa407['has'](_0x1f87e0)){const _0xf55fdb=_0x20b293['item']['parent']['parent']['getAttribute']('vid_start'),_0x5ba45f=_0x439688['get'](_0xf55fdb)||new Set();_0x5ba45f['add'](_0x4aa407['get'](_0x1f87e0)['userId']),_0x439688['set'](_0xf55fdb,_0x5ba45f);}}_0x554229=_0x5868f8['deletions'][_0x12ac55];for(const _0x11e607 of _0x554229)if(_0x11e607['item']['is']('element','tableCell')){const _0x225c7b=this['_getVidAttributeName'](_0x11e607),_0x5b5cce=_0x11e607['item']['getAttribute'](_0x225c7b);if(_0x2ffba6['has'](_0x5b5cce)){const _0xad378c=_0x11e607['item']['parent']['parent']['getAttribute']('vid_start'),_0x4a172d=_0x439688['get'](_0xad378c)||new Set();_0x4a172d['add'](_0x2ffba6['get'](_0x5b5cce)['userId']),_0x439688['set'](_0xad378c,_0x4a172d);}}for(const _0x1c9fa1 of _0x439688['keys']())(_0x4aa407['has'](_0x1c9fa1)||_0x2ffba6['has'](_0x1c9fa1))&&_0x439688['delete'](_0x1c9fa1);}for(const _0x1a08b2 of _0x366923){const _0x616245=_0x5868f8['insertions'][_0x1a08b2];let _0x4e9462=null,_0x4064ee=null;for(const _0x3481b7 of _0x616245){const _0x214b17=this['_getVidAttributeName'](_0x3481b7),_0x5e7387=_0x3481b7['item']['getAttribute'](_0x214b17),_0x2b251e=_0x439688['get'](_0x5e7387);_0x2b251e&&'elementStart'==_0x3481b7['type']&&(_0x4e9462=Array['from'](_0x2b251e)[0x0],_0x4064ee=_0x3481b7['item']['getAttribute']('vid_end')),_0x4e9462&&(_0x2ffba6['set'](_0x5e7387,{'userId':_0x4e9462}),_0x4aa407['set'](_0x5e7387,{'userId':_0x4e9462})),_0x5e7387==_0x4064ee&&(_0x4e9462=null,_0x4064ee=null);}}const _0x471ea6={},_0x38f7d9=new Set();for(const _0x1a5937 of _0x366923){const _0x18bc7b=_0x41d9a5['deletions'][_0x1a5937],_0x487e8f=_0x41d9a5['insertions'][_0x1a5937];for(const {userId:_0x9f3c37}of this['_touchedMarkers']['values']())null!==_0x9f3c37&&_0x38f7d9['add'](_0x9f3c37);for(const {userId:_0x58e05f}of this['_touchedRoots']['values']())null!==_0x58e05f&&_0x38f7d9['add'](_0x58e05f);this['_markChanges'](_0x487e8f,_0x5868f8['insertions'][_0x1a5937],_0x4aa407,'insertion',_0x38f7d9),this['_markChanges'](_0x18bc7b,_0x5868f8['deletions'][_0x1a5937],_0x2ffba6,'deletion',_0x38f7d9),_0x471ea6[_0x1a5937]={'insertions':this['_prepareViewToSave'](_0x487e8f),'deletions':this['_prepareViewToSave'](_0x18bc7b),'attachChange':this['_touchedRoots']['get'](_0x1a5937)||null,'attributesBefore':_0x37c447(this['_baseRootsAttributes']['get'](_0x1a5937))||{},'attributesAfter':_0x37c447(this['_diffRootsAttributes']['get'](_0x1a5937))};}return{'diffData':_0x471ea6,'authorsIds':Array['from'](_0x38f7d9)};}['_processRootBeforeSave'](_0x639b1a){for(const [,_0x3381bc]of _0x639b1a['markers']){const _0x29bb12=_0x3381bc['start']['getAncestors']()['filter'](_0x378ba1=>'tableCell'==_0x378ba1['name']);for(const _0x7635f6 of _0x29bb12)0x1==_0x7635f6['childCount']&&_0x7635f6['getChild'](0x0)['is']('element','paragraph')&&_0x7635f6['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x544e43){this['_processRootBeforeSave'](_0x544e43);const _0x31bbe9=this['editor']['data']['toView'](_0x544e43,{}),_0x31ec37=Array['from'](_0x31bbe9['getChildren']())['map'](_0x719d99=>this['_getViewJson'](_0x719d99));return JSON['stringify'](_0x31ec37);}['_getViewJson'](_0x357ae3){if(_0x357ae3['is']('$text'))return _0x357ae3['data'];{const _0x2475bd=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4f8292=_0x357ae3,_0x147777=this['editor']['data']['htmlProcessor']['domConverter'],_0x48b5fe={'type':_0x2475bd['_getTypeCharForViewElement'](_0x4f8292),'name':_0x4f8292['name'],'attributes':Array['from'](_0x4f8292['getAttributes']()),'children':Array['from'](_0x4f8292['getChildren']())['map'](_0x1cac9f=>this['_getViewJson'](_0x1cac9f))};if(_0x357ae3['is']('uiElement')&&'$comment'!=_0x357ae3['name']){const _0x3ccda8=_0x357ae3['render'](_0x147777['domDocument'],_0x147777);_0x48b5fe['children']['push'](_0x3ccda8['outerHTML']);}else{if(_0x357ae3['is']('rawElement')){const _0x338f01=_0x147777['domDocument']['createElement'](_0x4f8292['name']);_0x357ae3['render'](_0x338f01,_0x147777),_0x48b5fe['children']['push'](_0x338f01['innerHTML']);}}const _0xeb87af=Array['from'](_0x4f8292['getCustomProperties']());_0xeb87af['length']>0x0&&(_0x48b5fe['customProperties']=_0xeb87af);const _0x4a1c2b=_0x4f8292['getFillerOffset']();return null!==_0x4a1c2b&&(_0x48b5fe['fillerOffset']=_0x4a1c2b),_0x48b5fe;}}['_markChanges'](_0x4cee3f,_0x5098cd,_0x1d2a03,_0x4b9f54,_0x4586ef){let _0x4f1e8b=null,_0x5cf614=null,_0xdddbfc=0x0;const _0x53e534=this['editor']['model'];for(let _0x1db509=0x0;_0x1db509<_0x5098cd['length'];_0x1db509++){const _0xa19c67=this['_getVidAttributeName'](_0x5098cd[_0x1db509]),_0x245609=_0x5098cd[_0x1db509]['item']['getAttribute'](_0xa19c67),_0x52e3b4=_0x1d2a03['get'](_0x245609),_0x59c459=_0x1db509==_0x5098cd['length']-0x1;(!_0x4f1e8b&&_0x52e3b4&&(_0x4f1e8b=_0x52e3b4,_0x5cf614=_0x5098cd[_0x1db509]),_0x4f1e8b&&(!_0x52e3b4||_0x52e3b4['userId']!=_0x4f1e8b['userId']))&&(_0x2b569a(_0x52e3b4,P(_0x5cf614,_0x4cee3f,_0x53e534),P(_0x5098cd[_0x1db509],_0x4cee3f,_0x53e534)),_0x4f1e8b=_0x52e3b4||null,_0x5cf614=_0x52e3b4?_0x5098cd[_0x1db509]:null),_0x4f1e8b&&_0x59c459&&_0x2b569a(_0x52e3b4,P(_0x5cf614,_0x4cee3f,_0x53e534),V(_0x5098cd[_0x1db509],_0x4cee3f,_0x53e534));}function _0x2b569a(_0x209549,_0x1dd739,_0x376ca4){const _0x163d13=_0x4f1e8b['userId'],_0x410653='revision:'+_0x4b9f54+':'+_0x163d13+':'+_0xdddbfc++,_0x3e2755=_0x53e534['createRange'](_0x1dd739,_0x376ca4);_0x4cee3f['markers']['set'](_0x410653,_0x3e2755),null!==_0x163d13&&_0x4586ef['add'](_0x163d13);}}['_getVidAttributeName'](_0x247c77){switch(_0x247c77['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x381b67,_0x399435){_0x381b67['baseVersion']=null;for(const _0x3a71b8 in _0x381b67){const _0x355c71=_0x381b67[_0x3a71b8];if(_0x355c71 instanceof _0x2d3910){const _0x366850=_0x399435['get'](_0x355c71['root']['rootName']);_0x381b67[_0x3a71b8]=this['_fixPosition'](_0x355c71,_0x366850);}if(_0x355c71 instanceof _0x209563){const _0x3737f1=_0x399435['get'](_0x355c71['root']['rootName']);_0x381b67[_0x3a71b8]=this['_fixRange'](_0x355c71,_0x3737f1);}'root'===_0x3a71b8&&(_0x381b67['root']=_0x399435['get'](_0x381b67['root']['rootName']));}}['_fixRange'](_0x98bba0,_0x48103e){return this['editor']['model']['createRange'](this['_fixPosition'](_0x98bba0['start'],_0x48103e),this['_fixPosition'](_0x98bba0['end'],_0x48103e));}['_fixPosition'](_0x31e677,_0x5e988b){return this['editor']['model']['createPositionFromPath'](_0x5e988b,_0x31e677['path'],_0x31e677['stickiness']);}['_handleInsertOperation'](_0x13b01d){const _0x39d256=this['_idsRoots']['get'](_0x13b01d['position']['root']['rootName']),_0x7e8a95=this['_fixPosition'](_0x13b01d['position'],_0x39d256),_0x3baaae=null===_0x13b01d['_authorId']?null:_0x13b01d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43b37c=_0x7e8a95['parent'],_0x3948db=this['_revisionId'],_0x60918c=[];for(const _0x21309e of _0x13b01d['nodes'])if(_0x21309e['is']('element'))_0x60918c['push'](this['_makeIdsRoot'](_0x21309e));else{for(let _0xb63e1f=0x0;_0xb63e1f<_0x21309e['offsetSize'];_0xb63e1f++)_0x60918c['push'](new _0x5e7691('$text',{'vid':this['_revisionId']++}));}const _0x117d20=this['_revisionId'];for(let _0x3930cc=_0x3948db;_0x3930cc<_0x117d20;_0x3930cc++)this['_touched']['set'](_0x3930cc,{'userId':_0x3baaae});_0x43b37c['_insertChild'](_0x7e8a95['offset'],_0x60918c);}['_handleMoveOperation'](_0x206139){(_0x206139=this['_cloneOperation'](_0x206139,this['_idsRoots']))['_execute']();const _0x5dab17=null===_0x206139['_authorId']?null:_0x206139['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x37f8df=_0x206139['getMovedRangeStart'](),_0x461664=_0x37f8df['parent'],_0x52133c=_0x37f8df['offset'];!function _0x3d7fd2(_0x56fc63,_0x52cf31,_0x110568,_0x2647a1){for(let _0x5b4106=_0x110568;_0x5b4106<_0x2647a1;_0x5b4106++){const _0x3bc75a=_0x52cf31['getChild'](_0x5b4106);_0x3bc75a['is']('element','$text')?_0x56fc63['set'](_0x3bc75a['getAttribute']('vid'),{'userId':_0x5dab17}):(_0x56fc63['set'](_0x3bc75a['getAttribute']('vid_start'),{'userId':_0x5dab17}),_0x3d7fd2(_0x56fc63,_0x3bc75a,0x0,_0x3bc75a['childCount']),_0x56fc63['set'](_0x3bc75a['getAttribute']('vid_end'),{'userId':_0x5dab17}));}}(this['_touched'],_0x461664,_0x52133c,_0x52133c+_0x206139['howMany']);}['_handleMergeOperation'](_0x17c75f){const _0x2e3a32=null===(_0x17c75f=this['_cloneOperation'](_0x17c75f,this['_idsRoots']))['_authorId']?null:_0x17c75f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1388d5=_0x17c75f['targetPosition']['parent'],_0x293033=_0x17c75f['sourcePosition']['parent'],_0x1baad4=_0x1388d5['getAttribute']('vid_end'),_0x1253e9=_0x293033['getAttribute']('vid_start');_0x1388d5['_setAttribute']('vid_end',_0x293033['getAttribute']('vid_end')),_0x293033['_setAttribute']('vid_end',_0x1baad4),this['_touched']['set'](_0x1253e9,{'userId':_0x2e3a32}),this['_touched']['set'](_0x1baad4,{'userId':_0x2e3a32}),_0x17c75f['_execute']();}['_handleSplitOperation'](_0x397448){const _0x7e8ff8=null===(_0x397448=this['_cloneOperation'](_0x397448,this['_idsRoots']))['_authorId']?null:_0x397448['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x55333a=_0x397448['graveyardPosition'],_0x4792a2=_0x397448['splitPosition']['parent'];_0x397448['_execute']();const _0x191d7a=_0x4792a2['getAttribute']('vid_end'),_0x26efd7=_0x397448['insertionPosition']['nodeAfter'];if(_0x55333a){const _0x5009a0=_0x26efd7['getAttribute']('vid_end'),_0x5b02a8=_0x4792a2['getAttribute']('vid_end');_0x4792a2['_setAttribute']('vid_end',_0x5009a0),_0x26efd7['_setAttribute']('vid_end',_0x5b02a8),this['_touched']['set'](_0x4792a2['getAttribute']('vid_end'),{'userId':_0x7e8ff8}),this['_touched']['set'](_0x26efd7['getAttribute']('vid_start'),{'userId':_0x7e8ff8});}else{const _0x3a0e13=this['_revisionId']++,_0x453191=this['_revisionId']++;_0x4792a2['_setAttribute']('vid_end',_0x3a0e13),_0x26efd7['_setAttribute']('vid_start',_0x453191),_0x26efd7['_setAttribute']('vid_end',_0x191d7a),this['_touched']['set'](_0x3a0e13,{'userId':_0x7e8ff8}),this['_touched']['set'](_0x453191,{'userId':_0x7e8ff8});}}['_handleMarkerOperation'](_0x17a36b){if(!_0x17a36b['affectsData'])return;const _0x141e0f=(_0x17a36b=this['_cloneOperation'](_0x17a36b,this['_diffRoots']))['oldRange']?_0x17a36b['oldRange']['root']:null,_0x2978b3=_0x17a36b['newRange']?_0x17a36b['newRange']['root']:null;_0x141e0f&&this['_markers']['delete'](_0x17a36b['name']),_0x2978b3&&this['_markers']['set'](_0x17a36b['name'],_0x17a36b['newRange']['clone']());const _0x527bc3=null===_0x17a36b['_authorId']?null:_0x17a36b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x167434=_0x17a36b['name'];if(!this['_touchedMarkers']['has'](_0x167434))return void this['_touchedMarkers']['set'](_0x167434,{'range':_0x17a36b['oldRange'],'userId':_0x527bc3});const _0x12478d=this['_touchedMarkers']['get'](_0x167434),_0x17647f=_0x12478d['range'],_0x2a63ce=_0x17a36b['newRange'];null==_0x17647f&&null==_0x2a63ce||_0x17647f&&_0x2a63ce&&_0x17647f['isEqual'](_0x2a63ce)?this['_touchedMarkers']['delete'](_0x17a36b['name']):_0x12478d['userId']=_0x527bc3;}['_handleRootOperation'](_0x36b5d6,_0x5055f7){this['_diffRoots']['has'](_0x36b5d6['rootName'])?this['_diffRoots']['get'](_0x36b5d6['rootName'])['_isAttached']=_0x36b5d6['isAdd']:(this['_diffRoots']['set'](_0x36b5d6['rootName'],N(_0x36b5d6['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x36b5d6['rootName'],{}),_0x5055f7&&this['_idsRoots']['set'](_0x36b5d6['rootName'],N(_0x36b5d6['rootName'],!0x0)));const _0x2fe7cf=null===_0x36b5d6['_authorId']?null:_0x36b5d6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4b12f7=this['_touchedRoots']['get'](_0x36b5d6['rootName']);_0x4b12f7&&_0x4b12f7['userId']===_0x2fe7cf?this['_touchedRoots']['delete'](_0x36b5d6['rootName']):this['_touchedRoots']['set'](_0x36b5d6['rootName'],{'userId':_0x2fe7cf,'isAttached':_0x36b5d6['isAdd']});}['_handleRootAttributeOperation'](_0x3a02b1){const _0x5079cd=this['_diffRootsAttributes']['get'](_0x3a02b1['root']['rootName']);null===_0x3a02b1['newValue']?delete _0x5079cd[_0x3a02b1['key']]:_0x5079cd[_0x3a02b1['key']]=_0x3a02b1['newValue'];}}function K(_0x456d21){const _0x43aaf2=N(_0x456d21['rootName'],_0x456d21['isAttached']());for(const _0x186b5b of _0x456d21['getChildren']()){const _0x4f0305=_0x186b5b['_clone'](!0x0);_0x43aaf2['_appendChild'](_0x4f0305);}return _0x43aaf2;}function N(_0x3154ba,_0x218356=!0x0){const _0x472b69=new _0x1eaa31();return _0x472b69['rootName']=_0x3154ba,_0x472b69['_isAttached']=_0x218356,_0x472b69['isAttached']=()=>_0x472b69['_isAttached'],_0x472b69;}function P(_0x290fdb,_0x1d1195,_0x2599d5){const _0x38342d='elementEnd'==_0x290fdb['type']?_0x2599d5['createPositionAt'](_0x290fdb['item'],'end'):_0x2599d5['createPositionBefore'](_0x290fdb['item']);return _0x2599d5['createPositionFromPath'](_0x1d1195,_0x38342d['path'],_0x38342d['stickiness']);}function V(_0xb84adf,_0x5b8c10,_0x225f7c){const _0x42c192='elementStart'==_0xb84adf['type']?_0x225f7c['createPositionAt'](_0xb84adf['item'],0x0):_0x225f7c['createPositionAfter'](_0xb84adf['item']);return _0x225f7c['createPositionFromPath'](_0x5b8c10,_0x42c192['path'],_0x42c192['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
+ _0x4086f9(_0x23ebf3){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0xece444,_0x3384a0){super(_0xece444),this['focusTracker']=new _0x5e371b(),this['keystrokes']=new _0x1758ab(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x3384a0),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'](),_0x58385d({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x52d816=_0x50cbc6=>_0x50cbc6['stopPropagation']();this['keystrokes']['set']('arrowright',_0x52d816),this['keystrokes']['set']('arrowleft',_0x52d816),this['keystrokes']['set']('arrowup',_0x52d816),this['keystrokes']['set']('arrowdown',_0x52d816);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2eb39d){this['revisionNameInputView']['fieldView']['element']['value']=_0x2eb39d['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x1461ee){const _0x2bba3e=new ti(this['locale'],_0x5dd4bb),_0x1a4242=_0x2bba3e['fieldView'];_0x1a4242['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4fa914=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x1461ee&&(_0x4fa914+='\x20('+m(this['locale'],'optional')+')'),(_0x2bba3e['label']=_0x4fa914,_0x1a4242['on']('input',()=>{this['revisionNameInputValue']=_0x1a4242['element']['value']['trim']();}),_0x2bba3e);}}class l extends _0x5d9b40{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x424757=this['editor'],_0x2b98a4=_0x424757['plugins']['get']('RevisionTracker');_0x424757['ui']['componentFactory']['add']('revisionHistory',_0x2db61c=>{const _0x2688c5=_0x1f2a8d(_0x2db61c),_0x6763ee=_0x2688c5['panelView']['children'],_0x430c19=new _0x175cc8(_0x2db61c),_0x53b2bb=new _0x4f78bd(_0x2db61c),_0x49adf0=this['_createSaveRevisionButton'](_0x25e13b),_0x3cbb73=new _0x4f78bd(_0x2db61c),_0x54fbf9=this['_createOpenRevisionButton'](_0x25e13b);return _0x2688c5['bind']('isEnabled')['to'](_0x2b98a4,'isReady',_0x2b98a4,'isEnabled',_0x424757,'isReadOnly',(_0x1264e3,_0x20e37d,_0x1abe5f)=>_0x1264e3&&_0x20e37d&&!_0x1abe5f),_0x2688c5['buttonView']['set']({'icon':_0x23a599,'label':m(_0x2db61c,'Revision\x20history'),'tooltip':!0x0}),_0x49adf0['set']({'withText':!0x0,'role':'menuitem'}),_0x54fbf9['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x54fbf9,'execute',()=>{_0x2688c5['isOpen']=!0x1,_0x424757['editing']['view']['focus']();},{'priority':'low'}),_0x53b2bb['children']['add'](_0x49adf0),_0x3cbb73['children']['add'](_0x54fbf9),_0x430c19['role']='menu',_0x430c19['items']['addMany']([_0x53b2bb,_0x3cbb73]),_0x6763ee['add'](_0x430c19),_0x2688c5;}),_0x424757['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x1e4721=this['editor'],_0x5ca3=_0x1e4721['locale'],_0x1162d5=_0x1e4721['plugins']['get']('RevisionTracker'),_0x17f148=new _0x3be7f4(_0x5ca3),_0x52bb85=new _0x30e8c5(_0x5ca3);_0x17f148['bind']('isEnabled')['to'](_0x1162d5,'isReady',_0x1162d5,'isEnabled',_0x1e4721,'isReadOnly',(_0x503ea,_0x4917c9,_0x9f6c01)=>_0x503ea&&_0x4917c9&&!_0x9f6c01),_0x17f148['buttonView']['set']({'icon':_0x23a599,'label':m(_0x5ca3,'Revision\x20history')});const _0x46719d=new _0x4f5764(_0x5ca3,_0x17f148),_0x21a9de=this['_createSaveRevisionButton'](_0x546e60);_0x21a9de['delegate']('execute')['to'](_0x17f148),_0x46719d['children']['add'](_0x21a9de),_0x52bb85['items']['add'](_0x46719d);const _0x1f7d83=new _0x4f5764(_0x5ca3,_0x17f148),_0x578b64=this['_createOpenRevisionButton'](_0x546e60);return _0x578b64['delegate']('execute')['to'](_0x17f148),_0x1f7d83['children']['add'](_0x578b64),_0x52bb85['items']['add'](_0x1f7d83),_0x17f148['panelView']['children']['add'](_0x52bb85),_0x17f148;}['_createSaveRevisionButton'](_0x1f59b2){const _0x259522=this['editor'],_0x3206f0=_0x259522['plugins']['get']('RevisionTracker'),_0x2e5ec5=new _0x1f59b2(_0x259522['locale']);return _0x2e5ec5['set']({'label':m(_0x259522['locale'],'Save\x20current\x20revision')}),_0x2e5ec5['bind']('isEnabled')['to'](_0x3206f0,'isReady',_0x3206f0,'isEnabled',_0x259522,'isReadOnly',(_0x388816,_0x1aa777,_0x241e2b)=>_0x388816&&_0x1aa777&&!_0x241e2b),this['listenTo'](_0x2e5ec5,'execute',()=>{this['_showDialog']();}),_0x2e5ec5;}['_createOpenRevisionButton'](_0x50e70c){const _0xbe88bb=this['editor'],_0x5e6797=_0xbe88bb['plugins']['get']('RevisionTracker'),_0x15a36e=new _0x50e70c(_0xbe88bb['locale']);return _0x15a36e['set']({'label':m(_0xbe88bb['locale'],'Open\x20revision\x20history')}),_0x15a36e['bind']('isEnabled')['to'](_0x5e6797,'isReady',_0xbe88bb,'isReadOnly',(_0x18734b,_0x49e296)=>_0x18734b&&!_0x49e296),this['listenTo'](_0x15a36e,'execute',()=>{_0xbe88bb['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x15a36e;}['_showDialog'](){const _0x119822=this['editor'],_0x5be0e0=_0x119822['locale'],_0x3a915a=_0x119822['plugins']['get']('Dialog'),_0x59e985=_0x119822['plugins']['get']('RevisionTracker');function _0x34311a(_0x3e84fe){_0x119822['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3e84fe['revisionName']?_0x3e84fe['revisionNameInputView']['errorText']=m(_0x5be0e0,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x119822['plugins']['get'](h)['saveRevision']({'name':_0x3e84fe['revisionName']}),_0x3a915a['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x34311a(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3a915a['show']({'id':'revisionSave','title':m(_0x5be0e0,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x119822['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3a915a['hide']()},{'label':m(_0x119822['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x335a4d){_0x335a4d['bind']('isEnabled')['to'](_0x59e985,'isReady',_0x59e985,'isEnabled',_0x119822,'isReadOnly',(_0x280dc7,_0x250520,_0x40a542)=>_0x280dc7&&_0x250520&&!_0x40a542);},'onExecute':()=>_0x34311a(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x389d1d=this['editor'],_0x3806ef=_0x389d1d['locale'];this['_saveRevisionFormView']=new me(_0x3806ef,_0x389d1d['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x23ebf3{['changeId'];['_model'];constructor(_0x4a647d,_0x5e7ce4){super(_0x4a647d),this['_model']=_0x5e7ce4,this['changeId']=_0x5e7ce4['id'];const _0x1f3ee1=this['bindTemplate'],_0x5e397b=m(_0x4a647d,_0x5e7ce4['data']['isSuggestion']?'Suggested\x20by':'add'==_0x5e7ce4['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x5e7ce4['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x1f3ee1['to']('type',_0x487f77=>'ck-revision-change__'+_0x487f77)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5e397b}]},{'text':'\x20'+_0x5e7ce4['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x4526a4(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x595390){super(),this['id']=_0x595390['id']||_0x7da10a(),this['author']=_0x595390['author'],this['type']=_0x595390['type'],this['data']=_0x595390['data']||{},this['rootName']=_0x595390['rootName'],this['set']('createdAt',_0x595390['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(_0x4c8181,_0x2817be){this['newRevisionId']=_0x4c8181,this['oldRevisionId']=_0x2817be,this['changes']=new _0x5c2418();}['_setChanges'](_0x4851ce){for(const _0x103246 of _0x4851ce)this['changes']['add'](_0x103246);}}class u extends _0x5d9b40{['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[_0x48917f,_0x3e5dc6,S,$];}constructor(_0x2b84d4){super(_0x2b84d4),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',(_0x1eec9a,_0x424de8,_0xd0b855)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2b105f=>{for(const _0x500f79 of this['editor']['editing']['view']['document']['roots'])_0xd0b855?_0x2b105f['removeClass']('ck-editor__editable__overlay',_0x500f79):_0x2b105f['addClass']('ck-editor__editable__overlay',_0x500f79);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x355684=>null!==_0x355684),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x358312,_0x1669ad,_0x1f6edc)=>_0x358312&&_0x1f6edc?_0x1669ad['changes']['getIndex'](_0x1f6edc):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x13e82a,_0x6e6d1a)=>_0x13e82a?_0x6e6d1a['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3e5dc6);}['init'](){const _0x2e85a9=this['editor'],_0x2ca386=new ot(_0x2e85a9,{'direction':'backward'}),_0x5badeb=new ot(_0x2e85a9,{'direction':'forward'});(_0x2e85a9['commands']['add']('showPreviousChange',_0x2ca386),_0x2e85a9['commands']['add']('showNextChange',_0x5badeb),_0x2e85a9['commands']['add']('restoreRevision',new nt(_0x2e85a9)),this['on']('change:numberOfChanges',()=>{_0x2ca386['refresh'](),_0x5badeb['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x2e85a9['enableReadOnlyMode']('revision-viewer'),_0x2e85a9['plugins']['has']('WidgetToolbarRepository'))&&_0x2e85a9['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x57f441){return await this['_utils']['loadRevisionData'](_0x57f441,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x57f441);}async['getRevisionRootsAttributes'](_0x4d5384){return await this['_utils']['loadRevisionData'](_0x4d5384,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4d5384);}async['compare'](_0x5b73b8,_0x185d21,_0x34af52=!0x1){if(!this['isEnabled'])return;const _0x3652e8=this['diff'],_0x2da7b9=this['repository'],_0x3c4b51='string'==typeof _0x5b73b8?_0x2da7b9['getRevision'](_0x5b73b8):_0x5b73b8,_0x1a112a='string'==typeof _0x185d21?_0x2da7b9['getRevision'](_0x185d21):_0x185d21,_0x4f8a1d=_0x3c4b51['id'],_0x1ef8f7=_0x1a112a?_0x1a112a['id']:null;if(!_0x34af52&&this['diff']&&this['diff']['newRevisionId']===_0x4f8a1d&&this['diff']['oldRevisionId']===_0x1ef8f7)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x4f8a1d,_0x1ef8f7);const _0x314dd4=this['_getRevisionsRange'](_0x3c4b51,_0x1a112a,!0x0)['map'](_0x136802=>this['_utils']['loadRevisionData'](_0x136802,this['adapter']));return _0x314dd4['push'](new Promise(_0x2d54d6=>{setTimeout(_0x2d54d6,0x14);})),Promise['all'](_0x314dd4)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4cd8b4=this['_getDiff'](_0x4f8a1d,_0x1ef8f7);for(const _0x2a7262 of _0x4cd8b4['changes'])this['_changeIdToChange']['set'](_0x2a7262['id'],_0x2a7262);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x50b07a=>{for(const _0x290815 of this['editor']['model']['document']['getRootNames']())_0x50b07a['detachRoot'](_0x290815);for(const _0x8c7eec of Object['keys'](_0x4cd8b4['model'])){const _0x24245c=_0x50b07a['addRoot'](_0x8c7eec);for(const _0x515b10 of Object['keys'](_0x4cd8b4['attributes'][_0x8c7eec]))_0x50b07a['setAttribute'](_0x515b10,_0x4cd8b4['attributes'][_0x8c7eec][_0x515b10],_0x24245c);_0x50b07a['insert'](_0x4cd8b4['model'][_0x8c7eec],_0x24245c,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4cd8b4['changes'])),this['isReady']=!0x0;})['catch'](_0x3c3ab6=>{console['error'](_0x3c3ab6),this['_cleanUp'](),_0x3652e8&&(this['diff']=_0x3652e8),this['isReady']=!0x0;});}['addRevisionData'](_0x128d3,_0x239249){const _0x4d8d6b=this['repository']['createRevision'](_0x128d3);return _0x4d8d6b['on']('_update',(_0x375320,_0x5aa2d6,_0x5edd42)=>_0x239249(_0x5aa2d6,_0x5edd42,_0x4d8d6b)),this['repository']['addRevision'](_0x4d8d6b),_0x4d8d6b;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1ee409=>{for(const _0x331428 of this['editor']['model']['document']['getRootNames']())_0x1ee409['detachRoot'](_0x331428);});}['_sortAndFilterDiffChanges'](_0x13344a){const _0x21bfc9=[],_0x1cebcd=new Map();for(const _0x27cfe2 of this['editor']['model']['document']['getRootNames']()){const _0x3ea258=this['editor']['editing']['view']['getDomRoot'](_0x27cfe2);if(!_0x3ea258)continue;const _0x1bc45f=_0x3ea258['getClientRects']()['item'](0x0);_0x1bc45f&&(_0x21bfc9['push'](_0x27cfe2),_0x1cebcd['set'](_0x27cfe2,_0x1bc45f));}return _0x21bfc9['sort']((_0x27a5c2,_0x3c1501)=>{const _0x3d14c2=_0x1cebcd['get'](_0x27a5c2),_0x390edf=_0x1cebcd['get'](_0x3c1501);return _0x3d14c2['y']-_0x390edf['y']||_0x3d14c2['x']-_0x390edf['x'];}),(_0x13344a=_0x13344a['filter'](_0x858ad2=>_0x21bfc9['includes'](_0x858ad2['rootName'])))['sort']((_0x123d5e,_0x534daa)=>_0x21bfc9['indexOf'](_0x123d5e['rootName'])-_0x21bfc9['indexOf'](_0x534daa['rootName'])),_0x13344a;}['_makeTape'](_0x37e7a9){const _0x1d030c=Array['from'](_0x37e7a9['markers'])['filter'](([_0x1a7d51,_0x29f2df])=>_0x1a7d51['startsWith']('revision:')&&!_0x29f2df['isCollapsed']),_0x47db79=Array['from'](this['editor']['model']['createRangeIn'](_0x37e7a9)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1d030c['length'])for(const _0x48aa1e of _0x47db79){const [_0x29e023,_0xf604a3]=_0x1d030c[0x0],[,_0x518a07,_0x5670bd]=_0x29e023['split'](':');if(_0xf604a3['end']['isEqual'](_0x48aa1e['nextPosition'])&&_0x1d030c['shift'](),(_0x48aa1e['previousPosition']['isEqual'](_0xf604a3['start'])||_0x48aa1e['previousPosition']['isAfter'](_0xf604a3['start']))&&('insertion'==_0x518a07?_0x48aa1e['isAdded']={'userId':_0x5670bd}:'deletion'==_0x518a07&&(_0x48aa1e['isRemoved']={'userId':_0x5670bd})),0x0==_0x1d030c['length'])break;}return _0x47db79;}['_refreshStartEndIndex'](_0x451ee9){const _0x178e4b=new Map();for(let _0xeccc72=0x0;_0xeccc72<_0x451ee9['length'];_0xeccc72++)'text'===_0x451ee9[_0xeccc72]['type']?(_0x451ee9[_0xeccc72]['item']['startIndex']=_0xeccc72,_0x451ee9[_0xeccc72]['item']['endIndex']=_0xeccc72):('elementStart'===_0x451ee9[_0xeccc72]['type']?_0x451ee9[_0xeccc72]['item']['startIndex']=_0xeccc72:'elementEnd'===_0x451ee9[_0xeccc72]['type']&&(_0x451ee9[_0xeccc72]['item']['endIndex']=_0xeccc72),_0x178e4b['set'](_0x451ee9[_0xeccc72]['id'],_0xeccc72));for(const _0x29fbb5 of _0x178e4b['values']())'elementStart'===_0x451ee9[_0x29fbb5]['type']?_0x451ee9[_0x29fbb5]['item']['endIndex']=_0x178e4b['get'](_0x451ee9[_0x29fbb5]['pairId']):'elementEnd'===_0x451ee9[_0x29fbb5]['type']&&(_0x451ee9[_0x29fbb5]['item']['startIndex']=_0x178e4b['get'](_0x451ee9[_0x29fbb5]['pairId']));}['_processTape'](_0x11425e){for(let _0x237a57=0x0;_0x237a57<_0x11425e['length'];_0x237a57++){if('elementStart'===_0x11425e[_0x237a57]['type'])_0x11425e[_0x237a57]['item']['startIndex']=_0x237a57;else{if('elementEnd'===_0x11425e[_0x237a57]['type']){_0x11425e[_0x237a57]['item']['endIndex']=_0x237a57;const _0x36d24b=_0x11425e[_0x237a57]['item']['startIndex'];_0x11425e[_0x36d24b]['pairId']=_0x11425e[_0x237a57]['id'],_0x11425e[_0x237a57]['pairId']=_0x11425e[_0x36d24b]['id'];}else _0x11425e[_0x237a57]['item']['startIndex']=_0x237a57,_0x11425e[_0x237a57]['item']['endIndex']=_0x237a57,_0x11425e[_0x237a57]['pairId']=null;}_0x11425e[_0x237a57]['markersStart']||(_0x11425e[_0x237a57]['markersStart']=[],_0x11425e[_0x237a57]['markersEnd']=[]);}}['_markInsertions'](_0x5684d3,_0x4454c9){const _0x189cd7=_0x5684d3['filter'](_0x39d043=>!_0x39d043['isAdded']);for(let _0x582de9=0x0;_0x582de9<_0x4454c9['length'];_0x582de9++)_0x4454c9[_0x582de9]['isAdded']&&(_0x189cd7[_0x582de9]['isAdded']=_0x4454c9[_0x582de9]['isAdded']);}['_getDiff'](_0x2101b7,_0x477a4b=null){const _0x5344fa=this['repository']['getRevision'](_0x2101b7),_0xdf0ce9=_0x477a4b?this['repository']['getRevision'](_0x477a4b):null,_0x45d4bd=this['_getRevisionsRange'](_0x5344fa,_0xdf0ce9),_0x42c2fc=_0x45d4bd[_0x45d4bd['length']-0x1],_0xd09205=new Map(),_0x1aec56={'model':{},'attributes':{},'changes':[]},_0x4f4f6e=new Set(),_0x11e99b=new Map();for(let _0xac0b52=_0x45d4bd['length']-0x1;_0xac0b52>=0x0;_0xac0b52--){const _0x16baae=_0x45d4bd[_0xac0b52];for(const _0x603330 of Object['keys'](_0x16baae['diffData']))if(_0x16baae['diffData'][_0x603330]['attachChange']){const _0x1b1ad9=_0x16baae['diffData'][_0x603330]['attachChange'];_0x1b1ad9['isAttached']?(_0x4f4f6e['add'](_0x603330),_0x11e99b['has'](_0x603330)&&_0x11e99b['get'](_0x603330)['userId']==_0x1b1ad9['userId']?_0x11e99b['delete'](_0x603330):_0x11e99b['set'](_0x603330,_0x1b1ad9)):_0x11e99b['has'](_0x603330)?(_0x4f4f6e['delete'](_0x603330),_0x11e99b['delete'](_0x603330)):(_0x4f4f6e['add'](_0x603330),_0x11e99b['set'](_0x603330,_0x1b1ad9));}else _0x4f4f6e['add'](_0x603330);}for(const _0x4d0f4f of _0x4f4f6e){const _0x2c098f=_0x11e99b['has'](_0x4d0f4f)&&!_0x11e99b['get'](_0x4d0f4f)['isAttached'];let _0x21fe50=_0x2c098f?_0x45d4bd['length']-0x1:0x0;const _0x165836=_0x2c098f?-0x1:0x1;for(;_0x45d4bd[_0x21fe50];){const _0x1aa698=_0x45d4bd[_0x21fe50];if(_0x1aa698['diffData'][_0x4d0f4f]){const _0x54550c=_0x2c098f?_0x1aa698['diffData'][_0x4d0f4f]['attributesBefore']:_0x1aa698['diffData'][_0x4d0f4f]['attributesAfter'];_0x1aec56['attributes'][_0x4d0f4f]=_0x54550c?_0x37c447(_0x54550c):{};break;}_0x21fe50+=_0x165836;}}for(const _0x1c2e27 of _0x45d4bd){_0x1c2e27['model']={};for(const _0x5b1fee of _0x1c2e27['authors'])_0xd09205['set'](_0x5b1fee['id'],_0x5b1fee);for(const _0x2f1ad9 of _0x4f4f6e){const _0x1a49e9=_0x1c2e27['diffData'][_0x2f1ad9]?_0x1c2e27['diffData'][_0x2f1ad9]['insertions']:'[]',_0x4a5398=_0x1c2e27['diffData'][_0x2f1ad9]?_0x1c2e27['diffData'][_0x2f1ad9]['deletions']:'[]';_0x1c2e27['model'][_0x2f1ad9]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1a49e9),'deletions':this['_utils']['_makeModelFromViewString'](_0x4a5398)};}}for(const _0x38bf78 of _0x4f4f6e){let _0x1c30d8=null,_0x3af598=0x0;const _0x31dcfd=new Map(Array['from'](_0x5344fa['model'][_0x38bf78]['insertions']['markers'])['filter'](([_0x4a7e00])=>!_0x4a7e00['startsWith']('revision:')));let _0x4cd1c2=0x0;for(const _0x114627 of _0x45d4bd){const _0x4f9174=this['_makeTape'](_0x114627['model'][_0x38bf78]['insertions']);_0x114627==_0x5344fa?(_0x1c30d8=_0x4f9174,_0x3af598=_0x1c30d8['length'],_0x1c30d8['forEach'](_0x165027=>{_0x165027['id']=_0x4cd1c2++;}),this['_processTape'](_0x1c30d8)):this['_markInsertions'](_0x1c30d8,_0x4f9174);const _0x4afc94=_0x1c30d8['filter'](_0x4e37e3=>!_0x4e37e3['isAdded'])['map'](_0x4a8d19=>_0x4a8d19['id']);let _0x2dcba7=0x0;const _0x17fe63=this['_makeTape'](_0x114627['model'][_0x38bf78]['deletions']);_0x17fe63['forEach'](_0x39d27d=>{_0x39d27d['isRemoved']?_0x39d27d['id']=_0x3af598++:_0x39d27d['id']=_0x4afc94[_0x2dcba7++];}),this['_processTape'](_0x17fe63),this['_setDistance'](_0x1c30d8,'isAdded'),this['_setDistance'](_0x17fe63,'isRemoved'),_0x114627==_0x5344fa&&this['_markMarkers'](_0x1c30d8,_0x31dcfd),_0x1c30d8=this['_joinTapes'](_0x1c30d8,_0x17fe63),this['_refreshStartEndIndex'](_0x1c30d8),this['_setDistance'](_0x1c30d8,'isRemoved');}_0x1c30d8=_0x1c30d8['filter'](_0x1a125b=>!(_0x1a125b['isAdded']&&_0x1a125b['isRemoved']));const _0x5849de=new Map(_0x42c2fc['model'][_0x38bf78]['deletions']['markers']),_0x5d3852=new Set(_0x31dcfd['keys']());for(const _0x29db91 of _0x5849de['keys']())_0x5d3852['delete'](_0x29db91);this['_markSuggestions'](_0x1c30d8,_0x5d3852),this['_fixObsoleteTags'](_0x1c30d8),_0x1c30d8=this['_removeMissingPairs'](_0x1c30d8),_0x1c30d8=this['_markMismatchedRemovedTags'](_0x1c30d8),_0x1c30d8=this['_removeUnsupportedChanges'](_0x1c30d8);const {root:_0x2a16ad,changes:_0x3ccc34}=this['_makeModelFromTape'](_0x1c30d8,_0xd09205,_0x38bf78);_0x1aec56['model'][_0x38bf78]=_0x2a16ad;const _0x30ad45=_0x11e99b['get'](_0x38bf78);if(_0x30ad45){const _0x3decab=_0xd09205['get'](_0x30ad45['userId']),_0x3a1c60=new G({'author':_0x3decab,'type':_0x30ad45['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x38bf78});_0x3ccc34['unshift'](_0x3a1c60),_0x1aec56['attributes'][_0x38bf78]['revisionHistoryAttachChange']=_0x3a1c60['id'];}_0x1aec56['changes']=_0x1aec56['changes']['concat'](_0x3ccc34);}return _0x1aec56;}['_markMarkers'](_0x5c0ce2,_0x47fd8a){for(let _0x4a9d4e=0x0;_0x4a9d4e<_0x5c0ce2['length'];_0x4a9d4e++)for(const [_0x518419,_0x455641]of _0x47fd8a)!_0x455641['isCollapsed']&&_0x455641['start']['isEqual'](_0x5c0ce2[_0x4a9d4e]['previousPosition'])&&_0x5c0ce2[_0x4a9d4e]['markersStart']['push'](_0x518419),_0x455641['end']['isEqual'](_0x5c0ce2[_0x4a9d4e]['nextPosition'])&&_0x5c0ce2[_0x4a9d4e]['markersEnd']['push'](_0x518419);}['_joinTapes'](_0x33cc34,_0xd9d7d5){let _0x16bb34=[],_0x2d64a0=0x0,_0x27495f=0x0;for(;_0x2d64a0<_0x33cc34['length']||_0x27495f<_0xd9d7d5['length'];){const _0x485355=_0x33cc34[_0x2d64a0]||{},_0xb8be9b=_0xd9d7d5[_0x27495f]||{};if(_0x485355['id']==_0xb8be9b['id'])_0x2d64a0++,_0x27495f++,_0x16bb34['push'](_0x485355);else{if(_0xb8be9b['isRemoved']&&_0x485355['isAdded']){const {commonTape:_0x1c1dca,iEnd:_0x3a4810,jEnd:_0x31f4bb}=this['_threeWayMerge'](_0x33cc34,_0x2d64a0,_0xd9d7d5,_0x27495f);_0x16bb34=_0x16bb34['concat'](_0x1c1dca),_0x2d64a0=_0x3a4810,_0x27495f=_0x31f4bb;}else _0xb8be9b['isRemoved']?(_0x27495f++,_0x16bb34['push'](_0xb8be9b)):(_0x2d64a0++,_0x16bb34['push'](_0x485355));}}return _0x16bb34;}['_markSuggestions'](_0x1fca32,_0x513c43){const _0x502910=[];for(let _0x46b613=0x0;_0x46b613<_0x1fca32['length'];_0x46b613++){for(let _0x1bfcd2=0x0;_0x1bfcd2<_0x1fca32[_0x46b613]['markersStart']['length'];_0x1bfcd2++){const _0x74dfe9=_0x1fca32[_0x46b613]['markersStart'][_0x1bfcd2];if(!_0x513c43['has'](_0x74dfe9))continue;const {group:_0x12c810,type:_0x415c46,authorId:_0x49a81e}=_0x402910(_0x74dfe9);'revision-suggestion'!=_0x12c810||'insertion'!=_0x415c46&&'deletion'!=_0x415c46||(_0x502910['unshift']({'type':_0x415c46,'name':_0x74dfe9,'userId':_0x49a81e}),_0x1fca32[_0x46b613]['markersStart']['splice'](_0x1bfcd2,0x1),_0x1bfcd2--);}_0x530538(_0x1fca32[_0x46b613]);for(let _0x120fe7=0x0;_0x120fe7<_0x1fca32[_0x46b613]['markersEnd']['length'];_0x120fe7++){const _0x7da715=_0x1fca32[_0x46b613]['markersEnd'][_0x120fe7];if(!_0x513c43['has'](_0x7da715))continue;const {group:_0x3009d2,type:_0x471680}=_0x402910(_0x7da715);if('revision-suggestion'!=_0x3009d2||'insertion'!=_0x471680&&'deletion'!=_0x471680)continue;_0x1fca32[_0x46b613]['markersEnd']['splice'](_0x120fe7,0x1),_0x120fe7--;const _0x58ddf4=_0x502910['findIndex'](_0x51293=>_0x51293['name']==_0x7da715);_0x58ddf4>-0x1&&_0x502910['splice'](_0x58ddf4,0x1);}}function _0x402910(_0xa4273a){const _0x5d9d58=_0xa4273a['split'](':');return{'group':_0x5d9d58[0x0],'type':_0x5d9d58[0x1],'subType':_0x5d9d58['length']>=0x5?_0x5d9d58[0x2]:null,'id':_0x5d9d58['length']<0x5?_0x5d9d58[0x2]:_0x5d9d58[0x3],'authorId':_0x5d9d58['length']<0x5?_0x5d9d58[0x3]:_0x5d9d58[0x4],'markerCount':0x6==_0x5d9d58['length']?_0x5d9d58[0x5]:null};}function _0x530538(_0x563434){for(let _0x1d7fef=0x0;_0x1d7fef<_0x502910['length'];_0x1d7fef++){if(_0x563434['isAdded']&&'insertion'==_0x502910[_0x1d7fef]['type']&&_0x563434['isAdded']['userId']==_0x502910[_0x1d7fef]['userId'])return _0x563434['isAddSuggestion']=_0x502910[_0x1d7fef],void delete _0x563434['isAdded'];if(!_0x563434['isAdded']&&!_0x563434['isRemoved']&&'deletion'==_0x502910[_0x1d7fef]['type'])return void(_0x563434['isRemoveSuggestion']=_0x502910[_0x1d7fef]);}}}['_setDistance'](_0x3b8cba,_0x185fd3){let _0x27de9c=0x0,_0x24390f=!0x1;const _0x358b05=new Map();for(const _0xc6fad0 of _0x3b8cba)_0xc6fad0[_0x185fd3]?_0x24390f&&(_0x27de9c++,_0x24390f=!0x1):(_0x27de9c++,_0x24390f=!0x0),_0x358b05['set'](_0xc6fad0['id'],_0x27de9c);for(let _0x1c5d8d=0x0;_0x1c5d8d<_0x3b8cba['length'];_0x1c5d8d++){if('isRemoved'==_0x185fd3&&_0x3b8cba[_0x1c5d8d]['isAdded']||'isAdded'==_0x185fd3&&_0x3b8cba[_0x1c5d8d]['isRemoved'])continue;if('text'==_0x3b8cba[_0x1c5d8d]['type']){_0x3b8cba[_0x1c5d8d]['distance']=0x0;continue;}const _0x4bc87b=_0x358b05['get'](_0x3b8cba[_0x1c5d8d]['pairId']),_0x2f2f94=_0x358b05['get'](_0x3b8cba[_0x1c5d8d]['id']);_0x3b8cba[_0x1c5d8d]['distance']=_0x4bc87b-_0x2f2f94;}}['_getRevisionsRange'](_0x49d50c,_0x156e18,_0xd99beb=!0x1){const _0x2ab23a=[];let _0x1be0b7=this['repository']['getIndex'](_0x49d50c),_0x5ac359=this['repository']['getIndex'](_0x156e18);for(-0x1==_0x5ac359&&(_0x5ac359=this['repository']['_revisions']['length'],_0xd99beb=!0x1);_0x1be0b7<_0x5ac359;)_0x2ab23a['push'](this['repository']['getRevision'](_0x1be0b7)),_0x1be0b7++;return _0xd99beb&&_0x2ab23a['push'](this['repository']['getRevision'](_0x1be0b7)),_0x2ab23a;}['_threeWayMerge'](_0x40f608,_0x56c006,_0x3f0e26,_0x28914b){const _0x1a60c6=this['editor']['model']['schema'];let _0x47339f=_0x56c006;for(;_0x40f608[_0x47339f]&&_0x40f608[_0x47339f]['isAdded'];)_0x47339f++;let _0x5e9ba3=_0x28914b;for(;_0x3f0e26[_0x5e9ba3]&&_0x3f0e26[_0x5e9ba3]['isRemoved'];)_0x5e9ba3++;_0x224833(_0x40f608,_0x56c006,_0x47339f),_0x224833(_0x3f0e26,_0x28914b,_0x5e9ba3);const _0x579450=_0x3f0e26['slice'](_0x28914b,_0x5e9ba3)['concat'](_0x40f608['slice'](_0x56c006,_0x47339f));return _0x579450['sort']((_0x2faec8,_0x347815)=>_0x2faec8['side']!=_0x347815['side']?_0x2faec8['side']-_0x347815['side']:_0x2faec8['level']!=_0x347815['level']?_0x2faec8['level']-_0x347815['level']:_0x2faec8['distance']!=_0x347815['distance']?_0x347815['distance']-_0x2faec8['distance']:!!_0x2faec8['isAdded']!=!!_0x347815['isAdded']?-0x1==_0x2faec8['side']||0x0==_0x2faec8['side']?_0x2faec8['isAdded']?-0x1:0x1:_0x2faec8['isAdded']?0x1:-0x1:_0x2faec8['index']-_0x347815['index']),{'commonTape':_0x579450,'iEnd':_0x47339f,'jEnd':_0x5e9ba3};function _0x224833(_0xfc68b9,_0x57b62a,_0x4c33b4){let _0x5d0122=-0x1,_0x4991a4=Number['POSITIVE_INFINITY'],_0x2d7236=!0x0;for(let _0x24c872=_0x57b62a;_0x24c872<_0x4c33b4;_0x24c872++)if(_0x1a60c6['isInline'](_0xfc68b9[_0x24c872]['item'])||(_0x2d7236=!0x1),_0xfc68b9[_0x24c872]['item']['startIndex']<_0x57b62a&&(_0x5d0122=_0x24c872),_0xfc68b9[_0x24c872]['item']['endIndex']>=_0x4c33b4){_0x4991a4=_0x24c872;break;}_0x2d7236&&(_0x5d0122=_0x4c33b4-0x1);for(let _0x25327c=_0x57b62a;_0x25327c<_0x4c33b4;_0x25327c++)_0xfc68b9[_0x25327c]['side']=_0x25327c<=_0x5d0122?-0x1:_0x25327c<_0x4991a4?0x0:0x1,_0xfc68b9[_0x25327c]['index']=_0x25327c;let _0x1fada0=0x0;for(let _0x310b7c=_0x57b62a;_0x310b7c<=_0x5d0122;_0x310b7c++)0x0==_0xfc68b9[_0x310b7c]['distance']?_0xfc68b9[_0x310b7c]['level']=_0x1fada0:(_0x1fada0++,_0xfc68b9[_0x310b7c]['level']=_0x1fada0,_0x1fada0++);for(let _0x51690e=_0x57b62a;_0x51690e<_0x4c33b4;_0x51690e++)0x0==_0xfc68b9[_0x51690e]['side']&&(_0xfc68b9[_0x51690e]['level']=_0x1fada0);_0x1fada0=0x0;for(let _0x1739a7=_0x4c33b4-0x1;_0x1739a7>=_0x4991a4;_0x1739a7--)0x0==_0xfc68b9[_0x1739a7]['distance']?_0xfc68b9[_0x1739a7]['level']=_0x1fada0:(_0x1fada0--,_0xfc68b9[_0x1739a7]['level']=_0x1fada0,_0x1fada0--);}}['_fixObsoleteTags'](_0x2bdad1){const _0x346c66=new Map(),_0x226773=this['editor']['model']['schema'];for(let _0x34f1bf=0x1;_0x34f1bf<_0x2bdad1['length'];_0x34f1bf++){let _0x3808ab,_0x804c28,_0x497e0a;const _0x2aee2a=_0x2bdad1[_0x34f1bf],_0xdf4062=_0x2bdad1[_0x34f1bf-0x1];if('text'==_0x2aee2a['type'])continue;if(_0x2aee2a['type']!=_0xdf4062['type'])continue;if(!_0x226773['isBlock'](_0xdf4062['item'])||_0x226773['isLimit'](_0xdf4062['item']))continue;if(!_0x226773['isBlock'](_0x2aee2a['item'])||_0x226773['isLimit'](_0x2aee2a['item']))continue;if((_0x2bdad1[_0x34f1bf]['isAdded']||_0x2bdad1[_0x34f1bf]['isAddSuggestion'])&&_0x2bdad1[_0x34f1bf-0x1]['isRemoved'])_0x3808ab=_0x2bdad1[_0x34f1bf],_0x804c28=_0x2bdad1[_0x34f1bf-0x1],_0x497e0a=_0x34f1bf-0x1;else{if(!_0x2bdad1[_0x34f1bf]['isRemoved']||!_0x2bdad1[_0x34f1bf-0x1]['isAdded']&&!_0x2bdad1[_0x34f1bf-0x1]['isAddSuggestion'])continue;_0x3808ab=_0x2bdad1[_0x34f1bf-0x1],_0x804c28=_0x2bdad1[_0x34f1bf],_0x497e0a=_0x34f1bf;}const _0x150147=_0x3808ab['level']==_0x804c28['level'],_0x3826ca=Math['abs'](_0x3808ab['level'])<Math['abs'](_0x804c28['level'])&&0x0==_0x804c28['distance'];(_0x150147||_0x3826ca)&&(_0x346c66['set'](_0x804c28['id'],_0x3808ab['id']),_0x2bdad1['splice'](_0x497e0a,0x1),_0x34f1bf--,_0x3808ab['isAdded']=!0x1);}for(let _0x5ea761=0x0;_0x5ea761<_0x2bdad1['length'];_0x5ea761++)_0x346c66['has'](_0x2bdad1[_0x5ea761]['pairId'])&&(_0x2bdad1[_0x5ea761]['pairId']=_0x346c66['get'](_0x2bdad1[_0x5ea761]['pairId']));}['_removeMissingPairs'](_0x337e0a){const _0x560305=new Set(_0x337e0a['map'](_0x6dc7f1=>_0x6dc7f1['id']));for(let _0x26aa4d=0x0;_0x26aa4d<_0x337e0a['length'];_0x26aa4d++)_0x560305['has'](_0x337e0a[_0x26aa4d]['pairId'])||0x0==_0x337e0a[_0x26aa4d]['distance']||(_0x337e0a[_0x26aa4d]['isIncorrect']=!0x0);return _0x337e0a['filter'](_0x5e5dd6=>!_0x5e5dd6['isIncorrect']);}['_markMismatchedRemovedTags'](_0x40d3c9){const _0xb1c7d4=new Set();for(let _0x42d6ab=0x0;_0x42d6ab<_0x40d3c9['length'];_0x42d6ab++){if(_0xb1c7d4['has'](_0x40d3c9[_0x42d6ab]['id'])&&_0x40d3c9[_0x42d6ab]['isRemoved']&&(_0x40d3c9[_0x42d6ab]['isIncorrect']=!0x0),_0x40d3c9[_0x42d6ab]['isIncorrect'])continue;if(0x0==_0x40d3c9[_0x42d6ab]['distance'])continue;if('elementStart'!=_0x40d3c9[_0x42d6ab]['type'])continue;if(null==_0x40d3c9[_0x42d6ab]['pairId'])continue;let _0x1b321a=_0x42d6ab+0x1,_0x30db3f=0x0;for(;_0x40d3c9[_0x1b321a]['id']!=_0x40d3c9[_0x42d6ab]['pairId'];)'elementStart'==_0x40d3c9[_0x1b321a]['type']?_0x30db3f++:'elementEnd'==_0x40d3c9[_0x1b321a]['type']&&_0x30db3f--,_0x1b321a++;if(0x0!=_0x30db3f){if(_0x40d3c9[_0x42d6ab]['isRemoved'])_0x40d3c9[_0x42d6ab]['isIncorrect']=!0x0;else{for(;_0x1b321a!=_0x42d6ab;)_0x40d3c9[_0x1b321a]['isRemoved']&&0x0!=_0x40d3c9[_0x1b321a]['distance']&&(_0x40d3c9[_0x1b321a]['isIncorrect']=!0x0,_0xb1c7d4['add'](_0x40d3c9[_0x1b321a]['pairId'])),_0x1b321a--;}}}return _0x40d3c9['filter'](_0x2b9305=>!_0x2b9305['isIncorrect']);}['_removeUnsupportedChanges'](_0x371956){const _0x2cc526=this['editor']['model']['schema'];for(let _0x1908e4=0x0;_0x1908e4<_0x371956['length'];_0x1908e4++){if(!(_0x371956[_0x1908e4]['isAdded']||_0x371956[_0x1908e4]['isAddSuggestion']||_0x371956[_0x1908e4]['isRemoved']||_0x371956[_0x1908e4]['isRemoveSuggestion']))continue;if(0x0==_0x371956[_0x1908e4]['distance'])continue;const _0xfc4e3b=_0x371956[_0x1908e4]['item'];_0x2cc526['isBlock'](_0xfc4e3b)||_0x2cc526['isLimit'](_0xfc4e3b)||(_0x371956[_0x1908e4]['isAdded']&&delete _0x371956[_0x1908e4]['isAdded'],_0x371956[_0x1908e4]['isAddSuggestion']&&delete _0x371956[_0x1908e4]['isAddSuggestion'],_0x371956[_0x1908e4]['isRemoveSuggestion']&&delete _0x371956[_0x1908e4]['isRemoveSuggestion'],_0x371956[_0x1908e4]['isRemoved']&&(_0x371956[_0x1908e4]['isIncorrect']=!0x0));}return _0x371956['filter'](_0x506791=>!_0x506791['isIncorrect']);}['_makeModelFromTape'](_0x1e86a7,_0xdfa3dc,_0x4d5161){const _0x506df4=new _0x1eaa31(),_0x5598e6=[],_0x3a7f5c=new Map(),_0x35a0bc=this['editor']['model'],_0x54eaee=_0x35a0bc['schema'],_0x3a753b=[_0x506df4],_0x44bc90={},_0x222d27={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x15222a=null;const _0x8c0f33=[0x0];for(let _0x263260=0x0;_0x263260<_0x1e86a7['length'];_0x263260++)if('elementStart'===_0x1e86a7[_0x263260]['type']){_0x1e86a7[_0x263260]['previousPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33);const _0x420e07=new _0x5e7691(_0x1e86a7[_0x263260]['item']['name'],_0x1e86a7[_0x263260]['item']['getAttributes']());_0x3a753b[0x0]['_appendChild'](_0x420e07),_0x8c0f33['push'](0x0),_0x3a753b['unshift'](_0x420e07),_0x1e86a7[_0x263260]['nextPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33);}else'elementEnd'===_0x1e86a7[_0x263260]['type']?(_0x3a753b['shift'](),_0x1e86a7[_0x263260]['previousPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33),_0x8c0f33['pop'](),_0x8c0f33[_0x8c0f33['length']-0x1]++,_0x1e86a7[_0x263260]['nextPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33)):(_0x1e86a7[_0x263260]['previousPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33),_0x15222a?_0x15222a['_data']+=_0x1e86a7[_0x263260]['item']['data']:_0x15222a=new _0x125fca(_0x1e86a7[_0x263260]['item']['data'],_0x1e86a7[_0x263260]['item']['getAttributes']()),_0x1e86a7[_0x263260+0x1]&&'text'===_0x1e86a7[_0x263260+0x1]['type']&&_0x9dcbe(_0x15222a,_0x1e86a7[_0x263260+0x1]['item'])||(_0x3a753b[0x0]['_appendChild'](_0x15222a),_0x15222a=null),_0x8c0f33[_0x8c0f33['length']-0x1]+=_0x1e86a7[_0x263260]['item']['offsetSize'],_0x1e86a7[_0x263260]['nextPosition']=_0x35a0bc['createPositionFromPath'](_0x506df4,_0x8c0f33));for(let _0x27b45f=0x0;_0x27b45f<_0x1e86a7['length'];_0x27b45f++){const _0xac664e=_0x1e86a7[_0x27b45f]['previousPosition'],_0x2ec465=_0x1e86a7[_0x27b45f]['nextPosition'];for(const _0x175514 of _0x1e86a7[_0x27b45f]['markersStart'])_0x3a7f5c['set'](_0x175514,{'start':_0xac664e,'end':null});_0xdabc29('isRemoveSuggestion',_0x27b45f,_0xac664e,_0x2ec465),_0xdabc29('isAddSuggestion',_0x27b45f,_0xac664e,_0x2ec465),_0xdabc29('isRemoved',_0x27b45f,_0xac664e,_0x2ec465),_0xdabc29('isAdded',_0x27b45f,_0xac664e,_0x2ec465);for(const _0x1d3f03 of _0x1e86a7[_0x27b45f]['markersEnd']){const _0x4e461d=_0x3a7f5c['get'](_0x1d3f03);_0x4e461d?_0x4e461d['end']=_0x2ec465:_0x3a7f5c['set'](_0x1d3f03,{'start':_0x2ec465,'end':_0x2ec465});}}for(const [_0x34f09e,_0x1c4c08]of _0x3a7f5c){const _0x573077=this['editor']['model']['createRange'](_0x1c4c08['start'],_0x1c4c08['end']);_0x506df4['markers']['set'](_0x34f09e,_0x573077);}return _0x5598e6['sort']((_0x375063,_0x44905d)=>{const _0x42b06c=_0x506df4['markers']['get']('revision:'+_0x375063['id']),_0x5de2be=_0x506df4['markers']['get']('revision:'+_0x44905d['id']);return _0x42b06c['start']['isBefore'](_0x5de2be['start'])?-0x1:_0x42b06c['start']['isAfter'](_0x5de2be['start'])?0x1:_0x42b06c['end']['isBefore'](_0x5de2be['end'])?-0x1:_0x42b06c['end']['isAfter'](_0x5de2be['end'])?0x1:'add'===_0x375063['type']?-0x1:0x1;}),{'root':_0x506df4,'changes':_0x5598e6};function _0xdabc29(_0xdc4e8d,_0x5ed847,_0x22a2e4,_0x411b63){const _0x40c143=!!_0x1e86a7[_0x5ed847][_0xdc4e8d],_0x3cfe51=_0x40c143?_0x1e86a7[_0x5ed847][_0xdc4e8d]['userId']:null,_0x2074fa=_0x5ed847===_0x1e86a7['length']-0x1,_0x493a80=_0x222d27[_0xdc4e8d][0x0],_0x42701d=_0x54eaee['isObject'](_0x1e86a7[_0x5ed847]['item']);!_0x44bc90[_0xdc4e8d]&&_0x40c143?_0x44bc90[_0xdc4e8d]={'start':_0x22a2e4,'tapeItem':_0x1e86a7[_0x5ed847],'userId':_0x3cfe51,'type':_0xdc4e8d}:_0x44bc90[_0xdc4e8d]&&!_0x40c143?(_0x44bc90[_0xdc4e8d]['end']=_0x22a2e4,_0xc99c2e(_0x44bc90[_0xdc4e8d]),_0x44bc90[_0xdc4e8d]=null):_0x44bc90[_0xdc4e8d]&&_0x40c143&&_0x44bc90[_0xdc4e8d]['userId']!==_0x3cfe51&&(_0x44bc90[_0xdc4e8d]['end']=_0x22a2e4,_0x493a80&&_0x493a80['userId']===_0x44bc90[_0xdc4e8d]['userId']||_0xc99c2e(_0x44bc90[_0xdc4e8d]),_0x44bc90[_0xdc4e8d]={'start':_0x22a2e4,'tapeItem':_0x1e86a7[_0x5ed847],'userId':_0x3cfe51,'type':_0xdc4e8d}),_0x44bc90[_0xdc4e8d]&&_0x42701d&&('elementStart'!==_0x1e86a7[_0x5ed847]['type']||_0x493a80&&_0x493a80['userId']===_0x3cfe51||_0x222d27[_0xdc4e8d]['unshift']({'userId':_0x3cfe51,'object':_0x1e86a7[_0x5ed847]['item'],'change':_0x44bc90[_0xdc4e8d]}),'elementEnd'===_0x1e86a7[_0x5ed847]['type']&&_0x493a80&&_0x493a80['object']===_0x1e86a7[_0x5ed847]['item']&&(_0x222d27[_0xdc4e8d]['shift'](),_0x44bc90[_0xdc4e8d]=_0x493a80['change'])),_0x44bc90[_0xdc4e8d]&&_0x2074fa&&(_0x44bc90[_0xdc4e8d]['end']=_0x411b63,_0xc99c2e(_0x44bc90[_0xdc4e8d]),_0x44bc90[_0xdc4e8d]=null);}function _0xc99c2e({start:_0x3bd8a9,end:_0x4c3d45,tapeItem:_0x37cb6c,userId:_0x59c0e9,type:_0x4971e1}){const _0x4340ce=_0x37cb6c['item'],_0x422545=_0x35a0bc['schema']['isBlock'](_0x4340ce)&&!_0x35a0bc['schema']['isLimit'](_0x4340ce),_0x1d754d=_0x3bd8a9['nodeAfter']==_0x4c3d45['parent']&&_0x4c3d45['isAtStart'];if(_0x422545&&_0x1d754d)return;const _0x5c5c6f=_0x35a0bc['createRange'](_0x3bd8a9,_0x4c3d45),_0x421604=_0xdfa3dc['get'](_0x59c0e9),_0x126de3=new G({'author':_0x421604,'type':'isAdded'==_0x4971e1||'isAddSuggestion'==_0x4971e1?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4971e1||'isRemoveSuggestion'==_0x4971e1},'createdAt':new Date(),'rootName':_0x4d5161});_0x5598e6['push'](_0x126de3),_0x506df4['markers']['set']('revision:'+_0x126de3['id'],_0x5c5c6f);}function _0x9dcbe(_0xad2516,_0x128b5b){const _0x5114c0=_0xad2516['getAttributes'](),_0x451674=_0x128b5b['getAttributes']();for(const _0xeee353 of _0x5114c0){if(_0xeee353[0x1]!==_0x128b5b['getAttribute'](_0xeee353[0x0]))return!0x1;_0x451674['next']();}return _0x451674['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x35b24a=>{const _0x1d8775=_0x35b24a['markerName']['split'](':')[0x1],_0x64e091=this['_getChangeFromId'](_0x1d8775);if(!_0x64e091)return null;const _0x452a3b='add'==_0x64e091['type']?'insertion':'deletion',_0x2da98e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x452a3b];return _0x64e091['data']['isSuggestion']&&_0x2da98e['push']('ck-suggestion-marker-'+_0x452a3b+'-new'),this['activeChange']==_0x64e091&&_0x2da98e['push']('ck-suggestion-marker--active'),{'classes':_0x2da98e,'attributes':{'data-change-id':_0x1d8775}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x34e00f=>{_0x34e00f['on']('element:pre',(_0x19db38,_0x28c9c8,_0x5b3ff0)=>{const _0x3f36d3=_0x28c9c8['viewItem']['getChild'](0x0);if(!_0x3f36d3||!_0x3f36d3['is']('element','code'))return;if(!_0x5b3ff0['consumable']['consume'](_0x3f36d3,{'attributes':['vid_start','vid_end']}))return;const _0x1121ef=_0x28c9c8['modelRange']['start']['nodeAfter'];_0x5b3ff0['writer']['setAttribute']('vid_start',_0x3f36d3['getAttribute']('vid_start'),_0x1121ef),_0x5b3ff0['writer']['setAttribute']('vid_end',_0x3f36d3['getAttribute']('vid_end'),_0x1121ef);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x19f2b6=>{_0x19f2b6['on']('element',(_0x519dfa,_0x4dec3f,_0xcc3bc7)=>{if(!_0xcc3bc7['consumable']['consume'](_0x4dec3f['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4dec3f['modelRange']['isCollapsed'])return;const _0x360ebf=_0x4dec3f['modelRange']['start']['nodeAfter'];_0x360ebf['hasAttribute']('vid_start')||_0x360ebf['hasAttribute']('vid')||(_0xcc3bc7['writer']['setAttribute']('vid_start',_0x4dec3f['viewItem']['getAttribute']('vid_start'),_0x360ebf),_0xcc3bc7['writer']['setAttribute']('vid_end',_0x4dec3f['viewItem']['getAttribute']('vid_end'),_0x360ebf));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x375ca1=>_0x375ca1['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x213a60,[,_0x2000bf])=>{['vid_start','vid_end','vid']['includes'](_0x2000bf)&&(_0x213a60['return']=!0x0,_0x213a60['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x30315c=>{_0x30315c['on']('attribute:vid',(_0x1ef825,_0x3c268d,_0x3c8e6e)=>{if('\x20'!=_0x3c268d['item']['data']||_0x3c268d['item']['parent']['maxOffset']>0x1)return;if(!_0x3c8e6e['consumable']['consume'](_0x3c268d['item'],_0x1ef825['name']))return;const _0x4ce2a1=_0x3c8e6e['writer'],_0xacc17f=_0x3c8e6e['mapper']['toViewRange'](_0x3c268d['range']);_0x4ce2a1['wrap'](_0xacc17f,_0x4ce2a1['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4dbed2){const _0x1ae898=_0x4dbed2['plugins']['get']('RevisionViewer');return(_0x14c777,_0x25e263,_0x2ea72e)=>{const _0x549d50=_0x25e263['markerName']['split'](':')[0x1],_0x3ce8e0=_0x1ae898['_getChangeFromId'](_0x549d50);if(!_0x3ce8e0)return null;const _0x10f609='add'==_0x3ce8e0['type']?'split':'merge';if(!_0x2ea72e['consumable']['test'](_0x25e263['markerRange'],_0x14c777['name']))return;const _0x525c0c=_0x25e263['markerRange']['getWalker'](),_0x3f285f=_0x25e263['markerRange']['start'],_0x5cdea5=_0x4dbed2['model']['schema'];let _0x70f374=null,_0xd1d9be=null,_0x1bf192=!0x1,_0xb3f4c7=!0x1;for(const _0x381e05 of _0x525c0c){const _0x4bec0e=_0x381e05['item'];_0x1bf192=_0x1bf192||_0x5cdea5['isContent'](_0x4bec0e);const _0x3a49ac=_0x2ea72e['mapper']['toViewElement'](_0x4bec0e);if(_0x3a49ac&&_0x3a49ac['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x381e05['type']&&(_0x5cdea5['isBlock'](_0x4bec0e)&&!_0x5cdea5['isLimit'](_0x4bec0e)&&(_0x4bec0e['nextSibling']||_0x3f285f['isAtEnd']?_0x70f374&&_0x70f374['parent']==_0x4bec0e||(_0x70f374=_0x4bec0e,_0x5e7a5b(_0x381e05['previousPosition']),_0xb3f4c7=!0x0):_0xd1d9be=_0xd1d9be||_0x381e05['previousPosition']));}function _0x5e7a5b(_0xacfa56){const _0x1ffea1=_0x2ea72e['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x10f609}),_0x354306=_0x2ea72e['mapper']['toViewPosition'](_0xacfa56);_0x3ce8e0['data']['isSuggestion']&&_0x2ea72e['writer']['addClass']('ck-suggestion-marker-'+_0x10f609+'-new',_0x1ffea1),_0x1ae898['activeChange']==_0x3ce8e0&&_0x2ea72e['writer']['addClass']('ck-suggestion-marker--active',_0x1ffea1),_0x2ea72e['writer']['insert'](_0x354306,_0x1ffea1),_0x2ea72e['mapper']['bindElementToMarker'](_0x1ffea1,_0x25e263['markerName']);}_0x1bf192||_0xb3f4c7||!_0xd1d9be||_0x5e7a5b(_0xd1d9be);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x281433,_0x53f5f0,_0x3fc612)=>{const _0x3688f4=_0x3fc612['mapper']['markerNameToElements'](_0x53f5f0['markerName']);if(_0x3688f4){for(const _0x15c076 of _0x3688f4)(_0x15c076['hasClass']('ck-suggestion-marker-split')||_0x15c076['hasClass']('ck-suggestion-marker-merge'))&&(_0x3fc612['mapper']['unbindElementFromMarkerName'](_0x15c076,_0x53f5f0['markerName']),_0x3fc612['writer']['remove'](_0x15c076));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4b6e55,_0x30131e,_0x3b4fd3)=>{const _0x844903=_0x30131e['markerName']['split'](':')[0x1],_0xfc384f=this['_getChangeFromId'](_0x844903);if(!_0xfc384f)return null;const _0x3fd856='add'==_0xfc384f['type']?'split':'merge';if(_0x3b4fd3['consumable']['test'](_0x30131e['markerRange'],_0x4b6e55['name']))for(const _0x3537b1 of _0x30131e['markerRange']['getItems']()){if(!_0x3537b1['is']('element','softBreak'))continue;const _0x33699a=_0x3b4fd3['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3fd856}),_0x474891=_0x3b4fd3['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x3537b1));_0xfc384f['data']['isSuggestion']&&_0x3b4fd3['writer']['addClass']('ck-suggestion-marker-'+_0x3fd856+'-new',_0x33699a),this['activeChange']==_0xfc384f&&_0x3b4fd3['writer']['addClass']('ck-suggestion-marker--active',_0x33699a),_0x3b4fd3['writer']['insert'](_0x474891,_0x33699a),_0x3b4fd3['mapper']['bindElementToMarker'](_0x33699a,_0x30131e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2e5cea=>{for(const _0x58df03 of this['editor']['model']['document']['getRootNames']()){const _0x388f12=this['editor']['model']['document']['getRoot'](_0x58df03),_0x37c1d6=this['editor']['editing']['view']['document']['getRoot'](_0x58df03);if(_0x37c1d6){const _0xef9f33=_0x388f12['getAttribute']('revisionHistoryAttachChange');if(_0x2e5cea['removeAttribute']('data-change-id',_0x37c1d6),_0x2e5cea['removeClass']('ck-revision-history-root-add',_0x37c1d6),_0x2e5cea['removeClass']('ck-revision-history-root-remove',_0x37c1d6),_0x2e5cea['removeClass']('ck-revision-history-root--active',_0x37c1d6),_0xef9f33){const _0x583908=this['_getChangeFromId'](_0xef9f33);if(!_0x583908)return null;_0x2e5cea['setAttribute']('data-change-id',_0xef9f33,_0x37c1d6),_0x2e5cea['addClass']('ck-revision-history-root-'+_0x583908['type'],_0x37c1d6),this['activeChange']==_0x583908&&_0x2e5cea['addClass']('ck-revision-history-root--active',_0x37c1d6);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x12eba8=>'revision-comment:'+_0x12eba8,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0xa973b0=>'revision-suggestion:'+_0xa973b0,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x921227=>({'name':'suggestion:'+_0x921227,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3919c8=>{const _0xeb5a99=_0x3919c8['markerName']['split'](':')[0x1];return'insertion'!=_0xeb5a99&&'deletion'!=_0xeb5a99?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0xeb5a99]};}}),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',(_0x563e6e,_0x5b6167,_0x1bb87b)=>{const _0x5a2a04=_0x1bb87b['mapper']['markerNameToElements'](_0x5b6167['markerName']);if(_0x5a2a04){for(const _0x4f44f5 of _0x5a2a04)_0x4f44f5['is']('uiElement')&&(_0x1bb87b['mapper']['unbindElementFromMarkerName'](_0x4f44f5,_0x5b6167['markerName']),_0x1bb87b['writer']['remove'](_0x4f44f5));}},{'priority':'high'});}['_getChangeFromId'](_0x2ea6bd){return this['_changeIdToChange']['get'](_0x2ea6bd);}['_getViewForChange'](_0x3ec936){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x3ec936),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x539da4,_0x496c9a,_0x3dedbe,_0x1be0c2)=>{_0x1be0c2&&this['_balloon']['remove'](_0x1be0c2),_0x3dedbe&&(this['_balloon']['add']({'view':_0x3dedbe,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2618f1=this['editor']['editing'],_0x1eaf92=this['_getChangeFromId'](_0x3dedbe['changeId']);let _0x57cd20;if(_0x1eaf92['data']['isOnRoot']){const _0x1ec134=_0x2618f1['view']['getDomRoot'](_0x1eaf92['rootName']);_0x57cd20=Array['from'](_0x1ec134['getClientRects']());}else{const _0x724a5a=this['editor']['model']['markers']['get']('revision:'+_0x3dedbe['changeId']);_0x57cd20=Array['from'](_0x2618f1['mapper']['markerNameToElements'](_0x724a5a['name']))['map'](_0x5c92be=>_0x2618f1['view']['domConverter']['mapViewToDom'](_0x5c92be))['map'](_0x47c402=>Array['from'](_0x47c402['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x57cd20[0x0];return _0x57cd20['find'](_0x4a27de=>_0x4a27de['top']-0x3<=this['_activeViewTarget']['y']&&_0x4a27de['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4a27de['left']-0x3<=this['_activeViewTarget']['x']&&_0x4a27de['right']+0x3>=this['_activeViewTarget']['x'])||_0x57cd20[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5c3719,_0x5aa178,_0x35589d,_0x20022a)=>{this['activeView']=_0x35589d?this['_getViewForChange'](_0x35589d):null,this['editor']['model']['change'](()=>{const _0xfd4024=this['editor']['editing'];_0x20022a&&(_0x20022a['data']['isOnRoot']?_0xfd4024['view']['change'](_0xd589c4=>{_0xd589c4['removeClass']('ck-revision-history-root--active',_0xfd4024['view']['document']['getRoot'](_0x20022a['rootName']));}):_0xfd4024['reconvertMarker']('revision:'+_0x20022a['id'])),_0x35589d&&(_0x35589d['data']['isOnRoot']?_0xfd4024['view']['change'](_0x15f52f=>{_0x15f52f['addClass']('ck-revision-history-root--active',_0xfd4024['view']['document']['getRoot'](_0x35589d['rootName']));}):_0xfd4024['reconvertMarker']('revision:'+_0x35589d['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3d6ba1,_0x12bff4)=>{if(this['activeChange'])return;const _0x4451d6=this['_findChangeIdFromDomTarget'](_0x12bff4['target']),_0x51825a=this['_changeIdToChange']['get'](_0x4451d6);_0x51825a?(this['_activeViewTarget']={'x':_0x12bff4['domEvent']['x'],'y':_0x12bff4['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x51825a)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3aa284,_0xf4a803)=>{const _0x5d409c=this['_findChangeIdFromDomTarget'](_0xf4a803['target']),_0x502ef3=this['_changeIdToChange']['get'](_0x5d409c);_0x502ef3?(this['_activeViewTarget']={'x':_0xf4a803['domEvent']['x'],'y':_0xf4a803['domEvent']['y']},_0x502ef3===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x502ef3):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x42aad3){do{const _0x81dc89=_0x42aad3['getAttribute']('data-change-id');if(_0x81dc89)return _0x81dc89;_0x42aad3=_0x42aad3['parent'];}while(_0x42aad3);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x502fe4=>{for(const _0x286db5 of this['editor']['model']['markers'])_0x502fe4['removeMarker'](_0x286db5);});}}function Q(_0x274191,_0x1d0e7c){return(_0x183f5f,_0x3bcdae,_0x3c816c)=>{if(!_0x3c816c['consumable']['test'](_0x3bcdae['markerRange'],_0x183f5f['name']))return;const _0x5f1d1b=_0x3bcdae['markerRange']['getWalker'](),_0x3db5e1=_0x3bcdae['markerRange']['start'],_0x21bd27=_0x274191['model']['schema'];let _0x3091d7=null,_0x4f2995=null,_0x52ae6d=!0x1,_0x252ad0=!0x1;for(const _0x2616dc of _0x5f1d1b){const _0x294e87=_0x2616dc['item'];_0x52ae6d=_0x52ae6d||_0x21bd27['isContent'](_0x294e87);const _0x6404e1=_0x3c816c['mapper']['toViewElement'](_0x294e87);if(_0x6404e1&&_0x6404e1['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2616dc['type']&&(_0x21bd27['isBlock'](_0x294e87)&&!_0x21bd27['isLimit'](_0x294e87)&&(_0x294e87['nextSibling']||_0x3db5e1['isAtEnd']?_0x3091d7&&_0x3091d7['parent']==_0x294e87||(_0x3091d7=_0x294e87,_0x3184d9(_0x2616dc['previousPosition']),_0x252ad0=!0x0):_0x4f2995=_0x4f2995||_0x2616dc['previousPosition']));}function _0x3184d9(_0x31fd0b){const _0x28e93c=_0x3c816c['mapper']['toViewPosition'](_0x31fd0b),_0xf2855a=_0x3c816c['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1d0e7c});_0x3c816c['writer']['insert'](_0x28e93c,_0xf2855a),_0x3c816c['mapper']['bindElementToMarker'](_0xf2855a,_0x3bcdae['markerName']);}_0x52ae6d||_0x252ad0||!_0x4f2995||_0x3184d9(_0x4f2995);};}class nt extends _0x170f10{constructor(_0xb7f38e){super(_0xb7f38e);const _0x2d2360=_0xb7f38e['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x2d2360,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2d2360,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x1396da=this['editor'],_0x1f62a1=_0x1396da['plugins']['get'](u),_0x29fead=_0x1f62a1['isReady']?_0x1f62a1['diff']['newRevisionId']:null;_0x1396da['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x29fead);}['refresh'](){const {isReady:_0x16341e,isEnabled:_0x324f9f,repository:_0x18d7a4,diff:_0x1fb01c}=this['editor']['plugins']['get'](u),_0xfe8ab5=_0x1fb01c&&_0x18d7a4['getLaterVisibleRevision'](_0x1fb01c['newRevisionId']);this['isEnabled']=_0x16341e&&_0x324f9f&&Boolean(_0xfe8ab5);}}class ot extends _0x170f10{['_step'];constructor(_0x466cd6,{direction:_0x2ea7eb}){super(_0x466cd6);const _0x2b7322=_0x466cd6['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x2ea7eb?0x1:-0x1,this['listenTo'](_0x2b7322,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2b7322,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2b7322,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3f5c65=this['editor'],_0x21c4f6=_0x3f5c65['plugins']['get'](u),{isNavigationMode:_0x330ef5,currentChangeNumber:_0x4cfb6d}=_0x21c4f6;let _0x2eccc3;if(_0x21c4f6['activeChange']=_0x330ef5?_0x21c4f6['diff']['changes']['get'](_0x4cfb6d+this['_step']):_0x21c4f6['diff']['changes']['first'],_0x21c4f6['activeChange']['data']['isOnRoot'])_0x2eccc3=_0x3f5c65['editing']['view']['getDomRoot'](_0x21c4f6['activeChange']['rootName']);else{const _0x10e802=_0x3f5c65['model']['markers']['get']('revision:'+_0x21c4f6['activeChange']['id']);_0x2eccc3=_0x4cd219(_0x3f5c65['editing'],_0x10e802);}_0x511ff8({'target':_0x2eccc3,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x1aaeac,currentChangeNumber:_0x2ce680,numberOfChanges:_0x4b591a,isReady:_0x96ffeb,isEnabled:_0x57d4a6}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x57d4a6&&_0x96ffeb&&_0x4b591a)&&(!_0x1aaeac||(0x1===this['_step']?_0x2ce680<_0x4b591a-0x1:_0x2ce680>0x0));}}class xi extends _0x23ebf3{constructor(_0x1eaff9){super(_0x1eaff9);const _0x54b42a=this['bindTemplate'],_0x21fa7a=new _0x25e13b(_0x1eaff9),_0x4619b2=new _0x25e13b(_0x1eaff9);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',(_0x3f54c5,_0x4c7987)=>_0x3f54c5&&_0x4c7987>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x183373,_0x245f24,_0x2f11ac,_0x148e17)=>{if(!_0x183373)return m(_0x1eaff9,'Loading...');if(!_0x2f11ac)return m(_0x1eaff9,'No\x20changes');const _0x586beb=m(_0x1eaff9,'NUMBER_OF_CHANGES',_0x2f11ac);return _0x148e17?m(_0x1eaff9,'X_OF_Y_CHANGES',[_0x245f24+0x1,_0x2f11ac]):_0x586beb;}),_0x21fa7a['set']({'label':m(_0x1eaff9,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x17ec06}),_0x4619b2['set']({'label':m(_0x1eaff9,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x395705}),_0x21fa7a['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4619b2['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x21fa7a['on']('execute',()=>this['fire']('execute','backward')),_0x4619b2['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',_0x54b42a['if']('_isStatusLabelVisible','ck-hidden',_0x534052=>!_0x534052)]},'children':[{'text':_0x54b42a['to']('isNavigationMode',_0x324aa8=>_0x324aa8?m(_0x1eaff9,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x1eaff9,'Total')+':\x20')}]},{'text':_0x54b42a['to']('_statusText')}]},new _0x48fedf(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x21fa7a,_0x4619b2]}]});}}const ge='ck-editor__editable__loading-overlay';class Ri extends _0x5d9b40{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x376faa=this['editor']['editing']['view'];_0x376faa['change'](_0x14a8a8=>{for(const _0x23b24a of _0x376faa['document']['roots'])_0x14a8a8['addClass'](ge,_0x23b24a);});}['hide'](){const _0x2a082c=this['editor']['editing']['view'];_0x2a082c['change'](_0x321666=>{for(const _0x35516d of _0x2a082c['document']['roots'])_0x321666['removeClass'](ge,_0x35516d);});}}class v extends _0x5d9b40{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,Ri];}['init'](){const _0x27812b=this['editor'],_0x391919=_0x27812b['plugins']['get'](u),_0x2d8770=_0x27812b['plugins']['get'](Ri);_0x27812b['ui']['componentFactory']['add']('exitToEditing',_0x756244=>{const _0x4ae77a=new _0x25e13b(_0x756244);return _0x4ae77a['set']({'label':m(_0x756244,'Back\x20to\x20editing'),'icon':_0x2e404c,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x4ae77a,'execute',()=>{_0x27812b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x4ae77a;}),_0x27812b['ui']['componentFactory']['add']('restoreRevision',_0x980f4c=>{const _0x1a76af=new _0x25e13b(_0x980f4c);return _0x1a76af['set']({'label':m(_0x980f4c,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1a76af['bind']('isEnabled')['to'](_0x27812b['commands']['get']('restoreRevision')),this['listenTo'](_0x1a76af,'execute',()=>_0x27812b['execute']('restoreRevision')),_0x1a76af;}),_0x27812b['ui']['componentFactory']['add']('changesNavigation',_0x2dcd33=>{const _0x3f287e=new xi(_0x2dcd33),_0x140053=_0x27812b['commands']['get']('showPreviousChange'),_0x123fe4=_0x27812b['commands']['get']('showNextChange');return _0x3f287e['bind']('isBackwardNavigationEnabled')['to'](_0x140053,'isEnabled'),_0x3f287e['bind']('isForwardNavigationEnabled')['to'](_0x123fe4,'isEnabled'),_0x3f287e['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x391919),this['listenTo'](_0x3f287e,'execute',(_0x105a8d,_0x149b11)=>{_0x27812b['execute']('forward'===_0x149b11?'showNextChange':'showPreviousChange');}),_0x3f287e;}),_0x2d8770['show'](),_0x391919['on']('change:isReady',(_0x3daae8,_0xae823d,_0x34ade4)=>{_0x34ade4?_0x2d8770['hide']():_0x2d8770['show']();});}}class _i extends ti{['_resizeObserver']=null;constructor(_0x3c56dc,_0x2d7578){super(_0x3c56dc,_0x2d7578);const _0x2c2070=this['bindTemplate'];this['set']({'label':m(_0x3c56dc,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x3c56dc,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x2c2070['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 _0x4c015e=this['fieldView']['element'];this['_tooltipString']=_0x4c015e['scrollWidth']>_0x4c015e['clientWidth']&&_0x4c015e['value']||'';}}class bi extends _0x23ebf3{constructor(_0xa0a00e,_0x3fd324,_0xb5e7e5){super(_0xa0a00e);const _0x25b37c=new _0x212a7e();_0x25b37c['set']({'content':_0x3ea8ae,'viewBox':'0\x200\x2011\x2010'});const _0x4814f1=['ck','ck-revision-history-sidebar__revision-author'];_0xb5e7e5&&_0x4814f1['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3ca4ad=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0xa0a00e,_0xb5e7e5?'Revision\x20creator':'Revision\x20author')},'children':[_0x25b37c,_0x3fd324['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4814f1},'children':_0x3ca4ad});}}function ki(_0x45cd01,_0x14fb30){const _0x5c9ad7=_0x45cd01['bindTemplate'],_0x4a198a=_0x45cd01['locale'],_0x2e3dfb=_0x1f2a8d(_0x4a198a);_0x2e3dfb['panelPosition']='sw';const _0x1af1c9=function(_0x5c6afd,_0x52c22f){const _0x8699b0=function(_0x1399dc,_0xe3d31f){const _0x578524=_0x1399dc['locale'],_0x321e67={'Compare\x20against\x20selected':m(_0x578524,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x578524,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x578524,'Restore\x20this\x20revision')};return _0xe3d31f['map'](_0x2313e7=>{const _0x47a387=_0x321e67[_0x2313e7['name']];return _0x47a387&&_0x47a387!==_0x2313e7['name']&&(_0x2313e7['name']=_0x47a387),_0x2313e7;});}(_0x5c6afd,_0x52c22f),_0x31c12d=new _0x5c2418();for(const _0x4bb3b8 of _0x8699b0){const _0x49e7ac={'type':'button','model':new to({'label':_0x4bb3b8['name'],'class':_0x4bb3b8['class'],'withText':!0x0,'role':'menuitem','_action':_0x4bb3b8['action']})};_0x49e7ac['model']['bind']('isEnabled')['to'](_0x5c6afd,'isActionsDropdownOpen',_0x356425=>'function'!=typeof _0x4bb3b8['isEnabled']||(!_0x356425||_0x4bb3b8['isEnabled'](_0x5c6afd))),_0x31c12d['add'](_0x49e7ac);}return _0x31c12d;}(_0x45cd01,_0x14fb30);return _0x45cd01['bind']('isActionsDropdownOpen')['to'](_0x2e3dfb,'isOpen'),_0x2e3dfb['buttonView']['set']({'label':m(_0x4a198a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x5ab55c}),_0x2e3dfb['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5c9ad7['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x5c9ad7['to'](_0x333603=>_0x333603['stopPropagation']())}}),_0x2e3dfb['on']('execute',_0x5d5cde=>{_0x45cd01['isReady']&&'function'==typeof _0x5d5cde['source']['_action']&&_0x5d5cde['source']['_action'](_0x45cd01);}),_0x249ef5(_0x2e3dfb,_0x1af1c9,{'role':'menu'}),_0x2e3dfb['listenTo'](_0x45cd01,'change:isActionsDropdownOpen',(_0x26a564,_0x2facb0,_0x2936bc)=>{if(_0x2936bc)for(const _0x3847a1 of _0x2e3dfb['listView']['items']){const _0x306af3=_0x3847a1['children']['first'],_0x18722b=_0x14fb30['find'](_0x3852d8=>_0x3852d8['action']===_0x306af3['_action'])['isVisible'];_0x3847a1['isVisible']=void 0x0===_0x18722b||_0x18722b(_0x45cd01);}}),_0x2e3dfb;}class ci extends/* #__PURE__ -- @preserve */
27
+ _0x501c59(_0x23ebf3){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x3f55ef,_0x30e5e1,_0x5eba08,_0x44201f){super(_0x3f55ef);const _0x1a4383=this['bindTemplate'],_0x4becb6=function(_0x542d18,_0x4799e4){const _0x386815=Array['from'](_0x4799e4['authors'])['filter'](_0x22c624=>_0x22c624!=_0x4799e4['creator']);return _0x4799e4['creator']&&_0x386815['unshift'](_0x4799e4['creator']),_0x386815['map'](_0x5bb853=>new bi(_0x542d18,_0x5bb853,_0x5bb853==_0x4799e4['creator']));}(_0x3f55ef,_0x30e5e1);this['id']=_0x30e5e1['id'],this['_revision']=_0x30e5e1,this['_requireRevisionName']=_0x44201f,this['bind']('name','createdAt')['to'](_0x30e5e1),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1b8fd4=>{return _0x365c30=_0x3f55ef['uiLanguage'],(_0x5939a0=_0x1b8fd4)['toLocaleDateString'](_0x365c30,{'month':'long','day':'numeric'})+',\x20'+_0x5939a0['toLocaleTimeString'](_0x365c30,{'hour':'numeric','minute':'numeric'});var _0x365c30,_0x5939a0;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new _i(_0x3f55ef,_0x5dd4bb),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x33aa33=>_0x33aa33||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x565dc7,_0x41e3d7)=>_0x565dc7&&_0x41e3d7),this['revisionActionsView']=_0x5eba08&&_0x5eba08['length']?ki(this,_0x5eba08):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x1a4383['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x1a4383['if']('isEnabled','ck-disabled',_0x9528be=>!_0x9528be),_0x1a4383['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x1a4383['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x1a4383['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':_0x1a4383['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':_0x4becb6}]},this['revisionActionsView']],'on':{'click':_0x1a4383['to'](_0x4ed989=>{_0x4ed989['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x15fb01=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x15fb01,'change',()=>{this['_requireRevisionName']&&!_0x15fb01['value']||this['fire']('setName',{'id':this['id'],'name':_0x15fb01['value']}),_0x15fb01['value']||(_0x15fb01['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(_0x299e67,_0x175ab9){const _0x59ad9b=_0x4a7254['fromJSDate'](_0x299e67)['setLocale'](_0x175ab9),_0x301d19=_0x4a7254['local'](),_0x421961=_0x301d19['minus']({'days':0x1})['startOf']('day');let _0x3b8c29,_0x5c37a5;return _0x59ad9b['hasSame'](_0x301d19,'day')?(_0x3b8c29=_0x59ad9b['startOf']('day')['toJSDate'](),_0x5c37a5=_0x59ad9b['toRelativeCalendar']()):_0x59ad9b['hasSame'](_0x421961,'day')?(_0x3b8c29=_0x421961['toJSDate'](),_0x5c37a5=_0x59ad9b['toRelativeCalendar']()):_0x59ad9b['hasSame'](_0x301d19,'week')?(_0x3b8c29=_0x59ad9b['startOf']('week')['toJSDate'](),_0x5c37a5=_0x59ad9b['weekdayLong']||''):_0x59ad9b['hasSame'](_0x301d19,'year')?(_0x3b8c29=_0x59ad9b['startOf']('month')['toJSDate'](),_0x5c37a5=_0x59ad9b['monthLong']||''):(_0x3b8c29=_0x59ad9b['startOf']('year')['toJSDate'](),_0x5c37a5=String(_0x59ad9b['year'])),{'startDate':_0x3b8c29,'localizedPeriodName':_0x5c37a5};}class vi extends _0x23ebf3{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x591271,_0x40b048,_0x4f8f14,_0xb5fed9){super(_0x591271);const _0x53fddd=di(_0x40b048,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x40b048,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4f8f14,this['_requireRevisionName']=_0xb5fed9,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':_0x53fddd}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x5f4ae6){const _0x1617c3=new ci(this['locale'],_0x5f4ae6,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1617c3);}['removeRevision'](_0x5e8763){const _0x1c785f=this['revisionViews']['find'](_0x5dcf7d=>_0x5dcf7d['id']===_0x5e8763['id']);this['revisionViews']['remove'](_0x1c785f);}}class mi extends _0x23ebf3{constructor(_0x4560ad){super(_0x4560ad);const _0x215dc0=new _0x212a7e();_0x215dc0['content']=_0x23a599,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x215dc0,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x4560ad,'Revision\x20history')]}]});}}class ai extends _0x23ebf3{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0xac0930,_0x575404,_0x4d36be,_0x3aabe7){super(_0xac0930);const _0x497a20=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x575404,this['_revisionActions']=_0x4d36be,this['_requireRevisionName']=_0x3aabe7,this['on']('select',(_0x335d10,_0xc134ce)=>{this['fire']('revisionSelected',_0xc134ce);}),this['on']('setName',(_0x3b526e,_0x35cf52)=>{this['fire']('revisionSetName',_0x35cf52);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new mi(_0xac0930),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x497a20['if']('isEnabled','ck-disabled',_0x150460=>!_0x150460)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x5cadd3 of this['_revisions'])this['_addRevision'](_0x5cadd3);this['_revisions']['on']('add',(_0x4b87b4,_0x5df199)=>{this['_addRevision'](_0x5df199);}),this['_revisions']['on']('remove',(_0x447ae7,_0x4b998b)=>{this['_removeRevision'](_0x4b998b);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x40adb6=>_0x40adb6['revisionViews']['map'](_0x41598d=>_0x41598d))['flat']();}['selectRevision'](_0x48ab60){for(const _0x1e57a7 of this['revisionViews'])_0x48ab60&&_0x48ab60['id']===_0x1e57a7['id']?_0x1e57a7['select']():_0x1e57a7['deselect']();}['highlightRevisions'](_0x1013ab){for(const _0x5b0e77 of this['revisionViews'])_0x1013ab['some'](({id:_0x3c73a4})=>_0x3c73a4===_0x5b0e77['id'])?_0x5b0e77['highlight']():_0x5b0e77['unhighlight']();}['_addRevision'](_0xbb9937){const _0x355dc8=di(_0xbb9937['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0xb649f0=this['timePeriodViews']['get'](0x0);_0xb649f0&&_0xb649f0['startDate']['getTime']()===_0x355dc8['getTime']()||(_0xb649f0=new vi(this['locale'],_0x355dc8,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0xb649f0)),_0xb649f0['addRevision'](_0xbb9937);}['_removeRevision'](_0x397215){const _0x24e2b1=di(_0x397215['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x24e2b1)['removeRevision'](_0x397215);}['_getTimePeriodViewByStartDate'](_0x1728ee){return this['timePeriodViews']['find'](_0x399754=>_0x399754['startDate']['getTime']()===_0x1728ee['getTime']());}}class d extends _0x5d9b40{['_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
+ rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x2efda4){super(_0x2efda4),this['_revisionViewer']=_0x2efda4['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x4e058f=this['_revisionsRepository']['_revisions'],_0x5eee02=this['_createRevisionActions'](),_0x574f84=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ai(this['editor']['locale'],_0x4e058f,_0x5eee02,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',(_0x34f4f7,_0x70a9ca)=>{_0x70a9ca['revisionViews']['on']('add',(_0x3bcf74,_0x5d0682)=>{_0x5d0682['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)),_0x574f84['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x187c67=this['_revisionsRepository']['getRevision'](0x0);if(_0x187c67){const _0xe5de63=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x187c67['id']);this['_revisionViewer']['compare'](_0x187c67,_0xe5de63);}}['_handleRevisionSelected'](_0x2a94b5,_0x526ebb){const _0x530864=this['_revisionsRepository']['getRevision'](_0x526ebb['id']),_0x55f444=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x530864['id']);this['_revisionViewer']['compare'](_0x530864,_0x55f444);}['_handleRevisionSetName'](_0x372520,_0x40e7be){this['_revisionsRepository']['getRevision'](_0x40e7be['id'])['setName'](_0x40e7be['name']);}['_handleDiffChange'](_0x1ff716,_0x959cf1,_0x40da78){const _0x1656d0=this['_revisionsRepository']['getRevisionsInDiff'](_0x40da78);_0x1656d0['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x1656d0),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x1656d0[0x0]));}['_createRevisionActions'](){const _0x5315ae=this['editor'],_0x4b8461=d['availableRevisionActions'],_0x72993=_0x5315ae['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x72993['length'])return _0x72993['map'](_0x9baa8f=>{const _0x21a531='string'==typeof _0x9baa8f?Object['assign']({},_0x4b8461[_0x9baa8f]):_0x9baa8f;return _0x21a531['action']=_0x21a531['action']['bind'](this,_0x5315ae),_0x21a531['isVisible']&&(_0x21a531['isVisible']=_0x21a531['isVisible']['bind'](this,_0x5315ae)),_0x21a531;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4c7127},_0x1c49cf)=>{const _0x5acced=_0x4c7127['get'](u),_0x47dea6=_0x5acced['repository'];let _0x11d3d4=_0x5acced['diff']['newRevisionId'],_0x4feaf2=_0x1c49cf['id'];_0x47dea6['getIndex'](_0x11d3d4)>_0x47dea6['getIndex'](_0x4feaf2)&&([_0x11d3d4,_0x4feaf2]=[_0x4feaf2,_0x11d3d4]),_0x5acced['compare'](_0x11d3d4,_0x4feaf2);},'isVisible':({plugins:_0x5d87ca},_0xf1a2f2)=>{const _0xffc1ce=_0x5d87ca['get'](u);return!(_0xffc1ce['repository']['getRevisionsInDiff'](_0xffc1ce['diff'])['length']>0x2)&&!_0xf1a2f2['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x12c46d,{id:_0x294bac})=>{_0x12c46d['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x294bac);},'isVisible':({plugins:_0x19c00e},_0x1ba0ff)=>!!_0x19c00e['get'](u)['repository']['getLaterVisibleRevision'](_0x1ba0ff['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x350eaf},{id:_0x3bcc9a,revisionNameView:_0x576858})=>{const _0xa2b214=_0x350eaf['get'](u),_0x1c51c3=_0xa2b214['repository']['getEarlierVisibleRevision'](_0x3bcc9a);_0xa2b214['compare'](_0x3bcc9a,_0x1c51c3),_0x576858['focus'](),_0x576858['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x23e064,_0x25829e){super(_0x23e064),this['_view']=_0x25829e,this['_toolbarConfig']=st(_0x23e064['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x24e657){const _0x308789=this['editor'],_0x3e829b=this['view'],_0x185bed=_0x308789['editing']['view'],_0x1f4791=_0x3e829b['editable'],_0x19f0e0=_0x185bed['document']['getRoot']();_0x1f4791['name']=_0x19f0e0['rootName'],_0x3e829b['render']();const _0x2846a7=_0x1f4791['element'];this['setEditableElement'](_0x1f4791['name'],_0x2846a7),_0x3e829b['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x185bed['attachDomRoot'](_0x2846a7),this['_elementReplacer']['replace'](_0x24e657,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x511026=this['view'],_0x1689ac=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x1689ac['detachDomRoot'](_0x511026['editable']['name']),_0x511026['destroy']();}['_initToolbar'](){const _0x4d9fd0=this['view'];_0x4d9fd0['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x4d9fd0['stickyPanel']['limiterElement']=_0x4d9fd0['element'],_0x4d9fd0['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x4f11ed})=>_0x4f11ed),_0x4d9fd0['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x4d9fd0['toolbar']);}}class ii extends _0x24a91a{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x50465b,_0x2726a4,_0x129d45={}){super(_0x50465b),this['stickyPanel']=new _0x23ce19(_0x50465b),this['toolbar']=new _0x29b212(_0x50465b,{'shouldGroupWhenFull':_0x129d45['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x50465b,_0x2726a4);}['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
+ _0x5a628a(_0x527c10){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x420f85,_0x27df6d){super(_0x27df6d),this['sourceElement']=_0x420f85,this['model']['document']['createRoot']();const _0x2d1d1f=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x2d1d1f);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x3855e1,_0x595b0f){const _0x1efd3f=new this(_0x3855e1,_0x595b0f);return await _0x1efd3f['initPlugins'](),await _0x1efd3f['ui']['init'](_0x3855e1),await _0x1efd3f['data']['init'](_0x1efd3f['config']['get']('initialData')||''),_0x1efd3f['fire']('ready'),_0x1efd3f;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class at extends _0x5d9b40{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1af078){function _0x3e6bfe(_0x2f6c83){return _0x2f6c83['map'](_0x491afc=>String['fromCharCode'](_0x491afc))['join']('');}super(_0x1af078),this['result']='end',_0x1af078[_0x3e6bfe([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3e6bfe([0x76,0x69,0x65,0x77])][_0x3e6bfe([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3e6bfe([0x61,0x75,0x74,0x6f]),_0x1af078[_0x3e6bfe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3e6bfe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3e6bfe([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3e6bfe([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3e6bfe([0x6f,0x6b])});}}class ht extends _0x5d9b40{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x49714e){if(super(_0x49714e),!this['editor']['config']['get']('revisionHistory'))throw new _0x307a19('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x256d64=>this['_showRevisionViewer']({..._0x256d64,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x45a00c=>this['_closeRevisionViewer'](_0x45a00c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x574a11=>this['_restoreRevision'](_0x574a11)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x3ed087){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3ed087;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x5d5f58){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x5d5f58);}['getRevision'](_0x33c590){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x33c590);}['getRevisions'](_0x406845){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x406845||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0xe7e454=this['editor'],_0x1fcd42=_0x214800(_0xe7e454,p),_0x33dc6a=_0xe7e454['plugins']['get']('RevisionTracker'),_0x49dd6a=_0xe7e454['plugins']['get']('Users')['users'];return _0x1fcd42['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1fcd42['lazyRoots'],(_0x1fcd42['plugins']['push'](at,u,v,class extends _0x5d9b40{static get['requires'](){return[u,'Users'];}['init'](){const _0x537c80=this['editor']['plugins']['get']('Users');for(const _0x1324af of _0x49dd6a)_0x1324af['isAnonymous']||_0x537c80['getUser'](_0x1324af['id'])||_0x537c80['addUser'](_0x1324af);const _0x458158=_0x33dc6a['repository']['getRevisions']();let _0x113aca=null;const _0x2085a1=this['editor']['plugins']['get']('RevisionViewer');_0x2085a1['adapter']=_0x33dc6a['adapter'],_0x2085a1['bind']('isEnabled')['to'](_0x33dc6a),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xe7e454,'isReadOnly',_0x3c4778=>!_0x3c4778);for(const _0xb1656c of _0x458158){const _0x8a6966=null===_0xb1656c['creator'];if(_0x8a6966&&_0xb1656c['toVersion']===_0xb1656c['fromVersion'])continue;const _0x3f64d8=_0xb1656c['toJSON']();_0x2085a1['addRevisionData'](_0x3f64d8,(_0x27e506,_0x5ef2dc,_0x2dd921)=>{if(_0x8a6966){if(_0x113aca)_0x113aca['_update'](_0x27e506,_0x5ef2dc);else{if(!_0x5ef2dc){const _0x58fc9a=_0x2dd921['toJSON']();_0x58fc9a['id']=_0x7da10a(),_0x33dc6a['saveRevision'](_0x58fc9a,_0x2dd921['toVersion'])['then'](_0x123564=>{_0x113aca=_0x123564;});}}}else _0xb1656c['_update'](_0x27e506,_0x5ef2dc);});}}},d),_0x1fcd42);}['_enhanceShowRevisionViewerCallback'](){const _0x4ff64d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x293732=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x63c759=this['editor']['plugins']['get']('Autosave');await _0x63c759['save']();}else await _0x293732['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x452d60=this['editor']['plugins']['get']('Dialog');_0x452d60['isOpen']&&_0x452d60['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x2af390=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x209ea1 of _0x2af390)_0x209ea1['class']=_0x209ea1['class']?_0x209ea1['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x43bede=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x43bede&&_0x43bede['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1a5205=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1a5205&&_0x1a5205['setAttribute']('tabindex','-1');}}const _0x34f75b=this['_getRevisionViewerEditorConfig']();return _0x4ff64d(_0x34f75b)['then'](_0x9b8974=>{return(this['_viewerEditor']=_0x9b8974,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'),_0x9b8974);})['catch'](_0xdbe9c9=>(console['error'](_0xdbe9c9),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x15694e=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 _0xe06781=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x572d02 of _0xe06781)_0x572d02['class']='ck-tab-panel_disabled'===_0x572d02['class']?'':_0x572d02['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x2a239c=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2a239c&&_0x2a239c['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x5c0124=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x5c0124&&_0x5c0124['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x15694e(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3293f9=this['editor']['plugins']['get']('Annotations');_0x3293f9['refreshVisibility'](),_0x3293f9['refreshPositioning']();}});});}['_showRevisionViewer'](_0x797300){const _0x59e046=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xdbcc24=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4c6df3=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x4c6df3,_0x797300)['then'](_0x3324a1=>(_0xdbcc24['style']['display']='block',_0x59e046['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3324a1));}['_closeRevisionViewer'](_0x25837e){const _0x3cff74=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3cff74['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x25837e['destroy']();}async['_restoreRevision'](_0x103e87){const _0x3e1e04=this['editor'],_0xdcf79d=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x520d2b=_0x3e1e04['plugins']['get']('RevisionTracker'),_0x42ecd1=_0x3e1e04['plugins']['get']('RevisionHistoryUtils'),_0x48e3ad=_0xdcf79d['repository']['getRevision'](_0x103e87);let _0x498fae,_0x54f6a6,_0x2ef7f;try{await _0x42ecd1['loadRevisionData'](_0x48e3ad,this['adapter']),_0x498fae=_0x42ecd1['getRevisionDocumentData'](_0x48e3ad),_0x54f6a6=_0x42ecd1['getRevisionRootsAttributes'](_0x48e3ad);}catch(_0x59ac9c){return void console['error'](_0x59ac9c);}_0x3e1e04['model']['change'](_0xc8ad1d=>{for(const _0x3eeeff of Array['from'](_0x3e1e04['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xc8ad1d['removeMarker'](_0x3eeeff);}),_0xdcf79d['isReady']=!0x1,_0x3e1e04['model']['enqueueChange'](_0x5056a5=>{_0x5056a5['setSelection'](null),_0x5056a5['removeSelectionAttribute'](_0x3e1e04['model']['document']['selection']['getAttributeKeys']());const _0xb3347d=Object['keys'](_0x498fae);for(const _0x46abd9 of _0x3e1e04['model']['document']['roots'])'$graveyard'!=_0x46abd9['rootName']&&_0x46abd9['isAttached']()&&!_0xb3347d['includes'](_0x46abd9['rootName'])&&_0x5056a5['detachRoot'](_0x46abd9);for(const _0x48be33 of _0xb3347d){let _0x4ee2a5=_0x3e1e04['model']['document']['getRoot'](_0x48be33);_0x4ee2a5&&_0x4ee2a5['isAttached']()||(_0x4ee2a5=_0x5056a5['addRoot'](_0x48be33));const _0x18597e=_0x54f6a6[_0x48be33],_0x1d4c79=Object['keys'](_0x18597e),_0x544503=_0x498fae[_0x48be33];for(const _0x1b5e94 of _0x4ee2a5['getAttributeKeys']())_0x1d4c79['includes'](_0x1b5e94)||_0x5056a5['removeAttribute'](_0x1b5e94,_0x4ee2a5);for(const _0x2bcf5f of _0x1d4c79)_0x5056a5['setAttribute'](_0x2bcf5f,_0x54f6a6[_0x48be33][_0x2bcf5f],_0x4ee2a5);_0x5056a5['remove'](_0x5056a5['createRangeIn'](_0x4ee2a5)),_0x5056a5['insert'](_0x3e1e04['data']['parse'](_0x544503,_0x4ee2a5),_0x4ee2a5,0x0);}});const _0x4305c6=m(_0x3e1e04['locale'],'Restored');if(_0x48e3ad['name'])_0x2ef7f=-0x1==_0x48e3ad['name']['indexOf'](_0x4305c6)?_0x4305c6+':\x20'+_0x48e3ad['name']:_0x48e3ad['name'];else _0x2ef7f=_0x4305c6+':\x20'+(_0x48e3ad['createdAt']['toLocaleDateString'](_0x3e1e04['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x48e3ad['createdAt']['toLocaleTimeString'](_0x3e1e04['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x520d2b['saveRevision']({'name':_0x2ef7f}),_0xdcf79d['isReady']=!0x0,_0x3e1e04['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};