@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20251011.0 → 0.0.0-nightly-20251013.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 _0x8d9be7,uid as _0x44f97c,Collection as _0x2c62fe,logWarning as _0x1f3840,FocusTracker as _0x2aa5a7,KeystrokeHandler as _0x1f72cf,scrollViewportToShowTarget as _0x5a4bb8,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x1189ad}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x55f32f,set as _0x53e338,unset as _0x39e49b,isEqual as _0xde9b3b}from'es-toolkit/compat';import{Plugin as _0x398bff,PendingActions as _0x2d0a83,Command as _0x47ee06,ElementApiMixin as _0x34d85b,Editor as _0x2d6d51}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x4c78be,getMarkerDomElement as _0x2df2e1,ConfirmMixin as _0x43461d,sanitizeEditorConfig as _0x598230}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x826349,ViewAttributeElement as _0x3d92fb,ViewEmptyElement as _0x5d8e9b,ViewRawElement as _0x224302,ViewUIElement as _0x1c26a4,ViewDocumentFragment as _0x3eafa2,ViewText as _0x498a40,ViewElement as _0x3a85ac,ModelElement as _0x414f80,ModelRange as _0x29901c,ModelPosition as _0x1187e3,ModelDocumentFragment as _0x17d82d,ModelText as _0x43872a}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x31e609,IconChevronUp as _0x5e2a43,IconChevronDown as _0x246235,IconUndo as _0x32d8bf,IconUser as _0x54d66b,IconThreeVerticalDots as _0x3e413e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0xe64dcd,View as _0x2f1156,submitHandler as _0x5ba221,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x38d819,ListView as _0xd36402,ListItemView as _0x45c4bf,ButtonView as _0x2a3404,MenuBarMenuView as _0x198a04,MenuBarMenuListView as _0x8d403b,MenuBarMenuListItemView as _0x313385,MenuBarMenuListItemButtonView as _0x26fbaa,ContextualBalloon as _0x2067ca,ToolbarSeparatorView as _0x1e46a8,IconView as _0x2c914d,addListToDropdown as _0x5d80dd,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x3f7a17,StickyPanelView as _0x53a95a,ToolbarView as _0x1045b4,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x81b4d8}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x8d9be7(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x369e51){super(),this['id']=_0x369e51['id']||_0x44f97c(),this['creator']=_0x369e51['creator']||null,this['authors']=_0x369e51['authors']||[],this['diffData']=_0x369e51['diffData']||null,this['toVersion']=_0x369e51['toVersion']||0x0,this['fromVersion']=_0x369e51['fromVersion']||0x0,this['set']('name',_0x369e51['name']||''),this['set']('createdAt',_0x369e51['createdAt']||new Date()),this['set']('attributes',_0x369e51['attributes']||{});}['setName'](_0xcf5691){this['_update']({'name':_0xcf5691});}['setAttribute'](_0x195991,_0x5b028c){const _0xa22eb8=_0x55f32f(this['attributes']);_0x53e338(_0xa22eb8,_0x195991,_0x5b028c),this['_update']({'attributes':_0xa22eb8});}['removeAttribute'](_0x206ab0){const _0x31e55d=_0x55f32f(this['attributes']);_0x39e49b(_0x31e55d,_0x206ab0),this['_update']({'attributes':_0x31e55d});}['_update'](_0x2db828,_0x5052fc=!0x1){let _0x142e37=!0x1;const _0x11a5cf={'id':this['id']},_0x119ef9=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x38f680 of _0x119ef9){const _0x4893f4=_0x2db828[_0x38f680];void 0x0!==_0x4893f4&&_0x4893f4!==this[_0x38f680]&&(this[_0x38f680]=_0x4893f4,_0x11a5cf[_0x38f680]=_0x4893f4,_0x142e37=!0x0);}_0x142e37&&(_0x11a5cf['authors']&&(_0x11a5cf['authorsIds']=_0x11a5cf['authors']['map'](_0x21b7fc=>_0x21b7fc['id']),delete _0x11a5cf['authors']),this['fire']('_update',_0x11a5cf,_0x5052fc));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x45c348=>_0x45c348['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x398bff{['_revisions'];static get['requires'](){return[_0x4c78be];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x220c8a){super(_0x220c8a),this['_revisions']=new _0x2c62fe();}['afterInit'](){!async function(_0x1aad23){const _0x45cac1=_0x280345([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]),_0x39607e=0xeb829,_0x48c326=0x7374585f,_0x80659c=0x73732dbf^_0x48c326,_0x1d53c6=window[_0x280345([0x44,0x61,0x74,0x65])][_0x280345([0x6e,0x6f,0x77])](),_0x56fcaa=_0x1aad23[_0x280345([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xc0d97d=new window[(_0x280345([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2166fa=>{_0x56fcaa[_0x280345([0x6f,0x6e,0x63,0x65])](_0x280345([0x72,0x65,0x61,0x64,0x79]),_0x2166fa);}),_0x2af399={[_0x280345([0x6b,0x74,0x79])]:_0x280345([0x45,0x43]),[_0x280345([0x75,0x73,0x65])]:_0x280345([0x73,0x69,0x67]),[_0x280345([0x63,0x72,0x76])]:_0x280345([0x50,0x2d,0x32,0x35,0x36]),[_0x280345([0x78])]:_0x280345([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]),[_0x280345([0x79])]:_0x280345([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]),[_0x280345([0x61,0x6c,0x67])]:_0x280345([0x45,0x53,0x32,0x35,0x36])},_0x5f1e2b=_0x56fcaa[_0x280345([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x280345([0x67,0x65,0x74])](_0x280345([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x552474(){let _0x5a77ad,_0x4453fd=null,_0x26528d=null;try{if(_0x5f1e2b==_0x280345([0x47,0x50,0x4c]))return _0x280345([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5a77ad=_0xafd55e(),!_0x5a77ad)return _0x280345([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5a77ad[_0x280345([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x26528d=_0x4d7c3a(_0x5a77ad[_0x280345([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5a77ad[_0x280345([0x6a,0x74,0x69])])),await _0x1e239c()?_0x262d42()?_0x382c3b()?_0x280345([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x15e14a()?(_0x5a77ad[_0x280345([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x280345([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4453fd=_0x361f6e(_0x280345([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5a77ad[_0x280345([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x280345([0x74,0x72,0x69,0x61,0x6c])&&(_0x4453fd=_0x361f6e(_0x280345([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x23ef7b()):_0x280345([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x280345([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x280345([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x280345([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x382c3b(){const _0x3ba68a=[_0x280345([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x280345([0x74,0x72,0x69,0x61,0x6c])][_0x280345([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a77ad[_0x280345([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1d53c6/0x3e8:0xe10*_0x80659c;return _0x5a77ad[_0x280345([0x65,0x78,0x70])]<_0x3ba68a;}function _0x262d42(){const _0x239f64=_0x5a77ad[_0x280345([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x239f64)return!0x1;if(_0x239f64[_0x280345([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x280345([0x2a])))return!0x0;if(_0x239f64[_0x280345([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x280345([0x52,0x48])))return!0x0;if(_0x239f64[_0x280345([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x280345([0x52,0x52,0x48]))){if(_0x47d364())return!0x0;if(_0x599f4f()||_0x5b4de2())return!0x0;}return!0x1;}function _0x15e14a(){const _0x4be4e2=_0x5a77ad[_0x280345([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4be4e2||0x0==_0x4be4e2[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3dda06}=new URL(window[_0x280345([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4be4e2[_0x280345([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3dda06))return!0x0;const _0xa17b61=_0x3dda06[_0x280345([0x73,0x70,0x6c,0x69,0x74])](_0x280345([0x2e]));return _0x4be4e2[_0x280345([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5d663c=>_0x5d663c[_0x280345([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x280345([0x2a])))[_0x280345([0x6d,0x61,0x70])](_0x562603=>_0x562603[_0x280345([0x73,0x70,0x6c,0x69,0x74])](_0x280345([0x2e])))[_0x280345([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2e8f29=>_0x2e8f29[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xa17b61[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x280345([0x6d,0x61,0x70])](_0x13f591=>Array(_0xa17b61[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x13f591[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x280345([0x66,0x69,0x6c,0x6c])](_0x13f591[0x0]===_0x280345([0x2a])?_0x280345([0x2a]):'')[_0x280345([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x13f591))[_0x280345([0x73,0x6f,0x6d,0x65])](_0x5374f1=>_0xa17b61[_0x280345([0x65,0x76,0x65,0x72,0x79])]((_0x2dcf82,_0x4094e7)=>_0x5374f1[_0x4094e7]===_0x2dcf82||_0x5374f1[_0x4094e7]===_0x280345([0x2a])));}function _0x23ef7b(){return _0x4453fd&&_0x26528d?new window[(_0x280345([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4abd5a,_0x1fd711)=>{_0x4453fd[_0x280345([0x74,0x68,0x65,0x6e])](_0x4abd5a,_0x1fd711),_0x26528d[_0x280345([0x74,0x68,0x65,0x6e])](_0x381964=>{_0x381964!=_0x280345([0x56,0x61,0x6c,0x69,0x64])&&_0x4abd5a(_0x381964);},_0x1fd711);}):_0x4453fd||_0x26528d||_0x280345([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4d7c3a(_0x509e88,_0x34d2fd){return new window[(_0x280345([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x513ca1=>{if(_0x14b081())return _0x513ca1(_0x280345([0x56,0x61,0x6c,0x69,0x64]));_0xfc6a7f(),_0x56fcaa[_0x280345([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x280345([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xab4d5e=!0x1;const _0x4b5086=_0x44f97c();function _0x39c7e8(_0xa16820){return!!_0xa16820&&(typeof _0xa16820===_0x280345([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xa16820===_0x280345([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xa16820[_0x280345([0x74,0x68,0x65,0x6e])]===_0x280345([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xa16820[_0x280345([0x63,0x61,0x74,0x63,0x68])]===_0x280345([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x112b9e(_0x3ffd9b){_0x4c1ea0(_0x3ffd9b)[_0x280345([0x74,0x68,0x65,0x6e])](_0x3c5a4a=>{if(!_0x3c5a4a||_0x3c5a4a[_0x280345([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x280345([0x6f,0x6b]))return _0x280345([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xf6f36a(_0x441db7(_0x4b5086+_0x34d2fd))!=_0x3c5a4a[_0x280345([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x280345([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x280345([0x56,0x61,0x6c,0x69,0x64]);})[_0x280345([0x74,0x68,0x65,0x6e])](_0x20d944=>(_0x4be89b(),_0x20d944),()=>{const _0x2f8567=_0x505a16();return null==_0x2f8567?(_0x4be89b(),_0x280345([0x56,0x61,0x6c,0x69,0x64])):_0x280345(_0x1d53c6-_0x2f8567>(0x5778dc5f^_0x48c326)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x280345([0x74,0x68,0x65,0x6e])](_0x513ca1)[_0x280345([0x63,0x61,0x74,0x63,0x68])](()=>{_0x513ca1(_0x280345([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x22dd29=0x7342b6df^_0x48c326;function _0x4be89b(){const _0x406d7c=_0x280345([0x6c,0x6c,0x63,0x74,0x2d])+_0xf6f36a(_0x441db7(_0x509e88)),_0xb8f22=_0x56836f(_0xf6f36a(window[_0x280345([0x4d,0x61,0x74,0x68])][_0x280345([0x63,0x65,0x69,0x6c])](_0x1d53c6/_0x22dd29)));window[_0x280345([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x280345([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x406d7c,_0xb8f22);}function _0x505a16(){const _0x645a96=_0x280345([0x6c,0x6c,0x63,0x74,0x2d])+_0xf6f36a(_0x441db7(_0x509e88)),_0x2d9431=window[_0x280345([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x280345([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x645a96);return _0x2d9431?window[_0x280345([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x56836f(_0x2d9431),0x10)*_0x22dd29:null;}function _0x4c1ea0(_0x7d70cf){return new window[(_0x280345([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x202067,_0x2c179e)=>{_0x7d70cf[_0x280345([0x74,0x68,0x65,0x6e])](_0x202067,_0x2c179e),window[_0x280345([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2c179e,0x73758c9f^_0x48c326);});}}_0x56fcaa[_0x280345([0x6f,0x6e])](_0x280345([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xf4d183,_0x389ede)=>{if(_0x389ede[0x0]!=_0x509e88)return _0x513ca1(_0x280345([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x389ede[0x1]={..._0x389ede[0x1],[_0x280345([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4b5086};},{[_0x280345([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x280345([0x68,0x69,0x67,0x68])}),_0x56fcaa[_0x280345([0x6f,0x6e])](_0x280345([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5646ab=>{_0x39c7e8(_0x5646ab[_0x280345([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xab4d5e=!0x0,_0x112b9e(_0x5646ab[_0x280345([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x280345([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x280345([0x6c,0x6f,0x77])}),_0xc0d97d[_0x280345([0x74,0x68,0x65,0x6e])](()=>{_0xab4d5e||_0x513ca1(_0x280345([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x14b081(){return _0x56fcaa[_0x280345([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x280345([0x76,0x69,0x65,0x77])][_0x280345([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x280345([0x61,0x75,0x74,0x6f]);}function _0xfc6a7f(){_0x56fcaa[_0x280345([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x280345([0x76,0x69,0x65,0x77])][_0x280345([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x280345([0x61,0x75,0x74,0x6f]);}}function _0x361f6e(_0x2165b5){const _0x4d60e9=[new window[(_0x280345([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x45a7f2=>setTimeout(_0x45a7f2,0x737d6693^_0x48c326)),_0xc0d97d[_0x280345([0x74,0x68,0x65,0x6e])](()=>new window[(_0x280345([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x307588=>{const _0x11d335=0x73745858^_0x48c326,_0x322360=_0x1aad23[_0x280345([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x138238(){_0x322360[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x11d335&&_0x307588();}_0x138238(),_0x322360[_0x280345([0x6f,0x6e])](_0x280345([0x61,0x64,0x64]),_0x138238);})),new window[(_0x280345([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x48a96b=>{function _0x14b678(){for(const _0x425a16 in window)if(window[_0x280345([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x280345([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x425a16))&&window[_0x425a16]==_0x39607e)return _0x48a96b();_0x56fcaa[_0x280345([0x73,0x74,0x61,0x74,0x65])]!=_0x280345([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x280345([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x14b678,0x73744bd7^_0x48c326);}_0x508d31(_0x280345([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x14b678();})];return window[_0x280345([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x280345([0x72,0x61,0x63,0x65])](_0x4d60e9)[_0x280345([0x74,0x68,0x65,0x6e])](()=>_0x2165b5);}async function _0x31942b(){if(await _0xc0d97d,_0x508d31(_0x280345([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x12611c=_0x1aad23[_0x280345([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x4f91ed=_0x1aad23[_0x280345([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])](_0x12611c[_0x280345([0x69,0x64])]),_0x3922bc=_0x4033f1(_0x280345([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3922bc[_0x280345([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x12611c['id'],_0x4f91ed?_0x4f91ed['id']:null,!0x0),_0x3922bc[_0x280345([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x280345([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3922bc[_0x280345([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3922bc[_0x280345([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x396460,void(_0x3922bc[_0x280345([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x396460);}if(_0x508d31(_0x280345([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x200310=_0x4033f1(_0x280345([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x200310[_0x280345([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x280345([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x200310[_0x280345([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x200310[_0x280345([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x396460,_0x200310[_0x280345([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x396460;}_0x56fcaa[_0x280345([0x6d,0x6f,0x64,0x65,0x6c])][_0x280345([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x396460,_0x56fcaa[_0x280345([0x6d,0x6f,0x64,0x65,0x6c])][_0x280345([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x396460,_0x56fcaa[_0x280345([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x280345([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x47d364(){return _0x508d31(_0x280345([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4033f1(_0x280345([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x280345([0x73,0x74,0x61,0x74,0x65])]==_0x280345([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x599f4f(){return _0x508d31(_0x280345([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 _0x5b4de2(){return _0x508d31(_0x280345([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x27cb96(_0x445b73){const _0xb7b5ce=_0x4828e4();_0x56fcaa[_0xb7b5ce]=_0x280345([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])+_0x445b73,_0x445b73[_0x280345([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x280345([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x4828e4()]=_0x39607e),_0x445b73!=_0x280345([0x56,0x61,0x6c,0x69,0x64])&&_0x31942b();}function _0x4828e4(){const _0x2ff1c6=window[_0x280345([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x280345([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x280345([0x6e,0x6f,0x77])]())[_0x280345([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x280345([0x2e]),'');let _0x46a7f1=_0x280345([0x73]);for(let _0x20e486=0x0;_0x20e486<_0x2ff1c6[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20e486+=0x2){let _0x3b7aa8=window[_0x280345([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2ff1c6[_0x280345([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x20e486,_0x20e486+0x2));_0x3b7aa8>=_0x45cac1[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3b7aa8-=_0x45cac1[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x46a7f1+=_0x45cac1[_0x3b7aa8];}return _0x46a7f1;}function _0xafd55e(){const _0x4ea1a9=_0x5f1e2b[_0x280345([0x73,0x70,0x6c,0x69,0x74])](_0x280345([0x2e]));if(0x3!=_0x4ea1a9[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x534cf9(_0x4ea1a9[0x1]);function _0x534cf9(_0x2ef7fd){const _0x14defd=_0x5c191e(_0x2ef7fd);return _0x14defd&&_0x21e5d0()?_0x14defd:null;function _0x21e5d0(){const _0x155eae=_0x14defd[_0x280345([0x6a,0x74,0x69])],_0x1648be=window[_0x280345([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x155eae[_0x280345([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x155eae[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4a79f3={..._0x14defd,[_0x280345([0x6a,0x74,0x69])]:_0x155eae[_0x280345([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x155eae[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4a79f3[_0x280345([0x76,0x63])],_0x441db7(_0x4a79f3)==_0x1648be;}}}async function _0x1e239c(){let _0x4c4ed3=!0x0;try{const _0x5754dc=_0x5f1e2b[_0x280345([0x73,0x70,0x6c,0x69,0x74])](_0x280345([0x2e])),[_0xc018ec,_0x1fbd26,_0x53da93]=_0x5754dc;return _0x374627(_0xc018ec),await _0x376a30(_0xc018ec,_0x1fbd26,_0x53da93),_0x4c4ed3;}catch{return!0x1;}function _0x374627(_0xf61ed8){const _0x2d1efe=_0x5c191e(_0xf61ed8);_0x2d1efe&&_0x2d1efe[_0x280345([0x61,0x6c,0x67])]==_0x280345([0x45,0x53,0x32,0x35,0x36])||(_0x4c4ed3=!0x1);}async function _0x376a30(_0x21d042,_0x37e0bb,_0x467884){const _0x24d4cd=window[_0x280345([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x280345([0x66,0x72,0x6f,0x6d])](_0x1e2da1(_0x467884),_0x75e825=>_0x75e825[_0x280345([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1089a4=new window[(_0x280345([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x280345([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x21d042+_0x280345([0x2e])+_0x37e0bb),_0x13e983=window[_0x280345([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x280345([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x13e983)return;const _0x5ce708=await _0x13e983[_0x280345([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x280345([0x6a,0x77,0x6b]),_0x2af399,{[_0x280345([0x6e,0x61,0x6d,0x65])]:_0x280345([0x45,0x43,0x44,0x53,0x41]),[_0x280345([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x280345([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x280345([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x13e983[_0x280345([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x280345([0x6e,0x61,0x6d,0x65])]:_0x280345([0x45,0x43,0x44,0x53,0x41]),[_0x280345([0x68,0x61,0x73,0x68])]:{[_0x280345([0x6e,0x61,0x6d,0x65])]:_0x280345([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5ce708,_0x24d4cd,_0x1089a4)||(_0x4c4ed3=!0x1);}}function _0x5c191e(_0x55928e){return _0x55928e[_0x280345([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x280345([0x65,0x79]))?JSON[_0x280345([0x70,0x61,0x72,0x73,0x65])](_0x1e2da1(_0x55928e)):null;}function _0x1e2da1(_0x4772cf){return window[_0x280345([0x61,0x74,0x6f,0x62])](_0x4772cf[_0x280345([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x280345([0x2b]))[_0x280345([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x280345([0x2f])));}function _0x441db7(_0x5cdd58){let _0x6d7492=0x1505;function _0x27a21c(_0x37f032){for(let _0x5e1160=0x0;_0x5e1160<_0x37f032[_0x280345([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5e1160++){const _0x19e36f=_0x37f032[_0x280345([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5e1160);_0x6d7492=(_0x6d7492<<0x5)+_0x6d7492+_0x19e36f,_0x6d7492&=_0x6d7492;}}function _0x6f96(_0x417504){Array[_0x280345([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x417504)?_0x417504[_0x280345([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x6f96):_0x417504&&typeof _0x417504==_0x280345([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x280345([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x417504)[_0x280345([0x73,0x6f,0x72,0x74])]()[_0x280345([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x9d7f9c,_0x4a874a])=>{_0x27a21c(_0x9d7f9c),_0x6f96(_0x4a874a);}):_0x27a21c(window[_0x280345([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x417504));}return _0x6f96(_0x5cdd58),_0x6d7492>>>0x0;}function _0xf6f36a(_0x290e26){return _0x290e26[_0x280345([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x280345([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x280345([0x30]));}function _0x56836f(_0x370628){return _0x370628[_0x280345([0x73,0x70,0x6c,0x69,0x74])]('')[_0x280345([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x280345([0x6a,0x6f,0x69,0x6e])]('');}function _0x508d31(_0x5e5f14){return _0x56fcaa[_0x280345([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x280345([0x68,0x61,0x73])](_0x5e5f14);}function _0x4033f1(_0x169c87){return _0x56fcaa[_0x280345([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x280345([0x67,0x65,0x74])](_0x169c87);}function _0x396460(){}function _0x280345(_0x18146c){return _0x18146c['map'](_0x52a06f=>String['fromCharCode'](_0x52a06f))['join']('');}_0x27cb96(await _0x552474());}(this);}['createRevision'](_0x119e0a){const _0x4fffa8=this['editor']['plugins']['get']('Users');return new I({'id':_0x119e0a['id'],'name':_0x119e0a['name'],'creator':_0x119e0a['creatorId']?_0x4fffa8['getUser'](_0x119e0a['creatorId']):null,'diffData':_0x119e0a['diffData']||_0x119e0a['data'],'authors':_0x119e0a['authorsIds']['map'](_0x38c2c2=>_0x4fffa8['getUser'](_0x38c2c2)),'createdAt':new Date(_0x119e0a['createdAt']),'attributes':_0x119e0a['attributes'],'fromVersion':_0x119e0a['fromVersion'],'toVersion':_0x119e0a['toVersion']});}['addRevision'](_0x488ef7,_0x4694b7=0x0){this['_revisions']['add'](_0x488ef7,_0x4694b7);}['getRevision'](_0x141eb1){return this['_revisions']['get'](_0x141eb1);}['getRevisions'](_0x3f74ce={'toJSON':!0x1}){const _0x6ab953=Array['from'](this['_revisions']);return _0x6ab953['reverse'](),_0x3f74ce['toJSON']?_0x6ab953['map'](_0x34af3a=>_0x34af3a['toJSON']()):_0x6ab953;}['getIndex'](_0x260595){return this['_revisions']['getIndex'](_0x260595);}['getEarlierVisibleRevision'](_0x4d8dc2){const [,_0xa5cf90]=this['getRevisionsIterator'](_0x4d8dc2,{'direction':'earlier'});return _0xa5cf90;}['getLaterVisibleRevision'](_0x4bf53d){const [,_0x15b91d]=this['getRevisionsIterator'](_0x4bf53d,{'direction':'later'});return _0x15b91d;}['getRevisionsInDiff'](_0x33200f){const _0x8336fe=[];for(const _0x5a69ad of this['getRevisionsIterator'](_0x33200f['newRevisionId']))if(_0x8336fe['push'](_0x5a69ad),_0x5a69ad['id']===_0x33200f['oldRevisionId'])break;return _0x8336fe;}*['getRevisionsIterator'](_0x5c6016,{direction:_0x286bfa='earlier',filter:_0x490837=()=>!0x0}={}){const _0x3387f4='earlier'===_0x286bfa?0x1:-0x1;let _0x56749e=this['_revisions']['get'](_0x5c6016),_0x4d4c1f=this['getIndex'](_0x56749e);for(yield _0x56749e;_0x56749e;){if(_0x4d4c1f+=_0x3387f4,_0x56749e=this['getRevision'](_0x4d4c1f),!_0x56749e)return;_0x490837(_0x56749e)&&(yield _0x56749e);}}}class $ extends _0x398bff{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x826349,'c'],[_0x3d92fb,'a'],[_0x5d8e9b,'e'],[_0x224302,'r'],[_0x1c26a4,'u']]);['_typeCharToViewClass']=new Map([['c',_0x826349],['a',_0x3d92fb],['e',_0x5d8e9b],['r',_0x224302],['u',_0x1c26a4]]);async['loadRevisionData'](_0x3474d7,_0x5b37a3){if(_0x3474d7['diffData']||!_0x5b37a3)return;const _0x4b313d=this['editor']['config']['get']('collaboration.channelId'),_0x4a2e2e=await _0x5b37a3['getRevision']({'channelId':_0x4b313d,'revisionId':_0x3474d7['id']});_0x3474d7['diffData']=_0x4a2e2e['diffData'];}['getRevisionDocumentData'](_0x2c400a){const _0x483608={};for(const _0x15a6a4 in _0x2c400a['diffData']){if(_0x2c400a['diffData'][_0x15a6a4]['attachChange']&&!_0x2c400a['diffData'][_0x15a6a4]['attachChange']['isAttached'])continue;const _0x2c573a=this['_removeRevisionMarkers'](JSON['parse'](_0x2c400a['diffData'][_0x15a6a4]['insertions'])),_0x51f9c4=this['editor']['editing']['view']['document'],_0x333882=new _0x3eafa2(_0x51f9c4,_0x2c573a['map'](_0x338621=>this['_getViewFromDiffObj'](_0x338621,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x483608[_0x15a6a4]=this['editor']['data']['processor']['toData'](_0x333882),this['editor']['data']['processor']['useFillerType']('default');}return _0x483608;}['getRevisionRootsAttributes'](_0xa3b030){const _0x4aae45={};for(const _0x5e832a in _0xa3b030['diffData'])_0xa3b030['diffData'][_0x5e832a]['attachChange']&&!_0xa3b030['diffData'][_0x5e832a]['attachChange']['isAttached']||(_0x4aae45[_0x5e832a]=_0xa3b030['diffData'][_0x5e832a]['attributesAfter']||{});return _0x4aae45;}['_getTypeCharForViewElement'](_0x56cb02){return this['_viewClassToTypeChar']['get'](_0x56cb02['constructor']);}['_getViewFromDiffObj'](_0x5e1edf,_0x15a7ca){const _0x583c14=this['editor']['editing']['view']['document'];if('string'==typeof _0x5e1edf)return new _0x498a40(_0x583c14,_0x5e1edf);{let _0x23b15a,_0x6ca5ff;_0x6ca5ff='u'==_0x5e1edf['type']||'r'==_0x5e1edf['type']?[]:_0x5e1edf['children']['map'](_0x123d83=>this['_getViewFromDiffObj'](_0x123d83,_0x15a7ca));const _0x3df478=this['_typeCharToViewClass']['get'](_0x5e1edf['type'])||_0x3a85ac,_0x7c28dd=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x23b15a=new _0x3df478(_0x583c14,_0x5e1edf['name'],_0x5e1edf['attributes'],_0x6ca5ff),'u'==_0x5e1edf['type']&&_0x5e1edf['children'][0x0]){const _0x2bb900=_0x5e1edf['children'][0x0];if(_0x23b15a['render']=function(_0x4e5920){const _0x59580e=_0x4e5920['createElement']('div');return _0x59580e['innerHTML']=_0x2bb900,_0x59580e['childNodes'][0x0];},_0x15a7ca){const _0x2cec1c=new _0x3eafa2(_0x583c14);_0x2cec1c['_appendChild'](_0x23b15a);const _0x121d68=Array['from'](_0x7c28dd['viewChildrenToDom'](_0x2cec1c,{'bind':!0x1})),_0xb9b9e2=_0x7c28dd['domDocument']['createElement']('div');_0xb9b9e2['append'](..._0x121d68),_0x23b15a=Array['from'](_0x7c28dd['domChildrenToView'](_0xb9b9e2))[0x0];}}else{if('r'==_0x5e1edf['type']&&_0x5e1edf['children'][0x0]){const _0xf5206f=_0x5e1edf['children'][0x0];if(_0x23b15a['render']=function(_0x29d02e){_0x29d02e['innerHTML']=_0xf5206f;},_0x15a7ca){const _0x253d48=new _0x3eafa2(_0x583c14);_0x253d48['_appendChild'](_0x23b15a);const _0x4ec20a=Array['from'](_0x7c28dd['viewChildrenToDom'](_0x253d48,{'bind':!0x1})),_0xeb0def=_0x7c28dd['domDocument']['createElement']('div');_0xeb0def['append'](..._0x4ec20a);const _0x38b4ff=Array['from'](_0x7c28dd['domChildrenToView'](_0xeb0def));_0x38b4ff['length']>0x1?_0x23b15a['_appendChild'](_0x38b4ff):_0x23b15a=_0x38b4ff[0x0];}}}if(_0x5e1edf['customProperties']){for(const [_0x1cc55a,_0x4b5b9a]of _0x5e1edf['customProperties'])_0x23b15a['_setCustomProperty'](_0x1cc55a,_0x4b5b9a);}const _0x57fee8=void 0x0===_0x5e1edf['fillerOffset']?null:_0x5e1edf['fillerOffset'];return null!==_0x57fee8&&(_0x23b15a['getFillerOffset']=()=>_0x57fee8),_0x23b15a;}}['_makeModelFromViewString'](_0x29340f){const _0x535839=JSON['parse'](_0x29340f),_0x5a7c74=this['editor']['editing']['view']['document'],_0x308528=new _0x3eafa2(_0x5a7c74,_0x535839['map'](_0x129e8b=>this['_getViewFromDiffObj'](_0x129e8b,!0x0)));return this['editor']['data']['toModel'](_0x308528);}['_removeRevisionMarkers'](_0x1721a2){return(_0x1721a2=_0x1721a2['filter'](_0x513964=>!_0x513964['name']||'revision-start'!==_0x513964['name']&&'revision-end'!==_0x513964['name']))['forEach'](_0x506431=>{'string'!=typeof _0x506431&&(_0x506431['children']=this['_removeRevisionMarkers'](_0x506431['children']),_0x506431['attributes']=_0x506431['attributes']['filter'](_0xba45e2=>!_0xba45e2[0x0]['startsWith']('data-revision-')));}),_0x1721a2;}}function m(_0x956cbc,_0xb561a7,_0x4224cd){const t=_0x956cbc['t'];switch(_0xb561a7){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'},_0x4224cd);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x4224cd);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 _0x398bff{['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[_0x4c78be,S,$,_0x2d0a83];}constructor(_0x36acae){super(_0x36acae),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 _0x5e6444=_0x44f97c();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x5e6444},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 _0x5cdd31=this['repository']['getRevision'](0x0),_0xa157c0=_0x5cdd31&&null===_0x5cdd31['creator']?_0x5cdd31:null;if(this['_continueCurrentRevision']=!!_0xa157c0&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x58bf30=this['_source']['getCurrentRevisionId'](),_0x412e93=this['repository']['getRevision'](_0x58bf30);if(_0x412e93)this['_startingVersion']=_0x412e93['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x246df1=this['_source']['history']['_operations']['find'](_0x11ed4e=>!_0x11ed4e['_isInit']),_0x448a80=_0x246df1?_0x246df1['baseVersion']:this['_source']['history']['version'];_0x5cdd31?(_0x5cdd31['toVersion']<_0x448a80&&_0x5cdd31['_update']({'toVersion':_0x448a80}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xa157c0['id'],this['_startingVersion']=_0xa157c0['fromVersion']):(this['_startingVersion']=_0x5cdd31['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x448a80,this['_continueCurrentRevision']=!0x1);}}else _0xa157c0&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xa157c0['toVersion'],this['editor']['model']['document']['history']['version']),_0xa157c0['fromVersion']===_0xa157c0['toVersion']?(0x0!==_0xa157c0['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xa157c0['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xa157c0['id'],this['_startingVersion']=_0xa157c0['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',_0x163258=>!_0x163258),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4375d2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x50ead2;for(const _0x3a9b5a in _0x4375d2){const _0x1c4454=_0x3a9b5a,_0x335a07=_0x4375d2[_0x1c4454];if('revisionHistoryLicenseKeyValid'==_0x335a07||'revisionHistoryLicenseKeyInvalid'==_0x335a07||'revisionHistoryLicenseKeyExpired'==_0x335a07||'revisionHistoryLicenseKeyDomainLimit'==_0x335a07||'revisionHistoryLicenseKeyNotAllowed'==_0x335a07||'revisionHistoryLicenseKeyEvaluationLimit'==_0x335a07||'revisionHistoryLicenseKeyTrialLimit'==_0x335a07||'revisionHistoryLicenseKeyUsageLimit'==_0x335a07){delete _0x4375d2[_0x1c4454],_0x50ead2=_0x335a07,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x50ead2&&_0x4375d2['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x50ead2&&_0x4375d2['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x50ead2&&_0x4375d2['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x50ead2&&_0x4375d2['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x50ead2&&_0x4375d2['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x50ead2&&_0x4375d2['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x50ead2&&_0x4375d2['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x3e1b9f=this['repository']['getRevision'](0x0),_0x12ea03=await this['getRevisionDocumentData'](_0x3e1b9f),_0x286214=await this['getRevisionRootsAttributes'](_0x3e1b9f);this['_replaceEditorDataWithRevisionData'](_0x12ea03,_0x286214);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x13566c){this['_source']=_0x13566c;}async['update'](){const _0x310e93=await this['_source']['getLatestVersion']();if(_0x310e93>this['currentRevision']['toVersion']){await this['_loadState']();const _0x481ede=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x310e93});_0x481ede['authors']=_0x481ede['authorsIds']['map'](_0x527466=>this['editor']['plugins']['get']('Users')['getUser'](_0x527466)),this['currentRevision']['_update'](_0x481ede);}}async['saveRevision'](_0x484ea2={},_0x2c0ff5=null){const _0x4e3b8c=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2c0ff5>this['currentRevision']['toVersion']&&(_0x2c0ff5=null),null===_0x2c0ff5&&(_0x2c0ff5=await this['_source']['getLatestVersion']());const _0x4a04bb=this['_getFromVersion'](_0x2c0ff5),_0xe99384=this['buildRevisionData']({'from':_0x4a04bb,'to':_0x2c0ff5});if(this['currentRevision']['toVersion']<_0x2c0ff5){const _0x788159=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2c0ff5,'to':_0x2c0ff5});_0x788159['authors']=[],_0x788159['authorsIds']=[],_0x788159['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x788159,!0x0),delete _0x788159['authors'],_0x4e3b8c['push'](_0x788159);}_0x484ea2['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x484ea2['name']=_0x484ea2['name']||null,_0x484ea2['id']=_0x484ea2['id']||_0x44f97c(),_0x484ea2={..._0x484ea2,..._0xe99384};const _0x5cb558=this['addRevisionData'](_0x484ea2);_0x4e3b8c['push'](_0x484ea2);const _0x317539=this['repository']['getIndex'](_0x5cb558);if(0x0!==_0x317539){const _0x5dd707=this['repository']['getRevision'](_0x317539-0x1);if(_0x5dd707['fromVersion']!==_0x2c0ff5){const _0x17f1ec=this['_revisionDataBuilder']['getData'](_0x2c0ff5,_0x5dd707['toVersion']),_0x53490a={'id':_0x5dd707['id'],'diffData':_0x17f1ec['diffData'],'authorsIds':_0x17f1ec['authorsIds'],'authors':_0x17f1ec['authorsIds']['map'](_0x83d16=>this['editor']['plugins']['get']('Users')['getUser'](_0x83d16)),'fromVersion':_0x2c0ff5};_0x5dd707===this['currentRevision']&&(_0x53490a['createdAt']=new Date(_0x484ea2['createdAt']['getTime']()+0xa)),_0x5dd707['_update'](_0x53490a,!0x0),delete _0x53490a['authors'],_0x4e3b8c['push'](_0x53490a);}}if(this['adapter']){for(const _0x42f6c5 of _0x4e3b8c)this['_bufferUpdate'](_0x42f6c5['id'],_0x42f6c5,!0x0);this['sendBufferedUpdates']();}return _0x5cb558;}['addRevisionData'](_0x11bc45){const _0x12c41b=this['repository']['createRevision'](_0x11bc45);return this['adapter']&&_0x12c41b['on']('_update',(_0x24af98,_0x1d7a41,_0x50ecc6)=>{_0x50ecc6||(this['_bufferUpdate'](_0x1d7a41['id'],_0x1d7a41,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x12c41b,this['_findInsertionIndex'](_0x12c41b)),_0x12c41b;}async['getRevisionDocumentData'](_0xd2440f){return await this['_utils']['loadRevisionData'](_0xd2440f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xd2440f);}async['getRevisionRootsAttributes'](_0x37ee8c){return await this['_utils']['loadRevisionData'](_0x37ee8c,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x37ee8c);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2d6f82=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x36df08=0x0;_0x36df08<_0x2d6f82['length'];_0x36df08++){const _0x17b0b3=_0x2d6f82[_0x36df08];let _0x33f3e6=!0x1;for(const _0x12a394 of Object['keys'](_0x17b0b3))void 0x0===_0x17b0b3[_0x12a394]?delete _0x17b0b3[_0x12a394]:'id'!==_0x12a394&&(_0x33f3e6=!0x0);_0x33f3e6||(_0x2d6f82[_0x36df08]=null);}if(_0x2d6f82=_0x2d6f82['filter'](_0x2b67e7=>null!==_0x2b67e7),!_0x2d6f82['length'])return;for(let _0x3d5f92=0x0;_0x3d5f92<_0x2d6f82['length'];_0x3d5f92++){const _0x139dca=_0x2d6f82[_0x3d5f92];void 0x0!==_0x139dca['fromVersion']&&void 0x0===_0x139dca['toVersion']&&(_0x139dca['toVersion']=this['repository']['getRevision'](_0x139dca['id'])['toVersion']),void 0x0!==_0x139dca['toVersion']&&void 0x0===_0x139dca['fromVersion']&&(_0x139dca['fromVersion']=this['repository']['getRevision'](_0x139dca['id'])['fromVersion']);}const _0x24a44b=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2d6f82,_0x24a44b)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x45f771=>{if(_0x45f771){for(const _0x1853ee of _0x45f771)this['setRevisionData']({'id':_0x1853ee['id'],'createdAt':_0x1853ee['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x4289c7=null,from:_0x39717d=null,to:_0x2cbcb6=null}){_0x39717d=null!==_0x39717d?_0x39717d:_0x4289c7['fromVersion'],_0x2cbcb6=null!==_0x2cbcb6?_0x2cbcb6:_0x4289c7['toVersion'];const _0x5b92af=this['_revisionDataBuilder']['getData'](_0x39717d,_0x2cbcb6),_0x5ed350={'diffData':_0x5b92af['diffData'],'authorsIds':_0x5b92af['authorsIds'],'fromVersion':_0x39717d,'toVersion':_0x2cbcb6};if(!_0x4289c7||_0x2cbcb6!==_0x4289c7['toVersion']){const _0x13c581=_0x2cbcb6-0x1,_0x253739=this['_source']['history']['getOperation'](_0x13c581);_0x5ed350['createdAt']=_0x253739&&_0x253739['createdAt']||new Date();}if(this['_loadedStateData']&&_0x39717d===this['_loadedStateData']['fromVersion']){for(const _0x3d5b92 of this['_loadedStateData']['authors'])_0x5ed350['authorsIds']['includes'](_0x3d5b92['id'])||_0x5ed350['authorsIds']['push'](_0x3d5b92['id']);}return _0x5ed350;}['_bufferUpdate'](_0x2afe2a,_0x52b83d,_0x20bc1f){if(this['_bufferedUpdates']['has'](_0x2afe2a)){const _0x4f9df4=this['_bufferedUpdates']['get'](_0x2afe2a);_0x52b83d=_0x20bc1f?{..._0x4f9df4,..._0x52b83d}:{..._0x52b83d,..._0x4f9df4};}this['_bufferedUpdates']['set'](_0x2afe2a,_0x52b83d);}['setRevisionData'](_0x1e6b06){const _0x27c853=this['repository']['getRevision'](_0x1e6b06['id']);if(_0x1e6b06['createdAt']&&(_0x1e6b06['createdAt']=new Date(_0x1e6b06['createdAt'])),_0x1e6b06['authorsIds']){const _0x417807=this['editor']['plugins']['get']('Users');_0x1e6b06['authors']=_0x1e6b06['authorsIds']['map'](_0x2b7f1c=>_0x417807['getUser'](_0x2b7f1c));}_0x27c853['_update'](_0x1e6b06,!0x0);}['_createInitialRevision'](_0x25e816){const _0x39abf3=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x39abf3)this['_initialRevisionId']=_0x39abf3['id'];else{const _0x4c1844=!this['editor']['model']['document']['roots']['find'](_0x464f8b=>this['editor']['model']['hasContent'](_0x464f8b)),_0x1bb986=this['editor']['plugins']['get']('Users')['me']['id'],_0x155ef5=m(this['editor']['locale'],_0x4c1844?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x25e816,'to':_0x25e816,'id':this['_initialRevisionId'],'name':_0x155ef5,'creatorId':_0x1bb986});}}['_createCurrentRevision'](_0x49709b){const _0x16719d=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x16719d),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x49709b,'to':_0x49709b,'id':_0x16719d,'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'](_0x30d6d7,_0x3b54d7){let _0x5b7f4c=this['editor']['config']['get']('initialData'),_0x1c8de3=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x5b7f4c){_0x5b7f4c={};for(const _0x47572f of this['editor']['model']['document']['getRootNames']())_0x5b7f4c[_0x47572f]='';}if('string'==typeof _0x5b7f4c&&(_0x5b7f4c={'main':_0x5b7f4c}),void 0x0===_0x1c8de3){_0x1c8de3={};for(const _0x46208c of this['editor']['model']['document']['getRootNames']())_0x1c8de3[_0x46208c]={};}let _0x291372=!0x1;const _0x7c80fc=Object['keys'](_0x5b7f4c),_0x21f6e1=Object['keys'](_0x30d6d7);for(const _0x46b046 of _0x7c80fc){if(_0x5b7f4c[_0x46b046]!==_0x30d6d7[_0x46b046]&&''!==_0x5b7f4c[_0x46b046]['trim']()){_0x291372=!0x0;break;}if(!_0xde9b3b(_0x1c8de3[_0x46b046],_0x3b54d7[_0x46b046])&&Object['keys'](_0x1c8de3[_0x46b046])['length']>0x0){_0x291372=!0x0;break;}}_0x291372||(_0x291372=_0x21f6e1['some'](_0xed4e92=>!this['editor']['model']['document']['getRoot'](_0xed4e92))),_0x291372&&_0x1f3840('editor-initial-data-replaced-with-revision-data',{'editorData':_0x5b7f4c,'editorRootsAttributes':_0x1c8de3,'revisionData':_0x30d6d7,'revisionRootsAttributes':_0x3b54d7}),this['editor']['config']['set']('initialData',_0x30d6d7),this['editor']['config']['set']('rootsAttributes',_0x3b54d7);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x58d417=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x58d417['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x3c803d){const _0x508d05=this['repository']['getRevisions']();_0x508d05['reverse']();let _0x34b2b5=0x0;for(;_0x34b2b5<_0x508d05['length'];){const _0x535567=_0x508d05[_0x34b2b5];if(_0x535567===this['currentRevision']){_0x34b2b5++;continue;}if(_0x535567['id']===this['_initialRevisionId'])break;const _0x37ea9c=_0x3c803d['toVersion']-_0x535567['toVersion']||_0x3c803d['fromVersion']-_0x535567['fromVersion'];if(_0x37ea9c>0x0)break;if(_0x37ea9c<0x0)_0x34b2b5++;else{if(!_0x3c803d['creator']&&_0x535567['creator'])break;if(_0x535567['creator']||!_0x3c803d['creator']){if(_0x3c803d['createdAt']>_0x535567['createdAt'])break;_0x34b2b5++;}else _0x34b2b5++;}}return _0x34b2b5;}['_getFromVersion'](_0xcb638c){const _0x9e5f17=this['repository']['getRevisions']();_0x9e5f17['reverse'](),_0x9e5f17['shift']();const _0x3017f7=_0x9e5f17['find'](_0x23eff1=>_0x23eff1['toVersion']<=_0xcb638c)['toVersion'];return _0x3017f7<this['_startingVersion']?this['_startingVersion']:_0x3017f7;}['_makeRevision']({name:_0x111ea4,from:_0x18224b,to:_0xe8ba28,creatorId:_0x2a25d,id:_0x12eb56}){const _0x5f1152=this['buildRevisionData']({'from':_0x18224b,'to':_0xe8ba28});_0x5f1152['name']=_0x111ea4,_0x5f1152['creatorId']=_0x2a25d,_0x5f1152['id']=_0x12eb56;const _0x3371d5=this['addRevisionData'](_0x5f1152);return this['adapter']&&this['_bufferUpdate'](_0x5f1152['id'],_0x5f1152,!0x0),_0x3371d5;}['_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(_0x109e2b){this['editor']=_0x109e2b,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'](_0x279c66){this['source']=_0x279c66;const _0x2043a4=new Map(),_0xb55b1c=new Map(),_0x1e424c=this['editor']['model']['document']['roots']['map'](_0x286577=>_0x286577['rootName']);for(const _0x2045d4 of _0x1e424c){const _0x506cfb=this['editor']['model']['document']['getRoot'](_0x2045d4),_0x149bdb=x(_0x506cfb);_0x2043a4['set'](_0x2045d4,_0x149bdb),_0xb55b1c['set'](_0x2045d4,Object['fromEntries'](_0x506cfb['getAttributes']()));}const _0x1ea47f=Array['from'](this['editor']['model']['markers'])['map'](_0x30c949=>[_0x30c949['name'],_0x30c949['getRange']()]),_0x3a936d=this['source']['version'];this['_saveMetaData'](_0x3a936d,_0x2043a4,_0x1ea47f,_0xb55b1c),this['_startingRevisionId']=this['_revisionId'];const _0x1ac1ab=new Map(),_0x18896c=new Map();for(const _0x10ef13 of _0x1e424c){const _0x1ecbde=N(_0x10ef13);_0x1ac1ab['set'](_0x10ef13,_0x1ecbde),_0x18896c['set'](_0x10ef13,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1ac1ab,[],_0x18896c);}['getData'](_0x4eb9e2,_0x43ba77){if(this['_lastFrom']===_0x4eb9e2&&this['_lastTo']<=_0x43ba77)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x43ba77,!0x0);else{if(!this['_savedMetaData']['has'](_0x4eb9e2)){const _0x21aa9d=this['_getPreviousFrom'](_0x4eb9e2);this['_calculateMetaData'](_0x21aa9d,_0x4eb9e2,!0x1);}this['_calculateMetaData'](_0x4eb9e2,_0x43ba77,!0x0);}return this['_lastFrom']=_0x4eb9e2,this['_lastTo']=_0x43ba77,this['_getState']();}['loadState'](_0x293fb6){if(!this['_savedMetaData']['has'](_0x293fb6['fromVersion'])){const _0x2e2604=this['_getPreviousFrom'](_0x293fb6['fromVersion']);this['_calculateMetaData'](_0x2e2604,_0x293fb6['fromVersion'],!0x1);}this['_calculateMetaData'](_0x293fb6['fromVersion'],_0x293fb6['toVersion'],!0x1);const _0xecab72=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x293fb6['fromVersion'],this['_lastTo']=_0x293fb6['toVersion'];for(const _0x3f7647 in _0x293fb6['diffData']){const _0x550fcb=_0x293fb6['diffData'][_0x3f7647]['attachChange'],_0x15c9da=_0x55f32f(_0x293fb6['diffData'][_0x3f7647]['attributesBefore'])||{},_0x51841b=_0xecab72['_makeModelFromViewString'](_0x293fb6['diffData'][_0x3f7647]['deletions']);_0x51841b['rootName']=_0x3f7647,_0x51841b['_isAttached']=!_0x550fcb||!_0x550fcb['isAttached'],_0x51841b['isAttached']=()=>_0x51841b['_isAttached'],this['_baseRoots']['set'](_0x3f7647,_0x51841b),this['_baseRootsAttributes']['set'](_0x3f7647,_0x15c9da),_0x550fcb&&this['_touchedRoots']['set'](_0x3f7647,_0x550fcb);const _0x19575f=this['_makeIdsRoot'](_0x51841b);this['_baseIdsRoots']['set'](_0x3f7647,_0x19575f);for(const [_0x43c1da,_0x5553db]of _0x51841b['markers']){if(!_0x43c1da['startsWith']('revision:'))continue;const _0x230983=_0x43c1da['split'](':')[0x2];for(const _0x148196 of _0x5553db['getWalker']({'singleCharacters':!0x0})){const _0x596ffc=this['_getVidAttributeName'](_0x148196),_0x3a244f='elementEnd'==_0x148196['type']?_0x148196['previousPosition']['path']['slice'](0x0,-0x1):_0x148196['previousPosition']['path'],_0x2cb4b6=_0x19575f['getNodeByPath'](_0x3a244f)['getAttribute'](_0x596ffc);this['_touched']['set'](_0x2cb4b6,{'userId':_0x230983});}_0x51841b['markers']['delete'](_0x43c1da);}}this['_startingRevisionId']=this['_revisionId'];const _0x29812f=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4be70e=>!this['_touched']['has'](_0x4be70e));let _0x376da4=0x0;const _0x2173af=new Map();for(const _0x238a37 in _0x293fb6['diffData']){const _0x3f1f56=_0x293fb6['diffData'][_0x238a37]['attachChange'],_0x4b8e37=_0x55f32f(_0x293fb6['diffData'][_0x238a37]['attributesAfter'])||{},_0x2d2643=_0xecab72['_makeModelFromViewString'](_0x293fb6['diffData'][_0x238a37]['insertions']);_0x2d2643['rootName']=_0x238a37,_0x2d2643['_isAttached']=!_0x3f1f56||_0x3f1f56['isAttached'],_0x2d2643['isAttached']=()=>_0x2d2643['_isAttached'],this['_diffRoots']['set'](_0x238a37,_0x2d2643),this['_diffRootsAttributes']['set'](_0x238a37,_0x4b8e37);const _0x521c63=this['_makeIdsRoot'](_0x2d2643,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x238a37,_0x521c63),_0x2173af['set'](_0x238a37,_0x2d2643['isAttached']()?_0x4b8e37:{});for(const [_0x4d89fd,_0x15528d]of _0x2d2643['markers']){if(!_0x4d89fd['startsWith']('revision:'))continue;const _0xe81a19=_0x4d89fd['split'](':')[0x2];for(const _0x3d7d10 of _0x15528d['getWalker']({'singleCharacters':!0x0})){const _0x5caecd=this['_getVidAttributeName'](_0x3d7d10),_0x1588ee=this['_revisionId']++,_0x396d9b='elementEnd'==_0x3d7d10['type']?_0x3d7d10['previousPosition']['path']['slice'](0x0,-0x1):_0x3d7d10['previousPosition']['path'];_0x521c63['getNodeByPath'](_0x396d9b)['_setAttribute'](_0x5caecd,_0x1588ee),this['_touched']['set'](_0x1588ee,{'userId':_0xe81a19});}_0x2d2643['markers']['delete'](_0x4d89fd);}for(const _0x5195e8 of this['editor']['model']['createRangeIn'](_0x2d2643)['getWalker']({'singleCharacters':!0x0})){const _0x534159=this['_getVidAttributeName'](_0x5195e8),_0x2f93b1='elementEnd'==_0x5195e8['type']?_0x5195e8['previousPosition']['path']['slice'](0x0,-0x1):_0x5195e8['previousPosition']['path'],_0x249a3c=_0x521c63['getNodeByPath'](_0x2f93b1);_0x249a3c['getAttribute'](_0x534159)>0x0||_0x249a3c['_setAttribute'](_0x534159,_0x29812f[_0x376da4++]);}for(const [_0x54dae5,_0x339b54]of _0x2d2643['markers'])_0x54dae5['startsWith']('revision:')||this['_markers']['set'](_0x54dae5,_0x339b54);}const {roots:_0x2c1baf}=this['_savedMetaData']['get'](_0x293fb6['fromVersion']),{roots:_0x4a93b4}=this['_savedMetaData']['get'](_0x293fb6['toVersion']),_0x26f80d=x(_0x2c1baf['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x26f80d),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x26f80d,Number['NEGATIVE_INFINITY']));const _0x19fdbd=x(_0x4a93b4['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x19fdbd),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x19fdbd));const _0x4ac9a8=Array['from'](this['_diffRoots'])['map'](([_0x235058,_0x42f14d])=>[_0x235058,x(_0x42f14d)]);this['_saveMetaData'](this['_lastTo'],_0x4ac9a8,this['_markers'],_0x2173af);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x35bff3,_0x5c0e3f,_0x584d06,_0x313326){const _0x16a035=new Map(_0x5c0e3f),_0x4878ac=new Map(_0x55f32f(_0x313326)),_0x239ab2=new Map();for(const [_0x364d6d,_0x511b9]of _0x584d06)_0x239ab2['set'](_0x364d6d,{'start':_0x511b9['start']['clone'](),'end':_0x511b9['end']['clone'](),'rootName':_0x511b9['root']['rootName']});this['_savedMetaData']['set'](_0x35bff3,{'roots':_0x16a035,'markers':_0x239ab2,'rootsAttributes':_0x4878ac});}['_removeMetaData'](_0x2c648d){this['_savedMetaData']['delete'](_0x2c648d);}['_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'](_0x29c30e,_0x8a2e3f=null){let _0x5f6ff1=null;_0x29c30e['is']('documentFragment')||(_0x5f6ff1=new _0x414f80(_0x29c30e['name'],{'vid_start':null===_0x8a2e3f?this['_revisionId']++:_0x8a2e3f++}));const _0x4b4cad=[];for(const _0x398d0b of _0x29c30e['getChildren']())if(_0x398d0b['is']('element')){_0x4b4cad['push'](this['_makeIdsRoot'](_0x398d0b,_0x8a2e3f));const _0x522373=_0x4b4cad[_0x4b4cad['length']-0x1];null!==_0x8a2e3f&&(_0x8a2e3f=_0x522373['is']('element','$text')?_0x522373['getAttribute']('vid')+0x1:_0x522373['getAttribute']('vid_end')+0x1);}else{for(let _0x513cd1=0x0;_0x513cd1<_0x398d0b['offsetSize'];_0x513cd1++)_0x4b4cad['push'](new _0x414f80('$text',{'vid':null===_0x8a2e3f?this['_revisionId']++:_0x8a2e3f++}));}if(_0x29c30e['is']('documentFragment')){const _0x152f1d=N(_0x29c30e['rootName']);return _0x152f1d['_insertChild'](0x0,_0x4b4cad),_0x152f1d;}return _0x5f6ff1['_setAttribute']('vid_end',null===_0x8a2e3f?this['_revisionId']++:_0x8a2e3f++),_0x5f6ff1['_insertChild'](0x0,_0x4b4cad),_0x5f6ff1;}['_calculateMetaData'](_0xb3f1c3,_0x2283ad,_0x261e9f){this['_reset']();const {roots:_0x2e9968,markers:_0x2a548c,rootsAttributes:_0x482e8c}=this['_savedMetaData']['get'](_0xb3f1c3);this['_baseRoots']=new Map(_0x2e9968),this['_baseRootsAttributes']=new Map(_0x55f32f(_0x482e8c));for(const [_0x12a34b,_0x52b2f5]of this['_baseRoots'])if('$graveyard'!==_0x12a34b&&(this['_diffRoots']['set'](_0x12a34b,x(_0x52b2f5)),this['_diffRootsAttributes']=new Map(_0x55f32f(_0x482e8c)),_0x261e9f)){const _0x34a75b=this['_revisionId'];this['_idsRoots']['set'](_0x12a34b,this['_makeIdsRoot'](_0x52b2f5)),this['_baseIdsRoots']['set'](_0x12a34b,this['_makeIdsRoot'](_0x52b2f5,_0x34a75b));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x261e9f&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1c9dbd,_0x2094c7]of _0x2a548c){const _0x12f3b9=this['_baseRoots']['get'](_0x2094c7['rootName']),_0x49772a=this['_diffRoots']['get'](_0x2094c7['rootName']),_0x36ec09=new _0x29901c(this['_fixPosition'](_0x2094c7['start'],_0x12f3b9),this['_fixPosition'](_0x2094c7['end'],_0x12f3b9)),_0x17d835=this['_fixRange'](_0x36ec09,_0x49772a);_0x12f3b9['markers']['set'](_0x1c9dbd,_0x36ec09),this['_markers']['set'](_0x1c9dbd,_0x17d835);}this['_applyOperations'](_0xb3f1c3,_0x2283ad,_0x261e9f);}['_applyOperations'](_0x31d666,_0x1b3be6,_0xd71df8){for(const _0x4c311d of this['source']['getOperations'](_0x31d666,_0x1b3be6))this['_handleOperation'](_0x4c311d,_0xd71df8);for(const _0x54a8c0 of this['_diffRoots']['values']())_0x54a8c0['markers']['clear']();for(const [_0x1cfdab,_0x1e5268]of this['_markers']){this['_diffRoots']['get'](_0x1e5268['root']['rootName'])['markers']['set'](_0x1cfdab,_0x1e5268['clone']());}const _0x5ed700=new Map(),_0xd03182=new Map();for(const [_0x344258,_0x2f5672]of this['_diffRoots'])_0x5ed700['set'](_0x344258,x(_0x2f5672)),_0xd03182['set'](_0x344258,this['_diffRootsAttributes']['get'](_0x344258));this['_saveMetaData'](_0x1b3be6,_0x5ed700,this['_markers'],_0xd03182);}['_getPreviousFrom'](_0x37b094){const _0x3a12ab=Array['from'](this['_savedMetaData']['keys']());_0x3a12ab['sort']((_0x30f179,_0x43e07f)=>_0x30f179-_0x43e07f),_0x3a12ab['reverse']();for(const _0x129324 of _0x3a12ab)if(_0x129324<_0x37b094)return _0x129324;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1fc96d,_0x44e734){const _0xf88a11=Array['from'](_0x44e734['markers'])['map'](([_0x1d57dd,_0x1cf8bd])=>[_0x1d57dd,this['_fixRange'](_0x1cf8bd,_0x1fc96d)]);_0x1fc96d['markers']=new Map(_0xf88a11);}['_transformMarkers'](_0x35bb94){for(const _0x80ab9d of this['_markers']['values']()){const _0x5d8ca3=_0x80ab9d['getTransformedByOperation'](_0x35bb94),_0x1efda5=_0x29901c['_createFromRanges'](_0x5d8ca3);_0x80ab9d['start']=_0x1efda5['start'],_0x80ab9d['end']=_0x1efda5['end'];}}['_handleOperation'](_0x47af10,_0x2dfced){if('addRoot'!=_0x47af10['type']&&'detachRoot'!=_0x47af10['type']){if('insert'==_0x47af10['type']){const _0xfc50d3=_0x47af10['position']['root']['rootName'];this['_diffRoots']['has'](_0xfc50d3)||(this['_diffRoots']['set'](_0xfc50d3,N(_0xfc50d3,!0x0)),this['_diffRootsAttributes']['set'](_0xfc50d3,{}),_0x2dfced&&this['_idsRoots']['set'](_0xfc50d3,N(_0xfc50d3,!0x0)));}else{if('addRootAttribute'==_0x47af10['type']||'removeRootAttribute'==_0x47af10['type']||'changeRootAttribute'==_0x47af10['type'])return void this['_handleRootAttributeOperation'](_0x47af10);'marker'==_0x47af10['type']&&this['_handleMarkerOperation'](_0x47af10);}if('marker'!==_0x47af10['type']){const _0x42c3bc=this['_cloneOperation'](_0x47af10,this['_diffRoots']);_0x42c3bc['_execute'](),this['_transformMarkers'](_0x42c3bc);}if(_0x2dfced)switch(_0x47af10['type']){case'insert':this['_handleInsertOperation'](_0x47af10);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x47af10);break;case'merge':this['_handleMergeOperation'](_0x47af10);break;case'split':this['_handleSplitOperation'](_0x47af10);}}else this['_handleRootOperation'](_0x47af10,_0x2dfced);}['_cloneOperation'](_0x4680f7,_0x18251f){const _0x3a9366=_0x4680f7['clone']();return _0x3a9366['_authorId']=_0x4680f7['_authorId'],this['_fixOperation'](_0x3a9366,_0x18251f),_0x3a9366;}['_getBaseVids'](_0xe14531){return _0xe14531['map'](_0x43c2cd=>{const _0x54a0e6=this['_getVidAttributeName'](_0x43c2cd);return Number(_0x43c2cd['item']['getAttribute'](_0x54a0e6));});}['_generateTape'](_0x2e44c3,_0x3de35e){if(_0x2e44c3['is']('element','$text'))_0x3de35e['push']({'item':_0x2e44c3,'type':'text'});else{_0x2e44c3['is']('element')&&_0x3de35e['push']({'item':_0x2e44c3,'type':'elementStart'});for(const _0x14e9ad of _0x2e44c3['getChildren']())this['_generateTape'](_0x14e9ad,_0x3de35e);_0x2e44c3['is']('element')&&_0x3de35e['push']({'item':_0x2e44c3,'type':'elementEnd'});}return _0x3de35e;}['_getState'](){const _0x1cd346=new Map(this['_touched']),_0x13635f=new Map(_0x1cd346),_0x2a2ffa=new Map(),_0x49a03f={'insertions':{},'deletions':{}},_0x10eed8={'insertions':{},'deletions':{}},_0x141443=new Map(),_0x152c05=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x152c05['delete']('$graveyard');for(const _0x3cc327 of _0x152c05){const _0x2add27=this['_diffRoots']['get'](_0x3cc327)||N(_0x3cc327,!0x1),_0x1bdbd4=this['_baseRoots']['get'](_0x3cc327)||N(_0x3cc327,!0x1);_0x2add27['isAttached']()||_0x1bdbd4['isAttached']()?(_0x49a03f['insertions'][_0x3cc327]=x(_0x2add27),_0x49a03f['deletions'][_0x3cc327]=x(_0x1bdbd4),this['_copyMarkers'](_0x49a03f['deletions'][_0x3cc327],_0x1bdbd4),this['_copyMarkers'](_0x49a03f['insertions'][_0x3cc327],_0x2add27),_0x10eed8['insertions'][_0x3cc327]=this['_generateTape'](this['_idsRoots']['get'](_0x3cc327),[]),_0x10eed8['deletions'][_0x3cc327]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x3cc327)||N(_0x3cc327,!0x1),[])):_0x152c05['delete'](_0x3cc327);}for(const _0x2c70a2 of _0x152c05){const _0x90c1f2=_0x10eed8['insertions'][_0x2c70a2];for(const _0x9b3d20 of _0x90c1f2){const _0x51eab1=this['_getVidAttributeName'](_0x9b3d20),_0x429105=_0x9b3d20['item']['getAttribute'](_0x51eab1);_0x13635f['delete'](_0x429105),_0x429105>=this['_startingRevisionId']&&_0x2a2ffa['set'](_0x429105,_0x1cd346['get'](_0x429105));}}for(const _0x44dc4b of _0x152c05){const _0x6d513d=_0x10eed8['insertions'][_0x44dc4b],_0x202b0d=this['_getBaseVids'](_0x10eed8['deletions'][_0x44dc4b]);let _0x554757=0x0;for(const _0xf8dd8 of _0x6d513d){const _0x1904da=this['_getVidAttributeName'](_0xf8dd8),_0x186a8f=_0xf8dd8['item']['getAttribute'](_0x1904da);if(!_0x2a2ffa['has'](_0x186a8f)&&!_0x141443['has'](_0x186a8f)){if(_0x13635f['has'](_0x186a8f))_0x554757++;else{if(_0x186a8f!=_0x202b0d[_0x554757]){const _0x467f7a=_0x1cd346['get'](_0x186a8f)||_0x1cd346['get'](_0x202b0d[_0x554757]);for(;_0x186a8f!=_0x202b0d[_0x554757];)_0x13635f['has'](_0x202b0d[_0x554757])||(_0x141443['set'](_0x202b0d[_0x554757],_0x467f7a),_0x1cd346['set'](_0x202b0d[_0x554757],_0x467f7a)),_0x554757++;}_0x554757++;}}}}for(const _0xcfadd5 of _0x152c05){const _0x3c121f=_0x10eed8['insertions'][_0xcfadd5];for(const _0x2a3927 of _0x3c121f){const _0x3043da=this['_getVidAttributeName'](_0x2a3927),_0x39c389=_0x2a3927['item']['getAttribute'](_0x3043da);if(_0x141443['has'](_0x39c389)){const _0x111ba4=_0x141443['get'](_0x39c389);_0x13635f['has'](_0x39c389)||_0x13635f['set'](_0x39c389,{..._0x111ba4}),_0x2a2ffa['set'](_0x39c389,{..._0x111ba4});}}}for(const _0x2ed7d5 of _0x13635f['keys']())_0x2ed7d5>=this['_startingRevisionId']&&_0x13635f['delete'](_0x2ed7d5);const _0x276df3=new Map();for(const _0x559717 of _0x152c05){let _0x3ccaa5=_0x10eed8['insertions'][_0x559717];for(const _0x48c62c of _0x3ccaa5)if(_0x48c62c['item']['is']('element','tableCell')){const _0x1f6680=this['_getVidAttributeName'](_0x48c62c),_0x3ef4a9=_0x48c62c['item']['getAttribute'](_0x1f6680);if(_0x2a2ffa['has'](_0x3ef4a9)){const _0x3bfaeb=_0x48c62c['item']['parent']['parent']['getAttribute']('vid_start'),_0x358621=_0x276df3['get'](_0x3bfaeb)||new Set();_0x358621['add'](_0x2a2ffa['get'](_0x3ef4a9)['userId']),_0x276df3['set'](_0x3bfaeb,_0x358621);}}_0x3ccaa5=_0x10eed8['deletions'][_0x559717];for(const _0x30666d of _0x3ccaa5)if(_0x30666d['item']['is']('element','tableCell')){const _0x5789f8=this['_getVidAttributeName'](_0x30666d),_0xea3786=_0x30666d['item']['getAttribute'](_0x5789f8);if(_0x13635f['has'](_0xea3786)){const _0x22e566=_0x30666d['item']['parent']['parent']['getAttribute']('vid_start'),_0x54418e=_0x276df3['get'](_0x22e566)||new Set();_0x54418e['add'](_0x13635f['get'](_0xea3786)['userId']),_0x276df3['set'](_0x22e566,_0x54418e);}}for(const _0x1227e2 of _0x276df3['keys']())(_0x2a2ffa['has'](_0x1227e2)||_0x13635f['has'](_0x1227e2))&&_0x276df3['delete'](_0x1227e2);}for(const _0x30c06b of _0x152c05){const _0x314426=_0x10eed8['insertions'][_0x30c06b];let _0xf672c2=null,_0x511db2=null;for(const _0xfa2e65 of _0x314426){const _0x18a0cf=this['_getVidAttributeName'](_0xfa2e65),_0x4dd597=_0xfa2e65['item']['getAttribute'](_0x18a0cf),_0x2a3c56=_0x276df3['get'](_0x4dd597);_0x2a3c56&&'elementStart'==_0xfa2e65['type']&&(_0xf672c2=Array['from'](_0x2a3c56)[0x0],_0x511db2=_0xfa2e65['item']['getAttribute']('vid_end')),_0xf672c2&&(_0x13635f['set'](_0x4dd597,{'userId':_0xf672c2}),_0x2a2ffa['set'](_0x4dd597,{'userId':_0xf672c2})),_0x4dd597==_0x511db2&&(_0xf672c2=null,_0x511db2=null);}}const _0x1bc9d7={},_0x821018=new Set();for(const _0xe719d9 of _0x152c05){const _0x2c2dfc=_0x49a03f['deletions'][_0xe719d9],_0x26ab2f=_0x49a03f['insertions'][_0xe719d9];for(const {userId:_0x324f4c}of this['_touchedMarkers']['values']())null!==_0x324f4c&&_0x821018['add'](_0x324f4c);for(const {userId:_0x2f0ceb}of this['_touchedRoots']['values']())null!==_0x2f0ceb&&_0x821018['add'](_0x2f0ceb);this['_markChanges'](_0x26ab2f,_0x10eed8['insertions'][_0xe719d9],_0x2a2ffa,'insertion',_0x821018),this['_markChanges'](_0x2c2dfc,_0x10eed8['deletions'][_0xe719d9],_0x13635f,'deletion',_0x821018),_0x1bc9d7[_0xe719d9]={'insertions':this['_prepareViewToSave'](_0x26ab2f),'deletions':this['_prepareViewToSave'](_0x2c2dfc),'attachChange':this['_touchedRoots']['get'](_0xe719d9)||null,'attributesBefore':_0x55f32f(this['_baseRootsAttributes']['get'](_0xe719d9))||{},'attributesAfter':_0x55f32f(this['_diffRootsAttributes']['get'](_0xe719d9))};}return{'diffData':_0x1bc9d7,'authorsIds':Array['from'](_0x821018)};}['_processRootBeforeSave'](_0x39425b){for(const [,_0x3860e9]of _0x39425b['markers']){const _0x308e28=_0x3860e9['start']['getAncestors']()['filter'](_0x5f59a4=>'tableCell'==_0x5f59a4['name']);for(const _0x375445 of _0x308e28)0x1==_0x375445['childCount']&&_0x375445['getChild'](0x0)['is']('element','paragraph')&&_0x375445['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x111a5a){this['_processRootBeforeSave'](_0x111a5a);const _0x42236c=this['editor']['data']['toView'](_0x111a5a,{}),_0x560de1=Array['from'](_0x42236c['getChildren']())['map'](_0x12268=>this['_getViewJson'](_0x12268));return JSON['stringify'](_0x560de1);}['_getViewJson'](_0xa399b7){if(_0xa399b7['is']('$text'))return _0xa399b7['data'];{const _0x8cb8a0=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x550e69=_0xa399b7,_0x5d9bab=this['editor']['data']['htmlProcessor']['domConverter'],_0xd77d48={'type':_0x8cb8a0['_getTypeCharForViewElement'](_0x550e69),'name':_0x550e69['name'],'attributes':Array['from'](_0x550e69['getAttributes']()),'children':Array['from'](_0x550e69['getChildren']())['map'](_0x5939c4=>this['_getViewJson'](_0x5939c4))};if(_0xa399b7['is']('uiElement')&&'$comment'!=_0xa399b7['name']){const _0x155fc5=_0xa399b7['render'](_0x5d9bab['domDocument'],_0x5d9bab);_0xd77d48['children']['push'](_0x155fc5['outerHTML']);}else{if(_0xa399b7['is']('rawElement')){const _0x641538=_0x5d9bab['domDocument']['createElement'](_0x550e69['name']);_0xa399b7['render'](_0x641538,_0x5d9bab),_0xd77d48['children']['push'](_0x641538['innerHTML']);}}const _0x2360c4=Array['from'](_0x550e69['getCustomProperties']());_0x2360c4['length']>0x0&&(_0xd77d48['customProperties']=_0x2360c4);const _0x292b05=_0x550e69['getFillerOffset']();return null!==_0x292b05&&(_0xd77d48['fillerOffset']=_0x292b05),_0xd77d48;}}['_markChanges'](_0x236f82,_0x3b8ecf,_0x4234d8,_0x3b7129,_0x324f1b){let _0x2ed739=null,_0x56894e=null,_0x23cf16=0x0;const _0x5304ec=this['editor']['model'];for(let _0x2a50b4=0x0;_0x2a50b4<_0x3b8ecf['length'];_0x2a50b4++){const _0x14a320=this['_getVidAttributeName'](_0x3b8ecf[_0x2a50b4]),_0x5cc6e8=_0x3b8ecf[_0x2a50b4]['item']['getAttribute'](_0x14a320),_0x11bd9a=_0x4234d8['get'](_0x5cc6e8),_0x5c75e6=_0x2a50b4==_0x3b8ecf['length']-0x1;(!_0x2ed739&&_0x11bd9a&&(_0x2ed739=_0x11bd9a,_0x56894e=_0x3b8ecf[_0x2a50b4]),_0x2ed739&&(!_0x11bd9a||_0x11bd9a['userId']!=_0x2ed739['userId']))&&(_0x14edfc(_0x11bd9a,P(_0x56894e,_0x236f82,_0x5304ec),P(_0x3b8ecf[_0x2a50b4],_0x236f82,_0x5304ec)),_0x2ed739=_0x11bd9a||null,_0x56894e=_0x11bd9a?_0x3b8ecf[_0x2a50b4]:null),_0x2ed739&&_0x5c75e6&&_0x14edfc(_0x11bd9a,P(_0x56894e,_0x236f82,_0x5304ec),V(_0x3b8ecf[_0x2a50b4],_0x236f82,_0x5304ec));}function _0x14edfc(_0x354e54,_0x46f20d,_0x225e52){const _0x508047=_0x2ed739['userId'],_0x1ac0db='revision:'+_0x3b7129+':'+_0x508047+':'+_0x23cf16++,_0x1db622=_0x5304ec['createRange'](_0x46f20d,_0x225e52);_0x236f82['markers']['set'](_0x1ac0db,_0x1db622),null!==_0x508047&&_0x324f1b['add'](_0x508047);}}['_getVidAttributeName'](_0x56812a){switch(_0x56812a['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x13bfbc,_0x2de83f){_0x13bfbc['baseVersion']=null;for(const _0x58798a in _0x13bfbc){const _0xa2350b=_0x13bfbc[_0x58798a];if(_0xa2350b instanceof _0x1187e3){const _0x13bcda=_0x2de83f['get'](_0xa2350b['root']['rootName']);_0x13bfbc[_0x58798a]=this['_fixPosition'](_0xa2350b,_0x13bcda);}if(_0xa2350b instanceof _0x29901c){const _0xcd053a=_0x2de83f['get'](_0xa2350b['root']['rootName']);_0x13bfbc[_0x58798a]=this['_fixRange'](_0xa2350b,_0xcd053a);}'root'===_0x58798a&&(_0x13bfbc['root']=_0x2de83f['get'](_0x13bfbc['root']['rootName']));}}['_fixRange'](_0x299adb,_0x29a719){return this['editor']['model']['createRange'](this['_fixPosition'](_0x299adb['start'],_0x29a719),this['_fixPosition'](_0x299adb['end'],_0x29a719));}['_fixPosition'](_0x5a3ac3,_0x161cfa){return this['editor']['model']['createPositionFromPath'](_0x161cfa,_0x5a3ac3['path'],_0x5a3ac3['stickiness']);}['_handleInsertOperation'](_0x313003){const _0x173a2a=this['_idsRoots']['get'](_0x313003['position']['root']['rootName']),_0x484d23=this['_fixPosition'](_0x313003['position'],_0x173a2a),_0x1c4006=null===_0x313003['_authorId']?null:_0x313003['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4e6bd0=_0x484d23['parent'],_0x51bf3e=this['_revisionId'],_0x4a78c5=[];for(const _0x55c527 of _0x313003['nodes'])if(_0x55c527['is']('element'))_0x4a78c5['push'](this['_makeIdsRoot'](_0x55c527));else{for(let _0x356c46=0x0;_0x356c46<_0x55c527['offsetSize'];_0x356c46++)_0x4a78c5['push'](new _0x414f80('$text',{'vid':this['_revisionId']++}));}const _0x3dfd34=this['_revisionId'];for(let _0x1d73d3=_0x51bf3e;_0x1d73d3<_0x3dfd34;_0x1d73d3++)this['_touched']['set'](_0x1d73d3,{'userId':_0x1c4006});_0x4e6bd0['_insertChild'](_0x484d23['offset'],_0x4a78c5);}['_handleMoveOperation'](_0x101257){(_0x101257=this['_cloneOperation'](_0x101257,this['_idsRoots']))['_execute']();const _0x51f38f=null===_0x101257['_authorId']?null:_0x101257['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x56aa7e=_0x101257['getMovedRangeStart'](),_0x3742c8=_0x56aa7e['parent'],_0x1fd6b0=_0x56aa7e['offset'];!function _0x2cd9be(_0x366344,_0x4208f4,_0xdf2f91,_0x1838ab){for(let _0x30c95e=_0xdf2f91;_0x30c95e<_0x1838ab;_0x30c95e++){const _0x42b52e=_0x4208f4['getChild'](_0x30c95e);_0x42b52e['is']('element','$text')?_0x366344['set'](_0x42b52e['getAttribute']('vid'),{'userId':_0x51f38f}):(_0x366344['set'](_0x42b52e['getAttribute']('vid_start'),{'userId':_0x51f38f}),_0x2cd9be(_0x366344,_0x42b52e,0x0,_0x42b52e['childCount']),_0x366344['set'](_0x42b52e['getAttribute']('vid_end'),{'userId':_0x51f38f}));}}(this['_touched'],_0x3742c8,_0x1fd6b0,_0x1fd6b0+_0x101257['howMany']);}['_handleMergeOperation'](_0x428795){const _0x3492f0=null===(_0x428795=this['_cloneOperation'](_0x428795,this['_idsRoots']))['_authorId']?null:_0x428795['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1882c7=_0x428795['targetPosition']['parent'],_0x3f351c=_0x428795['sourcePosition']['parent'],_0x4cc89c=_0x1882c7['getAttribute']('vid_end'),_0xaf4a4d=_0x3f351c['getAttribute']('vid_start');_0x1882c7['_setAttribute']('vid_end',_0x3f351c['getAttribute']('vid_end')),_0x3f351c['_setAttribute']('vid_end',_0x4cc89c),this['_touched']['set'](_0xaf4a4d,{'userId':_0x3492f0}),this['_touched']['set'](_0x4cc89c,{'userId':_0x3492f0}),_0x428795['_execute']();}['_handleSplitOperation'](_0x4c79e7){const _0x508ed9=null===(_0x4c79e7=this['_cloneOperation'](_0x4c79e7,this['_idsRoots']))['_authorId']?null:_0x4c79e7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x541a51=_0x4c79e7['graveyardPosition'],_0x5c46f5=_0x4c79e7['splitPosition']['parent'];_0x4c79e7['_execute']();const _0x518b1b=_0x5c46f5['getAttribute']('vid_end'),_0x10a4b6=_0x4c79e7['insertionPosition']['nodeAfter'];if(_0x541a51){const _0x779f12=_0x10a4b6['getAttribute']('vid_end'),_0x58e8ba=_0x5c46f5['getAttribute']('vid_end');_0x5c46f5['_setAttribute']('vid_end',_0x779f12),_0x10a4b6['_setAttribute']('vid_end',_0x58e8ba),this['_touched']['set'](_0x5c46f5['getAttribute']('vid_end'),{'userId':_0x508ed9}),this['_touched']['set'](_0x10a4b6['getAttribute']('vid_start'),{'userId':_0x508ed9});}else{const _0x437bbd=this['_revisionId']++,_0x4be997=this['_revisionId']++;_0x5c46f5['_setAttribute']('vid_end',_0x437bbd),_0x10a4b6['_setAttribute']('vid_start',_0x4be997),_0x10a4b6['_setAttribute']('vid_end',_0x518b1b),this['_touched']['set'](_0x437bbd,{'userId':_0x508ed9}),this['_touched']['set'](_0x4be997,{'userId':_0x508ed9});}}['_handleMarkerOperation'](_0x1e6fec){if(!_0x1e6fec['affectsData'])return;const _0x5be7c2=(_0x1e6fec=this['_cloneOperation'](_0x1e6fec,this['_diffRoots']))['oldRange']?_0x1e6fec['oldRange']['root']:null,_0x39ae7e=_0x1e6fec['newRange']?_0x1e6fec['newRange']['root']:null;_0x5be7c2&&this['_markers']['delete'](_0x1e6fec['name']),_0x39ae7e&&this['_markers']['set'](_0x1e6fec['name'],_0x1e6fec['newRange']['clone']());const _0x2cf47d=null===_0x1e6fec['_authorId']?null:_0x1e6fec['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xbb1c71=_0x1e6fec['name'];if(!this['_touchedMarkers']['has'](_0xbb1c71))return void this['_touchedMarkers']['set'](_0xbb1c71,{'range':_0x1e6fec['oldRange'],'userId':_0x2cf47d});const _0xe06fb8=this['_touchedMarkers']['get'](_0xbb1c71),_0x8fd6b=_0xe06fb8['range'],_0x225f18=_0x1e6fec['newRange'];null==_0x8fd6b&&null==_0x225f18||_0x8fd6b&&_0x225f18&&_0x8fd6b['isEqual'](_0x225f18)?this['_touchedMarkers']['delete'](_0x1e6fec['name']):_0xe06fb8['userId']=_0x2cf47d;}['_handleRootOperation'](_0x46ff7b,_0xa5b84c){this['_diffRoots']['has'](_0x46ff7b['rootName'])?this['_diffRoots']['get'](_0x46ff7b['rootName'])['_isAttached']=_0x46ff7b['isAdd']:(this['_diffRoots']['set'](_0x46ff7b['rootName'],N(_0x46ff7b['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x46ff7b['rootName'],{}),_0xa5b84c&&this['_idsRoots']['set'](_0x46ff7b['rootName'],N(_0x46ff7b['rootName'],!0x0)));const _0x37cc15=null===_0x46ff7b['_authorId']?null:_0x46ff7b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2297d5=this['_touchedRoots']['get'](_0x46ff7b['rootName']);_0x2297d5&&_0x2297d5['userId']===_0x37cc15?this['_touchedRoots']['delete'](_0x46ff7b['rootName']):this['_touchedRoots']['set'](_0x46ff7b['rootName'],{'userId':_0x37cc15,'isAttached':_0x46ff7b['isAdd']});}['_handleRootAttributeOperation'](_0x444c5d){const _0x4886d=this['_diffRootsAttributes']['get'](_0x444c5d['root']['rootName']);null===_0x444c5d['newValue']?delete _0x4886d[_0x444c5d['key']]:_0x4886d[_0x444c5d['key']]=_0x444c5d['newValue'];}}function x(_0x5d1bb0){const _0x28f708=N(_0x5d1bb0['rootName'],_0x5d1bb0['isAttached']());for(const _0x8d9246 of _0x5d1bb0['getChildren']()){const _0x327b64=_0x8d9246['_clone'](!0x0);_0x28f708['_appendChild'](_0x327b64);}return _0x28f708;}function N(_0xd5190c,_0xe7329=!0x0){const _0x2e4efa=new _0x17d82d();return _0x2e4efa['rootName']=_0xd5190c,_0x2e4efa['_isAttached']=_0xe7329,_0x2e4efa['isAttached']=()=>_0x2e4efa['_isAttached'],_0x2e4efa;}function P(_0x5a772c,_0x2b24aa,_0x4794f5){const _0x29488='elementEnd'==_0x5a772c['type']?_0x4794f5['createPositionAt'](_0x5a772c['item'],'end'):_0x4794f5['createPositionBefore'](_0x5a772c['item']);return _0x4794f5['createPositionFromPath'](_0x2b24aa,_0x29488['path'],_0x29488['stickiness']);}function V(_0x57b5ac,_0x46b657,_0x4ca689){const _0x769ef1='elementStart'==_0x57b5ac['type']?_0x4ca689['createPositionAt'](_0x57b5ac['item'],0x0):_0x4ca689['createPositionAfter'](_0x57b5ac['item']);return _0x4ca689['createPositionFromPath'](_0x46b657,_0x769ef1['path'],_0x769ef1['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
- _0xe64dcd(_0x2f1156){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x203e6d,_0x452ab0){super(_0x203e6d),this['focusTracker']=new _0x2aa5a7(),this['keystrokes']=new _0x1f72cf(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x452ab0),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'](),_0x5ba221({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5fa87a=_0x181f7c=>_0x181f7c['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5fa87a),this['keystrokes']['set']('arrowleft',_0x5fa87a),this['keystrokes']['set']('arrowup',_0x5fa87a),this['keystrokes']['set']('arrowdown',_0x5fa87a);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x57d584){this['revisionNameInputView']['fieldView']['element']['value']=_0x57d584['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0xb1982b){const _0x547c1c=new et(this['locale'],ti),_0x561333=_0x547c1c['fieldView'];_0x561333['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x3d2d9e=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0xb1982b&&(_0x3d2d9e+='\x20('+m(this['locale'],'optional')+')'),(_0x547c1c['label']=_0x3d2d9e,_0x561333['on']('input',()=>{this['revisionNameInputValue']=_0x561333['element']['value']['trim']();}),_0x547c1c);}}class l extends _0x398bff{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x2e90b6=this['editor'],_0x20b0ef=_0x2e90b6['plugins']['get']('RevisionTracker');_0x2e90b6['ui']['componentFactory']['add']('revisionHistory',_0x2a1104=>{const _0x3f5350=_0x38d819(_0x2a1104),_0x201e9a=_0x3f5350['panelView']['children'],_0x564e81=new _0xd36402(_0x2a1104),_0x9af7ba=new _0x45c4bf(_0x2a1104),_0x27c339=new _0x2a3404(_0x2a1104),_0x5f2a0a=new _0x45c4bf(_0x2a1104),_0x38d928=new _0x2a3404(_0x2a1104);return _0x3f5350['bind']('isEnabled')['to'](_0x20b0ef,'isReady',_0x20b0ef,'isEnabled',_0x2e90b6,'isReadOnly',(_0xfaa602,_0x1166d5,_0x3731f9)=>_0xfaa602&&_0x1166d5&&!_0x3731f9),_0x3f5350['buttonView']['set']({'icon':_0x31e609,'label':m(_0x2a1104,'Revision\x20history'),'tooltip':!0x0}),_0x27c339['set']({'label':m(_0x2a1104,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x27c339['bind']('isEnabled')['to'](_0x20b0ef,'isReady',_0x20b0ef,'isEnabled',_0x2e90b6,'isReadOnly',(_0x43a584,_0x2662dd,_0x320d7e)=>_0x43a584&&_0x2662dd&&!_0x320d7e),_0x27c339['on']('execute',()=>this['_showDialog']()),_0x38d928['set']({'label':m(_0x2a1104,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x38d928['bind']('isEnabled')['to'](_0x20b0ef,'isReady',_0x2e90b6,'isReadOnly',(_0x81ff2,_0x1476ed)=>_0x81ff2&&!_0x1476ed),_0x38d928['on']('execute',()=>{_0x2e90b6['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x3f5350['isOpen']=!0x1,_0x2e90b6['editing']['view']['focus']();}),_0x9af7ba['children']['add'](_0x27c339),_0x5f2a0a['children']['add'](_0x38d928),_0x564e81['role']='menu',_0x564e81['items']['addMany']([_0x9af7ba,_0x5f2a0a]),_0x201e9a['add'](_0x564e81),_0x3f5350;}),_0x2e90b6['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x57cc61=this['editor'],_0x565454=_0x57cc61['locale'],_0x3560dc=new _0x198a04(_0x565454),_0x5e47ca=new _0x8d403b(_0x565454);_0x3560dc['buttonView']['set']({'icon':_0x31e609,'label':m(_0x565454,'Revision\x20history')});const _0x2db937=new _0x313385(_0x565454,_0x3560dc),_0x15e128=new _0x26fbaa(_0x565454);_0x15e128['set']({'label':m(_0x565454,'Save\x20current\x20revision')}),_0x15e128['delegate']('execute')['to'](_0x3560dc),_0x15e128['on']('execute',()=>{this['_showDialog']();}),_0x2db937['children']['add'](_0x15e128),_0x5e47ca['items']['add'](_0x2db937);const _0x189880=new _0x313385(_0x565454,_0x3560dc),_0x224424=new _0x26fbaa(_0x565454);return _0x224424['set']({'label':m(_0x565454,'Open\x20revision\x20history')}),_0x224424['delegate']('execute')['to'](_0x3560dc),_0x224424['on']('execute',()=>{_0x57cc61['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x189880['children']['add'](_0x224424),_0x5e47ca['items']['add'](_0x189880),_0x3560dc['panelView']['children']['add'](_0x5e47ca),_0x3560dc;}['_showDialog'](){const _0x477236=this['editor'],_0x858d00=_0x477236['locale'],_0x47c398=_0x477236['plugins']['get']('Dialog'),_0x5d8889=_0x477236['plugins']['get']('RevisionTracker');function _0x339947(_0x5773c0){_0x477236['config']['get']('revisionHistory.requireRevisionName')&&''===_0x5773c0['revisionName']?_0x5773c0['revisionNameInputView']['errorText']=m(_0x858d00,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x477236['plugins']['get'](h)['saveRevision']({'name':_0x5773c0['revisionName']}),_0x47c398['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x339947(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x47c398['show']({'id':'revisionSave','title':m(_0x858d00,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x477236['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x47c398['hide']()},{'label':m(_0x477236['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3827d7){_0x3827d7['bind']('isEnabled')['to'](_0x5d8889,'isReady',_0x5d8889,'isEnabled',_0x477236,'isReadOnly',(_0x4867c8,_0xfbccfd,_0x53294c)=>_0x4867c8&&_0xfbccfd&&!_0x53294c);},'onExecute':()=>_0x339947(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0xbda96a=this['editor'],_0x197bc2=_0xbda96a['locale'];this['_saveRevisionFormView']=new me(_0x197bc2,_0xbda96a['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x2f1156{['changeId'];['_model'];constructor(_0x49aad0,_0x257aa3){super(_0x49aad0),this['_model']=_0x257aa3,this['changeId']=_0x257aa3['id'];const _0x109456=this['bindTemplate'],_0x39078f=m(_0x49aad0,_0x257aa3['data']['isSuggestion']?'Suggested\x20by':'add'==_0x257aa3['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x257aa3['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x109456['to']('type',_0x4e4334=>'ck-revision-change__'+_0x4e4334)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x39078f}]},{'text':'\x20'+_0x257aa3['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x8d9be7(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x120517){super(),this['id']=_0x120517['id']||_0x44f97c(),this['author']=_0x120517['author'],this['type']=_0x120517['type'],this['data']=_0x120517['data']||{},this['rootName']=_0x120517['rootName'],this['set']('createdAt',_0x120517['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(_0x337851,_0x1e2916){this['newRevisionId']=_0x337851,this['oldRevisionId']=_0x1e2916,this['changes']=new _0x2c62fe();}['_setChanges'](_0x47b8ef){for(const _0x2e12bd of _0x47b8ef)this['changes']['add'](_0x2e12bd);}}class u extends _0x398bff{['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[_0x4c78be,_0x2067ca,S,$];}constructor(_0x2a1cfe){super(_0x2a1cfe),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',(_0x10c5fa,_0x3cf686,_0x5f2401)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x265f03=>{for(const _0x5aff97 of this['editor']['editing']['view']['document']['roots'])_0x5f2401?_0x265f03['removeClass']('ck-editor__editable__overlay',_0x5aff97):_0x265f03['addClass']('ck-editor__editable__overlay',_0x5aff97);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2ed026=>null!==_0x2ed026),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0xcfc061,_0x592d1f,_0x2f6259)=>_0xcfc061&&_0x2f6259?_0x592d1f['changes']['getIndex'](_0x2f6259):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x13c4ff,_0x5b7219)=>_0x13c4ff?_0x5b7219['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x2067ca);}['init'](){const _0x317083=this['editor'],_0x5cd68f=new rt(_0x317083,{'direction':'backward'}),_0x1a15b9=new rt(_0x317083,{'direction':'forward'});(_0x317083['commands']['add']('showPreviousChange',_0x5cd68f),_0x317083['commands']['add']('showNextChange',_0x1a15b9),_0x317083['commands']['add']('restoreRevision',new nt(_0x317083)),this['on']('change:numberOfChanges',()=>{_0x5cd68f['refresh'](),_0x1a15b9['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x317083['enableReadOnlyMode']('revision-viewer'),_0x317083['plugins']['has']('WidgetToolbarRepository'))&&_0x317083['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x13c710){return await this['_utils']['loadRevisionData'](_0x13c710,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x13c710);}async['getRevisionRootsAttributes'](_0xe8bf97){return await this['_utils']['loadRevisionData'](_0xe8bf97,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xe8bf97);}async['compare'](_0x459ef2,_0x46eaad,_0x486114=!0x1){if(!this['isEnabled'])return;const _0x29d2c2=this['diff'],_0x22d0d8=this['repository'],_0x58e5bc='string'==typeof _0x459ef2?_0x22d0d8['getRevision'](_0x459ef2):_0x459ef2,_0x2ea786='string'==typeof _0x46eaad?_0x22d0d8['getRevision'](_0x46eaad):_0x46eaad,_0x7125cf=_0x58e5bc['id'],_0x280e70=_0x2ea786?_0x2ea786['id']:null;if(!_0x486114&&this['diff']&&this['diff']['newRevisionId']===_0x7125cf&&this['diff']['oldRevisionId']===_0x280e70)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x7125cf,_0x280e70);const _0x1e7377=this['_getRevisionsRange'](_0x58e5bc,_0x2ea786,!0x0)['map'](_0x1371cc=>this['_utils']['loadRevisionData'](_0x1371cc,this['adapter']));return _0x1e7377['push'](new Promise(_0x53f131=>{setTimeout(_0x53f131,0x14);})),Promise['all'](_0x1e7377)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2365de=this['_getDiff'](_0x7125cf,_0x280e70);for(const _0x5b6da8 of _0x2365de['changes'])this['_changeIdToChange']['set'](_0x5b6da8['id'],_0x5b6da8);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x440019=>{for(const _0x19ea22 of this['editor']['model']['document']['getRootNames']())_0x440019['detachRoot'](_0x19ea22);for(const _0x5eb628 of Object['keys'](_0x2365de['model'])){const _0x5c1674=_0x440019['addRoot'](_0x5eb628);for(const _0x34b8f3 of Object['keys'](_0x2365de['attributes'][_0x5eb628]))_0x440019['setAttribute'](_0x34b8f3,_0x2365de['attributes'][_0x5eb628][_0x34b8f3],_0x5c1674);_0x440019['insert'](_0x2365de['model'][_0x5eb628],_0x5c1674,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2365de['changes'])),this['isReady']=!0x0;})['catch'](_0x46ebe3=>{console['error'](_0x46ebe3),this['_cleanUp'](),_0x29d2c2&&(this['diff']=_0x29d2c2),this['isReady']=!0x0;});}['addRevisionData'](_0x3b9d45,_0x633ca4){const _0x18bb4c=this['repository']['createRevision'](_0x3b9d45);return _0x18bb4c['on']('_update',(_0x576389,_0x2d517b,_0x54226f)=>_0x633ca4(_0x2d517b,_0x54226f,_0x18bb4c)),this['repository']['addRevision'](_0x18bb4c),_0x18bb4c;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x59818a=>{for(const _0x800568 of this['editor']['model']['document']['getRootNames']())_0x59818a['detachRoot'](_0x800568);});}['_sortAndFilterDiffChanges'](_0x45eca3){const _0x447c07=[],_0x390cd0=new Map();for(const _0x2f759c of this['editor']['model']['document']['getRootNames']()){const _0x18a0a6=this['editor']['editing']['view']['getDomRoot'](_0x2f759c);if(!_0x18a0a6)continue;const _0x10f6db=_0x18a0a6['getClientRects']()['item'](0x0);_0x10f6db&&(_0x447c07['push'](_0x2f759c),_0x390cd0['set'](_0x2f759c,_0x10f6db));}return _0x447c07['sort']((_0x53a6e6,_0x381993)=>{const _0x9c1220=_0x390cd0['get'](_0x53a6e6),_0x143b91=_0x390cd0['get'](_0x381993);return _0x9c1220['y']-_0x143b91['y']||_0x9c1220['x']-_0x143b91['x'];}),(_0x45eca3=_0x45eca3['filter'](_0x1e0696=>_0x447c07['includes'](_0x1e0696['rootName'])))['sort']((_0x522e1f,_0x649a3f)=>_0x447c07['indexOf'](_0x522e1f['rootName'])-_0x447c07['indexOf'](_0x649a3f['rootName'])),_0x45eca3;}['_makeTape'](_0x4f7ef2){const _0xb63353=Array['from'](_0x4f7ef2['markers'])['filter'](([_0x3ca32b,_0x584576])=>_0x3ca32b['startsWith']('revision:')&&!_0x584576['isCollapsed']),_0x1f6585=Array['from'](this['editor']['model']['createRangeIn'](_0x4f7ef2)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0xb63353['length'])for(const _0x3746b2 of _0x1f6585){const [_0x5a70ba,_0x43657d]=_0xb63353[0x0],[,_0x4fbd17,_0x4c395a]=_0x5a70ba['split'](':');if(_0x43657d['end']['isEqual'](_0x3746b2['nextPosition'])&&_0xb63353['shift'](),(_0x3746b2['previousPosition']['isEqual'](_0x43657d['start'])||_0x3746b2['previousPosition']['isAfter'](_0x43657d['start']))&&('insertion'==_0x4fbd17?_0x3746b2['isAdded']={'userId':_0x4c395a}:'deletion'==_0x4fbd17&&(_0x3746b2['isRemoved']={'userId':_0x4c395a})),0x0==_0xb63353['length'])break;}return _0x1f6585;}['_refreshStartEndIndex'](_0x3fe0ee){const _0x4f724d=new Map();for(let _0x5376f9=0x0;_0x5376f9<_0x3fe0ee['length'];_0x5376f9++)'text'===_0x3fe0ee[_0x5376f9]['type']?(_0x3fe0ee[_0x5376f9]['item']['startIndex']=_0x5376f9,_0x3fe0ee[_0x5376f9]['item']['endIndex']=_0x5376f9):('elementStart'===_0x3fe0ee[_0x5376f9]['type']?_0x3fe0ee[_0x5376f9]['item']['startIndex']=_0x5376f9:'elementEnd'===_0x3fe0ee[_0x5376f9]['type']&&(_0x3fe0ee[_0x5376f9]['item']['endIndex']=_0x5376f9),_0x4f724d['set'](_0x3fe0ee[_0x5376f9]['id'],_0x5376f9));for(const _0x2f8220 of _0x4f724d['values']())'elementStart'===_0x3fe0ee[_0x2f8220]['type']?_0x3fe0ee[_0x2f8220]['item']['endIndex']=_0x4f724d['get'](_0x3fe0ee[_0x2f8220]['pairId']):'elementEnd'===_0x3fe0ee[_0x2f8220]['type']&&(_0x3fe0ee[_0x2f8220]['item']['startIndex']=_0x4f724d['get'](_0x3fe0ee[_0x2f8220]['pairId']));}['_processTape'](_0x2526d7){for(let _0x178e53=0x0;_0x178e53<_0x2526d7['length'];_0x178e53++){if('elementStart'===_0x2526d7[_0x178e53]['type'])_0x2526d7[_0x178e53]['item']['startIndex']=_0x178e53;else{if('elementEnd'===_0x2526d7[_0x178e53]['type']){_0x2526d7[_0x178e53]['item']['endIndex']=_0x178e53;const _0x4118f1=_0x2526d7[_0x178e53]['item']['startIndex'];_0x2526d7[_0x4118f1]['pairId']=_0x2526d7[_0x178e53]['id'],_0x2526d7[_0x178e53]['pairId']=_0x2526d7[_0x4118f1]['id'];}else _0x2526d7[_0x178e53]['item']['startIndex']=_0x178e53,_0x2526d7[_0x178e53]['item']['endIndex']=_0x178e53,_0x2526d7[_0x178e53]['pairId']=null;}_0x2526d7[_0x178e53]['markersStart']||(_0x2526d7[_0x178e53]['markersStart']=[],_0x2526d7[_0x178e53]['markersEnd']=[]);}}['_markInsertions'](_0x3c4fa5,_0x2bcc3b){const _0xa4e63=_0x3c4fa5['filter'](_0x4a6bfb=>!_0x4a6bfb['isAdded']);for(let _0x590b2e=0x0;_0x590b2e<_0x2bcc3b['length'];_0x590b2e++)_0x2bcc3b[_0x590b2e]['isAdded']&&(_0xa4e63[_0x590b2e]['isAdded']=_0x2bcc3b[_0x590b2e]['isAdded']);}['_getDiff'](_0x4dfa89,_0x552ccf=null){const _0x4ec3c3=this['repository']['getRevision'](_0x4dfa89),_0x20cf55=_0x552ccf?this['repository']['getRevision'](_0x552ccf):null,_0x56688b=this['_getRevisionsRange'](_0x4ec3c3,_0x20cf55),_0x5590f6=_0x56688b[_0x56688b['length']-0x1],_0x56866c=new Map(),_0x50b9f5={'model':{},'attributes':{},'changes':[]},_0x275840=new Set(),_0x1aa0fb=new Map();for(let _0x47da63=_0x56688b['length']-0x1;_0x47da63>=0x0;_0x47da63--){const _0x46871a=_0x56688b[_0x47da63];for(const _0x4003cc of Object['keys'](_0x46871a['diffData']))if(_0x46871a['diffData'][_0x4003cc]['attachChange']){const _0x4a174d=_0x46871a['diffData'][_0x4003cc]['attachChange'];_0x4a174d['isAttached']?(_0x275840['add'](_0x4003cc),_0x1aa0fb['has'](_0x4003cc)&&_0x1aa0fb['get'](_0x4003cc)['userId']==_0x4a174d['userId']?_0x1aa0fb['delete'](_0x4003cc):_0x1aa0fb['set'](_0x4003cc,_0x4a174d)):_0x1aa0fb['has'](_0x4003cc)?(_0x275840['delete'](_0x4003cc),_0x1aa0fb['delete'](_0x4003cc)):(_0x275840['add'](_0x4003cc),_0x1aa0fb['set'](_0x4003cc,_0x4a174d));}else _0x275840['add'](_0x4003cc);}for(const _0x556ac6 of _0x275840){const _0x452a6e=_0x1aa0fb['has'](_0x556ac6)&&!_0x1aa0fb['get'](_0x556ac6)['isAttached'];let _0x1b1bda=_0x452a6e?_0x56688b['length']-0x1:0x0;const _0x1f1ba8=_0x452a6e?-0x1:0x1;for(;_0x56688b[_0x1b1bda];){const _0x18737b=_0x56688b[_0x1b1bda];if(_0x18737b['diffData'][_0x556ac6]){const _0x251798=_0x452a6e?_0x18737b['diffData'][_0x556ac6]['attributesBefore']:_0x18737b['diffData'][_0x556ac6]['attributesAfter'];_0x50b9f5['attributes'][_0x556ac6]=_0x251798?_0x55f32f(_0x251798):{};break;}_0x1b1bda+=_0x1f1ba8;}}for(const _0x16d2ba of _0x56688b){_0x16d2ba['model']={};for(const _0x5e593a of _0x16d2ba['authors'])_0x56866c['set'](_0x5e593a['id'],_0x5e593a);for(const _0x14ed16 of _0x275840){const _0x4b458b=_0x16d2ba['diffData'][_0x14ed16]?_0x16d2ba['diffData'][_0x14ed16]['insertions']:'[]',_0x4bdff5=_0x16d2ba['diffData'][_0x14ed16]?_0x16d2ba['diffData'][_0x14ed16]['deletions']:'[]';_0x16d2ba['model'][_0x14ed16]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4b458b),'deletions':this['_utils']['_makeModelFromViewString'](_0x4bdff5)};}}for(const _0x288637 of _0x275840){let _0x29f569=null,_0x45c9af=0x0;const _0x4a6e31=new Map(Array['from'](_0x4ec3c3['model'][_0x288637]['insertions']['markers'])['filter'](([_0x22d31b])=>!_0x22d31b['startsWith']('revision:')));let _0x74316f=0x0;for(const _0x469502 of _0x56688b){const _0x5b2e9a=this['_makeTape'](_0x469502['model'][_0x288637]['insertions']);_0x469502==_0x4ec3c3?(_0x29f569=_0x5b2e9a,_0x45c9af=_0x29f569['length'],_0x29f569['forEach'](_0x6ba293=>{_0x6ba293['id']=_0x74316f++;}),this['_processTape'](_0x29f569)):this['_markInsertions'](_0x29f569,_0x5b2e9a);const _0x4973e6=_0x29f569['filter'](_0x3ed894=>!_0x3ed894['isAdded'])['map'](_0x19d5f9=>_0x19d5f9['id']);let _0x5469cd=0x0;const _0x142218=this['_makeTape'](_0x469502['model'][_0x288637]['deletions']);_0x142218['forEach'](_0x307d21=>{_0x307d21['isRemoved']?_0x307d21['id']=_0x45c9af++:_0x307d21['id']=_0x4973e6[_0x5469cd++];}),this['_processTape'](_0x142218),this['_setDistance'](_0x29f569,'isAdded'),this['_setDistance'](_0x142218,'isRemoved'),_0x469502==_0x4ec3c3&&this['_markMarkers'](_0x29f569,_0x4a6e31),_0x29f569=this['_joinTapes'](_0x29f569,_0x142218),this['_refreshStartEndIndex'](_0x29f569),this['_setDistance'](_0x29f569,'isRemoved');}_0x29f569=_0x29f569['filter'](_0x5354fc=>!(_0x5354fc['isAdded']&&_0x5354fc['isRemoved']));const _0x2a243f=new Map(_0x5590f6['model'][_0x288637]['deletions']['markers']),_0x576912=new Set(_0x4a6e31['keys']());for(const _0x412975 of _0x2a243f['keys']())_0x576912['delete'](_0x412975);this['_markSuggestions'](_0x29f569,_0x576912),this['_fixObsoleteTags'](_0x29f569),_0x29f569=this['_removeMissingPairs'](_0x29f569),_0x29f569=this['_markMismatchedRemovedTags'](_0x29f569),_0x29f569=this['_removeUnsupportedChanges'](_0x29f569);const {root:_0x3b4246,changes:_0x54ecbc}=this['_makeModelFromTape'](_0x29f569,_0x56866c,_0x288637);_0x50b9f5['model'][_0x288637]=_0x3b4246;const _0x20e3c3=_0x1aa0fb['get'](_0x288637);if(_0x20e3c3){const _0xaf23f1=_0x56866c['get'](_0x20e3c3['userId']),_0x10b4fa=new G({'author':_0xaf23f1,'type':_0x20e3c3['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x288637});_0x54ecbc['unshift'](_0x10b4fa),_0x50b9f5['attributes'][_0x288637]['revisionHistoryAttachChange']=_0x10b4fa['id'];}_0x50b9f5['changes']=_0x50b9f5['changes']['concat'](_0x54ecbc);}return _0x50b9f5;}['_markMarkers'](_0x58a7fe,_0x59edd9){for(let _0x2a2622=0x0;_0x2a2622<_0x58a7fe['length'];_0x2a2622++)for(const [_0x40071a,_0x365996]of _0x59edd9)!_0x365996['isCollapsed']&&_0x365996['start']['isEqual'](_0x58a7fe[_0x2a2622]['previousPosition'])&&_0x58a7fe[_0x2a2622]['markersStart']['push'](_0x40071a),_0x365996['end']['isEqual'](_0x58a7fe[_0x2a2622]['nextPosition'])&&_0x58a7fe[_0x2a2622]['markersEnd']['push'](_0x40071a);}['_joinTapes'](_0x1dfc51,_0x39983b){let _0x14dd87=[],_0x556656=0x0,_0x15a9d9=0x0;for(;_0x556656<_0x1dfc51['length']||_0x15a9d9<_0x39983b['length'];){const _0x2234ec=_0x1dfc51[_0x556656]||{},_0x31de51=_0x39983b[_0x15a9d9]||{};if(_0x2234ec['id']==_0x31de51['id'])_0x556656++,_0x15a9d9++,_0x14dd87['push'](_0x2234ec);else{if(_0x31de51['isRemoved']&&_0x2234ec['isAdded']){const {commonTape:_0x493958,iEnd:_0x1a45ad,jEnd:_0x5b62e2}=this['_threeWayMerge'](_0x1dfc51,_0x556656,_0x39983b,_0x15a9d9);_0x14dd87=_0x14dd87['concat'](_0x493958),_0x556656=_0x1a45ad,_0x15a9d9=_0x5b62e2;}else _0x31de51['isRemoved']?(_0x15a9d9++,_0x14dd87['push'](_0x31de51)):(_0x556656++,_0x14dd87['push'](_0x2234ec));}}return _0x14dd87;}['_markSuggestions'](_0xd678bf,_0x4dce3b){const _0x3f9b5d=[];for(let _0x4bc635=0x0;_0x4bc635<_0xd678bf['length'];_0x4bc635++){for(let _0x12a6f3=0x0;_0x12a6f3<_0xd678bf[_0x4bc635]['markersStart']['length'];_0x12a6f3++){const _0x5a7fcc=_0xd678bf[_0x4bc635]['markersStart'][_0x12a6f3];if(!_0x4dce3b['has'](_0x5a7fcc))continue;const {group:_0x64935b,type:_0x5a68a3,authorId:_0x5e3878}=_0x43de9c(_0x5a7fcc);'revision-suggestion'!=_0x64935b||'insertion'!=_0x5a68a3&&'deletion'!=_0x5a68a3||(_0x3f9b5d['unshift']({'type':_0x5a68a3,'name':_0x5a7fcc,'userId':_0x5e3878}),_0xd678bf[_0x4bc635]['markersStart']['splice'](_0x12a6f3,0x1),_0x12a6f3--);}_0xc1d7a5(_0xd678bf[_0x4bc635]);for(let _0x5b90f8=0x0;_0x5b90f8<_0xd678bf[_0x4bc635]['markersEnd']['length'];_0x5b90f8++){const _0x412469=_0xd678bf[_0x4bc635]['markersEnd'][_0x5b90f8];if(!_0x4dce3b['has'](_0x412469))continue;const {group:_0x5cab49,type:_0x37daff}=_0x43de9c(_0x412469);if('revision-suggestion'!=_0x5cab49||'insertion'!=_0x37daff&&'deletion'!=_0x37daff)continue;_0xd678bf[_0x4bc635]['markersEnd']['splice'](_0x5b90f8,0x1),_0x5b90f8--;const _0x52d4e9=_0x3f9b5d['findIndex'](_0x348ff0=>_0x348ff0['name']==_0x412469);_0x52d4e9>-0x1&&_0x3f9b5d['splice'](_0x52d4e9,0x1);}}function _0x43de9c(_0x3c28fa){const _0x42c17a=_0x3c28fa['split'](':');return{'group':_0x42c17a[0x0],'type':_0x42c17a[0x1],'subType':_0x42c17a['length']>=0x5?_0x42c17a[0x2]:null,'id':_0x42c17a['length']<0x5?_0x42c17a[0x2]:_0x42c17a[0x3],'authorId':_0x42c17a['length']<0x5?_0x42c17a[0x3]:_0x42c17a[0x4],'markerCount':0x6==_0x42c17a['length']?_0x42c17a[0x5]:null};}function _0xc1d7a5(_0x29a156){for(let _0x336b46=0x0;_0x336b46<_0x3f9b5d['length'];_0x336b46++){if(_0x29a156['isAdded']&&'insertion'==_0x3f9b5d[_0x336b46]['type']&&_0x29a156['isAdded']['userId']==_0x3f9b5d[_0x336b46]['userId'])return _0x29a156['isAddSuggestion']=_0x3f9b5d[_0x336b46],void delete _0x29a156['isAdded'];if(!_0x29a156['isAdded']&&!_0x29a156['isRemoved']&&'deletion'==_0x3f9b5d[_0x336b46]['type'])return void(_0x29a156['isRemoveSuggestion']=_0x3f9b5d[_0x336b46]);}}}['_setDistance'](_0x5d9c29,_0x3756a9){let _0x3c58e2=0x0,_0x24b0f5=!0x1;const _0x5e6992=new Map();for(const _0x669ff of _0x5d9c29)_0x669ff[_0x3756a9]?_0x24b0f5&&(_0x3c58e2++,_0x24b0f5=!0x1):(_0x3c58e2++,_0x24b0f5=!0x0),_0x5e6992['set'](_0x669ff['id'],_0x3c58e2);for(let _0x2d0c4a=0x0;_0x2d0c4a<_0x5d9c29['length'];_0x2d0c4a++){if('isRemoved'==_0x3756a9&&_0x5d9c29[_0x2d0c4a]['isAdded']||'isAdded'==_0x3756a9&&_0x5d9c29[_0x2d0c4a]['isRemoved'])continue;if('text'==_0x5d9c29[_0x2d0c4a]['type']){_0x5d9c29[_0x2d0c4a]['distance']=0x0;continue;}const _0x22a414=_0x5e6992['get'](_0x5d9c29[_0x2d0c4a]['pairId']),_0xcf1643=_0x5e6992['get'](_0x5d9c29[_0x2d0c4a]['id']);_0x5d9c29[_0x2d0c4a]['distance']=_0x22a414-_0xcf1643;}}['_getRevisionsRange'](_0x54df25,_0x4d3b19,_0x13de5f=!0x1){const _0x3a8c22=[];let _0x2f9d20=this['repository']['getIndex'](_0x54df25),_0xeaa757=this['repository']['getIndex'](_0x4d3b19);for(-0x1==_0xeaa757&&(_0xeaa757=this['repository']['_revisions']['length'],_0x13de5f=!0x1);_0x2f9d20<_0xeaa757;)_0x3a8c22['push'](this['repository']['getRevision'](_0x2f9d20)),_0x2f9d20++;return _0x13de5f&&_0x3a8c22['push'](this['repository']['getRevision'](_0x2f9d20)),_0x3a8c22;}['_threeWayMerge'](_0x44e3e3,_0x912b66,_0xbec28b,_0x1bd3ce){const _0x225e23=this['editor']['model']['schema'];let _0x2c2c1c=_0x912b66;for(;_0x44e3e3[_0x2c2c1c]&&_0x44e3e3[_0x2c2c1c]['isAdded'];)_0x2c2c1c++;let _0x416d5b=_0x1bd3ce;for(;_0xbec28b[_0x416d5b]&&_0xbec28b[_0x416d5b]['isRemoved'];)_0x416d5b++;_0x3b59ad(_0x44e3e3,_0x912b66,_0x2c2c1c),_0x3b59ad(_0xbec28b,_0x1bd3ce,_0x416d5b);const _0x98c09a=_0xbec28b['slice'](_0x1bd3ce,_0x416d5b)['concat'](_0x44e3e3['slice'](_0x912b66,_0x2c2c1c));return _0x98c09a['sort']((_0x21510b,_0x2862a7)=>_0x21510b['side']!=_0x2862a7['side']?_0x21510b['side']-_0x2862a7['side']:_0x21510b['level']!=_0x2862a7['level']?_0x21510b['level']-_0x2862a7['level']:_0x21510b['distance']!=_0x2862a7['distance']?_0x2862a7['distance']-_0x21510b['distance']:!!_0x21510b['isAdded']!=!!_0x2862a7['isAdded']?-0x1==_0x21510b['side']||0x0==_0x21510b['side']?_0x21510b['isAdded']?-0x1:0x1:_0x21510b['isAdded']?0x1:-0x1:_0x21510b['index']-_0x2862a7['index']),{'commonTape':_0x98c09a,'iEnd':_0x2c2c1c,'jEnd':_0x416d5b};function _0x3b59ad(_0x19cbb8,_0x704d1c,_0x1d472){let _0x491772=-0x1,_0x2944c3=Number['POSITIVE_INFINITY'],_0x2a9ee8=!0x0;for(let _0x47bd51=_0x704d1c;_0x47bd51<_0x1d472;_0x47bd51++)if(_0x225e23['isInline'](_0x19cbb8[_0x47bd51]['item'])||(_0x2a9ee8=!0x1),_0x19cbb8[_0x47bd51]['item']['startIndex']<_0x704d1c&&(_0x491772=_0x47bd51),_0x19cbb8[_0x47bd51]['item']['endIndex']>=_0x1d472){_0x2944c3=_0x47bd51;break;}_0x2a9ee8&&(_0x491772=_0x1d472-0x1);for(let _0x1c979e=_0x704d1c;_0x1c979e<_0x1d472;_0x1c979e++)_0x19cbb8[_0x1c979e]['side']=_0x1c979e<=_0x491772?-0x1:_0x1c979e<_0x2944c3?0x0:0x1,_0x19cbb8[_0x1c979e]['index']=_0x1c979e;let _0xe8e15f=0x0;for(let _0x6aa9a=_0x704d1c;_0x6aa9a<=_0x491772;_0x6aa9a++)0x0==_0x19cbb8[_0x6aa9a]['distance']?_0x19cbb8[_0x6aa9a]['level']=_0xe8e15f:(_0xe8e15f++,_0x19cbb8[_0x6aa9a]['level']=_0xe8e15f,_0xe8e15f++);for(let _0x2797db=_0x704d1c;_0x2797db<_0x1d472;_0x2797db++)0x0==_0x19cbb8[_0x2797db]['side']&&(_0x19cbb8[_0x2797db]['level']=_0xe8e15f);_0xe8e15f=0x0;for(let _0x59647f=_0x1d472-0x1;_0x59647f>=_0x2944c3;_0x59647f--)0x0==_0x19cbb8[_0x59647f]['distance']?_0x19cbb8[_0x59647f]['level']=_0xe8e15f:(_0xe8e15f--,_0x19cbb8[_0x59647f]['level']=_0xe8e15f,_0xe8e15f--);}}['_fixObsoleteTags'](_0x4139a7){const _0x20bb37=new Map(),_0x3e149e=this['editor']['model']['schema'];for(let _0x155d68=0x1;_0x155d68<_0x4139a7['length'];_0x155d68++){let _0x2ffac6,_0x4e9611,_0x3d186a;const _0x274b68=_0x4139a7[_0x155d68],_0x2a92e7=_0x4139a7[_0x155d68-0x1];if('text'==_0x274b68['type'])continue;if(_0x274b68['type']!=_0x2a92e7['type'])continue;if(!_0x3e149e['isBlock'](_0x2a92e7['item'])||_0x3e149e['isLimit'](_0x2a92e7['item']))continue;if(!_0x3e149e['isBlock'](_0x274b68['item'])||_0x3e149e['isLimit'](_0x274b68['item']))continue;if((_0x4139a7[_0x155d68]['isAdded']||_0x4139a7[_0x155d68]['isAddSuggestion'])&&_0x4139a7[_0x155d68-0x1]['isRemoved'])_0x2ffac6=_0x4139a7[_0x155d68],_0x4e9611=_0x4139a7[_0x155d68-0x1],_0x3d186a=_0x155d68-0x1;else{if(!_0x4139a7[_0x155d68]['isRemoved']||!_0x4139a7[_0x155d68-0x1]['isAdded']&&!_0x4139a7[_0x155d68-0x1]['isAddSuggestion'])continue;_0x2ffac6=_0x4139a7[_0x155d68-0x1],_0x4e9611=_0x4139a7[_0x155d68],_0x3d186a=_0x155d68;}const _0x49597a=_0x2ffac6['level']==_0x4e9611['level'],_0x4ca264=Math['abs'](_0x2ffac6['level'])<Math['abs'](_0x4e9611['level'])&&0x0==_0x4e9611['distance'];(_0x49597a||_0x4ca264)&&(_0x20bb37['set'](_0x4e9611['id'],_0x2ffac6['id']),_0x4139a7['splice'](_0x3d186a,0x1),_0x155d68--,_0x2ffac6['isAdded']=!0x1);}for(let _0x57ba3d=0x0;_0x57ba3d<_0x4139a7['length'];_0x57ba3d++)_0x20bb37['has'](_0x4139a7[_0x57ba3d]['pairId'])&&(_0x4139a7[_0x57ba3d]['pairId']=_0x20bb37['get'](_0x4139a7[_0x57ba3d]['pairId']));}['_removeMissingPairs'](_0x3236cc){const _0x1502f4=new Set(_0x3236cc['map'](_0x1a2140=>_0x1a2140['id']));for(let _0x8a28e1=0x0;_0x8a28e1<_0x3236cc['length'];_0x8a28e1++)_0x1502f4['has'](_0x3236cc[_0x8a28e1]['pairId'])||0x0==_0x3236cc[_0x8a28e1]['distance']||(_0x3236cc[_0x8a28e1]['isIncorrect']=!0x0);return _0x3236cc['filter'](_0x59bd34=>!_0x59bd34['isIncorrect']);}['_markMismatchedRemovedTags'](_0x42520a){const _0x5d086d=new Set();for(let _0x230364=0x0;_0x230364<_0x42520a['length'];_0x230364++){if(_0x5d086d['has'](_0x42520a[_0x230364]['id'])&&_0x42520a[_0x230364]['isRemoved']&&(_0x42520a[_0x230364]['isIncorrect']=!0x0),_0x42520a[_0x230364]['isIncorrect'])continue;if(0x0==_0x42520a[_0x230364]['distance'])continue;if('elementStart'!=_0x42520a[_0x230364]['type'])continue;if(null==_0x42520a[_0x230364]['pairId'])continue;let _0x2f653f=_0x230364+0x1,_0x3396db=0x0;for(;_0x42520a[_0x2f653f]['id']!=_0x42520a[_0x230364]['pairId'];)'elementStart'==_0x42520a[_0x2f653f]['type']?_0x3396db++:'elementEnd'==_0x42520a[_0x2f653f]['type']&&_0x3396db--,_0x2f653f++;if(0x0!=_0x3396db){if(_0x42520a[_0x230364]['isRemoved'])_0x42520a[_0x230364]['isIncorrect']=!0x0;else{for(;_0x2f653f!=_0x230364;)_0x42520a[_0x2f653f]['isRemoved']&&0x0!=_0x42520a[_0x2f653f]['distance']&&(_0x42520a[_0x2f653f]['isIncorrect']=!0x0,_0x5d086d['add'](_0x42520a[_0x2f653f]['pairId'])),_0x2f653f--;}}}return _0x42520a['filter'](_0x5dc31=>!_0x5dc31['isIncorrect']);}['_removeUnsupportedChanges'](_0x3f53dc){const _0x65b56=this['editor']['model']['schema'];for(let _0x2e3f06=0x0;_0x2e3f06<_0x3f53dc['length'];_0x2e3f06++){if(!(_0x3f53dc[_0x2e3f06]['isAdded']||_0x3f53dc[_0x2e3f06]['isAddSuggestion']||_0x3f53dc[_0x2e3f06]['isRemoved']||_0x3f53dc[_0x2e3f06]['isRemoveSuggestion']))continue;if(0x0==_0x3f53dc[_0x2e3f06]['distance'])continue;const _0x59c9f2=_0x3f53dc[_0x2e3f06]['item'];_0x65b56['isBlock'](_0x59c9f2)||_0x65b56['isLimit'](_0x59c9f2)||(_0x3f53dc[_0x2e3f06]['isAdded']&&delete _0x3f53dc[_0x2e3f06]['isAdded'],_0x3f53dc[_0x2e3f06]['isAddSuggestion']&&delete _0x3f53dc[_0x2e3f06]['isAddSuggestion'],_0x3f53dc[_0x2e3f06]['isRemoveSuggestion']&&delete _0x3f53dc[_0x2e3f06]['isRemoveSuggestion'],_0x3f53dc[_0x2e3f06]['isRemoved']&&(_0x3f53dc[_0x2e3f06]['isIncorrect']=!0x0));}return _0x3f53dc['filter'](_0x1fcdd6=>!_0x1fcdd6['isIncorrect']);}['_makeModelFromTape'](_0x35c40e,_0x402aa0,_0x123283){const _0x3918bc=new _0x17d82d(),_0x138bc9=[],_0x1d1be9=new Map(),_0x30f8ba=this['editor']['model'],_0x14ebf5=_0x30f8ba['schema'],_0x352961=[_0x3918bc],_0x367968={},_0x1d8abf={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x34a04b=null;const _0x3d1c0c=[0x0];for(let _0x2f7faa=0x0;_0x2f7faa<_0x35c40e['length'];_0x2f7faa++)if('elementStart'===_0x35c40e[_0x2f7faa]['type']){_0x35c40e[_0x2f7faa]['previousPosition']=_0x30f8ba['createPositionFromPath'](_0x3918bc,_0x3d1c0c);const _0x83f8fb=new _0x414f80(_0x35c40e[_0x2f7faa]['item']['name'],_0x35c40e[_0x2f7faa]['item']['getAttributes']());_0x352961[0x0]['_appendChild'](_0x83f8fb),_0x3d1c0c['push'](0x0),_0x352961['unshift'](_0x83f8fb),_0x35c40e[_0x2f7faa]['nextPosition']=_0x30f8ba['createPositionFromPath'](_0x3918bc,_0x3d1c0c);}else'elementEnd'===_0x35c40e[_0x2f7faa]['type']?(_0x352961['shift'](),_0x35c40e[_0x2f7faa]['previousPosition']=_0x30f8ba['createPositionFromPath'](_0x3918bc,_0x3d1c0c),_0x3d1c0c['pop'](),_0x3d1c0c[_0x3d1c0c['length']-0x1]++,_0x35c40e[_0x2f7faa]['nextPosition']=_0x30f8ba['createPositionFromPath'](_0x3918bc,_0x3d1c0c)):(_0x35c40e[_0x2f7faa]['previousPosition']=_0x30f8ba['createPositionFromPath'](_0x3918bc,_0x3d1c0c),_0x34a04b?_0x34a04b['_data']+=_0x35c40e[_0x2f7faa]['item']['data']:_0x34a04b=new _0x43872a(_0x35c40e[_0x2f7faa]['item']['data'],_0x35c40e[_0x2f7faa]['item']['getAttributes']()),_0x35c40e[_0x2f7faa+0x1]&&'text'===_0x35c40e[_0x2f7faa+0x1]['type']&&_0x24d85c(_0x34a04b,_0x35c40e[_0x2f7faa+0x1]['item'])||(_0x352961[0x0]['_appendChild'](_0x34a04b),_0x34a04b=null),_0x3d1c0c[_0x3d1c0c['length']-0x1]+=_0x35c40e[_0x2f7faa]['item']['offsetSize'],_0x35c40e[_0x2f7faa]['nextPosition']=_0x30f8ba['createPositionFromPath'](_0x3918bc,_0x3d1c0c));for(let _0x4318df=0x0;_0x4318df<_0x35c40e['length'];_0x4318df++){const _0x446064=_0x35c40e[_0x4318df]['previousPosition'],_0x146c5=_0x35c40e[_0x4318df]['nextPosition'];for(const _0x1da318 of _0x35c40e[_0x4318df]['markersStart'])_0x1d1be9['set'](_0x1da318,{'start':_0x446064,'end':null});_0x5a077f('isRemoveSuggestion',_0x4318df,_0x446064,_0x146c5),_0x5a077f('isAddSuggestion',_0x4318df,_0x446064,_0x146c5),_0x5a077f('isRemoved',_0x4318df,_0x446064,_0x146c5),_0x5a077f('isAdded',_0x4318df,_0x446064,_0x146c5);for(const _0x213d91 of _0x35c40e[_0x4318df]['markersEnd']){const _0x3b3c3a=_0x1d1be9['get'](_0x213d91);_0x3b3c3a?_0x3b3c3a['end']=_0x146c5:_0x1d1be9['set'](_0x213d91,{'start':_0x146c5,'end':_0x146c5});}}for(const [_0x419e6c,_0x3d502a]of _0x1d1be9){const _0x25bfab=this['editor']['model']['createRange'](_0x3d502a['start'],_0x3d502a['end']);_0x3918bc['markers']['set'](_0x419e6c,_0x25bfab);}return _0x138bc9['sort']((_0x5c8775,_0x1e322b)=>{const _0x50cd9c=_0x3918bc['markers']['get']('revision:'+_0x5c8775['id']),_0x239e45=_0x3918bc['markers']['get']('revision:'+_0x1e322b['id']);return _0x50cd9c['start']['isBefore'](_0x239e45['start'])?-0x1:_0x50cd9c['start']['isAfter'](_0x239e45['start'])?0x1:_0x50cd9c['end']['isBefore'](_0x239e45['end'])?-0x1:_0x50cd9c['end']['isAfter'](_0x239e45['end'])?0x1:'add'===_0x5c8775['type']?-0x1:0x1;}),{'root':_0x3918bc,'changes':_0x138bc9};function _0x5a077f(_0x30be63,_0x13bf3c,_0x34bb58,_0x1d4b82){const _0x9443c7=!!_0x35c40e[_0x13bf3c][_0x30be63],_0x294add=_0x9443c7?_0x35c40e[_0x13bf3c][_0x30be63]['userId']:null,_0xa6dca5=_0x13bf3c===_0x35c40e['length']-0x1,_0x3e0e6f=_0x1d8abf[_0x30be63][0x0],_0x4e1e0f=_0x14ebf5['isObject'](_0x35c40e[_0x13bf3c]['item']);!_0x367968[_0x30be63]&&_0x9443c7?_0x367968[_0x30be63]={'start':_0x34bb58,'tapeItem':_0x35c40e[_0x13bf3c],'userId':_0x294add,'type':_0x30be63}:_0x367968[_0x30be63]&&!_0x9443c7?(_0x367968[_0x30be63]['end']=_0x34bb58,_0x5694ef(_0x367968[_0x30be63]),_0x367968[_0x30be63]=null):_0x367968[_0x30be63]&&_0x9443c7&&_0x367968[_0x30be63]['userId']!==_0x294add&&(_0x367968[_0x30be63]['end']=_0x34bb58,_0x3e0e6f&&_0x3e0e6f['userId']===_0x367968[_0x30be63]['userId']||_0x5694ef(_0x367968[_0x30be63]),_0x367968[_0x30be63]={'start':_0x34bb58,'tapeItem':_0x35c40e[_0x13bf3c],'userId':_0x294add,'type':_0x30be63}),_0x367968[_0x30be63]&&_0x4e1e0f&&('elementStart'!==_0x35c40e[_0x13bf3c]['type']||_0x3e0e6f&&_0x3e0e6f['userId']===_0x294add||_0x1d8abf[_0x30be63]['unshift']({'userId':_0x294add,'object':_0x35c40e[_0x13bf3c]['item'],'change':_0x367968[_0x30be63]}),'elementEnd'===_0x35c40e[_0x13bf3c]['type']&&_0x3e0e6f&&_0x3e0e6f['object']===_0x35c40e[_0x13bf3c]['item']&&(_0x1d8abf[_0x30be63]['shift'](),_0x367968[_0x30be63]=_0x3e0e6f['change'])),_0x367968[_0x30be63]&&_0xa6dca5&&(_0x367968[_0x30be63]['end']=_0x1d4b82,_0x5694ef(_0x367968[_0x30be63]),_0x367968[_0x30be63]=null);}function _0x5694ef({start:_0x1e9517,end:_0x2c5d43,tapeItem:_0x216b93,userId:_0x2a042b,type:_0xc608de}){const _0x9d58ae=_0x216b93['item'],_0x12cc33=_0x30f8ba['schema']['isBlock'](_0x9d58ae)&&!_0x30f8ba['schema']['isLimit'](_0x9d58ae),_0x279c62=_0x1e9517['nodeAfter']==_0x2c5d43['parent']&&_0x2c5d43['isAtStart'];if(_0x12cc33&&_0x279c62)return;const _0x5f270f=_0x30f8ba['createRange'](_0x1e9517,_0x2c5d43),_0x2bb4e3=_0x402aa0['get'](_0x2a042b),_0x5a1164=new G({'author':_0x2bb4e3,'type':'isAdded'==_0xc608de||'isAddSuggestion'==_0xc608de?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0xc608de||'isRemoveSuggestion'==_0xc608de},'createdAt':new Date(),'rootName':_0x123283});_0x138bc9['push'](_0x5a1164),_0x3918bc['markers']['set']('revision:'+_0x5a1164['id'],_0x5f270f);}function _0x24d85c(_0x4e5d6b,_0x456ef0){const _0x536463=_0x4e5d6b['getAttributes'](),_0x23f958=_0x456ef0['getAttributes']();for(const _0x4f9542 of _0x536463){if(_0x4f9542[0x1]!==_0x456ef0['getAttribute'](_0x4f9542[0x0]))return!0x1;_0x23f958['next']();}return _0x23f958['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x33bf1e=>{const _0x399750=_0x33bf1e['markerName']['split'](':')[0x1],_0xba96e6=this['_getChangeFromId'](_0x399750);if(!_0xba96e6)return null;const _0x331552='add'==_0xba96e6['type']?'insertion':'deletion',_0x327092=['ck-suggestion-marker','ck-suggestion-marker-'+_0x331552];return _0xba96e6['data']['isSuggestion']&&_0x327092['push']('ck-suggestion-marker-'+_0x331552+'-new'),this['activeChange']==_0xba96e6&&_0x327092['push']('ck-suggestion-marker--active'),{'classes':_0x327092,'attributes':{'data-change-id':_0x399750}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x598231=>{_0x598231['on']('element:pre',(_0x2632f0,_0x384998,_0x1bc497)=>{const _0x5a55bc=_0x384998['viewItem']['getChild'](0x0);if(!_0x5a55bc||!_0x5a55bc['is']('element','code'))return;if(!_0x1bc497['consumable']['consume'](_0x5a55bc,{'attributes':['vid_start','vid_end']}))return;const _0x2d7074=_0x384998['modelRange']['start']['nodeAfter'];_0x1bc497['writer']['setAttribute']('vid_start',_0x5a55bc['getAttribute']('vid_start'),_0x2d7074),_0x1bc497['writer']['setAttribute']('vid_end',_0x5a55bc['getAttribute']('vid_end'),_0x2d7074);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1bc520=>{_0x1bc520['on']('element',(_0x1482e6,_0x4aafdc,_0x1d1eb8)=>{if(!_0x1d1eb8['consumable']['consume'](_0x4aafdc['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4aafdc['modelRange']['isCollapsed'])return;const _0x2e2d59=_0x4aafdc['modelRange']['start']['nodeAfter'];_0x2e2d59['hasAttribute']('vid_start')||_0x2e2d59['hasAttribute']('vid')||(_0x1d1eb8['writer']['setAttribute']('vid_start',_0x4aafdc['viewItem']['getAttribute']('vid_start'),_0x2e2d59),_0x1d1eb8['writer']['setAttribute']('vid_end',_0x4aafdc['viewItem']['getAttribute']('vid_end'),_0x2e2d59));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x9c94dd=>_0x9c94dd['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0xf884de,[,_0x28600e])=>{['vid_start','vid_end','vid']['includes'](_0x28600e)&&(_0xf884de['return']=!0x0,_0xf884de['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3d0b0b=>{_0x3d0b0b['on']('attribute:vid',(_0x498c0e,_0x7ee4a4,_0x1fdfeb)=>{if('\x20'!=_0x7ee4a4['item']['data']||_0x7ee4a4['item']['parent']['maxOffset']>0x1)return;if(!_0x1fdfeb['consumable']['consume'](_0x7ee4a4['item'],_0x498c0e['name']))return;const _0xc0dcd2=_0x1fdfeb['writer'],_0x445ffd=_0x1fdfeb['mapper']['toViewRange'](_0x7ee4a4['range']);_0xc0dcd2['wrap'](_0x445ffd,_0xc0dcd2['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0xb3937d){const _0x33e2d0=_0xb3937d['plugins']['get']('RevisionViewer');return(_0x426b0f,_0x98ef89,_0x6ce3fe)=>{const _0x1a205d=_0x98ef89['markerName']['split'](':')[0x1],_0x42a0df=_0x33e2d0['_getChangeFromId'](_0x1a205d);if(!_0x42a0df)return null;const _0x5ef6ac='add'==_0x42a0df['type']?'split':'merge';if(!_0x6ce3fe['consumable']['test'](_0x98ef89['markerRange'],_0x426b0f['name']))return;const _0x5c3a3c=_0x98ef89['markerRange']['getWalker'](),_0x4e917b=_0x98ef89['markerRange']['start'],_0x4c4325=_0xb3937d['model']['schema'];let _0x472d9a=null,_0x4a4228=null,_0x5b7748=!0x1,_0x4d8dd1=!0x1;for(const _0x80af2f of _0x5c3a3c){const _0xa73b63=_0x80af2f['item'];_0x5b7748=_0x5b7748||_0x4c4325['isContent'](_0xa73b63);const _0x257e51=_0x6ce3fe['mapper']['toViewElement'](_0xa73b63);if(_0x257e51&&_0x257e51['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x80af2f['type']&&(_0x4c4325['isBlock'](_0xa73b63)&&!_0x4c4325['isLimit'](_0xa73b63)&&(_0xa73b63['nextSibling']||_0x4e917b['isAtEnd']?_0x472d9a&&_0x472d9a['parent']==_0xa73b63||(_0x472d9a=_0xa73b63,_0x1dfa4a(_0x80af2f['previousPosition']),_0x4d8dd1=!0x0):_0x4a4228=_0x4a4228||_0x80af2f['previousPosition']));}function _0x1dfa4a(_0x4086cf){const _0x4087aa=_0x6ce3fe['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5ef6ac}),_0x576f39=_0x6ce3fe['mapper']['toViewPosition'](_0x4086cf);_0x42a0df['data']['isSuggestion']&&_0x6ce3fe['writer']['addClass']('ck-suggestion-marker-'+_0x5ef6ac+'-new',_0x4087aa),_0x33e2d0['activeChange']==_0x42a0df&&_0x6ce3fe['writer']['addClass']('ck-suggestion-marker--active',_0x4087aa),_0x6ce3fe['writer']['insert'](_0x576f39,_0x4087aa),_0x6ce3fe['mapper']['bindElementToMarker'](_0x4087aa,_0x98ef89['markerName']);}_0x5b7748||_0x4d8dd1||!_0x4a4228||_0x1dfa4a(_0x4a4228);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1ed060,_0xe21418,_0x117a38)=>{const _0x1a8f25=_0x117a38['mapper']['markerNameToElements'](_0xe21418['markerName']);if(_0x1a8f25){for(const _0x338224 of _0x1a8f25)(_0x338224['hasClass']('ck-suggestion-marker-split')||_0x338224['hasClass']('ck-suggestion-marker-merge'))&&(_0x117a38['mapper']['unbindElementFromMarkerName'](_0x338224,_0xe21418['markerName']),_0x117a38['writer']['remove'](_0x338224));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0xe93622,_0x56c75e,_0xdf84a)=>{const _0x231882=_0x56c75e['markerName']['split'](':')[0x1],_0x5c5741=this['_getChangeFromId'](_0x231882);if(!_0x5c5741)return null;const _0x3dca0e='add'==_0x5c5741['type']?'split':'merge';if(_0xdf84a['consumable']['test'](_0x56c75e['markerRange'],_0xe93622['name']))for(const _0xbe3d95 of _0x56c75e['markerRange']['getItems']()){if(!_0xbe3d95['is']('element','softBreak'))continue;const _0x417829=_0xdf84a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3dca0e}),_0x3a9387=_0xdf84a['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0xbe3d95));_0x5c5741['data']['isSuggestion']&&_0xdf84a['writer']['addClass']('ck-suggestion-marker-'+_0x3dca0e+'-new',_0x417829),this['activeChange']==_0x5c5741&&_0xdf84a['writer']['addClass']('ck-suggestion-marker--active',_0x417829),_0xdf84a['writer']['insert'](_0x3a9387,_0x417829),_0xdf84a['mapper']['bindElementToMarker'](_0x417829,_0x56c75e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x5eb14d=>{for(const _0x682ce6 of this['editor']['model']['document']['getRootNames']()){const _0x5c4abc=this['editor']['model']['document']['getRoot'](_0x682ce6),_0x5bb18c=this['editor']['editing']['view']['document']['getRoot'](_0x682ce6);if(_0x5bb18c){const _0x636a2a=_0x5c4abc['getAttribute']('revisionHistoryAttachChange');if(_0x5eb14d['removeAttribute']('data-change-id',_0x5bb18c),_0x5eb14d['removeClass']('ck-revision-history-root-add',_0x5bb18c),_0x5eb14d['removeClass']('ck-revision-history-root-remove',_0x5bb18c),_0x5eb14d['removeClass']('ck-revision-history-root--active',_0x5bb18c),_0x636a2a){const _0x167d1e=this['_getChangeFromId'](_0x636a2a);if(!_0x167d1e)return null;_0x5eb14d['setAttribute']('data-change-id',_0x636a2a,_0x5bb18c),_0x5eb14d['addClass']('ck-revision-history-root-'+_0x167d1e['type'],_0x5bb18c),this['activeChange']==_0x167d1e&&_0x5eb14d['addClass']('ck-revision-history-root--active',_0x5bb18c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1431ad=>'revision-comment:'+_0x1431ad,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2d4970=>'revision-suggestion:'+_0x2d4970,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4c3dde=>({'name':'suggestion:'+_0x4c3dde,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x1eef6e=>{const _0x23954f=_0x1eef6e['markerName']['split'](':')[0x1];return'insertion'!=_0x23954f&&'deletion'!=_0x23954f?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x23954f]};}}),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',(_0x271a20,_0x515ad3,_0x338a4e)=>{const _0x43522a=_0x338a4e['mapper']['markerNameToElements'](_0x515ad3['markerName']);if(_0x43522a){for(const _0x3cd488 of _0x43522a)_0x3cd488['is']('uiElement')&&(_0x338a4e['mapper']['unbindElementFromMarkerName'](_0x3cd488,_0x515ad3['markerName']),_0x338a4e['writer']['remove'](_0x3cd488));}},{'priority':'high'});}['_getChangeFromId'](_0x360f70){return this['_changeIdToChange']['get'](_0x360f70);}['_getViewForChange'](_0x3cea8e){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x3cea8e),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4b6ad7,_0x119f70,_0xebd1fa,_0x18da88)=>{_0x18da88&&this['_balloon']['remove'](_0x18da88),_0xebd1fa&&(this['_balloon']['add']({'view':_0xebd1fa,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x252ab1=this['editor']['editing'],_0xdab0b1=this['_getChangeFromId'](_0xebd1fa['changeId']);let _0x33734f;if(_0xdab0b1['data']['isOnRoot']){const _0x44befa=_0x252ab1['view']['getDomRoot'](_0xdab0b1['rootName']);_0x33734f=Array['from'](_0x44befa['getClientRects']());}else{const _0x3f4990=this['editor']['model']['markers']['get']('revision:'+_0xebd1fa['changeId']);_0x33734f=Array['from'](_0x252ab1['mapper']['markerNameToElements'](_0x3f4990['name']))['map'](_0x5208c4=>_0x252ab1['view']['domConverter']['mapViewToDom'](_0x5208c4))['map'](_0x4b28e7=>Array['from'](_0x4b28e7['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x33734f[0x0];return _0x33734f['find'](_0x348af8=>_0x348af8['top']-0x3<=this['_activeViewTarget']['y']&&_0x348af8['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x348af8['left']-0x3<=this['_activeViewTarget']['x']&&_0x348af8['right']+0x3>=this['_activeViewTarget']['x'])||_0x33734f[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x18aaa7,_0x13cd07,_0x389f98,_0x2dae20)=>{this['activeView']=_0x389f98?this['_getViewForChange'](_0x389f98):null,this['editor']['model']['change'](()=>{const _0x1cc22f=this['editor']['editing'];_0x2dae20&&(_0x2dae20['data']['isOnRoot']?_0x1cc22f['view']['change'](_0x4cb574=>{_0x4cb574['removeClass']('ck-revision-history-root--active',_0x1cc22f['view']['document']['getRoot'](_0x2dae20['rootName']));}):_0x1cc22f['reconvertMarker']('revision:'+_0x2dae20['id'])),_0x389f98&&(_0x389f98['data']['isOnRoot']?_0x1cc22f['view']['change'](_0x5cf833=>{_0x5cf833['addClass']('ck-revision-history-root--active',_0x1cc22f['view']['document']['getRoot'](_0x389f98['rootName']));}):_0x1cc22f['reconvertMarker']('revision:'+_0x389f98['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x27fcc4,_0x169d5b)=>{if(this['activeChange'])return;const _0x1590e0=this['_findChangeIdFromDomTarget'](_0x169d5b['target']),_0x1f5ce1=this['_changeIdToChange']['get'](_0x1590e0);_0x1f5ce1?(this['_activeViewTarget']={'x':_0x169d5b['domEvent']['x'],'y':_0x169d5b['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1f5ce1)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0xf4fdb7,_0x102b58)=>{const _0x695899=this['_findChangeIdFromDomTarget'](_0x102b58['target']),_0x5cfd5b=this['_changeIdToChange']['get'](_0x695899);_0x5cfd5b?(this['_activeViewTarget']={'x':_0x102b58['domEvent']['x'],'y':_0x102b58['domEvent']['y']},_0x5cfd5b===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x5cfd5b):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x330aed){do{const _0x185fd5=_0x330aed['getAttribute']('data-change-id');if(_0x185fd5)return _0x185fd5;_0x330aed=_0x330aed['parent'];}while(_0x330aed);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x23aeb2=>{for(const _0x36d446 of this['editor']['model']['markers'])_0x23aeb2['removeMarker'](_0x36d446);});}}function Q(_0x1b8046,_0x3e6aaa){return(_0x8561cb,_0x267ca6,_0x35c694)=>{if(!_0x35c694['consumable']['test'](_0x267ca6['markerRange'],_0x8561cb['name']))return;const _0x2e49f1=_0x267ca6['markerRange']['getWalker'](),_0x4a8c62=_0x267ca6['markerRange']['start'],_0x1386b9=_0x1b8046['model']['schema'];let _0x4c09d2=null,_0x353b60=null,_0x539a22=!0x1,_0x4c7f8b=!0x1;for(const _0x3cd080 of _0x2e49f1){const _0x569fc7=_0x3cd080['item'];_0x539a22=_0x539a22||_0x1386b9['isContent'](_0x569fc7);const _0xa0a10d=_0x35c694['mapper']['toViewElement'](_0x569fc7);if(_0xa0a10d&&_0xa0a10d['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3cd080['type']&&(_0x1386b9['isBlock'](_0x569fc7)&&!_0x1386b9['isLimit'](_0x569fc7)&&(_0x569fc7['nextSibling']||_0x4a8c62['isAtEnd']?_0x4c09d2&&_0x4c09d2['parent']==_0x569fc7||(_0x4c09d2=_0x569fc7,_0x4261d0(_0x3cd080['previousPosition']),_0x4c7f8b=!0x0):_0x353b60=_0x353b60||_0x3cd080['previousPosition']));}function _0x4261d0(_0x1847bc){const _0x312bf4=_0x35c694['mapper']['toViewPosition'](_0x1847bc),_0x30954e=_0x35c694['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x3e6aaa});_0x35c694['writer']['insert'](_0x312bf4,_0x30954e),_0x35c694['mapper']['bindElementToMarker'](_0x30954e,_0x267ca6['markerName']);}_0x539a22||_0x4c7f8b||!_0x353b60||_0x4261d0(_0x353b60);};}class nt extends _0x47ee06{constructor(_0x28d506){super(_0x28d506);const _0x2cd7c8=_0x28d506['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x2cd7c8,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2cd7c8,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x434bd8=this['editor'],_0x4935f4=_0x434bd8['plugins']['get'](u),_0x54062b=_0x4935f4['isReady']?_0x4935f4['diff']['newRevisionId']:null;_0x434bd8['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x54062b);}['refresh'](){const {isReady:_0x5048cf,isEnabled:_0x1608de,repository:_0x3f916b,diff:_0x10a917}=this['editor']['plugins']['get'](u),_0xbd5bbb=_0x10a917&&_0x3f916b['getLaterVisibleRevision'](_0x10a917['newRevisionId']);this['isEnabled']=_0x5048cf&&_0x1608de&&Boolean(_0xbd5bbb);}}class rt extends _0x47ee06{['_step'];constructor(_0x26aed2,{direction:_0xa69183}){super(_0x26aed2);const _0x4d064d=_0x26aed2['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0xa69183?0x1:-0x1,this['listenTo'](_0x4d064d,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4d064d,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x4d064d,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x2dc34a=this['editor'],_0x2f9fbc=_0x2dc34a['plugins']['get'](u),{isNavigationMode:_0x3cd93c,currentChangeNumber:_0x7560d1}=_0x2f9fbc;let _0x11f3da;if(_0x2f9fbc['activeChange']=_0x3cd93c?_0x2f9fbc['diff']['changes']['get'](_0x7560d1+this['_step']):_0x2f9fbc['diff']['changes']['first'],_0x2f9fbc['activeChange']['data']['isOnRoot'])_0x11f3da=_0x2dc34a['editing']['view']['getDomRoot'](_0x2f9fbc['activeChange']['rootName']);else{const _0x8353d9=_0x2dc34a['model']['markers']['get']('revision:'+_0x2f9fbc['activeChange']['id']);_0x11f3da=_0x2df2e1(_0x2dc34a['editing'],_0x8353d9);}_0x5a4bb8({'target':_0x11f3da,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x107042,currentChangeNumber:_0x5201fb,numberOfChanges:_0x6359b5,isReady:_0x1ee24c,isEnabled:_0x449add}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x449add&&_0x1ee24c&&_0x6359b5)&&(!_0x107042||(0x1===this['_step']?_0x5201fb<_0x6359b5-0x1:_0x5201fb>0x0));}}class Ri extends _0x2f1156{constructor(_0x31a011){super(_0x31a011);const _0x30c996=this['bindTemplate'],_0x4d3afa=new _0x2a3404(_0x31a011),_0x1a19fa=new _0x2a3404(_0x31a011);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',(_0x17e3c6,_0x194ba8)=>_0x17e3c6&&_0x194ba8>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x59a585,_0x4426ee,_0x4295db,_0xda14f9)=>{if(!_0x59a585)return m(_0x31a011,'Loading...');if(!_0x4295db)return m(_0x31a011,'No\x20changes');const _0x4f7f5c=m(_0x31a011,'NUMBER_OF_CHANGES',_0x4295db);return _0xda14f9?m(_0x31a011,'X_OF_Y_CHANGES',[_0x4426ee+0x1,_0x4295db]):_0x4f7f5c;}),_0x4d3afa['set']({'label':m(_0x31a011,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x5e2a43}),_0x1a19fa['set']({'label':m(_0x31a011,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x246235}),_0x4d3afa['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1a19fa['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x4d3afa['on']('execute',()=>this['fire']('execute','backward')),_0x1a19fa['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',_0x30c996['if']('_isStatusLabelVisible','ck-hidden',_0x3c5c87=>!_0x3c5c87)]},'children':[{'text':_0x30c996['to']('isNavigationMode',_0x163dbd=>_0x163dbd?m(_0x31a011,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x31a011,'Total')+':\x20')}]},{'text':_0x30c996['to']('_statusText')}]},new _0x1e46a8(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x4d3afa,_0x1a19fa]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x398bff{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x3b9ef6=this['editor']['editing']['view'];_0x3b9ef6['change'](_0x3cea98=>{for(const _0x45e883 of _0x3b9ef6['document']['roots'])_0x3cea98['addClass'](ge,_0x45e883);});}['hide'](){const _0x30fd24=this['editor']['editing']['view'];_0x30fd24['change'](_0x3c9fee=>{for(const _0x519778 of _0x30fd24['document']['roots'])_0x3c9fee['removeClass'](ge,_0x519778);});}}class v extends _0x398bff{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,ji];}['init'](){const _0x3550e7=this['editor'],_0x1750ba=_0x3550e7['plugins']['get'](u),_0xb51834=_0x3550e7['plugins']['get'](ji);_0x3550e7['ui']['componentFactory']['add']('exitToEditing',_0x4fb83d=>{const _0x24f132=new _0x2a3404(_0x4fb83d);return _0x24f132['set']({'label':m(_0x4fb83d,'Back\x20to\x20editing'),'icon':_0x32d8bf,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x24f132,'execute',()=>{_0x3550e7['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x24f132;}),_0x3550e7['ui']['componentFactory']['add']('restoreRevision',_0x495ebb=>{const _0x257699=new _0x2a3404(_0x495ebb);return _0x257699['set']({'label':m(_0x495ebb,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x257699['bind']('isEnabled')['to'](_0x3550e7['commands']['get']('restoreRevision')),this['listenTo'](_0x257699,'execute',()=>_0x3550e7['execute']('restoreRevision')),_0x257699;}),_0x3550e7['ui']['componentFactory']['add']('changesNavigation',_0x174026=>{const _0x2aa6fd=new Ri(_0x174026),_0x15087d=_0x3550e7['commands']['get']('showPreviousChange'),_0x48ce96=_0x3550e7['commands']['get']('showNextChange');return _0x2aa6fd['bind']('isBackwardNavigationEnabled')['to'](_0x15087d,'isEnabled'),_0x2aa6fd['bind']('isForwardNavigationEnabled')['to'](_0x48ce96,'isEnabled'),_0x2aa6fd['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x1750ba),this['listenTo'](_0x2aa6fd,'execute',(_0x9dc7a4,_0x1743d1)=>{_0x3550e7['execute']('forward'===_0x1743d1?'showNextChange':'showPreviousChange');}),_0x2aa6fd;}),_0xb51834['show'](),_0x1750ba['on']('change:isReady',(_0x2b4aad,_0x1075f1,_0x3d4828)=>{_0x3d4828?_0xb51834['hide']():_0xb51834['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x3591ad,_0xf8ec3b){super(_0x3591ad,_0xf8ec3b);const _0xc623c3=this['bindTemplate'];this['set']({'label':m(_0x3591ad,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x3591ad,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0xc623c3['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 _0x24d1ca=this['fieldView']['element'];this['_tooltipString']=_0x24d1ca['scrollWidth']>_0x24d1ca['clientWidth']&&_0x24d1ca['value']||'';}}class ni extends _0x2f1156{constructor(_0x297fd5,_0x56b110,_0x25cedd){super(_0x297fd5);const _0x4fb8d1=new _0x2c914d();_0x4fb8d1['set']({'content':_0x54d66b,'viewBox':'0\x200\x2011\x2010'});const _0x988f4b=['ck','ck-revision-history-sidebar__revision-author'];_0x25cedd&&_0x988f4b['push']('ck-revision-history-sidebar__revision-author_creator');const _0x35a7e3=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x297fd5,_0x25cedd?'Revision\x20creator':'Revision\x20author')},'children':[_0x4fb8d1,_0x56b110['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x988f4b},'children':_0x35a7e3});}}function ai(_0x26e63f,_0x5cf68e){const _0x14ee4c=_0x26e63f['bindTemplate'],_0x20f42a=_0x26e63f['locale'],_0x17e42c=_0x38d819(_0x20f42a);_0x17e42c['panelPosition']='sw';const _0x281f3d=function(_0x14a706,_0x1a9890){const _0x579fd2=function(_0x3f17ad,_0x2681e3){const _0x3ff247=_0x3f17ad['locale'],_0x2a1032={'Compare\x20against\x20selected':m(_0x3ff247,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x3ff247,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x3ff247,'Restore\x20this\x20revision')};return _0x2681e3['map'](_0x288a6f=>{const _0x143f26=_0x2a1032[_0x288a6f['name']];return _0x143f26&&_0x143f26!==_0x288a6f['name']&&(_0x288a6f['name']=_0x143f26),_0x288a6f;});}(_0x14a706,_0x1a9890),_0x277ced=new _0x2c62fe();for(const _0xf8ddbc of _0x579fd2){const _0xd874fe={'type':'button','model':new to({'label':_0xf8ddbc['name'],'class':_0xf8ddbc['class'],'withText':!0x0,'role':'menuitem','_action':_0xf8ddbc['action']})};_0xd874fe['model']['bind']('isEnabled')['to'](_0x14a706,'isActionsDropdownOpen',_0x15e518=>'function'!=typeof _0xf8ddbc['isEnabled']||(!_0x15e518||_0xf8ddbc['isEnabled'](_0x14a706))),_0x277ced['add'](_0xd874fe);}return _0x277ced;}(_0x26e63f,_0x5cf68e);return _0x26e63f['bind']('isActionsDropdownOpen')['to'](_0x17e42c,'isOpen'),_0x17e42c['buttonView']['set']({'label':m(_0x20f42a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3e413e}),_0x17e42c['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x14ee4c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x14ee4c['to'](_0xb7791b=>_0xb7791b['stopPropagation']())}}),_0x17e42c['on']('execute',_0xe26536=>{_0x26e63f['isReady']&&'function'==typeof _0xe26536['source']['_action']&&_0xe26536['source']['_action'](_0x26e63f);}),_0x5d80dd(_0x17e42c,_0x281f3d,{'role':'menu'}),_0x17e42c['listenTo'](_0x26e63f,'change:isActionsDropdownOpen',(_0xb9020f,_0x51e215,_0x2aa399)=>{if(_0x2aa399)for(const _0x3425a0 of _0x17e42c['listView']['items']){const _0x2d5cb2=_0x3425a0['children']['first'],_0x1a6db4=_0x5cf68e['find'](_0x26e46c=>_0x26e46c['action']===_0x2d5cb2['_action'])['isVisible'];_0x3425a0['isVisible']=void 0x0===_0x1a6db4||_0x1a6db4(_0x26e63f);}}),_0x17e42c;}class _i extends/* #__PURE__ -- @preserve */
27
- _0x43461d(_0x2f1156){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x56165c,_0x1ff388,_0x18cbe6,_0x1715ca){super(_0x56165c);const _0x1509f9=this['bindTemplate'],_0x31820c=function(_0x2f6a14,_0x54f0d7){const _0x31ac8a=Array['from'](_0x54f0d7['authors'])['filter'](_0x583b2d=>_0x583b2d!=_0x54f0d7['creator']);return _0x54f0d7['creator']&&_0x31ac8a['unshift'](_0x54f0d7['creator']),_0x31ac8a['map'](_0x5f0dc3=>new ni(_0x2f6a14,_0x5f0dc3,_0x5f0dc3==_0x54f0d7['creator']));}(_0x56165c,_0x1ff388);this['id']=_0x1ff388['id'],this['_revision']=_0x1ff388,this['_requireRevisionName']=_0x1715ca,this['bind']('name','createdAt')['to'](_0x1ff388),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x119d14=>{return _0x1c2dc2=_0x56165c['uiLanguage'],(_0x393e39=_0x119d14)['toLocaleDateString'](_0x1c2dc2,{'month':'long','day':'numeric'})+',\x20'+_0x393e39['toLocaleTimeString'](_0x1c2dc2,{'hour':'numeric','minute':'numeric'});var _0x1c2dc2,_0x393e39;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x56165c,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x5ee405=>_0x5ee405||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x22f485,_0x4b1e91)=>_0x22f485&&_0x4b1e91),this['revisionActionsView']=_0x18cbe6&&_0x18cbe6['length']?ai(this,_0x18cbe6):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x1509f9['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x1509f9['if']('isEnabled','ck-disabled',_0x423d2e=>!_0x423d2e),_0x1509f9['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x1509f9['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x1509f9['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':_0x1509f9['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':_0x31820c}]},this['revisionActionsView']],'on':{'click':_0x1509f9['to'](_0x188b2f=>{_0x188b2f['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0xef97eb=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0xef97eb,'change',()=>{this['_requireRevisionName']&&!_0xef97eb['value']||this['fire']('setName',{'id':this['id'],'name':_0xef97eb['value']}),_0xef97eb['value']||(_0xef97eb['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function li(_0x66fa11,_0x3ceb98){const _0x16a751=_0x81b4d8['fromJSDate'](_0x66fa11)['setLocale'](_0x3ceb98),_0x3fb6a8=_0x81b4d8['local'](),_0x2096a4=_0x3fb6a8['minus']({'days':0x1})['startOf']('day');let _0x5615d1,_0xe3faab;return _0x16a751['hasSame'](_0x3fb6a8,'day')?(_0x5615d1=_0x16a751['startOf']('day')['toJSDate'](),_0xe3faab=_0x16a751['toRelativeCalendar']()):_0x16a751['hasSame'](_0x2096a4,'day')?(_0x5615d1=_0x2096a4['toJSDate'](),_0xe3faab=_0x16a751['toRelativeCalendar']()):_0x16a751['hasSame'](_0x3fb6a8,'week')?(_0x5615d1=_0x16a751['startOf']('week')['toJSDate'](),_0xe3faab=_0x16a751['weekdayLong']||''):_0x16a751['hasSame'](_0x3fb6a8,'year')?(_0x5615d1=_0x16a751['startOf']('month')['toJSDate'](),_0xe3faab=_0x16a751['monthLong']||''):(_0x5615d1=_0x16a751['startOf']('year')['toJSDate'](),_0xe3faab=String(_0x16a751['year'])),{'startDate':_0x5615d1,'localizedPeriodName':_0xe3faab};}class bi extends _0x2f1156{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1cae99,_0x2197b8,_0x4007f1,_0x2860ec){super(_0x1cae99);const _0x1c51a6=li(_0x2197b8,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x2197b8,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4007f1,this['_requireRevisionName']=_0x2860ec,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':_0x1c51a6}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x326abb){const _0x206cfc=new _i(this['locale'],_0x326abb,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x206cfc);}['removeRevision'](_0x4ef8b7){const _0x436c3d=this['revisionViews']['find'](_0x3eff35=>_0x3eff35['id']===_0x4ef8b7['id']);this['revisionViews']['remove'](_0x436c3d);}}class fi extends _0x2f1156{constructor(_0x4f19e8){super(_0x4f19e8);const _0x15c4c5=new _0x2c914d();_0x15c4c5['content']=_0x31e609,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x15c4c5,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x4f19e8,'Revision\x20history')]}]});}}class di extends _0x2f1156{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1c5f43,_0x123f25,_0x328bf3,_0x419845){super(_0x1c5f43);const _0x20f8df=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x123f25,this['_revisionActions']=_0x328bf3,this['_requireRevisionName']=_0x419845,this['on']('select',(_0x3c84d3,_0x547403)=>{this['fire']('revisionSelected',_0x547403);}),this['on']('setName',(_0xec19ef,_0x2b6ec8)=>{this['fire']('revisionSetName',_0x2b6ec8);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new fi(_0x1c5f43),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x20f8df['if']('isEnabled','ck-disabled',_0x44f795=>!_0x44f795)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0xb03c42 of this['_revisions'])this['_addRevision'](_0xb03c42);this['_revisions']['on']('add',(_0x42becc,_0x3872e7)=>{this['_addRevision'](_0x3872e7);}),this['_revisions']['on']('remove',(_0x38ef1a,_0xd998ab)=>{this['_removeRevision'](_0xd998ab);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2218d0=>_0x2218d0['revisionViews']['map'](_0x1b9352=>_0x1b9352))['flat']();}['selectRevision'](_0x434b92){for(const _0x1e59b3 of this['revisionViews'])_0x434b92&&_0x434b92['id']===_0x1e59b3['id']?_0x1e59b3['select']():_0x1e59b3['deselect']();}['highlightRevisions'](_0x56c7d1){for(const _0x32498c of this['revisionViews'])_0x56c7d1['some'](({id:_0x53180c})=>_0x53180c===_0x32498c['id'])?_0x32498c['highlight']():_0x32498c['unhighlight']();}['_addRevision'](_0x22baed){const _0x54a19c=li(_0x22baed['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x323e0b=this['timePeriodViews']['get'](0x0);_0x323e0b&&_0x323e0b['startDate']['getTime']()===_0x54a19c['getTime']()||(_0x323e0b=new bi(this['locale'],_0x54a19c,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x323e0b)),_0x323e0b['addRevision'](_0x22baed);}['_removeRevision'](_0x56e60d){const _0x186429=li(_0x56e60d['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x186429)['removeRevision'](_0x56e60d);}['_getTimePeriodViewByStartDate'](_0x5f01b0){return this['timePeriodViews']['find'](_0x22e0c9=>_0x22e0c9['startDate']['getTime']()===_0x5f01b0['getTime']());}}class d extends _0x398bff{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0xd36abb,uid as _0x422234,Collection as _0xb670b4,logWarning as _0x4d0460,FocusTracker as _0x5e9135,KeystrokeHandler as _0x2dfea2,scrollViewportToShowTarget as _0x2ef4fe,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x2c2824}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x4dcfba,set as _0xb5caca,unset as _0x490285,isEqual as _0x284f8e}from'es-toolkit/compat';import{Plugin as _0x2a9b7d,PendingActions as _0x153c11,Command as _0x30167c,ElementApiMixin as _0x25ed20,Editor as _0x3f7344}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x58b4bf,getMarkerDomElement as _0x17a5a7,ConfirmMixin as _0x2a2f44,sanitizeEditorConfig as _0x23fc3b}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x4e0505,ViewAttributeElement as _0x2743c8,ViewEmptyElement as _0x23abf1,ViewRawElement as _0x4ccddb,ViewUIElement as _0x3ec531,ViewDocumentFragment as _0x50d104,ViewText as _0x5a4e35,ViewElement as _0x2c11d4,ModelElement as _0x514734,ModelRange as _0xd9fa25,ModelPosition as _0x5dfb54,ModelDocumentFragment as _0x4acc47,ModelText as _0x299020}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x1c8430,IconChevronUp as _0x158305,IconChevronDown as _0x921695,IconUndo as _0x1bee30,IconUser as _0x81b85e,IconThreeVerticalDots as _0x187a75}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x3e4178,View as _0x2fbdbb,submitHandler as _0x509542,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x255985,ListView as _0x22e049,ListItemView as _0x57cc36,ButtonView as _0x4eab8d,MenuBarMenuView as _0x1f9121,MenuBarMenuListView as _0x27fd85,MenuBarMenuListItemView as _0x3b1214,MenuBarMenuListItemButtonView as _0x1c5f84,ContextualBalloon as _0x5348c1,ToolbarSeparatorView as _0x5b896a,IconView as _0x11835d,addListToDropdown as _0x3e03fc,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x365cb2,StickyPanelView as _0x4ad34d,ToolbarView as _0x532d93,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x5c8801}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0xd36abb(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x47d55c){super(),this['id']=_0x47d55c['id']||_0x422234(),this['creator']=_0x47d55c['creator']||null,this['authors']=_0x47d55c['authors']||[],this['diffData']=_0x47d55c['diffData']||null,this['toVersion']=_0x47d55c['toVersion']||0x0,this['fromVersion']=_0x47d55c['fromVersion']||0x0,this['set']('name',_0x47d55c['name']||''),this['set']('createdAt',_0x47d55c['createdAt']||new Date()),this['set']('attributes',_0x47d55c['attributes']||{});}['setName'](_0x1bd233){this['_update']({'name':_0x1bd233});}['setAttribute'](_0x315803,_0x24d50e){const _0x59209f=_0x4dcfba(this['attributes']);_0xb5caca(_0x59209f,_0x315803,_0x24d50e),this['_update']({'attributes':_0x59209f});}['removeAttribute'](_0x4ba287){const _0x23c359=_0x4dcfba(this['attributes']);_0x490285(_0x23c359,_0x4ba287),this['_update']({'attributes':_0x23c359});}['_update'](_0x58682c,_0x37d366=!0x1){let _0x48526=!0x1;const _0x9a0011={'id':this['id']},_0x5e979b=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x136ba8 of _0x5e979b){const _0x45b53f=_0x58682c[_0x136ba8];void 0x0!==_0x45b53f&&_0x45b53f!==this[_0x136ba8]&&(this[_0x136ba8]=_0x45b53f,_0x9a0011[_0x136ba8]=_0x45b53f,_0x48526=!0x0);}_0x48526&&(_0x9a0011['authors']&&(_0x9a0011['authorsIds']=_0x9a0011['authors']['map'](_0xf8c8bd=>_0xf8c8bd['id']),delete _0x9a0011['authors']),this['fire']('_update',_0x9a0011,_0x37d366));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x395d54=>_0x395d54['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x2a9b7d{['_revisions'];static get['requires'](){return[_0x58b4bf];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x49bbe4){super(_0x49bbe4),this['_revisions']=new _0xb670b4();}['afterInit'](){!async function(_0x17dcde){const _0x1b4a47=_0x558d81([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]),_0x46b3a6=0xeb829,_0x47b947=0x7374585f,_0x4fd353=0x73732e4f^_0x47b947,_0x4fe0c1=window[_0x558d81([0x44,0x61,0x74,0x65])][_0x558d81([0x6e,0x6f,0x77])](),_0x2984d9=_0x17dcde[_0x558d81([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x306aa3=new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a8f28=>{_0x2984d9[_0x558d81([0x6f,0x6e,0x63,0x65])](_0x558d81([0x72,0x65,0x61,0x64,0x79]),_0x2a8f28);}),_0x18b374={[_0x558d81([0x6b,0x74,0x79])]:_0x558d81([0x45,0x43]),[_0x558d81([0x75,0x73,0x65])]:_0x558d81([0x73,0x69,0x67]),[_0x558d81([0x63,0x72,0x76])]:_0x558d81([0x50,0x2d,0x32,0x35,0x36]),[_0x558d81([0x78])]:_0x558d81([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]),[_0x558d81([0x79])]:_0x558d81([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]),[_0x558d81([0x61,0x6c,0x67])]:_0x558d81([0x45,0x53,0x32,0x35,0x36])},_0xda363=_0x2984d9[_0x558d81([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x558d81([0x67,0x65,0x74])](_0x558d81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x577e78(){let _0x190b7f,_0x154cab=null,_0x36cb4c=null;try{if(_0xda363==_0x558d81([0x47,0x50,0x4c]))return _0x558d81([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x190b7f=_0x3f9035(),!_0x190b7f)return _0x558d81([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x190b7f[_0x558d81([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x36cb4c=_0xc3d6d5(_0x190b7f[_0x558d81([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x190b7f[_0x558d81([0x6a,0x74,0x69])])),await _0x4a3944()?_0x18c4c0()?_0x428b0f()?_0x558d81([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5221b7()?(_0x190b7f[_0x558d81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x558d81([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x154cab=_0x580564(_0x558d81([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x190b7f[_0x558d81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x558d81([0x74,0x72,0x69,0x61,0x6c])&&(_0x154cab=_0x580564(_0x558d81([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x35219b()):_0x558d81([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x558d81([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x558d81([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x558d81([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x428b0f(){const _0x4c6944=[_0x558d81([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x558d81([0x74,0x72,0x69,0x61,0x6c])][_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x190b7f[_0x558d81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4fe0c1/0x3e8:0xe10*_0x4fd353;return _0x190b7f[_0x558d81([0x65,0x78,0x70])]<_0x4c6944;}function _0x18c4c0(){const _0x4e1e1f=_0x190b7f[_0x558d81([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4e1e1f)return!0x1;if(_0x4e1e1f[_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x558d81([0x2a])))return!0x0;if(_0x4e1e1f[_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x558d81([0x52,0x48])))return!0x0;if(_0x4e1e1f[_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x558d81([0x52,0x52,0x48]))){if(_0x3d63b6())return!0x0;if(_0x57d9b0()||_0x41a01e())return!0x0;}return!0x1;}function _0x5221b7(){const _0x575031=_0x190b7f[_0x558d81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x575031||0x0==_0x575031[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x359655}=new URL(window[_0x558d81([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x575031[_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x359655))return!0x0;const _0x30718f=_0x359655[_0x558d81([0x73,0x70,0x6c,0x69,0x74])](_0x558d81([0x2e]));return _0x575031[_0x558d81([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x330ebe=>_0x330ebe[_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x558d81([0x2a])))[_0x558d81([0x6d,0x61,0x70])](_0x27cf97=>_0x27cf97[_0x558d81([0x73,0x70,0x6c,0x69,0x74])](_0x558d81([0x2e])))[_0x558d81([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x48bcfb=>_0x48bcfb[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x30718f[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x558d81([0x6d,0x61,0x70])](_0x37646f=>Array(_0x30718f[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x37646f[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x558d81([0x66,0x69,0x6c,0x6c])](_0x37646f[0x0]===_0x558d81([0x2a])?_0x558d81([0x2a]):'')[_0x558d81([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x37646f))[_0x558d81([0x73,0x6f,0x6d,0x65])](_0x50d97d=>_0x30718f[_0x558d81([0x65,0x76,0x65,0x72,0x79])]((_0x41a177,_0x3b3889)=>_0x50d97d[_0x3b3889]===_0x41a177||_0x50d97d[_0x3b3889]===_0x558d81([0x2a])));}function _0x35219b(){return _0x154cab&&_0x36cb4c?new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4b1516,_0x35e8fe)=>{_0x154cab[_0x558d81([0x74,0x68,0x65,0x6e])](_0x4b1516,_0x35e8fe),_0x36cb4c[_0x558d81([0x74,0x68,0x65,0x6e])](_0x253209=>{_0x253209!=_0x558d81([0x56,0x61,0x6c,0x69,0x64])&&_0x4b1516(_0x253209);},_0x35e8fe);}):_0x154cab||_0x36cb4c||_0x558d81([0x56,0x61,0x6c,0x69,0x64]);}}function _0xc3d6d5(_0x3ecac8,_0x4e2767){return new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1c84e2=>{if(_0x49f4c4())return _0x1c84e2(_0x558d81([0x56,0x61,0x6c,0x69,0x64]));_0x2bed61(),_0x2984d9[_0x558d81([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x558d81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x446f42=!0x1;const _0x53518c=_0x422234();function _0x3f2e23(_0x5ced54){return!!_0x5ced54&&(typeof _0x5ced54===_0x558d81([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5ced54===_0x558d81([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5ced54[_0x558d81([0x74,0x68,0x65,0x6e])]===_0x558d81([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5ced54[_0x558d81([0x63,0x61,0x74,0x63,0x68])]===_0x558d81([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xcc0f91(_0x570b74){_0x3b6383(_0x570b74)[_0x558d81([0x74,0x68,0x65,0x6e])](_0x5e7da2=>{if(!_0x5e7da2||_0x5e7da2[_0x558d81([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x558d81([0x6f,0x6b]))return _0x558d81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x19d290(_0x29110e(_0x53518c+_0x4e2767))!=_0x5e7da2[_0x558d81([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x558d81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x558d81([0x56,0x61,0x6c,0x69,0x64]);})[_0x558d81([0x74,0x68,0x65,0x6e])](_0x3e8a51=>(_0x493096(),_0x3e8a51),()=>{const _0x448b68=_0x2f6ed8();return null==_0x448b68?(_0x493096(),_0x558d81([0x56,0x61,0x6c,0x69,0x64])):_0x558d81(_0x4fe0c1-_0x448b68>(0x5778dc5f^_0x47b947)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x558d81([0x74,0x68,0x65,0x6e])](_0x1c84e2)[_0x558d81([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1c84e2(_0x558d81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5b4ead=0x7342b6df^_0x47b947;function _0x493096(){const _0x4fc0d4=_0x558d81([0x6c,0x6c,0x63,0x74,0x2d])+_0x19d290(_0x29110e(_0x3ecac8)),_0x39091c=_0x34fea2(_0x19d290(window[_0x558d81([0x4d,0x61,0x74,0x68])][_0x558d81([0x63,0x65,0x69,0x6c])](_0x4fe0c1/_0x5b4ead)));window[_0x558d81([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x558d81([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4fc0d4,_0x39091c);}function _0x2f6ed8(){const _0x20432c=_0x558d81([0x6c,0x6c,0x63,0x74,0x2d])+_0x19d290(_0x29110e(_0x3ecac8)),_0x14a1ab=window[_0x558d81([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x558d81([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x20432c);return _0x14a1ab?window[_0x558d81([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34fea2(_0x14a1ab),0x10)*_0x5b4ead:null;}function _0x3b6383(_0x49d309){return new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x47c63d,_0x540d6d)=>{_0x49d309[_0x558d81([0x74,0x68,0x65,0x6e])](_0x47c63d,_0x540d6d),window[_0x558d81([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x540d6d,0x73758c9f^_0x47b947);});}}_0x2984d9[_0x558d81([0x6f,0x6e])](_0x558d81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x586af2,_0x112c8c)=>{if(_0x112c8c[0x0]!=_0x3ecac8)return _0x1c84e2(_0x558d81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x112c8c[0x1]={..._0x112c8c[0x1],[_0x558d81([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x53518c};},{[_0x558d81([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x558d81([0x68,0x69,0x67,0x68])}),_0x2984d9[_0x558d81([0x6f,0x6e])](_0x558d81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xd41aa1=>{_0x3f2e23(_0xd41aa1[_0x558d81([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x446f42=!0x0,_0xcc0f91(_0xd41aa1[_0x558d81([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x558d81([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x558d81([0x6c,0x6f,0x77])}),_0x306aa3[_0x558d81([0x74,0x68,0x65,0x6e])](()=>{_0x446f42||_0x1c84e2(_0x558d81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x49f4c4(){return _0x2984d9[_0x558d81([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x558d81([0x76,0x69,0x65,0x77])][_0x558d81([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x558d81([0x61,0x75,0x74,0x6f]);}function _0x2bed61(){_0x2984d9[_0x558d81([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x558d81([0x76,0x69,0x65,0x77])][_0x558d81([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x558d81([0x61,0x75,0x74,0x6f]);}}function _0x580564(_0x150349){const _0x5537d6=[new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f07ee=>setTimeout(_0x1f07ee,0x737d6693^_0x47b947)),_0x306aa3[_0x558d81([0x74,0x68,0x65,0x6e])](()=>new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e1692=>{const _0xe7ef98=0x73745858^_0x47b947,_0x576144=_0x17dcde[_0x558d81([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x21042a(){_0x576144[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0xe7ef98&&_0x5e1692();}_0x21042a(),_0x576144[_0x558d81([0x6f,0x6e])](_0x558d81([0x61,0x64,0x64]),_0x21042a);})),new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5633dd=>{function _0x14b6a5(){for(const _0x3ae26b in window)if(window[_0x558d81([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x558d81([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x3ae26b))&&window[_0x3ae26b]==_0x46b3a6)return _0x5633dd();_0x2984d9[_0x558d81([0x73,0x74,0x61,0x74,0x65])]!=_0x558d81([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x558d81([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x14b6a5,0x73744bd7^_0x47b947);}_0x64e30d(_0x558d81([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x14b6a5();})];return window[_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x558d81([0x72,0x61,0x63,0x65])](_0x5537d6)[_0x558d81([0x74,0x68,0x65,0x6e])](()=>_0x150349);}async function _0x123b1d(){if(await _0x306aa3,_0x64e30d(_0x558d81([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x263f26=_0x17dcde[_0x558d81([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0xe591bd=_0x17dcde[_0x558d81([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])](_0x263f26[_0x558d81([0x69,0x64])]),_0x53bc7f=_0x31578b(_0x558d81([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x53bc7f[_0x558d81([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x263f26['id'],_0xe591bd?_0xe591bd['id']:null,!0x0),_0x53bc7f[_0x558d81([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x558d81([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x53bc7f[_0x558d81([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x53bc7f[_0x558d81([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x59c530,void(_0x53bc7f[_0x558d81([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x59c530);}if(_0x64e30d(_0x558d81([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x50aab0=_0x31578b(_0x558d81([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x50aab0[_0x558d81([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x558d81([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x50aab0[_0x558d81([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x50aab0[_0x558d81([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x59c530,_0x50aab0[_0x558d81([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x59c530;}_0x2984d9[_0x558d81([0x6d,0x6f,0x64,0x65,0x6c])][_0x558d81([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x59c530,_0x2984d9[_0x558d81([0x6d,0x6f,0x64,0x65,0x6c])][_0x558d81([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x59c530,_0x2984d9[_0x558d81([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x558d81([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3d63b6(){return _0x64e30d(_0x558d81([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x31578b(_0x558d81([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x558d81([0x73,0x74,0x61,0x74,0x65])]==_0x558d81([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x57d9b0(){return _0x64e30d(_0x558d81([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 _0x41a01e(){return _0x64e30d(_0x558d81([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x36cdf3(_0x1ed86c){const _0x3487ac=_0x7d8c4();_0x2984d9[_0x3487ac]=_0x558d81([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])+_0x1ed86c,_0x1ed86c[_0x558d81([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x558d81([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x7d8c4()]=_0x46b3a6),_0x1ed86c!=_0x558d81([0x56,0x61,0x6c,0x69,0x64])&&_0x123b1d();}function _0x7d8c4(){const _0x459bae=window[_0x558d81([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x558d81([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x558d81([0x6e,0x6f,0x77])]())[_0x558d81([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x558d81([0x2e]),'');let _0x47cd55=_0x558d81([0x73]);for(let _0x3ade41=0x0;_0x3ade41<_0x459bae[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3ade41+=0x2){let _0xdd4bc5=window[_0x558d81([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x459bae[_0x558d81([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3ade41,_0x3ade41+0x2));_0xdd4bc5>=_0x1b4a47[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xdd4bc5-=_0x1b4a47[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x47cd55+=_0x1b4a47[_0xdd4bc5];}return _0x47cd55;}function _0x3f9035(){const _0x5d0759=_0xda363[_0x558d81([0x73,0x70,0x6c,0x69,0x74])](_0x558d81([0x2e]));if(0x3!=_0x5d0759[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x193cc7(_0x5d0759[0x1]);function _0x193cc7(_0x3e02c8){const _0x193400=_0x1a1e3c(_0x3e02c8);return _0x193400&&_0x637223()?_0x193400:null;function _0x637223(){const _0x212bcb=_0x193400[_0x558d81([0x6a,0x74,0x69])],_0x3bc87f=window[_0x558d81([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x212bcb[_0x558d81([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x212bcb[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2dc90c={..._0x193400,[_0x558d81([0x6a,0x74,0x69])]:_0x212bcb[_0x558d81([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x212bcb[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2dc90c[_0x558d81([0x76,0x63])],_0x29110e(_0x2dc90c)==_0x3bc87f;}}}async function _0x4a3944(){let _0x22ba06=!0x0;try{const _0x1cefa4=_0xda363[_0x558d81([0x73,0x70,0x6c,0x69,0x74])](_0x558d81([0x2e])),[_0x31ec9f,_0x1e697a,_0x36a76c]=_0x1cefa4;return _0x1ae0b9(_0x31ec9f),await _0x46447c(_0x31ec9f,_0x1e697a,_0x36a76c),_0x22ba06;}catch{return!0x1;}function _0x1ae0b9(_0x5503de){const _0x399c77=_0x1a1e3c(_0x5503de);_0x399c77&&_0x399c77[_0x558d81([0x61,0x6c,0x67])]==_0x558d81([0x45,0x53,0x32,0x35,0x36])||(_0x22ba06=!0x1);}async function _0x46447c(_0x55810e,_0x3d4e3e,_0x5ae172){const _0x2704d7=window[_0x558d81([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x558d81([0x66,0x72,0x6f,0x6d])](_0x2faac4(_0x5ae172),_0x17ad7a=>_0x17ad7a[_0x558d81([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x45f8e2=new window[(_0x558d81([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x558d81([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x55810e+_0x558d81([0x2e])+_0x3d4e3e),_0xf6db1=window[_0x558d81([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x558d81([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xf6db1)return;const _0x463576=await _0xf6db1[_0x558d81([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x558d81([0x6a,0x77,0x6b]),_0x18b374,{[_0x558d81([0x6e,0x61,0x6d,0x65])]:_0x558d81([0x45,0x43,0x44,0x53,0x41]),[_0x558d81([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x558d81([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x558d81([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xf6db1[_0x558d81([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x558d81([0x6e,0x61,0x6d,0x65])]:_0x558d81([0x45,0x43,0x44,0x53,0x41]),[_0x558d81([0x68,0x61,0x73,0x68])]:{[_0x558d81([0x6e,0x61,0x6d,0x65])]:_0x558d81([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x463576,_0x2704d7,_0x45f8e2)||(_0x22ba06=!0x1);}}function _0x1a1e3c(_0x4dbfc8){return _0x4dbfc8[_0x558d81([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x558d81([0x65,0x79]))?JSON[_0x558d81([0x70,0x61,0x72,0x73,0x65])](_0x2faac4(_0x4dbfc8)):null;}function _0x2faac4(_0x3a2492){return window[_0x558d81([0x61,0x74,0x6f,0x62])](_0x3a2492[_0x558d81([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x558d81([0x2b]))[_0x558d81([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x558d81([0x2f])));}function _0x29110e(_0x1c8028){let _0x4bed65=0x1505;function _0x565375(_0x3ee54f){for(let _0x492f77=0x0;_0x492f77<_0x3ee54f[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x492f77++){const _0x507989=_0x3ee54f[_0x558d81([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x492f77);_0x4bed65=(_0x4bed65<<0x5)+_0x4bed65+_0x507989,_0x4bed65&=_0x4bed65;}}function _0x4446bc(_0x3dc42f){Array[_0x558d81([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3dc42f)?_0x3dc42f[_0x558d81([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4446bc):_0x3dc42f&&typeof _0x3dc42f==_0x558d81([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x558d81([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3dc42f)[_0x558d81([0x73,0x6f,0x72,0x74])]()[_0x558d81([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x8e243a,_0x4a4c98])=>{_0x565375(_0x8e243a),_0x4446bc(_0x4a4c98);}):_0x565375(window[_0x558d81([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3dc42f));}return _0x4446bc(_0x1c8028),_0x4bed65>>>0x0;}function _0x19d290(_0x3c6843){return _0x3c6843[_0x558d81([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x558d81([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x558d81([0x30]));}function _0x34fea2(_0x41603c){return _0x41603c[_0x558d81([0x73,0x70,0x6c,0x69,0x74])]('')[_0x558d81([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x558d81([0x6a,0x6f,0x69,0x6e])]('');}function _0x64e30d(_0x199b42){return _0x2984d9[_0x558d81([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x558d81([0x68,0x61,0x73])](_0x199b42);}function _0x31578b(_0x2bfddf){return _0x2984d9[_0x558d81([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x558d81([0x67,0x65,0x74])](_0x2bfddf);}function _0x59c530(){}function _0x558d81(_0x23ca0c){return _0x23ca0c['map'](_0x13c795=>String['fromCharCode'](_0x13c795))['join']('');}_0x36cdf3(await _0x577e78());}(this);}['createRevision'](_0x110e71){const _0x210b86=this['editor']['plugins']['get']('Users');return new I({'id':_0x110e71['id'],'name':_0x110e71['name'],'creator':_0x110e71['creatorId']?_0x210b86['getUser'](_0x110e71['creatorId']):null,'diffData':_0x110e71['diffData']||_0x110e71['data'],'authors':_0x110e71['authorsIds']['map'](_0x2b127a=>_0x210b86['getUser'](_0x2b127a)),'createdAt':new Date(_0x110e71['createdAt']),'attributes':_0x110e71['attributes'],'fromVersion':_0x110e71['fromVersion'],'toVersion':_0x110e71['toVersion']});}['addRevision'](_0x595f14,_0x2a427b=0x0){this['_revisions']['add'](_0x595f14,_0x2a427b);}['getRevision'](_0x843554){return this['_revisions']['get'](_0x843554);}['getRevisions'](_0x4de1d5={'toJSON':!0x1}){const _0x14f7f0=Array['from'](this['_revisions']);return _0x14f7f0['reverse'](),_0x4de1d5['toJSON']?_0x14f7f0['map'](_0x16de95=>_0x16de95['toJSON']()):_0x14f7f0;}['getIndex'](_0x5f3ff0){return this['_revisions']['getIndex'](_0x5f3ff0);}['getEarlierVisibleRevision'](_0x505af4){const [,_0x5af812]=this['getRevisionsIterator'](_0x505af4,{'direction':'earlier'});return _0x5af812;}['getLaterVisibleRevision'](_0xc3e169){const [,_0x3d3708]=this['getRevisionsIterator'](_0xc3e169,{'direction':'later'});return _0x3d3708;}['getRevisionsInDiff'](_0x4f5e86){const _0x1371ad=[];for(const _0x40e53e of this['getRevisionsIterator'](_0x4f5e86['newRevisionId']))if(_0x1371ad['push'](_0x40e53e),_0x40e53e['id']===_0x4f5e86['oldRevisionId'])break;return _0x1371ad;}*['getRevisionsIterator'](_0x1f3153,{direction:_0x5f53d1='earlier',filter:_0x1732b9=()=>!0x0}={}){const _0x540160='earlier'===_0x5f53d1?0x1:-0x1;let _0x4f9d21=this['_revisions']['get'](_0x1f3153),_0x1d2701=this['getIndex'](_0x4f9d21);for(yield _0x4f9d21;_0x4f9d21;){if(_0x1d2701+=_0x540160,_0x4f9d21=this['getRevision'](_0x1d2701),!_0x4f9d21)return;_0x1732b9(_0x4f9d21)&&(yield _0x4f9d21);}}}class $ extends _0x2a9b7d{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x4e0505,'c'],[_0x2743c8,'a'],[_0x23abf1,'e'],[_0x4ccddb,'r'],[_0x3ec531,'u']]);['_typeCharToViewClass']=new Map([['c',_0x4e0505],['a',_0x2743c8],['e',_0x23abf1],['r',_0x4ccddb],['u',_0x3ec531]]);async['loadRevisionData'](_0x2bda0d,_0x3ccb47){if(_0x2bda0d['diffData']||!_0x3ccb47)return;const _0x13bf7d=this['editor']['config']['get']('collaboration.channelId'),_0x2fccf6=await _0x3ccb47['getRevision']({'channelId':_0x13bf7d,'revisionId':_0x2bda0d['id']});_0x2bda0d['diffData']=_0x2fccf6['diffData'];}['getRevisionDocumentData'](_0x16e5fc){const _0x627ff={};for(const _0x2227d7 in _0x16e5fc['diffData']){if(_0x16e5fc['diffData'][_0x2227d7]['attachChange']&&!_0x16e5fc['diffData'][_0x2227d7]['attachChange']['isAttached'])continue;const _0x211c43=this['_removeRevisionMarkers'](JSON['parse'](_0x16e5fc['diffData'][_0x2227d7]['insertions'])),_0x3acc2e=this['editor']['editing']['view']['document'],_0x3abbf5=new _0x50d104(_0x3acc2e,_0x211c43['map'](_0x32fe95=>this['_getViewFromDiffObj'](_0x32fe95,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x627ff[_0x2227d7]=this['editor']['data']['processor']['toData'](_0x3abbf5),this['editor']['data']['processor']['useFillerType']('default');}return _0x627ff;}['getRevisionRootsAttributes'](_0xc1e739){const _0xcd4d7c={};for(const _0x3a322b in _0xc1e739['diffData'])_0xc1e739['diffData'][_0x3a322b]['attachChange']&&!_0xc1e739['diffData'][_0x3a322b]['attachChange']['isAttached']||(_0xcd4d7c[_0x3a322b]=_0xc1e739['diffData'][_0x3a322b]['attributesAfter']||{});return _0xcd4d7c;}['_getTypeCharForViewElement'](_0x3ff9a4){return this['_viewClassToTypeChar']['get'](_0x3ff9a4['constructor']);}['_getViewFromDiffObj'](_0x4ebc85,_0x218db2){const _0x48cd62=this['editor']['editing']['view']['document'];if('string'==typeof _0x4ebc85)return new _0x5a4e35(_0x48cd62,_0x4ebc85);{let _0x113d34,_0x4f8b2b;_0x4f8b2b='u'==_0x4ebc85['type']||'r'==_0x4ebc85['type']?[]:_0x4ebc85['children']['map'](_0x3e42e2=>this['_getViewFromDiffObj'](_0x3e42e2,_0x218db2));const _0x3b7cab=this['_typeCharToViewClass']['get'](_0x4ebc85['type'])||_0x2c11d4,_0x576714=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x113d34=new _0x3b7cab(_0x48cd62,_0x4ebc85['name'],_0x4ebc85['attributes'],_0x4f8b2b),'u'==_0x4ebc85['type']&&_0x4ebc85['children'][0x0]){const _0x2f7c54=_0x4ebc85['children'][0x0];if(_0x113d34['render']=function(_0x3b722d){const _0x34f1d3=_0x3b722d['createElement']('div');return _0x34f1d3['innerHTML']=_0x2f7c54,_0x34f1d3['childNodes'][0x0];},_0x218db2){const _0x3d1086=new _0x50d104(_0x48cd62);_0x3d1086['_appendChild'](_0x113d34);const _0x4364a3=Array['from'](_0x576714['viewChildrenToDom'](_0x3d1086,{'bind':!0x1})),_0x18a907=_0x576714['domDocument']['createElement']('div');_0x18a907['append'](..._0x4364a3),_0x113d34=Array['from'](_0x576714['domChildrenToView'](_0x18a907))[0x0];}}else{if('r'==_0x4ebc85['type']&&_0x4ebc85['children'][0x0]){const _0x50d8d7=_0x4ebc85['children'][0x0];if(_0x113d34['render']=function(_0x58b5de){_0x58b5de['innerHTML']=_0x50d8d7;},_0x218db2){const _0x337599=new _0x50d104(_0x48cd62);_0x337599['_appendChild'](_0x113d34);const _0x56d423=Array['from'](_0x576714['viewChildrenToDom'](_0x337599,{'bind':!0x1})),_0x3f0f9d=_0x576714['domDocument']['createElement']('div');_0x3f0f9d['append'](..._0x56d423);const _0x2c92de=Array['from'](_0x576714['domChildrenToView'](_0x3f0f9d));_0x2c92de['length']>0x1?_0x113d34['_appendChild'](_0x2c92de):_0x113d34=_0x2c92de[0x0];}}}if(_0x4ebc85['customProperties']){for(const [_0x15164d,_0xe76b43]of _0x4ebc85['customProperties'])_0x113d34['_setCustomProperty'](_0x15164d,_0xe76b43);}const _0x17d842=void 0x0===_0x4ebc85['fillerOffset']?null:_0x4ebc85['fillerOffset'];return null!==_0x17d842&&(_0x113d34['getFillerOffset']=()=>_0x17d842),_0x113d34;}}['_makeModelFromViewString'](_0x4fd2e6){const _0x45e6c7=JSON['parse'](_0x4fd2e6),_0x3683b3=this['editor']['editing']['view']['document'],_0x150539=new _0x50d104(_0x3683b3,_0x45e6c7['map'](_0x28eda4=>this['_getViewFromDiffObj'](_0x28eda4,!0x0)));return this['editor']['data']['toModel'](_0x150539);}['_removeRevisionMarkers'](_0x32d19b){return(_0x32d19b=_0x32d19b['filter'](_0x5e8bfb=>!_0x5e8bfb['name']||'revision-start'!==_0x5e8bfb['name']&&'revision-end'!==_0x5e8bfb['name']))['forEach'](_0x3bfad6=>{'string'!=typeof _0x3bfad6&&(_0x3bfad6['children']=this['_removeRevisionMarkers'](_0x3bfad6['children']),_0x3bfad6['attributes']=_0x3bfad6['attributes']['filter'](_0x3e24e3=>!_0x3e24e3[0x0]['startsWith']('data-revision-')));}),_0x32d19b;}}function m(_0x2d03a8,_0x36e04e,_0x55b5bc){const t=_0x2d03a8['t'];switch(_0x36e04e){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'},_0x55b5bc);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x55b5bc);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 _0x2a9b7d{['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[_0x58b4bf,S,$,_0x153c11];}constructor(_0x306670){super(_0x306670),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 _0x4f3b1a=_0x422234();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x4f3b1a},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 _0x331153=this['repository']['getRevision'](0x0),_0x5ddfef=_0x331153&&null===_0x331153['creator']?_0x331153:null;if(this['_continueCurrentRevision']=!!_0x5ddfef&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x173c41=this['_source']['getCurrentRevisionId'](),_0x1997ae=this['repository']['getRevision'](_0x173c41);if(_0x1997ae)this['_startingVersion']=_0x1997ae['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x5f1764=this['_source']['history']['_operations']['find'](_0x3a8f0d=>!_0x3a8f0d['_isInit']),_0x3b8560=_0x5f1764?_0x5f1764['baseVersion']:this['_source']['history']['version'];_0x331153?(_0x331153['toVersion']<_0x3b8560&&_0x331153['_update']({'toVersion':_0x3b8560}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5ddfef['id'],this['_startingVersion']=_0x5ddfef['fromVersion']):(this['_startingVersion']=_0x331153['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x3b8560,this['_continueCurrentRevision']=!0x1);}}else _0x5ddfef&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5ddfef['toVersion'],this['editor']['model']['document']['history']['version']),_0x5ddfef['fromVersion']===_0x5ddfef['toVersion']?(0x0!==_0x5ddfef['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5ddfef['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5ddfef['id'],this['_startingVersion']=_0x5ddfef['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',_0x3193ab=>!_0x3193ab),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4b3db2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1b7cc8;for(const _0x21d3d8 in _0x4b3db2){const _0x12fbce=_0x21d3d8,_0x2fc527=_0x4b3db2[_0x12fbce];if('revisionHistoryLicenseKeyValid'==_0x2fc527||'revisionHistoryLicenseKeyInvalid'==_0x2fc527||'revisionHistoryLicenseKeyExpired'==_0x2fc527||'revisionHistoryLicenseKeyDomainLimit'==_0x2fc527||'revisionHistoryLicenseKeyNotAllowed'==_0x2fc527||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2fc527||'revisionHistoryLicenseKeyTrialLimit'==_0x2fc527||'revisionHistoryLicenseKeyUsageLimit'==_0x2fc527){delete _0x4b3db2[_0x12fbce],_0x1b7cc8=_0x2fc527,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x4d75ec=this['repository']['getRevision'](0x0),_0x4d6d0d=await this['getRevisionDocumentData'](_0x4d75ec),_0x1ed145=await this['getRevisionRootsAttributes'](_0x4d75ec);this['_replaceEditorDataWithRevisionData'](_0x4d6d0d,_0x1ed145);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x52211c){this['_source']=_0x52211c;}async['update'](){const _0x5138b7=await this['_source']['getLatestVersion']();if(_0x5138b7>this['currentRevision']['toVersion']){await this['_loadState']();const _0x410e89=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5138b7});_0x410e89['authors']=_0x410e89['authorsIds']['map'](_0x298eb3=>this['editor']['plugins']['get']('Users')['getUser'](_0x298eb3)),this['currentRevision']['_update'](_0x410e89);}}async['saveRevision'](_0x359571={},_0x2a218c=null){const _0x24c430=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2a218c>this['currentRevision']['toVersion']&&(_0x2a218c=null),null===_0x2a218c&&(_0x2a218c=await this['_source']['getLatestVersion']());const _0x29edff=this['_getFromVersion'](_0x2a218c),_0x2da3bb=this['buildRevisionData']({'from':_0x29edff,'to':_0x2a218c});if(this['currentRevision']['toVersion']<_0x2a218c){const _0x1c3065=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2a218c,'to':_0x2a218c});_0x1c3065['authors']=[],_0x1c3065['authorsIds']=[],_0x1c3065['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1c3065,!0x0),delete _0x1c3065['authors'],_0x24c430['push'](_0x1c3065);}_0x359571['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x359571['name']=_0x359571['name']||null,_0x359571['id']=_0x359571['id']||_0x422234(),_0x359571={..._0x359571,..._0x2da3bb};const _0x40c6ca=this['addRevisionData'](_0x359571);_0x24c430['push'](_0x359571);const _0x53692a=this['repository']['getIndex'](_0x40c6ca);if(0x0!==_0x53692a){const _0xd594db=this['repository']['getRevision'](_0x53692a-0x1);if(_0xd594db['fromVersion']!==_0x2a218c){const _0x53341e=this['_revisionDataBuilder']['getData'](_0x2a218c,_0xd594db['toVersion']),_0x594d22={'id':_0xd594db['id'],'diffData':_0x53341e['diffData'],'authorsIds':_0x53341e['authorsIds'],'authors':_0x53341e['authorsIds']['map'](_0x2d220e=>this['editor']['plugins']['get']('Users')['getUser'](_0x2d220e)),'fromVersion':_0x2a218c};_0xd594db===this['currentRevision']&&(_0x594d22['createdAt']=new Date(_0x359571['createdAt']['getTime']()+0xa)),_0xd594db['_update'](_0x594d22,!0x0),delete _0x594d22['authors'],_0x24c430['push'](_0x594d22);}}if(this['adapter']){for(const _0x21fec0 of _0x24c430)this['_bufferUpdate'](_0x21fec0['id'],_0x21fec0,!0x0);this['sendBufferedUpdates']();}return _0x40c6ca;}['addRevisionData'](_0x507aee){const _0x5dc9c1=this['repository']['createRevision'](_0x507aee);return this['adapter']&&_0x5dc9c1['on']('_update',(_0x3bf465,_0x41580c,_0x19075e)=>{_0x19075e||(this['_bufferUpdate'](_0x41580c['id'],_0x41580c,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5dc9c1,this['_findInsertionIndex'](_0x5dc9c1)),_0x5dc9c1;}async['getRevisionDocumentData'](_0x5662cf){return await this['_utils']['loadRevisionData'](_0x5662cf,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5662cf);}async['getRevisionRootsAttributes'](_0x3631ce){return await this['_utils']['loadRevisionData'](_0x3631ce,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3631ce);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x454701=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x769cdf=0x0;_0x769cdf<_0x454701['length'];_0x769cdf++){const _0xf3831d=_0x454701[_0x769cdf];let _0x223e25=!0x1;for(const _0x4bfaa6 of Object['keys'](_0xf3831d))void 0x0===_0xf3831d[_0x4bfaa6]?delete _0xf3831d[_0x4bfaa6]:'id'!==_0x4bfaa6&&(_0x223e25=!0x0);_0x223e25||(_0x454701[_0x769cdf]=null);}if(_0x454701=_0x454701['filter'](_0x30266d=>null!==_0x30266d),!_0x454701['length'])return;for(let _0x1dd7cf=0x0;_0x1dd7cf<_0x454701['length'];_0x1dd7cf++){const _0x4507ea=_0x454701[_0x1dd7cf];void 0x0!==_0x4507ea['fromVersion']&&void 0x0===_0x4507ea['toVersion']&&(_0x4507ea['toVersion']=this['repository']['getRevision'](_0x4507ea['id'])['toVersion']),void 0x0!==_0x4507ea['toVersion']&&void 0x0===_0x4507ea['fromVersion']&&(_0x4507ea['fromVersion']=this['repository']['getRevision'](_0x4507ea['id'])['fromVersion']);}const _0x4b83b7=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x454701,_0x4b83b7)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x33e225=>{if(_0x33e225){for(const _0x33c0b5 of _0x33e225)this['setRevisionData']({'id':_0x33c0b5['id'],'createdAt':_0x33c0b5['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x19837b=null,from:_0x41770c=null,to:_0x59bb2f=null}){_0x41770c=null!==_0x41770c?_0x41770c:_0x19837b['fromVersion'],_0x59bb2f=null!==_0x59bb2f?_0x59bb2f:_0x19837b['toVersion'];const _0x356a22=this['_revisionDataBuilder']['getData'](_0x41770c,_0x59bb2f),_0xb95c01={'diffData':_0x356a22['diffData'],'authorsIds':_0x356a22['authorsIds'],'fromVersion':_0x41770c,'toVersion':_0x59bb2f};if(!_0x19837b||_0x59bb2f!==_0x19837b['toVersion']){const _0x513ddd=_0x59bb2f-0x1,_0x5266c3=this['_source']['history']['getOperation'](_0x513ddd);_0xb95c01['createdAt']=_0x5266c3&&_0x5266c3['createdAt']||new Date();}if(this['_loadedStateData']&&_0x41770c===this['_loadedStateData']['fromVersion']){for(const _0x5d2371 of this['_loadedStateData']['authors'])_0xb95c01['authorsIds']['includes'](_0x5d2371['id'])||_0xb95c01['authorsIds']['push'](_0x5d2371['id']);}return _0xb95c01;}['_bufferUpdate'](_0xe89b9,_0x1b1caa,_0x8be32d){if(this['_bufferedUpdates']['has'](_0xe89b9)){const _0x41e1e3=this['_bufferedUpdates']['get'](_0xe89b9);_0x1b1caa=_0x8be32d?{..._0x41e1e3,..._0x1b1caa}:{..._0x1b1caa,..._0x41e1e3};}this['_bufferedUpdates']['set'](_0xe89b9,_0x1b1caa);}['setRevisionData'](_0x4677ad){const _0x698595=this['repository']['getRevision'](_0x4677ad['id']);if(_0x4677ad['createdAt']&&(_0x4677ad['createdAt']=new Date(_0x4677ad['createdAt'])),_0x4677ad['authorsIds']){const _0x1b43ae=this['editor']['plugins']['get']('Users');_0x4677ad['authors']=_0x4677ad['authorsIds']['map'](_0x1ad43d=>_0x1b43ae['getUser'](_0x1ad43d));}_0x698595['_update'](_0x4677ad,!0x0);}['_createInitialRevision'](_0x11d8f1){const _0x5adb8e=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5adb8e)this['_initialRevisionId']=_0x5adb8e['id'];else{const _0x4e7207=!this['editor']['model']['document']['roots']['find'](_0x594bdc=>this['editor']['model']['hasContent'](_0x594bdc)),_0x5a9d94=this['editor']['plugins']['get']('Users')['me']['id'],_0x395e2e=m(this['editor']['locale'],_0x4e7207?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x11d8f1,'to':_0x11d8f1,'id':this['_initialRevisionId'],'name':_0x395e2e,'creatorId':_0x5a9d94});}}['_createCurrentRevision'](_0x2d110a){const _0x5ade85=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x5ade85),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2d110a,'to':_0x2d110a,'id':_0x5ade85,'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'](_0x30b5a9,_0x4daf67){let _0x4ab2e5=this['editor']['config']['get']('initialData'),_0x2c3d4e=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x4ab2e5){_0x4ab2e5={};for(const _0x3f16ff of this['editor']['model']['document']['getRootNames']())_0x4ab2e5[_0x3f16ff]='';}if('string'==typeof _0x4ab2e5&&(_0x4ab2e5={'main':_0x4ab2e5}),void 0x0===_0x2c3d4e){_0x2c3d4e={};for(const _0x578a48 of this['editor']['model']['document']['getRootNames']())_0x2c3d4e[_0x578a48]={};}let _0x45f945=!0x1;const _0x36df40=Object['keys'](_0x4ab2e5),_0x2864fb=Object['keys'](_0x30b5a9);for(const _0x41f5ad of _0x36df40){if(_0x4ab2e5[_0x41f5ad]!==_0x30b5a9[_0x41f5ad]&&''!==_0x4ab2e5[_0x41f5ad]['trim']()){_0x45f945=!0x0;break;}if(!_0x284f8e(_0x2c3d4e[_0x41f5ad],_0x4daf67[_0x41f5ad])&&Object['keys'](_0x2c3d4e[_0x41f5ad])['length']>0x0){_0x45f945=!0x0;break;}}_0x45f945||(_0x45f945=_0x2864fb['some'](_0x1d9519=>!this['editor']['model']['document']['getRoot'](_0x1d9519))),_0x45f945&&_0x4d0460('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4ab2e5,'editorRootsAttributes':_0x2c3d4e,'revisionData':_0x30b5a9,'revisionRootsAttributes':_0x4daf67}),this['editor']['config']['set']('initialData',_0x30b5a9),this['editor']['config']['set']('rootsAttributes',_0x4daf67);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x3ddbd0=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x3ddbd0['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x473495){const _0xbf3f4e=this['repository']['getRevisions']();_0xbf3f4e['reverse']();let _0x4cb078=0x0;for(;_0x4cb078<_0xbf3f4e['length'];){const _0x3eb05b=_0xbf3f4e[_0x4cb078];if(_0x3eb05b===this['currentRevision']){_0x4cb078++;continue;}if(_0x3eb05b['id']===this['_initialRevisionId'])break;const _0x168c2e=_0x473495['toVersion']-_0x3eb05b['toVersion']||_0x473495['fromVersion']-_0x3eb05b['fromVersion'];if(_0x168c2e>0x0)break;if(_0x168c2e<0x0)_0x4cb078++;else{if(!_0x473495['creator']&&_0x3eb05b['creator'])break;if(_0x3eb05b['creator']||!_0x473495['creator']){if(_0x473495['createdAt']>_0x3eb05b['createdAt'])break;_0x4cb078++;}else _0x4cb078++;}}return _0x4cb078;}['_getFromVersion'](_0x549c5c){const _0x1a5e87=this['repository']['getRevisions']();_0x1a5e87['reverse'](),_0x1a5e87['shift']();const _0x2761c0=_0x1a5e87['find'](_0xd16c1f=>_0xd16c1f['toVersion']<=_0x549c5c)['toVersion'];return _0x2761c0<this['_startingVersion']?this['_startingVersion']:_0x2761c0;}['_makeRevision']({name:_0x2d1f6d,from:_0x5a075d,to:_0x428c3c,creatorId:_0x52919e,id:_0x2f97e9}){const _0x41a16a=this['buildRevisionData']({'from':_0x5a075d,'to':_0x428c3c});_0x41a16a['name']=_0x2d1f6d,_0x41a16a['creatorId']=_0x52919e,_0x41a16a['id']=_0x2f97e9;const _0x14e02e=this['addRevisionData'](_0x41a16a);return this['adapter']&&this['_bufferUpdate'](_0x41a16a['id'],_0x41a16a,!0x0),_0x14e02e;}['_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(_0x553a0c){this['editor']=_0x553a0c,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'](_0x4ff888){this['source']=_0x4ff888;const _0x52cb12=new Map(),_0x593003=new Map(),_0x4d1a60=this['editor']['model']['document']['roots']['map'](_0x87c5e6=>_0x87c5e6['rootName']);for(const _0x44a074 of _0x4d1a60){const _0xa4788b=this['editor']['model']['document']['getRoot'](_0x44a074),_0x23335f=x(_0xa4788b);_0x52cb12['set'](_0x44a074,_0x23335f),_0x593003['set'](_0x44a074,Object['fromEntries'](_0xa4788b['getAttributes']()));}const _0x2c4587=Array['from'](this['editor']['model']['markers'])['map'](_0x6ec15a=>[_0x6ec15a['name'],_0x6ec15a['getRange']()]),_0x383ee1=this['source']['version'];this['_saveMetaData'](_0x383ee1,_0x52cb12,_0x2c4587,_0x593003),this['_startingRevisionId']=this['_revisionId'];const _0x83807e=new Map(),_0x2d296e=new Map();for(const _0x248dd1 of _0x4d1a60){const _0x29fd78=N(_0x248dd1);_0x83807e['set'](_0x248dd1,_0x29fd78),_0x2d296e['set'](_0x248dd1,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x83807e,[],_0x2d296e);}['getData'](_0xed0b58,_0x1a4ecc){if(this['_lastFrom']===_0xed0b58&&this['_lastTo']<=_0x1a4ecc)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1a4ecc,!0x0);else{if(!this['_savedMetaData']['has'](_0xed0b58)){const _0x2fd784=this['_getPreviousFrom'](_0xed0b58);this['_calculateMetaData'](_0x2fd784,_0xed0b58,!0x1);}this['_calculateMetaData'](_0xed0b58,_0x1a4ecc,!0x0);}return this['_lastFrom']=_0xed0b58,this['_lastTo']=_0x1a4ecc,this['_getState']();}['loadState'](_0x1321f3){if(!this['_savedMetaData']['has'](_0x1321f3['fromVersion'])){const _0x3e0d36=this['_getPreviousFrom'](_0x1321f3['fromVersion']);this['_calculateMetaData'](_0x3e0d36,_0x1321f3['fromVersion'],!0x1);}this['_calculateMetaData'](_0x1321f3['fromVersion'],_0x1321f3['toVersion'],!0x1);const _0x41182b=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x1321f3['fromVersion'],this['_lastTo']=_0x1321f3['toVersion'];for(const _0x14fd2d in _0x1321f3['diffData']){const _0x366a5a=_0x1321f3['diffData'][_0x14fd2d]['attachChange'],_0x3ab8e9=_0x4dcfba(_0x1321f3['diffData'][_0x14fd2d]['attributesBefore'])||{},_0x7bf023=_0x41182b['_makeModelFromViewString'](_0x1321f3['diffData'][_0x14fd2d]['deletions']);_0x7bf023['rootName']=_0x14fd2d,_0x7bf023['_isAttached']=!_0x366a5a||!_0x366a5a['isAttached'],_0x7bf023['isAttached']=()=>_0x7bf023['_isAttached'],this['_baseRoots']['set'](_0x14fd2d,_0x7bf023),this['_baseRootsAttributes']['set'](_0x14fd2d,_0x3ab8e9),_0x366a5a&&this['_touchedRoots']['set'](_0x14fd2d,_0x366a5a);const _0x54f3d1=this['_makeIdsRoot'](_0x7bf023);this['_baseIdsRoots']['set'](_0x14fd2d,_0x54f3d1);for(const [_0x442831,_0x43b3eb]of _0x7bf023['markers']){if(!_0x442831['startsWith']('revision:'))continue;const _0xdde982=_0x442831['split'](':')[0x2];for(const _0x3b298a of _0x43b3eb['getWalker']({'singleCharacters':!0x0})){const _0x27eb0f=this['_getVidAttributeName'](_0x3b298a),_0x2b3440='elementEnd'==_0x3b298a['type']?_0x3b298a['previousPosition']['path']['slice'](0x0,-0x1):_0x3b298a['previousPosition']['path'],_0x5a7955=_0x54f3d1['getNodeByPath'](_0x2b3440)['getAttribute'](_0x27eb0f);this['_touched']['set'](_0x5a7955,{'userId':_0xdde982});}_0x7bf023['markers']['delete'](_0x442831);}}this['_startingRevisionId']=this['_revisionId'];const _0x11e845=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x424041=>!this['_touched']['has'](_0x424041));let _0x490ada=0x0;const _0x4fd5af=new Map();for(const _0x491043 in _0x1321f3['diffData']){const _0x2ed4a0=_0x1321f3['diffData'][_0x491043]['attachChange'],_0xf2fd45=_0x4dcfba(_0x1321f3['diffData'][_0x491043]['attributesAfter'])||{},_0x1595dc=_0x41182b['_makeModelFromViewString'](_0x1321f3['diffData'][_0x491043]['insertions']);_0x1595dc['rootName']=_0x491043,_0x1595dc['_isAttached']=!_0x2ed4a0||_0x2ed4a0['isAttached'],_0x1595dc['isAttached']=()=>_0x1595dc['_isAttached'],this['_diffRoots']['set'](_0x491043,_0x1595dc),this['_diffRootsAttributes']['set'](_0x491043,_0xf2fd45);const _0x21fb7a=this['_makeIdsRoot'](_0x1595dc,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x491043,_0x21fb7a),_0x4fd5af['set'](_0x491043,_0x1595dc['isAttached']()?_0xf2fd45:{});for(const [_0x2964ac,_0x5261d2]of _0x1595dc['markers']){if(!_0x2964ac['startsWith']('revision:'))continue;const _0x577e5c=_0x2964ac['split'](':')[0x2];for(const _0x471f6b of _0x5261d2['getWalker']({'singleCharacters':!0x0})){const _0x461567=this['_getVidAttributeName'](_0x471f6b),_0x529ee3=this['_revisionId']++,_0x3c6260='elementEnd'==_0x471f6b['type']?_0x471f6b['previousPosition']['path']['slice'](0x0,-0x1):_0x471f6b['previousPosition']['path'];_0x21fb7a['getNodeByPath'](_0x3c6260)['_setAttribute'](_0x461567,_0x529ee3),this['_touched']['set'](_0x529ee3,{'userId':_0x577e5c});}_0x1595dc['markers']['delete'](_0x2964ac);}for(const _0x2133e1 of this['editor']['model']['createRangeIn'](_0x1595dc)['getWalker']({'singleCharacters':!0x0})){const _0x228f42=this['_getVidAttributeName'](_0x2133e1),_0x141772='elementEnd'==_0x2133e1['type']?_0x2133e1['previousPosition']['path']['slice'](0x0,-0x1):_0x2133e1['previousPosition']['path'],_0x1c60b6=_0x21fb7a['getNodeByPath'](_0x141772);_0x1c60b6['getAttribute'](_0x228f42)>0x0||_0x1c60b6['_setAttribute'](_0x228f42,_0x11e845[_0x490ada++]);}for(const [_0x53c8ab,_0x42c188]of _0x1595dc['markers'])_0x53c8ab['startsWith']('revision:')||this['_markers']['set'](_0x53c8ab,_0x42c188);}const {roots:_0x19b713}=this['_savedMetaData']['get'](_0x1321f3['fromVersion']),{roots:_0x3f6f16}=this['_savedMetaData']['get'](_0x1321f3['toVersion']),_0x2ed700=x(_0x19b713['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x2ed700),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2ed700,Number['NEGATIVE_INFINITY']));const _0x4caac0=x(_0x3f6f16['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x4caac0),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4caac0));const _0x3569f7=Array['from'](this['_diffRoots'])['map'](([_0xac2a2d,_0x5edadb])=>[_0xac2a2d,x(_0x5edadb)]);this['_saveMetaData'](this['_lastTo'],_0x3569f7,this['_markers'],_0x4fd5af);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x3074ff,_0x4174ae,_0x47f82,_0x1c944b){const _0x50132b=new Map(_0x4174ae),_0x107566=new Map(_0x4dcfba(_0x1c944b)),_0x367c55=new Map();for(const [_0x155d2f,_0x438e1a]of _0x47f82)_0x367c55['set'](_0x155d2f,{'start':_0x438e1a['start']['clone'](),'end':_0x438e1a['end']['clone'](),'rootName':_0x438e1a['root']['rootName']});this['_savedMetaData']['set'](_0x3074ff,{'roots':_0x50132b,'markers':_0x367c55,'rootsAttributes':_0x107566});}['_removeMetaData'](_0xe923a1){this['_savedMetaData']['delete'](_0xe923a1);}['_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'](_0x201130,_0x19cf70=null){let _0x4ac278=null;_0x201130['is']('documentFragment')||(_0x4ac278=new _0x514734(_0x201130['name'],{'vid_start':null===_0x19cf70?this['_revisionId']++:_0x19cf70++}));const _0x9a6963=[];for(const _0x349c20 of _0x201130['getChildren']())if(_0x349c20['is']('element')){_0x9a6963['push'](this['_makeIdsRoot'](_0x349c20,_0x19cf70));const _0x1effcb=_0x9a6963[_0x9a6963['length']-0x1];null!==_0x19cf70&&(_0x19cf70=_0x1effcb['is']('element','$text')?_0x1effcb['getAttribute']('vid')+0x1:_0x1effcb['getAttribute']('vid_end')+0x1);}else{for(let _0x7ff872=0x0;_0x7ff872<_0x349c20['offsetSize'];_0x7ff872++)_0x9a6963['push'](new _0x514734('$text',{'vid':null===_0x19cf70?this['_revisionId']++:_0x19cf70++}));}if(_0x201130['is']('documentFragment')){const _0x173075=N(_0x201130['rootName']);return _0x173075['_insertChild'](0x0,_0x9a6963),_0x173075;}return _0x4ac278['_setAttribute']('vid_end',null===_0x19cf70?this['_revisionId']++:_0x19cf70++),_0x4ac278['_insertChild'](0x0,_0x9a6963),_0x4ac278;}['_calculateMetaData'](_0x570abd,_0x21a1a0,_0x42e6b0){this['_reset']();const {roots:_0x7e373b,markers:_0x2178c1,rootsAttributes:_0x556c08}=this['_savedMetaData']['get'](_0x570abd);this['_baseRoots']=new Map(_0x7e373b),this['_baseRootsAttributes']=new Map(_0x4dcfba(_0x556c08));for(const [_0x237a8a,_0x30cdd8]of this['_baseRoots'])if('$graveyard'!==_0x237a8a&&(this['_diffRoots']['set'](_0x237a8a,x(_0x30cdd8)),this['_diffRootsAttributes']=new Map(_0x4dcfba(_0x556c08)),_0x42e6b0)){const _0x8b10bf=this['_revisionId'];this['_idsRoots']['set'](_0x237a8a,this['_makeIdsRoot'](_0x30cdd8)),this['_baseIdsRoots']['set'](_0x237a8a,this['_makeIdsRoot'](_0x30cdd8,_0x8b10bf));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x42e6b0&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4af307,_0x3d4357]of _0x2178c1){const _0x40efbf=this['_baseRoots']['get'](_0x3d4357['rootName']),_0x32dc66=this['_diffRoots']['get'](_0x3d4357['rootName']),_0x1f5172=new _0xd9fa25(this['_fixPosition'](_0x3d4357['start'],_0x40efbf),this['_fixPosition'](_0x3d4357['end'],_0x40efbf)),_0x540dbd=this['_fixRange'](_0x1f5172,_0x32dc66);_0x40efbf['markers']['set'](_0x4af307,_0x1f5172),this['_markers']['set'](_0x4af307,_0x540dbd);}this['_applyOperations'](_0x570abd,_0x21a1a0,_0x42e6b0);}['_applyOperations'](_0x3c4507,_0x3fdcb4,_0x2cbb5f){for(const _0x11c3fc of this['source']['getOperations'](_0x3c4507,_0x3fdcb4))this['_handleOperation'](_0x11c3fc,_0x2cbb5f);for(const _0x4d27d9 of this['_diffRoots']['values']())_0x4d27d9['markers']['clear']();for(const [_0x7020a0,_0x3e88ea]of this['_markers']){this['_diffRoots']['get'](_0x3e88ea['root']['rootName'])['markers']['set'](_0x7020a0,_0x3e88ea['clone']());}const _0x5a50fa=new Map(),_0x2c2adc=new Map();for(const [_0x27b749,_0x23320d]of this['_diffRoots'])_0x5a50fa['set'](_0x27b749,x(_0x23320d)),_0x2c2adc['set'](_0x27b749,this['_diffRootsAttributes']['get'](_0x27b749));this['_saveMetaData'](_0x3fdcb4,_0x5a50fa,this['_markers'],_0x2c2adc);}['_getPreviousFrom'](_0x488f4e){const _0x28a9da=Array['from'](this['_savedMetaData']['keys']());_0x28a9da['sort']((_0x288667,_0x321420)=>_0x288667-_0x321420),_0x28a9da['reverse']();for(const _0x3c6e8e of _0x28a9da)if(_0x3c6e8e<_0x488f4e)return _0x3c6e8e;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5e1687,_0x30a758){const _0x411dcd=Array['from'](_0x30a758['markers'])['map'](([_0x2cffc9,_0x4c3dea])=>[_0x2cffc9,this['_fixRange'](_0x4c3dea,_0x5e1687)]);_0x5e1687['markers']=new Map(_0x411dcd);}['_transformMarkers'](_0x47ab4e){for(const _0x425a67 of this['_markers']['values']()){const _0x49a93d=_0x425a67['getTransformedByOperation'](_0x47ab4e),_0x5d9714=_0xd9fa25['_createFromRanges'](_0x49a93d);_0x425a67['start']=_0x5d9714['start'],_0x425a67['end']=_0x5d9714['end'];}}['_handleOperation'](_0x4522ed,_0x29190b){if('addRoot'!=_0x4522ed['type']&&'detachRoot'!=_0x4522ed['type']){if('insert'==_0x4522ed['type']){const _0x408df4=_0x4522ed['position']['root']['rootName'];this['_diffRoots']['has'](_0x408df4)||(this['_diffRoots']['set'](_0x408df4,N(_0x408df4,!0x0)),this['_diffRootsAttributes']['set'](_0x408df4,{}),_0x29190b&&this['_idsRoots']['set'](_0x408df4,N(_0x408df4,!0x0)));}else{if('addRootAttribute'==_0x4522ed['type']||'removeRootAttribute'==_0x4522ed['type']||'changeRootAttribute'==_0x4522ed['type'])return void this['_handleRootAttributeOperation'](_0x4522ed);'marker'==_0x4522ed['type']&&this['_handleMarkerOperation'](_0x4522ed);}if('marker'!==_0x4522ed['type']){const _0x43fc9a=this['_cloneOperation'](_0x4522ed,this['_diffRoots']);_0x43fc9a['_execute'](),this['_transformMarkers'](_0x43fc9a);}if(_0x29190b)switch(_0x4522ed['type']){case'insert':this['_handleInsertOperation'](_0x4522ed);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4522ed);break;case'merge':this['_handleMergeOperation'](_0x4522ed);break;case'split':this['_handleSplitOperation'](_0x4522ed);}}else this['_handleRootOperation'](_0x4522ed,_0x29190b);}['_cloneOperation'](_0x2199b5,_0x26188a){const _0x1843f1=_0x2199b5['clone']();return _0x1843f1['_authorId']=_0x2199b5['_authorId'],this['_fixOperation'](_0x1843f1,_0x26188a),_0x1843f1;}['_getBaseVids'](_0x4e26a1){return _0x4e26a1['map'](_0x336769=>{const _0x409673=this['_getVidAttributeName'](_0x336769);return Number(_0x336769['item']['getAttribute'](_0x409673));});}['_generateTape'](_0x485792,_0x42b552){if(_0x485792['is']('element','$text'))_0x42b552['push']({'item':_0x485792,'type':'text'});else{_0x485792['is']('element')&&_0x42b552['push']({'item':_0x485792,'type':'elementStart'});for(const _0x4921e4 of _0x485792['getChildren']())this['_generateTape'](_0x4921e4,_0x42b552);_0x485792['is']('element')&&_0x42b552['push']({'item':_0x485792,'type':'elementEnd'});}return _0x42b552;}['_getState'](){const _0x58f9de=new Map(this['_touched']),_0x2c8aa4=new Map(_0x58f9de),_0x5bf790=new Map(),_0x583ef7={'insertions':{},'deletions':{}},_0x4987b1={'insertions':{},'deletions':{}},_0x43ec34=new Map(),_0x32f39d=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x32f39d['delete']('$graveyard');for(const _0x4b3b72 of _0x32f39d){const _0x1f3ffa=this['_diffRoots']['get'](_0x4b3b72)||N(_0x4b3b72,!0x1),_0x4b4cb0=this['_baseRoots']['get'](_0x4b3b72)||N(_0x4b3b72,!0x1);_0x1f3ffa['isAttached']()||_0x4b4cb0['isAttached']()?(_0x583ef7['insertions'][_0x4b3b72]=x(_0x1f3ffa),_0x583ef7['deletions'][_0x4b3b72]=x(_0x4b4cb0),this['_copyMarkers'](_0x583ef7['deletions'][_0x4b3b72],_0x4b4cb0),this['_copyMarkers'](_0x583ef7['insertions'][_0x4b3b72],_0x1f3ffa),_0x4987b1['insertions'][_0x4b3b72]=this['_generateTape'](this['_idsRoots']['get'](_0x4b3b72),[]),_0x4987b1['deletions'][_0x4b3b72]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x4b3b72)||N(_0x4b3b72,!0x1),[])):_0x32f39d['delete'](_0x4b3b72);}for(const _0x5b84ae of _0x32f39d){const _0x8340cc=_0x4987b1['insertions'][_0x5b84ae];for(const _0x36c58c of _0x8340cc){const _0xc5b3bc=this['_getVidAttributeName'](_0x36c58c),_0x324b26=_0x36c58c['item']['getAttribute'](_0xc5b3bc);_0x2c8aa4['delete'](_0x324b26),_0x324b26>=this['_startingRevisionId']&&_0x5bf790['set'](_0x324b26,_0x58f9de['get'](_0x324b26));}}for(const _0x196d02 of _0x32f39d){const _0xbd7c64=_0x4987b1['insertions'][_0x196d02],_0x1fa86f=this['_getBaseVids'](_0x4987b1['deletions'][_0x196d02]);let _0x4f6ee5=0x0;for(const _0x116e88 of _0xbd7c64){const _0x17bd4a=this['_getVidAttributeName'](_0x116e88),_0x395196=_0x116e88['item']['getAttribute'](_0x17bd4a);if(!_0x5bf790['has'](_0x395196)&&!_0x43ec34['has'](_0x395196)){if(_0x2c8aa4['has'](_0x395196))_0x4f6ee5++;else{if(_0x395196!=_0x1fa86f[_0x4f6ee5]){const _0x32577a=_0x58f9de['get'](_0x395196)||_0x58f9de['get'](_0x1fa86f[_0x4f6ee5]);for(;_0x395196!=_0x1fa86f[_0x4f6ee5];)_0x2c8aa4['has'](_0x1fa86f[_0x4f6ee5])||(_0x43ec34['set'](_0x1fa86f[_0x4f6ee5],_0x32577a),_0x58f9de['set'](_0x1fa86f[_0x4f6ee5],_0x32577a)),_0x4f6ee5++;}_0x4f6ee5++;}}}}for(const _0xed1c61 of _0x32f39d){const _0x39d804=_0x4987b1['insertions'][_0xed1c61];for(const _0x57830a of _0x39d804){const _0x1362d4=this['_getVidAttributeName'](_0x57830a),_0x181754=_0x57830a['item']['getAttribute'](_0x1362d4);if(_0x43ec34['has'](_0x181754)){const _0x1c0cd3=_0x43ec34['get'](_0x181754);_0x2c8aa4['has'](_0x181754)||_0x2c8aa4['set'](_0x181754,{..._0x1c0cd3}),_0x5bf790['set'](_0x181754,{..._0x1c0cd3});}}}for(const _0x3f0e14 of _0x2c8aa4['keys']())_0x3f0e14>=this['_startingRevisionId']&&_0x2c8aa4['delete'](_0x3f0e14);const _0x2887a4=new Map();for(const _0x50078c of _0x32f39d){let _0x2ca3b1=_0x4987b1['insertions'][_0x50078c];for(const _0x5b15e0 of _0x2ca3b1)if(_0x5b15e0['item']['is']('element','tableCell')){const _0x2ea520=this['_getVidAttributeName'](_0x5b15e0),_0x159d91=_0x5b15e0['item']['getAttribute'](_0x2ea520);if(_0x5bf790['has'](_0x159d91)){const _0x575f92=_0x5b15e0['item']['parent']['parent']['getAttribute']('vid_start'),_0x22f4a3=_0x2887a4['get'](_0x575f92)||new Set();_0x22f4a3['add'](_0x5bf790['get'](_0x159d91)['userId']),_0x2887a4['set'](_0x575f92,_0x22f4a3);}}_0x2ca3b1=_0x4987b1['deletions'][_0x50078c];for(const _0x1c0446 of _0x2ca3b1)if(_0x1c0446['item']['is']('element','tableCell')){const _0x5b9c27=this['_getVidAttributeName'](_0x1c0446),_0x2438d8=_0x1c0446['item']['getAttribute'](_0x5b9c27);if(_0x2c8aa4['has'](_0x2438d8)){const _0x2865b3=_0x1c0446['item']['parent']['parent']['getAttribute']('vid_start'),_0x396c99=_0x2887a4['get'](_0x2865b3)||new Set();_0x396c99['add'](_0x2c8aa4['get'](_0x2438d8)['userId']),_0x2887a4['set'](_0x2865b3,_0x396c99);}}for(const _0x390e02 of _0x2887a4['keys']())(_0x5bf790['has'](_0x390e02)||_0x2c8aa4['has'](_0x390e02))&&_0x2887a4['delete'](_0x390e02);}for(const _0x34cd5d of _0x32f39d){const _0x49a096=_0x4987b1['insertions'][_0x34cd5d];let _0x12ef90=null,_0x151ca4=null;for(const _0x50c1a6 of _0x49a096){const _0x5ae715=this['_getVidAttributeName'](_0x50c1a6),_0x566426=_0x50c1a6['item']['getAttribute'](_0x5ae715),_0x37503d=_0x2887a4['get'](_0x566426);_0x37503d&&'elementStart'==_0x50c1a6['type']&&(_0x12ef90=Array['from'](_0x37503d)[0x0],_0x151ca4=_0x50c1a6['item']['getAttribute']('vid_end')),_0x12ef90&&(_0x2c8aa4['set'](_0x566426,{'userId':_0x12ef90}),_0x5bf790['set'](_0x566426,{'userId':_0x12ef90})),_0x566426==_0x151ca4&&(_0x12ef90=null,_0x151ca4=null);}}const _0x2e032c={},_0x490d22=new Set();for(const _0x6be0dd of _0x32f39d){const _0xd948c0=_0x583ef7['deletions'][_0x6be0dd],_0x357100=_0x583ef7['insertions'][_0x6be0dd];for(const {userId:_0x5ba358}of this['_touchedMarkers']['values']())null!==_0x5ba358&&_0x490d22['add'](_0x5ba358);for(const {userId:_0x5c516a}of this['_touchedRoots']['values']())null!==_0x5c516a&&_0x490d22['add'](_0x5c516a);this['_markChanges'](_0x357100,_0x4987b1['insertions'][_0x6be0dd],_0x5bf790,'insertion',_0x490d22),this['_markChanges'](_0xd948c0,_0x4987b1['deletions'][_0x6be0dd],_0x2c8aa4,'deletion',_0x490d22),_0x2e032c[_0x6be0dd]={'insertions':this['_prepareViewToSave'](_0x357100),'deletions':this['_prepareViewToSave'](_0xd948c0),'attachChange':this['_touchedRoots']['get'](_0x6be0dd)||null,'attributesBefore':_0x4dcfba(this['_baseRootsAttributes']['get'](_0x6be0dd))||{},'attributesAfter':_0x4dcfba(this['_diffRootsAttributes']['get'](_0x6be0dd))};}return{'diffData':_0x2e032c,'authorsIds':Array['from'](_0x490d22)};}['_processRootBeforeSave'](_0x42c17a){for(const [,_0x44f2ff]of _0x42c17a['markers']){const _0x8e8243=_0x44f2ff['start']['getAncestors']()['filter'](_0x399b02=>'tableCell'==_0x399b02['name']);for(const _0x236bcb of _0x8e8243)0x1==_0x236bcb['childCount']&&_0x236bcb['getChild'](0x0)['is']('element','paragraph')&&_0x236bcb['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0xa8d721){this['_processRootBeforeSave'](_0xa8d721);const _0x35e11f=this['editor']['data']['toView'](_0xa8d721,{}),_0x4848c1=Array['from'](_0x35e11f['getChildren']())['map'](_0xbc6e65=>this['_getViewJson'](_0xbc6e65));return JSON['stringify'](_0x4848c1);}['_getViewJson'](_0x39db67){if(_0x39db67['is']('$text'))return _0x39db67['data'];{const _0x277d65=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5ca170=_0x39db67,_0x1c10f6=this['editor']['data']['htmlProcessor']['domConverter'],_0x2af49b={'type':_0x277d65['_getTypeCharForViewElement'](_0x5ca170),'name':_0x5ca170['name'],'attributes':Array['from'](_0x5ca170['getAttributes']()),'children':Array['from'](_0x5ca170['getChildren']())['map'](_0x42f7e8=>this['_getViewJson'](_0x42f7e8))};if(_0x39db67['is']('uiElement')&&'$comment'!=_0x39db67['name']){const _0x285682=_0x39db67['render'](_0x1c10f6['domDocument'],_0x1c10f6);_0x2af49b['children']['push'](_0x285682['outerHTML']);}else{if(_0x39db67['is']('rawElement')){const _0x50ad46=_0x1c10f6['domDocument']['createElement'](_0x5ca170['name']);_0x39db67['render'](_0x50ad46,_0x1c10f6),_0x2af49b['children']['push'](_0x50ad46['innerHTML']);}}const _0x1bbdb6=Array['from'](_0x5ca170['getCustomProperties']());_0x1bbdb6['length']>0x0&&(_0x2af49b['customProperties']=_0x1bbdb6);const _0x2747f5=_0x5ca170['getFillerOffset']();return null!==_0x2747f5&&(_0x2af49b['fillerOffset']=_0x2747f5),_0x2af49b;}}['_markChanges'](_0x3f5033,_0x4af40f,_0x9ffc,_0x274959,_0x4f8114){let _0x3296f2=null,_0x538333=null,_0x37b1f1=0x0;const _0x46a96e=this['editor']['model'];for(let _0xffafe8=0x0;_0xffafe8<_0x4af40f['length'];_0xffafe8++){const _0x2dab21=this['_getVidAttributeName'](_0x4af40f[_0xffafe8]),_0x1186a1=_0x4af40f[_0xffafe8]['item']['getAttribute'](_0x2dab21),_0xe92e63=_0x9ffc['get'](_0x1186a1),_0x5bccd6=_0xffafe8==_0x4af40f['length']-0x1;(!_0x3296f2&&_0xe92e63&&(_0x3296f2=_0xe92e63,_0x538333=_0x4af40f[_0xffafe8]),_0x3296f2&&(!_0xe92e63||_0xe92e63['userId']!=_0x3296f2['userId']))&&(_0x25d38d(_0xe92e63,P(_0x538333,_0x3f5033,_0x46a96e),P(_0x4af40f[_0xffafe8],_0x3f5033,_0x46a96e)),_0x3296f2=_0xe92e63||null,_0x538333=_0xe92e63?_0x4af40f[_0xffafe8]:null),_0x3296f2&&_0x5bccd6&&_0x25d38d(_0xe92e63,P(_0x538333,_0x3f5033,_0x46a96e),V(_0x4af40f[_0xffafe8],_0x3f5033,_0x46a96e));}function _0x25d38d(_0x500ec8,_0xaa8bdc,_0xfa8a8d){const _0x47db2c=_0x3296f2['userId'],_0x5dccf6='revision:'+_0x274959+':'+_0x47db2c+':'+_0x37b1f1++,_0x28cdd9=_0x46a96e['createRange'](_0xaa8bdc,_0xfa8a8d);_0x3f5033['markers']['set'](_0x5dccf6,_0x28cdd9),null!==_0x47db2c&&_0x4f8114['add'](_0x47db2c);}}['_getVidAttributeName'](_0x244d13){switch(_0x244d13['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x42bda9,_0xd9b278){_0x42bda9['baseVersion']=null;for(const _0x25bcdc in _0x42bda9){const _0x38747f=_0x42bda9[_0x25bcdc];if(_0x38747f instanceof _0x5dfb54){const _0x3ef07f=_0xd9b278['get'](_0x38747f['root']['rootName']);_0x42bda9[_0x25bcdc]=this['_fixPosition'](_0x38747f,_0x3ef07f);}if(_0x38747f instanceof _0xd9fa25){const _0x5ba6a0=_0xd9b278['get'](_0x38747f['root']['rootName']);_0x42bda9[_0x25bcdc]=this['_fixRange'](_0x38747f,_0x5ba6a0);}'root'===_0x25bcdc&&(_0x42bda9['root']=_0xd9b278['get'](_0x42bda9['root']['rootName']));}}['_fixRange'](_0x440d8b,_0x453da9){return this['editor']['model']['createRange'](this['_fixPosition'](_0x440d8b['start'],_0x453da9),this['_fixPosition'](_0x440d8b['end'],_0x453da9));}['_fixPosition'](_0x45d38d,_0x4f10f1){return this['editor']['model']['createPositionFromPath'](_0x4f10f1,_0x45d38d['path'],_0x45d38d['stickiness']);}['_handleInsertOperation'](_0x2bd275){const _0x19acdc=this['_idsRoots']['get'](_0x2bd275['position']['root']['rootName']),_0x44eb06=this['_fixPosition'](_0x2bd275['position'],_0x19acdc),_0x4131ad=null===_0x2bd275['_authorId']?null:_0x2bd275['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x21defb=_0x44eb06['parent'],_0x5aca46=this['_revisionId'],_0x2cda58=[];for(const _0x3b7315 of _0x2bd275['nodes'])if(_0x3b7315['is']('element'))_0x2cda58['push'](this['_makeIdsRoot'](_0x3b7315));else{for(let _0x5e078d=0x0;_0x5e078d<_0x3b7315['offsetSize'];_0x5e078d++)_0x2cda58['push'](new _0x514734('$text',{'vid':this['_revisionId']++}));}const _0xea7e80=this['_revisionId'];for(let _0x4eef0f=_0x5aca46;_0x4eef0f<_0xea7e80;_0x4eef0f++)this['_touched']['set'](_0x4eef0f,{'userId':_0x4131ad});_0x21defb['_insertChild'](_0x44eb06['offset'],_0x2cda58);}['_handleMoveOperation'](_0x50e3b8){(_0x50e3b8=this['_cloneOperation'](_0x50e3b8,this['_idsRoots']))['_execute']();const _0x2647df=null===_0x50e3b8['_authorId']?null:_0x50e3b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x28c4c4=_0x50e3b8['getMovedRangeStart'](),_0x4b45c1=_0x28c4c4['parent'],_0x2aa4c0=_0x28c4c4['offset'];!function _0x17bf5b(_0x34f396,_0x2267ed,_0x94f34d,_0x23bd6e){for(let _0x1a32d8=_0x94f34d;_0x1a32d8<_0x23bd6e;_0x1a32d8++){const _0x530f88=_0x2267ed['getChild'](_0x1a32d8);_0x530f88['is']('element','$text')?_0x34f396['set'](_0x530f88['getAttribute']('vid'),{'userId':_0x2647df}):(_0x34f396['set'](_0x530f88['getAttribute']('vid_start'),{'userId':_0x2647df}),_0x17bf5b(_0x34f396,_0x530f88,0x0,_0x530f88['childCount']),_0x34f396['set'](_0x530f88['getAttribute']('vid_end'),{'userId':_0x2647df}));}}(this['_touched'],_0x4b45c1,_0x2aa4c0,_0x2aa4c0+_0x50e3b8['howMany']);}['_handleMergeOperation'](_0x25a8fc){const _0x3869ef=null===(_0x25a8fc=this['_cloneOperation'](_0x25a8fc,this['_idsRoots']))['_authorId']?null:_0x25a8fc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x6d24f9=_0x25a8fc['targetPosition']['parent'],_0xa1551c=_0x25a8fc['sourcePosition']['parent'],_0x37ddde=_0x6d24f9['getAttribute']('vid_end'),_0x3c19aa=_0xa1551c['getAttribute']('vid_start');_0x6d24f9['_setAttribute']('vid_end',_0xa1551c['getAttribute']('vid_end')),_0xa1551c['_setAttribute']('vid_end',_0x37ddde),this['_touched']['set'](_0x3c19aa,{'userId':_0x3869ef}),this['_touched']['set'](_0x37ddde,{'userId':_0x3869ef}),_0x25a8fc['_execute']();}['_handleSplitOperation'](_0x23e752){const _0x484d88=null===(_0x23e752=this['_cloneOperation'](_0x23e752,this['_idsRoots']))['_authorId']?null:_0x23e752['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5b9413=_0x23e752['graveyardPosition'],_0x125af3=_0x23e752['splitPosition']['parent'];_0x23e752['_execute']();const _0x76d171=_0x125af3['getAttribute']('vid_end'),_0x13ca65=_0x23e752['insertionPosition']['nodeAfter'];if(_0x5b9413){const _0x1a0ca0=_0x13ca65['getAttribute']('vid_end'),_0x9d245a=_0x125af3['getAttribute']('vid_end');_0x125af3['_setAttribute']('vid_end',_0x1a0ca0),_0x13ca65['_setAttribute']('vid_end',_0x9d245a),this['_touched']['set'](_0x125af3['getAttribute']('vid_end'),{'userId':_0x484d88}),this['_touched']['set'](_0x13ca65['getAttribute']('vid_start'),{'userId':_0x484d88});}else{const _0x20c2f4=this['_revisionId']++,_0x3af1f2=this['_revisionId']++;_0x125af3['_setAttribute']('vid_end',_0x20c2f4),_0x13ca65['_setAttribute']('vid_start',_0x3af1f2),_0x13ca65['_setAttribute']('vid_end',_0x76d171),this['_touched']['set'](_0x20c2f4,{'userId':_0x484d88}),this['_touched']['set'](_0x3af1f2,{'userId':_0x484d88});}}['_handleMarkerOperation'](_0x49ba80){if(!_0x49ba80['affectsData'])return;const _0x53f6be=(_0x49ba80=this['_cloneOperation'](_0x49ba80,this['_diffRoots']))['oldRange']?_0x49ba80['oldRange']['root']:null,_0x304a45=_0x49ba80['newRange']?_0x49ba80['newRange']['root']:null;_0x53f6be&&this['_markers']['delete'](_0x49ba80['name']),_0x304a45&&this['_markers']['set'](_0x49ba80['name'],_0x49ba80['newRange']['clone']());const _0x12bdb2=null===_0x49ba80['_authorId']?null:_0x49ba80['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4da961=_0x49ba80['name'];if(!this['_touchedMarkers']['has'](_0x4da961))return void this['_touchedMarkers']['set'](_0x4da961,{'range':_0x49ba80['oldRange'],'userId':_0x12bdb2});const _0x44c147=this['_touchedMarkers']['get'](_0x4da961),_0x44b77e=_0x44c147['range'],_0x260fc0=_0x49ba80['newRange'];null==_0x44b77e&&null==_0x260fc0||_0x44b77e&&_0x260fc0&&_0x44b77e['isEqual'](_0x260fc0)?this['_touchedMarkers']['delete'](_0x49ba80['name']):_0x44c147['userId']=_0x12bdb2;}['_handleRootOperation'](_0x1c7cd1,_0x3753de){this['_diffRoots']['has'](_0x1c7cd1['rootName'])?this['_diffRoots']['get'](_0x1c7cd1['rootName'])['_isAttached']=_0x1c7cd1['isAdd']:(this['_diffRoots']['set'](_0x1c7cd1['rootName'],N(_0x1c7cd1['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1c7cd1['rootName'],{}),_0x3753de&&this['_idsRoots']['set'](_0x1c7cd1['rootName'],N(_0x1c7cd1['rootName'],!0x0)));const _0x44db32=null===_0x1c7cd1['_authorId']?null:_0x1c7cd1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xe71983=this['_touchedRoots']['get'](_0x1c7cd1['rootName']);_0xe71983&&_0xe71983['userId']===_0x44db32?this['_touchedRoots']['delete'](_0x1c7cd1['rootName']):this['_touchedRoots']['set'](_0x1c7cd1['rootName'],{'userId':_0x44db32,'isAttached':_0x1c7cd1['isAdd']});}['_handleRootAttributeOperation'](_0x13110b){const _0x4d8beb=this['_diffRootsAttributes']['get'](_0x13110b['root']['rootName']);null===_0x13110b['newValue']?delete _0x4d8beb[_0x13110b['key']]:_0x4d8beb[_0x13110b['key']]=_0x13110b['newValue'];}}function x(_0x4d9718){const _0x5683fe=N(_0x4d9718['rootName'],_0x4d9718['isAttached']());for(const _0x35f50b of _0x4d9718['getChildren']()){const _0x422562=_0x35f50b['_clone'](!0x0);_0x5683fe['_appendChild'](_0x422562);}return _0x5683fe;}function N(_0x9d21ec,_0x44f517=!0x0){const _0x2075d3=new _0x4acc47();return _0x2075d3['rootName']=_0x9d21ec,_0x2075d3['_isAttached']=_0x44f517,_0x2075d3['isAttached']=()=>_0x2075d3['_isAttached'],_0x2075d3;}function P(_0x50834a,_0x32e337,_0x398c9a){const _0x56e2d4='elementEnd'==_0x50834a['type']?_0x398c9a['createPositionAt'](_0x50834a['item'],'end'):_0x398c9a['createPositionBefore'](_0x50834a['item']);return _0x398c9a['createPositionFromPath'](_0x32e337,_0x56e2d4['path'],_0x56e2d4['stickiness']);}function V(_0x150d0b,_0x25a4e3,_0x496da0){const _0x24387d='elementStart'==_0x150d0b['type']?_0x496da0['createPositionAt'](_0x150d0b['item'],0x0):_0x496da0['createPositionAfter'](_0x150d0b['item']);return _0x496da0['createPositionFromPath'](_0x25a4e3,_0x24387d['path'],_0x24387d['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
+ _0x3e4178(_0x2fbdbb){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x9a4878,_0x7c7478){super(_0x9a4878),this['focusTracker']=new _0x5e9135(),this['keystrokes']=new _0x2dfea2(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x7c7478),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'](),_0x509542({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x8e70dc=_0x19ca4d=>_0x19ca4d['stopPropagation']();this['keystrokes']['set']('arrowright',_0x8e70dc),this['keystrokes']['set']('arrowleft',_0x8e70dc),this['keystrokes']['set']('arrowup',_0x8e70dc),this['keystrokes']['set']('arrowdown',_0x8e70dc);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x1b9f91){this['revisionNameInputView']['fieldView']['element']['value']=_0x1b9f91['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x376d1a){const _0x3fcfac=new et(this['locale'],ti),_0x481db6=_0x3fcfac['fieldView'];_0x481db6['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x2d5a4e=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x376d1a&&(_0x2d5a4e+='\x20('+m(this['locale'],'optional')+')'),(_0x3fcfac['label']=_0x2d5a4e,_0x481db6['on']('input',()=>{this['revisionNameInputValue']=_0x481db6['element']['value']['trim']();}),_0x3fcfac);}}class l extends _0x2a9b7d{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x148559=this['editor'],_0x84aa07=_0x148559['plugins']['get']('RevisionTracker');_0x148559['ui']['componentFactory']['add']('revisionHistory',_0x9792bc=>{const _0x43f82a=_0x255985(_0x9792bc),_0x5d0b8b=_0x43f82a['panelView']['children'],_0x3b393b=new _0x22e049(_0x9792bc),_0x1a4ebd=new _0x57cc36(_0x9792bc),_0x2c1994=new _0x4eab8d(_0x9792bc),_0x4925e0=new _0x57cc36(_0x9792bc),_0x964ce4=new _0x4eab8d(_0x9792bc);return _0x43f82a['bind']('isEnabled')['to'](_0x84aa07,'isReady',_0x84aa07,'isEnabled',_0x148559,'isReadOnly',(_0x108d78,_0x329265,_0x22b009)=>_0x108d78&&_0x329265&&!_0x22b009),_0x43f82a['buttonView']['set']({'icon':_0x1c8430,'label':m(_0x9792bc,'Revision\x20history'),'tooltip':!0x0}),_0x2c1994['set']({'label':m(_0x9792bc,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x2c1994['bind']('isEnabled')['to'](_0x84aa07,'isReady',_0x84aa07,'isEnabled',_0x148559,'isReadOnly',(_0x3b8e81,_0x36c952,_0x5e15df)=>_0x3b8e81&&_0x36c952&&!_0x5e15df),_0x2c1994['on']('execute',()=>this['_showDialog']()),_0x964ce4['set']({'label':m(_0x9792bc,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x964ce4['bind']('isEnabled')['to'](_0x84aa07,'isReady',_0x148559,'isReadOnly',(_0x3c2b96,_0x1339db)=>_0x3c2b96&&!_0x1339db),_0x964ce4['on']('execute',()=>{_0x148559['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x43f82a['isOpen']=!0x1,_0x148559['editing']['view']['focus']();}),_0x1a4ebd['children']['add'](_0x2c1994),_0x4925e0['children']['add'](_0x964ce4),_0x3b393b['role']='menu',_0x3b393b['items']['addMany']([_0x1a4ebd,_0x4925e0]),_0x5d0b8b['add'](_0x3b393b),_0x43f82a;}),_0x148559['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x57b65d=this['editor'],_0x1a6cf6=_0x57b65d['locale'],_0x373d99=new _0x1f9121(_0x1a6cf6),_0xd964af=new _0x27fd85(_0x1a6cf6);_0x373d99['buttonView']['set']({'icon':_0x1c8430,'label':m(_0x1a6cf6,'Revision\x20history')});const _0x5a0a6b=new _0x3b1214(_0x1a6cf6,_0x373d99),_0x3ad6cc=new _0x1c5f84(_0x1a6cf6);_0x3ad6cc['set']({'label':m(_0x1a6cf6,'Save\x20current\x20revision')}),_0x3ad6cc['delegate']('execute')['to'](_0x373d99),_0x3ad6cc['on']('execute',()=>{this['_showDialog']();}),_0x5a0a6b['children']['add'](_0x3ad6cc),_0xd964af['items']['add'](_0x5a0a6b);const _0x58fabf=new _0x3b1214(_0x1a6cf6,_0x373d99),_0x44c41f=new _0x1c5f84(_0x1a6cf6);return _0x44c41f['set']({'label':m(_0x1a6cf6,'Open\x20revision\x20history')}),_0x44c41f['delegate']('execute')['to'](_0x373d99),_0x44c41f['on']('execute',()=>{_0x57b65d['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x58fabf['children']['add'](_0x44c41f),_0xd964af['items']['add'](_0x58fabf),_0x373d99['panelView']['children']['add'](_0xd964af),_0x373d99;}['_showDialog'](){const _0x381561=this['editor'],_0x59199d=_0x381561['locale'],_0x24e27d=_0x381561['plugins']['get']('Dialog'),_0x486700=_0x381561['plugins']['get']('RevisionTracker');function _0x4e0d69(_0x12641c){_0x381561['config']['get']('revisionHistory.requireRevisionName')&&''===_0x12641c['revisionName']?_0x12641c['revisionNameInputView']['errorText']=m(_0x59199d,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x381561['plugins']['get'](h)['saveRevision']({'name':_0x12641c['revisionName']}),_0x24e27d['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x4e0d69(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x24e27d['show']({'id':'revisionSave','title':m(_0x59199d,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x381561['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x24e27d['hide']()},{'label':m(_0x381561['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x50b2a9){_0x50b2a9['bind']('isEnabled')['to'](_0x486700,'isReady',_0x486700,'isEnabled',_0x381561,'isReadOnly',(_0x5312c4,_0x21938a,_0x143f11)=>_0x5312c4&&_0x21938a&&!_0x143f11);},'onExecute':()=>_0x4e0d69(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2a220b=this['editor'],_0x12d551=_0x2a220b['locale'];this['_saveRevisionFormView']=new me(_0x12d551,_0x2a220b['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x2fbdbb{['changeId'];['_model'];constructor(_0x4ae861,_0x148d54){super(_0x4ae861),this['_model']=_0x148d54,this['changeId']=_0x148d54['id'];const _0x453686=this['bindTemplate'],_0xdf6c73=m(_0x4ae861,_0x148d54['data']['isSuggestion']?'Suggested\x20by':'add'==_0x148d54['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x148d54['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x453686['to']('type',_0x18d24a=>'ck-revision-change__'+_0x18d24a)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0xdf6c73}]},{'text':'\x20'+_0x148d54['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0xd36abb(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x169454){super(),this['id']=_0x169454['id']||_0x422234(),this['author']=_0x169454['author'],this['type']=_0x169454['type'],this['data']=_0x169454['data']||{},this['rootName']=_0x169454['rootName'],this['set']('createdAt',_0x169454['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(_0x534f5b,_0x2aae3e){this['newRevisionId']=_0x534f5b,this['oldRevisionId']=_0x2aae3e,this['changes']=new _0xb670b4();}['_setChanges'](_0x292958){for(const _0x4282da of _0x292958)this['changes']['add'](_0x4282da);}}class u extends _0x2a9b7d{['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[_0x58b4bf,_0x5348c1,S,$];}constructor(_0x2ff834){super(_0x2ff834),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',(_0x5c1bb7,_0x22c8a7,_0x38f206)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x43d0c3=>{for(const _0x18b023 of this['editor']['editing']['view']['document']['roots'])_0x38f206?_0x43d0c3['removeClass']('ck-editor__editable__overlay',_0x18b023):_0x43d0c3['addClass']('ck-editor__editable__overlay',_0x18b023);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5086ae=>null!==_0x5086ae),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0xd0ce6e,_0x112427,_0x4ac330)=>_0xd0ce6e&&_0x4ac330?_0x112427['changes']['getIndex'](_0x4ac330):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x410846,_0xe7052c)=>_0x410846?_0xe7052c['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x5348c1);}['init'](){const _0x6f7d10=this['editor'],_0x471348=new rt(_0x6f7d10,{'direction':'backward'}),_0x10952e=new rt(_0x6f7d10,{'direction':'forward'});(_0x6f7d10['commands']['add']('showPreviousChange',_0x471348),_0x6f7d10['commands']['add']('showNextChange',_0x10952e),_0x6f7d10['commands']['add']('restoreRevision',new nt(_0x6f7d10)),this['on']('change:numberOfChanges',()=>{_0x471348['refresh'](),_0x10952e['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x6f7d10['enableReadOnlyMode']('revision-viewer'),_0x6f7d10['plugins']['has']('WidgetToolbarRepository'))&&_0x6f7d10['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x1c3e5f){return await this['_utils']['loadRevisionData'](_0x1c3e5f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1c3e5f);}async['getRevisionRootsAttributes'](_0x305f21){return await this['_utils']['loadRevisionData'](_0x305f21,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x305f21);}async['compare'](_0x49e974,_0x162ad1,_0x1fd60b=!0x1){if(!this['isEnabled'])return;const _0x577973=this['diff'],_0xbcfbe0=this['repository'],_0x52e907='string'==typeof _0x49e974?_0xbcfbe0['getRevision'](_0x49e974):_0x49e974,_0x51a74c='string'==typeof _0x162ad1?_0xbcfbe0['getRevision'](_0x162ad1):_0x162ad1,_0x2ef11e=_0x52e907['id'],_0x7f7808=_0x51a74c?_0x51a74c['id']:null;if(!_0x1fd60b&&this['diff']&&this['diff']['newRevisionId']===_0x2ef11e&&this['diff']['oldRevisionId']===_0x7f7808)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x2ef11e,_0x7f7808);const _0x2f1b3d=this['_getRevisionsRange'](_0x52e907,_0x51a74c,!0x0)['map'](_0x2afa0d=>this['_utils']['loadRevisionData'](_0x2afa0d,this['adapter']));return _0x2f1b3d['push'](new Promise(_0x347de6=>{setTimeout(_0x347de6,0x14);})),Promise['all'](_0x2f1b3d)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x465f85=this['_getDiff'](_0x2ef11e,_0x7f7808);for(const _0x1f7f22 of _0x465f85['changes'])this['_changeIdToChange']['set'](_0x1f7f22['id'],_0x1f7f22);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4c3f2d=>{for(const _0x44f931 of this['editor']['model']['document']['getRootNames']())_0x4c3f2d['detachRoot'](_0x44f931);for(const _0x548d5d of Object['keys'](_0x465f85['model'])){const _0x702b8=_0x4c3f2d['addRoot'](_0x548d5d);for(const _0x51690b of Object['keys'](_0x465f85['attributes'][_0x548d5d]))_0x4c3f2d['setAttribute'](_0x51690b,_0x465f85['attributes'][_0x548d5d][_0x51690b],_0x702b8);_0x4c3f2d['insert'](_0x465f85['model'][_0x548d5d],_0x702b8,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x465f85['changes'])),this['isReady']=!0x0;})['catch'](_0x21f4f1=>{console['error'](_0x21f4f1),this['_cleanUp'](),_0x577973&&(this['diff']=_0x577973),this['isReady']=!0x0;});}['addRevisionData'](_0x405133,_0xb71365){const _0x25c331=this['repository']['createRevision'](_0x405133);return _0x25c331['on']('_update',(_0x27ae7e,_0x252ea3,_0x25c67d)=>_0xb71365(_0x252ea3,_0x25c67d,_0x25c331)),this['repository']['addRevision'](_0x25c331),_0x25c331;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x24c14c=>{for(const _0x41ea26 of this['editor']['model']['document']['getRootNames']())_0x24c14c['detachRoot'](_0x41ea26);});}['_sortAndFilterDiffChanges'](_0x18c979){const _0x4f85fc=[],_0x4922bb=new Map();for(const _0x51e272 of this['editor']['model']['document']['getRootNames']()){const _0x411b2b=this['editor']['editing']['view']['getDomRoot'](_0x51e272);if(!_0x411b2b)continue;const _0x55dd24=_0x411b2b['getClientRects']()['item'](0x0);_0x55dd24&&(_0x4f85fc['push'](_0x51e272),_0x4922bb['set'](_0x51e272,_0x55dd24));}return _0x4f85fc['sort']((_0x1c2565,_0x56092f)=>{const _0x3fc30f=_0x4922bb['get'](_0x1c2565),_0x1f5294=_0x4922bb['get'](_0x56092f);return _0x3fc30f['y']-_0x1f5294['y']||_0x3fc30f['x']-_0x1f5294['x'];}),(_0x18c979=_0x18c979['filter'](_0x3e014d=>_0x4f85fc['includes'](_0x3e014d['rootName'])))['sort']((_0x3beb3f,_0x3a0480)=>_0x4f85fc['indexOf'](_0x3beb3f['rootName'])-_0x4f85fc['indexOf'](_0x3a0480['rootName'])),_0x18c979;}['_makeTape'](_0x3f72aa){const _0x3e3641=Array['from'](_0x3f72aa['markers'])['filter'](([_0x2e5308,_0x4e2a78])=>_0x2e5308['startsWith']('revision:')&&!_0x4e2a78['isCollapsed']),_0x58fa44=Array['from'](this['editor']['model']['createRangeIn'](_0x3f72aa)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3e3641['length'])for(const _0x57d8d7 of _0x58fa44){const [_0x19b374,_0x38713e]=_0x3e3641[0x0],[,_0x43c58f,_0x4290ec]=_0x19b374['split'](':');if(_0x38713e['end']['isEqual'](_0x57d8d7['nextPosition'])&&_0x3e3641['shift'](),(_0x57d8d7['previousPosition']['isEqual'](_0x38713e['start'])||_0x57d8d7['previousPosition']['isAfter'](_0x38713e['start']))&&('insertion'==_0x43c58f?_0x57d8d7['isAdded']={'userId':_0x4290ec}:'deletion'==_0x43c58f&&(_0x57d8d7['isRemoved']={'userId':_0x4290ec})),0x0==_0x3e3641['length'])break;}return _0x58fa44;}['_refreshStartEndIndex'](_0xe6a8b6){const _0x5436d5=new Map();for(let _0x4aca1a=0x0;_0x4aca1a<_0xe6a8b6['length'];_0x4aca1a++)'text'===_0xe6a8b6[_0x4aca1a]['type']?(_0xe6a8b6[_0x4aca1a]['item']['startIndex']=_0x4aca1a,_0xe6a8b6[_0x4aca1a]['item']['endIndex']=_0x4aca1a):('elementStart'===_0xe6a8b6[_0x4aca1a]['type']?_0xe6a8b6[_0x4aca1a]['item']['startIndex']=_0x4aca1a:'elementEnd'===_0xe6a8b6[_0x4aca1a]['type']&&(_0xe6a8b6[_0x4aca1a]['item']['endIndex']=_0x4aca1a),_0x5436d5['set'](_0xe6a8b6[_0x4aca1a]['id'],_0x4aca1a));for(const _0x25ad33 of _0x5436d5['values']())'elementStart'===_0xe6a8b6[_0x25ad33]['type']?_0xe6a8b6[_0x25ad33]['item']['endIndex']=_0x5436d5['get'](_0xe6a8b6[_0x25ad33]['pairId']):'elementEnd'===_0xe6a8b6[_0x25ad33]['type']&&(_0xe6a8b6[_0x25ad33]['item']['startIndex']=_0x5436d5['get'](_0xe6a8b6[_0x25ad33]['pairId']));}['_processTape'](_0x9d3052){for(let _0x3936f6=0x0;_0x3936f6<_0x9d3052['length'];_0x3936f6++){if('elementStart'===_0x9d3052[_0x3936f6]['type'])_0x9d3052[_0x3936f6]['item']['startIndex']=_0x3936f6;else{if('elementEnd'===_0x9d3052[_0x3936f6]['type']){_0x9d3052[_0x3936f6]['item']['endIndex']=_0x3936f6;const _0x168fa6=_0x9d3052[_0x3936f6]['item']['startIndex'];_0x9d3052[_0x168fa6]['pairId']=_0x9d3052[_0x3936f6]['id'],_0x9d3052[_0x3936f6]['pairId']=_0x9d3052[_0x168fa6]['id'];}else _0x9d3052[_0x3936f6]['item']['startIndex']=_0x3936f6,_0x9d3052[_0x3936f6]['item']['endIndex']=_0x3936f6,_0x9d3052[_0x3936f6]['pairId']=null;}_0x9d3052[_0x3936f6]['markersStart']||(_0x9d3052[_0x3936f6]['markersStart']=[],_0x9d3052[_0x3936f6]['markersEnd']=[]);}}['_markInsertions'](_0x636849,_0x756e53){const _0x15c6be=_0x636849['filter'](_0x1bb75a=>!_0x1bb75a['isAdded']);for(let _0xc33882=0x0;_0xc33882<_0x756e53['length'];_0xc33882++)_0x756e53[_0xc33882]['isAdded']&&(_0x15c6be[_0xc33882]['isAdded']=_0x756e53[_0xc33882]['isAdded']);}['_getDiff'](_0x15ef57,_0x4978ec=null){const _0x18f7b6=this['repository']['getRevision'](_0x15ef57),_0x145513=_0x4978ec?this['repository']['getRevision'](_0x4978ec):null,_0x1a00ea=this['_getRevisionsRange'](_0x18f7b6,_0x145513),_0x5e5078=_0x1a00ea[_0x1a00ea['length']-0x1],_0x96c57c=new Map(),_0x28c3db={'model':{},'attributes':{},'changes':[]},_0x31b669=new Set(),_0x28de15=new Map();for(let _0x3befd0=_0x1a00ea['length']-0x1;_0x3befd0>=0x0;_0x3befd0--){const _0x3a5f9e=_0x1a00ea[_0x3befd0];for(const _0x3d231c of Object['keys'](_0x3a5f9e['diffData']))if(_0x3a5f9e['diffData'][_0x3d231c]['attachChange']){const _0x5812ca=_0x3a5f9e['diffData'][_0x3d231c]['attachChange'];_0x5812ca['isAttached']?(_0x31b669['add'](_0x3d231c),_0x28de15['has'](_0x3d231c)&&_0x28de15['get'](_0x3d231c)['userId']==_0x5812ca['userId']?_0x28de15['delete'](_0x3d231c):_0x28de15['set'](_0x3d231c,_0x5812ca)):_0x28de15['has'](_0x3d231c)?(_0x31b669['delete'](_0x3d231c),_0x28de15['delete'](_0x3d231c)):(_0x31b669['add'](_0x3d231c),_0x28de15['set'](_0x3d231c,_0x5812ca));}else _0x31b669['add'](_0x3d231c);}for(const _0x5039c9 of _0x31b669){const _0x3fbbe3=_0x28de15['has'](_0x5039c9)&&!_0x28de15['get'](_0x5039c9)['isAttached'];let _0xd66015=_0x3fbbe3?_0x1a00ea['length']-0x1:0x0;const _0x31f06d=_0x3fbbe3?-0x1:0x1;for(;_0x1a00ea[_0xd66015];){const _0x10fc23=_0x1a00ea[_0xd66015];if(_0x10fc23['diffData'][_0x5039c9]){const _0xbeab10=_0x3fbbe3?_0x10fc23['diffData'][_0x5039c9]['attributesBefore']:_0x10fc23['diffData'][_0x5039c9]['attributesAfter'];_0x28c3db['attributes'][_0x5039c9]=_0xbeab10?_0x4dcfba(_0xbeab10):{};break;}_0xd66015+=_0x31f06d;}}for(const _0x1aa856 of _0x1a00ea){_0x1aa856['model']={};for(const _0x2e6561 of _0x1aa856['authors'])_0x96c57c['set'](_0x2e6561['id'],_0x2e6561);for(const _0xa0741 of _0x31b669){const _0x31e17d=_0x1aa856['diffData'][_0xa0741]?_0x1aa856['diffData'][_0xa0741]['insertions']:'[]',_0x227101=_0x1aa856['diffData'][_0xa0741]?_0x1aa856['diffData'][_0xa0741]['deletions']:'[]';_0x1aa856['model'][_0xa0741]={'insertions':this['_utils']['_makeModelFromViewString'](_0x31e17d),'deletions':this['_utils']['_makeModelFromViewString'](_0x227101)};}}for(const _0x507da1 of _0x31b669){let _0x402871=null,_0x89e456=0x0;const _0x8b043f=new Map(Array['from'](_0x18f7b6['model'][_0x507da1]['insertions']['markers'])['filter'](([_0x5c5279])=>!_0x5c5279['startsWith']('revision:')));let _0x1c37a2=0x0;for(const _0xb38810 of _0x1a00ea){const _0x1a5f72=this['_makeTape'](_0xb38810['model'][_0x507da1]['insertions']);_0xb38810==_0x18f7b6?(_0x402871=_0x1a5f72,_0x89e456=_0x402871['length'],_0x402871['forEach'](_0x56f4ea=>{_0x56f4ea['id']=_0x1c37a2++;}),this['_processTape'](_0x402871)):this['_markInsertions'](_0x402871,_0x1a5f72);const _0xda9ca7=_0x402871['filter'](_0x1afa3a=>!_0x1afa3a['isAdded'])['map'](_0x582d11=>_0x582d11['id']);let _0x4bad14=0x0;const _0x33ddef=this['_makeTape'](_0xb38810['model'][_0x507da1]['deletions']);_0x33ddef['forEach'](_0x18141b=>{_0x18141b['isRemoved']?_0x18141b['id']=_0x89e456++:_0x18141b['id']=_0xda9ca7[_0x4bad14++];}),this['_processTape'](_0x33ddef),this['_setDistance'](_0x402871,'isAdded'),this['_setDistance'](_0x33ddef,'isRemoved'),_0xb38810==_0x18f7b6&&this['_markMarkers'](_0x402871,_0x8b043f),_0x402871=this['_joinTapes'](_0x402871,_0x33ddef),this['_refreshStartEndIndex'](_0x402871),this['_setDistance'](_0x402871,'isRemoved');}_0x402871=_0x402871['filter'](_0xf3d65c=>!(_0xf3d65c['isAdded']&&_0xf3d65c['isRemoved']));const _0x212252=new Map(_0x5e5078['model'][_0x507da1]['deletions']['markers']),_0x136a20=new Set(_0x8b043f['keys']());for(const _0x4c8d21 of _0x212252['keys']())_0x136a20['delete'](_0x4c8d21);this['_markSuggestions'](_0x402871,_0x136a20),this['_fixObsoleteTags'](_0x402871),_0x402871=this['_removeMissingPairs'](_0x402871),_0x402871=this['_markMismatchedRemovedTags'](_0x402871),_0x402871=this['_removeUnsupportedChanges'](_0x402871);const {root:_0x495f9a,changes:_0x407241}=this['_makeModelFromTape'](_0x402871,_0x96c57c,_0x507da1);_0x28c3db['model'][_0x507da1]=_0x495f9a;const _0x4f4ae4=_0x28de15['get'](_0x507da1);if(_0x4f4ae4){const _0x187959=_0x96c57c['get'](_0x4f4ae4['userId']),_0x4724b4=new G({'author':_0x187959,'type':_0x4f4ae4['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x507da1});_0x407241['unshift'](_0x4724b4),_0x28c3db['attributes'][_0x507da1]['revisionHistoryAttachChange']=_0x4724b4['id'];}_0x28c3db['changes']=_0x28c3db['changes']['concat'](_0x407241);}return _0x28c3db;}['_markMarkers'](_0x356b04,_0x1b04fb){for(let _0x285b34=0x0;_0x285b34<_0x356b04['length'];_0x285b34++)for(const [_0x362423,_0x1a696e]of _0x1b04fb)!_0x1a696e['isCollapsed']&&_0x1a696e['start']['isEqual'](_0x356b04[_0x285b34]['previousPosition'])&&_0x356b04[_0x285b34]['markersStart']['push'](_0x362423),_0x1a696e['end']['isEqual'](_0x356b04[_0x285b34]['nextPosition'])&&_0x356b04[_0x285b34]['markersEnd']['push'](_0x362423);}['_joinTapes'](_0x2416d5,_0x23561d){let _0x31144d=[],_0x3cef42=0x0,_0x48e47a=0x0;for(;_0x3cef42<_0x2416d5['length']||_0x48e47a<_0x23561d['length'];){const _0x4d2d2e=_0x2416d5[_0x3cef42]||{},_0x360691=_0x23561d[_0x48e47a]||{};if(_0x4d2d2e['id']==_0x360691['id'])_0x3cef42++,_0x48e47a++,_0x31144d['push'](_0x4d2d2e);else{if(_0x360691['isRemoved']&&_0x4d2d2e['isAdded']){const {commonTape:_0x1e415b,iEnd:_0x5cf1b0,jEnd:_0x573fb3}=this['_threeWayMerge'](_0x2416d5,_0x3cef42,_0x23561d,_0x48e47a);_0x31144d=_0x31144d['concat'](_0x1e415b),_0x3cef42=_0x5cf1b0,_0x48e47a=_0x573fb3;}else _0x360691['isRemoved']?(_0x48e47a++,_0x31144d['push'](_0x360691)):(_0x3cef42++,_0x31144d['push'](_0x4d2d2e));}}return _0x31144d;}['_markSuggestions'](_0x2de346,_0x3603ba){const _0x318668=[];for(let _0x1fbab2=0x0;_0x1fbab2<_0x2de346['length'];_0x1fbab2++){for(let _0x55d132=0x0;_0x55d132<_0x2de346[_0x1fbab2]['markersStart']['length'];_0x55d132++){const _0x407770=_0x2de346[_0x1fbab2]['markersStart'][_0x55d132];if(!_0x3603ba['has'](_0x407770))continue;const {group:_0x1acec7,type:_0x2065f7,authorId:_0x303cfc}=_0x34425a(_0x407770);'revision-suggestion'!=_0x1acec7||'insertion'!=_0x2065f7&&'deletion'!=_0x2065f7||(_0x318668['unshift']({'type':_0x2065f7,'name':_0x407770,'userId':_0x303cfc}),_0x2de346[_0x1fbab2]['markersStart']['splice'](_0x55d132,0x1),_0x55d132--);}_0x4dc872(_0x2de346[_0x1fbab2]);for(let _0x347d31=0x0;_0x347d31<_0x2de346[_0x1fbab2]['markersEnd']['length'];_0x347d31++){const _0x159479=_0x2de346[_0x1fbab2]['markersEnd'][_0x347d31];if(!_0x3603ba['has'](_0x159479))continue;const {group:_0x3e2835,type:_0x8964f7}=_0x34425a(_0x159479);if('revision-suggestion'!=_0x3e2835||'insertion'!=_0x8964f7&&'deletion'!=_0x8964f7)continue;_0x2de346[_0x1fbab2]['markersEnd']['splice'](_0x347d31,0x1),_0x347d31--;const _0x4f27fe=_0x318668['findIndex'](_0x406199=>_0x406199['name']==_0x159479);_0x4f27fe>-0x1&&_0x318668['splice'](_0x4f27fe,0x1);}}function _0x34425a(_0x428f98){const _0x4dac58=_0x428f98['split'](':');return{'group':_0x4dac58[0x0],'type':_0x4dac58[0x1],'subType':_0x4dac58['length']>=0x5?_0x4dac58[0x2]:null,'id':_0x4dac58['length']<0x5?_0x4dac58[0x2]:_0x4dac58[0x3],'authorId':_0x4dac58['length']<0x5?_0x4dac58[0x3]:_0x4dac58[0x4],'markerCount':0x6==_0x4dac58['length']?_0x4dac58[0x5]:null};}function _0x4dc872(_0x43529c){for(let _0x39c1c4=0x0;_0x39c1c4<_0x318668['length'];_0x39c1c4++){if(_0x43529c['isAdded']&&'insertion'==_0x318668[_0x39c1c4]['type']&&_0x43529c['isAdded']['userId']==_0x318668[_0x39c1c4]['userId'])return _0x43529c['isAddSuggestion']=_0x318668[_0x39c1c4],void delete _0x43529c['isAdded'];if(!_0x43529c['isAdded']&&!_0x43529c['isRemoved']&&'deletion'==_0x318668[_0x39c1c4]['type'])return void(_0x43529c['isRemoveSuggestion']=_0x318668[_0x39c1c4]);}}}['_setDistance'](_0x28116e,_0x317305){let _0x5f4c7f=0x0,_0x559bb0=!0x1;const _0x8389bc=new Map();for(const _0x4ac269 of _0x28116e)_0x4ac269[_0x317305]?_0x559bb0&&(_0x5f4c7f++,_0x559bb0=!0x1):(_0x5f4c7f++,_0x559bb0=!0x0),_0x8389bc['set'](_0x4ac269['id'],_0x5f4c7f);for(let _0x3adbc3=0x0;_0x3adbc3<_0x28116e['length'];_0x3adbc3++){if('isRemoved'==_0x317305&&_0x28116e[_0x3adbc3]['isAdded']||'isAdded'==_0x317305&&_0x28116e[_0x3adbc3]['isRemoved'])continue;if('text'==_0x28116e[_0x3adbc3]['type']){_0x28116e[_0x3adbc3]['distance']=0x0;continue;}const _0x10b0b7=_0x8389bc['get'](_0x28116e[_0x3adbc3]['pairId']),_0x48edec=_0x8389bc['get'](_0x28116e[_0x3adbc3]['id']);_0x28116e[_0x3adbc3]['distance']=_0x10b0b7-_0x48edec;}}['_getRevisionsRange'](_0x5cc287,_0x3edb5e,_0x18a64d=!0x1){const _0x10844a=[];let _0x5d075f=this['repository']['getIndex'](_0x5cc287),_0x58577b=this['repository']['getIndex'](_0x3edb5e);for(-0x1==_0x58577b&&(_0x58577b=this['repository']['_revisions']['length'],_0x18a64d=!0x1);_0x5d075f<_0x58577b;)_0x10844a['push'](this['repository']['getRevision'](_0x5d075f)),_0x5d075f++;return _0x18a64d&&_0x10844a['push'](this['repository']['getRevision'](_0x5d075f)),_0x10844a;}['_threeWayMerge'](_0x2a3b86,_0x3ee16d,_0xa560ff,_0x3ba2a0){const _0x41c63d=this['editor']['model']['schema'];let _0x2afd76=_0x3ee16d;for(;_0x2a3b86[_0x2afd76]&&_0x2a3b86[_0x2afd76]['isAdded'];)_0x2afd76++;let _0x2f1cf5=_0x3ba2a0;for(;_0xa560ff[_0x2f1cf5]&&_0xa560ff[_0x2f1cf5]['isRemoved'];)_0x2f1cf5++;_0x3a0d31(_0x2a3b86,_0x3ee16d,_0x2afd76),_0x3a0d31(_0xa560ff,_0x3ba2a0,_0x2f1cf5);const _0x6ed19d=_0xa560ff['slice'](_0x3ba2a0,_0x2f1cf5)['concat'](_0x2a3b86['slice'](_0x3ee16d,_0x2afd76));return _0x6ed19d['sort']((_0x4be819,_0x47d2d4)=>_0x4be819['side']!=_0x47d2d4['side']?_0x4be819['side']-_0x47d2d4['side']:_0x4be819['level']!=_0x47d2d4['level']?_0x4be819['level']-_0x47d2d4['level']:_0x4be819['distance']!=_0x47d2d4['distance']?_0x47d2d4['distance']-_0x4be819['distance']:!!_0x4be819['isAdded']!=!!_0x47d2d4['isAdded']?-0x1==_0x4be819['side']||0x0==_0x4be819['side']?_0x4be819['isAdded']?-0x1:0x1:_0x4be819['isAdded']?0x1:-0x1:_0x4be819['index']-_0x47d2d4['index']),{'commonTape':_0x6ed19d,'iEnd':_0x2afd76,'jEnd':_0x2f1cf5};function _0x3a0d31(_0x3735ed,_0x2d90a0,_0x4590cf){let _0x484d99=-0x1,_0x396609=Number['POSITIVE_INFINITY'],_0x35d7a9=!0x0;for(let _0x4a4258=_0x2d90a0;_0x4a4258<_0x4590cf;_0x4a4258++)if(_0x41c63d['isInline'](_0x3735ed[_0x4a4258]['item'])||(_0x35d7a9=!0x1),_0x3735ed[_0x4a4258]['item']['startIndex']<_0x2d90a0&&(_0x484d99=_0x4a4258),_0x3735ed[_0x4a4258]['item']['endIndex']>=_0x4590cf){_0x396609=_0x4a4258;break;}_0x35d7a9&&(_0x484d99=_0x4590cf-0x1);for(let _0x5da616=_0x2d90a0;_0x5da616<_0x4590cf;_0x5da616++)_0x3735ed[_0x5da616]['side']=_0x5da616<=_0x484d99?-0x1:_0x5da616<_0x396609?0x0:0x1,_0x3735ed[_0x5da616]['index']=_0x5da616;let _0x4a1246=0x0;for(let _0x229c55=_0x2d90a0;_0x229c55<=_0x484d99;_0x229c55++)0x0==_0x3735ed[_0x229c55]['distance']?_0x3735ed[_0x229c55]['level']=_0x4a1246:(_0x4a1246++,_0x3735ed[_0x229c55]['level']=_0x4a1246,_0x4a1246++);for(let _0x40a642=_0x2d90a0;_0x40a642<_0x4590cf;_0x40a642++)0x0==_0x3735ed[_0x40a642]['side']&&(_0x3735ed[_0x40a642]['level']=_0x4a1246);_0x4a1246=0x0;for(let _0x171ccb=_0x4590cf-0x1;_0x171ccb>=_0x396609;_0x171ccb--)0x0==_0x3735ed[_0x171ccb]['distance']?_0x3735ed[_0x171ccb]['level']=_0x4a1246:(_0x4a1246--,_0x3735ed[_0x171ccb]['level']=_0x4a1246,_0x4a1246--);}}['_fixObsoleteTags'](_0x1dcf26){const _0xd48c4b=new Map(),_0x48b80c=this['editor']['model']['schema'];for(let _0x342ccc=0x1;_0x342ccc<_0x1dcf26['length'];_0x342ccc++){let _0x51b522,_0x55f377,_0x366802;const _0x597394=_0x1dcf26[_0x342ccc],_0x30d092=_0x1dcf26[_0x342ccc-0x1];if('text'==_0x597394['type'])continue;if(_0x597394['type']!=_0x30d092['type'])continue;if(!_0x48b80c['isBlock'](_0x30d092['item'])||_0x48b80c['isLimit'](_0x30d092['item']))continue;if(!_0x48b80c['isBlock'](_0x597394['item'])||_0x48b80c['isLimit'](_0x597394['item']))continue;if((_0x1dcf26[_0x342ccc]['isAdded']||_0x1dcf26[_0x342ccc]['isAddSuggestion'])&&_0x1dcf26[_0x342ccc-0x1]['isRemoved'])_0x51b522=_0x1dcf26[_0x342ccc],_0x55f377=_0x1dcf26[_0x342ccc-0x1],_0x366802=_0x342ccc-0x1;else{if(!_0x1dcf26[_0x342ccc]['isRemoved']||!_0x1dcf26[_0x342ccc-0x1]['isAdded']&&!_0x1dcf26[_0x342ccc-0x1]['isAddSuggestion'])continue;_0x51b522=_0x1dcf26[_0x342ccc-0x1],_0x55f377=_0x1dcf26[_0x342ccc],_0x366802=_0x342ccc;}const _0x5d194f=_0x51b522['level']==_0x55f377['level'],_0x53890c=Math['abs'](_0x51b522['level'])<Math['abs'](_0x55f377['level'])&&0x0==_0x55f377['distance'];(_0x5d194f||_0x53890c)&&(_0xd48c4b['set'](_0x55f377['id'],_0x51b522['id']),_0x1dcf26['splice'](_0x366802,0x1),_0x342ccc--,_0x51b522['isAdded']=!0x1);}for(let _0x19a0fd=0x0;_0x19a0fd<_0x1dcf26['length'];_0x19a0fd++)_0xd48c4b['has'](_0x1dcf26[_0x19a0fd]['pairId'])&&(_0x1dcf26[_0x19a0fd]['pairId']=_0xd48c4b['get'](_0x1dcf26[_0x19a0fd]['pairId']));}['_removeMissingPairs'](_0x55017d){const _0x4708e4=new Set(_0x55017d['map'](_0x5f34de=>_0x5f34de['id']));for(let _0x13ba1d=0x0;_0x13ba1d<_0x55017d['length'];_0x13ba1d++)_0x4708e4['has'](_0x55017d[_0x13ba1d]['pairId'])||0x0==_0x55017d[_0x13ba1d]['distance']||(_0x55017d[_0x13ba1d]['isIncorrect']=!0x0);return _0x55017d['filter'](_0x3d8be2=>!_0x3d8be2['isIncorrect']);}['_markMismatchedRemovedTags'](_0x4be8af){const _0x129101=new Set();for(let _0x2aab3d=0x0;_0x2aab3d<_0x4be8af['length'];_0x2aab3d++){if(_0x129101['has'](_0x4be8af[_0x2aab3d]['id'])&&_0x4be8af[_0x2aab3d]['isRemoved']&&(_0x4be8af[_0x2aab3d]['isIncorrect']=!0x0),_0x4be8af[_0x2aab3d]['isIncorrect'])continue;if(0x0==_0x4be8af[_0x2aab3d]['distance'])continue;if('elementStart'!=_0x4be8af[_0x2aab3d]['type'])continue;if(null==_0x4be8af[_0x2aab3d]['pairId'])continue;let _0x3a059c=_0x2aab3d+0x1,_0x1e0e22=0x0;for(;_0x4be8af[_0x3a059c]['id']!=_0x4be8af[_0x2aab3d]['pairId'];)'elementStart'==_0x4be8af[_0x3a059c]['type']?_0x1e0e22++:'elementEnd'==_0x4be8af[_0x3a059c]['type']&&_0x1e0e22--,_0x3a059c++;if(0x0!=_0x1e0e22){if(_0x4be8af[_0x2aab3d]['isRemoved'])_0x4be8af[_0x2aab3d]['isIncorrect']=!0x0;else{for(;_0x3a059c!=_0x2aab3d;)_0x4be8af[_0x3a059c]['isRemoved']&&0x0!=_0x4be8af[_0x3a059c]['distance']&&(_0x4be8af[_0x3a059c]['isIncorrect']=!0x0,_0x129101['add'](_0x4be8af[_0x3a059c]['pairId'])),_0x3a059c--;}}}return _0x4be8af['filter'](_0x22bcac=>!_0x22bcac['isIncorrect']);}['_removeUnsupportedChanges'](_0x3f001e){const _0x4df80f=this['editor']['model']['schema'];for(let _0x215c32=0x0;_0x215c32<_0x3f001e['length'];_0x215c32++){if(!(_0x3f001e[_0x215c32]['isAdded']||_0x3f001e[_0x215c32]['isAddSuggestion']||_0x3f001e[_0x215c32]['isRemoved']||_0x3f001e[_0x215c32]['isRemoveSuggestion']))continue;if(0x0==_0x3f001e[_0x215c32]['distance'])continue;const _0x372d4c=_0x3f001e[_0x215c32]['item'];_0x4df80f['isBlock'](_0x372d4c)||_0x4df80f['isLimit'](_0x372d4c)||(_0x3f001e[_0x215c32]['isAdded']&&delete _0x3f001e[_0x215c32]['isAdded'],_0x3f001e[_0x215c32]['isAddSuggestion']&&delete _0x3f001e[_0x215c32]['isAddSuggestion'],_0x3f001e[_0x215c32]['isRemoveSuggestion']&&delete _0x3f001e[_0x215c32]['isRemoveSuggestion'],_0x3f001e[_0x215c32]['isRemoved']&&(_0x3f001e[_0x215c32]['isIncorrect']=!0x0));}return _0x3f001e['filter'](_0x50b5fd=>!_0x50b5fd['isIncorrect']);}['_makeModelFromTape'](_0x458291,_0xe946e1,_0x1c2fed){const _0x3872bf=new _0x4acc47(),_0x1b540e=[],_0x56d2b8=new Map(),_0x2bf693=this['editor']['model'],_0x1a8fc5=_0x2bf693['schema'],_0x47ced2=[_0x3872bf],_0x428226={},_0x2eddde={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5541e7=null;const _0x351add=[0x0];for(let _0x39e31d=0x0;_0x39e31d<_0x458291['length'];_0x39e31d++)if('elementStart'===_0x458291[_0x39e31d]['type']){_0x458291[_0x39e31d]['previousPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add);const _0x54332d=new _0x514734(_0x458291[_0x39e31d]['item']['name'],_0x458291[_0x39e31d]['item']['getAttributes']());_0x47ced2[0x0]['_appendChild'](_0x54332d),_0x351add['push'](0x0),_0x47ced2['unshift'](_0x54332d),_0x458291[_0x39e31d]['nextPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add);}else'elementEnd'===_0x458291[_0x39e31d]['type']?(_0x47ced2['shift'](),_0x458291[_0x39e31d]['previousPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add),_0x351add['pop'](),_0x351add[_0x351add['length']-0x1]++,_0x458291[_0x39e31d]['nextPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add)):(_0x458291[_0x39e31d]['previousPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add),_0x5541e7?_0x5541e7['_data']+=_0x458291[_0x39e31d]['item']['data']:_0x5541e7=new _0x299020(_0x458291[_0x39e31d]['item']['data'],_0x458291[_0x39e31d]['item']['getAttributes']()),_0x458291[_0x39e31d+0x1]&&'text'===_0x458291[_0x39e31d+0x1]['type']&&_0x5abf12(_0x5541e7,_0x458291[_0x39e31d+0x1]['item'])||(_0x47ced2[0x0]['_appendChild'](_0x5541e7),_0x5541e7=null),_0x351add[_0x351add['length']-0x1]+=_0x458291[_0x39e31d]['item']['offsetSize'],_0x458291[_0x39e31d]['nextPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add));for(let _0x6e672f=0x0;_0x6e672f<_0x458291['length'];_0x6e672f++){const _0x15690d=_0x458291[_0x6e672f]['previousPosition'],_0x64be0e=_0x458291[_0x6e672f]['nextPosition'];for(const _0x30c140 of _0x458291[_0x6e672f]['markersStart'])_0x56d2b8['set'](_0x30c140,{'start':_0x15690d,'end':null});_0x3b3aba('isRemoveSuggestion',_0x6e672f,_0x15690d,_0x64be0e),_0x3b3aba('isAddSuggestion',_0x6e672f,_0x15690d,_0x64be0e),_0x3b3aba('isRemoved',_0x6e672f,_0x15690d,_0x64be0e),_0x3b3aba('isAdded',_0x6e672f,_0x15690d,_0x64be0e);for(const _0x4f7dbf of _0x458291[_0x6e672f]['markersEnd']){const _0x2f008a=_0x56d2b8['get'](_0x4f7dbf);_0x2f008a?_0x2f008a['end']=_0x64be0e:_0x56d2b8['set'](_0x4f7dbf,{'start':_0x64be0e,'end':_0x64be0e});}}for(const [_0x40101f,_0x1d413d]of _0x56d2b8){const _0x3831a4=this['editor']['model']['createRange'](_0x1d413d['start'],_0x1d413d['end']);_0x3872bf['markers']['set'](_0x40101f,_0x3831a4);}return _0x1b540e['sort']((_0xac0f19,_0x236875)=>{const _0x30789c=_0x3872bf['markers']['get']('revision:'+_0xac0f19['id']),_0x103bff=_0x3872bf['markers']['get']('revision:'+_0x236875['id']);return _0x30789c['start']['isBefore'](_0x103bff['start'])?-0x1:_0x30789c['start']['isAfter'](_0x103bff['start'])?0x1:_0x30789c['end']['isBefore'](_0x103bff['end'])?-0x1:_0x30789c['end']['isAfter'](_0x103bff['end'])?0x1:'add'===_0xac0f19['type']?-0x1:0x1;}),{'root':_0x3872bf,'changes':_0x1b540e};function _0x3b3aba(_0x221622,_0x27726e,_0x205c45,_0x38b96b){const _0x40be45=!!_0x458291[_0x27726e][_0x221622],_0x2bce37=_0x40be45?_0x458291[_0x27726e][_0x221622]['userId']:null,_0x41c1ab=_0x27726e===_0x458291['length']-0x1,_0x1ea2cc=_0x2eddde[_0x221622][0x0],_0x4a21a2=_0x1a8fc5['isObject'](_0x458291[_0x27726e]['item']);!_0x428226[_0x221622]&&_0x40be45?_0x428226[_0x221622]={'start':_0x205c45,'tapeItem':_0x458291[_0x27726e],'userId':_0x2bce37,'type':_0x221622}:_0x428226[_0x221622]&&!_0x40be45?(_0x428226[_0x221622]['end']=_0x205c45,_0x40ff05(_0x428226[_0x221622]),_0x428226[_0x221622]=null):_0x428226[_0x221622]&&_0x40be45&&_0x428226[_0x221622]['userId']!==_0x2bce37&&(_0x428226[_0x221622]['end']=_0x205c45,_0x1ea2cc&&_0x1ea2cc['userId']===_0x428226[_0x221622]['userId']||_0x40ff05(_0x428226[_0x221622]),_0x428226[_0x221622]={'start':_0x205c45,'tapeItem':_0x458291[_0x27726e],'userId':_0x2bce37,'type':_0x221622}),_0x428226[_0x221622]&&_0x4a21a2&&('elementStart'!==_0x458291[_0x27726e]['type']||_0x1ea2cc&&_0x1ea2cc['userId']===_0x2bce37||_0x2eddde[_0x221622]['unshift']({'userId':_0x2bce37,'object':_0x458291[_0x27726e]['item'],'change':_0x428226[_0x221622]}),'elementEnd'===_0x458291[_0x27726e]['type']&&_0x1ea2cc&&_0x1ea2cc['object']===_0x458291[_0x27726e]['item']&&(_0x2eddde[_0x221622]['shift'](),_0x428226[_0x221622]=_0x1ea2cc['change'])),_0x428226[_0x221622]&&_0x41c1ab&&(_0x428226[_0x221622]['end']=_0x38b96b,_0x40ff05(_0x428226[_0x221622]),_0x428226[_0x221622]=null);}function _0x40ff05({start:_0x264b95,end:_0x3b71a9,tapeItem:_0x3639b8,userId:_0x1bbef7,type:_0x40d2a7}){const _0x226732=_0x3639b8['item'],_0xe75561=_0x2bf693['schema']['isBlock'](_0x226732)&&!_0x2bf693['schema']['isLimit'](_0x226732),_0x56a990=_0x264b95['nodeAfter']==_0x3b71a9['parent']&&_0x3b71a9['isAtStart'];if(_0xe75561&&_0x56a990)return;const _0x3728e5=_0x2bf693['createRange'](_0x264b95,_0x3b71a9),_0x52d40b=_0xe946e1['get'](_0x1bbef7),_0x653fbe=new G({'author':_0x52d40b,'type':'isAdded'==_0x40d2a7||'isAddSuggestion'==_0x40d2a7?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x40d2a7||'isRemoveSuggestion'==_0x40d2a7},'createdAt':new Date(),'rootName':_0x1c2fed});_0x1b540e['push'](_0x653fbe),_0x3872bf['markers']['set']('revision:'+_0x653fbe['id'],_0x3728e5);}function _0x5abf12(_0x39b714,_0x312bcb){const _0x1d51af=_0x39b714['getAttributes'](),_0x560189=_0x312bcb['getAttributes']();for(const _0x4013ff of _0x1d51af){if(_0x4013ff[0x1]!==_0x312bcb['getAttribute'](_0x4013ff[0x0]))return!0x1;_0x560189['next']();}return _0x560189['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xd40e44=>{const _0x177df4=_0xd40e44['markerName']['split'](':')[0x1],_0x53e614=this['_getChangeFromId'](_0x177df4);if(!_0x53e614)return null;const _0xa859bb='add'==_0x53e614['type']?'insertion':'deletion',_0xcdd4ab=['ck-suggestion-marker','ck-suggestion-marker-'+_0xa859bb];return _0x53e614['data']['isSuggestion']&&_0xcdd4ab['push']('ck-suggestion-marker-'+_0xa859bb+'-new'),this['activeChange']==_0x53e614&&_0xcdd4ab['push']('ck-suggestion-marker--active'),{'classes':_0xcdd4ab,'attributes':{'data-change-id':_0x177df4}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x25315d=>{_0x25315d['on']('element:pre',(_0x48646e,_0x8c654e,_0x32e5c0)=>{const _0x402aa8=_0x8c654e['viewItem']['getChild'](0x0);if(!_0x402aa8||!_0x402aa8['is']('element','code'))return;if(!_0x32e5c0['consumable']['consume'](_0x402aa8,{'attributes':['vid_start','vid_end']}))return;const _0x3a0248=_0x8c654e['modelRange']['start']['nodeAfter'];_0x32e5c0['writer']['setAttribute']('vid_start',_0x402aa8['getAttribute']('vid_start'),_0x3a0248),_0x32e5c0['writer']['setAttribute']('vid_end',_0x402aa8['getAttribute']('vid_end'),_0x3a0248);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x21539d=>{_0x21539d['on']('element',(_0x147a12,_0x26a8e1,_0x5a7254)=>{if(!_0x5a7254['consumable']['consume'](_0x26a8e1['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x26a8e1['modelRange']['isCollapsed'])return;const _0x2ac968=_0x26a8e1['modelRange']['start']['nodeAfter'];_0x2ac968['hasAttribute']('vid_start')||_0x2ac968['hasAttribute']('vid')||(_0x5a7254['writer']['setAttribute']('vid_start',_0x26a8e1['viewItem']['getAttribute']('vid_start'),_0x2ac968),_0x5a7254['writer']['setAttribute']('vid_end',_0x26a8e1['viewItem']['getAttribute']('vid_end'),_0x2ac968));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x5783d6=>_0x5783d6['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3f00ef,[,_0x366e75])=>{['vid_start','vid_end','vid']['includes'](_0x366e75)&&(_0x3f00ef['return']=!0x0,_0x3f00ef['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x123b7e=>{_0x123b7e['on']('attribute:vid',(_0x204d49,_0xc7370c,_0x1aecd8)=>{if('\x20'!=_0xc7370c['item']['data']||_0xc7370c['item']['parent']['maxOffset']>0x1)return;if(!_0x1aecd8['consumable']['consume'](_0xc7370c['item'],_0x204d49['name']))return;const _0x132e35=_0x1aecd8['writer'],_0x51a4b8=_0x1aecd8['mapper']['toViewRange'](_0xc7370c['range']);_0x132e35['wrap'](_0x51a4b8,_0x132e35['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x1af80a){const _0xd91353=_0x1af80a['plugins']['get']('RevisionViewer');return(_0x16f66a,_0x534345,_0x1374a8)=>{const _0x150ee6=_0x534345['markerName']['split'](':')[0x1],_0x2c909b=_0xd91353['_getChangeFromId'](_0x150ee6);if(!_0x2c909b)return null;const _0x270642='add'==_0x2c909b['type']?'split':'merge';if(!_0x1374a8['consumable']['test'](_0x534345['markerRange'],_0x16f66a['name']))return;const _0x28be93=_0x534345['markerRange']['getWalker'](),_0x47b4a4=_0x534345['markerRange']['start'],_0x276ae1=_0x1af80a['model']['schema'];let _0x195429=null,_0x37679b=null,_0x5e1017=!0x1,_0x532ff9=!0x1;for(const _0x5559a7 of _0x28be93){const _0x3c64ee=_0x5559a7['item'];_0x5e1017=_0x5e1017||_0x276ae1['isContent'](_0x3c64ee);const _0x50b279=_0x1374a8['mapper']['toViewElement'](_0x3c64ee);if(_0x50b279&&_0x50b279['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5559a7['type']&&(_0x276ae1['isBlock'](_0x3c64ee)&&!_0x276ae1['isLimit'](_0x3c64ee)&&(_0x3c64ee['nextSibling']||_0x47b4a4['isAtEnd']?_0x195429&&_0x195429['parent']==_0x3c64ee||(_0x195429=_0x3c64ee,_0x2fd5dd(_0x5559a7['previousPosition']),_0x532ff9=!0x0):_0x37679b=_0x37679b||_0x5559a7['previousPosition']));}function _0x2fd5dd(_0x2f5b26){const _0x5b68cc=_0x1374a8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x270642}),_0x248cd1=_0x1374a8['mapper']['toViewPosition'](_0x2f5b26);_0x2c909b['data']['isSuggestion']&&_0x1374a8['writer']['addClass']('ck-suggestion-marker-'+_0x270642+'-new',_0x5b68cc),_0xd91353['activeChange']==_0x2c909b&&_0x1374a8['writer']['addClass']('ck-suggestion-marker--active',_0x5b68cc),_0x1374a8['writer']['insert'](_0x248cd1,_0x5b68cc),_0x1374a8['mapper']['bindElementToMarker'](_0x5b68cc,_0x534345['markerName']);}_0x5e1017||_0x532ff9||!_0x37679b||_0x2fd5dd(_0x37679b);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x26fb69,_0x370ddc,_0x3455e6)=>{const _0x1f6a76=_0x3455e6['mapper']['markerNameToElements'](_0x370ddc['markerName']);if(_0x1f6a76){for(const _0x472c59 of _0x1f6a76)(_0x472c59['hasClass']('ck-suggestion-marker-split')||_0x472c59['hasClass']('ck-suggestion-marker-merge'))&&(_0x3455e6['mapper']['unbindElementFromMarkerName'](_0x472c59,_0x370ddc['markerName']),_0x3455e6['writer']['remove'](_0x472c59));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4e0bbc,_0x1b9a2e,_0x1ab5f6)=>{const _0x13d55e=_0x1b9a2e['markerName']['split'](':')[0x1],_0x1a3b4a=this['_getChangeFromId'](_0x13d55e);if(!_0x1a3b4a)return null;const _0x4a2897='add'==_0x1a3b4a['type']?'split':'merge';if(_0x1ab5f6['consumable']['test'](_0x1b9a2e['markerRange'],_0x4e0bbc['name']))for(const _0x1df915 of _0x1b9a2e['markerRange']['getItems']()){if(!_0x1df915['is']('element','softBreak'))continue;const _0x358a3e=_0x1ab5f6['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4a2897}),_0xb66c07=_0x1ab5f6['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1df915));_0x1a3b4a['data']['isSuggestion']&&_0x1ab5f6['writer']['addClass']('ck-suggestion-marker-'+_0x4a2897+'-new',_0x358a3e),this['activeChange']==_0x1a3b4a&&_0x1ab5f6['writer']['addClass']('ck-suggestion-marker--active',_0x358a3e),_0x1ab5f6['writer']['insert'](_0xb66c07,_0x358a3e),_0x1ab5f6['mapper']['bindElementToMarker'](_0x358a3e,_0x1b9a2e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x32b303=>{for(const _0x4771ee of this['editor']['model']['document']['getRootNames']()){const _0x41f686=this['editor']['model']['document']['getRoot'](_0x4771ee),_0x1f8ffa=this['editor']['editing']['view']['document']['getRoot'](_0x4771ee);if(_0x1f8ffa){const _0x39d87b=_0x41f686['getAttribute']('revisionHistoryAttachChange');if(_0x32b303['removeAttribute']('data-change-id',_0x1f8ffa),_0x32b303['removeClass']('ck-revision-history-root-add',_0x1f8ffa),_0x32b303['removeClass']('ck-revision-history-root-remove',_0x1f8ffa),_0x32b303['removeClass']('ck-revision-history-root--active',_0x1f8ffa),_0x39d87b){const _0x591b49=this['_getChangeFromId'](_0x39d87b);if(!_0x591b49)return null;_0x32b303['setAttribute']('data-change-id',_0x39d87b,_0x1f8ffa),_0x32b303['addClass']('ck-revision-history-root-'+_0x591b49['type'],_0x1f8ffa),this['activeChange']==_0x591b49&&_0x32b303['addClass']('ck-revision-history-root--active',_0x1f8ffa);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x305a10=>'revision-comment:'+_0x305a10,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3b3c85=>'revision-suggestion:'+_0x3b3c85,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4dc5bc=>({'name':'suggestion:'+_0x4dc5bc,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3d64df=>{const _0x57c5fb=_0x3d64df['markerName']['split'](':')[0x1];return'insertion'!=_0x57c5fb&&'deletion'!=_0x57c5fb?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x57c5fb]};}}),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',(_0x262263,_0x2b03c4,_0x11b7fd)=>{const _0x115b57=_0x11b7fd['mapper']['markerNameToElements'](_0x2b03c4['markerName']);if(_0x115b57){for(const _0x450a40 of _0x115b57)_0x450a40['is']('uiElement')&&(_0x11b7fd['mapper']['unbindElementFromMarkerName'](_0x450a40,_0x2b03c4['markerName']),_0x11b7fd['writer']['remove'](_0x450a40));}},{'priority':'high'});}['_getChangeFromId'](_0x54316f){return this['_changeIdToChange']['get'](_0x54316f);}['_getViewForChange'](_0x4962fd){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x4962fd),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2acad7,_0x298f32,_0x35a455,_0x4ff93e)=>{_0x4ff93e&&this['_balloon']['remove'](_0x4ff93e),_0x35a455&&(this['_balloon']['add']({'view':_0x35a455,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x4f7189=this['editor']['editing'],_0x5649b8=this['_getChangeFromId'](_0x35a455['changeId']);let _0x8d140a;if(_0x5649b8['data']['isOnRoot']){const _0x3833d7=_0x4f7189['view']['getDomRoot'](_0x5649b8['rootName']);_0x8d140a=Array['from'](_0x3833d7['getClientRects']());}else{const _0x50521f=this['editor']['model']['markers']['get']('revision:'+_0x35a455['changeId']);_0x8d140a=Array['from'](_0x4f7189['mapper']['markerNameToElements'](_0x50521f['name']))['map'](_0x4020dc=>_0x4f7189['view']['domConverter']['mapViewToDom'](_0x4020dc))['map'](_0x94a090=>Array['from'](_0x94a090['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x8d140a[0x0];return _0x8d140a['find'](_0x44017e=>_0x44017e['top']-0x3<=this['_activeViewTarget']['y']&&_0x44017e['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x44017e['left']-0x3<=this['_activeViewTarget']['x']&&_0x44017e['right']+0x3>=this['_activeViewTarget']['x'])||_0x8d140a[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2e1b56,_0x12b3dd,_0x5440fc,_0x3f7c59)=>{this['activeView']=_0x5440fc?this['_getViewForChange'](_0x5440fc):null,this['editor']['model']['change'](()=>{const _0x1785a3=this['editor']['editing'];_0x3f7c59&&(_0x3f7c59['data']['isOnRoot']?_0x1785a3['view']['change'](_0x28d1a5=>{_0x28d1a5['removeClass']('ck-revision-history-root--active',_0x1785a3['view']['document']['getRoot'](_0x3f7c59['rootName']));}):_0x1785a3['reconvertMarker']('revision:'+_0x3f7c59['id'])),_0x5440fc&&(_0x5440fc['data']['isOnRoot']?_0x1785a3['view']['change'](_0x3679b8=>{_0x3679b8['addClass']('ck-revision-history-root--active',_0x1785a3['view']['document']['getRoot'](_0x5440fc['rootName']));}):_0x1785a3['reconvertMarker']('revision:'+_0x5440fc['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x2d7df6,_0x50a1fc)=>{if(this['activeChange'])return;const _0x4c15d0=this['_findChangeIdFromDomTarget'](_0x50a1fc['target']),_0x574b61=this['_changeIdToChange']['get'](_0x4c15d0);_0x574b61?(this['_activeViewTarget']={'x':_0x50a1fc['domEvent']['x'],'y':_0x50a1fc['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x574b61)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2a63c0,_0x51166b)=>{const _0x56db1c=this['_findChangeIdFromDomTarget'](_0x51166b['target']),_0x1afad3=this['_changeIdToChange']['get'](_0x56db1c);_0x1afad3?(this['_activeViewTarget']={'x':_0x51166b['domEvent']['x'],'y':_0x51166b['domEvent']['y']},_0x1afad3===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1afad3):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x34a4f5){do{const _0x5470ab=_0x34a4f5['getAttribute']('data-change-id');if(_0x5470ab)return _0x5470ab;_0x34a4f5=_0x34a4f5['parent'];}while(_0x34a4f5);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x34606f=>{for(const _0xb38f53 of this['editor']['model']['markers'])_0x34606f['removeMarker'](_0xb38f53);});}}function Q(_0x2c51fb,_0x9dc499){return(_0x3b1422,_0xb3577f,_0x56e896)=>{if(!_0x56e896['consumable']['test'](_0xb3577f['markerRange'],_0x3b1422['name']))return;const _0x2c39c8=_0xb3577f['markerRange']['getWalker'](),_0x555d5c=_0xb3577f['markerRange']['start'],_0x108d2e=_0x2c51fb['model']['schema'];let _0x303b21=null,_0x56f5fb=null,_0x364c42=!0x1,_0x822189=!0x1;for(const _0x32e806 of _0x2c39c8){const _0x3537de=_0x32e806['item'];_0x364c42=_0x364c42||_0x108d2e['isContent'](_0x3537de);const _0x4eac78=_0x56e896['mapper']['toViewElement'](_0x3537de);if(_0x4eac78&&_0x4eac78['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x32e806['type']&&(_0x108d2e['isBlock'](_0x3537de)&&!_0x108d2e['isLimit'](_0x3537de)&&(_0x3537de['nextSibling']||_0x555d5c['isAtEnd']?_0x303b21&&_0x303b21['parent']==_0x3537de||(_0x303b21=_0x3537de,_0x46ed70(_0x32e806['previousPosition']),_0x822189=!0x0):_0x56f5fb=_0x56f5fb||_0x32e806['previousPosition']));}function _0x46ed70(_0x470e14){const _0x32b357=_0x56e896['mapper']['toViewPosition'](_0x470e14),_0x214a62=_0x56e896['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x9dc499});_0x56e896['writer']['insert'](_0x32b357,_0x214a62),_0x56e896['mapper']['bindElementToMarker'](_0x214a62,_0xb3577f['markerName']);}_0x364c42||_0x822189||!_0x56f5fb||_0x46ed70(_0x56f5fb);};}class nt extends _0x30167c{constructor(_0x2f5e15){super(_0x2f5e15);const _0x9d5dd0=_0x2f5e15['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x9d5dd0,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x9d5dd0,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x41b0d4=this['editor'],_0x1a9591=_0x41b0d4['plugins']['get'](u),_0x58da4c=_0x1a9591['isReady']?_0x1a9591['diff']['newRevisionId']:null;_0x41b0d4['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x58da4c);}['refresh'](){const {isReady:_0x14399b,isEnabled:_0x4bbed6,repository:_0x1e83ee,diff:_0x35bbc8}=this['editor']['plugins']['get'](u),_0x1dd409=_0x35bbc8&&_0x1e83ee['getLaterVisibleRevision'](_0x35bbc8['newRevisionId']);this['isEnabled']=_0x14399b&&_0x4bbed6&&Boolean(_0x1dd409);}}class rt extends _0x30167c{['_step'];constructor(_0x4ff8fb,{direction:_0x598e9b}){super(_0x4ff8fb);const _0x38fa42=_0x4ff8fb['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x598e9b?0x1:-0x1,this['listenTo'](_0x38fa42,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x38fa42,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x38fa42,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x39b2b6=this['editor'],_0x6c0d1a=_0x39b2b6['plugins']['get'](u),{isNavigationMode:_0x5e24ba,currentChangeNumber:_0x564c46}=_0x6c0d1a;let _0xb29ea8;if(_0x6c0d1a['activeChange']=_0x5e24ba?_0x6c0d1a['diff']['changes']['get'](_0x564c46+this['_step']):_0x6c0d1a['diff']['changes']['first'],_0x6c0d1a['activeChange']['data']['isOnRoot'])_0xb29ea8=_0x39b2b6['editing']['view']['getDomRoot'](_0x6c0d1a['activeChange']['rootName']);else{const _0x44b0e5=_0x39b2b6['model']['markers']['get']('revision:'+_0x6c0d1a['activeChange']['id']);_0xb29ea8=_0x17a5a7(_0x39b2b6['editing'],_0x44b0e5);}_0x2ef4fe({'target':_0xb29ea8,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x20afc6,currentChangeNumber:_0x3ddf33,numberOfChanges:_0x2615bd,isReady:_0x2ff075,isEnabled:_0x10a86c}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x10a86c&&_0x2ff075&&_0x2615bd)&&(!_0x20afc6||(0x1===this['_step']?_0x3ddf33<_0x2615bd-0x1:_0x3ddf33>0x0));}}class fi extends _0x2fbdbb{constructor(_0x665c97){super(_0x665c97);const _0x595cf9=this['bindTemplate'],_0x4e41bf=new _0x4eab8d(_0x665c97),_0x3fb768=new _0x4eab8d(_0x665c97);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',(_0x3f64d1,_0x20fed0)=>_0x3f64d1&&_0x20fed0>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x5ec4eb,_0x5da4eb,_0x4ff256,_0x19f8df)=>{if(!_0x5ec4eb)return m(_0x665c97,'Loading...');if(!_0x4ff256)return m(_0x665c97,'No\x20changes');const _0x317801=m(_0x665c97,'NUMBER_OF_CHANGES',_0x4ff256);return _0x19f8df?m(_0x665c97,'X_OF_Y_CHANGES',[_0x5da4eb+0x1,_0x4ff256]):_0x317801;}),_0x4e41bf['set']({'label':m(_0x665c97,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x158305}),_0x3fb768['set']({'label':m(_0x665c97,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x921695}),_0x4e41bf['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x3fb768['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x4e41bf['on']('execute',()=>this['fire']('execute','backward')),_0x3fb768['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',_0x595cf9['if']('_isStatusLabelVisible','ck-hidden',_0x38840c=>!_0x38840c)]},'children':[{'text':_0x595cf9['to']('isNavigationMode',_0x79ba1a=>_0x79ba1a?m(_0x665c97,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x665c97,'Total')+':\x20')}]},{'text':_0x595cf9['to']('_statusText')}]},new _0x5b896a(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x4e41bf,_0x3fb768]}]});}}const ge='ck-editor__editable__loading-overlay';class bi extends _0x2a9b7d{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x37ffdb=this['editor']['editing']['view'];_0x37ffdb['change'](_0x366de4=>{for(const _0x37e8ad of _0x37ffdb['document']['roots'])_0x366de4['addClass'](ge,_0x37e8ad);});}['hide'](){const _0x155753=this['editor']['editing']['view'];_0x155753['change'](_0x28e226=>{for(const _0x3d6cad of _0x155753['document']['roots'])_0x28e226['removeClass'](ge,_0x3d6cad);});}}class v extends _0x2a9b7d{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,bi];}['init'](){const _0x751e08=this['editor'],_0x1dbd63=_0x751e08['plugins']['get'](u),_0xbe0914=_0x751e08['plugins']['get'](bi);_0x751e08['ui']['componentFactory']['add']('exitToEditing',_0x4d6901=>{const _0xf6ab28=new _0x4eab8d(_0x4d6901);return _0xf6ab28['set']({'label':m(_0x4d6901,'Back\x20to\x20editing'),'icon':_0x1bee30,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xf6ab28,'execute',()=>{_0x751e08['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xf6ab28;}),_0x751e08['ui']['componentFactory']['add']('restoreRevision',_0x546a23=>{const _0x4c7721=new _0x4eab8d(_0x546a23);return _0x4c7721['set']({'label':m(_0x546a23,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4c7721['bind']('isEnabled')['to'](_0x751e08['commands']['get']('restoreRevision')),this['listenTo'](_0x4c7721,'execute',()=>_0x751e08['execute']('restoreRevision')),_0x4c7721;}),_0x751e08['ui']['componentFactory']['add']('changesNavigation',_0x1df14c=>{const _0x5eb0d8=new fi(_0x1df14c),_0x281315=_0x751e08['commands']['get']('showPreviousChange'),_0x502450=_0x751e08['commands']['get']('showNextChange');return _0x5eb0d8['bind']('isBackwardNavigationEnabled')['to'](_0x281315,'isEnabled'),_0x5eb0d8['bind']('isForwardNavigationEnabled')['to'](_0x502450,'isEnabled'),_0x5eb0d8['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x1dbd63),this['listenTo'](_0x5eb0d8,'execute',(_0x1ccab5,_0x36adae)=>{_0x751e08['execute']('forward'===_0x36adae?'showNextChange':'showPreviousChange');}),_0x5eb0d8;}),_0xbe0914['show'](),_0x1dbd63['on']('change:isReady',(_0x57d566,_0x3e12e1,_0x139891)=>{_0x139891?_0xbe0914['hide']():_0xbe0914['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x8b3abb,_0x101b3e){super(_0x8b3abb,_0x101b3e);const _0x349b04=this['bindTemplate'];this['set']({'label':m(_0x8b3abb,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x8b3abb,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x349b04['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 _0x46b030=this['fieldView']['element'];this['_tooltipString']=_0x46b030['scrollWidth']>_0x46b030['clientWidth']&&_0x46b030['value']||'';}}class ni extends _0x2fbdbb{constructor(_0x5a146b,_0x189cb8,_0x211ea8){super(_0x5a146b);const _0x2bdd8d=new _0x11835d();_0x2bdd8d['set']({'content':_0x81b85e,'viewBox':'0\x200\x2011\x2010'});const _0x36a4d6=['ck','ck-revision-history-sidebar__revision-author'];_0x211ea8&&_0x36a4d6['push']('ck-revision-history-sidebar__revision-author_creator');const _0xb6daf1=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x5a146b,_0x211ea8?'Revision\x20creator':'Revision\x20author')},'children':[_0x2bdd8d,_0x189cb8['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x36a4d6},'children':_0xb6daf1});}}function ai(_0x472e2c,_0x1751a5){const _0x3f6db9=_0x472e2c['bindTemplate'],_0x2ac332=_0x472e2c['locale'],_0x1f8307=_0x255985(_0x2ac332);_0x1f8307['panelPosition']='sw';const _0x571a38=function(_0x5464c8,_0x3627c1){const _0x2db66f=function(_0x1960e9,_0x39705b){const _0xc61ace=_0x1960e9['locale'],_0x21d07a={'Compare\x20against\x20selected':m(_0xc61ace,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0xc61ace,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0xc61ace,'Restore\x20this\x20revision')};return _0x39705b['map'](_0x6d8ff2=>{const _0xc216ac=_0x21d07a[_0x6d8ff2['name']];return _0xc216ac&&_0xc216ac!==_0x6d8ff2['name']&&(_0x6d8ff2['name']=_0xc216ac),_0x6d8ff2;});}(_0x5464c8,_0x3627c1),_0x13401b=new _0xb670b4();for(const _0x10d517 of _0x2db66f){const _0x4b2a45={'type':'button','model':new to({'label':_0x10d517['name'],'class':_0x10d517['class'],'withText':!0x0,'role':'menuitem','_action':_0x10d517['action']})};_0x4b2a45['model']['bind']('isEnabled')['to'](_0x5464c8,'isActionsDropdownOpen',_0x1e460f=>'function'!=typeof _0x10d517['isEnabled']||(!_0x1e460f||_0x10d517['isEnabled'](_0x5464c8))),_0x13401b['add'](_0x4b2a45);}return _0x13401b;}(_0x472e2c,_0x1751a5);return _0x472e2c['bind']('isActionsDropdownOpen')['to'](_0x1f8307,'isOpen'),_0x1f8307['buttonView']['set']({'label':m(_0x2ac332,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x187a75}),_0x1f8307['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3f6db9['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3f6db9['to'](_0x402b00=>_0x402b00['stopPropagation']())}}),_0x1f8307['on']('execute',_0x19eba8=>{_0x472e2c['isReady']&&'function'==typeof _0x19eba8['source']['_action']&&_0x19eba8['source']['_action'](_0x472e2c);}),_0x3e03fc(_0x1f8307,_0x571a38,{'role':'menu'}),_0x1f8307['listenTo'](_0x472e2c,'change:isActionsDropdownOpen',(_0x339499,_0x5b45fd,_0x328e8a)=>{if(_0x328e8a)for(const _0x2b1411 of _0x1f8307['listView']['items']){const _0x299324=_0x2b1411['children']['first'],_0x4dad89=_0x1751a5['find'](_0x4daec6=>_0x4daec6['action']===_0x299324['_action'])['isVisible'];_0x2b1411['isVisible']=void 0x0===_0x4dad89||_0x4dad89(_0x472e2c);}}),_0x1f8307;}class _i extends/* #__PURE__ -- @preserve */
27
+ _0x2a2f44(_0x2fbdbb){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x1195ee,_0xe8431c,_0x2ed573,_0x56b97c){super(_0x1195ee);const _0x461ab2=this['bindTemplate'],_0x5d6ec0=function(_0x3582b7,_0x58e427){const _0x44e85b=Array['from'](_0x58e427['authors'])['filter'](_0x2b1d0f=>_0x2b1d0f!=_0x58e427['creator']);return _0x58e427['creator']&&_0x44e85b['unshift'](_0x58e427['creator']),_0x44e85b['map'](_0x680430=>new ni(_0x3582b7,_0x680430,_0x680430==_0x58e427['creator']));}(_0x1195ee,_0xe8431c);this['id']=_0xe8431c['id'],this['_revision']=_0xe8431c,this['_requireRevisionName']=_0x56b97c,this['bind']('name','createdAt')['to'](_0xe8431c),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x199456=>{return _0x5d5bd8=_0x1195ee['uiLanguage'],(_0x5b9269=_0x199456)['toLocaleDateString'](_0x5d5bd8,{'month':'long','day':'numeric'})+',\x20'+_0x5b9269['toLocaleTimeString'](_0x5d5bd8,{'hour':'numeric','minute':'numeric'});var _0x5d5bd8,_0x5b9269;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x1195ee,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3d0c06=>_0x3d0c06||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x59adb3,_0x48b1fe)=>_0x59adb3&&_0x48b1fe),this['revisionActionsView']=_0x2ed573&&_0x2ed573['length']?ai(this,_0x2ed573):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x461ab2['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x461ab2['if']('isEnabled','ck-disabled',_0xc5b958=>!_0xc5b958),_0x461ab2['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x461ab2['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x461ab2['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':_0x461ab2['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':_0x5d6ec0}]},this['revisionActionsView']],'on':{'click':_0x461ab2['to'](_0x50d2c8=>{_0x50d2c8['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4c4564=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4c4564,'change',()=>{this['_requireRevisionName']&&!_0x4c4564['value']||this['fire']('setName',{'id':this['id'],'name':_0x4c4564['value']}),_0x4c4564['value']||(_0x4c4564['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ki(_0x382e38,_0x22ea52){const _0x2bfdb7=_0x5c8801['fromJSDate'](_0x382e38)['setLocale'](_0x22ea52),_0x5b98d8=_0x5c8801['local'](),_0x18db60=_0x5b98d8['minus']({'days':0x1})['startOf']('day');let _0x21bd33,_0x57d6b8;return _0x2bfdb7['hasSame'](_0x5b98d8,'day')?(_0x21bd33=_0x2bfdb7['startOf']('day')['toJSDate'](),_0x57d6b8=_0x2bfdb7['toRelativeCalendar']()):_0x2bfdb7['hasSame'](_0x18db60,'day')?(_0x21bd33=_0x18db60['toJSDate'](),_0x57d6b8=_0x2bfdb7['toRelativeCalendar']()):_0x2bfdb7['hasSame'](_0x5b98d8,'week')?(_0x21bd33=_0x2bfdb7['startOf']('week')['toJSDate'](),_0x57d6b8=_0x2bfdb7['weekdayLong']||''):_0x2bfdb7['hasSame'](_0x5b98d8,'year')?(_0x21bd33=_0x2bfdb7['startOf']('month')['toJSDate'](),_0x57d6b8=_0x2bfdb7['monthLong']||''):(_0x21bd33=_0x2bfdb7['startOf']('year')['toJSDate'](),_0x57d6b8=String(_0x2bfdb7['year'])),{'startDate':_0x21bd33,'localizedPeriodName':_0x57d6b8};}class ji extends _0x2fbdbb{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x8cbcc,_0x4171fd,_0xde6d89,_0x5bd73e){super(_0x8cbcc);const _0x2eb437=ki(_0x4171fd,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4171fd,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0xde6d89,this['_requireRevisionName']=_0x5bd73e,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':_0x2eb437}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2e1704){const _0x4f578d=new _i(this['locale'],_0x2e1704,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4f578d);}['removeRevision'](_0x27e340){const _0x1291dd=this['revisionViews']['find'](_0x5916d5=>_0x5916d5['id']===_0x27e340['id']);this['revisionViews']['remove'](_0x1291dd);}}class Ni extends _0x2fbdbb{constructor(_0x87268f){super(_0x87268f);const _0x4faa28=new _0x11835d();_0x4faa28['content']=_0x1c8430,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x4faa28,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x87268f,'Revision\x20history')]}]});}}class Ri extends _0x2fbdbb{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x5db2a0,_0x35cef4,_0x152497,_0x3f64ad){super(_0x5db2a0);const _0x51f04e=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x35cef4,this['_revisionActions']=_0x152497,this['_requireRevisionName']=_0x3f64ad,this['on']('select',(_0x12d8f2,_0x43fbcd)=>{this['fire']('revisionSelected',_0x43fbcd);}),this['on']('setName',(_0x51af46,_0x4580aa)=>{this['fire']('revisionSetName',_0x4580aa);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Ni(_0x5db2a0),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x51f04e['if']('isEnabled','ck-disabled',_0x21f3a9=>!_0x21f3a9)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x16587d of this['_revisions'])this['_addRevision'](_0x16587d);this['_revisions']['on']('add',(_0x3ca6aa,_0x2c6cc4)=>{this['_addRevision'](_0x2c6cc4);}),this['_revisions']['on']('remove',(_0x3d8947,_0x27a794)=>{this['_removeRevision'](_0x27a794);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x4e76c6=>_0x4e76c6['revisionViews']['map'](_0xa840e5=>_0xa840e5))['flat']();}['selectRevision'](_0x3064d6){for(const _0x5113ee of this['revisionViews'])_0x3064d6&&_0x3064d6['id']===_0x5113ee['id']?_0x5113ee['select']():_0x5113ee['deselect']();}['highlightRevisions'](_0x20ef33){for(const _0xf8223f of this['revisionViews'])_0x20ef33['some'](({id:_0x596f99})=>_0x596f99===_0xf8223f['id'])?_0xf8223f['highlight']():_0xf8223f['unhighlight']();}['_addRevision'](_0x53232a){const _0x326328=ki(_0x53232a['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5199cb=this['timePeriodViews']['get'](0x0);_0x5199cb&&_0x5199cb['startDate']['getTime']()===_0x326328['getTime']()||(_0x5199cb=new ji(this['locale'],_0x326328,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5199cb)),_0x5199cb['addRevision'](_0x53232a);}['_removeRevision'](_0x3f611f){const _0x32ca1c=ki(_0x3f611f['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x32ca1c)['removeRevision'](_0x3f611f);}['_getTimePeriodViewByStartDate'](_0x5620aa){return this['timePeriodViews']['find'](_0x5ea57b=>_0x5ea57b['startDate']['getTime']()===_0x5620aa['getTime']());}}class d extends _0x2a9b7d{['_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(_0x1d26b5){super(_0x1d26b5),this['_revisionViewer']=_0x1d26b5['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x53a97b=this['_revisionsRepository']['_revisions'],_0x54f33f=this['_createRevisionActions'](),_0x1ad657=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x53a97b,_0x54f33f,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',(_0x10a9d5,_0x1a86d5)=>{_0x1a86d5['revisionViews']['on']('add',(_0x74c87c,_0x4b0baa)=>{_0x4b0baa['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)),_0x1ad657['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x34f2ee=this['_revisionsRepository']['getRevision'](0x0);if(_0x34f2ee){const _0x29798d=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x34f2ee['id']);this['_revisionViewer']['compare'](_0x34f2ee,_0x29798d);}}['_handleRevisionSelected'](_0x10ad42,_0x37d8e7){const _0x189bf9=this['_revisionsRepository']['getRevision'](_0x37d8e7['id']),_0x4c6cf7=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x189bf9['id']);this['_revisionViewer']['compare'](_0x189bf9,_0x4c6cf7);}['_handleRevisionSetName'](_0x378f74,_0x19d6b1){this['_revisionsRepository']['getRevision'](_0x19d6b1['id'])['setName'](_0x19d6b1['name']);}['_handleDiffChange'](_0x3b5cfa,_0x3f6977,_0x566517){const _0x2b3315=this['_revisionsRepository']['getRevisionsInDiff'](_0x566517);_0x2b3315['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x2b3315),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x2b3315[0x0]));}['_createRevisionActions'](){const _0x2185af=this['editor'],_0x5cb0e2=d['availableRevisionActions'],_0x4da214=_0x2185af['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x4da214['length'])return _0x4da214['map'](_0x185b4d=>{const _0x4a568c='string'==typeof _0x185b4d?Object['assign']({},_0x5cb0e2[_0x185b4d]):_0x185b4d;return _0x4a568c['action']=_0x4a568c['action']['bind'](this,_0x2185af),_0x4a568c['isVisible']&&(_0x4a568c['isVisible']=_0x4a568c['isVisible']['bind'](this,_0x2185af)),_0x4a568c;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x3c35ee},_0xe4d9d3)=>{const _0x3f2b64=_0x3c35ee['get'](u),_0x5a2c9e=_0x3f2b64['repository'];let _0x162ffc=_0x3f2b64['diff']['newRevisionId'],_0x57c410=_0xe4d9d3['id'];_0x5a2c9e['getIndex'](_0x162ffc)>_0x5a2c9e['getIndex'](_0x57c410)&&([_0x162ffc,_0x57c410]=[_0x57c410,_0x162ffc]),_0x3f2b64['compare'](_0x162ffc,_0x57c410);},'isVisible':({plugins:_0x1619ca},_0x439454)=>{const _0x6500f1=_0x1619ca['get'](u);return!(_0x6500f1['repository']['getRevisionsInDiff'](_0x6500f1['diff'])['length']>0x2)&&!_0x439454['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1cce4c,{id:_0x4802f1})=>{_0x1cce4c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4802f1);},'isVisible':({plugins:_0x1303a6},_0x300620)=>!!_0x1303a6['get'](u)['repository']['getLaterVisibleRevision'](_0x300620['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x23d91f},{id:_0x3eadec,revisionNameView:_0x394ab7})=>{const _0xee499e=_0x23d91f['get'](u),_0x21ab76=_0xee499e['repository']['getEarlierVisibleRevision'](_0x3eadec);_0xee499e['compare'](_0x3eadec,_0x21ab76),_0x394ab7['focus'](),_0x394ab7['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x2c5342,_0x273800){super(_0x2c5342),this['_view']=_0x273800,this['_toolbarConfig']=st(_0x2c5342['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x28e675){const _0x49cb4e=this['editor'],_0x593088=this['view'],_0x470406=_0x49cb4e['editing']['view'],_0x2638a5=_0x593088['editable'],_0x5cd2ac=_0x470406['document']['getRoot']();_0x2638a5['name']=_0x5cd2ac['rootName'],_0x593088['render']();const _0x1ef509=_0x2638a5['element'];this['setEditableElement'](_0x2638a5['name'],_0x1ef509),_0x593088['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x470406['attachDomRoot'](_0x1ef509),this['_elementReplacer']['replace'](_0x28e675,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x4e7c99=this['view'],_0x4ab439=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4ab439['detachDomRoot'](_0x4e7c99['editable']['name']),_0x4e7c99['destroy']();}['_initToolbar'](){const _0x20d86e=this['view'];_0x20d86e['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x20d86e['stickyPanel']['limiterElement']=_0x20d86e['element'],_0x20d86e['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x26294a})=>_0x26294a),_0x20d86e['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x20d86e['toolbar']);}}class ii extends _0x3f7a17{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x9044b9,_0x55fe36,_0x40356c={}){super(_0x9044b9),this['stickyPanel']=new _0x53a95a(_0x9044b9),this['toolbar']=new _0x1045b4(_0x9044b9,{'shouldGroupWhenFull':_0x40356c['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x9044b9,_0x55fe36);}['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
- _0x34d85b(_0x2d6d51){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x3b3d5f,_0x1c706e){super(_0x1c706e),this['sourceElement']=_0x3b3d5f,this['model']['document']['createRoot']();const _0x202790=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x202790);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x3232ec,_0x2e8088){const _0x46c36d=new this(_0x3232ec,_0x2e8088);return await _0x46c36d['initPlugins'](),await _0x46c36d['ui']['init'](_0x3232ec),await _0x46c36d['data']['init'](_0x46c36d['config']['get']('initialData')||''),_0x46c36d['fire']('ready'),_0x46c36d;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class ht extends _0x398bff{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x62467){function _0x3073dd(_0x5720e3){return _0x5720e3['map'](_0x2975b5=>String['fromCharCode'](_0x2975b5))['join']('');}super(_0x62467),this['result']='end',_0x62467[_0x3073dd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3073dd([0x76,0x69,0x65,0x77])][_0x3073dd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3073dd([0x61,0x75,0x74,0x6f]),_0x62467[_0x3073dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3073dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3073dd([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3073dd([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3073dd([0x6f,0x6b])});}}class ct extends _0x398bff{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x4ea253){if(super(_0x4ea253),!this['editor']['config']['get']('revisionHistory'))throw new _0x1189ad('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x309f20=>this['_showRevisionViewer']({..._0x309f20,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1212cc=>this['_closeRevisionViewer'](_0x1212cc)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1dd66a=>this['_restoreRevision'](_0x1dd66a)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x7a120f){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x7a120f;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x43a515){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x43a515);}['getRevision'](_0x3c8afc){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3c8afc);}['getRevisions'](_0x291f3b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x291f3b||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x6bb57d=this['editor'],_0xc8409e=_0x598230(_0x6bb57d,p),_0x9bbc25=_0x6bb57d['plugins']['get']('RevisionTracker'),_0x661bb5=_0x6bb57d['plugins']['get']('Users')['users'];return _0xc8409e['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0xc8409e['lazyRoots'],(_0xc8409e['plugins']['push'](ht,u,v,class extends _0x398bff{static get['requires'](){return[u,'Users'];}['init'](){const _0xf52c9c=this['editor']['plugins']['get']('Users');for(const _0x54206f of _0x661bb5)_0x54206f['isAnonymous']||_0xf52c9c['getUser'](_0x54206f['id'])||_0xf52c9c['addUser'](_0x54206f);const _0x5790ef=_0x9bbc25['repository']['getRevisions']();let _0x3f52cc=null;const _0x1a2207=this['editor']['plugins']['get']('RevisionViewer');_0x1a2207['adapter']=_0x9bbc25['adapter'],_0x1a2207['bind']('isEnabled')['to'](_0x9bbc25),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x6bb57d,'isReadOnly',_0x57f9c6=>!_0x57f9c6);for(const _0x1c3d5c of _0x5790ef){const _0xb1402e=null===_0x1c3d5c['creator'];if(_0xb1402e&&_0x1c3d5c['toVersion']===_0x1c3d5c['fromVersion'])continue;const _0x26d197=_0x1c3d5c['toJSON']();_0x1a2207['addRevisionData'](_0x26d197,(_0x1bfb01,_0x14b48b,_0x42bd0a)=>{if(_0xb1402e){if(_0x3f52cc)_0x3f52cc['_update'](_0x1bfb01,_0x14b48b);else{if(!_0x14b48b){const _0x2ada29=_0x42bd0a['toJSON']();_0x2ada29['id']=_0x44f97c(),_0x9bbc25['saveRevision'](_0x2ada29,_0x42bd0a['toVersion'])['then'](_0x42d215=>{_0x3f52cc=_0x42d215;});}}}else _0x1c3d5c['_update'](_0x1bfb01,_0x14b48b);});}}},d),_0xc8409e);}['_enhanceShowRevisionViewerCallback'](){const _0x515ef4=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x46cc04=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x2fcbfb=this['editor']['plugins']['get']('Autosave');await _0x2fcbfb['save']();}else await _0x46cc04['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1fde01=this['editor']['plugins']['get']('Dialog');_0x1fde01['isOpen']&&_0x1fde01['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x1b5736=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4b579f of _0x1b5736)_0x4b579f['class']=_0x4b579f['class']?_0x4b579f['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x4db368=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4db368&&_0x4db368['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x656b8d=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x656b8d&&_0x656b8d['setAttribute']('tabindex','-1');}}const _0x328fd1=this['_getRevisionViewerEditorConfig']();return _0x515ef4(_0x328fd1)['then'](_0x8af40e=>{return(this['_viewerEditor']=_0x8af40e,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'),_0x8af40e);})['catch'](_0x452715=>(console['error'](_0x452715),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x2ceab4=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 _0x1bbfba=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3aafba of _0x1bbfba)_0x3aafba['class']='ck-tab-panel_disabled'===_0x3aafba['class']?'':_0x3aafba['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x1f43cc=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x1f43cc&&_0x1f43cc['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x538a42=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x538a42&&_0x538a42['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x2ceab4(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x5ea452=this['editor']['plugins']['get']('Annotations');_0x5ea452['refreshVisibility'](),_0x5ea452['refreshPositioning']();}});});}['_showRevisionViewer'](_0x71fe6b){const _0x196277=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x120797=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0xa5537d=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0xa5537d,_0x71fe6b)['then'](_0x3c5a9d=>(_0x120797['style']['display']='block',_0x196277['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3c5a9d));}['_closeRevisionViewer'](_0x5c85e8){const _0x8fc184=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x8fc184['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x5c85e8['destroy']();}async['_restoreRevision'](_0x5d518a){const _0x8c7962=this['editor'],_0x2a25b4=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x865573=_0x8c7962['plugins']['get']('RevisionTracker'),_0x3847a1=_0x8c7962['plugins']['get']('RevisionHistoryUtils'),_0x12bc93=_0x2a25b4['repository']['getRevision'](_0x5d518a);let _0x567b86,_0x974db0,_0x1c9e68;try{await _0x3847a1['loadRevisionData'](_0x12bc93,this['adapter']),_0x567b86=_0x3847a1['getRevisionDocumentData'](_0x12bc93),_0x974db0=_0x3847a1['getRevisionRootsAttributes'](_0x12bc93);}catch(_0x47a68c){return void console['error'](_0x47a68c);}_0x8c7962['model']['change'](_0x5eb05=>{for(const _0x194add of Array['from'](_0x8c7962['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5eb05['removeMarker'](_0x194add);}),_0x2a25b4['isReady']=!0x1,_0x8c7962['model']['enqueueChange'](_0x29de72=>{_0x29de72['setSelection'](null),_0x29de72['removeSelectionAttribute'](_0x8c7962['model']['document']['selection']['getAttributeKeys']());const _0x1e7134=Object['keys'](_0x567b86);for(const _0x2e2cfe of _0x8c7962['model']['document']['roots'])'$graveyard'!=_0x2e2cfe['rootName']&&_0x2e2cfe['isAttached']()&&!_0x1e7134['includes'](_0x2e2cfe['rootName'])&&_0x29de72['detachRoot'](_0x2e2cfe);for(const _0x46d096 of _0x1e7134){let _0x5c4300=_0x8c7962['model']['document']['getRoot'](_0x46d096);_0x5c4300&&_0x5c4300['isAttached']()||(_0x5c4300=_0x29de72['addRoot'](_0x46d096));const _0x37c9f8=_0x974db0[_0x46d096],_0x4146da=Object['keys'](_0x37c9f8),_0x2cf665=_0x567b86[_0x46d096];for(const _0x395c4e of _0x5c4300['getAttributeKeys']())_0x4146da['includes'](_0x395c4e)||_0x29de72['removeAttribute'](_0x395c4e,_0x5c4300);for(const _0x412099 of _0x4146da)_0x29de72['setAttribute'](_0x412099,_0x974db0[_0x46d096][_0x412099],_0x5c4300);_0x29de72['remove'](_0x29de72['createRangeIn'](_0x5c4300)),_0x29de72['insert'](_0x8c7962['data']['parse'](_0x2cf665,_0x5c4300),_0x5c4300,0x0);}});const _0x53ef14=m(_0x8c7962['locale'],'Restored');if(_0x12bc93['name'])_0x1c9e68=-0x1==_0x12bc93['name']['indexOf'](_0x53ef14)?_0x53ef14+':\x20'+_0x12bc93['name']:_0x12bc93['name'];else _0x1c9e68=_0x53ef14+':\x20'+(_0x12bc93['createdAt']['toLocaleDateString'](_0x8c7962['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x12bc93['createdAt']['toLocaleTimeString'](_0x8c7962['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x865573['saveRevision']({'name':_0x1c9e68}),_0x2a25b4['isReady']=!0x0,_0x8c7962['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,ht as RevisionViewerIntegration,ji as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,rt as ShowChangeCommand};
29
+ at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x3585e8){super(_0x3585e8),this['_revisionViewer']=_0x3585e8['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x102f3f=this['_revisionsRepository']['_revisions'],_0x588ee6=this['_createRevisionActions'](),_0x4df98d=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Ri(this['editor']['locale'],_0x102f3f,_0x588ee6,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',(_0x445932,_0x91b964)=>{_0x91b964['revisionViews']['on']('add',(_0x18fe02,_0x26d237)=>{_0x26d237['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)),_0x4df98d['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x2bff78=this['_revisionsRepository']['getRevision'](0x0);if(_0x2bff78){const _0x1b455e=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2bff78['id']);this['_revisionViewer']['compare'](_0x2bff78,_0x1b455e);}}['_handleRevisionSelected'](_0x263fd3,_0x10fead){const _0x493c30=this['_revisionsRepository']['getRevision'](_0x10fead['id']),_0x3a58ee=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x493c30['id']);this['_revisionViewer']['compare'](_0x493c30,_0x3a58ee);}['_handleRevisionSetName'](_0x1a68fe,_0xae25e1){this['_revisionsRepository']['getRevision'](_0xae25e1['id'])['setName'](_0xae25e1['name']);}['_handleDiffChange'](_0x5ab7f7,_0x5481a1,_0x35da7c){const _0x167bba=this['_revisionsRepository']['getRevisionsInDiff'](_0x35da7c);_0x167bba['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x167bba),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x167bba[0x0]));}['_createRevisionActions'](){const _0x5de635=this['editor'],_0x4d04e1=d['availableRevisionActions'],_0x419a53=_0x5de635['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x419a53['length'])return _0x419a53['map'](_0x46d62b=>{const _0xa766a2='string'==typeof _0x46d62b?Object['assign']({},_0x4d04e1[_0x46d62b]):_0x46d62b;return _0xa766a2['action']=_0xa766a2['action']['bind'](this,_0x5de635),_0xa766a2['isVisible']&&(_0xa766a2['isVisible']=_0xa766a2['isVisible']['bind'](this,_0x5de635)),_0xa766a2;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x3ba620},_0x143d8d)=>{const _0x3ca7cf=_0x3ba620['get'](u),_0x177e5b=_0x3ca7cf['repository'];let _0x409a67=_0x3ca7cf['diff']['newRevisionId'],_0x247a0e=_0x143d8d['id'];_0x177e5b['getIndex'](_0x409a67)>_0x177e5b['getIndex'](_0x247a0e)&&([_0x409a67,_0x247a0e]=[_0x247a0e,_0x409a67]),_0x3ca7cf['compare'](_0x409a67,_0x247a0e);},'isVisible':({plugins:_0x4f43a5},_0x21b692)=>{const _0x22e0bd=_0x4f43a5['get'](u);return!(_0x22e0bd['repository']['getRevisionsInDiff'](_0x22e0bd['diff'])['length']>0x2)&&!_0x21b692['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x768ad5,{id:_0x1f3875})=>{_0x768ad5['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1f3875);},'isVisible':({plugins:_0x3f9adc},_0x48c1ff)=>!!_0x3f9adc['get'](u)['repository']['getLaterVisibleRevision'](_0x48c1ff['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4d0c23},{id:_0x3c919a,revisionNameView:_0x1e35a8})=>{const _0x31f054=_0x4d0c23['get'](u),_0x2ae337=_0x31f054['repository']['getEarlierVisibleRevision'](_0x3c919a);_0x31f054['compare'](_0x3c919a,_0x2ae337),_0x1e35a8['focus'](),_0x1e35a8['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x527374,_0x1b70d4){super(_0x527374),this['_view']=_0x1b70d4,this['_toolbarConfig']=st(_0x527374['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x8c137d){const _0x390660=this['editor'],_0x34aa3c=this['view'],_0xde0413=_0x390660['editing']['view'],_0x5741ce=_0x34aa3c['editable'],_0x4c8aa7=_0xde0413['document']['getRoot']();_0x5741ce['name']=_0x4c8aa7['rootName'],_0x34aa3c['render']();const _0x47a6e9=_0x5741ce['element'];this['setEditableElement'](_0x5741ce['name'],_0x47a6e9),_0x34aa3c['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xde0413['attachDomRoot'](_0x47a6e9),this['_elementReplacer']['replace'](_0x8c137d,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x341755=this['view'],_0x18beb1=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x18beb1['detachDomRoot'](_0x341755['editable']['name']),_0x341755['destroy']();}['_initToolbar'](){const _0x3e1783=this['view'];_0x3e1783['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3e1783['stickyPanel']['limiterElement']=_0x3e1783['element'],_0x3e1783['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x3579fa})=>_0x3579fa),_0x3e1783['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3e1783['toolbar']);}}class ii extends _0x365cb2{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x2b5fef,_0x3e6dcb,_0x4515d9={}){super(_0x2b5fef),this['stickyPanel']=new _0x4ad34d(_0x2b5fef),this['toolbar']=new _0x532d93(_0x2b5fef,{'shouldGroupWhenFull':_0x4515d9['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x2b5fef,_0x3e6dcb);}['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
+ _0x25ed20(_0x3f7344){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5baec4,_0x3b9c0d){super(_0x3b9c0d),this['sourceElement']=_0x5baec4,this['model']['document']['createRoot']();const _0x136d4c=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x136d4c);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x96496,_0x3aa189){const _0x431ea4=new this(_0x96496,_0x3aa189);return await _0x431ea4['initPlugins'](),await _0x431ea4['ui']['init'](_0x96496),await _0x431ea4['data']['init'](_0x431ea4['config']['get']('initialData')||''),_0x431ea4['fire']('ready'),_0x431ea4;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class ht extends _0x2a9b7d{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47a36c){function _0x22b5bd(_0x3c2c4b){return _0x3c2c4b['map'](_0x568d75=>String['fromCharCode'](_0x568d75))['join']('');}super(_0x47a36c),this['result']='end',_0x47a36c[_0x22b5bd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x22b5bd([0x76,0x69,0x65,0x77])][_0x22b5bd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x22b5bd([0x61,0x75,0x74,0x6f]),_0x47a36c[_0x22b5bd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x22b5bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x22b5bd([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x22b5bd([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x22b5bd([0x6f,0x6b])});}}class ct extends _0x2a9b7d{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x5d206f){if(super(_0x5d206f),!this['editor']['config']['get']('revisionHistory'))throw new _0x2c2824('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x252766=>this['_showRevisionViewer']({..._0x252766,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1a5ea2=>this['_closeRevisionViewer'](_0x1a5ea2)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xb179bd=>this['_restoreRevision'](_0xb179bd)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x54e0f3){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x54e0f3;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x29558c){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x29558c);}['getRevision'](_0x1f972f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1f972f);}['getRevisions'](_0x1ef9ce){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1ef9ce||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x373a86=this['editor'],_0xf123d0=_0x23fc3b(_0x373a86,p),_0x25111b=_0x373a86['plugins']['get']('RevisionTracker'),_0x498d92=_0x373a86['plugins']['get']('Users')['users'];return _0xf123d0['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0xf123d0['lazyRoots'],(_0xf123d0['plugins']['push'](ht,u,v,class extends _0x2a9b7d{static get['requires'](){return[u,'Users'];}['init'](){const _0x3de849=this['editor']['plugins']['get']('Users');for(const _0x5d7c2d of _0x498d92)_0x5d7c2d['isAnonymous']||_0x3de849['getUser'](_0x5d7c2d['id'])||_0x3de849['addUser'](_0x5d7c2d);const _0x89d63c=_0x25111b['repository']['getRevisions']();let _0x51368f=null;const _0x11538f=this['editor']['plugins']['get']('RevisionViewer');_0x11538f['adapter']=_0x25111b['adapter'],_0x11538f['bind']('isEnabled')['to'](_0x25111b),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x373a86,'isReadOnly',_0x5e08c2=>!_0x5e08c2);for(const _0x3d64ec of _0x89d63c){const _0x5a1c09=null===_0x3d64ec['creator'];if(_0x5a1c09&&_0x3d64ec['toVersion']===_0x3d64ec['fromVersion'])continue;const _0xc55406=_0x3d64ec['toJSON']();_0x11538f['addRevisionData'](_0xc55406,(_0x2c5c8e,_0x4f17f1,_0x33eba8)=>{if(_0x5a1c09){if(_0x51368f)_0x51368f['_update'](_0x2c5c8e,_0x4f17f1);else{if(!_0x4f17f1){const _0x3872b0=_0x33eba8['toJSON']();_0x3872b0['id']=_0x422234(),_0x25111b['saveRevision'](_0x3872b0,_0x33eba8['toVersion'])['then'](_0x453da3=>{_0x51368f=_0x453da3;});}}}else _0x3d64ec['_update'](_0x2c5c8e,_0x4f17f1);});}}},d),_0xf123d0);}['_enhanceShowRevisionViewerCallback'](){const _0x2c306c=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x34e889=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x597acc=this['editor']['plugins']['get']('Autosave');await _0x597acc['save']();}else await _0x34e889['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x3bc733=this['editor']['plugins']['get']('Dialog');_0x3bc733['isOpen']&&_0x3bc733['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x19e629=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x49d6ba of _0x19e629)_0x49d6ba['class']=_0x49d6ba['class']?_0x49d6ba['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x333be5=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x333be5&&_0x333be5['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x378c23=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x378c23&&_0x378c23['setAttribute']('tabindex','-1');}}const _0x35d9f9=this['_getRevisionViewerEditorConfig']();return _0x2c306c(_0x35d9f9)['then'](_0x193a93=>{return(this['_viewerEditor']=_0x193a93,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'),_0x193a93);})['catch'](_0x968b0=>(console['error'](_0x968b0),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x40032d=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 _0x5cc0b0=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x30ad09 of _0x5cc0b0)_0x30ad09['class']='ck-tab-panel_disabled'===_0x30ad09['class']?'':_0x30ad09['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0xf2512=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0xf2512&&_0xf2512['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x2292cb=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x2292cb&&_0x2292cb['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x40032d(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x31bd93=this['editor']['plugins']['get']('Annotations');_0x31bd93['refreshVisibility'](),_0x31bd93['refreshPositioning']();}});});}['_showRevisionViewer'](_0x1d1610){const _0x13a789=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2d228c=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x445277=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x445277,_0x1d1610)['then'](_0x7e7a5=>(_0x2d228c['style']['display']='block',_0x13a789['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x7e7a5));}['_closeRevisionViewer'](_0x38d49b){const _0x149f0e=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x149f0e['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x38d49b['destroy']();}async['_restoreRevision'](_0x111c0e){const _0x3b681c=this['editor'],_0x1bb713=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x455379=_0x3b681c['plugins']['get']('RevisionTracker'),_0x2991aa=_0x3b681c['plugins']['get']('RevisionHistoryUtils'),_0x458657=_0x1bb713['repository']['getRevision'](_0x111c0e);let _0x24fee9,_0x109aa3,_0x519552;try{await _0x2991aa['loadRevisionData'](_0x458657,this['adapter']),_0x24fee9=_0x2991aa['getRevisionDocumentData'](_0x458657),_0x109aa3=_0x2991aa['getRevisionRootsAttributes'](_0x458657);}catch(_0x40a9d7){return void console['error'](_0x40a9d7);}_0x3b681c['model']['change'](_0x1f0667=>{for(const _0x3db264 of Array['from'](_0x3b681c['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1f0667['removeMarker'](_0x3db264);}),_0x1bb713['isReady']=!0x1,_0x3b681c['model']['enqueueChange'](_0xe651af=>{_0xe651af['setSelection'](null),_0xe651af['removeSelectionAttribute'](_0x3b681c['model']['document']['selection']['getAttributeKeys']());const _0x341fd9=Object['keys'](_0x24fee9);for(const _0x3f3c7c of _0x3b681c['model']['document']['roots'])'$graveyard'!=_0x3f3c7c['rootName']&&_0x3f3c7c['isAttached']()&&!_0x341fd9['includes'](_0x3f3c7c['rootName'])&&_0xe651af['detachRoot'](_0x3f3c7c);for(const _0x37cb7c of _0x341fd9){let _0x429781=_0x3b681c['model']['document']['getRoot'](_0x37cb7c);_0x429781&&_0x429781['isAttached']()||(_0x429781=_0xe651af['addRoot'](_0x37cb7c));const _0x1845e3=_0x109aa3[_0x37cb7c],_0x5ab733=Object['keys'](_0x1845e3),_0x237fc5=_0x24fee9[_0x37cb7c];for(const _0x28aa04 of _0x429781['getAttributeKeys']())_0x5ab733['includes'](_0x28aa04)||_0xe651af['removeAttribute'](_0x28aa04,_0x429781);for(const _0xdfb3b5 of _0x5ab733)_0xe651af['setAttribute'](_0xdfb3b5,_0x109aa3[_0x37cb7c][_0xdfb3b5],_0x429781);_0xe651af['remove'](_0xe651af['createRangeIn'](_0x429781)),_0xe651af['insert'](_0x3b681c['data']['parse'](_0x237fc5,_0x429781),_0x429781,0x0);}});const _0x34fb17=m(_0x3b681c['locale'],'Restored');if(_0x458657['name'])_0x519552=-0x1==_0x458657['name']['indexOf'](_0x34fb17)?_0x34fb17+':\x20'+_0x458657['name']:_0x458657['name'];else _0x519552=_0x34fb17+':\x20'+(_0x458657['createdAt']['toLocaleDateString'](_0x3b681c['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x458657['createdAt']['toLocaleTimeString'](_0x3b681c['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x455379['saveRevision']({'name':_0x519552}),_0x1bb713['isReady']=!0x0,_0x3b681c['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,bi as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,rt as ShowChangeCommand};