@ckeditor/ckeditor5-revision-history 47.0.0-alpha.9 → 47.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x1a438a,uid as _0x3bb1d9,Collection as _0x40f1c6,logWarning as _0x823218,FocusTracker as _0x57d9ce,KeystrokeHandler as _0x5f3a69,scrollViewportToShowTarget as _0x41b90b,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x5a9728}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x1f8919,set as _0x2c972b,unset as _0x45b178,isEqual as _0x588fc7}from'es-toolkit/compat';import{Plugin as _0x2bce4d,PendingActions as _0x5a0857,Command as _0x1e3043,ElementApiMixin as _0x335ce4,Editor as _0x43bc7b}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x729304,getMarkerDomElement as _0x47c945,ConfirmMixin as _0x4e9a07,sanitizeEditorConfig as _0x4af87c}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x6e2313,ViewAttributeElement as _0x4ce6b3,ViewEmptyElement as _0x5d6ad4,ViewRawElement as _0x242d82,ViewUIElement as _0x49d851,ViewDocumentFragment as _0x11f4b2,ViewText as _0x286ad4,ViewElement as _0x23f5aa,ModelElement as _0x41b3fc,ModelRange as _0x1340e0,ModelPosition as _0x4d7936,ModelDocumentFragment as _0x1753c2,ModelText as _0x3e2046}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x3f5198,IconChevronUp as _0x338ac3,IconChevronDown as _0x13d84f,IconUndo as _0x57a137,IconUser as _0x4ad26c,IconThreeVerticalDots as _0x575b19}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x5e9ce1,View as _0x4c679a,submitHandler as _0x3ae8e9,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x46d208,ListView as _0x33e630,ListItemView as _0x2b7b7d,ButtonView as _0x1a6925,MenuBarMenuView as _0x412e4b,MenuBarMenuListView as _0x289751,MenuBarMenuListItemView as _0x50e527,MenuBarMenuListItemButtonView as _0x1326a4,ContextualBalloon as _0x27a1d9,ToolbarSeparatorView as _0x33adfd,IconView as _0x26c7e2,addListToDropdown as _0x39fd9f,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x21096b,StickyPanelView as _0x267fea,ToolbarView as _0x2a39c7,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x11c9f8}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x1a438a(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x182d7d){super(),this['id']=_0x182d7d['id']||_0x3bb1d9(),this['creator']=_0x182d7d['creator']||null,this['authors']=_0x182d7d['authors']||[],this['diffData']=_0x182d7d['diffData']||null,this['toVersion']=_0x182d7d['toVersion']||0x0,this['fromVersion']=_0x182d7d['fromVersion']||0x0,this['set']('name',_0x182d7d['name']||''),this['set']('createdAt',_0x182d7d['createdAt']||new Date()),this['set']('attributes',_0x182d7d['attributes']||{});}['setName'](_0x5a74c3){this['_update']({'name':_0x5a74c3});}['setAttribute'](_0x34d2a9,_0x5aeca2){const _0x42b2e6=_0x1f8919(this['attributes']);_0x2c972b(_0x42b2e6,_0x34d2a9,_0x5aeca2),this['_update']({'attributes':_0x42b2e6});}['removeAttribute'](_0x28b96b){const _0x1b0177=_0x1f8919(this['attributes']);_0x45b178(_0x1b0177,_0x28b96b),this['_update']({'attributes':_0x1b0177});}['_update'](_0x131400,_0x3a759f=!0x1){let _0x285a9a=!0x1;const _0xd88e12={'id':this['id']},_0x1af273=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4f9567 of _0x1af273){const _0x460a68=_0x131400[_0x4f9567];void 0x0!==_0x460a68&&_0x460a68!==this[_0x4f9567]&&(this[_0x4f9567]=_0x460a68,_0xd88e12[_0x4f9567]=_0x460a68,_0x285a9a=!0x0);}_0x285a9a&&(_0xd88e12['authors']&&(_0xd88e12['authorsIds']=_0xd88e12['authors']['map'](_0x51a996=>_0x51a996['id']),delete _0xd88e12['authors']),this['fire']('_update',_0xd88e12,_0x3a759f));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2c941c=>_0x2c941c['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x2bce4d{['_revisions'];static get['requires'](){return[_0x729304];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x4f3a8c){super(_0x4f3a8c),this['_revisions']=new _0x40f1c6();}['afterInit'](){!async function(_0x1fe2df){const _0x3b0496=_0x38a251([0x73,0x47,0x36,0x35,0x43,0x72,0x6b,0x31,0x63,0x64,0x32,0x69,0x67,0x4c,0x4e,0x37,0x7a,0x49,0x45,0x41,0x59,0x6a,0x75,0x39,0x4a,0x33,0x68,0x62,0x50,0x42,0x74,0x6e,0x46,0x4d,0x78,0x51,0x66,0x34,0x48,0x77,0x5a,0x61,0x6c,0x30,0x71,0x54,0x53,0x56,0x4b,0x79,0x44,0x6d,0x6f,0x52,0x76,0x55,0x58,0x65,0x70,0x57,0x4f,0x38]),_0x58edfb=0xeb829,_0x26ab8f=0x7374585f,_0x5e85ec=0x73732caf^_0x26ab8f,_0x2e78e1=window[_0x38a251([0x44,0x61,0x74,0x65])][_0x38a251([0x6e,0x6f,0x77])](),_0x59fc46=_0x1fe2df[_0x38a251([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x435776=new window[(_0x38a251([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3fa6ab=>{_0x59fc46[_0x38a251([0x6f,0x6e,0x63,0x65])](_0x38a251([0x72,0x65,0x61,0x64,0x79]),_0x3fa6ab);}),_0x14fbf8={[_0x38a251([0x6b,0x74,0x79])]:_0x38a251([0x45,0x43]),[_0x38a251([0x75,0x73,0x65])]:_0x38a251([0x73,0x69,0x67]),[_0x38a251([0x63,0x72,0x76])]:_0x38a251([0x50,0x2d,0x32,0x35,0x36]),[_0x38a251([0x78])]:_0x38a251([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]),[_0x38a251([0x79])]:_0x38a251([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]),[_0x38a251([0x61,0x6c,0x67])]:_0x38a251([0x45,0x53,0x32,0x35,0x36])},_0x24f6d4=_0x59fc46[_0x38a251([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x38a251([0x67,0x65,0x74])](_0x38a251([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x22a989(){let _0x541463,_0x47ebff=null,_0x6be07e=null;try{if(_0x24f6d4==_0x38a251([0x47,0x50,0x4c]))return _0x38a251([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x541463=_0x5c96d3(),!_0x541463)return _0x38a251([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x541463[_0x38a251([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x6be07e=_0x59b605(_0x541463[_0x38a251([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x541463[_0x38a251([0x6a,0x74,0x69])])),await _0x199d93()?_0x53312d()?_0x482598()?_0x38a251([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x110180()?(_0x541463[_0x38a251([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x38a251([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x47ebff=_0x1401dc(_0x38a251([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x541463[_0x38a251([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x38a251([0x74,0x72,0x69,0x61,0x6c])&&(_0x47ebff=_0x1401dc(_0x38a251([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3c5826()):_0x38a251([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x38a251([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x38a251([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x38a251([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x482598(){const _0x20c50e=[_0x38a251([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x38a251([0x74,0x72,0x69,0x61,0x6c])][_0x38a251([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x541463[_0x38a251([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2e78e1/0x3e8:0xe10*_0x5e85ec;return _0x541463[_0x38a251([0x65,0x78,0x70])]<_0x20c50e;}function _0x53312d(){const _0x386499=_0x541463[_0x38a251([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x386499)return!0x1;if(_0x386499[_0x38a251([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38a251([0x2a])))return!0x0;if(_0x386499[_0x38a251([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38a251([0x52,0x48])))return!0x0;if(_0x386499[_0x38a251([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38a251([0x52,0x52,0x48]))){if(_0x15c2b8())return!0x0;if(_0x230ff9()||_0x304331())return!0x0;}return!0x1;}function _0x110180(){const _0x5f4ff9=_0x541463[_0x38a251([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5f4ff9||0x0==_0x5f4ff9[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3d8b5e}=new URL(window[_0x38a251([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5f4ff9[_0x38a251([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d8b5e))return!0x0;const _0x28e968=_0x3d8b5e[_0x38a251([0x73,0x70,0x6c,0x69,0x74])](_0x38a251([0x2e]));return _0x5f4ff9[_0x38a251([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4bd94c=>_0x4bd94c[_0x38a251([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38a251([0x2a])))[_0x38a251([0x6d,0x61,0x70])](_0x189495=>_0x189495[_0x38a251([0x73,0x70,0x6c,0x69,0x74])](_0x38a251([0x2e])))[_0x38a251([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x172404=>_0x172404[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x28e968[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x38a251([0x6d,0x61,0x70])](_0x116135=>Array(_0x28e968[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x116135[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x38a251([0x66,0x69,0x6c,0x6c])](_0x116135[0x0]===_0x38a251([0x2a])?_0x38a251([0x2a]):'')[_0x38a251([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x116135))[_0x38a251([0x73,0x6f,0x6d,0x65])](_0x2baa33=>_0x28e968[_0x38a251([0x65,0x76,0x65,0x72,0x79])]((_0x451786,_0x575a90)=>_0x2baa33[_0x575a90]===_0x451786||_0x2baa33[_0x575a90]===_0x38a251([0x2a])));}function _0x3c5826(){return _0x47ebff&&_0x6be07e?new window[(_0x38a251([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x537b7b,_0x3bbb6f)=>{_0x47ebff[_0x38a251([0x74,0x68,0x65,0x6e])](_0x537b7b,_0x3bbb6f),_0x6be07e[_0x38a251([0x74,0x68,0x65,0x6e])](_0x4d9f1c=>{_0x4d9f1c!=_0x38a251([0x56,0x61,0x6c,0x69,0x64])&&_0x537b7b(_0x4d9f1c);},_0x3bbb6f);}):_0x47ebff||_0x6be07e||_0x38a251([0x56,0x61,0x6c,0x69,0x64]);}}function _0x59b605(_0x34f5fd,_0x3eeea6){return new window[(_0x38a251([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21d546=>{if(_0x5e1901())return _0x21d546(_0x38a251([0x56,0x61,0x6c,0x69,0x64]));_0x2f39ac(),_0x59fc46[_0x38a251([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x38a251([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x85878d=!0x1;const _0x3004c3=_0x3bb1d9();function _0x27db1f(_0x5a872a){return!!_0x5a872a&&(typeof _0x5a872a===_0x38a251([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5a872a===_0x38a251([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5a872a[_0x38a251([0x74,0x68,0x65,0x6e])]===_0x38a251([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5a872a[_0x38a251([0x63,0x61,0x74,0x63,0x68])]===_0x38a251([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1617a0(_0x7dd2b){_0x398a59(_0x7dd2b)[_0x38a251([0x74,0x68,0x65,0x6e])](_0xe045f1=>{if(!_0xe045f1||_0xe045f1[_0x38a251([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x38a251([0x6f,0x6b]))return _0x38a251([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5aad07(_0x3e5fa8(_0x3004c3+_0x3eeea6))!=_0xe045f1[_0x38a251([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x38a251([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x38a251([0x56,0x61,0x6c,0x69,0x64]);})[_0x38a251([0x74,0x68,0x65,0x6e])](_0x28b1ca=>(_0x2b9e20(),_0x28b1ca),()=>{const _0x3bed84=_0x5668e8();return null==_0x3bed84?(_0x2b9e20(),_0x38a251([0x56,0x61,0x6c,0x69,0x64])):_0x38a251(_0x2e78e1-_0x3bed84>(0x5778dc5f^_0x26ab8f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x38a251([0x74,0x68,0x65,0x6e])](_0x21d546)[_0x38a251([0x63,0x61,0x74,0x63,0x68])](()=>{_0x21d546(_0x38a251([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d80f9=0x7342b6df^_0x26ab8f;function _0x2b9e20(){const _0x2e030f=_0x38a251([0x6c,0x6c,0x63,0x74,0x2d])+_0x5aad07(_0x3e5fa8(_0x34f5fd)),_0xa11525=_0x58d8a3(_0x5aad07(window[_0x38a251([0x4d,0x61,0x74,0x68])][_0x38a251([0x63,0x65,0x69,0x6c])](_0x2e78e1/_0x3d80f9)));window[_0x38a251([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x38a251([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2e030f,_0xa11525);}function _0x5668e8(){const _0x54f5fc=_0x38a251([0x6c,0x6c,0x63,0x74,0x2d])+_0x5aad07(_0x3e5fa8(_0x34f5fd)),_0xd86eb3=window[_0x38a251([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x38a251([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x54f5fc);return _0xd86eb3?window[_0x38a251([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58d8a3(_0xd86eb3),0x10)*_0x3d80f9:null;}function _0x398a59(_0x8af3f6){return new window[(_0x38a251([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4b2e5b,_0x1419a0)=>{_0x8af3f6[_0x38a251([0x74,0x68,0x65,0x6e])](_0x4b2e5b,_0x1419a0),window[_0x38a251([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1419a0,0x73758c9f^_0x26ab8f);});}}_0x59fc46[_0x38a251([0x6f,0x6e])](_0x38a251([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x212168,_0x15068f)=>{if(_0x15068f[0x0]!=_0x34f5fd)return _0x21d546(_0x38a251([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x15068f[0x1]={..._0x15068f[0x1],[_0x38a251([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3004c3};},{[_0x38a251([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x38a251([0x68,0x69,0x67,0x68])}),_0x59fc46[_0x38a251([0x6f,0x6e])](_0x38a251([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x243743=>{_0x27db1f(_0x243743[_0x38a251([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x85878d=!0x0,_0x1617a0(_0x243743[_0x38a251([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x38a251([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x38a251([0x6c,0x6f,0x77])}),_0x435776[_0x38a251([0x74,0x68,0x65,0x6e])](()=>{_0x85878d||_0x21d546(_0x38a251([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5e1901(){return _0x59fc46[_0x38a251([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x38a251([0x76,0x69,0x65,0x77])][_0x38a251([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x38a251([0x61,0x75,0x74,0x6f]);}function _0x2f39ac(){_0x59fc46[_0x38a251([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x38a251([0x76,0x69,0x65,0x77])][_0x38a251([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x38a251([0x61,0x75,0x74,0x6f]);}}function _0x1401dc(_0x25cc00){const _0x516ea8=[new window[(_0x38a251([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x288530=>setTimeout(_0x288530,0x737d6693^_0x26ab8f)),_0x435776[_0x38a251([0x74,0x68,0x65,0x6e])](()=>new window[(_0x38a251([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x226086=>{const _0x5a0963=0x73745858^_0x26ab8f,_0x41e1b4=_0x1fe2df[_0x38a251([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x5f8747(){_0x41e1b4[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x5a0963&&_0x226086();}_0x5f8747(),_0x41e1b4[_0x38a251([0x6f,0x6e])](_0x38a251([0x61,0x64,0x64]),_0x5f8747);})),new window[(_0x38a251([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4fbabe=>{function _0x4c55a3(){for(const _0x2c64ad in window)if(window[_0x38a251([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x38a251([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x2c64ad))&&window[_0x2c64ad]==_0x58edfb)return _0x4fbabe();_0x59fc46[_0x38a251([0x73,0x74,0x61,0x74,0x65])]!=_0x38a251([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x38a251([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4c55a3,0x73744bd7^_0x26ab8f);}_0x432bd9(_0x38a251([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x4c55a3();})];return window[_0x38a251([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x38a251([0x72,0x61,0x63,0x65])](_0x516ea8)[_0x38a251([0x74,0x68,0x65,0x6e])](()=>_0x25cc00);}async function _0x24aacb(){if(await _0x435776,_0x432bd9(_0x38a251([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x565b88=_0x1fe2df[_0x38a251([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x4819c8=_0x1fe2df[_0x38a251([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])](_0x565b88[_0x38a251([0x69,0x64])]),_0x138e20=_0x1bbb0e(_0x38a251([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x138e20[_0x38a251([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x565b88['id'],_0x4819c8?_0x4819c8['id']:null,!0x0),_0x138e20[_0x38a251([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x38a251([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x138e20[_0x38a251([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x138e20[_0x38a251([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x121d89,void(_0x138e20[_0x38a251([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x121d89);}if(_0x432bd9(_0x38a251([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x3f0faa=_0x1bbb0e(_0x38a251([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x3f0faa[_0x38a251([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x38a251([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3f0faa[_0x38a251([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3f0faa[_0x38a251([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x121d89,_0x3f0faa[_0x38a251([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x121d89;}_0x59fc46[_0x38a251([0x6d,0x6f,0x64,0x65,0x6c])][_0x38a251([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x121d89,_0x59fc46[_0x38a251([0x6d,0x6f,0x64,0x65,0x6c])][_0x38a251([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x121d89,_0x59fc46[_0x38a251([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x38a251([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x15c2b8(){return _0x432bd9(_0x38a251([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1bbb0e(_0x38a251([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x38a251([0x73,0x74,0x61,0x74,0x65])]==_0x38a251([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x230ff9(){return _0x432bd9(_0x38a251([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 _0x304331(){return _0x432bd9(_0x38a251([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x19c34b(_0x79f6e4){const _0x4a76c8=_0x287e2b();_0x59fc46[_0x4a76c8]=_0x38a251([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])+_0x79f6e4,_0x79f6e4[_0x38a251([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x38a251([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x287e2b()]=_0x58edfb),_0x79f6e4!=_0x38a251([0x56,0x61,0x6c,0x69,0x64])&&_0x24aacb();}function _0x287e2b(){const _0x1026af=window[_0x38a251([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x38a251([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x38a251([0x6e,0x6f,0x77])]())[_0x38a251([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x38a251([0x2e]),'');let _0x7a097=_0x38a251([0x73]);for(let _0x5df506=0x0;_0x5df506<_0x1026af[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5df506+=0x2){let _0x5cfc74=window[_0x38a251([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1026af[_0x38a251([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5df506,_0x5df506+0x2));_0x5cfc74>=_0x3b0496[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5cfc74-=_0x3b0496[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x7a097+=_0x3b0496[_0x5cfc74];}return _0x7a097;}function _0x5c96d3(){const _0x5e6170=_0x24f6d4[_0x38a251([0x73,0x70,0x6c,0x69,0x74])](_0x38a251([0x2e]));if(0x3!=_0x5e6170[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x322a7f(_0x5e6170[0x1]);function _0x322a7f(_0x354ab9){const _0x4e3a90=_0x4deb64(_0x354ab9);return _0x4e3a90&&_0x38c792()?_0x4e3a90:null;function _0x38c792(){const _0x4261d1=_0x4e3a90[_0x38a251([0x6a,0x74,0x69])],_0x56b158=window[_0x38a251([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4261d1[_0x38a251([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4261d1[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5f5248={..._0x4e3a90,[_0x38a251([0x6a,0x74,0x69])]:_0x4261d1[_0x38a251([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4261d1[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5f5248[_0x38a251([0x76,0x63])],_0x3e5fa8(_0x5f5248)==_0x56b158;}}}async function _0x199d93(){let _0x45f44a=!0x0;try{const _0x3d88f1=_0x24f6d4[_0x38a251([0x73,0x70,0x6c,0x69,0x74])](_0x38a251([0x2e])),[_0x42bcca,_0x209f4a,_0x5f02fa]=_0x3d88f1;return _0x1ef106(_0x42bcca),await _0x27c9ba(_0x42bcca,_0x209f4a,_0x5f02fa),_0x45f44a;}catch{return!0x1;}function _0x1ef106(_0x40bec5){const _0x2b3ba0=_0x4deb64(_0x40bec5);_0x2b3ba0&&_0x2b3ba0[_0x38a251([0x61,0x6c,0x67])]==_0x38a251([0x45,0x53,0x32,0x35,0x36])||(_0x45f44a=!0x1);}async function _0x27c9ba(_0x2b8e5f,_0x15fa17,_0x479a03){const _0x3416d7=window[_0x38a251([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x38a251([0x66,0x72,0x6f,0x6d])](_0xd3d097(_0x479a03),_0x2f8d6d=>_0x2f8d6d[_0x38a251([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4c1e3b=new window[(_0x38a251([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x38a251([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2b8e5f+_0x38a251([0x2e])+_0x15fa17),_0x237042=window[_0x38a251([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x38a251([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x237042)return;const _0x3cdda0=await _0x237042[_0x38a251([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x38a251([0x6a,0x77,0x6b]),_0x14fbf8,{[_0x38a251([0x6e,0x61,0x6d,0x65])]:_0x38a251([0x45,0x43,0x44,0x53,0x41]),[_0x38a251([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x38a251([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x38a251([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x237042[_0x38a251([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x38a251([0x6e,0x61,0x6d,0x65])]:_0x38a251([0x45,0x43,0x44,0x53,0x41]),[_0x38a251([0x68,0x61,0x73,0x68])]:{[_0x38a251([0x6e,0x61,0x6d,0x65])]:_0x38a251([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3cdda0,_0x3416d7,_0x4c1e3b)||(_0x45f44a=!0x1);}}function _0x4deb64(_0x428423){return _0x428423[_0x38a251([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x38a251([0x65,0x79]))?JSON[_0x38a251([0x70,0x61,0x72,0x73,0x65])](_0xd3d097(_0x428423)):null;}function _0xd3d097(_0xaad63){return window[_0x38a251([0x61,0x74,0x6f,0x62])](_0xaad63[_0x38a251([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x38a251([0x2b]))[_0x38a251([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x38a251([0x2f])));}function _0x3e5fa8(_0x345c98){let _0xefede6=0x1505;function _0x1669d5(_0x483df0){for(let _0x176876=0x0;_0x176876<_0x483df0[_0x38a251([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x176876++){const _0x4d72b2=_0x483df0[_0x38a251([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x176876);_0xefede6=(_0xefede6<<0x5)+_0xefede6+_0x4d72b2,_0xefede6&=_0xefede6;}}function _0x2d94b8(_0x2fa231){Array[_0x38a251([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2fa231)?_0x2fa231[_0x38a251([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2d94b8):_0x2fa231&&typeof _0x2fa231==_0x38a251([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x38a251([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2fa231)[_0x38a251([0x73,0x6f,0x72,0x74])]()[_0x38a251([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5e975b,_0xde48ba])=>{_0x1669d5(_0x5e975b),_0x2d94b8(_0xde48ba);}):_0x1669d5(window[_0x38a251([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2fa231));}return _0x2d94b8(_0x345c98),_0xefede6>>>0x0;}function _0x5aad07(_0xa0309d){return _0xa0309d[_0x38a251([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x38a251([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x38a251([0x30]));}function _0x58d8a3(_0x2fa8d4){return _0x2fa8d4[_0x38a251([0x73,0x70,0x6c,0x69,0x74])]('')[_0x38a251([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x38a251([0x6a,0x6f,0x69,0x6e])]('');}function _0x432bd9(_0xfd37ea){return _0x59fc46[_0x38a251([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x38a251([0x68,0x61,0x73])](_0xfd37ea);}function _0x1bbb0e(_0x1ace37){return _0x59fc46[_0x38a251([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x38a251([0x67,0x65,0x74])](_0x1ace37);}function _0x121d89(){}function _0x38a251(_0x32e56a){return _0x32e56a['map'](_0x5be2=>String['fromCharCode'](_0x5be2))['join']('');}_0x19c34b(await _0x22a989());}(this);}['createRevision'](_0x423363){const _0x3bd5e9=this['editor']['plugins']['get']('Users');return new I({'id':_0x423363['id'],'name':_0x423363['name'],'creator':_0x423363['creatorId']?_0x3bd5e9['getUser'](_0x423363['creatorId']):null,'diffData':_0x423363['diffData']||_0x423363['data'],'authors':_0x423363['authorsIds']['map'](_0x3481ed=>_0x3bd5e9['getUser'](_0x3481ed)),'createdAt':new Date(_0x423363['createdAt']),'attributes':_0x423363['attributes'],'fromVersion':_0x423363['fromVersion'],'toVersion':_0x423363['toVersion']});}['addRevision'](_0xadaad0,_0x4a3c21=0x0){this['_revisions']['add'](_0xadaad0,_0x4a3c21);}['getRevision'](_0x6e7d72){return this['_revisions']['get'](_0x6e7d72);}['getRevisions'](_0x139397={'toJSON':!0x1}){const _0x3e73d5=Array['from'](this['_revisions']);return _0x3e73d5['reverse'](),_0x139397['toJSON']?_0x3e73d5['map'](_0x48ce39=>_0x48ce39['toJSON']()):_0x3e73d5;}['getIndex'](_0x28b6fc){return this['_revisions']['getIndex'](_0x28b6fc);}['getEarlierVisibleRevision'](_0xfbbafb){const [,_0x50b224]=this['getRevisionsIterator'](_0xfbbafb,{'direction':'earlier'});return _0x50b224;}['getLaterVisibleRevision'](_0x59ee06){const [,_0x3d50ad]=this['getRevisionsIterator'](_0x59ee06,{'direction':'later'});return _0x3d50ad;}['getRevisionsInDiff'](_0x559bea){const _0x551053=[];for(const _0x2f360a of this['getRevisionsIterator'](_0x559bea['newRevisionId']))if(_0x551053['push'](_0x2f360a),_0x2f360a['id']===_0x559bea['oldRevisionId'])break;return _0x551053;}*['getRevisionsIterator'](_0x3fa82c,{direction:_0x20035b='earlier',filter:_0x1a93f5=()=>!0x0}={}){const _0x1775dd='earlier'===_0x20035b?0x1:-0x1;let _0x41bb57=this['_revisions']['get'](_0x3fa82c),_0x3aa626=this['getIndex'](_0x41bb57);for(yield _0x41bb57;_0x41bb57;){if(_0x3aa626+=_0x1775dd,_0x41bb57=this['getRevision'](_0x3aa626),!_0x41bb57)return;_0x1a93f5(_0x41bb57)&&(yield _0x41bb57);}}}class $ extends _0x2bce4d{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x6e2313,'c'],[_0x4ce6b3,'a'],[_0x5d6ad4,'e'],[_0x242d82,'r'],[_0x49d851,'u']]);['_typeCharToViewClass']=new Map([['c',_0x6e2313],['a',_0x4ce6b3],['e',_0x5d6ad4],['r',_0x242d82],['u',_0x49d851]]);async['loadRevisionData'](_0x5317ca,_0x55ed40){if(_0x5317ca['diffData']||!_0x55ed40)return;const _0x16e754=this['editor']['config']['get']('collaboration.channelId'),_0x262771=await _0x55ed40['getRevision']({'channelId':_0x16e754,'revisionId':_0x5317ca['id']});_0x5317ca['diffData']=_0x262771['diffData'];}['getRevisionDocumentData'](_0x379676){const _0x42284b={};for(const _0x33ebdd in _0x379676['diffData']){if(_0x379676['diffData'][_0x33ebdd]['attachChange']&&!_0x379676['diffData'][_0x33ebdd]['attachChange']['isAttached'])continue;const _0x3b0388=this['_removeRevisionMarkers'](JSON['parse'](_0x379676['diffData'][_0x33ebdd]['insertions'])),_0x202b1d=this['editor']['editing']['view']['document'],_0x206c69=new _0x11f4b2(_0x202b1d,_0x3b0388['map'](_0x28684d=>this['_getViewFromDiffObj'](_0x28684d,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x42284b[_0x33ebdd]=this['editor']['data']['processor']['toData'](_0x206c69),this['editor']['data']['processor']['useFillerType']('default');}return _0x42284b;}['getRevisionRootsAttributes'](_0x5e96dc){const _0x3becfc={};for(const _0x2e525f in _0x5e96dc['diffData'])_0x5e96dc['diffData'][_0x2e525f]['attachChange']&&!_0x5e96dc['diffData'][_0x2e525f]['attachChange']['isAttached']||(_0x3becfc[_0x2e525f]=_0x5e96dc['diffData'][_0x2e525f]['attributesAfter']||{});return _0x3becfc;}['_getTypeCharForViewElement'](_0x108c83){return this['_viewClassToTypeChar']['get'](_0x108c83['constructor']);}['_getViewFromDiffObj'](_0x4be165,_0x2a40aa){const _0x36f481=this['editor']['editing']['view']['document'];if('string'==typeof _0x4be165)return new _0x286ad4(_0x36f481,_0x4be165);{let _0x69c0a8,_0x1d2c81;_0x1d2c81='u'==_0x4be165['type']||'r'==_0x4be165['type']?[]:_0x4be165['children']['map'](_0x1dda4e=>this['_getViewFromDiffObj'](_0x1dda4e,_0x2a40aa));const _0x51f2c0=this['_typeCharToViewClass']['get'](_0x4be165['type'])||_0x23f5aa,_0x1828db=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x69c0a8=new _0x51f2c0(_0x36f481,_0x4be165['name'],_0x4be165['attributes'],_0x1d2c81),'u'==_0x4be165['type']&&_0x4be165['children'][0x0]){const _0x4195eb=_0x4be165['children'][0x0];if(_0x69c0a8['render']=function(_0x37575e){const _0x3f7bd0=_0x37575e['createElement']('div');return _0x3f7bd0['innerHTML']=_0x4195eb,_0x3f7bd0['childNodes'][0x0];},_0x2a40aa){const _0x5883a2=new _0x11f4b2(_0x36f481);_0x5883a2['_appendChild'](_0x69c0a8);const _0x186845=Array['from'](_0x1828db['viewChildrenToDom'](_0x5883a2,{'bind':!0x1})),_0xa8377e=_0x1828db['domDocument']['createElement']('div');_0xa8377e['append'](..._0x186845),_0x69c0a8=Array['from'](_0x1828db['domChildrenToView'](_0xa8377e))[0x0];}}else{if('r'==_0x4be165['type']&&_0x4be165['children'][0x0]){const _0x17c023=_0x4be165['children'][0x0];if(_0x69c0a8['render']=function(_0x3f9d4a){_0x3f9d4a['innerHTML']=_0x17c023;},_0x2a40aa){const _0x2371e5=new _0x11f4b2(_0x36f481);_0x2371e5['_appendChild'](_0x69c0a8);const _0x4c58fa=Array['from'](_0x1828db['viewChildrenToDom'](_0x2371e5,{'bind':!0x1})),_0x37941d=_0x1828db['domDocument']['createElement']('div');_0x37941d['append'](..._0x4c58fa);const _0x30639e=Array['from'](_0x1828db['domChildrenToView'](_0x37941d));_0x30639e['length']>0x1?_0x69c0a8['_appendChild'](_0x30639e):_0x69c0a8=_0x30639e[0x0];}}}if(_0x4be165['customProperties']){for(const [_0x15a433,_0x393111]of _0x4be165['customProperties'])_0x69c0a8['_setCustomProperty'](_0x15a433,_0x393111);}const _0x43d7ed=void 0x0===_0x4be165['fillerOffset']?null:_0x4be165['fillerOffset'];return null!==_0x43d7ed&&(_0x69c0a8['getFillerOffset']=()=>_0x43d7ed),_0x69c0a8;}}['_makeModelFromViewString'](_0x343972){const _0x2590d8=JSON['parse'](_0x343972),_0x56dfb4=this['editor']['editing']['view']['document'],_0x344acb=new _0x11f4b2(_0x56dfb4,_0x2590d8['map'](_0x3d5989=>this['_getViewFromDiffObj'](_0x3d5989,!0x0)));return this['editor']['data']['toModel'](_0x344acb);}['_removeRevisionMarkers'](_0x26edc4){return(_0x26edc4=_0x26edc4['filter'](_0x3ee896=>!_0x3ee896['name']||'revision-start'!==_0x3ee896['name']&&'revision-end'!==_0x3ee896['name']))['forEach'](_0x3df0f4=>{'string'!=typeof _0x3df0f4&&(_0x3df0f4['children']=this['_removeRevisionMarkers'](_0x3df0f4['children']),_0x3df0f4['attributes']=_0x3df0f4['attributes']['filter'](_0x4e36d1=>!_0x4e36d1[0x0]['startsWith']('data-revision-')));}),_0x26edc4;}}function m(_0x41152e,_0x3092df,_0xbe60d6){const t=_0x41152e['t'];switch(_0x3092df){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'},_0xbe60d6);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xbe60d6);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 _0x2bce4d{['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[_0x729304,S,$,_0x5a0857];}constructor(_0x6da23e){super(_0x6da23e),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x473ce8=_0x3bb1d9();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x473ce8},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 _0x3684c5=this['repository']['getRevision'](0x0),_0xb8a2d9=_0x3684c5&&null===_0x3684c5['creator']?_0x3684c5:null;if(this['_continueCurrentRevision']=!!_0xb8a2d9&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x22e506=this['_source']['getCurrentRevisionId'](),_0x2f3339=this['repository']['getRevision'](_0x22e506);if(_0x2f3339)this['_startingVersion']=_0x2f3339['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x5c6614=this['_source']['history']['_operations']['find'](_0x1939d3=>!_0x1939d3['_isInit']),_0x304420=_0x5c6614?_0x5c6614['baseVersion']:this['_source']['history']['version'];_0x3684c5?(_0x3684c5['toVersion']<_0x304420&&_0x3684c5['_update']({'toVersion':_0x304420}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xb8a2d9['id'],this['_startingVersion']=_0xb8a2d9['fromVersion']):(this['_startingVersion']=_0x3684c5['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x304420,this['_continueCurrentRevision']=!0x1);}}else _0xb8a2d9&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xb8a2d9['toVersion'],this['editor']['model']['document']['history']['version']),_0xb8a2d9['fromVersion']===_0xb8a2d9['toVersion']?(0x0!==_0xb8a2d9['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xb8a2d9['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xb8a2d9['id'],this['_startingVersion']=_0xb8a2d9['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',_0xff3c51=>!_0xff3c51),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1f0c09=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x25211d;for(const _0x4a37d6 in _0x1f0c09){const _0xf5f11a=_0x4a37d6,_0x449183=_0x1f0c09[_0xf5f11a];if('revisionHistoryLicenseKeyValid'==_0x449183||'revisionHistoryLicenseKeyInvalid'==_0x449183||'revisionHistoryLicenseKeyExpired'==_0x449183||'revisionHistoryLicenseKeyDomainLimit'==_0x449183||'revisionHistoryLicenseKeyNotAllowed'==_0x449183||'revisionHistoryLicenseKeyEvaluationLimit'==_0x449183||'revisionHistoryLicenseKeyTrialLimit'==_0x449183||'revisionHistoryLicenseKeyUsageLimit'==_0x449183){delete _0x1f0c09[_0xf5f11a],_0x25211d=_0x449183,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x25211d&&_0x1f0c09['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x25211d&&_0x1f0c09['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x25211d&&_0x1f0c09['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x25211d&&_0x1f0c09['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x25211d&&_0x1f0c09['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x25211d&&_0x1f0c09['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x25211d&&_0x1f0c09['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x40f73c=this['repository']['getRevision'](0x0),_0x4c0f19=await this['getRevisionDocumentData'](_0x40f73c),_0x232bcd=await this['getRevisionRootsAttributes'](_0x40f73c);this['_replaceEditorDataWithRevisionData'](_0x4c0f19,_0x232bcd);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x1e5860){this['_source']=_0x1e5860;}async['update'](){const _0x556b72=await this['_source']['getLatestVersion']();if(_0x556b72>this['currentRevision']['toVersion']){await this['_loadState']();const _0x519fbc=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x556b72});_0x519fbc['authors']=_0x519fbc['authorsIds']['map'](_0x1f21f0=>this['editor']['plugins']['get']('Users')['getUser'](_0x1f21f0)),this['currentRevision']['_update'](_0x519fbc);}}async['saveRevision'](_0xd17027={},_0x50350e=null){const _0x143ed3=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x50350e>this['currentRevision']['toVersion']&&(_0x50350e=null),null===_0x50350e&&(_0x50350e=await this['_source']['getLatestVersion']());const _0x89dfd0=this['_getFromVersion'](_0x50350e),_0x8646c2=this['buildRevisionData']({'from':_0x89dfd0,'to':_0x50350e});if(this['currentRevision']['toVersion']<_0x50350e){const _0x44d08c=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x50350e,'to':_0x50350e});_0x44d08c['authors']=[],_0x44d08c['authorsIds']=[],_0x44d08c['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x44d08c,!0x0),delete _0x44d08c['authors'],_0x143ed3['push'](_0x44d08c);}_0xd17027['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0xd17027['name']=_0xd17027['name']||null,_0xd17027['id']=_0xd17027['id']||_0x3bb1d9(),_0xd17027={..._0xd17027,..._0x8646c2};const _0x24c5c1=this['addRevisionData'](_0xd17027);_0x143ed3['push'](_0xd17027);const _0x2e77a3=this['repository']['getIndex'](_0x24c5c1);if(0x0!==_0x2e77a3){const _0x4610e4=this['repository']['getRevision'](_0x2e77a3-0x1);if(_0x4610e4['fromVersion']!==_0x50350e){const _0x16114e=this['_revisionDataBuilder']['getData'](_0x50350e,_0x4610e4['toVersion']),_0x4f28e7={'id':_0x4610e4['id'],'diffData':_0x16114e['diffData'],'authorsIds':_0x16114e['authorsIds'],'authors':_0x16114e['authorsIds']['map'](_0x19e5b3=>this['editor']['plugins']['get']('Users')['getUser'](_0x19e5b3)),'fromVersion':_0x50350e};_0x4610e4===this['currentRevision']&&(_0x4f28e7['createdAt']=new Date(_0xd17027['createdAt']['getTime']()+0xa)),_0x4610e4['_update'](_0x4f28e7,!0x0),delete _0x4f28e7['authors'],_0x143ed3['push'](_0x4f28e7);}}if(this['adapter']){for(const _0x4caeec of _0x143ed3)this['_bufferUpdate'](_0x4caeec['id'],_0x4caeec,!0x0);this['sendBufferedUpdates']();}return _0x24c5c1;}['addRevisionData'](_0x3c307a){const _0x6b0b46=this['repository']['createRevision'](_0x3c307a);return this['adapter']&&_0x6b0b46['on']('_update',(_0x4414a6,_0x55d277,_0x4b3295)=>{_0x4b3295||(this['_bufferUpdate'](_0x55d277['id'],_0x55d277,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x6b0b46,this['_findInsertionIndex'](_0x6b0b46)),_0x6b0b46;}async['getRevisionDocumentData'](_0x4e0d3a){return await this['_utils']['loadRevisionData'](_0x4e0d3a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4e0d3a);}async['getRevisionRootsAttributes'](_0x48af5e){return await this['_utils']['loadRevisionData'](_0x48af5e,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x48af5e);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2aa735=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1ec8ec=0x0;_0x1ec8ec<_0x2aa735['length'];_0x1ec8ec++){const _0x51e3c5=_0x2aa735[_0x1ec8ec];let _0x1a94fa=!0x1;for(const _0x5c8037 of Object['keys'](_0x51e3c5))void 0x0===_0x51e3c5[_0x5c8037]?delete _0x51e3c5[_0x5c8037]:'id'!==_0x5c8037&&(_0x1a94fa=!0x0);_0x1a94fa||(_0x2aa735[_0x1ec8ec]=null);}if(_0x2aa735=_0x2aa735['filter'](_0x2435c6=>null!==_0x2435c6),!_0x2aa735['length'])return;for(let _0x1c391f=0x0;_0x1c391f<_0x2aa735['length'];_0x1c391f++){const _0x140c1f=_0x2aa735[_0x1c391f];void 0x0!==_0x140c1f['fromVersion']&&void 0x0===_0x140c1f['toVersion']&&(_0x140c1f['toVersion']=this['repository']['getRevision'](_0x140c1f['id'])['toVersion']),void 0x0!==_0x140c1f['toVersion']&&void 0x0===_0x140c1f['fromVersion']&&(_0x140c1f['fromVersion']=this['repository']['getRevision'](_0x140c1f['id'])['fromVersion']);}const _0x550e3c=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2aa735,_0x550e3c)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1554f0=>{if(_0x1554f0){for(const _0x5743e7 of _0x1554f0)this['setRevisionData']({'id':_0x5743e7['id'],'createdAt':_0x5743e7['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x54ddad=null,from:_0xd68000=null,to:_0x5fc6b3=null}){_0xd68000=null!==_0xd68000?_0xd68000:_0x54ddad['fromVersion'],_0x5fc6b3=null!==_0x5fc6b3?_0x5fc6b3:_0x54ddad['toVersion'];const _0x45fad0=this['_revisionDataBuilder']['getData'](_0xd68000,_0x5fc6b3),_0x5b07f1={'diffData':_0x45fad0['diffData'],'authorsIds':_0x45fad0['authorsIds'],'fromVersion':_0xd68000,'toVersion':_0x5fc6b3};if(!_0x54ddad||_0x5fc6b3!==_0x54ddad['toVersion']){const _0x3d9657=_0x5fc6b3-0x1,_0xf3e37e=this['_source']['history']['getOperation'](_0x3d9657);_0x5b07f1['createdAt']=_0xf3e37e&&_0xf3e37e['createdAt']||new Date();}if(this['_loadedStateData']&&_0xd68000===this['_loadedStateData']['fromVersion']){for(const _0x5eb783 of this['_loadedStateData']['authors'])_0x5b07f1['authorsIds']['includes'](_0x5eb783['id'])||_0x5b07f1['authorsIds']['push'](_0x5eb783['id']);}return _0x5b07f1;}['_bufferUpdate'](_0xe15bd1,_0x4d8512,_0x3be38e){if(this['_bufferedUpdates']['has'](_0xe15bd1)){const _0x3b8e85=this['_bufferedUpdates']['get'](_0xe15bd1);_0x4d8512=_0x3be38e?{..._0x3b8e85,..._0x4d8512}:{..._0x4d8512,..._0x3b8e85};}this['_bufferedUpdates']['set'](_0xe15bd1,_0x4d8512);}['setRevisionData'](_0x500f40){const _0x10098c=this['repository']['getRevision'](_0x500f40['id']);if(_0x500f40['createdAt']&&(_0x500f40['createdAt']=new Date(_0x500f40['createdAt'])),_0x500f40['authorsIds']){const _0x172cc1=this['editor']['plugins']['get']('Users');_0x500f40['authors']=_0x500f40['authorsIds']['map'](_0x2cad89=>_0x172cc1['getUser'](_0x2cad89));}_0x10098c['_update'](_0x500f40,!0x0);}['_createInitialRevision'](_0x317b83){const _0x142d05=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x142d05)this['_initialRevisionId']=_0x142d05['id'];else{const _0x46ad60=!this['editor']['model']['document']['roots']['find'](_0x1c79fe=>this['editor']['model']['hasContent'](_0x1c79fe)),_0x238f9e=this['editor']['plugins']['get']('Users')['me']['id'],_0x51bf21=m(this['editor']['locale'],_0x46ad60?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x317b83,'to':_0x317b83,'id':this['_initialRevisionId'],'name':_0x51bf21,'creatorId':_0x238f9e});}}['_createCurrentRevision'](_0xd304e3){const _0x3e7acd=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x3e7acd),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xd304e3,'to':_0xd304e3,'id':_0x3e7acd,'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'](_0x16a9a6,_0x481ead){let _0x550780=this['editor']['config']['get']('initialData'),_0x432599=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x550780){_0x550780={};for(const _0x417f3c of this['editor']['model']['document']['getRootNames']())_0x550780[_0x417f3c]='';}if('string'==typeof _0x550780&&(_0x550780={'main':_0x550780}),void 0x0===_0x432599){_0x432599={};for(const _0x19db68 of this['editor']['model']['document']['getRootNames']())_0x432599[_0x19db68]={};}let _0x21c4bc=!0x1;const _0x87d774=Object['keys'](_0x550780),_0x1ab652=Object['keys'](_0x16a9a6);for(const _0x4a9ff0 of _0x87d774){if(_0x550780[_0x4a9ff0]!==_0x16a9a6[_0x4a9ff0]&&''!==_0x550780[_0x4a9ff0]['trim']()){_0x21c4bc=!0x0;break;}if(!_0x588fc7(_0x432599[_0x4a9ff0],_0x481ead[_0x4a9ff0])&&Object['keys'](_0x432599[_0x4a9ff0])['length']>0x0){_0x21c4bc=!0x0;break;}}_0x21c4bc||(_0x21c4bc=_0x1ab652['some'](_0x264df6=>!this['editor']['model']['document']['getRoot'](_0x264df6))),_0x21c4bc&&_0x823218('editor-initial-data-replaced-with-revision-data',{'editorData':_0x550780,'editorRootsAttributes':_0x432599,'revisionData':_0x16a9a6,'revisionRootsAttributes':_0x481ead}),this['editor']['config']['set']('initialData',_0x16a9a6),this['editor']['config']['set']('rootsAttributes',_0x481ead);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x42219f=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x42219f['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x986f3b){const _0x44562e=this['repository']['getRevisions']();_0x44562e['reverse']();let _0x26d9e0=0x0;for(;_0x26d9e0<_0x44562e['length'];){const _0x4464c9=_0x44562e[_0x26d9e0];if(_0x4464c9===this['currentRevision']){_0x26d9e0++;continue;}if(_0x4464c9['id']===this['_initialRevisionId'])break;const _0x3a9780=_0x986f3b['toVersion']-_0x4464c9['toVersion']||_0x986f3b['fromVersion']-_0x4464c9['fromVersion'];if(_0x3a9780>0x0)break;if(_0x3a9780<0x0)_0x26d9e0++;else{if(!_0x986f3b['creator']&&_0x4464c9['creator'])break;if(_0x4464c9['creator']||!_0x986f3b['creator']){if(_0x986f3b['createdAt']>_0x4464c9['createdAt'])break;_0x26d9e0++;}else _0x26d9e0++;}}return _0x26d9e0;}['_getFromVersion'](_0x159157){const _0x2f4ed3=this['repository']['getRevisions']();_0x2f4ed3['reverse'](),_0x2f4ed3['shift']();const _0x379ea9=_0x2f4ed3['find'](_0x25e80a=>_0x25e80a['toVersion']<=_0x159157)['toVersion'];return _0x379ea9<this['_startingVersion']?this['_startingVersion']:_0x379ea9;}['_makeRevision']({name:_0x49b1e5,from:_0x408d34,to:_0x3f3d1a,creatorId:_0x3eed52,id:_0x16a980}){const _0x175c1b=this['buildRevisionData']({'from':_0x408d34,'to':_0x3f3d1a});_0x175c1b['name']=_0x49b1e5,_0x175c1b['creatorId']=_0x3eed52,_0x175c1b['id']=_0x16a980;const _0x40a1cd=this['addRevisionData'](_0x175c1b);return this['adapter']&&this['_bufferUpdate'](_0x175c1b['id'],_0x175c1b,!0x0),_0x40a1cd;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x578109){this['editor']=_0x578109,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'](_0x3337fb){this['source']=_0x3337fb;const _0x2fb9e7=new Map(),_0x2c9dbf=new Map(),_0x20b6d7=this['editor']['model']['document']['roots']['map'](_0x356908=>_0x356908['rootName']);for(const _0x539f8a of _0x20b6d7){const _0x329024=this['editor']['model']['document']['getRoot'](_0x539f8a),_0x106db2=x(_0x329024);_0x2fb9e7['set'](_0x539f8a,_0x106db2),_0x2c9dbf['set'](_0x539f8a,Object['fromEntries'](_0x329024['getAttributes']()));}const _0x586a76=Array['from'](this['editor']['model']['markers'])['map'](_0x3235eb=>[_0x3235eb['name'],_0x3235eb['getRange']()]),_0x319720=this['source']['version'];this['_saveMetaData'](_0x319720,_0x2fb9e7,_0x586a76,_0x2c9dbf),this['_startingRevisionId']=this['_revisionId'];const _0x3bce85=new Map(),_0x56addb=new Map();for(const _0x1117a1 of _0x20b6d7){const _0x1f1729=N(_0x1117a1);_0x3bce85['set'](_0x1117a1,_0x1f1729),_0x56addb['set'](_0x1117a1,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3bce85,[],_0x56addb);}['getData'](_0x50e13c,_0x27b8eb){if(this['_lastFrom']===_0x50e13c&&this['_lastTo']<=_0x27b8eb)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x27b8eb,!0x0);else{if(!this['_savedMetaData']['has'](_0x50e13c)){const _0x1335b3=this['_getPreviousFrom'](_0x50e13c);this['_calculateMetaData'](_0x1335b3,_0x50e13c,!0x1);}this['_calculateMetaData'](_0x50e13c,_0x27b8eb,!0x0);}return this['_lastFrom']=_0x50e13c,this['_lastTo']=_0x27b8eb,this['_getState']();}['loadState'](_0x2cd645){if(!this['_savedMetaData']['has'](_0x2cd645['fromVersion'])){const _0xb41f4f=this['_getPreviousFrom'](_0x2cd645['fromVersion']);this['_calculateMetaData'](_0xb41f4f,_0x2cd645['fromVersion'],!0x1);}this['_calculateMetaData'](_0x2cd645['fromVersion'],_0x2cd645['toVersion'],!0x1);const _0x29c417=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x2cd645['fromVersion'],this['_lastTo']=_0x2cd645['toVersion'];for(const _0x2f7bb0 in _0x2cd645['diffData']){const _0x5c8841=_0x2cd645['diffData'][_0x2f7bb0]['attachChange'],_0x2cfb82=_0x1f8919(_0x2cd645['diffData'][_0x2f7bb0]['attributesBefore'])||{},_0x4b6666=_0x29c417['_makeModelFromViewString'](_0x2cd645['diffData'][_0x2f7bb0]['deletions']);_0x4b6666['rootName']=_0x2f7bb0,_0x4b6666['_isAttached']=!_0x5c8841||!_0x5c8841['isAttached'],_0x4b6666['isAttached']=()=>_0x4b6666['_isAttached'],this['_baseRoots']['set'](_0x2f7bb0,_0x4b6666),this['_baseRootsAttributes']['set'](_0x2f7bb0,_0x2cfb82),_0x5c8841&&this['_touchedRoots']['set'](_0x2f7bb0,_0x5c8841);const _0xc2379=this['_makeIdsRoot'](_0x4b6666);this['_baseIdsRoots']['set'](_0x2f7bb0,_0xc2379);for(const [_0x3b7a93,_0x46b8a4]of _0x4b6666['markers']){if(!_0x3b7a93['startsWith']('revision:'))continue;const _0x44eea4=_0x3b7a93['split'](':')[0x2];for(const _0x3ed489 of _0x46b8a4['getWalker']({'singleCharacters':!0x0})){const _0x1af86d=this['_getVidAttributeName'](_0x3ed489),_0x10df4e='elementEnd'==_0x3ed489['type']?_0x3ed489['previousPosition']['path']['slice'](0x0,-0x1):_0x3ed489['previousPosition']['path'],_0x5bc0f9=_0xc2379['getNodeByPath'](_0x10df4e)['getAttribute'](_0x1af86d);this['_touched']['set'](_0x5bc0f9,{'userId':_0x44eea4});}}}this['_startingRevisionId']=this['_revisionId'];const _0x1b777e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x228280=>!this['_touched']['has'](_0x228280));let _0x14065b=0x0;const _0x23a84f=new Map();for(const _0x4815f in _0x2cd645['diffData']){const _0x4c771a=_0x2cd645['diffData'][_0x4815f]['attachChange'],_0x5981e7=_0x1f8919(_0x2cd645['diffData'][_0x4815f]['attributesAfter'])||{},_0x228f1b=_0x29c417['_makeModelFromViewString'](_0x2cd645['diffData'][_0x4815f]['insertions']);_0x228f1b['rootName']=_0x4815f,_0x228f1b['_isAttached']=!_0x4c771a||_0x4c771a['isAttached'],_0x228f1b['isAttached']=()=>_0x228f1b['_isAttached'],this['_diffRoots']['set'](_0x4815f,_0x228f1b),this['_diffRootsAttributes']['set'](_0x4815f,_0x5981e7);const _0x174086=this['_makeIdsRoot'](_0x228f1b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4815f,_0x174086),_0x23a84f['set'](_0x4815f,_0x228f1b['isAttached']()?_0x5981e7:{});for(const [_0x39119a,_0x15c344]of _0x228f1b['markers']){if(!_0x39119a['startsWith']('revision:'))continue;const _0x5d57f5=_0x39119a['split'](':')[0x2];for(const _0x51e9b4 of _0x15c344['getWalker']({'singleCharacters':!0x0})){const _0x3f5fa3=this['_getVidAttributeName'](_0x51e9b4),_0x75089=this['_revisionId']++,_0x1c4818='elementEnd'==_0x51e9b4['type']?_0x51e9b4['previousPosition']['path']['slice'](0x0,-0x1):_0x51e9b4['previousPosition']['path'];_0x174086['getNodeByPath'](_0x1c4818)['_setAttribute'](_0x3f5fa3,_0x75089),this['_touched']['set'](_0x75089,{'userId':_0x5d57f5});}}for(const _0x48ec55 of this['editor']['model']['createRangeIn'](_0x228f1b)['getWalker']({'singleCharacters':!0x0})){const _0x11ab83=this['_getVidAttributeName'](_0x48ec55),_0x192101='elementEnd'==_0x48ec55['type']?_0x48ec55['previousPosition']['path']['slice'](0x0,-0x1):_0x48ec55['previousPosition']['path'],_0x22058f=_0x174086['getNodeByPath'](_0x192101);_0x22058f['getAttribute'](_0x11ab83)>0x0||_0x22058f['_setAttribute'](_0x11ab83,_0x1b777e[_0x14065b++]);}for(const [_0xc98ab6,_0x430e26]of _0x228f1b['markers'])_0xc98ab6['startsWith']('revision:')||this['_markers']['set'](_0xc98ab6,_0x430e26);}const {roots:_0x5af7ec}=this['_savedMetaData']['get'](_0x2cd645['fromVersion']),{roots:_0xdf1962}=this['_savedMetaData']['get'](_0x2cd645['toVersion']),_0x47c24a=x(_0x5af7ec['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x47c24a),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x47c24a,Number['NEGATIVE_INFINITY']));const _0x2fc013=x(_0xdf1962['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2fc013),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2fc013));const _0x4e786f=Array['from'](this['_diffRoots'])['map'](([_0x2cbd4b,_0xcf90d9])=>[_0x2cbd4b,x(_0xcf90d9)]);this['_saveMetaData'](this['_lastTo'],_0x4e786f,this['_markers'],_0x23a84f);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0xc42ffc,_0x219b8c,_0x8529d0,_0x330f9e){const _0x398a38=new Map(_0x219b8c),_0x3e5e51=new Map(_0x1f8919(_0x330f9e)),_0x7d65a4=new Map();for(const [_0x4fd83b,_0x23fa09]of _0x8529d0)_0x7d65a4['set'](_0x4fd83b,{'start':_0x23fa09['start']['clone'](),'end':_0x23fa09['end']['clone'](),'rootName':_0x23fa09['root']['rootName']});this['_savedMetaData']['set'](_0xc42ffc,{'roots':_0x398a38,'markers':_0x7d65a4,'rootsAttributes':_0x3e5e51});}['_removeMetaData'](_0x319eeb){this['_savedMetaData']['delete'](_0x319eeb);}['_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'](_0x15a9fb,_0x35305a=null){let _0xcd2dfd=null;_0x15a9fb['is']('documentFragment')||(_0xcd2dfd=new _0x41b3fc(_0x15a9fb['name'],{'vid_start':null===_0x35305a?this['_revisionId']++:_0x35305a++}));const _0x54ad2e=[];for(const _0x1debb of _0x15a9fb['getChildren']())if(_0x1debb['is']('element')){_0x54ad2e['push'](this['_makeIdsRoot'](_0x1debb,_0x35305a));const _0x181b0f=_0x54ad2e[_0x54ad2e['length']-0x1];null!==_0x35305a&&(_0x35305a=_0x181b0f['is']('element','$text')?_0x181b0f['getAttribute']('vid')+0x1:_0x181b0f['getAttribute']('vid_end')+0x1);}else{for(let _0x103b0e=0x0;_0x103b0e<_0x1debb['offsetSize'];_0x103b0e++)_0x54ad2e['push'](new _0x41b3fc('$text',{'vid':null===_0x35305a?this['_revisionId']++:_0x35305a++}));}if(_0x15a9fb['is']('documentFragment')){const _0x35931b=N(_0x15a9fb['rootName']);return _0x35931b['_insertChild'](0x0,_0x54ad2e),_0x35931b;}return _0xcd2dfd['_setAttribute']('vid_end',null===_0x35305a?this['_revisionId']++:_0x35305a++),_0xcd2dfd['_insertChild'](0x0,_0x54ad2e),_0xcd2dfd;}['_calculateMetaData'](_0x10783e,_0x1119c8,_0xc506aa){this['_reset']();const {roots:_0x35aaab,markers:_0x4bd2b7,rootsAttributes:_0x5b9d8a}=this['_savedMetaData']['get'](_0x10783e);this['_baseRoots']=new Map(_0x35aaab),this['_baseRootsAttributes']=new Map(_0x1f8919(_0x5b9d8a));for(const [_0x40baad,_0x15bd73]of this['_baseRoots'])if('$graveyard'!==_0x40baad&&(this['_diffRoots']['set'](_0x40baad,x(_0x15bd73)),this['_diffRootsAttributes']=new Map(_0x1f8919(_0x5b9d8a)),_0xc506aa)){const _0x2e38d8=this['_revisionId'];this['_idsRoots']['set'](_0x40baad,this['_makeIdsRoot'](_0x15bd73)),this['_baseIdsRoots']['set'](_0x40baad,this['_makeIdsRoot'](_0x15bd73,_0x2e38d8));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0xc506aa&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2b4bfe,_0x4e3ba0]of _0x4bd2b7){const _0x126ea8=this['_baseRoots']['get'](_0x4e3ba0['rootName']),_0x4044e4=this['_diffRoots']['get'](_0x4e3ba0['rootName']),_0x41f315=new _0x1340e0(this['_fixPosition'](_0x4e3ba0['start'],_0x126ea8),this['_fixPosition'](_0x4e3ba0['end'],_0x126ea8)),_0x5604a0=this['_fixRange'](_0x41f315,_0x4044e4);_0x126ea8['markers']['set'](_0x2b4bfe,_0x41f315),this['_markers']['set'](_0x2b4bfe,_0x5604a0);}this['_applyOperations'](_0x10783e,_0x1119c8,_0xc506aa);}['_applyOperations'](_0x9a88de,_0x426643,_0x5774b3){for(const _0x2eaf97 of this['source']['getOperations'](_0x9a88de,_0x426643))this['_handleOperation'](_0x2eaf97,_0x5774b3);for(const _0x3eaaa7 of this['_diffRoots']['values']())_0x3eaaa7['markers']['clear']();for(const [_0x10c58c,_0x416278]of this['_markers']){this['_diffRoots']['get'](_0x416278['root']['rootName'])['markers']['set'](_0x10c58c,_0x416278['clone']());}const _0x712e84=new Map(),_0x5ac358=new Map();for(const [_0x23a541,_0x26715b]of this['_diffRoots'])_0x712e84['set'](_0x23a541,x(_0x26715b)),_0x5ac358['set'](_0x23a541,this['_diffRootsAttributes']['get'](_0x23a541));this['_saveMetaData'](_0x426643,_0x712e84,this['_markers'],_0x5ac358);}['_getPreviousFrom'](_0x545838){const _0x20d274=Array['from'](this['_savedMetaData']['keys']());_0x20d274['sort']((_0x51af08,_0x40ae93)=>_0x51af08-_0x40ae93),_0x20d274['reverse']();for(const _0x22fa2b of _0x20d274)if(_0x22fa2b<_0x545838)return _0x22fa2b;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4dfd43,_0xc1f0f4){const _0xad64ba=Array['from'](_0xc1f0f4['markers'])['map'](([_0x2f2439,_0x253b0a])=>[_0x2f2439,this['_fixRange'](_0x253b0a,_0x4dfd43)]);_0x4dfd43['markers']=new Map(_0xad64ba);}['_transformMarkers'](_0x7db8a3){for(const _0x5378fe of this['_markers']['values']()){const _0x22da49=_0x5378fe['getTransformedByOperation'](_0x7db8a3),_0x13526b=_0x1340e0['_createFromRanges'](_0x22da49);_0x5378fe['start']=_0x13526b['start'],_0x5378fe['end']=_0x13526b['end'];}}['_handleOperation'](_0x2770f6,_0x4c9bf1){if('addRoot'!=_0x2770f6['type']&&'detachRoot'!=_0x2770f6['type']){if('insert'==_0x2770f6['type']){const _0x4441ae=_0x2770f6['position']['root']['rootName'];this['_diffRoots']['has'](_0x4441ae)||(this['_diffRoots']['set'](_0x4441ae,N(_0x4441ae,!0x0)),this['_diffRootsAttributes']['set'](_0x4441ae,{}),_0x4c9bf1&&this['_idsRoots']['set'](_0x4441ae,N(_0x4441ae,!0x0)));}else{if('addRootAttribute'==_0x2770f6['type']||'removeRootAttribute'==_0x2770f6['type']||'changeRootAttribute'==_0x2770f6['type'])return void this['_handleRootAttributeOperation'](_0x2770f6);'marker'==_0x2770f6['type']&&this['_handleMarkerOperation'](_0x2770f6);}if('marker'!==_0x2770f6['type']){const _0x45b7f5=this['_cloneOperation'](_0x2770f6,this['_diffRoots']);_0x45b7f5['_execute'](),this['_transformMarkers'](_0x45b7f5);}if(_0x4c9bf1)switch(_0x2770f6['type']){case'insert':this['_handleInsertOperation'](_0x2770f6);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2770f6);break;case'merge':this['_handleMergeOperation'](_0x2770f6);break;case'split':this['_handleSplitOperation'](_0x2770f6);}}else this['_handleRootOperation'](_0x2770f6,_0x4c9bf1);}['_cloneOperation'](_0x420a71,_0x2e502b){const _0x582490=_0x420a71['clone']();return _0x582490['_authorId']=_0x420a71['_authorId'],this['_fixOperation'](_0x582490,_0x2e502b),_0x582490;}['_getBaseVids'](_0x5eb001){return _0x5eb001['map'](_0x1c2b2b=>{const _0x21ad5e=this['_getVidAttributeName'](_0x1c2b2b);return Number(_0x1c2b2b['item']['getAttribute'](_0x21ad5e));});}['_generateTape'](_0x5792b7,_0x37b2c8){if(_0x5792b7['is']('element','$text'))_0x37b2c8['push']({'item':_0x5792b7,'type':'text'});else{_0x5792b7['is']('element')&&_0x37b2c8['push']({'item':_0x5792b7,'type':'elementStart'});for(const _0xe51e2e of _0x5792b7['getChildren']())this['_generateTape'](_0xe51e2e,_0x37b2c8);_0x5792b7['is']('element')&&_0x37b2c8['push']({'item':_0x5792b7,'type':'elementEnd'});}return _0x37b2c8;}['_getState'](){const _0x27f4f3=new Map(this['_touched']),_0x34d86f=new Map(_0x27f4f3),_0x2429fc=new Map(),_0x4fdbdc={'insertions':{},'deletions':{}},_0x1215ea={'insertions':{},'deletions':{}},_0x413eae=new Map(),_0x3b4734=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3b4734['delete']('$graveyard');for(const _0x1cc3b5 of _0x3b4734){const _0x302691=this['_diffRoots']['get'](_0x1cc3b5)||N(_0x1cc3b5,!0x1),_0x1b6ff5=this['_baseRoots']['get'](_0x1cc3b5)||N(_0x1cc3b5,!0x1);_0x302691['isAttached']()||_0x1b6ff5['isAttached']()?(_0x4fdbdc['insertions'][_0x1cc3b5]=x(_0x302691),_0x4fdbdc['deletions'][_0x1cc3b5]=x(_0x1b6ff5),this['_copyMarkers'](_0x4fdbdc['deletions'][_0x1cc3b5],_0x1b6ff5),this['_copyMarkers'](_0x4fdbdc['insertions'][_0x1cc3b5],_0x302691),_0x1215ea['insertions'][_0x1cc3b5]=this['_generateTape'](this['_idsRoots']['get'](_0x1cc3b5),[]),_0x1215ea['deletions'][_0x1cc3b5]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1cc3b5)||N(_0x1cc3b5,!0x1),[])):_0x3b4734['delete'](_0x1cc3b5);}for(const _0x333a05 of _0x3b4734){const _0x5eb207=_0x1215ea['insertions'][_0x333a05];for(const _0x15f605 of _0x5eb207){const _0x4f5d1e=this['_getVidAttributeName'](_0x15f605),_0x47926d=_0x15f605['item']['getAttribute'](_0x4f5d1e);_0x34d86f['delete'](_0x47926d),_0x47926d>=this['_startingRevisionId']&&_0x2429fc['set'](_0x47926d,_0x27f4f3['get'](_0x47926d));}}for(const _0x47bc7f of _0x3b4734){const _0x18d397=_0x1215ea['insertions'][_0x47bc7f],_0x3b2479=this['_getBaseVids'](_0x1215ea['deletions'][_0x47bc7f]);let _0x2b654c=0x0;for(const _0x5177dd of _0x18d397){const _0x45f88f=this['_getVidAttributeName'](_0x5177dd),_0x416b6f=_0x5177dd['item']['getAttribute'](_0x45f88f);if(!_0x2429fc['has'](_0x416b6f)&&!_0x413eae['has'](_0x416b6f)){if(_0x34d86f['has'](_0x416b6f))_0x2b654c++;else{if(_0x416b6f!=_0x3b2479[_0x2b654c]){const _0x1d19e1=_0x27f4f3['get'](_0x416b6f)||_0x27f4f3['get'](_0x3b2479[_0x2b654c]);for(;_0x416b6f!=_0x3b2479[_0x2b654c];)_0x34d86f['has'](_0x3b2479[_0x2b654c])||(_0x413eae['set'](_0x3b2479[_0x2b654c],_0x1d19e1),_0x27f4f3['set'](_0x3b2479[_0x2b654c],_0x1d19e1)),_0x2b654c++;}_0x2b654c++;}}}}for(const _0x270e43 of _0x3b4734){const _0xa2161a=_0x1215ea['insertions'][_0x270e43];for(const _0x38c43e of _0xa2161a){const _0x3e8895=this['_getVidAttributeName'](_0x38c43e),_0x5be0d7=_0x38c43e['item']['getAttribute'](_0x3e8895);if(_0x413eae['has'](_0x5be0d7)){const _0x27d85f=_0x413eae['get'](_0x5be0d7);_0x34d86f['has'](_0x5be0d7)||_0x34d86f['set'](_0x5be0d7,{..._0x27d85f}),_0x2429fc['set'](_0x5be0d7,{..._0x27d85f});}}}for(const _0x2f0011 of _0x34d86f['keys']())_0x2f0011>=this['_startingRevisionId']&&_0x34d86f['delete'](_0x2f0011);const _0x35491f=new Map();for(const _0x5eb735 of _0x3b4734){let _0x54a4e0=_0x1215ea['insertions'][_0x5eb735];for(const _0x4c9882 of _0x54a4e0)if(_0x4c9882['item']['is']('element','tableCell')){const _0xa5b556=this['_getVidAttributeName'](_0x4c9882),_0x417b34=_0x4c9882['item']['getAttribute'](_0xa5b556);if(_0x2429fc['has'](_0x417b34)){const _0x7678b5=_0x4c9882['item']['parent']['parent']['getAttribute']('vid_start'),_0x2ab833=_0x35491f['get'](_0x7678b5)||new Set();_0x2ab833['add'](_0x2429fc['get'](_0x417b34)['userId']),_0x35491f['set'](_0x7678b5,_0x2ab833);}}_0x54a4e0=_0x1215ea['deletions'][_0x5eb735];for(const _0x5911ea of _0x54a4e0)if(_0x5911ea['item']['is']('element','tableCell')){const _0x1c6819=this['_getVidAttributeName'](_0x5911ea),_0x2f6f36=_0x5911ea['item']['getAttribute'](_0x1c6819);if(_0x34d86f['has'](_0x2f6f36)){const _0x56f34a=_0x5911ea['item']['parent']['parent']['getAttribute']('vid_start'),_0x2ccfb6=_0x35491f['get'](_0x56f34a)||new Set();_0x2ccfb6['add'](_0x34d86f['get'](_0x2f6f36)['userId']),_0x35491f['set'](_0x56f34a,_0x2ccfb6);}}for(const _0x52e39f of _0x35491f['keys']())(_0x2429fc['has'](_0x52e39f)||_0x34d86f['has'](_0x52e39f))&&_0x35491f['delete'](_0x52e39f);}for(const _0x40a6cf of _0x3b4734){const _0x5a464a=_0x1215ea['insertions'][_0x40a6cf];let _0x22c56f=null,_0x1a9d48=null;for(const _0x2922b2 of _0x5a464a){const _0x16a77e=this['_getVidAttributeName'](_0x2922b2),_0x38fc20=_0x2922b2['item']['getAttribute'](_0x16a77e),_0x238ad7=_0x35491f['get'](_0x38fc20);_0x238ad7&&'elementStart'==_0x2922b2['type']&&(_0x22c56f=Array['from'](_0x238ad7)[0x0],_0x1a9d48=_0x2922b2['item']['getAttribute']('vid_end')),_0x22c56f&&(_0x34d86f['set'](_0x38fc20,{'userId':_0x22c56f}),_0x2429fc['set'](_0x38fc20,{'userId':_0x22c56f})),_0x38fc20==_0x1a9d48&&(_0x22c56f=null,_0x1a9d48=null);}}const _0x2f5711={},_0x59467e=new Set();for(const _0x34d2b5 of _0x3b4734){const _0x50ebb9=_0x4fdbdc['deletions'][_0x34d2b5],_0x5535bd=_0x4fdbdc['insertions'][_0x34d2b5];for(const {userId:_0x255a50}of this['_touchedMarkers']['values']())null!==_0x255a50&&_0x59467e['add'](_0x255a50);for(const {userId:_0x3f9672}of this['_touchedRoots']['values']())null!==_0x3f9672&&_0x59467e['add'](_0x3f9672);this['_markChanges'](_0x5535bd,_0x1215ea['insertions'][_0x34d2b5],_0x2429fc,'insertion',_0x59467e),this['_markChanges'](_0x50ebb9,_0x1215ea['deletions'][_0x34d2b5],_0x34d86f,'deletion',_0x59467e),_0x2f5711[_0x34d2b5]={'insertions':this['_prepareViewToSave'](_0x5535bd),'deletions':this['_prepareViewToSave'](_0x50ebb9),'attachChange':this['_touchedRoots']['get'](_0x34d2b5)||null,'attributesBefore':_0x1f8919(this['_baseRootsAttributes']['get'](_0x34d2b5))||{},'attributesAfter':_0x1f8919(this['_diffRootsAttributes']['get'](_0x34d2b5))};}return{'diffData':_0x2f5711,'authorsIds':Array['from'](_0x59467e)};}['_processRootBeforeSave'](_0x2c7b02){for(const [,_0x13e4a5]of _0x2c7b02['markers']){const _0xca49b5=_0x13e4a5['start']['getAncestors']()['filter'](_0xfdcd8c=>'tableCell'==_0xfdcd8c['name']);for(const _0x46a9a1 of _0xca49b5)0x1==_0x46a9a1['childCount']&&_0x46a9a1['getChild'](0x0)['is']('element','paragraph')&&_0x46a9a1['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x13eb7a){this['_processRootBeforeSave'](_0x13eb7a);const _0x237f6e=this['editor']['data']['toView'](_0x13eb7a,{}),_0x1e949f=Array['from'](_0x237f6e['getChildren']())['map'](_0x4c151f=>this['_getViewJson'](_0x4c151f));return JSON['stringify'](_0x1e949f);}['_getViewJson'](_0x1d027){if(_0x1d027['is']('$text'))return _0x1d027['data'];{const _0x2d7ed3=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0xe685e4=_0x1d027,_0x14ded4=this['editor']['data']['htmlProcessor']['domConverter'],_0x1f4bc5={'type':_0x2d7ed3['_getTypeCharForViewElement'](_0xe685e4),'name':_0xe685e4['name'],'attributes':Array['from'](_0xe685e4['getAttributes']()),'children':Array['from'](_0xe685e4['getChildren']())['map'](_0xa6f18b=>this['_getViewJson'](_0xa6f18b))};if(_0x1d027['is']('uiElement')&&'$comment'!=_0x1d027['name']){const _0x59560e=_0x1d027['render'](_0x14ded4['domDocument'],_0x14ded4);_0x1f4bc5['children']['push'](_0x59560e['outerHTML']);}else{if(_0x1d027['is']('rawElement')){const _0x353e65=_0x14ded4['domDocument']['createElement'](_0xe685e4['name']);_0x1d027['render'](_0x353e65,_0x14ded4),_0x1f4bc5['children']['push'](_0x353e65['innerHTML']);}}const _0x4bd659=Array['from'](_0xe685e4['getCustomProperties']());_0x4bd659['length']>0x0&&(_0x1f4bc5['customProperties']=_0x4bd659);const _0x52dbe5=_0xe685e4['getFillerOffset']();return null!==_0x52dbe5&&(_0x1f4bc5['fillerOffset']=_0x52dbe5),_0x1f4bc5;}}['_markChanges'](_0x24e41e,_0x5917e0,_0x1a0e1c,_0x196d27,_0x4e6243){let _0x221041=null,_0x228932=null,_0x1e94fe=0x0;const _0x32c6d9=this['editor']['model'];for(let _0x5a817b=0x0;_0x5a817b<_0x5917e0['length'];_0x5a817b++){const _0x404e77=this['_getVidAttributeName'](_0x5917e0[_0x5a817b]),_0xc9db45=_0x5917e0[_0x5a817b]['item']['getAttribute'](_0x404e77),_0x3a442d=_0x1a0e1c['get'](_0xc9db45),_0x1feecb=_0x5a817b==_0x5917e0['length']-0x1;(!_0x221041&&_0x3a442d&&(_0x221041=_0x3a442d,_0x228932=_0x5917e0[_0x5a817b]),_0x221041&&(!_0x3a442d||_0x3a442d['userId']!=_0x221041['userId']))&&(_0x44e94a(_0x3a442d,P(_0x228932,_0x24e41e,_0x32c6d9),P(_0x5917e0[_0x5a817b],_0x24e41e,_0x32c6d9)),_0x221041=_0x3a442d||null,_0x228932=_0x3a442d?_0x5917e0[_0x5a817b]:null),_0x221041&&_0x1feecb&&_0x44e94a(_0x3a442d,P(_0x228932,_0x24e41e,_0x32c6d9),V(_0x5917e0[_0x5a817b],_0x24e41e,_0x32c6d9));}function _0x44e94a(_0x5862e7,_0x1cc6cf,_0x33d8b0){const _0x2cf9af=_0x221041['userId'],_0x514910='revision:'+_0x196d27+':'+_0x2cf9af+':'+_0x1e94fe++,_0x5f377a=_0x32c6d9['createRange'](_0x1cc6cf,_0x33d8b0);_0x24e41e['markers']['set'](_0x514910,_0x5f377a),null!==_0x2cf9af&&_0x4e6243['add'](_0x2cf9af);}}['_getVidAttributeName'](_0x291573){switch(_0x291573['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x536d73,_0x248119){_0x536d73['baseVersion']=null;for(const _0x1e2eee in _0x536d73){const _0x5dbfd2=_0x536d73[_0x1e2eee];if(_0x5dbfd2 instanceof _0x4d7936){const _0x123d72=_0x248119['get'](_0x5dbfd2['root']['rootName']);_0x536d73[_0x1e2eee]=this['_fixPosition'](_0x5dbfd2,_0x123d72);}if(_0x5dbfd2 instanceof _0x1340e0){const _0x327092=_0x248119['get'](_0x5dbfd2['root']['rootName']);_0x536d73[_0x1e2eee]=this['_fixRange'](_0x5dbfd2,_0x327092);}'root'===_0x1e2eee&&(_0x536d73['root']=_0x248119['get'](_0x536d73['root']['rootName']));}}['_fixRange'](_0x4b7f36,_0x3d7e09){return this['editor']['model']['createRange'](this['_fixPosition'](_0x4b7f36['start'],_0x3d7e09),this['_fixPosition'](_0x4b7f36['end'],_0x3d7e09));}['_fixPosition'](_0x3fadf3,_0x7191c0){return this['editor']['model']['createPositionFromPath'](_0x7191c0,_0x3fadf3['path'],_0x3fadf3['stickiness']);}['_handleInsertOperation'](_0x16ede6){const _0x1267fa=this['_idsRoots']['get'](_0x16ede6['position']['root']['rootName']),_0x2eea21=this['_fixPosition'](_0x16ede6['position'],_0x1267fa),_0x195032=null===_0x16ede6['_authorId']?null:_0x16ede6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xfc99bd=_0x2eea21['parent'],_0x15626e=this['_revisionId'],_0x196494=[];for(const _0xac6d45 of _0x16ede6['nodes'])if(_0xac6d45['is']('element'))_0x196494['push'](this['_makeIdsRoot'](_0xac6d45));else{for(let _0x5196a3=0x0;_0x5196a3<_0xac6d45['offsetSize'];_0x5196a3++)_0x196494['push'](new _0x41b3fc('$text',{'vid':this['_revisionId']++}));}const _0x251a27=this['_revisionId'];for(let _0x18a33f=_0x15626e;_0x18a33f<_0x251a27;_0x18a33f++)this['_touched']['set'](_0x18a33f,{'userId':_0x195032});_0xfc99bd['_insertChild'](_0x2eea21['offset'],_0x196494);}['_handleMoveOperation'](_0x4eaec4){(_0x4eaec4=this['_cloneOperation'](_0x4eaec4,this['_idsRoots']))['_execute']();const _0x53c951=null===_0x4eaec4['_authorId']?null:_0x4eaec4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x51ea72=_0x4eaec4['getMovedRangeStart'](),_0x596809=_0x51ea72['parent'],_0x418d3f=_0x51ea72['offset'];!function _0x337176(_0x1ef299,_0x593023,_0x301b1a,_0x2e5aa4){for(let _0x57f2cd=_0x301b1a;_0x57f2cd<_0x2e5aa4;_0x57f2cd++){const _0x91ec69=_0x593023['getChild'](_0x57f2cd);_0x91ec69['is']('element','$text')?_0x1ef299['set'](_0x91ec69['getAttribute']('vid'),{'userId':_0x53c951}):(_0x1ef299['set'](_0x91ec69['getAttribute']('vid_start'),{'userId':_0x53c951}),_0x337176(_0x1ef299,_0x91ec69,0x0,_0x91ec69['childCount']),_0x1ef299['set'](_0x91ec69['getAttribute']('vid_end'),{'userId':_0x53c951}));}}(this['_touched'],_0x596809,_0x418d3f,_0x418d3f+_0x4eaec4['howMany']);}['_handleMergeOperation'](_0x55b435){const _0x3d0619=null===(_0x55b435=this['_cloneOperation'](_0x55b435,this['_idsRoots']))['_authorId']?null:_0x55b435['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x541e9b=_0x55b435['targetPosition']['parent'],_0x19c578=_0x55b435['sourcePosition']['parent'],_0x318c22=_0x541e9b['getAttribute']('vid_end'),_0x362471=_0x19c578['getAttribute']('vid_start');_0x541e9b['_setAttribute']('vid_end',_0x19c578['getAttribute']('vid_end')),_0x19c578['_setAttribute']('vid_end',_0x318c22),this['_touched']['set'](_0x362471,{'userId':_0x3d0619}),this['_touched']['set'](_0x318c22,{'userId':_0x3d0619}),_0x55b435['_execute']();}['_handleSplitOperation'](_0x2e6ca3){const _0x3dee61=null===(_0x2e6ca3=this['_cloneOperation'](_0x2e6ca3,this['_idsRoots']))['_authorId']?null:_0x2e6ca3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x233f44=_0x2e6ca3['graveyardPosition'],_0x4b2d42=_0x2e6ca3['splitPosition']['parent'];_0x2e6ca3['_execute']();const _0x973548=_0x4b2d42['getAttribute']('vid_end'),_0x2536ad=_0x2e6ca3['insertionPosition']['nodeAfter'];if(_0x233f44){const _0x4ef924=_0x2536ad['getAttribute']('vid_end'),_0x5ec808=_0x4b2d42['getAttribute']('vid_end');_0x4b2d42['_setAttribute']('vid_end',_0x4ef924),_0x2536ad['_setAttribute']('vid_end',_0x5ec808),this['_touched']['set'](_0x4b2d42['getAttribute']('vid_end'),{'userId':_0x3dee61}),this['_touched']['set'](_0x2536ad['getAttribute']('vid_start'),{'userId':_0x3dee61});}else{const _0x67aa64=this['_revisionId']++,_0x117cf2=this['_revisionId']++;_0x4b2d42['_setAttribute']('vid_end',_0x67aa64),_0x2536ad['_setAttribute']('vid_start',_0x117cf2),_0x2536ad['_setAttribute']('vid_end',_0x973548),this['_touched']['set'](_0x67aa64,{'userId':_0x3dee61}),this['_touched']['set'](_0x117cf2,{'userId':_0x3dee61});}}['_handleMarkerOperation'](_0x415e82){if(!_0x415e82['affectsData'])return;const _0x2ffd47=(_0x415e82=this['_cloneOperation'](_0x415e82,this['_diffRoots']))['oldRange']?_0x415e82['oldRange']['root']:null,_0x147c69=_0x415e82['newRange']?_0x415e82['newRange']['root']:null;_0x2ffd47&&this['_markers']['delete'](_0x415e82['name']),_0x147c69&&this['_markers']['set'](_0x415e82['name'],_0x415e82['newRange']['clone']());const _0x44bdc5=null===_0x415e82['_authorId']?null:_0x415e82['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x257c9b=_0x415e82['name'];if(!this['_touchedMarkers']['has'](_0x257c9b))return void this['_touchedMarkers']['set'](_0x257c9b,{'range':_0x415e82['oldRange'],'userId':_0x44bdc5});const _0xfd2de5=this['_touchedMarkers']['get'](_0x257c9b),_0x49af89=_0xfd2de5['range'],_0x5a1855=_0x415e82['newRange'];null==_0x49af89&&null==_0x5a1855||_0x49af89&&_0x5a1855&&_0x49af89['isEqual'](_0x5a1855)?this['_touchedMarkers']['delete'](_0x415e82['name']):_0xfd2de5['userId']=_0x44bdc5;}['_handleRootOperation'](_0xf7f694,_0x1b5616){this['_diffRoots']['has'](_0xf7f694['rootName'])?this['_diffRoots']['get'](_0xf7f694['rootName'])['_isAttached']=_0xf7f694['isAdd']:(this['_diffRoots']['set'](_0xf7f694['rootName'],N(_0xf7f694['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0xf7f694['rootName'],{}),_0x1b5616&&this['_idsRoots']['set'](_0xf7f694['rootName'],N(_0xf7f694['rootName'],!0x0)));const _0x15b85a=null===_0xf7f694['_authorId']?null:_0xf7f694['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x7378f9=this['_touchedRoots']['get'](_0xf7f694['rootName']);_0x7378f9&&_0x7378f9['userId']===_0x15b85a?this['_touchedRoots']['delete'](_0xf7f694['rootName']):this['_touchedRoots']['set'](_0xf7f694['rootName'],{'userId':_0x15b85a,'isAttached':_0xf7f694['isAdd']});}['_handleRootAttributeOperation'](_0x4bdadc){const _0x25a935=this['_diffRootsAttributes']['get'](_0x4bdadc['root']['rootName']);null===_0x4bdadc['newValue']?delete _0x25a935[_0x4bdadc['key']]:_0x25a935[_0x4bdadc['key']]=_0x4bdadc['newValue'];}}function x(_0x60d302){const _0x5de043=N(_0x60d302['rootName'],_0x60d302['isAttached']());for(const _0x224ae7 of _0x60d302['getChildren']()){const _0x253db7=_0x224ae7['_clone'](!0x0);_0x5de043['_appendChild'](_0x253db7);}return _0x5de043;}function N(_0x22a97b,_0x56fc97=!0x0){const _0x5af5dc=new _0x1753c2();return _0x5af5dc['rootName']=_0x22a97b,_0x5af5dc['_isAttached']=_0x56fc97,_0x5af5dc['isAttached']=()=>_0x5af5dc['_isAttached'],_0x5af5dc;}function P(_0x1158f1,_0x4bf6fa,_0xe5eb15){const _0x29715e='elementEnd'==_0x1158f1['type']?_0xe5eb15['createPositionAt'](_0x1158f1['item'],'end'):_0xe5eb15['createPositionBefore'](_0x1158f1['item']);return _0xe5eb15['createPositionFromPath'](_0x4bf6fa,_0x29715e['path'],_0x29715e['stickiness']);}function V(_0x4a1d91,_0x2d0985,_0x45fbe3){const _0x4087a3='elementStart'==_0x4a1d91['type']?_0x45fbe3['createPositionAt'](_0x4a1d91['item'],0x0):_0x45fbe3['createPositionAfter'](_0x4a1d91['item']);return _0x45fbe3['createPositionFromPath'](_0x2d0985,_0x4087a3['path'],_0x4087a3['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
- _0x5e9ce1(_0x4c679a){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x5582ae,_0x2ceba7){super(_0x5582ae),this['focusTracker']=new _0x57d9ce(),this['keystrokes']=new _0x5f3a69(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2ceba7),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'](),_0x3ae8e9({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x14886d=_0x1190ce=>_0x1190ce['stopPropagation']();this['keystrokes']['set']('arrowright',_0x14886d),this['keystrokes']['set']('arrowleft',_0x14886d),this['keystrokes']['set']('arrowup',_0x14886d),this['keystrokes']['set']('arrowdown',_0x14886d);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x794bf7){this['revisionNameInputView']['fieldView']['element']['value']=_0x794bf7['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0xbc0fdf){const _0x914c71=new et(this['locale'],ti),_0x3bef7a=_0x914c71['fieldView'];_0x3bef7a['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x334bb4=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0xbc0fdf&&(_0x334bb4+='\x20('+m(this['locale'],'optional')+')'),(_0x914c71['label']=_0x334bb4,_0x3bef7a['on']('input',()=>{this['revisionNameInputValue']=_0x3bef7a['element']['value']['trim']();}),_0x914c71);}}class l extends _0x2bce4d{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x16f09f=this['editor'],_0x4fd146=_0x16f09f['plugins']['get']('RevisionTracker');_0x16f09f['ui']['componentFactory']['add']('revisionHistory',_0x519809=>{const _0x5ba753=_0x46d208(_0x519809),_0x37a10a=_0x5ba753['panelView']['children'],_0x132914=new _0x33e630(_0x519809),_0x26f8d6=new _0x2b7b7d(_0x519809),_0x43930f=new _0x1a6925(_0x519809),_0x4c3a21=new _0x2b7b7d(_0x519809),_0x5a3824=new _0x1a6925(_0x519809);return _0x5ba753['bind']('isEnabled')['to'](_0x4fd146,'isReady',_0x4fd146,'isEnabled',_0x16f09f,'isReadOnly',(_0x31205d,_0x3cc307,_0x41f8d7)=>_0x31205d&&_0x3cc307&&!_0x41f8d7),_0x5ba753['buttonView']['set']({'icon':_0x3f5198,'label':m(_0x519809,'Revision\x20history'),'tooltip':!0x0}),_0x43930f['set']({'label':m(_0x519809,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x43930f['bind']('isEnabled')['to'](_0x4fd146,'isReady',_0x4fd146,'isEnabled',_0x16f09f,'isReadOnly',(_0x240c6e,_0x385972,_0xff4a3)=>_0x240c6e&&_0x385972&&!_0xff4a3),_0x43930f['on']('execute',()=>this['_showDialog']()),_0x5a3824['set']({'label':m(_0x519809,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x5a3824['bind']('isEnabled')['to'](_0x4fd146,'isReady',_0x16f09f,'isReadOnly',(_0x38e69f,_0x4c911a)=>_0x38e69f&&!_0x4c911a),_0x5a3824['on']('execute',()=>{_0x16f09f['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x5ba753['isOpen']=!0x1,_0x16f09f['editing']['view']['focus']();}),_0x26f8d6['children']['add'](_0x43930f),_0x4c3a21['children']['add'](_0x5a3824),_0x132914['role']='menu',_0x132914['items']['addMany']([_0x26f8d6,_0x4c3a21]),_0x37a10a['add'](_0x132914),_0x5ba753;}),_0x16f09f['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x1763fe=this['editor'],_0x7b232=_0x1763fe['locale'],_0x3d5fb6=new _0x412e4b(_0x7b232),_0x426563=new _0x289751(_0x7b232);_0x3d5fb6['buttonView']['set']({'icon':_0x3f5198,'label':m(_0x7b232,'Revision\x20history')});const _0x144195=new _0x50e527(_0x7b232,_0x3d5fb6),_0x553a5e=new _0x1326a4(_0x7b232);_0x553a5e['set']({'label':m(_0x7b232,'Save\x20current\x20revision')}),_0x553a5e['delegate']('execute')['to'](_0x3d5fb6),_0x553a5e['on']('execute',()=>{this['_showDialog']();}),_0x144195['children']['add'](_0x553a5e),_0x426563['items']['add'](_0x144195);const _0x508629=new _0x50e527(_0x7b232,_0x3d5fb6),_0xe1796c=new _0x1326a4(_0x7b232);return _0xe1796c['set']({'label':m(_0x7b232,'Open\x20revision\x20history')}),_0xe1796c['delegate']('execute')['to'](_0x3d5fb6),_0xe1796c['on']('execute',()=>{_0x1763fe['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x508629['children']['add'](_0xe1796c),_0x426563['items']['add'](_0x508629),_0x3d5fb6['panelView']['children']['add'](_0x426563),_0x3d5fb6;}['_showDialog'](){const _0x2b1c54=this['editor'],_0x1af60f=_0x2b1c54['locale'],_0x3180ac=_0x2b1c54['plugins']['get']('Dialog'),_0x1be9ea=_0x2b1c54['plugins']['get']('RevisionTracker');function _0x46295d(_0x19389f){_0x2b1c54['config']['get']('revisionHistory.requireRevisionName')&&''===_0x19389f['revisionName']?_0x19389f['revisionNameInputView']['errorText']=m(_0x1af60f,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2b1c54['plugins']['get'](h)['saveRevision']({'name':_0x19389f['revisionName']}),_0x3180ac['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x46295d(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3180ac['show']({'id':'revisionSave','title':m(_0x1af60f,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x2b1c54['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3180ac['hide']()},{'label':m(_0x2b1c54['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0xcdb8b3){_0xcdb8b3['bind']('isEnabled')['to'](_0x1be9ea,'isReady',_0x1be9ea,'isEnabled',_0x2b1c54,'isReadOnly',(_0xb9f416,_0x342412,_0xb2c4b2)=>_0xb9f416&&_0x342412&&!_0xb2c4b2);},'onExecute':()=>_0x46295d(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x1ce303=this['editor'],_0x7aa48a=_0x1ce303['locale'];this['_saveRevisionFormView']=new me(_0x7aa48a,_0x1ce303['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x4c679a{['changeId'];['_model'];constructor(_0x4e50fc,_0x20d5a2){super(_0x4e50fc),this['_model']=_0x20d5a2,this['changeId']=_0x20d5a2['id'];const _0x48f9c1=this['bindTemplate'],_0x4fc419=m(_0x4e50fc,_0x20d5a2['data']['isSuggestion']?'Suggested\x20by':'add'==_0x20d5a2['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x20d5a2['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x48f9c1['to']('type',_0x2ba129=>'ck-revision-change__'+_0x2ba129)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x4fc419}]},{'text':'\x20'+_0x20d5a2['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x1a438a(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x15f47f){super(),this['id']=_0x15f47f['id']||_0x3bb1d9(),this['author']=_0x15f47f['author'],this['type']=_0x15f47f['type'],this['data']=_0x15f47f['data']||{},this['rootName']=_0x15f47f['rootName'],this['set']('createdAt',_0x15f47f['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(_0x11a237,_0x1ca45c){this['newRevisionId']=_0x11a237,this['oldRevisionId']=_0x1ca45c,this['changes']=new _0x40f1c6();}['_setChanges'](_0x2af9cf){for(const _0x134d72 of _0x2af9cf)this['changes']['add'](_0x134d72);}}class u extends _0x2bce4d{['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[_0x729304,_0x27a1d9,S,$];}constructor(_0x246c8e){super(_0x246c8e),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',(_0x51861e,_0x49cc40,_0x46313a)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x28d356=>{for(const _0x520c92 of this['editor']['editing']['view']['document']['roots'])_0x46313a?_0x28d356['removeClass']('ck-editor__editable__overlay',_0x520c92):_0x28d356['addClass']('ck-editor__editable__overlay',_0x520c92);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x16b803=>null!==_0x16b803),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x18f0ff,_0x336276,_0x3f60fa)=>_0x18f0ff&&_0x3f60fa?_0x336276['changes']['getIndex'](_0x3f60fa):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x6a06b7,_0xada702)=>_0x6a06b7?_0xada702['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x27a1d9);}['init'](){const _0x41ff91=this['editor'],_0x52e51e=new rt(_0x41ff91,{'direction':'backward'}),_0x584175=new rt(_0x41ff91,{'direction':'forward'});(_0x41ff91['commands']['add']('showPreviousChange',_0x52e51e),_0x41ff91['commands']['add']('showNextChange',_0x584175),_0x41ff91['commands']['add']('restoreRevision',new nt(_0x41ff91)),this['on']('change:numberOfChanges',()=>{_0x52e51e['refresh'](),_0x584175['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x41ff91['enableReadOnlyMode']('revision-viewer'),_0x41ff91['plugins']['has']('WidgetToolbarRepository'))&&_0x41ff91['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x115452){return await this['_utils']['loadRevisionData'](_0x115452,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x115452);}async['getRevisionRootsAttributes'](_0x147cc5){return await this['_utils']['loadRevisionData'](_0x147cc5,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x147cc5);}async['compare'](_0x2e6093,_0x2042e1,_0x1f132f=!0x1){if(!this['isEnabled'])return;const _0x1ce66e=this['diff'],_0x517d6d=this['repository'],_0xaac944='string'==typeof _0x2e6093?_0x517d6d['getRevision'](_0x2e6093):_0x2e6093,_0xf4a10a='string'==typeof _0x2042e1?_0x517d6d['getRevision'](_0x2042e1):_0x2042e1,_0x267f20=_0xaac944['id'],_0x3b7b3c=_0xf4a10a?_0xf4a10a['id']:null;if(!_0x1f132f&&this['diff']&&this['diff']['newRevisionId']===_0x267f20&&this['diff']['oldRevisionId']===_0x3b7b3c)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x267f20,_0x3b7b3c);const _0x1c378c=this['_getRevisionsRange'](_0xaac944,_0xf4a10a,!0x0)['map'](_0x23fc5c=>this['_utils']['loadRevisionData'](_0x23fc5c,this['adapter']));return _0x1c378c['push'](new Promise(_0x48bdc1=>{setTimeout(_0x48bdc1,0x14);})),Promise['all'](_0x1c378c)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x15b60f=this['_getDiff'](_0x267f20,_0x3b7b3c);for(const _0x5021dd of _0x15b60f['changes'])this['_changeIdToChange']['set'](_0x5021dd['id'],_0x5021dd);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x785625=>{for(const _0xf3ae99 of this['editor']['model']['document']['getRootNames']())_0x785625['detachRoot'](_0xf3ae99);for(const _0x5834ae of Object['keys'](_0x15b60f['model'])){const _0x4f3601=_0x785625['addRoot'](_0x5834ae);for(const _0x4ae0a9 of Object['keys'](_0x15b60f['attributes'][_0x5834ae]))_0x785625['setAttribute'](_0x4ae0a9,_0x15b60f['attributes'][_0x5834ae][_0x4ae0a9],_0x4f3601);_0x785625['insert'](_0x15b60f['model'][_0x5834ae],_0x4f3601,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x15b60f['changes'])),this['isReady']=!0x0;})['catch'](_0x29bf3d=>{console['error'](_0x29bf3d),this['_cleanUp'](),_0x1ce66e&&(this['diff']=_0x1ce66e),this['isReady']=!0x0;});}['addRevisionData'](_0x514de6,_0x3de9c0){const _0x405913=this['repository']['createRevision'](_0x514de6);return _0x405913['on']('_update',(_0x445e45,_0x1bab58,_0x414aeb)=>_0x3de9c0(_0x1bab58,_0x414aeb,_0x405913)),this['repository']['addRevision'](_0x405913),_0x405913;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4986c9=>{for(const _0x4fd223 of this['editor']['model']['document']['getRootNames']())_0x4986c9['detachRoot'](_0x4fd223);});}['_sortAndFilterDiffChanges'](_0x187740){const _0x454531=[],_0xbc2a58=new Map();for(const _0x57007e of this['editor']['model']['document']['getRootNames']()){const _0x35b892=this['editor']['editing']['view']['getDomRoot'](_0x57007e);if(!_0x35b892)continue;const _0x14ef1a=_0x35b892['getClientRects']()['item'](0x0);_0x14ef1a&&(_0x454531['push'](_0x57007e),_0xbc2a58['set'](_0x57007e,_0x14ef1a));}return _0x454531['sort']((_0x341fff,_0x5804e3)=>{const _0x29b491=_0xbc2a58['get'](_0x341fff),_0x361c8e=_0xbc2a58['get'](_0x5804e3);return _0x29b491['y']-_0x361c8e['y']||_0x29b491['x']-_0x361c8e['x'];}),(_0x187740=_0x187740['filter'](_0x4f5b95=>_0x454531['includes'](_0x4f5b95['rootName'])))['sort']((_0x271baf,_0x363f19)=>_0x454531['indexOf'](_0x271baf['rootName'])-_0x454531['indexOf'](_0x363f19['rootName'])),_0x187740;}['_makeTape'](_0x4ada08){const _0x7d74e1=Array['from'](_0x4ada08['markers'])['filter'](([_0xeeb07,_0x58d402])=>_0xeeb07['startsWith']('revision:')&&!_0x58d402['isCollapsed']),_0xfcfb65=Array['from'](this['editor']['model']['createRangeIn'](_0x4ada08)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x7d74e1['length'])for(const _0x14ca88 of _0xfcfb65){const [_0x3bd716,_0x616f2a]=_0x7d74e1[0x0],[,_0x37ace3,_0x2992bf]=_0x3bd716['split'](':');if(_0x616f2a['end']['isEqual'](_0x14ca88['nextPosition'])&&_0x7d74e1['shift'](),(_0x14ca88['previousPosition']['isEqual'](_0x616f2a['start'])||_0x14ca88['previousPosition']['isAfter'](_0x616f2a['start']))&&('insertion'==_0x37ace3?_0x14ca88['isAdded']={'userId':_0x2992bf}:'deletion'==_0x37ace3&&(_0x14ca88['isRemoved']={'userId':_0x2992bf})),0x0==_0x7d74e1['length'])break;}return _0xfcfb65;}['_refreshStartEndIndex'](_0x3d0ea0){const _0x103876=new Map();for(let _0x13d46d=0x0;_0x13d46d<_0x3d0ea0['length'];_0x13d46d++)'text'===_0x3d0ea0[_0x13d46d]['type']?(_0x3d0ea0[_0x13d46d]['item']['startIndex']=_0x13d46d,_0x3d0ea0[_0x13d46d]['item']['endIndex']=_0x13d46d):('elementStart'===_0x3d0ea0[_0x13d46d]['type']?_0x3d0ea0[_0x13d46d]['item']['startIndex']=_0x13d46d:'elementEnd'===_0x3d0ea0[_0x13d46d]['type']&&(_0x3d0ea0[_0x13d46d]['item']['endIndex']=_0x13d46d),_0x103876['set'](_0x3d0ea0[_0x13d46d]['id'],_0x13d46d));for(const _0x1450f4 of _0x103876['values']())'elementStart'===_0x3d0ea0[_0x1450f4]['type']?_0x3d0ea0[_0x1450f4]['item']['endIndex']=_0x103876['get'](_0x3d0ea0[_0x1450f4]['pairId']):'elementEnd'===_0x3d0ea0[_0x1450f4]['type']&&(_0x3d0ea0[_0x1450f4]['item']['startIndex']=_0x103876['get'](_0x3d0ea0[_0x1450f4]['pairId']));}['_processTape'](_0x35f23a){for(let _0x3f5ded=0x0;_0x3f5ded<_0x35f23a['length'];_0x3f5ded++){if('elementStart'===_0x35f23a[_0x3f5ded]['type'])_0x35f23a[_0x3f5ded]['item']['startIndex']=_0x3f5ded;else{if('elementEnd'===_0x35f23a[_0x3f5ded]['type']){_0x35f23a[_0x3f5ded]['item']['endIndex']=_0x3f5ded;const _0x24e397=_0x35f23a[_0x3f5ded]['item']['startIndex'];_0x35f23a[_0x24e397]['pairId']=_0x35f23a[_0x3f5ded]['id'],_0x35f23a[_0x3f5ded]['pairId']=_0x35f23a[_0x24e397]['id'];}else _0x35f23a[_0x3f5ded]['item']['startIndex']=_0x3f5ded,_0x35f23a[_0x3f5ded]['item']['endIndex']=_0x3f5ded,_0x35f23a[_0x3f5ded]['pairId']=null;}_0x35f23a[_0x3f5ded]['markersStart']||(_0x35f23a[_0x3f5ded]['markersStart']=[],_0x35f23a[_0x3f5ded]['markersEnd']=[]);}}['_markInsertions'](_0x47ace1,_0x1464ab){const _0xd49585=_0x47ace1['filter'](_0x2c9530=>!_0x2c9530['isAdded']);for(let _0x1ce892=0x0;_0x1ce892<_0x1464ab['length'];_0x1ce892++)_0x1464ab[_0x1ce892]['isAdded']&&(_0xd49585[_0x1ce892]['isAdded']=_0x1464ab[_0x1ce892]['isAdded']);}['_getDiff'](_0x114099,_0x31f4c7=null){const _0x1e7941=this['repository']['getRevision'](_0x114099),_0x51016d=_0x31f4c7?this['repository']['getRevision'](_0x31f4c7):null,_0x1d12ee=this['_getRevisionsRange'](_0x1e7941,_0x51016d),_0x2d1f6a=_0x1d12ee[_0x1d12ee['length']-0x1],_0x1d4250=new Map(),_0x1f3c7e={'model':{},'attributes':{},'changes':[]},_0x281ff8=new Set(),_0x3d24cb=new Map();for(let _0x3d883f=_0x1d12ee['length']-0x1;_0x3d883f>=0x0;_0x3d883f--){const _0x515e37=_0x1d12ee[_0x3d883f];for(const _0x455db9 of Object['keys'](_0x515e37['diffData']))if(_0x515e37['diffData'][_0x455db9]['attachChange']){const _0x4bb927=_0x515e37['diffData'][_0x455db9]['attachChange'];_0x4bb927['isAttached']?(_0x281ff8['add'](_0x455db9),_0x3d24cb['has'](_0x455db9)&&_0x3d24cb['get'](_0x455db9)['userId']==_0x4bb927['userId']?_0x3d24cb['delete'](_0x455db9):_0x3d24cb['set'](_0x455db9,_0x4bb927)):_0x3d24cb['has'](_0x455db9)?(_0x281ff8['delete'](_0x455db9),_0x3d24cb['delete'](_0x455db9)):(_0x281ff8['add'](_0x455db9),_0x3d24cb['set'](_0x455db9,_0x4bb927));}else _0x281ff8['add'](_0x455db9);}for(const _0x153135 of _0x281ff8){const _0x4b0187=_0x3d24cb['has'](_0x153135)&&!_0x3d24cb['get'](_0x153135)['isAttached'];let _0x2b16f4=_0x4b0187?_0x1d12ee['length']-0x1:0x0;const _0x56ac01=_0x4b0187?-0x1:0x1;for(;_0x1d12ee[_0x2b16f4];){const _0x24f622=_0x1d12ee[_0x2b16f4];if(_0x24f622['diffData'][_0x153135]){const _0x47e162=_0x4b0187?_0x24f622['diffData'][_0x153135]['attributesBefore']:_0x24f622['diffData'][_0x153135]['attributesAfter'];_0x1f3c7e['attributes'][_0x153135]=_0x47e162?_0x1f8919(_0x47e162):{};break;}_0x2b16f4+=_0x56ac01;}}for(const _0x5cd02b of _0x1d12ee){_0x5cd02b['model']={};for(const _0x427cbb of _0x5cd02b['authors'])_0x1d4250['set'](_0x427cbb['id'],_0x427cbb);for(const _0x1cd772 of _0x281ff8){const _0x3c4281=_0x5cd02b['diffData'][_0x1cd772]?_0x5cd02b['diffData'][_0x1cd772]['insertions']:'[]',_0x5a5e99=_0x5cd02b['diffData'][_0x1cd772]?_0x5cd02b['diffData'][_0x1cd772]['deletions']:'[]';_0x5cd02b['model'][_0x1cd772]={'insertions':this['_utils']['_makeModelFromViewString'](_0x3c4281),'deletions':this['_utils']['_makeModelFromViewString'](_0x5a5e99)};}}for(const _0x45f6c9 of _0x281ff8){let _0x356a8d=null,_0x2430a3=0x0;const _0x14e6d4=new Map(Array['from'](_0x1e7941['model'][_0x45f6c9]['insertions']['markers'])['filter'](([_0x376447])=>!_0x376447['startsWith']('revision:')));let _0xffa9db=0x0;for(const _0x3ddf23 of _0x1d12ee){const _0x15c10e=this['_makeTape'](_0x3ddf23['model'][_0x45f6c9]['insertions']);_0x3ddf23==_0x1e7941?(_0x356a8d=_0x15c10e,_0x2430a3=_0x356a8d['length'],_0x356a8d['forEach'](_0x1f2f58=>{_0x1f2f58['id']=_0xffa9db++;}),this['_processTape'](_0x356a8d)):this['_markInsertions'](_0x356a8d,_0x15c10e);const _0x254cc6=_0x356a8d['filter'](_0x36469b=>!_0x36469b['isAdded'])['map'](_0x3af20f=>_0x3af20f['id']);let _0x26623a=0x0;const _0xb2af29=this['_makeTape'](_0x3ddf23['model'][_0x45f6c9]['deletions']);_0xb2af29['forEach'](_0x3476c4=>{_0x3476c4['isRemoved']?_0x3476c4['id']=_0x2430a3++:_0x3476c4['id']=_0x254cc6[_0x26623a++];}),this['_processTape'](_0xb2af29),this['_setDistance'](_0x356a8d,'isAdded'),this['_setDistance'](_0xb2af29,'isRemoved'),_0x3ddf23==_0x1e7941&&this['_markMarkers'](_0x356a8d,_0x14e6d4),_0x356a8d=this['_joinTapes'](_0x356a8d,_0xb2af29),this['_refreshStartEndIndex'](_0x356a8d),this['_setDistance'](_0x356a8d,'isRemoved');}_0x356a8d=_0x356a8d['filter'](_0x2532b1=>!(_0x2532b1['isAdded']&&_0x2532b1['isRemoved']));const _0x5adafd=new Map(_0x2d1f6a['model'][_0x45f6c9]['deletions']['markers']),_0x3c679a=new Set(_0x14e6d4['keys']());for(const _0x7e46ed of _0x5adafd['keys']())_0x3c679a['delete'](_0x7e46ed);this['_markSuggestions'](_0x356a8d,_0x3c679a),this['_fixObsoleteTags'](_0x356a8d),_0x356a8d=this['_removeMissingPairs'](_0x356a8d),_0x356a8d=this['_markMismatchedRemovedTags'](_0x356a8d),_0x356a8d=this['_removeUnsupportedChanges'](_0x356a8d);const {root:_0x55f2cc,changes:_0x395b3a}=this['_makeModelFromTape'](_0x356a8d,_0x1d4250,_0x45f6c9);_0x1f3c7e['model'][_0x45f6c9]=_0x55f2cc;const _0x50418c=_0x3d24cb['get'](_0x45f6c9);if(_0x50418c){const _0x53a7fc=_0x1d4250['get'](_0x50418c['userId']),_0x375299=new G({'author':_0x53a7fc,'type':_0x50418c['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x45f6c9});_0x395b3a['unshift'](_0x375299),_0x1f3c7e['attributes'][_0x45f6c9]['revisionHistoryAttachChange']=_0x375299['id'];}_0x1f3c7e['changes']=_0x1f3c7e['changes']['concat'](_0x395b3a);}return _0x1f3c7e;}['_markMarkers'](_0x1708e4,_0x38fe7e){for(let _0x4236ff=0x0;_0x4236ff<_0x1708e4['length'];_0x4236ff++)for(const [_0x27f656,_0x4cc38a]of _0x38fe7e)!_0x4cc38a['isCollapsed']&&_0x4cc38a['start']['isEqual'](_0x1708e4[_0x4236ff]['previousPosition'])&&_0x1708e4[_0x4236ff]['markersStart']['push'](_0x27f656),_0x4cc38a['end']['isEqual'](_0x1708e4[_0x4236ff]['nextPosition'])&&_0x1708e4[_0x4236ff]['markersEnd']['push'](_0x27f656);}['_joinTapes'](_0x3598bc,_0x2ed7d7){let _0x5d7b6a=[],_0x4682f3=0x0,_0x248df7=0x0;for(;_0x4682f3<_0x3598bc['length']||_0x248df7<_0x2ed7d7['length'];){const _0xca7af7=_0x3598bc[_0x4682f3]||{},_0x529ab6=_0x2ed7d7[_0x248df7]||{};if(_0xca7af7['id']==_0x529ab6['id'])_0x4682f3++,_0x248df7++,_0x5d7b6a['push'](_0xca7af7);else{if(_0x529ab6['isRemoved']&&_0xca7af7['isAdded']){const {commonTape:_0x57a2c5,iEnd:_0x4e0e7a,jEnd:_0x5061b2}=this['_threeWayMerge'](_0x3598bc,_0x4682f3,_0x2ed7d7,_0x248df7);_0x5d7b6a=_0x5d7b6a['concat'](_0x57a2c5),_0x4682f3=_0x4e0e7a,_0x248df7=_0x5061b2;}else _0x529ab6['isRemoved']?(_0x248df7++,_0x5d7b6a['push'](_0x529ab6)):(_0x4682f3++,_0x5d7b6a['push'](_0xca7af7));}}return _0x5d7b6a;}['_markSuggestions'](_0x39ec55,_0x26ca47){const _0x1f720a=[];for(let _0x1a1602=0x0;_0x1a1602<_0x39ec55['length'];_0x1a1602++){for(let _0x5436e1=0x0;_0x5436e1<_0x39ec55[_0x1a1602]['markersStart']['length'];_0x5436e1++){const _0x590843=_0x39ec55[_0x1a1602]['markersStart'][_0x5436e1];if(!_0x26ca47['has'](_0x590843))continue;const {group:_0x143327,type:_0x44089a,authorId:_0x334d71}=_0x4de535(_0x590843);'revision-suggestion'!=_0x143327||'insertion'!=_0x44089a&&'deletion'!=_0x44089a||(_0x1f720a['unshift']({'type':_0x44089a,'name':_0x590843,'userId':_0x334d71}),_0x39ec55[_0x1a1602]['markersStart']['splice'](_0x5436e1,0x1),_0x5436e1--);}_0x23c715(_0x39ec55[_0x1a1602]);for(let _0x274aa5=0x0;_0x274aa5<_0x39ec55[_0x1a1602]['markersEnd']['length'];_0x274aa5++){const _0x18ba08=_0x39ec55[_0x1a1602]['markersEnd'][_0x274aa5];if(!_0x26ca47['has'](_0x18ba08))continue;const {group:_0x3dccfc,type:_0xa8a512}=_0x4de535(_0x18ba08);if('revision-suggestion'!=_0x3dccfc||'insertion'!=_0xa8a512&&'deletion'!=_0xa8a512)continue;_0x39ec55[_0x1a1602]['markersEnd']['splice'](_0x274aa5,0x1),_0x274aa5--;const _0x299f0e=_0x1f720a['findIndex'](_0x51051a=>_0x51051a['name']==_0x18ba08);_0x299f0e>-0x1&&_0x1f720a['splice'](_0x299f0e,0x1);}}function _0x4de535(_0x19f0d4){const _0x38ab3b=_0x19f0d4['split'](':');return{'group':_0x38ab3b[0x0],'type':_0x38ab3b[0x1],'subType':_0x38ab3b['length']>=0x5?_0x38ab3b[0x2]:null,'id':_0x38ab3b['length']<0x5?_0x38ab3b[0x2]:_0x38ab3b[0x3],'authorId':_0x38ab3b['length']<0x5?_0x38ab3b[0x3]:_0x38ab3b[0x4],'markerCount':0x6==_0x38ab3b['length']?_0x38ab3b[0x5]:null};}function _0x23c715(_0x1b2d12){for(let _0x132d4c=0x0;_0x132d4c<_0x1f720a['length'];_0x132d4c++){if(_0x1b2d12['isAdded']&&'insertion'==_0x1f720a[_0x132d4c]['type']&&_0x1b2d12['isAdded']['userId']==_0x1f720a[_0x132d4c]['userId'])return _0x1b2d12['isAddSuggestion']=_0x1f720a[_0x132d4c],void delete _0x1b2d12['isAdded'];if(!_0x1b2d12['isAdded']&&!_0x1b2d12['isRemoved']&&'deletion'==_0x1f720a[_0x132d4c]['type'])return void(_0x1b2d12['isRemoveSuggestion']=_0x1f720a[_0x132d4c]);}}}['_setDistance'](_0x5bd6b6,_0x1ed951){let _0x56a095=0x0,_0x29a47b=!0x1;const _0x58201b=new Map();for(const _0x181ed3 of _0x5bd6b6)_0x181ed3[_0x1ed951]?_0x29a47b&&(_0x56a095++,_0x29a47b=!0x1):(_0x56a095++,_0x29a47b=!0x0),_0x58201b['set'](_0x181ed3['id'],_0x56a095);for(let _0x49f168=0x0;_0x49f168<_0x5bd6b6['length'];_0x49f168++){if('isRemoved'==_0x1ed951&&_0x5bd6b6[_0x49f168]['isAdded']||'isAdded'==_0x1ed951&&_0x5bd6b6[_0x49f168]['isRemoved'])continue;if('text'==_0x5bd6b6[_0x49f168]['type']){_0x5bd6b6[_0x49f168]['distance']=0x0;continue;}const _0x3ed375=_0x58201b['get'](_0x5bd6b6[_0x49f168]['pairId']),_0xa1af8=_0x58201b['get'](_0x5bd6b6[_0x49f168]['id']);_0x5bd6b6[_0x49f168]['distance']=_0x3ed375-_0xa1af8;}}['_getRevisionsRange'](_0x4d5833,_0x53ffde,_0x2dec5b=!0x1){const _0x17fae4=[];let _0x45f26b=this['repository']['getIndex'](_0x4d5833),_0x1e0cb8=this['repository']['getIndex'](_0x53ffde);for(-0x1==_0x1e0cb8&&(_0x1e0cb8=this['repository']['_revisions']['length'],_0x2dec5b=!0x1);_0x45f26b<_0x1e0cb8;)_0x17fae4['push'](this['repository']['getRevision'](_0x45f26b)),_0x45f26b++;return _0x2dec5b&&_0x17fae4['push'](this['repository']['getRevision'](_0x45f26b)),_0x17fae4;}['_threeWayMerge'](_0x184787,_0x3d6eb4,_0x1ba95a,_0x5ce38a){const _0x3331c3=this['editor']['model']['schema'];let _0x1539a5=_0x3d6eb4;for(;_0x184787[_0x1539a5]&&_0x184787[_0x1539a5]['isAdded'];)_0x1539a5++;let _0x1efa74=_0x5ce38a;for(;_0x1ba95a[_0x1efa74]&&_0x1ba95a[_0x1efa74]['isRemoved'];)_0x1efa74++;_0x1e31d4(_0x184787,_0x3d6eb4,_0x1539a5),_0x1e31d4(_0x1ba95a,_0x5ce38a,_0x1efa74);const _0x4bc80d=_0x1ba95a['slice'](_0x5ce38a,_0x1efa74)['concat'](_0x184787['slice'](_0x3d6eb4,_0x1539a5));return _0x4bc80d['sort']((_0x2533e8,_0x3e11a4)=>_0x2533e8['side']!=_0x3e11a4['side']?_0x2533e8['side']-_0x3e11a4['side']:_0x2533e8['level']!=_0x3e11a4['level']?_0x2533e8['level']-_0x3e11a4['level']:_0x2533e8['distance']!=_0x3e11a4['distance']?_0x3e11a4['distance']-_0x2533e8['distance']:!!_0x2533e8['isAdded']!=!!_0x3e11a4['isAdded']?-0x1==_0x2533e8['side']||0x0==_0x2533e8['side']?_0x2533e8['isAdded']?-0x1:0x1:_0x2533e8['isAdded']?0x1:-0x1:_0x2533e8['index']-_0x3e11a4['index']),{'commonTape':_0x4bc80d,'iEnd':_0x1539a5,'jEnd':_0x1efa74};function _0x1e31d4(_0x676597,_0x36b73f,_0x11940a){let _0x1830bb=-0x1,_0x4b9a1f=Number['POSITIVE_INFINITY'],_0x212f08=!0x0;for(let _0x427cca=_0x36b73f;_0x427cca<_0x11940a;_0x427cca++)if(_0x3331c3['isInline'](_0x676597[_0x427cca]['item'])||(_0x212f08=!0x1),_0x676597[_0x427cca]['item']['startIndex']<_0x36b73f&&(_0x1830bb=_0x427cca),_0x676597[_0x427cca]['item']['endIndex']>=_0x11940a){_0x4b9a1f=_0x427cca;break;}_0x212f08&&(_0x1830bb=_0x11940a-0x1);for(let _0x50823b=_0x36b73f;_0x50823b<_0x11940a;_0x50823b++)_0x676597[_0x50823b]['side']=_0x50823b<=_0x1830bb?-0x1:_0x50823b<_0x4b9a1f?0x0:0x1,_0x676597[_0x50823b]['index']=_0x50823b;let _0x463021=0x0;for(let _0x26f22e=_0x36b73f;_0x26f22e<=_0x1830bb;_0x26f22e++)0x0==_0x676597[_0x26f22e]['distance']?_0x676597[_0x26f22e]['level']=_0x463021:(_0x463021++,_0x676597[_0x26f22e]['level']=_0x463021,_0x463021++);for(let _0x5600d3=_0x36b73f;_0x5600d3<_0x11940a;_0x5600d3++)0x0==_0x676597[_0x5600d3]['side']&&(_0x676597[_0x5600d3]['level']=_0x463021);_0x463021=0x0;for(let _0x4e4dd0=_0x11940a-0x1;_0x4e4dd0>=_0x4b9a1f;_0x4e4dd0--)0x0==_0x676597[_0x4e4dd0]['distance']?_0x676597[_0x4e4dd0]['level']=_0x463021:(_0x463021--,_0x676597[_0x4e4dd0]['level']=_0x463021,_0x463021--);}}['_fixObsoleteTags'](_0x3074c3){const _0xa03a3a=new Map(),_0x2b25ff=this['editor']['model']['schema'];for(let _0x3a93c8=0x1;_0x3a93c8<_0x3074c3['length'];_0x3a93c8++){let _0x398e45,_0x262f9a,_0x38f03d;const _0x27b1e9=_0x3074c3[_0x3a93c8],_0x44b328=_0x3074c3[_0x3a93c8-0x1];if('text'==_0x27b1e9['type'])continue;if(_0x27b1e9['type']!=_0x44b328['type'])continue;if(!_0x2b25ff['isBlock'](_0x44b328['item'])||_0x2b25ff['isLimit'](_0x44b328['item']))continue;if(!_0x2b25ff['isBlock'](_0x27b1e9['item'])||_0x2b25ff['isLimit'](_0x27b1e9['item']))continue;if((_0x3074c3[_0x3a93c8]['isAdded']||_0x3074c3[_0x3a93c8]['isAddSuggestion'])&&_0x3074c3[_0x3a93c8-0x1]['isRemoved'])_0x398e45=_0x3074c3[_0x3a93c8],_0x262f9a=_0x3074c3[_0x3a93c8-0x1],_0x38f03d=_0x3a93c8-0x1;else{if(!_0x3074c3[_0x3a93c8]['isRemoved']||!_0x3074c3[_0x3a93c8-0x1]['isAdded']&&!_0x3074c3[_0x3a93c8-0x1]['isAddSuggestion'])continue;_0x398e45=_0x3074c3[_0x3a93c8-0x1],_0x262f9a=_0x3074c3[_0x3a93c8],_0x38f03d=_0x3a93c8;}const _0x59268d=_0x398e45['level']==_0x262f9a['level'],_0x5920ff=Math['abs'](_0x398e45['level'])<Math['abs'](_0x262f9a['level'])&&0x0==_0x262f9a['distance'];(_0x59268d||_0x5920ff)&&(_0xa03a3a['set'](_0x262f9a['id'],_0x398e45['id']),_0x3074c3['splice'](_0x38f03d,0x1),_0x3a93c8--,_0x398e45['isAdded']=!0x1);}for(let _0x26aa4d=0x0;_0x26aa4d<_0x3074c3['length'];_0x26aa4d++)_0xa03a3a['has'](_0x3074c3[_0x26aa4d]['pairId'])&&(_0x3074c3[_0x26aa4d]['pairId']=_0xa03a3a['get'](_0x3074c3[_0x26aa4d]['pairId']));}['_removeMissingPairs'](_0x28c61a){const _0x545c6c=new Set(_0x28c61a['map'](_0x3640c7=>_0x3640c7['id']));for(let _0x2485a8=0x0;_0x2485a8<_0x28c61a['length'];_0x2485a8++)_0x545c6c['has'](_0x28c61a[_0x2485a8]['pairId'])||0x0==_0x28c61a[_0x2485a8]['distance']||(_0x28c61a[_0x2485a8]['isIncorrect']=!0x0);return _0x28c61a['filter'](_0x61e738=>!_0x61e738['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3793d5){const _0x3cc74c=new Set();for(let _0x35bad8=0x0;_0x35bad8<_0x3793d5['length'];_0x35bad8++){if(_0x3cc74c['has'](_0x3793d5[_0x35bad8]['id'])&&_0x3793d5[_0x35bad8]['isRemoved']&&(_0x3793d5[_0x35bad8]['isIncorrect']=!0x0),_0x3793d5[_0x35bad8]['isIncorrect'])continue;if(0x0==_0x3793d5[_0x35bad8]['distance'])continue;if('elementStart'!=_0x3793d5[_0x35bad8]['type'])continue;if(null==_0x3793d5[_0x35bad8]['pairId'])continue;let _0x1aaac6=_0x35bad8+0x1,_0x582701=0x0;for(;_0x3793d5[_0x1aaac6]['id']!=_0x3793d5[_0x35bad8]['pairId'];)'elementStart'==_0x3793d5[_0x1aaac6]['type']?_0x582701++:'elementEnd'==_0x3793d5[_0x1aaac6]['type']&&_0x582701--,_0x1aaac6++;if(0x0!=_0x582701){if(_0x3793d5[_0x35bad8]['isRemoved'])_0x3793d5[_0x35bad8]['isIncorrect']=!0x0;else{for(;_0x1aaac6!=_0x35bad8;)_0x3793d5[_0x1aaac6]['isRemoved']&&0x0!=_0x3793d5[_0x1aaac6]['distance']&&(_0x3793d5[_0x1aaac6]['isIncorrect']=!0x0,_0x3cc74c['add'](_0x3793d5[_0x1aaac6]['pairId'])),_0x1aaac6--;}}}return _0x3793d5['filter'](_0x202cd6=>!_0x202cd6['isIncorrect']);}['_removeUnsupportedChanges'](_0x272793){const _0xf92308=this['editor']['model']['schema'];for(let _0xb93b15=0x0;_0xb93b15<_0x272793['length'];_0xb93b15++){if(!(_0x272793[_0xb93b15]['isAdded']||_0x272793[_0xb93b15]['isAddSuggestion']||_0x272793[_0xb93b15]['isRemoved']||_0x272793[_0xb93b15]['isRemoveSuggestion']))continue;if(0x0==_0x272793[_0xb93b15]['distance'])continue;const _0x2aaa6d=_0x272793[_0xb93b15]['item'];_0xf92308['isBlock'](_0x2aaa6d)||_0xf92308['isLimit'](_0x2aaa6d)||(_0x272793[_0xb93b15]['isAdded']&&delete _0x272793[_0xb93b15]['isAdded'],_0x272793[_0xb93b15]['isAddSuggestion']&&delete _0x272793[_0xb93b15]['isAddSuggestion'],_0x272793[_0xb93b15]['isRemoveSuggestion']&&delete _0x272793[_0xb93b15]['isRemoveSuggestion'],_0x272793[_0xb93b15]['isRemoved']&&(_0x272793[_0xb93b15]['isIncorrect']=!0x0));}return _0x272793['filter'](_0x43105d=>!_0x43105d['isIncorrect']);}['_makeModelFromTape'](_0x37c963,_0x481418,_0x1aecee){const _0x4bb0e2=new _0x1753c2(),_0x53dce7=[],_0x3861c3=new Map(),_0x3084a3=this['editor']['model'],_0x3d30ca=_0x3084a3['schema'],_0x11cc7a=[_0x4bb0e2],_0x178af0={},_0x4ad5e6={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x3881a8=null;const _0x825dd7=[0x0];for(let _0x3368d3=0x0;_0x3368d3<_0x37c963['length'];_0x3368d3++)if('elementStart'===_0x37c963[_0x3368d3]['type']){_0x37c963[_0x3368d3]['previousPosition']=_0x3084a3['createPositionFromPath'](_0x4bb0e2,_0x825dd7);const _0x3f7543=new _0x41b3fc(_0x37c963[_0x3368d3]['item']['name'],_0x37c963[_0x3368d3]['item']['getAttributes']());_0x11cc7a[0x0]['_appendChild'](_0x3f7543),_0x825dd7['push'](0x0),_0x11cc7a['unshift'](_0x3f7543),_0x37c963[_0x3368d3]['nextPosition']=_0x3084a3['createPositionFromPath'](_0x4bb0e2,_0x825dd7);}else'elementEnd'===_0x37c963[_0x3368d3]['type']?(_0x11cc7a['shift'](),_0x37c963[_0x3368d3]['previousPosition']=_0x3084a3['createPositionFromPath'](_0x4bb0e2,_0x825dd7),_0x825dd7['pop'](),_0x825dd7[_0x825dd7['length']-0x1]++,_0x37c963[_0x3368d3]['nextPosition']=_0x3084a3['createPositionFromPath'](_0x4bb0e2,_0x825dd7)):(_0x37c963[_0x3368d3]['previousPosition']=_0x3084a3['createPositionFromPath'](_0x4bb0e2,_0x825dd7),_0x3881a8?_0x3881a8['_data']+=_0x37c963[_0x3368d3]['item']['data']:_0x3881a8=new _0x3e2046(_0x37c963[_0x3368d3]['item']['data'],_0x37c963[_0x3368d3]['item']['getAttributes']()),_0x37c963[_0x3368d3+0x1]&&'text'===_0x37c963[_0x3368d3+0x1]['type']&&_0x4b1e0e(_0x3881a8,_0x37c963[_0x3368d3+0x1]['item'])||(_0x11cc7a[0x0]['_appendChild'](_0x3881a8),_0x3881a8=null),_0x825dd7[_0x825dd7['length']-0x1]+=_0x37c963[_0x3368d3]['item']['offsetSize'],_0x37c963[_0x3368d3]['nextPosition']=_0x3084a3['createPositionFromPath'](_0x4bb0e2,_0x825dd7));for(let _0x5201b0=0x0;_0x5201b0<_0x37c963['length'];_0x5201b0++){const _0x203eeb=_0x37c963[_0x5201b0]['previousPosition'],_0x297d0b=_0x37c963[_0x5201b0]['nextPosition'];for(const _0x3e2ebe of _0x37c963[_0x5201b0]['markersStart'])_0x3861c3['set'](_0x3e2ebe,{'start':_0x203eeb,'end':null});_0x564fb4('isRemoveSuggestion',_0x5201b0,_0x203eeb,_0x297d0b),_0x564fb4('isAddSuggestion',_0x5201b0,_0x203eeb,_0x297d0b),_0x564fb4('isRemoved',_0x5201b0,_0x203eeb,_0x297d0b),_0x564fb4('isAdded',_0x5201b0,_0x203eeb,_0x297d0b);for(const _0xdcf3dc of _0x37c963[_0x5201b0]['markersEnd']){const _0x32977f=_0x3861c3['get'](_0xdcf3dc);_0x32977f?_0x32977f['end']=_0x297d0b:_0x3861c3['set'](_0xdcf3dc,{'start':_0x297d0b,'end':_0x297d0b});}}for(const [_0x4597b9,_0x1748e1]of _0x3861c3){const _0x4271e1=this['editor']['model']['createRange'](_0x1748e1['start'],_0x1748e1['end']);_0x4bb0e2['markers']['set'](_0x4597b9,_0x4271e1);}return _0x53dce7['sort']((_0x533967,_0x3aff2e)=>{const _0x1b0f28=_0x4bb0e2['markers']['get']('revision:'+_0x533967['id']),_0x4b5bcb=_0x4bb0e2['markers']['get']('revision:'+_0x3aff2e['id']);return _0x1b0f28['start']['isBefore'](_0x4b5bcb['start'])?-0x1:_0x1b0f28['start']['isAfter'](_0x4b5bcb['start'])?0x1:_0x1b0f28['end']['isBefore'](_0x4b5bcb['end'])?-0x1:_0x1b0f28['end']['isAfter'](_0x4b5bcb['end'])?0x1:'add'===_0x533967['type']?-0x1:0x1;}),{'root':_0x4bb0e2,'changes':_0x53dce7};function _0x564fb4(_0x426285,_0x4d510d,_0x4231e3,_0x4ba862){const _0xfdbfc7=!!_0x37c963[_0x4d510d][_0x426285],_0x38f34e=_0xfdbfc7?_0x37c963[_0x4d510d][_0x426285]['userId']:null,_0x417e02=_0x4d510d===_0x37c963['length']-0x1,_0x2d46a6=_0x4ad5e6[_0x426285][0x0],_0x358c6a=_0x3d30ca['isObject'](_0x37c963[_0x4d510d]['item']);!_0x178af0[_0x426285]&&_0xfdbfc7?_0x178af0[_0x426285]={'start':_0x4231e3,'tapeItem':_0x37c963[_0x4d510d],'userId':_0x38f34e,'type':_0x426285}:_0x178af0[_0x426285]&&!_0xfdbfc7?(_0x178af0[_0x426285]['end']=_0x4231e3,_0xb9a0(_0x178af0[_0x426285]),_0x178af0[_0x426285]=null):_0x178af0[_0x426285]&&_0xfdbfc7&&_0x178af0[_0x426285]['userId']!==_0x38f34e&&(_0x178af0[_0x426285]['end']=_0x4231e3,_0x2d46a6&&_0x2d46a6['userId']===_0x178af0[_0x426285]['userId']||_0xb9a0(_0x178af0[_0x426285]),_0x178af0[_0x426285]={'start':_0x4231e3,'tapeItem':_0x37c963[_0x4d510d],'userId':_0x38f34e,'type':_0x426285}),_0x178af0[_0x426285]&&_0x358c6a&&('elementStart'!==_0x37c963[_0x4d510d]['type']||_0x2d46a6&&_0x2d46a6['userId']===_0x38f34e||_0x4ad5e6[_0x426285]['unshift']({'userId':_0x38f34e,'object':_0x37c963[_0x4d510d]['item'],'change':_0x178af0[_0x426285]}),'elementEnd'===_0x37c963[_0x4d510d]['type']&&_0x2d46a6&&_0x2d46a6['object']===_0x37c963[_0x4d510d]['item']&&(_0x4ad5e6[_0x426285]['shift'](),_0x178af0[_0x426285]=_0x2d46a6['change'])),_0x178af0[_0x426285]&&_0x417e02&&(_0x178af0[_0x426285]['end']=_0x4ba862,_0xb9a0(_0x178af0[_0x426285]),_0x178af0[_0x426285]=null);}function _0xb9a0({start:_0x580fbe,end:_0x358ce7,tapeItem:_0x596f2a,userId:_0x5b2cd7,type:_0x65f6b7}){const _0x2a19e7=_0x596f2a['item'],_0x22d241=_0x3084a3['schema']['isBlock'](_0x2a19e7)&&!_0x3084a3['schema']['isLimit'](_0x2a19e7),_0x56f35f=_0x580fbe['nodeAfter']==_0x358ce7['parent']&&_0x358ce7['isAtStart'];if(_0x22d241&&_0x56f35f)return;const _0x3bef6f=_0x3084a3['createRange'](_0x580fbe,_0x358ce7),_0x542a77=_0x481418['get'](_0x5b2cd7),_0xd15705=new G({'author':_0x542a77,'type':'isAdded'==_0x65f6b7||'isAddSuggestion'==_0x65f6b7?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x65f6b7||'isRemoveSuggestion'==_0x65f6b7},'createdAt':new Date(),'rootName':_0x1aecee});_0x53dce7['push'](_0xd15705),_0x4bb0e2['markers']['set']('revision:'+_0xd15705['id'],_0x3bef6f);}function _0x4b1e0e(_0x34c03b,_0x48710c){const _0xa8b47e=_0x34c03b['getAttributes'](),_0x3e94ad=_0x48710c['getAttributes']();for(const _0x5aeeb0 of _0xa8b47e){if(_0x5aeeb0[0x1]!==_0x48710c['getAttribute'](_0x5aeeb0[0x0]))return!0x1;_0x3e94ad['next']();}return _0x3e94ad['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xa7d011=>{const _0x574afa=_0xa7d011['markerName']['split'](':')[0x1],_0x52eb83=this['_getChangeFromId'](_0x574afa);if(!_0x52eb83)return null;const _0x29000c='add'==_0x52eb83['type']?'insertion':'deletion',_0x3762a8=['ck-suggestion-marker','ck-suggestion-marker-'+_0x29000c];return _0x52eb83['data']['isSuggestion']&&_0x3762a8['push']('ck-suggestion-marker-'+_0x29000c+'-new'),this['activeChange']==_0x52eb83&&_0x3762a8['push']('ck-suggestion-marker--active'),{'classes':_0x3762a8,'attributes':{'data-change-id':_0x574afa}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x561eeb=>{_0x561eeb['on']('element:pre',(_0x1d0e06,_0x2b1c93,_0x384ab2)=>{const _0x4be362=_0x2b1c93['viewItem']['getChild'](0x0);if(!_0x4be362||!_0x4be362['is']('element','code'))return;if(!_0x384ab2['consumable']['consume'](_0x4be362,{'attributes':['vid_start','vid_end']}))return;const _0x10184d=_0x2b1c93['modelRange']['start']['nodeAfter'];_0x384ab2['writer']['setAttribute']('vid_start',_0x4be362['getAttribute']('vid_start'),_0x10184d),_0x384ab2['writer']['setAttribute']('vid_end',_0x4be362['getAttribute']('vid_end'),_0x10184d);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x57b38c=>{_0x57b38c['on']('element',(_0x39fb2f,_0x11c88a,_0x229eb0)=>{if(!_0x229eb0['consumable']['consume'](_0x11c88a['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x11c88a['modelRange']['isCollapsed'])return;const _0x2e1690=_0x11c88a['modelRange']['start']['nodeAfter'];_0x2e1690['hasAttribute']('vid_start')||_0x2e1690['hasAttribute']('vid')||(_0x229eb0['writer']['setAttribute']('vid_start',_0x11c88a['viewItem']['getAttribute']('vid_start'),_0x2e1690),_0x229eb0['writer']['setAttribute']('vid_end',_0x11c88a['viewItem']['getAttribute']('vid_end'),_0x2e1690));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1a788e=>_0x1a788e['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0xcb89c9,[,_0xe01617])=>{['vid_start','vid_end','vid']['includes'](_0xe01617)&&(_0xcb89c9['return']=!0x0,_0xcb89c9['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x363555=>{_0x363555['on']('attribute:vid',(_0x105497,_0x1122dd,_0x3feba4)=>{if('\x20'!=_0x1122dd['item']['data']||_0x1122dd['item']['parent']['maxOffset']>0x1)return;if(!_0x3feba4['consumable']['consume'](_0x1122dd['item'],_0x105497['name']))return;const _0x314360=_0x3feba4['writer'],_0x5e94e7=_0x3feba4['mapper']['toViewRange'](_0x1122dd['range']);_0x314360['wrap'](_0x5e94e7,_0x314360['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x3d05c7){const _0x2d86b3=_0x3d05c7['plugins']['get']('RevisionViewer');return(_0x37ed08,_0x23064e,_0x12d609)=>{const _0x46026d=_0x23064e['markerName']['split'](':')[0x1],_0x16749e=_0x2d86b3['_getChangeFromId'](_0x46026d);if(!_0x16749e)return null;const _0x30db0b='add'==_0x16749e['type']?'split':'merge';if(!_0x12d609['consumable']['test'](_0x23064e['markerRange'],_0x37ed08['name']))return;const _0x146887=_0x23064e['markerRange']['getWalker'](),_0xc8ab05=_0x23064e['markerRange']['start'],_0x315330=_0x3d05c7['model']['schema'];let _0x178cd2=null,_0x29e7f7=null,_0xa2e407=!0x1,_0x344dd8=!0x1;for(const _0x204d64 of _0x146887){const _0x3c1521=_0x204d64['item'];_0xa2e407=_0xa2e407||_0x315330['isContent'](_0x3c1521);const _0x32ed8c=_0x12d609['mapper']['toViewElement'](_0x3c1521);if(_0x32ed8c&&_0x32ed8c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x204d64['type']&&(_0x315330['isBlock'](_0x3c1521)&&!_0x315330['isLimit'](_0x3c1521)&&(_0x3c1521['nextSibling']||_0xc8ab05['isAtEnd']?_0x178cd2&&_0x178cd2['parent']==_0x3c1521||(_0x178cd2=_0x3c1521,_0xb3b76c(_0x204d64['previousPosition']),_0x344dd8=!0x0):_0x29e7f7=_0x29e7f7||_0x204d64['previousPosition']));}function _0xb3b76c(_0x32b79d){const _0x34a74a=_0x12d609['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x30db0b}),_0x420a1f=_0x12d609['mapper']['toViewPosition'](_0x32b79d);_0x16749e['data']['isSuggestion']&&_0x12d609['writer']['addClass']('ck-suggestion-marker-'+_0x30db0b+'-new',_0x34a74a),_0x2d86b3['activeChange']==_0x16749e&&_0x12d609['writer']['addClass']('ck-suggestion-marker--active',_0x34a74a),_0x12d609['writer']['insert'](_0x420a1f,_0x34a74a),_0x12d609['mapper']['bindElementToMarker'](_0x34a74a,_0x23064e['markerName']);}_0xa2e407||_0x344dd8||!_0x29e7f7||_0xb3b76c(_0x29e7f7);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x456785,_0x24c4fe,_0x59fc71)=>{const _0x227339=_0x59fc71['mapper']['markerNameToElements'](_0x24c4fe['markerName']);if(_0x227339){for(const _0x177317 of _0x227339)(_0x177317['hasClass']('ck-suggestion-marker-split')||_0x177317['hasClass']('ck-suggestion-marker-merge'))&&(_0x59fc71['mapper']['unbindElementFromMarkerName'](_0x177317,_0x24c4fe['markerName']),_0x59fc71['writer']['remove'](_0x177317));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x2024f5,_0x1c3a1e,_0x4aedd1)=>{const _0x12555f=_0x1c3a1e['markerName']['split'](':')[0x1],_0x12a8a5=this['_getChangeFromId'](_0x12555f);if(!_0x12a8a5)return null;const _0x4fe1ce='add'==_0x12a8a5['type']?'split':'merge';if(_0x4aedd1['consumable']['test'](_0x1c3a1e['markerRange'],_0x2024f5['name']))for(const _0x56570f of _0x1c3a1e['markerRange']['getItems']()){if(!_0x56570f['is']('element','softBreak'))continue;const _0x3272aa=_0x4aedd1['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4fe1ce}),_0x235967=_0x4aedd1['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x56570f));_0x12a8a5['data']['isSuggestion']&&_0x4aedd1['writer']['addClass']('ck-suggestion-marker-'+_0x4fe1ce+'-new',_0x3272aa),this['activeChange']==_0x12a8a5&&_0x4aedd1['writer']['addClass']('ck-suggestion-marker--active',_0x3272aa),_0x4aedd1['writer']['insert'](_0x235967,_0x3272aa),_0x4aedd1['mapper']['bindElementToMarker'](_0x3272aa,_0x1c3a1e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x115b7a=>{for(const _0x2ea9c9 of this['editor']['model']['document']['getRootNames']()){const _0x3f43eb=this['editor']['model']['document']['getRoot'](_0x2ea9c9),_0x979dce=this['editor']['editing']['view']['document']['getRoot'](_0x2ea9c9);if(_0x979dce){const _0x1775d6=_0x3f43eb['getAttribute']('revisionHistoryAttachChange');if(_0x115b7a['removeAttribute']('data-change-id',_0x979dce),_0x115b7a['removeClass']('ck-revision-history-root-add',_0x979dce),_0x115b7a['removeClass']('ck-revision-history-root-remove',_0x979dce),_0x115b7a['removeClass']('ck-revision-history-root--active',_0x979dce),_0x1775d6){const _0x269bd8=this['_getChangeFromId'](_0x1775d6);if(!_0x269bd8)return null;_0x115b7a['setAttribute']('data-change-id',_0x1775d6,_0x979dce),_0x115b7a['addClass']('ck-revision-history-root-'+_0x269bd8['type'],_0x979dce),this['activeChange']==_0x269bd8&&_0x115b7a['addClass']('ck-revision-history-root--active',_0x979dce);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xca577=>'revision-comment:'+_0xca577,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1ff1d3=>'revision-suggestion:'+_0x1ff1d3,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3501c3=>({'name':'suggestion:'+_0x3501c3,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x453f9d=>{const _0x3ffcb7=_0x453f9d['markerName']['split'](':')[0x1];return'insertion'!=_0x3ffcb7&&'deletion'!=_0x3ffcb7?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3ffcb7]};}}),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',(_0x364ea4,_0x574ae4,_0x41e2dc)=>{const _0x141114=_0x41e2dc['mapper']['markerNameToElements'](_0x574ae4['markerName']);if(_0x141114){for(const _0x10e101 of _0x141114)_0x10e101['is']('uiElement')&&(_0x41e2dc['mapper']['unbindElementFromMarkerName'](_0x10e101,_0x574ae4['markerName']),_0x41e2dc['writer']['remove'](_0x10e101));}},{'priority':'high'});}['_getChangeFromId'](_0x370bb2){return this['_changeIdToChange']['get'](_0x370bb2);}['_getViewForChange'](_0x552c0f){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x552c0f),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x3e760a,_0x3d3d7e,_0x554c51,_0x42723b)=>{_0x42723b&&this['_balloon']['remove'](_0x42723b),_0x554c51&&(this['_balloon']['add']({'view':_0x554c51,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x30c891=this['editor']['editing'],_0x223bac=this['_getChangeFromId'](_0x554c51['changeId']);let _0x2240ae;if(_0x223bac['data']['isOnRoot']){const _0x41b4f9=_0x30c891['view']['getDomRoot'](_0x223bac['rootName']);_0x2240ae=Array['from'](_0x41b4f9['getClientRects']());}else{const _0x4e062c=this['editor']['model']['markers']['get']('revision:'+_0x554c51['changeId']);_0x2240ae=Array['from'](_0x30c891['mapper']['markerNameToElements'](_0x4e062c['name']))['map'](_0x19e86f=>_0x30c891['view']['domConverter']['mapViewToDom'](_0x19e86f))['map'](_0x520155=>Array['from'](_0x520155['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x2240ae[0x0];return _0x2240ae['find'](_0x15432d=>_0x15432d['top']-0x3<=this['_activeViewTarget']['y']&&_0x15432d['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x15432d['left']-0x3<=this['_activeViewTarget']['x']&&_0x15432d['right']+0x3>=this['_activeViewTarget']['x'])||_0x2240ae[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x48c72c,_0x4338cb,_0x207928,_0x9fc9bb)=>{this['activeView']=_0x207928?this['_getViewForChange'](_0x207928):null,this['editor']['model']['change'](()=>{const _0x410cdf=this['editor']['editing'];_0x9fc9bb&&(_0x9fc9bb['data']['isOnRoot']?_0x410cdf['view']['change'](_0x3af38a=>{_0x3af38a['removeClass']('ck-revision-history-root--active',_0x410cdf['view']['document']['getRoot'](_0x9fc9bb['rootName']));}):_0x410cdf['reconvertMarker']('revision:'+_0x9fc9bb['id'])),_0x207928&&(_0x207928['data']['isOnRoot']?_0x410cdf['view']['change'](_0x3ea736=>{_0x3ea736['addClass']('ck-revision-history-root--active',_0x410cdf['view']['document']['getRoot'](_0x207928['rootName']));}):_0x410cdf['reconvertMarker']('revision:'+_0x207928['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x29cde1,_0x30541e)=>{if(this['activeChange'])return;const _0x2ccc77=this['_findChangeIdFromDomTarget'](_0x30541e['target']),_0x6c36dd=this['_changeIdToChange']['get'](_0x2ccc77);_0x6c36dd?(this['_activeViewTarget']={'x':_0x30541e['domEvent']['x'],'y':_0x30541e['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x6c36dd)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x161592,_0x4dbed8)=>{const _0x1fdf41=this['_findChangeIdFromDomTarget'](_0x4dbed8['target']),_0x2d2c9b=this['_changeIdToChange']['get'](_0x1fdf41);_0x2d2c9b?(this['_activeViewTarget']={'x':_0x4dbed8['domEvent']['x'],'y':_0x4dbed8['domEvent']['y']},_0x2d2c9b===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2d2c9b):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x332fe7){do{const _0x179041=_0x332fe7['getAttribute']('data-change-id');if(_0x179041)return _0x179041;_0x332fe7=_0x332fe7['parent'];}while(_0x332fe7);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x39f503=>{for(const _0x1dec98 of this['editor']['model']['markers'])_0x39f503['removeMarker'](_0x1dec98);});}}function Q(_0xf43e58,_0x133ef2){return(_0x2c6ca7,_0x8992ce,_0x3e6007)=>{if(!_0x3e6007['consumable']['test'](_0x8992ce['markerRange'],_0x2c6ca7['name']))return;const _0x740a83=_0x8992ce['markerRange']['getWalker'](),_0x1723c9=_0x8992ce['markerRange']['start'],_0x582868=_0xf43e58['model']['schema'];let _0x4cf2d2=null,_0x3863ca=null,_0x1af59d=!0x1,_0xc070de=!0x1;for(const _0x140285 of _0x740a83){const _0x2a5d49=_0x140285['item'];_0x1af59d=_0x1af59d||_0x582868['isContent'](_0x2a5d49);const _0x4e7458=_0x3e6007['mapper']['toViewElement'](_0x2a5d49);if(_0x4e7458&&_0x4e7458['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x140285['type']&&(_0x582868['isBlock'](_0x2a5d49)&&!_0x582868['isLimit'](_0x2a5d49)&&(_0x2a5d49['nextSibling']||_0x1723c9['isAtEnd']?_0x4cf2d2&&_0x4cf2d2['parent']==_0x2a5d49||(_0x4cf2d2=_0x2a5d49,_0x5c1c38(_0x140285['previousPosition']),_0xc070de=!0x0):_0x3863ca=_0x3863ca||_0x140285['previousPosition']));}function _0x5c1c38(_0x491de5){const _0x4539a6=_0x3e6007['mapper']['toViewPosition'](_0x491de5),_0x10de46=_0x3e6007['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x133ef2});_0x3e6007['writer']['insert'](_0x4539a6,_0x10de46),_0x3e6007['mapper']['bindElementToMarker'](_0x10de46,_0x8992ce['markerName']);}_0x1af59d||_0xc070de||!_0x3863ca||_0x5c1c38(_0x3863ca);};}class nt extends _0x1e3043{constructor(_0x2cac55){super(_0x2cac55);const _0x130316=_0x2cac55['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x130316,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x130316,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4cf5a0=this['editor'],_0x4e66eb=_0x4cf5a0['plugins']['get'](u),_0x290050=_0x4e66eb['isReady']?_0x4e66eb['diff']['newRevisionId']:null;_0x4cf5a0['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x290050);}['refresh'](){const {isReady:_0x2948cb,isEnabled:_0x21fbe3,repository:_0x4dea4f,diff:_0x556654}=this['editor']['plugins']['get'](u),_0x1263b7=_0x556654&&_0x4dea4f['getLaterVisibleRevision'](_0x556654['newRevisionId']);this['isEnabled']=_0x2948cb&&_0x21fbe3&&Boolean(_0x1263b7);}}class rt extends _0x1e3043{['_step'];constructor(_0x1b2eac,{direction:_0x430005}){super(_0x1b2eac);const _0xa1e763=_0x1b2eac['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x430005?0x1:-0x1,this['listenTo'](_0xa1e763,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xa1e763,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0xa1e763,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4a4a0d=this['editor'],_0x560445=_0x4a4a0d['plugins']['get'](u),{isNavigationMode:_0x34b9f8,currentChangeNumber:_0x2f7811}=_0x560445;let _0x5151c2;if(_0x560445['activeChange']=_0x34b9f8?_0x560445['diff']['changes']['get'](_0x2f7811+this['_step']):_0x560445['diff']['changes']['first'],_0x560445['activeChange']['data']['isOnRoot'])_0x5151c2=_0x4a4a0d['editing']['view']['getDomRoot'](_0x560445['activeChange']['rootName']);else{const _0x207dbf=_0x4a4a0d['model']['markers']['get']('revision:'+_0x560445['activeChange']['id']);_0x5151c2=_0x47c945(_0x4a4a0d['editing'],_0x207dbf);}_0x41b90b({'target':_0x5151c2,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4d3bdb,currentChangeNumber:_0x509d71,numberOfChanges:_0x31e38c,isReady:_0x4339e,isEnabled:_0x1143a3}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x1143a3&&_0x4339e&&_0x31e38c)&&(!_0x4d3bdb||(0x1===this['_step']?_0x509d71<_0x31e38c-0x1:_0x509d71>0x0));}}class vi extends _0x4c679a{constructor(_0x1beada){super(_0x1beada);const _0x3fde58=this['bindTemplate'],_0x1ddffa=new _0x1a6925(_0x1beada),_0x4a19ec=new _0x1a6925(_0x1beada);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',(_0x5c9327,_0x67c0e9)=>_0x5c9327&&_0x67c0e9>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x36d86a,_0x3586e7,_0x308f75,_0x175008)=>{if(!_0x36d86a)return m(_0x1beada,'Loading...');if(!_0x308f75)return m(_0x1beada,'No\x20changes');const _0xeece8e=m(_0x1beada,'NUMBER_OF_CHANGES',_0x308f75);return _0x175008?m(_0x1beada,'X_OF_Y_CHANGES',[_0x3586e7+0x1,_0x308f75]):_0xeece8e;}),_0x1ddffa['set']({'label':m(_0x1beada,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x338ac3}),_0x4a19ec['set']({'label':m(_0x1beada,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x13d84f}),_0x1ddffa['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4a19ec['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1ddffa['on']('execute',()=>this['fire']('execute','backward')),_0x4a19ec['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',_0x3fde58['if']('_isStatusLabelVisible','ck-hidden',_0x1418d9=>!_0x1418d9)]},'children':[{'text':_0x3fde58['to']('isNavigationMode',_0x141e5d=>_0x141e5d?m(_0x1beada,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x1beada,'Total')+':\x20')}]},{'text':_0x3fde58['to']('_statusText')}]},new _0x33adfd(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1ddffa,_0x4a19ec]}]});}}const oe='ck-editor__editable__loading-overlay';class wi extends _0x2bce4d{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2a9cee=this['editor']['editing']['view'];_0x2a9cee['change'](_0x48b4d6=>{for(const _0x36d065 of _0x2a9cee['document']['roots'])_0x48b4d6['addClass'](oe,_0x36d065);});}['hide'](){const _0x3e302d=this['editor']['editing']['view'];_0x3e302d['change'](_0x187557=>{for(const _0x1620d6 of _0x3e302d['document']['roots'])_0x187557['removeClass'](oe,_0x1620d6);});}}class v extends _0x2bce4d{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,wi];}['init'](){const _0x127361=this['editor'],_0x42230a=_0x127361['plugins']['get'](u),_0x3f0619=_0x127361['plugins']['get'](wi);_0x127361['ui']['componentFactory']['add']('exitToEditing',_0x1eb5c2=>{const _0x3e0845=new _0x1a6925(_0x1eb5c2);return _0x3e0845['set']({'label':m(_0x1eb5c2,'Back\x20to\x20editing'),'icon':_0x57a137,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3e0845,'execute',()=>{_0x127361['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3e0845;}),_0x127361['ui']['componentFactory']['add']('restoreRevision',_0x116c68=>{const _0x19316b=new _0x1a6925(_0x116c68);return _0x19316b['set']({'label':m(_0x116c68,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x19316b['bind']('isEnabled')['to'](_0x127361['commands']['get']('restoreRevision')),this['listenTo'](_0x19316b,'execute',()=>_0x127361['execute']('restoreRevision')),_0x19316b;}),_0x127361['ui']['componentFactory']['add']('changesNavigation',_0x46c053=>{const _0x296847=new vi(_0x46c053),_0x35af0f=_0x127361['commands']['get']('showPreviousChange'),_0x64bc1e=_0x127361['commands']['get']('showNextChange');return _0x296847['bind']('isBackwardNavigationEnabled')['to'](_0x35af0f,'isEnabled'),_0x296847['bind']('isForwardNavigationEnabled')['to'](_0x64bc1e,'isEnabled'),_0x296847['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x42230a),this['listenTo'](_0x296847,'execute',(_0x5f1d34,_0x8165f4)=>{_0x127361['execute']('forward'===_0x8165f4?'showNextChange':'showPreviousChange');}),_0x296847;}),_0x3f0619['show'](),_0x42230a['on']('change:isReady',(_0x5e634c,_0x14cc98,_0x3c3f1d)=>{_0x3c3f1d?_0x3f0619['hide']():_0x3f0619['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0xdb2ba5,_0x317175){super(_0xdb2ba5,_0x317175);const _0x1a614c=this['bindTemplate'];this['set']({'label':m(_0xdb2ba5,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0xdb2ba5,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x1a614c['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0xb234c=this['fieldView']['element'];this['_tooltipString']=_0xb234c['scrollWidth']>_0xb234c['clientWidth']&&_0xb234c['value']||'';}}class ni extends _0x4c679a{constructor(_0x295b0d,_0x3de9ec,_0x17dae7){super(_0x295b0d);const _0x34d4dc=new _0x26c7e2();_0x34d4dc['set']({'content':_0x4ad26c,'viewBox':'0\x200\x2011\x2010'});const _0x5cf13d=['ck','ck-revision-history-sidebar__revision-author'];_0x17dae7&&_0x5cf13d['push']('ck-revision-history-sidebar__revision-author_creator');const _0x27192c=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x295b0d,_0x17dae7?'Revision\x20creator':'Revision\x20author')},'children':[_0x34d4dc,_0x3de9ec['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x5cf13d},'children':_0x27192c});}}function ai(_0x57bf18,_0x13cf75){const _0x3e3acb=_0x57bf18['bindTemplate'],_0x3b3ed0=_0x57bf18['locale'],_0x5f16b7=_0x46d208(_0x3b3ed0);_0x5f16b7['panelPosition']='sw';const _0x360762=function(_0x5da675,_0x1ce667){const _0x34fd68=function(_0x1cf0a8,_0x336fa9){const _0x135fd7=_0x1cf0a8['locale'],_0x2703ab={'Compare\x20against\x20selected':m(_0x135fd7,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x135fd7,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x135fd7,'Restore\x20this\x20revision')};return _0x336fa9['map'](_0x5f65d1=>{const _0x2efbda=_0x2703ab[_0x5f65d1['name']];return _0x2efbda&&_0x2efbda!==_0x5f65d1['name']&&(_0x5f65d1['name']=_0x2efbda),_0x5f65d1;});}(_0x5da675,_0x1ce667),_0x31897a=new _0x40f1c6();for(const _0x4439b0 of _0x34fd68){const _0x2d405d={'type':'button','model':new to({'label':_0x4439b0['name'],'class':_0x4439b0['class'],'withText':!0x0,'role':'menuitem','_action':_0x4439b0['action']})};_0x2d405d['model']['bind']('isEnabled')['to'](_0x5da675,'isActionsDropdownOpen',_0x56c1e7=>'function'!=typeof _0x4439b0['isEnabled']||(!_0x56c1e7||_0x4439b0['isEnabled'](_0x5da675))),_0x31897a['add'](_0x2d405d);}return _0x31897a;}(_0x57bf18,_0x13cf75);return _0x57bf18['bind']('isActionsDropdownOpen')['to'](_0x5f16b7,'isOpen'),_0x5f16b7['buttonView']['set']({'label':m(_0x3b3ed0,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x575b19}),_0x5f16b7['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3e3acb['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3e3acb['to'](_0x44ba97=>_0x44ba97['stopPropagation']())}}),_0x5f16b7['on']('execute',_0x4c1e5c=>{_0x57bf18['isReady']&&'function'==typeof _0x4c1e5c['source']['_action']&&_0x4c1e5c['source']['_action'](_0x57bf18);}),_0x39fd9f(_0x5f16b7,_0x360762,{'role':'menu'}),_0x5f16b7['listenTo'](_0x57bf18,'change:isActionsDropdownOpen',(_0x27ca45,_0x182e86,_0x3e30c0)=>{if(_0x3e30c0)for(const _0x5dbb76 of _0x5f16b7['listView']['items']){const _0x554bbb=_0x5dbb76['children']['first'],_0x3c8be8=_0x13cf75['find'](_0x435936=>_0x435936['action']===_0x554bbb['_action'])['isVisible'];_0x5dbb76['isVisible']=void 0x0===_0x3c8be8||_0x3c8be8(_0x57bf18);}}),_0x5f16b7;}class _i extends/* #__PURE__ -- @preserve */
27
- _0x4e9a07(_0x4c679a){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0xfd13ca,_0x2c34f9,_0x3314bf,_0x5a1257){super(_0xfd13ca);const _0x1b88cb=this['bindTemplate'],_0x24743f=function(_0x3ab045,_0x4b8ae1){const _0x531ff8=Array['from'](_0x4b8ae1['authors'])['filter'](_0x24920e=>_0x24920e!=_0x4b8ae1['creator']);return _0x4b8ae1['creator']&&_0x531ff8['unshift'](_0x4b8ae1['creator']),_0x531ff8['map'](_0x570e64=>new ni(_0x3ab045,_0x570e64,_0x570e64==_0x4b8ae1['creator']));}(_0xfd13ca,_0x2c34f9);this['id']=_0x2c34f9['id'],this['_revision']=_0x2c34f9,this['_requireRevisionName']=_0x5a1257,this['bind']('name','createdAt')['to'](_0x2c34f9),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1160e5=>{return _0x1d152b=_0xfd13ca['uiLanguage'],(_0x8852b2=_0x1160e5)['toLocaleDateString'](_0x1d152b,{'month':'long','day':'numeric'})+',\x20'+_0x8852b2['toLocaleTimeString'](_0x1d152b,{'hour':'numeric','minute':'numeric'});var _0x1d152b,_0x8852b2;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0xfd13ca,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3ace98=>_0x3ace98||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x22044b,_0x7ad16f)=>_0x22044b&&_0x7ad16f),this['revisionActionsView']=_0x3314bf&&_0x3314bf['length']?ai(this,_0x3314bf):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x1b88cb['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x1b88cb['if']('isEnabled','ck-disabled',_0x17eb5c=>!_0x17eb5c),_0x1b88cb['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x1b88cb['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x1b88cb['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':_0x1b88cb['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':_0x24743f}]},this['revisionActionsView']],'on':{'click':_0x1b88cb['to'](_0x2f0c07=>{_0x2f0c07['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4e3e16=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4e3e16,'change',()=>{this['_requireRevisionName']&&!_0x4e3e16['value']||this['fire']('setName',{'id':this['id'],'name':_0x4e3e16['value']}),_0x4e3e16['value']||(_0x4e3e16['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bi(_0x1ed4b8,_0x3b5e6e){const _0x18e10e=_0x11c9f8['fromJSDate'](_0x1ed4b8)['setLocale'](_0x3b5e6e),_0xa898f6=_0x11c9f8['local'](),_0x303400=_0xa898f6['minus']({'days':0x1})['startOf']('day');let _0x38f053,_0x11ae48;return _0x18e10e['hasSame'](_0xa898f6,'day')?(_0x38f053=_0x18e10e['startOf']('day')['toJSDate'](),_0x11ae48=_0x18e10e['toRelativeCalendar']()):_0x18e10e['hasSame'](_0x303400,'day')?(_0x38f053=_0x303400['toJSDate'](),_0x11ae48=_0x18e10e['toRelativeCalendar']()):_0x18e10e['hasSame'](_0xa898f6,'week')?(_0x38f053=_0x18e10e['startOf']('week')['toJSDate'](),_0x11ae48=_0x18e10e['weekdayLong']||''):_0x18e10e['hasSame'](_0xa898f6,'year')?(_0x38f053=_0x18e10e['startOf']('month')['toJSDate'](),_0x11ae48=_0x18e10e['monthLong']||''):(_0x38f053=_0x18e10e['startOf']('year')['toJSDate'](),_0x11ae48=String(_0x18e10e['year'])),{'startDate':_0x38f053,'localizedPeriodName':_0x11ae48};}class ji extends _0x4c679a{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3ac48c,_0x23643e,_0x128738,_0x26433b){super(_0x3ac48c);const _0x1b89f3=bi(_0x23643e,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x23643e,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x128738,this['_requireRevisionName']=_0x26433b,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':_0x1b89f3}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x23719a){const _0xa05f51=new _i(this['locale'],_0x23719a,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0xa05f51);}['removeRevision'](_0x5eaed6){const _0xc2c0b1=this['revisionViews']['find'](_0x216436=>_0x216436['id']===_0x5eaed6['id']);this['revisionViews']['remove'](_0xc2c0b1);}}class Si extends _0x4c679a{constructor(_0x4d41cd){super(_0x4d41cd);const _0x5e52e8=new _0x26c7e2();_0x5e52e8['content']=_0x3f5198,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x5e52e8,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x4d41cd,'Revision\x20history')]}]});}}class Ri extends _0x4c679a{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x16ac60,_0x4a8498,_0x1013e5,_0x50accb){super(_0x16ac60);const _0x4ee4ad=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x4a8498,this['_revisionActions']=_0x1013e5,this['_requireRevisionName']=_0x50accb,this['on']('select',(_0x599ed5,_0x2903e7)=>{this['fire']('revisionSelected',_0x2903e7);}),this['on']('setName',(_0x3ba7cb,_0x57fe24)=>{this['fire']('revisionSetName',_0x57fe24);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Si(_0x16ac60),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4ee4ad['if']('isEnabled','ck-disabled',_0x4d9f9f=>!_0x4d9f9f)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x2c8eb5 of this['_revisions'])this['_addRevision'](_0x2c8eb5);this['_revisions']['on']('add',(_0x3745aa,_0x28d339)=>{this['_addRevision'](_0x28d339);}),this['_revisions']['on']('remove',(_0x594330,_0x5b6b9d)=>{this['_removeRevision'](_0x5b6b9d);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0xb27db7=>_0xb27db7['revisionViews']['map'](_0x198171=>_0x198171))['flat']();}['selectRevision'](_0x1176fe){for(const _0x8fac95 of this['revisionViews'])_0x1176fe&&_0x1176fe['id']===_0x8fac95['id']?_0x8fac95['select']():_0x8fac95['deselect']();}['highlightRevisions'](_0x7d3f76){for(const _0x4d4b48 of this['revisionViews'])_0x7d3f76['some'](({id:_0x211624})=>_0x211624===_0x4d4b48['id'])?_0x4d4b48['highlight']():_0x4d4b48['unhighlight']();}['_addRevision'](_0x4c66d1){const _0x1b0716=bi(_0x4c66d1['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x27132c=this['timePeriodViews']['get'](0x0);_0x27132c&&_0x27132c['startDate']['getTime']()===_0x1b0716['getTime']()||(_0x27132c=new ji(this['locale'],_0x1b0716,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x27132c)),_0x27132c['addRevision'](_0x4c66d1);}['_removeRevision'](_0x1589f5){const _0x4ebb46=bi(_0x1589f5['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4ebb46)['removeRevision'](_0x1589f5);}['_getTimePeriodViewByStartDate'](_0x3240a7){return this['timePeriodViews']['find'](_0x5b139a=>_0x5b139a['startDate']['getTime']()===_0x3240a7['getTime']());}}class d extends _0x2bce4d{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x390267,uid as _0x3ca1e2,Collection as _0x401ff4,logWarning as _0x4c6960,FocusTracker as _0x26f73d,KeystrokeHandler as _0x3a8c7b,scrollViewportToShowTarget as _0x3e6207,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x462c45}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x4f8a27,set as _0x3f6799,unset as _0x4520d8,isEqual as _0x4d5de6}from'es-toolkit/compat';import{Plugin as _0x2182b9,PendingActions as _0x50312c,Command as _0x30eac9,ElementApiMixin as _0x1e99d3,Editor as _0x1eb8e8}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x491e76,getMarkerDomElement as _0x50e4f9,ConfirmMixin as _0x55f1e2,sanitizeEditorConfig as _0x35fa21}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x52407e,ViewAttributeElement as _0xaa1ecf,ViewEmptyElement as _0x41a8a2,ViewRawElement as _0x171025,ViewUIElement as _0x557769,ViewDocumentFragment as _0x4af310,ViewText as _0x56d53b,ViewElement as _0x39546c,ModelElement as _0x47d77c,ModelRange as _0x37ff01,ModelPosition as _0x40c1c3,ModelDocumentFragment as _0x451b26,ModelText as _0x5a04d7}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x1377de,IconChevronUp as _0x1dcbd4,IconChevronDown as _0x5e2179,IconUndo as _0x5cdc3a,IconUser as _0x26004b,IconThreeVerticalDots as _0x356400}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x318d59,View as _0x14bc2f,submitHandler as _0x525df1,LabeledFieldView as ti,createLabeledInputText as _0x8e7e4f,createDropdown as _0x25a564,ListView as _0x24a0ed,ListItemView as _0x4cdef9,ButtonView as _0x534191,MenuBarMenuView as _0x514422,MenuBarMenuListView as _0x111e3c,MenuBarMenuListItemView as _0x32e68f,MenuBarMenuListItemButtonView as _0x7f5db,ContextualBalloon as _0x5c9009,ToolbarSeparatorView as _0x29c4ab,IconView as _0x2d523d,addListToDropdown as _0x348879,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x4534b8,StickyPanelView as _0x2a6c1b,ToolbarView as _0x1b55fe,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0xbf028b}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x390267(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x52e761){super(),this['id']=_0x52e761['id']||_0x3ca1e2(),this['creator']=_0x52e761['creator']||null,this['authors']=_0x52e761['authors']||[],this['diffData']=_0x52e761['diffData']||null,this['toVersion']=_0x52e761['toVersion']||0x0,this['fromVersion']=_0x52e761['fromVersion']||0x0,this['set']('name',_0x52e761['name']||''),this['set']('createdAt',_0x52e761['createdAt']||new Date()),this['set']('attributes',_0x52e761['attributes']||{});}['setName'](_0x324f66){this['_update']({'name':_0x324f66});}['setAttribute'](_0x28f045,_0x54f735){const _0x18cd70=_0x4f8a27(this['attributes']);_0x3f6799(_0x18cd70,_0x28f045,_0x54f735),this['_update']({'attributes':_0x18cd70});}['removeAttribute'](_0x864fe1){const _0x3e0a86=_0x4f8a27(this['attributes']);_0x4520d8(_0x3e0a86,_0x864fe1),this['_update']({'attributes':_0x3e0a86});}['_update'](_0x594451,_0xa0b202=!0x1){let _0x56a534=!0x1;const _0x29230c={'id':this['id']},_0x36f378=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4a1d8f of _0x36f378){const _0x1b564f=_0x594451[_0x4a1d8f];void 0x0!==_0x1b564f&&_0x1b564f!==this[_0x4a1d8f]&&(this[_0x4a1d8f]=_0x1b564f,_0x29230c[_0x4a1d8f]=_0x1b564f,_0x56a534=!0x0);}_0x56a534&&(_0x29230c['authors']&&(_0x29230c['authorsIds']=_0x29230c['authors']['map'](_0x31bd0d=>_0x31bd0d['id']),delete _0x29230c['authors']),this['fire']('_update',_0x29230c,_0xa0b202));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x7becf3=>_0x7becf3['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x2182b9{['_revisions'];static get['requires'](){return[_0x491e76];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x28a4a2){super(_0x28a4a2),this['_revisions']=new _0x401ff4();}['afterInit'](){!async function(_0x1fb47c){const _0x4f4d92=_0x28af64([0x73,0x47,0x36,0x35,0x43,0x72,0x6b,0x31,0x63,0x64,0x32,0x69,0x67,0x4c,0x4e,0x37,0x7a,0x49,0x45,0x41,0x59,0x6a,0x75,0x39,0x4a,0x33,0x68,0x62,0x50,0x42,0x74,0x6e,0x46,0x4d,0x78,0x51,0x66,0x34,0x48,0x77,0x5a,0x61,0x6c,0x30,0x71,0x54,0x53,0x56,0x4b,0x79,0x44,0x6d,0x6f,0x52,0x76,0x55,0x58,0x65,0x70,0x57,0x4f,0x38]),_0x3e4a02=0xeb829,_0xff0606=0x7374585f,_0x368d46=0x73732caf^_0xff0606,_0x564aba=window[_0x28af64([0x44,0x61,0x74,0x65])][_0x28af64([0x6e,0x6f,0x77])](),_0x1054b7=_0x1fb47c[_0x28af64([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x20cd39=new window[(_0x28af64([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c8f56=>{_0x1054b7[_0x28af64([0x6f,0x6e,0x63,0x65])](_0x28af64([0x72,0x65,0x61,0x64,0x79]),_0x5c8f56);}),_0x3f40ac={[_0x28af64([0x6b,0x74,0x79])]:_0x28af64([0x45,0x43]),[_0x28af64([0x75,0x73,0x65])]:_0x28af64([0x73,0x69,0x67]),[_0x28af64([0x63,0x72,0x76])]:_0x28af64([0x50,0x2d,0x32,0x35,0x36]),[_0x28af64([0x78])]:_0x28af64([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]),[_0x28af64([0x79])]:_0x28af64([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]),[_0x28af64([0x61,0x6c,0x67])]:_0x28af64([0x45,0x53,0x32,0x35,0x36])},_0x288314=_0x1054b7[_0x28af64([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x28af64([0x67,0x65,0x74])](_0x28af64([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5ddeea(){let _0x10ee7d,_0x5190dd=null,_0x230d90=null;try{if(_0x288314==_0x28af64([0x47,0x50,0x4c]))return _0x28af64([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x10ee7d=_0x2472b7(),!_0x10ee7d)return _0x28af64([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x10ee7d[_0x28af64([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x230d90=_0x2c2a1a(_0x10ee7d[_0x28af64([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x10ee7d[_0x28af64([0x6a,0x74,0x69])])),await _0x2a7ad0()?_0x56dc6c()?_0x2311ec()?_0x28af64([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xdeceff()?(_0x10ee7d[_0x28af64([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x28af64([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5190dd=_0x43b42e(_0x28af64([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x10ee7d[_0x28af64([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x28af64([0x74,0x72,0x69,0x61,0x6c])&&(_0x5190dd=_0x43b42e(_0x28af64([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3c9665()):_0x28af64([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x28af64([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x28af64([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x28af64([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2311ec(){const _0x3284e9=[_0x28af64([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x28af64([0x74,0x72,0x69,0x61,0x6c])][_0x28af64([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x10ee7d[_0x28af64([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x564aba/0x3e8:0xe10*_0x368d46;return _0x10ee7d[_0x28af64([0x65,0x78,0x70])]<_0x3284e9;}function _0x56dc6c(){const _0x36bbc1=_0x10ee7d[_0x28af64([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x36bbc1)return!0x1;if(_0x36bbc1[_0x28af64([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28af64([0x2a])))return!0x0;if(_0x36bbc1[_0x28af64([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28af64([0x52,0x48])))return!0x0;if(_0x36bbc1[_0x28af64([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28af64([0x52,0x52,0x48]))){if(_0xc7c277())return!0x0;if(_0x4ad5e3()||_0x248cbe())return!0x0;}return!0x1;}function _0xdeceff(){const _0x15bd47=_0x10ee7d[_0x28af64([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x15bd47||0x0==_0x15bd47[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x16e553}=new URL(window[_0x28af64([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x15bd47[_0x28af64([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16e553))return!0x0;const _0x45cfc2=_0x16e553[_0x28af64([0x73,0x70,0x6c,0x69,0x74])](_0x28af64([0x2e]));return _0x15bd47[_0x28af64([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x11fd72=>_0x11fd72[_0x28af64([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28af64([0x2a])))[_0x28af64([0x6d,0x61,0x70])](_0x2889cd=>_0x2889cd[_0x28af64([0x73,0x70,0x6c,0x69,0x74])](_0x28af64([0x2e])))[_0x28af64([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x432e95=>_0x432e95[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x45cfc2[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x28af64([0x6d,0x61,0x70])](_0x4fd97d=>Array(_0x45cfc2[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4fd97d[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x28af64([0x66,0x69,0x6c,0x6c])](_0x4fd97d[0x0]===_0x28af64([0x2a])?_0x28af64([0x2a]):'')[_0x28af64([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4fd97d))[_0x28af64([0x73,0x6f,0x6d,0x65])](_0x565a6f=>_0x45cfc2[_0x28af64([0x65,0x76,0x65,0x72,0x79])]((_0x46f613,_0x546932)=>_0x565a6f[_0x546932]===_0x46f613||_0x565a6f[_0x546932]===_0x28af64([0x2a])));}function _0x3c9665(){return _0x5190dd&&_0x230d90?new window[(_0x28af64([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x48246e,_0x355742)=>{_0x5190dd[_0x28af64([0x74,0x68,0x65,0x6e])](_0x48246e,_0x355742),_0x230d90[_0x28af64([0x74,0x68,0x65,0x6e])](_0x16ffe=>{_0x16ffe!=_0x28af64([0x56,0x61,0x6c,0x69,0x64])&&_0x48246e(_0x16ffe);},_0x355742);}):_0x5190dd||_0x230d90||_0x28af64([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2c2a1a(_0x376b88,_0x1b78ae){return new window[(_0x28af64([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x278b16=>{if(_0x27be2e())return _0x278b16(_0x28af64([0x56,0x61,0x6c,0x69,0x64]));_0x4b68f7(),_0x1054b7[_0x28af64([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x28af64([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x324d71=!0x1;const _0x2e3ac8=_0x3ca1e2();function _0x8a8598(_0x5e6379){return!!_0x5e6379&&(typeof _0x5e6379===_0x28af64([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5e6379===_0x28af64([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5e6379[_0x28af64([0x74,0x68,0x65,0x6e])]===_0x28af64([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5e6379[_0x28af64([0x63,0x61,0x74,0x63,0x68])]===_0x28af64([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x11c3fa(_0x522d66){_0x462eb0(_0x522d66)[_0x28af64([0x74,0x68,0x65,0x6e])](_0x520bcf=>{if(!_0x520bcf||_0x520bcf[_0x28af64([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x28af64([0x6f,0x6b]))return _0x28af64([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x74d030(_0x3dc656(_0x2e3ac8+_0x1b78ae))!=_0x520bcf[_0x28af64([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x28af64([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x28af64([0x56,0x61,0x6c,0x69,0x64]);})[_0x28af64([0x74,0x68,0x65,0x6e])](_0x17e65d=>(_0xcd151e(),_0x17e65d),()=>{const _0x5daad1=_0x9a2f33();return null==_0x5daad1?(_0xcd151e(),_0x28af64([0x56,0x61,0x6c,0x69,0x64])):_0x28af64(_0x564aba-_0x5daad1>(0x5778dc5f^_0xff0606)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x28af64([0x74,0x68,0x65,0x6e])](_0x278b16)[_0x28af64([0x63,0x61,0x74,0x63,0x68])](()=>{_0x278b16(_0x28af64([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x529d1d=0x7342b6df^_0xff0606;function _0xcd151e(){const _0x3ad815=_0x28af64([0x6c,0x6c,0x63,0x74,0x2d])+_0x74d030(_0x3dc656(_0x376b88)),_0x31ed29=_0x832fcd(_0x74d030(window[_0x28af64([0x4d,0x61,0x74,0x68])][_0x28af64([0x63,0x65,0x69,0x6c])](_0x564aba/_0x529d1d)));window[_0x28af64([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x28af64([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3ad815,_0x31ed29);}function _0x9a2f33(){const _0x3a9a7f=_0x28af64([0x6c,0x6c,0x63,0x74,0x2d])+_0x74d030(_0x3dc656(_0x376b88)),_0x5386cb=window[_0x28af64([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x28af64([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3a9a7f);return _0x5386cb?window[_0x28af64([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x832fcd(_0x5386cb),0x10)*_0x529d1d:null;}function _0x462eb0(_0x35f172){return new window[(_0x28af64([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xdfd7e1,_0x168c55)=>{_0x35f172[_0x28af64([0x74,0x68,0x65,0x6e])](_0xdfd7e1,_0x168c55),window[_0x28af64([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x168c55,0x73758c9f^_0xff0606);});}}_0x1054b7[_0x28af64([0x6f,0x6e])](_0x28af64([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x599625,_0x3039c2)=>{if(_0x3039c2[0x0]!=_0x376b88)return _0x278b16(_0x28af64([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3039c2[0x1]={..._0x3039c2[0x1],[_0x28af64([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2e3ac8};},{[_0x28af64([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x28af64([0x68,0x69,0x67,0x68])}),_0x1054b7[_0x28af64([0x6f,0x6e])](_0x28af64([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x405567=>{_0x8a8598(_0x405567[_0x28af64([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x324d71=!0x0,_0x11c3fa(_0x405567[_0x28af64([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x28af64([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x28af64([0x6c,0x6f,0x77])}),_0x20cd39[_0x28af64([0x74,0x68,0x65,0x6e])](()=>{_0x324d71||_0x278b16(_0x28af64([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x27be2e(){return _0x1054b7[_0x28af64([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x28af64([0x76,0x69,0x65,0x77])][_0x28af64([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x28af64([0x61,0x75,0x74,0x6f]);}function _0x4b68f7(){_0x1054b7[_0x28af64([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x28af64([0x76,0x69,0x65,0x77])][_0x28af64([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x28af64([0x61,0x75,0x74,0x6f]);}}function _0x43b42e(_0x5b2771){const _0x2cb73a=[new window[(_0x28af64([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1c0ded=>setTimeout(_0x1c0ded,0x737d6693^_0xff0606)),_0x20cd39[_0x28af64([0x74,0x68,0x65,0x6e])](()=>new window[(_0x28af64([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26aed4=>{const _0x120d99=0x73745858^_0xff0606,_0x309386=_0x1fb47c[_0x28af64([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x3b12d1(){_0x309386[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x120d99&&_0x26aed4();}_0x3b12d1(),_0x309386[_0x28af64([0x6f,0x6e])](_0x28af64([0x61,0x64,0x64]),_0x3b12d1);})),new window[(_0x28af64([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3327c6=>{function _0x1c9be8(){for(const _0x53a329 in window)if(window[_0x28af64([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x28af64([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x53a329))&&window[_0x53a329]==_0x3e4a02)return _0x3327c6();_0x1054b7[_0x28af64([0x73,0x74,0x61,0x74,0x65])]!=_0x28af64([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x28af64([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1c9be8,0x73744bd7^_0xff0606);}_0x29a412(_0x28af64([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x1c9be8();})];return window[_0x28af64([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x28af64([0x72,0x61,0x63,0x65])](_0x2cb73a)[_0x28af64([0x74,0x68,0x65,0x6e])](()=>_0x5b2771);}async function _0x44e05f(){if(await _0x20cd39,_0x29a412(_0x28af64([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0xbcc980=_0x1fb47c[_0x28af64([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x43e62a=_0x1fb47c[_0x28af64([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])](_0xbcc980[_0x28af64([0x69,0x64])]),_0x4e1f20=_0x4ec376(_0x28af64([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4e1f20[_0x28af64([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0xbcc980['id'],_0x43e62a?_0x43e62a['id']:null,!0x0),_0x4e1f20[_0x28af64([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x28af64([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4e1f20[_0x28af64([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4e1f20[_0x28af64([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x36b294,void(_0x4e1f20[_0x28af64([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x36b294);}if(_0x29a412(_0x28af64([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1787cd=_0x4ec376(_0x28af64([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1787cd[_0x28af64([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x28af64([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1787cd[_0x28af64([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1787cd[_0x28af64([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x36b294,_0x1787cd[_0x28af64([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x36b294;}_0x1054b7[_0x28af64([0x6d,0x6f,0x64,0x65,0x6c])][_0x28af64([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x36b294,_0x1054b7[_0x28af64([0x6d,0x6f,0x64,0x65,0x6c])][_0x28af64([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x36b294,_0x1054b7[_0x28af64([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x28af64([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xc7c277(){return _0x29a412(_0x28af64([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4ec376(_0x28af64([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x28af64([0x73,0x74,0x61,0x74,0x65])]==_0x28af64([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4ad5e3(){return _0x29a412(_0x28af64([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 _0x248cbe(){return _0x29a412(_0x28af64([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x49b739(_0x135d44){const _0x49f7d5=_0x5da0b6();_0x1054b7[_0x49f7d5]=_0x28af64([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])+_0x135d44,_0x135d44[_0x28af64([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x28af64([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x5da0b6()]=_0x3e4a02),_0x135d44!=_0x28af64([0x56,0x61,0x6c,0x69,0x64])&&_0x44e05f();}function _0x5da0b6(){const _0x279d2d=window[_0x28af64([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x28af64([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x28af64([0x6e,0x6f,0x77])]())[_0x28af64([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x28af64([0x2e]),'');let _0x2ea1ec=_0x28af64([0x73]);for(let _0x1952ab=0x0;_0x1952ab<_0x279d2d[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1952ab+=0x2){let _0x580a1f=window[_0x28af64([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x279d2d[_0x28af64([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1952ab,_0x1952ab+0x2));_0x580a1f>=_0x4f4d92[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x580a1f-=_0x4f4d92[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2ea1ec+=_0x4f4d92[_0x580a1f];}return _0x2ea1ec;}function _0x2472b7(){const _0x2c5e7b=_0x288314[_0x28af64([0x73,0x70,0x6c,0x69,0x74])](_0x28af64([0x2e]));if(0x3!=_0x2c5e7b[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x24157b(_0x2c5e7b[0x1]);function _0x24157b(_0x5bbf64){const _0x480e15=_0x56a2b2(_0x5bbf64);return _0x480e15&&_0xaec8e8()?_0x480e15:null;function _0xaec8e8(){const _0x1fff09=_0x480e15[_0x28af64([0x6a,0x74,0x69])],_0x401f15=window[_0x28af64([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1fff09[_0x28af64([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1fff09[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2eec97={..._0x480e15,[_0x28af64([0x6a,0x74,0x69])]:_0x1fff09[_0x28af64([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1fff09[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2eec97[_0x28af64([0x76,0x63])],_0x3dc656(_0x2eec97)==_0x401f15;}}}async function _0x2a7ad0(){let _0x4a8d22=!0x0;try{const _0x122fd9=_0x288314[_0x28af64([0x73,0x70,0x6c,0x69,0x74])](_0x28af64([0x2e])),[_0x8a5731,_0x3fe6b2,_0x30aed1]=_0x122fd9;return _0x59c9d0(_0x8a5731),await _0x3bb027(_0x8a5731,_0x3fe6b2,_0x30aed1),_0x4a8d22;}catch{return!0x1;}function _0x59c9d0(_0x5f2faf){const _0x7ced59=_0x56a2b2(_0x5f2faf);_0x7ced59&&_0x7ced59[_0x28af64([0x61,0x6c,0x67])]==_0x28af64([0x45,0x53,0x32,0x35,0x36])||(_0x4a8d22=!0x1);}async function _0x3bb027(_0x22cde3,_0x43459a,_0x4b8f28){const _0x36257d=window[_0x28af64([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x28af64([0x66,0x72,0x6f,0x6d])](_0x26faf0(_0x4b8f28),_0x3744a5=>_0x3744a5[_0x28af64([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x103946=new window[(_0x28af64([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x28af64([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x22cde3+_0x28af64([0x2e])+_0x43459a),_0x14640c=window[_0x28af64([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x28af64([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x14640c)return;const _0x3f25ae=await _0x14640c[_0x28af64([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x28af64([0x6a,0x77,0x6b]),_0x3f40ac,{[_0x28af64([0x6e,0x61,0x6d,0x65])]:_0x28af64([0x45,0x43,0x44,0x53,0x41]),[_0x28af64([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x28af64([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x28af64([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x14640c[_0x28af64([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x28af64([0x6e,0x61,0x6d,0x65])]:_0x28af64([0x45,0x43,0x44,0x53,0x41]),[_0x28af64([0x68,0x61,0x73,0x68])]:{[_0x28af64([0x6e,0x61,0x6d,0x65])]:_0x28af64([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3f25ae,_0x36257d,_0x103946)||(_0x4a8d22=!0x1);}}function _0x56a2b2(_0x5ec227){return _0x5ec227[_0x28af64([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x28af64([0x65,0x79]))?JSON[_0x28af64([0x70,0x61,0x72,0x73,0x65])](_0x26faf0(_0x5ec227)):null;}function _0x26faf0(_0x1c2184){return window[_0x28af64([0x61,0x74,0x6f,0x62])](_0x1c2184[_0x28af64([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x28af64([0x2b]))[_0x28af64([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x28af64([0x2f])));}function _0x3dc656(_0x18302d){let _0x2a9181=0x1505;function _0x313af1(_0x640835){for(let _0x3775ac=0x0;_0x3775ac<_0x640835[_0x28af64([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3775ac++){const _0x124639=_0x640835[_0x28af64([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3775ac);_0x2a9181=(_0x2a9181<<0x5)+_0x2a9181+_0x124639,_0x2a9181&=_0x2a9181;}}function _0x1d1a61(_0x3637a7){Array[_0x28af64([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3637a7)?_0x3637a7[_0x28af64([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1d1a61):_0x3637a7&&typeof _0x3637a7==_0x28af64([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x28af64([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3637a7)[_0x28af64([0x73,0x6f,0x72,0x74])]()[_0x28af64([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x20721f,_0x5e174c])=>{_0x313af1(_0x20721f),_0x1d1a61(_0x5e174c);}):_0x313af1(window[_0x28af64([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3637a7));}return _0x1d1a61(_0x18302d),_0x2a9181>>>0x0;}function _0x74d030(_0x16850a){return _0x16850a[_0x28af64([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x28af64([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x28af64([0x30]));}function _0x832fcd(_0x16eae8){return _0x16eae8[_0x28af64([0x73,0x70,0x6c,0x69,0x74])]('')[_0x28af64([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x28af64([0x6a,0x6f,0x69,0x6e])]('');}function _0x29a412(_0x9cb086){return _0x1054b7[_0x28af64([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x28af64([0x68,0x61,0x73])](_0x9cb086);}function _0x4ec376(_0x44b1a7){return _0x1054b7[_0x28af64([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x28af64([0x67,0x65,0x74])](_0x44b1a7);}function _0x36b294(){}function _0x28af64(_0x55d0b7){return _0x55d0b7['map'](_0x5095b1=>String['fromCharCode'](_0x5095b1))['join']('');}_0x49b739(await _0x5ddeea());}(this);}['createRevision'](_0x2e0464){const _0x140796=this['editor']['plugins']['get']('Users');return new I({'id':_0x2e0464['id'],'name':_0x2e0464['name'],'creator':_0x2e0464['creatorId']?_0x140796['getUser'](_0x2e0464['creatorId']):null,'diffData':_0x2e0464['diffData']||_0x2e0464['data'],'authors':_0x2e0464['authorsIds']['map'](_0x59fb62=>_0x140796['getUser'](_0x59fb62)),'createdAt':new Date(_0x2e0464['createdAt']),'attributes':_0x2e0464['attributes'],'fromVersion':_0x2e0464['fromVersion'],'toVersion':_0x2e0464['toVersion']});}['addRevision'](_0x13be03,_0x3aad58=0x0){this['_revisions']['add'](_0x13be03,_0x3aad58);}['getRevision'](_0x23e401){return this['_revisions']['get'](_0x23e401);}['getRevisions'](_0x287bec={'toJSON':!0x1}){const _0x1f9684=Array['from'](this['_revisions']);return _0x1f9684['reverse'](),_0x287bec['toJSON']?_0x1f9684['map'](_0x2df09b=>_0x2df09b['toJSON']()):_0x1f9684;}['getIndex'](_0x2099e5){return this['_revisions']['getIndex'](_0x2099e5);}['getEarlierVisibleRevision'](_0x45ab42){const [,_0x470931]=this['getRevisionsIterator'](_0x45ab42,{'direction':'earlier'});return _0x470931;}['getLaterVisibleRevision'](_0x5e3c47){const [,_0x4d140a]=this['getRevisionsIterator'](_0x5e3c47,{'direction':'later'});return _0x4d140a;}['getRevisionsInDiff'](_0xb76129){const _0x50f382=[];for(const _0x3ac0fa of this['getRevisionsIterator'](_0xb76129['newRevisionId']))if(_0x50f382['push'](_0x3ac0fa),_0x3ac0fa['id']===_0xb76129['oldRevisionId'])break;return _0x50f382;}*['getRevisionsIterator'](_0x694a4c,{direction:_0x52b7a0='earlier',filter:_0x5ee981=()=>!0x0}={}){const _0x56b2dd='earlier'===_0x52b7a0?0x1:-0x1;let _0x13a315=this['_revisions']['get'](_0x694a4c),_0x354d2d=this['getIndex'](_0x13a315);for(yield _0x13a315;_0x13a315;){if(_0x354d2d+=_0x56b2dd,_0x13a315=this['getRevision'](_0x354d2d),!_0x13a315)return;_0x5ee981(_0x13a315)&&(yield _0x13a315);}}}class $ extends _0x2182b9{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x52407e,'c'],[_0xaa1ecf,'a'],[_0x41a8a2,'e'],[_0x171025,'r'],[_0x557769,'u']]);['_typeCharToViewClass']=new Map([['c',_0x52407e],['a',_0xaa1ecf],['e',_0x41a8a2],['r',_0x171025],['u',_0x557769]]);async['loadRevisionData'](_0x1b57d7,_0x27abda){if(_0x1b57d7['diffData']||!_0x27abda)return;const _0x28ad77=this['editor']['config']['get']('collaboration.channelId'),_0x5d7adc=await _0x27abda['getRevision']({'channelId':_0x28ad77,'revisionId':_0x1b57d7['id']});_0x1b57d7['diffData']=_0x5d7adc['diffData'];}['getRevisionDocumentData'](_0x1375ea){const _0x10556e={};for(const _0x463eff in _0x1375ea['diffData']){if(_0x1375ea['diffData'][_0x463eff]['attachChange']&&!_0x1375ea['diffData'][_0x463eff]['attachChange']['isAttached'])continue;const _0x149218=this['_removeRevisionMarkers'](JSON['parse'](_0x1375ea['diffData'][_0x463eff]['insertions'])),_0x1083fe=this['editor']['editing']['view']['document'],_0x358b02=new _0x4af310(_0x1083fe,_0x149218['map'](_0x4e71f1=>this['_getViewFromDiffObj'](_0x4e71f1,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x10556e[_0x463eff]=this['editor']['data']['processor']['toData'](_0x358b02),this['editor']['data']['processor']['useFillerType']('default');}return _0x10556e;}['getRevisionRootsAttributes'](_0x4b3406){const _0x4b7486={};for(const _0x1e09b6 in _0x4b3406['diffData'])_0x4b3406['diffData'][_0x1e09b6]['attachChange']&&!_0x4b3406['diffData'][_0x1e09b6]['attachChange']['isAttached']||(_0x4b7486[_0x1e09b6]=_0x4b3406['diffData'][_0x1e09b6]['attributesAfter']||{});return _0x4b7486;}['_getTypeCharForViewElement'](_0x431597){return this['_viewClassToTypeChar']['get'](_0x431597['constructor']);}['_getViewFromDiffObj'](_0x3e950c,_0xf87ce6){const _0x452cfb=this['editor']['editing']['view']['document'];if('string'==typeof _0x3e950c)return new _0x56d53b(_0x452cfb,_0x3e950c);{let _0x4225f8,_0x26e1b5;_0x26e1b5='u'==_0x3e950c['type']||'r'==_0x3e950c['type']?[]:_0x3e950c['children']['map'](_0x97d679=>this['_getViewFromDiffObj'](_0x97d679,_0xf87ce6));const _0x26497f=this['_typeCharToViewClass']['get'](_0x3e950c['type'])||_0x39546c,_0x4d3989=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x4225f8=new _0x26497f(_0x452cfb,_0x3e950c['name'],_0x3e950c['attributes'],_0x26e1b5),'u'==_0x3e950c['type']&&_0x3e950c['children'][0x0]){const _0x1e6b27=_0x3e950c['children'][0x0];if(_0x4225f8['render']=function(_0x4d705b){const _0x20fe35=_0x4d705b['createElement']('div');return _0x20fe35['innerHTML']=_0x1e6b27,_0x20fe35['childNodes'][0x0];},_0xf87ce6){const _0x256145=new _0x4af310(_0x452cfb);_0x256145['_appendChild'](_0x4225f8);const _0x375064=Array['from'](_0x4d3989['viewChildrenToDom'](_0x256145,{'bind':!0x1})),_0x5cc7ac=_0x4d3989['domDocument']['createElement']('div');_0x5cc7ac['append'](..._0x375064),_0x4225f8=Array['from'](_0x4d3989['domChildrenToView'](_0x5cc7ac))[0x0];}}else{if('r'==_0x3e950c['type']&&_0x3e950c['children'][0x0]){const _0x4a5d94=_0x3e950c['children'][0x0];if(_0x4225f8['render']=function(_0xd4b7fc){_0xd4b7fc['innerHTML']=_0x4a5d94;},_0xf87ce6){const _0x1af531=new _0x4af310(_0x452cfb);_0x1af531['_appendChild'](_0x4225f8);const _0x2134ef=Array['from'](_0x4d3989['viewChildrenToDom'](_0x1af531,{'bind':!0x1})),_0x26dab8=_0x4d3989['domDocument']['createElement']('div');_0x26dab8['append'](..._0x2134ef);const _0x895411=Array['from'](_0x4d3989['domChildrenToView'](_0x26dab8));_0x895411['length']>0x1?_0x4225f8['_appendChild'](_0x895411):_0x4225f8=_0x895411[0x0];}}}if(_0x3e950c['customProperties']){for(const [_0x5a99d5,_0x11c879]of _0x3e950c['customProperties'])_0x4225f8['_setCustomProperty'](_0x5a99d5,_0x11c879);}const _0x295d3c=void 0x0===_0x3e950c['fillerOffset']?null:_0x3e950c['fillerOffset'];return null!==_0x295d3c&&(_0x4225f8['getFillerOffset']=()=>_0x295d3c),_0x4225f8;}}['_makeModelFromViewString'](_0x232657){const _0x27568e=JSON['parse'](_0x232657),_0x712a26=this['editor']['editing']['view']['document'],_0x2d38b8=new _0x4af310(_0x712a26,_0x27568e['map'](_0x109774=>this['_getViewFromDiffObj'](_0x109774,!0x0)));return this['editor']['data']['toModel'](_0x2d38b8);}['_removeRevisionMarkers'](_0x478303){return(_0x478303=_0x478303['filter'](_0x238d6c=>!_0x238d6c['name']||'revision-start'!==_0x238d6c['name']&&'revision-end'!==_0x238d6c['name']))['forEach'](_0x1b5410=>{'string'!=typeof _0x1b5410&&(_0x1b5410['children']=this['_removeRevisionMarkers'](_0x1b5410['children']),_0x1b5410['attributes']=_0x1b5410['attributes']['filter'](_0x43139b=>!_0x43139b[0x0]['startsWith']('data-revision-')));}),_0x478303;}}function m(_0x5ee3fd,_0x21623c,_0x1a5515){const t=_0x5ee3fd['t'];switch(_0x21623c){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'},_0x1a5515);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1a5515);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 _0x2182b9{['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[_0x491e76,S,$,_0x50312c];}constructor(_0x4aa56b){super(_0x4aa56b),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x591659=_0x3ca1e2();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x591659},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 _0x2adc6b=this['repository']['getRevision'](0x0),_0x583647=_0x2adc6b&&null===_0x2adc6b['creator']?_0x2adc6b:null;if(this['_continueCurrentRevision']=!!_0x583647&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x52f525=this['_source']['getCurrentRevisionId'](),_0x2e6e67=this['repository']['getRevision'](_0x52f525);if(_0x2e6e67)this['_startingVersion']=_0x2e6e67['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x12c0db=this['_source']['history']['_operations']['find'](_0x57af9c=>!_0x57af9c['_isInit']),_0x1048a0=_0x12c0db?_0x12c0db['baseVersion']:this['_source']['history']['version'];_0x2adc6b?(_0x2adc6b['toVersion']<_0x1048a0&&_0x2adc6b['_update']({'toVersion':_0x1048a0}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x583647['id'],this['_startingVersion']=_0x583647['fromVersion']):(this['_startingVersion']=_0x2adc6b['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x1048a0,this['_continueCurrentRevision']=!0x1);}}else _0x583647&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x583647['toVersion'],this['editor']['model']['document']['history']['version']),_0x583647['fromVersion']===_0x583647['toVersion']?(0x0!==_0x583647['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x583647['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x583647['id'],this['_startingVersion']=_0x583647['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',_0x2631c8=>!_0x2631c8),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x36f651=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3c78e8;for(const _0x1c2eb6 in _0x36f651){const _0x5a4410=_0x1c2eb6,_0x402e6c=_0x36f651[_0x5a4410];if('revisionHistoryLicenseKeyValid'==_0x402e6c||'revisionHistoryLicenseKeyInvalid'==_0x402e6c||'revisionHistoryLicenseKeyExpired'==_0x402e6c||'revisionHistoryLicenseKeyDomainLimit'==_0x402e6c||'revisionHistoryLicenseKeyNotAllowed'==_0x402e6c||'revisionHistoryLicenseKeyEvaluationLimit'==_0x402e6c||'revisionHistoryLicenseKeyTrialLimit'==_0x402e6c||'revisionHistoryLicenseKeyUsageLimit'==_0x402e6c){delete _0x36f651[_0x5a4410],_0x3c78e8=_0x402e6c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x3c78e8&&_0x36f651['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x3c78e8&&_0x36f651['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x3c78e8&&_0x36f651['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x3c78e8&&_0x36f651['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x3c78e8&&_0x36f651['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x3c78e8&&_0x36f651['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x3c78e8&&_0x36f651['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x46ff9e=this['repository']['getRevision'](0x0),_0x448db3=await this['getRevisionDocumentData'](_0x46ff9e),_0x241129=await this['getRevisionRootsAttributes'](_0x46ff9e);this['_replaceEditorDataWithRevisionData'](_0x448db3,_0x241129);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0xb6d9d2){this['_source']=_0xb6d9d2;}async['update'](){const _0x38ccf6=await this['_source']['getLatestVersion']();if(_0x38ccf6>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5808bd=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x38ccf6});_0x5808bd['authors']=_0x5808bd['authorsIds']['map'](_0x223a4c=>this['editor']['plugins']['get']('Users')['getUser'](_0x223a4c)),this['currentRevision']['_update'](_0x5808bd);}}async['saveRevision'](_0x1703d6={},_0xc098bb=null){const _0x4fef57=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xc098bb>this['currentRevision']['toVersion']&&(_0xc098bb=null),null===_0xc098bb&&(_0xc098bb=await this['_source']['getLatestVersion']());const _0x3b88b8=this['_getFromVersion'](_0xc098bb),_0x3e6952=this['buildRevisionData']({'from':_0x3b88b8,'to':_0xc098bb});if(this['currentRevision']['toVersion']<_0xc098bb){const _0xc224fd=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xc098bb,'to':_0xc098bb});_0xc224fd['authors']=[],_0xc224fd['authorsIds']=[],_0xc224fd['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xc224fd,!0x0),delete _0xc224fd['authors'],_0x4fef57['push'](_0xc224fd);}_0x1703d6['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1703d6['name']=_0x1703d6['name']||null,_0x1703d6['id']=_0x1703d6['id']||_0x3ca1e2(),_0x1703d6={..._0x1703d6,..._0x3e6952};const _0x373380=this['addRevisionData'](_0x1703d6);_0x4fef57['push'](_0x1703d6);const _0x4d8217=this['repository']['getIndex'](_0x373380);if(0x0!==_0x4d8217){const _0x5be860=this['repository']['getRevision'](_0x4d8217-0x1);if(_0x5be860['fromVersion']!==_0xc098bb){const _0x4f37c9=this['_revisionDataBuilder']['getData'](_0xc098bb,_0x5be860['toVersion']),_0x24432d={'id':_0x5be860['id'],'diffData':_0x4f37c9['diffData'],'authorsIds':_0x4f37c9['authorsIds'],'authors':_0x4f37c9['authorsIds']['map'](_0x241c44=>this['editor']['plugins']['get']('Users')['getUser'](_0x241c44)),'fromVersion':_0xc098bb};_0x5be860===this['currentRevision']&&(_0x24432d['createdAt']=new Date(_0x1703d6['createdAt']['getTime']()+0xa)),_0x5be860['_update'](_0x24432d,!0x0),delete _0x24432d['authors'],_0x4fef57['push'](_0x24432d);}}if(this['adapter']){for(const _0x21aa70 of _0x4fef57)this['_bufferUpdate'](_0x21aa70['id'],_0x21aa70,!0x0);this['sendBufferedUpdates']();}return _0x373380;}['addRevisionData'](_0x570fe1){const _0x1e6af0=this['repository']['createRevision'](_0x570fe1);return this['adapter']&&_0x1e6af0['on']('_update',(_0x57a620,_0x3fd0df,_0x29932a)=>{_0x29932a||(this['_bufferUpdate'](_0x3fd0df['id'],_0x3fd0df,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1e6af0,this['_findInsertionIndex'](_0x1e6af0)),_0x1e6af0;}async['getRevisionDocumentData'](_0x19231a){return await this['_utils']['loadRevisionData'](_0x19231a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x19231a);}async['getRevisionRootsAttributes'](_0x34e8d2){return await this['_utils']['loadRevisionData'](_0x34e8d2,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x34e8d2);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x11732d=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x63c10b=0x0;_0x63c10b<_0x11732d['length'];_0x63c10b++){const _0x45fd8e=_0x11732d[_0x63c10b];let _0x14c69d=!0x1;for(const _0x1ae257 of Object['keys'](_0x45fd8e))void 0x0===_0x45fd8e[_0x1ae257]?delete _0x45fd8e[_0x1ae257]:'id'!==_0x1ae257&&(_0x14c69d=!0x0);_0x14c69d||(_0x11732d[_0x63c10b]=null);}if(_0x11732d=_0x11732d['filter'](_0x1996d4=>null!==_0x1996d4),!_0x11732d['length'])return;for(let _0xe53cc5=0x0;_0xe53cc5<_0x11732d['length'];_0xe53cc5++){const _0x5d1dfa=_0x11732d[_0xe53cc5];void 0x0!==_0x5d1dfa['fromVersion']&&void 0x0===_0x5d1dfa['toVersion']&&(_0x5d1dfa['toVersion']=this['repository']['getRevision'](_0x5d1dfa['id'])['toVersion']),void 0x0!==_0x5d1dfa['toVersion']&&void 0x0===_0x5d1dfa['fromVersion']&&(_0x5d1dfa['fromVersion']=this['repository']['getRevision'](_0x5d1dfa['id'])['fromVersion']);}const _0x4e1828=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x11732d,_0x4e1828)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x5d56fe=>{if(_0x5d56fe){for(const _0x5a8de7 of _0x5d56fe)this['setRevisionData']({'id':_0x5a8de7['id'],'createdAt':_0x5a8de7['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x2f5ec6=null,from:_0x40c9db=null,to:_0x1a8c9a=null}){_0x40c9db=null!==_0x40c9db?_0x40c9db:_0x2f5ec6['fromVersion'],_0x1a8c9a=null!==_0x1a8c9a?_0x1a8c9a:_0x2f5ec6['toVersion'];const _0x20eba2=this['_revisionDataBuilder']['getData'](_0x40c9db,_0x1a8c9a),_0x453cb5={'diffData':_0x20eba2['diffData'],'authorsIds':_0x20eba2['authorsIds'],'fromVersion':_0x40c9db,'toVersion':_0x1a8c9a};if(!_0x2f5ec6||_0x1a8c9a!==_0x2f5ec6['toVersion']){const _0x37f86f=_0x1a8c9a-0x1,_0x1eec0f=this['_source']['history']['getOperation'](_0x37f86f);_0x453cb5['createdAt']=_0x1eec0f&&_0x1eec0f['createdAt']||new Date();}if(this['_loadedStateData']&&_0x40c9db===this['_loadedStateData']['fromVersion']){for(const _0x3cc3ba of this['_loadedStateData']['authors'])_0x453cb5['authorsIds']['includes'](_0x3cc3ba['id'])||_0x453cb5['authorsIds']['push'](_0x3cc3ba['id']);}return _0x453cb5;}['_bufferUpdate'](_0x4a7630,_0x191252,_0x36b159){if(this['_bufferedUpdates']['has'](_0x4a7630)){const _0x27dccb=this['_bufferedUpdates']['get'](_0x4a7630);_0x191252=_0x36b159?{..._0x27dccb,..._0x191252}:{..._0x191252,..._0x27dccb};}this['_bufferedUpdates']['set'](_0x4a7630,_0x191252);}['setRevisionData'](_0x3ce738){const _0x45600e=this['repository']['getRevision'](_0x3ce738['id']);if(_0x3ce738['createdAt']&&(_0x3ce738['createdAt']=new Date(_0x3ce738['createdAt'])),_0x3ce738['authorsIds']){const _0x215faa=this['editor']['plugins']['get']('Users');_0x3ce738['authors']=_0x3ce738['authorsIds']['map'](_0x555773=>_0x215faa['getUser'](_0x555773));}_0x45600e['_update'](_0x3ce738,!0x0);}['_createInitialRevision'](_0x2a4bd0){const _0x5d1d4b=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5d1d4b)this['_initialRevisionId']=_0x5d1d4b['id'];else{const _0x5b04e8=!this['editor']['model']['document']['roots']['find'](_0x2262ca=>this['editor']['model']['hasContent'](_0x2262ca)),_0x1cb10c=this['editor']['plugins']['get']('Users')['me']['id'],_0x5cf1e5=m(this['editor']['locale'],_0x5b04e8?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x2a4bd0,'to':_0x2a4bd0,'id':this['_initialRevisionId'],'name':_0x5cf1e5,'creatorId':_0x1cb10c});}}['_createCurrentRevision'](_0xde9041){const _0x1ab6e4=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1ab6e4),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xde9041,'to':_0xde9041,'id':_0x1ab6e4,'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'](_0x784617,_0x448b30){let _0x57cd2e=this['editor']['config']['get']('initialData'),_0x205613=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x57cd2e){_0x57cd2e={};for(const _0x28d7ae of this['editor']['model']['document']['getRootNames']())_0x57cd2e[_0x28d7ae]='';}if('string'==typeof _0x57cd2e&&(_0x57cd2e={'main':_0x57cd2e}),void 0x0===_0x205613){_0x205613={};for(const _0x43f74d of this['editor']['model']['document']['getRootNames']())_0x205613[_0x43f74d]={};}let _0x5b2f35=!0x1;const _0x5d3a0c=Object['keys'](_0x57cd2e),_0x37b589=Object['keys'](_0x784617);for(const _0x1918aa of _0x5d3a0c){if(_0x57cd2e[_0x1918aa]!==_0x784617[_0x1918aa]&&''!==_0x57cd2e[_0x1918aa]['trim']()){_0x5b2f35=!0x0;break;}if(!_0x4d5de6(_0x205613[_0x1918aa],_0x448b30[_0x1918aa])&&Object['keys'](_0x205613[_0x1918aa])['length']>0x0){_0x5b2f35=!0x0;break;}}_0x5b2f35||(_0x5b2f35=_0x37b589['some'](_0x4baeda=>!this['editor']['model']['document']['getRoot'](_0x4baeda))),_0x5b2f35&&_0x4c6960('editor-initial-data-replaced-with-revision-data',{'editorData':_0x57cd2e,'editorRootsAttributes':_0x205613,'revisionData':_0x784617,'revisionRootsAttributes':_0x448b30}),this['editor']['config']['set']('initialData',_0x784617),this['editor']['config']['set']('rootsAttributes',_0x448b30);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x39bfc3=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x39bfc3['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0xc8bfeb){const _0x2b66c5=this['repository']['getRevisions']();_0x2b66c5['reverse']();let _0x4b6330=0x0;for(;_0x4b6330<_0x2b66c5['length'];){const _0x19271a=_0x2b66c5[_0x4b6330];if(_0x19271a===this['currentRevision']){_0x4b6330++;continue;}if(_0x19271a['id']===this['_initialRevisionId'])break;const _0x36c262=_0xc8bfeb['toVersion']-_0x19271a['toVersion']||_0xc8bfeb['fromVersion']-_0x19271a['fromVersion'];if(_0x36c262>0x0)break;if(_0x36c262<0x0)_0x4b6330++;else{if(!_0xc8bfeb['creator']&&_0x19271a['creator'])break;if(_0x19271a['creator']||!_0xc8bfeb['creator']){if(_0xc8bfeb['createdAt']>_0x19271a['createdAt'])break;_0x4b6330++;}else _0x4b6330++;}}return _0x4b6330;}['_getFromVersion'](_0x459fb0){const _0x56074b=this['repository']['getRevisions']();_0x56074b['reverse'](),_0x56074b['shift']();const _0x21a9b0=_0x56074b['find'](_0x13c3ab=>_0x13c3ab['toVersion']<=_0x459fb0)['toVersion'];return _0x21a9b0<this['_startingVersion']?this['_startingVersion']:_0x21a9b0;}['_makeRevision']({name:_0x57de5f,from:_0x3e9577,to:_0x30e626,creatorId:_0x43ad36,id:_0x50f21d}){const _0x183741=this['buildRevisionData']({'from':_0x3e9577,'to':_0x30e626});_0x183741['name']=_0x57de5f,_0x183741['creatorId']=_0x43ad36,_0x183741['id']=_0x50f21d;const _0x5e071d=this['addRevisionData'](_0x183741);return this['adapter']&&this['_bufferUpdate'](_0x183741['id'],_0x183741,!0x0),_0x5e071d;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x181738){this['editor']=_0x181738,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'](_0x4f509f){this['source']=_0x4f509f;const _0x261d0c=new Map(),_0x1ed3a2=new Map(),_0x126997=this['editor']['model']['document']['roots']['map'](_0x46c5e9=>_0x46c5e9['rootName']);for(const _0x373033 of _0x126997){const _0x592840=this['editor']['model']['document']['getRoot'](_0x373033),_0x257f26=x(_0x592840);_0x261d0c['set'](_0x373033,_0x257f26),_0x1ed3a2['set'](_0x373033,Object['fromEntries'](_0x592840['getAttributes']()));}const _0x3f58d6=Array['from'](this['editor']['model']['markers'])['map'](_0x26ccd2=>[_0x26ccd2['name'],_0x26ccd2['getRange']()]),_0x52653e=this['source']['version'];this['_saveMetaData'](_0x52653e,_0x261d0c,_0x3f58d6,_0x1ed3a2),this['_startingRevisionId']=this['_revisionId'];const _0x45a354=new Map(),_0x4ae1d8=new Map();for(const _0x5ac240 of _0x126997){const _0xf2ad4d=N(_0x5ac240);_0x45a354['set'](_0x5ac240,_0xf2ad4d),_0x4ae1d8['set'](_0x5ac240,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x45a354,[],_0x4ae1d8);}['getData'](_0x3859bb,_0x2a624e){if(this['_lastFrom']===_0x3859bb&&this['_lastTo']<=_0x2a624e)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2a624e,!0x0);else{if(!this['_savedMetaData']['has'](_0x3859bb)){const _0x349ebd=this['_getPreviousFrom'](_0x3859bb);this['_calculateMetaData'](_0x349ebd,_0x3859bb,!0x1);}this['_calculateMetaData'](_0x3859bb,_0x2a624e,!0x0);}return this['_lastFrom']=_0x3859bb,this['_lastTo']=_0x2a624e,this['_getState']();}['loadState'](_0x423772){if(!this['_savedMetaData']['has'](_0x423772['fromVersion'])){const _0x3000ce=this['_getPreviousFrom'](_0x423772['fromVersion']);this['_calculateMetaData'](_0x3000ce,_0x423772['fromVersion'],!0x1);}this['_calculateMetaData'](_0x423772['fromVersion'],_0x423772['toVersion'],!0x1);const _0x22e064=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x423772['fromVersion'],this['_lastTo']=_0x423772['toVersion'];for(const _0x47d783 in _0x423772['diffData']){const _0x2258d5=_0x423772['diffData'][_0x47d783]['attachChange'],_0x4ed096=_0x4f8a27(_0x423772['diffData'][_0x47d783]['attributesBefore'])||{},_0x3b1106=_0x22e064['_makeModelFromViewString'](_0x423772['diffData'][_0x47d783]['deletions']);_0x3b1106['rootName']=_0x47d783,_0x3b1106['_isAttached']=!_0x2258d5||!_0x2258d5['isAttached'],_0x3b1106['isAttached']=()=>_0x3b1106['_isAttached'],this['_baseRoots']['set'](_0x47d783,_0x3b1106),this['_baseRootsAttributes']['set'](_0x47d783,_0x4ed096),_0x2258d5&&this['_touchedRoots']['set'](_0x47d783,_0x2258d5);const _0x75f150=this['_makeIdsRoot'](_0x3b1106);this['_baseIdsRoots']['set'](_0x47d783,_0x75f150);for(const [_0x550cce,_0x2e7b8a]of _0x3b1106['markers']){if(!_0x550cce['startsWith']('revision:'))continue;const _0x21fb5a=_0x550cce['split'](':')[0x2];for(const _0x45158e of _0x2e7b8a['getWalker']({'singleCharacters':!0x0})){const _0x2ba41e=this['_getVidAttributeName'](_0x45158e),_0x41d303='elementEnd'==_0x45158e['type']?_0x45158e['previousPosition']['path']['slice'](0x0,-0x1):_0x45158e['previousPosition']['path'],_0x562c1a=_0x75f150['getNodeByPath'](_0x41d303)['getAttribute'](_0x2ba41e);this['_touched']['set'](_0x562c1a,{'userId':_0x21fb5a});}}}this['_startingRevisionId']=this['_revisionId'];const _0x27cf60=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x22090d=>!this['_touched']['has'](_0x22090d));let _0x2f4571=0x0;const _0x443351=new Map();for(const _0x4c6c4c in _0x423772['diffData']){const _0x12c903=_0x423772['diffData'][_0x4c6c4c]['attachChange'],_0x3cedfc=_0x4f8a27(_0x423772['diffData'][_0x4c6c4c]['attributesAfter'])||{},_0x482aeb=_0x22e064['_makeModelFromViewString'](_0x423772['diffData'][_0x4c6c4c]['insertions']);_0x482aeb['rootName']=_0x4c6c4c,_0x482aeb['_isAttached']=!_0x12c903||_0x12c903['isAttached'],_0x482aeb['isAttached']=()=>_0x482aeb['_isAttached'],this['_diffRoots']['set'](_0x4c6c4c,_0x482aeb),this['_diffRootsAttributes']['set'](_0x4c6c4c,_0x3cedfc);const _0x2dfb34=this['_makeIdsRoot'](_0x482aeb,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4c6c4c,_0x2dfb34),_0x443351['set'](_0x4c6c4c,_0x482aeb['isAttached']()?_0x3cedfc:{});for(const [_0x276366,_0x2f59f6]of _0x482aeb['markers']){if(!_0x276366['startsWith']('revision:'))continue;const _0x2d370b=_0x276366['split'](':')[0x2];for(const _0x564a08 of _0x2f59f6['getWalker']({'singleCharacters':!0x0})){const _0x46e4c9=this['_getVidAttributeName'](_0x564a08),_0x149efb=this['_revisionId']++,_0x2c118c='elementEnd'==_0x564a08['type']?_0x564a08['previousPosition']['path']['slice'](0x0,-0x1):_0x564a08['previousPosition']['path'];_0x2dfb34['getNodeByPath'](_0x2c118c)['_setAttribute'](_0x46e4c9,_0x149efb),this['_touched']['set'](_0x149efb,{'userId':_0x2d370b});}}for(const _0x276a13 of this['editor']['model']['createRangeIn'](_0x482aeb)['getWalker']({'singleCharacters':!0x0})){const _0x44f64d=this['_getVidAttributeName'](_0x276a13),_0x3b10b8='elementEnd'==_0x276a13['type']?_0x276a13['previousPosition']['path']['slice'](0x0,-0x1):_0x276a13['previousPosition']['path'],_0x5132ff=_0x2dfb34['getNodeByPath'](_0x3b10b8);_0x5132ff['getAttribute'](_0x44f64d)>0x0||_0x5132ff['_setAttribute'](_0x44f64d,_0x27cf60[_0x2f4571++]);}for(const [_0x58f7e5,_0x2c50f1]of _0x482aeb['markers'])_0x58f7e5['startsWith']('revision:')||this['_markers']['set'](_0x58f7e5,_0x2c50f1);}const {roots:_0x35d891}=this['_savedMetaData']['get'](_0x423772['fromVersion']),{roots:_0x1976f1}=this['_savedMetaData']['get'](_0x423772['toVersion']),_0xf23586=x(_0x35d891['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0xf23586),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xf23586,Number['NEGATIVE_INFINITY']));const _0x2014a6=x(_0x1976f1['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2014a6),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2014a6));const _0x45372f=Array['from'](this['_diffRoots'])['map'](([_0x120968,_0x38f0e6])=>[_0x120968,x(_0x38f0e6)]);this['_saveMetaData'](this['_lastTo'],_0x45372f,this['_markers'],_0x443351);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x43d7bb,_0x3db749,_0x400481,_0x2cefc8){const _0x488185=new Map(_0x3db749),_0x144b1d=new Map(_0x4f8a27(_0x2cefc8)),_0xbeda0=new Map();for(const [_0x53e521,_0x19e030]of _0x400481)_0xbeda0['set'](_0x53e521,{'start':_0x19e030['start']['clone'](),'end':_0x19e030['end']['clone'](),'rootName':_0x19e030['root']['rootName']});this['_savedMetaData']['set'](_0x43d7bb,{'roots':_0x488185,'markers':_0xbeda0,'rootsAttributes':_0x144b1d});}['_removeMetaData'](_0x32cf1f){this['_savedMetaData']['delete'](_0x32cf1f);}['_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'](_0x49f457,_0x61eb9=null){let _0x55a70d=null;_0x49f457['is']('documentFragment')||(_0x55a70d=new _0x47d77c(_0x49f457['name'],{'vid_start':null===_0x61eb9?this['_revisionId']++:_0x61eb9++}));const _0x12f942=[];for(const _0x71d3a9 of _0x49f457['getChildren']())if(_0x71d3a9['is']('element')){_0x12f942['push'](this['_makeIdsRoot'](_0x71d3a9,_0x61eb9));const _0x34f5a7=_0x12f942[_0x12f942['length']-0x1];null!==_0x61eb9&&(_0x61eb9=_0x34f5a7['is']('element','$text')?_0x34f5a7['getAttribute']('vid')+0x1:_0x34f5a7['getAttribute']('vid_end')+0x1);}else{for(let _0x2bbffc=0x0;_0x2bbffc<_0x71d3a9['offsetSize'];_0x2bbffc++)_0x12f942['push'](new _0x47d77c('$text',{'vid':null===_0x61eb9?this['_revisionId']++:_0x61eb9++}));}if(_0x49f457['is']('documentFragment')){const _0x545f2a=N(_0x49f457['rootName']);return _0x545f2a['_insertChild'](0x0,_0x12f942),_0x545f2a;}return _0x55a70d['_setAttribute']('vid_end',null===_0x61eb9?this['_revisionId']++:_0x61eb9++),_0x55a70d['_insertChild'](0x0,_0x12f942),_0x55a70d;}['_calculateMetaData'](_0xb43098,_0x378d6f,_0x4e7d9c){this['_reset']();const {roots:_0x1e9530,markers:_0x577f8c,rootsAttributes:_0x21f634}=this['_savedMetaData']['get'](_0xb43098);this['_baseRoots']=new Map(_0x1e9530),this['_baseRootsAttributes']=new Map(_0x4f8a27(_0x21f634));for(const [_0x2978ec,_0xf548d0]of this['_baseRoots'])if('$graveyard'!==_0x2978ec&&(this['_diffRoots']['set'](_0x2978ec,x(_0xf548d0)),this['_diffRootsAttributes']=new Map(_0x4f8a27(_0x21f634)),_0x4e7d9c)){const _0x2cf06a=this['_revisionId'];this['_idsRoots']['set'](_0x2978ec,this['_makeIdsRoot'](_0xf548d0)),this['_baseIdsRoots']['set'](_0x2978ec,this['_makeIdsRoot'](_0xf548d0,_0x2cf06a));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x4e7d9c&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x3c4127,_0x39fc23]of _0x577f8c){const _0xf81ca4=this['_baseRoots']['get'](_0x39fc23['rootName']),_0x563ea1=this['_diffRoots']['get'](_0x39fc23['rootName']),_0x2332e8=new _0x37ff01(this['_fixPosition'](_0x39fc23['start'],_0xf81ca4),this['_fixPosition'](_0x39fc23['end'],_0xf81ca4)),_0x2f5da3=this['_fixRange'](_0x2332e8,_0x563ea1);_0xf81ca4['markers']['set'](_0x3c4127,_0x2332e8),this['_markers']['set'](_0x3c4127,_0x2f5da3);}this['_applyOperations'](_0xb43098,_0x378d6f,_0x4e7d9c);}['_applyOperations'](_0x30fc48,_0x2361b2,_0x406bcd){for(const _0x3f991e of this['source']['getOperations'](_0x30fc48,_0x2361b2))this['_handleOperation'](_0x3f991e,_0x406bcd);for(const _0x396d53 of this['_diffRoots']['values']())_0x396d53['markers']['clear']();for(const [_0x5879f5,_0x5ae6eb]of this['_markers']){this['_diffRoots']['get'](_0x5ae6eb['root']['rootName'])['markers']['set'](_0x5879f5,_0x5ae6eb['clone']());}const _0x3c881e=new Map(),_0x5f45ab=new Map();for(const [_0x140ef5,_0x64449d]of this['_diffRoots'])_0x3c881e['set'](_0x140ef5,x(_0x64449d)),_0x5f45ab['set'](_0x140ef5,this['_diffRootsAttributes']['get'](_0x140ef5));this['_saveMetaData'](_0x2361b2,_0x3c881e,this['_markers'],_0x5f45ab);}['_getPreviousFrom'](_0x414f51){const _0x231b9d=Array['from'](this['_savedMetaData']['keys']());_0x231b9d['sort']((_0x2137e8,_0x140b79)=>_0x2137e8-_0x140b79),_0x231b9d['reverse']();for(const _0x3977ca of _0x231b9d)if(_0x3977ca<_0x414f51)return _0x3977ca;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x488155,_0x46c7f4){const _0x16c922=Array['from'](_0x46c7f4['markers'])['map'](([_0x5d8dc9,_0xdc42bc])=>[_0x5d8dc9,this['_fixRange'](_0xdc42bc,_0x488155)]);_0x488155['markers']=new Map(_0x16c922);}['_transformMarkers'](_0x5635f1){for(const _0x34221b of this['_markers']['values']()){const _0x19971c=_0x34221b['getTransformedByOperation'](_0x5635f1),_0x49bad9=_0x37ff01['_createFromRanges'](_0x19971c);_0x34221b['start']=_0x49bad9['start'],_0x34221b['end']=_0x49bad9['end'];}}['_handleOperation'](_0x2e5fd3,_0x4ac86c){if('addRoot'!=_0x2e5fd3['type']&&'detachRoot'!=_0x2e5fd3['type']){if('insert'==_0x2e5fd3['type']){const _0x9ce969=_0x2e5fd3['position']['root']['rootName'];this['_diffRoots']['has'](_0x9ce969)||(this['_diffRoots']['set'](_0x9ce969,N(_0x9ce969,!0x0)),this['_diffRootsAttributes']['set'](_0x9ce969,{}),_0x4ac86c&&this['_idsRoots']['set'](_0x9ce969,N(_0x9ce969,!0x0)));}else{if('addRootAttribute'==_0x2e5fd3['type']||'removeRootAttribute'==_0x2e5fd3['type']||'changeRootAttribute'==_0x2e5fd3['type'])return void this['_handleRootAttributeOperation'](_0x2e5fd3);'marker'==_0x2e5fd3['type']&&this['_handleMarkerOperation'](_0x2e5fd3);}if('marker'!==_0x2e5fd3['type']){const _0x5f9194=this['_cloneOperation'](_0x2e5fd3,this['_diffRoots']);_0x5f9194['_execute'](),this['_transformMarkers'](_0x5f9194);}if(_0x4ac86c)switch(_0x2e5fd3['type']){case'insert':this['_handleInsertOperation'](_0x2e5fd3);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2e5fd3);break;case'merge':this['_handleMergeOperation'](_0x2e5fd3);break;case'split':this['_handleSplitOperation'](_0x2e5fd3);}}else this['_handleRootOperation'](_0x2e5fd3,_0x4ac86c);}['_cloneOperation'](_0x45e4f5,_0x1188c8){const _0x368eb3=_0x45e4f5['clone']();return _0x368eb3['_authorId']=_0x45e4f5['_authorId'],this['_fixOperation'](_0x368eb3,_0x1188c8),_0x368eb3;}['_getBaseVids'](_0x4d1cfa){return _0x4d1cfa['map'](_0x2e01f7=>{const _0x3851e8=this['_getVidAttributeName'](_0x2e01f7);return Number(_0x2e01f7['item']['getAttribute'](_0x3851e8));});}['_generateTape'](_0x4706cd,_0x43af37){if(_0x4706cd['is']('element','$text'))_0x43af37['push']({'item':_0x4706cd,'type':'text'});else{_0x4706cd['is']('element')&&_0x43af37['push']({'item':_0x4706cd,'type':'elementStart'});for(const _0x407168 of _0x4706cd['getChildren']())this['_generateTape'](_0x407168,_0x43af37);_0x4706cd['is']('element')&&_0x43af37['push']({'item':_0x4706cd,'type':'elementEnd'});}return _0x43af37;}['_getState'](){const _0x1141a7=new Map(this['_touched']),_0x50e82b=new Map(_0x1141a7),_0x1fae5b=new Map(),_0x36396f={'insertions':{},'deletions':{}},_0x19875f={'insertions':{},'deletions':{}},_0x2f4e17=new Map(),_0xd84e5b=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0xd84e5b['delete']('$graveyard');for(const _0xaae976 of _0xd84e5b){const _0x40e112=this['_diffRoots']['get'](_0xaae976)||N(_0xaae976,!0x1),_0x352836=this['_baseRoots']['get'](_0xaae976)||N(_0xaae976,!0x1);_0x40e112['isAttached']()||_0x352836['isAttached']()?(_0x36396f['insertions'][_0xaae976]=x(_0x40e112),_0x36396f['deletions'][_0xaae976]=x(_0x352836),this['_copyMarkers'](_0x36396f['deletions'][_0xaae976],_0x352836),this['_copyMarkers'](_0x36396f['insertions'][_0xaae976],_0x40e112),_0x19875f['insertions'][_0xaae976]=this['_generateTape'](this['_idsRoots']['get'](_0xaae976),[]),_0x19875f['deletions'][_0xaae976]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xaae976)||N(_0xaae976,!0x1),[])):_0xd84e5b['delete'](_0xaae976);}for(const _0x99f258 of _0xd84e5b){const _0x336ed9=_0x19875f['insertions'][_0x99f258];for(const _0x2be7e8 of _0x336ed9){const _0x167c96=this['_getVidAttributeName'](_0x2be7e8),_0x382c34=_0x2be7e8['item']['getAttribute'](_0x167c96);_0x50e82b['delete'](_0x382c34),_0x382c34>=this['_startingRevisionId']&&_0x1fae5b['set'](_0x382c34,_0x1141a7['get'](_0x382c34));}}for(const _0x2160d1 of _0xd84e5b){const _0x273060=_0x19875f['insertions'][_0x2160d1],_0x284322=this['_getBaseVids'](_0x19875f['deletions'][_0x2160d1]);let _0x1aef2f=0x0;for(const _0x6fb4c of _0x273060){const _0x47d797=this['_getVidAttributeName'](_0x6fb4c),_0x7d8228=_0x6fb4c['item']['getAttribute'](_0x47d797);if(!_0x1fae5b['has'](_0x7d8228)&&!_0x2f4e17['has'](_0x7d8228)){if(_0x50e82b['has'](_0x7d8228))_0x1aef2f++;else{if(_0x7d8228!=_0x284322[_0x1aef2f]){const _0x153b4b=_0x1141a7['get'](_0x7d8228)||_0x1141a7['get'](_0x284322[_0x1aef2f]);for(;_0x7d8228!=_0x284322[_0x1aef2f];)_0x50e82b['has'](_0x284322[_0x1aef2f])||(_0x2f4e17['set'](_0x284322[_0x1aef2f],_0x153b4b),_0x1141a7['set'](_0x284322[_0x1aef2f],_0x153b4b)),_0x1aef2f++;}_0x1aef2f++;}}}}for(const _0x1f31ab of _0xd84e5b){const _0x3ca88e=_0x19875f['insertions'][_0x1f31ab];for(const _0x58126f of _0x3ca88e){const _0x44e018=this['_getVidAttributeName'](_0x58126f),_0xcde16a=_0x58126f['item']['getAttribute'](_0x44e018);if(_0x2f4e17['has'](_0xcde16a)){const _0x3d4250=_0x2f4e17['get'](_0xcde16a);_0x50e82b['has'](_0xcde16a)||_0x50e82b['set'](_0xcde16a,{..._0x3d4250}),_0x1fae5b['set'](_0xcde16a,{..._0x3d4250});}}}for(const _0x345905 of _0x50e82b['keys']())_0x345905>=this['_startingRevisionId']&&_0x50e82b['delete'](_0x345905);const _0x332518=new Map();for(const _0x2f0199 of _0xd84e5b){let _0x3e9a9f=_0x19875f['insertions'][_0x2f0199];for(const _0xbbb0a1 of _0x3e9a9f)if(_0xbbb0a1['item']['is']('element','tableCell')){const _0x13fec6=this['_getVidAttributeName'](_0xbbb0a1),_0x39c514=_0xbbb0a1['item']['getAttribute'](_0x13fec6);if(_0x1fae5b['has'](_0x39c514)){const _0x12a03e=_0xbbb0a1['item']['parent']['parent']['getAttribute']('vid_start'),_0x232fa4=_0x332518['get'](_0x12a03e)||new Set();_0x232fa4['add'](_0x1fae5b['get'](_0x39c514)['userId']),_0x332518['set'](_0x12a03e,_0x232fa4);}}_0x3e9a9f=_0x19875f['deletions'][_0x2f0199];for(const _0x551398 of _0x3e9a9f)if(_0x551398['item']['is']('element','tableCell')){const _0x5eff54=this['_getVidAttributeName'](_0x551398),_0x5e3ad6=_0x551398['item']['getAttribute'](_0x5eff54);if(_0x50e82b['has'](_0x5e3ad6)){const _0x15cf68=_0x551398['item']['parent']['parent']['getAttribute']('vid_start'),_0x3a456b=_0x332518['get'](_0x15cf68)||new Set();_0x3a456b['add'](_0x50e82b['get'](_0x5e3ad6)['userId']),_0x332518['set'](_0x15cf68,_0x3a456b);}}for(const _0x57a916 of _0x332518['keys']())(_0x1fae5b['has'](_0x57a916)||_0x50e82b['has'](_0x57a916))&&_0x332518['delete'](_0x57a916);}for(const _0x5787ea of _0xd84e5b){const _0x2b8b8e=_0x19875f['insertions'][_0x5787ea];let _0x54da94=null,_0x74b0f5=null;for(const _0x188170 of _0x2b8b8e){const _0x439469=this['_getVidAttributeName'](_0x188170),_0x4b5d0e=_0x188170['item']['getAttribute'](_0x439469),_0x2e39ef=_0x332518['get'](_0x4b5d0e);_0x2e39ef&&'elementStart'==_0x188170['type']&&(_0x54da94=Array['from'](_0x2e39ef)[0x0],_0x74b0f5=_0x188170['item']['getAttribute']('vid_end')),_0x54da94&&(_0x50e82b['set'](_0x4b5d0e,{'userId':_0x54da94}),_0x1fae5b['set'](_0x4b5d0e,{'userId':_0x54da94})),_0x4b5d0e==_0x74b0f5&&(_0x54da94=null,_0x74b0f5=null);}}const _0x2eace1={},_0x4997b9=new Set();for(const _0x4fa778 of _0xd84e5b){const _0x4f9d60=_0x36396f['deletions'][_0x4fa778],_0x3269bd=_0x36396f['insertions'][_0x4fa778];for(const {userId:_0x599605}of this['_touchedMarkers']['values']())null!==_0x599605&&_0x4997b9['add'](_0x599605);for(const {userId:_0x294756}of this['_touchedRoots']['values']())null!==_0x294756&&_0x4997b9['add'](_0x294756);this['_markChanges'](_0x3269bd,_0x19875f['insertions'][_0x4fa778],_0x1fae5b,'insertion',_0x4997b9),this['_markChanges'](_0x4f9d60,_0x19875f['deletions'][_0x4fa778],_0x50e82b,'deletion',_0x4997b9),_0x2eace1[_0x4fa778]={'insertions':this['_prepareViewToSave'](_0x3269bd),'deletions':this['_prepareViewToSave'](_0x4f9d60),'attachChange':this['_touchedRoots']['get'](_0x4fa778)||null,'attributesBefore':_0x4f8a27(this['_baseRootsAttributes']['get'](_0x4fa778))||{},'attributesAfter':_0x4f8a27(this['_diffRootsAttributes']['get'](_0x4fa778))};}return{'diffData':_0x2eace1,'authorsIds':Array['from'](_0x4997b9)};}['_processRootBeforeSave'](_0x44854e){for(const [,_0x26cef0]of _0x44854e['markers']){const _0x1bc24b=_0x26cef0['start']['getAncestors']()['filter'](_0x116a1d=>'tableCell'==_0x116a1d['name']);for(const _0xc32d8e of _0x1bc24b)0x1==_0xc32d8e['childCount']&&_0xc32d8e['getChild'](0x0)['is']('element','paragraph')&&_0xc32d8e['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x35080b){this['_processRootBeforeSave'](_0x35080b);const _0x4afe58=this['editor']['data']['toView'](_0x35080b,{}),_0x655d72=Array['from'](_0x4afe58['getChildren']())['map'](_0x3435f7=>this['_getViewJson'](_0x3435f7));return JSON['stringify'](_0x655d72);}['_getViewJson'](_0x1cd6e3){if(_0x1cd6e3['is']('$text'))return _0x1cd6e3['data'];{const _0x394d10=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x40a9bf=_0x1cd6e3,_0x2a7b8a=this['editor']['data']['htmlProcessor']['domConverter'],_0x954312={'type':_0x394d10['_getTypeCharForViewElement'](_0x40a9bf),'name':_0x40a9bf['name'],'attributes':Array['from'](_0x40a9bf['getAttributes']()),'children':Array['from'](_0x40a9bf['getChildren']())['map'](_0x22a151=>this['_getViewJson'](_0x22a151))};if(_0x1cd6e3['is']('uiElement')&&'$comment'!=_0x1cd6e3['name']){const _0x14d9d1=_0x1cd6e3['render'](_0x2a7b8a['domDocument'],_0x2a7b8a);_0x954312['children']['push'](_0x14d9d1['outerHTML']);}else{if(_0x1cd6e3['is']('rawElement')){const _0x2c4132=_0x2a7b8a['domDocument']['createElement'](_0x40a9bf['name']);_0x1cd6e3['render'](_0x2c4132,_0x2a7b8a),_0x954312['children']['push'](_0x2c4132['innerHTML']);}}const _0x5ca054=Array['from'](_0x40a9bf['getCustomProperties']());_0x5ca054['length']>0x0&&(_0x954312['customProperties']=_0x5ca054);const _0x39c580=_0x40a9bf['getFillerOffset']();return null!==_0x39c580&&(_0x954312['fillerOffset']=_0x39c580),_0x954312;}}['_markChanges'](_0x4c3415,_0x1a94ab,_0x5bcff3,_0x1ce5c7,_0x37027b){let _0x1e3c7c=null,_0x3c9271=null,_0x271115=0x0;const _0xfd4e7a=this['editor']['model'];for(let _0x52b707=0x0;_0x52b707<_0x1a94ab['length'];_0x52b707++){const _0x39661b=this['_getVidAttributeName'](_0x1a94ab[_0x52b707]),_0x2cdd19=_0x1a94ab[_0x52b707]['item']['getAttribute'](_0x39661b),_0x326c12=_0x5bcff3['get'](_0x2cdd19),_0x1a4cd4=_0x52b707==_0x1a94ab['length']-0x1;(!_0x1e3c7c&&_0x326c12&&(_0x1e3c7c=_0x326c12,_0x3c9271=_0x1a94ab[_0x52b707]),_0x1e3c7c&&(!_0x326c12||_0x326c12['userId']!=_0x1e3c7c['userId']))&&(_0x231b22(_0x326c12,P(_0x3c9271,_0x4c3415,_0xfd4e7a),P(_0x1a94ab[_0x52b707],_0x4c3415,_0xfd4e7a)),_0x1e3c7c=_0x326c12||null,_0x3c9271=_0x326c12?_0x1a94ab[_0x52b707]:null),_0x1e3c7c&&_0x1a4cd4&&_0x231b22(_0x326c12,P(_0x3c9271,_0x4c3415,_0xfd4e7a),V(_0x1a94ab[_0x52b707],_0x4c3415,_0xfd4e7a));}function _0x231b22(_0x267ac6,_0x145810,_0x290108){const _0x129415=_0x1e3c7c['userId'],_0x2d6385='revision:'+_0x1ce5c7+':'+_0x129415+':'+_0x271115++,_0x4a3f8f=_0xfd4e7a['createRange'](_0x145810,_0x290108);_0x4c3415['markers']['set'](_0x2d6385,_0x4a3f8f),null!==_0x129415&&_0x37027b['add'](_0x129415);}}['_getVidAttributeName'](_0x31c6c2){switch(_0x31c6c2['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x3e9366,_0x149795){_0x3e9366['baseVersion']=null;for(const _0x328fbc in _0x3e9366){const _0x58b58f=_0x3e9366[_0x328fbc];if(_0x58b58f instanceof _0x40c1c3){const _0xe8ce13=_0x149795['get'](_0x58b58f['root']['rootName']);_0x3e9366[_0x328fbc]=this['_fixPosition'](_0x58b58f,_0xe8ce13);}if(_0x58b58f instanceof _0x37ff01){const _0x1e2232=_0x149795['get'](_0x58b58f['root']['rootName']);_0x3e9366[_0x328fbc]=this['_fixRange'](_0x58b58f,_0x1e2232);}'root'===_0x328fbc&&(_0x3e9366['root']=_0x149795['get'](_0x3e9366['root']['rootName']));}}['_fixRange'](_0xc0fb3,_0x806e56){return this['editor']['model']['createRange'](this['_fixPosition'](_0xc0fb3['start'],_0x806e56),this['_fixPosition'](_0xc0fb3['end'],_0x806e56));}['_fixPosition'](_0xb4a03e,_0x1506ba){return this['editor']['model']['createPositionFromPath'](_0x1506ba,_0xb4a03e['path'],_0xb4a03e['stickiness']);}['_handleInsertOperation'](_0x5c715c){const _0x1efbf2=this['_idsRoots']['get'](_0x5c715c['position']['root']['rootName']),_0x12ae08=this['_fixPosition'](_0x5c715c['position'],_0x1efbf2),_0x54e3cb=null===_0x5c715c['_authorId']?null:_0x5c715c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1eda24=_0x12ae08['parent'],_0x4d0bf9=this['_revisionId'],_0xa879f8=[];for(const _0x5228e4 of _0x5c715c['nodes'])if(_0x5228e4['is']('element'))_0xa879f8['push'](this['_makeIdsRoot'](_0x5228e4));else{for(let _0xd32503=0x0;_0xd32503<_0x5228e4['offsetSize'];_0xd32503++)_0xa879f8['push'](new _0x47d77c('$text',{'vid':this['_revisionId']++}));}const _0x5b2d7b=this['_revisionId'];for(let _0x4f66e7=_0x4d0bf9;_0x4f66e7<_0x5b2d7b;_0x4f66e7++)this['_touched']['set'](_0x4f66e7,{'userId':_0x54e3cb});_0x1eda24['_insertChild'](_0x12ae08['offset'],_0xa879f8);}['_handleMoveOperation'](_0x1726a6){(_0x1726a6=this['_cloneOperation'](_0x1726a6,this['_idsRoots']))['_execute']();const _0x56f4dd=null===_0x1726a6['_authorId']?null:_0x1726a6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5efc2d=_0x1726a6['getMovedRangeStart'](),_0x325593=_0x5efc2d['parent'],_0x355745=_0x5efc2d['offset'];!function _0x4b80fa(_0x335f07,_0x43f1ce,_0x13f748,_0x2ad454){for(let _0x41ef01=_0x13f748;_0x41ef01<_0x2ad454;_0x41ef01++){const _0x53f2cc=_0x43f1ce['getChild'](_0x41ef01);_0x53f2cc['is']('element','$text')?_0x335f07['set'](_0x53f2cc['getAttribute']('vid'),{'userId':_0x56f4dd}):(_0x335f07['set'](_0x53f2cc['getAttribute']('vid_start'),{'userId':_0x56f4dd}),_0x4b80fa(_0x335f07,_0x53f2cc,0x0,_0x53f2cc['childCount']),_0x335f07['set'](_0x53f2cc['getAttribute']('vid_end'),{'userId':_0x56f4dd}));}}(this['_touched'],_0x325593,_0x355745,_0x355745+_0x1726a6['howMany']);}['_handleMergeOperation'](_0x1e0bf5){const _0x1ef195=null===(_0x1e0bf5=this['_cloneOperation'](_0x1e0bf5,this['_idsRoots']))['_authorId']?null:_0x1e0bf5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x10f582=_0x1e0bf5['targetPosition']['parent'],_0x462ae4=_0x1e0bf5['sourcePosition']['parent'],_0x1d698c=_0x10f582['getAttribute']('vid_end'),_0x45bccf=_0x462ae4['getAttribute']('vid_start');_0x10f582['_setAttribute']('vid_end',_0x462ae4['getAttribute']('vid_end')),_0x462ae4['_setAttribute']('vid_end',_0x1d698c),this['_touched']['set'](_0x45bccf,{'userId':_0x1ef195}),this['_touched']['set'](_0x1d698c,{'userId':_0x1ef195}),_0x1e0bf5['_execute']();}['_handleSplitOperation'](_0x2579af){const _0x35823b=null===(_0x2579af=this['_cloneOperation'](_0x2579af,this['_idsRoots']))['_authorId']?null:_0x2579af['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3849fb=_0x2579af['graveyardPosition'],_0x5f2e42=_0x2579af['splitPosition']['parent'];_0x2579af['_execute']();const _0xc79b9d=_0x5f2e42['getAttribute']('vid_end'),_0x5c3478=_0x2579af['insertionPosition']['nodeAfter'];if(_0x3849fb){const _0x12aa4f=_0x5c3478['getAttribute']('vid_end'),_0x238061=_0x5f2e42['getAttribute']('vid_end');_0x5f2e42['_setAttribute']('vid_end',_0x12aa4f),_0x5c3478['_setAttribute']('vid_end',_0x238061),this['_touched']['set'](_0x5f2e42['getAttribute']('vid_end'),{'userId':_0x35823b}),this['_touched']['set'](_0x5c3478['getAttribute']('vid_start'),{'userId':_0x35823b});}else{const _0x595346=this['_revisionId']++,_0x338e67=this['_revisionId']++;_0x5f2e42['_setAttribute']('vid_end',_0x595346),_0x5c3478['_setAttribute']('vid_start',_0x338e67),_0x5c3478['_setAttribute']('vid_end',_0xc79b9d),this['_touched']['set'](_0x595346,{'userId':_0x35823b}),this['_touched']['set'](_0x338e67,{'userId':_0x35823b});}}['_handleMarkerOperation'](_0x45fe71){if(!_0x45fe71['affectsData'])return;const _0x5319e2=(_0x45fe71=this['_cloneOperation'](_0x45fe71,this['_diffRoots']))['oldRange']?_0x45fe71['oldRange']['root']:null,_0x4cd85c=_0x45fe71['newRange']?_0x45fe71['newRange']['root']:null;_0x5319e2&&this['_markers']['delete'](_0x45fe71['name']),_0x4cd85c&&this['_markers']['set'](_0x45fe71['name'],_0x45fe71['newRange']['clone']());const _0x461b8c=null===_0x45fe71['_authorId']?null:_0x45fe71['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x50eb09=_0x45fe71['name'];if(!this['_touchedMarkers']['has'](_0x50eb09))return void this['_touchedMarkers']['set'](_0x50eb09,{'range':_0x45fe71['oldRange'],'userId':_0x461b8c});const _0x59b261=this['_touchedMarkers']['get'](_0x50eb09),_0x11861c=_0x59b261['range'],_0x1034ff=_0x45fe71['newRange'];null==_0x11861c&&null==_0x1034ff||_0x11861c&&_0x1034ff&&_0x11861c['isEqual'](_0x1034ff)?this['_touchedMarkers']['delete'](_0x45fe71['name']):_0x59b261['userId']=_0x461b8c;}['_handleRootOperation'](_0x86c96b,_0x54f04e){this['_diffRoots']['has'](_0x86c96b['rootName'])?this['_diffRoots']['get'](_0x86c96b['rootName'])['_isAttached']=_0x86c96b['isAdd']:(this['_diffRoots']['set'](_0x86c96b['rootName'],N(_0x86c96b['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x86c96b['rootName'],{}),_0x54f04e&&this['_idsRoots']['set'](_0x86c96b['rootName'],N(_0x86c96b['rootName'],!0x0)));const _0x1dcd3b=null===_0x86c96b['_authorId']?null:_0x86c96b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x421917=this['_touchedRoots']['get'](_0x86c96b['rootName']);_0x421917&&_0x421917['userId']===_0x1dcd3b?this['_touchedRoots']['delete'](_0x86c96b['rootName']):this['_touchedRoots']['set'](_0x86c96b['rootName'],{'userId':_0x1dcd3b,'isAttached':_0x86c96b['isAdd']});}['_handleRootAttributeOperation'](_0x424b0d){const _0x246638=this['_diffRootsAttributes']['get'](_0x424b0d['root']['rootName']);null===_0x424b0d['newValue']?delete _0x246638[_0x424b0d['key']]:_0x246638[_0x424b0d['key']]=_0x424b0d['newValue'];}}function x(_0xf5b30d){const _0xb9d20c=N(_0xf5b30d['rootName'],_0xf5b30d['isAttached']());for(const _0x3cba62 of _0xf5b30d['getChildren']()){const _0x2693aa=_0x3cba62['_clone'](!0x0);_0xb9d20c['_appendChild'](_0x2693aa);}return _0xb9d20c;}function N(_0x31a93a,_0x4ed15b=!0x0){const _0x4f3ac7=new _0x451b26();return _0x4f3ac7['rootName']=_0x31a93a,_0x4f3ac7['_isAttached']=_0x4ed15b,_0x4f3ac7['isAttached']=()=>_0x4f3ac7['_isAttached'],_0x4f3ac7;}function P(_0x5b7e49,_0x2c5727,_0x118b2e){const _0x58c12a='elementEnd'==_0x5b7e49['type']?_0x118b2e['createPositionAt'](_0x5b7e49['item'],'end'):_0x118b2e['createPositionBefore'](_0x5b7e49['item']);return _0x118b2e['createPositionFromPath'](_0x2c5727,_0x58c12a['path'],_0x58c12a['stickiness']);}function V(_0x306604,_0x1e0393,_0x21ebf0){const _0x542263='elementStart'==_0x306604['type']?_0x21ebf0['createPositionAt'](_0x306604['item'],0x0):_0x21ebf0['createPositionAfter'](_0x306604['item']);return _0x21ebf0['createPositionFromPath'](_0x1e0393,_0x542263['path'],_0x542263['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
+ _0x318d59(_0x14bc2f){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x350bbb,_0x493b18){super(_0x350bbb),this['focusTracker']=new _0x26f73d(),this['keystrokes']=new _0x3a8c7b(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x493b18),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'](),_0x525df1({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x295808=_0x4916a0=>_0x4916a0['stopPropagation']();this['keystrokes']['set']('arrowright',_0x295808),this['keystrokes']['set']('arrowleft',_0x295808),this['keystrokes']['set']('arrowup',_0x295808),this['keystrokes']['set']('arrowdown',_0x295808);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2b3cbe){this['revisionNameInputView']['fieldView']['element']['value']=_0x2b3cbe['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x224e0b){const _0x1f9b69=new ti(this['locale'],_0x8e7e4f),_0x34a7e5=_0x1f9b69['fieldView'];_0x34a7e5['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x5416e7=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x224e0b&&(_0x5416e7+='\x20('+m(this['locale'],'optional')+')'),(_0x1f9b69['label']=_0x5416e7,_0x34a7e5['on']('input',()=>{this['revisionNameInputValue']=_0x34a7e5['element']['value']['trim']();}),_0x1f9b69);}}class l extends _0x2182b9{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x27567e=this['editor'],_0x11614c=_0x27567e['plugins']['get']('RevisionTracker');_0x27567e['ui']['componentFactory']['add']('revisionHistory',_0x58b78d=>{const _0x40c1b9=_0x25a564(_0x58b78d),_0x2c6d54=_0x40c1b9['panelView']['children'],_0x17be68=new _0x24a0ed(_0x58b78d),_0x150216=new _0x4cdef9(_0x58b78d),_0x130fef=new _0x534191(_0x58b78d),_0x47a6ed=new _0x4cdef9(_0x58b78d),_0x437b14=new _0x534191(_0x58b78d);return _0x40c1b9['bind']('isEnabled')['to'](_0x11614c,'isReady',_0x11614c,'isEnabled',_0x27567e,'isReadOnly',(_0x363e5a,_0x13cddd,_0x4a62b8)=>_0x363e5a&&_0x13cddd&&!_0x4a62b8),_0x40c1b9['buttonView']['set']({'icon':_0x1377de,'label':m(_0x58b78d,'Revision\x20history'),'tooltip':!0x0}),_0x130fef['set']({'label':m(_0x58b78d,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x130fef['bind']('isEnabled')['to'](_0x11614c,'isReady',_0x11614c,'isEnabled',_0x27567e,'isReadOnly',(_0x3e2c8c,_0x2dba88,_0x25b2e2)=>_0x3e2c8c&&_0x2dba88&&!_0x25b2e2),_0x130fef['on']('execute',()=>this['_showDialog']()),_0x437b14['set']({'label':m(_0x58b78d,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x437b14['bind']('isEnabled')['to'](_0x11614c,'isReady',_0x27567e,'isReadOnly',(_0x7f76cc,_0x2a2736)=>_0x7f76cc&&!_0x2a2736),_0x437b14['on']('execute',()=>{_0x27567e['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x40c1b9['isOpen']=!0x1,_0x27567e['editing']['view']['focus']();}),_0x150216['children']['add'](_0x130fef),_0x47a6ed['children']['add'](_0x437b14),_0x17be68['role']='menu',_0x17be68['items']['addMany']([_0x150216,_0x47a6ed]),_0x2c6d54['add'](_0x17be68),_0x40c1b9;}),_0x27567e['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x579b52=this['editor'],_0x51810d=_0x579b52['locale'],_0x46bc33=new _0x514422(_0x51810d),_0x188a7b=new _0x111e3c(_0x51810d);_0x46bc33['buttonView']['set']({'icon':_0x1377de,'label':m(_0x51810d,'Revision\x20history')});const _0x243113=new _0x32e68f(_0x51810d,_0x46bc33),_0x3c259e=new _0x7f5db(_0x51810d);_0x3c259e['set']({'label':m(_0x51810d,'Save\x20current\x20revision')}),_0x3c259e['delegate']('execute')['to'](_0x46bc33),_0x3c259e['on']('execute',()=>{this['_showDialog']();}),_0x243113['children']['add'](_0x3c259e),_0x188a7b['items']['add'](_0x243113);const _0x1dda34=new _0x32e68f(_0x51810d,_0x46bc33),_0x4f19ce=new _0x7f5db(_0x51810d);return _0x4f19ce['set']({'label':m(_0x51810d,'Open\x20revision\x20history')}),_0x4f19ce['delegate']('execute')['to'](_0x46bc33),_0x4f19ce['on']('execute',()=>{_0x579b52['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x1dda34['children']['add'](_0x4f19ce),_0x188a7b['items']['add'](_0x1dda34),_0x46bc33['panelView']['children']['add'](_0x188a7b),_0x46bc33;}['_showDialog'](){const _0x525075=this['editor'],_0x4f2af6=_0x525075['locale'],_0x1c271c=_0x525075['plugins']['get']('Dialog'),_0xe90b4b=_0x525075['plugins']['get']('RevisionTracker');function _0x2f0a3f(_0x2378f0){_0x525075['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2378f0['revisionName']?_0x2378f0['revisionNameInputView']['errorText']=m(_0x4f2af6,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x525075['plugins']['get'](h)['saveRevision']({'name':_0x2378f0['revisionName']}),_0x1c271c['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x2f0a3f(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x1c271c['show']({'id':'revisionSave','title':m(_0x4f2af6,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x525075['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x1c271c['hide']()},{'label':m(_0x525075['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x5d086c){_0x5d086c['bind']('isEnabled')['to'](_0xe90b4b,'isReady',_0xe90b4b,'isEnabled',_0x525075,'isReadOnly',(_0x1a8c5e,_0x4dd02a,_0x57057e)=>_0x1a8c5e&&_0x4dd02a&&!_0x57057e);},'onExecute':()=>_0x2f0a3f(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x284b0b=this['editor'],_0x37a35a=_0x284b0b['locale'];this['_saveRevisionFormView']=new he(_0x37a35a,_0x284b0b['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x14bc2f{['changeId'];['_model'];constructor(_0x1bc711,_0x27e096){super(_0x1bc711),this['_model']=_0x27e096,this['changeId']=_0x27e096['id'];const _0x83ba28=this['bindTemplate'],_0x15fc05=m(_0x1bc711,_0x27e096['data']['isSuggestion']?'Suggested\x20by':'add'==_0x27e096['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x27e096['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x83ba28['to']('type',_0x476e66=>'ck-revision-change__'+_0x476e66)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x15fc05}]},{'text':'\x20'+_0x27e096['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x390267(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x264e9d){super(),this['id']=_0x264e9d['id']||_0x3ca1e2(),this['author']=_0x264e9d['author'],this['type']=_0x264e9d['type'],this['data']=_0x264e9d['data']||{},this['rootName']=_0x264e9d['rootName'],this['set']('createdAt',_0x264e9d['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(_0x9b9280,_0x254040){this['newRevisionId']=_0x9b9280,this['oldRevisionId']=_0x254040,this['changes']=new _0x401ff4();}['_setChanges'](_0x2f3dcc){for(const _0x3bd8a5 of _0x2f3dcc)this['changes']['add'](_0x3bd8a5);}}class u extends _0x2182b9{['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[_0x491e76,_0x5c9009,S,$];}constructor(_0x775e98){super(_0x775e98),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',(_0x2e7db1,_0x12bc9e,_0x15688a)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x255781=>{for(const _0x19d4eb of this['editor']['editing']['view']['document']['roots'])_0x15688a?_0x255781['removeClass']('ck-editor__editable__overlay',_0x19d4eb):_0x255781['addClass']('ck-editor__editable__overlay',_0x19d4eb);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x489b37=>null!==_0x489b37),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x27c50d,_0x16ab28,_0x184b38)=>_0x27c50d&&_0x184b38?_0x16ab28['changes']['getIndex'](_0x184b38):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x5f2774,_0x175340)=>_0x5f2774?_0x175340['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x5c9009);}['init'](){const _0x3a9f27=this['editor'],_0x1dc8a0=new ot(_0x3a9f27,{'direction':'backward'}),_0x12d5fd=new ot(_0x3a9f27,{'direction':'forward'});(_0x3a9f27['commands']['add']('showPreviousChange',_0x1dc8a0),_0x3a9f27['commands']['add']('showNextChange',_0x12d5fd),_0x3a9f27['commands']['add']('restoreRevision',new nt(_0x3a9f27)),this['on']('change:numberOfChanges',()=>{_0x1dc8a0['refresh'](),_0x12d5fd['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x3a9f27['enableReadOnlyMode']('revision-viewer'),_0x3a9f27['plugins']['has']('WidgetToolbarRepository'))&&_0x3a9f27['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x1ba1d3){return await this['_utils']['loadRevisionData'](_0x1ba1d3,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1ba1d3);}async['getRevisionRootsAttributes'](_0x465bda){return await this['_utils']['loadRevisionData'](_0x465bda,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x465bda);}async['compare'](_0x1c5dc0,_0x2e8532,_0x580b64=!0x1){if(!this['isEnabled'])return;const _0x406940=this['diff'],_0x438ecb=this['repository'],_0x5928dc='string'==typeof _0x1c5dc0?_0x438ecb['getRevision'](_0x1c5dc0):_0x1c5dc0,_0x119d80='string'==typeof _0x2e8532?_0x438ecb['getRevision'](_0x2e8532):_0x2e8532,_0xfda1d1=_0x5928dc['id'],_0x1c4919=_0x119d80?_0x119d80['id']:null;if(!_0x580b64&&this['diff']&&this['diff']['newRevisionId']===_0xfda1d1&&this['diff']['oldRevisionId']===_0x1c4919)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0xfda1d1,_0x1c4919);const _0x51b3a6=this['_getRevisionsRange'](_0x5928dc,_0x119d80,!0x0)['map'](_0x26007f=>this['_utils']['loadRevisionData'](_0x26007f,this['adapter']));return _0x51b3a6['push'](new Promise(_0x1ac016=>{setTimeout(_0x1ac016,0x14);})),Promise['all'](_0x51b3a6)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4711ca=this['_getDiff'](_0xfda1d1,_0x1c4919);for(const _0x1e30f7 of _0x4711ca['changes'])this['_changeIdToChange']['set'](_0x1e30f7['id'],_0x1e30f7);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1d967f=>{for(const _0x5dd2d0 of this['editor']['model']['document']['getRootNames']())_0x1d967f['detachRoot'](_0x5dd2d0);for(const _0x5d09c8 of Object['keys'](_0x4711ca['model'])){const _0x356dba=_0x1d967f['addRoot'](_0x5d09c8);for(const _0x42f678 of Object['keys'](_0x4711ca['attributes'][_0x5d09c8]))_0x1d967f['setAttribute'](_0x42f678,_0x4711ca['attributes'][_0x5d09c8][_0x42f678],_0x356dba);_0x1d967f['insert'](_0x4711ca['model'][_0x5d09c8],_0x356dba,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4711ca['changes'])),this['isReady']=!0x0;})['catch'](_0x80f5b9=>{console['error'](_0x80f5b9),this['_cleanUp'](),_0x406940&&(this['diff']=_0x406940),this['isReady']=!0x0;});}['addRevisionData'](_0x55873d,_0x47ac12){const _0x5da7b6=this['repository']['createRevision'](_0x55873d);return _0x5da7b6['on']('_update',(_0x228544,_0x211cc5,_0x2b16cf)=>_0x47ac12(_0x211cc5,_0x2b16cf,_0x5da7b6)),this['repository']['addRevision'](_0x5da7b6),_0x5da7b6;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3dde53=>{for(const _0x491e04 of this['editor']['model']['document']['getRootNames']())_0x3dde53['detachRoot'](_0x491e04);});}['_sortAndFilterDiffChanges'](_0x1f9a65){const _0x580e5b=[],_0x17381a=new Map();for(const _0x211531 of this['editor']['model']['document']['getRootNames']()){const _0x5b1273=this['editor']['editing']['view']['getDomRoot'](_0x211531);if(!_0x5b1273)continue;const _0x58ad62=_0x5b1273['getClientRects']()['item'](0x0);_0x58ad62&&(_0x580e5b['push'](_0x211531),_0x17381a['set'](_0x211531,_0x58ad62));}return _0x580e5b['sort']((_0x3f061b,_0xb86763)=>{const _0x52a7dd=_0x17381a['get'](_0x3f061b),_0x984bb3=_0x17381a['get'](_0xb86763);return _0x52a7dd['y']-_0x984bb3['y']||_0x52a7dd['x']-_0x984bb3['x'];}),(_0x1f9a65=_0x1f9a65['filter'](_0x444f08=>_0x580e5b['includes'](_0x444f08['rootName'])))['sort']((_0x233747,_0xaa3c6a)=>_0x580e5b['indexOf'](_0x233747['rootName'])-_0x580e5b['indexOf'](_0xaa3c6a['rootName'])),_0x1f9a65;}['_makeTape'](_0x595192){const _0x25d5b1=Array['from'](_0x595192['markers'])['filter'](([_0xf309f8,_0x71fc6a])=>_0xf309f8['startsWith']('revision:')&&!_0x71fc6a['isCollapsed']),_0x3b5fd6=Array['from'](this['editor']['model']['createRangeIn'](_0x595192)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x25d5b1['length'])for(const _0x5a1bc9 of _0x3b5fd6){const [_0x40f60,_0x532b58]=_0x25d5b1[0x0],[,_0x3a1c6c,_0xff658c]=_0x40f60['split'](':');if(_0x532b58['end']['isEqual'](_0x5a1bc9['nextPosition'])&&_0x25d5b1['shift'](),(_0x5a1bc9['previousPosition']['isEqual'](_0x532b58['start'])||_0x5a1bc9['previousPosition']['isAfter'](_0x532b58['start']))&&('insertion'==_0x3a1c6c?_0x5a1bc9['isAdded']={'userId':_0xff658c}:'deletion'==_0x3a1c6c&&(_0x5a1bc9['isRemoved']={'userId':_0xff658c})),0x0==_0x25d5b1['length'])break;}return _0x3b5fd6;}['_refreshStartEndIndex'](_0x51f551){const _0x1d8d47=new Map();for(let _0x802457=0x0;_0x802457<_0x51f551['length'];_0x802457++)'text'===_0x51f551[_0x802457]['type']?(_0x51f551[_0x802457]['item']['startIndex']=_0x802457,_0x51f551[_0x802457]['item']['endIndex']=_0x802457):('elementStart'===_0x51f551[_0x802457]['type']?_0x51f551[_0x802457]['item']['startIndex']=_0x802457:'elementEnd'===_0x51f551[_0x802457]['type']&&(_0x51f551[_0x802457]['item']['endIndex']=_0x802457),_0x1d8d47['set'](_0x51f551[_0x802457]['id'],_0x802457));for(const _0x257bc6 of _0x1d8d47['values']())'elementStart'===_0x51f551[_0x257bc6]['type']?_0x51f551[_0x257bc6]['item']['endIndex']=_0x1d8d47['get'](_0x51f551[_0x257bc6]['pairId']):'elementEnd'===_0x51f551[_0x257bc6]['type']&&(_0x51f551[_0x257bc6]['item']['startIndex']=_0x1d8d47['get'](_0x51f551[_0x257bc6]['pairId']));}['_processTape'](_0x245bc5){for(let _0x339520=0x0;_0x339520<_0x245bc5['length'];_0x339520++){if('elementStart'===_0x245bc5[_0x339520]['type'])_0x245bc5[_0x339520]['item']['startIndex']=_0x339520;else{if('elementEnd'===_0x245bc5[_0x339520]['type']){_0x245bc5[_0x339520]['item']['endIndex']=_0x339520;const _0x13a5db=_0x245bc5[_0x339520]['item']['startIndex'];_0x245bc5[_0x13a5db]['pairId']=_0x245bc5[_0x339520]['id'],_0x245bc5[_0x339520]['pairId']=_0x245bc5[_0x13a5db]['id'];}else _0x245bc5[_0x339520]['item']['startIndex']=_0x339520,_0x245bc5[_0x339520]['item']['endIndex']=_0x339520,_0x245bc5[_0x339520]['pairId']=null;}_0x245bc5[_0x339520]['markersStart']||(_0x245bc5[_0x339520]['markersStart']=[],_0x245bc5[_0x339520]['markersEnd']=[]);}}['_markInsertions'](_0x2ef22b,_0x5d8335){const _0x4e4d74=_0x2ef22b['filter'](_0x3e5a8a=>!_0x3e5a8a['isAdded']);for(let _0x36384d=0x0;_0x36384d<_0x5d8335['length'];_0x36384d++)_0x5d8335[_0x36384d]['isAdded']&&(_0x4e4d74[_0x36384d]['isAdded']=_0x5d8335[_0x36384d]['isAdded']);}['_getDiff'](_0x2f3d66,_0x4c6c67=null){const _0x237a3e=this['repository']['getRevision'](_0x2f3d66),_0x318651=_0x4c6c67?this['repository']['getRevision'](_0x4c6c67):null,_0x215be9=this['_getRevisionsRange'](_0x237a3e,_0x318651),_0x445f66=_0x215be9[_0x215be9['length']-0x1],_0x30cbd8=new Map(),_0x2fe8e6={'model':{},'attributes':{},'changes':[]},_0x2a954a=new Set(),_0xfcf78=new Map();for(let _0x2a89c7=_0x215be9['length']-0x1;_0x2a89c7>=0x0;_0x2a89c7--){const _0x427322=_0x215be9[_0x2a89c7];for(const _0x3f9ee0 of Object['keys'](_0x427322['diffData']))if(_0x427322['diffData'][_0x3f9ee0]['attachChange']){const _0x5ac175=_0x427322['diffData'][_0x3f9ee0]['attachChange'];_0x5ac175['isAttached']?(_0x2a954a['add'](_0x3f9ee0),_0xfcf78['has'](_0x3f9ee0)&&_0xfcf78['get'](_0x3f9ee0)['userId']==_0x5ac175['userId']?_0xfcf78['delete'](_0x3f9ee0):_0xfcf78['set'](_0x3f9ee0,_0x5ac175)):_0xfcf78['has'](_0x3f9ee0)?(_0x2a954a['delete'](_0x3f9ee0),_0xfcf78['delete'](_0x3f9ee0)):(_0x2a954a['add'](_0x3f9ee0),_0xfcf78['set'](_0x3f9ee0,_0x5ac175));}else _0x2a954a['add'](_0x3f9ee0);}for(const _0x3d8bb3 of _0x2a954a){const _0x4e7c3a=_0xfcf78['has'](_0x3d8bb3)&&!_0xfcf78['get'](_0x3d8bb3)['isAttached'];let _0x325d40=_0x4e7c3a?_0x215be9['length']-0x1:0x0;const _0x49a2bd=_0x4e7c3a?-0x1:0x1;for(;_0x215be9[_0x325d40];){const _0x3c3808=_0x215be9[_0x325d40];if(_0x3c3808['diffData'][_0x3d8bb3]){const _0xd8e916=_0x4e7c3a?_0x3c3808['diffData'][_0x3d8bb3]['attributesBefore']:_0x3c3808['diffData'][_0x3d8bb3]['attributesAfter'];_0x2fe8e6['attributes'][_0x3d8bb3]=_0xd8e916?_0x4f8a27(_0xd8e916):{};break;}_0x325d40+=_0x49a2bd;}}for(const _0xb357c9 of _0x215be9){_0xb357c9['model']={};for(const _0x335907 of _0xb357c9['authors'])_0x30cbd8['set'](_0x335907['id'],_0x335907);for(const _0x5c7914 of _0x2a954a){const _0x4ff73f=_0xb357c9['diffData'][_0x5c7914]?_0xb357c9['diffData'][_0x5c7914]['insertions']:'[]',_0x318b3d=_0xb357c9['diffData'][_0x5c7914]?_0xb357c9['diffData'][_0x5c7914]['deletions']:'[]';_0xb357c9['model'][_0x5c7914]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4ff73f),'deletions':this['_utils']['_makeModelFromViewString'](_0x318b3d)};}}for(const _0x2a7d99 of _0x2a954a){let _0x114b6d=null,_0x352b68=0x0;const _0x8d745e=new Map(Array['from'](_0x237a3e['model'][_0x2a7d99]['insertions']['markers'])['filter'](([_0xf47235])=>!_0xf47235['startsWith']('revision:')));let _0x4c5dd7=0x0;for(const _0x4cdbe2 of _0x215be9){const _0x5d6bb7=this['_makeTape'](_0x4cdbe2['model'][_0x2a7d99]['insertions']);_0x4cdbe2==_0x237a3e?(_0x114b6d=_0x5d6bb7,_0x352b68=_0x114b6d['length'],_0x114b6d['forEach'](_0x498f67=>{_0x498f67['id']=_0x4c5dd7++;}),this['_processTape'](_0x114b6d)):this['_markInsertions'](_0x114b6d,_0x5d6bb7);const _0x1947e4=_0x114b6d['filter'](_0xabb061=>!_0xabb061['isAdded'])['map'](_0x379aff=>_0x379aff['id']);let _0x1444cc=0x0;const _0x5f2ae6=this['_makeTape'](_0x4cdbe2['model'][_0x2a7d99]['deletions']);_0x5f2ae6['forEach'](_0x1a06d4=>{_0x1a06d4['isRemoved']?_0x1a06d4['id']=_0x352b68++:_0x1a06d4['id']=_0x1947e4[_0x1444cc++];}),this['_processTape'](_0x5f2ae6),this['_setDistance'](_0x114b6d,'isAdded'),this['_setDistance'](_0x5f2ae6,'isRemoved'),_0x4cdbe2==_0x237a3e&&this['_markMarkers'](_0x114b6d,_0x8d745e),_0x114b6d=this['_joinTapes'](_0x114b6d,_0x5f2ae6),this['_refreshStartEndIndex'](_0x114b6d),this['_setDistance'](_0x114b6d,'isRemoved');}_0x114b6d=_0x114b6d['filter'](_0x324d80=>!(_0x324d80['isAdded']&&_0x324d80['isRemoved']));const _0x1fc437=new Map(_0x445f66['model'][_0x2a7d99]['deletions']['markers']),_0x3950d0=new Set(_0x8d745e['keys']());for(const _0x74deab of _0x1fc437['keys']())_0x3950d0['delete'](_0x74deab);this['_markSuggestions'](_0x114b6d,_0x3950d0),this['_fixObsoleteTags'](_0x114b6d),_0x114b6d=this['_removeMissingPairs'](_0x114b6d),_0x114b6d=this['_markMismatchedRemovedTags'](_0x114b6d),_0x114b6d=this['_removeUnsupportedChanges'](_0x114b6d);const {root:_0x1d3984,changes:_0x1d6f67}=this['_makeModelFromTape'](_0x114b6d,_0x30cbd8,_0x2a7d99);_0x2fe8e6['model'][_0x2a7d99]=_0x1d3984;const _0x4638e9=_0xfcf78['get'](_0x2a7d99);if(_0x4638e9){const _0x3c0f2e=_0x30cbd8['get'](_0x4638e9['userId']),_0x508a0a=new G({'author':_0x3c0f2e,'type':_0x4638e9['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x2a7d99});_0x1d6f67['unshift'](_0x508a0a),_0x2fe8e6['attributes'][_0x2a7d99]['revisionHistoryAttachChange']=_0x508a0a['id'];}_0x2fe8e6['changes']=_0x2fe8e6['changes']['concat'](_0x1d6f67);}return _0x2fe8e6;}['_markMarkers'](_0x42410e,_0x76187c){for(let _0x193ecd=0x0;_0x193ecd<_0x42410e['length'];_0x193ecd++)for(const [_0x14e8fe,_0x149d30]of _0x76187c)!_0x149d30['isCollapsed']&&_0x149d30['start']['isEqual'](_0x42410e[_0x193ecd]['previousPosition'])&&_0x42410e[_0x193ecd]['markersStart']['push'](_0x14e8fe),_0x149d30['end']['isEqual'](_0x42410e[_0x193ecd]['nextPosition'])&&_0x42410e[_0x193ecd]['markersEnd']['push'](_0x14e8fe);}['_joinTapes'](_0xa52a37,_0x343301){let _0x7357b4=[],_0x581738=0x0,_0xd39ea5=0x0;for(;_0x581738<_0xa52a37['length']||_0xd39ea5<_0x343301['length'];){const _0x5a72db=_0xa52a37[_0x581738]||{},_0x33ad54=_0x343301[_0xd39ea5]||{};if(_0x5a72db['id']==_0x33ad54['id'])_0x581738++,_0xd39ea5++,_0x7357b4['push'](_0x5a72db);else{if(_0x33ad54['isRemoved']&&_0x5a72db['isAdded']){const {commonTape:_0x2491be,iEnd:_0xe3aeda,jEnd:_0x33a16b}=this['_threeWayMerge'](_0xa52a37,_0x581738,_0x343301,_0xd39ea5);_0x7357b4=_0x7357b4['concat'](_0x2491be),_0x581738=_0xe3aeda,_0xd39ea5=_0x33a16b;}else _0x33ad54['isRemoved']?(_0xd39ea5++,_0x7357b4['push'](_0x33ad54)):(_0x581738++,_0x7357b4['push'](_0x5a72db));}}return _0x7357b4;}['_markSuggestions'](_0x182ef3,_0x52e207){const _0x44604f=[];for(let _0x268e4f=0x0;_0x268e4f<_0x182ef3['length'];_0x268e4f++){for(let _0x5bc794=0x0;_0x5bc794<_0x182ef3[_0x268e4f]['markersStart']['length'];_0x5bc794++){const _0x53ca85=_0x182ef3[_0x268e4f]['markersStart'][_0x5bc794];if(!_0x52e207['has'](_0x53ca85))continue;const {group:_0x55eaa8,type:_0x510332,authorId:_0x12032d}=_0x57b156(_0x53ca85);'revision-suggestion'!=_0x55eaa8||'insertion'!=_0x510332&&'deletion'!=_0x510332||(_0x44604f['unshift']({'type':_0x510332,'name':_0x53ca85,'userId':_0x12032d}),_0x182ef3[_0x268e4f]['markersStart']['splice'](_0x5bc794,0x1),_0x5bc794--);}_0xb328eb(_0x182ef3[_0x268e4f]);for(let _0x2dba05=0x0;_0x2dba05<_0x182ef3[_0x268e4f]['markersEnd']['length'];_0x2dba05++){const _0x18e2b0=_0x182ef3[_0x268e4f]['markersEnd'][_0x2dba05];if(!_0x52e207['has'](_0x18e2b0))continue;const {group:_0x27ea21,type:_0x5137d9}=_0x57b156(_0x18e2b0);if('revision-suggestion'!=_0x27ea21||'insertion'!=_0x5137d9&&'deletion'!=_0x5137d9)continue;_0x182ef3[_0x268e4f]['markersEnd']['splice'](_0x2dba05,0x1),_0x2dba05--;const _0x2463e4=_0x44604f['findIndex'](_0x2866da=>_0x2866da['name']==_0x18e2b0);_0x2463e4>-0x1&&_0x44604f['splice'](_0x2463e4,0x1);}}function _0x57b156(_0x47cd55){const _0x465dd2=_0x47cd55['split'](':');return{'group':_0x465dd2[0x0],'type':_0x465dd2[0x1],'subType':_0x465dd2['length']>=0x5?_0x465dd2[0x2]:null,'id':_0x465dd2['length']<0x5?_0x465dd2[0x2]:_0x465dd2[0x3],'authorId':_0x465dd2['length']<0x5?_0x465dd2[0x3]:_0x465dd2[0x4],'markerCount':0x6==_0x465dd2['length']?_0x465dd2[0x5]:null};}function _0xb328eb(_0x1223d2){for(let _0x37c994=0x0;_0x37c994<_0x44604f['length'];_0x37c994++){if(_0x1223d2['isAdded']&&'insertion'==_0x44604f[_0x37c994]['type']&&_0x1223d2['isAdded']['userId']==_0x44604f[_0x37c994]['userId'])return _0x1223d2['isAddSuggestion']=_0x44604f[_0x37c994],void delete _0x1223d2['isAdded'];if(!_0x1223d2['isAdded']&&!_0x1223d2['isRemoved']&&'deletion'==_0x44604f[_0x37c994]['type'])return void(_0x1223d2['isRemoveSuggestion']=_0x44604f[_0x37c994]);}}}['_setDistance'](_0x3c855e,_0x3dc44a){let _0x9d5e48=0x0,_0x2926d0=!0x1;const _0xfe8878=new Map();for(const _0x40101c of _0x3c855e)_0x40101c[_0x3dc44a]?_0x2926d0&&(_0x9d5e48++,_0x2926d0=!0x1):(_0x9d5e48++,_0x2926d0=!0x0),_0xfe8878['set'](_0x40101c['id'],_0x9d5e48);for(let _0x909f0a=0x0;_0x909f0a<_0x3c855e['length'];_0x909f0a++){if('isRemoved'==_0x3dc44a&&_0x3c855e[_0x909f0a]['isAdded']||'isAdded'==_0x3dc44a&&_0x3c855e[_0x909f0a]['isRemoved'])continue;if('text'==_0x3c855e[_0x909f0a]['type']){_0x3c855e[_0x909f0a]['distance']=0x0;continue;}const _0x3a4312=_0xfe8878['get'](_0x3c855e[_0x909f0a]['pairId']),_0x1ff092=_0xfe8878['get'](_0x3c855e[_0x909f0a]['id']);_0x3c855e[_0x909f0a]['distance']=_0x3a4312-_0x1ff092;}}['_getRevisionsRange'](_0x529e00,_0x3092fa,_0x2fd84a=!0x1){const _0x1bf23f=[];let _0x53cebe=this['repository']['getIndex'](_0x529e00),_0x2c7be8=this['repository']['getIndex'](_0x3092fa);for(-0x1==_0x2c7be8&&(_0x2c7be8=this['repository']['_revisions']['length'],_0x2fd84a=!0x1);_0x53cebe<_0x2c7be8;)_0x1bf23f['push'](this['repository']['getRevision'](_0x53cebe)),_0x53cebe++;return _0x2fd84a&&_0x1bf23f['push'](this['repository']['getRevision'](_0x53cebe)),_0x1bf23f;}['_threeWayMerge'](_0x3ae8ef,_0x3c353b,_0x27a8a6,_0x3dd157){const _0x4f5bd1=this['editor']['model']['schema'];let _0x596765=_0x3c353b;for(;_0x3ae8ef[_0x596765]&&_0x3ae8ef[_0x596765]['isAdded'];)_0x596765++;let _0x39ce64=_0x3dd157;for(;_0x27a8a6[_0x39ce64]&&_0x27a8a6[_0x39ce64]['isRemoved'];)_0x39ce64++;_0xc400a(_0x3ae8ef,_0x3c353b,_0x596765),_0xc400a(_0x27a8a6,_0x3dd157,_0x39ce64);const _0x4916a7=_0x27a8a6['slice'](_0x3dd157,_0x39ce64)['concat'](_0x3ae8ef['slice'](_0x3c353b,_0x596765));return _0x4916a7['sort']((_0x4279b9,_0x21d254)=>_0x4279b9['side']!=_0x21d254['side']?_0x4279b9['side']-_0x21d254['side']:_0x4279b9['level']!=_0x21d254['level']?_0x4279b9['level']-_0x21d254['level']:_0x4279b9['distance']!=_0x21d254['distance']?_0x21d254['distance']-_0x4279b9['distance']:!!_0x4279b9['isAdded']!=!!_0x21d254['isAdded']?-0x1==_0x4279b9['side']||0x0==_0x4279b9['side']?_0x4279b9['isAdded']?-0x1:0x1:_0x4279b9['isAdded']?0x1:-0x1:_0x4279b9['index']-_0x21d254['index']),{'commonTape':_0x4916a7,'iEnd':_0x596765,'jEnd':_0x39ce64};function _0xc400a(_0x20f157,_0x173a68,_0x349da3){let _0x277120=-0x1,_0x47aaa4=Number['POSITIVE_INFINITY'],_0x1edcfe=!0x0;for(let _0x37d69e=_0x173a68;_0x37d69e<_0x349da3;_0x37d69e++)if(_0x4f5bd1['isInline'](_0x20f157[_0x37d69e]['item'])||(_0x1edcfe=!0x1),_0x20f157[_0x37d69e]['item']['startIndex']<_0x173a68&&(_0x277120=_0x37d69e),_0x20f157[_0x37d69e]['item']['endIndex']>=_0x349da3){_0x47aaa4=_0x37d69e;break;}_0x1edcfe&&(_0x277120=_0x349da3-0x1);for(let _0x4abac5=_0x173a68;_0x4abac5<_0x349da3;_0x4abac5++)_0x20f157[_0x4abac5]['side']=_0x4abac5<=_0x277120?-0x1:_0x4abac5<_0x47aaa4?0x0:0x1,_0x20f157[_0x4abac5]['index']=_0x4abac5;let _0x1f3777=0x0;for(let _0x427775=_0x173a68;_0x427775<=_0x277120;_0x427775++)0x0==_0x20f157[_0x427775]['distance']?_0x20f157[_0x427775]['level']=_0x1f3777:(_0x1f3777++,_0x20f157[_0x427775]['level']=_0x1f3777,_0x1f3777++);for(let _0x109996=_0x173a68;_0x109996<_0x349da3;_0x109996++)0x0==_0x20f157[_0x109996]['side']&&(_0x20f157[_0x109996]['level']=_0x1f3777);_0x1f3777=0x0;for(let _0x418adc=_0x349da3-0x1;_0x418adc>=_0x47aaa4;_0x418adc--)0x0==_0x20f157[_0x418adc]['distance']?_0x20f157[_0x418adc]['level']=_0x1f3777:(_0x1f3777--,_0x20f157[_0x418adc]['level']=_0x1f3777,_0x1f3777--);}}['_fixObsoleteTags'](_0x4dc1c0){const _0x5f40f3=new Map(),_0x3446d8=this['editor']['model']['schema'];for(let _0x38b5ca=0x1;_0x38b5ca<_0x4dc1c0['length'];_0x38b5ca++){let _0x3b6d68,_0x182056,_0x32169d;const _0x1a5dc6=_0x4dc1c0[_0x38b5ca],_0x2248d6=_0x4dc1c0[_0x38b5ca-0x1];if('text'==_0x1a5dc6['type'])continue;if(_0x1a5dc6['type']!=_0x2248d6['type'])continue;if(!_0x3446d8['isBlock'](_0x2248d6['item'])||_0x3446d8['isLimit'](_0x2248d6['item']))continue;if(!_0x3446d8['isBlock'](_0x1a5dc6['item'])||_0x3446d8['isLimit'](_0x1a5dc6['item']))continue;if((_0x4dc1c0[_0x38b5ca]['isAdded']||_0x4dc1c0[_0x38b5ca]['isAddSuggestion'])&&_0x4dc1c0[_0x38b5ca-0x1]['isRemoved'])_0x3b6d68=_0x4dc1c0[_0x38b5ca],_0x182056=_0x4dc1c0[_0x38b5ca-0x1],_0x32169d=_0x38b5ca-0x1;else{if(!_0x4dc1c0[_0x38b5ca]['isRemoved']||!_0x4dc1c0[_0x38b5ca-0x1]['isAdded']&&!_0x4dc1c0[_0x38b5ca-0x1]['isAddSuggestion'])continue;_0x3b6d68=_0x4dc1c0[_0x38b5ca-0x1],_0x182056=_0x4dc1c0[_0x38b5ca],_0x32169d=_0x38b5ca;}const _0x38997e=_0x3b6d68['level']==_0x182056['level'],_0x300c66=Math['abs'](_0x3b6d68['level'])<Math['abs'](_0x182056['level'])&&0x0==_0x182056['distance'];(_0x38997e||_0x300c66)&&(_0x5f40f3['set'](_0x182056['id'],_0x3b6d68['id']),_0x4dc1c0['splice'](_0x32169d,0x1),_0x38b5ca--,_0x3b6d68['isAdded']=!0x1);}for(let _0x236790=0x0;_0x236790<_0x4dc1c0['length'];_0x236790++)_0x5f40f3['has'](_0x4dc1c0[_0x236790]['pairId'])&&(_0x4dc1c0[_0x236790]['pairId']=_0x5f40f3['get'](_0x4dc1c0[_0x236790]['pairId']));}['_removeMissingPairs'](_0x2c9734){const _0x43c068=new Set(_0x2c9734['map'](_0x5a72e9=>_0x5a72e9['id']));for(let _0x448624=0x0;_0x448624<_0x2c9734['length'];_0x448624++)_0x43c068['has'](_0x2c9734[_0x448624]['pairId'])||0x0==_0x2c9734[_0x448624]['distance']||(_0x2c9734[_0x448624]['isIncorrect']=!0x0);return _0x2c9734['filter'](_0x5191f3=>!_0x5191f3['isIncorrect']);}['_markMismatchedRemovedTags'](_0x22302e){const _0x52ec39=new Set();for(let _0x4bc086=0x0;_0x4bc086<_0x22302e['length'];_0x4bc086++){if(_0x52ec39['has'](_0x22302e[_0x4bc086]['id'])&&_0x22302e[_0x4bc086]['isRemoved']&&(_0x22302e[_0x4bc086]['isIncorrect']=!0x0),_0x22302e[_0x4bc086]['isIncorrect'])continue;if(0x0==_0x22302e[_0x4bc086]['distance'])continue;if('elementStart'!=_0x22302e[_0x4bc086]['type'])continue;if(null==_0x22302e[_0x4bc086]['pairId'])continue;let _0x306a14=_0x4bc086+0x1,_0x25f11e=0x0;for(;_0x22302e[_0x306a14]['id']!=_0x22302e[_0x4bc086]['pairId'];)'elementStart'==_0x22302e[_0x306a14]['type']?_0x25f11e++:'elementEnd'==_0x22302e[_0x306a14]['type']&&_0x25f11e--,_0x306a14++;if(0x0!=_0x25f11e){if(_0x22302e[_0x4bc086]['isRemoved'])_0x22302e[_0x4bc086]['isIncorrect']=!0x0;else{for(;_0x306a14!=_0x4bc086;)_0x22302e[_0x306a14]['isRemoved']&&0x0!=_0x22302e[_0x306a14]['distance']&&(_0x22302e[_0x306a14]['isIncorrect']=!0x0,_0x52ec39['add'](_0x22302e[_0x306a14]['pairId'])),_0x306a14--;}}}return _0x22302e['filter'](_0x53f21d=>!_0x53f21d['isIncorrect']);}['_removeUnsupportedChanges'](_0x845783){const _0xc7dba7=this['editor']['model']['schema'];for(let _0x3a2df6=0x0;_0x3a2df6<_0x845783['length'];_0x3a2df6++){if(!(_0x845783[_0x3a2df6]['isAdded']||_0x845783[_0x3a2df6]['isAddSuggestion']||_0x845783[_0x3a2df6]['isRemoved']||_0x845783[_0x3a2df6]['isRemoveSuggestion']))continue;if(0x0==_0x845783[_0x3a2df6]['distance'])continue;const _0x2576d2=_0x845783[_0x3a2df6]['item'];_0xc7dba7['isBlock'](_0x2576d2)||_0xc7dba7['isLimit'](_0x2576d2)||(_0x845783[_0x3a2df6]['isAdded']&&delete _0x845783[_0x3a2df6]['isAdded'],_0x845783[_0x3a2df6]['isAddSuggestion']&&delete _0x845783[_0x3a2df6]['isAddSuggestion'],_0x845783[_0x3a2df6]['isRemoveSuggestion']&&delete _0x845783[_0x3a2df6]['isRemoveSuggestion'],_0x845783[_0x3a2df6]['isRemoved']&&(_0x845783[_0x3a2df6]['isIncorrect']=!0x0));}return _0x845783['filter'](_0x482504=>!_0x482504['isIncorrect']);}['_makeModelFromTape'](_0x4fe463,_0x5abcbf,_0x388cd2){const _0x56fd73=new _0x451b26(),_0x2e225b=[],_0x4f8e78=new Map(),_0x59c5c9=this['editor']['model'],_0xa8da17=_0x59c5c9['schema'],_0x1932bc=[_0x56fd73],_0x593615={},_0x4beaa5={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x105784=null;const _0x5cce6b=[0x0];for(let _0x5a6fe9=0x0;_0x5a6fe9<_0x4fe463['length'];_0x5a6fe9++)if('elementStart'===_0x4fe463[_0x5a6fe9]['type']){_0x4fe463[_0x5a6fe9]['previousPosition']=_0x59c5c9['createPositionFromPath'](_0x56fd73,_0x5cce6b);const _0x58a860=new _0x47d77c(_0x4fe463[_0x5a6fe9]['item']['name'],_0x4fe463[_0x5a6fe9]['item']['getAttributes']());_0x1932bc[0x0]['_appendChild'](_0x58a860),_0x5cce6b['push'](0x0),_0x1932bc['unshift'](_0x58a860),_0x4fe463[_0x5a6fe9]['nextPosition']=_0x59c5c9['createPositionFromPath'](_0x56fd73,_0x5cce6b);}else'elementEnd'===_0x4fe463[_0x5a6fe9]['type']?(_0x1932bc['shift'](),_0x4fe463[_0x5a6fe9]['previousPosition']=_0x59c5c9['createPositionFromPath'](_0x56fd73,_0x5cce6b),_0x5cce6b['pop'](),_0x5cce6b[_0x5cce6b['length']-0x1]++,_0x4fe463[_0x5a6fe9]['nextPosition']=_0x59c5c9['createPositionFromPath'](_0x56fd73,_0x5cce6b)):(_0x4fe463[_0x5a6fe9]['previousPosition']=_0x59c5c9['createPositionFromPath'](_0x56fd73,_0x5cce6b),_0x105784?_0x105784['_data']+=_0x4fe463[_0x5a6fe9]['item']['data']:_0x105784=new _0x5a04d7(_0x4fe463[_0x5a6fe9]['item']['data'],_0x4fe463[_0x5a6fe9]['item']['getAttributes']()),_0x4fe463[_0x5a6fe9+0x1]&&'text'===_0x4fe463[_0x5a6fe9+0x1]['type']&&_0x2f4277(_0x105784,_0x4fe463[_0x5a6fe9+0x1]['item'])||(_0x1932bc[0x0]['_appendChild'](_0x105784),_0x105784=null),_0x5cce6b[_0x5cce6b['length']-0x1]+=_0x4fe463[_0x5a6fe9]['item']['offsetSize'],_0x4fe463[_0x5a6fe9]['nextPosition']=_0x59c5c9['createPositionFromPath'](_0x56fd73,_0x5cce6b));for(let _0x4d1827=0x0;_0x4d1827<_0x4fe463['length'];_0x4d1827++){const _0x4bc170=_0x4fe463[_0x4d1827]['previousPosition'],_0x42aca9=_0x4fe463[_0x4d1827]['nextPosition'];for(const _0x4760db of _0x4fe463[_0x4d1827]['markersStart'])_0x4f8e78['set'](_0x4760db,{'start':_0x4bc170,'end':null});_0x2d7c06('isRemoveSuggestion',_0x4d1827,_0x4bc170,_0x42aca9),_0x2d7c06('isAddSuggestion',_0x4d1827,_0x4bc170,_0x42aca9),_0x2d7c06('isRemoved',_0x4d1827,_0x4bc170,_0x42aca9),_0x2d7c06('isAdded',_0x4d1827,_0x4bc170,_0x42aca9);for(const _0x260ab5 of _0x4fe463[_0x4d1827]['markersEnd']){const _0xff7f16=_0x4f8e78['get'](_0x260ab5);_0xff7f16?_0xff7f16['end']=_0x42aca9:_0x4f8e78['set'](_0x260ab5,{'start':_0x42aca9,'end':_0x42aca9});}}for(const [_0x4b8d0b,_0x9c635b]of _0x4f8e78){const _0x415c60=this['editor']['model']['createRange'](_0x9c635b['start'],_0x9c635b['end']);_0x56fd73['markers']['set'](_0x4b8d0b,_0x415c60);}return _0x2e225b['sort']((_0x36de6a,_0x1a1ec9)=>{const _0x5b18a4=_0x56fd73['markers']['get']('revision:'+_0x36de6a['id']),_0x20f316=_0x56fd73['markers']['get']('revision:'+_0x1a1ec9['id']);return _0x5b18a4['start']['isBefore'](_0x20f316['start'])?-0x1:_0x5b18a4['start']['isAfter'](_0x20f316['start'])?0x1:_0x5b18a4['end']['isBefore'](_0x20f316['end'])?-0x1:_0x5b18a4['end']['isAfter'](_0x20f316['end'])?0x1:'add'===_0x36de6a['type']?-0x1:0x1;}),{'root':_0x56fd73,'changes':_0x2e225b};function _0x2d7c06(_0x22e768,_0x1cb4dd,_0x5989cd,_0x5c6a99){const _0x161ee2=!!_0x4fe463[_0x1cb4dd][_0x22e768],_0x2ac8fd=_0x161ee2?_0x4fe463[_0x1cb4dd][_0x22e768]['userId']:null,_0x57b55a=_0x1cb4dd===_0x4fe463['length']-0x1,_0x2bf146=_0x4beaa5[_0x22e768][0x0],_0x550560=_0xa8da17['isObject'](_0x4fe463[_0x1cb4dd]['item']);!_0x593615[_0x22e768]&&_0x161ee2?_0x593615[_0x22e768]={'start':_0x5989cd,'tapeItem':_0x4fe463[_0x1cb4dd],'userId':_0x2ac8fd,'type':_0x22e768}:_0x593615[_0x22e768]&&!_0x161ee2?(_0x593615[_0x22e768]['end']=_0x5989cd,_0x2686ec(_0x593615[_0x22e768]),_0x593615[_0x22e768]=null):_0x593615[_0x22e768]&&_0x161ee2&&_0x593615[_0x22e768]['userId']!==_0x2ac8fd&&(_0x593615[_0x22e768]['end']=_0x5989cd,_0x2bf146&&_0x2bf146['userId']===_0x593615[_0x22e768]['userId']||_0x2686ec(_0x593615[_0x22e768]),_0x593615[_0x22e768]={'start':_0x5989cd,'tapeItem':_0x4fe463[_0x1cb4dd],'userId':_0x2ac8fd,'type':_0x22e768}),_0x593615[_0x22e768]&&_0x550560&&('elementStart'!==_0x4fe463[_0x1cb4dd]['type']||_0x2bf146&&_0x2bf146['userId']===_0x2ac8fd||_0x4beaa5[_0x22e768]['unshift']({'userId':_0x2ac8fd,'object':_0x4fe463[_0x1cb4dd]['item'],'change':_0x593615[_0x22e768]}),'elementEnd'===_0x4fe463[_0x1cb4dd]['type']&&_0x2bf146&&_0x2bf146['object']===_0x4fe463[_0x1cb4dd]['item']&&(_0x4beaa5[_0x22e768]['shift'](),_0x593615[_0x22e768]=_0x2bf146['change'])),_0x593615[_0x22e768]&&_0x57b55a&&(_0x593615[_0x22e768]['end']=_0x5c6a99,_0x2686ec(_0x593615[_0x22e768]),_0x593615[_0x22e768]=null);}function _0x2686ec({start:_0x604858,end:_0x324dda,tapeItem:_0x280971,userId:_0x33d6b9,type:_0xa4a720}){const _0x59b72c=_0x280971['item'],_0x225827=_0x59c5c9['schema']['isBlock'](_0x59b72c)&&!_0x59c5c9['schema']['isLimit'](_0x59b72c),_0x16922a=_0x604858['nodeAfter']==_0x324dda['parent']&&_0x324dda['isAtStart'];if(_0x225827&&_0x16922a)return;const _0x5e5f05=_0x59c5c9['createRange'](_0x604858,_0x324dda),_0x8a5088=_0x5abcbf['get'](_0x33d6b9),_0x22a22b=new G({'author':_0x8a5088,'type':'isAdded'==_0xa4a720||'isAddSuggestion'==_0xa4a720?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0xa4a720||'isRemoveSuggestion'==_0xa4a720},'createdAt':new Date(),'rootName':_0x388cd2});_0x2e225b['push'](_0x22a22b),_0x56fd73['markers']['set']('revision:'+_0x22a22b['id'],_0x5e5f05);}function _0x2f4277(_0x37ccec,_0x36d4be){const _0x190fbe=_0x37ccec['getAttributes'](),_0x1d7476=_0x36d4be['getAttributes']();for(const _0x1f518f of _0x190fbe){if(_0x1f518f[0x1]!==_0x36d4be['getAttribute'](_0x1f518f[0x0]))return!0x1;_0x1d7476['next']();}return _0x1d7476['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x540ba2=>{const _0x30d320=_0x540ba2['markerName']['split'](':')[0x1],_0x54867e=this['_getChangeFromId'](_0x30d320);if(!_0x54867e)return null;const _0x3b43f7='add'==_0x54867e['type']?'insertion':'deletion',_0x29e53f=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3b43f7];return _0x54867e['data']['isSuggestion']&&_0x29e53f['push']('ck-suggestion-marker-'+_0x3b43f7+'-new'),this['activeChange']==_0x54867e&&_0x29e53f['push']('ck-suggestion-marker--active'),{'classes':_0x29e53f,'attributes':{'data-change-id':_0x30d320}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x1a1ca1=>{_0x1a1ca1['on']('element:pre',(_0x31c869,_0x3a6f72,_0x592163)=>{const _0x4599a4=_0x3a6f72['viewItem']['getChild'](0x0);if(!_0x4599a4||!_0x4599a4['is']('element','code'))return;if(!_0x592163['consumable']['consume'](_0x4599a4,{'attributes':['vid_start','vid_end']}))return;const _0x202629=_0x3a6f72['modelRange']['start']['nodeAfter'];_0x592163['writer']['setAttribute']('vid_start',_0x4599a4['getAttribute']('vid_start'),_0x202629),_0x592163['writer']['setAttribute']('vid_end',_0x4599a4['getAttribute']('vid_end'),_0x202629);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3d2c09=>{_0x3d2c09['on']('element',(_0x52f609,_0x379ed5,_0x13c4e3)=>{if(!_0x13c4e3['consumable']['consume'](_0x379ed5['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x379ed5['modelRange']['isCollapsed'])return;const _0x4f5342=_0x379ed5['modelRange']['start']['nodeAfter'];_0x4f5342['hasAttribute']('vid_start')||_0x4f5342['hasAttribute']('vid')||(_0x13c4e3['writer']['setAttribute']('vid_start',_0x379ed5['viewItem']['getAttribute']('vid_start'),_0x4f5342),_0x13c4e3['writer']['setAttribute']('vid_end',_0x379ed5['viewItem']['getAttribute']('vid_end'),_0x4f5342));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2d4d11=>_0x2d4d11['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x26a521,[,_0xdc9225])=>{['vid_start','vid_end','vid']['includes'](_0xdc9225)&&(_0x26a521['return']=!0x0,_0x26a521['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x511658=>{_0x511658['on']('attribute:vid',(_0x24b674,_0x10672f,_0x36ea95)=>{if('\x20'!=_0x10672f['item']['data']||_0x10672f['item']['parent']['maxOffset']>0x1)return;if(!_0x36ea95['consumable']['consume'](_0x10672f['item'],_0x24b674['name']))return;const _0x1e15e1=_0x36ea95['writer'],_0x3ae543=_0x36ea95['mapper']['toViewRange'](_0x10672f['range']);_0x1e15e1['wrap'](_0x3ae543,_0x1e15e1['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x2ff948){const _0xa4b674=_0x2ff948['plugins']['get']('RevisionViewer');return(_0x25e4e8,_0x39f4ca,_0xa93173)=>{const _0x4a3083=_0x39f4ca['markerName']['split'](':')[0x1],_0x504f14=_0xa4b674['_getChangeFromId'](_0x4a3083);if(!_0x504f14)return null;const _0x5a6aba='add'==_0x504f14['type']?'split':'merge';if(!_0xa93173['consumable']['test'](_0x39f4ca['markerRange'],_0x25e4e8['name']))return;const _0x50bece=_0x39f4ca['markerRange']['getWalker'](),_0x4baff4=_0x39f4ca['markerRange']['start'],_0x2b8d35=_0x2ff948['model']['schema'];let _0x51a49b=null,_0x4903f6=null,_0x56bdf1=!0x1,_0x5c1c05=!0x1;for(const _0x33b2fa of _0x50bece){const _0x254d31=_0x33b2fa['item'];_0x56bdf1=_0x56bdf1||_0x2b8d35['isContent'](_0x254d31);const _0x1d23bc=_0xa93173['mapper']['toViewElement'](_0x254d31);if(_0x1d23bc&&_0x1d23bc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x33b2fa['type']&&(_0x2b8d35['isBlock'](_0x254d31)&&!_0x2b8d35['isLimit'](_0x254d31)&&(_0x254d31['nextSibling']||_0x4baff4['isAtEnd']?_0x51a49b&&_0x51a49b['parent']==_0x254d31||(_0x51a49b=_0x254d31,_0x540c78(_0x33b2fa['previousPosition']),_0x5c1c05=!0x0):_0x4903f6=_0x4903f6||_0x33b2fa['previousPosition']));}function _0x540c78(_0x2dd6ef){const _0x1eb0d9=_0xa93173['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5a6aba}),_0x42d2e9=_0xa93173['mapper']['toViewPosition'](_0x2dd6ef);_0x504f14['data']['isSuggestion']&&_0xa93173['writer']['addClass']('ck-suggestion-marker-'+_0x5a6aba+'-new',_0x1eb0d9),_0xa4b674['activeChange']==_0x504f14&&_0xa93173['writer']['addClass']('ck-suggestion-marker--active',_0x1eb0d9),_0xa93173['writer']['insert'](_0x42d2e9,_0x1eb0d9),_0xa93173['mapper']['bindElementToMarker'](_0x1eb0d9,_0x39f4ca['markerName']);}_0x56bdf1||_0x5c1c05||!_0x4903f6||_0x540c78(_0x4903f6);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xd6a822,_0x1bfbc0,_0x19faea)=>{const _0x5c7418=_0x19faea['mapper']['markerNameToElements'](_0x1bfbc0['markerName']);if(_0x5c7418){for(const _0x1ef723 of _0x5c7418)(_0x1ef723['hasClass']('ck-suggestion-marker-split')||_0x1ef723['hasClass']('ck-suggestion-marker-merge'))&&(_0x19faea['mapper']['unbindElementFromMarkerName'](_0x1ef723,_0x1bfbc0['markerName']),_0x19faea['writer']['remove'](_0x1ef723));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x16c0e1,_0x649e15,_0x1b0432)=>{const _0x47b9de=_0x649e15['markerName']['split'](':')[0x1],_0x1e21a6=this['_getChangeFromId'](_0x47b9de);if(!_0x1e21a6)return null;const _0xb1fd35='add'==_0x1e21a6['type']?'split':'merge';if(_0x1b0432['consumable']['test'](_0x649e15['markerRange'],_0x16c0e1['name']))for(const _0x307af4 of _0x649e15['markerRange']['getItems']()){if(!_0x307af4['is']('element','softBreak'))continue;const _0x5d69dc=_0x1b0432['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xb1fd35}),_0x6fd56c=_0x1b0432['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x307af4));_0x1e21a6['data']['isSuggestion']&&_0x1b0432['writer']['addClass']('ck-suggestion-marker-'+_0xb1fd35+'-new',_0x5d69dc),this['activeChange']==_0x1e21a6&&_0x1b0432['writer']['addClass']('ck-suggestion-marker--active',_0x5d69dc),_0x1b0432['writer']['insert'](_0x6fd56c,_0x5d69dc),_0x1b0432['mapper']['bindElementToMarker'](_0x5d69dc,_0x649e15['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x275fe6=>{for(const _0xdd8b4d of this['editor']['model']['document']['getRootNames']()){const _0xae552d=this['editor']['model']['document']['getRoot'](_0xdd8b4d),_0x523362=this['editor']['editing']['view']['document']['getRoot'](_0xdd8b4d);if(_0x523362){const _0x5599f1=_0xae552d['getAttribute']('revisionHistoryAttachChange');if(_0x275fe6['removeAttribute']('data-change-id',_0x523362),_0x275fe6['removeClass']('ck-revision-history-root-add',_0x523362),_0x275fe6['removeClass']('ck-revision-history-root-remove',_0x523362),_0x275fe6['removeClass']('ck-revision-history-root--active',_0x523362),_0x5599f1){const _0x19e03a=this['_getChangeFromId'](_0x5599f1);if(!_0x19e03a)return null;_0x275fe6['setAttribute']('data-change-id',_0x5599f1,_0x523362),_0x275fe6['addClass']('ck-revision-history-root-'+_0x19e03a['type'],_0x523362),this['activeChange']==_0x19e03a&&_0x275fe6['addClass']('ck-revision-history-root--active',_0x523362);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x55e794=>'revision-comment:'+_0x55e794,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3dd025=>'revision-suggestion:'+_0x3dd025,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x543b49=>({'name':'suggestion:'+_0x543b49,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x365087=>{const _0x6ba4c=_0x365087['markerName']['split'](':')[0x1];return'insertion'!=_0x6ba4c&&'deletion'!=_0x6ba4c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x6ba4c]};}}),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',(_0x3d6e63,_0x552de7,_0x3f9f54)=>{const _0x503ef2=_0x3f9f54['mapper']['markerNameToElements'](_0x552de7['markerName']);if(_0x503ef2){for(const _0x35e824 of _0x503ef2)_0x35e824['is']('uiElement')&&(_0x3f9f54['mapper']['unbindElementFromMarkerName'](_0x35e824,_0x552de7['markerName']),_0x3f9f54['writer']['remove'](_0x35e824));}},{'priority':'high'});}['_getChangeFromId'](_0x48fed0){return this['_changeIdToChange']['get'](_0x48fed0);}['_getViewForChange'](_0x45cbe1){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x45cbe1),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x551d11,_0x23e0f8,_0x43074e,_0x4a099c)=>{_0x4a099c&&this['_balloon']['remove'](_0x4a099c),_0x43074e&&(this['_balloon']['add']({'view':_0x43074e,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x24ff99=this['editor']['editing'],_0x288b25=this['_getChangeFromId'](_0x43074e['changeId']);let _0x46b825;if(_0x288b25['data']['isOnRoot']){const _0x388704=_0x24ff99['view']['getDomRoot'](_0x288b25['rootName']);_0x46b825=Array['from'](_0x388704['getClientRects']());}else{const _0x29fa79=this['editor']['model']['markers']['get']('revision:'+_0x43074e['changeId']);_0x46b825=Array['from'](_0x24ff99['mapper']['markerNameToElements'](_0x29fa79['name']))['map'](_0xd04d5f=>_0x24ff99['view']['domConverter']['mapViewToDom'](_0xd04d5f))['map'](_0x57d719=>Array['from'](_0x57d719['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x46b825[0x0];return _0x46b825['find'](_0x3aeec7=>_0x3aeec7['top']-0x3<=this['_activeViewTarget']['y']&&_0x3aeec7['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3aeec7['left']-0x3<=this['_activeViewTarget']['x']&&_0x3aeec7['right']+0x3>=this['_activeViewTarget']['x'])||_0x46b825[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x32c3d1,_0xc3c1db,_0x5d541b,_0x4194b2)=>{this['activeView']=_0x5d541b?this['_getViewForChange'](_0x5d541b):null,this['editor']['model']['change'](()=>{const _0x43d066=this['editor']['editing'];_0x4194b2&&(_0x4194b2['data']['isOnRoot']?_0x43d066['view']['change'](_0x5e9995=>{_0x5e9995['removeClass']('ck-revision-history-root--active',_0x43d066['view']['document']['getRoot'](_0x4194b2['rootName']));}):_0x43d066['reconvertMarker']('revision:'+_0x4194b2['id'])),_0x5d541b&&(_0x5d541b['data']['isOnRoot']?_0x43d066['view']['change'](_0x20f6e9=>{_0x20f6e9['addClass']('ck-revision-history-root--active',_0x43d066['view']['document']['getRoot'](_0x5d541b['rootName']));}):_0x43d066['reconvertMarker']('revision:'+_0x5d541b['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x52fec4,_0x392981)=>{if(this['activeChange'])return;const _0x5e8269=this['_findChangeIdFromDomTarget'](_0x392981['target']),_0x40c047=this['_changeIdToChange']['get'](_0x5e8269);_0x40c047?(this['_activeViewTarget']={'x':_0x392981['domEvent']['x'],'y':_0x392981['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x40c047)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x121a3a,_0x1fb86b)=>{const _0x4213da=this['_findChangeIdFromDomTarget'](_0x1fb86b['target']),_0x2a6ff6=this['_changeIdToChange']['get'](_0x4213da);_0x2a6ff6?(this['_activeViewTarget']={'x':_0x1fb86b['domEvent']['x'],'y':_0x1fb86b['domEvent']['y']},_0x2a6ff6===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2a6ff6):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0xe02940){do{const _0x544e0f=_0xe02940['getAttribute']('data-change-id');if(_0x544e0f)return _0x544e0f;_0xe02940=_0xe02940['parent'];}while(_0xe02940);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x21b5a0=>{for(const _0x22f44e of this['editor']['model']['markers'])_0x21b5a0['removeMarker'](_0x22f44e);});}}function Q(_0x5219ad,_0x5c9f6b){return(_0x304a50,_0x2bb236,_0x585505)=>{if(!_0x585505['consumable']['test'](_0x2bb236['markerRange'],_0x304a50['name']))return;const _0x134d43=_0x2bb236['markerRange']['getWalker'](),_0x1997a2=_0x2bb236['markerRange']['start'],_0x2d59fb=_0x5219ad['model']['schema'];let _0x3179fe=null,_0x27a3ec=null,_0x508714=!0x1,_0x5611d1=!0x1;for(const _0x2c422e of _0x134d43){const _0x320973=_0x2c422e['item'];_0x508714=_0x508714||_0x2d59fb['isContent'](_0x320973);const _0x4d059d=_0x585505['mapper']['toViewElement'](_0x320973);if(_0x4d059d&&_0x4d059d['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2c422e['type']&&(_0x2d59fb['isBlock'](_0x320973)&&!_0x2d59fb['isLimit'](_0x320973)&&(_0x320973['nextSibling']||_0x1997a2['isAtEnd']?_0x3179fe&&_0x3179fe['parent']==_0x320973||(_0x3179fe=_0x320973,_0x110161(_0x2c422e['previousPosition']),_0x5611d1=!0x0):_0x27a3ec=_0x27a3ec||_0x2c422e['previousPosition']));}function _0x110161(_0x462634){const _0x1ef858=_0x585505['mapper']['toViewPosition'](_0x462634),_0x21efee=_0x585505['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5c9f6b});_0x585505['writer']['insert'](_0x1ef858,_0x21efee),_0x585505['mapper']['bindElementToMarker'](_0x21efee,_0x2bb236['markerName']);}_0x508714||_0x5611d1||!_0x27a3ec||_0x110161(_0x27a3ec);};}class nt extends _0x30eac9{constructor(_0x1d796e){super(_0x1d796e);const _0x2c6609=_0x1d796e['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x2c6609,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2c6609,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x404907=this['editor'],_0x471828=_0x404907['plugins']['get'](u),_0x4eeaca=_0x471828['isReady']?_0x471828['diff']['newRevisionId']:null;_0x404907['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4eeaca);}['refresh'](){const {isReady:_0x24526c,isEnabled:_0x197882,repository:_0xe4176e,diff:_0x2e9f7f}=this['editor']['plugins']['get'](u),_0x485ba6=_0x2e9f7f&&_0xe4176e['getLaterVisibleRevision'](_0x2e9f7f['newRevisionId']);this['isEnabled']=_0x24526c&&_0x197882&&Boolean(_0x485ba6);}}class ot extends _0x30eac9{['_step'];constructor(_0x25d7ff,{direction:_0x3ab18e}){super(_0x25d7ff);const _0x5f501b=_0x25d7ff['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x3ab18e?0x1:-0x1,this['listenTo'](_0x5f501b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5f501b,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5f501b,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3be840=this['editor'],_0x3e2ab0=_0x3be840['plugins']['get'](u),{isNavigationMode:_0x3a2437,currentChangeNumber:_0x11e2ef}=_0x3e2ab0;let _0x2ae478;if(_0x3e2ab0['activeChange']=_0x3a2437?_0x3e2ab0['diff']['changes']['get'](_0x11e2ef+this['_step']):_0x3e2ab0['diff']['changes']['first'],_0x3e2ab0['activeChange']['data']['isOnRoot'])_0x2ae478=_0x3be840['editing']['view']['getDomRoot'](_0x3e2ab0['activeChange']['rootName']);else{const _0x521c96=_0x3be840['model']['markers']['get']('revision:'+_0x3e2ab0['activeChange']['id']);_0x2ae478=_0x50e4f9(_0x3be840['editing'],_0x521c96);}_0x3e6207({'target':_0x2ae478,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x1df774,currentChangeNumber:_0xa2dcd4,numberOfChanges:_0x1bada7,isReady:_0x340569,isEnabled:_0x553f1f}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x553f1f&&_0x340569&&_0x1bada7)&&(!_0x1df774||(0x1===this['_step']?_0xa2dcd4<_0x1bada7-0x1:_0xa2dcd4>0x0));}}class pi extends _0x14bc2f{constructor(_0x2f9f98){super(_0x2f9f98);const _0x94b1a7=this['bindTemplate'],_0x52df61=new _0x534191(_0x2f9f98),_0x45cdc3=new _0x534191(_0x2f9f98);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',(_0x3d96e3,_0x41e1cd)=>_0x3d96e3&&_0x41e1cd>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x9564e8,_0x12690b,_0x3f46f1,_0x1a009a)=>{if(!_0x9564e8)return m(_0x2f9f98,'Loading...');if(!_0x3f46f1)return m(_0x2f9f98,'No\x20changes');const _0x2672e1=m(_0x2f9f98,'NUMBER_OF_CHANGES',_0x3f46f1);return _0x1a009a?m(_0x2f9f98,'X_OF_Y_CHANGES',[_0x12690b+0x1,_0x3f46f1]):_0x2672e1;}),_0x52df61['set']({'label':m(_0x2f9f98,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1dcbd4}),_0x45cdc3['set']({'label':m(_0x2f9f98,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5e2179}),_0x52df61['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x45cdc3['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x52df61['on']('execute',()=>this['fire']('execute','backward')),_0x45cdc3['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',_0x94b1a7['if']('_isStatusLabelVisible','ck-hidden',_0x26da00=>!_0x26da00)]},'children':[{'text':_0x94b1a7['to']('isNavigationMode',_0x3fb5e7=>_0x3fb5e7?m(_0x2f9f98,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x2f9f98,'Total')+':\x20')}]},{'text':_0x94b1a7['to']('_statusText')}]},new _0x29c4ab(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x52df61,_0x45cdc3]}]});}}const ge='ck-editor__editable__loading-overlay';class fi extends _0x2182b9{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2d8fd4=this['editor']['editing']['view'];_0x2d8fd4['change'](_0x3dc249=>{for(const _0x3b0898 of _0x2d8fd4['document']['roots'])_0x3dc249['addClass'](ge,_0x3b0898);});}['hide'](){const _0x7971a8=this['editor']['editing']['view'];_0x7971a8['change'](_0x25b861=>{for(const _0x717874 of _0x7971a8['document']['roots'])_0x25b861['removeClass'](ge,_0x717874);});}}class v extends _0x2182b9{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,fi];}['init'](){const _0x473d9b=this['editor'],_0x59b35d=_0x473d9b['plugins']['get'](u),_0x2104af=_0x473d9b['plugins']['get'](fi);_0x473d9b['ui']['componentFactory']['add']('exitToEditing',_0x1eddde=>{const _0x3b4128=new _0x534191(_0x1eddde);return _0x3b4128['set']({'label':m(_0x1eddde,'Back\x20to\x20editing'),'icon':_0x5cdc3a,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3b4128,'execute',()=>{_0x473d9b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3b4128;}),_0x473d9b['ui']['componentFactory']['add']('restoreRevision',_0xb2fd24=>{const _0x172b24=new _0x534191(_0xb2fd24);return _0x172b24['set']({'label':m(_0xb2fd24,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x172b24['bind']('isEnabled')['to'](_0x473d9b['commands']['get']('restoreRevision')),this['listenTo'](_0x172b24,'execute',()=>_0x473d9b['execute']('restoreRevision')),_0x172b24;}),_0x473d9b['ui']['componentFactory']['add']('changesNavigation',_0x44ea10=>{const _0x5b2213=new pi(_0x44ea10),_0x12c19c=_0x473d9b['commands']['get']('showPreviousChange'),_0x3aefa8=_0x473d9b['commands']['get']('showNextChange');return _0x5b2213['bind']('isBackwardNavigationEnabled')['to'](_0x12c19c,'isEnabled'),_0x5b2213['bind']('isForwardNavigationEnabled')['to'](_0x3aefa8,'isEnabled'),_0x5b2213['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x59b35d),this['listenTo'](_0x5b2213,'execute',(_0x471800,_0x43d475)=>{_0x473d9b['execute']('forward'===_0x43d475?'showNextChange':'showPreviousChange');}),_0x5b2213;}),_0x2104af['show'](),_0x59b35d['on']('change:isReady',(_0x2bcb57,_0x17c062,_0x1c85cb)=>{_0x1c85cb?_0x2104af['hide']():_0x2104af['show']();});}}class li extends ti{['_resizeObserver']=null;constructor(_0x2a4359,_0xb2af40){super(_0x2a4359,_0xb2af40);const _0x4a50f5=this['bindTemplate'];this['set']({'label':m(_0x2a4359,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x2a4359,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x4a50f5['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 _0x18b5e5=this['fieldView']['element'];this['_tooltipString']=_0x18b5e5['scrollWidth']>_0x18b5e5['clientWidth']&&_0x18b5e5['value']||'';}}class vi extends _0x14bc2f{constructor(_0x52e0d3,_0x3a5f04,_0x312800){super(_0x52e0d3);const _0x194ad6=new _0x2d523d();_0x194ad6['set']({'content':_0x26004b,'viewBox':'0\x200\x2011\x2010'});const _0x4ba37d=['ck','ck-revision-history-sidebar__revision-author'];_0x312800&&_0x4ba37d['push']('ck-revision-history-sidebar__revision-author_creator');const _0x21b067=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x52e0d3,_0x312800?'Revision\x20creator':'Revision\x20author')},'children':[_0x194ad6,_0x3a5f04['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4ba37d},'children':_0x21b067});}}function mi(_0x486f38,_0x25ddf9){const _0x38197e=_0x486f38['bindTemplate'],_0x567586=_0x486f38['locale'],_0x25010d=_0x25a564(_0x567586);_0x25010d['panelPosition']='sw';const _0x487f7f=function(_0xf03d70,_0x48c462){const _0x38b023=function(_0x3b3b8a,_0x3ac0a8){const _0x457a1c=_0x3b3b8a['locale'],_0x5a1240={'Compare\x20against\x20selected':m(_0x457a1c,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x457a1c,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x457a1c,'Restore\x20this\x20revision')};return _0x3ac0a8['map'](_0x1b2009=>{const _0x47543f=_0x5a1240[_0x1b2009['name']];return _0x47543f&&_0x47543f!==_0x1b2009['name']&&(_0x1b2009['name']=_0x47543f),_0x1b2009;});}(_0xf03d70,_0x48c462),_0x5a9042=new _0x401ff4();for(const _0x11f457 of _0x38b023){const _0x1388fa={'type':'button','model':new to({'label':_0x11f457['name'],'class':_0x11f457['class'],'withText':!0x0,'role':'menuitem','_action':_0x11f457['action']})};_0x1388fa['model']['bind']('isEnabled')['to'](_0xf03d70,'isActionsDropdownOpen',_0x5d7361=>'function'!=typeof _0x11f457['isEnabled']||(!_0x5d7361||_0x11f457['isEnabled'](_0xf03d70))),_0x5a9042['add'](_0x1388fa);}return _0x5a9042;}(_0x486f38,_0x25ddf9);return _0x486f38['bind']('isActionsDropdownOpen')['to'](_0x25010d,'isOpen'),_0x25010d['buttonView']['set']({'label':m(_0x567586,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x356400}),_0x25010d['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x38197e['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x38197e['to'](_0x1c9994=>_0x1c9994['stopPropagation']())}}),_0x25010d['on']('execute',_0x1c97a1=>{_0x486f38['isReady']&&'function'==typeof _0x1c97a1['source']['_action']&&_0x1c97a1['source']['_action'](_0x486f38);}),_0x348879(_0x25010d,_0x487f7f,{'role':'menu'}),_0x25010d['listenTo'](_0x486f38,'change:isActionsDropdownOpen',(_0x469b88,_0xdd97b9,_0xf84d53)=>{if(_0xf84d53)for(const _0x56b39a of _0x25010d['listView']['items']){const _0x49eefe=_0x56b39a['children']['first'],_0x28ca2d=_0x25ddf9['find'](_0x5a7aa2=>_0x5a7aa2['action']===_0x49eefe['_action'])['isVisible'];_0x56b39a['isVisible']=void 0x0===_0x28ca2d||_0x28ca2d(_0x486f38);}}),_0x25010d;}class ki extends/* #__PURE__ -- @preserve */
27
+ _0x55f1e2(_0x14bc2f){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x343aec,_0x1a1fb9,_0x24c36b,_0x1973c7){super(_0x343aec);const _0x591c3f=this['bindTemplate'],_0x2b2eba=function(_0x435827,_0x995567){const _0x1024ce=Array['from'](_0x995567['authors'])['filter'](_0x43e6df=>_0x43e6df!=_0x995567['creator']);return _0x995567['creator']&&_0x1024ce['unshift'](_0x995567['creator']),_0x1024ce['map'](_0x27a0ce=>new vi(_0x435827,_0x27a0ce,_0x27a0ce==_0x995567['creator']));}(_0x343aec,_0x1a1fb9);this['id']=_0x1a1fb9['id'],this['_revision']=_0x1a1fb9,this['_requireRevisionName']=_0x1973c7,this['bind']('name','createdAt')['to'](_0x1a1fb9),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x43e2a6=>{return _0x2d684e=_0x343aec['uiLanguage'],(_0x3e3649=_0x43e2a6)['toLocaleDateString'](_0x2d684e,{'month':'long','day':'numeric'})+',\x20'+_0x3e3649['toLocaleTimeString'](_0x2d684e,{'hour':'numeric','minute':'numeric'});var _0x2d684e,_0x3e3649;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new li(_0x343aec,_0x8e7e4f),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x344f30=>_0x344f30||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x330dd0,_0x36cc43)=>_0x330dd0&&_0x36cc43),this['revisionActionsView']=_0x24c36b&&_0x24c36b['length']?mi(this,_0x24c36b):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x591c3f['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x591c3f['if']('isEnabled','ck-disabled',_0x1ad1e7=>!_0x1ad1e7),_0x591c3f['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x591c3f['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x591c3f['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':_0x591c3f['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':_0x2b2eba}]},this['revisionActionsView']],'on':{'click':_0x591c3f['to'](_0x3bbf13=>{_0x3bbf13['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x161194=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x161194,'change',()=>{this['_requireRevisionName']&&!_0x161194['value']||this['fire']('setName',{'id':this['id'],'name':_0x161194['value']}),_0x161194['value']||(_0x161194['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ji(_0x39a260,_0x19fe95){const _0x28be60=_0xbf028b['fromJSDate'](_0x39a260)['setLocale'](_0x19fe95),_0x527acf=_0xbf028b['local'](),_0x45b985=_0x527acf['minus']({'days':0x1})['startOf']('day');let _0x2be0e1,_0x30f4ce;return _0x28be60['hasSame'](_0x527acf,'day')?(_0x2be0e1=_0x28be60['startOf']('day')['toJSDate'](),_0x30f4ce=_0x28be60['toRelativeCalendar']()):_0x28be60['hasSame'](_0x45b985,'day')?(_0x2be0e1=_0x45b985['toJSDate'](),_0x30f4ce=_0x28be60['toRelativeCalendar']()):_0x28be60['hasSame'](_0x527acf,'week')?(_0x2be0e1=_0x28be60['startOf']('week')['toJSDate'](),_0x30f4ce=_0x28be60['weekdayLong']||''):_0x28be60['hasSame'](_0x527acf,'year')?(_0x2be0e1=_0x28be60['startOf']('month')['toJSDate'](),_0x30f4ce=_0x28be60['monthLong']||''):(_0x2be0e1=_0x28be60['startOf']('year')['toJSDate'](),_0x30f4ce=String(_0x28be60['year'])),{'startDate':_0x2be0e1,'localizedPeriodName':_0x30f4ce};}class Ni extends _0x14bc2f{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x49497f,_0x119d49,_0x2f0e5a,_0x23aa3b){super(_0x49497f);const _0x43dbf0=ji(_0x119d49,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x119d49,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x2f0e5a,this['_requireRevisionName']=_0x23aa3b,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':_0x43dbf0}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x4caee3){const _0x52d059=new ki(this['locale'],_0x4caee3,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x52d059);}['removeRevision'](_0x598443){const _0x573131=this['revisionViews']['find'](_0xdb86db=>_0xdb86db['id']===_0x598443['id']);this['revisionViews']['remove'](_0x573131);}}class Si extends _0x14bc2f{constructor(_0x2b3b24){super(_0x2b3b24);const _0x292653=new _0x2d523d();_0x292653['content']=_0x1377de,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x292653,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x2b3b24,'Revision\x20history')]}]});}}class Ri extends _0x14bc2f{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x16c67f,_0x43a681,_0x2bf294,_0x1e1ae4){super(_0x16c67f);const _0x55482c=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x43a681,this['_revisionActions']=_0x2bf294,this['_requireRevisionName']=_0x1e1ae4,this['on']('select',(_0x5bc2dc,_0x2a7e13)=>{this['fire']('revisionSelected',_0x2a7e13);}),this['on']('setName',(_0xe08ebf,_0x42d503)=>{this['fire']('revisionSetName',_0x42d503);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Si(_0x16c67f),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x55482c['if']('isEnabled','ck-disabled',_0x490436=>!_0x490436)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x3c6530 of this['_revisions'])this['_addRevision'](_0x3c6530);this['_revisions']['on']('add',(_0x33cab5,_0x391196)=>{this['_addRevision'](_0x391196);}),this['_revisions']['on']('remove',(_0x5db132,_0x5e6b9c)=>{this['_removeRevision'](_0x5e6b9c);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x340508=>_0x340508['revisionViews']['map'](_0x265fcc=>_0x265fcc))['flat']();}['selectRevision'](_0x25feb8){for(const _0x50dbfc of this['revisionViews'])_0x25feb8&&_0x25feb8['id']===_0x50dbfc['id']?_0x50dbfc['select']():_0x50dbfc['deselect']();}['highlightRevisions'](_0x9ebfd4){for(const _0x3b017e of this['revisionViews'])_0x9ebfd4['some'](({id:_0x235b98})=>_0x235b98===_0x3b017e['id'])?_0x3b017e['highlight']():_0x3b017e['unhighlight']();}['_addRevision'](_0x365ed4){const _0x45764a=ji(_0x365ed4['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0xe13240=this['timePeriodViews']['get'](0x0);_0xe13240&&_0xe13240['startDate']['getTime']()===_0x45764a['getTime']()||(_0xe13240=new Ni(this['locale'],_0x45764a,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0xe13240)),_0xe13240['addRevision'](_0x365ed4);}['_removeRevision'](_0x3768be){const _0x282b50=ji(_0x3768be['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x282b50)['removeRevision'](_0x3768be);}['_getTimePeriodViewByStartDate'](_0x2191e6){return this['timePeriodViews']['find'](_0x5d5f61=>_0x5d5f61['startDate']['getTime']()===_0x2191e6['getTime']());}}class d extends _0x2182b9{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x47a0aa){super(_0x47a0aa),this['_revisionViewer']=_0x47a0aa['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x5eb69b=this['_revisionsRepository']['_revisions'],_0x839629=this['_createRevisionActions'](),_0x2c476f=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Ri(this['editor']['locale'],_0x5eb69b,_0x839629,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',(_0x1522ae,_0x39e520)=>{_0x39e520['revisionViews']['on']('add',(_0xd8d80f,_0x296439)=>{_0x296439['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)),_0x2c476f['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x107134=this['_revisionsRepository']['getRevision'](0x0);if(_0x107134){const _0x150081=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x107134['id']);this['_revisionViewer']['compare'](_0x107134,_0x150081);}}['_handleRevisionSelected'](_0x4f4431,_0x522a44){const _0x26deda=this['_revisionsRepository']['getRevision'](_0x522a44['id']),_0x48692=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x26deda['id']);this['_revisionViewer']['compare'](_0x26deda,_0x48692);}['_handleRevisionSetName'](_0x1dad47,_0x307695){this['_revisionsRepository']['getRevision'](_0x307695['id'])['setName'](_0x307695['name']);}['_handleDiffChange'](_0x2f44a2,_0x46e003,_0x48b8a9){const _0x4aa809=this['_revisionsRepository']['getRevisionsInDiff'](_0x48b8a9);_0x4aa809['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x4aa809),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x4aa809[0x0]));}['_createRevisionActions'](){const _0x37a967=this['editor'],_0x2152ab=d['availableRevisionActions'],_0x57bf61=_0x37a967['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x57bf61['length'])return _0x57bf61['map'](_0x23e47b=>{const _0x4b6f6d='string'==typeof _0x23e47b?Object['assign']({},_0x2152ab[_0x23e47b]):_0x23e47b;return _0x4b6f6d['action']=_0x4b6f6d['action']['bind'](this,_0x37a967),_0x4b6f6d['isVisible']&&(_0x4b6f6d['isVisible']=_0x4b6f6d['isVisible']['bind'](this,_0x37a967)),_0x4b6f6d;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4e2c85},_0x2ff2f4)=>{const _0x52342c=_0x4e2c85['get'](u),_0x5baafa=_0x52342c['repository'];let _0x3fb8e8=_0x52342c['diff']['newRevisionId'],_0x1db14f=_0x2ff2f4['id'];_0x5baafa['getIndex'](_0x3fb8e8)>_0x5baafa['getIndex'](_0x1db14f)&&([_0x3fb8e8,_0x1db14f]=[_0x1db14f,_0x3fb8e8]),_0x52342c['compare'](_0x3fb8e8,_0x1db14f);},'isVisible':({plugins:_0x464839},_0x3e60df)=>{const _0x300e99=_0x464839['get'](u);return!(_0x300e99['repository']['getRevisionsInDiff'](_0x300e99['diff'])['length']>0x2)&&!_0x3e60df['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4f41db,{id:_0x15e6fc})=>{_0x4f41db['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x15e6fc);},'isVisible':({plugins:_0x466091},_0x587613)=>!!_0x466091['get'](u)['repository']['getLaterVisibleRevision'](_0x587613['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x1d72ab},{id:_0x1a13b9,revisionNameView:_0x359f63})=>{const _0x2d42bd=_0x1d72ab['get'](u),_0x2d0dca=_0x2d42bd['repository']['getEarlierVisibleRevision'](_0x1a13b9);_0x2d42bd['compare'](_0x1a13b9,_0x2d0dca),_0x359f63['focus'](),_0x359f63['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x61e7f1,_0x197b92){super(_0x61e7f1),this['_view']=_0x197b92,this['_toolbarConfig']=st(_0x61e7f1['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x3df6d0){const _0x2014fa=this['editor'],_0x1a5a65=this['view'],_0x1864f6=_0x2014fa['editing']['view'],_0x3762a1=_0x1a5a65['editable'],_0x8fd9a1=_0x1864f6['document']['getRoot']();_0x3762a1['name']=_0x8fd9a1['rootName'],_0x1a5a65['render']();const _0x173ea3=_0x3762a1['element'];this['setEditableElement'](_0x3762a1['name'],_0x173ea3),_0x1a5a65['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1864f6['attachDomRoot'](_0x173ea3),this['_elementReplacer']['replace'](_0x3df6d0,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x5e4f81=this['view'],_0x5c17a5=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x5c17a5['detachDomRoot'](_0x5e4f81['editable']['name']),_0x5e4f81['destroy']();}['_initToolbar'](){const _0x18dafc=this['view'];_0x18dafc['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x18dafc['stickyPanel']['limiterElement']=_0x18dafc['element'],_0x18dafc['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x28eda})=>_0x28eda),_0x18dafc['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x18dafc['toolbar']);}}class ii extends _0x21096b{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0xef71c8,_0x17a320,_0x490ea8={}){super(_0xef71c8),this['stickyPanel']=new _0x267fea(_0xef71c8),this['toolbar']=new _0x2a39c7(_0xef71c8,{'shouldGroupWhenFull':_0x490ea8['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0xef71c8,_0x17a320);}['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
- _0x335ce4(_0x43bc7b){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x451214,_0x360431){super(_0x360431),this['sourceElement']=_0x451214,this['model']['document']['createRoot']();const _0x398a24=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x398a24);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x422699,_0x2363f7){const _0x5db86f=new this(_0x422699,_0x2363f7);return await _0x5db86f['initPlugins'](),await _0x5db86f['ui']['init'](_0x422699),await _0x5db86f['data']['init'](_0x5db86f['config']['get']('initialData')||''),_0x5db86f['fire']('ready'),_0x5db86f;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class ht extends _0x2bce4d{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3115ca){function _0x16361f(_0x5324aa){return _0x5324aa['map'](_0x3d8d12=>String['fromCharCode'](_0x3d8d12))['join']('');}super(_0x3115ca),this['result']='end',_0x3115ca[_0x16361f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x16361f([0x76,0x69,0x65,0x77])][_0x16361f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x16361f([0x61,0x75,0x74,0x6f]),_0x3115ca[_0x16361f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x16361f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x16361f([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x16361f([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x16361f([0x6f,0x6b])});}}class ct extends _0x2bce4d{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x33b1f7){if(super(_0x33b1f7),!this['editor']['config']['get']('revisionHistory'))throw new _0x5a9728('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x156b82=>this['_showRevisionViewer']({..._0x156b82,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x520197=>this['_closeRevisionViewer'](_0x520197)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x5d4864=>this['_restoreRevision'](_0x5d4864)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x482581){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x482581;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x2942b2){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x2942b2);}['getRevision'](_0x259590){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x259590);}['getRevisions'](_0x19baac){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x19baac||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x1e63e6=this['editor'],_0xcc5486=_0x4af87c(_0x1e63e6,p),_0x2c68d7=_0x1e63e6['plugins']['get']('RevisionTracker'),_0x5d5f40=_0x1e63e6['plugins']['get']('Users')['users'];return _0xcc5486['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0xcc5486['lazyRoots'],(_0xcc5486['plugins']['push'](ht,u,v,class extends _0x2bce4d{static get['requires'](){return[u,'Users'];}['init'](){const _0x498041=this['editor']['plugins']['get']('Users');for(const _0x348631 of _0x5d5f40)_0x348631['isAnonymous']||_0x498041['getUser'](_0x348631['id'])||_0x498041['addUser'](_0x348631);const _0x2fe356=_0x2c68d7['repository']['getRevisions']();let _0x39c906=null;const _0xb7b4d=this['editor']['plugins']['get']('RevisionViewer');_0xb7b4d['adapter']=_0x2c68d7['adapter'],_0xb7b4d['bind']('isEnabled')['to'](_0x2c68d7),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x1e63e6,'isReadOnly',_0x48854e=>!_0x48854e);for(const _0x4d4b65 of _0x2fe356){const _0x31c0f9=null===_0x4d4b65['creator'];if(_0x31c0f9&&_0x4d4b65['toVersion']===_0x4d4b65['fromVersion'])continue;const _0x3b7285=_0x4d4b65['toJSON']();_0xb7b4d['addRevisionData'](_0x3b7285,(_0x33286a,_0x4d3d85,_0x5863dc)=>{if(_0x31c0f9){if(_0x39c906)_0x39c906['_update'](_0x33286a,_0x4d3d85);else{if(!_0x4d3d85){const _0x2f9616=_0x5863dc['toJSON']();_0x2f9616['id']=_0x3bb1d9(),_0x2c68d7['saveRevision'](_0x2f9616,_0x5863dc['toVersion'])['then'](_0x249204=>{_0x39c906=_0x249204;});}}}else _0x4d4b65['_update'](_0x33286a,_0x4d3d85);});}}},d),_0xcc5486);}['_enhanceShowRevisionViewerCallback'](){const _0x5f507d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x990f25=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x1721a2=this['editor']['plugins']['get']('Autosave');await _0x1721a2['save']();}else await _0x990f25['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1ef6d5=this['editor']['plugins']['get']('Dialog');_0x1ef6d5['isOpen']&&_0x1ef6d5['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x4cfaf6=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x40498d of _0x4cfaf6)_0x40498d['class']=_0x40498d['class']?_0x40498d['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x5037a6=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5037a6&&_0x5037a6['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x263764=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x263764&&_0x263764['setAttribute']('tabindex','-1');}}const _0x55c968=this['_getRevisionViewerEditorConfig']();return _0x5f507d(_0x55c968)['then'](_0x2f3754=>{return(this['_viewerEditor']=_0x2f3754,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'),_0x2f3754);})['catch'](_0xe6e805=>(console['error'](_0xe6e805),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3d34ce=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 _0x196c52=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3119da of _0x196c52)_0x3119da['class']='ck-tab-panel_disabled'===_0x3119da['class']?'':_0x3119da['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x28c93b=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x28c93b&&_0x28c93b['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x5ba995=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x5ba995&&_0x5ba995['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x3d34ce(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x252646=this['editor']['plugins']['get']('Annotations');_0x252646['refreshVisibility'](),_0x252646['refreshPositioning']();}});});}['_showRevisionViewer'](_0x1c59b1){const _0x271291=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x3e97cb=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x228b4d=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x228b4d,_0x1c59b1)['then'](_0x57b53b=>(_0x3e97cb['style']['display']='block',_0x271291['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x57b53b));}['_closeRevisionViewer'](_0x22223e){const _0x3550a6=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3550a6['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x22223e['destroy']();}async['_restoreRevision'](_0x5511c5){const _0x2a720f=this['editor'],_0x2e3952=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3c0493=_0x2a720f['plugins']['get']('RevisionTracker'),_0x22e2c5=_0x2a720f['plugins']['get']('RevisionHistoryUtils'),_0x25c05d=_0x2e3952['repository']['getRevision'](_0x5511c5);let _0xcad0b8,_0x1f261e,_0x5d3df3;try{await _0x22e2c5['loadRevisionData'](_0x25c05d,this['adapter']),_0xcad0b8=_0x22e2c5['getRevisionDocumentData'](_0x25c05d),_0x1f261e=_0x22e2c5['getRevisionRootsAttributes'](_0x25c05d);}catch(_0x333fbd){return void console['error'](_0x333fbd);}_0x2a720f['model']['change'](_0x4416b2=>{for(const _0x277943 of Array['from'](_0x2a720f['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4416b2['removeMarker'](_0x277943);}),_0x2e3952['isReady']=!0x1,_0x2a720f['model']['enqueueChange'](_0x51bc9f=>{_0x51bc9f['setSelection'](null),_0x51bc9f['removeSelectionAttribute'](_0x2a720f['model']['document']['selection']['getAttributeKeys']());const _0x412d77=Object['keys'](_0xcad0b8);for(const _0x3a0cb5 of _0x2a720f['model']['document']['roots'])'$graveyard'!=_0x3a0cb5['rootName']&&_0x3a0cb5['isAttached']()&&!_0x412d77['includes'](_0x3a0cb5['rootName'])&&_0x51bc9f['detachRoot'](_0x3a0cb5);for(const _0x12f2d2 of _0x412d77){let _0x119284=_0x2a720f['model']['document']['getRoot'](_0x12f2d2);_0x119284&&_0x119284['isAttached']()||(_0x119284=_0x51bc9f['addRoot'](_0x12f2d2));const _0x16b491=_0x1f261e[_0x12f2d2],_0x18ceac=Object['keys'](_0x16b491),_0x17b808=_0xcad0b8[_0x12f2d2];for(const _0x5a2f63 of _0x119284['getAttributeKeys']())_0x18ceac['includes'](_0x5a2f63)||_0x51bc9f['removeAttribute'](_0x5a2f63,_0x119284);for(const _0x1d00bb of _0x18ceac)_0x51bc9f['setAttribute'](_0x1d00bb,_0x1f261e[_0x12f2d2][_0x1d00bb],_0x119284);_0x51bc9f['remove'](_0x51bc9f['createRangeIn'](_0x119284)),_0x51bc9f['insert'](_0x2a720f['data']['parse'](_0x17b808,_0x119284),_0x119284,0x0);}});const _0x35f392=m(_0x2a720f['locale'],'Restored');if(_0x25c05d['name'])_0x5d3df3=-0x1==_0x25c05d['name']['indexOf'](_0x35f392)?_0x35f392+':\x20'+_0x25c05d['name']:_0x25c05d['name'];else _0x5d3df3=_0x35f392+':\x20'+(_0x25c05d['createdAt']['toLocaleDateString'](_0x2a720f['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x25c05d['createdAt']['toLocaleTimeString'](_0x2a720f['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3c0493['saveRevision']({'name':_0x5d3df3}),_0x2e3952['isReady']=!0x0,_0x2a720f['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,ht as RevisionViewerIntegration,wi as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,rt as ShowChangeCommand};
29
+ rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x233e89){super(_0x233e89),this['_revisionViewer']=_0x233e89['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x2f7135=this['_revisionsRepository']['_revisions'],_0x4bd184=this['_createRevisionActions'](),_0x4558ed=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Ri(this['editor']['locale'],_0x2f7135,_0x4bd184,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',(_0x3a047c,_0x50fb79)=>{_0x50fb79['revisionViews']['on']('add',(_0x485018,_0x5e8a6e)=>{_0x5e8a6e['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)),_0x4558ed['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x497125=this['_revisionsRepository']['getRevision'](0x0);if(_0x497125){const _0x4f6149=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x497125['id']);this['_revisionViewer']['compare'](_0x497125,_0x4f6149);}}['_handleRevisionSelected'](_0x1a1201,_0x3acf15){const _0x26b7ce=this['_revisionsRepository']['getRevision'](_0x3acf15['id']),_0x17de14=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x26b7ce['id']);this['_revisionViewer']['compare'](_0x26b7ce,_0x17de14);}['_handleRevisionSetName'](_0x14eaaa,_0x1d3da9){this['_revisionsRepository']['getRevision'](_0x1d3da9['id'])['setName'](_0x1d3da9['name']);}['_handleDiffChange'](_0x3d9b31,_0x368422,_0x534746){const _0x19994a=this['_revisionsRepository']['getRevisionsInDiff'](_0x534746);_0x19994a['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x19994a),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x19994a[0x0]));}['_createRevisionActions'](){const _0x1aa224=this['editor'],_0x4d4c28=d['availableRevisionActions'],_0x106447=_0x1aa224['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x106447['length'])return _0x106447['map'](_0x7bf46=>{const _0x47b798='string'==typeof _0x7bf46?Object['assign']({},_0x4d4c28[_0x7bf46]):_0x7bf46;return _0x47b798['action']=_0x47b798['action']['bind'](this,_0x1aa224),_0x47b798['isVisible']&&(_0x47b798['isVisible']=_0x47b798['isVisible']['bind'](this,_0x1aa224)),_0x47b798;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x1b3c19},_0x440070)=>{const _0xe5fdf5=_0x1b3c19['get'](u),_0x103c82=_0xe5fdf5['repository'];let _0x13c02d=_0xe5fdf5['diff']['newRevisionId'],_0x58c657=_0x440070['id'];_0x103c82['getIndex'](_0x13c02d)>_0x103c82['getIndex'](_0x58c657)&&([_0x13c02d,_0x58c657]=[_0x58c657,_0x13c02d]),_0xe5fdf5['compare'](_0x13c02d,_0x58c657);},'isVisible':({plugins:_0x109df9},_0x37884b)=>{const _0x308684=_0x109df9['get'](u);return!(_0x308684['repository']['getRevisionsInDiff'](_0x308684['diff'])['length']>0x2)&&!_0x37884b['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x3391b7,{id:_0x264b81})=>{_0x3391b7['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x264b81);},'isVisible':({plugins:_0x13691b},_0x2832c3)=>!!_0x13691b['get'](u)['repository']['getLaterVisibleRevision'](_0x2832c3['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x32a717},{id:_0x188a16,revisionNameView:_0x37bd38})=>{const _0x2d0d5e=_0x32a717['get'](u),_0x16e190=_0x2d0d5e['repository']['getEarlierVisibleRevision'](_0x188a16);_0x2d0d5e['compare'](_0x188a16,_0x16e190),_0x37bd38['focus'](),_0x37bd38['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x372790,_0x1a9878){super(_0x372790),this['_view']=_0x1a9878,this['_toolbarConfig']=st(_0x372790['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x4a1e13){const _0x25c199=this['editor'],_0x2db269=this['view'],_0x2502d=_0x25c199['editing']['view'],_0x54339f=_0x2db269['editable'],_0x405dfb=_0x2502d['document']['getRoot']();_0x54339f['name']=_0x405dfb['rootName'],_0x2db269['render']();const _0x39a40d=_0x54339f['element'];this['setEditableElement'](_0x54339f['name'],_0x39a40d),_0x2db269['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2502d['attachDomRoot'](_0x39a40d),this['_elementReplacer']['replace'](_0x4a1e13,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x16827d=this['view'],_0x439040=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x439040['detachDomRoot'](_0x16827d['editable']['name']),_0x16827d['destroy']();}['_initToolbar'](){const _0x213d4c=this['view'];_0x213d4c['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x213d4c['stickyPanel']['limiterElement']=_0x213d4c['element'],_0x213d4c['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x49f03f})=>_0x49f03f),_0x213d4c['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x213d4c['toolbar']);}}class ii extends _0x4534b8{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x15d8e5,_0x1db572,_0x5c3a0a={}){super(_0x15d8e5),this['stickyPanel']=new _0x2a6c1b(_0x15d8e5),this['toolbar']=new _0x1b55fe(_0x15d8e5,{'shouldGroupWhenFull':_0x5c3a0a['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x15d8e5,_0x1db572);}['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
+ _0x1e99d3(_0x1eb8e8){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x40944e,_0x204280){super(_0x204280),this['sourceElement']=_0x40944e,this['model']['document']['createRoot']();const _0x2fc0b1=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x2fc0b1);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0xcd95d,_0x48c6d1){const _0x3d57df=new this(_0xcd95d,_0x48c6d1);return await _0x3d57df['initPlugins'](),await _0x3d57df['ui']['init'](_0xcd95d),await _0x3d57df['data']['init'](_0x3d57df['config']['get']('initialData')||''),_0x3d57df['fire']('ready'),_0x3d57df;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class at extends _0x2182b9{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe53315){function _0x25c4f4(_0x4d1acd){return _0x4d1acd['map'](_0x44c87e=>String['fromCharCode'](_0x44c87e))['join']('');}super(_0xe53315),this['result']='end',_0xe53315[_0x25c4f4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x25c4f4([0x76,0x69,0x65,0x77])][_0x25c4f4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x25c4f4([0x61,0x75,0x74,0x6f]),_0xe53315[_0x25c4f4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x25c4f4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x25c4f4([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x25c4f4([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x25c4f4([0x6f,0x6b])});}}class ht extends _0x2182b9{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x53c757){if(super(_0x53c757),!this['editor']['config']['get']('revisionHistory'))throw new _0x462c45('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x2f105c=>this['_showRevisionViewer']({..._0x2f105c,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x120dd8=>this['_closeRevisionViewer'](_0x120dd8)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x6772c3=>this['_restoreRevision'](_0x6772c3)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x38adbe){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x38adbe;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x462794){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x462794);}['getRevision'](_0x1e48c8){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1e48c8);}['getRevisions'](_0x2726e4){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2726e4||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x177e6d=this['editor'],_0x33974e=_0x35fa21(_0x177e6d,p),_0x3607d0=_0x177e6d['plugins']['get']('RevisionTracker'),_0x1f3b2c=_0x177e6d['plugins']['get']('Users')['users'];return _0x33974e['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x33974e['lazyRoots'],(_0x33974e['plugins']['push'](at,u,v,class extends _0x2182b9{static get['requires'](){return[u,'Users'];}['init'](){const _0x3b5c39=this['editor']['plugins']['get']('Users');for(const _0x30814f of _0x1f3b2c)_0x30814f['isAnonymous']||_0x3b5c39['getUser'](_0x30814f['id'])||_0x3b5c39['addUser'](_0x30814f);const _0xdcd7a8=_0x3607d0['repository']['getRevisions']();let _0x19b6ee=null;const _0x3ad310=this['editor']['plugins']['get']('RevisionViewer');_0x3ad310['adapter']=_0x3607d0['adapter'],_0x3ad310['bind']('isEnabled')['to'](_0x3607d0),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x177e6d,'isReadOnly',_0x45cc1a=>!_0x45cc1a);for(const _0x391b11 of _0xdcd7a8){const _0x56abb6=null===_0x391b11['creator'];if(_0x56abb6&&_0x391b11['toVersion']===_0x391b11['fromVersion'])continue;const _0x3e04f9=_0x391b11['toJSON']();_0x3ad310['addRevisionData'](_0x3e04f9,(_0x135c2a,_0x116b44,_0x543d44)=>{if(_0x56abb6){if(_0x19b6ee)_0x19b6ee['_update'](_0x135c2a,_0x116b44);else{if(!_0x116b44){const _0x5e6a4f=_0x543d44['toJSON']();_0x5e6a4f['id']=_0x3ca1e2(),_0x3607d0['saveRevision'](_0x5e6a4f,_0x543d44['toVersion'])['then'](_0xe6bbc=>{_0x19b6ee=_0xe6bbc;});}}}else _0x391b11['_update'](_0x135c2a,_0x116b44);});}}},d),_0x33974e);}['_enhanceShowRevisionViewerCallback'](){const _0x354da1=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x166611=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x40b773=this['editor']['plugins']['get']('Autosave');await _0x40b773['save']();}else await _0x166611['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x2f5cab=this['editor']['plugins']['get']('Dialog');_0x2f5cab['isOpen']&&_0x2f5cab['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x363496=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x12e402 of _0x363496)_0x12e402['class']=_0x12e402['class']?_0x12e402['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x3917c8=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x3917c8&&_0x3917c8['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xe31a56=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xe31a56&&_0xe31a56['setAttribute']('tabindex','-1');}}const _0x49c4e5=this['_getRevisionViewerEditorConfig']();return _0x354da1(_0x49c4e5)['then'](_0x25b7bb=>{return(this['_viewerEditor']=_0x25b7bb,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'),_0x25b7bb);})['catch'](_0x12329b=>(console['error'](_0x12329b),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1e2fe2=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 _0x434681=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x2f3c1e of _0x434681)_0x2f3c1e['class']='ck-tab-panel_disabled'===_0x2f3c1e['class']?'':_0x2f3c1e['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x97ee74=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x97ee74&&_0x97ee74['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4e09a6=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4e09a6&&_0x4e09a6['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x1e2fe2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4c14f9=this['editor']['plugins']['get']('Annotations');_0x4c14f9['refreshVisibility'](),_0x4c14f9['refreshPositioning']();}});});}['_showRevisionViewer'](_0x533233){const _0x24206f=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x22b53e=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x50d7fd=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x50d7fd,_0x533233)['then'](_0x352dbb=>(_0x22b53e['style']['display']='block',_0x24206f['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x352dbb));}['_closeRevisionViewer'](_0x3ced53){const _0x20b8b4=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x20b8b4['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x3ced53['destroy']();}async['_restoreRevision'](_0x31d454){const _0x5eeaa5=this['editor'],_0x41b15c=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2f5599=_0x5eeaa5['plugins']['get']('RevisionTracker'),_0x454b3e=_0x5eeaa5['plugins']['get']('RevisionHistoryUtils'),_0x3c0043=_0x41b15c['repository']['getRevision'](_0x31d454);let _0xc09e84,_0x4f0c6f,_0x2485ae;try{await _0x454b3e['loadRevisionData'](_0x3c0043,this['adapter']),_0xc09e84=_0x454b3e['getRevisionDocumentData'](_0x3c0043),_0x4f0c6f=_0x454b3e['getRevisionRootsAttributes'](_0x3c0043);}catch(_0x9877b0){return void console['error'](_0x9877b0);}_0x5eeaa5['model']['change'](_0x3cefd4=>{for(const _0x33b030 of Array['from'](_0x5eeaa5['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x3cefd4['removeMarker'](_0x33b030);}),_0x41b15c['isReady']=!0x1,_0x5eeaa5['model']['enqueueChange'](_0x3bbe47=>{_0x3bbe47['setSelection'](null),_0x3bbe47['removeSelectionAttribute'](_0x5eeaa5['model']['document']['selection']['getAttributeKeys']());const _0x16621f=Object['keys'](_0xc09e84);for(const _0x14b7ae of _0x5eeaa5['model']['document']['roots'])'$graveyard'!=_0x14b7ae['rootName']&&_0x14b7ae['isAttached']()&&!_0x16621f['includes'](_0x14b7ae['rootName'])&&_0x3bbe47['detachRoot'](_0x14b7ae);for(const _0x4c02e7 of _0x16621f){let _0x47d93d=_0x5eeaa5['model']['document']['getRoot'](_0x4c02e7);_0x47d93d&&_0x47d93d['isAttached']()||(_0x47d93d=_0x3bbe47['addRoot'](_0x4c02e7));const _0x15a86c=_0x4f0c6f[_0x4c02e7],_0x4e6a72=Object['keys'](_0x15a86c),_0x2c8ed5=_0xc09e84[_0x4c02e7];for(const _0x1d41ab of _0x47d93d['getAttributeKeys']())_0x4e6a72['includes'](_0x1d41ab)||_0x3bbe47['removeAttribute'](_0x1d41ab,_0x47d93d);for(const _0x5610b5 of _0x4e6a72)_0x3bbe47['setAttribute'](_0x5610b5,_0x4f0c6f[_0x4c02e7][_0x5610b5],_0x47d93d);_0x3bbe47['remove'](_0x3bbe47['createRangeIn'](_0x47d93d)),_0x3bbe47['insert'](_0x5eeaa5['data']['parse'](_0x2c8ed5,_0x47d93d),_0x47d93d,0x0);}});const _0x564a7c=m(_0x5eeaa5['locale'],'Restored');if(_0x3c0043['name'])_0x2485ae=-0x1==_0x3c0043['name']['indexOf'](_0x564a7c)?_0x564a7c+':\x20'+_0x3c0043['name']:_0x3c0043['name'];else _0x2485ae=_0x564a7c+':\x20'+(_0x3c0043['createdAt']['toLocaleDateString'](_0x5eeaa5['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3c0043['createdAt']['toLocaleTimeString'](_0x5eeaa5['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2f5599['saveRevision']({'name':_0x2485ae}),_0x41b15c['isReady']=!0x0,_0x5eeaa5['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,fi as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,ot as ShowChangeCommand};