@ckeditor/ckeditor5-revision-history 48.4.0-alpha.0 → 48.4.0-alpha.1
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.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.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
|
-
_0x5e0967();var gt=class extends vt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x39277e){super(),this['id']=_0x39277e['id']||_0x2993e9(),this['creator']=_0x39277e['creator']||null,this['authors']=_0x39277e['authors']||[],this['diffData']=_0x39277e['diffData']||null,this['toVersion']=_0x39277e['toVersion']||0x0,this['fromVersion']=_0x39277e['fromVersion']||0x0,this['set']('name',_0x39277e['name']||''),this['set']('createdAt',_0x39277e['createdAt']||new Date()),this['set']('attributes',_0x39277e['attributes']||{});}setName(_0xf2e91d){this['_update']({'name':_0xf2e91d});}setAttribute(_0x42f085,_0x5c4574){const _0x4cd63f=_0x3f9247(this['attributes']);_0x583e37(_0x4cd63f,_0x42f085,_0x5c4574),this['_update']({'attributes':_0x4cd63f});}removeAttribute(_0x2f38cd){const _0x2c408d=_0x3f9247(this['attributes']);_0x109110(_0x2c408d,_0x2f38cd),this['_update']({'attributes':_0x2c408d});}_update(_0x344d1f,_0x1da337=!0x1){let _0x420f57=!0x1;const _0xbd08f1={'id':this['id']};for(const _0x4f3916 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x2396ce=_0x344d1f[_0x4f3916];void 0x0!==_0x2396ce&&_0x2396ce!==this[_0x4f3916]&&(this[_0x4f3916]=_0x2396ce,_0xbd08f1[_0x4f3916]=_0x2396ce,_0x420f57=!0x0);}_0x420f57&&(_0xbd08f1['authors']&&(_0xbd08f1['authorsIds']=_0xbd08f1['authors']['map'](_0x140a33=>_0x140a33['id']),delete _0xbd08f1['authors']),this['fire']('_update',_0xbd08f1,_0x1da337));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x63d62c=>_0x63d62c['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x5082f5{['_revisions'];static get requires(){return[_0x38fdbd];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x5a4581){super(_0x5a4581),this['_revisions']=new _0x544893();}afterInit(){!async function(_0x4cec02){const _0x2798bc='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x42ed9f=0xeb829,_0x4f1e44=0x79128,_0x1e3caf=window['Date']['now'](),_0x396b47=_0x4cec02['editor'],_0x276a49=new window['Promise'](_0x239d4b=>{_0x396b47['once']('ready',_0x239d4b);}),_0x310253={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x5943e7=_0x396b47['config']['get']('licenseKey');async function _0x1ab866(){let _0x32a105,_0x57e059=null,_0x7ad0a=null;try{return'GPL'==_0x5943e7?'NotAllowed':(_0x32a105=_0x2a34fc(),_0x32a105?(_0x32a105['usageEndpoint']&&(_0x7ad0a=_0x3f1bee(_0x32a105['usageEndpoint'],_0x32a105['jti'])),await _0x4de024()?_0xb060c6()?_0x36b860()?'Expired':_0x1760c5()?('evaluation'==_0x32a105['licenseType']&&(_0x57e059=_0x3af62a('EvaluationLimit')),await _0x53c49a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x36b860(){const _0x2d0040=['evaluation','trial']['includes'](_0x32a105['licenseType'])?_0x1e3caf/0x3e8:0xe10*_0x4f1e44;return _0x32a105['exp']<_0x2d0040;}function _0xb060c6(){const _0x87eac8=_0x32a105['features'];if(!_0x87eac8)return!0x1;if(_0x87eac8['includes']('*'))return!0x0;if(_0x87eac8['includes']('RH'))return!0x0;if(_0x87eac8['includes']('RRH')){if(_0x12dc8f())return!0x0;if(_0x3b31a6()||_0x47fce3())return!0x0;}return!0x1;}function _0x1760c5(){const _0x5dcf5b=_0x32a105['licensedHosts'];if(!_0x5dcf5b||0x0==_0x5dcf5b['length'])return!0x0;const {hostname:_0x8b88fc}=new URL(window['location']['href']);if(_0x5dcf5b['includes'](_0x8b88fc))return!0x0;const _0x393fe4=_0x8b88fc['split']('.');return _0x5dcf5b['filter'](_0xdde1bc=>_0xdde1bc['includes']('*'))['map'](_0x338f2d=>_0x338f2d['split']('.'))['filter'](_0x402f3b=>_0x402f3b['length']<=_0x393fe4['length'])['map'](_0x2b93b6=>Array(_0x393fe4['length']-_0x2b93b6['length'])['fill']('*'===_0x2b93b6[0x0]?'*':'')['concat'](_0x2b93b6))['some'](_0x528990=>_0x393fe4['every']((_0x2f606f,_0x38824c)=>_0x528990[_0x38824c]===_0x2f606f||'*'===_0x528990[_0x38824c]));}function _0x53c49a(){return _0x57e059&&_0x7ad0a?new window['Promise']((_0x40f3b7,_0x9df76c)=>{_0x57e059['then'](_0x40f3b7,_0x9df76c),_0x7ad0a['then'](_0x18c5dd=>{'Valid'!=_0x18c5dd&&_0x40f3b7(_0x18c5dd);},_0x9df76c);}):_0x57e059||_0x7ad0a||'Valid';}}function _0x3f1bee(_0x25a3b0,_0x196bcc){return new window['Promise'](_0x130cd1=>{if(_0x3bfec6())return _0x130cd1('Valid');_0x141d06(),_0x396b47['decorate']('_sendUsageRequest');let _0x28a4c1=!0x1;const _0x3837a6=_0x2993e9();function _0x6add3c(_0x1bd5a4){return!!_0x1bd5a4&&('object'==typeof _0x1bd5a4||'function'==typeof _0x1bd5a4)&&'function'==typeof _0x1bd5a4['then']&&'function'==typeof _0x1bd5a4['catch'];}function _0x184a6c(_0x2d5c5b){_0x3e69db(_0x2d5c5b)['then'](_0x484f6b=>_0x484f6b&&'ok'==_0x484f6b['status']?_0x2d96dd(_0x301b9c(_0x3837a6+_0x196bcc))!=_0x484f6b['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x54489e=>(_0x115bd2(),_0x54489e),()=>{const _0x3d630c=_0x554dfa();return null==_0x3d630c?(_0x115bd2(),'Valid'):_0x1e3caf-_0x3d630c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x130cd1)['catch'](()=>{_0x130cd1('UsageLimit');});const _0x3cddb8=0x36ee80;function _0x115bd2(){const _0x408cce='llct-'+_0x2d96dd(_0x301b9c(_0x25a3b0)),_0x2fbfc9=_0x479541(_0x2d96dd(window['Math']['ceil'](_0x1e3caf/_0x3cddb8)));window['localStorage']['setItem'](_0x408cce,_0x2fbfc9);}function _0x554dfa(){const _0x1d6aa7='llct-'+_0x2d96dd(_0x301b9c(_0x25a3b0)),_0x5301ac=window['localStorage']['getItem'](_0x1d6aa7);return _0x5301ac?window['parseInt'](_0x479541(_0x5301ac),0x10)*_0x3cddb8:null;}function _0x3e69db(_0x55d6f8){return new window['Promise']((_0x4cafb,_0x5e894c)=>{_0x55d6f8['then'](_0x4cafb,_0x5e894c),window['setTimeout'](_0x5e894c,0x1d4c0);});}}_0x396b47['on']('_sendUsageRequest',(_0x4edf2d,_0x462ebd)=>{if(_0x462ebd[0x0]!=_0x25a3b0)return _0x130cd1('UsageLimit');_0x462ebd[0x1]={..._0x462ebd[0x1],'requestId':_0x3837a6};},{'priority':'high'}),_0x396b47['on']('_sendUsageRequest',_0x3cba9d=>{_0x6add3c(_0x3cba9d['return'])&&(_0x28a4c1=!0x0,_0x184a6c(_0x3cba9d['return']));},{'priority':'low'}),_0x276a49['then'](()=>{_0x28a4c1||_0x130cd1('UsageLimit');});});function _0x3bfec6(){return'auto'==_0x396b47['editing']['view']['_overlayModeHint'];}function _0x141d06(){_0x396b47['editing']['view']['_overlayModeHint']='auto';}}function _0x3af62a(_0x231f50){const _0x36aa9e=[new window['Promise'](_0x1e1962=>setTimeout(_0x1e1962,0x93ecc)),_0x276a49['then'](()=>new window['Promise'](_0x481eaf=>{const _0x27ec11=0x7,_0x17bdc1=_0x4cec02['_revisions'];function _0x2bdd44(){_0x17bdc1['length']>=_0x27ec11&&_0x481eaf();}_0x2bdd44(),_0x17bdc1['on']('add',_0x2bdd44);})),new window['Promise'](_0x15da80=>{function _0x1deae4(){for(const _0x5c7e30 in window)if(window['Number']['isNaN'](window['Number'](_0x5c7e30))&&window[_0x5c7e30]==_0x42ed9f)return _0x15da80();'destroyed'!=_0x396b47['state']&&window['setTimeout'](_0x1deae4,0x1388);}_0x490782('RevisionViewer')&&_0x1deae4();})];return window['Promise']['race'](_0x36aa9e)['then'](()=>_0x231f50);}async function _0x7e0005(){if(await _0x276a49,_0x490782('RevisionViewer')){const _0xa52427=_0x4cec02['getRevision'](0x0),_0x37dd0d=_0x4cec02['getEarlierVisibleRevision'](_0xa52427['id']),_0x15e01d=_0x4f5456('RevisionViewer');return await _0x15e01d['compare'](_0xa52427['id'],_0x37dd0d?_0x37dd0d['id']:null,!0x0),_0x15e01d['unbind']('isEnabled'),_0x15e01d['isEnabled']=!0x1,_0x15e01d['compare']=_0x385faf,void(_0x15e01d['_getDiff']=_0x385faf);}if(_0x490782('RevisionTracker')){const _0x18cccd=_0x4f5456('RevisionTracker');_0x18cccd['unbind']('isEnabled'),_0x18cccd['isEnabled']=!0x1,_0x18cccd['update']=_0x385faf,_0x18cccd['saveRevision']=_0x385faf;}_0x396b47['model']['change']=_0x385faf,_0x396b47['model']['enqueueChange']=_0x385faf,_0x396b47['enableReadOnlyMode']('model');}function _0x12dc8f(){return _0x490782('WebSocketGateway')&&'connected'==_0x4f5456('WebSocketGateway')['state'];}function _0x3b31a6(){return _0x490782('RevisionViewerIntegration');}function _0x47fce3(){return _0x490782('TrackChangesDataGetter');}function _0x53c4e3(_0x5c09ec){const _0x44c7f5=_0x2b4a25();_0x396b47[_0x44c7f5]='revisionHistoryLicenseKey'+_0x5c09ec,_0x5c09ec['endsWith']('Limit')&&(window[_0x2b4a25()]=_0x42ed9f),'Valid'!=_0x5c09ec&&_0x7e0005();}function _0x2b4a25(){const _0x5145fa=window['String'](window['performance']['now']())['replace']('.','');let _0x1c4b1f='v';for(let _0x2bc6f5=0x0;_0x2bc6f5<_0x5145fa['length'];_0x2bc6f5+=0x2){let _0x375bbd=window['parseInt'](_0x5145fa['substring'](_0x2bc6f5,_0x2bc6f5+0x2));_0x375bbd>=0x3e&&(_0x375bbd-=0x3e),_0x1c4b1f+=_0x2798bc[_0x375bbd];}return _0x1c4b1f;}function _0x2a34fc(){const _0x2d3cd2=_0x5943e7['split']('.');if(0x3!=_0x2d3cd2['length'])return null;return _0x5cedc4(_0x2d3cd2[0x1]);function _0x5cedc4(_0x924374){const _0x2a6200=_0x558555(_0x924374);return _0x2a6200&&_0x2f83ad()?_0x2a6200:null;function _0x2f83ad(){const _0x45c239=_0x2a6200['jti'],_0x1242be=window['parseInt'](_0x45c239['substring'](_0x45c239['length']-0x8),0x10),_0x1fbe4d={..._0x2a6200,'jti':_0x45c239['substring'](0x0,_0x45c239['length']-0x8)};return delete _0x1fbe4d['vc'],_0x301b9c(_0x1fbe4d)==_0x1242be;}}}async function _0x4de024(){let _0x40f8c5=!0x0;try{const [_0x3d661d,_0x4e51cd,_0x3ef7c2]=_0x5943e7['split']('.');return _0x5fb14b(_0x3d661d),await _0x4493a1(_0x3d661d,_0x4e51cd,_0x3ef7c2),_0x40f8c5;}catch{return!0x1;}function _0x5fb14b(_0x40206a){const _0x80802c=_0x558555(_0x40206a);_0x80802c&&'ES256'==_0x80802c['alg']||(_0x40f8c5=!0x1);}async function _0x4493a1(_0x588483,_0x2aa8ac,_0x18cabe){const _0x392726=window['Uint8Array']['from'](_0x30d00c(_0x18cabe),_0x3e7115=>_0x3e7115['charCodeAt'](0x0)),_0x1783b8=new window['TextEncoder']()['encode'](_0x588483+'.'+_0x2aa8ac),_0x39bc9f=window['crypto']['subtle'];if(!_0x39bc9f)return;const _0x4dd2e8=await _0x39bc9f['importKey']('jwk',_0x310253,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x39bc9f['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4dd2e8,_0x392726,_0x1783b8)||(_0x40f8c5=!0x1);}}function _0x558555(_0x32daae){return _0x32daae['startsWith']('ey')?JSON['parse'](_0x30d00c(_0x32daae)):null;}function _0x30d00c(_0x527a98){return window['atob'](_0x527a98['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x301b9c(_0xd552c1){let _0x48fe33=0x1505;function _0x77f097(_0x2848cf){for(let _0x21bbd6=0x0;_0x21bbd6<_0x2848cf['length'];_0x21bbd6++){const _0x190030=_0x2848cf['charCodeAt'](_0x21bbd6);_0x48fe33=(_0x48fe33<<0x5)+_0x48fe33+_0x190030,_0x48fe33&=_0x48fe33;}}function _0x3c4e60(_0x24f5bd){Array['isArray'](_0x24f5bd)?_0x24f5bd['forEach'](_0x3c4e60):_0x24f5bd&&'object'==typeof _0x24f5bd?Object['entries'](_0x24f5bd)['sort']()['forEach'](([_0x531931,_0x81aadb])=>{_0x77f097(_0x531931),_0x3c4e60(_0x81aadb);}):_0x77f097(window['String'](_0x24f5bd));}return _0x3c4e60(_0xd552c1),_0x48fe33>>>0x0;}function _0x2d96dd(_0x4af92e){return _0x4af92e['toString'](0x10)['padStart'](0x8,'0');}function _0x479541(_0xd54fff){return _0xd54fff['split']('')['reverse']()['join']('');}function _0x490782(_0xb20f0a){return _0x396b47['plugins']['has'](_0xb20f0a);}function _0x4f5456(_0x391fbf){return _0x396b47['plugins']['get'](_0x391fbf);}function _0x385faf(){}_0x53c4e3(await _0x1ab866());}(this);}createRevision(_0x4536d4){const _0x416be1=this['editor']['plugins']['get']('Users');return new gt({'id':_0x4536d4['id'],'name':_0x4536d4['name'],'creator':_0x4536d4['creatorId']?_0x416be1['getUser'](_0x4536d4['creatorId']):null,'diffData':_0x4536d4['diffData']||_0x4536d4['data'],'authors':_0x4536d4['authorsIds']['map'](_0x5cba52=>_0x416be1['getUser'](_0x5cba52)),'createdAt':new Date(_0x4536d4['createdAt']),'attributes':_0x4536d4['attributes'],'fromVersion':_0x4536d4['fromVersion'],'toVersion':_0x4536d4['toVersion']});}['addRevision'](_0x4832e7,_0x27b20d=0x0){this['_revisions']['add'](_0x4832e7,_0x27b20d);}getRevision(_0x49f160){return this['_revisions']['get'](_0x49f160);}getRevisions(_0x35820e={'toJSON':!0x1}){const _0x26d208=Array['from'](this['_revisions']);return _0x26d208['reverse'](),_0x35820e['toJSON']?_0x26d208['map'](_0x5b4f7c=>_0x5b4f7c['toJSON']()):_0x26d208;}getIndex(_0x42f514){return this['_revisions']['getIndex'](_0x42f514);}getEarlierVisibleRevision(_0x807844){const [,_0x4edd9e]=this['getRevisionsIterator'](_0x807844,{'direction':'earlier'});return _0x4edd9e;}getLaterVisibleRevision(_0xb88893){const [,_0x14ace7]=this['getRevisionsIterator'](_0xb88893,{'direction':'later'});return _0x14ace7;}getRevisionsInDiff(_0x401cdd){const _0x5914d5=[];for(const _0xa7131a of this['getRevisionsIterator'](_0x401cdd['newRevisionId']))if(_0x5914d5['push'](_0xa7131a),_0xa7131a['id']===_0x401cdd['oldRevisionId'])break;return _0x5914d5;}*getRevisionsIterator(_0x6205f2,{direction:_0x2a9672='earlier',filter:_0x59f9ad=()=>!0x0}={}){const _0x54fda5='earlier'===_0x2a9672?0x1:-0x1;let _0x530c81=this['_revisions']['get'](_0x6205f2),_0x37db6f=this['getIndex'](_0x530c81);for(yield _0x530c81;_0x530c81;){if(_0x37db6f+=_0x54fda5,_0x530c81=this['getRevision'](_0x37db6f),!_0x530c81)return;_0x59f9ad(_0x530c81)&&(yield _0x530c81);}}},wt=class extends _0x5082f5{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x11eb61,'c'],[_0x538080,'a'],[_0x350155,'e'],[_0x3e6c20,'r'],[_0xfddeb5,'u']]);_typeCharToViewClass=new Map([['c',_0x11eb61],['a',_0x538080],['e',_0x350155],['r',_0x3e6c20],['u',_0xfddeb5]]);async loadRevisionData(_0x430c48,_0x121fca){if(_0x430c48['diffData']||!_0x121fca)return;const _0x499b58=this['editor']['config']['get']('collaboration.channelId');_0x430c48['diffData']=(await _0x121fca['getRevision']({'channelId':_0x499b58,'revisionId':_0x430c48['id']}))['diffData'];}getRevisionDocumentData(_0x3d9701){const _0x17ad1f={};for(const _0x234e2d in _0x3d9701['diffData']){if(_0x3d9701['diffData'][_0x234e2d]['attachChange']&&!_0x3d9701['diffData'][_0x234e2d]['attachChange']['isAttached'])continue;const _0x10415a=this['_removeRevisionMarkers'](JSON['parse'](_0x3d9701['diffData'][_0x234e2d]['insertions'])),_0x499f94=this['editor']['editing']['view']['document'],_0x52ee0a=new _0x13d604(_0x499f94,_0x10415a['map'](_0x3d52bd=>this['_getViewFromDiffObj'](_0x3d52bd,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x17ad1f[_0x234e2d]=this['editor']['data']['processor']['toData'](_0x52ee0a),this['editor']['data']['processor']['useFillerType']('default');}return _0x17ad1f;}getRevisionRootsAttributes(_0x4aed9e){const _0x40d5fc={};for(const _0x2c4c1e in _0x4aed9e['diffData'])_0x4aed9e['diffData'][_0x2c4c1e]['attachChange']&&!_0x4aed9e['diffData'][_0x2c4c1e]['attachChange']['isAttached']||(_0x40d5fc[_0x2c4c1e]=_0x4aed9e['diffData'][_0x2c4c1e]['attributesAfter']||{});return _0x40d5fc;}getRevisionRootsModelElements(_0xa39140){const _0x4c69ce={};for(const _0x47282b in _0xa39140['diffData']){if(_0xa39140['diffData'][_0x47282b]['attachChange']&&!_0xa39140['diffData'][_0x47282b]['attachChange']['isAttached'])continue;const _0xd6f1af=_0xa39140['diffData'][_0x47282b]['rootElementName'];_0xd6f1af&&(_0x4c69ce[_0x47282b]=_0xd6f1af);}return _0x4c69ce;}_getTypeCharForViewElement(_0x1635bc){return this['_viewClassToTypeChar']['get'](_0x1635bc['constructor']);}_getViewFromDiffObj(_0x157bf2,_0x376d1b){const _0x3bdf2c=this['editor']['editing']['view']['document'];if('string'==typeof _0x157bf2)return new _0x4b6d45(_0x3bdf2c,_0x157bf2);{let _0x262e3d,_0x30a117;_0x30a117='u'==_0x157bf2['type']||'r'==_0x157bf2['type']?[]:_0x157bf2['children']['map'](_0x4949f2=>this['_getViewFromDiffObj'](_0x4949f2,_0x376d1b));const _0x457536=this['_typeCharToViewClass']['get'](_0x157bf2['type'])||_0x5514d0,_0x2a9bd4=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x262e3d=new _0x457536(_0x3bdf2c,_0x157bf2['name'],_0x157bf2['attributes'],_0x30a117),'u'==_0x157bf2['type']&&_0x157bf2['children'][0x0]){const _0xd6236a=_0x157bf2['children'][0x0];if(_0x262e3d['render']=function(_0xeb2822){const _0x92f8bc=_0xeb2822['createElement']('div');return _0x92f8bc['innerHTML']=_0xd6236a,_0x92f8bc['childNodes'][0x0];},_0x376d1b){const _0x5f1acc=new _0x13d604(_0x3bdf2c);_0x5f1acc['_appendChild'](_0x262e3d);const _0x1c67bf=Array['from'](_0x2a9bd4['viewChildrenToDom'](_0x5f1acc,{'bind':!0x1})),_0x5f1785=_0x2a9bd4['domDocument']['createElement']('div');_0x5f1785['append'](..._0x1c67bf),_0x262e3d=Array['from'](_0x2a9bd4['domChildrenToView'](_0x5f1785))[0x0];}}else{if('r'==_0x157bf2['type']&&_0x157bf2['children'][0x0]){const _0x1bc735=_0x157bf2['children'][0x0];if(_0x262e3d['render']=function(_0x2a4144){_0x2a4144['innerHTML']=_0x1bc735;},_0x376d1b){const _0x33ab0d=new _0x13d604(_0x3bdf2c);_0x33ab0d['_appendChild'](_0x262e3d);const _0x586a9f=Array['from'](_0x2a9bd4['viewChildrenToDom'](_0x33ab0d,{'bind':!0x1})),_0x5e5ce7=_0x2a9bd4['domDocument']['createElement']('div');_0x5e5ce7['append'](..._0x586a9f);const _0x2ffe39=Array['from'](_0x2a9bd4['domChildrenToView'](_0x5e5ce7));_0x2ffe39['length']>0x1?_0x262e3d['_appendChild'](_0x2ffe39):_0x262e3d=_0x2ffe39[0x0];}}}if(_0x157bf2['customProperties']){for(const [_0x40665e,_0x5b7b57]of _0x157bf2['customProperties'])_0x262e3d['_setCustomProperty'](_0x40665e,_0x5b7b57);}const _0x3609ec=void 0x0===_0x157bf2['fillerOffset']?null:_0x157bf2['fillerOffset'];return null!==_0x3609ec&&(_0x262e3d['getFillerOffset']=()=>_0x3609ec),_0x262e3d;}}_makeModelFromViewString(_0x52360d,_0x5598d2){const _0x3b58ec=JSON['parse'](_0x52360d),_0x463aa1=this['editor']['editing']['view']['document'],_0x15454b=new _0x13d604(_0x463aa1,_0x3b58ec['map'](_0x2d4003=>this['_getViewFromDiffObj'](_0x2d4003,!0x0))),_0x21c1b5=this['editor']['data']['toModel'](_0x15454b,_0x5598d2);return _0x21c1b5['name']=_0x5598d2,_0x21c1b5;}['_removeRevisionMarkers'](_0x4a2f6a){return(_0x4a2f6a=_0x4a2f6a['filter'](_0x18e5cf=>!_0x18e5cf['name']||'revision-start'!==_0x18e5cf['name']&&'revision-end'!==_0x18e5cf['name']))['forEach'](_0x1fcae7=>{'string'!=typeof _0x1fcae7&&(_0x1fcae7['children']=this['_removeRevisionMarkers'](_0x1fcae7['children']),_0x1fcae7['attributes']=_0x1fcae7['attributes']['filter'](_0x5ef8dc=>!_0x5ef8dc[0x0]['startsWith']('data-revision-')));}),_0x4a2f6a;}};function pt(_0x35d837,_0x396c06,_0x22887a){const t=_0x35d837['t'];switch(_0x396c06){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'},_0x22887a);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x22887a);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}var _t=class extends _0x5082f5{['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[_0x38fdbd,mt,wt,_0x4a5155];}constructor(_0x143c1c){super(_0x143c1c),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x121064=_0x2993e9();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x121064},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 _0x1a0262=this['repository']['getRevision'](0x0),_0x2d431b=_0x1a0262&&null===_0x1a0262['creator']?_0x1a0262:null;if(this['_continueCurrentRevision']=!!_0x2d431b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x16eec4=this['_source']['getCurrentRevisionId'](),_0x1f00d7=this['repository']['getRevision'](_0x16eec4);if(_0x1f00d7)this['_startingVersion']=_0x1f00d7['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x18e869=this['_source']['history']['_operations']['find'](_0x27ccd0=>!_0x27ccd0['_isInit']),_0x2b3235=_0x18e869?_0x18e869['baseVersion']:this['_source']['history']['version'];_0x1a0262?(_0x1a0262['toVersion']<_0x2b3235&&_0x1a0262['_update']({'toVersion':_0x2b3235}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2d431b['id'],this['_startingVersion']=_0x2d431b['fromVersion']):(this['_startingVersion']=_0x1a0262['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2b3235,this['_continueCurrentRevision']=!0x1);}}else _0x2d431b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2d431b['toVersion'],this['editor']['model']['document']['history']['version']),_0x2d431b['fromVersion']===_0x2d431b['toVersion']?(0x0!==_0x2d431b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2d431b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2d431b['id'],this['_startingVersion']=_0x2d431b['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',_0x179e5e=>!_0x179e5e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xe98e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x29d0ed;for(const _0x1df7a3 in _0xe98e){const _0x258fe0=_0x1df7a3,_0x1315df=_0xe98e[_0x258fe0];if('revisionHistoryLicenseKeyValid'==_0x1315df||'revisionHistoryLicenseKeyInvalid'==_0x1315df||'revisionHistoryLicenseKeyExpired'==_0x1315df||'revisionHistoryLicenseKeyDomainLimit'==_0x1315df||'revisionHistoryLicenseKeyNotAllowed'==_0x1315df||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1315df||'revisionHistoryLicenseKeyUsageLimit'==_0x1315df){delete _0xe98e[_0x258fe0],_0x29d0ed=_0x1315df,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x29d0ed&&_0xe98e['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x29d0ed&&_0xe98e['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x29d0ed&&_0xe98e['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x29d0ed&&_0xe98e['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x29d0ed&&_0xe98e['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x29d0ed&&_0xe98e['_showLicenseError']('usageLimit');},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x4d2ddd=this['repository']['getRevision'](0x0),_0x49da2f=await this['getRevisionDocumentData'](_0x4d2ddd),_0x3e9e8e=await this['getRevisionRootsAttributes'](_0x4d2ddd),_0xff2e88=this['_utils']['getRevisionRootsModelElements'](_0x4d2ddd);this['_replaceEditorDataWithRevisionData'](_0x49da2f,_0x3e9e8e,_0xff2e88);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x30c0ae){this['_source']=_0x30c0ae;}async update(){const _0xccfa90=await this['_source']['getLatestVersion']();if(_0xccfa90>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1dc982=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0xccfa90});_0x1dc982['authors']=_0x1dc982['authorsIds']['map'](_0x11ea6c=>this['editor']['plugins']['get']('Users')['getUser'](_0x11ea6c)),this['currentRevision']['_update'](_0x1dc982);}}async['saveRevision'](_0x4a8df5={},_0x5a30f4=null){const _0x2727c7=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x5a30f4>this['currentRevision']['toVersion']&&(_0x5a30f4=null),null===_0x5a30f4&&(_0x5a30f4=await this['_source']['getLatestVersion']());const _0x8b7d4a=this['_getFromVersion'](_0x5a30f4),_0x33a52f=this['buildRevisionData']({'from':_0x8b7d4a,'to':_0x5a30f4});if(this['currentRevision']['toVersion']<_0x5a30f4){const _0x189c6f=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x5a30f4,'to':_0x5a30f4});_0x189c6f['authors']=[],_0x189c6f['authorsIds']=[],_0x189c6f['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x189c6f,!0x0),delete _0x189c6f['authors'],_0x2727c7['push'](_0x189c6f);}_0x4a8df5['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x4a8df5['name']=_0x4a8df5['name']||null,_0x4a8df5['id']=_0x4a8df5['id']||_0x2993e9(),_0x4a8df5={..._0x4a8df5,..._0x33a52f};const _0x2eebc1=this['addRevisionData'](_0x4a8df5);_0x2727c7['push'](_0x4a8df5);const _0x2cb3ce=this['repository']['getIndex'](_0x2eebc1);if(0x0!==_0x2cb3ce){const _0x433f8b=this['repository']['getRevision'](_0x2cb3ce-0x1);if(_0x433f8b['fromVersion']!==_0x5a30f4){const _0x29ac86=this['_revisionDataBuilder']['getData'](_0x5a30f4,_0x433f8b['toVersion']),_0x30f542={'id':_0x433f8b['id'],'diffData':_0x29ac86['diffData'],'authorsIds':_0x29ac86['authorsIds'],'authors':_0x29ac86['authorsIds']['map'](_0x39c224=>this['editor']['plugins']['get']('Users')['getUser'](_0x39c224)),'fromVersion':_0x5a30f4};_0x433f8b===this['currentRevision']&&(_0x30f542['createdAt']=new Date(_0x4a8df5['createdAt']['getTime']()+0xa)),_0x433f8b['_update'](_0x30f542,!0x0),delete _0x30f542['authors'],_0x2727c7['push'](_0x30f542);}}if(this['adapter']){for(const _0x2c7184 of _0x2727c7)this['_bufferUpdate'](_0x2c7184['id'],_0x2c7184,!0x0);this['sendBufferedUpdates']();}return _0x2eebc1;}addRevisionData(_0x11ceee){const _0x4e76a3=this['repository']['createRevision'](_0x11ceee);return this['adapter']&&_0x4e76a3['on']('_update',(_0x533cfa,_0x3ed852,_0x466455)=>{_0x466455||(this['_bufferUpdate'](_0x3ed852['id'],_0x3ed852,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4e76a3,this['_findInsertionIndex'](_0x4e76a3)),_0x4e76a3;}async getRevisionDocumentData(_0x24a64f){return await this['_utils']['loadRevisionData'](_0x24a64f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x24a64f);}async getRevisionRootsAttributes(_0x3fdd0c){return await this['_utils']['loadRevisionData'](_0x3fdd0c,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3fdd0c);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x7c9bbc=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3f7b4d=0x0;_0x3f7b4d<_0x7c9bbc['length'];_0x3f7b4d++){const _0x410df7=_0x7c9bbc[_0x3f7b4d];let _0x4c830e=!0x1;for(const _0x3bdf43 of Object['keys'](_0x410df7))void 0x0===_0x410df7[_0x3bdf43]?delete _0x410df7[_0x3bdf43]:'id'!==_0x3bdf43&&(_0x4c830e=!0x0);_0x4c830e||(_0x7c9bbc[_0x3f7b4d]=null);}if(_0x7c9bbc=_0x7c9bbc['filter'](_0x12dd74=>null!==_0x12dd74),!_0x7c9bbc['length'])return;for(let _0x3ef753=0x0;_0x3ef753<_0x7c9bbc['length'];_0x3ef753++){const _0x24c8ba=_0x7c9bbc[_0x3ef753];void 0x0!==_0x24c8ba['fromVersion']&&void 0x0===_0x24c8ba['toVersion']&&(_0x24c8ba['toVersion']=this['repository']['getRevision'](_0x24c8ba['id'])['toVersion']),void 0x0!==_0x24c8ba['toVersion']&&void 0x0===_0x24c8ba['fromVersion']&&(_0x24c8ba['fromVersion']=this['repository']['getRevision'](_0x24c8ba['id'])['fromVersion']);}const _0x460dc0=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x7c9bbc,_0x460dc0)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x436bd2=>{if(_0x436bd2){for(const _0x33c93c of _0x436bd2)this['setRevisionData']({'id':_0x33c93c['id'],'createdAt':_0x33c93c['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}buildRevisionData({revision:_0x10d689=null,from:_0x446d90=null,to:_0x2096ed=null}){_0x446d90=null!==_0x446d90?_0x446d90:_0x10d689['fromVersion'],_0x2096ed=null!==_0x2096ed?_0x2096ed:_0x10d689['toVersion'];const _0x3e9c2a=this['_revisionDataBuilder']['getData'](_0x446d90,_0x2096ed),_0x57b7c0={'diffData':_0x3e9c2a['diffData'],'authorsIds':_0x3e9c2a['authorsIds'],'fromVersion':_0x446d90,'toVersion':_0x2096ed};if(!_0x10d689||_0x2096ed!==_0x10d689['toVersion']){const _0x2ee6d7=_0x2096ed-0x1,_0x5adc66=this['_source']['history']['getOperation'](_0x2ee6d7);_0x57b7c0['createdAt']=_0x5adc66&&_0x5adc66['createdAt']||new Date();}if(this['_loadedStateData']&&_0x446d90===this['_loadedStateData']['fromVersion']){for(const _0x1ba6eb of this['_loadedStateData']['authors'])_0x57b7c0['authorsIds']['includes'](_0x1ba6eb['id'])||_0x57b7c0['authorsIds']['push'](_0x1ba6eb['id']);}return _0x57b7c0;}_bufferUpdate(_0x4ce92a,_0x577f01,_0xe9e91a){if(this['_bufferedUpdates']['has'](_0x4ce92a)){const _0x52221c=this['_bufferedUpdates']['get'](_0x4ce92a);_0x577f01=_0xe9e91a?{..._0x52221c,..._0x577f01}:{..._0x577f01,..._0x52221c};}this['_bufferedUpdates']['set'](_0x4ce92a,_0x577f01);}setRevisionData(_0x32a4b4){const _0x3b2638=this['repository']['getRevision'](_0x32a4b4['id']);if(_0x32a4b4['createdAt']&&(_0x32a4b4['createdAt']=new Date(_0x32a4b4['createdAt'])),_0x32a4b4['authorsIds']){const _0x1e1af2=this['editor']['plugins']['get']('Users');_0x32a4b4['authors']=_0x32a4b4['authorsIds']['map'](_0x3e0463=>_0x1e1af2['getUser'](_0x3e0463));}_0x3b2638['_update'](_0x32a4b4,!0x0);}_createInitialRevision(_0x2138b9){const _0x35cae5=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x35cae5)this['_initialRevisionId']=_0x35cae5['id'];else{const _0x35d5af=!this['editor']['model']['document']['roots']['find'](_0x31bfa0=>this['editor']['model']['hasContent'](_0x31bfa0)),_0x22a29c=this['editor']['plugins']['get']('Users')['me']['id'],_0xd69816=pt(this['editor']['locale'],_0x35d5af?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x2138b9,'to':_0x2138b9,'id':this['_initialRevisionId'],'name':_0xd69816,'creatorId':_0x22a29c});}}_createCurrentRevision(_0x2553e0){const _0x1a4db6=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1a4db6),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2553e0,'to':_0x2553e0,'id':_0x1a4db6,'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(_0x183366,_0x384aba,_0x3f5b6e){const _0x53db63={},_0x2d26d6={},_0x57d540={},_0x2d0d68=this['editor']['config']['get']('roots')||{};for(const [_0x4e5d53,_0x4dd277]of Object['entries'](_0x2d0d68))_0x4dd277['lazyLoad']||(_0x53db63[_0x4e5d53]=_0x4dd277['initialData']??'',_0x2d26d6[_0x4e5d53]=_0x4dd277['modelAttributes']||{},_0x4dd277['modelElement']&&(_0x57d540[_0x4e5d53]=_0x4dd277['modelElement']));for(const _0x20a314 of this['editor']['model']['document']['getRootNames']())_0x53db63[_0x20a314]??='',_0x2d26d6[_0x20a314]??={};let _0x1db05e=!0x1;const _0x5342e3=Object['keys'](_0x53db63),_0x5e4662=Object['keys'](_0x183366);for(const _0x4ade7f of _0x5342e3){if(_0x53db63[_0x4ade7f]!==_0x183366[_0x4ade7f]&&''!==_0x53db63[_0x4ade7f]['trim']()){_0x1db05e=!0x0;break;}if(!_0x1d9f37(_0x2d26d6[_0x4ade7f],_0x384aba[_0x4ade7f])&&Object['keys'](_0x2d26d6[_0x4ade7f])['length']>0x0){_0x1db05e=!0x0;break;}const _0x32f4f7=_0x57d540[_0x4ade7f],_0x493923=_0x3f5b6e[_0x4ade7f];if(_0x32f4f7&&_0x493923&&_0x32f4f7!==_0x493923){_0x1db05e=!0x0;break;}}_0x1db05e||(_0x1db05e=_0x5e4662['some'](_0x1d67ef=>!this['editor']['model']['document']['getRoot'](_0x1d67ef))),_0x1db05e&&_0x30a1e0('editor-initial-data-replaced-with-revision-data',{'editorData':_0x53db63,'editorRootsAttributes':_0x2d26d6,'editorRootsModelElements':_0x57d540,'revisionData':_0x183366,'revisionRootsAttributes':_0x384aba,'revisionRootsModelElements':_0x3f5b6e});for(const [_0x504867,_0x5e9d91]of Object['entries'](_0x183366))this['editor']['config']['set']('roots.'+_0x504867+'.initialData',_0x5e9d91);for(const [_0xa6f1fa,_0x4e259d]of Object['entries'](_0x384aba))this['editor']['config']['set']('roots.'+_0xa6f1fa+'.modelAttributes',_0x4e259d);const _0x12ce05=this['editor']['model']['document'];for(const [_0x4e75c4,_0x418690]of Object['entries'](_0x3f5b6e)){this['editor']['config']['set']('roots.'+_0x4e75c4+'.modelElement',_0x418690);const _0x1c17aa=_0x12ce05['getRoot'](_0x4e75c4);_0x1c17aa&&_0x1c17aa['name']!==_0x418690&&(_0x12ce05['roots']['remove'](_0x4e75c4),_0x12ce05['createRoot'](_0x418690,_0x4e75c4));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2c7028=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2c7028['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x272371){const _0x385da3=this['repository']['getRevisions']();_0x385da3['reverse']();let _0x3874e1=0x0;for(;_0x3874e1<_0x385da3['length'];){const _0x288936=_0x385da3[_0x3874e1];if(_0x288936===this['currentRevision']){_0x3874e1++;continue;}if(_0x288936['id']===this['_initialRevisionId'])break;const _0x15bfc0=_0x272371['toVersion']-_0x288936['toVersion']||_0x272371['fromVersion']-_0x288936['fromVersion'];if(_0x15bfc0>0x0)break;if(_0x15bfc0<0x0)_0x3874e1++;else{if(!_0x272371['creator']&&_0x288936['creator'])break;if(_0x288936['creator']||!_0x272371['creator']){if(_0x272371['createdAt']>_0x288936['createdAt'])break;_0x3874e1++;}else _0x3874e1++;}}return _0x3874e1;}_getFromVersion(_0x22eba2){const _0x1ec968=this['repository']['getRevisions']();_0x1ec968['reverse'](),_0x1ec968['shift']();const _0xa1f779=_0x1ec968['find'](_0x48ac9a=>_0x48ac9a['toVersion']<=_0x22eba2)['toVersion'];return _0xa1f779<this['_startingVersion']?this['_startingVersion']:_0xa1f779;}['_makeRevision']({name:_0xe03c3f,from:_0x20a1f8,to:_0x3f5ca2,creatorId:_0x5ab012,id:_0x2b4d52}){const _0x9c7025=this['buildRevisionData']({'from':_0x20a1f8,'to':_0x3f5ca2});_0x9c7025['name']=_0xe03c3f,_0x9c7025['creatorId']=_0x5ab012,_0x9c7025['id']=_0x2b4d52;const _0x17e3f9=this['addRevisionData'](_0x9c7025);return this['adapter']&&this['_bufferUpdate'](_0x9c7025['id'],_0x9c7025,!0x0),_0x17e3f9;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x50490e){this['editor']=_0x50490e,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x426bed){this['source']=_0x426bed;const _0x478c93=new Map(),_0x150b47=new Map(),_0x4c476c=this['editor']['model']['document']['roots']['map'](_0x467779=>_0x467779['rootName']);for(const _0x4fd4cd of _0x4c476c){const _0x2c8364=this['editor']['model']['document']['getRoot'](_0x4fd4cd),_0x33da34=bt(_0x2c8364);_0x478c93['set'](_0x4fd4cd,_0x33da34),_0x150b47['set'](_0x4fd4cd,Object['fromEntries'](_0x2c8364['getAttributes']()));}const _0x2a4e52=Array['from'](this['editor']['model']['markers'])['map'](_0x11f0cb=>[_0x11f0cb['name'],_0x11f0cb['getRange']()]),_0x424ad5=this['source']['version'];this['_saveMetaData'](_0x424ad5,_0x478c93,_0x2a4e52,_0x150b47),this['_startingRevisionId']=this['_revisionId'];const _0x1e04bc=new Map(),_0x2fb176=new Map();for(const _0x3253cb of _0x4c476c){const _0x2faba3=Rt(_0x3253cb,this['editor']['model']['document']['getRoot'](_0x3253cb)['name']);_0x1e04bc['set'](_0x3253cb,_0x2faba3),_0x2fb176['set'](_0x3253cb,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1e04bc,[],_0x2fb176);}getData(_0x5b25ca,_0x599ed0){if(this['_lastFrom']===_0x5b25ca&&this['_lastTo']<=_0x599ed0)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x599ed0,!0x0);else{if(!this['_savedMetaData']['has'](_0x5b25ca)){const _0x18922c=this['_getPreviousFrom'](_0x5b25ca);this['_calculateMetaData'](_0x18922c,_0x5b25ca,!0x1);}this['_calculateMetaData'](_0x5b25ca,_0x599ed0,!0x0);}return this['_lastFrom']=_0x5b25ca,this['_lastTo']=_0x599ed0,this['_getState']();}loadState(_0x59148d){if(!this['_savedMetaData']['has'](_0x59148d['fromVersion'])){const _0x2b64de=this['_getPreviousFrom'](_0x59148d['fromVersion']);this['_calculateMetaData'](_0x2b64de,_0x59148d['fromVersion'],!0x1);}this['_calculateMetaData'](_0x59148d['fromVersion'],_0x59148d['toVersion'],!0x1);const _0x5b7bf7=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x59148d['fromVersion'],this['_lastTo']=_0x59148d['toVersion'];for(const _0x30230a in _0x59148d['diffData']){const _0xab415=_0x59148d['diffData'][_0x30230a]['attachChange'],_0xed631e=_0x3f9247(_0x59148d['diffData'][_0x30230a]['attributesBefore'])||{},_0x483160=_0x59148d['diffData'][_0x30230a],_0x49f337=_0x5b7bf7['_makeModelFromViewString'](_0x483160['deletions'],_0x483160['rootElementName']||'$root');_0x49f337['rootName']=_0x30230a,_0x49f337['_isAttached']=!_0xab415||!_0xab415['isAttached'],_0x49f337['isAttached']=()=>_0x49f337['_isAttached'],this['_baseRoots']['set'](_0x30230a,_0x49f337),this['_baseRootsAttributes']['set'](_0x30230a,_0xed631e),_0xab415&&this['_touchedRoots']['set'](_0x30230a,_0xab415);const _0x290da4=this['_makeIdsRoot'](_0x49f337);this['_baseIdsRoots']['set'](_0x30230a,_0x290da4);for(const [_0x476b10,_0x1dc787]of _0x49f337['markers']){if(!_0x476b10['startsWith']('revision:'))continue;const _0x1e0fc7=_0x476b10['split'](':')[0x2];for(const _0x25f816 of _0x1dc787['getWalker']({'singleCharacters':!0x0})){const _0x3f71b8=this['_getVidAttributeName'](_0x25f816),_0x1242ee='elementEnd'==_0x25f816['type']?_0x25f816['previousPosition']['path']['slice'](0x0,-0x1):_0x25f816['previousPosition']['path'],_0x2f4523=_0x290da4['getNodeByPath'](_0x1242ee)['getAttribute'](_0x3f71b8);this['_touched']['set'](_0x2f4523,{'userId':_0x1e0fc7});}_0x49f337['markers']['delete'](_0x476b10);}}this['_startingRevisionId']=this['_revisionId'];const _0x236fae=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x1116e8=>!this['_touched']['has'](_0x1116e8));let _0x2a026f=0x0;const _0x194fb1=new Map();for(const _0x285a88 in _0x59148d['diffData']){const _0x38b88b=_0x59148d['diffData'][_0x285a88]['attachChange'],_0x52cbcb=_0x3f9247(_0x59148d['diffData'][_0x285a88]['attributesAfter'])||{},_0xd50ca2=_0x59148d['diffData'][_0x285a88],_0x2090bd=_0x5b7bf7['_makeModelFromViewString'](_0xd50ca2['insertions'],_0xd50ca2['rootElementName']||'$root');_0x2090bd['rootName']=_0x285a88,_0x2090bd['_isAttached']=!_0x38b88b||_0x38b88b['isAttached'],_0x2090bd['isAttached']=()=>_0x2090bd['_isAttached'],this['_diffRoots']['set'](_0x285a88,_0x2090bd),this['_diffRootsAttributes']['set'](_0x285a88,_0x52cbcb);const _0x49fe71=this['_makeIdsRoot'](_0x2090bd,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x285a88,_0x49fe71),_0x194fb1['set'](_0x285a88,_0x2090bd['isAttached']()?_0x52cbcb:{});for(const [_0x205e56,_0x2c1df3]of _0x2090bd['markers']){if(!_0x205e56['startsWith']('revision:'))continue;const _0x1744ea=_0x205e56['split'](':')[0x2];for(const _0x36c5cc of _0x2c1df3['getWalker']({'singleCharacters':!0x0})){const _0x23944d=this['_getVidAttributeName'](_0x36c5cc),_0x1311de=this['_revisionId']++,_0x273879='elementEnd'==_0x36c5cc['type']?_0x36c5cc['previousPosition']['path']['slice'](0x0,-0x1):_0x36c5cc['previousPosition']['path'];_0x49fe71['getNodeByPath'](_0x273879)['_setAttribute'](_0x23944d,_0x1311de),this['_touched']['set'](_0x1311de,{'userId':_0x1744ea});}_0x2090bd['markers']['delete'](_0x205e56);}for(const _0x2913ca of this['editor']['model']['createRangeIn'](_0x2090bd)['getWalker']({'singleCharacters':!0x0})){const _0xd25f9e=this['_getVidAttributeName'](_0x2913ca),_0x4b3a64='elementEnd'==_0x2913ca['type']?_0x2913ca['previousPosition']['path']['slice'](0x0,-0x1):_0x2913ca['previousPosition']['path'],_0x40d2e8=_0x49fe71['getNodeByPath'](_0x4b3a64);_0x40d2e8['getAttribute'](_0xd25f9e)>0x0||_0x40d2e8['_setAttribute'](_0xd25f9e,_0x236fae[_0x2a026f++]);}for(const [_0xba82f4,_0xbe6fdc]of _0x2090bd['markers'])_0xba82f4['startsWith']('revision:')||this['_markers']['set'](_0xba82f4,_0xbe6fdc);}const {roots:_0x56c672}=this['_savedMetaData']['get'](_0x59148d['fromVersion']),{roots:_0x460e75}=this['_savedMetaData']['get'](_0x59148d['toVersion']),_0x3e97f5=bt(_0x56c672['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x3e97f5),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3e97f5,Number['NEGATIVE_INFINITY']));const _0x63e34b=bt(_0x460e75['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x63e34b),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x63e34b));const _0x139c51=Array['from'](this['_diffRoots'])['map'](([_0x3ee735,_0x53be87])=>[_0x3ee735,bt(_0x53be87)]);this['_saveMetaData'](this['_lastTo'],_0x139c51,this['_markers'],_0x194fb1);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x3cd0b3,_0x1d2d9a,_0x686c24,_0x21ad6c){const _0x592f3b=new Map(_0x1d2d9a),_0xea78e0=new Map(_0x3f9247(_0x21ad6c)),_0x568e7c=new Map();for(const [_0x1c602c,_0x373067]of _0x686c24)_0x568e7c['set'](_0x1c602c,{'start':_0x373067['start']['clone'](),'end':_0x373067['end']['clone'](),'rootName':_0x373067['root']['rootName']});this['_savedMetaData']['set'](_0x3cd0b3,{'roots':_0x592f3b,'markers':_0x568e7c,'rootsAttributes':_0xea78e0});}_removeMetaData(_0x501c2a){this['_savedMetaData']['delete'](_0x501c2a);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}_makeIdsRoot(_0x568073,_0x3a5a30=null){let _0x52d9c0=null;_0x568073['is']('documentFragment')||(_0x52d9c0=new _0xcb8530(_0x568073['name'],{'vid_start':null===_0x3a5a30?this['_revisionId']++:_0x3a5a30++}));const _0x4ecc9f=[];for(const _0x5294df of _0x568073['getChildren']())if(_0x5294df['is']('element')){_0x4ecc9f['push'](this['_makeIdsRoot'](_0x5294df,_0x3a5a30));const _0x59b293=_0x4ecc9f[_0x4ecc9f['length']-0x1];null!==_0x3a5a30&&(_0x3a5a30=_0x59b293['is']('element','$text')?_0x59b293['getAttribute']('vid')+0x1:_0x59b293['getAttribute']('vid_end')+0x1);}else{for(let _0x1a9298=0x0;_0x1a9298<_0x5294df['offsetSize'];_0x1a9298++)_0x4ecc9f['push'](new _0xcb8530('$text',{'vid':null===_0x3a5a30?this['_revisionId']++:_0x3a5a30++}));}if(_0x568073['is']('documentFragment')){const _0xbbcd67=Rt(_0x568073['rootName'],_0x568073['name']);return _0xbbcd67['_insertChild'](0x0,_0x4ecc9f),_0xbbcd67;}return _0x52d9c0['_setAttribute']('vid_end',null===_0x3a5a30?this['_revisionId']++:_0x3a5a30),_0x52d9c0['_insertChild'](0x0,_0x4ecc9f),_0x52d9c0;}_calculateMetaData(_0x19752a,_0x4e08f1,_0x2d3523){this['_reset']();const {roots:_0x3aeada,markers:_0x59b800,rootsAttributes:_0x4ea780}=this['_savedMetaData']['get'](_0x19752a);this['_baseRoots']=new Map(_0x3aeada),this['_baseRootsAttributes']=new Map(_0x3f9247(_0x4ea780));for(const [_0x125b0c,_0x4befef]of this['_baseRoots'])if('$graveyard'!==_0x125b0c&&(this['_diffRoots']['set'](_0x125b0c,bt(_0x4befef)),this['_diffRootsAttributes']=new Map(_0x3f9247(_0x4ea780)),_0x2d3523)){const _0x46c077=this['_revisionId'];this['_idsRoots']['set'](_0x125b0c,this['_makeIdsRoot'](_0x4befef)),this['_baseIdsRoots']['set'](_0x125b0c,this['_makeIdsRoot'](_0x4befef,_0x46c077));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x2d3523&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1823e3,_0x26d885]of _0x59b800){const _0x1baeea=this['_baseRoots']['get'](_0x26d885['rootName']),_0xb528cc=this['_diffRoots']['get'](_0x26d885['rootName']),_0x386e1a=new _0x3d14af(this['_fixPosition'](_0x26d885['start'],_0x1baeea),this['_fixPosition'](_0x26d885['end'],_0x1baeea)),_0x1e0ec6=this['_fixRange'](_0x386e1a,_0xb528cc);_0x1baeea['markers']['set'](_0x1823e3,_0x386e1a),this['_markers']['set'](_0x1823e3,_0x1e0ec6);}this['_applyOperations'](_0x19752a,_0x4e08f1,_0x2d3523);}_applyOperations(_0x4b28a5,_0x1e9f80,_0x3223e5){for(const _0x3a0a3a of this['source']['getOperations'](_0x4b28a5,_0x1e9f80))this['_handleOperation'](_0x3a0a3a,_0x3223e5);for(const _0x3f6fcf of this['_diffRoots']['values']())_0x3f6fcf['markers']['clear']();for(const [_0x1bddd1,_0x43e808]of this['_markers'])this['_diffRoots']['get'](_0x43e808['root']['rootName'])['markers']['set'](_0x1bddd1,_0x43e808['clone']());const _0x288b5c=new Map(),_0x4a13fc=new Map();for(const [_0x35d257,_0x24e6fb]of this['_diffRoots'])_0x288b5c['set'](_0x35d257,bt(_0x24e6fb)),_0x4a13fc['set'](_0x35d257,this['_diffRootsAttributes']['get'](_0x35d257));this['_saveMetaData'](_0x1e9f80,_0x288b5c,this['_markers'],_0x4a13fc);}_getPreviousFrom(_0x2f0699){const _0x1e878a=Array['from'](this['_savedMetaData']['keys']());_0x1e878a['sort']((_0x19bb55,_0x3a41ce)=>_0x19bb55-_0x3a41ce),_0x1e878a['reverse']();for(const _0xb268ea of _0x1e878a)if(_0xb268ea<_0x2f0699)return _0xb268ea;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x45a41,_0x4ad89e){const _0x44fe23=Array['from'](_0x4ad89e['markers'])['map'](([_0x5103f0,_0x514361])=>[_0x5103f0,this['_fixRange'](_0x514361,_0x45a41)]);_0x45a41['markers']=new Map(_0x44fe23);}_transformMarkers(_0x12e6f0){for(const _0x3f3af3 of this['_markers']['values']()){const _0x53ce64=_0x3f3af3['getTransformedByOperation'](_0x12e6f0),_0x580d81=_0x3d14af['_createFromRanges'](_0x53ce64);_0x3f3af3['start']=_0x580d81['start'],_0x3f3af3['end']=_0x580d81['end'];}}_handleOperation(_0x5be123,_0x356435){if('addRoot'!=_0x5be123['type']&&'detachRoot'!=_0x5be123['type']){if('insert'==_0x5be123['type']){const _0x43095b=_0x5be123['position']['root'],_0x580e5c=_0x43095b['rootName'],_0x543d77=_0x43095b['name'];this['_diffRoots']['has'](_0x580e5c)||(this['_diffRoots']['set'](_0x580e5c,Rt(_0x580e5c,_0x543d77,!0x0)),this['_diffRootsAttributes']['set'](_0x580e5c,{}),_0x356435&&this['_idsRoots']['set'](_0x580e5c,Rt(_0x580e5c,_0x543d77,!0x0)));}else{if('addRootAttribute'==_0x5be123['type']||'removeRootAttribute'==_0x5be123['type']||'changeRootAttribute'==_0x5be123['type'])return void this['_handleRootAttributeOperation'](_0x5be123);'marker'==_0x5be123['type']&&this['_handleMarkerOperation'](_0x5be123);}if('marker'!==_0x5be123['type']){const _0x2d1615=this['_cloneOperation'](_0x5be123,this['_diffRoots']);_0x2d1615['_execute'](),this['_transformMarkers'](_0x2d1615);}if(_0x356435)switch(_0x5be123['type']){case'insert':this['_handleInsertOperation'](_0x5be123);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5be123);break;case'merge':this['_handleMergeOperation'](_0x5be123);break;case'split':this['_handleSplitOperation'](_0x5be123);}}else this['_handleRootOperation'](_0x5be123,_0x356435);}_cloneOperation(_0x10d680,_0x2b7666){const _0x23fa44=_0x10d680['clone']();return _0x23fa44['_authorId']=_0x10d680['_authorId'],this['_fixOperation'](_0x23fa44,_0x2b7666),_0x23fa44;}_getBaseVids(_0x423a6a){return _0x423a6a['map'](_0x2d7cb6=>{const _0x2e6a90=this['_getVidAttributeName'](_0x2d7cb6);return Number(_0x2d7cb6['item']['getAttribute'](_0x2e6a90));});}_generateTape(_0x428c11,_0xc04690){if(_0x428c11['is']('element','$text'))_0xc04690['push']({'item':_0x428c11,'type':'text'});else{_0x428c11['is']('element')&&_0xc04690['push']({'item':_0x428c11,'type':'elementStart'});for(const _0x2c8afb of _0x428c11['getChildren']())this['_generateTape'](_0x2c8afb,_0xc04690);_0x428c11['is']('element')&&_0xc04690['push']({'item':_0x428c11,'type':'elementEnd'});}return _0xc04690;}_getState(){const _0x1f6f6f=new Map(this['_touched']),_0x1be5c2=new Map(_0x1f6f6f),_0x22bcf2=new Map(),_0x229178={'insertions':{},'deletions':{}},_0x21318d={'insertions':{},'deletions':{}},_0x262067=new Map(),_0x25daf0=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x28f5e3=new Map();_0x25daf0['delete']('$graveyard');for(const _0x1e3afb of _0x25daf0){const _0x132a23=(this['_diffRoots']['get'](_0x1e3afb)??this['_baseRoots']['get'](_0x1e3afb))['name'],_0x438157=this['_diffRoots']['get'](_0x1e3afb)||Rt(_0x1e3afb,_0x132a23,!0x1),_0x2e4faa=this['_baseRoots']['get'](_0x1e3afb)||Rt(_0x1e3afb,_0x132a23,!0x1);_0x438157['isAttached']()||_0x2e4faa['isAttached']()?(_0x28f5e3['set'](_0x1e3afb,_0x132a23),_0x229178['insertions'][_0x1e3afb]=bt(_0x438157),_0x229178['deletions'][_0x1e3afb]=bt(_0x2e4faa),this['_copyMarkers'](_0x229178['deletions'][_0x1e3afb],_0x2e4faa),this['_copyMarkers'](_0x229178['insertions'][_0x1e3afb],_0x438157),_0x21318d['insertions'][_0x1e3afb]=this['_generateTape'](this['_idsRoots']['get'](_0x1e3afb),[]),_0x21318d['deletions'][_0x1e3afb]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1e3afb)||Rt(_0x1e3afb,_0x132a23,!0x1),[])):_0x25daf0['delete'](_0x1e3afb);}for(const _0x1b7606 of _0x25daf0){const _0x2a2334=_0x21318d['insertions'][_0x1b7606];for(const _0x25ee51 of _0x2a2334){const _0x5a6fec=this['_getVidAttributeName'](_0x25ee51),_0x10c517=_0x25ee51['item']['getAttribute'](_0x5a6fec);_0x1be5c2['delete'](_0x10c517),_0x10c517>=this['_startingRevisionId']&&_0x22bcf2['set'](_0x10c517,_0x1f6f6f['get'](_0x10c517));}}for(const _0x5ccfd8 of _0x25daf0){const _0x5ea7a6=_0x21318d['insertions'][_0x5ccfd8],_0x1f1698=this['_getBaseVids'](_0x21318d['deletions'][_0x5ccfd8]);let _0x505611=0x0;for(const _0x2e2b32 of _0x5ea7a6){const _0x4639a8=this['_getVidAttributeName'](_0x2e2b32),_0x56ac0b=_0x2e2b32['item']['getAttribute'](_0x4639a8);if(!_0x22bcf2['has'](_0x56ac0b)&&!_0x262067['has'](_0x56ac0b)){if(_0x1be5c2['has'](_0x56ac0b))_0x505611++;else{if(_0x56ac0b!=_0x1f1698[_0x505611]){const _0x556b8c=_0x1f6f6f['get'](_0x56ac0b)||_0x1f6f6f['get'](_0x1f1698[_0x505611]);for(;_0x56ac0b!=_0x1f1698[_0x505611];)_0x1be5c2['has'](_0x1f1698[_0x505611])||(_0x262067['set'](_0x1f1698[_0x505611],_0x556b8c),_0x1f6f6f['set'](_0x1f1698[_0x505611],_0x556b8c)),_0x505611++;}_0x505611++;}}}}for(const _0x3c8458 of _0x25daf0){const _0x16cbcc=_0x21318d['insertions'][_0x3c8458];for(const _0x3c9ea2 of _0x16cbcc){const _0x5b0c34=this['_getVidAttributeName'](_0x3c9ea2),_0x346244=_0x3c9ea2['item']['getAttribute'](_0x5b0c34);if(_0x262067['has'](_0x346244)){const _0x34a673=_0x262067['get'](_0x346244);_0x1be5c2['has'](_0x346244)||_0x1be5c2['set'](_0x346244,{..._0x34a673}),_0x22bcf2['set'](_0x346244,{..._0x34a673});}}}for(const _0x4cb302 of _0x1be5c2['keys']())_0x4cb302>=this['_startingRevisionId']&&_0x1be5c2['delete'](_0x4cb302);const _0x40db2e=new Map();for(const _0xb50ace of _0x25daf0){let _0x3a5b8c=_0x21318d['insertions'][_0xb50ace];for(const _0x2a0b6b of _0x3a5b8c)if(_0x2a0b6b['item']['is']('element','tableCell')){const _0x168f61=this['_getVidAttributeName'](_0x2a0b6b),_0x36be68=_0x2a0b6b['item']['getAttribute'](_0x168f61);if(_0x22bcf2['has'](_0x36be68)){const _0x4fb6a7=_0x2a0b6b['item']['parent']['parent']['getAttribute']('vid_start'),_0x3874a4=_0x40db2e['get'](_0x4fb6a7)||new Set();_0x3874a4['add'](_0x22bcf2['get'](_0x36be68)['userId']),_0x40db2e['set'](_0x4fb6a7,_0x3874a4);}}_0x3a5b8c=_0x21318d['deletions'][_0xb50ace];for(const _0x1c947f of _0x3a5b8c)if(_0x1c947f['item']['is']('element','tableCell')){const _0x354315=this['_getVidAttributeName'](_0x1c947f),_0x4ea1cc=_0x1c947f['item']['getAttribute'](_0x354315);if(_0x1be5c2['has'](_0x4ea1cc)){const _0x1ccc13=_0x1c947f['item']['parent']['parent']['getAttribute']('vid_start'),_0x1fad37=_0x40db2e['get'](_0x1ccc13)||new Set();_0x1fad37['add'](_0x1be5c2['get'](_0x4ea1cc)['userId']),_0x40db2e['set'](_0x1ccc13,_0x1fad37);}}for(const _0xb97c0f of _0x40db2e['keys']())(_0x22bcf2['has'](_0xb97c0f)||_0x1be5c2['has'](_0xb97c0f))&&_0x40db2e['delete'](_0xb97c0f);}for(const _0x33c905 of _0x25daf0){const _0x1d94f3=_0x21318d['insertions'][_0x33c905];let _0x4a4716=null,_0x348872=null;for(const _0x138755 of _0x1d94f3){const _0x5923c4=this['_getVidAttributeName'](_0x138755),_0x2772ef=_0x138755['item']['getAttribute'](_0x5923c4),_0x1ff5e0=_0x40db2e['get'](_0x2772ef);_0x1ff5e0&&'elementStart'==_0x138755['type']&&(_0x4a4716=Array['from'](_0x1ff5e0)[0x0],_0x348872=_0x138755['item']['getAttribute']('vid_end')),_0x4a4716&&(_0x1be5c2['set'](_0x2772ef,{'userId':_0x4a4716}),_0x22bcf2['set'](_0x2772ef,{'userId':_0x4a4716})),_0x2772ef==_0x348872&&(_0x4a4716=null,_0x348872=null);}}const _0x8a52cb={},_0x341878=new Set();for(const _0x211b11 of _0x25daf0){const _0x8bddb8=_0x229178['deletions'][_0x211b11],_0x55c8a6=_0x229178['insertions'][_0x211b11];for(const {userId:_0x3ab57c}of this['_touchedMarkers']['values']())null!==_0x3ab57c&&_0x341878['add'](_0x3ab57c);for(const {userId:_0x2d1ac5}of this['_touchedRoots']['values']())null!==_0x2d1ac5&&_0x341878['add'](_0x2d1ac5);this['_markChanges'](_0x55c8a6,_0x21318d['insertions'][_0x211b11],_0x22bcf2,'insertion',_0x341878),this['_markChanges'](_0x8bddb8,_0x21318d['deletions'][_0x211b11],_0x1be5c2,'deletion',_0x341878),_0x8a52cb[_0x211b11]={'insertions':this['_prepareViewToSave'](_0x55c8a6),'deletions':this['_prepareViewToSave'](_0x8bddb8),'attachChange':this['_touchedRoots']['get'](_0x211b11)||null,'attributesBefore':_0x3f9247(this['_baseRootsAttributes']['get'](_0x211b11))||{},'attributesAfter':_0x3f9247(this['_diffRootsAttributes']['get'](_0x211b11)),'rootElementName':_0x28f5e3['get'](_0x211b11)};}return{'diffData':_0x8a52cb,'authorsIds':Array['from'](_0x341878)};}_processRootBeforeSave(_0x54d141){for(const [,_0x495cac]of _0x54d141['markers']){const _0x228db9=_0x495cac['start']['getAncestors']()['filter'](_0x559a45=>'tableCell'==_0x559a45['name']);for(const _0x137513 of _0x228db9)0x1==_0x137513['childCount']&&_0x137513['getChild'](0x0)['is']('element','paragraph')&&_0x137513['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x27776b){this['_processRootBeforeSave'](_0x27776b);const _0x5c2356=this['editor']['data']['toView'](_0x27776b,{}),_0x251d41=Array['from'](_0x5c2356['getChildren']())['map'](_0x29e795=>this['_getViewJson'](_0x29e795));return JSON['stringify'](_0x251d41);}_getViewJson(_0x46d646){if(_0x46d646['is']('$text'))return _0x46d646['data'];{const _0x3d40e1=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x833e46=_0x46d646,_0xfcdee0=this['editor']['data']['htmlProcessor']['domConverter'],_0x3b30bb={'type':_0x3d40e1['_getTypeCharForViewElement'](_0x833e46),'name':_0x833e46['name'],'attributes':Array['from'](_0x833e46['getAttributes']()),'children':Array['from'](_0x833e46['getChildren']())['map'](_0x33a597=>this['_getViewJson'](_0x33a597))};if(_0x46d646['is']('uiElement')&&'$comment'!=_0x46d646['name']){const _0x1ecd7a=_0x46d646['render'](_0xfcdee0['domDocument'],_0xfcdee0);_0x3b30bb['children']['push'](_0x1ecd7a['outerHTML']);}else{if(_0x46d646['is']('rawElement')){const _0x118ee5=_0xfcdee0['domDocument']['createElement'](_0x833e46['name']);_0x46d646['render'](_0x118ee5,_0xfcdee0),_0x3b30bb['children']['push'](_0x118ee5['innerHTML']);}}const _0x4477a2=Array['from'](_0x833e46['getCustomProperties']());_0x4477a2['length']>0x0&&(_0x3b30bb['customProperties']=_0x4477a2);const _0x4f6ace=_0x833e46['getFillerOffset']();return null!==_0x4f6ace&&(_0x3b30bb['fillerOffset']=_0x4f6ace),_0x3b30bb;}}['_markChanges'](_0x1c5824,_0x248c37,_0x3410cd,_0x38fa1d,_0xdb02db){let _0x233e6d=null,_0x2c67a6=null,_0x47f69a=0x0;const _0x29dcdd=this['editor']['model'];for(let _0x22cc78=0x0;_0x22cc78<_0x248c37['length'];_0x22cc78++){const _0x4c2a23=this['_getVidAttributeName'](_0x248c37[_0x22cc78]),_0x174531=_0x248c37[_0x22cc78]['item']['getAttribute'](_0x4c2a23),_0x217208=_0x3410cd['get'](_0x174531),_0x250c78=_0x22cc78==_0x248c37['length']-0x1;!_0x233e6d&&_0x217208&&(_0x233e6d=_0x217208,_0x2c67a6=_0x248c37[_0x22cc78]),!_0x233e6d||_0x217208&&_0x217208['userId']==_0x233e6d['userId']||(_0x398cca(_0x217208,kt(_0x2c67a6,_0x1c5824,_0x29dcdd),kt(_0x248c37[_0x22cc78],_0x1c5824,_0x29dcdd)),_0x233e6d=_0x217208||null,_0x2c67a6=_0x217208?_0x248c37[_0x22cc78]:null),_0x233e6d&&_0x250c78&&_0x398cca(_0x217208,kt(_0x2c67a6,_0x1c5824,_0x29dcdd),At(_0x248c37[_0x22cc78],_0x1c5824,_0x29dcdd));}function _0x398cca(_0x1f9109,_0x50b144,_0xee800){const _0x5ee173=_0x233e6d['userId'],_0x10fde3='revision:'+_0x38fa1d+':'+_0x5ee173+':'+_0x47f69a++,_0x30edaa=_0x29dcdd['createRange'](_0x50b144,_0xee800);_0x1c5824['markers']['set'](_0x10fde3,_0x30edaa),null!==_0x5ee173&&_0xdb02db['add'](_0x5ee173);}}_getVidAttributeName(_0x431c2d){switch(_0x431c2d['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_fixOperation(_0x47d63f,_0x156008){_0x47d63f['baseVersion']=null;for(const _0xcbdf11 in _0x47d63f){const _0x290c8c=_0x47d63f[_0xcbdf11];if(_0x290c8c instanceof _0x21d9d3){const _0xf2b5c7=_0x156008['get'](_0x290c8c['root']['rootName']);_0x47d63f[_0xcbdf11]=this['_fixPosition'](_0x290c8c,_0xf2b5c7);}if(_0x290c8c instanceof _0x3d14af){const _0x32f297=_0x156008['get'](_0x290c8c['root']['rootName']);_0x47d63f[_0xcbdf11]=this['_fixRange'](_0x290c8c,_0x32f297);}'root'===_0xcbdf11&&(_0x47d63f['root']=_0x156008['get'](_0x47d63f['root']['rootName']));}}['_fixRange'](_0x256fd7,_0x4f0456){return this['editor']['model']['createRange'](this['_fixPosition'](_0x256fd7['start'],_0x4f0456),this['_fixPosition'](_0x256fd7['end'],_0x4f0456));}_fixPosition(_0x4dec99,_0x4e2da9){return this['editor']['model']['createPositionFromPath'](_0x4e2da9,_0x4dec99['path'],_0x4dec99['stickiness']);}_handleInsertOperation(_0x5cb96f){const _0x43bd9e=this['_idsRoots']['get'](_0x5cb96f['position']['root']['rootName']),_0x838322=this['_fixPosition'](_0x5cb96f['position'],_0x43bd9e),_0x1a7117=null===_0x5cb96f['_authorId']?null:_0x5cb96f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x13bbb0=_0x838322['parent'],_0x5d902b=this['_revisionId'],_0x577a21=[];for(const _0x867509 of _0x5cb96f['nodes'])if(_0x867509['is']('element'))_0x577a21['push'](this['_makeIdsRoot'](_0x867509));else{for(let _0x307359=0x0;_0x307359<_0x867509['offsetSize'];_0x307359++)_0x577a21['push'](new _0xcb8530('$text',{'vid':this['_revisionId']++}));}const _0x4db942=this['_revisionId'];for(let _0x1dfed1=_0x5d902b;_0x1dfed1<_0x4db942;_0x1dfed1++)this['_touched']['set'](_0x1dfed1,{'userId':_0x1a7117});_0x13bbb0['_insertChild'](_0x838322['offset'],_0x577a21);}_handleMoveOperation(_0x5ba19a){(_0x5ba19a=this['_cloneOperation'](_0x5ba19a,this['_idsRoots']))['_execute']();const _0x3682bf=null===_0x5ba19a['_authorId']?null:_0x5ba19a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2aa227=_0x5ba19a['getMovedRangeStart'](),_0x231c3c=_0x2aa227['parent'],_0xcfdea7=_0x2aa227['offset'];!function _0x59f866(_0x310778,_0x4c463a,_0x48b301,_0x3d450c){for(let _0x5dec31=_0x48b301;_0x5dec31<_0x3d450c;_0x5dec31++){const _0x25e15c=_0x4c463a['getChild'](_0x5dec31);_0x25e15c['is']('element','$text')?_0x310778['set'](_0x25e15c['getAttribute']('vid'),{'userId':_0x3682bf}):(_0x310778['set'](_0x25e15c['getAttribute']('vid_start'),{'userId':_0x3682bf}),_0x59f866(_0x310778,_0x25e15c,0x0,_0x25e15c['childCount']),_0x310778['set'](_0x25e15c['getAttribute']('vid_end'),{'userId':_0x3682bf}));}}(this['_touched'],_0x231c3c,_0xcfdea7,_0xcfdea7+_0x5ba19a['howMany']);}_handleMergeOperation(_0x471e7d){const _0x5c0998=null===(_0x471e7d=this['_cloneOperation'](_0x471e7d,this['_idsRoots']))['_authorId']?null:_0x471e7d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x25b80c=_0x471e7d['targetPosition']['parent'],_0x53d66b=_0x471e7d['sourcePosition']['parent'],_0x13638b=_0x25b80c['getAttribute']('vid_end'),_0x133a4f=_0x53d66b['getAttribute']('vid_start');_0x25b80c['_setAttribute']('vid_end',_0x53d66b['getAttribute']('vid_end')),_0x53d66b['_setAttribute']('vid_end',_0x13638b),this['_touched']['set'](_0x133a4f,{'userId':_0x5c0998}),this['_touched']['set'](_0x13638b,{'userId':_0x5c0998}),_0x471e7d['_execute']();}_handleSplitOperation(_0x3046d9){const _0x59d8d3=null===(_0x3046d9=this['_cloneOperation'](_0x3046d9,this['_idsRoots']))['_authorId']?null:_0x3046d9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x48b17d=_0x3046d9['graveyardPosition'],_0x39a778=_0x3046d9['splitPosition']['parent'];_0x3046d9['_execute']();const _0x529954=_0x39a778['getAttribute']('vid_end'),_0x35b6bc=_0x3046d9['insertionPosition']['nodeAfter'];if(_0x48b17d){const _0x528d54=_0x35b6bc['getAttribute']('vid_end'),_0x4290f1=_0x39a778['getAttribute']('vid_end');_0x39a778['_setAttribute']('vid_end',_0x528d54),_0x35b6bc['_setAttribute']('vid_end',_0x4290f1),this['_touched']['set'](_0x39a778['getAttribute']('vid_end'),{'userId':_0x59d8d3}),this['_touched']['set'](_0x35b6bc['getAttribute']('vid_start'),{'userId':_0x59d8d3});}else{const _0x2ecb06=this['_revisionId']++,_0x5a7561=this['_revisionId']++;_0x39a778['_setAttribute']('vid_end',_0x2ecb06),_0x35b6bc['_setAttribute']('vid_start',_0x5a7561),_0x35b6bc['_setAttribute']('vid_end',_0x529954),this['_touched']['set'](_0x2ecb06,{'userId':_0x59d8d3}),this['_touched']['set'](_0x5a7561,{'userId':_0x59d8d3});}}_handleMarkerOperation(_0x39cd59){if(!_0x39cd59['affectsData'])return;const _0x54aa80=(_0x39cd59=this['_cloneOperation'](_0x39cd59,this['_diffRoots']))['oldRange']?_0x39cd59['oldRange']['root']:null,_0x27de1b=_0x39cd59['newRange']?_0x39cd59['newRange']['root']:null;_0x54aa80&&this['_markers']['delete'](_0x39cd59['name']),_0x27de1b&&this['_markers']['set'](_0x39cd59['name'],_0x39cd59['newRange']['clone']());const _0x1e07b8=null===_0x39cd59['_authorId']?null:_0x39cd59['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4abbb8=_0x39cd59['name'];if(!this['_touchedMarkers']['has'](_0x4abbb8))return void this['_touchedMarkers']['set'](_0x4abbb8,{'range':_0x39cd59['oldRange'],'userId':_0x1e07b8});const _0x1579ee=this['_touchedMarkers']['get'](_0x4abbb8),_0x28f463=_0x1579ee['range'],_0x363385=_0x39cd59['newRange'];null==_0x28f463&&null==_0x363385||_0x28f463&&_0x363385&&_0x28f463['isEqual'](_0x363385)?this['_touchedMarkers']['delete'](_0x39cd59['name']):_0x1579ee['userId']=_0x1e07b8;}_handleRootOperation(_0x597dd5,_0x1cadae){this['_diffRoots']['has'](_0x597dd5['rootName'])?this['_diffRoots']['get'](_0x597dd5['rootName'])['_isAttached']=_0x597dd5['isAdd']:(this['_diffRoots']['set'](_0x597dd5['rootName'],Rt(_0x597dd5['rootName'],_0x597dd5['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x597dd5['rootName'],{}),_0x1cadae&&this['_idsRoots']['set'](_0x597dd5['rootName'],Rt(_0x597dd5['rootName'],_0x597dd5['elementName'],!0x0)));const _0x13a52b=null===_0x597dd5['_authorId']?null:_0x597dd5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4f7e86=this['_touchedRoots']['get'](_0x597dd5['rootName']);_0x4f7e86&&_0x4f7e86['userId']===_0x13a52b?this['_touchedRoots']['delete'](_0x597dd5['rootName']):this['_touchedRoots']['set'](_0x597dd5['rootName'],{'userId':_0x13a52b,'isAttached':_0x597dd5['isAdd']});}_handleRootAttributeOperation(_0x5e32a9){const _0x4698e9=this['_diffRootsAttributes']['get'](_0x5e32a9['root']['rootName']);null===_0x5e32a9['newValue']?delete _0x4698e9[_0x5e32a9['key']]:_0x4698e9[_0x5e32a9['key']]=_0x5e32a9['newValue'];}};function bt(_0x28e3dc){const _0x4aea63=Rt(_0x28e3dc['rootName'],_0x28e3dc['name'],_0x28e3dc['isAttached']());for(const _0x89216 of _0x28e3dc['getChildren']()){const _0x39e1c2=_0x89216['_clone'](!0x0);_0x4aea63['_appendChild'](_0x39e1c2);}return _0x4aea63;}function Rt(_0x14a652,_0x1e6dc1,_0x58603a=!0x0){const _0x182faa=new _0x5c3819();return _0x182faa['rootName']=_0x14a652,_0x182faa['name']=_0x1e6dc1,_0x182faa['_isAttached']=_0x58603a,_0x182faa['isAttached']=()=>_0x182faa['_isAttached'],_0x182faa;}function kt(_0x2b2d14,_0x4d39b7,_0x32e3eb){const _0x5521dd='elementEnd'==_0x2b2d14['type']?_0x32e3eb['createPositionAt'](_0x2b2d14['item'],'end'):_0x32e3eb['createPositionBefore'](_0x2b2d14['item']);return _0x32e3eb['createPositionFromPath'](_0x4d39b7,_0x5521dd['path'],_0x5521dd['stickiness']);}function At(_0x1151a9,_0x34d292,_0x26d728){const _0x53dbcd='elementStart'==_0x1151a9['type']?_0x26d728['createPositionAt'](_0x1151a9['item'],0x0):_0x26d728['createPositionAfter'](_0x1151a9['item']);return _0x26d728['createPositionFromPath'](_0x34d292,_0x53dbcd['path'],_0x53dbcd['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x5e0967();var Ot=class extends xt{['id'];author;type;data;rootName;constructor(_0x3c24e7){super(),this['id']=_0x3c24e7['id']||_0x2993e9(),this['author']=_0x3c24e7['author'],this['type']=_0x3c24e7['type'],this['data']=_0x3c24e7['data']||{},this['rootName']=_0x3c24e7['rootName'],this['set']('createdAt',_0x3c24e7['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1d36ef,_0x3f77fd){this['newRevisionId']=_0x1d36ef,this['oldRevisionId']=_0x3f77fd,this['changes']=new _0x544893();}_setChanges(_0x382075){for(const _0x4a206b of _0x382075)this['changes']['add'](_0x4a206b);}},Mt=class extends _0x5082f5{repository;adapter=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x38fdbd,_0x3b926e,mt,wt];}constructor(_0xc94607){super(_0xc94607),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',(_0x5da8c1,_0x56afd6,_0x45a8d4)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x34482f=>{for(const _0x3b5f1d of this['editor']['editing']['view']['document']['roots'])_0x45a8d4?_0x34482f['removeClass']('ck-editor__editable__overlay',_0x3b5f1d):_0x34482f['addClass']('ck-editor__editable__overlay',_0x3b5f1d);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3afc6f=>null!==_0x3afc6f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x2f2e64,_0x507529,_0x3627bd)=>_0x2f2e64&&_0x3627bd?_0x507529['changes']['getIndex'](_0x3627bd):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x25deaf,_0x349209)=>_0x25deaf?_0x349209['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3b926e);}init(){const _0x289d0e=this['editor'],_0x5d0c61=new Tt(_0x289d0e,{'direction':'backward'}),_0x5aedf3=new Tt(_0x289d0e,{'direction':'forward'});_0x289d0e['commands']['add']('showPreviousChange',_0x5d0c61),_0x289d0e['commands']['add']('showNextChange',_0x5aedf3),_0x289d0e['commands']['add']('restoreRevision',new Dt(_0x289d0e)),this['on']('change:numberOfChanges',()=>{_0x5d0c61['refresh'](),_0x5aedf3['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x289d0e['enableReadOnlyMode']('revision-viewer'),_0x289d0e['plugins']['has']('WidgetToolbarRepository')&&_0x289d0e['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x28833e){return await this['_utils']['loadRevisionData'](_0x28833e,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x28833e);}async getRevisionRootsAttributes(_0x1d99a2){return await this['_utils']['loadRevisionData'](_0x1d99a2,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1d99a2);}async['compare'](_0x14a609,_0x160a22,_0x57bf93=!0x1){if(!this['isEnabled'])return;const _0x4b81a3=this['diff'],_0x355c45=this['repository'],_0x5d8466='string'==typeof _0x14a609?_0x355c45['getRevision'](_0x14a609):_0x14a609,_0x8c7d11='string'==typeof _0x160a22?_0x355c45['getRevision'](_0x160a22):_0x160a22,_0x3d2e55=_0x5d8466['id'],_0x4bac97=_0x8c7d11?_0x8c7d11['id']:null;if(!_0x57bf93&&this['diff']&&this['diff']['newRevisionId']===_0x3d2e55&&this['diff']['oldRevisionId']===_0x4bac97)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x3d2e55,_0x4bac97);const _0x290fad=this['_getRevisionsRange'](_0x5d8466,_0x8c7d11,!0x0)['map'](_0x25481d=>this['_utils']['loadRevisionData'](_0x25481d,this['adapter']));return _0x290fad['push'](new Promise(_0x4c4bda=>{setTimeout(_0x4c4bda,0x14);})),Promise['all'](_0x290fad)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4029bc=this['_getDiff'](_0x3d2e55,_0x4bac97);for(const _0x541059 of _0x4029bc['changes'])this['_changeIdToChange']['set'](_0x541059['id'],_0x541059);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x528e1d=>{for(const _0x231779 of this['editor']['model']['document']['getRootNames']())_0x528e1d['detachRoot'](_0x231779);for(const _0x4620b9 of Object['keys'](_0x4029bc['model'])){const _0x31741f=_0x4029bc['model'][_0x4620b9]['name'],_0x3f064d=_0x528e1d['addRoot'](_0x4620b9,_0x31741f);for(const _0x33c04e of Object['keys'](_0x4029bc['attributes'][_0x4620b9]))_0x528e1d['setAttribute'](_0x33c04e,_0x4029bc['attributes'][_0x4620b9][_0x33c04e],_0x3f064d);_0x528e1d['insert'](_0x4029bc['model'][_0x4620b9],_0x3f064d,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4029bc['changes'])),this['isReady']=!0x0;})['catch'](_0x779074=>{console['error'](_0x779074),this['_cleanUp'](),_0x4b81a3&&(this['diff']=_0x4b81a3),this['isReady']=!0x0;});}addRevisionData(_0x45b370,_0x45febc){const _0x324362=this['repository']['createRevision'](_0x45b370);return _0x324362['on']('_update',(_0x26c01d,_0xf521cd,_0x2e4db7)=>_0x45febc(_0xf521cd,_0x2e4db7,_0x324362)),this['repository']['addRevision'](_0x324362),_0x324362;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x290e52=>{for(const _0x56ea7b of this['editor']['model']['document']['getRootNames']())_0x290e52['detachRoot'](_0x56ea7b);});}_sortAndFilterDiffChanges(_0x1154f9){const _0xeb84d9=[],_0x26e761=new Map();for(const _0x27f909 of this['editor']['model']['document']['getRootNames']()){const _0x50fe4e=this['editor']['editing']['view']['getDomRoot'](_0x27f909);if(!_0x50fe4e)continue;const _0x4489f8=_0x50fe4e['getClientRects']()['item'](0x0);_0x4489f8&&(_0xeb84d9['push'](_0x27f909),_0x26e761['set'](_0x27f909,_0x4489f8));}return _0xeb84d9['sort']((_0x1cc630,_0x2e0785)=>{const _0x26f14d=_0x26e761['get'](_0x1cc630),_0x1123ed=_0x26e761['get'](_0x2e0785);return _0x26f14d['y']-_0x1123ed['y']||_0x26f14d['x']-_0x1123ed['x'];}),(_0x1154f9=_0x1154f9['filter'](_0x447372=>_0xeb84d9['includes'](_0x447372['rootName'])))['sort']((_0x13d54c,_0x3c99e1)=>_0xeb84d9['indexOf'](_0x13d54c['rootName'])-_0xeb84d9['indexOf'](_0x3c99e1['rootName'])),_0x1154f9;}['_makeTape'](_0x5e02c7){const _0x141de1=Array['from'](_0x5e02c7['markers'])['filter'](([_0x1c6ac2,_0x3d7d00])=>_0x1c6ac2['startsWith']('revision:')&&!_0x3d7d00['isCollapsed']),_0x3445eb=Array['from'](this['editor']['model']['createRangeIn'](_0x5e02c7)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x141de1['length'])for(const _0x2976ec of _0x3445eb){const [_0x1dce0e,_0x3564e7]=_0x141de1[0x0],[,_0x1c08aa,_0xd3f0be]=_0x1dce0e['split'](':');if(_0x3564e7['end']['isEqual'](_0x2976ec['nextPosition'])&&_0x141de1['shift'](),(_0x2976ec['previousPosition']['isEqual'](_0x3564e7['start'])||_0x2976ec['previousPosition']['isAfter'](_0x3564e7['start']))&&('insertion'==_0x1c08aa?_0x2976ec['isAdded']={'userId':_0xd3f0be}:'deletion'==_0x1c08aa&&(_0x2976ec['isRemoved']={'userId':_0xd3f0be})),0x0==_0x141de1['length'])break;}return _0x3445eb;}_refreshStartEndIndex(_0x249cdc){const _0x7f45c4=new Map();for(let _0x15d41e=0x0;_0x15d41e<_0x249cdc['length'];_0x15d41e++)'text'===_0x249cdc[_0x15d41e]['type']?(_0x249cdc[_0x15d41e]['item']['startIndex']=_0x15d41e,_0x249cdc[_0x15d41e]['item']['endIndex']=_0x15d41e):('elementStart'===_0x249cdc[_0x15d41e]['type']?_0x249cdc[_0x15d41e]['item']['startIndex']=_0x15d41e:'elementEnd'===_0x249cdc[_0x15d41e]['type']&&(_0x249cdc[_0x15d41e]['item']['endIndex']=_0x15d41e),_0x7f45c4['set'](_0x249cdc[_0x15d41e]['id'],_0x15d41e));for(const _0xe060c7 of _0x7f45c4['values']())'elementStart'===_0x249cdc[_0xe060c7]['type']?_0x249cdc[_0xe060c7]['item']['endIndex']=_0x7f45c4['get'](_0x249cdc[_0xe060c7]['pairId']):'elementEnd'===_0x249cdc[_0xe060c7]['type']&&(_0x249cdc[_0xe060c7]['item']['startIndex']=_0x7f45c4['get'](_0x249cdc[_0xe060c7]['pairId']));}['_processTape'](_0x1561af){for(let _0xb94af9=0x0;_0xb94af9<_0x1561af['length'];_0xb94af9++){if('elementStart'===_0x1561af[_0xb94af9]['type'])_0x1561af[_0xb94af9]['item']['startIndex']=_0xb94af9;else{if('elementEnd'===_0x1561af[_0xb94af9]['type']){_0x1561af[_0xb94af9]['item']['endIndex']=_0xb94af9;const _0x431358=_0x1561af[_0xb94af9]['item']['startIndex'];_0x1561af[_0x431358]['pairId']=_0x1561af[_0xb94af9]['id'],_0x1561af[_0xb94af9]['pairId']=_0x1561af[_0x431358]['id'];}else _0x1561af[_0xb94af9]['item']['startIndex']=_0xb94af9,_0x1561af[_0xb94af9]['item']['endIndex']=_0xb94af9,_0x1561af[_0xb94af9]['pairId']=null;}_0x1561af[_0xb94af9]['markersStart']||(_0x1561af[_0xb94af9]['markersStart']=[],_0x1561af[_0xb94af9]['markersEnd']=[]);}}_markInsertions(_0xf0caa3,_0x2f7ebe){const _0x332d05=_0xf0caa3['filter'](_0x18a4c9=>!_0x18a4c9['isAdded']);for(let _0x449f07=0x0;_0x449f07<_0x2f7ebe['length'];_0x449f07++)_0x2f7ebe[_0x449f07]['isAdded']&&(_0x332d05[_0x449f07]['isAdded']=_0x2f7ebe[_0x449f07]['isAdded']);}_getDiff(_0x171ecc,_0x198cb5=null){const _0x3e9743=this['repository']['getRevision'](_0x171ecc),_0x57ff69=_0x198cb5?this['repository']['getRevision'](_0x198cb5):null,_0x5cb6ce=this['_getRevisionsRange'](_0x3e9743,_0x57ff69),_0x420033=_0x5cb6ce[_0x5cb6ce['length']-0x1],_0xa3335=new Map(),_0x503cf7={'model':{},'attributes':{},'changes':[]},_0x2087e9=new Set(),_0x381cc1=new Map();for(let _0x317eb9=_0x5cb6ce['length']-0x1;_0x317eb9>=0x0;_0x317eb9--){const _0x1b92e2=_0x5cb6ce[_0x317eb9];for(const _0x306f6b of Object['keys'](_0x1b92e2['diffData']))if(_0x1b92e2['diffData'][_0x306f6b]['attachChange']){const _0x54fe2e=_0x1b92e2['diffData'][_0x306f6b]['attachChange'];_0x54fe2e['isAttached']?(_0x2087e9['add'](_0x306f6b),_0x381cc1['has'](_0x306f6b)&&_0x381cc1['get'](_0x306f6b)['userId']==_0x54fe2e['userId']?_0x381cc1['delete'](_0x306f6b):_0x381cc1['set'](_0x306f6b,_0x54fe2e)):_0x381cc1['has'](_0x306f6b)?(_0x2087e9['delete'](_0x306f6b),_0x381cc1['delete'](_0x306f6b)):(_0x2087e9['add'](_0x306f6b),_0x381cc1['set'](_0x306f6b,_0x54fe2e));}else _0x2087e9['add'](_0x306f6b);}for(const _0x2376e4 of _0x2087e9){const _0x17dbcc=_0x381cc1['has'](_0x2376e4)&&!_0x381cc1['get'](_0x2376e4)['isAttached'];let _0x147cc2=_0x17dbcc?_0x5cb6ce['length']-0x1:0x0;const _0x31b61d=_0x17dbcc?-0x1:0x1;for(;_0x5cb6ce[_0x147cc2];){const _0x3af603=_0x5cb6ce[_0x147cc2];if(_0x3af603['diffData'][_0x2376e4]){const _0x398b59=_0x17dbcc?_0x3af603['diffData'][_0x2376e4]['attributesBefore']:_0x3af603['diffData'][_0x2376e4]['attributesAfter'];_0x503cf7['attributes'][_0x2376e4]=_0x398b59?_0x3f9247(_0x398b59):{};break;}_0x147cc2+=_0x31b61d;}}for(const _0x4a0585 of _0x5cb6ce){_0x4a0585['model']={};for(const _0x4e2c77 of _0x4a0585['authors'])_0xa3335['set'](_0x4e2c77['id'],_0x4e2c77);for(const _0x295dbc of _0x2087e9){const _0x24896d=_0x4a0585['diffData'][_0x295dbc]?_0x4a0585['diffData'][_0x295dbc]['insertions']:'[]',_0x3917ed=_0x4a0585['diffData'][_0x295dbc]?_0x4a0585['diffData'][_0x295dbc]['deletions']:'[]',_0x4c51e1=_0x4a0585['diffData'][_0x295dbc]?.['rootElementName']||'$root';_0x4a0585['model'][_0x295dbc]={'insertions':this['_utils']['_makeModelFromViewString'](_0x24896d,_0x4c51e1),'deletions':this['_utils']['_makeModelFromViewString'](_0x3917ed,_0x4c51e1)};}}for(const _0x3233dc of _0x2087e9){let _0xff2760=null,_0x599329=0x0;const _0x502e92=_0x5cb6ce['map'](_0x14e120=>_0x14e120['diffData'][_0x3233dc]?.['rootElementName'])['find'](_0x8e8f82=>void 0x0!==_0x8e8f82)||'$root',_0x47cb56=new Map(Array['from'](_0x3e9743['model'][_0x3233dc]['insertions']['markers'])['filter'](([_0x25a6a8])=>!_0x25a6a8['startsWith']('revision:')));let _0x38308b=0x0;for(const _0x44920b of _0x5cb6ce){const _0x53fb14=this['_makeTape'](_0x44920b['model'][_0x3233dc]['insertions']);_0x44920b==_0x3e9743?(_0xff2760=_0x53fb14,_0x599329=_0xff2760['length'],_0xff2760['forEach'](_0x2268e5=>{_0x2268e5['id']=_0x38308b++;}),this['_processTape'](_0xff2760)):this['_markInsertions'](_0xff2760,_0x53fb14);const _0x5a2396=_0xff2760['filter'](_0x5262ed=>!_0x5262ed['isAdded'])['map'](_0x3c6534=>_0x3c6534['id']);let _0x2639ce=0x0;const _0x2cddab=this['_makeTape'](_0x44920b['model'][_0x3233dc]['deletions']);_0x2cddab['forEach'](_0x2c9add=>{_0x2c9add['isRemoved']?_0x2c9add['id']=_0x599329++:_0x2c9add['id']=_0x5a2396[_0x2639ce++];}),this['_processTape'](_0x2cddab),this['_setDistance'](_0xff2760,'isAdded'),this['_setDistance'](_0x2cddab,'isRemoved'),_0x44920b==_0x3e9743&&this['_markMarkers'](_0xff2760,_0x47cb56),_0xff2760=this['_joinTapes'](_0xff2760,_0x2cddab),this['_refreshStartEndIndex'](_0xff2760),this['_setDistance'](_0xff2760,'isRemoved');}_0xff2760=_0xff2760['filter'](_0x58a8da=>!(_0x58a8da['isAdded']&&_0x58a8da['isRemoved']));const _0x44654e=new Map(_0x420033['model'][_0x3233dc]['deletions']['markers']),_0x34ea17=new Set(_0x47cb56['keys']());for(const _0x36425a of _0x44654e['keys']())_0x34ea17['delete'](_0x36425a);this['_markSuggestions'](_0xff2760,_0x34ea17),this['_fixObsoleteTags'](_0xff2760),_0xff2760=this['_removeMissingPairs'](_0xff2760),_0xff2760=this['_markMismatchedRemovedTags'](_0xff2760),_0xff2760=this['_removeUnsupportedChanges'](_0xff2760);const {root:_0x5a1fb3,changes:_0x58c91d}=this['_makeModelFromTape'](_0xff2760,_0xa3335,_0x3233dc,_0x502e92);_0x503cf7['model'][_0x3233dc]=_0x5a1fb3;const _0x1a5a0d=_0x381cc1['get'](_0x3233dc);if(_0x1a5a0d){const _0x443495=new Ot({'author':_0xa3335['get'](_0x1a5a0d['userId']),'type':_0x1a5a0d['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x3233dc});_0x58c91d['unshift'](_0x443495),_0x503cf7['attributes'][_0x3233dc]['revisionHistoryAttachChange']=_0x443495['id'];}_0x503cf7['changes']=_0x503cf7['changes']['concat'](_0x58c91d);}return _0x503cf7;}['_markMarkers'](_0x62d064,_0x5b7fa7){for(let _0x24fed5=0x0;_0x24fed5<_0x62d064['length'];_0x24fed5++)for(const [_0x456509,_0x1c2be5]of _0x5b7fa7)!_0x1c2be5['isCollapsed']&&_0x1c2be5['start']['isEqual'](_0x62d064[_0x24fed5]['previousPosition'])&&_0x62d064[_0x24fed5]['markersStart']['push'](_0x456509),_0x1c2be5['end']['isEqual'](_0x62d064[_0x24fed5]['nextPosition'])&&_0x62d064[_0x24fed5]['markersEnd']['push'](_0x456509);}['_joinTapes'](_0x5c3be2,_0x114f67){let _0x17a0f6=[],_0x3a7583=0x0,_0x491040=0x0;for(;_0x3a7583<_0x5c3be2['length']||_0x491040<_0x114f67['length'];){const _0x266d9d=_0x5c3be2[_0x3a7583]||{},_0x27dbb7=_0x114f67[_0x491040]||{};if(_0x266d9d['id']==_0x27dbb7['id'])_0x3a7583++,_0x491040++,_0x17a0f6['push'](_0x266d9d);else{if(_0x27dbb7['isRemoved']&&_0x266d9d['isAdded']){const {commonTape:_0x3659fb,iEnd:_0x1638c0,jEnd:_0xbfc25c}=this['_threeWayMerge'](_0x5c3be2,_0x3a7583,_0x114f67,_0x491040);_0x17a0f6=_0x17a0f6['concat'](_0x3659fb),_0x3a7583=_0x1638c0,_0x491040=_0xbfc25c;}else _0x27dbb7['isRemoved']?(_0x491040++,_0x17a0f6['push'](_0x27dbb7)):(_0x3a7583++,_0x17a0f6['push'](_0x266d9d));}}return _0x17a0f6;}_markSuggestions(_0x157a36,_0x4d0215){const _0x14602c=[];for(let _0x665987=0x0;_0x665987<_0x157a36['length'];_0x665987++){for(let _0x454850=0x0;_0x454850<_0x157a36[_0x665987]['markersStart']['length'];_0x454850++){const _0x3fbadb=_0x157a36[_0x665987]['markersStart'][_0x454850];if(!_0x4d0215['has'](_0x3fbadb))continue;const {group:_0x1c800f,type:_0x32e7ac,authorId:_0xc1ddae}=_0x2092ed(_0x3fbadb);'revision-suggestion'!=_0x1c800f||'insertion'!=_0x32e7ac&&'deletion'!=_0x32e7ac||(_0x14602c['unshift']({'type':_0x32e7ac,'name':_0x3fbadb,'userId':_0xc1ddae}),_0x157a36[_0x665987]['markersStart']['splice'](_0x454850,0x1),_0x454850--);}_0x1b0dab(_0x157a36[_0x665987]);for(let _0x33e82c=0x0;_0x33e82c<_0x157a36[_0x665987]['markersEnd']['length'];_0x33e82c++){const _0x38c3d5=_0x157a36[_0x665987]['markersEnd'][_0x33e82c];if(!_0x4d0215['has'](_0x38c3d5))continue;const {group:_0x36d343,type:_0x1bf83c}=_0x2092ed(_0x38c3d5);if('revision-suggestion'!=_0x36d343||'insertion'!=_0x1bf83c&&'deletion'!=_0x1bf83c)continue;_0x157a36[_0x665987]['markersEnd']['splice'](_0x33e82c,0x1),_0x33e82c--;const _0x3e7e48=_0x14602c['findIndex'](_0x32d513=>_0x32d513['name']==_0x38c3d5);_0x3e7e48>-0x1&&_0x14602c['splice'](_0x3e7e48,0x1);}}function _0x2092ed(_0x5d174e){const _0x1d116=_0x5d174e['split'](':');return{'group':_0x1d116[0x0],'type':_0x1d116[0x1],'subType':_0x1d116['length']>=0x5?_0x1d116[0x2]:null,'id':_0x1d116['length']<0x5?_0x1d116[0x2]:_0x1d116[0x3],'authorId':_0x1d116['length']<0x5?_0x1d116[0x3]:_0x1d116[0x4],'markerCount':0x6==_0x1d116['length']?_0x1d116[0x5]:null};}function _0x1b0dab(_0x465489){for(let _0x2b15ad=0x0;_0x2b15ad<_0x14602c['length'];_0x2b15ad++){if(_0x465489['isAdded']&&'insertion'==_0x14602c[_0x2b15ad]['type']&&_0x465489['isAdded']['userId']==_0x14602c[_0x2b15ad]['userId'])return _0x465489['isAddSuggestion']=_0x14602c[_0x2b15ad],void delete _0x465489['isAdded'];if(!_0x465489['isAdded']&&!_0x465489['isRemoved']&&'deletion'==_0x14602c[_0x2b15ad]['type'])return void(_0x465489['isRemoveSuggestion']=_0x14602c[_0x2b15ad]);}}}_setDistance(_0x80b7c,_0x1d67da){let _0x1a53ae=0x0,_0x10f243=!0x1;const _0x4774c6=new Map();for(const _0xa8041a of _0x80b7c)_0xa8041a[_0x1d67da]?_0x10f243&&(_0x1a53ae++,_0x10f243=!0x1):(_0x1a53ae++,_0x10f243=!0x0),_0x4774c6['set'](_0xa8041a['id'],_0x1a53ae);for(let _0x56a03a=0x0;_0x56a03a<_0x80b7c['length'];_0x56a03a++){if('isRemoved'==_0x1d67da&&_0x80b7c[_0x56a03a]['isAdded']||'isAdded'==_0x1d67da&&_0x80b7c[_0x56a03a]['isRemoved'])continue;if('text'==_0x80b7c[_0x56a03a]['type']){_0x80b7c[_0x56a03a]['distance']=0x0;continue;}const _0x2734c4=_0x4774c6['get'](_0x80b7c[_0x56a03a]['pairId']),_0x15692=_0x4774c6['get'](_0x80b7c[_0x56a03a]['id']);_0x80b7c[_0x56a03a]['distance']=_0x2734c4-_0x15692;}}_getRevisionsRange(_0x2f4550,_0x4abdfd,_0x1a49ac=!0x1){const _0x58749f=[];let _0x455bd4=this['repository']['getIndex'](_0x2f4550),_0x4db93d=this['repository']['getIndex'](_0x4abdfd);for(-0x1==_0x4db93d&&(_0x4db93d=this['repository']['_revisions']['length'],_0x1a49ac=!0x1);_0x455bd4<_0x4db93d;)_0x58749f['push'](this['repository']['getRevision'](_0x455bd4)),_0x455bd4++;return _0x1a49ac&&_0x58749f['push'](this['repository']['getRevision'](_0x455bd4)),_0x58749f;}_threeWayMerge(_0x393218,_0x30d25b,_0x56973a,_0x4df9c1){const _0x593789=this['editor']['model']['schema'];let _0x16f6f2=_0x30d25b;for(;_0x393218[_0x16f6f2]&&_0x393218[_0x16f6f2]['isAdded'];)_0x16f6f2++;let _0x18e866=_0x4df9c1;for(;_0x56973a[_0x18e866]&&_0x56973a[_0x18e866]['isRemoved'];)_0x18e866++;_0xaa6108(_0x393218,_0x30d25b,_0x16f6f2),_0xaa6108(_0x56973a,_0x4df9c1,_0x18e866);const _0x3b0062=_0x56973a['slice'](_0x4df9c1,_0x18e866)['concat'](_0x393218['slice'](_0x30d25b,_0x16f6f2));return _0x3b0062['sort']((_0x5928e4,_0x5ac225)=>_0x5928e4['side']!=_0x5ac225['side']?_0x5928e4['side']-_0x5ac225['side']:_0x5928e4['level']!=_0x5ac225['level']?_0x5928e4['level']-_0x5ac225['level']:_0x5928e4['distance']!=_0x5ac225['distance']?_0x5ac225['distance']-_0x5928e4['distance']:!!_0x5928e4['isAdded']!=!!_0x5ac225['isAdded']?-0x1==_0x5928e4['side']||0x0==_0x5928e4['side']?_0x5928e4['isAdded']?-0x1:0x1:_0x5928e4['isAdded']?0x1:-0x1:_0x5928e4['index']-_0x5ac225['index']),{'commonTape':_0x3b0062,'iEnd':_0x16f6f2,'jEnd':_0x18e866};function _0xaa6108(_0x2c6619,_0x470138,_0x570557){let _0x7c06e0=-0x1,_0x34bd12=Number['POSITIVE_INFINITY'],_0x4b1d78=!0x0;for(let _0x2afdea=_0x470138;_0x2afdea<_0x570557;_0x2afdea++)if(_0x593789['isInline'](_0x2c6619[_0x2afdea]['item'])||(_0x4b1d78=!0x1),_0x2c6619[_0x2afdea]['item']['startIndex']<_0x470138&&(_0x7c06e0=_0x2afdea),_0x2c6619[_0x2afdea]['item']['endIndex']>=_0x570557){_0x34bd12=_0x2afdea;break;}_0x4b1d78&&(_0x7c06e0=_0x570557-0x1);for(let _0x5f48df=_0x470138;_0x5f48df<_0x570557;_0x5f48df++)_0x2c6619[_0x5f48df]['side']=_0x5f48df<=_0x7c06e0?-0x1:_0x5f48df<_0x34bd12?0x0:0x1,_0x2c6619[_0x5f48df]['index']=_0x5f48df;let _0x421e33=0x0;for(let _0x384737=_0x470138;_0x384737<=_0x7c06e0;_0x384737++)0x0==_0x2c6619[_0x384737]['distance']?_0x2c6619[_0x384737]['level']=_0x421e33:(_0x421e33++,_0x2c6619[_0x384737]['level']=_0x421e33,_0x421e33++);for(let _0x5acaf0=_0x470138;_0x5acaf0<_0x570557;_0x5acaf0++)0x0==_0x2c6619[_0x5acaf0]['side']&&(_0x2c6619[_0x5acaf0]['level']=_0x421e33);_0x421e33=0x0;for(let _0x107b17=_0x570557-0x1;_0x107b17>=_0x34bd12;_0x107b17--)0x0==_0x2c6619[_0x107b17]['distance']?_0x2c6619[_0x107b17]['level']=_0x421e33:(_0x421e33--,_0x2c6619[_0x107b17]['level']=_0x421e33,_0x421e33--);}}_fixObsoleteTags(_0x34bedc){const _0x134460=new Map(),_0x50a744=this['editor']['model']['schema'];for(let _0x2c4a2c=0x1;_0x2c4a2c<_0x34bedc['length'];_0x2c4a2c++){let _0x49fe09,_0x252e96,_0x445dba;const _0x5e6d67=_0x34bedc[_0x2c4a2c],_0x3f53fd=_0x34bedc[_0x2c4a2c-0x1];if('text'==_0x5e6d67['type'])continue;if(_0x5e6d67['type']!=_0x3f53fd['type'])continue;if(!_0x50a744['isBlock'](_0x3f53fd['item'])||_0x50a744['isLimit'](_0x3f53fd['item']))continue;if(!_0x50a744['isBlock'](_0x5e6d67['item'])||_0x50a744['isLimit'](_0x5e6d67['item']))continue;if((_0x34bedc[_0x2c4a2c]['isAdded']||_0x34bedc[_0x2c4a2c]['isAddSuggestion'])&&_0x34bedc[_0x2c4a2c-0x1]['isRemoved'])_0x49fe09=_0x34bedc[_0x2c4a2c],_0x252e96=_0x34bedc[_0x2c4a2c-0x1],_0x445dba=_0x2c4a2c-0x1;else{if(!_0x34bedc[_0x2c4a2c]['isRemoved']||!_0x34bedc[_0x2c4a2c-0x1]['isAdded']&&!_0x34bedc[_0x2c4a2c-0x1]['isAddSuggestion'])continue;_0x49fe09=_0x34bedc[_0x2c4a2c-0x1],_0x252e96=_0x34bedc[_0x2c4a2c],_0x445dba=_0x2c4a2c;}const _0x4724d2=_0x49fe09['level']==_0x252e96['level'],_0xeb56e5=Math['abs'](_0x49fe09['level'])<Math['abs'](_0x252e96['level'])&&0x0==_0x252e96['distance'];(_0x4724d2||_0xeb56e5)&&(_0x134460['set'](_0x252e96['id'],_0x49fe09['id']),_0x34bedc['splice'](_0x445dba,0x1),_0x2c4a2c--,_0x49fe09['isAdded']=!0x1);}for(let _0x547a19=0x0;_0x547a19<_0x34bedc['length'];_0x547a19++)_0x134460['has'](_0x34bedc[_0x547a19]['pairId'])&&(_0x34bedc[_0x547a19]['pairId']=_0x134460['get'](_0x34bedc[_0x547a19]['pairId']));}['_removeMissingPairs'](_0x28a2dd){const _0x129843=new Set(_0x28a2dd['map'](_0x9b1d9f=>_0x9b1d9f['id']));for(let _0x245383=0x0;_0x245383<_0x28a2dd['length'];_0x245383++)_0x129843['has'](_0x28a2dd[_0x245383]['pairId'])||0x0==_0x28a2dd[_0x245383]['distance']||(_0x28a2dd[_0x245383]['isIncorrect']=!0x0);return _0x28a2dd['filter'](_0x4642cc=>!_0x4642cc['isIncorrect']);}_markMismatchedRemovedTags(_0x519975){const _0x333eb5=new Set();for(let _0x3af3b7=0x0;_0x3af3b7<_0x519975['length'];_0x3af3b7++){if(_0x333eb5['has'](_0x519975[_0x3af3b7]['id'])&&_0x519975[_0x3af3b7]['isRemoved']&&(_0x519975[_0x3af3b7]['isIncorrect']=!0x0),_0x519975[_0x3af3b7]['isIncorrect'])continue;if(0x0==_0x519975[_0x3af3b7]['distance'])continue;if('elementStart'!=_0x519975[_0x3af3b7]['type'])continue;if(null==_0x519975[_0x3af3b7]['pairId'])continue;let _0x520b0c=_0x3af3b7+0x1,_0x168121=0x0;for(;_0x519975[_0x520b0c]['id']!=_0x519975[_0x3af3b7]['pairId'];)'elementStart'==_0x519975[_0x520b0c]['type']?_0x168121++:'elementEnd'==_0x519975[_0x520b0c]['type']&&_0x168121--,_0x520b0c++;if(0x0!=_0x168121){if(_0x519975[_0x3af3b7]['isRemoved'])_0x519975[_0x3af3b7]['isIncorrect']=!0x0;else{for(;_0x520b0c!=_0x3af3b7;)_0x519975[_0x520b0c]['isRemoved']&&0x0!=_0x519975[_0x520b0c]['distance']&&(_0x519975[_0x520b0c]['isIncorrect']=!0x0,_0x333eb5['add'](_0x519975[_0x520b0c]['pairId'])),_0x520b0c--;}}}return _0x519975['filter'](_0x3bfaeb=>!_0x3bfaeb['isIncorrect']);}_removeUnsupportedChanges(_0x354ef4){const _0x253449=this['editor']['model']['schema'];for(let _0x21939c=0x0;_0x21939c<_0x354ef4['length'];_0x21939c++){if(!(_0x354ef4[_0x21939c]['isAdded']||_0x354ef4[_0x21939c]['isAddSuggestion']||_0x354ef4[_0x21939c]['isRemoved']||_0x354ef4[_0x21939c]['isRemoveSuggestion']))continue;if(0x0==_0x354ef4[_0x21939c]['distance'])continue;const _0x8f35a0=_0x354ef4[_0x21939c]['item'];_0x253449['isBlock'](_0x8f35a0)||_0x253449['isLimit'](_0x8f35a0)||(_0x354ef4[_0x21939c]['isAdded']&&delete _0x354ef4[_0x21939c]['isAdded'],_0x354ef4[_0x21939c]['isAddSuggestion']&&delete _0x354ef4[_0x21939c]['isAddSuggestion'],_0x354ef4[_0x21939c]['isRemoveSuggestion']&&delete _0x354ef4[_0x21939c]['isRemoveSuggestion'],_0x354ef4[_0x21939c]['isRemoved']&&(_0x354ef4[_0x21939c]['isIncorrect']=!0x0));}return _0x354ef4['filter'](_0x32b44e=>!_0x32b44e['isIncorrect']);}['_makeModelFromTape'](_0x4fa6d7,_0x256059,_0x352d43,_0x187e8e){const _0x8cec2e=new _0x5c3819(),_0x352627=[],_0x560d03=new Map(),_0x5f1306=this['editor']['model'],_0x44315f=_0x5f1306['schema'],_0x4d1224=[_0x8cec2e],_0x5f0afb={},_0x30583a={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x8cec2e['name']=_0x187e8e;let _0x2f7a7f=null;const _0x4408cc=[0x0];for(let _0x36753f=0x0;_0x36753f<_0x4fa6d7['length'];_0x36753f++)if('elementStart'===_0x4fa6d7[_0x36753f]['type']){_0x4fa6d7[_0x36753f]['previousPosition']=_0x5f1306['createPositionFromPath'](_0x8cec2e,_0x4408cc);const _0x1f7511=new _0xcb8530(_0x4fa6d7[_0x36753f]['item']['name'],_0x4fa6d7[_0x36753f]['item']['getAttributes']());_0x4d1224[0x0]['_appendChild'](_0x1f7511),_0x4408cc['push'](0x0),_0x4d1224['unshift'](_0x1f7511),_0x4fa6d7[_0x36753f]['nextPosition']=_0x5f1306['createPositionFromPath'](_0x8cec2e,_0x4408cc);}else'elementEnd'===_0x4fa6d7[_0x36753f]['type']?(_0x4d1224['shift'](),_0x4fa6d7[_0x36753f]['previousPosition']=_0x5f1306['createPositionFromPath'](_0x8cec2e,_0x4408cc),_0x4408cc['pop'](),_0x4408cc[_0x4408cc['length']-0x1]++,_0x4fa6d7[_0x36753f]['nextPosition']=_0x5f1306['createPositionFromPath'](_0x8cec2e,_0x4408cc)):(_0x4fa6d7[_0x36753f]['previousPosition']=_0x5f1306['createPositionFromPath'](_0x8cec2e,_0x4408cc),_0x2f7a7f?_0x2f7a7f['_data']+=_0x4fa6d7[_0x36753f]['item']['data']:_0x2f7a7f=new _0x357175(_0x4fa6d7[_0x36753f]['item']['data'],_0x4fa6d7[_0x36753f]['item']['getAttributes']()),_0x4fa6d7[_0x36753f+0x1]&&'text'===_0x4fa6d7[_0x36753f+0x1]['type']&&_0x460edc(_0x2f7a7f,_0x4fa6d7[_0x36753f+0x1]['item'])||(_0x4d1224[0x0]['_appendChild'](_0x2f7a7f),_0x2f7a7f=null),_0x4408cc[_0x4408cc['length']-0x1]+=_0x4fa6d7[_0x36753f]['item']['offsetSize'],_0x4fa6d7[_0x36753f]['nextPosition']=_0x5f1306['createPositionFromPath'](_0x8cec2e,_0x4408cc));for(let _0x26f9fd=0x0;_0x26f9fd<_0x4fa6d7['length'];_0x26f9fd++){const _0x312687=_0x4fa6d7[_0x26f9fd]['previousPosition'],_0x301ab8=_0x4fa6d7[_0x26f9fd]['nextPosition'];for(const _0xa9d9b of _0x4fa6d7[_0x26f9fd]['markersStart'])_0x560d03['set'](_0xa9d9b,{'start':_0x312687,'end':null});_0x1133e3('isRemoveSuggestion',_0x26f9fd,_0x312687,_0x301ab8),_0x1133e3('isAddSuggestion',_0x26f9fd,_0x312687,_0x301ab8),_0x1133e3('isRemoved',_0x26f9fd,_0x312687,_0x301ab8),_0x1133e3('isAdded',_0x26f9fd,_0x312687,_0x301ab8);for(const _0x250d9e of _0x4fa6d7[_0x26f9fd]['markersEnd']){const _0x4dcaec=_0x560d03['get'](_0x250d9e);_0x4dcaec?_0x4dcaec['end']=_0x301ab8:_0x560d03['set'](_0x250d9e,{'start':_0x301ab8,'end':_0x301ab8});}}for(const [_0x5e119a,_0x5d0969]of _0x560d03){const _0x5d0bb6=this['editor']['model']['createRange'](_0x5d0969['start'],_0x5d0969['end']);_0x8cec2e['markers']['set'](_0x5e119a,_0x5d0bb6);}return _0x352627['sort']((_0x14ee73,_0xfd517b)=>{const _0x289b72=_0x8cec2e['markers']['get']('revision:'+_0x14ee73['id']),_0xe84d2e=_0x8cec2e['markers']['get']('revision:'+_0xfd517b['id']);return _0x289b72['start']['isBefore'](_0xe84d2e['start'])?-0x1:_0x289b72['start']['isAfter'](_0xe84d2e['start'])?0x1:_0x289b72['end']['isBefore'](_0xe84d2e['end'])?-0x1:_0x289b72['end']['isAfter'](_0xe84d2e['end'])?0x1:'add'===_0x14ee73['type']?-0x1:0x1;}),{'root':_0x8cec2e,'changes':_0x352627};function _0x1133e3(_0x26f9b1,_0x5b2b19,_0x4df62b,_0x2e8e57){const _0x29cd50=!!_0x4fa6d7[_0x5b2b19][_0x26f9b1],_0x244f6a=_0x29cd50?_0x4fa6d7[_0x5b2b19][_0x26f9b1]['userId']:null,_0xfeed52=_0x5b2b19===_0x4fa6d7['length']-0x1,_0x18ca56=_0x30583a[_0x26f9b1][0x0],_0x1b0cfb=_0x44315f['isObject'](_0x4fa6d7[_0x5b2b19]['item']);!_0x5f0afb[_0x26f9b1]&&_0x29cd50?_0x5f0afb[_0x26f9b1]={'start':_0x4df62b,'tapeItem':_0x4fa6d7[_0x5b2b19],'userId':_0x244f6a,'type':_0x26f9b1}:_0x5f0afb[_0x26f9b1]&&!_0x29cd50?(_0x5f0afb[_0x26f9b1]['end']=_0x4df62b,_0xb7c0b9(_0x5f0afb[_0x26f9b1]),_0x5f0afb[_0x26f9b1]=null):_0x5f0afb[_0x26f9b1]&&_0x29cd50&&_0x5f0afb[_0x26f9b1]['userId']!==_0x244f6a&&(_0x5f0afb[_0x26f9b1]['end']=_0x4df62b,_0x18ca56&&_0x18ca56['userId']===_0x5f0afb[_0x26f9b1]['userId']||_0xb7c0b9(_0x5f0afb[_0x26f9b1]),_0x5f0afb[_0x26f9b1]={'start':_0x4df62b,'tapeItem':_0x4fa6d7[_0x5b2b19],'userId':_0x244f6a,'type':_0x26f9b1}),_0x5f0afb[_0x26f9b1]&&_0x1b0cfb&&('elementStart'!==_0x4fa6d7[_0x5b2b19]['type']||_0x18ca56&&_0x18ca56['userId']===_0x244f6a||_0x30583a[_0x26f9b1]['unshift']({'userId':_0x244f6a,'object':_0x4fa6d7[_0x5b2b19]['item'],'change':_0x5f0afb[_0x26f9b1]}),'elementEnd'===_0x4fa6d7[_0x5b2b19]['type']&&_0x18ca56&&_0x18ca56['object']===_0x4fa6d7[_0x5b2b19]['item']&&(_0x30583a[_0x26f9b1]['shift'](),_0x5f0afb[_0x26f9b1]=_0x18ca56['change'])),_0x5f0afb[_0x26f9b1]&&_0xfeed52&&(_0x5f0afb[_0x26f9b1]['end']=_0x2e8e57,_0xb7c0b9(_0x5f0afb[_0x26f9b1]),_0x5f0afb[_0x26f9b1]=null);}function _0xb7c0b9({start:_0x2e35db,end:_0x480412,tapeItem:_0x2b79e0,userId:_0x3374ac,type:_0x1ab36d}){const _0x350e48=_0x2b79e0['item'],_0x3753d0=_0x5f1306['schema']['isBlock'](_0x350e48)&&!_0x5f1306['schema']['isLimit'](_0x350e48),_0x3f55e8=_0x2e35db['nodeAfter']==_0x480412['parent']&&_0x480412['isAtStart'];if(_0x3753d0&&_0x3f55e8)return;const _0x1ee57c=_0x5f1306['createRange'](_0x2e35db,_0x480412),_0x1265cf=new Ot({'author':_0x256059['get'](_0x3374ac),'type':'isAdded'==_0x1ab36d||'isAddSuggestion'==_0x1ab36d?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x1ab36d||'isRemoveSuggestion'==_0x1ab36d},'createdAt':new Date(),'rootName':_0x352d43});_0x352627['push'](_0x1265cf),_0x8cec2e['markers']['set']('revision:'+_0x1265cf['id'],_0x1ee57c);}function _0x460edc(_0x33b271,_0x20e7ac){const _0x584b2f=_0x33b271['getAttributes'](),_0x1882c0=_0x20e7ac['getAttributes']();for(const _0x195894 of _0x584b2f){if(_0x195894[0x1]!==_0x20e7ac['getAttribute'](_0x195894[0x0]))return!0x1;_0x1882c0['next']();}return _0x1882c0['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xfd291a=>{const _0x519819=_0xfd291a['markerName']['split'](':')[0x1],_0x4f2a3c=this['_getChangeFromId'](_0x519819);if(!_0x4f2a3c)return null;const _0x56fb84='add'==_0x4f2a3c['type']?'insertion':'deletion',_0x1f0e8f=['ck-suggestion-marker','ck-suggestion-marker-'+_0x56fb84];return _0x4f2a3c['data']['isSuggestion']&&_0x1f0e8f['push']('ck-suggestion-marker-'+_0x56fb84+'-new'),this['activeChange']==_0x4f2a3c&&_0x1f0e8f['push']('ck-suggestion-marker--active'),{'classes':_0x1f0e8f,'attributes':{'data-change-id':_0x519819}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x198472=>{_0x198472['on']('element:pre',(_0x66156f,_0x412be2,_0x27ae46)=>{const _0x35b9cd=_0x412be2['viewItem']['getChild'](0x0);if(!_0x35b9cd||!_0x35b9cd['is']('element','code'))return;if(!_0x27ae46['consumable']['consume'](_0x35b9cd,{'attributes':['vid_start','vid_end']}))return;const _0x2e34cd=_0x412be2['modelRange']['start']['nodeAfter'];_0x27ae46['writer']['setAttribute']('vid_start',_0x35b9cd['getAttribute']('vid_start'),_0x2e34cd),_0x27ae46['writer']['setAttribute']('vid_end',_0x35b9cd['getAttribute']('vid_end'),_0x2e34cd);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x2d0d48=>{_0x2d0d48['on']('element',(_0x1e0f8b,_0x281b15,_0x134d8e)=>{if(!_0x134d8e['consumable']['consume'](_0x281b15['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x281b15['modelRange']['isCollapsed'])return;const _0x1d38aa=_0x281b15['modelRange']['start']['nodeAfter'];_0x1d38aa['hasAttribute']('vid_start')||_0x1d38aa['hasAttribute']('vid')||(_0x134d8e['writer']['setAttribute']('vid_start',_0x281b15['viewItem']['getAttribute']('vid_start'),_0x1d38aa),_0x134d8e['writer']['setAttribute']('vid_end',_0x281b15['viewItem']['getAttribute']('vid_end'),_0x1d38aa));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2b73cb=>_0x2b73cb['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4c1c58,[,_0x5c5f78])=>{['vid_start','vid_end','vid']['includes'](_0x5c5f78)&&(_0x4c1c58['return']=!0x0,_0x4c1c58['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x297a91=>{_0x297a91['on']('attribute:vid',(_0x4b2b66,_0x41db79,_0x3692fa)=>{if('\x20'!=_0x41db79['item']['data']||_0x41db79['item']['parent']['maxOffset']>0x1)return;if(!_0x3692fa['consumable']['consume'](_0x41db79['item'],_0x4b2b66['name']))return;const _0x33bead=_0x3692fa['writer'],_0x1f2ae9=_0x3692fa['mapper']['toViewRange'](_0x41db79['range']);_0x33bead['wrap'](_0x1f2ae9,_0x33bead['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x564876){const _0x5a5f2b=_0x564876['plugins']['get']('RevisionViewer');return(_0x59f78c,_0x115f28,_0x3dfbdb)=>{const _0x16f968=_0x115f28['markerName']['split'](':')[0x1],_0xdfb57c=_0x5a5f2b['_getChangeFromId'](_0x16f968);if(!_0xdfb57c)return null;const _0x53d48b='add'==_0xdfb57c['type']?'split':'merge';if(!_0x3dfbdb['consumable']['test'](_0x115f28['markerRange'],_0x59f78c['name']))return;const _0x49ceb3=_0x115f28['markerRange']['getWalker'](),_0x181caa=_0x115f28['markerRange']['start'],_0x3c4cd3=_0x564876['model']['schema'];let _0x152dda=null,_0x3af529=null,_0x460e31=!0x1,_0x8afbdf=!0x1;for(const _0x4a2f3e of _0x49ceb3){const _0x2c2955=_0x4a2f3e['item'];_0x460e31=_0x460e31||_0x3c4cd3['isContent'](_0x2c2955);const _0x47f605=_0x3dfbdb['mapper']['toViewElement'](_0x2c2955);if(_0x47f605&&_0x47f605['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4a2f3e['type']&&(_0x3c4cd3['isBlock'](_0x2c2955)&&!_0x3c4cd3['isLimit'](_0x2c2955)&&(_0x2c2955['nextSibling']||_0x181caa['isAtEnd']?_0x152dda&&_0x152dda['parent']==_0x2c2955||(_0x152dda=_0x2c2955,_0x28a08f(_0x4a2f3e['previousPosition']),_0x8afbdf=!0x0):_0x3af529=_0x3af529||_0x4a2f3e['previousPosition']));}function _0x28a08f(_0xa51aeb){const _0x42fcce=_0x3dfbdb['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x53d48b}),_0x552691=_0x3dfbdb['mapper']['toViewPosition'](_0xa51aeb);_0xdfb57c['data']['isSuggestion']&&_0x3dfbdb['writer']['addClass']('ck-suggestion-marker-'+_0x53d48b+'-new',_0x42fcce),_0x5a5f2b['activeChange']==_0xdfb57c&&_0x3dfbdb['writer']['addClass']('ck-suggestion-marker--active',_0x42fcce),_0x3dfbdb['writer']['insert'](_0x552691,_0x42fcce),_0x3dfbdb['mapper']['bindElementToMarker'](_0x42fcce,_0x115f28['markerName']);}_0x460e31||_0x8afbdf||!_0x3af529||_0x28a08f(_0x3af529);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x397273,_0x2e5f4f,_0x113015)=>{const _0xf271e7=_0x113015['mapper']['markerNameToElements'](_0x2e5f4f['markerName']);if(_0xf271e7){for(const _0x1ffd16 of _0xf271e7)(_0x1ffd16['hasClass']('ck-suggestion-marker-split')||_0x1ffd16['hasClass']('ck-suggestion-marker-merge'))&&(_0x113015['mapper']['unbindElementFromMarkerName'](_0x1ffd16,_0x2e5f4f['markerName']),_0x113015['writer']['remove'](_0x1ffd16));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3c6fc1,_0x2eb1db,_0x714d5e)=>{const _0x1cd008=_0x2eb1db['markerName']['split'](':')[0x1],_0x3f913e=this['_getChangeFromId'](_0x1cd008);if(!_0x3f913e)return null;const _0x5e878a='add'==_0x3f913e['type']?'split':'merge';if(_0x714d5e['consumable']['test'](_0x2eb1db['markerRange'],_0x3c6fc1['name']))for(const _0x15719a of _0x2eb1db['markerRange']['getItems']()){if(!_0x15719a['is']('element','softBreak'))continue;const _0x536048=_0x714d5e['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5e878a}),_0x52a3b4=_0x714d5e['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x15719a));_0x3f913e['data']['isSuggestion']&&_0x714d5e['writer']['addClass']('ck-suggestion-marker-'+_0x5e878a+'-new',_0x536048),this['activeChange']==_0x3f913e&&_0x714d5e['writer']['addClass']('ck-suggestion-marker--active',_0x536048),_0x714d5e['writer']['insert'](_0x52a3b4,_0x536048),_0x714d5e['mapper']['bindElementToMarker'](_0x536048,_0x2eb1db['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0xe2a64a=>{for(const _0x1e9988 of this['editor']['model']['document']['getRootNames']()){const _0x40fd85=this['editor']['model']['document']['getRoot'](_0x1e9988),_0x1710bb=this['editor']['editing']['view']['document']['getRoot'](_0x1e9988);if(_0x1710bb){const _0x265ff0=_0x40fd85['getAttribute']('revisionHistoryAttachChange');if(_0xe2a64a['removeAttribute']('data-change-id',_0x1710bb),_0xe2a64a['removeClass']('ck-revision-history-root-add',_0x1710bb),_0xe2a64a['removeClass']('ck-revision-history-root-remove',_0x1710bb),_0xe2a64a['removeClass']('ck-revision-history-root--active',_0x1710bb),_0x265ff0){const _0xd934df=this['_getChangeFromId'](_0x265ff0);if(!_0xd934df)return null;_0xe2a64a['setAttribute']('data-change-id',_0x265ff0,_0x1710bb),_0xe2a64a['addClass']('ck-revision-history-root-'+_0xd934df['type'],_0x1710bb),this['activeChange']==_0xd934df&&_0xe2a64a['addClass']('ck-revision-history-root--active',_0x1710bb);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x441176=>'revision-comment:'+_0x441176,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1608aa=>'revision-suggestion:'+_0x1608aa,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x38c938=>({'name':'suggestion:'+_0x38c938,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4e147d=>{const _0x164d42=_0x4e147d['markerName']['split'](':')[0x1];return'insertion'!=_0x164d42&&'deletion'!=_0x164d42?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x164d42]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x349f70,_0x32071b,_0x277ae2)=>{const _0x2ceacb=_0x277ae2['mapper']['markerNameToElements'](_0x32071b['markerName']);if(_0x2ceacb){for(const _0x4e7dfc of _0x2ceacb)_0x4e7dfc['is']('uiElement')&&(_0x277ae2['mapper']['unbindElementFromMarkerName'](_0x4e7dfc,_0x32071b['markerName']),_0x277ae2['writer']['remove'](_0x4e7dfc));}},{'priority':'high'});}_getChangeFromId(_0x4b7620){return this['_changeIdToChange']['get'](_0x4b7620);}_getViewForChange(_0x59e577){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x59e577),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x629692,_0xd8a63c,_0x57307b,_0x2c4913)=>{_0x2c4913&&this['_balloon']['remove'](_0x2c4913),_0x57307b&&(this['_balloon']['add']({'view':_0x57307b,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x3161fe=this['editor']['editing'],_0x3051b3=this['_getChangeFromId'](_0x57307b['changeId']);let _0x39c6de;if(_0x3051b3['data']['isOnRoot']){const _0x2eb12d=_0x3161fe['view']['getDomRoot'](_0x3051b3['rootName']);_0x39c6de=Array['from'](_0x2eb12d['getClientRects']());}else{const _0xc97702=this['editor']['model']['markers']['get']('revision:'+_0x57307b['changeId']);_0x39c6de=Array['from'](_0x3161fe['mapper']['markerNameToElements'](_0xc97702['name']))['map'](_0x5ea58f=>_0x3161fe['view']['domConverter']['mapViewToDom'](_0x5ea58f))['map'](_0x50fd2a=>Array['from'](_0x50fd2a['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x39c6de['find'](_0x375b17=>_0x375b17['top']-0x3<=this['_activeViewTarget']['y']&&_0x375b17['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x375b17['left']-0x3<=this['_activeViewTarget']['x']&&_0x375b17['right']+0x3>=this['_activeViewTarget']['x'])||_0x39c6de[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4460da,_0x3d0133,_0x2f35d8,_0x1fe563)=>{this['activeView']=_0x2f35d8?this['_getViewForChange'](_0x2f35d8):null,this['editor']['model']['change'](()=>{const _0x1f1f24=this['editor']['editing'];_0x1fe563&&(_0x1fe563['data']['isOnRoot']?_0x1f1f24['view']['change'](_0x13ca3a=>{_0x13ca3a['removeClass']('ck-revision-history-root--active',_0x1f1f24['view']['document']['getRoot'](_0x1fe563['rootName']));}):_0x1f1f24['reconvertMarker']('revision:'+_0x1fe563['id'])),_0x2f35d8&&(_0x2f35d8['data']['isOnRoot']?_0x1f1f24['view']['change'](_0x3108d9=>{_0x3108d9['addClass']('ck-revision-history-root--active',_0x1f1f24['view']['document']['getRoot'](_0x2f35d8['rootName']));}):_0x1f1f24['reconvertMarker']('revision:'+_0x2f35d8['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x350606,_0x3a49e3)=>{if(this['activeChange'])return;const _0x406e51=this['_findChangeIdFromDomTarget'](_0x3a49e3['target']),_0x1989e1=this['_changeIdToChange']['get'](_0x406e51);_0x1989e1?(this['_activeViewTarget']={'x':_0x3a49e3['domEvent']['x'],'y':_0x3a49e3['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1989e1)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x1748b4,_0x180f80)=>{const _0xd2abc2=this['_findChangeIdFromDomTarget'](_0x180f80['target']),_0x3f9493=this['_changeIdToChange']['get'](_0xd2abc2);_0x3f9493?(this['_activeViewTarget']={'x':_0x180f80['domEvent']['x'],'y':_0x180f80['domEvent']['y']},_0x3f9493===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x3f9493):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x4560de){do{const _0x4ba20a=_0x4560de['getAttribute']('data-change-id');if(_0x4ba20a)return _0x4ba20a;_0x4560de=_0x4560de['parent'];}while(_0x4560de);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x4c8a91=>{for(const _0x3267a4 of this['editor']['model']['markers'])_0x4c8a91['removeMarker'](_0x3267a4);});}};function Vt(_0x2cc6a4,_0x348bb0){return(_0x55401d,_0x151cd4,_0x4202ec)=>{if(!_0x4202ec['consumable']['test'](_0x151cd4['markerRange'],_0x55401d['name']))return;const _0x4517a9=_0x151cd4['markerRange']['getWalker'](),_0x449459=_0x151cd4['markerRange']['start'],_0x1bc625=_0x2cc6a4['model']['schema'];let _0x585e84=null,_0x112af2=null,_0xda8222=!0x1,_0x666ff0=!0x1;for(const _0x43d82e of _0x4517a9){const _0x3c2bf0=_0x43d82e['item'];_0xda8222=_0xda8222||_0x1bc625['isContent'](_0x3c2bf0);const _0x53170a=_0x4202ec['mapper']['toViewElement'](_0x3c2bf0);if(_0x53170a&&_0x53170a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x43d82e['type']&&(_0x1bc625['isBlock'](_0x3c2bf0)&&!_0x1bc625['isLimit'](_0x3c2bf0)&&(_0x3c2bf0['nextSibling']||_0x449459['isAtEnd']?_0x585e84&&_0x585e84['parent']==_0x3c2bf0||(_0x585e84=_0x3c2bf0,_0x25c8ba(_0x43d82e['previousPosition']),_0x666ff0=!0x0):_0x112af2=_0x112af2||_0x43d82e['previousPosition']));}function _0x25c8ba(_0x962cfa){const _0x2f9301=_0x4202ec['mapper']['toViewPosition'](_0x962cfa),_0x159692=_0x4202ec['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x348bb0});_0x4202ec['writer']['insert'](_0x2f9301,_0x159692),_0x4202ec['mapper']['bindElementToMarker'](_0x159692,_0x151cd4['markerName']);}_0xda8222||_0x666ff0||!_0x112af2||_0x25c8ba(_0x112af2);};}var Dt=class extends _0x1f39fb{constructor(_0x4c5557){super(_0x4c5557);const _0x2cfb0d=_0x4c5557['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x2cfb0d,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2cfb0d,'change:isEnabled',()=>this['refresh']());}execute(){const _0x5c2e80=this['editor'],_0x1cfe81=_0x5c2e80['plugins']['get'](Mt),_0x3d0608=_0x1cfe81['isReady']?_0x1cfe81['diff']['newRevisionId']:null;_0x5c2e80['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3d0608);}['refresh'](){const {isReady:_0x3a2ad0,isEnabled:_0x291637,repository:_0x441eee,diff:_0x145a89}=this['editor']['plugins']['get'](Mt),_0xc0e1e5=_0x145a89&&_0x441eee['getLaterVisibleRevision'](_0x145a89['newRevisionId']);this['isEnabled']=_0x3a2ad0&&_0x291637&&Boolean(_0xc0e1e5);}},Tt=class extends _0x1f39fb{_step;constructor(_0x2927a2,{direction:_0x5112cf}){super(_0x2927a2);const _0x4a8286=_0x2927a2['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x5112cf?0x1:-0x1,this['listenTo'](_0x4a8286,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4a8286,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x4a8286,'change:activeChange',()=>this['refresh']());}execute(){const _0x268c99=this['editor'],_0x512720=_0x268c99['plugins']['get'](Mt),{isNavigationMode:_0x4b46ef,currentChangeNumber:_0x1af58e}=_0x512720;let _0x2a71e2;if(_0x512720['activeChange']=_0x4b46ef?_0x512720['diff']['changes']['get'](_0x1af58e+this['_step']):_0x512720['diff']['changes']['first'],_0x512720['activeChange']['data']['isOnRoot'])_0x2a71e2=_0x268c99['editing']['view']['getDomRoot'](_0x512720['activeChange']['rootName']);else{const _0x7a8ba6=_0x268c99['model']['markers']['get']('revision:'+_0x512720['activeChange']['id']);_0x2a71e2=_0x99ff26(_0x268c99['editing'],_0x7a8ba6);}_0x54fbc8({'target':_0x2a71e2,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x1d181b,currentChangeNumber:_0x1f5c55,numberOfChanges:_0x1ba954,isReady:_0x57c3ad,isEnabled:_0x432c02}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x432c02&&_0x57c3ad&&_0x1ba954)&&(!_0x1d181b||(0x1===this['_step']?_0x1f5c55<_0x1ba954-0x1:_0x1f5c55>0x0));}},Ht=class extends at{constructor(_0x3b6f66){super(_0x3b6f66);const _0xf3109d=this['bindTemplate'],_0x597d33=new _0x4e8cde(_0x3b6f66),_0x24992a=new _0x4e8cde(_0x3b6f66);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',(_0x1bb4a4,_0x4cc2ca)=>_0x1bb4a4&&_0x4cc2ca>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4b0a48,_0x3cc1ad,_0x252039,_0x3488f3)=>{if(!_0x4b0a48)return pt(_0x3b6f66,'Loading...');if(!_0x252039)return pt(_0x3b6f66,'No\x20changes');const _0x13db11=pt(_0x3b6f66,'NUMBER_OF_CHANGES',_0x252039);return _0x3488f3?pt(_0x3b6f66,'X_OF_Y_CHANGES',[_0x3cc1ad+0x1,_0x252039]):_0x13db11;}),_0x597d33['set']({'label':pt(_0x3b6f66,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x7749dc}),_0x24992a['set']({'label':pt(_0x3b6f66,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x42a2e8}),_0x597d33['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x24992a['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x597d33['on']('execute',()=>this['fire']('execute','backward')),_0x24992a['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',_0xf3109d['if']('_isStatusLabelVisible','ck-hidden',_0x3250ac=>!_0x3250ac)]},'children':[{'text':_0xf3109d['to']('isNavigationMode',_0xc087ff=>_0xc087ff?pt(_0x3b6f66,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x3b6f66,'Total')+':\x20')}]},{'text':_0xf3109d['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x597d33,_0x24992a]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x5082f5{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x205066=this['editor']['editing']['view'];_0x205066['change'](_0x90f636=>{for(const _0x5099e7 of _0x205066['document']['roots'])_0x90f636['addClass'](Pt,_0x5099e7);});}['hide'](){const _0x55ff26=this['editor']['editing']['view'];_0x55ff26['change'](_0xcf8f8e=>{for(const _0x3cc991 of _0x55ff26['document']['roots'])_0xcf8f8e['removeClass'](Pt,_0x3cc991);});}},Lt=class extends _0x5082f5{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Mt,Ut];}init(){const _0x4128cf=this['editor'],_0x5e12f6=_0x4128cf['plugins']['get'](Mt),_0x59adcb=_0x4128cf['plugins']['get'](Ut);_0x4128cf['ui']['componentFactory']['add']('exitToEditing',_0x18e96b=>{const _0x39e5f8=new _0x4e8cde(_0x18e96b);return _0x39e5f8['set']({'label':pt(_0x18e96b,'Back\x20to\x20editing'),'icon':_0x3f8bad,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x39e5f8,'execute',()=>{_0x4128cf['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x39e5f8;}),_0x4128cf['ui']['componentFactory']['add']('restoreRevision',_0x9ab28a=>{const _0x21b327=new _0x4e8cde(_0x9ab28a);return _0x21b327['set']({'label':pt(_0x9ab28a,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x21b327['bind']('isEnabled')['to'](_0x4128cf['commands']['get']('restoreRevision')),this['listenTo'](_0x21b327,'execute',()=>_0x4128cf['execute']('restoreRevision')),_0x21b327;}),_0x4128cf['ui']['componentFactory']['add']('changesNavigation',_0x4c21e1=>{const _0x108802=new Ht(_0x4c21e1),_0x22d946=_0x4128cf['commands']['get']('showPreviousChange'),_0x51832e=_0x4128cf['commands']['get']('showNextChange');return _0x108802['bind']('isBackwardNavigationEnabled')['to'](_0x22d946,'isEnabled'),_0x108802['bind']('isForwardNavigationEnabled')['to'](_0x51832e,'isEnabled'),_0x108802['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x5e12f6),this['listenTo'](_0x108802,'execute',(_0x23da59,_0x4f011d)=>{_0x4128cf['execute']('forward'===_0x4f011d?'showNextChange':'showPreviousChange');}),_0x108802;}),_0x59adcb['show'](),_0x5e12f6['on']('change:isReady',(_0x5b78ac,_0x4fadc2,_0x17b3d3)=>{_0x17b3d3?_0x59adcb['hide']():_0x59adcb['show']();});}},Ft=class extends _0x1eefc8{['_resizeObserver']=null;constructor(_0x38ebb8,_0x5e9930){super(_0x38ebb8,_0x5e9930);const _0x557315=this['bindTemplate'];this['set']({'label':pt(_0x38ebb8,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x38ebb8,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x557315['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x106aa7(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x3095a3=this['fieldView']['element'];this['_tooltipString']=_0x3095a3['scrollWidth']>_0x3095a3['clientWidth']&&_0x3095a3['value']||'';}},$t=class extends at{constructor(_0x3b70db,_0x297d55,_0x41c071){super(_0x3b70db);const _0x49253f=new _0x54e20f();_0x49253f['set']({'content':_0x23711a,'viewBox':'0\x200\x2011\x2010'});const _0x2f5fe7=['ck','ck-revision-history-sidebar__revision-author'];_0x41c071&&_0x2f5fe7['push']('ck-revision-history-sidebar__revision-author_creator');const _0x55bcea=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0x3b70db,_0x41c071?'Revision\x20creator':'Revision\x20author')},'children':[_0x49253f,_0x297d55['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2f5fe7},'children':_0x55bcea});}};function jt(_0x3c0159,_0x563675){const _0x3aca1c=_0x3c0159['bindTemplate'],_0x2109ff=_0x3c0159['locale'],_0x5c76f=ct(_0x2109ff);_0x5c76f['panelPosition']='sw';const _0x3421d3=function(_0x5938c4,_0x1a6cf0){const _0x59929a=function(_0xe5c48b,_0x454cb7){const _0x4d596d=_0xe5c48b['locale'],_0x34cc5d={'Compare\x20against\x20selected':pt(_0x4d596d,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x4d596d,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x4d596d,'Restore\x20this\x20revision')};return _0x454cb7['map'](_0x2c6cb3=>{const _0x55c266=_0x34cc5d[_0x2c6cb3['name']];return _0x55c266&&_0x55c266!==_0x2c6cb3['name']&&(_0x2c6cb3['name']=_0x55c266),_0x2c6cb3;});}(_0x5938c4,_0x1a6cf0),_0xcd93d4=new _0x544893();for(const _0x250508 of _0x59929a){const _0x246714={'type':'button','model':new rt({'label':_0x250508['name'],'class':_0x250508['class'],'withText':!0x0,'role':'menuitem','_action':_0x250508['action']})};_0x246714['model']['bind']('isEnabled')['to'](_0x5938c4,'isActionsDropdownOpen',_0x32754c=>'function'!=typeof _0x250508['isEnabled']||(!_0x32754c||_0x250508['isEnabled'](_0x5938c4))),_0xcd93d4['add'](_0x246714);}return _0xcd93d4;}(_0x3c0159,_0x563675);return _0x3c0159['bind']('isActionsDropdownOpen')['to'](_0x5c76f,'isOpen'),_0x5c76f['buttonView']['set']({'label':pt(_0x2109ff,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x12dda8}),_0x5c76f['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3aca1c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3aca1c['to'](_0x4b53b5=>_0x4b53b5['stopPropagation']())}}),_0x5c76f['on']('execute',_0x12773d=>{_0x3c0159['isReady']&&'function'==typeof _0x12773d['source']['_action']&&_0x12773d['source']['_action'](_0x3c0159);}),ht(_0x5c76f,_0x3421d3,{'role':'menu'}),_0x5c76f['listenTo'](_0x3c0159,'change:isActionsDropdownOpen',(_0x4231e7,_0x24fbd5,_0x3028a8)=>{if(_0x3028a8)for(const _0x2156f7 of _0x5c76f['listView']['items']){const _0x367ca8=_0x2156f7['children']['first'],_0x29b24b=_0x563675['find'](_0x242ab0=>_0x242ab0['action']===_0x367ca8['_action'])['isVisible'];_0x2156f7['isVisible']=void 0x0===_0x29b24b||_0x29b24b(_0x3c0159);}}),_0x5c76f;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x5b13e7,Collection as _0x15d7e8,ElementReplacer as _0x271224,FocusTracker as _0x301405,KeystrokeHandler as _0x4365ba,ObservableMixin as _0x47a3a3,ResizeObserver as _0x1097fd,logWarning as _0x584982,scrollViewportToShowTarget as _0x191225,uid as _0x49a83a}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x2c6e4c,isEqual as _0xf60b63,set as _0x5df15a,unset as _0x382a2c}from'es-toolkit/compat';import{Command as _0x26de09,Editor as _0x1839d1,ElementApiMixin as _0x37aa64,PendingActions as _0xcc311a,Plugin as _0x3bf7c2}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x673b8d,Users as _0x403926,getMarkerDomElement as _0xb537ad,sanitizeEditorConfig as _0x4ac0b0}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x4f04f1,ModelElement as _0x1da96f,ModelPosition as _0x397840,ModelRange as _0x2b908e,ModelText as _0x1594e5,ViewAttributeElement as _0x596ed8,ViewContainerElement as _0x317372,ViewDocumentFragment as _0x3ef835,ViewElement as _0x21c0f2,ViewEmptyElement as _0x483da7,ViewRawElement as _0x29795f,ViewText as _0x142cdb,ViewUIElement as _0x48fa78}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x298151,IconChevronUp as _0x3b4514,IconHistory as _0x447870,IconThreeVerticalDots as _0x34bdf8,IconUndo as _0x27ad47,IconUser as _0x5a257d}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x661458,ButtonView as _0x2fc172,ContextualBalloon as _0x8479c5,CssTransitionDisablerMixin as _0x4dd2fb,EditorUI as _0x1a9b5e,IconView as _0x10e7c7,InlineEditableUIView as _0x4d4b11,LabeledFieldView as _0x3d2f09,ListItemView as _0x291c8e,ListView as _0x4abd20,MenuBarMenuListItemButtonView as _0x35f752,MenuBarMenuListItemView as tt,MenuBarMenuListView as it,MenuBarMenuView as et,StickyPanelView as st,ToolbarSeparatorView as nt,ToolbarView as ot,UIModel as rt,View as at,addListToDropdown as ht,createDropdown as ct,createLabeledInputText as lt,normalizeToolbarConfig as ut,submitHandler as dt}from'@ckeditor/ckeditor5-ui';import{DateTime as ft}from'luxon';const vt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x47a3a3();var gt=class extends vt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x372f55){super(),this['id']=_0x372f55['id']||_0x49a83a(),this['creator']=_0x372f55['creator']||null,this['authors']=_0x372f55['authors']||[],this['diffData']=_0x372f55['diffData']||null,this['toVersion']=_0x372f55['toVersion']||0x0,this['fromVersion']=_0x372f55['fromVersion']||0x0,this['set']('name',_0x372f55['name']||''),this['set']('createdAt',_0x372f55['createdAt']||new Date()),this['set']('attributes',_0x372f55['attributes']||{});}setName(_0x2967d9){this['_update']({'name':_0x2967d9});}setAttribute(_0x48a16a,_0x4aff30){const _0x1fe9ab=_0x2c6e4c(this['attributes']);_0x5df15a(_0x1fe9ab,_0x48a16a,_0x4aff30),this['_update']({'attributes':_0x1fe9ab});}removeAttribute(_0xb91981){const _0x3798cc=_0x2c6e4c(this['attributes']);_0x382a2c(_0x3798cc,_0xb91981),this['_update']({'attributes':_0x3798cc});}_update(_0x2b44e5,_0x653f1e=!0x1){let _0x43840d=!0x1;const _0x522fde={'id':this['id']};for(const _0x50d117 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x370f3a=_0x2b44e5[_0x50d117];void 0x0!==_0x370f3a&&_0x370f3a!==this[_0x50d117]&&(this[_0x50d117]=_0x370f3a,_0x522fde[_0x50d117]=_0x370f3a,_0x43840d=!0x0);}_0x43840d&&(_0x522fde['authors']&&(_0x522fde['authorsIds']=_0x522fde['authors']['map'](_0x5b9812=>_0x5b9812['id']),delete _0x522fde['authors']),this['fire']('_update',_0x522fde,_0x653f1e));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2396ca=>_0x2396ca['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x3bf7c2{['_revisions'];static get requires(){return[_0x403926];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x45ce47){super(_0x45ce47),this['_revisions']=new _0x15d7e8();}afterInit(){!async function(_0x3bdbe9){const _0x42c797='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x309624=0xeb829,_0x30b0c7=0x79140,_0x116586=window['Date']['now'](),_0x6047b2=_0x3bdbe9['editor'],_0x281f91=new window['Promise'](_0x4f0bc0=>{_0x6047b2['once']('ready',_0x4f0bc0);}),_0x1f34e9={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x460aa8=_0x6047b2['config']['get']('licenseKey');async function _0x58e5af(){let _0x466008,_0x19e372=null,_0x135b22=null;try{return'GPL'==_0x460aa8?'NotAllowed':(_0x466008=_0x43afce(),_0x466008?(_0x466008['usageEndpoint']&&(_0x135b22=_0x95ac2c(_0x466008['usageEndpoint'],_0x466008['jti'])),await _0x260489()?_0x4cb9ed()?_0x5046f4()?'Expired':_0x329d14()?('evaluation'==_0x466008['licenseType']&&(_0x19e372=_0x77e732('EvaluationLimit')),await _0xb01c9e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5046f4(){const _0x3f9964=['evaluation','trial']['includes'](_0x466008['licenseType'])?_0x116586/0x3e8:0xe10*_0x30b0c7;return _0x466008['exp']<_0x3f9964;}function _0x4cb9ed(){const _0x40c490=_0x466008['features'];if(!_0x40c490)return!0x1;if(_0x40c490['includes']('*'))return!0x0;if(_0x40c490['includes']('RH'))return!0x0;if(_0x40c490['includes']('RRH')){if(_0x40b107())return!0x0;if(_0x58011b()||_0x476ef8())return!0x0;}return!0x1;}function _0x329d14(){const _0x214668=_0x466008['licensedHosts'];if(!_0x214668||0x0==_0x214668['length'])return!0x0;const {hostname:_0x1f5767}=new URL(window['location']['href']);if(_0x214668['includes'](_0x1f5767))return!0x0;const _0x3861d8=_0x1f5767['split']('.');return _0x214668['filter'](_0x7df736=>_0x7df736['includes']('*'))['map'](_0x2639ef=>_0x2639ef['split']('.'))['filter'](_0xaa4f7=>_0xaa4f7['length']<=_0x3861d8['length'])['map'](_0xe8314=>Array(_0x3861d8['length']-_0xe8314['length'])['fill']('*'===_0xe8314[0x0]?'*':'')['concat'](_0xe8314))['some'](_0x2d8e58=>_0x3861d8['every']((_0x42ffff,_0x55d3fc)=>_0x2d8e58[_0x55d3fc]===_0x42ffff||'*'===_0x2d8e58[_0x55d3fc]));}function _0xb01c9e(){return _0x19e372&&_0x135b22?new window['Promise']((_0x4e3c6a,_0x295f3b)=>{_0x19e372['then'](_0x4e3c6a,_0x295f3b),_0x135b22['then'](_0x100e81=>{'Valid'!=_0x100e81&&_0x4e3c6a(_0x100e81);},_0x295f3b);}):_0x19e372||_0x135b22||'Valid';}}function _0x95ac2c(_0x1096f4,_0x55a25d){return new window['Promise'](_0x9146da=>{if(_0x458b13())return _0x9146da('Valid');_0x29e711(),_0x6047b2['decorate']('_sendUsageRequest');let _0x3cd39a=!0x1;const _0x5c74e6=_0x49a83a();function _0x21765e(_0x35c059){return!!_0x35c059&&('object'==typeof _0x35c059||'function'==typeof _0x35c059)&&'function'==typeof _0x35c059['then']&&'function'==typeof _0x35c059['catch'];}function _0x9dfbd(_0x11b623){_0x352d5e(_0x11b623)['then'](_0x1901ac=>_0x1901ac&&'ok'==_0x1901ac['status']?_0xcab5a5(_0x176965(_0x5c74e6+_0x55a25d))!=_0x1901ac['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x58311d=>(_0x2f19ca(),_0x58311d),()=>{const _0xdbe178=_0x87fdde();return null==_0xdbe178?(_0x2f19ca(),'Valid'):_0x116586-_0xdbe178>0x240c8400?'UsageLimit':'Valid';})['then'](_0x9146da)['catch'](()=>{_0x9146da('UsageLimit');});const _0x2b3c43=0x36ee80;function _0x2f19ca(){const _0x4243f9='llct-'+_0xcab5a5(_0x176965(_0x1096f4)),_0x2e4e75=_0x544ff5(_0xcab5a5(window['Math']['ceil'](_0x116586/_0x2b3c43)));window['localStorage']['setItem'](_0x4243f9,_0x2e4e75);}function _0x87fdde(){const _0x5cd534='llct-'+_0xcab5a5(_0x176965(_0x1096f4)),_0x322668=window['localStorage']['getItem'](_0x5cd534);return _0x322668?window['parseInt'](_0x544ff5(_0x322668),0x10)*_0x2b3c43:null;}function _0x352d5e(_0x37a373){return new window['Promise']((_0x4ac5c0,_0x685311)=>{_0x37a373['then'](_0x4ac5c0,_0x685311),window['setTimeout'](_0x685311,0x1d4c0);});}}_0x6047b2['on']('_sendUsageRequest',(_0x136fb2,_0x10a476)=>{if(_0x10a476[0x0]!=_0x1096f4)return _0x9146da('UsageLimit');_0x10a476[0x1]={..._0x10a476[0x1],'requestId':_0x5c74e6};},{'priority':'high'}),_0x6047b2['on']('_sendUsageRequest',_0x463131=>{_0x21765e(_0x463131['return'])&&(_0x3cd39a=!0x0,_0x9dfbd(_0x463131['return']));},{'priority':'low'}),_0x281f91['then'](()=>{_0x3cd39a||_0x9146da('UsageLimit');});});function _0x458b13(){return'auto'==_0x6047b2['editing']['view']['_overlayModeHint'];}function _0x29e711(){_0x6047b2['editing']['view']['_overlayModeHint']='auto';}}function _0x77e732(_0x2d3fd0){const _0x1bc5db=[new window['Promise'](_0x5ab398=>setTimeout(_0x5ab398,0x93ecc)),_0x281f91['then'](()=>new window['Promise'](_0x22635c=>{const _0x503c82=0x7,_0x334d63=_0x3bdbe9['_revisions'];function _0x5a71a4(){_0x334d63['length']>=_0x503c82&&_0x22635c();}_0x5a71a4(),_0x334d63['on']('add',_0x5a71a4);})),new window['Promise'](_0x433367=>{function _0x58cefd(){for(const _0x3a1b2f in window)if(window['Number']['isNaN'](window['Number'](_0x3a1b2f))&&window[_0x3a1b2f]==_0x309624)return _0x433367();'destroyed'!=_0x6047b2['state']&&window['setTimeout'](_0x58cefd,0x1388);}_0x30bfea('RevisionViewer')&&_0x58cefd();})];return window['Promise']['race'](_0x1bc5db)['then'](()=>_0x2d3fd0);}async function _0x498128(){if(await _0x281f91,_0x30bfea('RevisionViewer')){const _0x2e4af2=_0x3bdbe9['getRevision'](0x0),_0x317f90=_0x3bdbe9['getEarlierVisibleRevision'](_0x2e4af2['id']),_0x5b589f=_0x18f498('RevisionViewer');return await _0x5b589f['compare'](_0x2e4af2['id'],_0x317f90?_0x317f90['id']:null,!0x0),_0x5b589f['unbind']('isEnabled'),_0x5b589f['isEnabled']=!0x1,_0x5b589f['compare']=_0xbc5ca4,void(_0x5b589f['_getDiff']=_0xbc5ca4);}if(_0x30bfea('RevisionTracker')){const _0x5acbe0=_0x18f498('RevisionTracker');_0x5acbe0['unbind']('isEnabled'),_0x5acbe0['isEnabled']=!0x1,_0x5acbe0['update']=_0xbc5ca4,_0x5acbe0['saveRevision']=_0xbc5ca4;}_0x6047b2['model']['change']=_0xbc5ca4,_0x6047b2['model']['enqueueChange']=_0xbc5ca4,_0x6047b2['enableReadOnlyMode']('model');}function _0x40b107(){return _0x30bfea('WebSocketGateway')&&'connected'==_0x18f498('WebSocketGateway')['state'];}function _0x58011b(){return _0x30bfea('RevisionViewerIntegration');}function _0x476ef8(){return _0x30bfea('TrackChangesDataGetter');}function _0x3d1ed7(_0x343670){const _0x5ac0ae=_0x5c9728();_0x6047b2[_0x5ac0ae]='revisionHistoryLicenseKey'+_0x343670,_0x343670['endsWith']('Limit')&&(window[_0x5c9728()]=_0x309624),'Valid'!=_0x343670&&_0x498128();}function _0x5c9728(){const _0x38ff0b=window['String'](window['performance']['now']())['replace']('.','');let _0x365dca='v';for(let _0x377ea7=0x0;_0x377ea7<_0x38ff0b['length'];_0x377ea7+=0x2){let _0x40c8c5=window['parseInt'](_0x38ff0b['substring'](_0x377ea7,_0x377ea7+0x2));_0x40c8c5>=0x3e&&(_0x40c8c5-=0x3e),_0x365dca+=_0x42c797[_0x40c8c5];}return _0x365dca;}function _0x43afce(){const _0x3b71a3=_0x460aa8['split']('.');if(0x3!=_0x3b71a3['length'])return null;return _0x271325(_0x3b71a3[0x1]);function _0x271325(_0x5ae3e9){const _0x4f5bd3=_0x19cb63(_0x5ae3e9);return _0x4f5bd3&&_0x44be7f()?_0x4f5bd3:null;function _0x44be7f(){const _0x57eb5f=_0x4f5bd3['jti'],_0x5a2eb5=window['parseInt'](_0x57eb5f['substring'](_0x57eb5f['length']-0x8),0x10),_0x100130={..._0x4f5bd3,'jti':_0x57eb5f['substring'](0x0,_0x57eb5f['length']-0x8)};return delete _0x100130['vc'],_0x176965(_0x100130)==_0x5a2eb5;}}}async function _0x260489(){let _0x19d322=!0x0;try{const [_0x33d89e,_0xabc524,_0x174755]=_0x460aa8['split']('.');return _0x192ce0(_0x33d89e),await _0x10afdf(_0x33d89e,_0xabc524,_0x174755),_0x19d322;}catch{return!0x1;}function _0x192ce0(_0x4555a9){const _0x16dc87=_0x19cb63(_0x4555a9);_0x16dc87&&'ES256'==_0x16dc87['alg']||(_0x19d322=!0x1);}async function _0x10afdf(_0x345a91,_0x3cf83f,_0x1c519e){const _0xffc014=window['Uint8Array']['from'](_0x534847(_0x1c519e),_0x46280c=>_0x46280c['charCodeAt'](0x0)),_0x367e33=new window['TextEncoder']()['encode'](_0x345a91+'.'+_0x3cf83f),_0x675c98=window['crypto']['subtle'];if(!_0x675c98)return;const _0x47e873=await _0x675c98['importKey']('jwk',_0x1f34e9,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x675c98['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x47e873,_0xffc014,_0x367e33)||(_0x19d322=!0x1);}}function _0x19cb63(_0x15edba){return _0x15edba['startsWith']('ey')?JSON['parse'](_0x534847(_0x15edba)):null;}function _0x534847(_0x52206c){return window['atob'](_0x52206c['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x176965(_0x4a0fc4){let _0x589def=0x1505;function _0x10c0a5(_0xba2de8){for(let _0x5078bc=0x0;_0x5078bc<_0xba2de8['length'];_0x5078bc++){const _0x55cf4d=_0xba2de8['charCodeAt'](_0x5078bc);_0x589def=(_0x589def<<0x5)+_0x589def+_0x55cf4d,_0x589def&=_0x589def;}}function _0x133840(_0x4ff664){Array['isArray'](_0x4ff664)?_0x4ff664['forEach'](_0x133840):_0x4ff664&&'object'==typeof _0x4ff664?Object['entries'](_0x4ff664)['sort']()['forEach'](([_0x3618b4,_0x541fda])=>{_0x10c0a5(_0x3618b4),_0x133840(_0x541fda);}):_0x10c0a5(window['String'](_0x4ff664));}return _0x133840(_0x4a0fc4),_0x589def>>>0x0;}function _0xcab5a5(_0x493998){return _0x493998['toString'](0x10)['padStart'](0x8,'0');}function _0x544ff5(_0x517de0){return _0x517de0['split']('')['reverse']()['join']('');}function _0x30bfea(_0x2e779d){return _0x6047b2['plugins']['has'](_0x2e779d);}function _0x18f498(_0x161a17){return _0x6047b2['plugins']['get'](_0x161a17);}function _0xbc5ca4(){}_0x3d1ed7(await _0x58e5af());}(this);}createRevision(_0x3bb54c){const _0x4bd20f=this['editor']['plugins']['get']('Users');return new gt({'id':_0x3bb54c['id'],'name':_0x3bb54c['name'],'creator':_0x3bb54c['creatorId']?_0x4bd20f['getUser'](_0x3bb54c['creatorId']):null,'diffData':_0x3bb54c['diffData']||_0x3bb54c['data'],'authors':_0x3bb54c['authorsIds']['map'](_0x142cb3=>_0x4bd20f['getUser'](_0x142cb3)),'createdAt':new Date(_0x3bb54c['createdAt']),'attributes':_0x3bb54c['attributes'],'fromVersion':_0x3bb54c['fromVersion'],'toVersion':_0x3bb54c['toVersion']});}['addRevision'](_0x48d69a,_0x46f820=0x0){this['_revisions']['add'](_0x48d69a,_0x46f820);}getRevision(_0x14f46d){return this['_revisions']['get'](_0x14f46d);}getRevisions(_0x5cd18c={'toJSON':!0x1}){const _0x5eb523=Array['from'](this['_revisions']);return _0x5eb523['reverse'](),_0x5cd18c['toJSON']?_0x5eb523['map'](_0x45759c=>_0x45759c['toJSON']()):_0x5eb523;}getIndex(_0x509723){return this['_revisions']['getIndex'](_0x509723);}getEarlierVisibleRevision(_0x340157){const [,_0x39809a]=this['getRevisionsIterator'](_0x340157,{'direction':'earlier'});return _0x39809a;}getLaterVisibleRevision(_0x9e3416){const [,_0x17f1e3]=this['getRevisionsIterator'](_0x9e3416,{'direction':'later'});return _0x17f1e3;}getRevisionsInDiff(_0x28530e){const _0x4f8385=[];for(const _0x33b557 of this['getRevisionsIterator'](_0x28530e['newRevisionId']))if(_0x4f8385['push'](_0x33b557),_0x33b557['id']===_0x28530e['oldRevisionId'])break;return _0x4f8385;}*getRevisionsIterator(_0x183093,{direction:_0x5a6056='earlier',filter:_0x3d79ec=()=>!0x0}={}){const _0xb4fb49='earlier'===_0x5a6056?0x1:-0x1;let _0x23c40e=this['_revisions']['get'](_0x183093),_0x2e2e99=this['getIndex'](_0x23c40e);for(yield _0x23c40e;_0x23c40e;){if(_0x2e2e99+=_0xb4fb49,_0x23c40e=this['getRevision'](_0x2e2e99),!_0x23c40e)return;_0x3d79ec(_0x23c40e)&&(yield _0x23c40e);}}},wt=class extends _0x3bf7c2{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x317372,'c'],[_0x596ed8,'a'],[_0x483da7,'e'],[_0x29795f,'r'],[_0x48fa78,'u']]);_typeCharToViewClass=new Map([['c',_0x317372],['a',_0x596ed8],['e',_0x483da7],['r',_0x29795f],['u',_0x48fa78]]);async loadRevisionData(_0x5bc3a6,_0x4c0d4a){if(_0x5bc3a6['diffData']||!_0x4c0d4a)return;const _0x1a8cc=this['editor']['config']['get']('collaboration.channelId');_0x5bc3a6['diffData']=(await _0x4c0d4a['getRevision']({'channelId':_0x1a8cc,'revisionId':_0x5bc3a6['id']}))['diffData'];}getRevisionDocumentData(_0x4d35a5){const _0x263a04={};for(const _0x12e566 in _0x4d35a5['diffData']){if(_0x4d35a5['diffData'][_0x12e566]['attachChange']&&!_0x4d35a5['diffData'][_0x12e566]['attachChange']['isAttached'])continue;const _0x5c38c6=this['_removeRevisionMarkers'](JSON['parse'](_0x4d35a5['diffData'][_0x12e566]['insertions'])),_0x49c7b2=this['editor']['editing']['view']['document'],_0x3e986c=new _0x3ef835(_0x49c7b2,_0x5c38c6['map'](_0x36166b=>this['_getViewFromDiffObj'](_0x36166b,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x263a04[_0x12e566]=this['editor']['data']['processor']['toData'](_0x3e986c),this['editor']['data']['processor']['useFillerType']('default');}return _0x263a04;}getRevisionRootsAttributes(_0x2233c6){const _0x14bbda={};for(const _0x28a9f7 in _0x2233c6['diffData'])_0x2233c6['diffData'][_0x28a9f7]['attachChange']&&!_0x2233c6['diffData'][_0x28a9f7]['attachChange']['isAttached']||(_0x14bbda[_0x28a9f7]=_0x2233c6['diffData'][_0x28a9f7]['attributesAfter']||{});return _0x14bbda;}getRevisionRootsModelElements(_0x35adbe){const _0x1d6326={};for(const _0x24c94a in _0x35adbe['diffData']){if(_0x35adbe['diffData'][_0x24c94a]['attachChange']&&!_0x35adbe['diffData'][_0x24c94a]['attachChange']['isAttached'])continue;const _0x5c8985=_0x35adbe['diffData'][_0x24c94a]['rootElementName'];_0x5c8985&&(_0x1d6326[_0x24c94a]=_0x5c8985);}return _0x1d6326;}_getTypeCharForViewElement(_0x36cd91){return this['_viewClassToTypeChar']['get'](_0x36cd91['constructor']);}_getViewFromDiffObj(_0x4b2e13,_0x493855){const _0x3b8a5a=this['editor']['editing']['view']['document'];if('string'==typeof _0x4b2e13)return new _0x142cdb(_0x3b8a5a,_0x4b2e13);{let _0x57464b,_0x30d78b;_0x30d78b='u'==_0x4b2e13['type']||'r'==_0x4b2e13['type']?[]:_0x4b2e13['children']['map'](_0x4cadf6=>this['_getViewFromDiffObj'](_0x4cadf6,_0x493855));const _0x1c9794=this['_typeCharToViewClass']['get'](_0x4b2e13['type'])||_0x21c0f2,_0x47ae15=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x57464b=new _0x1c9794(_0x3b8a5a,_0x4b2e13['name'],_0x4b2e13['attributes'],_0x30d78b),'u'==_0x4b2e13['type']&&_0x4b2e13['children'][0x0]){const _0x5d1f14=_0x4b2e13['children'][0x0];if(_0x57464b['render']=function(_0x200873){const _0x1f8569=_0x200873['createElement']('div');return _0x1f8569['innerHTML']=_0x5d1f14,_0x1f8569['childNodes'][0x0];},_0x493855){const _0x519926=new _0x3ef835(_0x3b8a5a);_0x519926['_appendChild'](_0x57464b);const _0x41e27c=Array['from'](_0x47ae15['viewChildrenToDom'](_0x519926,{'bind':!0x1})),_0x2fdfe1=_0x47ae15['domDocument']['createElement']('div');_0x2fdfe1['append'](..._0x41e27c),_0x57464b=Array['from'](_0x47ae15['domChildrenToView'](_0x2fdfe1))[0x0];}}else{if('r'==_0x4b2e13['type']&&_0x4b2e13['children'][0x0]){const _0x1157e2=_0x4b2e13['children'][0x0];if(_0x57464b['render']=function(_0x5a6489){_0x5a6489['innerHTML']=_0x1157e2;},_0x493855){const _0x56868c=new _0x3ef835(_0x3b8a5a);_0x56868c['_appendChild'](_0x57464b);const _0x2b177a=Array['from'](_0x47ae15['viewChildrenToDom'](_0x56868c,{'bind':!0x1})),_0x4af74e=_0x47ae15['domDocument']['createElement']('div');_0x4af74e['append'](..._0x2b177a);const _0x2e579d=Array['from'](_0x47ae15['domChildrenToView'](_0x4af74e));_0x2e579d['length']>0x1?_0x57464b['_appendChild'](_0x2e579d):_0x57464b=_0x2e579d[0x0];}}}if(_0x4b2e13['customProperties']){for(const [_0x2ba30c,_0x2be2af]of _0x4b2e13['customProperties'])_0x57464b['_setCustomProperty'](_0x2ba30c,_0x2be2af);}const _0x889866=void 0x0===_0x4b2e13['fillerOffset']?null:_0x4b2e13['fillerOffset'];return null!==_0x889866&&(_0x57464b['getFillerOffset']=()=>_0x889866),_0x57464b;}}_makeModelFromViewString(_0x482517,_0x4062a5){const _0x31d177=JSON['parse'](_0x482517),_0x5c56f2=this['editor']['editing']['view']['document'],_0x5a420c=new _0x3ef835(_0x5c56f2,_0x31d177['map'](_0x1c1e64=>this['_getViewFromDiffObj'](_0x1c1e64,!0x0))),_0x31e8d5=this['editor']['data']['toModel'](_0x5a420c,_0x4062a5);return _0x31e8d5['name']=_0x4062a5,_0x31e8d5;}['_removeRevisionMarkers'](_0x106ad7){return(_0x106ad7=_0x106ad7['filter'](_0x22316f=>!_0x22316f['name']||'revision-start'!==_0x22316f['name']&&'revision-end'!==_0x22316f['name']))['forEach'](_0x552e8b=>{'string'!=typeof _0x552e8b&&(_0x552e8b['children']=this['_removeRevisionMarkers'](_0x552e8b['children']),_0x552e8b['attributes']=_0x552e8b['attributes']['filter'](_0xb4158=>!_0xb4158[0x0]['startsWith']('data-revision-')));}),_0x106ad7;}};function pt(_0x28715d,_0x5194ec,_0x2954bc){const t=_0x28715d['t'];switch(_0x5194ec){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'},_0x2954bc);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x2954bc);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}var _t=class extends _0x3bf7c2{['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[_0x403926,mt,wt,_0xcc311a];}constructor(_0x5780a5){super(_0x5780a5),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2c70b6=_0x49a83a();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2c70b6},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 _0x27eae3=this['repository']['getRevision'](0x0),_0x3f21f7=_0x27eae3&&null===_0x27eae3['creator']?_0x27eae3:null;if(this['_continueCurrentRevision']=!!_0x3f21f7&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x499c89=this['_source']['getCurrentRevisionId'](),_0x52be44=this['repository']['getRevision'](_0x499c89);if(_0x52be44)this['_startingVersion']=_0x52be44['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x46599d=this['_source']['history']['_operations']['find'](_0x41698c=>!_0x41698c['_isInit']),_0x45c985=_0x46599d?_0x46599d['baseVersion']:this['_source']['history']['version'];_0x27eae3?(_0x27eae3['toVersion']<_0x45c985&&_0x27eae3['_update']({'toVersion':_0x45c985}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x3f21f7['id'],this['_startingVersion']=_0x3f21f7['fromVersion']):(this['_startingVersion']=_0x27eae3['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x45c985,this['_continueCurrentRevision']=!0x1);}}else _0x3f21f7&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x3f21f7['toVersion'],this['editor']['model']['document']['history']['version']),_0x3f21f7['fromVersion']===_0x3f21f7['toVersion']?(0x0!==_0x3f21f7['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x3f21f7['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x3f21f7['id'],this['_startingVersion']=_0x3f21f7['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',_0x42c49e=>!_0x42c49e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x193eaa=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x36a898;for(const _0x4abba4 in _0x193eaa){const _0x2087fa=_0x4abba4,_0x1215c2=_0x193eaa[_0x2087fa];if('revisionHistoryLicenseKeyValid'==_0x1215c2||'revisionHistoryLicenseKeyInvalid'==_0x1215c2||'revisionHistoryLicenseKeyExpired'==_0x1215c2||'revisionHistoryLicenseKeyDomainLimit'==_0x1215c2||'revisionHistoryLicenseKeyNotAllowed'==_0x1215c2||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1215c2||'revisionHistoryLicenseKeyUsageLimit'==_0x1215c2){delete _0x193eaa[_0x2087fa],_0x36a898=_0x1215c2,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x36a898&&_0x193eaa['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x36a898&&_0x193eaa['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x36a898&&_0x193eaa['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x36a898&&_0x193eaa['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x36a898&&_0x193eaa['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x36a898&&_0x193eaa['_showLicenseError']('usageLimit');},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x43ec4a=this['repository']['getRevision'](0x0),_0x7be893=await this['getRevisionDocumentData'](_0x43ec4a),_0x4d93d7=await this['getRevisionRootsAttributes'](_0x43ec4a),_0x18952f=this['_utils']['getRevisionRootsModelElements'](_0x43ec4a);this['_replaceEditorDataWithRevisionData'](_0x7be893,_0x4d93d7,_0x18952f);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x3c4fdb){this['_source']=_0x3c4fdb;}async update(){const _0x240d05=await this['_source']['getLatestVersion']();if(_0x240d05>this['currentRevision']['toVersion']){await this['_loadState']();const _0x23fa98=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x240d05});_0x23fa98['authors']=_0x23fa98['authorsIds']['map'](_0x57986f=>this['editor']['plugins']['get']('Users')['getUser'](_0x57986f)),this['currentRevision']['_update'](_0x23fa98);}}async['saveRevision'](_0x33c675={},_0x168563=null){const _0x3db5df=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x168563>this['currentRevision']['toVersion']&&(_0x168563=null),null===_0x168563&&(_0x168563=await this['_source']['getLatestVersion']());const _0x78d787=this['_getFromVersion'](_0x168563),_0x3a8ea0=this['buildRevisionData']({'from':_0x78d787,'to':_0x168563});if(this['currentRevision']['toVersion']<_0x168563){const _0x31f377=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x168563,'to':_0x168563});_0x31f377['authors']=[],_0x31f377['authorsIds']=[],_0x31f377['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x31f377,!0x0),delete _0x31f377['authors'],_0x3db5df['push'](_0x31f377);}_0x33c675['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x33c675['name']=_0x33c675['name']||null,_0x33c675['id']=_0x33c675['id']||_0x49a83a(),_0x33c675={..._0x33c675,..._0x3a8ea0};const _0x43ec96=this['addRevisionData'](_0x33c675);_0x3db5df['push'](_0x33c675);const _0x1cc93b=this['repository']['getIndex'](_0x43ec96);if(0x0!==_0x1cc93b){const _0x1ce11a=this['repository']['getRevision'](_0x1cc93b-0x1);if(_0x1ce11a['fromVersion']!==_0x168563){const _0xb2ad97=this['_revisionDataBuilder']['getData'](_0x168563,_0x1ce11a['toVersion']),_0x8a2b8={'id':_0x1ce11a['id'],'diffData':_0xb2ad97['diffData'],'authorsIds':_0xb2ad97['authorsIds'],'authors':_0xb2ad97['authorsIds']['map'](_0x4f7c63=>this['editor']['plugins']['get']('Users')['getUser'](_0x4f7c63)),'fromVersion':_0x168563};_0x1ce11a===this['currentRevision']&&(_0x8a2b8['createdAt']=new Date(_0x33c675['createdAt']['getTime']()+0xa)),_0x1ce11a['_update'](_0x8a2b8,!0x0),delete _0x8a2b8['authors'],_0x3db5df['push'](_0x8a2b8);}}if(this['adapter']){for(const _0xe09ee2 of _0x3db5df)this['_bufferUpdate'](_0xe09ee2['id'],_0xe09ee2,!0x0);this['sendBufferedUpdates']();}return _0x43ec96;}addRevisionData(_0x3a7fd8){const _0x3d03e3=this['repository']['createRevision'](_0x3a7fd8);return this['adapter']&&_0x3d03e3['on']('_update',(_0x2b40f4,_0x5bb65b,_0x39c43c)=>{_0x39c43c||(this['_bufferUpdate'](_0x5bb65b['id'],_0x5bb65b,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x3d03e3,this['_findInsertionIndex'](_0x3d03e3)),_0x3d03e3;}async getRevisionDocumentData(_0x56d506){return await this['_utils']['loadRevisionData'](_0x56d506,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x56d506);}async getRevisionRootsAttributes(_0x4f81fb){return await this['_utils']['loadRevisionData'](_0x4f81fb,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4f81fb);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x37f609=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x5285b9=0x0;_0x5285b9<_0x37f609['length'];_0x5285b9++){const _0x5b113a=_0x37f609[_0x5285b9];let _0x297038=!0x1;for(const _0x27deec of Object['keys'](_0x5b113a))void 0x0===_0x5b113a[_0x27deec]?delete _0x5b113a[_0x27deec]:'id'!==_0x27deec&&(_0x297038=!0x0);_0x297038||(_0x37f609[_0x5285b9]=null);}if(_0x37f609=_0x37f609['filter'](_0x3f6c1c=>null!==_0x3f6c1c),!_0x37f609['length'])return;for(let _0x3c70df=0x0;_0x3c70df<_0x37f609['length'];_0x3c70df++){const _0x3ecfc9=_0x37f609[_0x3c70df];void 0x0!==_0x3ecfc9['fromVersion']&&void 0x0===_0x3ecfc9['toVersion']&&(_0x3ecfc9['toVersion']=this['repository']['getRevision'](_0x3ecfc9['id'])['toVersion']),void 0x0!==_0x3ecfc9['toVersion']&&void 0x0===_0x3ecfc9['fromVersion']&&(_0x3ecfc9['fromVersion']=this['repository']['getRevision'](_0x3ecfc9['id'])['fromVersion']);}const _0x4b9f24=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x37f609,_0x4b9f24)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x3e0590=>{if(_0x3e0590){for(const _0x1182a3 of _0x3e0590)this['setRevisionData']({'id':_0x1182a3['id'],'createdAt':_0x1182a3['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}buildRevisionData({revision:_0x11a146=null,from:_0x5263f9=null,to:_0x502c87=null}){_0x5263f9=null!==_0x5263f9?_0x5263f9:_0x11a146['fromVersion'],_0x502c87=null!==_0x502c87?_0x502c87:_0x11a146['toVersion'];const _0x5b860c=this['_revisionDataBuilder']['getData'](_0x5263f9,_0x502c87),_0x14fd5d={'diffData':_0x5b860c['diffData'],'authorsIds':_0x5b860c['authorsIds'],'fromVersion':_0x5263f9,'toVersion':_0x502c87};if(!_0x11a146||_0x502c87!==_0x11a146['toVersion']){const _0x3f8579=_0x502c87-0x1,_0x42f960=this['_source']['history']['getOperation'](_0x3f8579);_0x14fd5d['createdAt']=_0x42f960&&_0x42f960['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5263f9===this['_loadedStateData']['fromVersion']){for(const _0x598012 of this['_loadedStateData']['authors'])_0x14fd5d['authorsIds']['includes'](_0x598012['id'])||_0x14fd5d['authorsIds']['push'](_0x598012['id']);}return _0x14fd5d;}_bufferUpdate(_0xf663d8,_0x2778db,_0x16ed59){if(this['_bufferedUpdates']['has'](_0xf663d8)){const _0x392f36=this['_bufferedUpdates']['get'](_0xf663d8);_0x2778db=_0x16ed59?{..._0x392f36,..._0x2778db}:{..._0x2778db,..._0x392f36};}this['_bufferedUpdates']['set'](_0xf663d8,_0x2778db);}setRevisionData(_0x19da76){const _0x8f2e54=this['repository']['getRevision'](_0x19da76['id']);if(_0x19da76['createdAt']&&(_0x19da76['createdAt']=new Date(_0x19da76['createdAt'])),_0x19da76['authorsIds']){const _0x700ac4=this['editor']['plugins']['get']('Users');_0x19da76['authors']=_0x19da76['authorsIds']['map'](_0x21bf0b=>_0x700ac4['getUser'](_0x21bf0b));}_0x8f2e54['_update'](_0x19da76,!0x0);}_createInitialRevision(_0x5bda8b){const _0xb00e8e=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0xb00e8e)this['_initialRevisionId']=_0xb00e8e['id'];else{const _0x6eed80=!this['editor']['model']['document']['roots']['find'](_0x2505d9=>this['editor']['model']['hasContent'](_0x2505d9)),_0x5c5f9a=this['editor']['plugins']['get']('Users')['me']['id'],_0xfea6ed=pt(this['editor']['locale'],_0x6eed80?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5bda8b,'to':_0x5bda8b,'id':this['_initialRevisionId'],'name':_0xfea6ed,'creatorId':_0x5c5f9a});}}_createCurrentRevision(_0x10c799){const _0x35e6c0=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x35e6c0),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x10c799,'to':_0x10c799,'id':_0x35e6c0,'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(_0x42f2a7,_0x5585d1,_0x4a0f1f){const _0x4f5ff5={},_0x1cec7c={},_0xa0eae2={},_0x2cab6a=this['editor']['config']['get']('roots')||{};for(const [_0x3ad893,_0x1f3de0]of Object['entries'](_0x2cab6a))_0x1f3de0['lazyLoad']||(_0x4f5ff5[_0x3ad893]=_0x1f3de0['initialData']??'',_0x1cec7c[_0x3ad893]=_0x1f3de0['modelAttributes']||{},_0x1f3de0['modelElement']&&(_0xa0eae2[_0x3ad893]=_0x1f3de0['modelElement']));for(const _0x6c6e51 of this['editor']['model']['document']['getRootNames']())_0x4f5ff5[_0x6c6e51]??='',_0x1cec7c[_0x6c6e51]??={};let _0x1cd916=!0x1;const _0x360e94=Object['keys'](_0x4f5ff5),_0x148615=Object['keys'](_0x42f2a7);for(const _0x1718c2 of _0x360e94){if(_0x4f5ff5[_0x1718c2]!==_0x42f2a7[_0x1718c2]&&''!==_0x4f5ff5[_0x1718c2]['trim']()){_0x1cd916=!0x0;break;}if(!_0xf60b63(_0x1cec7c[_0x1718c2],_0x5585d1[_0x1718c2])&&Object['keys'](_0x1cec7c[_0x1718c2])['length']>0x0){_0x1cd916=!0x0;break;}const _0x1f7cfb=_0xa0eae2[_0x1718c2],_0x481480=_0x4a0f1f[_0x1718c2];if(_0x1f7cfb&&_0x481480&&_0x1f7cfb!==_0x481480){_0x1cd916=!0x0;break;}}_0x1cd916||(_0x1cd916=_0x148615['some'](_0x4c991f=>!this['editor']['model']['document']['getRoot'](_0x4c991f))),_0x1cd916&&_0x584982('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4f5ff5,'editorRootsAttributes':_0x1cec7c,'editorRootsModelElements':_0xa0eae2,'revisionData':_0x42f2a7,'revisionRootsAttributes':_0x5585d1,'revisionRootsModelElements':_0x4a0f1f});for(const [_0x58e82e,_0x391284]of Object['entries'](_0x42f2a7))this['editor']['config']['set']('roots.'+_0x58e82e+'.initialData',_0x391284);for(const [_0x569aa5,_0x3d747c]of Object['entries'](_0x5585d1))this['editor']['config']['set']('roots.'+_0x569aa5+'.modelAttributes',_0x3d747c);const _0x5067f1=this['editor']['model']['document'];for(const [_0x4a45d5,_0x27e327]of Object['entries'](_0x4a0f1f)){this['editor']['config']['set']('roots.'+_0x4a45d5+'.modelElement',_0x27e327);const _0x3e0897=_0x5067f1['getRoot'](_0x4a45d5);_0x3e0897&&_0x3e0897['name']!==_0x27e327&&(_0x5067f1['roots']['remove'](_0x4a45d5),_0x5067f1['createRoot'](_0x27e327,_0x4a45d5));}}_addPendingAction(){if(!this['_pendingAction']){const _0x4365a6=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4365a6['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x1e679a){const _0x48cad6=this['repository']['getRevisions']();_0x48cad6['reverse']();let _0x1bcccf=0x0;for(;_0x1bcccf<_0x48cad6['length'];){const _0x362301=_0x48cad6[_0x1bcccf];if(_0x362301===this['currentRevision']){_0x1bcccf++;continue;}if(_0x362301['id']===this['_initialRevisionId'])break;const _0x401f22=_0x1e679a['toVersion']-_0x362301['toVersion']||_0x1e679a['fromVersion']-_0x362301['fromVersion'];if(_0x401f22>0x0)break;if(_0x401f22<0x0)_0x1bcccf++;else{if(!_0x1e679a['creator']&&_0x362301['creator'])break;if(_0x362301['creator']||!_0x1e679a['creator']){if(_0x1e679a['createdAt']>_0x362301['createdAt'])break;_0x1bcccf++;}else _0x1bcccf++;}}return _0x1bcccf;}_getFromVersion(_0x2689f7){const _0x3c1fef=this['repository']['getRevisions']();_0x3c1fef['reverse'](),_0x3c1fef['shift']();const _0x583029=_0x3c1fef['find'](_0x2e67d6=>_0x2e67d6['toVersion']<=_0x2689f7)['toVersion'];return _0x583029<this['_startingVersion']?this['_startingVersion']:_0x583029;}['_makeRevision']({name:_0x12ff19,from:_0x37f074,to:_0x537b27,creatorId:_0x2a6741,id:_0x2c2874}){const _0x2792f0=this['buildRevisionData']({'from':_0x37f074,'to':_0x537b27});_0x2792f0['name']=_0x12ff19,_0x2792f0['creatorId']=_0x2a6741,_0x2792f0['id']=_0x2c2874;const _0x1c844f=this['addRevisionData'](_0x2792f0);return this['adapter']&&this['_bufferUpdate'](_0x2792f0['id'],_0x2792f0,!0x0),_0x1c844f;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x509144){this['editor']=_0x509144,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x11cf2e){this['source']=_0x11cf2e;const _0x1c52bb=new Map(),_0x5b3483=new Map(),_0x2ae537=this['editor']['model']['document']['roots']['map'](_0x1d50d4=>_0x1d50d4['rootName']);for(const _0x3a1315 of _0x2ae537){const _0x1b4cea=this['editor']['model']['document']['getRoot'](_0x3a1315),_0x147b84=bt(_0x1b4cea);_0x1c52bb['set'](_0x3a1315,_0x147b84),_0x5b3483['set'](_0x3a1315,Object['fromEntries'](_0x1b4cea['getAttributes']()));}const _0x27d169=Array['from'](this['editor']['model']['markers'])['map'](_0x49e5c6=>[_0x49e5c6['name'],_0x49e5c6['getRange']()]),_0x48cbcc=this['source']['version'];this['_saveMetaData'](_0x48cbcc,_0x1c52bb,_0x27d169,_0x5b3483),this['_startingRevisionId']=this['_revisionId'];const _0x5759b1=new Map(),_0x1b8c5d=new Map();for(const _0x16d89f of _0x2ae537){const _0xfc1f5d=Rt(_0x16d89f,this['editor']['model']['document']['getRoot'](_0x16d89f)['name']);_0x5759b1['set'](_0x16d89f,_0xfc1f5d),_0x1b8c5d['set'](_0x16d89f,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x5759b1,[],_0x1b8c5d);}getData(_0x380d36,_0x4afc18){if(this['_lastFrom']===_0x380d36&&this['_lastTo']<=_0x4afc18)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x4afc18,!0x0);else{if(!this['_savedMetaData']['has'](_0x380d36)){const _0x2b10d6=this['_getPreviousFrom'](_0x380d36);this['_calculateMetaData'](_0x2b10d6,_0x380d36,!0x1);}this['_calculateMetaData'](_0x380d36,_0x4afc18,!0x0);}return this['_lastFrom']=_0x380d36,this['_lastTo']=_0x4afc18,this['_getState']();}loadState(_0x21f08b){if(!this['_savedMetaData']['has'](_0x21f08b['fromVersion'])){const _0x524021=this['_getPreviousFrom'](_0x21f08b['fromVersion']);this['_calculateMetaData'](_0x524021,_0x21f08b['fromVersion'],!0x1);}this['_calculateMetaData'](_0x21f08b['fromVersion'],_0x21f08b['toVersion'],!0x1);const _0x17c58c=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x21f08b['fromVersion'],this['_lastTo']=_0x21f08b['toVersion'];for(const _0x2feeba in _0x21f08b['diffData']){const _0x3767f0=_0x21f08b['diffData'][_0x2feeba]['attachChange'],_0x23ffd0=_0x2c6e4c(_0x21f08b['diffData'][_0x2feeba]['attributesBefore'])||{},_0x1d0dc2=_0x21f08b['diffData'][_0x2feeba],_0x28710b=_0x17c58c['_makeModelFromViewString'](_0x1d0dc2['deletions'],_0x1d0dc2['rootElementName']||'$root');_0x28710b['rootName']=_0x2feeba,_0x28710b['_isAttached']=!_0x3767f0||!_0x3767f0['isAttached'],_0x28710b['isAttached']=()=>_0x28710b['_isAttached'],this['_baseRoots']['set'](_0x2feeba,_0x28710b),this['_baseRootsAttributes']['set'](_0x2feeba,_0x23ffd0),_0x3767f0&&this['_touchedRoots']['set'](_0x2feeba,_0x3767f0);const _0x5d0d9b=this['_makeIdsRoot'](_0x28710b);this['_baseIdsRoots']['set'](_0x2feeba,_0x5d0d9b);for(const [_0x3a5692,_0x3ec371]of _0x28710b['markers']){if(!_0x3a5692['startsWith']('revision:'))continue;const _0x349c1d=_0x3a5692['split'](':')[0x2];for(const _0xdf8269 of _0x3ec371['getWalker']({'singleCharacters':!0x0})){const _0x285ccf=this['_getVidAttributeName'](_0xdf8269),_0x1ada75='elementEnd'==_0xdf8269['type']?_0xdf8269['previousPosition']['path']['slice'](0x0,-0x1):_0xdf8269['previousPosition']['path'],_0x1c4538=_0x5d0d9b['getNodeByPath'](_0x1ada75)['getAttribute'](_0x285ccf);this['_touched']['set'](_0x1c4538,{'userId':_0x349c1d});}_0x28710b['markers']['delete'](_0x3a5692);}}this['_startingRevisionId']=this['_revisionId'];const _0x46dde=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x49d8de=>!this['_touched']['has'](_0x49d8de));let _0x13a183=0x0;const _0x32ab57=new Map();for(const _0x4df85f in _0x21f08b['diffData']){const _0x4dbd6c=_0x21f08b['diffData'][_0x4df85f]['attachChange'],_0x58a4bf=_0x2c6e4c(_0x21f08b['diffData'][_0x4df85f]['attributesAfter'])||{},_0x18a687=_0x21f08b['diffData'][_0x4df85f],_0x45d467=_0x17c58c['_makeModelFromViewString'](_0x18a687['insertions'],_0x18a687['rootElementName']||'$root');_0x45d467['rootName']=_0x4df85f,_0x45d467['_isAttached']=!_0x4dbd6c||_0x4dbd6c['isAttached'],_0x45d467['isAttached']=()=>_0x45d467['_isAttached'],this['_diffRoots']['set'](_0x4df85f,_0x45d467),this['_diffRootsAttributes']['set'](_0x4df85f,_0x58a4bf);const _0x117082=this['_makeIdsRoot'](_0x45d467,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4df85f,_0x117082),_0x32ab57['set'](_0x4df85f,_0x45d467['isAttached']()?_0x58a4bf:{});for(const [_0x1d118a,_0x2abcc6]of _0x45d467['markers']){if(!_0x1d118a['startsWith']('revision:'))continue;const _0x223794=_0x1d118a['split'](':')[0x2];for(const _0x480bdd of _0x2abcc6['getWalker']({'singleCharacters':!0x0})){const _0x213aa3=this['_getVidAttributeName'](_0x480bdd),_0xbf433d=this['_revisionId']++,_0x9ca260='elementEnd'==_0x480bdd['type']?_0x480bdd['previousPosition']['path']['slice'](0x0,-0x1):_0x480bdd['previousPosition']['path'];_0x117082['getNodeByPath'](_0x9ca260)['_setAttribute'](_0x213aa3,_0xbf433d),this['_touched']['set'](_0xbf433d,{'userId':_0x223794});}_0x45d467['markers']['delete'](_0x1d118a);}for(const _0x5dde3e of this['editor']['model']['createRangeIn'](_0x45d467)['getWalker']({'singleCharacters':!0x0})){const _0x101c3b=this['_getVidAttributeName'](_0x5dde3e),_0x4cad4a='elementEnd'==_0x5dde3e['type']?_0x5dde3e['previousPosition']['path']['slice'](0x0,-0x1):_0x5dde3e['previousPosition']['path'],_0x125d9f=_0x117082['getNodeByPath'](_0x4cad4a);_0x125d9f['getAttribute'](_0x101c3b)>0x0||_0x125d9f['_setAttribute'](_0x101c3b,_0x46dde[_0x13a183++]);}for(const [_0x24ab26,_0x4c9380]of _0x45d467['markers'])_0x24ab26['startsWith']('revision:')||this['_markers']['set'](_0x24ab26,_0x4c9380);}const {roots:_0xc07945}=this['_savedMetaData']['get'](_0x21f08b['fromVersion']),{roots:_0x249b03}=this['_savedMetaData']['get'](_0x21f08b['toVersion']),_0x25d909=bt(_0xc07945['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x25d909),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x25d909,Number['NEGATIVE_INFINITY']));const _0xf2532b=bt(_0x249b03['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0xf2532b),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xf2532b));const _0x322491=Array['from'](this['_diffRoots'])['map'](([_0xc8e212,_0x27c7c9])=>[_0xc8e212,bt(_0x27c7c9)]);this['_saveMetaData'](this['_lastTo'],_0x322491,this['_markers'],_0x32ab57);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x536ea8,_0x485ed0,_0x25deea,_0x5a42d9){const _0x4b6283=new Map(_0x485ed0),_0x10d9d9=new Map(_0x2c6e4c(_0x5a42d9)),_0x3292ce=new Map();for(const [_0x5edf89,_0x6a1962]of _0x25deea)_0x3292ce['set'](_0x5edf89,{'start':_0x6a1962['start']['clone'](),'end':_0x6a1962['end']['clone'](),'rootName':_0x6a1962['root']['rootName']});this['_savedMetaData']['set'](_0x536ea8,{'roots':_0x4b6283,'markers':_0x3292ce,'rootsAttributes':_0x10d9d9});}_removeMetaData(_0x5342b9){this['_savedMetaData']['delete'](_0x5342b9);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}_makeIdsRoot(_0x32b485,_0x3060f3=null){let _0x3e938c=null;_0x32b485['is']('documentFragment')||(_0x3e938c=new _0x1da96f(_0x32b485['name'],{'vid_start':null===_0x3060f3?this['_revisionId']++:_0x3060f3++}));const _0x43684c=[];for(const _0x1c2627 of _0x32b485['getChildren']())if(_0x1c2627['is']('element')){_0x43684c['push'](this['_makeIdsRoot'](_0x1c2627,_0x3060f3));const _0x5e1aa4=_0x43684c[_0x43684c['length']-0x1];null!==_0x3060f3&&(_0x3060f3=_0x5e1aa4['is']('element','$text')?_0x5e1aa4['getAttribute']('vid')+0x1:_0x5e1aa4['getAttribute']('vid_end')+0x1);}else{for(let _0xd7f6f4=0x0;_0xd7f6f4<_0x1c2627['offsetSize'];_0xd7f6f4++)_0x43684c['push'](new _0x1da96f('$text',{'vid':null===_0x3060f3?this['_revisionId']++:_0x3060f3++}));}if(_0x32b485['is']('documentFragment')){const _0x328268=Rt(_0x32b485['rootName'],_0x32b485['name']);return _0x328268['_insertChild'](0x0,_0x43684c),_0x328268;}return _0x3e938c['_setAttribute']('vid_end',null===_0x3060f3?this['_revisionId']++:_0x3060f3),_0x3e938c['_insertChild'](0x0,_0x43684c),_0x3e938c;}_calculateMetaData(_0x3f696e,_0x4c89ec,_0x3ac02b){this['_reset']();const {roots:_0x4186ed,markers:_0x13b251,rootsAttributes:_0x5aa7fd}=this['_savedMetaData']['get'](_0x3f696e);this['_baseRoots']=new Map(_0x4186ed),this['_baseRootsAttributes']=new Map(_0x2c6e4c(_0x5aa7fd));for(const [_0x811af2,_0x2268e6]of this['_baseRoots'])if('$graveyard'!==_0x811af2&&(this['_diffRoots']['set'](_0x811af2,bt(_0x2268e6)),this['_diffRootsAttributes']=new Map(_0x2c6e4c(_0x5aa7fd)),_0x3ac02b)){const _0x506183=this['_revisionId'];this['_idsRoots']['set'](_0x811af2,this['_makeIdsRoot'](_0x2268e6)),this['_baseIdsRoots']['set'](_0x811af2,this['_makeIdsRoot'](_0x2268e6,_0x506183));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x3ac02b&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1633e9,_0x55fc11]of _0x13b251){const _0x37da80=this['_baseRoots']['get'](_0x55fc11['rootName']),_0x406793=this['_diffRoots']['get'](_0x55fc11['rootName']),_0x1da9fc=new _0x2b908e(this['_fixPosition'](_0x55fc11['start'],_0x37da80),this['_fixPosition'](_0x55fc11['end'],_0x37da80)),_0x5207e0=this['_fixRange'](_0x1da9fc,_0x406793);_0x37da80['markers']['set'](_0x1633e9,_0x1da9fc),this['_markers']['set'](_0x1633e9,_0x5207e0);}this['_applyOperations'](_0x3f696e,_0x4c89ec,_0x3ac02b);}_applyOperations(_0x2558e6,_0x44a2ad,_0x3889ee){for(const _0x53b1b1 of this['source']['getOperations'](_0x2558e6,_0x44a2ad))this['_handleOperation'](_0x53b1b1,_0x3889ee);for(const _0x32ecc4 of this['_diffRoots']['values']())_0x32ecc4['markers']['clear']();for(const [_0x274d6b,_0x566cd0]of this['_markers'])this['_diffRoots']['get'](_0x566cd0['root']['rootName'])['markers']['set'](_0x274d6b,_0x566cd0['clone']());const _0x3bb9ce=new Map(),_0x4b7a81=new Map();for(const [_0x4cd7d9,_0xf57a11]of this['_diffRoots'])_0x3bb9ce['set'](_0x4cd7d9,bt(_0xf57a11)),_0x4b7a81['set'](_0x4cd7d9,this['_diffRootsAttributes']['get'](_0x4cd7d9));this['_saveMetaData'](_0x44a2ad,_0x3bb9ce,this['_markers'],_0x4b7a81);}_getPreviousFrom(_0x4c2793){const _0x56955f=Array['from'](this['_savedMetaData']['keys']());_0x56955f['sort']((_0x2aac11,_0x452220)=>_0x2aac11-_0x452220),_0x56955f['reverse']();for(const _0x3cabe4 of _0x56955f)if(_0x3cabe4<_0x4c2793)return _0x3cabe4;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x82b7a2,_0x1601db){const _0x5e7113=Array['from'](_0x1601db['markers'])['map'](([_0x503ff1,_0x40aca9])=>[_0x503ff1,this['_fixRange'](_0x40aca9,_0x82b7a2)]);_0x82b7a2['markers']=new Map(_0x5e7113);}_transformMarkers(_0x596f30){for(const _0x224e7a of this['_markers']['values']()){const _0x1593a1=_0x224e7a['getTransformedByOperation'](_0x596f30),_0x34b7b8=_0x2b908e['_createFromRanges'](_0x1593a1);_0x224e7a['start']=_0x34b7b8['start'],_0x224e7a['end']=_0x34b7b8['end'];}}_handleOperation(_0x4733ab,_0x2ad281){if('addRoot'!=_0x4733ab['type']&&'detachRoot'!=_0x4733ab['type']){if('insert'==_0x4733ab['type']){const _0x260688=_0x4733ab['position']['root'],_0x1490d3=_0x260688['rootName'],_0xb70d78=_0x260688['name'];this['_diffRoots']['has'](_0x1490d3)||(this['_diffRoots']['set'](_0x1490d3,Rt(_0x1490d3,_0xb70d78,!0x0)),this['_diffRootsAttributes']['set'](_0x1490d3,{}),_0x2ad281&&this['_idsRoots']['set'](_0x1490d3,Rt(_0x1490d3,_0xb70d78,!0x0)));}else{if('addRootAttribute'==_0x4733ab['type']||'removeRootAttribute'==_0x4733ab['type']||'changeRootAttribute'==_0x4733ab['type'])return void this['_handleRootAttributeOperation'](_0x4733ab);'marker'==_0x4733ab['type']&&this['_handleMarkerOperation'](_0x4733ab);}if('marker'!==_0x4733ab['type']){const _0x514681=this['_cloneOperation'](_0x4733ab,this['_diffRoots']);_0x514681['_execute'](),this['_transformMarkers'](_0x514681);}if(_0x2ad281)switch(_0x4733ab['type']){case'insert':this['_handleInsertOperation'](_0x4733ab);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4733ab);break;case'merge':this['_handleMergeOperation'](_0x4733ab);break;case'split':this['_handleSplitOperation'](_0x4733ab);}}else this['_handleRootOperation'](_0x4733ab,_0x2ad281);}_cloneOperation(_0x191b95,_0xed72ab){const _0xbc79bf=_0x191b95['clone']();return _0xbc79bf['_authorId']=_0x191b95['_authorId'],this['_fixOperation'](_0xbc79bf,_0xed72ab),_0xbc79bf;}_getBaseVids(_0x125d33){return _0x125d33['map'](_0x1673af=>{const _0x455fca=this['_getVidAttributeName'](_0x1673af);return Number(_0x1673af['item']['getAttribute'](_0x455fca));});}_generateTape(_0x4624c1,_0x3fec8c){if(_0x4624c1['is']('element','$text'))_0x3fec8c['push']({'item':_0x4624c1,'type':'text'});else{_0x4624c1['is']('element')&&_0x3fec8c['push']({'item':_0x4624c1,'type':'elementStart'});for(const _0x2558ea of _0x4624c1['getChildren']())this['_generateTape'](_0x2558ea,_0x3fec8c);_0x4624c1['is']('element')&&_0x3fec8c['push']({'item':_0x4624c1,'type':'elementEnd'});}return _0x3fec8c;}_getState(){const _0xe7dcdb=new Map(this['_touched']),_0x34ae08=new Map(_0xe7dcdb),_0x54b0f9=new Map(),_0x392d00={'insertions':{},'deletions':{}},_0x5752ce={'insertions':{},'deletions':{}},_0x5e5d4e=new Map(),_0x1d83b8=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x3a85f0=new Map();_0x1d83b8['delete']('$graveyard');for(const _0x227028 of _0x1d83b8){const _0x1a4726=(this['_diffRoots']['get'](_0x227028)??this['_baseRoots']['get'](_0x227028))['name'],_0x2793dc=this['_diffRoots']['get'](_0x227028)||Rt(_0x227028,_0x1a4726,!0x1),_0x45f1b0=this['_baseRoots']['get'](_0x227028)||Rt(_0x227028,_0x1a4726,!0x1);_0x2793dc['isAttached']()||_0x45f1b0['isAttached']()?(_0x3a85f0['set'](_0x227028,_0x1a4726),_0x392d00['insertions'][_0x227028]=bt(_0x2793dc),_0x392d00['deletions'][_0x227028]=bt(_0x45f1b0),this['_copyMarkers'](_0x392d00['deletions'][_0x227028],_0x45f1b0),this['_copyMarkers'](_0x392d00['insertions'][_0x227028],_0x2793dc),_0x5752ce['insertions'][_0x227028]=this['_generateTape'](this['_idsRoots']['get'](_0x227028),[]),_0x5752ce['deletions'][_0x227028]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x227028)||Rt(_0x227028,_0x1a4726,!0x1),[])):_0x1d83b8['delete'](_0x227028);}for(const _0x333d8e of _0x1d83b8){const _0x59c9d6=_0x5752ce['insertions'][_0x333d8e];for(const _0x5861a9 of _0x59c9d6){const _0x3e1cc3=this['_getVidAttributeName'](_0x5861a9),_0x11e86f=_0x5861a9['item']['getAttribute'](_0x3e1cc3);_0x34ae08['delete'](_0x11e86f),_0x11e86f>=this['_startingRevisionId']&&_0x54b0f9['set'](_0x11e86f,_0xe7dcdb['get'](_0x11e86f));}}for(const _0x2ea6dc of _0x1d83b8){const _0xa33fe8=_0x5752ce['insertions'][_0x2ea6dc],_0x5049eb=this['_getBaseVids'](_0x5752ce['deletions'][_0x2ea6dc]);let _0x14482a=0x0;for(const _0x312d23 of _0xa33fe8){const _0x5301d9=this['_getVidAttributeName'](_0x312d23),_0x121a19=_0x312d23['item']['getAttribute'](_0x5301d9);if(!_0x54b0f9['has'](_0x121a19)&&!_0x5e5d4e['has'](_0x121a19)){if(_0x34ae08['has'](_0x121a19))_0x14482a++;else{if(_0x121a19!=_0x5049eb[_0x14482a]){const _0x45c258=_0xe7dcdb['get'](_0x121a19)||_0xe7dcdb['get'](_0x5049eb[_0x14482a]);for(;_0x121a19!=_0x5049eb[_0x14482a];)_0x34ae08['has'](_0x5049eb[_0x14482a])||(_0x5e5d4e['set'](_0x5049eb[_0x14482a],_0x45c258),_0xe7dcdb['set'](_0x5049eb[_0x14482a],_0x45c258)),_0x14482a++;}_0x14482a++;}}}}for(const _0xcf878f of _0x1d83b8){const _0x4c647e=_0x5752ce['insertions'][_0xcf878f];for(const _0x26f789 of _0x4c647e){const _0xb8e66b=this['_getVidAttributeName'](_0x26f789),_0x204519=_0x26f789['item']['getAttribute'](_0xb8e66b);if(_0x5e5d4e['has'](_0x204519)){const _0x1b9559=_0x5e5d4e['get'](_0x204519);_0x34ae08['has'](_0x204519)||_0x34ae08['set'](_0x204519,{..._0x1b9559}),_0x54b0f9['set'](_0x204519,{..._0x1b9559});}}}for(const _0x5bae19 of _0x34ae08['keys']())_0x5bae19>=this['_startingRevisionId']&&_0x34ae08['delete'](_0x5bae19);const _0x4180eb=new Map();for(const _0xca59dd of _0x1d83b8){let _0x471d53=_0x5752ce['insertions'][_0xca59dd];for(const _0x14e502 of _0x471d53)if(_0x14e502['item']['is']('element','tableCell')){const _0x1f66fd=this['_getVidAttributeName'](_0x14e502),_0x335346=_0x14e502['item']['getAttribute'](_0x1f66fd);if(_0x54b0f9['has'](_0x335346)){const _0x1d7ff5=_0x14e502['item']['parent']['parent']['getAttribute']('vid_start'),_0x34030a=_0x4180eb['get'](_0x1d7ff5)||new Set();_0x34030a['add'](_0x54b0f9['get'](_0x335346)['userId']),_0x4180eb['set'](_0x1d7ff5,_0x34030a);}}_0x471d53=_0x5752ce['deletions'][_0xca59dd];for(const _0x1e7baf of _0x471d53)if(_0x1e7baf['item']['is']('element','tableCell')){const _0x1b563e=this['_getVidAttributeName'](_0x1e7baf),_0x5307cf=_0x1e7baf['item']['getAttribute'](_0x1b563e);if(_0x34ae08['has'](_0x5307cf)){const _0x3fdc2b=_0x1e7baf['item']['parent']['parent']['getAttribute']('vid_start'),_0x572fbc=_0x4180eb['get'](_0x3fdc2b)||new Set();_0x572fbc['add'](_0x34ae08['get'](_0x5307cf)['userId']),_0x4180eb['set'](_0x3fdc2b,_0x572fbc);}}for(const _0x43b38f of _0x4180eb['keys']())(_0x54b0f9['has'](_0x43b38f)||_0x34ae08['has'](_0x43b38f))&&_0x4180eb['delete'](_0x43b38f);}for(const _0x118bbd of _0x1d83b8){const _0x1cde43=_0x5752ce['insertions'][_0x118bbd];let _0x2ae32c=null,_0x1aa268=null;for(const _0x46621f of _0x1cde43){const _0x17947e=this['_getVidAttributeName'](_0x46621f),_0x4c1a3c=_0x46621f['item']['getAttribute'](_0x17947e),_0x46021a=_0x4180eb['get'](_0x4c1a3c);_0x46021a&&'elementStart'==_0x46621f['type']&&(_0x2ae32c=Array['from'](_0x46021a)[0x0],_0x1aa268=_0x46621f['item']['getAttribute']('vid_end')),_0x2ae32c&&(_0x34ae08['set'](_0x4c1a3c,{'userId':_0x2ae32c}),_0x54b0f9['set'](_0x4c1a3c,{'userId':_0x2ae32c})),_0x4c1a3c==_0x1aa268&&(_0x2ae32c=null,_0x1aa268=null);}}const _0x3072fa={},_0x51d4a6=new Set();for(const _0x5d507f of _0x1d83b8){const _0x3569bd=_0x392d00['deletions'][_0x5d507f],_0x2d7e54=_0x392d00['insertions'][_0x5d507f];for(const {userId:_0x55fb12}of this['_touchedMarkers']['values']())null!==_0x55fb12&&_0x51d4a6['add'](_0x55fb12);for(const {userId:_0x2cf0e1}of this['_touchedRoots']['values']())null!==_0x2cf0e1&&_0x51d4a6['add'](_0x2cf0e1);this['_markChanges'](_0x2d7e54,_0x5752ce['insertions'][_0x5d507f],_0x54b0f9,'insertion',_0x51d4a6),this['_markChanges'](_0x3569bd,_0x5752ce['deletions'][_0x5d507f],_0x34ae08,'deletion',_0x51d4a6),_0x3072fa[_0x5d507f]={'insertions':this['_prepareViewToSave'](_0x2d7e54),'deletions':this['_prepareViewToSave'](_0x3569bd),'attachChange':this['_touchedRoots']['get'](_0x5d507f)||null,'attributesBefore':_0x2c6e4c(this['_baseRootsAttributes']['get'](_0x5d507f))||{},'attributesAfter':_0x2c6e4c(this['_diffRootsAttributes']['get'](_0x5d507f)),'rootElementName':_0x3a85f0['get'](_0x5d507f)};}return{'diffData':_0x3072fa,'authorsIds':Array['from'](_0x51d4a6)};}_processRootBeforeSave(_0x138cc6){for(const [,_0x28ebc3]of _0x138cc6['markers']){const _0x3367f1=_0x28ebc3['start']['getAncestors']()['filter'](_0x3e1e19=>'tableCell'==_0x3e1e19['name']);for(const _0x3fbc04 of _0x3367f1)0x1==_0x3fbc04['childCount']&&_0x3fbc04['getChild'](0x0)['is']('element','paragraph')&&_0x3fbc04['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x2b3bee){this['_processRootBeforeSave'](_0x2b3bee);const _0x217e0c=this['editor']['data']['toView'](_0x2b3bee,{}),_0x5190f6=Array['from'](_0x217e0c['getChildren']())['map'](_0x1dc7ca=>this['_getViewJson'](_0x1dc7ca));return JSON['stringify'](_0x5190f6);}_getViewJson(_0x71909d){if(_0x71909d['is']('$text'))return _0x71909d['data'];{const _0x48ad7b=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0xf41124=_0x71909d,_0x3c29f1=this['editor']['data']['htmlProcessor']['domConverter'],_0x5e1f7e={'type':_0x48ad7b['_getTypeCharForViewElement'](_0xf41124),'name':_0xf41124['name'],'attributes':Array['from'](_0xf41124['getAttributes']()),'children':Array['from'](_0xf41124['getChildren']())['map'](_0x55a224=>this['_getViewJson'](_0x55a224))};if(_0x71909d['is']('uiElement')&&'$comment'!=_0x71909d['name']){const _0x4fe1ba=_0x71909d['render'](_0x3c29f1['domDocument'],_0x3c29f1);_0x5e1f7e['children']['push'](_0x4fe1ba['outerHTML']);}else{if(_0x71909d['is']('rawElement')){const _0x163f5e=_0x3c29f1['domDocument']['createElement'](_0xf41124['name']);_0x71909d['render'](_0x163f5e,_0x3c29f1),_0x5e1f7e['children']['push'](_0x163f5e['innerHTML']);}}const _0x2f3129=Array['from'](_0xf41124['getCustomProperties']());_0x2f3129['length']>0x0&&(_0x5e1f7e['customProperties']=_0x2f3129);const _0x9970ab=_0xf41124['getFillerOffset']();return null!==_0x9970ab&&(_0x5e1f7e['fillerOffset']=_0x9970ab),_0x5e1f7e;}}['_markChanges'](_0x4ee9b6,_0x396f51,_0x470f92,_0x238681,_0xe55754){let _0x3913c7=null,_0x54e1e3=null,_0x7c5108=0x0;const _0x516106=this['editor']['model'];for(let _0x380e63=0x0;_0x380e63<_0x396f51['length'];_0x380e63++){const _0x134303=this['_getVidAttributeName'](_0x396f51[_0x380e63]),_0x452c68=_0x396f51[_0x380e63]['item']['getAttribute'](_0x134303),_0xd66675=_0x470f92['get'](_0x452c68),_0x3eaada=_0x380e63==_0x396f51['length']-0x1;!_0x3913c7&&_0xd66675&&(_0x3913c7=_0xd66675,_0x54e1e3=_0x396f51[_0x380e63]),!_0x3913c7||_0xd66675&&_0xd66675['userId']==_0x3913c7['userId']||(_0x1c25df(_0xd66675,kt(_0x54e1e3,_0x4ee9b6,_0x516106),kt(_0x396f51[_0x380e63],_0x4ee9b6,_0x516106)),_0x3913c7=_0xd66675||null,_0x54e1e3=_0xd66675?_0x396f51[_0x380e63]:null),_0x3913c7&&_0x3eaada&&_0x1c25df(_0xd66675,kt(_0x54e1e3,_0x4ee9b6,_0x516106),At(_0x396f51[_0x380e63],_0x4ee9b6,_0x516106));}function _0x1c25df(_0x3dd7f1,_0x3feea6,_0x502d30){const _0xc19d9f=_0x3913c7['userId'],_0xda8a4='revision:'+_0x238681+':'+_0xc19d9f+':'+_0x7c5108++,_0xb1409a=_0x516106['createRange'](_0x3feea6,_0x502d30);_0x4ee9b6['markers']['set'](_0xda8a4,_0xb1409a),null!==_0xc19d9f&&_0xe55754['add'](_0xc19d9f);}}_getVidAttributeName(_0x39bc11){switch(_0x39bc11['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_fixOperation(_0x2b2cf2,_0x4cf8ba){_0x2b2cf2['baseVersion']=null;for(const _0x43732a in _0x2b2cf2){const _0x5f580b=_0x2b2cf2[_0x43732a];if(_0x5f580b instanceof _0x397840){const _0x4a062f=_0x4cf8ba['get'](_0x5f580b['root']['rootName']);_0x2b2cf2[_0x43732a]=this['_fixPosition'](_0x5f580b,_0x4a062f);}if(_0x5f580b instanceof _0x2b908e){const _0x3dd139=_0x4cf8ba['get'](_0x5f580b['root']['rootName']);_0x2b2cf2[_0x43732a]=this['_fixRange'](_0x5f580b,_0x3dd139);}'root'===_0x43732a&&(_0x2b2cf2['root']=_0x4cf8ba['get'](_0x2b2cf2['root']['rootName']));}}['_fixRange'](_0x5c7c68,_0x43cc01){return this['editor']['model']['createRange'](this['_fixPosition'](_0x5c7c68['start'],_0x43cc01),this['_fixPosition'](_0x5c7c68['end'],_0x43cc01));}_fixPosition(_0x1ef3a4,_0x39ef21){return this['editor']['model']['createPositionFromPath'](_0x39ef21,_0x1ef3a4['path'],_0x1ef3a4['stickiness']);}_handleInsertOperation(_0x2d3913){const _0x3e53cc=this['_idsRoots']['get'](_0x2d3913['position']['root']['rootName']),_0x263cf4=this['_fixPosition'](_0x2d3913['position'],_0x3e53cc),_0x31b4e9=null===_0x2d3913['_authorId']?null:_0x2d3913['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5b297e=_0x263cf4['parent'],_0x3bae83=this['_revisionId'],_0x59cb03=[];for(const _0x2e584e of _0x2d3913['nodes'])if(_0x2e584e['is']('element'))_0x59cb03['push'](this['_makeIdsRoot'](_0x2e584e));else{for(let _0x4f1795=0x0;_0x4f1795<_0x2e584e['offsetSize'];_0x4f1795++)_0x59cb03['push'](new _0x1da96f('$text',{'vid':this['_revisionId']++}));}const _0x4c517d=this['_revisionId'];for(let _0x2fc69e=_0x3bae83;_0x2fc69e<_0x4c517d;_0x2fc69e++)this['_touched']['set'](_0x2fc69e,{'userId':_0x31b4e9});_0x5b297e['_insertChild'](_0x263cf4['offset'],_0x59cb03);}_handleMoveOperation(_0x266b02){(_0x266b02=this['_cloneOperation'](_0x266b02,this['_idsRoots']))['_execute']();const _0x59a5df=null===_0x266b02['_authorId']?null:_0x266b02['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3355ab=_0x266b02['getMovedRangeStart'](),_0x5287b9=_0x3355ab['parent'],_0x47747f=_0x3355ab['offset'];!function _0x334261(_0x3449e0,_0x25c1cb,_0x455e14,_0x1601a1){for(let _0x4d2964=_0x455e14;_0x4d2964<_0x1601a1;_0x4d2964++){const _0x7bd18f=_0x25c1cb['getChild'](_0x4d2964);_0x7bd18f['is']('element','$text')?_0x3449e0['set'](_0x7bd18f['getAttribute']('vid'),{'userId':_0x59a5df}):(_0x3449e0['set'](_0x7bd18f['getAttribute']('vid_start'),{'userId':_0x59a5df}),_0x334261(_0x3449e0,_0x7bd18f,0x0,_0x7bd18f['childCount']),_0x3449e0['set'](_0x7bd18f['getAttribute']('vid_end'),{'userId':_0x59a5df}));}}(this['_touched'],_0x5287b9,_0x47747f,_0x47747f+_0x266b02['howMany']);}_handleMergeOperation(_0xa084d2){const _0x626b6a=null===(_0xa084d2=this['_cloneOperation'](_0xa084d2,this['_idsRoots']))['_authorId']?null:_0xa084d2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x38b9e4=_0xa084d2['targetPosition']['parent'],_0x21a9a7=_0xa084d2['sourcePosition']['parent'],_0x462c56=_0x38b9e4['getAttribute']('vid_end'),_0x1fae24=_0x21a9a7['getAttribute']('vid_start');_0x38b9e4['_setAttribute']('vid_end',_0x21a9a7['getAttribute']('vid_end')),_0x21a9a7['_setAttribute']('vid_end',_0x462c56),this['_touched']['set'](_0x1fae24,{'userId':_0x626b6a}),this['_touched']['set'](_0x462c56,{'userId':_0x626b6a}),_0xa084d2['_execute']();}_handleSplitOperation(_0xd29165){const _0x17c604=null===(_0xd29165=this['_cloneOperation'](_0xd29165,this['_idsRoots']))['_authorId']?null:_0xd29165['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43ac29=_0xd29165['graveyardPosition'],_0x57c318=_0xd29165['splitPosition']['parent'];_0xd29165['_execute']();const _0x40c57a=_0x57c318['getAttribute']('vid_end'),_0x5c5c55=_0xd29165['insertionPosition']['nodeAfter'];if(_0x43ac29){const _0x29a418=_0x5c5c55['getAttribute']('vid_end'),_0x1f2b5d=_0x57c318['getAttribute']('vid_end');_0x57c318['_setAttribute']('vid_end',_0x29a418),_0x5c5c55['_setAttribute']('vid_end',_0x1f2b5d),this['_touched']['set'](_0x57c318['getAttribute']('vid_end'),{'userId':_0x17c604}),this['_touched']['set'](_0x5c5c55['getAttribute']('vid_start'),{'userId':_0x17c604});}else{const _0x4ee960=this['_revisionId']++,_0x28512f=this['_revisionId']++;_0x57c318['_setAttribute']('vid_end',_0x4ee960),_0x5c5c55['_setAttribute']('vid_start',_0x28512f),_0x5c5c55['_setAttribute']('vid_end',_0x40c57a),this['_touched']['set'](_0x4ee960,{'userId':_0x17c604}),this['_touched']['set'](_0x28512f,{'userId':_0x17c604});}}_handleMarkerOperation(_0x552fd6){if(!_0x552fd6['affectsData'])return;const _0x376d20=(_0x552fd6=this['_cloneOperation'](_0x552fd6,this['_diffRoots']))['oldRange']?_0x552fd6['oldRange']['root']:null,_0x2b77e9=_0x552fd6['newRange']?_0x552fd6['newRange']['root']:null;_0x376d20&&this['_markers']['delete'](_0x552fd6['name']),_0x2b77e9&&this['_markers']['set'](_0x552fd6['name'],_0x552fd6['newRange']['clone']());const _0x3c3af6=null===_0x552fd6['_authorId']?null:_0x552fd6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c1b25=_0x552fd6['name'];if(!this['_touchedMarkers']['has'](_0x4c1b25))return void this['_touchedMarkers']['set'](_0x4c1b25,{'range':_0x552fd6['oldRange'],'userId':_0x3c3af6});const _0xb39743=this['_touchedMarkers']['get'](_0x4c1b25),_0x20cff0=_0xb39743['range'],_0x4e3783=_0x552fd6['newRange'];null==_0x20cff0&&null==_0x4e3783||_0x20cff0&&_0x4e3783&&_0x20cff0['isEqual'](_0x4e3783)?this['_touchedMarkers']['delete'](_0x552fd6['name']):_0xb39743['userId']=_0x3c3af6;}_handleRootOperation(_0x483e73,_0x17d342){this['_diffRoots']['has'](_0x483e73['rootName'])?this['_diffRoots']['get'](_0x483e73['rootName'])['_isAttached']=_0x483e73['isAdd']:(this['_diffRoots']['set'](_0x483e73['rootName'],Rt(_0x483e73['rootName'],_0x483e73['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x483e73['rootName'],{}),_0x17d342&&this['_idsRoots']['set'](_0x483e73['rootName'],Rt(_0x483e73['rootName'],_0x483e73['elementName'],!0x0)));const _0xb403a8=null===_0x483e73['_authorId']?null:_0x483e73['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1cc6df=this['_touchedRoots']['get'](_0x483e73['rootName']);_0x1cc6df&&_0x1cc6df['userId']===_0xb403a8?this['_touchedRoots']['delete'](_0x483e73['rootName']):this['_touchedRoots']['set'](_0x483e73['rootName'],{'userId':_0xb403a8,'isAttached':_0x483e73['isAdd']});}_handleRootAttributeOperation(_0x111b5a){const _0x37dfd7=this['_diffRootsAttributes']['get'](_0x111b5a['root']['rootName']);null===_0x111b5a['newValue']?delete _0x37dfd7[_0x111b5a['key']]:_0x37dfd7[_0x111b5a['key']]=_0x111b5a['newValue'];}};function bt(_0x5ee32d){const _0x6f0a8e=Rt(_0x5ee32d['rootName'],_0x5ee32d['name'],_0x5ee32d['isAttached']());for(const _0x595184 of _0x5ee32d['getChildren']()){const _0x22b2e3=_0x595184['_clone'](!0x0);_0x6f0a8e['_appendChild'](_0x22b2e3);}return _0x6f0a8e;}function Rt(_0x21a97c,_0x516752,_0x2d0059=!0x0){const _0x536a77=new _0x4f04f1();return _0x536a77['rootName']=_0x21a97c,_0x536a77['name']=_0x516752,_0x536a77['_isAttached']=_0x2d0059,_0x536a77['isAttached']=()=>_0x536a77['_isAttached'],_0x536a77;}function kt(_0xf15017,_0x3f98e7,_0x5b1c48){const _0x405528='elementEnd'==_0xf15017['type']?_0x5b1c48['createPositionAt'](_0xf15017['item'],'end'):_0x5b1c48['createPositionBefore'](_0xf15017['item']);return _0x5b1c48['createPositionFromPath'](_0x3f98e7,_0x405528['path'],_0x405528['stickiness']);}function At(_0x1430ae,_0x4d05bd,_0xb8e360){const _0x5010f6='elementStart'==_0x1430ae['type']?_0xb8e360['createPositionAt'](_0x1430ae['item'],0x0):_0xb8e360['createPositionAfter'](_0x1430ae['item']);return _0xb8e360['createPositionFromPath'](_0x4d05bd,_0x5010f6['path'],_0x5010f6['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4dd2fb(at);var Et=class extends It{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x3e8e65,_0x588852){super(_0x3e8e65),this['focusTracker']=new _0x301405(),this['keystrokes']=new _0x4365ba(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x588852),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'](),dt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x1f40d4=_0xd6123f=>_0xd6123f['stopPropagation']();this['keystrokes']['set']('arrowright',_0x1f40d4),this['keystrokes']['set']('arrowleft',_0x1f40d4),this['keystrokes']['set']('arrowup',_0x1f40d4),this['keystrokes']['set']('arrowdown',_0x1f40d4);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x11e6f2){this['revisionNameInputView']['fieldView']['element']['value']=_0x11e6f2['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x2bc9a7){const _0x390cf5=new _0x3d2f09(this['locale'],lt),_0x40f15f=_0x390cf5['fieldView'];_0x40f15f['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x5ef95f=pt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x2bc9a7&&(_0x5ef95f+='\x20('+pt(this['locale'],'optional')+')'),(_0x390cf5['label']=_0x5ef95f,_0x40f15f['on']('input',()=>{this['revisionNameInputValue']=_0x40f15f['element']['value']['trim']();}),_0x390cf5);}},St=class extends _0x3bf7c2{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_t];}['_saveRevisionFormView'];init(){const _0xbfbf9b=this['editor'],_0x516c99=_0xbfbf9b['plugins']['get']('RevisionTracker');_0xbfbf9b['ui']['componentFactory']['add']('revisionHistory',_0x16cad1=>{const _0x112e2d=ct(_0x16cad1),_0x1e8531=_0x112e2d['panelView']['children'],_0x3f174a=new _0x4abd20(_0x16cad1),_0x8b344=new _0x291c8e(_0x16cad1),_0x447b90=this['_createSaveRevisionButton'](_0x2fc172),_0x1c6c42=new _0x291c8e(_0x16cad1),_0x3757b0=this['_createOpenRevisionButton'](_0x2fc172);return _0x112e2d['bind']('isEnabled')['to'](_0x516c99,'isReady',_0x516c99,'isEnabled',_0xbfbf9b,'isReadOnly',(_0x4be8f1,_0x51d061,_0x39d74b)=>_0x4be8f1&&_0x51d061&&!_0x39d74b),_0x112e2d['buttonView']['set']({'icon':_0x447870,'label':pt(_0x16cad1,'Revision\x20history'),'tooltip':!0x0}),_0x447b90['set']({'withText':!0x0,'role':'menuitem'}),_0x3757b0['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x3757b0,'execute',()=>{_0x112e2d['isOpen']=!0x1,_0xbfbf9b['editing']['view']['focus']();},{'priority':'low'}),_0x8b344['children']['add'](_0x447b90),_0x1c6c42['children']['add'](_0x3757b0),_0x3f174a['role']='menu',_0x3f174a['items']['addMany']([_0x8b344,_0x1c6c42]),_0x1e8531['add'](_0x3f174a),_0x112e2d;}),_0xbfbf9b['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x25a39a=this['editor'],_0x4825c6=_0x25a39a['locale'],_0x51d67a=_0x25a39a['plugins']['get']('RevisionTracker'),_0x1b56a7=new et(_0x4825c6),_0x4bd2b6=new it(_0x4825c6);_0x1b56a7['bind']('isEnabled')['to'](_0x51d67a,'isReady',_0x51d67a,'isEnabled',_0x25a39a,'isReadOnly',(_0x4d2a74,_0x3da484,_0x25723b)=>_0x4d2a74&&_0x3da484&&!_0x25723b),_0x1b56a7['buttonView']['set']({'icon':_0x447870,'label':pt(_0x4825c6,'Revision\x20history')});const _0x35b6b4=new tt(_0x4825c6,_0x1b56a7),_0x3d5147=this['_createSaveRevisionButton'](_0x35f752);_0x3d5147['delegate']('execute')['to'](_0x1b56a7),_0x35b6b4['children']['add'](_0x3d5147),_0x4bd2b6['items']['add'](_0x35b6b4);const _0x1ed6dd=new tt(_0x4825c6,_0x1b56a7),_0x451674=this['_createOpenRevisionButton'](_0x35f752);return _0x451674['delegate']('execute')['to'](_0x1b56a7),_0x1ed6dd['children']['add'](_0x451674),_0x4bd2b6['items']['add'](_0x1ed6dd),_0x1b56a7['panelView']['children']['add'](_0x4bd2b6),_0x1b56a7;}_createSaveRevisionButton(_0x47c3f2){const _0x16dc0d=this['editor'],_0x56f4a8=_0x16dc0d['plugins']['get']('RevisionTracker'),_0x191b86=new _0x47c3f2(_0x16dc0d['locale']);return _0x191b86['set']({'label':pt(_0x16dc0d['locale'],'Save\x20current\x20revision')}),_0x191b86['bind']('isEnabled')['to'](_0x56f4a8,'isReady',_0x56f4a8,'isEnabled',_0x16dc0d,'isReadOnly',(_0x477469,_0x48259a,_0x8659cf)=>_0x477469&&_0x48259a&&!_0x8659cf),this['listenTo'](_0x191b86,'execute',()=>{this['_showDialog']();}),_0x191b86;}_createOpenRevisionButton(_0x54167d){const _0x1944a7=this['editor'],_0x293d6f=_0x1944a7['plugins']['get']('RevisionTracker'),_0x5719fe=new _0x54167d(_0x1944a7['locale']);return _0x5719fe['set']({'label':pt(_0x1944a7['locale'],'Open\x20revision\x20history')}),_0x5719fe['bind']('isEnabled')['to'](_0x293d6f,'isReady',_0x1944a7,'isReadOnly',(_0x22bc71,_0x5c12ba)=>_0x22bc71&&!_0x5c12ba),this['listenTo'](_0x5719fe,'execute',()=>{_0x1944a7['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x5719fe;}['_showDialog'](){const _0x5966a9=this['editor'],_0xcb4365=_0x5966a9['locale'],_0x5d851b=_0x5966a9['plugins']['get']('Dialog'),_0x53451e=_0x5966a9['plugins']['get']('RevisionTracker');function _0x5e903d(_0x16a5be){_0x5966a9['config']['get']('revisionHistory.requireRevisionName')&&''===_0x16a5be['revisionName']?_0x16a5be['revisionNameInputView']['errorText']=pt(_0xcb4365,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x5966a9['plugins']['get'](_t)['saveRevision']({'name':_0x16a5be['revisionName']}),_0x5d851b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5e903d(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x5d851b['show']({'id':'revisionSave','title':pt(_0xcb4365,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':pt(_0x5966a9['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x5d851b['hide']()},{'label':pt(_0x5966a9['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4f7b24){_0x4f7b24['bind']('isEnabled')['to'](_0x53451e,'isReady',_0x53451e,'isEnabled',_0x5966a9,'isReadOnly',(_0x2208d5,_0x54b96f,_0x550f7c)=>_0x2208d5&&_0x54b96f&&!_0x550f7c);},'onExecute':()=>_0x5e903d(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x1decde=this['editor'],_0x41c4ce=_0x1decde['locale'];this['_saveRevisionFormView']=new Et(_0x41c4ce,_0x1decde['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Nt=class extends at{['changeId'];['_model'];constructor(_0x1440de,_0x1bd2d1){super(_0x1440de),this['_model']=_0x1bd2d1,this['changeId']=_0x1bd2d1['id'];const _0x5045f6=this['bindTemplate'],_0x360460=pt(_0x1440de,_0x1bd2d1['data']['isSuggestion']?'Suggested\x20by':'add'==_0x1bd2d1['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x1bd2d1['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5045f6['to']('type',_0x4aefc8=>'ck-revision-change__'+_0x4aefc8)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x360460}]},{'text':'\x20'+_0x1bd2d1['author']['name']}]}]});}['focus'](){this['element']['focus']();}};const xt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x47a3a3();var Ot=class extends xt{['id'];author;type;data;rootName;constructor(_0x1f97d0){super(),this['id']=_0x1f97d0['id']||_0x49a83a(),this['author']=_0x1f97d0['author'],this['type']=_0x1f97d0['type'],this['data']=_0x1f97d0['data']||{},this['rootName']=_0x1f97d0['rootName'],this['set']('createdAt',_0x1f97d0['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xfc8f05,_0x5510df){this['newRevisionId']=_0xfc8f05,this['oldRevisionId']=_0x5510df,this['changes']=new _0x15d7e8();}_setChanges(_0x34644e){for(const _0x5c62f7 of _0x34644e)this['changes']['add'](_0x5c62f7);}},Mt=class extends _0x3bf7c2{repository;adapter=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x403926,_0x8479c5,mt,wt];}constructor(_0x2b744c){super(_0x2b744c),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',(_0x7b6ea,_0x490f79,_0x151619)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x227e0d=>{for(const _0x143444 of this['editor']['editing']['view']['document']['roots'])_0x151619?_0x227e0d['removeClass']('ck-editor__editable__overlay',_0x143444):_0x227e0d['addClass']('ck-editor__editable__overlay',_0x143444);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x10743f=>null!==_0x10743f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3561e2,_0x46b6e7,_0x2da44d)=>_0x3561e2&&_0x2da44d?_0x46b6e7['changes']['getIndex'](_0x2da44d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3b9b5a,_0x2e9928)=>_0x3b9b5a?_0x2e9928['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x8479c5);}init(){const _0x31999e=this['editor'],_0x2084d9=new Tt(_0x31999e,{'direction':'backward'}),_0x5b6782=new Tt(_0x31999e,{'direction':'forward'});_0x31999e['commands']['add']('showPreviousChange',_0x2084d9),_0x31999e['commands']['add']('showNextChange',_0x5b6782),_0x31999e['commands']['add']('restoreRevision',new Dt(_0x31999e)),this['on']('change:numberOfChanges',()=>{_0x2084d9['refresh'](),_0x5b6782['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x31999e['enableReadOnlyMode']('revision-viewer'),_0x31999e['plugins']['has']('WidgetToolbarRepository')&&_0x31999e['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0xf1a6cf){return await this['_utils']['loadRevisionData'](_0xf1a6cf,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xf1a6cf);}async getRevisionRootsAttributes(_0x22a138){return await this['_utils']['loadRevisionData'](_0x22a138,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x22a138);}async['compare'](_0x49c1e6,_0x50cafb,_0x1758f0=!0x1){if(!this['isEnabled'])return;const _0x59f78c=this['diff'],_0xc5ee5=this['repository'],_0x2df978='string'==typeof _0x49c1e6?_0xc5ee5['getRevision'](_0x49c1e6):_0x49c1e6,_0x71820='string'==typeof _0x50cafb?_0xc5ee5['getRevision'](_0x50cafb):_0x50cafb,_0x7c18b0=_0x2df978['id'],_0x1405f3=_0x71820?_0x71820['id']:null;if(!_0x1758f0&&this['diff']&&this['diff']['newRevisionId']===_0x7c18b0&&this['diff']['oldRevisionId']===_0x1405f3)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x7c18b0,_0x1405f3);const _0x14d848=this['_getRevisionsRange'](_0x2df978,_0x71820,!0x0)['map'](_0x18b133=>this['_utils']['loadRevisionData'](_0x18b133,this['adapter']));return _0x14d848['push'](new Promise(_0x2c15e=>{setTimeout(_0x2c15e,0x14);})),Promise['all'](_0x14d848)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x55c7e9=this['_getDiff'](_0x7c18b0,_0x1405f3);for(const _0x33c26d of _0x55c7e9['changes'])this['_changeIdToChange']['set'](_0x33c26d['id'],_0x33c26d);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x31f747=>{for(const _0x55bac8 of this['editor']['model']['document']['getRootNames']())_0x31f747['detachRoot'](_0x55bac8);for(const _0x484cd8 of Object['keys'](_0x55c7e9['model'])){const _0x2cc38e=_0x55c7e9['model'][_0x484cd8]['name'],_0x2b7f17=_0x31f747['addRoot'](_0x484cd8,_0x2cc38e);for(const _0x5ac2d9 of Object['keys'](_0x55c7e9['attributes'][_0x484cd8]))_0x31f747['setAttribute'](_0x5ac2d9,_0x55c7e9['attributes'][_0x484cd8][_0x5ac2d9],_0x2b7f17);_0x31f747['insert'](_0x55c7e9['model'][_0x484cd8],_0x2b7f17,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x55c7e9['changes'])),this['isReady']=!0x0;})['catch'](_0x38cafc=>{console['error'](_0x38cafc),this['_cleanUp'](),_0x59f78c&&(this['diff']=_0x59f78c),this['isReady']=!0x0;});}addRevisionData(_0x7b0007,_0x43b9eb){const _0x8373c2=this['repository']['createRevision'](_0x7b0007);return _0x8373c2['on']('_update',(_0xa2a9b8,_0x46f3ad,_0x250fb2)=>_0x43b9eb(_0x46f3ad,_0x250fb2,_0x8373c2)),this['repository']['addRevision'](_0x8373c2),_0x8373c2;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1fde2a=>{for(const _0x241ccc of this['editor']['model']['document']['getRootNames']())_0x1fde2a['detachRoot'](_0x241ccc);});}_sortAndFilterDiffChanges(_0x4acf24){const _0x3cc0ac=[],_0x30e05b=new Map();for(const _0x2484f7 of this['editor']['model']['document']['getRootNames']()){const _0x305ff4=this['editor']['editing']['view']['getDomRoot'](_0x2484f7);if(!_0x305ff4)continue;const _0x5565b3=_0x305ff4['getClientRects']()['item'](0x0);_0x5565b3&&(_0x3cc0ac['push'](_0x2484f7),_0x30e05b['set'](_0x2484f7,_0x5565b3));}return _0x3cc0ac['sort']((_0x637f9c,_0x571a9d)=>{const _0x2e6697=_0x30e05b['get'](_0x637f9c),_0x196847=_0x30e05b['get'](_0x571a9d);return _0x2e6697['y']-_0x196847['y']||_0x2e6697['x']-_0x196847['x'];}),(_0x4acf24=_0x4acf24['filter'](_0x53d11c=>_0x3cc0ac['includes'](_0x53d11c['rootName'])))['sort']((_0x469370,_0xffc654)=>_0x3cc0ac['indexOf'](_0x469370['rootName'])-_0x3cc0ac['indexOf'](_0xffc654['rootName'])),_0x4acf24;}['_makeTape'](_0x52e24f){const _0x12b412=Array['from'](_0x52e24f['markers'])['filter'](([_0xe77ea3,_0x29cd33])=>_0xe77ea3['startsWith']('revision:')&&!_0x29cd33['isCollapsed']),_0x217089=Array['from'](this['editor']['model']['createRangeIn'](_0x52e24f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x12b412['length'])for(const _0x58dbd9 of _0x217089){const [_0x1698d4,_0x75f500]=_0x12b412[0x0],[,_0xe7c120,_0x3c7c34]=_0x1698d4['split'](':');if(_0x75f500['end']['isEqual'](_0x58dbd9['nextPosition'])&&_0x12b412['shift'](),(_0x58dbd9['previousPosition']['isEqual'](_0x75f500['start'])||_0x58dbd9['previousPosition']['isAfter'](_0x75f500['start']))&&('insertion'==_0xe7c120?_0x58dbd9['isAdded']={'userId':_0x3c7c34}:'deletion'==_0xe7c120&&(_0x58dbd9['isRemoved']={'userId':_0x3c7c34})),0x0==_0x12b412['length'])break;}return _0x217089;}_refreshStartEndIndex(_0x216178){const _0x2790e8=new Map();for(let _0x232fa7=0x0;_0x232fa7<_0x216178['length'];_0x232fa7++)'text'===_0x216178[_0x232fa7]['type']?(_0x216178[_0x232fa7]['item']['startIndex']=_0x232fa7,_0x216178[_0x232fa7]['item']['endIndex']=_0x232fa7):('elementStart'===_0x216178[_0x232fa7]['type']?_0x216178[_0x232fa7]['item']['startIndex']=_0x232fa7:'elementEnd'===_0x216178[_0x232fa7]['type']&&(_0x216178[_0x232fa7]['item']['endIndex']=_0x232fa7),_0x2790e8['set'](_0x216178[_0x232fa7]['id'],_0x232fa7));for(const _0x367e4a of _0x2790e8['values']())'elementStart'===_0x216178[_0x367e4a]['type']?_0x216178[_0x367e4a]['item']['endIndex']=_0x2790e8['get'](_0x216178[_0x367e4a]['pairId']):'elementEnd'===_0x216178[_0x367e4a]['type']&&(_0x216178[_0x367e4a]['item']['startIndex']=_0x2790e8['get'](_0x216178[_0x367e4a]['pairId']));}['_processTape'](_0x4edd80){for(let _0x7e917f=0x0;_0x7e917f<_0x4edd80['length'];_0x7e917f++){if('elementStart'===_0x4edd80[_0x7e917f]['type'])_0x4edd80[_0x7e917f]['item']['startIndex']=_0x7e917f;else{if('elementEnd'===_0x4edd80[_0x7e917f]['type']){_0x4edd80[_0x7e917f]['item']['endIndex']=_0x7e917f;const _0x2c1d39=_0x4edd80[_0x7e917f]['item']['startIndex'];_0x4edd80[_0x2c1d39]['pairId']=_0x4edd80[_0x7e917f]['id'],_0x4edd80[_0x7e917f]['pairId']=_0x4edd80[_0x2c1d39]['id'];}else _0x4edd80[_0x7e917f]['item']['startIndex']=_0x7e917f,_0x4edd80[_0x7e917f]['item']['endIndex']=_0x7e917f,_0x4edd80[_0x7e917f]['pairId']=null;}_0x4edd80[_0x7e917f]['markersStart']||(_0x4edd80[_0x7e917f]['markersStart']=[],_0x4edd80[_0x7e917f]['markersEnd']=[]);}}_markInsertions(_0x3caf86,_0x15de16){const _0xc58ab3=_0x3caf86['filter'](_0x16cbd8=>!_0x16cbd8['isAdded']);for(let _0x362179=0x0;_0x362179<_0x15de16['length'];_0x362179++)_0x15de16[_0x362179]['isAdded']&&(_0xc58ab3[_0x362179]['isAdded']=_0x15de16[_0x362179]['isAdded']);}_getDiff(_0x36ded3,_0x6c0211=null){const _0x31a199=this['repository']['getRevision'](_0x36ded3),_0x229c17=_0x6c0211?this['repository']['getRevision'](_0x6c0211):null,_0x1d6324=this['_getRevisionsRange'](_0x31a199,_0x229c17),_0x1f5b70=_0x1d6324[_0x1d6324['length']-0x1],_0xc0f08b=new Map(),_0x2c9edc={'model':{},'attributes':{},'changes':[]},_0x449fdc=new Set(),_0xc27315=new Map();for(let _0x1b3ec4=_0x1d6324['length']-0x1;_0x1b3ec4>=0x0;_0x1b3ec4--){const _0x578e8a=_0x1d6324[_0x1b3ec4];for(const _0x1b4caf of Object['keys'](_0x578e8a['diffData']))if(_0x578e8a['diffData'][_0x1b4caf]['attachChange']){const _0x25e50a=_0x578e8a['diffData'][_0x1b4caf]['attachChange'];_0x25e50a['isAttached']?(_0x449fdc['add'](_0x1b4caf),_0xc27315['has'](_0x1b4caf)&&_0xc27315['get'](_0x1b4caf)['userId']==_0x25e50a['userId']?_0xc27315['delete'](_0x1b4caf):_0xc27315['set'](_0x1b4caf,_0x25e50a)):_0xc27315['has'](_0x1b4caf)?(_0x449fdc['delete'](_0x1b4caf),_0xc27315['delete'](_0x1b4caf)):(_0x449fdc['add'](_0x1b4caf),_0xc27315['set'](_0x1b4caf,_0x25e50a));}else _0x449fdc['add'](_0x1b4caf);}for(const _0x5e6b75 of _0x449fdc){const _0x1a3f4d=_0xc27315['has'](_0x5e6b75)&&!_0xc27315['get'](_0x5e6b75)['isAttached'];let _0x211c5f=_0x1a3f4d?_0x1d6324['length']-0x1:0x0;const _0x1aab7b=_0x1a3f4d?-0x1:0x1;for(;_0x1d6324[_0x211c5f];){const _0x13c533=_0x1d6324[_0x211c5f];if(_0x13c533['diffData'][_0x5e6b75]){const _0x285a79=_0x1a3f4d?_0x13c533['diffData'][_0x5e6b75]['attributesBefore']:_0x13c533['diffData'][_0x5e6b75]['attributesAfter'];_0x2c9edc['attributes'][_0x5e6b75]=_0x285a79?_0x2c6e4c(_0x285a79):{};break;}_0x211c5f+=_0x1aab7b;}}for(const _0x317ffa of _0x1d6324){_0x317ffa['model']={};for(const _0x22882b of _0x317ffa['authors'])_0xc0f08b['set'](_0x22882b['id'],_0x22882b);for(const _0x334477 of _0x449fdc){const _0x1a9f41=_0x317ffa['diffData'][_0x334477]?_0x317ffa['diffData'][_0x334477]['insertions']:'[]',_0x175ed9=_0x317ffa['diffData'][_0x334477]?_0x317ffa['diffData'][_0x334477]['deletions']:'[]',_0x2dd34b=_0x317ffa['diffData'][_0x334477]?.['rootElementName']||'$root';_0x317ffa['model'][_0x334477]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1a9f41,_0x2dd34b),'deletions':this['_utils']['_makeModelFromViewString'](_0x175ed9,_0x2dd34b)};}}for(const _0x5c098f of _0x449fdc){let _0x4e324f=null,_0x353b21=0x0;const _0x52812d=_0x1d6324['map'](_0xfea46b=>_0xfea46b['diffData'][_0x5c098f]?.['rootElementName'])['find'](_0x241022=>void 0x0!==_0x241022)||'$root',_0x1a1347=new Map(Array['from'](_0x31a199['model'][_0x5c098f]['insertions']['markers'])['filter'](([_0x3900a4])=>!_0x3900a4['startsWith']('revision:')));let _0x18a55b=0x0;for(const _0x39f518 of _0x1d6324){const _0x5f135b=this['_makeTape'](_0x39f518['model'][_0x5c098f]['insertions']);_0x39f518==_0x31a199?(_0x4e324f=_0x5f135b,_0x353b21=_0x4e324f['length'],_0x4e324f['forEach'](_0x5af739=>{_0x5af739['id']=_0x18a55b++;}),this['_processTape'](_0x4e324f)):this['_markInsertions'](_0x4e324f,_0x5f135b);const _0x3bc98b=_0x4e324f['filter'](_0x575b4e=>!_0x575b4e['isAdded'])['map'](_0x25c31b=>_0x25c31b['id']);let _0x374a86=0x0;const _0x579942=this['_makeTape'](_0x39f518['model'][_0x5c098f]['deletions']);_0x579942['forEach'](_0x1e6a75=>{_0x1e6a75['isRemoved']?_0x1e6a75['id']=_0x353b21++:_0x1e6a75['id']=_0x3bc98b[_0x374a86++];}),this['_processTape'](_0x579942),this['_setDistance'](_0x4e324f,'isAdded'),this['_setDistance'](_0x579942,'isRemoved'),_0x39f518==_0x31a199&&this['_markMarkers'](_0x4e324f,_0x1a1347),_0x4e324f=this['_joinTapes'](_0x4e324f,_0x579942),this['_refreshStartEndIndex'](_0x4e324f),this['_setDistance'](_0x4e324f,'isRemoved');}_0x4e324f=_0x4e324f['filter'](_0x466511=>!(_0x466511['isAdded']&&_0x466511['isRemoved']));const _0x26f5e9=new Map(_0x1f5b70['model'][_0x5c098f]['deletions']['markers']),_0x14b84a=new Set(_0x1a1347['keys']());for(const _0xe1dbea of _0x26f5e9['keys']())_0x14b84a['delete'](_0xe1dbea);this['_markSuggestions'](_0x4e324f,_0x14b84a),this['_fixObsoleteTags'](_0x4e324f),_0x4e324f=this['_removeMissingPairs'](_0x4e324f),_0x4e324f=this['_markMismatchedRemovedTags'](_0x4e324f),_0x4e324f=this['_removeUnsupportedChanges'](_0x4e324f);const {root:_0x56eb8e,changes:_0x40ae86}=this['_makeModelFromTape'](_0x4e324f,_0xc0f08b,_0x5c098f,_0x52812d);_0x2c9edc['model'][_0x5c098f]=_0x56eb8e;const _0x289e2f=_0xc27315['get'](_0x5c098f);if(_0x289e2f){const _0x911324=new Ot({'author':_0xc0f08b['get'](_0x289e2f['userId']),'type':_0x289e2f['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5c098f});_0x40ae86['unshift'](_0x911324),_0x2c9edc['attributes'][_0x5c098f]['revisionHistoryAttachChange']=_0x911324['id'];}_0x2c9edc['changes']=_0x2c9edc['changes']['concat'](_0x40ae86);}return _0x2c9edc;}['_markMarkers'](_0x13b9e9,_0x543fb7){for(let _0x583f74=0x0;_0x583f74<_0x13b9e9['length'];_0x583f74++)for(const [_0x155118,_0x34fb26]of _0x543fb7)!_0x34fb26['isCollapsed']&&_0x34fb26['start']['isEqual'](_0x13b9e9[_0x583f74]['previousPosition'])&&_0x13b9e9[_0x583f74]['markersStart']['push'](_0x155118),_0x34fb26['end']['isEqual'](_0x13b9e9[_0x583f74]['nextPosition'])&&_0x13b9e9[_0x583f74]['markersEnd']['push'](_0x155118);}['_joinTapes'](_0x3d0bdb,_0x2da125){let _0x4c4d89=[],_0x592f5c=0x0,_0x3b0290=0x0;for(;_0x592f5c<_0x3d0bdb['length']||_0x3b0290<_0x2da125['length'];){const _0x2494a2=_0x3d0bdb[_0x592f5c]||{},_0x126858=_0x2da125[_0x3b0290]||{};if(_0x2494a2['id']==_0x126858['id'])_0x592f5c++,_0x3b0290++,_0x4c4d89['push'](_0x2494a2);else{if(_0x126858['isRemoved']&&_0x2494a2['isAdded']){const {commonTape:_0x265ccd,iEnd:_0x57f1ab,jEnd:_0x411550}=this['_threeWayMerge'](_0x3d0bdb,_0x592f5c,_0x2da125,_0x3b0290);_0x4c4d89=_0x4c4d89['concat'](_0x265ccd),_0x592f5c=_0x57f1ab,_0x3b0290=_0x411550;}else _0x126858['isRemoved']?(_0x3b0290++,_0x4c4d89['push'](_0x126858)):(_0x592f5c++,_0x4c4d89['push'](_0x2494a2));}}return _0x4c4d89;}_markSuggestions(_0xf2c5e6,_0x22f80c){const _0xd5bc52=[];for(let _0x59f4f2=0x0;_0x59f4f2<_0xf2c5e6['length'];_0x59f4f2++){for(let _0x17c585=0x0;_0x17c585<_0xf2c5e6[_0x59f4f2]['markersStart']['length'];_0x17c585++){const _0x16f041=_0xf2c5e6[_0x59f4f2]['markersStart'][_0x17c585];if(!_0x22f80c['has'](_0x16f041))continue;const {group:_0x7823eb,type:_0x237592,authorId:_0x4c9232}=_0x569d70(_0x16f041);'revision-suggestion'!=_0x7823eb||'insertion'!=_0x237592&&'deletion'!=_0x237592||(_0xd5bc52['unshift']({'type':_0x237592,'name':_0x16f041,'userId':_0x4c9232}),_0xf2c5e6[_0x59f4f2]['markersStart']['splice'](_0x17c585,0x1),_0x17c585--);}_0x47c363(_0xf2c5e6[_0x59f4f2]);for(let _0x1f3041=0x0;_0x1f3041<_0xf2c5e6[_0x59f4f2]['markersEnd']['length'];_0x1f3041++){const _0x5bb9fd=_0xf2c5e6[_0x59f4f2]['markersEnd'][_0x1f3041];if(!_0x22f80c['has'](_0x5bb9fd))continue;const {group:_0x4ae1e3,type:_0x32e52a}=_0x569d70(_0x5bb9fd);if('revision-suggestion'!=_0x4ae1e3||'insertion'!=_0x32e52a&&'deletion'!=_0x32e52a)continue;_0xf2c5e6[_0x59f4f2]['markersEnd']['splice'](_0x1f3041,0x1),_0x1f3041--;const _0x37c3a4=_0xd5bc52['findIndex'](_0x238c80=>_0x238c80['name']==_0x5bb9fd);_0x37c3a4>-0x1&&_0xd5bc52['splice'](_0x37c3a4,0x1);}}function _0x569d70(_0x479fc2){const _0x13e424=_0x479fc2['split'](':');return{'group':_0x13e424[0x0],'type':_0x13e424[0x1],'subType':_0x13e424['length']>=0x5?_0x13e424[0x2]:null,'id':_0x13e424['length']<0x5?_0x13e424[0x2]:_0x13e424[0x3],'authorId':_0x13e424['length']<0x5?_0x13e424[0x3]:_0x13e424[0x4],'markerCount':0x6==_0x13e424['length']?_0x13e424[0x5]:null};}function _0x47c363(_0x157241){for(let _0xe3a09d=0x0;_0xe3a09d<_0xd5bc52['length'];_0xe3a09d++){if(_0x157241['isAdded']&&'insertion'==_0xd5bc52[_0xe3a09d]['type']&&_0x157241['isAdded']['userId']==_0xd5bc52[_0xe3a09d]['userId'])return _0x157241['isAddSuggestion']=_0xd5bc52[_0xe3a09d],void delete _0x157241['isAdded'];if(!_0x157241['isAdded']&&!_0x157241['isRemoved']&&'deletion'==_0xd5bc52[_0xe3a09d]['type'])return void(_0x157241['isRemoveSuggestion']=_0xd5bc52[_0xe3a09d]);}}}_setDistance(_0x533879,_0xd65c0a){let _0x4c98be=0x0,_0x4a07dc=!0x1;const _0x3747a2=new Map();for(const _0x4a86ff of _0x533879)_0x4a86ff[_0xd65c0a]?_0x4a07dc&&(_0x4c98be++,_0x4a07dc=!0x1):(_0x4c98be++,_0x4a07dc=!0x0),_0x3747a2['set'](_0x4a86ff['id'],_0x4c98be);for(let _0x2c8dcb=0x0;_0x2c8dcb<_0x533879['length'];_0x2c8dcb++){if('isRemoved'==_0xd65c0a&&_0x533879[_0x2c8dcb]['isAdded']||'isAdded'==_0xd65c0a&&_0x533879[_0x2c8dcb]['isRemoved'])continue;if('text'==_0x533879[_0x2c8dcb]['type']){_0x533879[_0x2c8dcb]['distance']=0x0;continue;}const _0x563da4=_0x3747a2['get'](_0x533879[_0x2c8dcb]['pairId']),_0x74f909=_0x3747a2['get'](_0x533879[_0x2c8dcb]['id']);_0x533879[_0x2c8dcb]['distance']=_0x563da4-_0x74f909;}}_getRevisionsRange(_0x3e95e8,_0x4df6b9,_0x1f1687=!0x1){const _0x1dce40=[];let _0xf03d69=this['repository']['getIndex'](_0x3e95e8),_0x9f4214=this['repository']['getIndex'](_0x4df6b9);for(-0x1==_0x9f4214&&(_0x9f4214=this['repository']['_revisions']['length'],_0x1f1687=!0x1);_0xf03d69<_0x9f4214;)_0x1dce40['push'](this['repository']['getRevision'](_0xf03d69)),_0xf03d69++;return _0x1f1687&&_0x1dce40['push'](this['repository']['getRevision'](_0xf03d69)),_0x1dce40;}_threeWayMerge(_0x34de53,_0xe7caed,_0x46c604,_0x34bcc8){const _0x51e128=this['editor']['model']['schema'];let _0x5d6569=_0xe7caed;for(;_0x34de53[_0x5d6569]&&_0x34de53[_0x5d6569]['isAdded'];)_0x5d6569++;let _0x339579=_0x34bcc8;for(;_0x46c604[_0x339579]&&_0x46c604[_0x339579]['isRemoved'];)_0x339579++;_0xe82388(_0x34de53,_0xe7caed,_0x5d6569),_0xe82388(_0x46c604,_0x34bcc8,_0x339579);const _0x28a6f3=_0x46c604['slice'](_0x34bcc8,_0x339579)['concat'](_0x34de53['slice'](_0xe7caed,_0x5d6569));return _0x28a6f3['sort']((_0x2aaacf,_0xc55d58)=>_0x2aaacf['side']!=_0xc55d58['side']?_0x2aaacf['side']-_0xc55d58['side']:_0x2aaacf['level']!=_0xc55d58['level']?_0x2aaacf['level']-_0xc55d58['level']:_0x2aaacf['distance']!=_0xc55d58['distance']?_0xc55d58['distance']-_0x2aaacf['distance']:!!_0x2aaacf['isAdded']!=!!_0xc55d58['isAdded']?-0x1==_0x2aaacf['side']||0x0==_0x2aaacf['side']?_0x2aaacf['isAdded']?-0x1:0x1:_0x2aaacf['isAdded']?0x1:-0x1:_0x2aaacf['index']-_0xc55d58['index']),{'commonTape':_0x28a6f3,'iEnd':_0x5d6569,'jEnd':_0x339579};function _0xe82388(_0x37e3fc,_0x54c3c0,_0x42f0e4){let _0x30dd5d=-0x1,_0x11de9a=Number['POSITIVE_INFINITY'],_0x2aa6c5=!0x0;for(let _0x4c2ff6=_0x54c3c0;_0x4c2ff6<_0x42f0e4;_0x4c2ff6++)if(_0x51e128['isInline'](_0x37e3fc[_0x4c2ff6]['item'])||(_0x2aa6c5=!0x1),_0x37e3fc[_0x4c2ff6]['item']['startIndex']<_0x54c3c0&&(_0x30dd5d=_0x4c2ff6),_0x37e3fc[_0x4c2ff6]['item']['endIndex']>=_0x42f0e4){_0x11de9a=_0x4c2ff6;break;}_0x2aa6c5&&(_0x30dd5d=_0x42f0e4-0x1);for(let _0x45b8f5=_0x54c3c0;_0x45b8f5<_0x42f0e4;_0x45b8f5++)_0x37e3fc[_0x45b8f5]['side']=_0x45b8f5<=_0x30dd5d?-0x1:_0x45b8f5<_0x11de9a?0x0:0x1,_0x37e3fc[_0x45b8f5]['index']=_0x45b8f5;let _0x406665=0x0;for(let _0x301e39=_0x54c3c0;_0x301e39<=_0x30dd5d;_0x301e39++)0x0==_0x37e3fc[_0x301e39]['distance']?_0x37e3fc[_0x301e39]['level']=_0x406665:(_0x406665++,_0x37e3fc[_0x301e39]['level']=_0x406665,_0x406665++);for(let _0x112e15=_0x54c3c0;_0x112e15<_0x42f0e4;_0x112e15++)0x0==_0x37e3fc[_0x112e15]['side']&&(_0x37e3fc[_0x112e15]['level']=_0x406665);_0x406665=0x0;for(let _0x559927=_0x42f0e4-0x1;_0x559927>=_0x11de9a;_0x559927--)0x0==_0x37e3fc[_0x559927]['distance']?_0x37e3fc[_0x559927]['level']=_0x406665:(_0x406665--,_0x37e3fc[_0x559927]['level']=_0x406665,_0x406665--);}}_fixObsoleteTags(_0x20de39){const _0xf22168=new Map(),_0x54d930=this['editor']['model']['schema'];for(let _0x37b1d9=0x1;_0x37b1d9<_0x20de39['length'];_0x37b1d9++){let _0x40f95c,_0x17c891,_0x5a7d89;const _0xa77677=_0x20de39[_0x37b1d9],_0x2e8252=_0x20de39[_0x37b1d9-0x1];if('text'==_0xa77677['type'])continue;if(_0xa77677['type']!=_0x2e8252['type'])continue;if(!_0x54d930['isBlock'](_0x2e8252['item'])||_0x54d930['isLimit'](_0x2e8252['item']))continue;if(!_0x54d930['isBlock'](_0xa77677['item'])||_0x54d930['isLimit'](_0xa77677['item']))continue;if((_0x20de39[_0x37b1d9]['isAdded']||_0x20de39[_0x37b1d9]['isAddSuggestion'])&&_0x20de39[_0x37b1d9-0x1]['isRemoved'])_0x40f95c=_0x20de39[_0x37b1d9],_0x17c891=_0x20de39[_0x37b1d9-0x1],_0x5a7d89=_0x37b1d9-0x1;else{if(!_0x20de39[_0x37b1d9]['isRemoved']||!_0x20de39[_0x37b1d9-0x1]['isAdded']&&!_0x20de39[_0x37b1d9-0x1]['isAddSuggestion'])continue;_0x40f95c=_0x20de39[_0x37b1d9-0x1],_0x17c891=_0x20de39[_0x37b1d9],_0x5a7d89=_0x37b1d9;}const _0x3efae3=_0x40f95c['level']==_0x17c891['level'],_0x4a5719=Math['abs'](_0x40f95c['level'])<Math['abs'](_0x17c891['level'])&&0x0==_0x17c891['distance'];(_0x3efae3||_0x4a5719)&&(_0xf22168['set'](_0x17c891['id'],_0x40f95c['id']),_0x20de39['splice'](_0x5a7d89,0x1),_0x37b1d9--,_0x40f95c['isAdded']=!0x1);}for(let _0x5bfede=0x0;_0x5bfede<_0x20de39['length'];_0x5bfede++)_0xf22168['has'](_0x20de39[_0x5bfede]['pairId'])&&(_0x20de39[_0x5bfede]['pairId']=_0xf22168['get'](_0x20de39[_0x5bfede]['pairId']));}['_removeMissingPairs'](_0x1568c9){const _0x35b7a5=new Set(_0x1568c9['map'](_0x5de852=>_0x5de852['id']));for(let _0x479d44=0x0;_0x479d44<_0x1568c9['length'];_0x479d44++)_0x35b7a5['has'](_0x1568c9[_0x479d44]['pairId'])||0x0==_0x1568c9[_0x479d44]['distance']||(_0x1568c9[_0x479d44]['isIncorrect']=!0x0);return _0x1568c9['filter'](_0x29c264=>!_0x29c264['isIncorrect']);}_markMismatchedRemovedTags(_0x536ba8){const _0x5e64b7=new Set();for(let _0x4fe5ca=0x0;_0x4fe5ca<_0x536ba8['length'];_0x4fe5ca++){if(_0x5e64b7['has'](_0x536ba8[_0x4fe5ca]['id'])&&_0x536ba8[_0x4fe5ca]['isRemoved']&&(_0x536ba8[_0x4fe5ca]['isIncorrect']=!0x0),_0x536ba8[_0x4fe5ca]['isIncorrect'])continue;if(0x0==_0x536ba8[_0x4fe5ca]['distance'])continue;if('elementStart'!=_0x536ba8[_0x4fe5ca]['type'])continue;if(null==_0x536ba8[_0x4fe5ca]['pairId'])continue;let _0x1620f1=_0x4fe5ca+0x1,_0x20c092=0x0;for(;_0x536ba8[_0x1620f1]['id']!=_0x536ba8[_0x4fe5ca]['pairId'];)'elementStart'==_0x536ba8[_0x1620f1]['type']?_0x20c092++:'elementEnd'==_0x536ba8[_0x1620f1]['type']&&_0x20c092--,_0x1620f1++;if(0x0!=_0x20c092){if(_0x536ba8[_0x4fe5ca]['isRemoved'])_0x536ba8[_0x4fe5ca]['isIncorrect']=!0x0;else{for(;_0x1620f1!=_0x4fe5ca;)_0x536ba8[_0x1620f1]['isRemoved']&&0x0!=_0x536ba8[_0x1620f1]['distance']&&(_0x536ba8[_0x1620f1]['isIncorrect']=!0x0,_0x5e64b7['add'](_0x536ba8[_0x1620f1]['pairId'])),_0x1620f1--;}}}return _0x536ba8['filter'](_0x2282ac=>!_0x2282ac['isIncorrect']);}_removeUnsupportedChanges(_0x48ff8f){const _0x54758b=this['editor']['model']['schema'];for(let _0x2cdea4=0x0;_0x2cdea4<_0x48ff8f['length'];_0x2cdea4++){if(!(_0x48ff8f[_0x2cdea4]['isAdded']||_0x48ff8f[_0x2cdea4]['isAddSuggestion']||_0x48ff8f[_0x2cdea4]['isRemoved']||_0x48ff8f[_0x2cdea4]['isRemoveSuggestion']))continue;if(0x0==_0x48ff8f[_0x2cdea4]['distance'])continue;const _0x155ba3=_0x48ff8f[_0x2cdea4]['item'];_0x54758b['isBlock'](_0x155ba3)||_0x54758b['isLimit'](_0x155ba3)||(_0x48ff8f[_0x2cdea4]['isAdded']&&delete _0x48ff8f[_0x2cdea4]['isAdded'],_0x48ff8f[_0x2cdea4]['isAddSuggestion']&&delete _0x48ff8f[_0x2cdea4]['isAddSuggestion'],_0x48ff8f[_0x2cdea4]['isRemoveSuggestion']&&delete _0x48ff8f[_0x2cdea4]['isRemoveSuggestion'],_0x48ff8f[_0x2cdea4]['isRemoved']&&(_0x48ff8f[_0x2cdea4]['isIncorrect']=!0x0));}return _0x48ff8f['filter'](_0x353d3d=>!_0x353d3d['isIncorrect']);}['_makeModelFromTape'](_0x4af27,_0x4067f9,_0x320aa8,_0x5043dd){const _0x2cbb3b=new _0x4f04f1(),_0x5f3c27=[],_0x336949=new Map(),_0x4d7d5f=this['editor']['model'],_0x261ee0=_0x4d7d5f['schema'],_0x58ae19=[_0x2cbb3b],_0x84d76b={},_0x1a1951={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x2cbb3b['name']=_0x5043dd;let _0x2d3369=null;const _0x3c8ddd=[0x0];for(let _0x519bd6=0x0;_0x519bd6<_0x4af27['length'];_0x519bd6++)if('elementStart'===_0x4af27[_0x519bd6]['type']){_0x4af27[_0x519bd6]['previousPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd);const _0x35a00e=new _0x1da96f(_0x4af27[_0x519bd6]['item']['name'],_0x4af27[_0x519bd6]['item']['getAttributes']());_0x58ae19[0x0]['_appendChild'](_0x35a00e),_0x3c8ddd['push'](0x0),_0x58ae19['unshift'](_0x35a00e),_0x4af27[_0x519bd6]['nextPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd);}else'elementEnd'===_0x4af27[_0x519bd6]['type']?(_0x58ae19['shift'](),_0x4af27[_0x519bd6]['previousPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd),_0x3c8ddd['pop'](),_0x3c8ddd[_0x3c8ddd['length']-0x1]++,_0x4af27[_0x519bd6]['nextPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd)):(_0x4af27[_0x519bd6]['previousPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd),_0x2d3369?_0x2d3369['_data']+=_0x4af27[_0x519bd6]['item']['data']:_0x2d3369=new _0x1594e5(_0x4af27[_0x519bd6]['item']['data'],_0x4af27[_0x519bd6]['item']['getAttributes']()),_0x4af27[_0x519bd6+0x1]&&'text'===_0x4af27[_0x519bd6+0x1]['type']&&_0x50427c(_0x2d3369,_0x4af27[_0x519bd6+0x1]['item'])||(_0x58ae19[0x0]['_appendChild'](_0x2d3369),_0x2d3369=null),_0x3c8ddd[_0x3c8ddd['length']-0x1]+=_0x4af27[_0x519bd6]['item']['offsetSize'],_0x4af27[_0x519bd6]['nextPosition']=_0x4d7d5f['createPositionFromPath'](_0x2cbb3b,_0x3c8ddd));for(let _0x2e1d13=0x0;_0x2e1d13<_0x4af27['length'];_0x2e1d13++){const _0x3465a2=_0x4af27[_0x2e1d13]['previousPosition'],_0x51ac11=_0x4af27[_0x2e1d13]['nextPosition'];for(const _0x6fad85 of _0x4af27[_0x2e1d13]['markersStart'])_0x336949['set'](_0x6fad85,{'start':_0x3465a2,'end':null});_0x2b1549('isRemoveSuggestion',_0x2e1d13,_0x3465a2,_0x51ac11),_0x2b1549('isAddSuggestion',_0x2e1d13,_0x3465a2,_0x51ac11),_0x2b1549('isRemoved',_0x2e1d13,_0x3465a2,_0x51ac11),_0x2b1549('isAdded',_0x2e1d13,_0x3465a2,_0x51ac11);for(const _0x3f1dcd of _0x4af27[_0x2e1d13]['markersEnd']){const _0x4e2c9d=_0x336949['get'](_0x3f1dcd);_0x4e2c9d?_0x4e2c9d['end']=_0x51ac11:_0x336949['set'](_0x3f1dcd,{'start':_0x51ac11,'end':_0x51ac11});}}for(const [_0x471b2a,_0x5c7d4a]of _0x336949){const _0x56e554=this['editor']['model']['createRange'](_0x5c7d4a['start'],_0x5c7d4a['end']);_0x2cbb3b['markers']['set'](_0x471b2a,_0x56e554);}return _0x5f3c27['sort']((_0x23b040,_0x1bb51a)=>{const _0x17a3e0=_0x2cbb3b['markers']['get']('revision:'+_0x23b040['id']),_0x4f014b=_0x2cbb3b['markers']['get']('revision:'+_0x1bb51a['id']);return _0x17a3e0['start']['isBefore'](_0x4f014b['start'])?-0x1:_0x17a3e0['start']['isAfter'](_0x4f014b['start'])?0x1:_0x17a3e0['end']['isBefore'](_0x4f014b['end'])?-0x1:_0x17a3e0['end']['isAfter'](_0x4f014b['end'])?0x1:'add'===_0x23b040['type']?-0x1:0x1;}),{'root':_0x2cbb3b,'changes':_0x5f3c27};function _0x2b1549(_0x328de9,_0x2dbf46,_0x120484,_0x139bbf){const _0x5b9b4e=!!_0x4af27[_0x2dbf46][_0x328de9],_0x4778aa=_0x5b9b4e?_0x4af27[_0x2dbf46][_0x328de9]['userId']:null,_0xf0332c=_0x2dbf46===_0x4af27['length']-0x1,_0x5c0e2c=_0x1a1951[_0x328de9][0x0],_0x3a33c6=_0x261ee0['isObject'](_0x4af27[_0x2dbf46]['item']);!_0x84d76b[_0x328de9]&&_0x5b9b4e?_0x84d76b[_0x328de9]={'start':_0x120484,'tapeItem':_0x4af27[_0x2dbf46],'userId':_0x4778aa,'type':_0x328de9}:_0x84d76b[_0x328de9]&&!_0x5b9b4e?(_0x84d76b[_0x328de9]['end']=_0x120484,_0x4f1a60(_0x84d76b[_0x328de9]),_0x84d76b[_0x328de9]=null):_0x84d76b[_0x328de9]&&_0x5b9b4e&&_0x84d76b[_0x328de9]['userId']!==_0x4778aa&&(_0x84d76b[_0x328de9]['end']=_0x120484,_0x5c0e2c&&_0x5c0e2c['userId']===_0x84d76b[_0x328de9]['userId']||_0x4f1a60(_0x84d76b[_0x328de9]),_0x84d76b[_0x328de9]={'start':_0x120484,'tapeItem':_0x4af27[_0x2dbf46],'userId':_0x4778aa,'type':_0x328de9}),_0x84d76b[_0x328de9]&&_0x3a33c6&&('elementStart'!==_0x4af27[_0x2dbf46]['type']||_0x5c0e2c&&_0x5c0e2c['userId']===_0x4778aa||_0x1a1951[_0x328de9]['unshift']({'userId':_0x4778aa,'object':_0x4af27[_0x2dbf46]['item'],'change':_0x84d76b[_0x328de9]}),'elementEnd'===_0x4af27[_0x2dbf46]['type']&&_0x5c0e2c&&_0x5c0e2c['object']===_0x4af27[_0x2dbf46]['item']&&(_0x1a1951[_0x328de9]['shift'](),_0x84d76b[_0x328de9]=_0x5c0e2c['change'])),_0x84d76b[_0x328de9]&&_0xf0332c&&(_0x84d76b[_0x328de9]['end']=_0x139bbf,_0x4f1a60(_0x84d76b[_0x328de9]),_0x84d76b[_0x328de9]=null);}function _0x4f1a60({start:_0x16ae03,end:_0x1a205b,tapeItem:_0x1a29a6,userId:_0x5eb150,type:_0x2b8930}){const _0x454673=_0x1a29a6['item'],_0x3eb4d5=_0x4d7d5f['schema']['isBlock'](_0x454673)&&!_0x4d7d5f['schema']['isLimit'](_0x454673),_0x5da8bc=_0x16ae03['nodeAfter']==_0x1a205b['parent']&&_0x1a205b['isAtStart'];if(_0x3eb4d5&&_0x5da8bc)return;const _0x5e5433=_0x4d7d5f['createRange'](_0x16ae03,_0x1a205b),_0x22ecb8=new Ot({'author':_0x4067f9['get'](_0x5eb150),'type':'isAdded'==_0x2b8930||'isAddSuggestion'==_0x2b8930?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2b8930||'isRemoveSuggestion'==_0x2b8930},'createdAt':new Date(),'rootName':_0x320aa8});_0x5f3c27['push'](_0x22ecb8),_0x2cbb3b['markers']['set']('revision:'+_0x22ecb8['id'],_0x5e5433);}function _0x50427c(_0x1123ae,_0x85cdee){const _0x48ee14=_0x1123ae['getAttributes'](),_0x57ccd0=_0x85cdee['getAttributes']();for(const _0x440af9 of _0x48ee14){if(_0x440af9[0x1]!==_0x85cdee['getAttribute'](_0x440af9[0x0]))return!0x1;_0x57ccd0['next']();}return _0x57ccd0['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1339f5=>{const _0x20dbee=_0x1339f5['markerName']['split'](':')[0x1],_0x9f3565=this['_getChangeFromId'](_0x20dbee);if(!_0x9f3565)return null;const _0x4ec442='add'==_0x9f3565['type']?'insertion':'deletion',_0x3f58c1=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4ec442];return _0x9f3565['data']['isSuggestion']&&_0x3f58c1['push']('ck-suggestion-marker-'+_0x4ec442+'-new'),this['activeChange']==_0x9f3565&&_0x3f58c1['push']('ck-suggestion-marker--active'),{'classes':_0x3f58c1,'attributes':{'data-change-id':_0x20dbee}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x396615=>{_0x396615['on']('element:pre',(_0x2f6916,_0x5d4191,_0x4453c0)=>{const _0x355493=_0x5d4191['viewItem']['getChild'](0x0);if(!_0x355493||!_0x355493['is']('element','code'))return;if(!_0x4453c0['consumable']['consume'](_0x355493,{'attributes':['vid_start','vid_end']}))return;const _0x9bc719=_0x5d4191['modelRange']['start']['nodeAfter'];_0x4453c0['writer']['setAttribute']('vid_start',_0x355493['getAttribute']('vid_start'),_0x9bc719),_0x4453c0['writer']['setAttribute']('vid_end',_0x355493['getAttribute']('vid_end'),_0x9bc719);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x482edd=>{_0x482edd['on']('element',(_0x5e58ba,_0x752dff,_0x516605)=>{if(!_0x516605['consumable']['consume'](_0x752dff['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x752dff['modelRange']['isCollapsed'])return;const _0x541dd0=_0x752dff['modelRange']['start']['nodeAfter'];_0x541dd0['hasAttribute']('vid_start')||_0x541dd0['hasAttribute']('vid')||(_0x516605['writer']['setAttribute']('vid_start',_0x752dff['viewItem']['getAttribute']('vid_start'),_0x541dd0),_0x516605['writer']['setAttribute']('vid_end',_0x752dff['viewItem']['getAttribute']('vid_end'),_0x541dd0));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1b4b07=>_0x1b4b07['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x1885e1,[,_0x489ce3])=>{['vid_start','vid_end','vid']['includes'](_0x489ce3)&&(_0x1885e1['return']=!0x0,_0x1885e1['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xceb526=>{_0xceb526['on']('attribute:vid',(_0x354131,_0x4338fe,_0x36c70f)=>{if('\x20'!=_0x4338fe['item']['data']||_0x4338fe['item']['parent']['maxOffset']>0x1)return;if(!_0x36c70f['consumable']['consume'](_0x4338fe['item'],_0x354131['name']))return;const _0x198ae5=_0x36c70f['writer'],_0x1e9382=_0x36c70f['mapper']['toViewRange'](_0x4338fe['range']);_0x198ae5['wrap'](_0x1e9382,_0x198ae5['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x55e50c){const _0x3e987a=_0x55e50c['plugins']['get']('RevisionViewer');return(_0x3541c8,_0x4abca8,_0x4cae6c)=>{const _0x1de81e=_0x4abca8['markerName']['split'](':')[0x1],_0x2a88ec=_0x3e987a['_getChangeFromId'](_0x1de81e);if(!_0x2a88ec)return null;const _0x3e1ca7='add'==_0x2a88ec['type']?'split':'merge';if(!_0x4cae6c['consumable']['test'](_0x4abca8['markerRange'],_0x3541c8['name']))return;const _0x35f0d6=_0x4abca8['markerRange']['getWalker'](),_0x55b49a=_0x4abca8['markerRange']['start'],_0x45a44f=_0x55e50c['model']['schema'];let _0x2d1886=null,_0x285916=null,_0xfaf3cc=!0x1,_0x442d0c=!0x1;for(const _0x174c1f of _0x35f0d6){const _0x3c7c60=_0x174c1f['item'];_0xfaf3cc=_0xfaf3cc||_0x45a44f['isContent'](_0x3c7c60);const _0x2582a2=_0x4cae6c['mapper']['toViewElement'](_0x3c7c60);if(_0x2582a2&&_0x2582a2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x174c1f['type']&&(_0x45a44f['isBlock'](_0x3c7c60)&&!_0x45a44f['isLimit'](_0x3c7c60)&&(_0x3c7c60['nextSibling']||_0x55b49a['isAtEnd']?_0x2d1886&&_0x2d1886['parent']==_0x3c7c60||(_0x2d1886=_0x3c7c60,_0x8d7495(_0x174c1f['previousPosition']),_0x442d0c=!0x0):_0x285916=_0x285916||_0x174c1f['previousPosition']));}function _0x8d7495(_0x297ee2){const _0x4aa857=_0x4cae6c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3e1ca7}),_0x1cdc6f=_0x4cae6c['mapper']['toViewPosition'](_0x297ee2);_0x2a88ec['data']['isSuggestion']&&_0x4cae6c['writer']['addClass']('ck-suggestion-marker-'+_0x3e1ca7+'-new',_0x4aa857),_0x3e987a['activeChange']==_0x2a88ec&&_0x4cae6c['writer']['addClass']('ck-suggestion-marker--active',_0x4aa857),_0x4cae6c['writer']['insert'](_0x1cdc6f,_0x4aa857),_0x4cae6c['mapper']['bindElementToMarker'](_0x4aa857,_0x4abca8['markerName']);}_0xfaf3cc||_0x442d0c||!_0x285916||_0x8d7495(_0x285916);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1065af,_0x1b0873,_0x358d26)=>{const _0x5d41cd=_0x358d26['mapper']['markerNameToElements'](_0x1b0873['markerName']);if(_0x5d41cd){for(const _0x153003 of _0x5d41cd)(_0x153003['hasClass']('ck-suggestion-marker-split')||_0x153003['hasClass']('ck-suggestion-marker-merge'))&&(_0x358d26['mapper']['unbindElementFromMarkerName'](_0x153003,_0x1b0873['markerName']),_0x358d26['writer']['remove'](_0x153003));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1cf523,_0x5ac030,_0x25c4de)=>{const _0x2db2d9=_0x5ac030['markerName']['split'](':')[0x1],_0xaba77d=this['_getChangeFromId'](_0x2db2d9);if(!_0xaba77d)return null;const _0x5834ff='add'==_0xaba77d['type']?'split':'merge';if(_0x25c4de['consumable']['test'](_0x5ac030['markerRange'],_0x1cf523['name']))for(const _0xd633c2 of _0x5ac030['markerRange']['getItems']()){if(!_0xd633c2['is']('element','softBreak'))continue;const _0x39170b=_0x25c4de['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5834ff}),_0x3c6e0b=_0x25c4de['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0xd633c2));_0xaba77d['data']['isSuggestion']&&_0x25c4de['writer']['addClass']('ck-suggestion-marker-'+_0x5834ff+'-new',_0x39170b),this['activeChange']==_0xaba77d&&_0x25c4de['writer']['addClass']('ck-suggestion-marker--active',_0x39170b),_0x25c4de['writer']['insert'](_0x3c6e0b,_0x39170b),_0x25c4de['mapper']['bindElementToMarker'](_0x39170b,_0x5ac030['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3e0cc3=>{for(const _0x3fbf4d of this['editor']['model']['document']['getRootNames']()){const _0x312c56=this['editor']['model']['document']['getRoot'](_0x3fbf4d),_0x2c15ca=this['editor']['editing']['view']['document']['getRoot'](_0x3fbf4d);if(_0x2c15ca){const _0xdef88a=_0x312c56['getAttribute']('revisionHistoryAttachChange');if(_0x3e0cc3['removeAttribute']('data-change-id',_0x2c15ca),_0x3e0cc3['removeClass']('ck-revision-history-root-add',_0x2c15ca),_0x3e0cc3['removeClass']('ck-revision-history-root-remove',_0x2c15ca),_0x3e0cc3['removeClass']('ck-revision-history-root--active',_0x2c15ca),_0xdef88a){const _0xeb43de=this['_getChangeFromId'](_0xdef88a);if(!_0xeb43de)return null;_0x3e0cc3['setAttribute']('data-change-id',_0xdef88a,_0x2c15ca),_0x3e0cc3['addClass']('ck-revision-history-root-'+_0xeb43de['type'],_0x2c15ca),this['activeChange']==_0xeb43de&&_0x3e0cc3['addClass']('ck-revision-history-root--active',_0x2c15ca);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xe6192d=>'revision-comment:'+_0xe6192d,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x4c54df=>'revision-suggestion:'+_0x4c54df,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x34c056=>({'name':'suggestion:'+_0x34c056,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x278faa=>{const _0x1c8ad5=_0x278faa['markerName']['split'](':')[0x1];return'insertion'!=_0x1c8ad5&&'deletion'!=_0x1c8ad5?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x1c8ad5]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x363958,_0x45d855,_0x4df7f6)=>{const _0x335624=_0x4df7f6['mapper']['markerNameToElements'](_0x45d855['markerName']);if(_0x335624){for(const _0x55f6ef of _0x335624)_0x55f6ef['is']('uiElement')&&(_0x4df7f6['mapper']['unbindElementFromMarkerName'](_0x55f6ef,_0x45d855['markerName']),_0x4df7f6['writer']['remove'](_0x55f6ef));}},{'priority':'high'});}_getChangeFromId(_0x4cf7be){return this['_changeIdToChange']['get'](_0x4cf7be);}_getViewForChange(_0xfe5dd0){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0xfe5dd0),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1c4584,_0x371935,_0x25483c,_0x411a8d)=>{_0x411a8d&&this['_balloon']['remove'](_0x411a8d),_0x25483c&&(this['_balloon']['add']({'view':_0x25483c,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x39a577=this['editor']['editing'],_0x13513f=this['_getChangeFromId'](_0x25483c['changeId']);let _0x146786;if(_0x13513f['data']['isOnRoot']){const _0x46370c=_0x39a577['view']['getDomRoot'](_0x13513f['rootName']);_0x146786=Array['from'](_0x46370c['getClientRects']());}else{const _0xcd53bb=this['editor']['model']['markers']['get']('revision:'+_0x25483c['changeId']);_0x146786=Array['from'](_0x39a577['mapper']['markerNameToElements'](_0xcd53bb['name']))['map'](_0x1fc182=>_0x39a577['view']['domConverter']['mapViewToDom'](_0x1fc182))['map'](_0x4ea5d2=>Array['from'](_0x4ea5d2['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x146786['find'](_0x528e68=>_0x528e68['top']-0x3<=this['_activeViewTarget']['y']&&_0x528e68['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x528e68['left']-0x3<=this['_activeViewTarget']['x']&&_0x528e68['right']+0x3>=this['_activeViewTarget']['x'])||_0x146786[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x514034,_0x56e50f,_0x194442,_0x75f498)=>{this['activeView']=_0x194442?this['_getViewForChange'](_0x194442):null,this['editor']['model']['change'](()=>{const _0x5cfed5=this['editor']['editing'];_0x75f498&&(_0x75f498['data']['isOnRoot']?_0x5cfed5['view']['change'](_0x239012=>{_0x239012['removeClass']('ck-revision-history-root--active',_0x5cfed5['view']['document']['getRoot'](_0x75f498['rootName']));}):_0x5cfed5['reconvertMarker']('revision:'+_0x75f498['id'])),_0x194442&&(_0x194442['data']['isOnRoot']?_0x5cfed5['view']['change'](_0x3da06c=>{_0x3da06c['addClass']('ck-revision-history-root--active',_0x5cfed5['view']['document']['getRoot'](_0x194442['rootName']));}):_0x5cfed5['reconvertMarker']('revision:'+_0x194442['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x157ff6,_0x30b151)=>{if(this['activeChange'])return;const _0x19de25=this['_findChangeIdFromDomTarget'](_0x30b151['target']),_0x83c3eb=this['_changeIdToChange']['get'](_0x19de25);_0x83c3eb?(this['_activeViewTarget']={'x':_0x30b151['domEvent']['x'],'y':_0x30b151['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x83c3eb)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x39baa2,_0x2d9c84)=>{const _0x4862a3=this['_findChangeIdFromDomTarget'](_0x2d9c84['target']),_0x2f7f04=this['_changeIdToChange']['get'](_0x4862a3);_0x2f7f04?(this['_activeViewTarget']={'x':_0x2d9c84['domEvent']['x'],'y':_0x2d9c84['domEvent']['y']},_0x2f7f04===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2f7f04):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x4307ed){do{const _0x969662=_0x4307ed['getAttribute']('data-change-id');if(_0x969662)return _0x969662;_0x4307ed=_0x4307ed['parent'];}while(_0x4307ed);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1da709=>{for(const _0x2b6e9d of this['editor']['model']['markers'])_0x1da709['removeMarker'](_0x2b6e9d);});}};function Vt(_0x3a85d8,_0x3fda37){return(_0x19e6c5,_0xe87266,_0x56d259)=>{if(!_0x56d259['consumable']['test'](_0xe87266['markerRange'],_0x19e6c5['name']))return;const _0x30aabe=_0xe87266['markerRange']['getWalker'](),_0x30b742=_0xe87266['markerRange']['start'],_0x199d7d=_0x3a85d8['model']['schema'];let _0x5c87a5=null,_0x426a9f=null,_0x113293=!0x1,_0xbf6c55=!0x1;for(const _0x4453f7 of _0x30aabe){const _0x130767=_0x4453f7['item'];_0x113293=_0x113293||_0x199d7d['isContent'](_0x130767);const _0x5345fb=_0x56d259['mapper']['toViewElement'](_0x130767);if(_0x5345fb&&_0x5345fb['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4453f7['type']&&(_0x199d7d['isBlock'](_0x130767)&&!_0x199d7d['isLimit'](_0x130767)&&(_0x130767['nextSibling']||_0x30b742['isAtEnd']?_0x5c87a5&&_0x5c87a5['parent']==_0x130767||(_0x5c87a5=_0x130767,_0x2e0d8c(_0x4453f7['previousPosition']),_0xbf6c55=!0x0):_0x426a9f=_0x426a9f||_0x4453f7['previousPosition']));}function _0x2e0d8c(_0x33b066){const _0x2496e9=_0x56d259['mapper']['toViewPosition'](_0x33b066),_0x4db6c2=_0x56d259['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x3fda37});_0x56d259['writer']['insert'](_0x2496e9,_0x4db6c2),_0x56d259['mapper']['bindElementToMarker'](_0x4db6c2,_0xe87266['markerName']);}_0x113293||_0xbf6c55||!_0x426a9f||_0x2e0d8c(_0x426a9f);};}var Dt=class extends _0x26de09{constructor(_0x4aa7a3){super(_0x4aa7a3);const _0x4d8e02=_0x4aa7a3['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x4d8e02,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4d8e02,'change:isEnabled',()=>this['refresh']());}execute(){const _0x5a1e22=this['editor'],_0x37b54f=_0x5a1e22['plugins']['get'](Mt),_0x281b1d=_0x37b54f['isReady']?_0x37b54f['diff']['newRevisionId']:null;_0x5a1e22['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x281b1d);}['refresh'](){const {isReady:_0x505382,isEnabled:_0x163cb6,repository:_0x2b317b,diff:_0x12e08d}=this['editor']['plugins']['get'](Mt),_0x572ed9=_0x12e08d&&_0x2b317b['getLaterVisibleRevision'](_0x12e08d['newRevisionId']);this['isEnabled']=_0x505382&&_0x163cb6&&Boolean(_0x572ed9);}},Tt=class extends _0x26de09{_step;constructor(_0x13c36a,{direction:_0x453370}){super(_0x13c36a);const _0xd5af6e=_0x13c36a['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x453370?0x1:-0x1,this['listenTo'](_0xd5af6e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xd5af6e,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0xd5af6e,'change:activeChange',()=>this['refresh']());}execute(){const _0xdaecb6=this['editor'],_0x1901c9=_0xdaecb6['plugins']['get'](Mt),{isNavigationMode:_0x3c127a,currentChangeNumber:_0x3d27d4}=_0x1901c9;let _0x1eb8b6;if(_0x1901c9['activeChange']=_0x3c127a?_0x1901c9['diff']['changes']['get'](_0x3d27d4+this['_step']):_0x1901c9['diff']['changes']['first'],_0x1901c9['activeChange']['data']['isOnRoot'])_0x1eb8b6=_0xdaecb6['editing']['view']['getDomRoot'](_0x1901c9['activeChange']['rootName']);else{const _0x197860=_0xdaecb6['model']['markers']['get']('revision:'+_0x1901c9['activeChange']['id']);_0x1eb8b6=_0xb537ad(_0xdaecb6['editing'],_0x197860);}_0x191225({'target':_0x1eb8b6,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x8d9bcb,currentChangeNumber:_0x3df906,numberOfChanges:_0x34a2cd,isReady:_0x126904,isEnabled:_0x345d39}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x345d39&&_0x126904&&_0x34a2cd)&&(!_0x8d9bcb||(0x1===this['_step']?_0x3df906<_0x34a2cd-0x1:_0x3df906>0x0));}},Ht=class extends at{constructor(_0x583677){super(_0x583677);const _0x113ff5=this['bindTemplate'],_0x1aca70=new _0x2fc172(_0x583677),_0x38b529=new _0x2fc172(_0x583677);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',(_0x1a82ca,_0x5f1c65)=>_0x1a82ca&&_0x5f1c65>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0xc4bbc3,_0x39507f,_0x531075,_0x792fee)=>{if(!_0xc4bbc3)return pt(_0x583677,'Loading...');if(!_0x531075)return pt(_0x583677,'No\x20changes');const _0x2408df=pt(_0x583677,'NUMBER_OF_CHANGES',_0x531075);return _0x792fee?pt(_0x583677,'X_OF_Y_CHANGES',[_0x39507f+0x1,_0x531075]):_0x2408df;}),_0x1aca70['set']({'label':pt(_0x583677,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3b4514}),_0x38b529['set']({'label':pt(_0x583677,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x298151}),_0x1aca70['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x38b529['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1aca70['on']('execute',()=>this['fire']('execute','backward')),_0x38b529['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',_0x113ff5['if']('_isStatusLabelVisible','ck-hidden',_0x395e14=>!_0x395e14)]},'children':[{'text':_0x113ff5['to']('isNavigationMode',_0x11ba93=>_0x11ba93?pt(_0x583677,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x583677,'Total')+':\x20')}]},{'text':_0x113ff5['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1aca70,_0x38b529]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x3bf7c2{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x594c4d=this['editor']['editing']['view'];_0x594c4d['change'](_0x589eba=>{for(const _0x36dc1a of _0x594c4d['document']['roots'])_0x589eba['addClass'](Pt,_0x36dc1a);});}['hide'](){const _0x93bdb4=this['editor']['editing']['view'];_0x93bdb4['change'](_0x199b52=>{for(const _0x413640 of _0x93bdb4['document']['roots'])_0x199b52['removeClass'](Pt,_0x413640);});}},Lt=class extends _0x3bf7c2{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Mt,Ut];}init(){const _0x39426b=this['editor'],_0x488ade=_0x39426b['plugins']['get'](Mt),_0x3b7332=_0x39426b['plugins']['get'](Ut);_0x39426b['ui']['componentFactory']['add']('exitToEditing',_0x25fc94=>{const _0x276477=new _0x2fc172(_0x25fc94);return _0x276477['set']({'label':pt(_0x25fc94,'Back\x20to\x20editing'),'icon':_0x27ad47,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x276477,'execute',()=>{_0x39426b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x276477;}),_0x39426b['ui']['componentFactory']['add']('restoreRevision',_0x2b1e98=>{const _0x3dc443=new _0x2fc172(_0x2b1e98);return _0x3dc443['set']({'label':pt(_0x2b1e98,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x3dc443['bind']('isEnabled')['to'](_0x39426b['commands']['get']('restoreRevision')),this['listenTo'](_0x3dc443,'execute',()=>_0x39426b['execute']('restoreRevision')),_0x3dc443;}),_0x39426b['ui']['componentFactory']['add']('changesNavigation',_0xa44923=>{const _0x548f37=new Ht(_0xa44923),_0x49d861=_0x39426b['commands']['get']('showPreviousChange'),_0x19d919=_0x39426b['commands']['get']('showNextChange');return _0x548f37['bind']('isBackwardNavigationEnabled')['to'](_0x49d861,'isEnabled'),_0x548f37['bind']('isForwardNavigationEnabled')['to'](_0x19d919,'isEnabled'),_0x548f37['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x488ade),this['listenTo'](_0x548f37,'execute',(_0x4b25c7,_0x360abd)=>{_0x39426b['execute']('forward'===_0x360abd?'showNextChange':'showPreviousChange');}),_0x548f37;}),_0x3b7332['show'](),_0x488ade['on']('change:isReady',(_0x524bc3,_0x50a309,_0x2bba43)=>{_0x2bba43?_0x3b7332['hide']():_0x3b7332['show']();});}},Ft=class extends _0x3d2f09{['_resizeObserver']=null;constructor(_0x2b451b,_0x2982f1){super(_0x2b451b,_0x2982f1);const _0x57a06a=this['bindTemplate'];this['set']({'label':pt(_0x2b451b,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x2b451b,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x57a06a['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x1097fd(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x50cdc3=this['fieldView']['element'];this['_tooltipString']=_0x50cdc3['scrollWidth']>_0x50cdc3['clientWidth']&&_0x50cdc3['value']||'';}},$t=class extends at{constructor(_0xca1808,_0x3f6416,_0x310b03){super(_0xca1808);const _0xa42b2c=new _0x10e7c7();_0xa42b2c['set']({'content':_0x5a257d,'viewBox':'0\x200\x2011\x2010'});const _0x34120e=['ck','ck-revision-history-sidebar__revision-author'];_0x310b03&&_0x34120e['push']('ck-revision-history-sidebar__revision-author_creator');const _0x54ca1e=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0xca1808,_0x310b03?'Revision\x20creator':'Revision\x20author')},'children':[_0xa42b2c,_0x3f6416['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x34120e},'children':_0x54ca1e});}};function jt(_0x11ed1e,_0x53083f){const _0x48c092=_0x11ed1e['bindTemplate'],_0x273ebd=_0x11ed1e['locale'],_0xf30cf4=ct(_0x273ebd);_0xf30cf4['panelPosition']='sw';const _0x4e057b=function(_0xbbeda2,_0x3b184e){const _0x1202d4=function(_0x48a42a,_0x17652f){const _0x4a95ba=_0x48a42a['locale'],_0x8947ab={'Compare\x20against\x20selected':pt(_0x4a95ba,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x4a95ba,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x4a95ba,'Restore\x20this\x20revision')};return _0x17652f['map'](_0x5eeffd=>{const _0x22868b=_0x8947ab[_0x5eeffd['name']];return _0x22868b&&_0x22868b!==_0x5eeffd['name']&&(_0x5eeffd['name']=_0x22868b),_0x5eeffd;});}(_0xbbeda2,_0x3b184e),_0x37cc4b=new _0x15d7e8();for(const _0x1a808d of _0x1202d4){const _0x256215={'type':'button','model':new rt({'label':_0x1a808d['name'],'class':_0x1a808d['class'],'withText':!0x0,'role':'menuitem','_action':_0x1a808d['action']})};_0x256215['model']['bind']('isEnabled')['to'](_0xbbeda2,'isActionsDropdownOpen',_0x4548ef=>'function'!=typeof _0x1a808d['isEnabled']||(!_0x4548ef||_0x1a808d['isEnabled'](_0xbbeda2))),_0x37cc4b['add'](_0x256215);}return _0x37cc4b;}(_0x11ed1e,_0x53083f);return _0x11ed1e['bind']('isActionsDropdownOpen')['to'](_0xf30cf4,'isOpen'),_0xf30cf4['buttonView']['set']({'label':pt(_0x273ebd,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x34bdf8}),_0xf30cf4['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x48c092['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x48c092['to'](_0xe4c187=>_0xe4c187['stopPropagation']())}}),_0xf30cf4['on']('execute',_0x5d0f39=>{_0x11ed1e['isReady']&&'function'==typeof _0x5d0f39['source']['_action']&&_0x5d0f39['source']['_action'](_0x11ed1e);}),ht(_0xf30cf4,_0x4e057b,{'role':'menu'}),_0xf30cf4['listenTo'](_0x11ed1e,'change:isActionsDropdownOpen',(_0x2a4828,_0x5f42de,_0x3aefaa)=>{if(_0x3aefaa)for(const _0x597877 of _0xf30cf4['listView']['items']){const _0x23fa87=_0x597877['children']['first'],_0x3abfef=_0x53083f['find'](_0x2d5e2d=>_0x2d5e2d['action']===_0x23fa87['_action'])['isVisible'];_0x597877['isVisible']=void 0x0===_0x3abfef||_0x3abfef(_0x11ed1e);}}),_0xf30cf4;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x673b8d(at);var Kt=class extends Bt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;constructor(_0x38de42,_0x5c4191,_0x496e45,_0x369288){super(_0x38de42);const _0x8b89ca=this['bindTemplate'],_0x395f04=function(_0x26b940,_0x2d2bb2){const _0x263317=Array['from'](_0x2d2bb2['authors'])['filter'](_0x480f4a=>_0x480f4a!=_0x2d2bb2['creator']);return _0x2d2bb2['creator']&&_0x263317['unshift'](_0x2d2bb2['creator']),_0x263317['map'](_0xf3a839=>new $t(_0x26b940,_0xf3a839,_0xf3a839==_0x2d2bb2['creator']));}(_0x38de42,_0x5c4191);this['id']=_0x5c4191['id'],this['_revision']=_0x5c4191,this['_requireRevisionName']=_0x369288,this['bind']('name','createdAt')['to'](_0x5c4191),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2745d1=>{return _0x2cbad1=_0x38de42['uiLanguage'],(_0x5ae3c6=_0x2745d1)['toLocaleDateString'](_0x2cbad1,{'month':'long','day':'numeric'})+',\x20'+_0x5ae3c6['toLocaleTimeString'](_0x2cbad1,{'hour':'numeric','minute':'numeric'});var _0x2cbad1,_0x5ae3c6;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Ft(_0x38de42,lt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x48eb75=>_0x48eb75||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x4315fe,_0x1cc266)=>_0x4315fe&&_0x1cc266),this['revisionActionsView']=_0x496e45&&_0x496e45['length']?jt(this,_0x496e45):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x8b89ca['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x8b89ca['if']('isEnabled','ck-disabled',_0x262b2b=>!_0x262b2b),_0x8b89ca['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x8b89ca['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x8b89ca['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':_0x8b89ca['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':_0x395f04}]},this['revisionActionsView']],'on':{'click':_0x8b89ca['to'](_0x2e8430=>{_0x2e8430['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x1484d3=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x1484d3,'change',()=>{this['_requireRevisionName']&&!_0x1484d3['value']||this['fire']('setName',{'id':this['id'],'name':_0x1484d3['value']}),_0x1484d3['value']||(_0x1484d3['value']=this['name']?this['name']:this['_createdAtFormatted']);});}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function qt(_0x25d5c5,_0x49357d){const _0x14e308=ft['fromJSDate'](_0x25d5c5)['setLocale'](_0x49357d),_0x1ed0b8=ft['local'](),_0x1381b2=_0x1ed0b8['minus']({'days':0x1})['startOf']('day');let _0x22431f,_0x5229ff;return _0x14e308['hasSame'](_0x1ed0b8,'day')?(_0x22431f=_0x14e308['startOf']('day')['toJSDate'](),_0x5229ff=_0x14e308['toRelativeCalendar']()):_0x14e308['hasSame'](_0x1381b2,'day')?(_0x22431f=_0x1381b2['toJSDate'](),_0x5229ff=_0x14e308['toRelativeCalendar']()):_0x14e308['hasSame'](_0x1ed0b8,'week')?(_0x22431f=_0x14e308['startOf']('week')['toJSDate'](),_0x5229ff=_0x14e308['weekdayLong']||''):_0x14e308['hasSame'](_0x1ed0b8,'year')?(_0x22431f=_0x14e308['startOf']('month')['toJSDate'](),_0x5229ff=_0x14e308['monthLong']||''):(_0x22431f=_0x14e308['startOf']('year')['toJSDate'](),_0x5229ff=String(_0x14e308['year'])),{'startDate':_0x22431f,'localizedPeriodName':_0x5229ff};}var Gt=class extends at{startDate;['revisionViews'];_revisionActions;_requireRevisionName;constructor(_0x95a1bd,_0x381a25,_0x10ae14,_0x1c006b){super(_0x95a1bd);const _0x4ff16b=qt(_0x381a25,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x381a25,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x10ae14,this['_requireRevisionName']=_0x1c006b,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':_0x4ff16b}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x52dfdc){const _0x3c9675=new Kt(this['locale'],_0x52dfdc,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x3c9675);}['removeRevision'](_0x2dc548){const _0x4f37e2=this['revisionViews']['find'](_0x5e799a=>_0x5e799a['id']===_0x2dc548['id']);this['revisionViews']['remove'](_0x4f37e2);}},Jt=class extends at{constructor(_0x3a519c){super(_0x3a519c);const _0x241f8a=new _0x10e7c7();_0x241f8a['content']=_0x447870,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x241f8a,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[pt(_0x3a519c,'Revision\x20history')]}]});}},Wt=class extends at{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;constructor(_0x3549fc,_0xa7e399,_0x4abc90,_0x57da6f){super(_0x3549fc);const _0x589c7c=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0xa7e399,this['_revisionActions']=_0x4abc90,this['_requireRevisionName']=_0x57da6f,this['on']('select',(_0x188571,_0x45f881)=>{this['fire']('revisionSelected',_0x45f881);}),this['on']('setName',(_0x21ed07,_0x1e5f87)=>{this['fire']('revisionSetName',_0x1e5f87);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Jt(_0x3549fc),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x589c7c['if']('isEnabled','ck-disabled',_0x4c2457=>!_0x4c2457)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x16cc05 of this['_revisions'])this['_addRevision'](_0x16cc05);this['_revisions']['on']('add',(_0x547f02,_0x297ac7)=>{this['_addRevision'](_0x297ac7);}),this['_revisions']['on']('remove',(_0x378f55,_0x563a4e)=>{this['_removeRevision'](_0x563a4e);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2f44b5=>_0x2f44b5['revisionViews']['map'](_0x2d7187=>_0x2d7187))['flat']();}selectRevision(_0xe11676){for(const _0x3037f3 of this['revisionViews'])_0xe11676&&_0xe11676['id']===_0x3037f3['id']?_0x3037f3['select']():_0x3037f3['deselect']();}highlightRevisions(_0x5ec499){for(const _0x141740 of this['revisionViews'])_0x5ec499['some'](({id:_0x26d315})=>_0x26d315===_0x141740['id'])?_0x141740['highlight']():_0x141740['unhighlight']();}['_addRevision'](_0x506d19){const _0x2b36f9=qt(_0x506d19['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x30e711=this['_getTimePeriodViewByStartDate'](_0x2b36f9);_0x30e711||(_0x30e711=new Gt(this['locale'],_0x2b36f9,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x30e711)),_0x30e711['addRevision'](_0x506d19);}['_removeRevision'](_0x17ca39){const _0x3b81fd=qt(_0x17ca39['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x3b81fd)['removeRevision'](_0x17ca39);}_getTimePeriodViewByStartDate(_0x28ce07){return this['timePeriodViews']['find'](_0x5ec463=>_0x5ec463['startDate']['getTime']()===_0x28ce07['getTime']());}},Yt=class RevisionsSidebar extends _0x3bf7c2{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Mt];}constructor(
|
|
30
|
-
_0x39cb9a(_0x30695a);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x26b96b,_0x1e481d){super(_0x1e481d),this['sourceElement']=_0x26b96b,this['model']['document']['createRoot']();const _0x2961f0=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x2961f0);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0xe4f0eb,_0x313e34){const _0x9b9eff=new this(_0xe4f0eb,_0x313e34);return await _0x9b9eff['initPlugins'](),await _0x9b9eff['ui']['init'](_0xe4f0eb),await _0x9b9eff['data']['init'](_0x9b9eff['config']['get']('initialData')||''),_0x9b9eff['fire']('ready'),_0x9b9eff;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x5082f5{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x23ad8f){super(_0x23ad8f),this['result']='end',_0x23ad8f['editing']['view']['_overlayModeHint']='auto',_0x23ad8f['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x5082f5{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_t,St];}constructor(_0x45e91b){if(super(_0x45e91b),!this['editor']['config']['get']('revisionHistory'))throw new _0x17f741('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x1e6ee3=>this['_showRevisionViewer']({..._0x1e6ee3,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x13c14a=>this['_closeRevisionViewer'](_0x13c14a)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x2ebd10=>this['_restoreRevision'](_0x2ebd10)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x4ba40d){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4ba40d;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x556233){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x556233);}getRevision(_0x3e393f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3e393f);}getRevisions(_0x523ac0){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x523ac0||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0xcca300=this['editor'],_0x4ba67b=_0x19ab5c(_0xcca300,ii),_0x4f6244=_0xcca300['plugins']['get']('RevisionTracker'),_0x331ff7=_0xcca300['plugins']['get'](_0x38fdbd)['users'];return _0x4ba67b['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4ba67b['lazyRoots'],(_0x4ba67b['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x5082f5{static get requires(){return[Mt,_0x38fdbd];}init(){const _0x540d93=this['editor']['plugins']['get'](_0x38fdbd);for(const _0x4471f8 of _0x331ff7)_0x4471f8['isAnonymous']||_0x540d93['getUser'](_0x4471f8['id'])||_0x540d93['addUser'](_0x4471f8);const _0x462c09=_0x4f6244['repository']['getRevisions']();let _0x37b124=null;const _0x5d9b46=this['editor']['plugins']['get']('RevisionViewer');_0x5d9b46['adapter']=_0x4f6244['adapter'],_0x5d9b46['bind']('isEnabled')['to'](_0x4f6244),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xcca300,'isReadOnly',_0x27bb69=>!_0x27bb69);for(const _0xbe685c of _0x462c09){const _0x147276=null===_0xbe685c['creator'];if(_0x147276&&_0xbe685c['toVersion']===_0xbe685c['fromVersion'])continue;const _0x1a29aa=_0xbe685c['toJSON']();_0x5d9b46['addRevisionData'](_0x1a29aa,(_0x20af52,_0x420246,_0x1d3779)=>{if(_0x147276){if(_0x37b124)_0x37b124['_update'](_0x20af52,_0x420246);else{if(!_0x420246){const _0x196ae8=_0x1d3779['toJSON']();_0x196ae8['id']=_0x2993e9(),_0x4f6244['saveRevision'](_0x196ae8,_0x1d3779['toVersion'])['then'](_0x4973fd=>{_0x37b124=_0x4973fd;});}}}else _0xbe685c['_update'](_0x20af52,_0x420246);});}}},Yt),_0x4ba67b);}['_enhanceShowRevisionViewerCallback'](){const _0x1fb6b5=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4fd5be=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x4fd5be['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x501ac4=this['editor']['plugins']['get']('Dialog');_0x501ac4['isOpen']&&_0x501ac4['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x52e8bf=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x2be1ae of _0x52e8bf)_0x2be1ae['class']=_0x2be1ae['class']?_0x2be1ae['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x2c5071=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2c5071&&_0x2c5071['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x46eb7a=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x46eb7a&&_0x46eb7a['setAttribute']('tabindex','-1');}}const _0x3f43fa=this['_getRevisionViewerEditorConfig']();return _0x1fb6b5(_0x3f43fa)['then'](_0x14ec1f=>(this['_viewerEditor']=_0x14ec1f,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'),_0x14ec1f))['catch'](_0x2adefa=>(console['error'](_0x2adefa),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x128952=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 _0x556308=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x46acb7 of _0x556308)_0x46acb7['class']='ck-tab-panel_disabled'===_0x46acb7['class']?'':_0x46acb7['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x4199c8=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4199c8&&_0x4199c8['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x14c640=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x14c640&&_0x14c640['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x128952(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x285b7c=this['editor']['plugins']['get']('Annotations');_0x285b7c['refreshVisibility'](),_0x285b7c['refreshPositioning']();}});});}['_showRevisionViewer'](_0x20f9c5){const _0x1075de=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1578e9=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x52b2b4=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x52b2b4,_0x20f9c5)['then'](_0x157684=>(_0x1578e9['style']['display']='block',_0x1075de['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x157684));}['_closeRevisionViewer'](_0x6859e3){const _0x1b02f5=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x1b02f5['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x6859e3['destroy']();}async _restoreRevision(_0x19abe7){const _0x1f1bd3=this['editor'],_0x3b3b95=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3de3b8=_0x1f1bd3['plugins']['get']('RevisionTracker'),_0x55d660=_0x1f1bd3['plugins']['get']('RevisionHistoryUtils'),_0xa17e09=_0x3b3b95['repository']['getRevision'](_0x19abe7);let _0x20a514,_0x54808b,_0x3275d7;try{await _0x55d660['loadRevisionData'](_0xa17e09,this['adapter']),_0x20a514=_0x55d660['getRevisionDocumentData'](_0xa17e09),_0x54808b=_0x55d660['getRevisionRootsAttributes'](_0xa17e09);}catch(_0x324de8){return void console['error'](_0x324de8);}_0x1f1bd3['model']['change'](_0x3fa824=>{for(const _0x2bcd81 of Array['from'](_0x1f1bd3['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x3fa824['removeMarker'](_0x2bcd81);}),_0x3b3b95['isReady']=!0x1,_0x1f1bd3['model']['enqueueChange'](_0x1cee7d=>{_0x1cee7d['setSelection'](null),_0x1cee7d['removeSelectionAttribute'](_0x1f1bd3['model']['document']['selection']['getAttributeKeys']());const _0x11e422=Object['keys'](_0x20a514);for(const _0x2cce8b of _0x1f1bd3['model']['document']['roots'])'$graveyard'!=_0x2cce8b['rootName']&&_0x2cce8b['isAttached']()&&!_0x11e422['includes'](_0x2cce8b['rootName'])&&_0x1cee7d['detachRoot'](_0x2cce8b);for(const _0x619b09 of _0x11e422){let _0x4b8474=_0x1f1bd3['model']['document']['getRoot'](_0x619b09);if(!_0x4b8474||!_0x4b8474['isAttached']()){const _0x18f152=_0xa17e09['diffData']?.[_0x619b09]?.['rootElementName']||'$root';_0x4b8474=_0x1cee7d['addRoot'](_0x619b09,_0x18f152);}const _0x2ec0bd=_0x54808b[_0x619b09],_0x52ed05=Object['keys'](_0x2ec0bd),_0x46cc00=_0x20a514[_0x619b09];for(const _0x2770c8 of _0x4b8474['getAttributeKeys']())_0x52ed05['includes'](_0x2770c8)||_0x1cee7d['removeAttribute'](_0x2770c8,_0x4b8474);for(const _0x18eff8 of _0x52ed05)_0x1cee7d['setAttribute'](_0x18eff8,_0x54808b[_0x619b09][_0x18eff8],_0x4b8474);_0x1cee7d['remove'](_0x1cee7d['createRangeIn'](_0x4b8474)),_0x1cee7d['insert'](_0x1f1bd3['data']['parse'](_0x46cc00,_0x4b8474),_0x4b8474,0x0);}});const _0x4092ea=pt(_0x1f1bd3['locale'],'Restored');if(_0xa17e09['name'])_0x3275d7=-0x1==_0xa17e09['name']['indexOf'](_0x4092ea)?_0x4092ea+':\x20'+_0xa17e09['name']:_0xa17e09['name'];else _0x3275d7=_0x4092ea+':\x20'+(_0xa17e09['createdAt']['toLocaleDateString'](_0x1f1bd3['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xa17e09['createdAt']['toLocaleTimeString'](_0x1f1bd3['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3de3b8['saveRevision']({'name':_0x3275d7}),_0x3b3b95['isReady']=!0x0,_0x1f1bd3['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};
|
|
29
|
+
Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Mt];}constructor(_0x110187){super(_0x110187),this['_revisionViewer']=_0x110187['plugins']['get'](Mt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x5ca827=this['_revisionsRepository']['_revisions'],_0x1bcbf0=this['_createRevisionActions'](),_0x53d864=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Wt(this['editor']['locale'],_0x5ca827,_0x1bcbf0,this['editor']['config']['get']('revisionHistory.requireRevisionName')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x4100db,_0x5b64e7)=>{_0x5b64e7['revisionViews']['on']('add',(_0x619e80,_0x1181a4)=>{_0x1181a4['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)),_0x53d864['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x4ab093=this['_revisionsRepository']['getRevision'](0x0);if(_0x4ab093){const _0x387635=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4ab093['id']);this['_revisionViewer']['compare'](_0x4ab093,_0x387635);}}_handleRevisionSelected(_0x1b4d1c,_0x4c9045){const _0x5287fa=this['_revisionsRepository']['getRevision'](_0x4c9045['id']),_0x3be28c=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5287fa['id']);this['_revisionViewer']['compare'](_0x5287fa,_0x3be28c);}_handleRevisionSetName(_0x3a15e4,_0x5c3ced){this['_revisionsRepository']['getRevision'](_0x5c3ced['id'])['setName'](_0x5c3ced['name']);}['_handleDiffChange'](_0x3d654e,_0x3548a4,_0x28f62b){const _0x54670e=this['_revisionsRepository']['getRevisionsInDiff'](_0x28f62b);_0x54670e['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x54670e),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x54670e[0x0]));}_createRevisionActions(){const _0x63d7cc=this['editor'],_0x14103e=RevisionsSidebar['availableRevisionActions'],_0x727014=_0x63d7cc['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x727014['length'])return _0x727014['map'](_0x27b9e5=>{const _0x1ea325='string'==typeof _0x27b9e5?Object['assign']({},_0x14103e[_0x27b9e5]):_0x27b9e5;return _0x1ea325['action']=_0x1ea325['action']['bind'](this,_0x63d7cc),_0x1ea325['isVisible']&&(_0x1ea325['isVisible']=_0x1ea325['isVisible']['bind'](this,_0x63d7cc)),_0x1ea325;});}};function Xt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x3f9318},_0x5a9b1d)=>{const _0x527812=_0x3f9318['get'](Mt),_0x18172d=_0x527812['repository'];let _0x3aeaed=_0x527812['diff']['newRevisionId'],_0x478910=_0x5a9b1d['id'];_0x18172d['getIndex'](_0x3aeaed)>_0x18172d['getIndex'](_0x478910)&&([_0x3aeaed,_0x478910]=[_0x478910,_0x3aeaed]),_0x527812['compare'](_0x3aeaed,_0x478910);},'isVisible':({plugins:_0x10ce56},_0x9d2bc9)=>{const _0x4c3f8a=_0x10ce56['get'](Mt);return!(_0x4c3f8a['repository']['getRevisionsInDiff'](_0x4c3f8a['diff'])['length']>0x2)&&!_0x9d2bc9['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1142b0,{id:_0x5b3430})=>{_0x1142b0['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5b3430);},'isVisible':({plugins:_0x5ebf80},_0x237630)=>!!_0x5ebf80['get'](Mt)['repository']['getLaterVisibleRevision'](_0x237630['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x1031d7},{id:_0x20b3f2,revisionNameView:_0x4dd812})=>{const _0x59e040=_0x1031d7['get'](Mt),_0x505b34=_0x59e040['repository']['getEarlierVisibleRevision'](_0x20b3f2);_0x59e040['compare'](_0x20b3f2,_0x505b34),_0x4dd812['focus'](),_0x4dd812['fieldView']['select']();}}};}var Qt=class extends _0x1a9b5e{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0xae8d14,_0x4a1304){super(_0xae8d14),this['_view']=_0x4a1304,this['_toolbarConfig']=ut(_0xae8d14['config']['get']('toolbar')),this['_elementReplacer']=new _0x271224();}get element(){return this['view']['element'];}init(_0x5dbbb8){const _0x5630f7=this['editor'],_0x34a4af=this['view'],_0x3ad04d=_0x5630f7['editing']['view'],_0x44ca40=_0x34a4af['editable'];_0x44ca40['name']=_0x3ad04d['document']['getRoot']()['rootName'],_0x34a4af['render']();const _0x2abf35=_0x44ca40['element'];this['setEditableElement'](_0x44ca40['name'],_0x2abf35),_0x34a4af['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3ad04d['attachDomRoot'](_0x2abf35),this['_elementReplacer']['replace'](_0x5dbbb8,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x14e351=this['view'],_0x21f955=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x21f955['detachDomRoot'](_0x14e351['editable']['name']),_0x14e351['destroy']();}_initToolbar(){const _0x2f2e75=this['view'];_0x2f2e75['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x2f2e75['stickyPanel']['limiterElement']=_0x2f2e75['element'],_0x2f2e75['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x200419})=>_0x200419),_0x2f2e75['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x2f2e75['toolbar']);}},zt=class extends _0x661458{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x5a62ba,_0xa1ac3,_0x149125={}){super(_0x5a62ba),this['stickyPanel']=new st(_0x5a62ba),this['toolbar']=new ot(_0x5a62ba,{'shouldGroupWhenFull':_0x149125['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x4d4b11(_0x5a62ba,_0xa1ac3);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const Zt=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x37aa64(_0x1839d1);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1eeb36,_0x112891){super(_0x112891),this['sourceElement']=_0x1eeb36,this['model']['document']['createRoot']();const _0x3fd525=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x3fd525);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x116684,_0x44fd7b){const _0x518514=new this(_0x116684,_0x44fd7b);return await _0x518514['initPlugins'](),await _0x518514['ui']['init'](_0x116684),await _0x518514['data']['init'](_0x518514['config']['get']('initialData')||''),_0x518514['fire']('ready'),_0x518514;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x3bf7c2{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x14a1c6){super(_0x14a1c6),this['result']='end',_0x14a1c6['editing']['view']['_overlayModeHint']='auto',_0x14a1c6['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x3bf7c2{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_t,St];}constructor(_0x28239f){if(super(_0x28239f),!this['editor']['config']['get']('revisionHistory'))throw new _0x5b13e7('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x30bc0c=>this['_showRevisionViewer']({..._0x30bc0c,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x246618=>this['_closeRevisionViewer'](_0x246618)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4f1768=>this['_restoreRevision'](_0x4f1768)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x33193c){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x33193c;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x2b8c51){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x2b8c51);}getRevision(_0x29b0d7){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x29b0d7);}getRevisions(_0x2db155){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2db155||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0xa95502=this['editor'],_0x1c75a6=_0x4ac0b0(_0xa95502,ii),_0x30ca34=_0xa95502['plugins']['get']('RevisionTracker'),_0x44c564=_0xa95502['plugins']['get'](_0x403926)['users'];return _0x1c75a6['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1c75a6['lazyRoots'],(_0x1c75a6['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x3bf7c2{static get requires(){return[Mt,_0x403926];}init(){const _0x344490=this['editor']['plugins']['get'](_0x403926);for(const _0x3677d1 of _0x44c564)_0x3677d1['isAnonymous']||_0x344490['getUser'](_0x3677d1['id'])||_0x344490['addUser'](_0x3677d1);const _0x27e4d5=_0x30ca34['repository']['getRevisions']();let _0x20f797=null;const _0x307c08=this['editor']['plugins']['get']('RevisionViewer');_0x307c08['adapter']=_0x30ca34['adapter'],_0x307c08['bind']('isEnabled')['to'](_0x30ca34),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xa95502,'isReadOnly',_0x17c6e0=>!_0x17c6e0);for(const _0x355545 of _0x27e4d5){const _0x1e1027=null===_0x355545['creator'];if(_0x1e1027&&_0x355545['toVersion']===_0x355545['fromVersion'])continue;const _0x29c53d=_0x355545['toJSON']();_0x307c08['addRevisionData'](_0x29c53d,(_0x10ff06,_0x3a07a9,_0x571e2a)=>{if(_0x1e1027){if(_0x20f797)_0x20f797['_update'](_0x10ff06,_0x3a07a9);else{if(!_0x3a07a9){const _0xc0ef1d=_0x571e2a['toJSON']();_0xc0ef1d['id']=_0x49a83a(),_0x30ca34['saveRevision'](_0xc0ef1d,_0x571e2a['toVersion'])['then'](_0x1784d2=>{_0x20f797=_0x1784d2;});}}}else _0x355545['_update'](_0x10ff06,_0x3a07a9);});}}},Yt),_0x1c75a6);}['_enhanceShowRevisionViewerCallback'](){const _0x3e4a4a=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x1d114f=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x1d114f['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x163a2f=this['editor']['plugins']['get']('Dialog');_0x163a2f['isOpen']&&_0x163a2f['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x13ee28=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x592682 of _0x13ee28)_0x592682['class']=_0x592682['class']?_0x592682['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x22d7f1=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x22d7f1&&_0x22d7f1['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x521eb5=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x521eb5&&_0x521eb5['setAttribute']('tabindex','-1');}}const _0x31ecec=this['_getRevisionViewerEditorConfig']();return _0x3e4a4a(_0x31ecec)['then'](_0x2b1c92=>(this['_viewerEditor']=_0x2b1c92,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'),_0x2b1c92))['catch'](_0x1f0e92=>(console['error'](_0x1f0e92),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3fe6d2=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 _0x3313fe=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x34ff0d of _0x3313fe)_0x34ff0d['class']='ck-tab-panel_disabled'===_0x34ff0d['class']?'':_0x34ff0d['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5e450a=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5e450a&&_0x5e450a['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x50072c=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x50072c&&_0x50072c['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x3fe6d2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x28d2b5=this['editor']['plugins']['get']('Annotations');_0x28d2b5['refreshVisibility'](),_0x28d2b5['refreshPositioning']();}});});}['_showRevisionViewer'](_0x462e71){const _0x237232=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4fe92b=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x22b507=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x22b507,_0x462e71)['then'](_0x3ef553=>(_0x4fe92b['style']['display']='block',_0x237232['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3ef553));}['_closeRevisionViewer'](_0x50a89c){const _0x244bfc=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x244bfc['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x50a89c['destroy']();}async _restoreRevision(_0x520fd2){const _0x16f483=this['editor'],_0x4e0ff5=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2bcaa3=_0x16f483['plugins']['get']('RevisionTracker'),_0x4a788e=_0x16f483['plugins']['get']('RevisionHistoryUtils'),_0x518587=_0x4e0ff5['repository']['getRevision'](_0x520fd2);let _0x35937e,_0x4e7a98,_0x3ac310;try{await _0x4a788e['loadRevisionData'](_0x518587,this['adapter']),_0x35937e=_0x4a788e['getRevisionDocumentData'](_0x518587),_0x4e7a98=_0x4a788e['getRevisionRootsAttributes'](_0x518587);}catch(_0x4ebd3d){return void console['error'](_0x4ebd3d);}_0x16f483['model']['change'](_0x27617d=>{for(const _0x20e247 of Array['from'](_0x16f483['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x27617d['removeMarker'](_0x20e247);}),_0x4e0ff5['isReady']=!0x1,_0x16f483['model']['enqueueChange'](_0x1046b5=>{_0x1046b5['setSelection'](null),_0x1046b5['removeSelectionAttribute'](_0x16f483['model']['document']['selection']['getAttributeKeys']());const _0x5be869=Object['keys'](_0x35937e);for(const _0x337a06 of _0x16f483['model']['document']['roots'])'$graveyard'!=_0x337a06['rootName']&&_0x337a06['isAttached']()&&!_0x5be869['includes'](_0x337a06['rootName'])&&_0x1046b5['detachRoot'](_0x337a06);for(const _0x7dbaa3 of _0x5be869){let _0xe47518=_0x16f483['model']['document']['getRoot'](_0x7dbaa3);if(!_0xe47518||!_0xe47518['isAttached']()){const _0x6d7f8=_0x518587['diffData']?.[_0x7dbaa3]?.['rootElementName']||'$root';_0xe47518=_0x1046b5['addRoot'](_0x7dbaa3,_0x6d7f8);}const _0x4e7c18=_0x4e7a98[_0x7dbaa3],_0x26afb0=Object['keys'](_0x4e7c18),_0x3347d7=_0x35937e[_0x7dbaa3];for(const _0x3feb8f of _0xe47518['getAttributeKeys']())_0x26afb0['includes'](_0x3feb8f)||_0x1046b5['removeAttribute'](_0x3feb8f,_0xe47518);for(const _0xfedeed of _0x26afb0)_0x1046b5['setAttribute'](_0xfedeed,_0x4e7a98[_0x7dbaa3][_0xfedeed],_0xe47518);_0x1046b5['remove'](_0x1046b5['createRangeIn'](_0xe47518)),_0x1046b5['insert'](_0x16f483['data']['parse'](_0x3347d7,_0xe47518),_0xe47518,0x0);}});const _0x8ce392=pt(_0x16f483['locale'],'Restored');if(_0x518587['name'])_0x3ac310=-0x1==_0x518587['name']['indexOf'](_0x8ce392)?_0x8ce392+':\x20'+_0x518587['name']:_0x518587['name'];else _0x3ac310=_0x8ce392+':\x20'+(_0x518587['createdAt']['toLocaleDateString'](_0x16f483['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x518587['createdAt']['toLocaleTimeString'](_0x16f483['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2bcaa3['saveRevision']({'name':_0x3ac310}),_0x4e0ff5['isReady']=!0x0,_0x16f483['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};
|