@ckeditor/ckeditor5-revision-history 48.5.0-alpha.6 → 48.5.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 +7 -7
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{CKEditorError as
|
|
24
|
-
_0x18258e();var pt=class extends wt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x405905){super(),this['id']=_0x405905['id']||_0x148ef2(),this['creator']=_0x405905['creator']||null,this['authors']=_0x405905['authors']||[],this['diffData']=_0x405905['diffData']||null,this['toVersion']=_0x405905['toVersion']||0x0,this['fromVersion']=_0x405905['fromVersion']||0x0,this['set']('name',_0x405905['name']||''),this['set']('createdAt',_0x405905['createdAt']||new Date()),this['set']('attributes',_0x405905['attributes']||{});}setName(_0x20cb8f){this['_update']({'name':_0x20cb8f});}setAttribute(_0x3ca774,_0x33c8be){const _0x4a8277=_0x413e62(this['attributes']);_0x5ecd36(_0x4a8277,_0x3ca774,_0x33c8be),this['_update']({'attributes':_0x4a8277});}removeAttribute(_0x431e86){const _0x44f3c1=_0x413e62(this['attributes']);_0x25e471(_0x44f3c1,_0x431e86),this['_update']({'attributes':_0x44f3c1});}_update(_0xe2a9a4,_0x20c646=!0x1){let _0x3989d2=!0x1;const _0x287e74={'id':this['id']};for(const _0x3e26c2 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x465cce=_0xe2a9a4[_0x3e26c2];void 0x0!==_0x465cce&&_0x465cce!==this[_0x3e26c2]&&(this[_0x3e26c2]=_0x465cce,_0x287e74[_0x3e26c2]=_0x465cce,_0x3989d2=!0x0);}_0x3989d2&&(_0x287e74['authors']&&(_0x287e74['authorsIds']=_0x287e74['authors']['map'](_0x53ebd1=>_0x53ebd1['id']),delete _0x287e74['authors']),this['fire']('_update',_0x287e74,_0x20c646));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3f762e=>_0x3f762e['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},yt=class extends _0x4ba944{['_revisions'];static get requires(){return[_0x42dea7];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x343614){super(_0x343614),this['_revisions']=new _0x26b52d();}afterInit(){!async function(_0x20c5a2){const _0x38711b='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0xdc200=0xeb829,_0x461d2c=0x79458,_0x17c438={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x490b2b(_0x1fb44b){const _0x333f89=new window['Promise'](_0x5dfd1e=>{_0x1fb44b['once']('ready',_0x5dfd1e);}),_0x264f0b=window['Date']['now'](),_0x3a95aa=_0x1fb44b['config']['get']('licenseKey');async function _0x25ff98(){let _0x36be63,_0x4abd73=null,_0x464b70=null;try{return'GPL'==_0x3a95aa?'NotAllowed':(_0x36be63=_0x335bd1(),_0x36be63?(_0x36be63['usageEndpoint']&&(_0x464b70=_0x19e1aa(_0x36be63['usageEndpoint'],_0x36be63['jti'])),await _0x515b95()?_0x2ee85c()?_0x37bb66()?'Expired':_0x4c06f6()?('evaluation'==_0x36be63['licenseType']&&(_0x4abd73=_0x361f7e('EvaluationLimit')),await _0x3e2be2()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x37bb66(){const _0x5d22ff=['evaluation','trial']['includes'](_0x36be63['licenseType'])?_0x264f0b/0x3e8:0xe10*_0x461d2c;return _0x36be63['exp']<_0x5d22ff;}function _0x2ee85c(){const _0x76594d=_0x36be63['features'];if(!_0x76594d)return!0x1;if(_0x76594d['includes']('*'))return!0x0;if(_0x76594d['includes']('RH'))return!0x0;if(_0x76594d['includes']('RRH')){if(_0x356bbc())return!0x0;if(_0x9a3348()||_0x12427b())return!0x0;}return!0x1;}function _0x4c06f6(){const _0x5507b7=_0x36be63['licensedHosts'];if(!_0x5507b7||0x0==_0x5507b7['length'])return!0x0;const {hostname:_0x46b792}=new URL(window['location']['href']);if(_0x5507b7['includes'](_0x46b792))return!0x0;const _0x2c0235=_0x46b792['split']('.');return _0x5507b7['filter'](_0x1f8bd4=>_0x1f8bd4['includes']('*'))['map'](_0x315d02=>_0x315d02['split']('.'))['filter'](_0x746749=>_0x746749['length']<=_0x2c0235['length'])['map'](_0x4e511f=>Array(_0x2c0235['length']-_0x4e511f['length'])['fill']('*'===_0x4e511f[0x0]?'*':'')['concat'](_0x4e511f))['some'](_0x4b0308=>_0x2c0235['every']((_0x6af466,_0x11c6e5)=>_0x4b0308[_0x11c6e5]===_0x6af466||'*'===_0x4b0308[_0x11c6e5]));}function _0x3e2be2(){return _0x4abd73&&_0x464b70?new window['Promise']((_0x2a99d8,_0x2db3f9)=>{_0x4abd73['then'](_0x2a99d8,_0x2db3f9),_0x464b70['then'](_0x40b465=>{'Valid'!=_0x40b465&&_0x2a99d8(_0x40b465);},_0x2db3f9);}):_0x4abd73||_0x464b70||'Valid';}}function _0x19e1aa(_0x154552,_0x2ffebd){return new window['Promise'](_0x4d7e89=>{if(_0x6f481b())return _0x4d7e89('Valid');_0x34119c(),_0x1fb44b['decorate']('_sendUsageRequest');let _0x4c98eb=!0x1;const _0x1c6686=_0x148ef2();function _0x34a9ea(_0x2ada5b){return!!_0x2ada5b&&('object'==typeof _0x2ada5b||'function'==typeof _0x2ada5b)&&'function'==typeof _0x2ada5b['then']&&'function'==typeof _0x2ada5b['catch'];}function _0x1db219(_0x329984){_0x510d6f(_0x329984)['then'](_0x2a6924=>_0x2a6924&&'ok'==_0x2a6924['status']?_0x5150b3(_0xca6ccc(_0x1c6686+_0x2ffebd))!=_0x2a6924['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5f1dfb=>(_0x3b5101(),_0x5f1dfb),()=>{const _0x36c5c2=_0x22337a();return null==_0x36c5c2?(_0x3b5101(),'Valid'):_0x264f0b-_0x36c5c2>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4d7e89)['catch'](()=>{_0x4d7e89('UsageLimit');});const _0x4ea249=0x36ee80;function _0x3b5101(){const _0x3ca87a='llct-'+_0x5150b3(_0xca6ccc(_0x154552)),_0x31f7b3=_0x747976(_0x5150b3(window['Math']['ceil'](_0x264f0b/_0x4ea249)));window['localStorage']['setItem'](_0x3ca87a,_0x31f7b3);}function _0x22337a(){const _0x441542='llct-'+_0x5150b3(_0xca6ccc(_0x154552)),_0x38f155=window['localStorage']['getItem'](_0x441542);return _0x38f155?window['parseInt'](_0x747976(_0x38f155),0x10)*_0x4ea249:null;}function _0x510d6f(_0x5659d2){return new window['Promise']((_0x35a083,_0x71b429)=>{_0x5659d2['then'](_0x35a083,_0x71b429),window['setTimeout'](_0x71b429,0x1d4c0);});}}_0x1fb44b['on']('_sendUsageRequest',(_0x401ee0,_0x1c88e4)=>{if(_0x1c88e4[0x0]!=_0x154552)return _0x4d7e89('UsageLimit');_0x1c88e4[0x1]={..._0x1c88e4[0x1],'requestId':_0x1c6686};},{'priority':'high'}),_0x1fb44b['on']('_sendUsageRequest',_0x5f36d7=>{_0x34a9ea(_0x5f36d7['return'])&&(_0x4c98eb=!0x0,_0x1db219(_0x5f36d7['return']));},{'priority':'low'}),_0x333f89['then'](()=>{_0x4c98eb||_0x4d7e89('UsageLimit');});});function _0x6f481b(){return'auto'==_0x1fb44b['editing']['view']['_overlayModeHint'];}function _0x34119c(){_0x1fb44b['editing']['view']['_overlayModeHint']='auto';}}function _0x361f7e(_0x40a8fc){const _0x47dd79=[new window['Promise'](_0x328e64=>setTimeout(_0x328e64,0x93ecc)),_0x333f89['then'](()=>new window['Promise'](_0x262a0a=>{const _0x4034cb=0x7,_0x3ff8b6=_0x20c5a2['_revisions'];function _0x239360(){_0x3ff8b6['length']>=_0x4034cb&&_0x262a0a();}_0x239360(),_0x3ff8b6['on']('add',_0x239360);})),new window['Promise'](_0x56ac75=>{function _0x317a85(){for(const _0x4a6b0c in window)if(window['Number']['isNaN'](window['Number'](_0x4a6b0c))&&window[_0x4a6b0c]==_0xdc200)return _0x56ac75();'destroyed'!=_0x1fb44b['state']&&window['setTimeout'](_0x317a85,0x1388);}_0x294f95('RevisionViewer')&&_0x317a85();})];return window['Promise']['race'](_0x47dd79)['then'](()=>_0x40a8fc);}async function _0x5e45e0(){if(await _0x333f89,_0x294f95('RevisionViewer')){const _0x28ac85=_0x20c5a2['getRevision'](0x0),_0x423318=_0x20c5a2['getEarlierVisibleRevision'](_0x28ac85['id']),_0x13f820=_0x53c73b('RevisionViewer');return await _0x13f820['compare'](_0x28ac85['id'],_0x423318?_0x423318['id']:null,!0x0),_0x13f820['unbind']('isEnabled'),_0x13f820['isEnabled']=!0x1,_0x13f820['compare']=_0x360bea,void(_0x13f820['_getDiff']=_0x360bea);}if(_0x294f95('RevisionTracker')){const _0x59e0af=_0x53c73b('RevisionTracker');_0x59e0af['unbind']('isEnabled'),_0x59e0af['isEnabled']=!0x1,_0x59e0af['update']=_0x360bea,_0x59e0af['saveRevision']=_0x360bea;}_0x1fb44b['model']['change']=_0x360bea,_0x1fb44b['model']['enqueueChange']=_0x360bea,_0x1fb44b['enableReadOnlyMode']('model');}function _0x356bbc(){return _0x294f95('WebSocketGateway')&&'connected'==_0x53c73b('WebSocketGateway')['state'];}function _0x9a3348(){return _0x294f95('RevisionViewerIntegration');}function _0x12427b(){return _0x294f95('TrackChangesDataGetter');}function _0x31fa1f(_0x39b19f){const _0x4748f5=_0x526074();_0x1fb44b[_0x4748f5]='revisionHistoryLicenseKey'+_0x39b19f,_0x39b19f['endsWith']('Limit')&&(window[_0x526074()]=_0xdc200),'Valid'!=_0x39b19f&&_0x5e45e0();}function _0x526074(){const _0x328b44=window['String'](window['performance']['now']())['replace']('.','');let _0x4261a5='N';for(let _0x4b62b6=0x0;_0x4b62b6<_0x328b44['length'];_0x4b62b6+=0x2){let _0x39743b=window['parseInt'](_0x328b44['substring'](_0x4b62b6,_0x4b62b6+0x2));_0x39743b>=0x3e&&(_0x39743b-=0x3e),_0x4261a5+=_0x38711b[_0x39743b];}return _0x4261a5;}function _0x335bd1(){const _0x45cf98=_0x3a95aa['split']('.');if(0x3!=_0x45cf98['length'])return null;return _0x501828(_0x45cf98[0x1]);function _0x501828(_0x384503){const _0xb32776=_0x433457(_0x384503);return _0xb32776&&_0x105b27()?_0xb32776:null;function _0x105b27(){const _0x1cfbec=_0xb32776['jti'],_0x1b3813=window['parseInt'](_0x1cfbec['substring'](_0x1cfbec['length']-0x8),0x10),_0x52d7fe={..._0xb32776,'jti':_0x1cfbec['substring'](0x0,_0x1cfbec['length']-0x8)};return delete _0x52d7fe['vc'],_0xca6ccc(_0x52d7fe)==_0x1b3813;}}}async function _0x515b95(){let _0x1a48c2=!0x0;try{const [_0x31780b,_0x2f9d9f,_0x126360]=_0x3a95aa['split']('.');return _0x262c68(_0x31780b),await _0x53ed1c(_0x31780b,_0x2f9d9f,_0x126360),_0x1a48c2;}catch{return!0x1;}function _0x262c68(_0x5f1fcc){const _0x468d10=_0x433457(_0x5f1fcc);_0x468d10&&'ES256'==_0x468d10['alg']||(_0x1a48c2=!0x1);}async function _0x53ed1c(_0x1e7fd1,_0x59b079,_0x27c248){const _0xe10150=window['Uint8Array']['from'](_0x144456(_0x27c248),_0x2e33e3=>_0x2e33e3['charCodeAt'](0x0)),_0x16a36e=new window['TextEncoder']()['encode'](_0x1e7fd1+'.'+_0x59b079),_0x34369a=window['crypto']['subtle'];if(!_0x34369a)return;const _0x635fb8=await _0x34369a['importKey']('jwk',_0x17c438,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x34369a['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x635fb8,_0xe10150,_0x16a36e)||(_0x1a48c2=!0x1);}}function _0x433457(_0x1da4ed){return _0x1da4ed['startsWith']('ey')?JSON['parse'](_0x144456(_0x1da4ed)):null;}function _0x144456(_0x53c353){return window['atob'](_0x53c353['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xca6ccc(_0x910753){let _0x32ed7a=0x1505;function _0x247b47(_0x496c6e){for(let _0x1077b8=0x0;_0x1077b8<_0x496c6e['length'];_0x1077b8++){const _0x1157d4=_0x496c6e['charCodeAt'](_0x1077b8);_0x32ed7a=(_0x32ed7a<<0x5)+_0x32ed7a+_0x1157d4,_0x32ed7a&=_0x32ed7a;}}function _0x3d9241(_0x40663f){Array['isArray'](_0x40663f)?_0x40663f['forEach'](_0x3d9241):_0x40663f&&'object'==typeof _0x40663f?Object['entries'](_0x40663f)['sort']()['forEach'](([_0xa76255,_0x53b274])=>{_0x247b47(_0xa76255),_0x3d9241(_0x53b274);}):_0x247b47(window['String'](_0x40663f));}return _0x3d9241(_0x910753),_0x32ed7a>>>0x0;}function _0x5150b3(_0x6fb0ad){return _0x6fb0ad['toString'](0x10)['padStart'](0x8,'0');}function _0x747976(_0x5240f0){return _0x5240f0['split']('')['reverse']()['join']('');}function _0x294f95(_0x3864a9){return _0x1fb44b['plugins']['has'](_0x3864a9);}function _0x53c73b(_0x58a52f){return _0x1fb44b['plugins']['get'](_0x58a52f);}function _0x360bea(){}_0x31fa1f(await _0x25ff98());}_0x490b2b(_0x20c5a2['editor']);}(this);}createRevision(_0x173540){const _0x2dfded=this['editor']['plugins']['get']('Users');return new pt({'id':_0x173540['id'],'name':_0x173540['name'],'creator':_0x173540['creatorId']?_0x2dfded['getUser'](_0x173540['creatorId']):null,'diffData':_0x173540['diffData']||_0x173540['data'],'authors':_0x173540['authorsIds']['map'](_0x1cea8d=>_0x2dfded['getUser'](_0x1cea8d)),'createdAt':new Date(_0x173540['createdAt']),'attributes':_0x173540['attributes'],'fromVersion':_0x173540['fromVersion'],'toVersion':_0x173540['toVersion']});}['addRevision'](_0x35908f,_0x3497e4=0x0){this['_revisions']['add'](_0x35908f,_0x3497e4);}getRevision(_0x59fb17){return this['_revisions']['get'](_0x59fb17);}getRevisions(_0x46ea1e={'toJSON':!0x1}){const _0x42df0a=Array['from'](this['_revisions']);return _0x42df0a['reverse'](),_0x46ea1e['toJSON']?_0x42df0a['map'](_0x4ad46d=>_0x4ad46d['toJSON']()):_0x42df0a;}getIndex(_0xb8761f){return this['_revisions']['getIndex'](_0xb8761f);}getEarlierVisibleRevision(_0x203d94){const [,_0x878f43]=this['getRevisionsIterator'](_0x203d94,{'direction':'earlier'});return _0x878f43;}getLaterVisibleRevision(_0x3f3366){const [,_0x1b0fa1]=this['getRevisionsIterator'](_0x3f3366,{'direction':'later'});return _0x1b0fa1;}getRevisionsInDiff(_0x2578c0){const _0x27dade=[];for(const _0x21f857 of this['getRevisionsIterator'](_0x2578c0['newRevisionId']))if(_0x27dade['push'](_0x21f857),_0x21f857['id']===_0x2578c0['oldRevisionId'])break;return _0x27dade;}*getRevisionsIterator(_0x39fd0f,{direction:_0xbae121='earlier',filter:_0x1e4180=()=>!0x0}={}){const _0x5aa711='earlier'===_0xbae121?0x1:-0x1;let _0x2aa7ba=this['_revisions']['get'](_0x39fd0f),_0x3dfe8c=this['getIndex'](_0x2aa7ba);for(yield _0x2aa7ba;_0x2aa7ba;){if(_0x3dfe8c+=_0x5aa711,_0x2aa7ba=this['getRevision'](_0x3dfe8c),!_0x2aa7ba)return;_0x1e4180(_0x2aa7ba)&&(yield _0x2aa7ba);}}},bt=class extends _0x4ba944{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x5de5e0,'c'],[_0x4c0d4b,'a'],[_0x1ebcff,'e'],[_0x17c909,'r'],[_0x1f10b8,'u']]);_typeCharToViewClass=new Map([['c',_0x5de5e0],['a',_0x4c0d4b],['e',_0x1ebcff],['r',_0x17c909],['u',_0x1f10b8]]);async loadRevisionData(_0xb7710c,_0x27b852){if(_0xb7710c['diffData']||!_0x27b852)return;const _0x4851b3=this['editor']['config']['get']('collaboration.channelId');_0xb7710c['diffData']=(await _0x27b852['getRevision']({'channelId':_0x4851b3,'revisionId':_0xb7710c['id']}))['diffData'];}getRevisionDocumentData(_0xf1fc64){const _0x13fa0e={};for(const _0x385426 in _0xf1fc64['diffData']){if(_0xf1fc64['diffData'][_0x385426]['attachChange']&&!_0xf1fc64['diffData'][_0x385426]['attachChange']['isAttached'])continue;const _0x11c6ad=this['_removeRevisionMarkers'](JSON['parse'](_0xf1fc64['diffData'][_0x385426]['insertions'])),_0x323a48=this['editor']['editing']['view']['document'],_0x5256c1=new _0xaddfc5(_0x323a48,_0x11c6ad['map'](_0xca254=>this['_getViewFromDiffObj'](_0xca254,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x13fa0e[_0x385426]=this['editor']['data']['processor']['toData'](_0x5256c1),this['editor']['data']['processor']['useFillerType']('default');}return _0x13fa0e;}getRevisionRootsAttributes(_0x247407){const _0x261bf4={};for(const _0x36f7c0 in _0x247407['diffData'])_0x247407['diffData'][_0x36f7c0]['attachChange']&&!_0x247407['diffData'][_0x36f7c0]['attachChange']['isAttached']||(_0x261bf4[_0x36f7c0]=_0x247407['diffData'][_0x36f7c0]['attributesAfter']||{});return _0x261bf4;}getRevisionRootsModelElements(_0xfaade8){const _0x2569dc={};for(const _0x30be75 in _0xfaade8['diffData']){if(_0xfaade8['diffData'][_0x30be75]['attachChange']&&!_0xfaade8['diffData'][_0x30be75]['attachChange']['isAttached'])continue;const _0x422361=_0xfaade8['diffData'][_0x30be75]['rootElementName'];_0x422361&&(_0x2569dc[_0x30be75]=_0x422361);}return _0x2569dc;}_getTypeCharForViewElement(_0x3e2071){return this['_viewClassToTypeChar']['get'](_0x3e2071['constructor']);}_getViewFromDiffObj(_0x1af1a2,_0x53c804){const _0x5f5022=this['editor']['editing']['view']['document'];if('string'==typeof _0x1af1a2)return new _0x1c0a48(_0x5f5022,_0x1af1a2);{let _0x176fba,_0x69f605;_0x69f605='u'==_0x1af1a2['type']||'r'==_0x1af1a2['type']?[]:_0x1af1a2['children']['map'](_0x34c8da=>this['_getViewFromDiffObj'](_0x34c8da,_0x53c804));const _0x133fb7=this['_typeCharToViewClass']['get'](_0x1af1a2['type'])||_0x1a4605,_0x1327c9=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x176fba=new _0x133fb7(_0x5f5022,_0x1af1a2['name'],_0x1af1a2['attributes'],_0x69f605),'u'==_0x1af1a2['type']&&_0x1af1a2['children'][0x0]){const _0x279f9e=_0x1af1a2['children'][0x0];if(_0x176fba['render']=function(_0x5eb93b){const _0xde7aea=_0x5eb93b['createElement']('div');return _0xde7aea['innerHTML']=_0x279f9e,_0xde7aea['childNodes'][0x0];},_0x53c804){const _0x525fed=new _0xaddfc5(_0x5f5022);_0x525fed['_appendChild'](_0x176fba);const _0x8e2064=Array['from'](_0x1327c9['viewChildrenToDom'](_0x525fed,{'bind':!0x1})),_0x5de077=_0x1327c9['domDocument']['createElement']('div');_0x5de077['append'](..._0x8e2064),_0x176fba=Array['from'](_0x1327c9['domChildrenToView'](_0x5de077))[0x0];}}else{if('r'==_0x1af1a2['type']&&_0x1af1a2['children'][0x0]){const _0x532ed1=_0x1af1a2['children'][0x0];if(_0x176fba['render']=function(_0x20f6ec){_0x20f6ec['innerHTML']=_0x532ed1;},_0x53c804){const _0x235666=new _0xaddfc5(_0x5f5022);_0x235666['_appendChild'](_0x176fba);const _0x1de9ae=Array['from'](_0x1327c9['viewChildrenToDom'](_0x235666,{'bind':!0x1})),_0xdb6930=_0x1327c9['domDocument']['createElement']('div');_0xdb6930['append'](..._0x1de9ae);const _0x437682=Array['from'](_0x1327c9['domChildrenToView'](_0xdb6930));_0x437682['length']>0x1?_0x176fba['_appendChild'](_0x437682):_0x176fba=_0x437682[0x0];}}}if(_0x1af1a2['customProperties']){for(const [_0x2f20ad,_0x163406]of _0x1af1a2['customProperties'])_0x176fba['_setCustomProperty'](_0x2f20ad,_0x163406);}const _0x30e271=void 0x0===_0x1af1a2['fillerOffset']?null:_0x1af1a2['fillerOffset'];return null!==_0x30e271&&(_0x176fba['getFillerOffset']=()=>_0x30e271),_0x176fba;}}_makeModelFromViewString(_0x545f6,_0x5711f2){const _0x2bf11c=JSON['parse'](_0x545f6),_0x598c3a=this['editor']['editing']['view']['document'],_0x3f21e7=new _0xaddfc5(_0x598c3a,_0x2bf11c['map'](_0x39400d=>this['_getViewFromDiffObj'](_0x39400d,!0x0))),_0x483d03=this['editor']['data']['toModel'](_0x3f21e7,_0x5711f2);return _0x483d03['name']=_0x5711f2,_0x483d03;}['_removeRevisionMarkers'](_0x12afa5){return(_0x12afa5=_0x12afa5['filter'](_0x3d1964=>!_0x3d1964['name']||'revision-start'!==_0x3d1964['name']&&'revision-end'!==_0x3d1964['name']))['forEach'](_0x5aa1f7=>{'string'!=typeof _0x5aa1f7&&(_0x5aa1f7['children']=this['_removeRevisionMarkers'](_0x5aa1f7['children']),_0x5aa1f7['attributes']=_0x5aa1f7['attributes']['filter'](_0x4e243d=>!_0x4e243d[0x0]['startsWith']('data-revision-')));}),_0x12afa5;}};function Rt(_0x215154,_0x3d341c,_0x4f7b86){const t=_0x215154['t'];switch(_0x3d341c){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'},_0x4f7b86);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x4f7b86);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');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x4f7b86);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x4f7b86);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x4f7b86);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var kt=class extends _0x4ba944{['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[_0x42dea7,yt,bt,_0x3a703e];}constructor(_0x106a67){super(_0x106a67),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new At(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x41c865=_0x148ef2();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x41c865},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 _0x1cfd7b=this['repository']['getRevision'](0x0),_0x11d722=_0x1cfd7b&&null===_0x1cfd7b['creator']?_0x1cfd7b:null;if(this['_continueCurrentRevision']=!!_0x11d722&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x316d6a=this['_source']['getCurrentRevisionId'](),_0x34b706=this['repository']['getRevision'](_0x316d6a);if(_0x34b706)this['_startingVersion']=_0x34b706['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x53b156=this['_source']['history']['_operations']['find'](_0x1955b6=>!_0x1955b6['_isInit']),_0xeec0a1=_0x53b156?_0x53b156['baseVersion']:this['_source']['history']['version'];_0x1cfd7b?(_0x1cfd7b['toVersion']<_0xeec0a1&&_0x1cfd7b['_update']({'toVersion':_0xeec0a1}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x11d722['id'],this['_startingVersion']=_0x11d722['fromVersion']):(this['_startingVersion']=_0x1cfd7b['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0xeec0a1,this['_continueCurrentRevision']=!0x1);}}else _0x11d722&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x11d722['toVersion'],this['editor']['model']['document']['history']['version']),_0x11d722['fromVersion']===_0x11d722['toVersion']?(0x0!==_0x11d722['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x11d722['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x11d722['id'],this['_startingVersion']=_0x11d722['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',_0x6564c4=>!_0x6564c4),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x25ec72=[this['editor']];for(const _0x2334dc of _0x25ec72){let _0x2a9b24;for(const _0x1be6b7 in _0x2334dc){const _0x377b9f=_0x1be6b7,_0x40177e=_0x2334dc[_0x377b9f];if('revisionHistoryLicenseKeyValid'==_0x40177e||'revisionHistoryLicenseKeyInvalid'==_0x40177e||'revisionHistoryLicenseKeyExpired'==_0x40177e||'revisionHistoryLicenseKeyDomainLimit'==_0x40177e||'revisionHistoryLicenseKeyNotAllowed'==_0x40177e||'revisionHistoryLicenseKeyEvaluationLimit'==_0x40177e||'revisionHistoryLicenseKeyUsageLimit'==_0x40177e){delete _0x2334dc[_0x377b9f],_0x2a9b24=_0x40177e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2a9b24&&_0x2334dc['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2a9b24&&_0x2334dc['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2a9b24&&_0x2334dc['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2a9b24&&_0x2334dc['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2a9b24&&_0x2334dc['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2a9b24&&_0x2334dc['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x392886=this['repository']['getRevision'](0x0),_0x1efdc1=await this['getRevisionDocumentData'](_0x392886),_0x9dad94=await this['getRevisionRootsAttributes'](_0x392886),_0xa42c5d=this['_utils']['getRevisionRootsModelElements'](_0x392886);this['_replaceEditorDataWithRevisionData'](_0x1efdc1,_0x9dad94,_0xa42c5d);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x48491b){this['_source']=_0x48491b;}async update(){const _0x2fa3b1=await this['_source']['getLatestVersion']();if(_0x2fa3b1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x183603=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x2fa3b1});_0x183603['authors']=_0x183603['authorsIds']['map'](_0x1db5cf=>this['editor']['plugins']['get']('Users')['getUser'](_0x1db5cf)),this['currentRevision']['_update'](_0x183603);}}async['saveRevision'](_0x276ac1={},_0x5f3f44=null){const _0x134637=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x5f3f44>this['currentRevision']['toVersion']&&(_0x5f3f44=null),null===_0x5f3f44&&(_0x5f3f44=await this['_source']['getLatestVersion']());const _0x9c86f5=this['_getFromVersion'](_0x5f3f44),_0x302a7c=this['buildRevisionData']({'from':_0x9c86f5,'to':_0x5f3f44});if(this['currentRevision']['toVersion']<_0x5f3f44){const _0x1fb095=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x5f3f44,'to':_0x5f3f44});_0x1fb095['authors']=[],_0x1fb095['authorsIds']=[],_0x1fb095['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1fb095,!0x0),delete _0x1fb095['authors'],_0x134637['push'](_0x1fb095);}const _0x3584c5={..._0x276ac1,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x276ac1['name']||null,'id':_0x276ac1['id']||_0x148ef2(),..._0x302a7c,'attributes':{..._0x276ac1['attributes'],..._0x302a7c['attributes']}},_0x14b288=this['addRevisionData'](_0x3584c5);_0x134637['push'](_0x3584c5);const _0x1ed695=this['repository']['getIndex'](_0x14b288);if(0x0!==_0x1ed695){const _0x4b7954=this['repository']['getRevision'](_0x1ed695-0x1);if(_0x4b7954['fromVersion']!==_0x5f3f44){const _0x28b472=this['_revisionDataBuilder']['getData'](_0x5f3f44,_0x4b7954['toVersion']),_0x5aaff5={'id':_0x4b7954['id'],'diffData':_0x28b472['diffData'],'authorsIds':_0x28b472['authorsIds'],'authors':_0x28b472['authorsIds']['map'](_0xca6236=>this['editor']['plugins']['get']('Users')['getUser'](_0xca6236)),'fromVersion':_0x5f3f44};this['_stampAiAttribute'](_0x5aaff5,_0x4b7954,!!_0x28b472['hasAIChanges']),_0x4b7954===this['currentRevision']&&(_0x5aaff5['createdAt']=new Date(_0x3584c5['createdAt']['getTime']()+0xa)),_0x4b7954['_update'](_0x5aaff5,!0x0),delete _0x5aaff5['authors'],_0x134637['push'](_0x5aaff5);}}if(this['adapter']){for(const _0x509805 of _0x134637)this['_bufferUpdate'](_0x509805['id'],_0x509805,!0x0);this['sendBufferedUpdates']();}return _0x14b288;}addRevisionData(_0x230b85){const _0x3e6d90=this['repository']['createRevision'](_0x230b85);return this['adapter']&&_0x3e6d90['on']('_update',(_0x5aa9ee,_0x2356d2,_0x55307d)=>{_0x55307d||(this['_bufferUpdate'](_0x2356d2['id'],_0x2356d2,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x3e6d90,this['_findInsertionIndex'](_0x3e6d90)),_0x3e6d90;}async getRevisionDocumentData(_0x58ed33){return await this['_utils']['loadRevisionData'](_0x58ed33,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x58ed33);}async getRevisionRootsAttributes(_0x5c0085){return await this['_utils']['loadRevisionData'](_0x5c0085,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5c0085);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x60c66f=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1b13ca=0x0;_0x1b13ca<_0x60c66f['length'];_0x1b13ca++){const _0x390191=_0x60c66f[_0x1b13ca];let _0x287f39=!0x1;for(const _0xccf5a6 of Object['keys'](_0x390191))void 0x0===_0x390191[_0xccf5a6]?delete _0x390191[_0xccf5a6]:'id'!==_0xccf5a6&&(_0x287f39=!0x0);_0x287f39||(_0x60c66f[_0x1b13ca]=null);}if(_0x60c66f=_0x60c66f['filter'](_0x183ded=>null!==_0x183ded),!_0x60c66f['length'])return;for(let _0x36988c=0x0;_0x36988c<_0x60c66f['length'];_0x36988c++){const _0x446127=_0x60c66f[_0x36988c];void 0x0!==_0x446127['fromVersion']&&void 0x0===_0x446127['toVersion']&&(_0x446127['toVersion']=this['repository']['getRevision'](_0x446127['id'])['toVersion']),void 0x0!==_0x446127['toVersion']&&void 0x0===_0x446127['fromVersion']&&(_0x446127['fromVersion']=this['repository']['getRevision'](_0x446127['id'])['fromVersion']);}const _0x376fd9=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x60c66f,_0x376fd9)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1340f7=>{if(_0x1340f7){for(const _0x35d9cd of _0x1340f7)this['setRevisionData']({'id':_0x35d9cd['id'],'createdAt':_0x35d9cd['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x52781a,_0x204b48,_0x3702b9){if(_0x3702b9===(!!_0x204b48&&!!_0x204b48['attributes']['@ai']))return;const _0x24e84e={..._0x204b48?_0x204b48['attributes']:{},..._0x52781a['attributes']};_0x3702b9?_0x24e84e['@ai']=!0x0:delete _0x24e84e['@ai'],_0x52781a['attributes']=_0x24e84e;}buildRevisionData({revision:_0x472377=null,from:_0x552ce4=null,to:_0x424616=null}){_0x552ce4=null!==_0x552ce4?_0x552ce4:_0x472377['fromVersion'],_0x424616=null!==_0x424616?_0x424616:_0x472377['toVersion'];const _0x384f72=this['_revisionDataBuilder']['getData'](_0x552ce4,_0x424616),_0x4f00c8={'diffData':_0x384f72['diffData'],'authorsIds':_0x384f72['authorsIds'],'fromVersion':_0x552ce4,'toVersion':_0x424616};if(this['_stampAiAttribute'](_0x4f00c8,_0x472377,!!_0x384f72['hasAIChanges']),!_0x472377||_0x424616!==_0x472377['toVersion']){const _0x3e2513=_0x424616-0x1,_0x5d0f74=this['_source']['history']['getOperation'](_0x3e2513);_0x4f00c8['createdAt']=_0x5d0f74&&_0x5d0f74['createdAt']||new Date();}if(this['_loadedStateData']&&_0x552ce4===this['_loadedStateData']['fromVersion']){for(const _0x2bffa1 of this['_loadedStateData']['authors'])_0x4f00c8['authorsIds']['includes'](_0x2bffa1['id'])||_0x4f00c8['authorsIds']['push'](_0x2bffa1['id']);}return _0x4f00c8;}_bufferUpdate(_0x8a22c4,_0x25b672,_0x2abe50){if(this['_bufferedUpdates']['has'](_0x8a22c4)){const _0x92b427=this['_bufferedUpdates']['get'](_0x8a22c4);_0x25b672=_0x2abe50?{..._0x92b427,..._0x25b672}:{..._0x25b672,..._0x92b427};}this['_bufferedUpdates']['set'](_0x8a22c4,_0x25b672);}setRevisionData(_0x550949){const _0x2e373c=this['repository']['getRevision'](_0x550949['id']);if(_0x550949['createdAt']&&(_0x550949['createdAt']=new Date(_0x550949['createdAt'])),_0x550949['authorsIds']){const _0x135db1=this['editor']['plugins']['get']('Users');_0x550949['authors']=_0x550949['authorsIds']['map'](_0x3f9123=>_0x135db1['getUser'](_0x3f9123));}_0x2e373c['_update'](_0x550949,!0x0);}_createInitialRevision(_0x338fb4){const _0x562faa=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x562faa)this['_initialRevisionId']=_0x562faa['id'];else{const _0x2c2605=!this['editor']['model']['document']['roots']['find'](_0x1a7277=>this['editor']['model']['hasContent'](_0x1a7277)),_0x35f527=this['editor']['plugins']['get']('Users')['me']['id'],_0x3f8189=Rt(this['editor']['locale'],_0x2c2605?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x338fb4,'to':_0x338fb4,'id':this['_initialRevisionId'],'name':_0x3f8189,'creatorId':_0x35f527});}}_createCurrentRevision(_0x4d4945){const _0x10dc23=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x10dc23),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4d4945,'to':_0x4d4945,'id':_0x10dc23,'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(_0x2d47de,_0x149bc4,_0x5b8b50){const _0x36aca1={},_0x1871dd={},_0x40df92={},_0x6eeb5e=this['editor']['config']['get']('roots')||{};for(const [_0x5ea5c7,_0x165bbf]of Object['entries'](_0x6eeb5e))_0x165bbf['lazyLoad']||(_0x36aca1[_0x5ea5c7]=_0x165bbf['initialData']??'',_0x1871dd[_0x5ea5c7]=_0x165bbf['modelAttributes']||{},_0x165bbf['modelElement']&&(_0x40df92[_0x5ea5c7]=_0x165bbf['modelElement']));for(const _0x6c66f5 of this['editor']['model']['document']['getRootNames']())_0x36aca1[_0x6c66f5]??='',_0x1871dd[_0x6c66f5]??={};let _0x43d0c4=!0x1;const _0x13be1=Object['keys'](_0x36aca1),_0x448a9a=Object['keys'](_0x2d47de);for(const _0x361938 of _0x13be1){if(_0x36aca1[_0x361938]!==_0x2d47de[_0x361938]&&''!==_0x36aca1[_0x361938]['trim']()){_0x43d0c4=!0x0;break;}if(!_0x504d00(_0x1871dd[_0x361938],_0x149bc4[_0x361938])&&Object['keys'](_0x1871dd[_0x361938])['length']>0x0){_0x43d0c4=!0x0;break;}const _0x5ef642=_0x40df92[_0x361938],_0x27e119=_0x5b8b50[_0x361938];if(_0x5ef642&&_0x27e119&&_0x5ef642!==_0x27e119){_0x43d0c4=!0x0;break;}}_0x43d0c4||(_0x43d0c4=_0x448a9a['some'](_0x135645=>!this['editor']['model']['document']['getRoot'](_0x135645))),_0x43d0c4&&_0x535a1d('editor-initial-data-replaced-with-revision-data',{'editorData':_0x36aca1,'editorRootsAttributes':_0x1871dd,'editorRootsModelElements':_0x40df92,'revisionData':_0x2d47de,'revisionRootsAttributes':_0x149bc4,'revisionRootsModelElements':_0x5b8b50});for(const [_0x2e850e,_0x3be8eb]of Object['entries'](_0x2d47de))this['editor']['config']['set']('roots.'+_0x2e850e+'.initialData',_0x3be8eb);for(const [_0x491443,_0x4ba9b6]of Object['entries'](_0x149bc4))this['editor']['config']['set']('roots.'+_0x491443+'.modelAttributes',_0x4ba9b6);const _0x25f8e2=this['editor']['model']['document'];for(const [_0x221dba,_0x5baf4a]of Object['entries'](_0x5b8b50)){this['editor']['config']['set']('roots.'+_0x221dba+'.modelElement',_0x5baf4a);const _0x335846=_0x25f8e2['getRoot'](_0x221dba);_0x335846&&_0x335846['name']!==_0x5baf4a&&(_0x25f8e2['roots']['remove'](_0x221dba),_0x25f8e2['createRoot'](_0x5baf4a,_0x221dba));}}_addPendingAction(){if(!this['_pendingAction']){const _0x425245=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x425245['add'](Rt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x24f72e){const _0x190a08=this['repository']['getRevisions']();_0x190a08['reverse']();let _0x4f8e1e=0x0;for(;_0x4f8e1e<_0x190a08['length'];){const _0x4fffc9=_0x190a08[_0x4f8e1e];if(_0x4fffc9===this['currentRevision']){_0x4f8e1e++;continue;}if(_0x4fffc9['id']===this['_initialRevisionId'])break;const _0x419682=_0x24f72e['toVersion']-_0x4fffc9['toVersion']||_0x24f72e['fromVersion']-_0x4fffc9['fromVersion'];if(_0x419682>0x0)break;if(_0x419682<0x0)_0x4f8e1e++;else{if(!_0x24f72e['creator']&&_0x4fffc9['creator'])break;if(_0x4fffc9['creator']||!_0x24f72e['creator']){if(_0x24f72e['createdAt']>_0x4fffc9['createdAt'])break;_0x4f8e1e++;}else _0x4f8e1e++;}}return _0x4f8e1e;}_getFromVersion(_0x13410b){const _0x450058=this['repository']['getRevisions']();_0x450058['reverse'](),_0x450058['shift']();const _0x2a24ea=_0x450058['find'](_0x164a7f=>_0x164a7f['toVersion']<=_0x13410b)['toVersion'];return _0x2a24ea<this['_startingVersion']?this['_startingVersion']:_0x2a24ea;}['_makeRevision']({name:_0x25cbc9,from:_0x424ae7,to:_0x39acf0,creatorId:_0xd3564f,id:_0x42a8c5}){const _0x4bd5ff=this['buildRevisionData']({'from':_0x424ae7,'to':_0x39acf0});_0x4bd5ff['name']=_0x25cbc9,_0x4bd5ff['creatorId']=_0xd3564f,_0x4bd5ff['id']=_0x42a8c5;const _0x1f0604=this['addRevisionData'](_0x4bd5ff);return this['adapter']&&this['_bufferUpdate'](_0x4bd5ff['id'],_0x4bd5ff,!0x0),_0x1f0604;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},At=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x5323c3){this['editor']=_0x5323c3,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['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x35f417){this['source']=_0x35f417;const _0x295574=new Map(),_0x3168e5=new Map(),_0x577433=this['editor']['model']['document']['roots']['map'](_0x7122b=>_0x7122b['rootName']);for(const _0x3548e0 of _0x577433){const _0x55bfa3=this['editor']['model']['document']['getRoot'](_0x3548e0),_0x40ab11=It(_0x55bfa3);_0x295574['set'](_0x3548e0,_0x40ab11),_0x3168e5['set'](_0x3548e0,Object['fromEntries'](_0x55bfa3['getAttributes']()));}const _0x346d8e=Array['from'](this['editor']['model']['markers'])['map'](_0x532ec5=>[_0x532ec5['name'],_0x532ec5['getRange']()]),_0x280918=this['source']['version'];this['_saveMetaData'](_0x280918,_0x295574,_0x346d8e,_0x3168e5),this['_startingRevisionId']=this['_revisionId'];const _0x3d7f6b=new Map(),_0x23da4e=new Map();for(const _0x12792f of _0x577433){const _0x2ff9d3=St(_0x12792f,this['editor']['model']['document']['getRoot'](_0x12792f)['name']);_0x3d7f6b['set'](_0x12792f,_0x2ff9d3),_0x23da4e['set'](_0x12792f,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3d7f6b,[],_0x23da4e);}getData(_0x536ba2,_0x31bfce){if(this['_lastFrom']===_0x536ba2&&this['_lastTo']<=_0x31bfce)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x31bfce,!0x0);else{if(!this['_savedMetaData']['has'](_0x536ba2)){const _0x171952=this['_getPreviousFrom'](_0x536ba2);this['_calculateMetaData'](_0x171952,_0x536ba2,!0x1);}this['_calculateMetaData'](_0x536ba2,_0x31bfce,!0x0);}return this['_lastFrom']=_0x536ba2,this['_lastTo']=_0x31bfce,this['_getState']();}loadState(_0xd88cb6){if(!this['_savedMetaData']['has'](_0xd88cb6['fromVersion'])){const _0x18c6b2=this['_getPreviousFrom'](_0xd88cb6['fromVersion']);this['_calculateMetaData'](_0x18c6b2,_0xd88cb6['fromVersion'],!0x1);}this['_calculateMetaData'](_0xd88cb6['fromVersion'],_0xd88cb6['toVersion'],!0x1);const _0x54178e=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0xd88cb6['fromVersion'],this['_lastTo']=_0xd88cb6['toVersion'];for(const _0x17635c in _0xd88cb6['diffData']){const _0x57c30e=_0xd88cb6['diffData'][_0x17635c]['attachChange'],_0x53088f=_0x413e62(_0xd88cb6['diffData'][_0x17635c]['attributesBefore'])||{},_0xd41f6f=_0xd88cb6['diffData'][_0x17635c],_0xfb771e=_0x54178e['_makeModelFromViewString'](_0xd41f6f['deletions'],_0xd41f6f['rootElementName']||'$root');_0xfb771e['rootName']=_0x17635c,_0xfb771e['_isAttached']=!_0x57c30e||!_0x57c30e['isAttached'],_0xfb771e['isAttached']=()=>_0xfb771e['_isAttached'],this['_baseRoots']['set'](_0x17635c,_0xfb771e),this['_baseRootsAttributes']['set'](_0x17635c,_0x53088f),_0x57c30e&&this['_touchedRoots']['set'](_0x17635c,_0x57c30e);const _0x55c104=this['_makeIdsRoot'](_0xfb771e);this['_baseIdsRoots']['set'](_0x17635c,_0x55c104);for(const [_0x1be089,_0x431bfb]of _0xfb771e['markers']){if(!_0x1be089['startsWith']('revision:'))continue;const _0x370909=_0x1be089['split'](':')[0x2],_0x440fb5=_0xd41f6f['aiSources']?.[_0x1be089]||null;for(const _0x505dd4 of _0x431bfb['getWalker']({'singleCharacters':!0x0})){const _0x30dd00=this['_getVidAttributeName'](_0x505dd4),_0x44bd37='elementEnd'==_0x505dd4['type']?_0x505dd4['previousPosition']['path']['slice'](0x0,-0x1):_0x505dd4['previousPosition']['path'],_0x424036=_0x55c104['getNodeByPath'](_0x44bd37)['getAttribute'](_0x30dd00);this['_touched']['set'](_0x424036,{'userId':_0x370909,'aiSource':_0x440fb5});}_0xfb771e['markers']['delete'](_0x1be089);}}this['_startingRevisionId']=this['_revisionId'];const _0x40bb9a=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2c7126=>!this['_touched']['has'](_0x2c7126));let _0x343a44=0x0;const _0x3bad67=new Map();for(const _0x3e93f7 in _0xd88cb6['diffData']){const _0x30834f=_0xd88cb6['diffData'][_0x3e93f7]['attachChange'],_0x5b4080=_0x413e62(_0xd88cb6['diffData'][_0x3e93f7]['attributesAfter'])||{},_0x53c882=_0xd88cb6['diffData'][_0x3e93f7],_0x5bec99=_0x54178e['_makeModelFromViewString'](_0x53c882['insertions'],_0x53c882['rootElementName']||'$root');_0x5bec99['rootName']=_0x3e93f7,_0x5bec99['_isAttached']=!_0x30834f||_0x30834f['isAttached'],_0x5bec99['isAttached']=()=>_0x5bec99['_isAttached'],this['_diffRoots']['set'](_0x3e93f7,_0x5bec99),this['_diffRootsAttributes']['set'](_0x3e93f7,_0x5b4080);const _0x3d41b1=this['_makeIdsRoot'](_0x5bec99,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x3e93f7,_0x3d41b1),_0x3bad67['set'](_0x3e93f7,_0x5bec99['isAttached']()?_0x5b4080:{});for(const [_0x1530dd,_0xd0ffa7]of _0x5bec99['markers']){if(!_0x1530dd['startsWith']('revision:'))continue;const _0xe51daa=_0x1530dd['split'](':')[0x2],_0x870cf8=_0x53c882['aiSources']?.[_0x1530dd]||null;for(const _0x441339 of _0xd0ffa7['getWalker']({'singleCharacters':!0x0})){const _0x365729=this['_getVidAttributeName'](_0x441339),_0x545259=this['_revisionId']++,_0x4e037f='elementEnd'==_0x441339['type']?_0x441339['previousPosition']['path']['slice'](0x0,-0x1):_0x441339['previousPosition']['path'];_0x3d41b1['getNodeByPath'](_0x4e037f)['_setAttribute'](_0x365729,_0x545259),this['_touched']['set'](_0x545259,{'userId':_0xe51daa,'aiSource':_0x870cf8});}_0x5bec99['markers']['delete'](_0x1530dd);}for(const _0x21fcbe of this['editor']['model']['createRangeIn'](_0x5bec99)['getWalker']({'singleCharacters':!0x0})){const _0x27617b=this['_getVidAttributeName'](_0x21fcbe),_0x38f61b='elementEnd'==_0x21fcbe['type']?_0x21fcbe['previousPosition']['path']['slice'](0x0,-0x1):_0x21fcbe['previousPosition']['path'],_0xea075c=_0x3d41b1['getNodeByPath'](_0x38f61b);_0xea075c['getAttribute'](_0x27617b)>0x0||_0xea075c['_setAttribute'](_0x27617b,_0x40bb9a[_0x343a44++]);}for(const [_0x2a2dc1,_0x87e2fa]of _0x5bec99['markers'])_0x2a2dc1['startsWith']('revision:')||this['_markers']['set'](_0x2a2dc1,_0x87e2fa);}const {roots:_0x4f6ae5}=this['_savedMetaData']['get'](_0xd88cb6['fromVersion']),{roots:_0xeae5cd}=this['_savedMetaData']['get'](_0xd88cb6['toVersion']),_0x58da2f=It(_0x4f6ae5['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x58da2f),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x58da2f,Number['NEGATIVE_INFINITY']));const _0x30283e=It(_0xeae5cd['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x30283e),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x30283e));const _0x3ee343=Array['from'](this['_diffRoots'])['map'](([_0x23af06,_0x4891e6])=>[_0x23af06,It(_0x4891e6)]);this['_saveMetaData'](this['_lastTo'],_0x3ee343,this['_markers'],_0x3bad67);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x3e11a9,_0x494b5a,_0x28c68f,_0x394a71){const _0x2c9c70=new Map(_0x494b5a),_0x101ef2=new Map(_0x413e62(_0x394a71)),_0x3d843d=new Map();for(const [_0x6bfb55,_0x409a03]of _0x28c68f)_0x3d843d['set'](_0x6bfb55,{'start':_0x409a03['start']['clone'](),'end':_0x409a03['end']['clone'](),'rootName':_0x409a03['root']['rootName']});this['_savedMetaData']['set'](_0x3e11a9,{'roots':_0x2c9c70,'markers':_0x3d843d,'rootsAttributes':_0x101ef2});}_removeMetaData(_0x4be145){this['_savedMetaData']['delete'](_0x4be145);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['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(_0x2d9870,_0x207cdc=null){let _0x5ee3f8=null;_0x2d9870['is']('documentFragment')||(_0x5ee3f8=new _0x168c99(_0x2d9870['name'],{'vid_start':null===_0x207cdc?this['_revisionId']++:_0x207cdc++}));const _0x31c067=[];for(const _0x238edd of _0x2d9870['getChildren']())if(_0x238edd['is']('element')){_0x31c067['push'](this['_makeIdsRoot'](_0x238edd,_0x207cdc));const _0x17ceef=_0x31c067[_0x31c067['length']-0x1];null!==_0x207cdc&&(_0x207cdc=_0x17ceef['is']('element','$text')?_0x17ceef['getAttribute']('vid')+0x1:_0x17ceef['getAttribute']('vid_end')+0x1);}else{for(let _0x5c0e50=0x0;_0x5c0e50<_0x238edd['offsetSize'];_0x5c0e50++)_0x31c067['push'](new _0x168c99('$text',{'vid':null===_0x207cdc?this['_revisionId']++:_0x207cdc++}));}if(_0x2d9870['is']('documentFragment')){const _0x16cf1e=St(_0x2d9870['rootName'],_0x2d9870['name']);return _0x16cf1e['_insertChild'](0x0,_0x31c067),_0x16cf1e;}return _0x5ee3f8['_setAttribute']('vid_end',null===_0x207cdc?this['_revisionId']++:_0x207cdc),_0x5ee3f8['_insertChild'](0x0,_0x31c067),_0x5ee3f8;}_calculateMetaData(_0x584b89,_0x2ac996,_0x80f36f){this['_reset']();const {roots:_0x4e7b45,markers:_0x53c999,rootsAttributes:_0x41825f}=this['_savedMetaData']['get'](_0x584b89);this['_baseRoots']=new Map(_0x4e7b45),this['_baseRootsAttributes']=new Map(_0x413e62(_0x41825f));for(const [_0x17c3b5,_0x24e357]of this['_baseRoots'])if('$graveyard'!==_0x17c3b5&&(this['_diffRoots']['set'](_0x17c3b5,It(_0x24e357)),this['_diffRootsAttributes']=new Map(_0x413e62(_0x41825f)),_0x80f36f)){const _0x2b5dc0=this['_revisionId'];this['_idsRoots']['set'](_0x17c3b5,this['_makeIdsRoot'](_0x24e357)),this['_baseIdsRoots']['set'](_0x17c3b5,this['_makeIdsRoot'](_0x24e357,_0x2b5dc0));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',It(this['_baseRoots']['get']('$graveyard'))),_0x80f36f&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x175d4f,_0xab5864]of _0x53c999){const _0x3a8a98=this['_baseRoots']['get'](_0xab5864['rootName']),_0x123b10=this['_diffRoots']['get'](_0xab5864['rootName']),_0x488f31=new _0x152607(_0x2ded0a(_0xab5864['start'],_0x3a8a98),_0x2ded0a(_0xab5864['end'],_0x3a8a98)),_0x456397=_0x40d120(_0x488f31,_0x123b10);_0x3a8a98['markers']['set'](_0x175d4f,_0x488f31),this['_markers']['set'](_0x175d4f,_0x456397);}this['_applyOperations'](_0x584b89,_0x2ac996,_0x80f36f);}_applyOperations(_0x426bec,_0x35cef8,_0x33966d){for(const _0x17c25f of this['source']['getOperations'](_0x426bec,_0x35cef8))this['_handleOperation'](_0x17c25f,_0x33966d);for(const _0x3b44a1 of this['_diffRoots']['values']())_0x3b44a1['markers']['clear']();for(const [_0x3e3c74,_0x1e571d]of this['_markers'])this['_diffRoots']['get'](_0x1e571d['root']['rootName'])['markers']['set'](_0x3e3c74,_0x1e571d['clone']());const _0x28dc73=new Map(),_0xe581e7=new Map();for(const [_0x1b543c,_0x2eb95a]of this['_diffRoots'])_0x28dc73['set'](_0x1b543c,It(_0x2eb95a)),_0xe581e7['set'](_0x1b543c,this['_diffRootsAttributes']['get'](_0x1b543c));this['_saveMetaData'](_0x35cef8,_0x28dc73,this['_markers'],_0xe581e7);}_getPreviousFrom(_0x336e91){const _0x31c049=Array['from'](this['_savedMetaData']['keys']());_0x31c049['sort']((_0x5daf04,_0x31735d)=>_0x5daf04-_0x31735d),_0x31c049['reverse']();for(const _0x5e0a69 of _0x31c049)if(_0x5e0a69<_0x336e91)return _0x5e0a69;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x3c6a39,_0x2f698e){const _0x4e9cfa=Array['from'](_0x2f698e['markers'])['map'](([_0x182afd,_0x43038f])=>[_0x182afd,_0x40d120(_0x43038f,_0x3c6a39)]);_0x3c6a39['markers']=new Map(_0x4e9cfa);}_transformMarkers(_0x295c53){for(const _0xc052e4 of this['_markers']['values']()){const _0x37d807=_0xc052e4['getTransformedByOperation'](_0x295c53),_0x2d5f6d=_0x152607['_createFromRanges'](_0x37d807);_0xc052e4['start']=_0x2d5f6d['start'],_0xc052e4['end']=_0x2d5f6d['end'];}}_handleOperation(_0x343def,_0xb5b6a0){if('addRoot'!=_0x343def['type']&&'detachRoot'!=_0x343def['type']){if('insert'==_0x343def['type']){const _0x40088e=_0x343def['position']['root'],_0x4bd8c9=_0x40088e['rootName'],_0x41a26e=_0x40088e['name'];this['_diffRoots']['has'](_0x4bd8c9)||(this['_diffRoots']['set'](_0x4bd8c9,St(_0x4bd8c9,_0x41a26e,!0x0)),this['_diffRootsAttributes']['set'](_0x4bd8c9,{}),_0xb5b6a0&&this['_idsRoots']['set'](_0x4bd8c9,St(_0x4bd8c9,_0x41a26e,!0x0)));}else{if('addRootAttribute'==_0x343def['type']||'removeRootAttribute'==_0x343def['type']||'changeRootAttribute'==_0x343def['type'])return void this['_handleRootAttributeOperation'](_0x343def);'marker'==_0x343def['type']&&this['_handleMarkerOperation'](_0x343def);}if('marker'!==_0x343def['type']){const _0x1cb076=this['_cloneOperation'](_0x343def,this['_diffRoots']);_0x1cb076['_execute'](),this['_transformMarkers'](_0x1cb076);}if(_0xb5b6a0)switch(_0x343def['type']){case'insert':this['_handleInsertOperation'](_0x343def);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x343def);break;case'merge':this['_handleMergeOperation'](_0x343def);break;case'split':this['_handleSplitOperation'](_0x343def);}}else this['_handleRootOperation'](_0x343def,_0xb5b6a0);}_cloneOperation(_0x688927,_0x43e924){const _0x93b81=_0x688927['clone']();return _0x93b81['_authorId']=_0x688927['_authorId'],_0x93b81['_aiSource']=_0x688927['_aiSource'],_0x93b81['baseVersion']=null,_0x409031(_0x93b81,_0x43e924),_0x93b81;}_getBaseVids(_0x206e5d){return _0x206e5d['map'](_0xa317=>{const _0x3257af=this['_getVidAttributeName'](_0xa317);return Number(_0xa317['item']['getAttribute'](_0x3257af));});}_generateTape(_0x4615c2,_0x350d76){if(_0x4615c2['is']('element','$text'))_0x350d76['push']({'item':_0x4615c2,'type':'text'});else{_0x4615c2['is']('element')&&_0x350d76['push']({'item':_0x4615c2,'type':'elementStart'});for(const _0x558c6e of _0x4615c2['getChildren']())this['_generateTape'](_0x558c6e,_0x350d76);_0x4615c2['is']('element')&&_0x350d76['push']({'item':_0x4615c2,'type':'elementEnd'});}return _0x350d76;}_getState(){const _0x307216=new Map(this['_touched']),_0x586611=new Map(_0x307216),_0x4ae309=new Map(),_0x10c554={'insertions':{},'deletions':{}},_0x3fa694={'insertions':{},'deletions':{}},_0x352a27=new Map(),_0x357e3a=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x7b8b39=new Map();_0x357e3a['delete']('$graveyard');for(const _0x19fa2d of _0x357e3a){const _0x160c42=(this['_diffRoots']['get'](_0x19fa2d)??this['_baseRoots']['get'](_0x19fa2d))['name'],_0x1a486b=this['_diffRoots']['get'](_0x19fa2d)||St(_0x19fa2d,_0x160c42,!0x1),_0x32b515=this['_baseRoots']['get'](_0x19fa2d)||St(_0x19fa2d,_0x160c42,!0x1);_0x1a486b['isAttached']()||_0x32b515['isAttached']()?(_0x7b8b39['set'](_0x19fa2d,_0x160c42),_0x10c554['insertions'][_0x19fa2d]=It(_0x1a486b),_0x10c554['deletions'][_0x19fa2d]=It(_0x32b515),this['_copyMarkers'](_0x10c554['deletions'][_0x19fa2d],_0x32b515),this['_copyMarkers'](_0x10c554['insertions'][_0x19fa2d],_0x1a486b),_0x3fa694['insertions'][_0x19fa2d]=this['_generateTape'](this['_idsRoots']['get'](_0x19fa2d),[]),_0x3fa694['deletions'][_0x19fa2d]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x19fa2d)||St(_0x19fa2d,_0x160c42,!0x1),[])):_0x357e3a['delete'](_0x19fa2d);}for(const _0x4cce9e of _0x357e3a){const _0x484e6f=_0x3fa694['insertions'][_0x4cce9e];for(const _0x433357 of _0x484e6f){const _0x4f26ba=this['_getVidAttributeName'](_0x433357),_0x172d8d=_0x433357['item']['getAttribute'](_0x4f26ba);_0x586611['delete'](_0x172d8d),_0x172d8d>=this['_startingRevisionId']&&_0x4ae309['set'](_0x172d8d,_0x307216['get'](_0x172d8d));}}for(const _0x50648b of _0x357e3a){const _0x786fa=_0x3fa694['insertions'][_0x50648b],_0x3c8eaa=this['_getBaseVids'](_0x3fa694['deletions'][_0x50648b]);let _0xf97455=0x0;for(const _0x6b1877 of _0x786fa){const _0x2341c1=this['_getVidAttributeName'](_0x6b1877),_0x6c3c97=_0x6b1877['item']['getAttribute'](_0x2341c1);if(!_0x4ae309['has'](_0x6c3c97)&&!_0x352a27['has'](_0x6c3c97)){if(_0x586611['has'](_0x6c3c97))_0xf97455++;else{if(_0x6c3c97!=_0x3c8eaa[_0xf97455]){const _0x1155fe=_0x307216['get'](_0x6c3c97)||_0x307216['get'](_0x3c8eaa[_0xf97455]);for(;_0x6c3c97!=_0x3c8eaa[_0xf97455];)_0x586611['has'](_0x3c8eaa[_0xf97455])||(_0x352a27['set'](_0x3c8eaa[_0xf97455],_0x1155fe),_0x307216['set'](_0x3c8eaa[_0xf97455],_0x1155fe)),_0xf97455++;}_0xf97455++;}}}}for(const _0x5d888a of _0x357e3a){const _0x4dbe3c=_0x3fa694['insertions'][_0x5d888a];for(const _0x50ed3f of _0x4dbe3c){const _0x9df00f=this['_getVidAttributeName'](_0x50ed3f),_0x31e86b=_0x50ed3f['item']['getAttribute'](_0x9df00f);if(_0x352a27['has'](_0x31e86b)){const _0x32f8e6=_0x352a27['get'](_0x31e86b);_0x586611['has'](_0x31e86b)||_0x586611['set'](_0x31e86b,{..._0x32f8e6}),_0x4ae309['set'](_0x31e86b,{..._0x32f8e6});}}}for(const _0x1bd8d7 of _0x586611['keys']())_0x1bd8d7>=this['_startingRevisionId']&&_0x586611['delete'](_0x1bd8d7);const _0x14344e=new Map();for(const _0xf8bac9 of _0x357e3a){let _0x4a546e=_0x3fa694['insertions'][_0xf8bac9];for(const _0x25cfd3 of _0x4a546e)if(_0x25cfd3['item']['is']('element','tableCell')){const _0x498ddb=this['_getVidAttributeName'](_0x25cfd3),_0x350408=_0x25cfd3['item']['getAttribute'](_0x498ddb);if(_0x4ae309['has'](_0x350408)){const _0x50e669=_0x25cfd3['item']['parent']['parent']['getAttribute']('vid_start'),_0x26bb54=_0x4ae309['get'](_0x350408),_0x2aaf8f=_0x14344e['get'](_0x50e669)||{'users':new Set(),'aiSource':null};_0x2aaf8f['users']['add'](_0x26bb54['userId']),_0x2aaf8f['aiSource']=_0x2aaf8f['aiSource']||_0x26bb54['aiSource']||null,_0x14344e['set'](_0x50e669,_0x2aaf8f);}}_0x4a546e=_0x3fa694['deletions'][_0xf8bac9];for(const _0x3fe12e of _0x4a546e)if(_0x3fe12e['item']['is']('element','tableCell')){const _0x51a38d=this['_getVidAttributeName'](_0x3fe12e),_0x3ba5dd=_0x3fe12e['item']['getAttribute'](_0x51a38d);if(_0x586611['has'](_0x3ba5dd)){const _0x1a3a4c=_0x3fe12e['item']['parent']['parent']['getAttribute']('vid_start'),_0x112b8a=_0x586611['get'](_0x3ba5dd),_0x26ef01=_0x14344e['get'](_0x1a3a4c)||{'users':new Set(),'aiSource':null};_0x26ef01['users']['add'](_0x112b8a['userId']),_0x26ef01['aiSource']=_0x26ef01['aiSource']||_0x112b8a['aiSource']||null,_0x14344e['set'](_0x1a3a4c,_0x26ef01);}}for(const _0x5026db of _0x14344e['keys']())(_0x4ae309['has'](_0x5026db)||_0x586611['has'](_0x5026db))&&_0x14344e['delete'](_0x5026db);}for(const _0x187356 of _0x357e3a){const _0x2193a7=_0x3fa694['insertions'][_0x187356];let _0x2c980f=null,_0x256db8=null,_0x462740=null;for(const _0x19462b of _0x2193a7){const _0x16bf15=this['_getVidAttributeName'](_0x19462b),_0x3497c8=_0x19462b['item']['getAttribute'](_0x16bf15),_0x10bac7=_0x14344e['get'](_0x3497c8);if(_0x10bac7&&'elementStart'==_0x19462b['type']&&(_0x2c980f=Array['from'](_0x10bac7['users'])[0x0],_0x256db8=_0x10bac7['aiSource'],_0x462740=_0x19462b['item']['getAttribute']('vid_end')),_0x2c980f){const _0x58b10c=_0x256db8||_0x586611['get'](_0x3497c8)?.['aiSource']||null,_0x54621d=_0x256db8||_0x4ae309['get'](_0x3497c8)?.['aiSource']||null;_0x586611['set'](_0x3497c8,{'userId':_0x2c980f,'aiSource':_0x58b10c}),_0x4ae309['set'](_0x3497c8,{'userId':_0x2c980f,'aiSource':_0x54621d});}_0x3497c8==_0x462740&&(_0x2c980f=null,_0x462740=null);}}const _0x4c4edc={},_0x85e135=new Set();for(const _0x4123b8 of _0x357e3a){const _0x40aae7=_0x10c554['deletions'][_0x4123b8],_0x1e5ae=_0x10c554['insertions'][_0x4123b8];for(const {userId:_0x39b5cc}of this['_touchedMarkers']['values']())null!==_0x39b5cc&&_0x85e135['add'](_0x39b5cc);for(const {userId:_0x5df698}of this['_touchedRoots']['values']())null!==_0x5df698&&_0x85e135['add'](_0x5df698);const _0xe7b094={};this['_markChanges'](_0x1e5ae,_0x3fa694['insertions'][_0x4123b8],_0x4ae309,'insertion',_0x85e135,_0xe7b094),this['_markChanges'](_0x40aae7,_0x3fa694['deletions'][_0x4123b8],_0x586611,'deletion',_0x85e135,_0xe7b094),this['_collectSuggestionAiSources'](_0x1e5ae,_0xe7b094),this['_collectSuggestionAiSources'](_0x40aae7,_0xe7b094),_0x4c4edc[_0x4123b8]={'insertions':this['_prepareViewToSave'](_0x1e5ae),'deletions':this['_prepareViewToSave'](_0x40aae7),'attachChange':this['_touchedRoots']['get'](_0x4123b8)||null,'attributesBefore':_0x413e62(this['_baseRootsAttributes']['get'](_0x4123b8))||{},'attributesAfter':_0x413e62(this['_diffRootsAttributes']['get'](_0x4123b8)),'rootElementName':_0x7b8b39['get'](_0x4123b8),'aiSources':_0xe7b094};}const _0xf0b797=Array['from'](_0x4ae309['values']())['some'](_0x3732f8=>!(!_0x3732f8||!_0x3732f8['aiSource']))||Array['from'](_0x586611['values']())['some'](_0x3a466d=>!(!_0x3a466d||!_0x3a466d['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x535b8c=>this['_aiTouchedMarkers']['has'](_0x535b8c));return{'diffData':_0x4c4edc,'authorsIds':Array['from'](_0x85e135),'hasAIChanges':_0xf0b797};}_collectSuggestionAiSources(_0x1e077d,_0x51a6d4){const _0x51043e=_0x1e077d['markers'];for(const _0x3912eb of _0x51043e['keys']()){if(!_0x3912eb['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x3912eb))continue;const _0x413d78=this['_aiTouchedMarkers']['get'](_0x3912eb);_0x413d78&&(_0x51a6d4[_0x3912eb]=_0x413d78);}}_processRootBeforeSave(_0x1833d1){for(const [,_0x211958]of _0x1833d1['markers']){const _0x3a7669=_0x211958['start']['getAncestors']()['filter'](_0x51299e=>'tableCell'==_0x51299e['name']);for(const _0x3e7237 of _0x3a7669)0x1==_0x3e7237['childCount']&&_0x3e7237['getChild'](0x0)['is']('element','paragraph')&&_0x3e7237['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x54cec0){this['_processRootBeforeSave'](_0x54cec0);const _0x5b9567=this['editor']['data']['toView'](_0x54cec0,{}),_0x54611a=Array['from'](_0x5b9567['getChildren']())['map'](_0x475986=>this['_getViewJson'](_0x475986));return JSON['stringify'](_0x54611a);}_getViewJson(_0x1ffd36){if(_0x1ffd36['is']('$text'))return _0x1ffd36['data'];{const _0x47cb90=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4e8b43=_0x1ffd36,_0x5d71c3=this['editor']['data']['htmlProcessor']['domConverter'],_0x46825f={'type':_0x47cb90['_getTypeCharForViewElement'](_0x4e8b43),'name':_0x4e8b43['name'],'attributes':Array['from'](_0x4e8b43['getAttributes']()),'children':Array['from'](_0x4e8b43['getChildren']())['map'](_0x5cfe8a=>this['_getViewJson'](_0x5cfe8a))};if(_0x1ffd36['is']('uiElement')&&'$comment'!=_0x1ffd36['name']){const _0x2bc129=_0x1ffd36['render'](_0x5d71c3['domDocument'],_0x5d71c3);_0x46825f['children']['push'](_0x2bc129['outerHTML']);}else{if(_0x1ffd36['is']('rawElement')){const _0x22f0fc=_0x5d71c3['domDocument']['createElement'](_0x4e8b43['name']);_0x1ffd36['render'](_0x22f0fc,_0x5d71c3),_0x46825f['children']['push'](_0x22f0fc['innerHTML']);}}const _0xe1f9a2=Array['from'](_0x4e8b43['getCustomProperties']());_0xe1f9a2['length']>0x0&&(_0x46825f['customProperties']=_0xe1f9a2);const _0x3766f0=_0x4e8b43['getFillerOffset']();return null!==_0x3766f0&&(_0x46825f['fillerOffset']=_0x3766f0),_0x46825f;}}['_markChanges'](_0x4c2e12,_0x847768,_0x5ab8e9,_0x283b42,_0x53ccf3,_0xd0f906){let _0x233f23=null,_0x17efff=null,_0x297042=0x0;const _0x44e83a=this['editor']['model'];for(let _0x32411c=0x0;_0x32411c<_0x847768['length'];_0x32411c++){const _0x431e00=this['_getVidAttributeName'](_0x847768[_0x32411c]),_0x2f416b=_0x847768[_0x32411c]['item']['getAttribute'](_0x431e00),_0x478325=_0x5ab8e9['get'](_0x2f416b),_0x59b5cb=_0x32411c==_0x847768['length']-0x1;!_0x233f23&&_0x478325&&(_0x233f23=_0x478325,_0x17efff=_0x847768[_0x32411c]);const _0x1f6a75=!!_0x233f23&&!!_0x478325&&_0x478325['userId']!=_0x233f23['userId'],_0x408339=!!_0x233f23&&!!_0x478325&&_0x478325['aiSource']!=_0x233f23['aiSource'];_0x233f23&&(!_0x478325||_0x1f6a75||_0x408339)&&(_0x53bfaf(_0x478325,Et(_0x17efff,_0x4c2e12,_0x44e83a),Et(_0x847768[_0x32411c],_0x4c2e12,_0x44e83a)),_0x233f23=_0x478325||null,_0x17efff=_0x478325?_0x847768[_0x32411c]:null),_0x233f23&&_0x59b5cb&&_0x53bfaf(_0x478325,Et(_0x17efff,_0x4c2e12,_0x44e83a),Ot(_0x847768[_0x32411c],_0x4c2e12,_0x44e83a));}function _0x53bfaf(_0x1241ad,_0x2e8421,_0x1c7e3e){const _0x4a71c4=_0x233f23['userId'],_0x3bc449=_0x233f23['aiSource'],_0x29b872='revision:'+_0x283b42+':'+_0x4a71c4+':'+_0x297042++,_0x20d79d=_0x44e83a['createRange'](_0x2e8421,_0x1c7e3e);_0x4c2e12['markers']['set'](_0x29b872,_0x20d79d),_0x3bc449&&(_0xd0f906[_0x29b872]=_0x3bc449),null!==_0x4a71c4&&_0x53ccf3['add'](_0x4a71c4);}}_getVidAttributeName(_0x3ca35d){switch(_0x3ca35d['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x357268){const _0x34e258=this['_idsRoots']['get'](_0x357268['position']['root']['rootName']),_0x3403f6=_0x2ded0a(_0x357268['position'],_0x34e258),_0xab6f4=null===_0x357268['_authorId']?null:_0x357268['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4a982c=_0x357268['_aiSource']||null,_0x4d18b1=_0x3403f6['parent'],_0x5aa8cb=this['_revisionId'],_0x544900=[];for(const _0x35cbf7 of _0x357268['nodes'])if(_0x35cbf7['is']('element'))_0x544900['push'](this['_makeIdsRoot'](_0x35cbf7));else{for(let _0x2e9001=0x0;_0x2e9001<_0x35cbf7['offsetSize'];_0x2e9001++)_0x544900['push'](new _0x168c99('$text',{'vid':this['_revisionId']++}));}const _0x1f95fd=this['_revisionId'];for(let _0x23eb2a=_0x5aa8cb;_0x23eb2a<_0x1f95fd;_0x23eb2a++)this['_touched']['set'](_0x23eb2a,{'userId':_0xab6f4,'aiSource':_0x4a982c});_0x4d18b1['_insertChild'](_0x3403f6['offset'],_0x544900);}_setTouched(_0x23314a,_0x4f3a38,_0x5bd19c){this['_touched']['set'](_0x23314a,{'userId':_0x4f3a38,'aiSource':_0x5bd19c||this['_touched']['get'](_0x23314a)?.['aiSource']||null});}_handleMoveOperation(_0x1666d9){(_0x1666d9=this['_cloneOperation'](_0x1666d9,this['_idsRoots']))['_execute']();const _0x59e9e8=null===_0x1666d9['_authorId']?null:_0x1666d9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xdb2c7=_0x1666d9['_aiSource']||null,_0x51c3c1=_0x1666d9['getMovedRangeStart'](),_0x3208a2=_0x51c3c1['parent'],_0x425fa9=_0x51c3c1['offset'],_0x14cad7=(_0x399a16,_0x1175b4,_0x5b2314)=>{for(let _0x4505b0=_0x1175b4;_0x4505b0<_0x5b2314;_0x4505b0++){const _0x1126ee=_0x399a16['getChild'](_0x4505b0);_0x1126ee['is']('element','$text')?this['_setTouched'](_0x1126ee['getAttribute']('vid'),_0x59e9e8,_0xdb2c7):(this['_setTouched'](_0x1126ee['getAttribute']('vid_start'),_0x59e9e8,_0xdb2c7),_0x14cad7(_0x1126ee,0x0,_0x1126ee['childCount']),this['_setTouched'](_0x1126ee['getAttribute']('vid_end'),_0x59e9e8,_0xdb2c7));}};_0x14cad7(_0x3208a2,_0x425fa9,_0x425fa9+_0x1666d9['howMany']);}_handleMergeOperation(_0x937301){const _0x5b1d2b=null===(_0x937301=this['_cloneOperation'](_0x937301,this['_idsRoots']))['_authorId']?null:_0x937301['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x481dae=_0x937301['_aiSource']||null,_0x136d98=_0x937301['targetPosition']['parent'],_0x55e6be=_0x937301['sourcePosition']['parent'],_0x3e8dde=_0x136d98['getAttribute']('vid_end'),_0x4ff3bb=_0x55e6be['getAttribute']('vid_start');_0x136d98['_setAttribute']('vid_end',_0x55e6be['getAttribute']('vid_end')),_0x55e6be['_setAttribute']('vid_end',_0x3e8dde),this['_setTouched'](_0x4ff3bb,_0x5b1d2b,_0x481dae),this['_setTouched'](_0x3e8dde,_0x5b1d2b,_0x481dae),_0x937301['_execute']();}_handleSplitOperation(_0x16d34b){const _0x204e9f=null===(_0x16d34b=this['_cloneOperation'](_0x16d34b,this['_idsRoots']))['_authorId']?null:_0x16d34b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3ab1b2=_0x16d34b['_aiSource']||null,_0x13510f=_0x16d34b['graveyardPosition'],_0x231cc0=_0x16d34b['splitPosition']['parent'];_0x16d34b['_execute']();const _0x42dced=_0x231cc0['getAttribute']('vid_end'),_0x4ef73b=_0x16d34b['insertionPosition']['nodeAfter'];if(_0x13510f){const _0x5508bd=_0x4ef73b['getAttribute']('vid_end'),_0x17d9f3=_0x231cc0['getAttribute']('vid_end');_0x231cc0['_setAttribute']('vid_end',_0x5508bd),_0x4ef73b['_setAttribute']('vid_end',_0x17d9f3),this['_setTouched'](_0x231cc0['getAttribute']('vid_end'),_0x204e9f,_0x3ab1b2),this['_setTouched'](_0x4ef73b['getAttribute']('vid_start'),_0x204e9f,_0x3ab1b2);}else{const _0x47a038=this['_revisionId']++,_0x30be96=this['_revisionId']++;_0x231cc0['_setAttribute']('vid_end',_0x47a038),_0x4ef73b['_setAttribute']('vid_start',_0x30be96),_0x4ef73b['_setAttribute']('vid_end',_0x42dced),this['_setTouched'](_0x47a038,_0x204e9f,_0x3ab1b2),this['_setTouched'](_0x30be96,_0x204e9f,_0x3ab1b2);}}_handleMarkerOperation(_0x17d5b9){if(!_0x17d5b9['affectsData'])return;const _0xf8dec=(_0x17d5b9=this['_cloneOperation'](_0x17d5b9,this['_diffRoots']))['oldRange']?_0x17d5b9['oldRange']['root']:null,_0x2cd7be=_0x17d5b9['newRange']?_0x17d5b9['newRange']['root']:null;_0xf8dec&&this['_markers']['delete'](_0x17d5b9['name']),_0x2cd7be&&this['_markers']['set'](_0x17d5b9['name'],_0x17d5b9['newRange']['clone']());const _0x4010b0=null===_0x17d5b9['_authorId']?null:_0x17d5b9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x36c9bd=_0x17d5b9['name'];if(_0x17d5b9['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x36c9bd,_0x17d5b9['_aiSource']),!this['_touchedMarkers']['has'](_0x36c9bd))return void this['_touchedMarkers']['set'](_0x36c9bd,{'range':_0x17d5b9['oldRange'],'userId':_0x4010b0});const _0x139ab3=this['_touchedMarkers']['get'](_0x36c9bd),_0x31dd8a=_0x139ab3['range'],_0x133369=_0x17d5b9['newRange'];null==_0x31dd8a&&null==_0x133369||_0x31dd8a&&_0x133369&&_0x31dd8a['isEqual'](_0x133369)?this['_touchedMarkers']['delete'](_0x17d5b9['name']):_0x139ab3['userId']=_0x4010b0;}_handleRootOperation(_0x2fef41,_0x5dd5ed){this['_diffRoots']['has'](_0x2fef41['rootName'])?this['_diffRoots']['get'](_0x2fef41['rootName'])['_isAttached']=_0x2fef41['isAdd']:(this['_diffRoots']['set'](_0x2fef41['rootName'],St(_0x2fef41['rootName'],_0x2fef41['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x2fef41['rootName'],{}),_0x5dd5ed&&this['_idsRoots']['set'](_0x2fef41['rootName'],St(_0x2fef41['rootName'],_0x2fef41['elementName'],!0x0)));const _0x908333=null===_0x2fef41['_authorId']?null:_0x2fef41['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5262f3=this['_touchedRoots']['get'](_0x2fef41['rootName']);_0x5262f3&&_0x5262f3['userId']===_0x908333?this['_touchedRoots']['delete'](_0x2fef41['rootName']):this['_touchedRoots']['set'](_0x2fef41['rootName'],{'userId':_0x908333,'isAttached':_0x2fef41['isAdd']});}_handleRootAttributeOperation(_0x5337b0){const _0x36af79=this['_diffRootsAttributes']['get'](_0x5337b0['root']['rootName']);null===_0x5337b0['newValue']?delete _0x36af79[_0x5337b0['key']]:_0x36af79[_0x5337b0['key']]=_0x5337b0['newValue'];}};function It(_0x4381e7){const _0x534679=St(_0x4381e7['rootName'],_0x4381e7['name'],_0x4381e7['isAttached']());for(const _0x1ca8ef of _0x4381e7['getChildren']()){const _0xfe6240=_0x1ca8ef['_clone'](!0x0);_0x534679['_appendChild'](_0xfe6240);}return _0x534679;}function St(_0x88dbdf,_0x149cb3,_0x3384bf=!0x0){const _0x5cb317=new _0x35dd54();return _0x5cb317['rootName']=_0x88dbdf,_0x5cb317['name']=_0x149cb3,_0x5cb317['_isAttached']=_0x3384bf,_0x5cb317['isAttached']=()=>_0x5cb317['_isAttached'],_0x5cb317;}function Et(_0x17ede5,_0x4986eb,_0x11e3b2){const _0x38dc51='elementEnd'==_0x17ede5['type']?_0x11e3b2['createPositionAt'](_0x17ede5['item'],'end'):_0x11e3b2['createPositionBefore'](_0x17ede5['item']);return _0x11e3b2['createPositionFromPath'](_0x4986eb,_0x38dc51['path'],_0x38dc51['stickiness']);}function Ot(_0x193e21,_0x33a726,_0x1c1c80){const _0x42ef15='elementStart'==_0x193e21['type']?_0x1c1c80['createPositionAt'](_0x193e21['item'],0x0):_0x1c1c80['createPositionAfter'](_0x193e21['item']);return _0x1c1c80['createPositionFromPath'](_0x33a726,_0x42ef15['path'],_0x42ef15['stickiness']);}const Ct=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x18258e();var Tt=class extends Vt{['id'];author;type;data;rootName;constructor(_0x2d8e04){super(),this['id']=_0x2d8e04['id']||_0x148ef2(),this['author']=_0x2d8e04['author'],this['type']=_0x2d8e04['type'],this['data']=_0x2d8e04['data']||{},this['rootName']=_0x2d8e04['rootName'],this['set']('createdAt',_0x2d8e04['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Mt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x2ac350,_0x56d3dc){this['newRevisionId']=_0x2ac350,this['oldRevisionId']=_0x56d3dc,this['changes']=new _0x26b52d();}_setChanges(_0x5cc235){for(const _0xb94f4d of _0x5cc235)this['changes']['add'](_0xb94f4d);}},Ht=class extends _0x4ba944{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x42dea7,_0x3f33a5,yt,bt];}constructor(_0x4dfe7b){super(_0x4dfe7b),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',(_0x51580f,_0x2623ef,_0x514428)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x6d0a2e=>{for(const _0x29e990 of this['editor']['editing']['view']['document']['roots'])_0x514428?_0x6d0a2e['removeClass']('ck-editor__editable__overlay',_0x29e990):_0x6d0a2e['addClass']('ck-editor__editable__overlay',_0x29e990);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4fd654=>null!==_0x4fd654),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0xde11c2,_0x1028b3,_0x134b0d)=>_0xde11c2&&_0x134b0d?_0x1028b3['changes']['getIndex'](_0x134b0d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x46a3c0,_0x3fe9bd)=>_0x46a3c0?_0x3fe9bd['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3f33a5),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x417879=this['editor'],_0x21d81e=new Ft(_0x417879,{'direction':'backward'}),_0x5c54b5=new Ft(_0x417879,{'direction':'forward'});_0x417879['commands']['add']('showPreviousChange',_0x21d81e),_0x417879['commands']['add']('showNextChange',_0x5c54b5),_0x417879['commands']['add']('restoreRevision',new Lt(_0x417879)),this['on']('change:numberOfChanges',()=>{_0x21d81e['refresh'](),_0x5c54b5['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x417879['enableReadOnlyMode']('revision-viewer'),_0x417879['plugins']['has']('WidgetToolbarRepository')&&_0x417879['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x588074){return await this['_utils']['loadRevisionData'](_0x588074,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x588074);}async getRevisionRootsAttributes(_0xd06789){return await this['_utils']['loadRevisionData'](_0xd06789,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xd06789);}async['compare'](_0x4357ea,_0x23a714,_0x5e6414=!0x1){if(!this['isEnabled'])return;const _0xd0ea33=this['diff'],_0x36dbc0=this['repository'],_0x112f1d='string'==typeof _0x4357ea?_0x36dbc0['getRevision'](_0x4357ea):_0x4357ea,_0x5b9c32='string'==typeof _0x23a714?_0x36dbc0['getRevision'](_0x23a714):_0x23a714,_0x4963d1=_0x112f1d['id'],_0x572fe7=_0x5b9c32?_0x5b9c32['id']:null;if(!_0x5e6414&&this['diff']&&this['diff']['newRevisionId']===_0x4963d1&&this['diff']['oldRevisionId']===_0x572fe7)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Mt(_0x4963d1,_0x572fe7);const _0x4fb547=this['_getRevisionsRange'](_0x112f1d,_0x5b9c32,!0x0)['map'](_0xf1b988=>this['_utils']['loadRevisionData'](_0xf1b988,this['adapter']));return _0x4fb547['push'](new Promise(_0x35f839=>{setTimeout(_0x35f839,0x14);})),Promise['all'](_0x4fb547)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x337bde=this['_getDiff'](_0x4963d1,_0x572fe7);this['_cleanUpCommentMarkers'](_0x337bde);for(const _0x5c8574 of _0x337bde['changes'])this['_changeIdToChange']['set'](_0x5c8574['id'],_0x5c8574);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xe2eeb4=>{for(const _0x5c890c of this['editor']['model']['document']['getRootNames']())_0xe2eeb4['detachRoot'](_0x5c890c);for(const _0x516f16 of Object['keys'](_0x337bde['model'])){const _0x1267e2=_0x337bde['model'][_0x516f16]['name'],_0x2e1709=_0xe2eeb4['addRoot'](_0x516f16,_0x1267e2);for(const _0x1ffe61 of Object['keys'](_0x337bde['attributes'][_0x516f16]))_0xe2eeb4['setAttribute'](_0x1ffe61,_0x337bde['attributes'][_0x516f16][_0x1ffe61],_0x2e1709);_0xe2eeb4['insert'](_0x337bde['model'][_0x516f16],_0x2e1709,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x337bde['changes'])),this['isReady']=!0x0;})['catch'](_0x2ce415=>{console['error'](_0x2ce415),this['_cleanUp'](),_0xd0ea33&&(this['diff']=_0xd0ea33),this['isReady']=!0x0;});}addRevisionData(_0x5e24ba,_0x28da2d){const _0x2caeb7=this['repository']['createRevision'](_0x5e24ba);return _0x2caeb7['on']('_update',(_0x248b90,_0x23ffa6,_0x4ef2e6)=>_0x28da2d(_0x23ffa6,_0x4ef2e6,_0x2caeb7)),this['repository']['addRevision'](_0x2caeb7),_0x2caeb7;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x574f57=>{for(const _0x59cac7 of this['editor']['model']['document']['getRootNames']())_0x574f57['detachRoot'](_0x59cac7);});}_cleanUpCommentMarkers(_0xef3eea){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x3b84c4=this['_getVisibleCommentThreadIds']();for(const _0xc0d8e of Object['values'](_0xef3eea['model']))for(const _0x3ef5d0 of Array['from'](_0xc0d8e['markers']['keys']()))_0x3ef5d0['startsWith']('revision-comment:')&&!_0x3b84c4['has'](Pt(_0x3ef5d0))&&_0xc0d8e['markers']['delete'](_0x3ef5d0);}_sortAndFilterDiffChanges(_0xa9e41f){const _0x8f3ff4=[],_0x21d29f=new Map();for(const _0x3f2be3 of this['editor']['model']['document']['getRootNames']()){const _0x30a8aa=this['editor']['editing']['view']['getDomRoot'](_0x3f2be3);if(!_0x30a8aa)continue;const _0x2a41ec=_0x30a8aa['getClientRects']()['item'](0x0);_0x2a41ec&&(_0x8f3ff4['push'](_0x3f2be3),_0x21d29f['set'](_0x3f2be3,_0x2a41ec));}return _0x8f3ff4['sort']((_0x35126d,_0x4143a4)=>{const _0x20fbf5=_0x21d29f['get'](_0x35126d),_0x26a7d4=_0x21d29f['get'](_0x4143a4);return _0x20fbf5['y']-_0x26a7d4['y']||_0x20fbf5['x']-_0x26a7d4['x'];}),(_0xa9e41f=_0xa9e41f['filter'](_0x5c932e=>_0x8f3ff4['includes'](_0x5c932e['rootName'])))['sort']((_0x3f9d89,_0x31f935)=>_0x8f3ff4['indexOf'](_0x3f9d89['rootName'])-_0x8f3ff4['indexOf'](_0x31f935['rootName'])),_0xa9e41f;}['_makeTape'](_0xc3d75f,_0x7f632c={}){const _0x71a7f5=Array['from'](_0xc3d75f['markers'])['filter'](([_0x189697,_0x2c86d5])=>_0x189697['startsWith']('revision:')&&!_0x2c86d5['isCollapsed']),_0x152fce=Array['from'](this['editor']['model']['createRangeIn'](_0xc3d75f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x71a7f5['length'])for(const _0x158f76 of _0x152fce){const [_0x58c7f6,_0x4cc979]=_0x71a7f5[0x0],[,_0x279013,_0x2138a1]=_0x58c7f6['split'](':'),_0x4e21e3=_0x7f632c[_0x58c7f6]||null;if(_0x4cc979['end']['isEqual'](_0x158f76['nextPosition'])&&_0x71a7f5['shift'](),(_0x158f76['previousPosition']['isEqual'](_0x4cc979['start'])||_0x158f76['previousPosition']['isAfter'](_0x4cc979['start']))&&('insertion'==_0x279013?_0x158f76['isAdded']={'userId':_0x2138a1,'aiSource':_0x4e21e3}:'deletion'==_0x279013&&(_0x158f76['isRemoved']={'userId':_0x2138a1,'aiSource':_0x4e21e3})),0x0==_0x71a7f5['length'])break;}return _0x152fce;}_refreshStartEndIndex(_0x430ebb){const _0x3b058e=new Map();for(let _0x427fb4=0x0;_0x427fb4<_0x430ebb['length'];_0x427fb4++)'text'===_0x430ebb[_0x427fb4]['type']?(_0x430ebb[_0x427fb4]['item']['startIndex']=_0x427fb4,_0x430ebb[_0x427fb4]['item']['endIndex']=_0x427fb4):('elementStart'===_0x430ebb[_0x427fb4]['type']?_0x430ebb[_0x427fb4]['item']['startIndex']=_0x427fb4:'elementEnd'===_0x430ebb[_0x427fb4]['type']&&(_0x430ebb[_0x427fb4]['item']['endIndex']=_0x427fb4),_0x3b058e['set'](_0x430ebb[_0x427fb4]['id'],_0x427fb4));for(const _0x4d0f2b of _0x3b058e['values']())'elementStart'===_0x430ebb[_0x4d0f2b]['type']?_0x430ebb[_0x4d0f2b]['item']['endIndex']=_0x3b058e['get'](_0x430ebb[_0x4d0f2b]['pairId']):'elementEnd'===_0x430ebb[_0x4d0f2b]['type']&&(_0x430ebb[_0x4d0f2b]['item']['startIndex']=_0x3b058e['get'](_0x430ebb[_0x4d0f2b]['pairId']));}['_processTape'](_0x5494fd){for(let _0x1afb52=0x0;_0x1afb52<_0x5494fd['length'];_0x1afb52++){if('elementStart'===_0x5494fd[_0x1afb52]['type'])_0x5494fd[_0x1afb52]['item']['startIndex']=_0x1afb52;else{if('elementEnd'===_0x5494fd[_0x1afb52]['type']){_0x5494fd[_0x1afb52]['item']['endIndex']=_0x1afb52;const _0x18d7d2=_0x5494fd[_0x1afb52]['item']['startIndex'];_0x5494fd[_0x18d7d2]['pairId']=_0x5494fd[_0x1afb52]['id'],_0x5494fd[_0x1afb52]['pairId']=_0x5494fd[_0x18d7d2]['id'];}else _0x5494fd[_0x1afb52]['item']['startIndex']=_0x1afb52,_0x5494fd[_0x1afb52]['item']['endIndex']=_0x1afb52,_0x5494fd[_0x1afb52]['pairId']=null;}_0x5494fd[_0x1afb52]['markersStart']||(_0x5494fd[_0x1afb52]['markersStart']=[],_0x5494fd[_0x1afb52]['markersEnd']=[]);}}_markInsertions(_0xc05ad6,_0x517279){const _0x2ee1cf=_0xc05ad6['filter'](_0x1baa1b=>!_0x1baa1b['isAdded']);for(let _0x1ee60f=0x0;_0x1ee60f<_0x517279['length'];_0x1ee60f++)_0x517279[_0x1ee60f]['isAdded']&&(_0x2ee1cf[_0x1ee60f]['isAdded']=_0x517279[_0x1ee60f]['isAdded']);}_getDiff(_0x4a23c5,_0x47f726=null){const _0x46ad90=this['repository']['getRevision'](_0x4a23c5),_0x5a00e8=_0x47f726?this['repository']['getRevision'](_0x47f726):null,_0x3ea4bc=this['_getRevisionsRange'](_0x46ad90,_0x5a00e8),_0x1cf0dc=_0x3ea4bc[_0x3ea4bc['length']-0x1],_0x1d8d67=new Map(),_0x5234c8={'model':{},'attributes':{},'changes':[]},_0x1d1e6d=new Set(),_0x41f9d9=new Map();for(let _0x44fe2e=_0x3ea4bc['length']-0x1;_0x44fe2e>=0x0;_0x44fe2e--){const _0x5e3d6d=_0x3ea4bc[_0x44fe2e];for(const _0x20345a of Object['keys'](_0x5e3d6d['diffData']))if(_0x5e3d6d['diffData'][_0x20345a]['attachChange']){const _0x4eccf3=_0x5e3d6d['diffData'][_0x20345a]['attachChange'];_0x4eccf3['isAttached']?(_0x1d1e6d['add'](_0x20345a),_0x41f9d9['has'](_0x20345a)&&_0x41f9d9['get'](_0x20345a)['userId']==_0x4eccf3['userId']?_0x41f9d9['delete'](_0x20345a):_0x41f9d9['set'](_0x20345a,_0x4eccf3)):_0x41f9d9['has'](_0x20345a)?(_0x1d1e6d['delete'](_0x20345a),_0x41f9d9['delete'](_0x20345a)):(_0x1d1e6d['add'](_0x20345a),_0x41f9d9['set'](_0x20345a,_0x4eccf3));}else _0x1d1e6d['add'](_0x20345a);}for(const _0x5d739e of _0x1d1e6d){const _0x270995=_0x41f9d9['has'](_0x5d739e)&&!_0x41f9d9['get'](_0x5d739e)['isAttached'];let _0x238260=_0x270995?_0x3ea4bc['length']-0x1:0x0;const _0x4945f4=_0x270995?-0x1:0x1;for(;_0x3ea4bc[_0x238260];){const _0x3d14e2=_0x3ea4bc[_0x238260];if(_0x3d14e2['diffData'][_0x5d739e]){const _0x334a8e=_0x270995?_0x3d14e2['diffData'][_0x5d739e]['attributesBefore']:_0x3d14e2['diffData'][_0x5d739e]['attributesAfter'];_0x5234c8['attributes'][_0x5d739e]=_0x334a8e?_0x413e62(_0x334a8e):{};break;}_0x238260+=_0x4945f4;}}for(const _0x1a7164 of _0x3ea4bc){_0x1a7164['model']={};for(const _0x4ff795 of _0x1a7164['authors'])_0x1d8d67['set'](_0x4ff795['id'],_0x4ff795);for(const _0x55cb67 of _0x1d1e6d){const _0x417e99=_0x1a7164['diffData'][_0x55cb67]?_0x1a7164['diffData'][_0x55cb67]['insertions']:'[]',_0x31d6ac=_0x1a7164['diffData'][_0x55cb67]?_0x1a7164['diffData'][_0x55cb67]['deletions']:'[]',_0x5df2ca=_0x1a7164['diffData'][_0x55cb67]?.['rootElementName']||'$root';_0x1a7164['model'][_0x55cb67]={'insertions':this['_utils']['_makeModelFromViewString'](_0x417e99,_0x5df2ca),'deletions':this['_utils']['_makeModelFromViewString'](_0x31d6ac,_0x5df2ca)};}}for(const _0x57b353 of _0x1d1e6d){let _0xfcbe2f=null,_0x274a7d=0x0;const _0x4c6b6d=_0x3ea4bc['map'](_0x57fb75=>_0x57fb75['diffData'][_0x57b353]?.['rootElementName'])['find'](_0x5bcc5b=>void 0x0!==_0x5bcc5b)||'$root',_0x370131=new Map(Array['from'](_0x46ad90['model'][_0x57b353]['insertions']['markers'])['filter'](([_0x25e559])=>!_0x25e559['startsWith']('revision:')));let _0x177dfa=0x0;for(const _0x2cbdb1 of _0x3ea4bc){const _0xa609e9=_0x2cbdb1['diffData'][_0x57b353]?.['aiSources']||{},_0x342d12=this['_makeTape'](_0x2cbdb1['model'][_0x57b353]['insertions'],_0xa609e9);_0x2cbdb1==_0x46ad90?(_0xfcbe2f=_0x342d12,_0x274a7d=_0xfcbe2f['length'],_0xfcbe2f['forEach'](_0x153d81=>{_0x153d81['id']=_0x177dfa++;}),this['_processTape'](_0xfcbe2f)):this['_markInsertions'](_0xfcbe2f,_0x342d12);const _0x412b95=_0xfcbe2f['filter'](_0x370e66=>!_0x370e66['isAdded'])['map'](_0x3ee960=>_0x3ee960['id']);let _0x3779f0=0x0;const _0x1a8f72=this['_makeTape'](_0x2cbdb1['model'][_0x57b353]['deletions'],_0xa609e9);_0x1a8f72['forEach'](_0x50d936=>{_0x50d936['isRemoved']?_0x50d936['id']=_0x274a7d++:_0x50d936['id']=_0x412b95[_0x3779f0++];}),this['_processTape'](_0x1a8f72),this['_setDistance'](_0xfcbe2f,'isAdded'),this['_setDistance'](_0x1a8f72,'isRemoved'),_0x2cbdb1==_0x46ad90&&this['_markMarkers'](_0xfcbe2f,_0x370131),_0xfcbe2f=this['_joinTapes'](_0xfcbe2f,_0x1a8f72),this['_refreshStartEndIndex'](_0xfcbe2f),this['_setDistance'](_0xfcbe2f,'isRemoved');}_0xfcbe2f=_0xfcbe2f['filter'](_0x143c45=>!(_0x143c45['isAdded']&&_0x143c45['isRemoved']));const _0x183e80=new Map(_0x1cf0dc['model'][_0x57b353]['deletions']['markers']),_0x286304=new Set(_0x370131['keys']());for(const _0x5eec85 of _0x183e80['keys']())_0x286304['delete'](_0x5eec85);const _0x1b2e90=Object['assign']({},..._0x3ea4bc['map'](_0x457228=>_0x457228['diffData'][_0x57b353]?.['aiSources']));this['_markSuggestions'](_0xfcbe2f,_0x286304,_0x1b2e90),this['_fixObsoleteTags'](_0xfcbe2f),_0xfcbe2f=this['_removeMissingPairs'](_0xfcbe2f),_0xfcbe2f=this['_markMismatchedRemovedTags'](_0xfcbe2f),_0xfcbe2f=this['_removeUnsupportedChanges'](_0xfcbe2f);const {root:_0x1a1c5c,changes:_0x1bf74e}=this['_makeModelFromTape'](_0xfcbe2f,_0x1d8d67,_0x57b353,_0x4c6b6d);_0x5234c8['model'][_0x57b353]=_0x1a1c5c;const _0x36786f=_0x41f9d9['get'](_0x57b353);if(_0x36786f){const _0x54d179=_0x1d8d67['get'](_0x36786f['userId']),_0x51c588=new Tt({'author':_0x54d179,'type':_0x36786f['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x57b353});_0x1bf74e['unshift'](_0x51c588),_0x5234c8['attributes'][_0x57b353]['revisionHistoryAttachChange']=_0x51c588['id'];}_0x5234c8['changes']=_0x5234c8['changes']['concat'](_0x1bf74e);}return _0x5234c8;}['_markMarkers'](_0x1e9ff0,_0x24693e){for(let _0x43e8ca=0x0;_0x43e8ca<_0x1e9ff0['length'];_0x43e8ca++)for(const [_0x2d45ca,_0x2dbb19]of _0x24693e)!_0x2dbb19['isCollapsed']&&_0x2dbb19['start']['isEqual'](_0x1e9ff0[_0x43e8ca]['previousPosition'])&&_0x1e9ff0[_0x43e8ca]['markersStart']['push'](_0x2d45ca),_0x2dbb19['end']['isEqual'](_0x1e9ff0[_0x43e8ca]['nextPosition'])&&_0x1e9ff0[_0x43e8ca]['markersEnd']['push'](_0x2d45ca);}['_joinTapes'](_0x30f76b,_0x9dda82){let _0x2a734e=[],_0x5d0d33=0x0,_0x598894=0x0;for(;_0x5d0d33<_0x30f76b['length']||_0x598894<_0x9dda82['length'];){const _0x248288=_0x30f76b[_0x5d0d33]||{},_0x5a48ad=_0x9dda82[_0x598894]||{};if(_0x248288['id']==_0x5a48ad['id'])_0x5d0d33++,_0x598894++,_0x2a734e['push'](_0x248288);else{if(_0x5a48ad['isRemoved']&&_0x248288['isAdded']){const {commonTape:_0x524ab6,iEnd:_0x2f9aa6,jEnd:_0x24b46c}=this['_threeWayMerge'](_0x30f76b,_0x5d0d33,_0x9dda82,_0x598894);_0x2a734e=_0x2a734e['concat'](_0x524ab6),_0x5d0d33=_0x2f9aa6,_0x598894=_0x24b46c;}else _0x5a48ad['isRemoved']?(_0x598894++,_0x2a734e['push'](_0x5a48ad)):(_0x5d0d33++,_0x2a734e['push'](_0x248288));}}return _0x2a734e;}_markSuggestions(_0xee0382,_0x215273,_0x208cec){const _0x205f41=[];for(let _0x143cf6=0x0;_0x143cf6<_0xee0382['length'];_0x143cf6++){for(let _0x5a770e=0x0;_0x5a770e<_0xee0382[_0x143cf6]['markersStart']['length'];_0x5a770e++){const _0xd13c89=_0xee0382[_0x143cf6]['markersStart'][_0x5a770e];if(!_0x215273['has'](_0xd13c89))continue;const {group:_0x51180b,type:_0x20f9eb,authorId:_0x2dfa9a}=_0x585dc7(_0xd13c89);if('revision-suggestion'!=_0x51180b||'insertion'!=_0x20f9eb&&'deletion'!=_0x20f9eb)continue;const _0x3521ac=_0x208cec['suggestion:'+_0xd13c89['slice'](0x14)]||null;_0x205f41['unshift']({'type':_0x20f9eb,'name':_0xd13c89,'userId':_0x2dfa9a,'aiSource':_0x3521ac}),_0xee0382[_0x143cf6]['markersStart']['splice'](_0x5a770e,0x1),_0x5a770e--;}_0x22cb35(_0xee0382[_0x143cf6]);for(let _0x59c632=0x0;_0x59c632<_0xee0382[_0x143cf6]['markersEnd']['length'];_0x59c632++){const _0x36025f=_0xee0382[_0x143cf6]['markersEnd'][_0x59c632];if(!_0x215273['has'](_0x36025f))continue;const {group:_0x5a9c75,type:_0xac8342}=_0x585dc7(_0x36025f);if('revision-suggestion'!=_0x5a9c75||'insertion'!=_0xac8342&&'deletion'!=_0xac8342)continue;_0xee0382[_0x143cf6]['markersEnd']['splice'](_0x59c632,0x1),_0x59c632--;const _0x21ea50=_0x205f41['findIndex'](_0x10b8cc=>_0x10b8cc['name']==_0x36025f);_0x21ea50>-0x1&&_0x205f41['splice'](_0x21ea50,0x1);}}function _0x585dc7(_0x444cbf){const _0x4e1b31=_0x444cbf['split'](':');return{'group':_0x4e1b31[0x0],'type':_0x4e1b31[0x1],'subType':_0x4e1b31['length']>=0x5?_0x4e1b31[0x2]:null,'id':_0x4e1b31['length']<0x5?_0x4e1b31[0x2]:_0x4e1b31[0x3],'authorId':_0x4e1b31['length']<0x5?_0x4e1b31[0x3]:_0x4e1b31[0x4],'markerCount':0x6==_0x4e1b31['length']?_0x4e1b31[0x5]:null};}function _0x22cb35(_0x52a963){for(let _0x585714=0x0;_0x585714<_0x205f41['length'];_0x585714++){if(_0x52a963['isAdded']&&'insertion'==_0x205f41[_0x585714]['type']&&_0x52a963['isAdded']['userId']==_0x205f41[_0x585714]['userId'])return _0x52a963['isAddSuggestion']={..._0x205f41[_0x585714],'aiSource':_0x52a963['isAdded']['aiSource']||_0x205f41[_0x585714]['aiSource']},void delete _0x52a963['isAdded'];if(!_0x52a963['isAdded']&&!_0x52a963['isRemoved']&&'deletion'==_0x205f41[_0x585714]['type'])return void(_0x52a963['isRemoveSuggestion']=_0x205f41[_0x585714]);}}}_setDistance(_0x5e45b8,_0x5bd795){let _0x1ed4b2=0x0,_0x33477a=!0x1;const _0xa9b180=new Map();for(const _0x90879a of _0x5e45b8)_0x90879a[_0x5bd795]?_0x33477a&&(_0x1ed4b2++,_0x33477a=!0x1):(_0x1ed4b2++,_0x33477a=!0x0),_0xa9b180['set'](_0x90879a['id'],_0x1ed4b2);for(let _0x2f8654=0x0;_0x2f8654<_0x5e45b8['length'];_0x2f8654++){if('isRemoved'==_0x5bd795&&_0x5e45b8[_0x2f8654]['isAdded']||'isAdded'==_0x5bd795&&_0x5e45b8[_0x2f8654]['isRemoved'])continue;if('text'==_0x5e45b8[_0x2f8654]['type']){_0x5e45b8[_0x2f8654]['distance']=0x0;continue;}const _0x500045=_0xa9b180['get'](_0x5e45b8[_0x2f8654]['pairId']),_0xf92f55=_0xa9b180['get'](_0x5e45b8[_0x2f8654]['id']);_0x5e45b8[_0x2f8654]['distance']=_0x500045-_0xf92f55;}}_getRevisionsRange(_0x4f4871,_0x5f22f9,_0x11cfc9=!0x1){const _0x5ba4d0=[];let _0x2534a3=this['repository']['getIndex'](_0x4f4871),_0x233470=this['repository']['getIndex'](_0x5f22f9);for(-0x1==_0x233470&&(_0x233470=this['repository']['_revisions']['length'],_0x11cfc9=!0x1);_0x2534a3<_0x233470;)_0x5ba4d0['push'](this['repository']['getRevision'](_0x2534a3)),_0x2534a3++;return _0x11cfc9&&_0x5ba4d0['push'](this['repository']['getRevision'](_0x2534a3)),_0x5ba4d0;}_threeWayMerge(_0x31cda1,_0x37b542,_0x496cd9,_0x1b9f3b){const _0x3b3317=this['editor']['model']['schema'];let _0x292730=_0x37b542;for(;_0x31cda1[_0x292730]&&_0x31cda1[_0x292730]['isAdded'];)_0x292730++;let _0x3519a5=_0x1b9f3b;for(;_0x496cd9[_0x3519a5]&&_0x496cd9[_0x3519a5]['isRemoved'];)_0x3519a5++;_0x4f5ac0(_0x31cda1,_0x37b542,_0x292730),_0x4f5ac0(_0x496cd9,_0x1b9f3b,_0x3519a5);const _0x445c19=_0x496cd9['slice'](_0x1b9f3b,_0x3519a5)['concat'](_0x31cda1['slice'](_0x37b542,_0x292730));return _0x445c19['sort']((_0x331eea,_0x198b60)=>_0x331eea['side']!=_0x198b60['side']?_0x331eea['side']-_0x198b60['side']:_0x331eea['level']!=_0x198b60['level']?_0x331eea['level']-_0x198b60['level']:_0x331eea['distance']!=_0x198b60['distance']?_0x198b60['distance']-_0x331eea['distance']:!!_0x331eea['isAdded']!=!!_0x198b60['isAdded']?-0x1==_0x331eea['side']||0x0==_0x331eea['side']?_0x331eea['isAdded']?-0x1:0x1:_0x331eea['isAdded']?0x1:-0x1:_0x331eea['index']-_0x198b60['index']),{'commonTape':_0x445c19,'iEnd':_0x292730,'jEnd':_0x3519a5};function _0x4f5ac0(_0x41804f,_0x5997b1,_0x2beb84){let _0x470640=-0x1,_0xe377f=Number['POSITIVE_INFINITY'],_0x4a303c=!0x0;for(let _0x1262f0=_0x5997b1;_0x1262f0<_0x2beb84;_0x1262f0++)if(_0x3b3317['isInline'](_0x41804f[_0x1262f0]['item'])||(_0x4a303c=!0x1),_0x41804f[_0x1262f0]['item']['startIndex']<_0x5997b1&&(_0x470640=_0x1262f0),_0x41804f[_0x1262f0]['item']['endIndex']>=_0x2beb84){_0xe377f=_0x1262f0;break;}_0x4a303c&&(_0x470640=_0x2beb84-0x1);for(let _0x5eba8c=_0x5997b1;_0x5eba8c<_0x2beb84;_0x5eba8c++)_0x41804f[_0x5eba8c]['side']=_0x5eba8c<=_0x470640?-0x1:_0x5eba8c<_0xe377f?0x0:0x1,_0x41804f[_0x5eba8c]['index']=_0x5eba8c;let _0x5defc3=0x0;for(let _0xa43a37=_0x5997b1;_0xa43a37<=_0x470640;_0xa43a37++)0x0==_0x41804f[_0xa43a37]['distance']?_0x41804f[_0xa43a37]['level']=_0x5defc3:(_0x5defc3++,_0x41804f[_0xa43a37]['level']=_0x5defc3,_0x5defc3++);for(let _0x5c9e0d=_0x5997b1;_0x5c9e0d<_0x2beb84;_0x5c9e0d++)0x0==_0x41804f[_0x5c9e0d]['side']&&(_0x41804f[_0x5c9e0d]['level']=_0x5defc3);_0x5defc3=0x0;for(let _0x338ecd=_0x2beb84-0x1;_0x338ecd>=_0xe377f;_0x338ecd--)0x0==_0x41804f[_0x338ecd]['distance']?_0x41804f[_0x338ecd]['level']=_0x5defc3:(_0x5defc3--,_0x41804f[_0x338ecd]['level']=_0x5defc3,_0x5defc3--);}}_fixObsoleteTags(_0x52f28e){const _0x5bbc58=new Map(),_0x4d10d0=this['editor']['model']['schema'];for(let _0x38c0bb=0x1;_0x38c0bb<_0x52f28e['length'];_0x38c0bb++){let _0x2d834d,_0x3020cc,_0x143fdf;const _0x558b5c=_0x52f28e[_0x38c0bb],_0x274552=_0x52f28e[_0x38c0bb-0x1];if('text'==_0x558b5c['type'])continue;if(_0x558b5c['type']!=_0x274552['type'])continue;if(!_0x4d10d0['isBlock'](_0x274552['item'])||_0x4d10d0['isLimit'](_0x274552['item']))continue;if(!_0x4d10d0['isBlock'](_0x558b5c['item'])||_0x4d10d0['isLimit'](_0x558b5c['item']))continue;if((_0x52f28e[_0x38c0bb]['isAdded']||_0x52f28e[_0x38c0bb]['isAddSuggestion'])&&_0x52f28e[_0x38c0bb-0x1]['isRemoved'])_0x2d834d=_0x52f28e[_0x38c0bb],_0x3020cc=_0x52f28e[_0x38c0bb-0x1],_0x143fdf=_0x38c0bb-0x1;else{if(!_0x52f28e[_0x38c0bb]['isRemoved']||!_0x52f28e[_0x38c0bb-0x1]['isAdded']&&!_0x52f28e[_0x38c0bb-0x1]['isAddSuggestion'])continue;_0x2d834d=_0x52f28e[_0x38c0bb-0x1],_0x3020cc=_0x52f28e[_0x38c0bb],_0x143fdf=_0x38c0bb;}const _0x420ae3=_0x2d834d['level']==_0x3020cc['level'],_0x4f007c=Math['abs'](_0x2d834d['level'])<Math['abs'](_0x3020cc['level'])&&0x0==_0x3020cc['distance'];(_0x420ae3||_0x4f007c)&&(_0x5bbc58['set'](_0x3020cc['id'],_0x2d834d['id']),_0x52f28e['splice'](_0x143fdf,0x1),_0x38c0bb--,_0x2d834d['isAdded']=!0x1);}for(let _0xf2a18c=0x0;_0xf2a18c<_0x52f28e['length'];_0xf2a18c++)_0x5bbc58['has'](_0x52f28e[_0xf2a18c]['pairId'])&&(_0x52f28e[_0xf2a18c]['pairId']=_0x5bbc58['get'](_0x52f28e[_0xf2a18c]['pairId']));}['_removeMissingPairs'](_0x859c46){const _0x2fdb06=new Set(_0x859c46['map'](_0x247515=>_0x247515['id']));for(let _0x26ff89=0x0;_0x26ff89<_0x859c46['length'];_0x26ff89++)_0x2fdb06['has'](_0x859c46[_0x26ff89]['pairId'])||0x0==_0x859c46[_0x26ff89]['distance']||(_0x859c46[_0x26ff89]['isIncorrect']=!0x0);return _0x859c46['filter'](_0x13ad19=>!_0x13ad19['isIncorrect']);}_markMismatchedRemovedTags(_0x199e32){const _0x29eb49=new Set();for(let _0x561bb0=0x0;_0x561bb0<_0x199e32['length'];_0x561bb0++){if(_0x29eb49['has'](_0x199e32[_0x561bb0]['id'])&&_0x199e32[_0x561bb0]['isRemoved']&&(_0x199e32[_0x561bb0]['isIncorrect']=!0x0),_0x199e32[_0x561bb0]['isIncorrect'])continue;if(0x0==_0x199e32[_0x561bb0]['distance'])continue;if('elementStart'!=_0x199e32[_0x561bb0]['type'])continue;if(null==_0x199e32[_0x561bb0]['pairId'])continue;let _0x46de88=_0x561bb0+0x1,_0xca2881=0x0;for(;_0x199e32[_0x46de88]['id']!=_0x199e32[_0x561bb0]['pairId'];)'elementStart'==_0x199e32[_0x46de88]['type']?_0xca2881++:'elementEnd'==_0x199e32[_0x46de88]['type']&&_0xca2881--,_0x46de88++;if(0x0!=_0xca2881){if(_0x199e32[_0x561bb0]['isRemoved'])_0x199e32[_0x561bb0]['isIncorrect']=!0x0;else{for(;_0x46de88!=_0x561bb0;)_0x199e32[_0x46de88]['isRemoved']&&0x0!=_0x199e32[_0x46de88]['distance']&&(_0x199e32[_0x46de88]['isIncorrect']=!0x0,_0x29eb49['add'](_0x199e32[_0x46de88]['pairId'])),_0x46de88--;}}}return _0x199e32['filter'](_0x558afb=>!_0x558afb['isIncorrect']);}_removeUnsupportedChanges(_0x226eca){const _0x3ddb65=this['editor']['model']['schema'];for(let _0x5624ae=0x0;_0x5624ae<_0x226eca['length'];_0x5624ae++){if(!(_0x226eca[_0x5624ae]['isAdded']||_0x226eca[_0x5624ae]['isAddSuggestion']||_0x226eca[_0x5624ae]['isRemoved']||_0x226eca[_0x5624ae]['isRemoveSuggestion']))continue;if(0x0==_0x226eca[_0x5624ae]['distance'])continue;const _0x599a0d=_0x226eca[_0x5624ae]['item'];_0x3ddb65['isBlock'](_0x599a0d)||_0x3ddb65['isLimit'](_0x599a0d)||(_0x226eca[_0x5624ae]['isAdded']&&delete _0x226eca[_0x5624ae]['isAdded'],_0x226eca[_0x5624ae]['isAddSuggestion']&&delete _0x226eca[_0x5624ae]['isAddSuggestion'],_0x226eca[_0x5624ae]['isRemoveSuggestion']&&delete _0x226eca[_0x5624ae]['isRemoveSuggestion'],_0x226eca[_0x5624ae]['isRemoved']&&(_0x226eca[_0x5624ae]['isIncorrect']=!0x0));}return _0x226eca['filter'](_0x1a4515=>!_0x1a4515['isIncorrect']);}['_makeModelFromTape'](_0x55fa37,_0x538760,_0xf4985e,_0x2629ea){const _0x2cff7f=new _0x35dd54(),_0x27c6a4=[],_0x138591=new Map(),_0x148be3=this['editor']['model'],_0xa824ca=_0x148be3['schema'],_0x3a7135=[_0x2cff7f],_0x564c4c={},_0x3ec527={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x2cff7f['name']=_0x2629ea;let _0x60488e=null;const _0x1c4ac6=[0x0];for(let _0x2f38c3=0x0;_0x2f38c3<_0x55fa37['length'];_0x2f38c3++)if('elementStart'===_0x55fa37[_0x2f38c3]['type']){_0x55fa37[_0x2f38c3]['previousPosition']=_0x148be3['createPositionFromPath'](_0x2cff7f,_0x1c4ac6);const _0x144d2a=new _0x168c99(_0x55fa37[_0x2f38c3]['item']['name'],_0x55fa37[_0x2f38c3]['item']['getAttributes']());_0x3a7135[0x0]['_appendChild'](_0x144d2a),_0x1c4ac6['push'](0x0),_0x3a7135['unshift'](_0x144d2a),_0x55fa37[_0x2f38c3]['nextPosition']=_0x148be3['createPositionFromPath'](_0x2cff7f,_0x1c4ac6);}else'elementEnd'===_0x55fa37[_0x2f38c3]['type']?(_0x3a7135['shift'](),_0x55fa37[_0x2f38c3]['previousPosition']=_0x148be3['createPositionFromPath'](_0x2cff7f,_0x1c4ac6),_0x1c4ac6['pop'](),_0x1c4ac6[_0x1c4ac6['length']-0x1]++,_0x55fa37[_0x2f38c3]['nextPosition']=_0x148be3['createPositionFromPath'](_0x2cff7f,_0x1c4ac6)):(_0x55fa37[_0x2f38c3]['previousPosition']=_0x148be3['createPositionFromPath'](_0x2cff7f,_0x1c4ac6),_0x60488e?_0x60488e['_data']+=_0x55fa37[_0x2f38c3]['item']['data']:_0x60488e=new _0x3d924f(_0x55fa37[_0x2f38c3]['item']['data'],_0x55fa37[_0x2f38c3]['item']['getAttributes']()),_0x55fa37[_0x2f38c3+0x1]&&'text'===_0x55fa37[_0x2f38c3+0x1]['type']&&_0x319489(_0x60488e,_0x55fa37[_0x2f38c3+0x1]['item'])||(_0x3a7135[0x0]['_appendChild'](_0x60488e),_0x60488e=null),_0x1c4ac6[_0x1c4ac6['length']-0x1]+=_0x55fa37[_0x2f38c3]['item']['offsetSize'],_0x55fa37[_0x2f38c3]['nextPosition']=_0x148be3['createPositionFromPath'](_0x2cff7f,_0x1c4ac6));for(let _0x253992=0x0;_0x253992<_0x55fa37['length'];_0x253992++){const _0x57233b=_0x55fa37[_0x253992]['previousPosition'],_0x4d03d2=_0x55fa37[_0x253992]['nextPosition'];for(const _0x36942c of _0x55fa37[_0x253992]['markersStart'])_0x138591['set'](_0x36942c,{'start':_0x57233b,'end':null});_0x594d80('isRemoveSuggestion',_0x253992,_0x57233b,_0x4d03d2),_0x594d80('isAddSuggestion',_0x253992,_0x57233b,_0x4d03d2),_0x594d80('isRemoved',_0x253992,_0x57233b,_0x4d03d2),_0x594d80('isAdded',_0x253992,_0x57233b,_0x4d03d2);for(const _0x4b8b80 of _0x55fa37[_0x253992]['markersEnd']){const _0x3567da=_0x138591['get'](_0x4b8b80);_0x3567da?_0x3567da['end']=_0x4d03d2:_0x138591['set'](_0x4b8b80,{'start':_0x4d03d2,'end':_0x4d03d2});}}for(const [_0x2b8c57,_0x52dd0d]of _0x138591){const _0x5e29a1=this['editor']['model']['createRange'](_0x52dd0d['start'],_0x52dd0d['end']);_0x2cff7f['markers']['set'](_0x2b8c57,_0x5e29a1);}return _0x27c6a4['sort']((_0x1370f0,_0x5274e4)=>{const _0x2aee2c=_0x2cff7f['markers']['get']('revision:'+_0x1370f0['id']),_0x46a00d=_0x2cff7f['markers']['get']('revision:'+_0x5274e4['id']);return _0x2aee2c['start']['isBefore'](_0x46a00d['start'])?-0x1:_0x2aee2c['start']['isAfter'](_0x46a00d['start'])?0x1:_0x2aee2c['end']['isBefore'](_0x46a00d['end'])?-0x1:_0x2aee2c['end']['isAfter'](_0x46a00d['end'])?0x1:'add'===_0x1370f0['type']?-0x1:0x1;}),{'root':_0x2cff7f,'changes':_0x27c6a4};function _0x594d80(_0x2ed9ba,_0x5251e8,_0x5b6d56,_0x4baa29){const _0x36a6f5=!!_0x55fa37[_0x5251e8][_0x2ed9ba],_0x5d2805=_0x36a6f5?_0x55fa37[_0x5251e8][_0x2ed9ba]['userId']:null,_0x192077=_0x36a6f5&&_0x55fa37[_0x5251e8][_0x2ed9ba]['aiSource']||null,_0x14b5a5=_0x5251e8===_0x55fa37['length']-0x1,_0x47e10d=_0x3ec527[_0x2ed9ba][0x0],_0x3e90b7=_0xa824ca['isObject'](_0x55fa37[_0x5251e8]['item']);!_0x564c4c[_0x2ed9ba]&&_0x36a6f5?_0x564c4c[_0x2ed9ba]={'start':_0x5b6d56,'tapeItem':_0x55fa37[_0x5251e8],'userId':_0x5d2805,'aiSource':_0x192077,'type':_0x2ed9ba}:_0x564c4c[_0x2ed9ba]&&!_0x36a6f5?(_0x564c4c[_0x2ed9ba]['end']=_0x5b6d56,_0x5beb7c(_0x564c4c[_0x2ed9ba]),_0x564c4c[_0x2ed9ba]=null):_0x564c4c[_0x2ed9ba]&&_0x36a6f5&&(_0x564c4c[_0x2ed9ba]['userId']!==_0x5d2805||_0x564c4c[_0x2ed9ba]['aiSource']!==_0x192077)&&(_0x564c4c[_0x2ed9ba]['end']=_0x5b6d56,_0x47e10d&&_0x47e10d['userId']===_0x564c4c[_0x2ed9ba]['userId']?_0x47e10d['change']['aiSource']=_0x47e10d['change']['aiSource']||_0x564c4c[_0x2ed9ba]['aiSource']:_0x5beb7c(_0x564c4c[_0x2ed9ba]),_0x564c4c[_0x2ed9ba]={'start':_0x5b6d56,'tapeItem':_0x55fa37[_0x5251e8],'userId':_0x5d2805,'aiSource':_0x192077,'type':_0x2ed9ba}),_0x564c4c[_0x2ed9ba]&&_0x3e90b7&&('elementStart'!==_0x55fa37[_0x5251e8]['type']||_0x47e10d&&_0x47e10d['userId']===_0x5d2805||_0x3ec527[_0x2ed9ba]['unshift']({'userId':_0x5d2805,'object':_0x55fa37[_0x5251e8]['item'],'change':_0x564c4c[_0x2ed9ba]}),'elementEnd'===_0x55fa37[_0x5251e8]['type']&&_0x47e10d&&_0x47e10d['object']===_0x55fa37[_0x5251e8]['item']&&(_0x3ec527[_0x2ed9ba]['shift'](),_0x564c4c[_0x2ed9ba]=_0x47e10d['change'])),_0x564c4c[_0x2ed9ba]&&_0x14b5a5&&(_0x564c4c[_0x2ed9ba]['end']=_0x4baa29,_0x5beb7c(_0x564c4c[_0x2ed9ba]),_0x564c4c[_0x2ed9ba]=null);}function _0x5beb7c({start:_0x278ce4,end:_0x2a888c,tapeItem:_0x4856f8,userId:_0x51c98a,aiSource:_0x2bdfe0,type:_0xd8057c}){const _0x2a62c3=_0x4856f8['item'],_0x46f5a4=_0x148be3['schema']['isBlock'](_0x2a62c3)&&!_0x148be3['schema']['isLimit'](_0x2a62c3),_0x11b961=_0x278ce4['nodeAfter']==_0x2a888c['parent']&&_0x2a888c['isAtStart'];if(_0x46f5a4&&_0x11b961)return;const _0x1b0b9b=_0x148be3['createRange'](_0x278ce4,_0x2a888c),_0x5d5f5e=_0x538760['get'](_0x51c98a),_0x28fdda=new Tt({'author':_0x5d5f5e,'type':'isAdded'==_0xd8057c||'isAddSuggestion'==_0xd8057c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0xd8057c||'isRemoveSuggestion'==_0xd8057c,'aiSource':_0x2bdfe0||null},'createdAt':new Date(),'rootName':_0xf4985e});_0x27c6a4['push'](_0x28fdda),_0x2cff7f['markers']['set']('revision:'+_0x28fdda['id'],_0x1b0b9b);}function _0x319489(_0x38f0a9,_0x333255){const _0x310cbc=_0x38f0a9['getAttributes'](),_0x3d5bd5=_0x333255['getAttributes']();for(const _0x36f007 of _0x310cbc){if(_0x36f007[0x1]!==_0x333255['getAttribute'](_0x36f007[0x0]))return!0x1;_0x3d5bd5['next']();}return _0x3d5bd5['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x40e166=>{const _0x2959ea=_0x40e166['markerName']['split'](':')[0x1],_0x5d947b=this['_getChangeFromId'](_0x2959ea);if(!_0x5d947b)return null;const _0x1f3607='add'==_0x5d947b['type']?'insertion':'deletion',_0x338d24=['ck-suggestion-marker','ck-suggestion-marker-'+_0x1f3607];return _0x5d947b['data']['isSuggestion']&&_0x338d24['push']('ck-suggestion-marker-'+_0x1f3607+'-new'),this['activeChange']==_0x5d947b&&_0x338d24['push']('ck-suggestion-marker--active'),{'classes':_0x338d24,'attributes':{'data-change-id':_0x2959ea}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x17de33=>{_0x17de33['on']('element:pre',(_0x2c58c4,_0x5b9049,_0xf3a118)=>{const _0x367bd3=_0x5b9049['viewItem']['getChild'](0x0);if(!_0x367bd3||!_0x367bd3['is']('element','code'))return;if(!_0xf3a118['consumable']['consume'](_0x367bd3,{'attributes':['vid_start','vid_end']}))return;const _0x3048ea=_0x5b9049['modelRange']['start']['nodeAfter'];_0xf3a118['writer']['setAttribute']('vid_start',_0x367bd3['getAttribute']('vid_start'),_0x3048ea),_0xf3a118['writer']['setAttribute']('vid_end',_0x367bd3['getAttribute']('vid_end'),_0x3048ea);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x5d80db=>{_0x5d80db['on']('element',(_0x46a732,_0x489796,_0x202c90)=>{if(!_0x202c90['consumable']['consume'](_0x489796['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x489796['modelRange']['isCollapsed'])return;const _0x4e85f9=_0x489796['modelRange']['start']['nodeAfter'];_0x4e85f9['hasAttribute']('vid_start')||_0x4e85f9['hasAttribute']('vid')||(_0x202c90['writer']['setAttribute']('vid_start',_0x489796['viewItem']['getAttribute']('vid_start'),_0x4e85f9),_0x202c90['writer']['setAttribute']('vid_end',_0x489796['viewItem']['getAttribute']('vid_end'),_0x4e85f9));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2113a9=>_0x2113a9['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x847180,[,_0x3cdb9c])=>{['vid_start','vid_end','vid']['includes'](_0x3cdb9c)&&(_0x847180['return']=!0x0,_0x847180['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x30b397=>{_0x30b397['on']('attribute:vid',(_0x11a9ad,_0x11b4eb,_0x28af7b)=>{if('\x20'!=_0x11b4eb['item']['data']||_0x11b4eb['item']['parent']['maxOffset']>0x1)return;if(!_0x28af7b['consumable']['consume'](_0x11b4eb['item'],_0x11a9ad['name']))return;const _0x44de20=_0x28af7b['writer'],_0x3f9410=_0x28af7b['mapper']['toViewRange'](_0x11b4eb['range']);_0x44de20['wrap'](_0x3f9410,_0x44de20['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x424a6b){const _0x3baa25=_0x424a6b['plugins']['get']('RevisionViewer');return(_0x577f6e,_0x2a22b7,_0x2ee6e0)=>{const _0x5eb573=_0x2a22b7['markerName']['split'](':')[0x1],_0x3d9958=_0x3baa25['_getChangeFromId'](_0x5eb573);if(!_0x3d9958)return null;const _0x5bcaac='add'==_0x3d9958['type']?'split':'merge';if(!_0x2ee6e0['consumable']['test'](_0x2a22b7['markerRange'],_0x577f6e['name']))return;const _0x1dcd99=_0x2a22b7['markerRange']['getWalker'](),_0x50deeb=_0x2a22b7['markerRange']['start'],_0x356b19=_0x424a6b['model']['schema'];let _0x3fadc2=null,_0x2d6bf9=null,_0x3f61b3=!0x1,_0x1f7ecc=!0x1;for(const _0x26cf99 of _0x1dcd99){const _0x3a42b1=_0x26cf99['item'];_0x3f61b3=_0x3f61b3||_0x356b19['isContent'](_0x3a42b1);const _0x1abcb3=_0x2ee6e0['mapper']['toViewElement'](_0x3a42b1);if(_0x1abcb3&&_0x1abcb3['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x26cf99['type']&&(_0x356b19['isBlock'](_0x3a42b1)&&!_0x356b19['isLimit'](_0x3a42b1)&&(_0x3a42b1['nextSibling']||_0x50deeb['isAtEnd']?_0x3fadc2&&_0x3fadc2['parent']==_0x3a42b1||(_0x3fadc2=_0x3a42b1,_0x4b2ca3(_0x26cf99['previousPosition']),_0x1f7ecc=!0x0):_0x2d6bf9=_0x2d6bf9||_0x26cf99['previousPosition']));}function _0x4b2ca3(_0x3edca8){const _0x495cee=_0x2ee6e0['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5bcaac}),_0x26f127=_0x2ee6e0['mapper']['toViewPosition'](_0x3edca8);_0x3d9958['data']['isSuggestion']&&_0x2ee6e0['writer']['addClass']('ck-suggestion-marker-'+_0x5bcaac+'-new',_0x495cee),_0x3baa25['activeChange']==_0x3d9958&&_0x2ee6e0['writer']['addClass']('ck-suggestion-marker--active',_0x495cee),_0x2ee6e0['writer']['insert'](_0x26f127,_0x495cee),_0x2ee6e0['mapper']['bindElementToMarker'](_0x495cee,_0x2a22b7['markerName']);}_0x3f61b3||_0x1f7ecc||!_0x2d6bf9||_0x4b2ca3(_0x2d6bf9);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1bb25b,_0x375ac9,_0x1e99a6)=>{const _0x2ec728=_0x1e99a6['mapper']['markerNameToElements'](_0x375ac9['markerName']);if(_0x2ec728){for(const _0x462660 of _0x2ec728)(_0x462660['hasClass']('ck-suggestion-marker-split')||_0x462660['hasClass']('ck-suggestion-marker-merge'))&&(_0x1e99a6['mapper']['unbindElementFromMarkerName'](_0x462660,_0x375ac9['markerName']),_0x1e99a6['writer']['remove'](_0x462660));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x546383,_0x359b52,_0x3e26ac)=>{const _0x2488e5=_0x359b52['markerName']['split'](':')[0x1],_0x2fac=this['_getChangeFromId'](_0x2488e5);if(!_0x2fac)return null;const _0x55cf4d='add'==_0x2fac['type']?'split':'merge';if(_0x3e26ac['consumable']['test'](_0x359b52['markerRange'],_0x546383['name']))for(const _0x1f021c of _0x359b52['markerRange']['getItems']()){if(!_0x1f021c['is']('element','softBreak'))continue;const _0x3de46a=_0x3e26ac['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x55cf4d}),_0x1c6f22=_0x3e26ac['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1f021c));_0x2fac['data']['isSuggestion']&&_0x3e26ac['writer']['addClass']('ck-suggestion-marker-'+_0x55cf4d+'-new',_0x3de46a),this['activeChange']==_0x2fac&&_0x3e26ac['writer']['addClass']('ck-suggestion-marker--active',_0x3de46a),_0x3e26ac['writer']['insert'](_0x1c6f22,_0x3de46a),_0x3e26ac['mapper']['bindElementToMarker'](_0x3de46a,_0x359b52['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3c13a2=>{for(const _0x417ca7 of this['editor']['model']['document']['getRootNames']()){const _0x406ae6=this['editor']['model']['document']['getRoot'](_0x417ca7),_0x5f05d6=this['editor']['editing']['view']['document']['getRoot'](_0x417ca7);if(_0x5f05d6){const _0x4579d1=_0x406ae6['getAttribute']('revisionHistoryAttachChange');if(_0x3c13a2['removeAttribute']('data-change-id',_0x5f05d6),_0x3c13a2['removeClass']('ck-revision-history-root-add',_0x5f05d6),_0x3c13a2['removeClass']('ck-revision-history-root-remove',_0x5f05d6),_0x3c13a2['removeClass']('ck-revision-history-root--active',_0x5f05d6),_0x4579d1){const _0x1ff814=this['_getChangeFromId'](_0x4579d1);if(!_0x1ff814)return null;_0x3c13a2['setAttribute']('data-change-id',_0x4579d1,_0x5f05d6),_0x3c13a2['addClass']('ck-revision-history-root-'+_0x1ff814['type'],_0x5f05d6),this['activeChange']==_0x1ff814&&_0x3c13a2['addClass']('ck-revision-history-root--active',_0x5f05d6);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x112eed=>'revision-comment:'+_0x112eed,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x4e41ba=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Pt(_0x4e41ba['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0xd959e2=>'revision-suggestion:'+_0xd959e2,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x48eaf9=>({'name':'suggestion:'+_0x48eaf9,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0xa9fc64=>{const _0x5249f6=_0xa9fc64['markerName']['split'](':')[0x1];return'insertion'!=_0x5249f6&&'deletion'!=_0x5249f6?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5249f6]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ut(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ut(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0xef8c64,_0x40b6dd,_0x15de5c)=>{const _0x29eae2=_0x15de5c['mapper']['markerNameToElements'](_0x40b6dd['markerName']);if(_0x29eae2){for(const _0x592fbf of _0x29eae2)_0x592fbf['is']('uiElement')&&(_0x15de5c['mapper']['unbindElementFromMarkerName'](_0x592fbf,_0x40b6dd['markerName']),_0x15de5c['writer']['remove'](_0x592fbf));}},{'priority':'high'});}_getChangeFromId(_0x378018){return this['_changeIdToChange']['get'](_0x378018);}_getViewForChange(_0x4774c6){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Dt(this['editor']['locale'],_0x4774c6,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xb0117c,_0x44dac3,_0x68f2c3,_0xdc6bfe)=>{_0xdc6bfe&&this['_balloon']['remove'](_0xdc6bfe),_0x68f2c3&&(this['_balloon']['add']({'view':_0x68f2c3,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x957586=this['editor']['editing'],_0x198516=this['_getChangeFromId'](_0x68f2c3['changeId']);let _0x18dbe9;if(_0x198516['data']['isOnRoot']){const _0x14c633=_0x957586['view']['getDomRoot'](_0x198516['rootName']);_0x18dbe9=Array['from'](_0x14c633['getClientRects']());}else{const _0x588988=this['editor']['model']['markers']['get']('revision:'+_0x68f2c3['changeId']);_0x18dbe9=Array['from'](_0x957586['mapper']['markerNameToElements'](_0x588988['name']))['map'](_0x27d21f=>_0x957586['view']['domConverter']['mapViewToDom'](_0x27d21f))['map'](_0x350056=>Array['from'](_0x350056['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x18dbe9['find'](_0xdf96cf=>_0xdf96cf['top']-0x3<=this['_activeViewTarget']['y']&&_0xdf96cf['bottom']+0x3>=this['_activeViewTarget']['y']&&_0xdf96cf['left']-0x3<=this['_activeViewTarget']['x']&&_0xdf96cf['right']+0x3>=this['_activeViewTarget']['x'])||_0x18dbe9[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x126889,_0x2e628a,_0x5ec8e3,_0x191ae2)=>{this['activeView']=_0x5ec8e3?this['_getViewForChange'](_0x5ec8e3):null,this['editor']['model']['change'](()=>{const _0x419aef=this['editor']['editing'];_0x191ae2&&(_0x191ae2['data']['isOnRoot']?_0x419aef['view']['change'](_0x39514c=>{_0x39514c['removeClass']('ck-revision-history-root--active',_0x419aef['view']['document']['getRoot'](_0x191ae2['rootName']));}):_0x419aef['reconvertMarker']('revision:'+_0x191ae2['id'])),_0x5ec8e3&&(_0x5ec8e3['data']['isOnRoot']?_0x419aef['view']['change'](_0x2bbf92=>{_0x2bbf92['addClass']('ck-revision-history-root--active',_0x419aef['view']['document']['getRoot'](_0x5ec8e3['rootName']));}):_0x419aef['reconvertMarker']('revision:'+_0x5ec8e3['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3864b9,_0x415a58)=>{if(this['activeChange'])return;const _0x49b70e=this['_findChangeIdFromDomTarget'](_0x415a58['target']),_0x2bb579=this['_changeIdToChange']['get'](_0x49b70e);_0x2bb579?(this['_activeViewTarget']={'x':_0x415a58['domEvent']['x'],'y':_0x415a58['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x2bb579)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x57ed62,_0xabdc8b)=>{const _0x16ab42=this['_findChangeIdFromDomTarget'](_0xabdc8b['target']),_0x7c825a=this['_changeIdToChange']['get'](_0x16ab42);_0x7c825a?(this['_activeViewTarget']={'x':_0xabdc8b['domEvent']['x'],'y':_0xabdc8b['domEvent']['y']},_0x7c825a===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x7c825a):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x281c3e){do{const _0x47b45f=_0x281c3e['getAttribute']('data-change-id');if(_0x47b45f)return _0x47b45f;_0x281c3e=_0x281c3e['parent'];}while(_0x281c3e);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x43bf86=>{for(const _0x25554e of this['editor']['model']['markers'])_0x43bf86['removeMarker'](_0x25554e);});}};function Pt(_0x20e731){return _0x20e731['split'](':')[0x1];}function Ut(_0x578351,_0xa6425b){return(_0x41a0ff,_0x22ecf8,_0x45c68c)=>{if(!_0x45c68c['consumable']['test'](_0x22ecf8['markerRange'],_0x41a0ff['name']))return;const _0x482436=_0x22ecf8['markerRange']['getWalker'](),_0x40e804=_0x22ecf8['markerRange']['start'],_0x1dfeed=_0x578351['model']['schema'];let _0x495430=null,_0x1cbd81=null,_0x45697c=!0x1,_0x539bea=!0x1;for(const _0xbda9cb of _0x482436){const _0x5e5aaa=_0xbda9cb['item'];_0x45697c=_0x45697c||_0x1dfeed['isContent'](_0x5e5aaa);const _0x153b25=_0x45c68c['mapper']['toViewElement'](_0x5e5aaa);if(_0x153b25&&_0x153b25['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xbda9cb['type']&&(_0x1dfeed['isBlock'](_0x5e5aaa)&&!_0x1dfeed['isLimit'](_0x5e5aaa)&&(_0x5e5aaa['nextSibling']||_0x40e804['isAtEnd']?_0x495430&&_0x495430['parent']==_0x5e5aaa||(_0x495430=_0x5e5aaa,_0x51ea0f(_0xbda9cb['previousPosition']),_0x539bea=!0x0):_0x1cbd81=_0x1cbd81||_0xbda9cb['previousPosition']));}function _0x51ea0f(_0x3446c1){const _0xf54645=_0x45c68c['mapper']['toViewPosition'](_0x3446c1),_0x74483d=_0x45c68c['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xa6425b});_0x45c68c['writer']['insert'](_0xf54645,_0x74483d),_0x45c68c['mapper']['bindElementToMarker'](_0x74483d,_0x22ecf8['markerName']);}_0x45697c||_0x539bea||!_0x1cbd81||_0x51ea0f(_0x1cbd81);};}var Lt=class extends _0x14c733{constructor(_0x17bcd2){super(_0x17bcd2);const _0x1213de=_0x17bcd2['plugins']['get'](Ht);this['affectsData']=!0x1,this['listenTo'](_0x1213de,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1213de,'change:isEnabled',()=>this['refresh']());}execute(){const _0x943808=this['editor'],_0x4f7ad4=_0x943808['plugins']['get'](Ht),_0x588380=_0x4f7ad4['isReady']?_0x4f7ad4['diff']['newRevisionId']:null;_0x943808['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x588380);}['refresh'](){const {isReady:_0x614490,isEnabled:_0x5ac612,repository:_0x3b4088,diff:_0x1e5584}=this['editor']['plugins']['get'](Ht),_0x68f293=_0x1e5584&&_0x3b4088['getLaterVisibleRevision'](_0x1e5584['newRevisionId']);this['isEnabled']=_0x614490&&_0x5ac612&&Boolean(_0x68f293);}},Ft=class extends _0x14c733{_step;constructor(_0x22b279,{direction:_0x408484}){super(_0x22b279);const _0x168504=_0x22b279['plugins']['get'](Ht);this['affectsData']=!0x1,this['_step']='forward'===_0x408484?0x1:-0x1,this['listenTo'](_0x168504,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x168504,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x168504,'change:activeChange',()=>this['refresh']());}execute(){const _0x4da485=this['editor'],_0x59a59b=_0x4da485['plugins']['get'](Ht),{isNavigationMode:_0x1c418e,currentChangeNumber:_0x26b4bc}=_0x59a59b;let _0x4e2dc3;if(_0x59a59b['activeChange']=_0x1c418e?_0x59a59b['diff']['changes']['get'](_0x26b4bc+this['_step']):_0x59a59b['diff']['changes']['first'],_0x59a59b['activeChange']['data']['isOnRoot'])_0x4e2dc3=_0x4da485['editing']['view']['getDomRoot'](_0x59a59b['activeChange']['rootName']);else{const _0x2adcc9=_0x4da485['model']['markers']['get']('revision:'+_0x59a59b['activeChange']['id']);_0x4e2dc3=_0x5a44ba(_0x4da485['editing'],_0x2adcc9);}_0x352c8b({'target':_0x4e2dc3,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x152e7c,currentChangeNumber:_0x147da5,numberOfChanges:_0x19fb97,isReady:_0x4dd541,isEnabled:_0x5a5137}=this['editor']['plugins']['get'](Ht);this['isEnabled']=!!(_0x5a5137&&_0x4dd541&&_0x19fb97)&&(!_0x152e7c||(0x1===this['_step']?_0x147da5<_0x19fb97-0x1:_0x147da5>0x0));}},$t=class extends ut{constructor(_0x50add8){super(_0x50add8);const _0x2503c7=this['bindTemplate'],_0x4de54e=new _0x5b10b4(_0x50add8),_0x1a1b8d=new _0x5b10b4(_0x50add8);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',(_0x361324,_0x51ddb1)=>_0x361324&&_0x51ddb1>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x528336,_0x3108ba,_0x4d091e,_0x111b04)=>{if(!_0x528336)return Rt(_0x50add8,'Loading...');if(!_0x4d091e)return Rt(_0x50add8,'No\x20changes');const _0x102fbe=Rt(_0x50add8,'NUMBER_OF_CHANGES',_0x4d091e);return _0x111b04?Rt(_0x50add8,'X_OF_Y_CHANGES',[_0x3108ba+0x1,_0x4d091e]):_0x102fbe;}),_0x4de54e['set']({'label':Rt(_0x50add8,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0xd22897}),_0x1a1b8d['set']({'label':Rt(_0x50add8,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4e0a61}),_0x4de54e['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1a1b8d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x4de54e['on']('execute',()=>this['fire']('execute','backward')),_0x1a1b8d['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',_0x2503c7['if']('_isStatusLabelVisible','ck-hidden',_0x325e73=>!_0x325e73)]},'children':[{'text':_0x2503c7['to']('isNavigationMode',_0x36b740=>_0x36b740?Rt(_0x50add8,'EDIT_X_OF_Y_REVISIONS')+':\x20':Rt(_0x50add8,'Total')+':\x20')}]},{'text':_0x2503c7['to']('_statusText')}]},new ht(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x4de54e,_0x1a1b8d]}]});}};const Bt='ck-editor__editable__loading-overlay';var jt=class extends _0x4ba944{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2a440f=this['editor']['editing']['view'];_0x2a440f['change'](_0x44b7eb=>{for(const _0x34c55a of _0x2a440f['document']['roots'])_0x44b7eb['addClass'](Bt,_0x34c55a);});}['hide'](){const _0x2fbd6d=this['editor']['editing']['view'];_0x2fbd6d['change'](_0x141293=>{for(const _0x244bae of _0x2fbd6d['document']['roots'])_0x141293['removeClass'](Bt,_0x244bae);});}},Gt=class extends _0x4ba944{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht,jt];}init(){const _0x4aa46c=this['editor'],_0x282de6=_0x4aa46c['plugins']['get'](Ht),_0x1578f5=_0x4aa46c['plugins']['get'](jt);_0x4aa46c['ui']['componentFactory']['add']('exitToEditing',_0x360208=>{const _0x1ccf18=new _0x5b10b4(_0x360208);return _0x1ccf18['set']({'label':Rt(_0x360208,'Back\x20to\x20editing'),'icon':_0xf30d16,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1ccf18,'execute',()=>{_0x4aa46c['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1ccf18;}),_0x4aa46c['ui']['componentFactory']['add']('restoreRevision',_0x968ad9=>{const _0x71335b=new _0x5b10b4(_0x968ad9);return _0x71335b['set']({'label':Rt(_0x968ad9,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x71335b['bind']('isEnabled')['to'](_0x4aa46c['commands']['get']('restoreRevision')),this['listenTo'](_0x71335b,'execute',()=>_0x4aa46c['execute']('restoreRevision')),_0x71335b;}),_0x4aa46c['ui']['componentFactory']['add']('changesNavigation',_0x3dcd11=>{const _0x119f07=new $t(_0x3dcd11),_0x2303a5=_0x4aa46c['commands']['get']('showPreviousChange'),_0x8b1a3e=_0x4aa46c['commands']['get']('showNextChange');return _0x119f07['bind']('isBackwardNavigationEnabled')['to'](_0x2303a5,'isEnabled'),_0x119f07['bind']('isForwardNavigationEnabled')['to'](_0x8b1a3e,'isEnabled'),_0x119f07['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x282de6),this['listenTo'](_0x119f07,'execute',(_0x2e5f9c,_0x5abbcf)=>{_0x4aa46c['execute']('forward'===_0x5abbcf?'showNextChange':'showPreviousChange');}),_0x119f07;}),_0x1578f5['show'](),_0x282de6['on']('change:isReady',(_0x5c4ffa,_0x47faff,_0x34ee95)=>{_0x34ee95?_0x1578f5['hide']():_0x1578f5['show']();});}},Kt=class extends tt{['_resizeObserver']=null;constructor(_0x22a86f,_0x46ea8c){super(_0x22a86f,_0x46ea8c);const _0x5810c2=this['bindTemplate'];this['set']({'label':Rt(_0x22a86f,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=Rt(_0x22a86f,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5810c2['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x2516fe(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x40935b=this['fieldView']['element'];this['_tooltipString']=_0x40935b['scrollWidth']>_0x40935b['clientWidth']&&_0x40935b['value']||'';}},qt=class extends ut{constructor(_0x2ffd78,_0x5add55,_0x34df89){super(_0x2ffd78);const _0x81429d=new _0x4ca474();_0x81429d['set']({'content':_0x547ceb,'viewBox':'0\x200\x2011\x2010'});const _0x22210e=['ck','ck-revision-history-sidebar__revision-author'];_0x34df89&&_0x22210e['push']('ck-revision-history-sidebar__revision-author_creator');const _0x417375=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':Rt(_0x2ffd78,_0x34df89?'Revision\x20creator':'Revision\x20author')},'children':[_0x81429d,_0x5add55['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x22210e},'children':_0x417375});}};function Yt(_0x258ea9,_0x3e9c00){const _0xa53583=_0x258ea9['bindTemplate'],_0x3d49ac=_0x258ea9['locale'],_0x381e54=ft(_0x3d49ac);_0x381e54['panelPosition']='sw';const _0x436ba2=function(_0x5afbf7,_0x402b1d){const _0x83d197=function(_0x1c4e87,_0x2fed0d){const _0x4c7844=_0x1c4e87['locale'],_0x2ad403={'Compare\x20against\x20selected':Rt(_0x4c7844,'Compare\x20against\x20selected'),'Name\x20this\x20revision':Rt(_0x4c7844,'Name\x20this\x20revision'),'Restore\x20this\x20revision':Rt(_0x4c7844,'Restore\x20this\x20revision')};return _0x2fed0d['map'](_0x57ec1d=>{const _0x4b785c=_0x2ad403[_0x57ec1d['name']];return _0x4b785c&&_0x4b785c!==_0x57ec1d['name']&&(_0x57ec1d['name']=_0x4b785c),_0x57ec1d;});}(_0x5afbf7,_0x402b1d),_0x2a22ff=new _0x26b52d();for(const _0x1d87fd of _0x83d197){const _0x13de02={'type':'button','model':new lt({'label':_0x1d87fd['name'],'class':_0x1d87fd['class'],'withText':!0x0,'role':'menuitem','_action':_0x1d87fd['action']})};_0x13de02['model']['bind']('isEnabled')['to'](_0x5afbf7,'isActionsDropdownOpen',_0xc98071=>'function'!=typeof _0x1d87fd['isEnabled']||(!_0xc98071||_0x1d87fd['isEnabled'](_0x5afbf7))),_0x2a22ff['add'](_0x13de02);}return _0x2a22ff;}(_0x258ea9,_0x3e9c00);return _0x258ea9['bind']('isActionsDropdownOpen')['to'](_0x381e54,'isOpen'),_0x381e54['buttonView']['set']({'label':Rt(_0x3d49ac,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x53a78f}),_0x381e54['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0xa53583['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0xa53583['to'](_0x360e0d=>_0x360e0d['stopPropagation']())}}),_0x381e54['on']('execute',_0x426ac8=>{_0x258ea9['isReady']&&'function'==typeof _0x426ac8['source']['_action']&&_0x426ac8['source']['_action'](_0x258ea9);}),dt(_0x381e54,_0x436ba2,{'role':'menu'}),_0x381e54['listenTo'](_0x258ea9,'change:isActionsDropdownOpen',(_0x2f83e4,_0x191a15,_0x505021)=>{if(_0x505021)for(const _0x27f73f of _0x381e54['listView']['items']){const _0x5671fa=_0x27f73f['children']['first'],_0x4c8ac6=_0x3e9c00['find'](_0x3f4aee=>_0x3f4aee['action']===_0x5671fa['_action'])['isVisible'];_0x27f73f['isVisible']=void 0x0===_0x4c8ac6||_0x4c8ac6(_0x258ea9);}}),_0x381e54;}const Jt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x5376ae,Collection as _0x5e89be,ElementReplacer as _0x38cce9,FocusTracker as _0x524cc0,KeystrokeHandler as _0x4f917e,ObservableMixin as _0x58501c,ResizeObserver as _0x380566,logWarning as _0x3d1855,scrollViewportToShowTarget as _0x54785f,uid as _0x1d22d5}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x52afba,isEqual as _0x5810df,set as _0x390b4c,unset as _0xbf5200}from'es-toolkit/compat';import{Command as _0x56bd1,Editor as _0x3979cf,ElementApiMixin as _0x3639fa,PendingActions as _0x307eb3,Plugin as _0x2b01bc}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x3bd8f6,PillView as _0x4299c8,Users as _0x2b2252,getMarkerDomElement as _0x2311ec,reRootOperation as _0x364fee,reRootPosition as _0x397ec2,reRootRange as _0x3044f8,sanitizeEditorConfig as _0xd04d27}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x5682a2,ModelElement as _0x58f701,ModelRange as _0x3cdc02,ModelText as _0x30c48f,ViewAttributeElement as _0x14f963,ViewContainerElement as _0x3ef621,ViewDocumentFragment as _0xe239fe,ViewElement as _0x94fe7e,ViewEmptyElement as _0xc4522d,ViewRawElement as _0x26c838,ViewText as _0x388114,ViewUIElement as _0x364ef1}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x545ec0,IconChevronUp as _0x13c841,IconHistory as _0x3d4a33,IconSparkle as _0x531a4d,IconThreeVerticalDots as _0x2d0e5e,IconUndo as _0x33992e,IconUser as _0x177130}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x29e1db,ButtonView as _0x1833f8,ContextualBalloon as _0xd74cb3,CssTransitionDisablerMixin as _0x222e61,EditorUI as _0x2e4042,IconView as _0x4c7cd9,InlineEditableUIView as _0x396601,LabeledFieldView as tt,ListItemView as it,ListView as et,MenuBarMenuListItemButtonView as st,MenuBarMenuListItemView as nt,MenuBarMenuListView as ot,MenuBarMenuView as rt,StickyPanelView as at,ToolbarSeparatorView as ht,ToolbarView as ct,UIModel as lt,View as ut,addListToDropdown as dt,createDropdown as ft,createLabeledInputText as vt,normalizeToolbarConfig as gt,submitHandler as mt}from'@ckeditor/ckeditor5-ui';import{DateTime as _t}from'luxon';const wt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x58501c();var pt=class extends wt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0xb58419){super(),this['id']=_0xb58419['id']||_0x1d22d5(),this['creator']=_0xb58419['creator']||null,this['authors']=_0xb58419['authors']||[],this['diffData']=_0xb58419['diffData']||null,this['toVersion']=_0xb58419['toVersion']||0x0,this['fromVersion']=_0xb58419['fromVersion']||0x0,this['set']('name',_0xb58419['name']||''),this['set']('createdAt',_0xb58419['createdAt']||new Date()),this['set']('attributes',_0xb58419['attributes']||{});}setName(_0x59ff9c){this['_update']({'name':_0x59ff9c});}setAttribute(_0x1bf71a,_0x506da4){const _0x4425d5=_0x52afba(this['attributes']);_0x390b4c(_0x4425d5,_0x1bf71a,_0x506da4),this['_update']({'attributes':_0x4425d5});}removeAttribute(_0x51639f){const _0x4b7d1f=_0x52afba(this['attributes']);_0xbf5200(_0x4b7d1f,_0x51639f),this['_update']({'attributes':_0x4b7d1f});}_update(_0x534c69,_0x359aa9=!0x1){let _0x360586=!0x1;const _0x248d48={'id':this['id']};for(const _0x20c1ae of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x27544a=_0x534c69[_0x20c1ae];void 0x0!==_0x27544a&&_0x27544a!==this[_0x20c1ae]&&(this[_0x20c1ae]=_0x27544a,_0x248d48[_0x20c1ae]=_0x27544a,_0x360586=!0x0);}_0x360586&&(_0x248d48['authors']&&(_0x248d48['authorsIds']=_0x248d48['authors']['map'](_0x206014=>_0x206014['id']),delete _0x248d48['authors']),this['fire']('_update',_0x248d48,_0x359aa9));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x43c8d6=>_0x43c8d6['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},yt=class extends _0x2b01bc{['_revisions'];static get requires(){return[_0x2b2252];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x4551fd){super(_0x4551fd),this['_revisions']=new _0x5e89be();}afterInit(){!async function(_0x112c3c){const _0x44e687='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x5a53ce=0xeb829,_0x14fd9f=0x79470,_0x597dce={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x13251d(_0x5309ff){const _0x50c402=new window['Promise'](_0x4a0aff=>{_0x5309ff['once']('ready',_0x4a0aff);}),_0x46aeb5=window['Date']['now'](),_0x197e62=_0x5309ff['config']['get']('licenseKey');async function _0x593907(){let _0x2133b8,_0x37ef70=null,_0x5f4c27=null;try{return'GPL'==_0x197e62?'NotAllowed':(_0x2133b8=_0x29a5cd(),_0x2133b8?(_0x2133b8['usageEndpoint']&&(_0x5f4c27=_0x2ce52b(_0x2133b8['usageEndpoint'],_0x2133b8['jti'])),await _0x17e456()?_0x8aaa62()?_0x25d27f()?'Expired':_0x22757b()?('evaluation'==_0x2133b8['licenseType']&&(_0x37ef70=_0x404d1c('EvaluationLimit')),await _0x6e2d47()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x25d27f(){const _0x385a05=['evaluation','trial']['includes'](_0x2133b8['licenseType'])?_0x46aeb5/0x3e8:0xe10*_0x14fd9f;return _0x2133b8['exp']<_0x385a05;}function _0x8aaa62(){const _0x951e29=_0x2133b8['features'];if(!_0x951e29)return!0x1;if(_0x951e29['includes']('*'))return!0x0;if(_0x951e29['includes']('RH'))return!0x0;if(_0x951e29['includes']('RRH')){if(_0x537229())return!0x0;if(_0x42a2ee()||_0x553840())return!0x0;}return!0x1;}function _0x22757b(){const _0x435de=_0x2133b8['licensedHosts'];if(!_0x435de||0x0==_0x435de['length'])return!0x0;const {hostname:_0x37babc}=new URL(window['location']['href']);if(_0x435de['includes'](_0x37babc))return!0x0;const _0x14d027=_0x37babc['split']('.');return _0x435de['filter'](_0x53c7c8=>_0x53c7c8['includes']('*'))['map'](_0x1f5fa9=>_0x1f5fa9['split']('.'))['filter'](_0x4cda70=>_0x4cda70['length']<=_0x14d027['length'])['map'](_0x32d0bc=>Array(_0x14d027['length']-_0x32d0bc['length'])['fill']('*'===_0x32d0bc[0x0]?'*':'')['concat'](_0x32d0bc))['some'](_0x4fea8c=>_0x14d027['every']((_0x5acca8,_0x18b9f7)=>_0x4fea8c[_0x18b9f7]===_0x5acca8||'*'===_0x4fea8c[_0x18b9f7]));}function _0x6e2d47(){return _0x37ef70&&_0x5f4c27?new window['Promise']((_0x2200db,_0x11aa70)=>{_0x37ef70['then'](_0x2200db,_0x11aa70),_0x5f4c27['then'](_0x477527=>{'Valid'!=_0x477527&&_0x2200db(_0x477527);},_0x11aa70);}):_0x37ef70||_0x5f4c27||'Valid';}}function _0x2ce52b(_0x5dfa39,_0x2b9755){return new window['Promise'](_0x1c80d2=>{if(_0x461ad0())return _0x1c80d2('Valid');_0x1f9899(),_0x5309ff['decorate']('_sendUsageRequest');let _0x541012=!0x1;const _0x1a6c6f=_0x1d22d5();function _0x4f06cb(_0x43da34){return!!_0x43da34&&('object'==typeof _0x43da34||'function'==typeof _0x43da34)&&'function'==typeof _0x43da34['then']&&'function'==typeof _0x43da34['catch'];}function _0x21b400(_0x32a799){_0x3bc553(_0x32a799)['then'](_0x2bfa31=>_0x2bfa31&&'ok'==_0x2bfa31['status']?_0xc7679e(_0x12be41(_0x1a6c6f+_0x2b9755))!=_0x2bfa31['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x46c3c2=>(_0xec2df(),_0x46c3c2),()=>{const _0x4e9489=_0x985728();return null==_0x4e9489?(_0xec2df(),'Valid'):_0x46aeb5-_0x4e9489>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1c80d2)['catch'](()=>{_0x1c80d2('UsageLimit');});const _0x1af596=0x36ee80;function _0xec2df(){const _0x422fd6='llct-'+_0xc7679e(_0x12be41(_0x5dfa39)),_0x4ac7bd=_0x188793(_0xc7679e(window['Math']['ceil'](_0x46aeb5/_0x1af596)));window['localStorage']['setItem'](_0x422fd6,_0x4ac7bd);}function _0x985728(){const _0x1491c2='llct-'+_0xc7679e(_0x12be41(_0x5dfa39)),_0x195250=window['localStorage']['getItem'](_0x1491c2);return _0x195250?window['parseInt'](_0x188793(_0x195250),0x10)*_0x1af596:null;}function _0x3bc553(_0x1b7c42){return new window['Promise']((_0x4e241e,_0x5c445d)=>{_0x1b7c42['then'](_0x4e241e,_0x5c445d),window['setTimeout'](_0x5c445d,0x1d4c0);});}}_0x5309ff['on']('_sendUsageRequest',(_0x4ce772,_0x33b90b)=>{if(_0x33b90b[0x0]!=_0x5dfa39)return _0x1c80d2('UsageLimit');_0x33b90b[0x1]={..._0x33b90b[0x1],'requestId':_0x1a6c6f};},{'priority':'high'}),_0x5309ff['on']('_sendUsageRequest',_0x504ac1=>{_0x4f06cb(_0x504ac1['return'])&&(_0x541012=!0x0,_0x21b400(_0x504ac1['return']));},{'priority':'low'}),_0x50c402['then'](()=>{_0x541012||_0x1c80d2('UsageLimit');});});function _0x461ad0(){return'auto'==_0x5309ff['editing']['view']['_overlayModeHint'];}function _0x1f9899(){_0x5309ff['editing']['view']['_overlayModeHint']='auto';}}function _0x404d1c(_0x26e51b){const _0xc5570a=[new window['Promise'](_0x433457=>setTimeout(_0x433457,0x93ecc)),_0x50c402['then'](()=>new window['Promise'](_0x4409a3=>{const _0x2d2792=0x7,_0x155a7e=_0x112c3c['_revisions'];function _0x2ddf6c(){_0x155a7e['length']>=_0x2d2792&&_0x4409a3();}_0x2ddf6c(),_0x155a7e['on']('add',_0x2ddf6c);})),new window['Promise'](_0x344a5e=>{function _0x20a74b(){for(const _0x15742d in window)if(window['Number']['isNaN'](window['Number'](_0x15742d))&&window[_0x15742d]==_0x5a53ce)return _0x344a5e();'destroyed'!=_0x5309ff['state']&&window['setTimeout'](_0x20a74b,0x1388);}_0x173f51('RevisionViewer')&&_0x20a74b();})];return window['Promise']['race'](_0xc5570a)['then'](()=>_0x26e51b);}async function _0x61822b(){if(await _0x50c402,_0x173f51('RevisionViewer')){const _0x53bb8d=_0x112c3c['getRevision'](0x0),_0x4d821c=_0x112c3c['getEarlierVisibleRevision'](_0x53bb8d['id']),_0x3a6631=_0x453bc9('RevisionViewer');return await _0x3a6631['compare'](_0x53bb8d['id'],_0x4d821c?_0x4d821c['id']:null,!0x0),_0x3a6631['unbind']('isEnabled'),_0x3a6631['isEnabled']=!0x1,_0x3a6631['compare']=_0x22b6b9,void(_0x3a6631['_getDiff']=_0x22b6b9);}if(_0x173f51('RevisionTracker')){const _0xb86607=_0x453bc9('RevisionTracker');_0xb86607['unbind']('isEnabled'),_0xb86607['isEnabled']=!0x1,_0xb86607['update']=_0x22b6b9,_0xb86607['saveRevision']=_0x22b6b9;}_0x5309ff['model']['change']=_0x22b6b9,_0x5309ff['model']['enqueueChange']=_0x22b6b9,_0x5309ff['enableReadOnlyMode']('model');}function _0x537229(){return _0x173f51('WebSocketGateway')&&'connected'==_0x453bc9('WebSocketGateway')['state'];}function _0x42a2ee(){return _0x173f51('RevisionViewerIntegration');}function _0x553840(){return _0x173f51('TrackChangesDataGetter');}function _0x3cfeaa(_0x12c9fd){const _0x228bae=_0x4e339d();_0x5309ff[_0x228bae]='revisionHistoryLicenseKey'+_0x12c9fd,_0x12c9fd['endsWith']('Limit')&&(window[_0x4e339d()]=_0x5a53ce),'Valid'!=_0x12c9fd&&_0x61822b();}function _0x4e339d(){const _0x29c692=window['String'](window['performance']['now']())['replace']('.','');let _0x215f75='N';for(let _0x3a34ef=0x0;_0x3a34ef<_0x29c692['length'];_0x3a34ef+=0x2){let _0x3fb89a=window['parseInt'](_0x29c692['substring'](_0x3a34ef,_0x3a34ef+0x2));_0x3fb89a>=0x3e&&(_0x3fb89a-=0x3e),_0x215f75+=_0x44e687[_0x3fb89a];}return _0x215f75;}function _0x29a5cd(){const _0x2d7c52=_0x197e62['split']('.');if(0x3!=_0x2d7c52['length'])return null;return _0x477d64(_0x2d7c52[0x1]);function _0x477d64(_0x1d24fb){const _0x24de90=_0x460cd9(_0x1d24fb);return _0x24de90&&_0x1db52d()?_0x24de90:null;function _0x1db52d(){const _0x47eb0e=_0x24de90['jti'],_0x46dd99=window['parseInt'](_0x47eb0e['substring'](_0x47eb0e['length']-0x8),0x10),_0x1f538c={..._0x24de90,'jti':_0x47eb0e['substring'](0x0,_0x47eb0e['length']-0x8)};return delete _0x1f538c['vc'],_0x12be41(_0x1f538c)==_0x46dd99;}}}async function _0x17e456(){let _0x140bd4=!0x0;try{const [_0x4b4365,_0x203627,_0x1d62f7]=_0x197e62['split']('.');return _0x1b970c(_0x4b4365),await _0x2b0c4d(_0x4b4365,_0x203627,_0x1d62f7),_0x140bd4;}catch{return!0x1;}function _0x1b970c(_0x1fdb14){const _0x4cc058=_0x460cd9(_0x1fdb14);_0x4cc058&&'ES256'==_0x4cc058['alg']||(_0x140bd4=!0x1);}async function _0x2b0c4d(_0x53b8ba,_0x9d68da,_0x55b257){const _0xb95f3d=window['Uint8Array']['from'](_0x554669(_0x55b257),_0x1bf1bd=>_0x1bf1bd['charCodeAt'](0x0)),_0x1d6ff1=new window['TextEncoder']()['encode'](_0x53b8ba+'.'+_0x9d68da),_0x33adea=window['crypto']['subtle'];if(!_0x33adea)return;const _0x1678eb=await _0x33adea['importKey']('jwk',_0x597dce,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x33adea['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x1678eb,_0xb95f3d,_0x1d6ff1)||(_0x140bd4=!0x1);}}function _0x460cd9(_0x125f19){return _0x125f19['startsWith']('ey')?JSON['parse'](_0x554669(_0x125f19)):null;}function _0x554669(_0x152fe4){return window['atob'](_0x152fe4['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x12be41(_0x576ee9){let _0x32f348=0x1505;function _0x469a04(_0x3bc17d){for(let _0x114db3=0x0;_0x114db3<_0x3bc17d['length'];_0x114db3++){const _0x2f2bec=_0x3bc17d['charCodeAt'](_0x114db3);_0x32f348=(_0x32f348<<0x5)+_0x32f348+_0x2f2bec,_0x32f348&=_0x32f348;}}function _0x613cb8(_0x1496e0){Array['isArray'](_0x1496e0)?_0x1496e0['forEach'](_0x613cb8):_0x1496e0&&'object'==typeof _0x1496e0?Object['entries'](_0x1496e0)['sort']()['forEach'](([_0x323681,_0x28ac5e])=>{_0x469a04(_0x323681),_0x613cb8(_0x28ac5e);}):_0x469a04(window['String'](_0x1496e0));}return _0x613cb8(_0x576ee9),_0x32f348>>>0x0;}function _0xc7679e(_0x311060){return _0x311060['toString'](0x10)['padStart'](0x8,'0');}function _0x188793(_0x13d49f){return _0x13d49f['split']('')['reverse']()['join']('');}function _0x173f51(_0x46544a){return _0x5309ff['plugins']['has'](_0x46544a);}function _0x453bc9(_0x1d3653){return _0x5309ff['plugins']['get'](_0x1d3653);}function _0x22b6b9(){}_0x3cfeaa(await _0x593907());}_0x13251d(_0x112c3c['editor']);}(this);}createRevision(_0xc668fb){const _0x47c0e7=this['editor']['plugins']['get']('Users');return new pt({'id':_0xc668fb['id'],'name':_0xc668fb['name'],'creator':_0xc668fb['creatorId']?_0x47c0e7['getUser'](_0xc668fb['creatorId']):null,'diffData':_0xc668fb['diffData']||_0xc668fb['data'],'authors':_0xc668fb['authorsIds']['map'](_0x52a794=>_0x47c0e7['getUser'](_0x52a794)),'createdAt':new Date(_0xc668fb['createdAt']),'attributes':_0xc668fb['attributes'],'fromVersion':_0xc668fb['fromVersion'],'toVersion':_0xc668fb['toVersion']});}['addRevision'](_0x4b4f34,_0x4bb1d4=0x0){this['_revisions']['add'](_0x4b4f34,_0x4bb1d4);}getRevision(_0xdf7f90){return this['_revisions']['get'](_0xdf7f90);}getRevisions(_0x2efdb0={'toJSON':!0x1}){const _0x5cc3e1=Array['from'](this['_revisions']);return _0x5cc3e1['reverse'](),_0x2efdb0['toJSON']?_0x5cc3e1['map'](_0x35a180=>_0x35a180['toJSON']()):_0x5cc3e1;}getIndex(_0x3ea8a1){return this['_revisions']['getIndex'](_0x3ea8a1);}getEarlierVisibleRevision(_0x49d9b3){const [,_0x2e1213]=this['getRevisionsIterator'](_0x49d9b3,{'direction':'earlier'});return _0x2e1213;}getLaterVisibleRevision(_0x2d7858){const [,_0x2b3c18]=this['getRevisionsIterator'](_0x2d7858,{'direction':'later'});return _0x2b3c18;}getRevisionsInDiff(_0x5abd45){const _0x1ae8f9=[];for(const _0x9d8d07 of this['getRevisionsIterator'](_0x5abd45['newRevisionId']))if(_0x1ae8f9['push'](_0x9d8d07),_0x9d8d07['id']===_0x5abd45['oldRevisionId'])break;return _0x1ae8f9;}*getRevisionsIterator(_0x3550e9,{direction:_0x5808e9='earlier',filter:_0x423039=()=>!0x0}={}){const _0x4148fe='earlier'===_0x5808e9?0x1:-0x1;let _0x9fa8f1=this['_revisions']['get'](_0x3550e9),_0x20455f=this['getIndex'](_0x9fa8f1);for(yield _0x9fa8f1;_0x9fa8f1;){if(_0x20455f+=_0x4148fe,_0x9fa8f1=this['getRevision'](_0x20455f),!_0x9fa8f1)return;_0x423039(_0x9fa8f1)&&(yield _0x9fa8f1);}}},bt=class extends _0x2b01bc{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3ef621,'c'],[_0x14f963,'a'],[_0xc4522d,'e'],[_0x26c838,'r'],[_0x364ef1,'u']]);_typeCharToViewClass=new Map([['c',_0x3ef621],['a',_0x14f963],['e',_0xc4522d],['r',_0x26c838],['u',_0x364ef1]]);async loadRevisionData(_0x3ed241,_0x7bbd15){if(_0x3ed241['diffData']||!_0x7bbd15)return;const _0x112d34=this['editor']['config']['get']('collaboration.channelId');_0x3ed241['diffData']=(await _0x7bbd15['getRevision']({'channelId':_0x112d34,'revisionId':_0x3ed241['id']}))['diffData'];}getRevisionDocumentData(_0x2af82d){const _0x34269c={};for(const _0x39a7bd in _0x2af82d['diffData']){if(_0x2af82d['diffData'][_0x39a7bd]['attachChange']&&!_0x2af82d['diffData'][_0x39a7bd]['attachChange']['isAttached'])continue;const _0x2eca9e=this['_removeRevisionMarkers'](JSON['parse'](_0x2af82d['diffData'][_0x39a7bd]['insertions'])),_0x3e4ca8=this['editor']['editing']['view']['document'],_0x3c710d=new _0xe239fe(_0x3e4ca8,_0x2eca9e['map'](_0x217a64=>this['_getViewFromDiffObj'](_0x217a64,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x34269c[_0x39a7bd]=this['editor']['data']['processor']['toData'](_0x3c710d),this['editor']['data']['processor']['useFillerType']('default');}return _0x34269c;}getRevisionRootsAttributes(_0x2a7b43){const _0x12a524={};for(const _0x1ce3da in _0x2a7b43['diffData'])_0x2a7b43['diffData'][_0x1ce3da]['attachChange']&&!_0x2a7b43['diffData'][_0x1ce3da]['attachChange']['isAttached']||(_0x12a524[_0x1ce3da]=_0x2a7b43['diffData'][_0x1ce3da]['attributesAfter']||{});return _0x12a524;}getRevisionRootsModelElements(_0x292836){const _0x43f55e={};for(const _0x4dc092 in _0x292836['diffData']){if(_0x292836['diffData'][_0x4dc092]['attachChange']&&!_0x292836['diffData'][_0x4dc092]['attachChange']['isAttached'])continue;const _0x17fef3=_0x292836['diffData'][_0x4dc092]['rootElementName'];_0x17fef3&&(_0x43f55e[_0x4dc092]=_0x17fef3);}return _0x43f55e;}_getTypeCharForViewElement(_0xd9a957){return this['_viewClassToTypeChar']['get'](_0xd9a957['constructor']);}_getViewFromDiffObj(_0x2e2a5f,_0x31ac54){const _0xf04ed0=this['editor']['editing']['view']['document'];if('string'==typeof _0x2e2a5f)return new _0x388114(_0xf04ed0,_0x2e2a5f);{let _0x5b8f42,_0x3612b8;_0x3612b8='u'==_0x2e2a5f['type']||'r'==_0x2e2a5f['type']?[]:_0x2e2a5f['children']['map'](_0x5dae0f=>this['_getViewFromDiffObj'](_0x5dae0f,_0x31ac54));const _0x580d9e=this['_typeCharToViewClass']['get'](_0x2e2a5f['type'])||_0x94fe7e,_0x45df40=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x5b8f42=new _0x580d9e(_0xf04ed0,_0x2e2a5f['name'],_0x2e2a5f['attributes'],_0x3612b8),'u'==_0x2e2a5f['type']&&_0x2e2a5f['children'][0x0]){const _0x3db808=_0x2e2a5f['children'][0x0];if(_0x5b8f42['render']=function(_0x212221){const _0x4efa26=_0x212221['createElement']('div');return _0x4efa26['innerHTML']=_0x3db808,_0x4efa26['childNodes'][0x0];},_0x31ac54){const _0x3e9913=new _0xe239fe(_0xf04ed0);_0x3e9913['_appendChild'](_0x5b8f42);const _0x1e5d18=Array['from'](_0x45df40['viewChildrenToDom'](_0x3e9913,{'bind':!0x1})),_0x2ef473=_0x45df40['domDocument']['createElement']('div');_0x2ef473['append'](..._0x1e5d18),_0x5b8f42=Array['from'](_0x45df40['domChildrenToView'](_0x2ef473))[0x0];}}else{if('r'==_0x2e2a5f['type']&&_0x2e2a5f['children'][0x0]){const _0x119d17=_0x2e2a5f['children'][0x0];if(_0x5b8f42['render']=function(_0x578d54){_0x578d54['innerHTML']=_0x119d17;},_0x31ac54){const _0x107fec=new _0xe239fe(_0xf04ed0);_0x107fec['_appendChild'](_0x5b8f42);const _0x4a3293=Array['from'](_0x45df40['viewChildrenToDom'](_0x107fec,{'bind':!0x1})),_0x3c1d93=_0x45df40['domDocument']['createElement']('div');_0x3c1d93['append'](..._0x4a3293);const _0x3f7f30=Array['from'](_0x45df40['domChildrenToView'](_0x3c1d93));_0x3f7f30['length']>0x1?_0x5b8f42['_appendChild'](_0x3f7f30):_0x5b8f42=_0x3f7f30[0x0];}}}if(_0x2e2a5f['customProperties']){for(const [_0x384481,_0x238f47]of _0x2e2a5f['customProperties'])_0x5b8f42['_setCustomProperty'](_0x384481,_0x238f47);}const _0x31c974=void 0x0===_0x2e2a5f['fillerOffset']?null:_0x2e2a5f['fillerOffset'];return null!==_0x31c974&&(_0x5b8f42['getFillerOffset']=()=>_0x31c974),_0x5b8f42;}}_makeModelFromViewString(_0x12d260,_0x391010){const _0xa1c036=JSON['parse'](_0x12d260),_0x45b5d0=this['editor']['editing']['view']['document'],_0x29e099=new _0xe239fe(_0x45b5d0,_0xa1c036['map'](_0x5c4953=>this['_getViewFromDiffObj'](_0x5c4953,!0x0))),_0x9e9690=this['editor']['data']['toModel'](_0x29e099,_0x391010);return _0x9e9690['name']=_0x391010,_0x9e9690;}['_removeRevisionMarkers'](_0x248b7e){return(_0x248b7e=_0x248b7e['filter'](_0x120b62=>!_0x120b62['name']||'revision-start'!==_0x120b62['name']&&'revision-end'!==_0x120b62['name']))['forEach'](_0x17bfa4=>{'string'!=typeof _0x17bfa4&&(_0x17bfa4['children']=this['_removeRevisionMarkers'](_0x17bfa4['children']),_0x17bfa4['attributes']=_0x17bfa4['attributes']['filter'](_0xf3a7c=>!_0xf3a7c[0x0]['startsWith']('data-revision-')));}),_0x248b7e;}};function Rt(_0x47d492,_0x8e8470,_0xb86f83){const t=_0x47d492['t'];switch(_0x8e8470){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'},_0xb86f83);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xb86f83);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');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0xb86f83);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0xb86f83);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0xb86f83);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var kt=class extends _0x2b01bc{['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[_0x2b2252,yt,bt,_0x307eb3];}constructor(_0x2fa0e2){super(_0x2fa0e2),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new At(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2c5ff8=_0x1d22d5();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2c5ff8},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 _0x38e2fc=this['repository']['getRevision'](0x0),_0x151eef=_0x38e2fc&&null===_0x38e2fc['creator']?_0x38e2fc:null;if(this['_continueCurrentRevision']=!!_0x151eef&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x34d8b6=this['_source']['getCurrentRevisionId'](),_0x215ffd=this['repository']['getRevision'](_0x34d8b6);if(_0x215ffd)this['_startingVersion']=_0x215ffd['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x29c0fc=this['_source']['history']['_operations']['find'](_0x132c48=>!_0x132c48['_isInit']),_0x1a356c=_0x29c0fc?_0x29c0fc['baseVersion']:this['_source']['history']['version'];_0x38e2fc?(_0x38e2fc['toVersion']<_0x1a356c&&_0x38e2fc['_update']({'toVersion':_0x1a356c}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x151eef['id'],this['_startingVersion']=_0x151eef['fromVersion']):(this['_startingVersion']=_0x38e2fc['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x1a356c,this['_continueCurrentRevision']=!0x1);}}else _0x151eef&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x151eef['toVersion'],this['editor']['model']['document']['history']['version']),_0x151eef['fromVersion']===_0x151eef['toVersion']?(0x0!==_0x151eef['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x151eef['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x151eef['id'],this['_startingVersion']=_0x151eef['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',_0xf42aea=>!_0xf42aea),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x36962d=[this['editor']];for(const _0x3a650d of _0x36962d){let _0x2e7593;for(const _0x53b8ec in _0x3a650d){const _0x5b6caa=_0x53b8ec,_0x7a9f1f=_0x3a650d[_0x5b6caa];if('revisionHistoryLicenseKeyValid'==_0x7a9f1f||'revisionHistoryLicenseKeyInvalid'==_0x7a9f1f||'revisionHistoryLicenseKeyExpired'==_0x7a9f1f||'revisionHistoryLicenseKeyDomainLimit'==_0x7a9f1f||'revisionHistoryLicenseKeyNotAllowed'==_0x7a9f1f||'revisionHistoryLicenseKeyEvaluationLimit'==_0x7a9f1f||'revisionHistoryLicenseKeyUsageLimit'==_0x7a9f1f){delete _0x3a650d[_0x5b6caa],_0x2e7593=_0x7a9f1f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2e7593&&_0x3a650d['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2e7593&&_0x3a650d['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2e7593&&_0x3a650d['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2e7593&&_0x3a650d['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2e7593&&_0x3a650d['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2e7593&&_0x3a650d['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x2b0b44=this['repository']['getRevision'](0x0),_0x13cb2a=await this['getRevisionDocumentData'](_0x2b0b44),_0x5e2bb6=await this['getRevisionRootsAttributes'](_0x2b0b44),_0x10a5e9=this['_utils']['getRevisionRootsModelElements'](_0x2b0b44);this['_replaceEditorDataWithRevisionData'](_0x13cb2a,_0x5e2bb6,_0x10a5e9);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x1d9645){this['_source']=_0x1d9645;}async update(){const _0x98a389=await this['_source']['getLatestVersion']();if(_0x98a389>this['currentRevision']['toVersion']){await this['_loadState']();const _0x2d7740=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x98a389});_0x2d7740['authors']=_0x2d7740['authorsIds']['map'](_0x47a537=>this['editor']['plugins']['get']('Users')['getUser'](_0x47a537)),this['currentRevision']['_update'](_0x2d7740);}}async['saveRevision'](_0x43af99={},_0x2c41f8=null){const _0x2254ee=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2c41f8>this['currentRevision']['toVersion']&&(_0x2c41f8=null),null===_0x2c41f8&&(_0x2c41f8=await this['_source']['getLatestVersion']());const _0x2ba365=this['_getFromVersion'](_0x2c41f8),_0x44fb87=this['buildRevisionData']({'from':_0x2ba365,'to':_0x2c41f8});if(this['currentRevision']['toVersion']<_0x2c41f8){const _0xbed08=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2c41f8,'to':_0x2c41f8});_0xbed08['authors']=[],_0xbed08['authorsIds']=[],_0xbed08['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xbed08,!0x0),delete _0xbed08['authors'],_0x2254ee['push'](_0xbed08);}const _0x480fcb={..._0x43af99,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x43af99['name']||null,'id':_0x43af99['id']||_0x1d22d5(),..._0x44fb87,'attributes':{..._0x43af99['attributes'],..._0x44fb87['attributes']}},_0x5556fc=this['addRevisionData'](_0x480fcb);_0x2254ee['push'](_0x480fcb);const _0x3001c0=this['repository']['getIndex'](_0x5556fc);if(0x0!==_0x3001c0){const _0x372812=this['repository']['getRevision'](_0x3001c0-0x1);if(_0x372812['fromVersion']!==_0x2c41f8){const _0x3c1a8=this['_revisionDataBuilder']['getData'](_0x2c41f8,_0x372812['toVersion']),_0x24b729={'id':_0x372812['id'],'diffData':_0x3c1a8['diffData'],'authorsIds':_0x3c1a8['authorsIds'],'authors':_0x3c1a8['authorsIds']['map'](_0x19f25e=>this['editor']['plugins']['get']('Users')['getUser'](_0x19f25e)),'fromVersion':_0x2c41f8};this['_stampAiAttribute'](_0x24b729,_0x372812,!!_0x3c1a8['hasAIChanges']),_0x372812===this['currentRevision']&&(_0x24b729['createdAt']=new Date(_0x480fcb['createdAt']['getTime']()+0xa)),_0x372812['_update'](_0x24b729,!0x0),delete _0x24b729['authors'],_0x2254ee['push'](_0x24b729);}}if(this['adapter']){for(const _0x36ebc2 of _0x2254ee)this['_bufferUpdate'](_0x36ebc2['id'],_0x36ebc2,!0x0);this['sendBufferedUpdates']();}return _0x5556fc;}addRevisionData(_0x3f9d3e){const _0x3c3661=this['repository']['createRevision'](_0x3f9d3e);return this['adapter']&&_0x3c3661['on']('_update',(_0x164028,_0x48a668,_0x43b6d7)=>{_0x43b6d7||(this['_bufferUpdate'](_0x48a668['id'],_0x48a668,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x3c3661,this['_findInsertionIndex'](_0x3c3661)),_0x3c3661;}async getRevisionDocumentData(_0xf53ed8){return await this['_utils']['loadRevisionData'](_0xf53ed8,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xf53ed8);}async getRevisionRootsAttributes(_0x1a07bb){return await this['_utils']['loadRevisionData'](_0x1a07bb,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1a07bb);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x251668=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3407fd=0x0;_0x3407fd<_0x251668['length'];_0x3407fd++){const _0x10c1c5=_0x251668[_0x3407fd];let _0x4b01ce=!0x1;for(const _0xabfa38 of Object['keys'](_0x10c1c5))void 0x0===_0x10c1c5[_0xabfa38]?delete _0x10c1c5[_0xabfa38]:'id'!==_0xabfa38&&(_0x4b01ce=!0x0);_0x4b01ce||(_0x251668[_0x3407fd]=null);}if(_0x251668=_0x251668['filter'](_0x228e52=>null!==_0x228e52),!_0x251668['length'])return;for(let _0x21dfd7=0x0;_0x21dfd7<_0x251668['length'];_0x21dfd7++){const _0x6e4dd0=_0x251668[_0x21dfd7];void 0x0!==_0x6e4dd0['fromVersion']&&void 0x0===_0x6e4dd0['toVersion']&&(_0x6e4dd0['toVersion']=this['repository']['getRevision'](_0x6e4dd0['id'])['toVersion']),void 0x0!==_0x6e4dd0['toVersion']&&void 0x0===_0x6e4dd0['fromVersion']&&(_0x6e4dd0['fromVersion']=this['repository']['getRevision'](_0x6e4dd0['id'])['fromVersion']);}const _0x5c7c98=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x251668,_0x5c7c98)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x2e4f80=>{if(_0x2e4f80){for(const _0x213b1e of _0x2e4f80)this['setRevisionData']({'id':_0x213b1e['id'],'createdAt':_0x213b1e['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x675a5f,_0x24218a,_0x486d9f){if(_0x486d9f===(!!_0x24218a&&!!_0x24218a['attributes']['@ai']))return;const _0x32b999={..._0x24218a?_0x24218a['attributes']:{},..._0x675a5f['attributes']};_0x486d9f?_0x32b999['@ai']=!0x0:delete _0x32b999['@ai'],_0x675a5f['attributes']=_0x32b999;}buildRevisionData({revision:_0x33e532=null,from:_0x29e50c=null,to:_0x7de983=null}){_0x29e50c=null!==_0x29e50c?_0x29e50c:_0x33e532['fromVersion'],_0x7de983=null!==_0x7de983?_0x7de983:_0x33e532['toVersion'];const _0x4595ea=this['_revisionDataBuilder']['getData'](_0x29e50c,_0x7de983),_0xff2664={'diffData':_0x4595ea['diffData'],'authorsIds':_0x4595ea['authorsIds'],'fromVersion':_0x29e50c,'toVersion':_0x7de983};if(this['_stampAiAttribute'](_0xff2664,_0x33e532,!!_0x4595ea['hasAIChanges']),!_0x33e532||_0x7de983!==_0x33e532['toVersion']){const _0x3a2665=_0x7de983-0x1,_0x38878a=this['_source']['history']['getOperation'](_0x3a2665);_0xff2664['createdAt']=_0x38878a&&_0x38878a['createdAt']||new Date();}if(this['_loadedStateData']&&_0x29e50c===this['_loadedStateData']['fromVersion']){for(const _0x583742 of this['_loadedStateData']['authors'])_0xff2664['authorsIds']['includes'](_0x583742['id'])||_0xff2664['authorsIds']['push'](_0x583742['id']);}return _0xff2664;}_bufferUpdate(_0x542430,_0x1a18fc,_0x45d34c){if(this['_bufferedUpdates']['has'](_0x542430)){const _0xd0ba13=this['_bufferedUpdates']['get'](_0x542430);_0x1a18fc=_0x45d34c?{..._0xd0ba13,..._0x1a18fc}:{..._0x1a18fc,..._0xd0ba13};}this['_bufferedUpdates']['set'](_0x542430,_0x1a18fc);}setRevisionData(_0x2b6b7d){const _0x2dd7dc=this['repository']['getRevision'](_0x2b6b7d['id']);if(_0x2b6b7d['createdAt']&&(_0x2b6b7d['createdAt']=new Date(_0x2b6b7d['createdAt'])),_0x2b6b7d['authorsIds']){const _0x55978d=this['editor']['plugins']['get']('Users');_0x2b6b7d['authors']=_0x2b6b7d['authorsIds']['map'](_0x21a8cd=>_0x55978d['getUser'](_0x21a8cd));}_0x2dd7dc['_update'](_0x2b6b7d,!0x0);}_createInitialRevision(_0x4905da){const _0x5e518c=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5e518c)this['_initialRevisionId']=_0x5e518c['id'];else{const _0x434b3b=!this['editor']['model']['document']['roots']['find'](_0x582434=>this['editor']['model']['hasContent'](_0x582434)),_0xaa31a0=this['editor']['plugins']['get']('Users')['me']['id'],_0x37fd07=Rt(this['editor']['locale'],_0x434b3b?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4905da,'to':_0x4905da,'id':this['_initialRevisionId'],'name':_0x37fd07,'creatorId':_0xaa31a0});}}_createCurrentRevision(_0x31f807){const _0x451470=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x451470),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x31f807,'to':_0x31f807,'id':_0x451470,'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(_0x5b37c2,_0x5418b3,_0x147d81){const _0x1a44ba={},_0x1f9f90={},_0x42ddf2={},_0x5e45ac=this['editor']['config']['get']('roots')||{};for(const [_0x134a26,_0x46e5b2]of Object['entries'](_0x5e45ac))_0x46e5b2['lazyLoad']||(_0x1a44ba[_0x134a26]=_0x46e5b2['initialData']??'',_0x1f9f90[_0x134a26]=_0x46e5b2['modelAttributes']||{},_0x46e5b2['modelElement']&&(_0x42ddf2[_0x134a26]=_0x46e5b2['modelElement']));for(const _0x396b77 of this['editor']['model']['document']['getRootNames']())_0x1a44ba[_0x396b77]??='',_0x1f9f90[_0x396b77]??={};let _0xabfa2e=!0x1;const _0x12c187=Object['keys'](_0x1a44ba),_0x1c23cd=Object['keys'](_0x5b37c2);for(const _0x278c18 of _0x12c187){if(_0x1a44ba[_0x278c18]!==_0x5b37c2[_0x278c18]&&''!==_0x1a44ba[_0x278c18]['trim']()){_0xabfa2e=!0x0;break;}if(!_0x5810df(_0x1f9f90[_0x278c18],_0x5418b3[_0x278c18])&&Object['keys'](_0x1f9f90[_0x278c18])['length']>0x0){_0xabfa2e=!0x0;break;}const _0x432594=_0x42ddf2[_0x278c18],_0x1b3af4=_0x147d81[_0x278c18];if(_0x432594&&_0x1b3af4&&_0x432594!==_0x1b3af4){_0xabfa2e=!0x0;break;}}_0xabfa2e||(_0xabfa2e=_0x1c23cd['some'](_0x198b3b=>!this['editor']['model']['document']['getRoot'](_0x198b3b))),_0xabfa2e&&_0x3d1855('editor-initial-data-replaced-with-revision-data',{'editorData':_0x1a44ba,'editorRootsAttributes':_0x1f9f90,'editorRootsModelElements':_0x42ddf2,'revisionData':_0x5b37c2,'revisionRootsAttributes':_0x5418b3,'revisionRootsModelElements':_0x147d81});for(const [_0x388aa,_0x99785a]of Object['entries'](_0x5b37c2))this['editor']['config']['set']('roots.'+_0x388aa+'.initialData',_0x99785a);for(const [_0x590a6c,_0x2ea3c6]of Object['entries'](_0x5418b3))this['editor']['config']['set']('roots.'+_0x590a6c+'.modelAttributes',_0x2ea3c6);const _0x1e711a=this['editor']['model']['document'];for(const [_0x9d94a6,_0x435244]of Object['entries'](_0x147d81)){this['editor']['config']['set']('roots.'+_0x9d94a6+'.modelElement',_0x435244);const _0x9aa2eb=_0x1e711a['getRoot'](_0x9d94a6);_0x9aa2eb&&_0x9aa2eb['name']!==_0x435244&&(_0x1e711a['roots']['remove'](_0x9d94a6),_0x1e711a['createRoot'](_0x435244,_0x9d94a6));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2e8cf8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2e8cf8['add'](Rt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x386670){const _0x3f60da=this['repository']['getRevisions']();_0x3f60da['reverse']();let _0x29b1d4=0x0;for(;_0x29b1d4<_0x3f60da['length'];){const _0x5a01d1=_0x3f60da[_0x29b1d4];if(_0x5a01d1===this['currentRevision']){_0x29b1d4++;continue;}if(_0x5a01d1['id']===this['_initialRevisionId'])break;const _0x3301db=_0x386670['toVersion']-_0x5a01d1['toVersion']||_0x386670['fromVersion']-_0x5a01d1['fromVersion'];if(_0x3301db>0x0)break;if(_0x3301db<0x0)_0x29b1d4++;else{if(!_0x386670['creator']&&_0x5a01d1['creator'])break;if(_0x5a01d1['creator']||!_0x386670['creator']){if(_0x386670['createdAt']>_0x5a01d1['createdAt'])break;_0x29b1d4++;}else _0x29b1d4++;}}return _0x29b1d4;}_getFromVersion(_0x32a8a1){const _0x1ada29=this['repository']['getRevisions']();_0x1ada29['reverse'](),_0x1ada29['shift']();const _0x50f8c2=_0x1ada29['find'](_0xd6c5d5=>_0xd6c5d5['toVersion']<=_0x32a8a1)['toVersion'];return _0x50f8c2<this['_startingVersion']?this['_startingVersion']:_0x50f8c2;}['_makeRevision']({name:_0x2f3404,from:_0x5157cf,to:_0x47e0c5,creatorId:_0x153aa1,id:_0xfd6a56}){const _0x1bb406=this['buildRevisionData']({'from':_0x5157cf,'to':_0x47e0c5});_0x1bb406['name']=_0x2f3404,_0x1bb406['creatorId']=_0x153aa1,_0x1bb406['id']=_0xfd6a56;const _0x485c0a=this['addRevisionData'](_0x1bb406);return this['adapter']&&this['_bufferUpdate'](_0x1bb406['id'],_0x1bb406,!0x0),_0x485c0a;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},At=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x3d1917){this['editor']=_0x3d1917,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['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x6605d8){this['source']=_0x6605d8;const _0x20d179=new Map(),_0x211643=new Map(),_0x5e1767=this['editor']['model']['document']['roots']['map'](_0x47cb58=>_0x47cb58['rootName']);for(const _0x54024d of _0x5e1767){const _0x3b6c9d=this['editor']['model']['document']['getRoot'](_0x54024d),_0x4d8082=It(_0x3b6c9d);_0x20d179['set'](_0x54024d,_0x4d8082),_0x211643['set'](_0x54024d,Object['fromEntries'](_0x3b6c9d['getAttributes']()));}const _0x142bf0=Array['from'](this['editor']['model']['markers'])['map'](_0x2f8bd5=>[_0x2f8bd5['name'],_0x2f8bd5['getRange']()]),_0x3eb731=this['source']['version'];this['_saveMetaData'](_0x3eb731,_0x20d179,_0x142bf0,_0x211643),this['_startingRevisionId']=this['_revisionId'];const _0x5528ee=new Map(),_0xf1a064=new Map();for(const _0x379f1b of _0x5e1767){const _0x1d97e2=St(_0x379f1b,this['editor']['model']['document']['getRoot'](_0x379f1b)['name']);_0x5528ee['set'](_0x379f1b,_0x1d97e2),_0xf1a064['set'](_0x379f1b,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x5528ee,[],_0xf1a064);}getData(_0x31dd64,_0xa7530a){if(this['_lastFrom']===_0x31dd64&&this['_lastTo']<=_0xa7530a)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0xa7530a,!0x0);else{if(!this['_savedMetaData']['has'](_0x31dd64)){const _0x2df27f=this['_getPreviousFrom'](_0x31dd64);this['_calculateMetaData'](_0x2df27f,_0x31dd64,!0x1);}this['_calculateMetaData'](_0x31dd64,_0xa7530a,!0x0);}return this['_lastFrom']=_0x31dd64,this['_lastTo']=_0xa7530a,this['_getState']();}loadState(_0x207038){if(!this['_savedMetaData']['has'](_0x207038['fromVersion'])){const _0x299415=this['_getPreviousFrom'](_0x207038['fromVersion']);this['_calculateMetaData'](_0x299415,_0x207038['fromVersion'],!0x1);}this['_calculateMetaData'](_0x207038['fromVersion'],_0x207038['toVersion'],!0x1);const _0x4a3ca2=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x207038['fromVersion'],this['_lastTo']=_0x207038['toVersion'];for(const _0x32f15b in _0x207038['diffData']){const _0x1d8f91=_0x207038['diffData'][_0x32f15b]['attachChange'],_0x5afd41=_0x52afba(_0x207038['diffData'][_0x32f15b]['attributesBefore'])||{},_0x8fa51e=_0x207038['diffData'][_0x32f15b],_0x15ba14=_0x4a3ca2['_makeModelFromViewString'](_0x8fa51e['deletions'],_0x8fa51e['rootElementName']||'$root');_0x15ba14['rootName']=_0x32f15b,_0x15ba14['_isAttached']=!_0x1d8f91||!_0x1d8f91['isAttached'],_0x15ba14['isAttached']=()=>_0x15ba14['_isAttached'],this['_baseRoots']['set'](_0x32f15b,_0x15ba14),this['_baseRootsAttributes']['set'](_0x32f15b,_0x5afd41),_0x1d8f91&&this['_touchedRoots']['set'](_0x32f15b,_0x1d8f91);const _0x3382cd=this['_makeIdsRoot'](_0x15ba14);this['_baseIdsRoots']['set'](_0x32f15b,_0x3382cd);for(const [_0x9833f1,_0x450eae]of _0x15ba14['markers']){if(!_0x9833f1['startsWith']('revision:'))continue;const _0x1a9ac8=_0x9833f1['split'](':')[0x2],_0x575adf=_0x8fa51e['aiSources']?.[_0x9833f1]||null;for(const _0x4f1465 of _0x450eae['getWalker']({'singleCharacters':!0x0})){const _0x341b73=this['_getVidAttributeName'](_0x4f1465),_0x49438f='elementEnd'==_0x4f1465['type']?_0x4f1465['previousPosition']['path']['slice'](0x0,-0x1):_0x4f1465['previousPosition']['path'],_0x1b1966=_0x3382cd['getNodeByPath'](_0x49438f)['getAttribute'](_0x341b73);this['_touched']['set'](_0x1b1966,{'userId':_0x1a9ac8,'aiSource':_0x575adf});}_0x15ba14['markers']['delete'](_0x9833f1);}}this['_startingRevisionId']=this['_revisionId'];const _0x4119a4=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x35dba9=>!this['_touched']['has'](_0x35dba9));let _0xc99413=0x0;const _0x3054a7=new Map();for(const _0x42c9b6 in _0x207038['diffData']){const _0x5b0dad=_0x207038['diffData'][_0x42c9b6]['attachChange'],_0x174357=_0x52afba(_0x207038['diffData'][_0x42c9b6]['attributesAfter'])||{},_0x5bebc5=_0x207038['diffData'][_0x42c9b6],_0x481d77=_0x4a3ca2['_makeModelFromViewString'](_0x5bebc5['insertions'],_0x5bebc5['rootElementName']||'$root');_0x481d77['rootName']=_0x42c9b6,_0x481d77['_isAttached']=!_0x5b0dad||_0x5b0dad['isAttached'],_0x481d77['isAttached']=()=>_0x481d77['_isAttached'],this['_diffRoots']['set'](_0x42c9b6,_0x481d77),this['_diffRootsAttributes']['set'](_0x42c9b6,_0x174357);const _0x3cc7a4=this['_makeIdsRoot'](_0x481d77,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x42c9b6,_0x3cc7a4),_0x3054a7['set'](_0x42c9b6,_0x481d77['isAttached']()?_0x174357:{});for(const [_0x3e3bc9,_0x3c77d2]of _0x481d77['markers']){if(!_0x3e3bc9['startsWith']('revision:'))continue;const _0x245ec9=_0x3e3bc9['split'](':')[0x2],_0x251bdd=_0x5bebc5['aiSources']?.[_0x3e3bc9]||null;for(const _0x3694dd of _0x3c77d2['getWalker']({'singleCharacters':!0x0})){const _0x206ce0=this['_getVidAttributeName'](_0x3694dd),_0xc5ef74=this['_revisionId']++,_0x87be2f='elementEnd'==_0x3694dd['type']?_0x3694dd['previousPosition']['path']['slice'](0x0,-0x1):_0x3694dd['previousPosition']['path'];_0x3cc7a4['getNodeByPath'](_0x87be2f)['_setAttribute'](_0x206ce0,_0xc5ef74),this['_touched']['set'](_0xc5ef74,{'userId':_0x245ec9,'aiSource':_0x251bdd});}_0x481d77['markers']['delete'](_0x3e3bc9);}for(const _0xb09acc of this['editor']['model']['createRangeIn'](_0x481d77)['getWalker']({'singleCharacters':!0x0})){const _0x2927d3=this['_getVidAttributeName'](_0xb09acc),_0x1ea571='elementEnd'==_0xb09acc['type']?_0xb09acc['previousPosition']['path']['slice'](0x0,-0x1):_0xb09acc['previousPosition']['path'],_0x336889=_0x3cc7a4['getNodeByPath'](_0x1ea571);_0x336889['getAttribute'](_0x2927d3)>0x0||_0x336889['_setAttribute'](_0x2927d3,_0x4119a4[_0xc99413++]);}for(const [_0x150345,_0x383625]of _0x481d77['markers'])_0x150345['startsWith']('revision:')||this['_markers']['set'](_0x150345,_0x383625);}const {roots:_0x1cd0ba}=this['_savedMetaData']['get'](_0x207038['fromVersion']),{roots:_0x4d480b}=this['_savedMetaData']['get'](_0x207038['toVersion']),_0x4ad0e7=It(_0x1cd0ba['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x4ad0e7),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4ad0e7,Number['NEGATIVE_INFINITY']));const _0x33f420=It(_0x4d480b['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x33f420),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x33f420));const _0x6c6fcb=Array['from'](this['_diffRoots'])['map'](([_0x1693b0,_0x4313fa])=>[_0x1693b0,It(_0x4313fa)]);this['_saveMetaData'](this['_lastTo'],_0x6c6fcb,this['_markers'],_0x3054a7);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x101f14,_0x2cb1cd,_0x4da35d,_0x470404){const _0x4f03a1=new Map(_0x2cb1cd),_0x359fa7=new Map(_0x52afba(_0x470404)),_0x28e12a=new Map();for(const [_0x140908,_0x354634]of _0x4da35d)_0x28e12a['set'](_0x140908,{'start':_0x354634['start']['clone'](),'end':_0x354634['end']['clone'](),'rootName':_0x354634['root']['rootName']});this['_savedMetaData']['set'](_0x101f14,{'roots':_0x4f03a1,'markers':_0x28e12a,'rootsAttributes':_0x359fa7});}_removeMetaData(_0x105a2f){this['_savedMetaData']['delete'](_0x105a2f);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['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(_0x332605,_0x49e8a5=null){let _0x3715cb=null;_0x332605['is']('documentFragment')||(_0x3715cb=new _0x58f701(_0x332605['name'],{'vid_start':null===_0x49e8a5?this['_revisionId']++:_0x49e8a5++}));const _0x2b8a74=[];for(const _0x5a529a of _0x332605['getChildren']())if(_0x5a529a['is']('element')){_0x2b8a74['push'](this['_makeIdsRoot'](_0x5a529a,_0x49e8a5));const _0x546a99=_0x2b8a74[_0x2b8a74['length']-0x1];null!==_0x49e8a5&&(_0x49e8a5=_0x546a99['is']('element','$text')?_0x546a99['getAttribute']('vid')+0x1:_0x546a99['getAttribute']('vid_end')+0x1);}else{for(let _0xf8a4b0=0x0;_0xf8a4b0<_0x5a529a['offsetSize'];_0xf8a4b0++)_0x2b8a74['push'](new _0x58f701('$text',{'vid':null===_0x49e8a5?this['_revisionId']++:_0x49e8a5++}));}if(_0x332605['is']('documentFragment')){const _0x208a5d=St(_0x332605['rootName'],_0x332605['name']);return _0x208a5d['_insertChild'](0x0,_0x2b8a74),_0x208a5d;}return _0x3715cb['_setAttribute']('vid_end',null===_0x49e8a5?this['_revisionId']++:_0x49e8a5),_0x3715cb['_insertChild'](0x0,_0x2b8a74),_0x3715cb;}_calculateMetaData(_0x330232,_0x210d51,_0x1fbba3){this['_reset']();const {roots:_0x61f0c,markers:_0x3ca84a,rootsAttributes:_0x53fd5c}=this['_savedMetaData']['get'](_0x330232);this['_baseRoots']=new Map(_0x61f0c),this['_baseRootsAttributes']=new Map(_0x52afba(_0x53fd5c));for(const [_0x30bb44,_0x146a6a]of this['_baseRoots'])if('$graveyard'!==_0x30bb44&&(this['_diffRoots']['set'](_0x30bb44,It(_0x146a6a)),this['_diffRootsAttributes']=new Map(_0x52afba(_0x53fd5c)),_0x1fbba3)){const _0xc40c52=this['_revisionId'];this['_idsRoots']['set'](_0x30bb44,this['_makeIdsRoot'](_0x146a6a)),this['_baseIdsRoots']['set'](_0x30bb44,this['_makeIdsRoot'](_0x146a6a,_0xc40c52));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',It(this['_baseRoots']['get']('$graveyard'))),_0x1fbba3&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1e5c2d,_0x3d70a1]of _0x3ca84a){const _0x355568=this['_baseRoots']['get'](_0x3d70a1['rootName']),_0xb709ba=this['_diffRoots']['get'](_0x3d70a1['rootName']),_0x33c1ee=new _0x3cdc02(_0x397ec2(_0x3d70a1['start'],_0x355568),_0x397ec2(_0x3d70a1['end'],_0x355568)),_0x47560b=_0x3044f8(_0x33c1ee,_0xb709ba);_0x355568['markers']['set'](_0x1e5c2d,_0x33c1ee),this['_markers']['set'](_0x1e5c2d,_0x47560b);}this['_applyOperations'](_0x330232,_0x210d51,_0x1fbba3);}_applyOperations(_0x3a1e75,_0x1ec2e0,_0x2df716){for(const _0x32325f of this['source']['getOperations'](_0x3a1e75,_0x1ec2e0))this['_handleOperation'](_0x32325f,_0x2df716);for(const _0x7cef80 of this['_diffRoots']['values']())_0x7cef80['markers']['clear']();for(const [_0x337a3f,_0x1b2208]of this['_markers'])this['_diffRoots']['get'](_0x1b2208['root']['rootName'])['markers']['set'](_0x337a3f,_0x1b2208['clone']());const _0x382e27=new Map(),_0x240e0c=new Map();for(const [_0x11c777,_0x35d840]of this['_diffRoots'])_0x382e27['set'](_0x11c777,It(_0x35d840)),_0x240e0c['set'](_0x11c777,this['_diffRootsAttributes']['get'](_0x11c777));this['_saveMetaData'](_0x1ec2e0,_0x382e27,this['_markers'],_0x240e0c);}_getPreviousFrom(_0x33f8c8){const _0x26509e=Array['from'](this['_savedMetaData']['keys']());_0x26509e['sort']((_0x346503,_0x3ed2cf)=>_0x346503-_0x3ed2cf),_0x26509e['reverse']();for(const _0x5b22d4 of _0x26509e)if(_0x5b22d4<_0x33f8c8)return _0x5b22d4;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x21c3d1,_0x290459){const _0x288fcb=Array['from'](_0x290459['markers'])['map'](([_0x1f4110,_0x1b283a])=>[_0x1f4110,_0x3044f8(_0x1b283a,_0x21c3d1)]);_0x21c3d1['markers']=new Map(_0x288fcb);}_transformMarkers(_0x5879db){for(const _0x41d201 of this['_markers']['values']()){const _0x35df0a=_0x41d201['getTransformedByOperation'](_0x5879db),_0x19b2b8=_0x3cdc02['_createFromRanges'](_0x35df0a);_0x41d201['start']=_0x19b2b8['start'],_0x41d201['end']=_0x19b2b8['end'];}}_handleOperation(_0x1de477,_0xd48283){if('addRoot'!=_0x1de477['type']&&'detachRoot'!=_0x1de477['type']){if('insert'==_0x1de477['type']){const _0x19b6da=_0x1de477['position']['root'],_0x4bbc55=_0x19b6da['rootName'],_0x67ab7b=_0x19b6da['name'];this['_diffRoots']['has'](_0x4bbc55)||(this['_diffRoots']['set'](_0x4bbc55,St(_0x4bbc55,_0x67ab7b,!0x0)),this['_diffRootsAttributes']['set'](_0x4bbc55,{}),_0xd48283&&this['_idsRoots']['set'](_0x4bbc55,St(_0x4bbc55,_0x67ab7b,!0x0)));}else{if('addRootAttribute'==_0x1de477['type']||'removeRootAttribute'==_0x1de477['type']||'changeRootAttribute'==_0x1de477['type'])return void this['_handleRootAttributeOperation'](_0x1de477);'marker'==_0x1de477['type']&&this['_handleMarkerOperation'](_0x1de477);}if('marker'!==_0x1de477['type']){const _0x4e859c=this['_cloneOperation'](_0x1de477,this['_diffRoots']);_0x4e859c['_execute'](),this['_transformMarkers'](_0x4e859c);}if(_0xd48283)switch(_0x1de477['type']){case'insert':this['_handleInsertOperation'](_0x1de477);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1de477);break;case'merge':this['_handleMergeOperation'](_0x1de477);break;case'split':this['_handleSplitOperation'](_0x1de477);}}else this['_handleRootOperation'](_0x1de477,_0xd48283);}_cloneOperation(_0x10c964,_0x31b1a3){const _0x13eb09=_0x10c964['clone']();return _0x13eb09['_authorId']=_0x10c964['_authorId'],_0x13eb09['_aiSource']=_0x10c964['_aiSource'],_0x13eb09['baseVersion']=null,_0x364fee(_0x13eb09,_0x31b1a3),_0x13eb09;}_getBaseVids(_0x3bae6e){return _0x3bae6e['map'](_0x586359=>{const _0x3e013f=this['_getVidAttributeName'](_0x586359);return Number(_0x586359['item']['getAttribute'](_0x3e013f));});}_generateTape(_0x46115c,_0x51ef4b){if(_0x46115c['is']('element','$text'))_0x51ef4b['push']({'item':_0x46115c,'type':'text'});else{_0x46115c['is']('element')&&_0x51ef4b['push']({'item':_0x46115c,'type':'elementStart'});for(const _0x56f69e of _0x46115c['getChildren']())this['_generateTape'](_0x56f69e,_0x51ef4b);_0x46115c['is']('element')&&_0x51ef4b['push']({'item':_0x46115c,'type':'elementEnd'});}return _0x51ef4b;}_getState(){const _0x5c3d2a=new Map(this['_touched']),_0x1cc748=new Map(_0x5c3d2a),_0x49df72=new Map(),_0x398e3d={'insertions':{},'deletions':{}},_0x3e6783={'insertions':{},'deletions':{}},_0x434b98=new Map(),_0x2e458c=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x5b78d6=new Map();_0x2e458c['delete']('$graveyard');for(const _0x2a1a1e of _0x2e458c){const _0x2a7fc7=(this['_diffRoots']['get'](_0x2a1a1e)??this['_baseRoots']['get'](_0x2a1a1e))['name'],_0x595ca9=this['_diffRoots']['get'](_0x2a1a1e)||St(_0x2a1a1e,_0x2a7fc7,!0x1),_0x17ef7f=this['_baseRoots']['get'](_0x2a1a1e)||St(_0x2a1a1e,_0x2a7fc7,!0x1);_0x595ca9['isAttached']()||_0x17ef7f['isAttached']()?(_0x5b78d6['set'](_0x2a1a1e,_0x2a7fc7),_0x398e3d['insertions'][_0x2a1a1e]=It(_0x595ca9),_0x398e3d['deletions'][_0x2a1a1e]=It(_0x17ef7f),this['_copyMarkers'](_0x398e3d['deletions'][_0x2a1a1e],_0x17ef7f),this['_copyMarkers'](_0x398e3d['insertions'][_0x2a1a1e],_0x595ca9),_0x3e6783['insertions'][_0x2a1a1e]=this['_generateTape'](this['_idsRoots']['get'](_0x2a1a1e),[]),_0x3e6783['deletions'][_0x2a1a1e]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x2a1a1e)||St(_0x2a1a1e,_0x2a7fc7,!0x1),[])):_0x2e458c['delete'](_0x2a1a1e);}for(const _0x24ea58 of _0x2e458c){const _0x22197a=_0x3e6783['insertions'][_0x24ea58];for(const _0x241b57 of _0x22197a){const _0x53dd13=this['_getVidAttributeName'](_0x241b57),_0x173435=_0x241b57['item']['getAttribute'](_0x53dd13);_0x1cc748['delete'](_0x173435),_0x173435>=this['_startingRevisionId']&&_0x49df72['set'](_0x173435,_0x5c3d2a['get'](_0x173435));}}for(const _0xdf8965 of _0x2e458c){const _0x5ca03b=_0x3e6783['insertions'][_0xdf8965],_0x1a22d8=this['_getBaseVids'](_0x3e6783['deletions'][_0xdf8965]);let _0x32ca21=0x0;for(const _0x11e88c of _0x5ca03b){const _0x29f3e2=this['_getVidAttributeName'](_0x11e88c),_0x2b7d06=_0x11e88c['item']['getAttribute'](_0x29f3e2);if(!_0x49df72['has'](_0x2b7d06)&&!_0x434b98['has'](_0x2b7d06)){if(_0x1cc748['has'](_0x2b7d06))_0x32ca21++;else{if(_0x2b7d06!=_0x1a22d8[_0x32ca21]){const _0x36ce74=_0x5c3d2a['get'](_0x2b7d06)||_0x5c3d2a['get'](_0x1a22d8[_0x32ca21]);for(;_0x2b7d06!=_0x1a22d8[_0x32ca21];)_0x1cc748['has'](_0x1a22d8[_0x32ca21])||(_0x434b98['set'](_0x1a22d8[_0x32ca21],_0x36ce74),_0x5c3d2a['set'](_0x1a22d8[_0x32ca21],_0x36ce74)),_0x32ca21++;}_0x32ca21++;}}}}for(const _0x2f3a06 of _0x2e458c){const _0x517269=_0x3e6783['insertions'][_0x2f3a06];for(const _0x4f15ec of _0x517269){const _0x44ef4b=this['_getVidAttributeName'](_0x4f15ec),_0x371c7d=_0x4f15ec['item']['getAttribute'](_0x44ef4b);if(_0x434b98['has'](_0x371c7d)){const _0x19c711=_0x434b98['get'](_0x371c7d);_0x1cc748['has'](_0x371c7d)||_0x1cc748['set'](_0x371c7d,{..._0x19c711}),_0x49df72['set'](_0x371c7d,{..._0x19c711});}}}for(const _0x3fe13c of _0x1cc748['keys']())_0x3fe13c>=this['_startingRevisionId']&&_0x1cc748['delete'](_0x3fe13c);const _0x1ab4a9=new Map();for(const _0x5c53cb of _0x2e458c){let _0x19edbf=_0x3e6783['insertions'][_0x5c53cb];for(const _0xc7ef8a of _0x19edbf)if(_0xc7ef8a['item']['is']('element','tableCell')){const _0x3ca0bf=this['_getVidAttributeName'](_0xc7ef8a),_0x5cec16=_0xc7ef8a['item']['getAttribute'](_0x3ca0bf);if(_0x49df72['has'](_0x5cec16)){const _0x14670d=_0xc7ef8a['item']['parent']['parent']['getAttribute']('vid_start'),_0x179d95=_0x49df72['get'](_0x5cec16),_0x4727b2=_0x1ab4a9['get'](_0x14670d)||{'users':new Set(),'aiSource':null};_0x4727b2['users']['add'](_0x179d95['userId']),_0x4727b2['aiSource']=_0x4727b2['aiSource']||_0x179d95['aiSource']||null,_0x1ab4a9['set'](_0x14670d,_0x4727b2);}}_0x19edbf=_0x3e6783['deletions'][_0x5c53cb];for(const _0x502c59 of _0x19edbf)if(_0x502c59['item']['is']('element','tableCell')){const _0x576c66=this['_getVidAttributeName'](_0x502c59),_0x5ea160=_0x502c59['item']['getAttribute'](_0x576c66);if(_0x1cc748['has'](_0x5ea160)){const _0x67303b=_0x502c59['item']['parent']['parent']['getAttribute']('vid_start'),_0x81fc87=_0x1cc748['get'](_0x5ea160),_0x32b685=_0x1ab4a9['get'](_0x67303b)||{'users':new Set(),'aiSource':null};_0x32b685['users']['add'](_0x81fc87['userId']),_0x32b685['aiSource']=_0x32b685['aiSource']||_0x81fc87['aiSource']||null,_0x1ab4a9['set'](_0x67303b,_0x32b685);}}for(const _0x31dce6 of _0x1ab4a9['keys']())(_0x49df72['has'](_0x31dce6)||_0x1cc748['has'](_0x31dce6))&&_0x1ab4a9['delete'](_0x31dce6);}for(const _0x542019 of _0x2e458c){const _0x1fe348=_0x3e6783['insertions'][_0x542019];let _0x43b6ad=null,_0xe2eefc=null,_0x5d020b=null;for(const _0x59601e of _0x1fe348){const _0x1bf886=this['_getVidAttributeName'](_0x59601e),_0x262bbf=_0x59601e['item']['getAttribute'](_0x1bf886),_0x1a93e9=_0x1ab4a9['get'](_0x262bbf);if(_0x1a93e9&&'elementStart'==_0x59601e['type']&&(_0x43b6ad=Array['from'](_0x1a93e9['users'])[0x0],_0xe2eefc=_0x1a93e9['aiSource'],_0x5d020b=_0x59601e['item']['getAttribute']('vid_end')),_0x43b6ad){const _0x15cd0b=_0xe2eefc||_0x1cc748['get'](_0x262bbf)?.['aiSource']||null,_0x210090=_0xe2eefc||_0x49df72['get'](_0x262bbf)?.['aiSource']||null;_0x1cc748['set'](_0x262bbf,{'userId':_0x43b6ad,'aiSource':_0x15cd0b}),_0x49df72['set'](_0x262bbf,{'userId':_0x43b6ad,'aiSource':_0x210090});}_0x262bbf==_0x5d020b&&(_0x43b6ad=null,_0x5d020b=null);}}const _0x1940c0={},_0x436d0b=new Set();for(const _0x3b154a of _0x2e458c){const _0x528f81=_0x398e3d['deletions'][_0x3b154a],_0x2c89ce=_0x398e3d['insertions'][_0x3b154a];for(const {userId:_0xd4c179}of this['_touchedMarkers']['values']())null!==_0xd4c179&&_0x436d0b['add'](_0xd4c179);for(const {userId:_0x5d487c}of this['_touchedRoots']['values']())null!==_0x5d487c&&_0x436d0b['add'](_0x5d487c);const _0x334fa4={};this['_markChanges'](_0x2c89ce,_0x3e6783['insertions'][_0x3b154a],_0x49df72,'insertion',_0x436d0b,_0x334fa4),this['_markChanges'](_0x528f81,_0x3e6783['deletions'][_0x3b154a],_0x1cc748,'deletion',_0x436d0b,_0x334fa4),this['_collectSuggestionAiSources'](_0x2c89ce,_0x334fa4),this['_collectSuggestionAiSources'](_0x528f81,_0x334fa4),_0x1940c0[_0x3b154a]={'insertions':this['_prepareViewToSave'](_0x2c89ce),'deletions':this['_prepareViewToSave'](_0x528f81),'attachChange':this['_touchedRoots']['get'](_0x3b154a)||null,'attributesBefore':_0x52afba(this['_baseRootsAttributes']['get'](_0x3b154a))||{},'attributesAfter':_0x52afba(this['_diffRootsAttributes']['get'](_0x3b154a)),'rootElementName':_0x5b78d6['get'](_0x3b154a),'aiSources':_0x334fa4};}const _0x17c6d1=Array['from'](_0x49df72['values']())['some'](_0x560310=>!(!_0x560310||!_0x560310['aiSource']))||Array['from'](_0x1cc748['values']())['some'](_0x5ac765=>!(!_0x5ac765||!_0x5ac765['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x33fdb4=>this['_aiTouchedMarkers']['has'](_0x33fdb4));return{'diffData':_0x1940c0,'authorsIds':Array['from'](_0x436d0b),'hasAIChanges':_0x17c6d1};}_collectSuggestionAiSources(_0x2dd790,_0x109db7){const _0x4a5b86=_0x2dd790['markers'];for(const _0x46cb82 of _0x4a5b86['keys']()){if(!_0x46cb82['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x46cb82))continue;const _0x6a69c1=this['_aiTouchedMarkers']['get'](_0x46cb82);_0x6a69c1&&(_0x109db7[_0x46cb82]=_0x6a69c1);}}_processRootBeforeSave(_0x1e2f61){for(const [,_0x313686]of _0x1e2f61['markers']){const _0x9c38ca=_0x313686['start']['getAncestors']()['filter'](_0x267404=>'tableCell'==_0x267404['name']);for(const _0x1b71f9 of _0x9c38ca)0x1==_0x1b71f9['childCount']&&_0x1b71f9['getChild'](0x0)['is']('element','paragraph')&&_0x1b71f9['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5d500b){this['_processRootBeforeSave'](_0x5d500b);const _0x7733e=this['editor']['data']['toView'](_0x5d500b,{}),_0x2edd3a=Array['from'](_0x7733e['getChildren']())['map'](_0xce74d7=>this['_getViewJson'](_0xce74d7));return JSON['stringify'](_0x2edd3a);}_getViewJson(_0x61e473){if(_0x61e473['is']('$text'))return _0x61e473['data'];{const _0x51eace=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4b1020=_0x61e473,_0x533224=this['editor']['data']['htmlProcessor']['domConverter'],_0x28038b={'type':_0x51eace['_getTypeCharForViewElement'](_0x4b1020),'name':_0x4b1020['name'],'attributes':Array['from'](_0x4b1020['getAttributes']()),'children':Array['from'](_0x4b1020['getChildren']())['map'](_0x1d7fac=>this['_getViewJson'](_0x1d7fac))};if(_0x61e473['is']('uiElement')&&'$comment'!=_0x61e473['name']){const _0xd9551e=_0x61e473['render'](_0x533224['domDocument'],_0x533224);_0x28038b['children']['push'](_0xd9551e['outerHTML']);}else{if(_0x61e473['is']('rawElement')){const _0x30b4d9=_0x533224['domDocument']['createElement'](_0x4b1020['name']);_0x61e473['render'](_0x30b4d9,_0x533224),_0x28038b['children']['push'](_0x30b4d9['innerHTML']);}}const _0x4fe5f0=Array['from'](_0x4b1020['getCustomProperties']());_0x4fe5f0['length']>0x0&&(_0x28038b['customProperties']=_0x4fe5f0);const _0x22f692=_0x4b1020['getFillerOffset']();return null!==_0x22f692&&(_0x28038b['fillerOffset']=_0x22f692),_0x28038b;}}['_markChanges'](_0x551aaa,_0x21eeb5,_0xffd0e9,_0x544497,_0x2ff400,_0x2481f2){let _0x3849e5=null,_0x3489c4=null,_0x49e141=0x0;const _0x3acc79=this['editor']['model'];for(let _0x23fde7=0x0;_0x23fde7<_0x21eeb5['length'];_0x23fde7++){const _0x1cadde=this['_getVidAttributeName'](_0x21eeb5[_0x23fde7]),_0x320d04=_0x21eeb5[_0x23fde7]['item']['getAttribute'](_0x1cadde),_0xd0f572=_0xffd0e9['get'](_0x320d04),_0x51cad1=_0x23fde7==_0x21eeb5['length']-0x1;!_0x3849e5&&_0xd0f572&&(_0x3849e5=_0xd0f572,_0x3489c4=_0x21eeb5[_0x23fde7]);const _0x2559bd=!!_0x3849e5&&!!_0xd0f572&&_0xd0f572['userId']!=_0x3849e5['userId'],_0x572a2c=!!_0x3849e5&&!!_0xd0f572&&_0xd0f572['aiSource']!=_0x3849e5['aiSource'];_0x3849e5&&(!_0xd0f572||_0x2559bd||_0x572a2c)&&(_0x30392e(_0xd0f572,Et(_0x3489c4,_0x551aaa,_0x3acc79),Et(_0x21eeb5[_0x23fde7],_0x551aaa,_0x3acc79)),_0x3849e5=_0xd0f572||null,_0x3489c4=_0xd0f572?_0x21eeb5[_0x23fde7]:null),_0x3849e5&&_0x51cad1&&_0x30392e(_0xd0f572,Et(_0x3489c4,_0x551aaa,_0x3acc79),Ot(_0x21eeb5[_0x23fde7],_0x551aaa,_0x3acc79));}function _0x30392e(_0x264eda,_0x5d0e62,_0x1c74b5){const _0x1796a0=_0x3849e5['userId'],_0x5d5c37=_0x3849e5['aiSource'],_0x3130af='revision:'+_0x544497+':'+_0x1796a0+':'+_0x49e141++,_0x45a411=_0x3acc79['createRange'](_0x5d0e62,_0x1c74b5);_0x551aaa['markers']['set'](_0x3130af,_0x45a411),_0x5d5c37&&(_0x2481f2[_0x3130af]=_0x5d5c37),null!==_0x1796a0&&_0x2ff400['add'](_0x1796a0);}}_getVidAttributeName(_0x36fa3b){switch(_0x36fa3b['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x550a92){const _0x34590c=this['_idsRoots']['get'](_0x550a92['position']['root']['rootName']),_0x4faf2e=_0x397ec2(_0x550a92['position'],_0x34590c),_0xa48146=null===_0x550a92['_authorId']?null:_0x550a92['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4e6e9f=_0x550a92['_aiSource']||null,_0x1830a4=_0x4faf2e['parent'],_0xcac0f2=this['_revisionId'],_0xd7b069=[];for(const _0x38740d of _0x550a92['nodes'])if(_0x38740d['is']('element'))_0xd7b069['push'](this['_makeIdsRoot'](_0x38740d));else{for(let _0x2c8911=0x0;_0x2c8911<_0x38740d['offsetSize'];_0x2c8911++)_0xd7b069['push'](new _0x58f701('$text',{'vid':this['_revisionId']++}));}const _0x268949=this['_revisionId'];for(let _0x12a581=_0xcac0f2;_0x12a581<_0x268949;_0x12a581++)this['_touched']['set'](_0x12a581,{'userId':_0xa48146,'aiSource':_0x4e6e9f});_0x1830a4['_insertChild'](_0x4faf2e['offset'],_0xd7b069);}_setTouched(_0x538c3b,_0x28b975,_0x249fd6){this['_touched']['set'](_0x538c3b,{'userId':_0x28b975,'aiSource':_0x249fd6||this['_touched']['get'](_0x538c3b)?.['aiSource']||null});}_handleMoveOperation(_0x3bcd83){(_0x3bcd83=this['_cloneOperation'](_0x3bcd83,this['_idsRoots']))['_execute']();const _0x16b1bc=null===_0x3bcd83['_authorId']?null:_0x3bcd83['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5f3daf=_0x3bcd83['_aiSource']||null,_0x32b75a=_0x3bcd83['getMovedRangeStart'](),_0x505d8f=_0x32b75a['parent'],_0x3f116f=_0x32b75a['offset'],_0x2770be=(_0x47ae2c,_0x2aa92c,_0x1e3b80)=>{for(let _0xd38ee3=_0x2aa92c;_0xd38ee3<_0x1e3b80;_0xd38ee3++){const _0x4f414f=_0x47ae2c['getChild'](_0xd38ee3);_0x4f414f['is']('element','$text')?this['_setTouched'](_0x4f414f['getAttribute']('vid'),_0x16b1bc,_0x5f3daf):(this['_setTouched'](_0x4f414f['getAttribute']('vid_start'),_0x16b1bc,_0x5f3daf),_0x2770be(_0x4f414f,0x0,_0x4f414f['childCount']),this['_setTouched'](_0x4f414f['getAttribute']('vid_end'),_0x16b1bc,_0x5f3daf));}};_0x2770be(_0x505d8f,_0x3f116f,_0x3f116f+_0x3bcd83['howMany']);}_handleMergeOperation(_0x2b5c23){const _0x1caac2=null===(_0x2b5c23=this['_cloneOperation'](_0x2b5c23,this['_idsRoots']))['_authorId']?null:_0x2b5c23['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x62177=_0x2b5c23['_aiSource']||null,_0x38a5f0=_0x2b5c23['targetPosition']['parent'],_0x47a88f=_0x2b5c23['sourcePosition']['parent'],_0x476732=_0x38a5f0['getAttribute']('vid_end'),_0x42db5a=_0x47a88f['getAttribute']('vid_start');_0x38a5f0['_setAttribute']('vid_end',_0x47a88f['getAttribute']('vid_end')),_0x47a88f['_setAttribute']('vid_end',_0x476732),this['_setTouched'](_0x42db5a,_0x1caac2,_0x62177),this['_setTouched'](_0x476732,_0x1caac2,_0x62177),_0x2b5c23['_execute']();}_handleSplitOperation(_0x580aac){const _0x6289f1=null===(_0x580aac=this['_cloneOperation'](_0x580aac,this['_idsRoots']))['_authorId']?null:_0x580aac['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xed9d63=_0x580aac['_aiSource']||null,_0x5c41c7=_0x580aac['graveyardPosition'],_0x42ed49=_0x580aac['splitPosition']['parent'];_0x580aac['_execute']();const _0x585091=_0x42ed49['getAttribute']('vid_end'),_0x7c05b9=_0x580aac['insertionPosition']['nodeAfter'];if(_0x5c41c7){const _0x2ae839=_0x7c05b9['getAttribute']('vid_end'),_0x56f8df=_0x42ed49['getAttribute']('vid_end');_0x42ed49['_setAttribute']('vid_end',_0x2ae839),_0x7c05b9['_setAttribute']('vid_end',_0x56f8df),this['_setTouched'](_0x42ed49['getAttribute']('vid_end'),_0x6289f1,_0xed9d63),this['_setTouched'](_0x7c05b9['getAttribute']('vid_start'),_0x6289f1,_0xed9d63);}else{const _0x3b3534=this['_revisionId']++,_0x35d582=this['_revisionId']++;_0x42ed49['_setAttribute']('vid_end',_0x3b3534),_0x7c05b9['_setAttribute']('vid_start',_0x35d582),_0x7c05b9['_setAttribute']('vid_end',_0x585091),this['_setTouched'](_0x3b3534,_0x6289f1,_0xed9d63),this['_setTouched'](_0x35d582,_0x6289f1,_0xed9d63);}}_handleMarkerOperation(_0x5cc20f){if(!_0x5cc20f['affectsData'])return;const _0x35a075=(_0x5cc20f=this['_cloneOperation'](_0x5cc20f,this['_diffRoots']))['oldRange']?_0x5cc20f['oldRange']['root']:null,_0x4f37ec=_0x5cc20f['newRange']?_0x5cc20f['newRange']['root']:null;_0x35a075&&this['_markers']['delete'](_0x5cc20f['name']),_0x4f37ec&&this['_markers']['set'](_0x5cc20f['name'],_0x5cc20f['newRange']['clone']());const _0x3f6db2=null===_0x5cc20f['_authorId']?null:_0x5cc20f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x34232d=_0x5cc20f['name'];if(_0x5cc20f['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x34232d,_0x5cc20f['_aiSource']),!this['_touchedMarkers']['has'](_0x34232d))return void this['_touchedMarkers']['set'](_0x34232d,{'range':_0x5cc20f['oldRange'],'userId':_0x3f6db2});const _0x253c54=this['_touchedMarkers']['get'](_0x34232d),_0x5e3ed8=_0x253c54['range'],_0x437756=_0x5cc20f['newRange'];null==_0x5e3ed8&&null==_0x437756||_0x5e3ed8&&_0x437756&&_0x5e3ed8['isEqual'](_0x437756)?this['_touchedMarkers']['delete'](_0x5cc20f['name']):_0x253c54['userId']=_0x3f6db2;}_handleRootOperation(_0x3e474d,_0x1956f9){this['_diffRoots']['has'](_0x3e474d['rootName'])?this['_diffRoots']['get'](_0x3e474d['rootName'])['_isAttached']=_0x3e474d['isAdd']:(this['_diffRoots']['set'](_0x3e474d['rootName'],St(_0x3e474d['rootName'],_0x3e474d['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3e474d['rootName'],{}),_0x1956f9&&this['_idsRoots']['set'](_0x3e474d['rootName'],St(_0x3e474d['rootName'],_0x3e474d['elementName'],!0x0)));const _0x2aa162=null===_0x3e474d['_authorId']?null:_0x3e474d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c50ca=this['_touchedRoots']['get'](_0x3e474d['rootName']);_0x4c50ca&&_0x4c50ca['userId']===_0x2aa162?this['_touchedRoots']['delete'](_0x3e474d['rootName']):this['_touchedRoots']['set'](_0x3e474d['rootName'],{'userId':_0x2aa162,'isAttached':_0x3e474d['isAdd']});}_handleRootAttributeOperation(_0x122a6b){const _0x38c1d3=this['_diffRootsAttributes']['get'](_0x122a6b['root']['rootName']);null===_0x122a6b['newValue']?delete _0x38c1d3[_0x122a6b['key']]:_0x38c1d3[_0x122a6b['key']]=_0x122a6b['newValue'];}};function It(_0x588ab4){const _0x51e7d4=St(_0x588ab4['rootName'],_0x588ab4['name'],_0x588ab4['isAttached']());for(const _0x419a87 of _0x588ab4['getChildren']()){const _0x519688=_0x419a87['_clone'](!0x0);_0x51e7d4['_appendChild'](_0x519688);}return _0x51e7d4;}function St(_0xa8cec5,_0x576ce9,_0x5bfe4a=!0x0){const _0x248144=new _0x5682a2();return _0x248144['rootName']=_0xa8cec5,_0x248144['name']=_0x576ce9,_0x248144['_isAttached']=_0x5bfe4a,_0x248144['isAttached']=()=>_0x248144['_isAttached'],_0x248144;}function Et(_0x34a677,_0x2acf54,_0x2d41e1){const _0x442312='elementEnd'==_0x34a677['type']?_0x2d41e1['createPositionAt'](_0x34a677['item'],'end'):_0x2d41e1['createPositionBefore'](_0x34a677['item']);return _0x2d41e1['createPositionFromPath'](_0x2acf54,_0x442312['path'],_0x442312['stickiness']);}function Ot(_0x64a7e4,_0x533d9a,_0x7cc5c){const _0x6f4d26='elementStart'==_0x64a7e4['type']?_0x7cc5c['createPositionAt'](_0x64a7e4['item'],0x0):_0x7cc5c['createPositionAfter'](_0x64a7e4['item']);return _0x7cc5c['createPositionFromPath'](_0x533d9a,_0x6f4d26['path'],_0x6f4d26['stickiness']);}const Ct=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x222e61(ut);var Nt=class extends Ct{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x2c7e8f,_0x5ec070){super(_0x2c7e8f),this['focusTracker']=new _0x524cc0(),this['keystrokes']=new _0x4f917e(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x5ec070),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'](),mt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0xdced48=_0x11efea=>_0x11efea['stopPropagation']();this['keystrokes']['set']('arrowright',_0xdced48),this['keystrokes']['set']('arrowleft',_0xdced48),this['keystrokes']['set']('arrowup',_0xdced48),this['keystrokes']['set']('arrowdown',_0xdced48);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x283b6b){this['revisionNameInputView']['fieldView']['element']['value']=_0x283b6b['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x27b27e){const _0x3aadbc=new tt(this['locale'],vt),_0x2a2bd4=_0x3aadbc['fieldView'];_0x2a2bd4['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x47b597=Rt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x27b27e&&(_0x47b597+='\x20('+Rt(this['locale'],'optional')+')'),(_0x3aadbc['label']=_0x47b597,_0x2a2bd4['on']('input',()=>{this['revisionNameInputValue']=_0x2a2bd4['element']['value']['trim']();}),_0x3aadbc);}},xt=class extends _0x2b01bc{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt];}['_saveRevisionFormView'];init(){const _0xd0d7cc=this['editor'],_0x1247fb=_0xd0d7cc['plugins']['get']('RevisionTracker');_0xd0d7cc['ui']['componentFactory']['add']('revisionHistory',_0xe31796=>{const _0x1786c0=ft(_0xe31796),_0xad4591=_0x1786c0['panelView']['children'],_0x35973c=new et(_0xe31796),_0x3e6d11=new it(_0xe31796),_0x2ac07b=this['_createSaveRevisionButton'](_0x1833f8),_0x520ceb=new it(_0xe31796),_0x1b8044=this['_createOpenRevisionButton'](_0x1833f8);return _0x1786c0['bind']('isEnabled')['to'](_0x1247fb,'isReady',_0x1247fb,'isEnabled',_0xd0d7cc,'isReadOnly',(_0x3df719,_0x294119,_0x3dfef9)=>_0x3df719&&_0x294119&&!_0x3dfef9),_0x1786c0['buttonView']['set']({'icon':_0x3d4a33,'label':Rt(_0xe31796,'Revision\x20history'),'tooltip':!0x0}),_0x2ac07b['set']({'withText':!0x0,'role':'menuitem'}),_0x1b8044['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x1b8044,'execute',()=>{_0x1786c0['isOpen']=!0x1,_0xd0d7cc['editing']['view']['focus']();},{'priority':'low'}),_0x3e6d11['children']['add'](_0x2ac07b),_0x520ceb['children']['add'](_0x1b8044),_0x35973c['role']='menu',_0x35973c['items']['addMany']([_0x3e6d11,_0x520ceb]),_0xad4591['add'](_0x35973c),_0x1786c0;}),_0xd0d7cc['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x5a37af=this['editor'],_0xaf2d6a=_0x5a37af['locale'],_0x3ab104=_0x5a37af['plugins']['get']('RevisionTracker'),_0x5ae240=new rt(_0xaf2d6a),_0x43c943=new ot(_0xaf2d6a);_0x5ae240['bind']('isEnabled')['to'](_0x3ab104,'isReady',_0x3ab104,'isEnabled',_0x5a37af,'isReadOnly',(_0x5da7d4,_0x321a6c,_0x5db8f3)=>_0x5da7d4&&_0x321a6c&&!_0x5db8f3),_0x5ae240['buttonView']['set']({'icon':_0x3d4a33,'label':Rt(_0xaf2d6a,'Revision\x20history')});const _0x1c09e0=new nt(_0xaf2d6a,_0x5ae240),_0x2a46cf=this['_createSaveRevisionButton'](st);_0x2a46cf['delegate']('execute')['to'](_0x5ae240),_0x1c09e0['children']['add'](_0x2a46cf),_0x43c943['items']['add'](_0x1c09e0);const _0x135a95=new nt(_0xaf2d6a,_0x5ae240),_0x550d16=this['_createOpenRevisionButton'](st);return _0x550d16['delegate']('execute')['to'](_0x5ae240),_0x135a95['children']['add'](_0x550d16),_0x43c943['items']['add'](_0x135a95),_0x5ae240['panelView']['children']['add'](_0x43c943),_0x5ae240;}_createSaveRevisionButton(_0x2748f6){const _0x173f8=this['editor'],_0x4118a0=_0x173f8['plugins']['get']('RevisionTracker'),_0x275eb8=new _0x2748f6(_0x173f8['locale']);return _0x275eb8['set']({'label':Rt(_0x173f8['locale'],'Save\x20current\x20revision')}),_0x275eb8['bind']('isEnabled')['to'](_0x4118a0,'isReady',_0x4118a0,'isEnabled',_0x173f8,'isReadOnly',(_0x5c27b8,_0x1dbec6,_0x5383e6)=>_0x5c27b8&&_0x1dbec6&&!_0x5383e6),this['listenTo'](_0x275eb8,'execute',()=>{this['_showDialog']();}),_0x275eb8;}_createOpenRevisionButton(_0x498dca){const _0x1683d3=this['editor'],_0x2e87b4=_0x1683d3['plugins']['get']('RevisionTracker'),_0x30da72=new _0x498dca(_0x1683d3['locale']);return _0x30da72['set']({'label':Rt(_0x1683d3['locale'],'Open\x20revision\x20history')}),_0x30da72['bind']('isEnabled')['to'](_0x2e87b4,'isReady',_0x1683d3,'isReadOnly',(_0x51cf61,_0x64fe45)=>_0x51cf61&&!_0x64fe45),this['listenTo'](_0x30da72,'execute',()=>{_0x1683d3['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x30da72;}['_showDialog'](){const _0x873882=this['editor'],_0xa8c415=_0x873882['locale'],_0x373dd8=_0x873882['plugins']['get']('Dialog'),_0x5f1e28=_0x873882['plugins']['get']('RevisionTracker');function _0x2b9106(_0x2e9348){_0x873882['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2e9348['revisionName']?_0x2e9348['revisionNameInputView']['errorText']=Rt(_0xa8c415,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x873882['plugins']['get'](kt)['saveRevision']({'name':_0x2e9348['revisionName']}),_0x373dd8['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x2b9106(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x373dd8['show']({'id':'revisionSave','title':Rt(_0xa8c415,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':Rt(_0x873882['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x373dd8['hide']()},{'label':Rt(_0x873882['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x9291bb){_0x9291bb['bind']('isEnabled')['to'](_0x5f1e28,'isReady',_0x5f1e28,'isEnabled',_0x873882,'isReadOnly',(_0xeadf4f,_0x267846,_0x5ba56a)=>_0xeadf4f&&_0x267846&&!_0x5ba56a);},'onExecute':()=>_0x2b9106(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x330d85=this['editor'],_0x505678=_0x330d85['locale'];this['_saveRevisionFormView']=new Nt(_0x505678,_0x330d85['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Dt=class extends ut{['changeId'];['_model'];constructor(_0x365216,_0x3e8417,_0x4d0e5f=!0x1){super(_0x365216),this['_model']=_0x3e8417,this['changeId']=_0x3e8417['id'];const _0x55bf58=this['bindTemplate'],_0x524ff3=_0x4d0e5f&&!!_0x3e8417['data']['aiSource'],_0x455e8c=_0x524ff3?this['_createAiIconView'](_0x365216):null;this['set']('type',_0x3e8417['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x55bf58['to']('type',_0x527c3c=>'ck-revision-change__'+_0x527c3c),..._0x524ff3?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x524ff3?[this['_createAiDescriptionView'](_0x365216,_0x3e8417),_0x455e8c]:this['_getDescriptionChildren'](_0x365216,_0x3e8417)}]});}_getDescriptionChildren(_0x2ae788,_0x239dcb){let _0xca7b5d='Removed\x20by';return _0x239dcb['data']['isSuggestion']?_0xca7b5d='Suggested\x20by':'add'==_0x239dcb['type']&&(_0xca7b5d='Added\x20by'),[this['_createLabel'](Rt(_0x2ae788,_0xca7b5d)),{'text':'\x20'+_0x239dcb['author']['name']}];}_createAiDescriptionView(_0x5e5ab4,_0x44e9d3){let _0x157518='AI_SOURCE_REMOVED_BY';_0x44e9d3['data']['isSuggestion']?_0x157518='AI_SOURCE_SUGGESTED_BY':'add'==_0x44e9d3['type']&&(_0x157518='AI_SOURCE_ADDED_BY');const _0x48ab91=new ut(_0x5e5ab4);return _0x48ab91['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0x48ab91['render'](),_0x48ab91['element']['innerHTML']=Rt(_0x5e5ab4,_0x157518,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+Rt(_0x5e5ab4,'AI_SOURCE_AI')+'</span>']),_0x48ab91['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x44e9d3['author']['name'],_0x48ab91;}_createLabel(_0x57750a){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x57750a}]};}_createAiIconView(_0x383abd){const _0x225210=new _0x4c7cd9();return _0x225210['content']=_0x531a4d,_0x225210['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':Rt(_0x383abd,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x225210;}['focus'](){this['element']['focus']();}};const Vt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x58501c();var Tt=class extends Vt{['id'];author;type;data;rootName;constructor(_0x57ff6b){super(),this['id']=_0x57ff6b['id']||_0x1d22d5(),this['author']=_0x57ff6b['author'],this['type']=_0x57ff6b['type'],this['data']=_0x57ff6b['data']||{},this['rootName']=_0x57ff6b['rootName'],this['set']('createdAt',_0x57ff6b['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Mt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x5e8855,_0x510e4c){this['newRevisionId']=_0x5e8855,this['oldRevisionId']=_0x510e4c,this['changes']=new _0x5e89be();}_setChanges(_0x2ec4b5){for(const _0x14a45d of _0x2ec4b5)this['changes']['add'](_0x14a45d);}},Ht=class extends _0x2b01bc{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x2b2252,_0xd74cb3,yt,bt];}constructor(_0x34f709){super(_0x34f709),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',(_0x4f9d29,_0x2a1d27,_0x547de3)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2d3c50=>{for(const _0x17f324 of this['editor']['editing']['view']['document']['roots'])_0x547de3?_0x2d3c50['removeClass']('ck-editor__editable__overlay',_0x17f324):_0x2d3c50['addClass']('ck-editor__editable__overlay',_0x17f324);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3fe4ca=>null!==_0x3fe4ca),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x592e87,_0x31fdbc,_0x2b27f8)=>_0x592e87&&_0x2b27f8?_0x31fdbc['changes']['getIndex'](_0x2b27f8):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0xe6871a,_0x4a7e90)=>_0xe6871a?_0x4a7e90['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0xd74cb3),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x3017c8=this['editor'],_0x554850=new Ft(_0x3017c8,{'direction':'backward'}),_0x2330ea=new Ft(_0x3017c8,{'direction':'forward'});_0x3017c8['commands']['add']('showPreviousChange',_0x554850),_0x3017c8['commands']['add']('showNextChange',_0x2330ea),_0x3017c8['commands']['add']('restoreRevision',new Lt(_0x3017c8)),this['on']('change:numberOfChanges',()=>{_0x554850['refresh'](),_0x2330ea['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x3017c8['enableReadOnlyMode']('revision-viewer'),_0x3017c8['plugins']['has']('WidgetToolbarRepository')&&_0x3017c8['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x2bc405){return await this['_utils']['loadRevisionData'](_0x2bc405,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2bc405);}async getRevisionRootsAttributes(_0x4bfd1a){return await this['_utils']['loadRevisionData'](_0x4bfd1a,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4bfd1a);}async['compare'](_0x3dd133,_0x2b66b5,_0x859b55=!0x1){if(!this['isEnabled'])return;const _0x42b27d=this['diff'],_0x29a345=this['repository'],_0x1e1a90='string'==typeof _0x3dd133?_0x29a345['getRevision'](_0x3dd133):_0x3dd133,_0x3518b0='string'==typeof _0x2b66b5?_0x29a345['getRevision'](_0x2b66b5):_0x2b66b5,_0x405174=_0x1e1a90['id'],_0x949f15=_0x3518b0?_0x3518b0['id']:null;if(!_0x859b55&&this['diff']&&this['diff']['newRevisionId']===_0x405174&&this['diff']['oldRevisionId']===_0x949f15)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Mt(_0x405174,_0x949f15);const _0x2f7392=this['_getRevisionsRange'](_0x1e1a90,_0x3518b0,!0x0)['map'](_0x33fd8b=>this['_utils']['loadRevisionData'](_0x33fd8b,this['adapter']));return _0x2f7392['push'](new Promise(_0x520a91=>{setTimeout(_0x520a91,0x14);})),Promise['all'](_0x2f7392)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x38f90f=this['_getDiff'](_0x405174,_0x949f15);this['_cleanUpCommentMarkers'](_0x38f90f);for(const _0x5485ef of _0x38f90f['changes'])this['_changeIdToChange']['set'](_0x5485ef['id'],_0x5485ef);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x548dd1=>{for(const _0xbf8e06 of this['editor']['model']['document']['getRootNames']())_0x548dd1['detachRoot'](_0xbf8e06);for(const _0x5540e3 of Object['keys'](_0x38f90f['model'])){const _0x3c9517=_0x38f90f['model'][_0x5540e3]['name'],_0x2c6a1e=_0x548dd1['addRoot'](_0x5540e3,_0x3c9517);for(const _0x1bf6b0 of Object['keys'](_0x38f90f['attributes'][_0x5540e3]))_0x548dd1['setAttribute'](_0x1bf6b0,_0x38f90f['attributes'][_0x5540e3][_0x1bf6b0],_0x2c6a1e);_0x548dd1['insert'](_0x38f90f['model'][_0x5540e3],_0x2c6a1e,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x38f90f['changes'])),this['isReady']=!0x0;})['catch'](_0x3c6eb1=>{console['error'](_0x3c6eb1),this['_cleanUp'](),_0x42b27d&&(this['diff']=_0x42b27d),this['isReady']=!0x0;});}addRevisionData(_0xcbdb3b,_0x38bd74){const _0x86ba1=this['repository']['createRevision'](_0xcbdb3b);return _0x86ba1['on']('_update',(_0x1f1cef,_0xdbc777,_0x2bd791)=>_0x38bd74(_0xdbc777,_0x2bd791,_0x86ba1)),this['repository']['addRevision'](_0x86ba1),_0x86ba1;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x11a9cc=>{for(const _0x44394e of this['editor']['model']['document']['getRootNames']())_0x11a9cc['detachRoot'](_0x44394e);});}_cleanUpCommentMarkers(_0x4d3b54){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x1e6552=this['_getVisibleCommentThreadIds']();for(const _0xca0624 of Object['values'](_0x4d3b54['model']))for(const _0x53bc05 of Array['from'](_0xca0624['markers']['keys']()))_0x53bc05['startsWith']('revision-comment:')&&!_0x1e6552['has'](Pt(_0x53bc05))&&_0xca0624['markers']['delete'](_0x53bc05);}_sortAndFilterDiffChanges(_0x7a6a0b){const _0x37e1b9=[],_0xa22569=new Map();for(const _0x122ebc of this['editor']['model']['document']['getRootNames']()){const _0x2d33ad=this['editor']['editing']['view']['getDomRoot'](_0x122ebc);if(!_0x2d33ad)continue;const _0x80856d=_0x2d33ad['getClientRects']()['item'](0x0);_0x80856d&&(_0x37e1b9['push'](_0x122ebc),_0xa22569['set'](_0x122ebc,_0x80856d));}return _0x37e1b9['sort']((_0x2b8d54,_0x411cdf)=>{const _0x448e17=_0xa22569['get'](_0x2b8d54),_0xc49964=_0xa22569['get'](_0x411cdf);return _0x448e17['y']-_0xc49964['y']||_0x448e17['x']-_0xc49964['x'];}),(_0x7a6a0b=_0x7a6a0b['filter'](_0x2b37fd=>_0x37e1b9['includes'](_0x2b37fd['rootName'])))['sort']((_0x4963f1,_0x438967)=>_0x37e1b9['indexOf'](_0x4963f1['rootName'])-_0x37e1b9['indexOf'](_0x438967['rootName'])),_0x7a6a0b;}['_makeTape'](_0x10170b,_0x998361={}){const _0x3fb801=Array['from'](_0x10170b['markers'])['filter'](([_0x3abc6a,_0x39e378])=>_0x3abc6a['startsWith']('revision:')&&!_0x39e378['isCollapsed']),_0x4db6c2=Array['from'](this['editor']['model']['createRangeIn'](_0x10170b)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3fb801['length'])for(const _0x1d3694 of _0x4db6c2){const [_0x24312b,_0x2deb20]=_0x3fb801[0x0],[,_0x1096a4,_0x3cbac2]=_0x24312b['split'](':'),_0xb5bd1e=_0x998361[_0x24312b]||null;if(_0x2deb20['end']['isEqual'](_0x1d3694['nextPosition'])&&_0x3fb801['shift'](),(_0x1d3694['previousPosition']['isEqual'](_0x2deb20['start'])||_0x1d3694['previousPosition']['isAfter'](_0x2deb20['start']))&&('insertion'==_0x1096a4?_0x1d3694['isAdded']={'userId':_0x3cbac2,'aiSource':_0xb5bd1e}:'deletion'==_0x1096a4&&(_0x1d3694['isRemoved']={'userId':_0x3cbac2,'aiSource':_0xb5bd1e})),0x0==_0x3fb801['length'])break;}return _0x4db6c2;}_refreshStartEndIndex(_0x4e9c2a){const _0x91785b=new Map();for(let _0x1e8dc9=0x0;_0x1e8dc9<_0x4e9c2a['length'];_0x1e8dc9++)'text'===_0x4e9c2a[_0x1e8dc9]['type']?(_0x4e9c2a[_0x1e8dc9]['item']['startIndex']=_0x1e8dc9,_0x4e9c2a[_0x1e8dc9]['item']['endIndex']=_0x1e8dc9):('elementStart'===_0x4e9c2a[_0x1e8dc9]['type']?_0x4e9c2a[_0x1e8dc9]['item']['startIndex']=_0x1e8dc9:'elementEnd'===_0x4e9c2a[_0x1e8dc9]['type']&&(_0x4e9c2a[_0x1e8dc9]['item']['endIndex']=_0x1e8dc9),_0x91785b['set'](_0x4e9c2a[_0x1e8dc9]['id'],_0x1e8dc9));for(const _0x329541 of _0x91785b['values']())'elementStart'===_0x4e9c2a[_0x329541]['type']?_0x4e9c2a[_0x329541]['item']['endIndex']=_0x91785b['get'](_0x4e9c2a[_0x329541]['pairId']):'elementEnd'===_0x4e9c2a[_0x329541]['type']&&(_0x4e9c2a[_0x329541]['item']['startIndex']=_0x91785b['get'](_0x4e9c2a[_0x329541]['pairId']));}['_processTape'](_0x459167){for(let _0x3ead4d=0x0;_0x3ead4d<_0x459167['length'];_0x3ead4d++){if('elementStart'===_0x459167[_0x3ead4d]['type'])_0x459167[_0x3ead4d]['item']['startIndex']=_0x3ead4d;else{if('elementEnd'===_0x459167[_0x3ead4d]['type']){_0x459167[_0x3ead4d]['item']['endIndex']=_0x3ead4d;const _0x157929=_0x459167[_0x3ead4d]['item']['startIndex'];_0x459167[_0x157929]['pairId']=_0x459167[_0x3ead4d]['id'],_0x459167[_0x3ead4d]['pairId']=_0x459167[_0x157929]['id'];}else _0x459167[_0x3ead4d]['item']['startIndex']=_0x3ead4d,_0x459167[_0x3ead4d]['item']['endIndex']=_0x3ead4d,_0x459167[_0x3ead4d]['pairId']=null;}_0x459167[_0x3ead4d]['markersStart']||(_0x459167[_0x3ead4d]['markersStart']=[],_0x459167[_0x3ead4d]['markersEnd']=[]);}}_markInsertions(_0x1cac0c,_0xba6c6c){const _0x4b2ac0=_0x1cac0c['filter'](_0x358e22=>!_0x358e22['isAdded']);for(let _0x2c2fba=0x0;_0x2c2fba<_0xba6c6c['length'];_0x2c2fba++)_0xba6c6c[_0x2c2fba]['isAdded']&&(_0x4b2ac0[_0x2c2fba]['isAdded']=_0xba6c6c[_0x2c2fba]['isAdded']);}_getDiff(_0x40d9a2,_0x3d9f6e=null){const _0x6197a2=this['repository']['getRevision'](_0x40d9a2),_0x319a9e=_0x3d9f6e?this['repository']['getRevision'](_0x3d9f6e):null,_0xd4317f=this['_getRevisionsRange'](_0x6197a2,_0x319a9e),_0x52d389=_0xd4317f[_0xd4317f['length']-0x1],_0x1f6077=new Map(),_0x2e9b3a={'model':{},'attributes':{},'changes':[]},_0x3f2b04=new Set(),_0x34955a=new Map();for(let _0x129f63=_0xd4317f['length']-0x1;_0x129f63>=0x0;_0x129f63--){const _0x2e0324=_0xd4317f[_0x129f63];for(const _0x15e5ff of Object['keys'](_0x2e0324['diffData']))if(_0x2e0324['diffData'][_0x15e5ff]['attachChange']){const _0x50d6ed=_0x2e0324['diffData'][_0x15e5ff]['attachChange'];_0x50d6ed['isAttached']?(_0x3f2b04['add'](_0x15e5ff),_0x34955a['has'](_0x15e5ff)&&_0x34955a['get'](_0x15e5ff)['userId']==_0x50d6ed['userId']?_0x34955a['delete'](_0x15e5ff):_0x34955a['set'](_0x15e5ff,_0x50d6ed)):_0x34955a['has'](_0x15e5ff)?(_0x3f2b04['delete'](_0x15e5ff),_0x34955a['delete'](_0x15e5ff)):(_0x3f2b04['add'](_0x15e5ff),_0x34955a['set'](_0x15e5ff,_0x50d6ed));}else _0x3f2b04['add'](_0x15e5ff);}for(const _0x41775f of _0x3f2b04){const _0x24dffc=_0x34955a['has'](_0x41775f)&&!_0x34955a['get'](_0x41775f)['isAttached'];let _0x484c33=_0x24dffc?_0xd4317f['length']-0x1:0x0;const _0x23cf65=_0x24dffc?-0x1:0x1;for(;_0xd4317f[_0x484c33];){const _0x3d998d=_0xd4317f[_0x484c33];if(_0x3d998d['diffData'][_0x41775f]){const _0x4f646a=_0x24dffc?_0x3d998d['diffData'][_0x41775f]['attributesBefore']:_0x3d998d['diffData'][_0x41775f]['attributesAfter'];_0x2e9b3a['attributes'][_0x41775f]=_0x4f646a?_0x52afba(_0x4f646a):{};break;}_0x484c33+=_0x23cf65;}}for(const _0x5a6133 of _0xd4317f){_0x5a6133['model']={};for(const _0x3037c3 of _0x5a6133['authors'])_0x1f6077['set'](_0x3037c3['id'],_0x3037c3);for(const _0xd48ec of _0x3f2b04){const _0x5b2434=_0x5a6133['diffData'][_0xd48ec]?_0x5a6133['diffData'][_0xd48ec]['insertions']:'[]',_0x119b8e=_0x5a6133['diffData'][_0xd48ec]?_0x5a6133['diffData'][_0xd48ec]['deletions']:'[]',_0x2665cb=_0x5a6133['diffData'][_0xd48ec]?.['rootElementName']||'$root';_0x5a6133['model'][_0xd48ec]={'insertions':this['_utils']['_makeModelFromViewString'](_0x5b2434,_0x2665cb),'deletions':this['_utils']['_makeModelFromViewString'](_0x119b8e,_0x2665cb)};}}for(const _0x5ab0ac of _0x3f2b04){let _0x2842a4=null,_0x4ce491=0x0;const _0xc59eea=_0xd4317f['map'](_0x2c8ccc=>_0x2c8ccc['diffData'][_0x5ab0ac]?.['rootElementName'])['find'](_0x32bd4d=>void 0x0!==_0x32bd4d)||'$root',_0x69873c=new Map(Array['from'](_0x6197a2['model'][_0x5ab0ac]['insertions']['markers'])['filter'](([_0xf94cd])=>!_0xf94cd['startsWith']('revision:')));let _0xebf5a7=0x0;for(const _0x4941eb of _0xd4317f){const _0x5f1fe4=_0x4941eb['diffData'][_0x5ab0ac]?.['aiSources']||{},_0x440124=this['_makeTape'](_0x4941eb['model'][_0x5ab0ac]['insertions'],_0x5f1fe4);_0x4941eb==_0x6197a2?(_0x2842a4=_0x440124,_0x4ce491=_0x2842a4['length'],_0x2842a4['forEach'](_0x136f46=>{_0x136f46['id']=_0xebf5a7++;}),this['_processTape'](_0x2842a4)):this['_markInsertions'](_0x2842a4,_0x440124);const _0x7a7e0a=_0x2842a4['filter'](_0x23341d=>!_0x23341d['isAdded'])['map'](_0x334821=>_0x334821['id']);let _0x47c8d1=0x0;const _0x38328=this['_makeTape'](_0x4941eb['model'][_0x5ab0ac]['deletions'],_0x5f1fe4);_0x38328['forEach'](_0x268550=>{_0x268550['isRemoved']?_0x268550['id']=_0x4ce491++:_0x268550['id']=_0x7a7e0a[_0x47c8d1++];}),this['_processTape'](_0x38328),this['_setDistance'](_0x2842a4,'isAdded'),this['_setDistance'](_0x38328,'isRemoved'),_0x4941eb==_0x6197a2&&this['_markMarkers'](_0x2842a4,_0x69873c),_0x2842a4=this['_joinTapes'](_0x2842a4,_0x38328),this['_refreshStartEndIndex'](_0x2842a4),this['_setDistance'](_0x2842a4,'isRemoved');}_0x2842a4=_0x2842a4['filter'](_0x12f587=>!(_0x12f587['isAdded']&&_0x12f587['isRemoved']));const _0x4430b3=new Map(_0x52d389['model'][_0x5ab0ac]['deletions']['markers']),_0x2d5b25=new Set(_0x69873c['keys']());for(const _0xa81515 of _0x4430b3['keys']())_0x2d5b25['delete'](_0xa81515);const _0x36f7b6=Object['assign']({},..._0xd4317f['map'](_0x5a5cc3=>_0x5a5cc3['diffData'][_0x5ab0ac]?.['aiSources']));this['_markSuggestions'](_0x2842a4,_0x2d5b25,_0x36f7b6),this['_fixObsoleteTags'](_0x2842a4),_0x2842a4=this['_removeMissingPairs'](_0x2842a4),_0x2842a4=this['_markMismatchedRemovedTags'](_0x2842a4),_0x2842a4=this['_removeUnsupportedChanges'](_0x2842a4);const {root:_0x285852,changes:_0x1e6dd9}=this['_makeModelFromTape'](_0x2842a4,_0x1f6077,_0x5ab0ac,_0xc59eea);_0x2e9b3a['model'][_0x5ab0ac]=_0x285852;const _0x55f89c=_0x34955a['get'](_0x5ab0ac);if(_0x55f89c){const _0x1037c8=_0x1f6077['get'](_0x55f89c['userId']),_0x329ed8=new Tt({'author':_0x1037c8,'type':_0x55f89c['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5ab0ac});_0x1e6dd9['unshift'](_0x329ed8),_0x2e9b3a['attributes'][_0x5ab0ac]['revisionHistoryAttachChange']=_0x329ed8['id'];}_0x2e9b3a['changes']=_0x2e9b3a['changes']['concat'](_0x1e6dd9);}return _0x2e9b3a;}['_markMarkers'](_0x513b52,_0x3845de){for(let _0x1fe9e2=0x0;_0x1fe9e2<_0x513b52['length'];_0x1fe9e2++)for(const [_0xc7a186,_0x29e84c]of _0x3845de)!_0x29e84c['isCollapsed']&&_0x29e84c['start']['isEqual'](_0x513b52[_0x1fe9e2]['previousPosition'])&&_0x513b52[_0x1fe9e2]['markersStart']['push'](_0xc7a186),_0x29e84c['end']['isEqual'](_0x513b52[_0x1fe9e2]['nextPosition'])&&_0x513b52[_0x1fe9e2]['markersEnd']['push'](_0xc7a186);}['_joinTapes'](_0x1c6675,_0x1dd1e9){let _0x3cb515=[],_0x13a345=0x0,_0x50dd2c=0x0;for(;_0x13a345<_0x1c6675['length']||_0x50dd2c<_0x1dd1e9['length'];){const _0x27435b=_0x1c6675[_0x13a345]||{},_0x24ca64=_0x1dd1e9[_0x50dd2c]||{};if(_0x27435b['id']==_0x24ca64['id'])_0x13a345++,_0x50dd2c++,_0x3cb515['push'](_0x27435b);else{if(_0x24ca64['isRemoved']&&_0x27435b['isAdded']){const {commonTape:_0x18de8b,iEnd:_0x13466b,jEnd:_0x595b7c}=this['_threeWayMerge'](_0x1c6675,_0x13a345,_0x1dd1e9,_0x50dd2c);_0x3cb515=_0x3cb515['concat'](_0x18de8b),_0x13a345=_0x13466b,_0x50dd2c=_0x595b7c;}else _0x24ca64['isRemoved']?(_0x50dd2c++,_0x3cb515['push'](_0x24ca64)):(_0x13a345++,_0x3cb515['push'](_0x27435b));}}return _0x3cb515;}_markSuggestions(_0x3c3843,_0x164fd9,_0x27aa32){const _0x92991a=[];for(let _0x2d4d4e=0x0;_0x2d4d4e<_0x3c3843['length'];_0x2d4d4e++){for(let _0x3fbc26=0x0;_0x3fbc26<_0x3c3843[_0x2d4d4e]['markersStart']['length'];_0x3fbc26++){const _0x23049c=_0x3c3843[_0x2d4d4e]['markersStart'][_0x3fbc26];if(!_0x164fd9['has'](_0x23049c))continue;const {group:_0x3a6952,type:_0x3ad931,authorId:_0x2da39b}=_0x1fba43(_0x23049c);if('revision-suggestion'!=_0x3a6952||'insertion'!=_0x3ad931&&'deletion'!=_0x3ad931)continue;const _0x1854e3=_0x27aa32['suggestion:'+_0x23049c['slice'](0x14)]||null;_0x92991a['unshift']({'type':_0x3ad931,'name':_0x23049c,'userId':_0x2da39b,'aiSource':_0x1854e3}),_0x3c3843[_0x2d4d4e]['markersStart']['splice'](_0x3fbc26,0x1),_0x3fbc26--;}_0x2b9103(_0x3c3843[_0x2d4d4e]);for(let _0x3a4b0f=0x0;_0x3a4b0f<_0x3c3843[_0x2d4d4e]['markersEnd']['length'];_0x3a4b0f++){const _0x49218f=_0x3c3843[_0x2d4d4e]['markersEnd'][_0x3a4b0f];if(!_0x164fd9['has'](_0x49218f))continue;const {group:_0x5da7e7,type:_0xbc1db8}=_0x1fba43(_0x49218f);if('revision-suggestion'!=_0x5da7e7||'insertion'!=_0xbc1db8&&'deletion'!=_0xbc1db8)continue;_0x3c3843[_0x2d4d4e]['markersEnd']['splice'](_0x3a4b0f,0x1),_0x3a4b0f--;const _0x405bce=_0x92991a['findIndex'](_0x2e38d3=>_0x2e38d3['name']==_0x49218f);_0x405bce>-0x1&&_0x92991a['splice'](_0x405bce,0x1);}}function _0x1fba43(_0x1483e6){const _0x3dd497=_0x1483e6['split'](':');return{'group':_0x3dd497[0x0],'type':_0x3dd497[0x1],'subType':_0x3dd497['length']>=0x5?_0x3dd497[0x2]:null,'id':_0x3dd497['length']<0x5?_0x3dd497[0x2]:_0x3dd497[0x3],'authorId':_0x3dd497['length']<0x5?_0x3dd497[0x3]:_0x3dd497[0x4],'markerCount':0x6==_0x3dd497['length']?_0x3dd497[0x5]:null};}function _0x2b9103(_0x52ba2e){for(let _0x1f2a2a=0x0;_0x1f2a2a<_0x92991a['length'];_0x1f2a2a++){if(_0x52ba2e['isAdded']&&'insertion'==_0x92991a[_0x1f2a2a]['type']&&_0x52ba2e['isAdded']['userId']==_0x92991a[_0x1f2a2a]['userId'])return _0x52ba2e['isAddSuggestion']={..._0x92991a[_0x1f2a2a],'aiSource':_0x52ba2e['isAdded']['aiSource']||_0x92991a[_0x1f2a2a]['aiSource']},void delete _0x52ba2e['isAdded'];if(!_0x52ba2e['isAdded']&&!_0x52ba2e['isRemoved']&&'deletion'==_0x92991a[_0x1f2a2a]['type'])return void(_0x52ba2e['isRemoveSuggestion']=_0x92991a[_0x1f2a2a]);}}}_setDistance(_0x34dac,_0x2d815e){let _0x19af70=0x0,_0x3a7527=!0x1;const _0x23c650=new Map();for(const _0x17d45c of _0x34dac)_0x17d45c[_0x2d815e]?_0x3a7527&&(_0x19af70++,_0x3a7527=!0x1):(_0x19af70++,_0x3a7527=!0x0),_0x23c650['set'](_0x17d45c['id'],_0x19af70);for(let _0x4c18d0=0x0;_0x4c18d0<_0x34dac['length'];_0x4c18d0++){if('isRemoved'==_0x2d815e&&_0x34dac[_0x4c18d0]['isAdded']||'isAdded'==_0x2d815e&&_0x34dac[_0x4c18d0]['isRemoved'])continue;if('text'==_0x34dac[_0x4c18d0]['type']){_0x34dac[_0x4c18d0]['distance']=0x0;continue;}const _0x331942=_0x23c650['get'](_0x34dac[_0x4c18d0]['pairId']),_0x1c8a06=_0x23c650['get'](_0x34dac[_0x4c18d0]['id']);_0x34dac[_0x4c18d0]['distance']=_0x331942-_0x1c8a06;}}_getRevisionsRange(_0x1a3ac3,_0xcc186d,_0xf40ce0=!0x1){const _0x56413c=[];let _0x1ce4e2=this['repository']['getIndex'](_0x1a3ac3),_0x165a10=this['repository']['getIndex'](_0xcc186d);for(-0x1==_0x165a10&&(_0x165a10=this['repository']['_revisions']['length'],_0xf40ce0=!0x1);_0x1ce4e2<_0x165a10;)_0x56413c['push'](this['repository']['getRevision'](_0x1ce4e2)),_0x1ce4e2++;return _0xf40ce0&&_0x56413c['push'](this['repository']['getRevision'](_0x1ce4e2)),_0x56413c;}_threeWayMerge(_0x50ee39,_0x252791,_0x3a24b5,_0x3c0d00){const _0x21b6ca=this['editor']['model']['schema'];let _0x130534=_0x252791;for(;_0x50ee39[_0x130534]&&_0x50ee39[_0x130534]['isAdded'];)_0x130534++;let _0x48480c=_0x3c0d00;for(;_0x3a24b5[_0x48480c]&&_0x3a24b5[_0x48480c]['isRemoved'];)_0x48480c++;_0x21e6c9(_0x50ee39,_0x252791,_0x130534),_0x21e6c9(_0x3a24b5,_0x3c0d00,_0x48480c);const _0xa561c6=_0x3a24b5['slice'](_0x3c0d00,_0x48480c)['concat'](_0x50ee39['slice'](_0x252791,_0x130534));return _0xa561c6['sort']((_0x285c59,_0x3c9bcd)=>_0x285c59['side']!=_0x3c9bcd['side']?_0x285c59['side']-_0x3c9bcd['side']:_0x285c59['level']!=_0x3c9bcd['level']?_0x285c59['level']-_0x3c9bcd['level']:_0x285c59['distance']!=_0x3c9bcd['distance']?_0x3c9bcd['distance']-_0x285c59['distance']:!!_0x285c59['isAdded']!=!!_0x3c9bcd['isAdded']?-0x1==_0x285c59['side']||0x0==_0x285c59['side']?_0x285c59['isAdded']?-0x1:0x1:_0x285c59['isAdded']?0x1:-0x1:_0x285c59['index']-_0x3c9bcd['index']),{'commonTape':_0xa561c6,'iEnd':_0x130534,'jEnd':_0x48480c};function _0x21e6c9(_0x50e603,_0x37a548,_0x15973a){let _0x2273e0=-0x1,_0x4a2038=Number['POSITIVE_INFINITY'],_0xf449e2=!0x0;for(let _0x29066b=_0x37a548;_0x29066b<_0x15973a;_0x29066b++)if(_0x21b6ca['isInline'](_0x50e603[_0x29066b]['item'])||(_0xf449e2=!0x1),_0x50e603[_0x29066b]['item']['startIndex']<_0x37a548&&(_0x2273e0=_0x29066b),_0x50e603[_0x29066b]['item']['endIndex']>=_0x15973a){_0x4a2038=_0x29066b;break;}_0xf449e2&&(_0x2273e0=_0x15973a-0x1);for(let _0x66880e=_0x37a548;_0x66880e<_0x15973a;_0x66880e++)_0x50e603[_0x66880e]['side']=_0x66880e<=_0x2273e0?-0x1:_0x66880e<_0x4a2038?0x0:0x1,_0x50e603[_0x66880e]['index']=_0x66880e;let _0x3fd5a4=0x0;for(let _0xd5bb43=_0x37a548;_0xd5bb43<=_0x2273e0;_0xd5bb43++)0x0==_0x50e603[_0xd5bb43]['distance']?_0x50e603[_0xd5bb43]['level']=_0x3fd5a4:(_0x3fd5a4++,_0x50e603[_0xd5bb43]['level']=_0x3fd5a4,_0x3fd5a4++);for(let _0x19c138=_0x37a548;_0x19c138<_0x15973a;_0x19c138++)0x0==_0x50e603[_0x19c138]['side']&&(_0x50e603[_0x19c138]['level']=_0x3fd5a4);_0x3fd5a4=0x0;for(let _0x65bd3e=_0x15973a-0x1;_0x65bd3e>=_0x4a2038;_0x65bd3e--)0x0==_0x50e603[_0x65bd3e]['distance']?_0x50e603[_0x65bd3e]['level']=_0x3fd5a4:(_0x3fd5a4--,_0x50e603[_0x65bd3e]['level']=_0x3fd5a4,_0x3fd5a4--);}}_fixObsoleteTags(_0xc45037){const _0x368d37=new Map(),_0x45c2ae=this['editor']['model']['schema'];for(let _0x422155=0x1;_0x422155<_0xc45037['length'];_0x422155++){let _0x1a79a7,_0x4f07e0,_0x20b521;const _0xb62a67=_0xc45037[_0x422155],_0x50e5ea=_0xc45037[_0x422155-0x1];if('text'==_0xb62a67['type'])continue;if(_0xb62a67['type']!=_0x50e5ea['type'])continue;if(!_0x45c2ae['isBlock'](_0x50e5ea['item'])||_0x45c2ae['isLimit'](_0x50e5ea['item']))continue;if(!_0x45c2ae['isBlock'](_0xb62a67['item'])||_0x45c2ae['isLimit'](_0xb62a67['item']))continue;if((_0xc45037[_0x422155]['isAdded']||_0xc45037[_0x422155]['isAddSuggestion'])&&_0xc45037[_0x422155-0x1]['isRemoved'])_0x1a79a7=_0xc45037[_0x422155],_0x4f07e0=_0xc45037[_0x422155-0x1],_0x20b521=_0x422155-0x1;else{if(!_0xc45037[_0x422155]['isRemoved']||!_0xc45037[_0x422155-0x1]['isAdded']&&!_0xc45037[_0x422155-0x1]['isAddSuggestion'])continue;_0x1a79a7=_0xc45037[_0x422155-0x1],_0x4f07e0=_0xc45037[_0x422155],_0x20b521=_0x422155;}const _0x2684f3=_0x1a79a7['level']==_0x4f07e0['level'],_0x255474=Math['abs'](_0x1a79a7['level'])<Math['abs'](_0x4f07e0['level'])&&0x0==_0x4f07e0['distance'];(_0x2684f3||_0x255474)&&(_0x368d37['set'](_0x4f07e0['id'],_0x1a79a7['id']),_0xc45037['splice'](_0x20b521,0x1),_0x422155--,_0x1a79a7['isAdded']=!0x1);}for(let _0x49c7cc=0x0;_0x49c7cc<_0xc45037['length'];_0x49c7cc++)_0x368d37['has'](_0xc45037[_0x49c7cc]['pairId'])&&(_0xc45037[_0x49c7cc]['pairId']=_0x368d37['get'](_0xc45037[_0x49c7cc]['pairId']));}['_removeMissingPairs'](_0x483c62){const _0x103b5a=new Set(_0x483c62['map'](_0x4cdea6=>_0x4cdea6['id']));for(let _0x4f42a2=0x0;_0x4f42a2<_0x483c62['length'];_0x4f42a2++)_0x103b5a['has'](_0x483c62[_0x4f42a2]['pairId'])||0x0==_0x483c62[_0x4f42a2]['distance']||(_0x483c62[_0x4f42a2]['isIncorrect']=!0x0);return _0x483c62['filter'](_0x1466d6=>!_0x1466d6['isIncorrect']);}_markMismatchedRemovedTags(_0x185fb8){const _0x5e6e2e=new Set();for(let _0x31ef8d=0x0;_0x31ef8d<_0x185fb8['length'];_0x31ef8d++){if(_0x5e6e2e['has'](_0x185fb8[_0x31ef8d]['id'])&&_0x185fb8[_0x31ef8d]['isRemoved']&&(_0x185fb8[_0x31ef8d]['isIncorrect']=!0x0),_0x185fb8[_0x31ef8d]['isIncorrect'])continue;if(0x0==_0x185fb8[_0x31ef8d]['distance'])continue;if('elementStart'!=_0x185fb8[_0x31ef8d]['type'])continue;if(null==_0x185fb8[_0x31ef8d]['pairId'])continue;let _0x185ae1=_0x31ef8d+0x1,_0xa83036=0x0;for(;_0x185fb8[_0x185ae1]['id']!=_0x185fb8[_0x31ef8d]['pairId'];)'elementStart'==_0x185fb8[_0x185ae1]['type']?_0xa83036++:'elementEnd'==_0x185fb8[_0x185ae1]['type']&&_0xa83036--,_0x185ae1++;if(0x0!=_0xa83036){if(_0x185fb8[_0x31ef8d]['isRemoved'])_0x185fb8[_0x31ef8d]['isIncorrect']=!0x0;else{for(;_0x185ae1!=_0x31ef8d;)_0x185fb8[_0x185ae1]['isRemoved']&&0x0!=_0x185fb8[_0x185ae1]['distance']&&(_0x185fb8[_0x185ae1]['isIncorrect']=!0x0,_0x5e6e2e['add'](_0x185fb8[_0x185ae1]['pairId'])),_0x185ae1--;}}}return _0x185fb8['filter'](_0xe03c3d=>!_0xe03c3d['isIncorrect']);}_removeUnsupportedChanges(_0x166c33){const _0x339ef2=this['editor']['model']['schema'];for(let _0x182b19=0x0;_0x182b19<_0x166c33['length'];_0x182b19++){if(!(_0x166c33[_0x182b19]['isAdded']||_0x166c33[_0x182b19]['isAddSuggestion']||_0x166c33[_0x182b19]['isRemoved']||_0x166c33[_0x182b19]['isRemoveSuggestion']))continue;if(0x0==_0x166c33[_0x182b19]['distance'])continue;const _0x18b945=_0x166c33[_0x182b19]['item'];_0x339ef2['isBlock'](_0x18b945)||_0x339ef2['isLimit'](_0x18b945)||(_0x166c33[_0x182b19]['isAdded']&&delete _0x166c33[_0x182b19]['isAdded'],_0x166c33[_0x182b19]['isAddSuggestion']&&delete _0x166c33[_0x182b19]['isAddSuggestion'],_0x166c33[_0x182b19]['isRemoveSuggestion']&&delete _0x166c33[_0x182b19]['isRemoveSuggestion'],_0x166c33[_0x182b19]['isRemoved']&&(_0x166c33[_0x182b19]['isIncorrect']=!0x0));}return _0x166c33['filter'](_0x564507=>!_0x564507['isIncorrect']);}['_makeModelFromTape'](_0x30c627,_0x41cfc4,_0x732fca,_0x4295bd){const _0x4735ac=new _0x5682a2(),_0x1e5086=[],_0x32d475=new Map(),_0x183f34=this['editor']['model'],_0x216c1f=_0x183f34['schema'],_0x188682=[_0x4735ac],_0x353a4d={},_0x195f7d={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x4735ac['name']=_0x4295bd;let _0x1bfd93=null;const _0x230be2=[0x0];for(let _0x4b50c7=0x0;_0x4b50c7<_0x30c627['length'];_0x4b50c7++)if('elementStart'===_0x30c627[_0x4b50c7]['type']){_0x30c627[_0x4b50c7]['previousPosition']=_0x183f34['createPositionFromPath'](_0x4735ac,_0x230be2);const _0x19fa2e=new _0x58f701(_0x30c627[_0x4b50c7]['item']['name'],_0x30c627[_0x4b50c7]['item']['getAttributes']());_0x188682[0x0]['_appendChild'](_0x19fa2e),_0x230be2['push'](0x0),_0x188682['unshift'](_0x19fa2e),_0x30c627[_0x4b50c7]['nextPosition']=_0x183f34['createPositionFromPath'](_0x4735ac,_0x230be2);}else'elementEnd'===_0x30c627[_0x4b50c7]['type']?(_0x188682['shift'](),_0x30c627[_0x4b50c7]['previousPosition']=_0x183f34['createPositionFromPath'](_0x4735ac,_0x230be2),_0x230be2['pop'](),_0x230be2[_0x230be2['length']-0x1]++,_0x30c627[_0x4b50c7]['nextPosition']=_0x183f34['createPositionFromPath'](_0x4735ac,_0x230be2)):(_0x30c627[_0x4b50c7]['previousPosition']=_0x183f34['createPositionFromPath'](_0x4735ac,_0x230be2),_0x1bfd93?_0x1bfd93['_data']+=_0x30c627[_0x4b50c7]['item']['data']:_0x1bfd93=new _0x30c48f(_0x30c627[_0x4b50c7]['item']['data'],_0x30c627[_0x4b50c7]['item']['getAttributes']()),_0x30c627[_0x4b50c7+0x1]&&'text'===_0x30c627[_0x4b50c7+0x1]['type']&&_0xee6e47(_0x1bfd93,_0x30c627[_0x4b50c7+0x1]['item'])||(_0x188682[0x0]['_appendChild'](_0x1bfd93),_0x1bfd93=null),_0x230be2[_0x230be2['length']-0x1]+=_0x30c627[_0x4b50c7]['item']['offsetSize'],_0x30c627[_0x4b50c7]['nextPosition']=_0x183f34['createPositionFromPath'](_0x4735ac,_0x230be2));for(let _0x31b2af=0x0;_0x31b2af<_0x30c627['length'];_0x31b2af++){const _0x5a25d9=_0x30c627[_0x31b2af]['previousPosition'],_0x318163=_0x30c627[_0x31b2af]['nextPosition'];for(const _0x54080d of _0x30c627[_0x31b2af]['markersStart'])_0x32d475['set'](_0x54080d,{'start':_0x5a25d9,'end':null});_0x5a5ba0('isRemoveSuggestion',_0x31b2af,_0x5a25d9,_0x318163),_0x5a5ba0('isAddSuggestion',_0x31b2af,_0x5a25d9,_0x318163),_0x5a5ba0('isRemoved',_0x31b2af,_0x5a25d9,_0x318163),_0x5a5ba0('isAdded',_0x31b2af,_0x5a25d9,_0x318163);for(const _0x49fc3d of _0x30c627[_0x31b2af]['markersEnd']){const _0x3ffcbe=_0x32d475['get'](_0x49fc3d);_0x3ffcbe?_0x3ffcbe['end']=_0x318163:_0x32d475['set'](_0x49fc3d,{'start':_0x318163,'end':_0x318163});}}for(const [_0x51bc71,_0x4f830d]of _0x32d475){const _0x4e6522=this['editor']['model']['createRange'](_0x4f830d['start'],_0x4f830d['end']);_0x4735ac['markers']['set'](_0x51bc71,_0x4e6522);}return _0x1e5086['sort']((_0x366ea2,_0x5bd87a)=>{const _0x25f5d0=_0x4735ac['markers']['get']('revision:'+_0x366ea2['id']),_0x2faaba=_0x4735ac['markers']['get']('revision:'+_0x5bd87a['id']);return _0x25f5d0['start']['isBefore'](_0x2faaba['start'])?-0x1:_0x25f5d0['start']['isAfter'](_0x2faaba['start'])?0x1:_0x25f5d0['end']['isBefore'](_0x2faaba['end'])?-0x1:_0x25f5d0['end']['isAfter'](_0x2faaba['end'])?0x1:'add'===_0x366ea2['type']?-0x1:0x1;}),{'root':_0x4735ac,'changes':_0x1e5086};function _0x5a5ba0(_0xc9e352,_0x49d6b1,_0x55f1a5,_0x130d9c){const _0x5ec83e=!!_0x30c627[_0x49d6b1][_0xc9e352],_0x291552=_0x5ec83e?_0x30c627[_0x49d6b1][_0xc9e352]['userId']:null,_0xf0c1ff=_0x5ec83e&&_0x30c627[_0x49d6b1][_0xc9e352]['aiSource']||null,_0xc86b=_0x49d6b1===_0x30c627['length']-0x1,_0x240b14=_0x195f7d[_0xc9e352][0x0],_0x1b2228=_0x216c1f['isObject'](_0x30c627[_0x49d6b1]['item']);!_0x353a4d[_0xc9e352]&&_0x5ec83e?_0x353a4d[_0xc9e352]={'start':_0x55f1a5,'tapeItem':_0x30c627[_0x49d6b1],'userId':_0x291552,'aiSource':_0xf0c1ff,'type':_0xc9e352}:_0x353a4d[_0xc9e352]&&!_0x5ec83e?(_0x353a4d[_0xc9e352]['end']=_0x55f1a5,_0x3d93ec(_0x353a4d[_0xc9e352]),_0x353a4d[_0xc9e352]=null):_0x353a4d[_0xc9e352]&&_0x5ec83e&&(_0x353a4d[_0xc9e352]['userId']!==_0x291552||_0x353a4d[_0xc9e352]['aiSource']!==_0xf0c1ff)&&(_0x353a4d[_0xc9e352]['end']=_0x55f1a5,_0x240b14&&_0x240b14['userId']===_0x353a4d[_0xc9e352]['userId']?_0x240b14['change']['aiSource']=_0x240b14['change']['aiSource']||_0x353a4d[_0xc9e352]['aiSource']:_0x3d93ec(_0x353a4d[_0xc9e352]),_0x353a4d[_0xc9e352]={'start':_0x55f1a5,'tapeItem':_0x30c627[_0x49d6b1],'userId':_0x291552,'aiSource':_0xf0c1ff,'type':_0xc9e352}),_0x353a4d[_0xc9e352]&&_0x1b2228&&('elementStart'!==_0x30c627[_0x49d6b1]['type']||_0x240b14&&_0x240b14['userId']===_0x291552||_0x195f7d[_0xc9e352]['unshift']({'userId':_0x291552,'object':_0x30c627[_0x49d6b1]['item'],'change':_0x353a4d[_0xc9e352]}),'elementEnd'===_0x30c627[_0x49d6b1]['type']&&_0x240b14&&_0x240b14['object']===_0x30c627[_0x49d6b1]['item']&&(_0x195f7d[_0xc9e352]['shift'](),_0x353a4d[_0xc9e352]=_0x240b14['change'])),_0x353a4d[_0xc9e352]&&_0xc86b&&(_0x353a4d[_0xc9e352]['end']=_0x130d9c,_0x3d93ec(_0x353a4d[_0xc9e352]),_0x353a4d[_0xc9e352]=null);}function _0x3d93ec({start:_0x3bbeee,end:_0x954e42,tapeItem:_0x10462d,userId:_0x5a0fac,aiSource:_0x5b83d0,type:_0x3f83cd}){const _0x1139b8=_0x10462d['item'],_0x5db03c=_0x183f34['schema']['isBlock'](_0x1139b8)&&!_0x183f34['schema']['isLimit'](_0x1139b8),_0x128c3c=_0x3bbeee['nodeAfter']==_0x954e42['parent']&&_0x954e42['isAtStart'];if(_0x5db03c&&_0x128c3c)return;const _0x35cbec=_0x183f34['createRange'](_0x3bbeee,_0x954e42),_0x4c79c8=_0x41cfc4['get'](_0x5a0fac),_0x41bc39=new Tt({'author':_0x4c79c8,'type':'isAdded'==_0x3f83cd||'isAddSuggestion'==_0x3f83cd?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3f83cd||'isRemoveSuggestion'==_0x3f83cd,'aiSource':_0x5b83d0||null},'createdAt':new Date(),'rootName':_0x732fca});_0x1e5086['push'](_0x41bc39),_0x4735ac['markers']['set']('revision:'+_0x41bc39['id'],_0x35cbec);}function _0xee6e47(_0x1373c9,_0x47ec89){const _0xbf42a0=_0x1373c9['getAttributes'](),_0x4f70cd=_0x47ec89['getAttributes']();for(const _0x7de6bf of _0xbf42a0){if(_0x7de6bf[0x1]!==_0x47ec89['getAttribute'](_0x7de6bf[0x0]))return!0x1;_0x4f70cd['next']();}return _0x4f70cd['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x104cc9=>{const _0x37c9a3=_0x104cc9['markerName']['split'](':')[0x1],_0x21da35=this['_getChangeFromId'](_0x37c9a3);if(!_0x21da35)return null;const _0x4697d4='add'==_0x21da35['type']?'insertion':'deletion',_0x5dd620=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4697d4];return _0x21da35['data']['isSuggestion']&&_0x5dd620['push']('ck-suggestion-marker-'+_0x4697d4+'-new'),this['activeChange']==_0x21da35&&_0x5dd620['push']('ck-suggestion-marker--active'),{'classes':_0x5dd620,'attributes':{'data-change-id':_0x37c9a3}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x4aa280=>{_0x4aa280['on']('element:pre',(_0x3e622b,_0x26c2da,_0x1506ec)=>{const _0x194ee2=_0x26c2da['viewItem']['getChild'](0x0);if(!_0x194ee2||!_0x194ee2['is']('element','code'))return;if(!_0x1506ec['consumable']['consume'](_0x194ee2,{'attributes':['vid_start','vid_end']}))return;const _0x1fde26=_0x26c2da['modelRange']['start']['nodeAfter'];_0x1506ec['writer']['setAttribute']('vid_start',_0x194ee2['getAttribute']('vid_start'),_0x1fde26),_0x1506ec['writer']['setAttribute']('vid_end',_0x194ee2['getAttribute']('vid_end'),_0x1fde26);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x134547=>{_0x134547['on']('element',(_0xde45f9,_0x43c1bf,_0xfaade5)=>{if(!_0xfaade5['consumable']['consume'](_0x43c1bf['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x43c1bf['modelRange']['isCollapsed'])return;const _0x6d5764=_0x43c1bf['modelRange']['start']['nodeAfter'];_0x6d5764['hasAttribute']('vid_start')||_0x6d5764['hasAttribute']('vid')||(_0xfaade5['writer']['setAttribute']('vid_start',_0x43c1bf['viewItem']['getAttribute']('vid_start'),_0x6d5764),_0xfaade5['writer']['setAttribute']('vid_end',_0x43c1bf['viewItem']['getAttribute']('vid_end'),_0x6d5764));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x413d23=>_0x413d23['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3515ac,[,_0x46a09d])=>{['vid_start','vid_end','vid']['includes'](_0x46a09d)&&(_0x3515ac['return']=!0x0,_0x3515ac['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x437e8f=>{_0x437e8f['on']('attribute:vid',(_0xb2dedb,_0x7f24f,_0x463790)=>{if('\x20'!=_0x7f24f['item']['data']||_0x7f24f['item']['parent']['maxOffset']>0x1)return;if(!_0x463790['consumable']['consume'](_0x7f24f['item'],_0xb2dedb['name']))return;const _0x3aa841=_0x463790['writer'],_0x10377c=_0x463790['mapper']['toViewRange'](_0x7f24f['range']);_0x3aa841['wrap'](_0x10377c,_0x3aa841['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x5117ba){const _0x40e4ec=_0x5117ba['plugins']['get']('RevisionViewer');return(_0x157ba8,_0x58ed3f,_0x48af40)=>{const _0x53a389=_0x58ed3f['markerName']['split'](':')[0x1],_0xe5cf0c=_0x40e4ec['_getChangeFromId'](_0x53a389);if(!_0xe5cf0c)return null;const _0x4acd65='add'==_0xe5cf0c['type']?'split':'merge';if(!_0x48af40['consumable']['test'](_0x58ed3f['markerRange'],_0x157ba8['name']))return;const _0x33c6ba=_0x58ed3f['markerRange']['getWalker'](),_0x301bb8=_0x58ed3f['markerRange']['start'],_0x233907=_0x5117ba['model']['schema'];let _0x4895ca=null,_0x10d8c5=null,_0x115325=!0x1,_0x59e72f=!0x1;for(const _0x3a9fb9 of _0x33c6ba){const _0x5e4c16=_0x3a9fb9['item'];_0x115325=_0x115325||_0x233907['isContent'](_0x5e4c16);const _0x201e49=_0x48af40['mapper']['toViewElement'](_0x5e4c16);if(_0x201e49&&_0x201e49['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3a9fb9['type']&&(_0x233907['isBlock'](_0x5e4c16)&&!_0x233907['isLimit'](_0x5e4c16)&&(_0x5e4c16['nextSibling']||_0x301bb8['isAtEnd']?_0x4895ca&&_0x4895ca['parent']==_0x5e4c16||(_0x4895ca=_0x5e4c16,_0xa16718(_0x3a9fb9['previousPosition']),_0x59e72f=!0x0):_0x10d8c5=_0x10d8c5||_0x3a9fb9['previousPosition']));}function _0xa16718(_0x4ee2da){const _0x310762=_0x48af40['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4acd65}),_0x136307=_0x48af40['mapper']['toViewPosition'](_0x4ee2da);_0xe5cf0c['data']['isSuggestion']&&_0x48af40['writer']['addClass']('ck-suggestion-marker-'+_0x4acd65+'-new',_0x310762),_0x40e4ec['activeChange']==_0xe5cf0c&&_0x48af40['writer']['addClass']('ck-suggestion-marker--active',_0x310762),_0x48af40['writer']['insert'](_0x136307,_0x310762),_0x48af40['mapper']['bindElementToMarker'](_0x310762,_0x58ed3f['markerName']);}_0x115325||_0x59e72f||!_0x10d8c5||_0xa16718(_0x10d8c5);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x39d52d,_0xa81e50,_0x2c9a4c)=>{const _0x5a5a11=_0x2c9a4c['mapper']['markerNameToElements'](_0xa81e50['markerName']);if(_0x5a5a11){for(const _0x580b95 of _0x5a5a11)(_0x580b95['hasClass']('ck-suggestion-marker-split')||_0x580b95['hasClass']('ck-suggestion-marker-merge'))&&(_0x2c9a4c['mapper']['unbindElementFromMarkerName'](_0x580b95,_0xa81e50['markerName']),_0x2c9a4c['writer']['remove'](_0x580b95));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x35eb5a,_0x14ab19,_0x54d636)=>{const _0x370f89=_0x14ab19['markerName']['split'](':')[0x1],_0x19f85e=this['_getChangeFromId'](_0x370f89);if(!_0x19f85e)return null;const _0x5be100='add'==_0x19f85e['type']?'split':'merge';if(_0x54d636['consumable']['test'](_0x14ab19['markerRange'],_0x35eb5a['name']))for(const _0x47ab6b of _0x14ab19['markerRange']['getItems']()){if(!_0x47ab6b['is']('element','softBreak'))continue;const _0x57f671=_0x54d636['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5be100}),_0x25a0b8=_0x54d636['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x47ab6b));_0x19f85e['data']['isSuggestion']&&_0x54d636['writer']['addClass']('ck-suggestion-marker-'+_0x5be100+'-new',_0x57f671),this['activeChange']==_0x19f85e&&_0x54d636['writer']['addClass']('ck-suggestion-marker--active',_0x57f671),_0x54d636['writer']['insert'](_0x25a0b8,_0x57f671),_0x54d636['mapper']['bindElementToMarker'](_0x57f671,_0x14ab19['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x6bf8fa=>{for(const _0x1576ce of this['editor']['model']['document']['getRootNames']()){const _0x2dac6c=this['editor']['model']['document']['getRoot'](_0x1576ce),_0x33b4ea=this['editor']['editing']['view']['document']['getRoot'](_0x1576ce);if(_0x33b4ea){const _0x53d4f4=_0x2dac6c['getAttribute']('revisionHistoryAttachChange');if(_0x6bf8fa['removeAttribute']('data-change-id',_0x33b4ea),_0x6bf8fa['removeClass']('ck-revision-history-root-add',_0x33b4ea),_0x6bf8fa['removeClass']('ck-revision-history-root-remove',_0x33b4ea),_0x6bf8fa['removeClass']('ck-revision-history-root--active',_0x33b4ea),_0x53d4f4){const _0x240746=this['_getChangeFromId'](_0x53d4f4);if(!_0x240746)return null;_0x6bf8fa['setAttribute']('data-change-id',_0x53d4f4,_0x33b4ea),_0x6bf8fa['addClass']('ck-revision-history-root-'+_0x240746['type'],_0x33b4ea),this['activeChange']==_0x240746&&_0x6bf8fa['addClass']('ck-revision-history-root--active',_0x33b4ea);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1dbe1e=>'revision-comment:'+_0x1dbe1e,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0xf6ad71=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Pt(_0xf6ad71['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x4f1e2c=>'revision-suggestion:'+_0x4f1e2c,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x779f41=>({'name':'suggestion:'+_0x779f41,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0xcbe88e=>{const _0x595b25=_0xcbe88e['markerName']['split'](':')[0x1];return'insertion'!=_0x595b25&&'deletion'!=_0x595b25?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x595b25]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ut(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ut(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x39087e,_0x19e9ff,_0x32a04d)=>{const _0x565023=_0x32a04d['mapper']['markerNameToElements'](_0x19e9ff['markerName']);if(_0x565023){for(const _0x8ee6e6 of _0x565023)_0x8ee6e6['is']('uiElement')&&(_0x32a04d['mapper']['unbindElementFromMarkerName'](_0x8ee6e6,_0x19e9ff['markerName']),_0x32a04d['writer']['remove'](_0x8ee6e6));}},{'priority':'high'});}_getChangeFromId(_0x217421){return this['_changeIdToChange']['get'](_0x217421);}_getViewForChange(_0x2bf061){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Dt(this['editor']['locale'],_0x2bf061,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x31eeda,_0x3f57c3,_0x4fe208,_0x2fbf10)=>{_0x2fbf10&&this['_balloon']['remove'](_0x2fbf10),_0x4fe208&&(this['_balloon']['add']({'view':_0x4fe208,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x427191=this['editor']['editing'],_0x59016b=this['_getChangeFromId'](_0x4fe208['changeId']);let _0x32a527;if(_0x59016b['data']['isOnRoot']){const _0x238bca=_0x427191['view']['getDomRoot'](_0x59016b['rootName']);_0x32a527=Array['from'](_0x238bca['getClientRects']());}else{const _0x35a60e=this['editor']['model']['markers']['get']('revision:'+_0x4fe208['changeId']);_0x32a527=Array['from'](_0x427191['mapper']['markerNameToElements'](_0x35a60e['name']))['map'](_0x5ca2a0=>_0x427191['view']['domConverter']['mapViewToDom'](_0x5ca2a0))['map'](_0x1e678d=>Array['from'](_0x1e678d['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x32a527['find'](_0x5ab12a=>_0x5ab12a['top']-0x3<=this['_activeViewTarget']['y']&&_0x5ab12a['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x5ab12a['left']-0x3<=this['_activeViewTarget']['x']&&_0x5ab12a['right']+0x3>=this['_activeViewTarget']['x'])||_0x32a527[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5d8057,_0x54501e,_0x2413f4,_0x433503)=>{this['activeView']=_0x2413f4?this['_getViewForChange'](_0x2413f4):null,this['editor']['model']['change'](()=>{const _0x2bf905=this['editor']['editing'];_0x433503&&(_0x433503['data']['isOnRoot']?_0x2bf905['view']['change'](_0x7e09f=>{_0x7e09f['removeClass']('ck-revision-history-root--active',_0x2bf905['view']['document']['getRoot'](_0x433503['rootName']));}):_0x2bf905['reconvertMarker']('revision:'+_0x433503['id'])),_0x2413f4&&(_0x2413f4['data']['isOnRoot']?_0x2bf905['view']['change'](_0x3a16a7=>{_0x3a16a7['addClass']('ck-revision-history-root--active',_0x2bf905['view']['document']['getRoot'](_0x2413f4['rootName']));}):_0x2bf905['reconvertMarker']('revision:'+_0x2413f4['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x32789a,_0xcbfd41)=>{if(this['activeChange'])return;const _0xf3b7a2=this['_findChangeIdFromDomTarget'](_0xcbfd41['target']),_0x6dc6a7=this['_changeIdToChange']['get'](_0xf3b7a2);_0x6dc6a7?(this['_activeViewTarget']={'x':_0xcbfd41['domEvent']['x'],'y':_0xcbfd41['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x6dc6a7)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x574334,_0x5280bb)=>{const _0x3afe7d=this['_findChangeIdFromDomTarget'](_0x5280bb['target']),_0x26ffc7=this['_changeIdToChange']['get'](_0x3afe7d);_0x26ffc7?(this['_activeViewTarget']={'x':_0x5280bb['domEvent']['x'],'y':_0x5280bb['domEvent']['y']},_0x26ffc7===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x26ffc7):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x44e635){do{const _0x4ab29d=_0x44e635['getAttribute']('data-change-id');if(_0x4ab29d)return _0x4ab29d;_0x44e635=_0x44e635['parent'];}while(_0x44e635);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0xb2cb9b=>{for(const _0x2f2099 of this['editor']['model']['markers'])_0xb2cb9b['removeMarker'](_0x2f2099);});}};function Pt(_0x256585){return _0x256585['split'](':')[0x1];}function Ut(_0x1bc5f0,_0x5907d5){return(_0x20f56e,_0x466fca,_0x3a2603)=>{if(!_0x3a2603['consumable']['test'](_0x466fca['markerRange'],_0x20f56e['name']))return;const _0x1ad8dc=_0x466fca['markerRange']['getWalker'](),_0x1ba3a7=_0x466fca['markerRange']['start'],_0x2d6955=_0x1bc5f0['model']['schema'];let _0x411813=null,_0x380d38=null,_0xd92f5a=!0x1,_0x3b79d3=!0x1;for(const _0x26d352 of _0x1ad8dc){const _0x228392=_0x26d352['item'];_0xd92f5a=_0xd92f5a||_0x2d6955['isContent'](_0x228392);const _0x43f341=_0x3a2603['mapper']['toViewElement'](_0x228392);if(_0x43f341&&_0x43f341['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x26d352['type']&&(_0x2d6955['isBlock'](_0x228392)&&!_0x2d6955['isLimit'](_0x228392)&&(_0x228392['nextSibling']||_0x1ba3a7['isAtEnd']?_0x411813&&_0x411813['parent']==_0x228392||(_0x411813=_0x228392,_0x4bc986(_0x26d352['previousPosition']),_0x3b79d3=!0x0):_0x380d38=_0x380d38||_0x26d352['previousPosition']));}function _0x4bc986(_0xe8842a){const _0x5c8729=_0x3a2603['mapper']['toViewPosition'](_0xe8842a),_0x542c06=_0x3a2603['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5907d5});_0x3a2603['writer']['insert'](_0x5c8729,_0x542c06),_0x3a2603['mapper']['bindElementToMarker'](_0x542c06,_0x466fca['markerName']);}_0xd92f5a||_0x3b79d3||!_0x380d38||_0x4bc986(_0x380d38);};}var Lt=class extends _0x56bd1{constructor(_0x47688c){super(_0x47688c);const _0x51de3e=_0x47688c['plugins']['get'](Ht);this['affectsData']=!0x1,this['listenTo'](_0x51de3e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x51de3e,'change:isEnabled',()=>this['refresh']());}execute(){const _0x391228=this['editor'],_0x4bc174=_0x391228['plugins']['get'](Ht),_0x1cc156=_0x4bc174['isReady']?_0x4bc174['diff']['newRevisionId']:null;_0x391228['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1cc156);}['refresh'](){const {isReady:_0xc71564,isEnabled:_0x47a983,repository:_0x181b9b,diff:_0x38977e}=this['editor']['plugins']['get'](Ht),_0x7ddb8c=_0x38977e&&_0x181b9b['getLaterVisibleRevision'](_0x38977e['newRevisionId']);this['isEnabled']=_0xc71564&&_0x47a983&&Boolean(_0x7ddb8c);}},Ft=class extends _0x56bd1{_step;constructor(_0xea64d,{direction:_0x10e1f7}){super(_0xea64d);const _0x2d5340=_0xea64d['plugins']['get'](Ht);this['affectsData']=!0x1,this['_step']='forward'===_0x10e1f7?0x1:-0x1,this['listenTo'](_0x2d5340,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2d5340,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2d5340,'change:activeChange',()=>this['refresh']());}execute(){const _0x5e722a=this['editor'],_0x501e99=_0x5e722a['plugins']['get'](Ht),{isNavigationMode:_0x3a58b7,currentChangeNumber:_0x1f4fdf}=_0x501e99;let _0xe31747;if(_0x501e99['activeChange']=_0x3a58b7?_0x501e99['diff']['changes']['get'](_0x1f4fdf+this['_step']):_0x501e99['diff']['changes']['first'],_0x501e99['activeChange']['data']['isOnRoot'])_0xe31747=_0x5e722a['editing']['view']['getDomRoot'](_0x501e99['activeChange']['rootName']);else{const _0x4ef132=_0x5e722a['model']['markers']['get']('revision:'+_0x501e99['activeChange']['id']);_0xe31747=_0x2311ec(_0x5e722a['editing'],_0x4ef132);}_0x54785f({'target':_0xe31747,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x3a8c26,currentChangeNumber:_0x2a4519,numberOfChanges:_0x2938d9,isReady:_0x469073,isEnabled:_0x4e737f}=this['editor']['plugins']['get'](Ht);this['isEnabled']=!!(_0x4e737f&&_0x469073&&_0x2938d9)&&(!_0x3a8c26||(0x1===this['_step']?_0x2a4519<_0x2938d9-0x1:_0x2a4519>0x0));}},$t=class extends ut{constructor(_0x44971d){super(_0x44971d);const _0x2e6ff2=this['bindTemplate'],_0x1f0b81=new _0x1833f8(_0x44971d),_0x4f745d=new _0x1833f8(_0x44971d);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',(_0x60deb3,_0x240439)=>_0x60deb3&&_0x240439>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1e54f3,_0x2788e1,_0x2c9be5,_0x58c516)=>{if(!_0x1e54f3)return Rt(_0x44971d,'Loading...');if(!_0x2c9be5)return Rt(_0x44971d,'No\x20changes');const _0x571c36=Rt(_0x44971d,'NUMBER_OF_CHANGES',_0x2c9be5);return _0x58c516?Rt(_0x44971d,'X_OF_Y_CHANGES',[_0x2788e1+0x1,_0x2c9be5]):_0x571c36;}),_0x1f0b81['set']({'label':Rt(_0x44971d,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x13c841}),_0x4f745d['set']({'label':Rt(_0x44971d,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x545ec0}),_0x1f0b81['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4f745d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1f0b81['on']('execute',()=>this['fire']('execute','backward')),_0x4f745d['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',_0x2e6ff2['if']('_isStatusLabelVisible','ck-hidden',_0x12035e=>!_0x12035e)]},'children':[{'text':_0x2e6ff2['to']('isNavigationMode',_0x235c42=>_0x235c42?Rt(_0x44971d,'EDIT_X_OF_Y_REVISIONS')+':\x20':Rt(_0x44971d,'Total')+':\x20')}]},{'text':_0x2e6ff2['to']('_statusText')}]},new ht(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1f0b81,_0x4f745d]}]});}};const Bt='ck-editor__editable__loading-overlay';var jt=class extends _0x2b01bc{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2f559b=this['editor']['editing']['view'];_0x2f559b['change'](_0x2c0d38=>{for(const _0x329ee8 of _0x2f559b['document']['roots'])_0x2c0d38['addClass'](Bt,_0x329ee8);});}['hide'](){const _0x5dbdd3=this['editor']['editing']['view'];_0x5dbdd3['change'](_0x24824d=>{for(const _0x3c28c4 of _0x5dbdd3['document']['roots'])_0x24824d['removeClass'](Bt,_0x3c28c4);});}},Gt=class extends _0x2b01bc{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht,jt];}init(){const _0x31c03b=this['editor'],_0x48d103=_0x31c03b['plugins']['get'](Ht),_0x33ec55=_0x31c03b['plugins']['get'](jt);_0x31c03b['ui']['componentFactory']['add']('exitToEditing',_0x1be1a9=>{const _0xde18e5=new _0x1833f8(_0x1be1a9);return _0xde18e5['set']({'label':Rt(_0x1be1a9,'Back\x20to\x20editing'),'icon':_0x33992e,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xde18e5,'execute',()=>{_0x31c03b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xde18e5;}),_0x31c03b['ui']['componentFactory']['add']('restoreRevision',_0x5bade=>{const _0x1f5b96=new _0x1833f8(_0x5bade);return _0x1f5b96['set']({'label':Rt(_0x5bade,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1f5b96['bind']('isEnabled')['to'](_0x31c03b['commands']['get']('restoreRevision')),this['listenTo'](_0x1f5b96,'execute',()=>_0x31c03b['execute']('restoreRevision')),_0x1f5b96;}),_0x31c03b['ui']['componentFactory']['add']('changesNavigation',_0x31b29b=>{const _0x401b99=new $t(_0x31b29b),_0x349c61=_0x31c03b['commands']['get']('showPreviousChange'),_0x3a9292=_0x31c03b['commands']['get']('showNextChange');return _0x401b99['bind']('isBackwardNavigationEnabled')['to'](_0x349c61,'isEnabled'),_0x401b99['bind']('isForwardNavigationEnabled')['to'](_0x3a9292,'isEnabled'),_0x401b99['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x48d103),this['listenTo'](_0x401b99,'execute',(_0x24b930,_0x1a0179)=>{_0x31c03b['execute']('forward'===_0x1a0179?'showNextChange':'showPreviousChange');}),_0x401b99;}),_0x33ec55['show'](),_0x48d103['on']('change:isReady',(_0x399b36,_0x59c2b,_0x494018)=>{_0x494018?_0x33ec55['hide']():_0x33ec55['show']();});}},Kt=class extends tt{['_resizeObserver']=null;constructor(_0x38cbc2,_0x30875f){super(_0x38cbc2,_0x30875f);const _0x33c29c=this['bindTemplate'];this['set']({'label':Rt(_0x38cbc2,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=Rt(_0x38cbc2,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x33c29c['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x380566(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0xcd5b2=this['fieldView']['element'];this['_tooltipString']=_0xcd5b2['scrollWidth']>_0xcd5b2['clientWidth']&&_0xcd5b2['value']||'';}},qt=class extends ut{constructor(_0x1f4c79,_0x144811,_0x35a402){super(_0x1f4c79);const _0xedb160=new _0x4c7cd9();_0xedb160['set']({'content':_0x177130,'viewBox':'0\x200\x2011\x2010'});const _0x21da43=['ck','ck-revision-history-sidebar__revision-author'];_0x35a402&&_0x21da43['push']('ck-revision-history-sidebar__revision-author_creator');const _0x53c38a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':Rt(_0x1f4c79,_0x35a402?'Revision\x20creator':'Revision\x20author')},'children':[_0xedb160,_0x144811['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x21da43},'children':_0x53c38a});}};function Yt(_0x2b1835,_0x1021ae){const _0x2eb607=_0x2b1835['bindTemplate'],_0xe32170=_0x2b1835['locale'],_0x9a2f60=ft(_0xe32170);_0x9a2f60['panelPosition']='sw';const _0x65a802=function(_0x5b05e5,_0x529363){const _0x5ddd6e=function(_0x580d7b,_0x105d2){const _0xd36b57=_0x580d7b['locale'],_0x2cb0bf={'Compare\x20against\x20selected':Rt(_0xd36b57,'Compare\x20against\x20selected'),'Name\x20this\x20revision':Rt(_0xd36b57,'Name\x20this\x20revision'),'Restore\x20this\x20revision':Rt(_0xd36b57,'Restore\x20this\x20revision')};return _0x105d2['map'](_0x347e75=>{const _0x19020b=_0x2cb0bf[_0x347e75['name']];return _0x19020b&&_0x19020b!==_0x347e75['name']&&(_0x347e75['name']=_0x19020b),_0x347e75;});}(_0x5b05e5,_0x529363),_0x151a74=new _0x5e89be();for(const _0x2b3f03 of _0x5ddd6e){const _0x52dd73={'type':'button','model':new lt({'label':_0x2b3f03['name'],'class':_0x2b3f03['class'],'withText':!0x0,'role':'menuitem','_action':_0x2b3f03['action']})};_0x52dd73['model']['bind']('isEnabled')['to'](_0x5b05e5,'isActionsDropdownOpen',_0x47e856=>'function'!=typeof _0x2b3f03['isEnabled']||(!_0x47e856||_0x2b3f03['isEnabled'](_0x5b05e5))),_0x151a74['add'](_0x52dd73);}return _0x151a74;}(_0x2b1835,_0x1021ae);return _0x2b1835['bind']('isActionsDropdownOpen')['to'](_0x9a2f60,'isOpen'),_0x9a2f60['buttonView']['set']({'label':Rt(_0xe32170,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2d0e5e}),_0x9a2f60['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x2eb607['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x2eb607['to'](_0x5a7b07=>_0x5a7b07['stopPropagation']())}}),_0x9a2f60['on']('execute',_0x1454a0=>{_0x2b1835['isReady']&&'function'==typeof _0x1454a0['source']['_action']&&_0x1454a0['source']['_action'](_0x2b1835);}),dt(_0x9a2f60,_0x65a802,{'role':'menu'}),_0x9a2f60['listenTo'](_0x2b1835,'change:isActionsDropdownOpen',(_0x143e06,_0x4daeac,_0x2f944)=>{if(_0x2f944)for(const _0x5d6160 of _0x9a2f60['listView']['items']){const _0x26f0ee=_0x5d6160['children']['first'],_0x25c483=_0x1021ae['find'](_0x4779b6=>_0x4779b6['action']===_0x26f0ee['_action'])['isVisible'];_0x5d6160['isVisible']=void 0x0===_0x25c483||_0x25c483(_0x2b1835);}}),_0x9a2f60;}const Jt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x3bd8f6(ut);var Wt=class extends Jt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0x3ac2de,_0x7c8e80,_0x2683b3,_0x517d5c,_0x310ab8=!0x1){super(_0x3ac2de);const _0x12ab6e=this['bindTemplate'],_0xcca72e=function(_0x5b5590,_0x2a30cc){const _0x4838e0=Array['from'](_0x2a30cc['authors'])['filter'](_0x47e806=>_0x47e806!=_0x2a30cc['creator']);return _0x2a30cc['creator']&&_0x4838e0['unshift'](_0x2a30cc['creator']),_0x4838e0['map'](_0x15de02=>new qt(_0x5b5590,_0x15de02,_0x15de02==_0x2a30cc['creator']));}(_0x3ac2de,_0x7c8e80);this['id']=_0x7c8e80['id'],this['_revision']=_0x7c8e80,this['_requireRevisionName']=_0x517d5c,this['bind']('_isAiGenerated')['to'](_0x7c8e80,'attributes',_0x2012cf=>!(!_0x2012cf||!_0x2012cf['@ai'])),this['bind']('name','createdAt')['to'](_0x7c8e80),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1f3f75=>{return _0x520a6a=_0x3ac2de['uiLanguage'],(_0x4a832c=_0x1f3f75)['toLocaleDateString'](_0x520a6a,{'month':'long','day':'numeric'})+',\x20'+_0x4a832c['toLocaleTimeString'](_0x520a6a,{'hour':'numeric','minute':'numeric'});var _0x520a6a,_0x4a832c;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Kt(_0x3ac2de,vt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x580486=>_0x580486||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x13a1d8,_0x2db5c2)=>_0x13a1d8&&_0x2db5c2),this['revisionActionsView']=_0x2683b3&&_0x2683b3['length']?Yt(this,_0x2683b3):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x310ab8?this['_createAiPillView'](_0x3ac2de):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x12ab6e['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x12ab6e['if']('isEnabled','ck-disabled',_0x27f06f=>!_0x27f06f),_0x12ab6e['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x12ab6e['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x12ab6e['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':_0x12ab6e['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':_0xcca72e}]},..._0x310ab8?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x12ab6e['if']('_isAiGenerated','ck-hidden',_0x365707=>!_0x365707)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x12ab6e['to'](_0x57045d=>{_0x57045d['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x2ec3ca){const _0x4d18bf=new _0x4299c8(_0x2ec3ca);return _0x4d18bf['set']({'icon':_0x531a4d,'label':Rt(_0x2ec3ca,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':Rt(_0x2ec3ca,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','class':'ck-pill_ai'}),_0x4d18bf['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x4d18bf;}['render'](){super['render']();const _0x54eb52=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x54eb52,'change',()=>{this['_requireRevisionName']&&!_0x54eb52['value']||this['fire']('setName',{'id':this['id'],'name':_0x54eb52['value']}),_0x54eb52['value']||(_0x54eb52['value']=this['name']?this['name']:this['_createdAtFormatted']);});}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function Xt(_0x425a2c,_0x3a666e){const _0x122b78=_t['fromJSDate'](_0x425a2c)['setLocale'](_0x3a666e),_0x28d54a=_t['local'](),_0x253e1d=_0x28d54a['minus']({'days':0x1})['startOf']('day');let _0x347a66,_0x77ca2b;return _0x122b78['hasSame'](_0x28d54a,'day')?(_0x347a66=_0x122b78['startOf']('day')['toJSDate'](),_0x77ca2b=_0x122b78['toRelativeCalendar']()):_0x122b78['hasSame'](_0x253e1d,'day')?(_0x347a66=_0x253e1d['toJSDate'](),_0x77ca2b=_0x122b78['toRelativeCalendar']()):_0x122b78['hasSame'](_0x28d54a,'week')?(_0x347a66=_0x122b78['startOf']('week')['toJSDate'](),_0x77ca2b=_0x122b78['weekdayLong']||''):_0x122b78['hasSame'](_0x28d54a,'year')?(_0x347a66=_0x122b78['startOf']('month')['toJSDate'](),_0x77ca2b=_0x122b78['monthLong']||''):(_0x347a66=_0x122b78['startOf']('year')['toJSDate'](),_0x77ca2b=String(_0x122b78['year'])),{'startDate':_0x347a66,'localizedPeriodName':_0x77ca2b};}var Qt=class extends ut{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0xf7d213,_0x5add4b,_0x4c5007,_0x4d8afe,_0x39b55e){super(_0xf7d213);const _0x241ecd=Xt(_0x5add4b,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5add4b,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4c5007,this['_requireRevisionName']=_0x4d8afe,this['_showAISource']=_0x39b55e,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':_0x241ecd}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x320f89){const _0x23c201=new Wt(this['locale'],_0x320f89,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x23c201);}['removeRevision'](_0x5c2ebb){const _0x18cf30=this['revisionViews']['find'](_0x54ca31=>_0x54ca31['id']===_0x5c2ebb['id']);this['revisionViews']['remove'](_0x18cf30);}},zt=class extends ut{constructor(_0x1c2bc3){super(_0x1c2bc3);const _0xdc110f=new _0x4c7cd9();_0xdc110f['content']=_0x3d4a33,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0xdc110f,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[Rt(_0x1c2bc3,'Revision\x20history')]}]});}},Zt=class extends ut{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x27e093,_0x593569,_0x400215,_0x35b187,_0x91e8b7){super(_0x27e093);const _0x24feb3=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x593569,this['_revisionActions']=_0x400215,this['_requireRevisionName']=_0x35b187,this['_showAISource']=_0x91e8b7,this['on']('select',(_0x7d2e84,_0x1012b3)=>{this['fire']('revisionSelected',_0x1012b3);}),this['on']('setName',(_0x5856f9,_0x2efe48)=>{this['fire']('revisionSetName',_0x2efe48);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new zt(_0x27e093),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x24feb3['if']('isEnabled','ck-disabled',_0x26ac6e=>!_0x26ac6e)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x5895bc of this['_revisions'])this['_addRevision'](_0x5895bc);this['_revisions']['on']('add',(_0x2fd1ff,_0x46a721)=>{this['_addRevision'](_0x46a721);}),this['_revisions']['on']('remove',(_0x38d831,_0x19b49c)=>{this['_removeRevision'](_0x19b49c);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x1fdf4b=>_0x1fdf4b['revisionViews']['map'](_0x3de647=>_0x3de647))['flat']();}selectRevision(_0x50fe21){for(const _0x39bb5a of this['revisionViews'])_0x50fe21&&_0x50fe21['id']===_0x39bb5a['id']?_0x39bb5a['select']():_0x39bb5a['deselect']();}highlightRevisions(_0x1febd4){for(const _0x5b7d74 of this['revisionViews'])_0x1febd4['some'](({id:_0x15af82})=>_0x15af82===_0x5b7d74['id'])?_0x5b7d74['highlight']():_0x5b7d74['unhighlight']();}['_addRevision'](_0x2d2706){const _0x28e708=Xt(_0x2d2706['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x2283b2=this['_getTimePeriodViewByStartDate'](_0x28e708);_0x2283b2||(_0x2283b2=new Qt(this['locale'],_0x28e708,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x2283b2)),_0x2283b2['addRevision'](_0x2d2706);}['_removeRevision'](_0x4487a6){const _0xe16e10=Xt(_0x4487a6['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xe16e10)['removeRevision'](_0x4487a6);}_getTimePeriodViewByStartDate(_0x47875a){return this['timePeriodViews']['find'](_0xa2b8bd=>_0xa2b8bd['startDate']['getTime']()===_0x47875a['getTime']());}},ti=class RevisionsSidebar extends _0x2b01bc{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ii();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht];}constructor(
|
|
30
|
-
_0x17f4b6(_0x25ac2a);var oi=class extends ni{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5ec9b2,_0x5a4e13){super(_0x5a4e13),this['sourceElement']=_0x5ec9b2,this['model']['document']['createRoot']();const _0x461160=new si(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ei(this,_0x461160);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x580f95,_0x734fe9){const _0x395e70=new this(_0x580f95,_0x734fe9);return await _0x395e70['initPlugins'](),await _0x395e70['ui']['init'](_0x580f95),await _0x395e70['data']['init'](_0x395e70['config']['get']('initialData')||''),_0x395e70['fire']('ready'),_0x395e70;}};const ri=['RevisionHistoryUI','RestrictedEditingMode'];var ai=class extends _0x4ba944{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52b452){super(_0x52b452),this['result']='end',_0x52b452['editing']['view']['_overlayModeHint']='auto',_0x52b452['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},hi=class extends _0x4ba944{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt,xt];}constructor(_0x35fd13){if(super(_0x35fd13),!this['editor']['config']['get']('revisionHistory'))throw new _0x541585('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x188648=>this['_showRevisionViewer']({..._0x188648,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x43c0ed=>this['_closeRevisionViewer'](_0x43c0ed)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x51314a=>this['_restoreRevision'](_0x51314a)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x218fe7){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x218fe7;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x1046df){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1046df);}getRevision(_0x187ebd){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x187ebd);}getRevisions(_0x497559){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x497559||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x2a65e1=this['editor'],_0x486474=_0x48a71c(_0x2a65e1,ri),_0x29e6e6=_0x2a65e1['plugins']['get']('RevisionTracker'),_0x5d21bc=_0x2a65e1['plugins']['get'](_0x42dea7)['users'];return _0x486474['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x486474['lazyRoots'],(_0x486474['plugins']['push'](ai,Ht,Gt,class RevisionViewerInit extends _0x4ba944{static get requires(){return[Ht,_0x42dea7];}init(){const _0x21efa4=this['editor']['plugins']['get'](_0x42dea7);for(const _0x56de3f of _0x5d21bc)_0x56de3f['isAnonymous']||_0x21efa4['getUser'](_0x56de3f['id'])||_0x21efa4['addUser'](_0x56de3f);const _0x5ea9b0=_0x29e6e6['repository']['getRevisions']();let _0x26c9d=null;const _0x7fca33=this['editor']['plugins']['get']('RevisionViewer');if(_0x7fca33['adapter']=_0x29e6e6['adapter'],_0x7fca33['bind']('isEnabled')['to'](_0x29e6e6),_0x2a65e1['plugins']['has']('CommentsRepository')){const _0x18c37e=_0x2a65e1['plugins']['get']('CommentsRepository');_0x7fca33['_getVisibleCommentThreadIds']=()=>new Set(_0x18c37e['getCommentThreads']()['filter'](_0x4a21ed=>!_0x4a21ed['isResolved'])['map'](_0x3481f2=>_0x3481f2['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x2a65e1,'isReadOnly',_0x5c1928=>!_0x5c1928);for(const _0x302cf6 of _0x5ea9b0){const _0x24f07=null===_0x302cf6['creator'];if(_0x24f07&&_0x302cf6['toVersion']===_0x302cf6['fromVersion'])continue;const _0x3a9ef1=_0x302cf6['toJSON']();_0x7fca33['addRevisionData'](_0x3a9ef1,(_0x3c07b4,_0x1f4736,_0x1aa22f)=>{if(_0x24f07){if(_0x26c9d)_0x26c9d['_update'](_0x3c07b4,_0x1f4736);else{if(!_0x1f4736){const _0xa3944b=_0x1aa22f['toJSON']();_0xa3944b['id']=_0x148ef2(),_0x29e6e6['saveRevision'](_0xa3944b,_0x1aa22f['toVersion'])['then'](_0x144687=>{_0x26c9d=_0x144687;});}}}else _0x302cf6['_update'](_0x3c07b4,_0x1f4736);});}}},ti),_0x486474);}['_enhanceShowRevisionViewerCallback'](){const _0xb5f6b0=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x3d16e1=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x3d16e1['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0xf68eca=this['editor']['plugins']['get']('Dialog');_0xf68eca['isOpen']&&_0xf68eca['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0xb650fa=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x28bbd0 of _0xb650fa)_0x28bbd0['class']=_0x28bbd0['class']?_0x28bbd0['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x19c966=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x19c966&&_0x19c966['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4fee4b=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4fee4b&&_0x4fee4b['setAttribute']('tabindex','-1');}}const _0x145c9a=this['_getRevisionViewerEditorConfig']();return _0xb5f6b0(_0x145c9a)['then'](_0x2578e5=>(this['_viewerEditor']=_0x2578e5,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'),_0x2578e5))['catch'](_0x3b058d=>(console['error'](_0x3b058d),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1ea44e=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 _0x26f167=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4bc34e of _0x26f167)_0x4bc34e['class']='ck-tab-panel_disabled'===_0x4bc34e['class']?'':_0x4bc34e['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x4e120c=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4e120c&&_0x4e120c['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x36d768=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x36d768&&_0x36d768['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x1ea44e(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x171f43=this['editor']['plugins']['get']('Annotations');_0x171f43['refreshVisibility'](),_0x171f43['refreshPositioning']();}});});}['_showRevisionViewer'](_0x935e1c){const _0x37ba29=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2dc2f3=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4000a8=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return oi['create'](_0x4000a8,_0x935e1c)['then'](_0x1d1985=>(_0x2dc2f3['style']['display']='block',_0x37ba29['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1d1985));}['_closeRevisionViewer'](_0xb81621){const _0x9a4c01=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x9a4c01['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xb81621['destroy']();}async _restoreRevision(_0x1ce9a1){const _0x1db6c9=this['editor'],_0x56926f=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x1ef2f1=_0x1db6c9['plugins']['get']('RevisionTracker'),_0x5d3d6a=_0x1db6c9['plugins']['get']('RevisionHistoryUtils'),_0x612bc0=_0x56926f['repository']['getRevision'](_0x1ce9a1);let _0x5ca5a9,_0x6681c8,_0x2a2758;try{await _0x5d3d6a['loadRevisionData'](_0x612bc0,this['adapter']),_0x5ca5a9=_0x5d3d6a['getRevisionDocumentData'](_0x612bc0),_0x6681c8=_0x5d3d6a['getRevisionRootsAttributes'](_0x612bc0);}catch(_0x4e04d2){return void console['error'](_0x4e04d2);}_0x1db6c9['model']['change'](_0x390dbf=>{for(const _0x3d55ff of Array['from'](_0x1db6c9['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x390dbf['removeMarker'](_0x3d55ff);}),_0x56926f['isReady']=!0x1,_0x1db6c9['model']['enqueueChange'](_0x5723a0=>{_0x5723a0['setSelection'](null),_0x5723a0['removeSelectionAttribute'](_0x1db6c9['model']['document']['selection']['getAttributeKeys']());const _0x98edd7=Object['keys'](_0x5ca5a9);for(const _0x5c9dd6 of _0x1db6c9['model']['document']['roots'])'$graveyard'!=_0x5c9dd6['rootName']&&_0x5c9dd6['isAttached']()&&!_0x98edd7['includes'](_0x5c9dd6['rootName'])&&_0x5723a0['detachRoot'](_0x5c9dd6);for(const _0x1afd61 of _0x98edd7){let _0x26064e=_0x1db6c9['model']['document']['getRoot'](_0x1afd61);if(!_0x26064e||!_0x26064e['isAttached']()){const _0x17105a=_0x612bc0['diffData']?.[_0x1afd61]?.['rootElementName']||'$root';_0x26064e=_0x5723a0['addRoot'](_0x1afd61,_0x17105a);}const _0x28fdfd=_0x6681c8[_0x1afd61],_0x20d40a=Object['keys'](_0x28fdfd),_0x1c2f1b=_0x5ca5a9[_0x1afd61];for(const _0x7e3a84 of _0x26064e['getAttributeKeys']())_0x20d40a['includes'](_0x7e3a84)||_0x5723a0['removeAttribute'](_0x7e3a84,_0x26064e);for(const _0x8cf4dd of _0x20d40a)_0x5723a0['setAttribute'](_0x8cf4dd,_0x6681c8[_0x1afd61][_0x8cf4dd],_0x26064e);_0x5723a0['remove'](_0x5723a0['createRangeIn'](_0x26064e)),_0x5723a0['insert'](_0x1db6c9['data']['parse'](_0x1c2f1b,_0x26064e),_0x26064e,0x0);}});const _0x1d8f33=Rt(_0x1db6c9['locale'],'Restored');if(_0x612bc0['name'])_0x2a2758=-0x1==_0x612bc0['name']['indexOf'](_0x1d8f33)?_0x1d8f33+':\x20'+_0x612bc0['name']:_0x612bc0['name'];else _0x2a2758=_0x1d8f33+':\x20'+(_0x612bc0['createdAt']['toLocaleDateString'](_0x1db6c9['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x612bc0['createdAt']['toLocaleTimeString'](_0x1db6c9['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x1ef2f1['saveRevision']({'name':_0x2a2758}),_0x56926f['isReady']=!0x0,_0x1db6c9['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Lt as RestoreRevisionCommand,pt as Revision,hi as RevisionHistory,xt as RevisionHistoryUI,bt as RevisionHistoryUtils,kt as RevisionTracker,Ht as RevisionViewer,oi as RevisionViewerEditor,ai as RevisionViewerIntegration,jt as RevisionViewerLoadingOverlay,Gt as RevisionViewerUI,yt as RevisionsRepository,ti as RevisionsSidebar,Ft as ShowChangeCommand};
|
|
29
|
+
ii();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht];}constructor(_0x45ef80){super(_0x45ef80),this['_revisionViewer']=_0x45ef80['plugins']['get'](Ht),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x3a51ff=this['_revisionsRepository']['_revisions'],_0x504266=this['_createRevisionActions'](),_0x43643f=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Zt(this['editor']['locale'],_0x3a51ff,_0x504266,this['editor']['config']['get']('revisionHistory.requireRevisionName'),'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),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',(_0x50929d,_0x850e3c)=>{_0x850e3c['revisionViews']['on']('add',(_0x2f91ae,_0x4870c9)=>{_0x4870c9['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)),_0x43643f['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x102de7=this['_revisionsRepository']['getRevision'](0x0);if(_0x102de7){const _0x4737ee=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x102de7['id']);this['_revisionViewer']['compare'](_0x102de7,_0x4737ee);}}_handleRevisionSelected(_0x28d6e4,_0x514144){const _0x4e3972=this['_revisionsRepository']['getRevision'](_0x514144['id']),_0x2a68bc=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4e3972['id']);this['_revisionViewer']['compare'](_0x4e3972,_0x2a68bc);}_handleRevisionSetName(_0x407904,_0x9ad07b){this['_revisionsRepository']['getRevision'](_0x9ad07b['id'])['setName'](_0x9ad07b['name']);}['_handleDiffChange'](_0x36d83c,_0x2661d8,_0x1834e2){const _0x50bfbf=this['_revisionsRepository']['getRevisionsInDiff'](_0x1834e2);_0x50bfbf['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x50bfbf),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x50bfbf[0x0]));}_createRevisionActions(){const _0xa45d02=this['editor'],_0x2683bf=RevisionsSidebar['availableRevisionActions'],_0x3fe8cb=_0xa45d02['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x3fe8cb['length'])return _0x3fe8cb['map'](_0x1b0a71=>{const _0x21c0f9='string'==typeof _0x1b0a71?Object['assign']({},_0x2683bf[_0x1b0a71]):_0x1b0a71;return _0x21c0f9['action']=_0x21c0f9['action']['bind'](this,_0xa45d02),_0x21c0f9['isVisible']&&(_0x21c0f9['isVisible']=_0x21c0f9['isVisible']['bind'](this,_0xa45d02)),_0x21c0f9;});}};function ii(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4a977c},_0x5c4d63)=>{const _0x25fcb5=_0x4a977c['get'](Ht),_0xd9dea9=_0x25fcb5['repository'];let _0x41d8d3=_0x25fcb5['diff']['newRevisionId'],_0x532023=_0x5c4d63['id'];_0xd9dea9['getIndex'](_0x41d8d3)>_0xd9dea9['getIndex'](_0x532023)&&([_0x41d8d3,_0x532023]=[_0x532023,_0x41d8d3]),_0x25fcb5['compare'](_0x41d8d3,_0x532023);},'isVisible':({plugins:_0x2783d6},_0x473185)=>{const _0x463dfe=_0x2783d6['get'](Ht);return!(_0x463dfe['repository']['getRevisionsInDiff'](_0x463dfe['diff'])['length']>0x2)&&!_0x473185['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4f623c,{id:_0x3c6be6})=>{_0x4f623c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3c6be6);},'isVisible':({plugins:_0x2bf626},_0x2eb46a)=>!!_0x2bf626['get'](Ht)['repository']['getLaterVisibleRevision'](_0x2eb46a['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x53c67e},{id:_0x15def0,revisionNameView:_0x12116e})=>{const _0xa02c78=_0x53c67e['get'](Ht),_0x51d76e=_0xa02c78['repository']['getEarlierVisibleRevision'](_0x15def0);_0xa02c78['compare'](_0x15def0,_0x51d76e),_0x12116e['focus'](),_0x12116e['fieldView']['select']();}}};}var ei=class extends _0x2e4042{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x5ed2d9,_0x5f0e02){super(_0x5ed2d9),this['_view']=_0x5f0e02,this['_toolbarConfig']=gt(_0x5ed2d9['config']['get']('toolbar')),this['_elementReplacer']=new _0x38cce9();}get element(){return this['view']['element'];}init(_0x4e5a09){const _0x42288c=this['editor'],_0x226b1c=this['view'],_0x55e6bd=_0x42288c['editing']['view'],_0x128553=_0x226b1c['editable'];_0x128553['name']=_0x55e6bd['document']['getRoot']()['rootName'],_0x226b1c['render']();const _0x83793b=_0x128553['element'];this['setEditableElement'](_0x128553['name'],_0x83793b),_0x226b1c['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x55e6bd['attachDomRoot'](_0x83793b),this['_elementReplacer']['replace'](_0x4e5a09,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x3e81bf=this['view'],_0x2c6600=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x2c6600['detachDomRoot'](_0x3e81bf['editable']['name']),_0x3e81bf['destroy']();}_initToolbar(){const _0x750649=this['view'];_0x750649['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x750649['stickyPanel']['limiterElement']=_0x750649['element'],_0x750649['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x247087})=>_0x247087),_0x750649['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x750649['toolbar']);}},si=class extends _0x29e1db{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x4b221a,_0x3aee1e,_0x392ca5={}){super(_0x4b221a),this['stickyPanel']=new at(_0x4b221a),this['toolbar']=new ct(_0x4b221a,{'shouldGroupWhenFull':_0x392ca5['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x396601(_0x4b221a,_0x3aee1e);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const ni=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3639fa(_0x3979cf);var oi=class extends ni{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x503641,_0x2aaf19){super(_0x2aaf19),this['sourceElement']=_0x503641,this['model']['document']['createRoot']();const _0x2793df=new si(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ei(this,_0x2793df);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x13410a,_0x254b0f){const _0x20a6b6=new this(_0x13410a,_0x254b0f);return await _0x20a6b6['initPlugins'](),await _0x20a6b6['ui']['init'](_0x13410a),await _0x20a6b6['data']['init'](_0x20a6b6['config']['get']('initialData')||''),_0x20a6b6['fire']('ready'),_0x20a6b6;}};const ri=['RevisionHistoryUI','RestrictedEditingMode'];var ai=class extends _0x2b01bc{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56fc82){super(_0x56fc82),this['result']='end',_0x56fc82['editing']['view']['_overlayModeHint']='auto',_0x56fc82['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},hi=class extends _0x2b01bc{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt,xt];}constructor(_0x20c195){if(super(_0x20c195),!this['editor']['config']['get']('revisionHistory'))throw new _0x5376ae('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3bc358=>this['_showRevisionViewer']({..._0x3bc358,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4b4a67=>this['_closeRevisionViewer'](_0x4b4a67)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1dacf4=>this['_restoreRevision'](_0x1dacf4)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x894ab7){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x894ab7;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x12e01d){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x12e01d);}getRevision(_0x3fcd29){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3fcd29);}getRevisions(_0x2e4df5){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2e4df5||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x4cd1c3=this['editor'],_0x456c97=_0xd04d27(_0x4cd1c3,ri),_0x172bfc=_0x4cd1c3['plugins']['get']('RevisionTracker'),_0x25a280=_0x4cd1c3['plugins']['get'](_0x2b2252)['users'];return _0x456c97['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x456c97['lazyRoots'],(_0x456c97['plugins']['push'](ai,Ht,Gt,class RevisionViewerInit extends _0x2b01bc{static get requires(){return[Ht,_0x2b2252];}init(){const _0x228cdc=this['editor']['plugins']['get'](_0x2b2252);for(const _0x478cd7 of _0x25a280)_0x478cd7['isAnonymous']||_0x228cdc['getUser'](_0x478cd7['id'])||_0x228cdc['addUser'](_0x478cd7);const _0x543d7f=_0x172bfc['repository']['getRevisions']();let _0x506f35=null;const _0x5ccb8f=this['editor']['plugins']['get']('RevisionViewer');if(_0x5ccb8f['adapter']=_0x172bfc['adapter'],_0x5ccb8f['bind']('isEnabled')['to'](_0x172bfc),_0x4cd1c3['plugins']['has']('CommentsRepository')){const _0x4b1fad=_0x4cd1c3['plugins']['get']('CommentsRepository');_0x5ccb8f['_getVisibleCommentThreadIds']=()=>new Set(_0x4b1fad['getCommentThreads']()['filter'](_0x583052=>!_0x583052['isResolved'])['map'](_0xcc6e40=>_0xcc6e40['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4cd1c3,'isReadOnly',_0x16a60b=>!_0x16a60b);for(const _0x1a46ed of _0x543d7f){const _0x16186f=null===_0x1a46ed['creator'];if(_0x16186f&&_0x1a46ed['toVersion']===_0x1a46ed['fromVersion'])continue;const _0x50bbb7=_0x1a46ed['toJSON']();_0x5ccb8f['addRevisionData'](_0x50bbb7,(_0x3ec8a9,_0x4d09b1,_0x538f09)=>{if(_0x16186f){if(_0x506f35)_0x506f35['_update'](_0x3ec8a9,_0x4d09b1);else{if(!_0x4d09b1){const _0x5ee16a=_0x538f09['toJSON']();_0x5ee16a['id']=_0x1d22d5(),_0x172bfc['saveRevision'](_0x5ee16a,_0x538f09['toVersion'])['then'](_0x3aed87=>{_0x506f35=_0x3aed87;});}}}else _0x1a46ed['_update'](_0x3ec8a9,_0x4d09b1);});}}},ti),_0x456c97);}['_enhanceShowRevisionViewerCallback'](){const _0x25bc3c=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x1843d4=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x1843d4['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1dfbf4=this['editor']['plugins']['get']('Dialog');_0x1dfbf4['isOpen']&&_0x1dfbf4['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x51d3ce=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4ebe29 of _0x51d3ce)_0x4ebe29['class']=_0x4ebe29['class']?_0x4ebe29['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x58653e=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x58653e&&_0x58653e['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x59b765=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x59b765&&_0x59b765['setAttribute']('tabindex','-1');}}const _0xddc79a=this['_getRevisionViewerEditorConfig']();return _0x25bc3c(_0xddc79a)['then'](_0x33b8d6=>(this['_viewerEditor']=_0x33b8d6,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'),_0x33b8d6))['catch'](_0x12cacf=>(console['error'](_0x12cacf),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4f10ba=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 _0x1975b9=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3aae58 of _0x1975b9)_0x3aae58['class']='ck-tab-panel_disabled'===_0x3aae58['class']?'':_0x3aae58['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x19e7d7=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x19e7d7&&_0x19e7d7['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x37dd57=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x37dd57&&_0x37dd57['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4f10ba(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x54aca4=this['editor']['plugins']['get']('Annotations');_0x54aca4['refreshVisibility'](),_0x54aca4['refreshPositioning']();}});});}['_showRevisionViewer'](_0x2a84e7){const _0x2962bd=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1f3cce=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4cf0bd=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return oi['create'](_0x4cf0bd,_0x2a84e7)['then'](_0x1ac7f2=>(_0x1f3cce['style']['display']='block',_0x2962bd['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1ac7f2));}['_closeRevisionViewer'](_0x43cddc){const _0x409b82=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x409b82['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x43cddc['destroy']();}async _restoreRevision(_0x2cc8d4){const _0x19cc5b=this['editor'],_0x15de7e=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x13d647=_0x19cc5b['plugins']['get']('RevisionTracker'),_0x5c535f=_0x19cc5b['plugins']['get']('RevisionHistoryUtils'),_0x55d33c=_0x15de7e['repository']['getRevision'](_0x2cc8d4);let _0x52802b,_0x1de396,_0x58ea51;try{await _0x5c535f['loadRevisionData'](_0x55d33c,this['adapter']),_0x52802b=_0x5c535f['getRevisionDocumentData'](_0x55d33c),_0x1de396=_0x5c535f['getRevisionRootsAttributes'](_0x55d33c);}catch(_0x36f268){return void console['error'](_0x36f268);}_0x19cc5b['model']['change'](_0x42fa2e=>{for(const _0x18187c of Array['from'](_0x19cc5b['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x42fa2e['removeMarker'](_0x18187c);}),_0x15de7e['isReady']=!0x1,_0x19cc5b['model']['enqueueChange'](_0x247377=>{_0x247377['setSelection'](null),_0x247377['removeSelectionAttribute'](_0x19cc5b['model']['document']['selection']['getAttributeKeys']());const _0x27671a=Object['keys'](_0x52802b);for(const _0x4c7954 of _0x19cc5b['model']['document']['roots'])'$graveyard'!=_0x4c7954['rootName']&&_0x4c7954['isAttached']()&&!_0x27671a['includes'](_0x4c7954['rootName'])&&_0x247377['detachRoot'](_0x4c7954);for(const _0x5ceddd of _0x27671a){let _0x45d137=_0x19cc5b['model']['document']['getRoot'](_0x5ceddd);if(!_0x45d137||!_0x45d137['isAttached']()){const _0x4b2ab7=_0x55d33c['diffData']?.[_0x5ceddd]?.['rootElementName']||'$root';_0x45d137=_0x247377['addRoot'](_0x5ceddd,_0x4b2ab7);}const _0x504d19=_0x1de396[_0x5ceddd],_0x4ff2fb=Object['keys'](_0x504d19),_0x2d7b11=_0x52802b[_0x5ceddd];for(const _0x436b9e of _0x45d137['getAttributeKeys']())_0x4ff2fb['includes'](_0x436b9e)||_0x247377['removeAttribute'](_0x436b9e,_0x45d137);for(const _0xa4826e of _0x4ff2fb)_0x247377['setAttribute'](_0xa4826e,_0x1de396[_0x5ceddd][_0xa4826e],_0x45d137);_0x247377['remove'](_0x247377['createRangeIn'](_0x45d137)),_0x247377['insert'](_0x19cc5b['data']['parse'](_0x2d7b11,_0x45d137),_0x45d137,0x0);}});const _0x1dee96=Rt(_0x19cc5b['locale'],'Restored');if(_0x55d33c['name'])_0x58ea51=-0x1==_0x55d33c['name']['indexOf'](_0x1dee96)?_0x1dee96+':\x20'+_0x55d33c['name']:_0x55d33c['name'];else _0x58ea51=_0x1dee96+':\x20'+(_0x55d33c['createdAt']['toLocaleDateString'](_0x19cc5b['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x55d33c['createdAt']['toLocaleTimeString'](_0x19cc5b['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x13d647['saveRevision']({'name':_0x58ea51}),_0x15de7e['isReady']=!0x0,_0x19cc5b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Lt as RestoreRevisionCommand,pt as Revision,hi as RevisionHistory,xt as RevisionHistoryUI,bt as RevisionHistoryUtils,kt as RevisionTracker,Ht as RevisionViewer,oi as RevisionViewerEditor,ai as RevisionViewerIntegration,jt as RevisionViewerLoadingOverlay,Gt as RevisionViewerUI,yt as RevisionsRepository,ti as RevisionsSidebar,Ft as ShowChangeCommand};
|