@ckeditor/ckeditor5-revision-history 48.4.0-alpha.0 → 48.4.0-alpha.2
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 _0x5234db,Collection as _0x4a1e3f,ElementReplacer as _0xa15115,FocusTracker as _0xf10848,KeystrokeHandler as _0x43e974,ObservableMixin as _0x43b55f,ResizeObserver as _0x2261be,logWarning as _0x48ed8f,scrollViewportToShowTarget as _0x2382f3,uid as _0xb49d28}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x38b022,isEqual as _0x273684,set as _0x41ae1f,unset as _0x240de0}from'es-toolkit/compat';import{Command as _0x29f6e0,Editor as _0xd42421,ElementApiMixin as _0x4842fe,PendingActions as _0x488f20,Plugin as _0x57c795}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x5d1660,Users as _0x3e15a4,getMarkerDomElement as _0x4a37b2,sanitizeEditorConfig as _0x2d8a3c}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0xdc5c7c,ModelElement as _0x8d1ceb,ModelPosition as _0x1a4c85,ModelRange as _0x26b117,ModelText as _0x1ad521,ViewAttributeElement as _0x4525a0,ViewContainerElement as _0x2fdda5,ViewDocumentFragment as _0x3b5424,ViewElement as _0x17ffd0,ViewEmptyElement as _0x3cc4cb,ViewRawElement as _0x85adaa,ViewText as _0x5d7152,ViewUIElement as _0x49300b}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x4eb334,IconChevronUp as _0x70c06a,IconHistory as _0x116443,IconThreeVerticalDots as _0x482ded,IconUndo as _0x3ba824,IconUser as _0x51cd25}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x3b2c1e,ButtonView as _0x112eb0,ContextualBalloon as _0x1329e2,CssTransitionDisablerMixin as _0x59bd54,EditorUI as _0x3893d1,IconView as _0x56e938,InlineEditableUIView as _0x4c416b,LabeledFieldView as _0xd50028,ListItemView as _0x283521,ListView as _0x4fa40b,MenuBarMenuListItemButtonView as _0x5782cb,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
|
+
_0x43b55f();var gt=class extends vt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x424454){super(),this['id']=_0x424454['id']||_0xb49d28(),this['creator']=_0x424454['creator']||null,this['authors']=_0x424454['authors']||[],this['diffData']=_0x424454['diffData']||null,this['toVersion']=_0x424454['toVersion']||0x0,this['fromVersion']=_0x424454['fromVersion']||0x0,this['set']('name',_0x424454['name']||''),this['set']('createdAt',_0x424454['createdAt']||new Date()),this['set']('attributes',_0x424454['attributes']||{});}setName(_0x1bdd46){this['_update']({'name':_0x1bdd46});}setAttribute(_0x475206,_0x5e1772){const _0x258a1c=_0x38b022(this['attributes']);_0x41ae1f(_0x258a1c,_0x475206,_0x5e1772),this['_update']({'attributes':_0x258a1c});}removeAttribute(_0x503e6c){const _0x823e3=_0x38b022(this['attributes']);_0x240de0(_0x823e3,_0x503e6c),this['_update']({'attributes':_0x823e3});}_update(_0x3f9be5,_0x59e30=!0x1){let _0x413114=!0x1;const _0x472082={'id':this['id']};for(const _0x5e4fe1 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x26101e=_0x3f9be5[_0x5e4fe1];void 0x0!==_0x26101e&&_0x26101e!==this[_0x5e4fe1]&&(this[_0x5e4fe1]=_0x26101e,_0x472082[_0x5e4fe1]=_0x26101e,_0x413114=!0x0);}_0x413114&&(_0x472082['authors']&&(_0x472082['authorsIds']=_0x472082['authors']['map'](_0x5cb43e=>_0x5cb43e['id']),delete _0x472082['authors']),this['fire']('_update',_0x472082,_0x59e30));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x432f91=>_0x432f91['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x57c795{['_revisions'];static get requires(){return[_0x3e15a4];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x4790a1){super(_0x4790a1),this['_revisions']=new _0x4a1e3f();}afterInit(){!async function(_0x122ad0){const _0x3a8cce='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x316ef8=0xeb829,_0x2365d8=0x79158,_0xd87f38=window['Date']['now'](),_0x56e427=_0x122ad0['editor'],_0x20ead9=new window['Promise'](_0x1a2036=>{_0x56e427['once']('ready',_0x1a2036);}),_0x45ffbd={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x461742=_0x56e427['config']['get']('licenseKey');async function _0x1d9271(){let _0xa5b407,_0x2c6b1d=null,_0x5a2f29=null;try{return'GPL'==_0x461742?'NotAllowed':(_0xa5b407=_0x3eb31f(),_0xa5b407?(_0xa5b407['usageEndpoint']&&(_0x5a2f29=_0x2de707(_0xa5b407['usageEndpoint'],_0xa5b407['jti'])),await _0x1a0c3e()?_0xa74293()?_0x576d60()?'Expired':_0x3116c0()?('evaluation'==_0xa5b407['licenseType']&&(_0x2c6b1d=_0x2adcd6('EvaluationLimit')),await _0x46acd8()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x576d60(){const _0x4543f4=['evaluation','trial']['includes'](_0xa5b407['licenseType'])?_0xd87f38/0x3e8:0xe10*_0x2365d8;return _0xa5b407['exp']<_0x4543f4;}function _0xa74293(){const _0x4b2e96=_0xa5b407['features'];if(!_0x4b2e96)return!0x1;if(_0x4b2e96['includes']('*'))return!0x0;if(_0x4b2e96['includes']('RH'))return!0x0;if(_0x4b2e96['includes']('RRH')){if(_0x5c1703())return!0x0;if(_0x1ac10f()||_0x24696c())return!0x0;}return!0x1;}function _0x3116c0(){const _0x3196da=_0xa5b407['licensedHosts'];if(!_0x3196da||0x0==_0x3196da['length'])return!0x0;const {hostname:_0x290c56}=new URL(window['location']['href']);if(_0x3196da['includes'](_0x290c56))return!0x0;const _0x4e4ecf=_0x290c56['split']('.');return _0x3196da['filter'](_0x5ed869=>_0x5ed869['includes']('*'))['map'](_0x5451a6=>_0x5451a6['split']('.'))['filter'](_0x4eb6b7=>_0x4eb6b7['length']<=_0x4e4ecf['length'])['map'](_0x34f33b=>Array(_0x4e4ecf['length']-_0x34f33b['length'])['fill']('*'===_0x34f33b[0x0]?'*':'')['concat'](_0x34f33b))['some'](_0x517650=>_0x4e4ecf['every']((_0x494952,_0x19e81b)=>_0x517650[_0x19e81b]===_0x494952||'*'===_0x517650[_0x19e81b]));}function _0x46acd8(){return _0x2c6b1d&&_0x5a2f29?new window['Promise']((_0x583943,_0x3e5ee8)=>{_0x2c6b1d['then'](_0x583943,_0x3e5ee8),_0x5a2f29['then'](_0x25ecac=>{'Valid'!=_0x25ecac&&_0x583943(_0x25ecac);},_0x3e5ee8);}):_0x2c6b1d||_0x5a2f29||'Valid';}}function _0x2de707(_0x52257a,_0x11cd41){return new window['Promise'](_0x41ffbb=>{if(_0x524dee())return _0x41ffbb('Valid');_0xbcfa57(),_0x56e427['decorate']('_sendUsageRequest');let _0x54ebf1=!0x1;const _0x186abd=_0xb49d28();function _0x3743ec(_0x932f63){return!!_0x932f63&&('object'==typeof _0x932f63||'function'==typeof _0x932f63)&&'function'==typeof _0x932f63['then']&&'function'==typeof _0x932f63['catch'];}function _0x382a23(_0x3619b8){_0x4779d0(_0x3619b8)['then'](_0x1a02c9=>_0x1a02c9&&'ok'==_0x1a02c9['status']?_0x24778e(_0x58bc68(_0x186abd+_0x11cd41))!=_0x1a02c9['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x35ffe8=>(_0xc7520(),_0x35ffe8),()=>{const _0x246cdf=_0x2f93c4();return null==_0x246cdf?(_0xc7520(),'Valid'):_0xd87f38-_0x246cdf>0x240c8400?'UsageLimit':'Valid';})['then'](_0x41ffbb)['catch'](()=>{_0x41ffbb('UsageLimit');});const _0x302585=0x36ee80;function _0xc7520(){const _0x23a5f5='llct-'+_0x24778e(_0x58bc68(_0x52257a)),_0x4aa14a=_0x13a69b(_0x24778e(window['Math']['ceil'](_0xd87f38/_0x302585)));window['localStorage']['setItem'](_0x23a5f5,_0x4aa14a);}function _0x2f93c4(){const _0x3ad23e='llct-'+_0x24778e(_0x58bc68(_0x52257a)),_0xcd6bd7=window['localStorage']['getItem'](_0x3ad23e);return _0xcd6bd7?window['parseInt'](_0x13a69b(_0xcd6bd7),0x10)*_0x302585:null;}function _0x4779d0(_0x341407){return new window['Promise']((_0x5125a6,_0x317354)=>{_0x341407['then'](_0x5125a6,_0x317354),window['setTimeout'](_0x317354,0x1d4c0);});}}_0x56e427['on']('_sendUsageRequest',(_0x5c4367,_0x4b5b61)=>{if(_0x4b5b61[0x0]!=_0x52257a)return _0x41ffbb('UsageLimit');_0x4b5b61[0x1]={..._0x4b5b61[0x1],'requestId':_0x186abd};},{'priority':'high'}),_0x56e427['on']('_sendUsageRequest',_0x5570ea=>{_0x3743ec(_0x5570ea['return'])&&(_0x54ebf1=!0x0,_0x382a23(_0x5570ea['return']));},{'priority':'low'}),_0x20ead9['then'](()=>{_0x54ebf1||_0x41ffbb('UsageLimit');});});function _0x524dee(){return'auto'==_0x56e427['editing']['view']['_overlayModeHint'];}function _0xbcfa57(){_0x56e427['editing']['view']['_overlayModeHint']='auto';}}function _0x2adcd6(_0x371d19){const _0x211fbb=[new window['Promise'](_0x485b51=>setTimeout(_0x485b51,0x93ecc)),_0x20ead9['then'](()=>new window['Promise'](_0x4dbd60=>{const _0x1abda4=0x7,_0x319491=_0x122ad0['_revisions'];function _0x299060(){_0x319491['length']>=_0x1abda4&&_0x4dbd60();}_0x299060(),_0x319491['on']('add',_0x299060);})),new window['Promise'](_0x1ad441=>{function _0x25e352(){for(const _0x8faf23 in window)if(window['Number']['isNaN'](window['Number'](_0x8faf23))&&window[_0x8faf23]==_0x316ef8)return _0x1ad441();'destroyed'!=_0x56e427['state']&&window['setTimeout'](_0x25e352,0x1388);}_0x8a0de6('RevisionViewer')&&_0x25e352();})];return window['Promise']['race'](_0x211fbb)['then'](()=>_0x371d19);}async function _0x106f13(){if(await _0x20ead9,_0x8a0de6('RevisionViewer')){const _0x5bac92=_0x122ad0['getRevision'](0x0),_0x49a835=_0x122ad0['getEarlierVisibleRevision'](_0x5bac92['id']),_0x3ac73b=_0x43a0b2('RevisionViewer');return await _0x3ac73b['compare'](_0x5bac92['id'],_0x49a835?_0x49a835['id']:null,!0x0),_0x3ac73b['unbind']('isEnabled'),_0x3ac73b['isEnabled']=!0x1,_0x3ac73b['compare']=_0x333146,void(_0x3ac73b['_getDiff']=_0x333146);}if(_0x8a0de6('RevisionTracker')){const _0x4f2c7f=_0x43a0b2('RevisionTracker');_0x4f2c7f['unbind']('isEnabled'),_0x4f2c7f['isEnabled']=!0x1,_0x4f2c7f['update']=_0x333146,_0x4f2c7f['saveRevision']=_0x333146;}_0x56e427['model']['change']=_0x333146,_0x56e427['model']['enqueueChange']=_0x333146,_0x56e427['enableReadOnlyMode']('model');}function _0x5c1703(){return _0x8a0de6('WebSocketGateway')&&'connected'==_0x43a0b2('WebSocketGateway')['state'];}function _0x1ac10f(){return _0x8a0de6('RevisionViewerIntegration');}function _0x24696c(){return _0x8a0de6('TrackChangesDataGetter');}function _0x1f096f(_0x17ac49){const _0x1e39f0=_0x1c9482();_0x56e427[_0x1e39f0]='revisionHistoryLicenseKey'+_0x17ac49,_0x17ac49['endsWith']('Limit')&&(window[_0x1c9482()]=_0x316ef8),'Valid'!=_0x17ac49&&_0x106f13();}function _0x1c9482(){const _0x555c88=window['String'](window['performance']['now']())['replace']('.','');let _0x4dc4f9='v';for(let _0x89e78d=0x0;_0x89e78d<_0x555c88['length'];_0x89e78d+=0x2){let _0x1fe753=window['parseInt'](_0x555c88['substring'](_0x89e78d,_0x89e78d+0x2));_0x1fe753>=0x3e&&(_0x1fe753-=0x3e),_0x4dc4f9+=_0x3a8cce[_0x1fe753];}return _0x4dc4f9;}function _0x3eb31f(){const _0x4fa34d=_0x461742['split']('.');if(0x3!=_0x4fa34d['length'])return null;return _0x460d7b(_0x4fa34d[0x1]);function _0x460d7b(_0x2e4017){const _0x53bb1a=_0x10ee65(_0x2e4017);return _0x53bb1a&&_0x2fa2f8()?_0x53bb1a:null;function _0x2fa2f8(){const _0x2c1709=_0x53bb1a['jti'],_0x3986e4=window['parseInt'](_0x2c1709['substring'](_0x2c1709['length']-0x8),0x10),_0x2805fc={..._0x53bb1a,'jti':_0x2c1709['substring'](0x0,_0x2c1709['length']-0x8)};return delete _0x2805fc['vc'],_0x58bc68(_0x2805fc)==_0x3986e4;}}}async function _0x1a0c3e(){let _0x278111=!0x0;try{const [_0x2a7970,_0x4ab4d5,_0x157676]=_0x461742['split']('.');return _0x4a108a(_0x2a7970),await _0x6705bf(_0x2a7970,_0x4ab4d5,_0x157676),_0x278111;}catch{return!0x1;}function _0x4a108a(_0x2563cb){const _0x1d18cd=_0x10ee65(_0x2563cb);_0x1d18cd&&'ES256'==_0x1d18cd['alg']||(_0x278111=!0x1);}async function _0x6705bf(_0xd20c1b,_0x372159,_0x2ba61b){const _0xf0aa95=window['Uint8Array']['from'](_0x49fa8f(_0x2ba61b),_0x5d93ba=>_0x5d93ba['charCodeAt'](0x0)),_0x44d6f5=new window['TextEncoder']()['encode'](_0xd20c1b+'.'+_0x372159),_0x55a4c6=window['crypto']['subtle'];if(!_0x55a4c6)return;const _0x1ed171=await _0x55a4c6['importKey']('jwk',_0x45ffbd,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x55a4c6['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x1ed171,_0xf0aa95,_0x44d6f5)||(_0x278111=!0x1);}}function _0x10ee65(_0x1bc92a){return _0x1bc92a['startsWith']('ey')?JSON['parse'](_0x49fa8f(_0x1bc92a)):null;}function _0x49fa8f(_0x5f4511){return window['atob'](_0x5f4511['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x58bc68(_0x371d35){let _0x39693f=0x1505;function _0x31023f(_0x3501ee){for(let _0x1e178d=0x0;_0x1e178d<_0x3501ee['length'];_0x1e178d++){const _0x82f256=_0x3501ee['charCodeAt'](_0x1e178d);_0x39693f=(_0x39693f<<0x5)+_0x39693f+_0x82f256,_0x39693f&=_0x39693f;}}function _0x2c288b(_0x375d5f){Array['isArray'](_0x375d5f)?_0x375d5f['forEach'](_0x2c288b):_0x375d5f&&'object'==typeof _0x375d5f?Object['entries'](_0x375d5f)['sort']()['forEach'](([_0x12d543,_0x13ff05])=>{_0x31023f(_0x12d543),_0x2c288b(_0x13ff05);}):_0x31023f(window['String'](_0x375d5f));}return _0x2c288b(_0x371d35),_0x39693f>>>0x0;}function _0x24778e(_0x2ac054){return _0x2ac054['toString'](0x10)['padStart'](0x8,'0');}function _0x13a69b(_0x5f0a56){return _0x5f0a56['split']('')['reverse']()['join']('');}function _0x8a0de6(_0x5d4cbd){return _0x56e427['plugins']['has'](_0x5d4cbd);}function _0x43a0b2(_0x303793){return _0x56e427['plugins']['get'](_0x303793);}function _0x333146(){}_0x1f096f(await _0x1d9271());}(this);}createRevision(_0x4974b0){const _0x2c82ec=this['editor']['plugins']['get']('Users');return new gt({'id':_0x4974b0['id'],'name':_0x4974b0['name'],'creator':_0x4974b0['creatorId']?_0x2c82ec['getUser'](_0x4974b0['creatorId']):null,'diffData':_0x4974b0['diffData']||_0x4974b0['data'],'authors':_0x4974b0['authorsIds']['map'](_0x1c915f=>_0x2c82ec['getUser'](_0x1c915f)),'createdAt':new Date(_0x4974b0['createdAt']),'attributes':_0x4974b0['attributes'],'fromVersion':_0x4974b0['fromVersion'],'toVersion':_0x4974b0['toVersion']});}['addRevision'](_0x2436ee,_0x56b6b1=0x0){this['_revisions']['add'](_0x2436ee,_0x56b6b1);}getRevision(_0x366eb4){return this['_revisions']['get'](_0x366eb4);}getRevisions(_0x2b2603={'toJSON':!0x1}){const _0x774d4a=Array['from'](this['_revisions']);return _0x774d4a['reverse'](),_0x2b2603['toJSON']?_0x774d4a['map'](_0x3aa120=>_0x3aa120['toJSON']()):_0x774d4a;}getIndex(_0x233fba){return this['_revisions']['getIndex'](_0x233fba);}getEarlierVisibleRevision(_0x237c81){const [,_0x27d9f1]=this['getRevisionsIterator'](_0x237c81,{'direction':'earlier'});return _0x27d9f1;}getLaterVisibleRevision(_0x5b8dd2){const [,_0x8d3690]=this['getRevisionsIterator'](_0x5b8dd2,{'direction':'later'});return _0x8d3690;}getRevisionsInDiff(_0x461bdb){const _0x248ec8=[];for(const _0x354e49 of this['getRevisionsIterator'](_0x461bdb['newRevisionId']))if(_0x248ec8['push'](_0x354e49),_0x354e49['id']===_0x461bdb['oldRevisionId'])break;return _0x248ec8;}*getRevisionsIterator(_0x33bd82,{direction:_0x2c7a2f='earlier',filter:_0x5d05f0=()=>!0x0}={}){const _0x41e705='earlier'===_0x2c7a2f?0x1:-0x1;let _0xf78a4c=this['_revisions']['get'](_0x33bd82),_0x39f42e=this['getIndex'](_0xf78a4c);for(yield _0xf78a4c;_0xf78a4c;){if(_0x39f42e+=_0x41e705,_0xf78a4c=this['getRevision'](_0x39f42e),!_0xf78a4c)return;_0x5d05f0(_0xf78a4c)&&(yield _0xf78a4c);}}},wt=class extends _0x57c795{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2fdda5,'c'],[_0x4525a0,'a'],[_0x3cc4cb,'e'],[_0x85adaa,'r'],[_0x49300b,'u']]);_typeCharToViewClass=new Map([['c',_0x2fdda5],['a',_0x4525a0],['e',_0x3cc4cb],['r',_0x85adaa],['u',_0x49300b]]);async loadRevisionData(_0x1a573f,_0x1b8ddd){if(_0x1a573f['diffData']||!_0x1b8ddd)return;const _0x53158d=this['editor']['config']['get']('collaboration.channelId');_0x1a573f['diffData']=(await _0x1b8ddd['getRevision']({'channelId':_0x53158d,'revisionId':_0x1a573f['id']}))['diffData'];}getRevisionDocumentData(_0x571ec2){const _0xbdce3b={};for(const _0x1390cf in _0x571ec2['diffData']){if(_0x571ec2['diffData'][_0x1390cf]['attachChange']&&!_0x571ec2['diffData'][_0x1390cf]['attachChange']['isAttached'])continue;const _0x3bbb16=this['_removeRevisionMarkers'](JSON['parse'](_0x571ec2['diffData'][_0x1390cf]['insertions'])),_0x1a8287=this['editor']['editing']['view']['document'],_0x35db5e=new _0x3b5424(_0x1a8287,_0x3bbb16['map'](_0x548fb7=>this['_getViewFromDiffObj'](_0x548fb7,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0xbdce3b[_0x1390cf]=this['editor']['data']['processor']['toData'](_0x35db5e),this['editor']['data']['processor']['useFillerType']('default');}return _0xbdce3b;}getRevisionRootsAttributes(_0x8a0abf){const _0x70f1f9={};for(const _0x50c2d0 in _0x8a0abf['diffData'])_0x8a0abf['diffData'][_0x50c2d0]['attachChange']&&!_0x8a0abf['diffData'][_0x50c2d0]['attachChange']['isAttached']||(_0x70f1f9[_0x50c2d0]=_0x8a0abf['diffData'][_0x50c2d0]['attributesAfter']||{});return _0x70f1f9;}getRevisionRootsModelElements(_0x139dc8){const _0x1ad5bc={};for(const _0x4b8375 in _0x139dc8['diffData']){if(_0x139dc8['diffData'][_0x4b8375]['attachChange']&&!_0x139dc8['diffData'][_0x4b8375]['attachChange']['isAttached'])continue;const _0xb522ec=_0x139dc8['diffData'][_0x4b8375]['rootElementName'];_0xb522ec&&(_0x1ad5bc[_0x4b8375]=_0xb522ec);}return _0x1ad5bc;}_getTypeCharForViewElement(_0x54a31c){return this['_viewClassToTypeChar']['get'](_0x54a31c['constructor']);}_getViewFromDiffObj(_0x31b2ee,_0x3ce787){const _0xe3a86e=this['editor']['editing']['view']['document'];if('string'==typeof _0x31b2ee)return new _0x5d7152(_0xe3a86e,_0x31b2ee);{let _0x2654ba,_0x17f99b;_0x17f99b='u'==_0x31b2ee['type']||'r'==_0x31b2ee['type']?[]:_0x31b2ee['children']['map'](_0x2fd176=>this['_getViewFromDiffObj'](_0x2fd176,_0x3ce787));const _0x353197=this['_typeCharToViewClass']['get'](_0x31b2ee['type'])||_0x17ffd0,_0x47b992=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2654ba=new _0x353197(_0xe3a86e,_0x31b2ee['name'],_0x31b2ee['attributes'],_0x17f99b),'u'==_0x31b2ee['type']&&_0x31b2ee['children'][0x0]){const _0x22602a=_0x31b2ee['children'][0x0];if(_0x2654ba['render']=function(_0x6e3bdf){const _0x56fb02=_0x6e3bdf['createElement']('div');return _0x56fb02['innerHTML']=_0x22602a,_0x56fb02['childNodes'][0x0];},_0x3ce787){const _0x57b23f=new _0x3b5424(_0xe3a86e);_0x57b23f['_appendChild'](_0x2654ba);const _0x4b9a31=Array['from'](_0x47b992['viewChildrenToDom'](_0x57b23f,{'bind':!0x1})),_0x4b558d=_0x47b992['domDocument']['createElement']('div');_0x4b558d['append'](..._0x4b9a31),_0x2654ba=Array['from'](_0x47b992['domChildrenToView'](_0x4b558d))[0x0];}}else{if('r'==_0x31b2ee['type']&&_0x31b2ee['children'][0x0]){const _0x550beb=_0x31b2ee['children'][0x0];if(_0x2654ba['render']=function(_0x1bfd04){_0x1bfd04['innerHTML']=_0x550beb;},_0x3ce787){const _0xfd9f0=new _0x3b5424(_0xe3a86e);_0xfd9f0['_appendChild'](_0x2654ba);const _0x4944d7=Array['from'](_0x47b992['viewChildrenToDom'](_0xfd9f0,{'bind':!0x1})),_0x1f3aee=_0x47b992['domDocument']['createElement']('div');_0x1f3aee['append'](..._0x4944d7);const _0x55c011=Array['from'](_0x47b992['domChildrenToView'](_0x1f3aee));_0x55c011['length']>0x1?_0x2654ba['_appendChild'](_0x55c011):_0x2654ba=_0x55c011[0x0];}}}if(_0x31b2ee['customProperties']){for(const [_0x29d12d,_0x2d138f]of _0x31b2ee['customProperties'])_0x2654ba['_setCustomProperty'](_0x29d12d,_0x2d138f);}const _0x25ee4a=void 0x0===_0x31b2ee['fillerOffset']?null:_0x31b2ee['fillerOffset'];return null!==_0x25ee4a&&(_0x2654ba['getFillerOffset']=()=>_0x25ee4a),_0x2654ba;}}_makeModelFromViewString(_0x25ba26,_0x586936){const _0x274064=JSON['parse'](_0x25ba26),_0x4136f9=this['editor']['editing']['view']['document'],_0x47af0b=new _0x3b5424(_0x4136f9,_0x274064['map'](_0x40e7ea=>this['_getViewFromDiffObj'](_0x40e7ea,!0x0))),_0x1eec51=this['editor']['data']['toModel'](_0x47af0b,_0x586936);return _0x1eec51['name']=_0x586936,_0x1eec51;}['_removeRevisionMarkers'](_0x328106){return(_0x328106=_0x328106['filter'](_0x22473a=>!_0x22473a['name']||'revision-start'!==_0x22473a['name']&&'revision-end'!==_0x22473a['name']))['forEach'](_0xdf8ffd=>{'string'!=typeof _0xdf8ffd&&(_0xdf8ffd['children']=this['_removeRevisionMarkers'](_0xdf8ffd['children']),_0xdf8ffd['attributes']=_0xdf8ffd['attributes']['filter'](_0x23f146=>!_0x23f146[0x0]['startsWith']('data-revision-')));}),_0x328106;}};function pt(_0xebccf,_0x190423,_0x248b53){const t=_0xebccf['t'];switch(_0x190423){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'},_0x248b53);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x248b53);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 _0x57c795{['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[_0x3e15a4,mt,wt,_0x488f20];}constructor(_0x50968a){super(_0x50968a),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 _0x52a409=_0xb49d28();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x52a409},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 _0x1fc8e2=this['repository']['getRevision'](0x0),_0x3fec8b=_0x1fc8e2&&null===_0x1fc8e2['creator']?_0x1fc8e2:null;if(this['_continueCurrentRevision']=!!_0x3fec8b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x150335=this['_source']['getCurrentRevisionId'](),_0x122336=this['repository']['getRevision'](_0x150335);if(_0x122336)this['_startingVersion']=_0x122336['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x382d0d=this['_source']['history']['_operations']['find'](_0x3a811c=>!_0x3a811c['_isInit']),_0x11bd42=_0x382d0d?_0x382d0d['baseVersion']:this['_source']['history']['version'];_0x1fc8e2?(_0x1fc8e2['toVersion']<_0x11bd42&&_0x1fc8e2['_update']({'toVersion':_0x11bd42}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x3fec8b['id'],this['_startingVersion']=_0x3fec8b['fromVersion']):(this['_startingVersion']=_0x1fc8e2['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x11bd42,this['_continueCurrentRevision']=!0x1);}}else _0x3fec8b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x3fec8b['toVersion'],this['editor']['model']['document']['history']['version']),_0x3fec8b['fromVersion']===_0x3fec8b['toVersion']?(0x0!==_0x3fec8b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x3fec8b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x3fec8b['id'],this['_startingVersion']=_0x3fec8b['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',_0x563b4e=>!_0x563b4e),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x47298a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4c4af5;for(const _0x2b28f7 in _0x47298a){const _0x4b4a5f=_0x2b28f7,_0x17ffc4=_0x47298a[_0x4b4a5f];if('revisionHistoryLicenseKeyValid'==_0x17ffc4||'revisionHistoryLicenseKeyInvalid'==_0x17ffc4||'revisionHistoryLicenseKeyExpired'==_0x17ffc4||'revisionHistoryLicenseKeyDomainLimit'==_0x17ffc4||'revisionHistoryLicenseKeyNotAllowed'==_0x17ffc4||'revisionHistoryLicenseKeyEvaluationLimit'==_0x17ffc4||'revisionHistoryLicenseKeyUsageLimit'==_0x17ffc4){delete _0x47298a[_0x4b4a5f],_0x4c4af5=_0x17ffc4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4c4af5&&_0x47298a['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4c4af5&&_0x47298a['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4c4af5&&_0x47298a['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4c4af5&&_0x47298a['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4c4af5&&_0x47298a['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4c4af5&&_0x47298a['_showLicenseError']('usageLimit');},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x5a437b=this['repository']['getRevision'](0x0),_0x1b25c7=await this['getRevisionDocumentData'](_0x5a437b),_0x1c030f=await this['getRevisionRootsAttributes'](_0x5a437b),_0x482223=this['_utils']['getRevisionRootsModelElements'](_0x5a437b);this['_replaceEditorDataWithRevisionData'](_0x1b25c7,_0x1c030f,_0x482223);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x451dbc){this['_source']=_0x451dbc;}async update(){const _0x22cae1=await this['_source']['getLatestVersion']();if(_0x22cae1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x384d9c=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x22cae1});_0x384d9c['authors']=_0x384d9c['authorsIds']['map'](_0x396529=>this['editor']['plugins']['get']('Users')['getUser'](_0x396529)),this['currentRevision']['_update'](_0x384d9c);}}async['saveRevision'](_0x3e61f4={},_0x564c33=null){const _0x40d76d=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x564c33>this['currentRevision']['toVersion']&&(_0x564c33=null),null===_0x564c33&&(_0x564c33=await this['_source']['getLatestVersion']());const _0x409f52=this['_getFromVersion'](_0x564c33),_0x458960=this['buildRevisionData']({'from':_0x409f52,'to':_0x564c33});if(this['currentRevision']['toVersion']<_0x564c33){const _0x51664b=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x564c33,'to':_0x564c33});_0x51664b['authors']=[],_0x51664b['authorsIds']=[],_0x51664b['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x51664b,!0x0),delete _0x51664b['authors'],_0x40d76d['push'](_0x51664b);}_0x3e61f4['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x3e61f4['name']=_0x3e61f4['name']||null,_0x3e61f4['id']=_0x3e61f4['id']||_0xb49d28(),_0x3e61f4={..._0x3e61f4,..._0x458960};const _0x58ecc8=this['addRevisionData'](_0x3e61f4);_0x40d76d['push'](_0x3e61f4);const _0x5050f9=this['repository']['getIndex'](_0x58ecc8);if(0x0!==_0x5050f9){const _0x360a68=this['repository']['getRevision'](_0x5050f9-0x1);if(_0x360a68['fromVersion']!==_0x564c33){const _0x420510=this['_revisionDataBuilder']['getData'](_0x564c33,_0x360a68['toVersion']),_0x587dca={'id':_0x360a68['id'],'diffData':_0x420510['diffData'],'authorsIds':_0x420510['authorsIds'],'authors':_0x420510['authorsIds']['map'](_0x2d7e7d=>this['editor']['plugins']['get']('Users')['getUser'](_0x2d7e7d)),'fromVersion':_0x564c33};_0x360a68===this['currentRevision']&&(_0x587dca['createdAt']=new Date(_0x3e61f4['createdAt']['getTime']()+0xa)),_0x360a68['_update'](_0x587dca,!0x0),delete _0x587dca['authors'],_0x40d76d['push'](_0x587dca);}}if(this['adapter']){for(const _0x948441 of _0x40d76d)this['_bufferUpdate'](_0x948441['id'],_0x948441,!0x0);this['sendBufferedUpdates']();}return _0x58ecc8;}addRevisionData(_0x35b8fa){const _0x17ef1d=this['repository']['createRevision'](_0x35b8fa);return this['adapter']&&_0x17ef1d['on']('_update',(_0x19a07c,_0x2f7a5b,_0x1fe844)=>{_0x1fe844||(this['_bufferUpdate'](_0x2f7a5b['id'],_0x2f7a5b,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x17ef1d,this['_findInsertionIndex'](_0x17ef1d)),_0x17ef1d;}async getRevisionDocumentData(_0x3231ec){return await this['_utils']['loadRevisionData'](_0x3231ec,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3231ec);}async getRevisionRootsAttributes(_0x25b01e){return await this['_utils']['loadRevisionData'](_0x25b01e,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x25b01e);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x403956=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x2440a0=0x0;_0x2440a0<_0x403956['length'];_0x2440a0++){const _0xf213c0=_0x403956[_0x2440a0];let _0x471c55=!0x1;for(const _0x2bcd45 of Object['keys'](_0xf213c0))void 0x0===_0xf213c0[_0x2bcd45]?delete _0xf213c0[_0x2bcd45]:'id'!==_0x2bcd45&&(_0x471c55=!0x0);_0x471c55||(_0x403956[_0x2440a0]=null);}if(_0x403956=_0x403956['filter'](_0x19d0f1=>null!==_0x19d0f1),!_0x403956['length'])return;for(let _0x2ca214=0x0;_0x2ca214<_0x403956['length'];_0x2ca214++){const _0x5bffe5=_0x403956[_0x2ca214];void 0x0!==_0x5bffe5['fromVersion']&&void 0x0===_0x5bffe5['toVersion']&&(_0x5bffe5['toVersion']=this['repository']['getRevision'](_0x5bffe5['id'])['toVersion']),void 0x0!==_0x5bffe5['toVersion']&&void 0x0===_0x5bffe5['fromVersion']&&(_0x5bffe5['fromVersion']=this['repository']['getRevision'](_0x5bffe5['id'])['fromVersion']);}const _0xefafcc=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x403956,_0xefafcc)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x355497=>{if(_0x355497){for(const _0x21072c of _0x355497)this['setRevisionData']({'id':_0x21072c['id'],'createdAt':_0x21072c['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}buildRevisionData({revision:_0x393bd2=null,from:_0x57075d=null,to:_0x39c59b=null}){_0x57075d=null!==_0x57075d?_0x57075d:_0x393bd2['fromVersion'],_0x39c59b=null!==_0x39c59b?_0x39c59b:_0x393bd2['toVersion'];const _0xd635b7=this['_revisionDataBuilder']['getData'](_0x57075d,_0x39c59b),_0x406fe6={'diffData':_0xd635b7['diffData'],'authorsIds':_0xd635b7['authorsIds'],'fromVersion':_0x57075d,'toVersion':_0x39c59b};if(!_0x393bd2||_0x39c59b!==_0x393bd2['toVersion']){const _0x43c17f=_0x39c59b-0x1,_0x3cecc0=this['_source']['history']['getOperation'](_0x43c17f);_0x406fe6['createdAt']=_0x3cecc0&&_0x3cecc0['createdAt']||new Date();}if(this['_loadedStateData']&&_0x57075d===this['_loadedStateData']['fromVersion']){for(const _0x40e0e5 of this['_loadedStateData']['authors'])_0x406fe6['authorsIds']['includes'](_0x40e0e5['id'])||_0x406fe6['authorsIds']['push'](_0x40e0e5['id']);}return _0x406fe6;}_bufferUpdate(_0x10be0f,_0x511bf5,_0x46327a){if(this['_bufferedUpdates']['has'](_0x10be0f)){const _0x26d208=this['_bufferedUpdates']['get'](_0x10be0f);_0x511bf5=_0x46327a?{..._0x26d208,..._0x511bf5}:{..._0x511bf5,..._0x26d208};}this['_bufferedUpdates']['set'](_0x10be0f,_0x511bf5);}setRevisionData(_0x3a9b21){const _0x2ee026=this['repository']['getRevision'](_0x3a9b21['id']);if(_0x3a9b21['createdAt']&&(_0x3a9b21['createdAt']=new Date(_0x3a9b21['createdAt'])),_0x3a9b21['authorsIds']){const _0x42490b=this['editor']['plugins']['get']('Users');_0x3a9b21['authors']=_0x3a9b21['authorsIds']['map'](_0x3d07a7=>_0x42490b['getUser'](_0x3d07a7));}_0x2ee026['_update'](_0x3a9b21,!0x0);}_createInitialRevision(_0x3b23b2){const _0xf82a68=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0xf82a68)this['_initialRevisionId']=_0xf82a68['id'];else{const _0x3cccab=!this['editor']['model']['document']['roots']['find'](_0x3953cb=>this['editor']['model']['hasContent'](_0x3953cb)),_0x464854=this['editor']['plugins']['get']('Users')['me']['id'],_0x5f3e16=pt(this['editor']['locale'],_0x3cccab?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x3b23b2,'to':_0x3b23b2,'id':this['_initialRevisionId'],'name':_0x5f3e16,'creatorId':_0x464854});}}_createCurrentRevision(_0x59126a){const _0x64feb=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x64feb),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x59126a,'to':_0x59126a,'id':_0x64feb,'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(_0x4160cd,_0x3b555c,_0x43148a){const _0x20c33f={},_0x40d667={},_0x55d273={},_0x3de260=this['editor']['config']['get']('roots')||{};for(const [_0xdbb740,_0x191b05]of Object['entries'](_0x3de260))_0x191b05['lazyLoad']||(_0x20c33f[_0xdbb740]=_0x191b05['initialData']??'',_0x40d667[_0xdbb740]=_0x191b05['modelAttributes']||{},_0x191b05['modelElement']&&(_0x55d273[_0xdbb740]=_0x191b05['modelElement']));for(const _0x4d6882 of this['editor']['model']['document']['getRootNames']())_0x20c33f[_0x4d6882]??='',_0x40d667[_0x4d6882]??={};let _0x5f2fc9=!0x1;const _0x454c56=Object['keys'](_0x20c33f),_0x4b8e69=Object['keys'](_0x4160cd);for(const _0xdce7ee of _0x454c56){if(_0x20c33f[_0xdce7ee]!==_0x4160cd[_0xdce7ee]&&''!==_0x20c33f[_0xdce7ee]['trim']()){_0x5f2fc9=!0x0;break;}if(!_0x273684(_0x40d667[_0xdce7ee],_0x3b555c[_0xdce7ee])&&Object['keys'](_0x40d667[_0xdce7ee])['length']>0x0){_0x5f2fc9=!0x0;break;}const _0x4838c0=_0x55d273[_0xdce7ee],_0x4c05f4=_0x43148a[_0xdce7ee];if(_0x4838c0&&_0x4c05f4&&_0x4838c0!==_0x4c05f4){_0x5f2fc9=!0x0;break;}}_0x5f2fc9||(_0x5f2fc9=_0x4b8e69['some'](_0x13c669=>!this['editor']['model']['document']['getRoot'](_0x13c669))),_0x5f2fc9&&_0x48ed8f('editor-initial-data-replaced-with-revision-data',{'editorData':_0x20c33f,'editorRootsAttributes':_0x40d667,'editorRootsModelElements':_0x55d273,'revisionData':_0x4160cd,'revisionRootsAttributes':_0x3b555c,'revisionRootsModelElements':_0x43148a});for(const [_0x3adeeb,_0x3e313d]of Object['entries'](_0x4160cd))this['editor']['config']['set']('roots.'+_0x3adeeb+'.initialData',_0x3e313d);for(const [_0x26e07e,_0x89c536]of Object['entries'](_0x3b555c))this['editor']['config']['set']('roots.'+_0x26e07e+'.modelAttributes',_0x89c536);const _0x878068=this['editor']['model']['document'];for(const [_0x431e19,_0x2cc8e6]of Object['entries'](_0x43148a)){this['editor']['config']['set']('roots.'+_0x431e19+'.modelElement',_0x2cc8e6);const _0x191fee=_0x878068['getRoot'](_0x431e19);_0x191fee&&_0x191fee['name']!==_0x2cc8e6&&(_0x878068['roots']['remove'](_0x431e19),_0x878068['createRoot'](_0x2cc8e6,_0x431e19));}}_addPendingAction(){if(!this['_pendingAction']){const _0xfd3504=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0xfd3504['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0xb3b86d){const _0x3cb7b1=this['repository']['getRevisions']();_0x3cb7b1['reverse']();let _0x19cf3c=0x0;for(;_0x19cf3c<_0x3cb7b1['length'];){const _0x1e8ba2=_0x3cb7b1[_0x19cf3c];if(_0x1e8ba2===this['currentRevision']){_0x19cf3c++;continue;}if(_0x1e8ba2['id']===this['_initialRevisionId'])break;const _0x2e5dbd=_0xb3b86d['toVersion']-_0x1e8ba2['toVersion']||_0xb3b86d['fromVersion']-_0x1e8ba2['fromVersion'];if(_0x2e5dbd>0x0)break;if(_0x2e5dbd<0x0)_0x19cf3c++;else{if(!_0xb3b86d['creator']&&_0x1e8ba2['creator'])break;if(_0x1e8ba2['creator']||!_0xb3b86d['creator']){if(_0xb3b86d['createdAt']>_0x1e8ba2['createdAt'])break;_0x19cf3c++;}else _0x19cf3c++;}}return _0x19cf3c;}_getFromVersion(_0x52e2f2){const _0x1b731c=this['repository']['getRevisions']();_0x1b731c['reverse'](),_0x1b731c['shift']();const _0x1c3ae9=_0x1b731c['find'](_0x5b2e8f=>_0x5b2e8f['toVersion']<=_0x52e2f2)['toVersion'];return _0x1c3ae9<this['_startingVersion']?this['_startingVersion']:_0x1c3ae9;}['_makeRevision']({name:_0x2c6c3e,from:_0x4dae6b,to:_0x3360ba,creatorId:_0x5ca308,id:_0x1eb8db}){const _0x4fb26a=this['buildRevisionData']({'from':_0x4dae6b,'to':_0x3360ba});_0x4fb26a['name']=_0x2c6c3e,_0x4fb26a['creatorId']=_0x5ca308,_0x4fb26a['id']=_0x1eb8db;const _0x483bfe=this['addRevisionData'](_0x4fb26a);return this['adapter']&&this['_bufferUpdate'](_0x4fb26a['id'],_0x4fb26a,!0x0),_0x483bfe;}_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(_0x275b2f){this['editor']=_0x275b2f,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(_0x12be92){this['source']=_0x12be92;const _0x3fb6a8=new Map(),_0x5a34f8=new Map(),_0x1fbe69=this['editor']['model']['document']['roots']['map'](_0x341195=>_0x341195['rootName']);for(const _0x91075b of _0x1fbe69){const _0x5a2a14=this['editor']['model']['document']['getRoot'](_0x91075b),_0x1a8efb=bt(_0x5a2a14);_0x3fb6a8['set'](_0x91075b,_0x1a8efb),_0x5a34f8['set'](_0x91075b,Object['fromEntries'](_0x5a2a14['getAttributes']()));}const _0x2f8954=Array['from'](this['editor']['model']['markers'])['map'](_0x4bb85a=>[_0x4bb85a['name'],_0x4bb85a['getRange']()]),_0x58ab78=this['source']['version'];this['_saveMetaData'](_0x58ab78,_0x3fb6a8,_0x2f8954,_0x5a34f8),this['_startingRevisionId']=this['_revisionId'];const _0x3e0e83=new Map(),_0x15561b=new Map();for(const _0x5b648a of _0x1fbe69){const _0xfcef9f=Rt(_0x5b648a,this['editor']['model']['document']['getRoot'](_0x5b648a)['name']);_0x3e0e83['set'](_0x5b648a,_0xfcef9f),_0x15561b['set'](_0x5b648a,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3e0e83,[],_0x15561b);}getData(_0x2a1567,_0x2a1801){if(this['_lastFrom']===_0x2a1567&&this['_lastTo']<=_0x2a1801)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2a1801,!0x0);else{if(!this['_savedMetaData']['has'](_0x2a1567)){const _0x14b172=this['_getPreviousFrom'](_0x2a1567);this['_calculateMetaData'](_0x14b172,_0x2a1567,!0x1);}this['_calculateMetaData'](_0x2a1567,_0x2a1801,!0x0);}return this['_lastFrom']=_0x2a1567,this['_lastTo']=_0x2a1801,this['_getState']();}loadState(_0x53f4de){if(!this['_savedMetaData']['has'](_0x53f4de['fromVersion'])){const _0x340717=this['_getPreviousFrom'](_0x53f4de['fromVersion']);this['_calculateMetaData'](_0x340717,_0x53f4de['fromVersion'],!0x1);}this['_calculateMetaData'](_0x53f4de['fromVersion'],_0x53f4de['toVersion'],!0x1);const _0x3cd06d=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x53f4de['fromVersion'],this['_lastTo']=_0x53f4de['toVersion'];for(const _0x490db3 in _0x53f4de['diffData']){const _0x4f9332=_0x53f4de['diffData'][_0x490db3]['attachChange'],_0x36af83=_0x38b022(_0x53f4de['diffData'][_0x490db3]['attributesBefore'])||{},_0x4c229b=_0x53f4de['diffData'][_0x490db3],_0x34b6a7=_0x3cd06d['_makeModelFromViewString'](_0x4c229b['deletions'],_0x4c229b['rootElementName']||'$root');_0x34b6a7['rootName']=_0x490db3,_0x34b6a7['_isAttached']=!_0x4f9332||!_0x4f9332['isAttached'],_0x34b6a7['isAttached']=()=>_0x34b6a7['_isAttached'],this['_baseRoots']['set'](_0x490db3,_0x34b6a7),this['_baseRootsAttributes']['set'](_0x490db3,_0x36af83),_0x4f9332&&this['_touchedRoots']['set'](_0x490db3,_0x4f9332);const _0x2f23fe=this['_makeIdsRoot'](_0x34b6a7);this['_baseIdsRoots']['set'](_0x490db3,_0x2f23fe);for(const [_0x3dc04f,_0x3da8ba]of _0x34b6a7['markers']){if(!_0x3dc04f['startsWith']('revision:'))continue;const _0x2cbd8e=_0x3dc04f['split'](':')[0x2];for(const _0x51e77d of _0x3da8ba['getWalker']({'singleCharacters':!0x0})){const _0x14d0d3=this['_getVidAttributeName'](_0x51e77d),_0x25c0b1='elementEnd'==_0x51e77d['type']?_0x51e77d['previousPosition']['path']['slice'](0x0,-0x1):_0x51e77d['previousPosition']['path'],_0x434362=_0x2f23fe['getNodeByPath'](_0x25c0b1)['getAttribute'](_0x14d0d3);this['_touched']['set'](_0x434362,{'userId':_0x2cbd8e});}_0x34b6a7['markers']['delete'](_0x3dc04f);}}this['_startingRevisionId']=this['_revisionId'];const _0x39d04e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3058d3=>!this['_touched']['has'](_0x3058d3));let _0x1fb79c=0x0;const _0x2d87ad=new Map();for(const _0x1a84d4 in _0x53f4de['diffData']){const _0xf9fc82=_0x53f4de['diffData'][_0x1a84d4]['attachChange'],_0x1e0e4e=_0x38b022(_0x53f4de['diffData'][_0x1a84d4]['attributesAfter'])||{},_0x5da782=_0x53f4de['diffData'][_0x1a84d4],_0x394867=_0x3cd06d['_makeModelFromViewString'](_0x5da782['insertions'],_0x5da782['rootElementName']||'$root');_0x394867['rootName']=_0x1a84d4,_0x394867['_isAttached']=!_0xf9fc82||_0xf9fc82['isAttached'],_0x394867['isAttached']=()=>_0x394867['_isAttached'],this['_diffRoots']['set'](_0x1a84d4,_0x394867),this['_diffRootsAttributes']['set'](_0x1a84d4,_0x1e0e4e);const _0x3027c5=this['_makeIdsRoot'](_0x394867,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x1a84d4,_0x3027c5),_0x2d87ad['set'](_0x1a84d4,_0x394867['isAttached']()?_0x1e0e4e:{});for(const [_0xf7c159,_0x531ceb]of _0x394867['markers']){if(!_0xf7c159['startsWith']('revision:'))continue;const _0x33758a=_0xf7c159['split'](':')[0x2];for(const _0xfa74d1 of _0x531ceb['getWalker']({'singleCharacters':!0x0})){const _0x3abeb8=this['_getVidAttributeName'](_0xfa74d1),_0x2f89e5=this['_revisionId']++,_0x53a4e5='elementEnd'==_0xfa74d1['type']?_0xfa74d1['previousPosition']['path']['slice'](0x0,-0x1):_0xfa74d1['previousPosition']['path'];_0x3027c5['getNodeByPath'](_0x53a4e5)['_setAttribute'](_0x3abeb8,_0x2f89e5),this['_touched']['set'](_0x2f89e5,{'userId':_0x33758a});}_0x394867['markers']['delete'](_0xf7c159);}for(const _0x5c12a3 of this['editor']['model']['createRangeIn'](_0x394867)['getWalker']({'singleCharacters':!0x0})){const _0x538802=this['_getVidAttributeName'](_0x5c12a3),_0x362252='elementEnd'==_0x5c12a3['type']?_0x5c12a3['previousPosition']['path']['slice'](0x0,-0x1):_0x5c12a3['previousPosition']['path'],_0x2e0147=_0x3027c5['getNodeByPath'](_0x362252);_0x2e0147['getAttribute'](_0x538802)>0x0||_0x2e0147['_setAttribute'](_0x538802,_0x39d04e[_0x1fb79c++]);}for(const [_0x54f9ea,_0x1c7b95]of _0x394867['markers'])_0x54f9ea['startsWith']('revision:')||this['_markers']['set'](_0x54f9ea,_0x1c7b95);}const {roots:_0x532b10}=this['_savedMetaData']['get'](_0x53f4de['fromVersion']),{roots:_0x478281}=this['_savedMetaData']['get'](_0x53f4de['toVersion']),_0x4d7a15=bt(_0x532b10['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x4d7a15),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4d7a15,Number['NEGATIVE_INFINITY']));const _0x56a0f2=bt(_0x478281['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x56a0f2),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x56a0f2));const _0x118bba=Array['from'](this['_diffRoots'])['map'](([_0x2f48b9,_0x43e0bd])=>[_0x2f48b9,bt(_0x43e0bd)]);this['_saveMetaData'](this['_lastTo'],_0x118bba,this['_markers'],_0x2d87ad);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x2ca722,_0x142a45,_0x2af6fa,_0x4e224b){const _0xa6c3ec=new Map(_0x142a45),_0x35e649=new Map(_0x38b022(_0x4e224b)),_0x17939f=new Map();for(const [_0x541ba5,_0x1f7adc]of _0x2af6fa)_0x17939f['set'](_0x541ba5,{'start':_0x1f7adc['start']['clone'](),'end':_0x1f7adc['end']['clone'](),'rootName':_0x1f7adc['root']['rootName']});this['_savedMetaData']['set'](_0x2ca722,{'roots':_0xa6c3ec,'markers':_0x17939f,'rootsAttributes':_0x35e649});}_removeMetaData(_0x22e311){this['_savedMetaData']['delete'](_0x22e311);}_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(_0x1b9ea9,_0x1f6cdf=null){let _0x5abd72=null;_0x1b9ea9['is']('documentFragment')||(_0x5abd72=new _0x8d1ceb(_0x1b9ea9['name'],{'vid_start':null===_0x1f6cdf?this['_revisionId']++:_0x1f6cdf++}));const _0x30cded=[];for(const _0x3dc44c of _0x1b9ea9['getChildren']())if(_0x3dc44c['is']('element')){_0x30cded['push'](this['_makeIdsRoot'](_0x3dc44c,_0x1f6cdf));const _0x625c25=_0x30cded[_0x30cded['length']-0x1];null!==_0x1f6cdf&&(_0x1f6cdf=_0x625c25['is']('element','$text')?_0x625c25['getAttribute']('vid')+0x1:_0x625c25['getAttribute']('vid_end')+0x1);}else{for(let _0x5be419=0x0;_0x5be419<_0x3dc44c['offsetSize'];_0x5be419++)_0x30cded['push'](new _0x8d1ceb('$text',{'vid':null===_0x1f6cdf?this['_revisionId']++:_0x1f6cdf++}));}if(_0x1b9ea9['is']('documentFragment')){const _0xcfcee2=Rt(_0x1b9ea9['rootName'],_0x1b9ea9['name']);return _0xcfcee2['_insertChild'](0x0,_0x30cded),_0xcfcee2;}return _0x5abd72['_setAttribute']('vid_end',null===_0x1f6cdf?this['_revisionId']++:_0x1f6cdf),_0x5abd72['_insertChild'](0x0,_0x30cded),_0x5abd72;}_calculateMetaData(_0x223169,_0x4132f9,_0x5683a8){this['_reset']();const {roots:_0x133fd7,markers:_0x274967,rootsAttributes:_0x291f9b}=this['_savedMetaData']['get'](_0x223169);this['_baseRoots']=new Map(_0x133fd7),this['_baseRootsAttributes']=new Map(_0x38b022(_0x291f9b));for(const [_0x20bd3f,_0x1a8761]of this['_baseRoots'])if('$graveyard'!==_0x20bd3f&&(this['_diffRoots']['set'](_0x20bd3f,bt(_0x1a8761)),this['_diffRootsAttributes']=new Map(_0x38b022(_0x291f9b)),_0x5683a8)){const _0x2ec4aa=this['_revisionId'];this['_idsRoots']['set'](_0x20bd3f,this['_makeIdsRoot'](_0x1a8761)),this['_baseIdsRoots']['set'](_0x20bd3f,this['_makeIdsRoot'](_0x1a8761,_0x2ec4aa));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x5683a8&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2a6644,_0x4e35ac]of _0x274967){const _0x192d00=this['_baseRoots']['get'](_0x4e35ac['rootName']),_0x3b9b5f=this['_diffRoots']['get'](_0x4e35ac['rootName']),_0x2b4fac=new _0x26b117(this['_fixPosition'](_0x4e35ac['start'],_0x192d00),this['_fixPosition'](_0x4e35ac['end'],_0x192d00)),_0x2c3331=this['_fixRange'](_0x2b4fac,_0x3b9b5f);_0x192d00['markers']['set'](_0x2a6644,_0x2b4fac),this['_markers']['set'](_0x2a6644,_0x2c3331);}this['_applyOperations'](_0x223169,_0x4132f9,_0x5683a8);}_applyOperations(_0x3d2222,_0x419c80,_0x28c0e1){for(const _0x79ddb0 of this['source']['getOperations'](_0x3d2222,_0x419c80))this['_handleOperation'](_0x79ddb0,_0x28c0e1);for(const _0x4ad38d of this['_diffRoots']['values']())_0x4ad38d['markers']['clear']();for(const [_0xf52c13,_0x2b30b9]of this['_markers'])this['_diffRoots']['get'](_0x2b30b9['root']['rootName'])['markers']['set'](_0xf52c13,_0x2b30b9['clone']());const _0xb81d08=new Map(),_0x316b53=new Map();for(const [_0x1aaa6a,_0x1e640c]of this['_diffRoots'])_0xb81d08['set'](_0x1aaa6a,bt(_0x1e640c)),_0x316b53['set'](_0x1aaa6a,this['_diffRootsAttributes']['get'](_0x1aaa6a));this['_saveMetaData'](_0x419c80,_0xb81d08,this['_markers'],_0x316b53);}_getPreviousFrom(_0x297662){const _0x10ff2d=Array['from'](this['_savedMetaData']['keys']());_0x10ff2d['sort']((_0x561fba,_0x42f0ae)=>_0x561fba-_0x42f0ae),_0x10ff2d['reverse']();for(const _0x1cab79 of _0x10ff2d)if(_0x1cab79<_0x297662)return _0x1cab79;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5b8398,_0x551bc5){const _0x18e11d=Array['from'](_0x551bc5['markers'])['map'](([_0x340013,_0x32269c])=>[_0x340013,this['_fixRange'](_0x32269c,_0x5b8398)]);_0x5b8398['markers']=new Map(_0x18e11d);}_transformMarkers(_0x36b9d1){for(const _0x547709 of this['_markers']['values']()){const _0x1b8225=_0x547709['getTransformedByOperation'](_0x36b9d1),_0x2374c2=_0x26b117['_createFromRanges'](_0x1b8225);_0x547709['start']=_0x2374c2['start'],_0x547709['end']=_0x2374c2['end'];}}_handleOperation(_0x2b5ee7,_0x5d30e9){if('addRoot'!=_0x2b5ee7['type']&&'detachRoot'!=_0x2b5ee7['type']){if('insert'==_0x2b5ee7['type']){const _0x5c3abb=_0x2b5ee7['position']['root'],_0x43efb6=_0x5c3abb['rootName'],_0x33277e=_0x5c3abb['name'];this['_diffRoots']['has'](_0x43efb6)||(this['_diffRoots']['set'](_0x43efb6,Rt(_0x43efb6,_0x33277e,!0x0)),this['_diffRootsAttributes']['set'](_0x43efb6,{}),_0x5d30e9&&this['_idsRoots']['set'](_0x43efb6,Rt(_0x43efb6,_0x33277e,!0x0)));}else{if('addRootAttribute'==_0x2b5ee7['type']||'removeRootAttribute'==_0x2b5ee7['type']||'changeRootAttribute'==_0x2b5ee7['type'])return void this['_handleRootAttributeOperation'](_0x2b5ee7);'marker'==_0x2b5ee7['type']&&this['_handleMarkerOperation'](_0x2b5ee7);}if('marker'!==_0x2b5ee7['type']){const _0x182fa0=this['_cloneOperation'](_0x2b5ee7,this['_diffRoots']);_0x182fa0['_execute'](),this['_transformMarkers'](_0x182fa0);}if(_0x5d30e9)switch(_0x2b5ee7['type']){case'insert':this['_handleInsertOperation'](_0x2b5ee7);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2b5ee7);break;case'merge':this['_handleMergeOperation'](_0x2b5ee7);break;case'split':this['_handleSplitOperation'](_0x2b5ee7);}}else this['_handleRootOperation'](_0x2b5ee7,_0x5d30e9);}_cloneOperation(_0x2fc01c,_0x931c89){const _0x1454d6=_0x2fc01c['clone']();return _0x1454d6['_authorId']=_0x2fc01c['_authorId'],this['_fixOperation'](_0x1454d6,_0x931c89),_0x1454d6;}_getBaseVids(_0x5e0601){return _0x5e0601['map'](_0x3da195=>{const _0x13faed=this['_getVidAttributeName'](_0x3da195);return Number(_0x3da195['item']['getAttribute'](_0x13faed));});}_generateTape(_0x2ccc10,_0xa7b9f0){if(_0x2ccc10['is']('element','$text'))_0xa7b9f0['push']({'item':_0x2ccc10,'type':'text'});else{_0x2ccc10['is']('element')&&_0xa7b9f0['push']({'item':_0x2ccc10,'type':'elementStart'});for(const _0x3a2edf of _0x2ccc10['getChildren']())this['_generateTape'](_0x3a2edf,_0xa7b9f0);_0x2ccc10['is']('element')&&_0xa7b9f0['push']({'item':_0x2ccc10,'type':'elementEnd'});}return _0xa7b9f0;}_getState(){const _0x10348a=new Map(this['_touched']),_0x2c37fd=new Map(_0x10348a),_0x5ec32d=new Map(),_0x2b837c={'insertions':{},'deletions':{}},_0x4ab229={'insertions':{},'deletions':{}},_0x29741a=new Map(),_0x21ef22=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x5d1eca=new Map();_0x21ef22['delete']('$graveyard');for(const _0xc771ec of _0x21ef22){const _0x9d61f=(this['_diffRoots']['get'](_0xc771ec)??this['_baseRoots']['get'](_0xc771ec))['name'],_0xf35c0c=this['_diffRoots']['get'](_0xc771ec)||Rt(_0xc771ec,_0x9d61f,!0x1),_0x4387b8=this['_baseRoots']['get'](_0xc771ec)||Rt(_0xc771ec,_0x9d61f,!0x1);_0xf35c0c['isAttached']()||_0x4387b8['isAttached']()?(_0x5d1eca['set'](_0xc771ec,_0x9d61f),_0x2b837c['insertions'][_0xc771ec]=bt(_0xf35c0c),_0x2b837c['deletions'][_0xc771ec]=bt(_0x4387b8),this['_copyMarkers'](_0x2b837c['deletions'][_0xc771ec],_0x4387b8),this['_copyMarkers'](_0x2b837c['insertions'][_0xc771ec],_0xf35c0c),_0x4ab229['insertions'][_0xc771ec]=this['_generateTape'](this['_idsRoots']['get'](_0xc771ec),[]),_0x4ab229['deletions'][_0xc771ec]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xc771ec)||Rt(_0xc771ec,_0x9d61f,!0x1),[])):_0x21ef22['delete'](_0xc771ec);}for(const _0x425a2c of _0x21ef22){const _0x1ff215=_0x4ab229['insertions'][_0x425a2c];for(const _0x25552e of _0x1ff215){const _0x145ca2=this['_getVidAttributeName'](_0x25552e),_0x20ed6a=_0x25552e['item']['getAttribute'](_0x145ca2);_0x2c37fd['delete'](_0x20ed6a),_0x20ed6a>=this['_startingRevisionId']&&_0x5ec32d['set'](_0x20ed6a,_0x10348a['get'](_0x20ed6a));}}for(const _0x18db55 of _0x21ef22){const _0x319e25=_0x4ab229['insertions'][_0x18db55],_0x3f9dee=this['_getBaseVids'](_0x4ab229['deletions'][_0x18db55]);let _0x4d8b4a=0x0;for(const _0x2328c7 of _0x319e25){const _0x403544=this['_getVidAttributeName'](_0x2328c7),_0x5d39d8=_0x2328c7['item']['getAttribute'](_0x403544);if(!_0x5ec32d['has'](_0x5d39d8)&&!_0x29741a['has'](_0x5d39d8)){if(_0x2c37fd['has'](_0x5d39d8))_0x4d8b4a++;else{if(_0x5d39d8!=_0x3f9dee[_0x4d8b4a]){const _0x1e42b5=_0x10348a['get'](_0x5d39d8)||_0x10348a['get'](_0x3f9dee[_0x4d8b4a]);for(;_0x5d39d8!=_0x3f9dee[_0x4d8b4a];)_0x2c37fd['has'](_0x3f9dee[_0x4d8b4a])||(_0x29741a['set'](_0x3f9dee[_0x4d8b4a],_0x1e42b5),_0x10348a['set'](_0x3f9dee[_0x4d8b4a],_0x1e42b5)),_0x4d8b4a++;}_0x4d8b4a++;}}}}for(const _0x44f336 of _0x21ef22){const _0x41c2f9=_0x4ab229['insertions'][_0x44f336];for(const _0x27fcc7 of _0x41c2f9){const _0x2e8afc=this['_getVidAttributeName'](_0x27fcc7),_0x4d34c9=_0x27fcc7['item']['getAttribute'](_0x2e8afc);if(_0x29741a['has'](_0x4d34c9)){const _0x349ba5=_0x29741a['get'](_0x4d34c9);_0x2c37fd['has'](_0x4d34c9)||_0x2c37fd['set'](_0x4d34c9,{..._0x349ba5}),_0x5ec32d['set'](_0x4d34c9,{..._0x349ba5});}}}for(const _0x54ce90 of _0x2c37fd['keys']())_0x54ce90>=this['_startingRevisionId']&&_0x2c37fd['delete'](_0x54ce90);const _0x56afac=new Map();for(const _0x2c2668 of _0x21ef22){let _0x4a745a=_0x4ab229['insertions'][_0x2c2668];for(const _0x1fbe80 of _0x4a745a)if(_0x1fbe80['item']['is']('element','tableCell')){const _0x40bcc4=this['_getVidAttributeName'](_0x1fbe80),_0x5807b9=_0x1fbe80['item']['getAttribute'](_0x40bcc4);if(_0x5ec32d['has'](_0x5807b9)){const _0x4fbe96=_0x1fbe80['item']['parent']['parent']['getAttribute']('vid_start'),_0x5deed9=_0x56afac['get'](_0x4fbe96)||new Set();_0x5deed9['add'](_0x5ec32d['get'](_0x5807b9)['userId']),_0x56afac['set'](_0x4fbe96,_0x5deed9);}}_0x4a745a=_0x4ab229['deletions'][_0x2c2668];for(const _0x424dc5 of _0x4a745a)if(_0x424dc5['item']['is']('element','tableCell')){const _0x406a82=this['_getVidAttributeName'](_0x424dc5),_0x561202=_0x424dc5['item']['getAttribute'](_0x406a82);if(_0x2c37fd['has'](_0x561202)){const _0x30ed13=_0x424dc5['item']['parent']['parent']['getAttribute']('vid_start'),_0x3797cb=_0x56afac['get'](_0x30ed13)||new Set();_0x3797cb['add'](_0x2c37fd['get'](_0x561202)['userId']),_0x56afac['set'](_0x30ed13,_0x3797cb);}}for(const _0x1819d2 of _0x56afac['keys']())(_0x5ec32d['has'](_0x1819d2)||_0x2c37fd['has'](_0x1819d2))&&_0x56afac['delete'](_0x1819d2);}for(const _0x3294f5 of _0x21ef22){const _0x3599bb=_0x4ab229['insertions'][_0x3294f5];let _0x3aad51=null,_0x1313df=null;for(const _0x1d5d08 of _0x3599bb){const _0x29021b=this['_getVidAttributeName'](_0x1d5d08),_0x5fc1b3=_0x1d5d08['item']['getAttribute'](_0x29021b),_0x50daa7=_0x56afac['get'](_0x5fc1b3);_0x50daa7&&'elementStart'==_0x1d5d08['type']&&(_0x3aad51=Array['from'](_0x50daa7)[0x0],_0x1313df=_0x1d5d08['item']['getAttribute']('vid_end')),_0x3aad51&&(_0x2c37fd['set'](_0x5fc1b3,{'userId':_0x3aad51}),_0x5ec32d['set'](_0x5fc1b3,{'userId':_0x3aad51})),_0x5fc1b3==_0x1313df&&(_0x3aad51=null,_0x1313df=null);}}const _0x4b5f41={},_0xf80e78=new Set();for(const _0xbdb1a8 of _0x21ef22){const _0x28b95e=_0x2b837c['deletions'][_0xbdb1a8],_0x18eb37=_0x2b837c['insertions'][_0xbdb1a8];for(const {userId:_0x3d1b91}of this['_touchedMarkers']['values']())null!==_0x3d1b91&&_0xf80e78['add'](_0x3d1b91);for(const {userId:_0x2f1464}of this['_touchedRoots']['values']())null!==_0x2f1464&&_0xf80e78['add'](_0x2f1464);this['_markChanges'](_0x18eb37,_0x4ab229['insertions'][_0xbdb1a8],_0x5ec32d,'insertion',_0xf80e78),this['_markChanges'](_0x28b95e,_0x4ab229['deletions'][_0xbdb1a8],_0x2c37fd,'deletion',_0xf80e78),_0x4b5f41[_0xbdb1a8]={'insertions':this['_prepareViewToSave'](_0x18eb37),'deletions':this['_prepareViewToSave'](_0x28b95e),'attachChange':this['_touchedRoots']['get'](_0xbdb1a8)||null,'attributesBefore':_0x38b022(this['_baseRootsAttributes']['get'](_0xbdb1a8))||{},'attributesAfter':_0x38b022(this['_diffRootsAttributes']['get'](_0xbdb1a8)),'rootElementName':_0x5d1eca['get'](_0xbdb1a8)};}return{'diffData':_0x4b5f41,'authorsIds':Array['from'](_0xf80e78)};}_processRootBeforeSave(_0x2cdbe0){for(const [,_0x24b0d5]of _0x2cdbe0['markers']){const _0x52a740=_0x24b0d5['start']['getAncestors']()['filter'](_0x5e7d3a=>'tableCell'==_0x5e7d3a['name']);for(const _0x3ca271 of _0x52a740)0x1==_0x3ca271['childCount']&&_0x3ca271['getChild'](0x0)['is']('element','paragraph')&&_0x3ca271['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x1f4116){this['_processRootBeforeSave'](_0x1f4116);const _0xc64fcd=this['editor']['data']['toView'](_0x1f4116,{}),_0x1880ae=Array['from'](_0xc64fcd['getChildren']())['map'](_0x4aeaca=>this['_getViewJson'](_0x4aeaca));return JSON['stringify'](_0x1880ae);}_getViewJson(_0x341274){if(_0x341274['is']('$text'))return _0x341274['data'];{const _0x522011=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x2f4543=_0x341274,_0x1d8ce7=this['editor']['data']['htmlProcessor']['domConverter'],_0x31dba9={'type':_0x522011['_getTypeCharForViewElement'](_0x2f4543),'name':_0x2f4543['name'],'attributes':Array['from'](_0x2f4543['getAttributes']()),'children':Array['from'](_0x2f4543['getChildren']())['map'](_0x3868ba=>this['_getViewJson'](_0x3868ba))};if(_0x341274['is']('uiElement')&&'$comment'!=_0x341274['name']){const _0x21ec2a=_0x341274['render'](_0x1d8ce7['domDocument'],_0x1d8ce7);_0x31dba9['children']['push'](_0x21ec2a['outerHTML']);}else{if(_0x341274['is']('rawElement')){const _0x555cc2=_0x1d8ce7['domDocument']['createElement'](_0x2f4543['name']);_0x341274['render'](_0x555cc2,_0x1d8ce7),_0x31dba9['children']['push'](_0x555cc2['innerHTML']);}}const _0x4539aa=Array['from'](_0x2f4543['getCustomProperties']());_0x4539aa['length']>0x0&&(_0x31dba9['customProperties']=_0x4539aa);const _0x2dceca=_0x2f4543['getFillerOffset']();return null!==_0x2dceca&&(_0x31dba9['fillerOffset']=_0x2dceca),_0x31dba9;}}['_markChanges'](_0x115956,_0x8293dd,_0x48df36,_0x1a029e,_0x454ba9){let _0x158ea7=null,_0x176c47=null,_0x33f187=0x0;const _0x3a48f0=this['editor']['model'];for(let _0x567314=0x0;_0x567314<_0x8293dd['length'];_0x567314++){const _0x5e36c7=this['_getVidAttributeName'](_0x8293dd[_0x567314]),_0x298603=_0x8293dd[_0x567314]['item']['getAttribute'](_0x5e36c7),_0x201f00=_0x48df36['get'](_0x298603),_0x49917a=_0x567314==_0x8293dd['length']-0x1;!_0x158ea7&&_0x201f00&&(_0x158ea7=_0x201f00,_0x176c47=_0x8293dd[_0x567314]),!_0x158ea7||_0x201f00&&_0x201f00['userId']==_0x158ea7['userId']||(_0x23c859(_0x201f00,kt(_0x176c47,_0x115956,_0x3a48f0),kt(_0x8293dd[_0x567314],_0x115956,_0x3a48f0)),_0x158ea7=_0x201f00||null,_0x176c47=_0x201f00?_0x8293dd[_0x567314]:null),_0x158ea7&&_0x49917a&&_0x23c859(_0x201f00,kt(_0x176c47,_0x115956,_0x3a48f0),At(_0x8293dd[_0x567314],_0x115956,_0x3a48f0));}function _0x23c859(_0x2f3f3c,_0x4a2d89,_0x19c925){const _0x915eca=_0x158ea7['userId'],_0x516e16='revision:'+_0x1a029e+':'+_0x915eca+':'+_0x33f187++,_0x52dd12=_0x3a48f0['createRange'](_0x4a2d89,_0x19c925);_0x115956['markers']['set'](_0x516e16,_0x52dd12),null!==_0x915eca&&_0x454ba9['add'](_0x915eca);}}_getVidAttributeName(_0x361da4){switch(_0x361da4['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_fixOperation(_0x1c524e,_0x1af9a1){_0x1c524e['baseVersion']=null;for(const _0x1e2c28 in _0x1c524e){const _0x169ce9=_0x1c524e[_0x1e2c28];if(_0x169ce9 instanceof _0x1a4c85){const _0x1d4b51=_0x1af9a1['get'](_0x169ce9['root']['rootName']);_0x1c524e[_0x1e2c28]=this['_fixPosition'](_0x169ce9,_0x1d4b51);}if(_0x169ce9 instanceof _0x26b117){const _0x363453=_0x1af9a1['get'](_0x169ce9['root']['rootName']);_0x1c524e[_0x1e2c28]=this['_fixRange'](_0x169ce9,_0x363453);}'root'===_0x1e2c28&&(_0x1c524e['root']=_0x1af9a1['get'](_0x1c524e['root']['rootName']));}}['_fixRange'](_0x582fca,_0x49d024){return this['editor']['model']['createRange'](this['_fixPosition'](_0x582fca['start'],_0x49d024),this['_fixPosition'](_0x582fca['end'],_0x49d024));}_fixPosition(_0x534de0,_0xea0131){return this['editor']['model']['createPositionFromPath'](_0xea0131,_0x534de0['path'],_0x534de0['stickiness']);}_handleInsertOperation(_0xab936d){const _0x1d956b=this['_idsRoots']['get'](_0xab936d['position']['root']['rootName']),_0x3f5733=this['_fixPosition'](_0xab936d['position'],_0x1d956b),_0x50734f=null===_0xab936d['_authorId']?null:_0xab936d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4454c3=_0x3f5733['parent'],_0x1c7437=this['_revisionId'],_0x5d3e63=[];for(const _0x21175b of _0xab936d['nodes'])if(_0x21175b['is']('element'))_0x5d3e63['push'](this['_makeIdsRoot'](_0x21175b));else{for(let _0x15becf=0x0;_0x15becf<_0x21175b['offsetSize'];_0x15becf++)_0x5d3e63['push'](new _0x8d1ceb('$text',{'vid':this['_revisionId']++}));}const _0x5553c3=this['_revisionId'];for(let _0x8fd70f=_0x1c7437;_0x8fd70f<_0x5553c3;_0x8fd70f++)this['_touched']['set'](_0x8fd70f,{'userId':_0x50734f});_0x4454c3['_insertChild'](_0x3f5733['offset'],_0x5d3e63);}_handleMoveOperation(_0x43be9d){(_0x43be9d=this['_cloneOperation'](_0x43be9d,this['_idsRoots']))['_execute']();const _0x333ec9=null===_0x43be9d['_authorId']?null:_0x43be9d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x197088=_0x43be9d['getMovedRangeStart'](),_0x5f549b=_0x197088['parent'],_0x22ebf9=_0x197088['offset'];!function _0x324452(_0x229904,_0x3ccc4a,_0x225e62,_0x31c8ac){for(let _0x262841=_0x225e62;_0x262841<_0x31c8ac;_0x262841++){const _0x415ff6=_0x3ccc4a['getChild'](_0x262841);_0x415ff6['is']('element','$text')?_0x229904['set'](_0x415ff6['getAttribute']('vid'),{'userId':_0x333ec9}):(_0x229904['set'](_0x415ff6['getAttribute']('vid_start'),{'userId':_0x333ec9}),_0x324452(_0x229904,_0x415ff6,0x0,_0x415ff6['childCount']),_0x229904['set'](_0x415ff6['getAttribute']('vid_end'),{'userId':_0x333ec9}));}}(this['_touched'],_0x5f549b,_0x22ebf9,_0x22ebf9+_0x43be9d['howMany']);}_handleMergeOperation(_0x5e36f9){const _0x109ac8=null===(_0x5e36f9=this['_cloneOperation'](_0x5e36f9,this['_idsRoots']))['_authorId']?null:_0x5e36f9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5a9da8=_0x5e36f9['targetPosition']['parent'],_0x35521d=_0x5e36f9['sourcePosition']['parent'],_0x2a4ffd=_0x5a9da8['getAttribute']('vid_end'),_0x523d56=_0x35521d['getAttribute']('vid_start');_0x5a9da8['_setAttribute']('vid_end',_0x35521d['getAttribute']('vid_end')),_0x35521d['_setAttribute']('vid_end',_0x2a4ffd),this['_touched']['set'](_0x523d56,{'userId':_0x109ac8}),this['_touched']['set'](_0x2a4ffd,{'userId':_0x109ac8}),_0x5e36f9['_execute']();}_handleSplitOperation(_0x1e65af){const _0x1773a2=null===(_0x1e65af=this['_cloneOperation'](_0x1e65af,this['_idsRoots']))['_authorId']?null:_0x1e65af['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3d0bb7=_0x1e65af['graveyardPosition'],_0x576cae=_0x1e65af['splitPosition']['parent'];_0x1e65af['_execute']();const _0x49c1db=_0x576cae['getAttribute']('vid_end'),_0x570d75=_0x1e65af['insertionPosition']['nodeAfter'];if(_0x3d0bb7){const _0x233c3e=_0x570d75['getAttribute']('vid_end'),_0x361fb2=_0x576cae['getAttribute']('vid_end');_0x576cae['_setAttribute']('vid_end',_0x233c3e),_0x570d75['_setAttribute']('vid_end',_0x361fb2),this['_touched']['set'](_0x576cae['getAttribute']('vid_end'),{'userId':_0x1773a2}),this['_touched']['set'](_0x570d75['getAttribute']('vid_start'),{'userId':_0x1773a2});}else{const _0x502ff9=this['_revisionId']++,_0x166ec9=this['_revisionId']++;_0x576cae['_setAttribute']('vid_end',_0x502ff9),_0x570d75['_setAttribute']('vid_start',_0x166ec9),_0x570d75['_setAttribute']('vid_end',_0x49c1db),this['_touched']['set'](_0x502ff9,{'userId':_0x1773a2}),this['_touched']['set'](_0x166ec9,{'userId':_0x1773a2});}}_handleMarkerOperation(_0x1a70e0){if(!_0x1a70e0['affectsData'])return;const _0xc42f59=(_0x1a70e0=this['_cloneOperation'](_0x1a70e0,this['_diffRoots']))['oldRange']?_0x1a70e0['oldRange']['root']:null,_0x148e85=_0x1a70e0['newRange']?_0x1a70e0['newRange']['root']:null;_0xc42f59&&this['_markers']['delete'](_0x1a70e0['name']),_0x148e85&&this['_markers']['set'](_0x1a70e0['name'],_0x1a70e0['newRange']['clone']());const _0x2c1d89=null===_0x1a70e0['_authorId']?null:_0x1a70e0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x10f878=_0x1a70e0['name'];if(!this['_touchedMarkers']['has'](_0x10f878))return void this['_touchedMarkers']['set'](_0x10f878,{'range':_0x1a70e0['oldRange'],'userId':_0x2c1d89});const _0x1044da=this['_touchedMarkers']['get'](_0x10f878),_0x567878=_0x1044da['range'],_0x5393be=_0x1a70e0['newRange'];null==_0x567878&&null==_0x5393be||_0x567878&&_0x5393be&&_0x567878['isEqual'](_0x5393be)?this['_touchedMarkers']['delete'](_0x1a70e0['name']):_0x1044da['userId']=_0x2c1d89;}_handleRootOperation(_0x56e311,_0x262b40){this['_diffRoots']['has'](_0x56e311['rootName'])?this['_diffRoots']['get'](_0x56e311['rootName'])['_isAttached']=_0x56e311['isAdd']:(this['_diffRoots']['set'](_0x56e311['rootName'],Rt(_0x56e311['rootName'],_0x56e311['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x56e311['rootName'],{}),_0x262b40&&this['_idsRoots']['set'](_0x56e311['rootName'],Rt(_0x56e311['rootName'],_0x56e311['elementName'],!0x0)));const _0x5e492d=null===_0x56e311['_authorId']?null:_0x56e311['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x348d11=this['_touchedRoots']['get'](_0x56e311['rootName']);_0x348d11&&_0x348d11['userId']===_0x5e492d?this['_touchedRoots']['delete'](_0x56e311['rootName']):this['_touchedRoots']['set'](_0x56e311['rootName'],{'userId':_0x5e492d,'isAttached':_0x56e311['isAdd']});}_handleRootAttributeOperation(_0x40a75e){const _0x4c1f93=this['_diffRootsAttributes']['get'](_0x40a75e['root']['rootName']);null===_0x40a75e['newValue']?delete _0x4c1f93[_0x40a75e['key']]:_0x4c1f93[_0x40a75e['key']]=_0x40a75e['newValue'];}};function bt(_0x6718fa){const _0x21233f=Rt(_0x6718fa['rootName'],_0x6718fa['name'],_0x6718fa['isAttached']());for(const _0x3c3c04 of _0x6718fa['getChildren']()){const _0x52195b=_0x3c3c04['_clone'](!0x0);_0x21233f['_appendChild'](_0x52195b);}return _0x21233f;}function Rt(_0x4c34e9,_0x2de8e4,_0x3b274b=!0x0){const _0x459893=new _0xdc5c7c();return _0x459893['rootName']=_0x4c34e9,_0x459893['name']=_0x2de8e4,_0x459893['_isAttached']=_0x3b274b,_0x459893['isAttached']=()=>_0x459893['_isAttached'],_0x459893;}function kt(_0x52f811,_0x5419c5,_0x56ea06){const _0x3953b8='elementEnd'==_0x52f811['type']?_0x56ea06['createPositionAt'](_0x52f811['item'],'end'):_0x56ea06['createPositionBefore'](_0x52f811['item']);return _0x56ea06['createPositionFromPath'](_0x5419c5,_0x3953b8['path'],_0x3953b8['stickiness']);}function At(_0x50e0e0,_0x3a17b9,_0x3640d5){const _0x5545b5='elementStart'==_0x50e0e0['type']?_0x3640d5['createPositionAt'](_0x50e0e0['item'],0x0):_0x3640d5['createPositionAfter'](_0x50e0e0['item']);return _0x3640d5['createPositionFromPath'](_0x3a17b9,_0x5545b5['path'],_0x5545b5['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x59bd54(at);var Et=class extends It{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x2da9ab,_0x31a512){super(_0x2da9ab),this['focusTracker']=new _0xf10848(),this['keystrokes']=new _0x43e974(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x31a512),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 _0x42cad5=_0x38bf42=>_0x38bf42['stopPropagation']();this['keystrokes']['set']('arrowright',_0x42cad5),this['keystrokes']['set']('arrowleft',_0x42cad5),this['keystrokes']['set']('arrowup',_0x42cad5),this['keystrokes']['set']('arrowdown',_0x42cad5);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2ba065){this['revisionNameInputView']['fieldView']['element']['value']=_0x2ba065['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x14366a){const _0x121b6c=new _0xd50028(this['locale'],lt),_0x51eb46=_0x121b6c['fieldView'];_0x51eb46['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x152f81=pt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x14366a&&(_0x152f81+='\x20('+pt(this['locale'],'optional')+')'),(_0x121b6c['label']=_0x152f81,_0x51eb46['on']('input',()=>{this['revisionNameInputValue']=_0x51eb46['element']['value']['trim']();}),_0x121b6c);}},St=class extends _0x57c795{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_t];}['_saveRevisionFormView'];init(){const _0x3c3775=this['editor'],_0x317cc4=_0x3c3775['plugins']['get']('RevisionTracker');_0x3c3775['ui']['componentFactory']['add']('revisionHistory',_0x2b4a53=>{const _0x378752=ct(_0x2b4a53),_0xf549ed=_0x378752['panelView']['children'],_0x17b702=new _0x4fa40b(_0x2b4a53),_0x1629c8=new _0x283521(_0x2b4a53),_0x36f00d=this['_createSaveRevisionButton'](_0x112eb0),_0x26877a=new _0x283521(_0x2b4a53),_0x120a4b=this['_createOpenRevisionButton'](_0x112eb0);return _0x378752['bind']('isEnabled')['to'](_0x317cc4,'isReady',_0x317cc4,'isEnabled',_0x3c3775,'isReadOnly',(_0x150865,_0x3ce3bf,_0x4dc600)=>_0x150865&&_0x3ce3bf&&!_0x4dc600),_0x378752['buttonView']['set']({'icon':_0x116443,'label':pt(_0x2b4a53,'Revision\x20history'),'tooltip':!0x0}),_0x36f00d['set']({'withText':!0x0,'role':'menuitem'}),_0x120a4b['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x120a4b,'execute',()=>{_0x378752['isOpen']=!0x1,_0x3c3775['editing']['view']['focus']();},{'priority':'low'}),_0x1629c8['children']['add'](_0x36f00d),_0x26877a['children']['add'](_0x120a4b),_0x17b702['role']='menu',_0x17b702['items']['addMany']([_0x1629c8,_0x26877a]),_0xf549ed['add'](_0x17b702),_0x378752;}),_0x3c3775['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0xd5e014=this['editor'],_0x59ccea=_0xd5e014['locale'],_0x1b998a=_0xd5e014['plugins']['get']('RevisionTracker'),_0x1600da=new et(_0x59ccea),_0x84be97=new it(_0x59ccea);_0x1600da['bind']('isEnabled')['to'](_0x1b998a,'isReady',_0x1b998a,'isEnabled',_0xd5e014,'isReadOnly',(_0x56ac4b,_0x592777,_0x34ee8e)=>_0x56ac4b&&_0x592777&&!_0x34ee8e),_0x1600da['buttonView']['set']({'icon':_0x116443,'label':pt(_0x59ccea,'Revision\x20history')});const _0x48dc53=new tt(_0x59ccea,_0x1600da),_0x558765=this['_createSaveRevisionButton'](_0x5782cb);_0x558765['delegate']('execute')['to'](_0x1600da),_0x48dc53['children']['add'](_0x558765),_0x84be97['items']['add'](_0x48dc53);const _0x4e3820=new tt(_0x59ccea,_0x1600da),_0x2c5cc7=this['_createOpenRevisionButton'](_0x5782cb);return _0x2c5cc7['delegate']('execute')['to'](_0x1600da),_0x4e3820['children']['add'](_0x2c5cc7),_0x84be97['items']['add'](_0x4e3820),_0x1600da['panelView']['children']['add'](_0x84be97),_0x1600da;}_createSaveRevisionButton(_0x1709b3){const _0x1b5b77=this['editor'],_0x4cdc12=_0x1b5b77['plugins']['get']('RevisionTracker'),_0x5745e2=new _0x1709b3(_0x1b5b77['locale']);return _0x5745e2['set']({'label':pt(_0x1b5b77['locale'],'Save\x20current\x20revision')}),_0x5745e2['bind']('isEnabled')['to'](_0x4cdc12,'isReady',_0x4cdc12,'isEnabled',_0x1b5b77,'isReadOnly',(_0x283e45,_0x436660,_0x535916)=>_0x283e45&&_0x436660&&!_0x535916),this['listenTo'](_0x5745e2,'execute',()=>{this['_showDialog']();}),_0x5745e2;}_createOpenRevisionButton(_0xd0004d){const _0x214247=this['editor'],_0x1317ff=_0x214247['plugins']['get']('RevisionTracker'),_0x4830a3=new _0xd0004d(_0x214247['locale']);return _0x4830a3['set']({'label':pt(_0x214247['locale'],'Open\x20revision\x20history')}),_0x4830a3['bind']('isEnabled')['to'](_0x1317ff,'isReady',_0x214247,'isReadOnly',(_0x5433ec,_0x4d0609)=>_0x5433ec&&!_0x4d0609),this['listenTo'](_0x4830a3,'execute',()=>{_0x214247['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x4830a3;}['_showDialog'](){const _0x31b786=this['editor'],_0xaf0e29=_0x31b786['locale'],_0x50518b=_0x31b786['plugins']['get']('Dialog'),_0x577331=_0x31b786['plugins']['get']('RevisionTracker');function _0x3531f3(_0x1d0865){_0x31b786['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1d0865['revisionName']?_0x1d0865['revisionNameInputView']['errorText']=pt(_0xaf0e29,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x31b786['plugins']['get'](_t)['saveRevision']({'name':_0x1d0865['revisionName']}),_0x50518b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3531f3(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x50518b['show']({'id':'revisionSave','title':pt(_0xaf0e29,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':pt(_0x31b786['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x50518b['hide']()},{'label':pt(_0x31b786['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x11e7e3){_0x11e7e3['bind']('isEnabled')['to'](_0x577331,'isReady',_0x577331,'isEnabled',_0x31b786,'isReadOnly',(_0x278746,_0x3b1216,_0x1cbf9d)=>_0x278746&&_0x3b1216&&!_0x1cbf9d);},'onExecute':()=>_0x3531f3(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x2235a3=this['editor'],_0x1f466e=_0x2235a3['locale'];this['_saveRevisionFormView']=new Et(_0x1f466e,_0x2235a3['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Nt=class extends at{['changeId'];['_model'];constructor(_0x2c9805,_0x6693aa){super(_0x2c9805),this['_model']=_0x6693aa,this['changeId']=_0x6693aa['id'];const _0x3092f0=this['bindTemplate'],_0x2c38d3=pt(_0x2c9805,_0x6693aa['data']['isSuggestion']?'Suggested\x20by':'add'==_0x6693aa['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x6693aa['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x3092f0['to']('type',_0x1d7914=>'ck-revision-change__'+_0x1d7914)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x2c38d3}]},{'text':'\x20'+_0x6693aa['author']['name']}]}]});}['focus'](){this['element']['focus']();}};const xt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x43b55f();var Ot=class extends xt{['id'];author;type;data;rootName;constructor(_0x4e6cf3){super(),this['id']=_0x4e6cf3['id']||_0xb49d28(),this['author']=_0x4e6cf3['author'],this['type']=_0x4e6cf3['type'],this['data']=_0x4e6cf3['data']||{},this['rootName']=_0x4e6cf3['rootName'],this['set']('createdAt',_0x4e6cf3['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(_0x31e7ae,_0x35051f){this['newRevisionId']=_0x31e7ae,this['oldRevisionId']=_0x35051f,this['changes']=new _0x4a1e3f();}_setChanges(_0x3f2fda){for(const _0x529e67 of _0x3f2fda)this['changes']['add'](_0x529e67);}},Mt=class extends _0x57c795{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[_0x3e15a4,_0x1329e2,mt,wt];}constructor(_0x468768){super(_0x468768),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',(_0x18f9ff,_0x29aeb5,_0x2be556)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x465c3a=>{for(const _0x4b8fa4 of this['editor']['editing']['view']['document']['roots'])_0x2be556?_0x465c3a['removeClass']('ck-editor__editable__overlay',_0x4b8fa4):_0x465c3a['addClass']('ck-editor__editable__overlay',_0x4b8fa4);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4697a2=>null!==_0x4697a2),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x2414c7,_0x1c3539,_0x50afda)=>_0x2414c7&&_0x50afda?_0x1c3539['changes']['getIndex'](_0x50afda):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x327c3c,_0x594c65)=>_0x327c3c?_0x594c65['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1329e2);}init(){const _0x346e80=this['editor'],_0x594b44=new Tt(_0x346e80,{'direction':'backward'}),_0x1e86f8=new Tt(_0x346e80,{'direction':'forward'});_0x346e80['commands']['add']('showPreviousChange',_0x594b44),_0x346e80['commands']['add']('showNextChange',_0x1e86f8),_0x346e80['commands']['add']('restoreRevision',new Dt(_0x346e80)),this['on']('change:numberOfChanges',()=>{_0x594b44['refresh'](),_0x1e86f8['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x346e80['enableReadOnlyMode']('revision-viewer'),_0x346e80['plugins']['has']('WidgetToolbarRepository')&&_0x346e80['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x5137b2){return await this['_utils']['loadRevisionData'](_0x5137b2,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5137b2);}async getRevisionRootsAttributes(_0xa044a){return await this['_utils']['loadRevisionData'](_0xa044a,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xa044a);}async['compare'](_0x774f62,_0x5bd2ce,_0xaa28de=!0x1){if(!this['isEnabled'])return;const _0x4ea301=this['diff'],_0x250d51=this['repository'],_0x546e57='string'==typeof _0x774f62?_0x250d51['getRevision'](_0x774f62):_0x774f62,_0x14031b='string'==typeof _0x5bd2ce?_0x250d51['getRevision'](_0x5bd2ce):_0x5bd2ce,_0x9f1ade=_0x546e57['id'],_0x402794=_0x14031b?_0x14031b['id']:null;if(!_0xaa28de&&this['diff']&&this['diff']['newRevisionId']===_0x9f1ade&&this['diff']['oldRevisionId']===_0x402794)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x9f1ade,_0x402794);const _0x36b7a2=this['_getRevisionsRange'](_0x546e57,_0x14031b,!0x0)['map'](_0x5b36e=>this['_utils']['loadRevisionData'](_0x5b36e,this['adapter']));return _0x36b7a2['push'](new Promise(_0x34692f=>{setTimeout(_0x34692f,0x14);})),Promise['all'](_0x36b7a2)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x389d72=this['_getDiff'](_0x9f1ade,_0x402794);for(const _0x5a70dd of _0x389d72['changes'])this['_changeIdToChange']['set'](_0x5a70dd['id'],_0x5a70dd);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3adaea=>{for(const _0x390092 of this['editor']['model']['document']['getRootNames']())_0x3adaea['detachRoot'](_0x390092);for(const _0x3e6db of Object['keys'](_0x389d72['model'])){const _0xce1716=_0x389d72['model'][_0x3e6db]['name'],_0x1a2417=_0x3adaea['addRoot'](_0x3e6db,_0xce1716);for(const _0x197b08 of Object['keys'](_0x389d72['attributes'][_0x3e6db]))_0x3adaea['setAttribute'](_0x197b08,_0x389d72['attributes'][_0x3e6db][_0x197b08],_0x1a2417);_0x3adaea['insert'](_0x389d72['model'][_0x3e6db],_0x1a2417,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x389d72['changes'])),this['isReady']=!0x0;})['catch'](_0x34e254=>{console['error'](_0x34e254),this['_cleanUp'](),_0x4ea301&&(this['diff']=_0x4ea301),this['isReady']=!0x0;});}addRevisionData(_0x3086a3,_0x57f0d7){const _0x58285f=this['repository']['createRevision'](_0x3086a3);return _0x58285f['on']('_update',(_0x3b1d21,_0x1d7a54,_0x571199)=>_0x57f0d7(_0x1d7a54,_0x571199,_0x58285f)),this['repository']['addRevision'](_0x58285f),_0x58285f;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x439d14=>{for(const _0x17afea of this['editor']['model']['document']['getRootNames']())_0x439d14['detachRoot'](_0x17afea);});}_sortAndFilterDiffChanges(_0x177f70){const _0xdd123a=[],_0x23f17a=new Map();for(const _0x15d641 of this['editor']['model']['document']['getRootNames']()){const _0x29cb8c=this['editor']['editing']['view']['getDomRoot'](_0x15d641);if(!_0x29cb8c)continue;const _0x245924=_0x29cb8c['getClientRects']()['item'](0x0);_0x245924&&(_0xdd123a['push'](_0x15d641),_0x23f17a['set'](_0x15d641,_0x245924));}return _0xdd123a['sort']((_0x75dbc9,_0x3f2422)=>{const _0x333323=_0x23f17a['get'](_0x75dbc9),_0x88d456=_0x23f17a['get'](_0x3f2422);return _0x333323['y']-_0x88d456['y']||_0x333323['x']-_0x88d456['x'];}),(_0x177f70=_0x177f70['filter'](_0x461037=>_0xdd123a['includes'](_0x461037['rootName'])))['sort']((_0x5ccfd4,_0x26acb4)=>_0xdd123a['indexOf'](_0x5ccfd4['rootName'])-_0xdd123a['indexOf'](_0x26acb4['rootName'])),_0x177f70;}['_makeTape'](_0x32788f){const _0x511325=Array['from'](_0x32788f['markers'])['filter'](([_0x584fe1,_0x4ba5ef])=>_0x584fe1['startsWith']('revision:')&&!_0x4ba5ef['isCollapsed']),_0x23160c=Array['from'](this['editor']['model']['createRangeIn'](_0x32788f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x511325['length'])for(const _0x4f296d of _0x23160c){const [_0x65c915,_0x1d2652]=_0x511325[0x0],[,_0x40116a,_0x293557]=_0x65c915['split'](':');if(_0x1d2652['end']['isEqual'](_0x4f296d['nextPosition'])&&_0x511325['shift'](),(_0x4f296d['previousPosition']['isEqual'](_0x1d2652['start'])||_0x4f296d['previousPosition']['isAfter'](_0x1d2652['start']))&&('insertion'==_0x40116a?_0x4f296d['isAdded']={'userId':_0x293557}:'deletion'==_0x40116a&&(_0x4f296d['isRemoved']={'userId':_0x293557})),0x0==_0x511325['length'])break;}return _0x23160c;}_refreshStartEndIndex(_0x4029ec){const _0x4f83dc=new Map();for(let _0x373bcc=0x0;_0x373bcc<_0x4029ec['length'];_0x373bcc++)'text'===_0x4029ec[_0x373bcc]['type']?(_0x4029ec[_0x373bcc]['item']['startIndex']=_0x373bcc,_0x4029ec[_0x373bcc]['item']['endIndex']=_0x373bcc):('elementStart'===_0x4029ec[_0x373bcc]['type']?_0x4029ec[_0x373bcc]['item']['startIndex']=_0x373bcc:'elementEnd'===_0x4029ec[_0x373bcc]['type']&&(_0x4029ec[_0x373bcc]['item']['endIndex']=_0x373bcc),_0x4f83dc['set'](_0x4029ec[_0x373bcc]['id'],_0x373bcc));for(const _0x505777 of _0x4f83dc['values']())'elementStart'===_0x4029ec[_0x505777]['type']?_0x4029ec[_0x505777]['item']['endIndex']=_0x4f83dc['get'](_0x4029ec[_0x505777]['pairId']):'elementEnd'===_0x4029ec[_0x505777]['type']&&(_0x4029ec[_0x505777]['item']['startIndex']=_0x4f83dc['get'](_0x4029ec[_0x505777]['pairId']));}['_processTape'](_0x5061a6){for(let _0x3d6564=0x0;_0x3d6564<_0x5061a6['length'];_0x3d6564++){if('elementStart'===_0x5061a6[_0x3d6564]['type'])_0x5061a6[_0x3d6564]['item']['startIndex']=_0x3d6564;else{if('elementEnd'===_0x5061a6[_0x3d6564]['type']){_0x5061a6[_0x3d6564]['item']['endIndex']=_0x3d6564;const _0x2e00cc=_0x5061a6[_0x3d6564]['item']['startIndex'];_0x5061a6[_0x2e00cc]['pairId']=_0x5061a6[_0x3d6564]['id'],_0x5061a6[_0x3d6564]['pairId']=_0x5061a6[_0x2e00cc]['id'];}else _0x5061a6[_0x3d6564]['item']['startIndex']=_0x3d6564,_0x5061a6[_0x3d6564]['item']['endIndex']=_0x3d6564,_0x5061a6[_0x3d6564]['pairId']=null;}_0x5061a6[_0x3d6564]['markersStart']||(_0x5061a6[_0x3d6564]['markersStart']=[],_0x5061a6[_0x3d6564]['markersEnd']=[]);}}_markInsertions(_0x1ab229,_0x131cc3){const _0x517b92=_0x1ab229['filter'](_0x4934b7=>!_0x4934b7['isAdded']);for(let _0x268db9=0x0;_0x268db9<_0x131cc3['length'];_0x268db9++)_0x131cc3[_0x268db9]['isAdded']&&(_0x517b92[_0x268db9]['isAdded']=_0x131cc3[_0x268db9]['isAdded']);}_getDiff(_0x520783,_0x20e296=null){const _0x3b36cd=this['repository']['getRevision'](_0x520783),_0x2891cf=_0x20e296?this['repository']['getRevision'](_0x20e296):null,_0x2e24a4=this['_getRevisionsRange'](_0x3b36cd,_0x2891cf),_0x520d5b=_0x2e24a4[_0x2e24a4['length']-0x1],_0x19b9a4=new Map(),_0x80f42={'model':{},'attributes':{},'changes':[]},_0x383f99=new Set(),_0x1a1909=new Map();for(let _0x43397d=_0x2e24a4['length']-0x1;_0x43397d>=0x0;_0x43397d--){const _0x1fc1ae=_0x2e24a4[_0x43397d];for(const _0x4d01c8 of Object['keys'](_0x1fc1ae['diffData']))if(_0x1fc1ae['diffData'][_0x4d01c8]['attachChange']){const _0x38ff6a=_0x1fc1ae['diffData'][_0x4d01c8]['attachChange'];_0x38ff6a['isAttached']?(_0x383f99['add'](_0x4d01c8),_0x1a1909['has'](_0x4d01c8)&&_0x1a1909['get'](_0x4d01c8)['userId']==_0x38ff6a['userId']?_0x1a1909['delete'](_0x4d01c8):_0x1a1909['set'](_0x4d01c8,_0x38ff6a)):_0x1a1909['has'](_0x4d01c8)?(_0x383f99['delete'](_0x4d01c8),_0x1a1909['delete'](_0x4d01c8)):(_0x383f99['add'](_0x4d01c8),_0x1a1909['set'](_0x4d01c8,_0x38ff6a));}else _0x383f99['add'](_0x4d01c8);}for(const _0x292ba3 of _0x383f99){const _0x319fea=_0x1a1909['has'](_0x292ba3)&&!_0x1a1909['get'](_0x292ba3)['isAttached'];let _0x3953c3=_0x319fea?_0x2e24a4['length']-0x1:0x0;const _0xb6836c=_0x319fea?-0x1:0x1;for(;_0x2e24a4[_0x3953c3];){const _0x500bd1=_0x2e24a4[_0x3953c3];if(_0x500bd1['diffData'][_0x292ba3]){const _0x5da335=_0x319fea?_0x500bd1['diffData'][_0x292ba3]['attributesBefore']:_0x500bd1['diffData'][_0x292ba3]['attributesAfter'];_0x80f42['attributes'][_0x292ba3]=_0x5da335?_0x38b022(_0x5da335):{};break;}_0x3953c3+=_0xb6836c;}}for(const _0x493701 of _0x2e24a4){_0x493701['model']={};for(const _0x4608ff of _0x493701['authors'])_0x19b9a4['set'](_0x4608ff['id'],_0x4608ff);for(const _0x12c306 of _0x383f99){const _0xeb3edc=_0x493701['diffData'][_0x12c306]?_0x493701['diffData'][_0x12c306]['insertions']:'[]',_0x25d397=_0x493701['diffData'][_0x12c306]?_0x493701['diffData'][_0x12c306]['deletions']:'[]',_0x50ac78=_0x493701['diffData'][_0x12c306]?.['rootElementName']||'$root';_0x493701['model'][_0x12c306]={'insertions':this['_utils']['_makeModelFromViewString'](_0xeb3edc,_0x50ac78),'deletions':this['_utils']['_makeModelFromViewString'](_0x25d397,_0x50ac78)};}}for(const _0x4dce26 of _0x383f99){let _0x3d381b=null,_0x1321d8=0x0;const _0x4a9ca5=_0x2e24a4['map'](_0x131bac=>_0x131bac['diffData'][_0x4dce26]?.['rootElementName'])['find'](_0x35749e=>void 0x0!==_0x35749e)||'$root',_0x158ccc=new Map(Array['from'](_0x3b36cd['model'][_0x4dce26]['insertions']['markers'])['filter'](([_0x4c674a])=>!_0x4c674a['startsWith']('revision:')));let _0x1ba3e4=0x0;for(const _0x430b71 of _0x2e24a4){const _0x1a78a1=this['_makeTape'](_0x430b71['model'][_0x4dce26]['insertions']);_0x430b71==_0x3b36cd?(_0x3d381b=_0x1a78a1,_0x1321d8=_0x3d381b['length'],_0x3d381b['forEach'](_0x376b72=>{_0x376b72['id']=_0x1ba3e4++;}),this['_processTape'](_0x3d381b)):this['_markInsertions'](_0x3d381b,_0x1a78a1);const _0x386633=_0x3d381b['filter'](_0xd8fd8c=>!_0xd8fd8c['isAdded'])['map'](_0x3d6e9f=>_0x3d6e9f['id']);let _0x597480=0x0;const _0x3b4b15=this['_makeTape'](_0x430b71['model'][_0x4dce26]['deletions']);_0x3b4b15['forEach'](_0x344d58=>{_0x344d58['isRemoved']?_0x344d58['id']=_0x1321d8++:_0x344d58['id']=_0x386633[_0x597480++];}),this['_processTape'](_0x3b4b15),this['_setDistance'](_0x3d381b,'isAdded'),this['_setDistance'](_0x3b4b15,'isRemoved'),_0x430b71==_0x3b36cd&&this['_markMarkers'](_0x3d381b,_0x158ccc),_0x3d381b=this['_joinTapes'](_0x3d381b,_0x3b4b15),this['_refreshStartEndIndex'](_0x3d381b),this['_setDistance'](_0x3d381b,'isRemoved');}_0x3d381b=_0x3d381b['filter'](_0x183725=>!(_0x183725['isAdded']&&_0x183725['isRemoved']));const _0x5766c6=new Map(_0x520d5b['model'][_0x4dce26]['deletions']['markers']),_0x384035=new Set(_0x158ccc['keys']());for(const _0x2a83fc of _0x5766c6['keys']())_0x384035['delete'](_0x2a83fc);this['_markSuggestions'](_0x3d381b,_0x384035),this['_fixObsoleteTags'](_0x3d381b),_0x3d381b=this['_removeMissingPairs'](_0x3d381b),_0x3d381b=this['_markMismatchedRemovedTags'](_0x3d381b),_0x3d381b=this['_removeUnsupportedChanges'](_0x3d381b);const {root:_0x427722,changes:_0x2cc663}=this['_makeModelFromTape'](_0x3d381b,_0x19b9a4,_0x4dce26,_0x4a9ca5);_0x80f42['model'][_0x4dce26]=_0x427722;const _0x1ecceb=_0x1a1909['get'](_0x4dce26);if(_0x1ecceb){const _0x4b20e8=new Ot({'author':_0x19b9a4['get'](_0x1ecceb['userId']),'type':_0x1ecceb['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4dce26});_0x2cc663['unshift'](_0x4b20e8),_0x80f42['attributes'][_0x4dce26]['revisionHistoryAttachChange']=_0x4b20e8['id'];}_0x80f42['changes']=_0x80f42['changes']['concat'](_0x2cc663);}return _0x80f42;}['_markMarkers'](_0x4d33c3,_0x1a14da){for(let _0x1132ee=0x0;_0x1132ee<_0x4d33c3['length'];_0x1132ee++)for(const [_0x2c9b4b,_0xb9e7a6]of _0x1a14da)!_0xb9e7a6['isCollapsed']&&_0xb9e7a6['start']['isEqual'](_0x4d33c3[_0x1132ee]['previousPosition'])&&_0x4d33c3[_0x1132ee]['markersStart']['push'](_0x2c9b4b),_0xb9e7a6['end']['isEqual'](_0x4d33c3[_0x1132ee]['nextPosition'])&&_0x4d33c3[_0x1132ee]['markersEnd']['push'](_0x2c9b4b);}['_joinTapes'](_0x19b331,_0xf422f0){let _0x15a267=[],_0x24368d=0x0,_0x2f2676=0x0;for(;_0x24368d<_0x19b331['length']||_0x2f2676<_0xf422f0['length'];){const _0x51f8f5=_0x19b331[_0x24368d]||{},_0x1a15eb=_0xf422f0[_0x2f2676]||{};if(_0x51f8f5['id']==_0x1a15eb['id'])_0x24368d++,_0x2f2676++,_0x15a267['push'](_0x51f8f5);else{if(_0x1a15eb['isRemoved']&&_0x51f8f5['isAdded']){const {commonTape:_0x47424e,iEnd:_0xc9afd8,jEnd:_0x4cb79d}=this['_threeWayMerge'](_0x19b331,_0x24368d,_0xf422f0,_0x2f2676);_0x15a267=_0x15a267['concat'](_0x47424e),_0x24368d=_0xc9afd8,_0x2f2676=_0x4cb79d;}else _0x1a15eb['isRemoved']?(_0x2f2676++,_0x15a267['push'](_0x1a15eb)):(_0x24368d++,_0x15a267['push'](_0x51f8f5));}}return _0x15a267;}_markSuggestions(_0x2c7e3c,_0x1dfd2f){const _0x5a2b03=[];for(let _0x18e561=0x0;_0x18e561<_0x2c7e3c['length'];_0x18e561++){for(let _0x4037df=0x0;_0x4037df<_0x2c7e3c[_0x18e561]['markersStart']['length'];_0x4037df++){const _0x4b8a20=_0x2c7e3c[_0x18e561]['markersStart'][_0x4037df];if(!_0x1dfd2f['has'](_0x4b8a20))continue;const {group:_0x330083,type:_0x1d5809,authorId:_0x30a0b5}=_0x2bea53(_0x4b8a20);'revision-suggestion'!=_0x330083||'insertion'!=_0x1d5809&&'deletion'!=_0x1d5809||(_0x5a2b03['unshift']({'type':_0x1d5809,'name':_0x4b8a20,'userId':_0x30a0b5}),_0x2c7e3c[_0x18e561]['markersStart']['splice'](_0x4037df,0x1),_0x4037df--);}_0x3e73a4(_0x2c7e3c[_0x18e561]);for(let _0x29ad82=0x0;_0x29ad82<_0x2c7e3c[_0x18e561]['markersEnd']['length'];_0x29ad82++){const _0x2c86e3=_0x2c7e3c[_0x18e561]['markersEnd'][_0x29ad82];if(!_0x1dfd2f['has'](_0x2c86e3))continue;const {group:_0x27e5d1,type:_0x13e85e}=_0x2bea53(_0x2c86e3);if('revision-suggestion'!=_0x27e5d1||'insertion'!=_0x13e85e&&'deletion'!=_0x13e85e)continue;_0x2c7e3c[_0x18e561]['markersEnd']['splice'](_0x29ad82,0x1),_0x29ad82--;const _0xc37ae=_0x5a2b03['findIndex'](_0x341068=>_0x341068['name']==_0x2c86e3);_0xc37ae>-0x1&&_0x5a2b03['splice'](_0xc37ae,0x1);}}function _0x2bea53(_0x294999){const _0x342d3f=_0x294999['split'](':');return{'group':_0x342d3f[0x0],'type':_0x342d3f[0x1],'subType':_0x342d3f['length']>=0x5?_0x342d3f[0x2]:null,'id':_0x342d3f['length']<0x5?_0x342d3f[0x2]:_0x342d3f[0x3],'authorId':_0x342d3f['length']<0x5?_0x342d3f[0x3]:_0x342d3f[0x4],'markerCount':0x6==_0x342d3f['length']?_0x342d3f[0x5]:null};}function _0x3e73a4(_0x4c43a2){for(let _0x13f74d=0x0;_0x13f74d<_0x5a2b03['length'];_0x13f74d++){if(_0x4c43a2['isAdded']&&'insertion'==_0x5a2b03[_0x13f74d]['type']&&_0x4c43a2['isAdded']['userId']==_0x5a2b03[_0x13f74d]['userId'])return _0x4c43a2['isAddSuggestion']=_0x5a2b03[_0x13f74d],void delete _0x4c43a2['isAdded'];if(!_0x4c43a2['isAdded']&&!_0x4c43a2['isRemoved']&&'deletion'==_0x5a2b03[_0x13f74d]['type'])return void(_0x4c43a2['isRemoveSuggestion']=_0x5a2b03[_0x13f74d]);}}}_setDistance(_0x228423,_0x216b94){let _0x229963=0x0,_0x7ce979=!0x1;const _0x46d192=new Map();for(const _0x4c6518 of _0x228423)_0x4c6518[_0x216b94]?_0x7ce979&&(_0x229963++,_0x7ce979=!0x1):(_0x229963++,_0x7ce979=!0x0),_0x46d192['set'](_0x4c6518['id'],_0x229963);for(let _0x214c92=0x0;_0x214c92<_0x228423['length'];_0x214c92++){if('isRemoved'==_0x216b94&&_0x228423[_0x214c92]['isAdded']||'isAdded'==_0x216b94&&_0x228423[_0x214c92]['isRemoved'])continue;if('text'==_0x228423[_0x214c92]['type']){_0x228423[_0x214c92]['distance']=0x0;continue;}const _0x1d1062=_0x46d192['get'](_0x228423[_0x214c92]['pairId']),_0x215815=_0x46d192['get'](_0x228423[_0x214c92]['id']);_0x228423[_0x214c92]['distance']=_0x1d1062-_0x215815;}}_getRevisionsRange(_0x211283,_0x307db1,_0x108d0b=!0x1){const _0x33a237=[];let _0x32dc8b=this['repository']['getIndex'](_0x211283),_0x1603d1=this['repository']['getIndex'](_0x307db1);for(-0x1==_0x1603d1&&(_0x1603d1=this['repository']['_revisions']['length'],_0x108d0b=!0x1);_0x32dc8b<_0x1603d1;)_0x33a237['push'](this['repository']['getRevision'](_0x32dc8b)),_0x32dc8b++;return _0x108d0b&&_0x33a237['push'](this['repository']['getRevision'](_0x32dc8b)),_0x33a237;}_threeWayMerge(_0x29b7c6,_0x2674b9,_0x96e2b5,_0x3d0bf4){const _0xeac20f=this['editor']['model']['schema'];let _0x579802=_0x2674b9;for(;_0x29b7c6[_0x579802]&&_0x29b7c6[_0x579802]['isAdded'];)_0x579802++;let _0x433a2f=_0x3d0bf4;for(;_0x96e2b5[_0x433a2f]&&_0x96e2b5[_0x433a2f]['isRemoved'];)_0x433a2f++;_0x199d3f(_0x29b7c6,_0x2674b9,_0x579802),_0x199d3f(_0x96e2b5,_0x3d0bf4,_0x433a2f);const _0x4baadd=_0x96e2b5['slice'](_0x3d0bf4,_0x433a2f)['concat'](_0x29b7c6['slice'](_0x2674b9,_0x579802));return _0x4baadd['sort']((_0x1997d7,_0x83b5ff)=>_0x1997d7['side']!=_0x83b5ff['side']?_0x1997d7['side']-_0x83b5ff['side']:_0x1997d7['level']!=_0x83b5ff['level']?_0x1997d7['level']-_0x83b5ff['level']:_0x1997d7['distance']!=_0x83b5ff['distance']?_0x83b5ff['distance']-_0x1997d7['distance']:!!_0x1997d7['isAdded']!=!!_0x83b5ff['isAdded']?-0x1==_0x1997d7['side']||0x0==_0x1997d7['side']?_0x1997d7['isAdded']?-0x1:0x1:_0x1997d7['isAdded']?0x1:-0x1:_0x1997d7['index']-_0x83b5ff['index']),{'commonTape':_0x4baadd,'iEnd':_0x579802,'jEnd':_0x433a2f};function _0x199d3f(_0x2700f4,_0x34e309,_0x144cb0){let _0x28897e=-0x1,_0x3b245b=Number['POSITIVE_INFINITY'],_0x142bfb=!0x0;for(let _0x1b9ada=_0x34e309;_0x1b9ada<_0x144cb0;_0x1b9ada++)if(_0xeac20f['isInline'](_0x2700f4[_0x1b9ada]['item'])||(_0x142bfb=!0x1),_0x2700f4[_0x1b9ada]['item']['startIndex']<_0x34e309&&(_0x28897e=_0x1b9ada),_0x2700f4[_0x1b9ada]['item']['endIndex']>=_0x144cb0){_0x3b245b=_0x1b9ada;break;}_0x142bfb&&(_0x28897e=_0x144cb0-0x1);for(let _0x4da596=_0x34e309;_0x4da596<_0x144cb0;_0x4da596++)_0x2700f4[_0x4da596]['side']=_0x4da596<=_0x28897e?-0x1:_0x4da596<_0x3b245b?0x0:0x1,_0x2700f4[_0x4da596]['index']=_0x4da596;let _0x5561e7=0x0;for(let _0x5aecdd=_0x34e309;_0x5aecdd<=_0x28897e;_0x5aecdd++)0x0==_0x2700f4[_0x5aecdd]['distance']?_0x2700f4[_0x5aecdd]['level']=_0x5561e7:(_0x5561e7++,_0x2700f4[_0x5aecdd]['level']=_0x5561e7,_0x5561e7++);for(let _0x28b615=_0x34e309;_0x28b615<_0x144cb0;_0x28b615++)0x0==_0x2700f4[_0x28b615]['side']&&(_0x2700f4[_0x28b615]['level']=_0x5561e7);_0x5561e7=0x0;for(let _0x3f9f83=_0x144cb0-0x1;_0x3f9f83>=_0x3b245b;_0x3f9f83--)0x0==_0x2700f4[_0x3f9f83]['distance']?_0x2700f4[_0x3f9f83]['level']=_0x5561e7:(_0x5561e7--,_0x2700f4[_0x3f9f83]['level']=_0x5561e7,_0x5561e7--);}}_fixObsoleteTags(_0x94c8e3){const _0x47bf8f=new Map(),_0x34ab96=this['editor']['model']['schema'];for(let _0x55eae2=0x1;_0x55eae2<_0x94c8e3['length'];_0x55eae2++){let _0x520ee7,_0x30502a,_0x10af5;const _0x3b37ec=_0x94c8e3[_0x55eae2],_0x17d853=_0x94c8e3[_0x55eae2-0x1];if('text'==_0x3b37ec['type'])continue;if(_0x3b37ec['type']!=_0x17d853['type'])continue;if(!_0x34ab96['isBlock'](_0x17d853['item'])||_0x34ab96['isLimit'](_0x17d853['item']))continue;if(!_0x34ab96['isBlock'](_0x3b37ec['item'])||_0x34ab96['isLimit'](_0x3b37ec['item']))continue;if((_0x94c8e3[_0x55eae2]['isAdded']||_0x94c8e3[_0x55eae2]['isAddSuggestion'])&&_0x94c8e3[_0x55eae2-0x1]['isRemoved'])_0x520ee7=_0x94c8e3[_0x55eae2],_0x30502a=_0x94c8e3[_0x55eae2-0x1],_0x10af5=_0x55eae2-0x1;else{if(!_0x94c8e3[_0x55eae2]['isRemoved']||!_0x94c8e3[_0x55eae2-0x1]['isAdded']&&!_0x94c8e3[_0x55eae2-0x1]['isAddSuggestion'])continue;_0x520ee7=_0x94c8e3[_0x55eae2-0x1],_0x30502a=_0x94c8e3[_0x55eae2],_0x10af5=_0x55eae2;}const _0x89f986=_0x520ee7['level']==_0x30502a['level'],_0x786e5c=Math['abs'](_0x520ee7['level'])<Math['abs'](_0x30502a['level'])&&0x0==_0x30502a['distance'];(_0x89f986||_0x786e5c)&&(_0x47bf8f['set'](_0x30502a['id'],_0x520ee7['id']),_0x94c8e3['splice'](_0x10af5,0x1),_0x55eae2--,_0x520ee7['isAdded']=!0x1);}for(let _0x41ca9e=0x0;_0x41ca9e<_0x94c8e3['length'];_0x41ca9e++)_0x47bf8f['has'](_0x94c8e3[_0x41ca9e]['pairId'])&&(_0x94c8e3[_0x41ca9e]['pairId']=_0x47bf8f['get'](_0x94c8e3[_0x41ca9e]['pairId']));}['_removeMissingPairs'](_0x38e547){const _0x2a4a84=new Set(_0x38e547['map'](_0x425947=>_0x425947['id']));for(let _0xd67b87=0x0;_0xd67b87<_0x38e547['length'];_0xd67b87++)_0x2a4a84['has'](_0x38e547[_0xd67b87]['pairId'])||0x0==_0x38e547[_0xd67b87]['distance']||(_0x38e547[_0xd67b87]['isIncorrect']=!0x0);return _0x38e547['filter'](_0x5a01f0=>!_0x5a01f0['isIncorrect']);}_markMismatchedRemovedTags(_0x5205db){const _0x1c9680=new Set();for(let _0x285be3=0x0;_0x285be3<_0x5205db['length'];_0x285be3++){if(_0x1c9680['has'](_0x5205db[_0x285be3]['id'])&&_0x5205db[_0x285be3]['isRemoved']&&(_0x5205db[_0x285be3]['isIncorrect']=!0x0),_0x5205db[_0x285be3]['isIncorrect'])continue;if(0x0==_0x5205db[_0x285be3]['distance'])continue;if('elementStart'!=_0x5205db[_0x285be3]['type'])continue;if(null==_0x5205db[_0x285be3]['pairId'])continue;let _0x4ac566=_0x285be3+0x1,_0x5c4fab=0x0;for(;_0x5205db[_0x4ac566]['id']!=_0x5205db[_0x285be3]['pairId'];)'elementStart'==_0x5205db[_0x4ac566]['type']?_0x5c4fab++:'elementEnd'==_0x5205db[_0x4ac566]['type']&&_0x5c4fab--,_0x4ac566++;if(0x0!=_0x5c4fab){if(_0x5205db[_0x285be3]['isRemoved'])_0x5205db[_0x285be3]['isIncorrect']=!0x0;else{for(;_0x4ac566!=_0x285be3;)_0x5205db[_0x4ac566]['isRemoved']&&0x0!=_0x5205db[_0x4ac566]['distance']&&(_0x5205db[_0x4ac566]['isIncorrect']=!0x0,_0x1c9680['add'](_0x5205db[_0x4ac566]['pairId'])),_0x4ac566--;}}}return _0x5205db['filter'](_0xd492da=>!_0xd492da['isIncorrect']);}_removeUnsupportedChanges(_0x4c50fe){const _0x45cd32=this['editor']['model']['schema'];for(let _0x4cabe0=0x0;_0x4cabe0<_0x4c50fe['length'];_0x4cabe0++){if(!(_0x4c50fe[_0x4cabe0]['isAdded']||_0x4c50fe[_0x4cabe0]['isAddSuggestion']||_0x4c50fe[_0x4cabe0]['isRemoved']||_0x4c50fe[_0x4cabe0]['isRemoveSuggestion']))continue;if(0x0==_0x4c50fe[_0x4cabe0]['distance'])continue;const _0x44391e=_0x4c50fe[_0x4cabe0]['item'];_0x45cd32['isBlock'](_0x44391e)||_0x45cd32['isLimit'](_0x44391e)||(_0x4c50fe[_0x4cabe0]['isAdded']&&delete _0x4c50fe[_0x4cabe0]['isAdded'],_0x4c50fe[_0x4cabe0]['isAddSuggestion']&&delete _0x4c50fe[_0x4cabe0]['isAddSuggestion'],_0x4c50fe[_0x4cabe0]['isRemoveSuggestion']&&delete _0x4c50fe[_0x4cabe0]['isRemoveSuggestion'],_0x4c50fe[_0x4cabe0]['isRemoved']&&(_0x4c50fe[_0x4cabe0]['isIncorrect']=!0x0));}return _0x4c50fe['filter'](_0x53fff8=>!_0x53fff8['isIncorrect']);}['_makeModelFromTape'](_0x13c67e,_0x57cf38,_0x4f24a1,_0x5d4c3f){const _0x48efb6=new _0xdc5c7c(),_0x41a1c8=[],_0x3fb3f7=new Map(),_0x224d2d=this['editor']['model'],_0x232bc5=_0x224d2d['schema'],_0x2d4956=[_0x48efb6],_0x5d3d3a={},_0x1fc4c5={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x48efb6['name']=_0x5d4c3f;let _0x733937=null;const _0xde67f1=[0x0];for(let _0x5e4a72=0x0;_0x5e4a72<_0x13c67e['length'];_0x5e4a72++)if('elementStart'===_0x13c67e[_0x5e4a72]['type']){_0x13c67e[_0x5e4a72]['previousPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1);const _0x399c49=new _0x8d1ceb(_0x13c67e[_0x5e4a72]['item']['name'],_0x13c67e[_0x5e4a72]['item']['getAttributes']());_0x2d4956[0x0]['_appendChild'](_0x399c49),_0xde67f1['push'](0x0),_0x2d4956['unshift'](_0x399c49),_0x13c67e[_0x5e4a72]['nextPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1);}else'elementEnd'===_0x13c67e[_0x5e4a72]['type']?(_0x2d4956['shift'](),_0x13c67e[_0x5e4a72]['previousPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1),_0xde67f1['pop'](),_0xde67f1[_0xde67f1['length']-0x1]++,_0x13c67e[_0x5e4a72]['nextPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1)):(_0x13c67e[_0x5e4a72]['previousPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1),_0x733937?_0x733937['_data']+=_0x13c67e[_0x5e4a72]['item']['data']:_0x733937=new _0x1ad521(_0x13c67e[_0x5e4a72]['item']['data'],_0x13c67e[_0x5e4a72]['item']['getAttributes']()),_0x13c67e[_0x5e4a72+0x1]&&'text'===_0x13c67e[_0x5e4a72+0x1]['type']&&_0x1a2cac(_0x733937,_0x13c67e[_0x5e4a72+0x1]['item'])||(_0x2d4956[0x0]['_appendChild'](_0x733937),_0x733937=null),_0xde67f1[_0xde67f1['length']-0x1]+=_0x13c67e[_0x5e4a72]['item']['offsetSize'],_0x13c67e[_0x5e4a72]['nextPosition']=_0x224d2d['createPositionFromPath'](_0x48efb6,_0xde67f1));for(let _0x3293c6=0x0;_0x3293c6<_0x13c67e['length'];_0x3293c6++){const _0x6d7f88=_0x13c67e[_0x3293c6]['previousPosition'],_0x1f813a=_0x13c67e[_0x3293c6]['nextPosition'];for(const _0x1f15d0 of _0x13c67e[_0x3293c6]['markersStart'])_0x3fb3f7['set'](_0x1f15d0,{'start':_0x6d7f88,'end':null});_0x46042b('isRemoveSuggestion',_0x3293c6,_0x6d7f88,_0x1f813a),_0x46042b('isAddSuggestion',_0x3293c6,_0x6d7f88,_0x1f813a),_0x46042b('isRemoved',_0x3293c6,_0x6d7f88,_0x1f813a),_0x46042b('isAdded',_0x3293c6,_0x6d7f88,_0x1f813a);for(const _0x3e5bee of _0x13c67e[_0x3293c6]['markersEnd']){const _0x2770b2=_0x3fb3f7['get'](_0x3e5bee);_0x2770b2?_0x2770b2['end']=_0x1f813a:_0x3fb3f7['set'](_0x3e5bee,{'start':_0x1f813a,'end':_0x1f813a});}}for(const [_0x25ac70,_0x26f0dc]of _0x3fb3f7){const _0x5764e3=this['editor']['model']['createRange'](_0x26f0dc['start'],_0x26f0dc['end']);_0x48efb6['markers']['set'](_0x25ac70,_0x5764e3);}return _0x41a1c8['sort']((_0x88d13c,_0x325239)=>{const _0x2f6119=_0x48efb6['markers']['get']('revision:'+_0x88d13c['id']),_0x64f7ce=_0x48efb6['markers']['get']('revision:'+_0x325239['id']);return _0x2f6119['start']['isBefore'](_0x64f7ce['start'])?-0x1:_0x2f6119['start']['isAfter'](_0x64f7ce['start'])?0x1:_0x2f6119['end']['isBefore'](_0x64f7ce['end'])?-0x1:_0x2f6119['end']['isAfter'](_0x64f7ce['end'])?0x1:'add'===_0x88d13c['type']?-0x1:0x1;}),{'root':_0x48efb6,'changes':_0x41a1c8};function _0x46042b(_0x2c81f4,_0x2680a5,_0x45bcb7,_0x5b28cd){const _0x17b165=!!_0x13c67e[_0x2680a5][_0x2c81f4],_0x36b924=_0x17b165?_0x13c67e[_0x2680a5][_0x2c81f4]['userId']:null,_0x1ada47=_0x2680a5===_0x13c67e['length']-0x1,_0x564900=_0x1fc4c5[_0x2c81f4][0x0],_0x32cf4f=_0x232bc5['isObject'](_0x13c67e[_0x2680a5]['item']);!_0x5d3d3a[_0x2c81f4]&&_0x17b165?_0x5d3d3a[_0x2c81f4]={'start':_0x45bcb7,'tapeItem':_0x13c67e[_0x2680a5],'userId':_0x36b924,'type':_0x2c81f4}:_0x5d3d3a[_0x2c81f4]&&!_0x17b165?(_0x5d3d3a[_0x2c81f4]['end']=_0x45bcb7,_0x2dce10(_0x5d3d3a[_0x2c81f4]),_0x5d3d3a[_0x2c81f4]=null):_0x5d3d3a[_0x2c81f4]&&_0x17b165&&_0x5d3d3a[_0x2c81f4]['userId']!==_0x36b924&&(_0x5d3d3a[_0x2c81f4]['end']=_0x45bcb7,_0x564900&&_0x564900['userId']===_0x5d3d3a[_0x2c81f4]['userId']||_0x2dce10(_0x5d3d3a[_0x2c81f4]),_0x5d3d3a[_0x2c81f4]={'start':_0x45bcb7,'tapeItem':_0x13c67e[_0x2680a5],'userId':_0x36b924,'type':_0x2c81f4}),_0x5d3d3a[_0x2c81f4]&&_0x32cf4f&&('elementStart'!==_0x13c67e[_0x2680a5]['type']||_0x564900&&_0x564900['userId']===_0x36b924||_0x1fc4c5[_0x2c81f4]['unshift']({'userId':_0x36b924,'object':_0x13c67e[_0x2680a5]['item'],'change':_0x5d3d3a[_0x2c81f4]}),'elementEnd'===_0x13c67e[_0x2680a5]['type']&&_0x564900&&_0x564900['object']===_0x13c67e[_0x2680a5]['item']&&(_0x1fc4c5[_0x2c81f4]['shift'](),_0x5d3d3a[_0x2c81f4]=_0x564900['change'])),_0x5d3d3a[_0x2c81f4]&&_0x1ada47&&(_0x5d3d3a[_0x2c81f4]['end']=_0x5b28cd,_0x2dce10(_0x5d3d3a[_0x2c81f4]),_0x5d3d3a[_0x2c81f4]=null);}function _0x2dce10({start:_0x2ea5f3,end:_0x2d7b95,tapeItem:_0xa8df82,userId:_0x485c54,type:_0x137c80}){const _0x59a951=_0xa8df82['item'],_0x505f84=_0x224d2d['schema']['isBlock'](_0x59a951)&&!_0x224d2d['schema']['isLimit'](_0x59a951),_0x497bf4=_0x2ea5f3['nodeAfter']==_0x2d7b95['parent']&&_0x2d7b95['isAtStart'];if(_0x505f84&&_0x497bf4)return;const _0x2d5703=_0x224d2d['createRange'](_0x2ea5f3,_0x2d7b95),_0x368468=new Ot({'author':_0x57cf38['get'](_0x485c54),'type':'isAdded'==_0x137c80||'isAddSuggestion'==_0x137c80?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x137c80||'isRemoveSuggestion'==_0x137c80},'createdAt':new Date(),'rootName':_0x4f24a1});_0x41a1c8['push'](_0x368468),_0x48efb6['markers']['set']('revision:'+_0x368468['id'],_0x2d5703);}function _0x1a2cac(_0x4dc993,_0x50df85){const _0x10234a=_0x4dc993['getAttributes'](),_0x26ab2b=_0x50df85['getAttributes']();for(const _0x239e9e of _0x10234a){if(_0x239e9e[0x1]!==_0x50df85['getAttribute'](_0x239e9e[0x0]))return!0x1;_0x26ab2b['next']();}return _0x26ab2b['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x188f49=>{const _0xb14fbc=_0x188f49['markerName']['split'](':')[0x1],_0x5e3a06=this['_getChangeFromId'](_0xb14fbc);if(!_0x5e3a06)return null;const _0x5ff80e='add'==_0x5e3a06['type']?'insertion':'deletion',_0x405376=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5ff80e];return _0x5e3a06['data']['isSuggestion']&&_0x405376['push']('ck-suggestion-marker-'+_0x5ff80e+'-new'),this['activeChange']==_0x5e3a06&&_0x405376['push']('ck-suggestion-marker--active'),{'classes':_0x405376,'attributes':{'data-change-id':_0xb14fbc}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x3f119d=>{_0x3f119d['on']('element:pre',(_0x5b3e4b,_0x5d7c93,_0x3a14dd)=>{const _0x4ce81e=_0x5d7c93['viewItem']['getChild'](0x0);if(!_0x4ce81e||!_0x4ce81e['is']('element','code'))return;if(!_0x3a14dd['consumable']['consume'](_0x4ce81e,{'attributes':['vid_start','vid_end']}))return;const _0x4f1016=_0x5d7c93['modelRange']['start']['nodeAfter'];_0x3a14dd['writer']['setAttribute']('vid_start',_0x4ce81e['getAttribute']('vid_start'),_0x4f1016),_0x3a14dd['writer']['setAttribute']('vid_end',_0x4ce81e['getAttribute']('vid_end'),_0x4f1016);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x551523=>{_0x551523['on']('element',(_0x17bbfb,_0x2a9b41,_0x4396e8)=>{if(!_0x4396e8['consumable']['consume'](_0x2a9b41['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x2a9b41['modelRange']['isCollapsed'])return;const _0x3b217e=_0x2a9b41['modelRange']['start']['nodeAfter'];_0x3b217e['hasAttribute']('vid_start')||_0x3b217e['hasAttribute']('vid')||(_0x4396e8['writer']['setAttribute']('vid_start',_0x2a9b41['viewItem']['getAttribute']('vid_start'),_0x3b217e),_0x4396e8['writer']['setAttribute']('vid_end',_0x2a9b41['viewItem']['getAttribute']('vid_end'),_0x3b217e));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x398258=>_0x398258['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0xf798c4,[,_0x22a1a7])=>{['vid_start','vid_end','vid']['includes'](_0x22a1a7)&&(_0xf798c4['return']=!0x0,_0xf798c4['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x14056e=>{_0x14056e['on']('attribute:vid',(_0x1862d7,_0x9d6d9b,_0x46fce7)=>{if('\x20'!=_0x9d6d9b['item']['data']||_0x9d6d9b['item']['parent']['maxOffset']>0x1)return;if(!_0x46fce7['consumable']['consume'](_0x9d6d9b['item'],_0x1862d7['name']))return;const _0x255e82=_0x46fce7['writer'],_0x4fde56=_0x46fce7['mapper']['toViewRange'](_0x9d6d9b['range']);_0x255e82['wrap'](_0x4fde56,_0x255e82['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4c353b){const _0x1b5871=_0x4c353b['plugins']['get']('RevisionViewer');return(_0x1f55a0,_0x324163,_0x92ff64)=>{const _0x1f7cc9=_0x324163['markerName']['split'](':')[0x1],_0xeb206=_0x1b5871['_getChangeFromId'](_0x1f7cc9);if(!_0xeb206)return null;const _0x3cfebd='add'==_0xeb206['type']?'split':'merge';if(!_0x92ff64['consumable']['test'](_0x324163['markerRange'],_0x1f55a0['name']))return;const _0x1ad8ac=_0x324163['markerRange']['getWalker'](),_0x5416ae=_0x324163['markerRange']['start'],_0x4752b9=_0x4c353b['model']['schema'];let _0x4df9b1=null,_0x4187ab=null,_0x37ff4e=!0x1,_0x44d557=!0x1;for(const _0x6dce80 of _0x1ad8ac){const _0x4beb29=_0x6dce80['item'];_0x37ff4e=_0x37ff4e||_0x4752b9['isContent'](_0x4beb29);const _0x2c8ee0=_0x92ff64['mapper']['toViewElement'](_0x4beb29);if(_0x2c8ee0&&_0x2c8ee0['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x6dce80['type']&&(_0x4752b9['isBlock'](_0x4beb29)&&!_0x4752b9['isLimit'](_0x4beb29)&&(_0x4beb29['nextSibling']||_0x5416ae['isAtEnd']?_0x4df9b1&&_0x4df9b1['parent']==_0x4beb29||(_0x4df9b1=_0x4beb29,_0x628944(_0x6dce80['previousPosition']),_0x44d557=!0x0):_0x4187ab=_0x4187ab||_0x6dce80['previousPosition']));}function _0x628944(_0x4f44ce){const _0x4e3e81=_0x92ff64['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3cfebd}),_0x4eba34=_0x92ff64['mapper']['toViewPosition'](_0x4f44ce);_0xeb206['data']['isSuggestion']&&_0x92ff64['writer']['addClass']('ck-suggestion-marker-'+_0x3cfebd+'-new',_0x4e3e81),_0x1b5871['activeChange']==_0xeb206&&_0x92ff64['writer']['addClass']('ck-suggestion-marker--active',_0x4e3e81),_0x92ff64['writer']['insert'](_0x4eba34,_0x4e3e81),_0x92ff64['mapper']['bindElementToMarker'](_0x4e3e81,_0x324163['markerName']);}_0x37ff4e||_0x44d557||!_0x4187ab||_0x628944(_0x4187ab);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1ec69a,_0x26a10d,_0x47c5ae)=>{const _0x23dd01=_0x47c5ae['mapper']['markerNameToElements'](_0x26a10d['markerName']);if(_0x23dd01){for(const _0x11d508 of _0x23dd01)(_0x11d508['hasClass']('ck-suggestion-marker-split')||_0x11d508['hasClass']('ck-suggestion-marker-merge'))&&(_0x47c5ae['mapper']['unbindElementFromMarkerName'](_0x11d508,_0x26a10d['markerName']),_0x47c5ae['writer']['remove'](_0x11d508));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x40d04f,_0x27504b,_0x5274cd)=>{const _0x556316=_0x27504b['markerName']['split'](':')[0x1],_0x153924=this['_getChangeFromId'](_0x556316);if(!_0x153924)return null;const _0x4d08cd='add'==_0x153924['type']?'split':'merge';if(_0x5274cd['consumable']['test'](_0x27504b['markerRange'],_0x40d04f['name']))for(const _0x35f0db of _0x27504b['markerRange']['getItems']()){if(!_0x35f0db['is']('element','softBreak'))continue;const _0x3d92d0=_0x5274cd['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4d08cd}),_0xc4df13=_0x5274cd['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x35f0db));_0x153924['data']['isSuggestion']&&_0x5274cd['writer']['addClass']('ck-suggestion-marker-'+_0x4d08cd+'-new',_0x3d92d0),this['activeChange']==_0x153924&&_0x5274cd['writer']['addClass']('ck-suggestion-marker--active',_0x3d92d0),_0x5274cd['writer']['insert'](_0xc4df13,_0x3d92d0),_0x5274cd['mapper']['bindElementToMarker'](_0x3d92d0,_0x27504b['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1c9d73=>{for(const _0x2e7945 of this['editor']['model']['document']['getRootNames']()){const _0x4d88d0=this['editor']['model']['document']['getRoot'](_0x2e7945),_0x52d8d4=this['editor']['editing']['view']['document']['getRoot'](_0x2e7945);if(_0x52d8d4){const _0x218d1b=_0x4d88d0['getAttribute']('revisionHistoryAttachChange');if(_0x1c9d73['removeAttribute']('data-change-id',_0x52d8d4),_0x1c9d73['removeClass']('ck-revision-history-root-add',_0x52d8d4),_0x1c9d73['removeClass']('ck-revision-history-root-remove',_0x52d8d4),_0x1c9d73['removeClass']('ck-revision-history-root--active',_0x52d8d4),_0x218d1b){const _0x2ab70a=this['_getChangeFromId'](_0x218d1b);if(!_0x2ab70a)return null;_0x1c9d73['setAttribute']('data-change-id',_0x218d1b,_0x52d8d4),_0x1c9d73['addClass']('ck-revision-history-root-'+_0x2ab70a['type'],_0x52d8d4),this['activeChange']==_0x2ab70a&&_0x1c9d73['addClass']('ck-revision-history-root--active',_0x52d8d4);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4c75be=>'revision-comment:'+_0x4c75be,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x178e7b=>'revision-suggestion:'+_0x178e7b,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x6b9a3c=>({'name':'suggestion:'+_0x6b9a3c,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x2d7abb=>{const _0x3b6d2a=_0x2d7abb['markerName']['split'](':')[0x1];return'insertion'!=_0x3b6d2a&&'deletion'!=_0x3b6d2a?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3b6d2a]};}}),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',(_0x3fa491,_0x2b2b98,_0x25ef37)=>{const _0x222c87=_0x25ef37['mapper']['markerNameToElements'](_0x2b2b98['markerName']);if(_0x222c87){for(const _0x130ab2 of _0x222c87)_0x130ab2['is']('uiElement')&&(_0x25ef37['mapper']['unbindElementFromMarkerName'](_0x130ab2,_0x2b2b98['markerName']),_0x25ef37['writer']['remove'](_0x130ab2));}},{'priority':'high'});}_getChangeFromId(_0x527269){return this['_changeIdToChange']['get'](_0x527269);}_getViewForChange(_0x238cd9){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x238cd9),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4f7ef2,_0x27db2e,_0x185864,_0x424a8a)=>{_0x424a8a&&this['_balloon']['remove'](_0x424a8a),_0x185864&&(this['_balloon']['add']({'view':_0x185864,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x506f9b=this['editor']['editing'],_0x412576=this['_getChangeFromId'](_0x185864['changeId']);let _0x546d24;if(_0x412576['data']['isOnRoot']){const _0x59d11e=_0x506f9b['view']['getDomRoot'](_0x412576['rootName']);_0x546d24=Array['from'](_0x59d11e['getClientRects']());}else{const _0x2e3882=this['editor']['model']['markers']['get']('revision:'+_0x185864['changeId']);_0x546d24=Array['from'](_0x506f9b['mapper']['markerNameToElements'](_0x2e3882['name']))['map'](_0x11f309=>_0x506f9b['view']['domConverter']['mapViewToDom'](_0x11f309))['map'](_0x3b56aa=>Array['from'](_0x3b56aa['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x546d24['find'](_0x589975=>_0x589975['top']-0x3<=this['_activeViewTarget']['y']&&_0x589975['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x589975['left']-0x3<=this['_activeViewTarget']['x']&&_0x589975['right']+0x3>=this['_activeViewTarget']['x'])||_0x546d24[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x39e01a,_0x26cfc1,_0x1d2de2,_0x44d02b)=>{this['activeView']=_0x1d2de2?this['_getViewForChange'](_0x1d2de2):null,this['editor']['model']['change'](()=>{const _0x1fe402=this['editor']['editing'];_0x44d02b&&(_0x44d02b['data']['isOnRoot']?_0x1fe402['view']['change'](_0x349c33=>{_0x349c33['removeClass']('ck-revision-history-root--active',_0x1fe402['view']['document']['getRoot'](_0x44d02b['rootName']));}):_0x1fe402['reconvertMarker']('revision:'+_0x44d02b['id'])),_0x1d2de2&&(_0x1d2de2['data']['isOnRoot']?_0x1fe402['view']['change'](_0x34215f=>{_0x34215f['addClass']('ck-revision-history-root--active',_0x1fe402['view']['document']['getRoot'](_0x1d2de2['rootName']));}):_0x1fe402['reconvertMarker']('revision:'+_0x1d2de2['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x535c26,_0x1ea513)=>{if(this['activeChange'])return;const _0x3463ac=this['_findChangeIdFromDomTarget'](_0x1ea513['target']),_0x55dacd=this['_changeIdToChange']['get'](_0x3463ac);_0x55dacd?(this['_activeViewTarget']={'x':_0x1ea513['domEvent']['x'],'y':_0x1ea513['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x55dacd)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2eeafb,_0x23eb0f)=>{const _0x51c76e=this['_findChangeIdFromDomTarget'](_0x23eb0f['target']),_0x4d6ae4=this['_changeIdToChange']['get'](_0x51c76e);_0x4d6ae4?(this['_activeViewTarget']={'x':_0x23eb0f['domEvent']['x'],'y':_0x23eb0f['domEvent']['y']},_0x4d6ae4===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x4d6ae4):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x5011bd){do{const _0x34869c=_0x5011bd['getAttribute']('data-change-id');if(_0x34869c)return _0x34869c;_0x5011bd=_0x5011bd['parent'];}while(_0x5011bd);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5282c3=>{for(const _0x22df64 of this['editor']['model']['markers'])_0x5282c3['removeMarker'](_0x22df64);});}};function Vt(_0x2c33a1,_0x14a718){return(_0x1b3aa3,_0x4f06e2,_0x2048eb)=>{if(!_0x2048eb['consumable']['test'](_0x4f06e2['markerRange'],_0x1b3aa3['name']))return;const _0x16b1cf=_0x4f06e2['markerRange']['getWalker'](),_0x41b836=_0x4f06e2['markerRange']['start'],_0x4ba28b=_0x2c33a1['model']['schema'];let _0xb816cc=null,_0x1da973=null,_0x246715=!0x1,_0x2dcedd=!0x1;for(const _0x596963 of _0x16b1cf){const _0x253582=_0x596963['item'];_0x246715=_0x246715||_0x4ba28b['isContent'](_0x253582);const _0x15f564=_0x2048eb['mapper']['toViewElement'](_0x253582);if(_0x15f564&&_0x15f564['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x596963['type']&&(_0x4ba28b['isBlock'](_0x253582)&&!_0x4ba28b['isLimit'](_0x253582)&&(_0x253582['nextSibling']||_0x41b836['isAtEnd']?_0xb816cc&&_0xb816cc['parent']==_0x253582||(_0xb816cc=_0x253582,_0x4f47a7(_0x596963['previousPosition']),_0x2dcedd=!0x0):_0x1da973=_0x1da973||_0x596963['previousPosition']));}function _0x4f47a7(_0x4b859e){const _0x1095d0=_0x2048eb['mapper']['toViewPosition'](_0x4b859e),_0x16d09f=_0x2048eb['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x14a718});_0x2048eb['writer']['insert'](_0x1095d0,_0x16d09f),_0x2048eb['mapper']['bindElementToMarker'](_0x16d09f,_0x4f06e2['markerName']);}_0x246715||_0x2dcedd||!_0x1da973||_0x4f47a7(_0x1da973);};}var Dt=class extends _0x29f6e0{constructor(_0x36fe47){super(_0x36fe47);const _0x52528a=_0x36fe47['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x52528a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x52528a,'change:isEnabled',()=>this['refresh']());}execute(){const _0x34ca0b=this['editor'],_0x5d2144=_0x34ca0b['plugins']['get'](Mt),_0x1dfcec=_0x5d2144['isReady']?_0x5d2144['diff']['newRevisionId']:null;_0x34ca0b['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1dfcec);}['refresh'](){const {isReady:_0x3b5fe1,isEnabled:_0x25faec,repository:_0x542726,diff:_0x444685}=this['editor']['plugins']['get'](Mt),_0x1fd664=_0x444685&&_0x542726['getLaterVisibleRevision'](_0x444685['newRevisionId']);this['isEnabled']=_0x3b5fe1&&_0x25faec&&Boolean(_0x1fd664);}},Tt=class extends _0x29f6e0{_step;constructor(_0x383641,{direction:_0x2b0566}){super(_0x383641);const _0x5ce424=_0x383641['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x2b0566?0x1:-0x1,this['listenTo'](_0x5ce424,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5ce424,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5ce424,'change:activeChange',()=>this['refresh']());}execute(){const _0x446c8b=this['editor'],_0x138ff9=_0x446c8b['plugins']['get'](Mt),{isNavigationMode:_0x3983b8,currentChangeNumber:_0x4c0836}=_0x138ff9;let _0x466771;if(_0x138ff9['activeChange']=_0x3983b8?_0x138ff9['diff']['changes']['get'](_0x4c0836+this['_step']):_0x138ff9['diff']['changes']['first'],_0x138ff9['activeChange']['data']['isOnRoot'])_0x466771=_0x446c8b['editing']['view']['getDomRoot'](_0x138ff9['activeChange']['rootName']);else{const _0x24a978=_0x446c8b['model']['markers']['get']('revision:'+_0x138ff9['activeChange']['id']);_0x466771=_0x4a37b2(_0x446c8b['editing'],_0x24a978);}_0x2382f3({'target':_0x466771,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x304d1b,currentChangeNumber:_0x2c3a7c,numberOfChanges:_0x4696be,isReady:_0x39c113,isEnabled:_0x2c6b7c}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x2c6b7c&&_0x39c113&&_0x4696be)&&(!_0x304d1b||(0x1===this['_step']?_0x2c3a7c<_0x4696be-0x1:_0x2c3a7c>0x0));}},Ht=class extends at{constructor(_0x5980ae){super(_0x5980ae);const _0x3ce388=this['bindTemplate'],_0x100064=new _0x112eb0(_0x5980ae),_0x490159=new _0x112eb0(_0x5980ae);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',(_0x3accb5,_0x193147)=>_0x3accb5&&_0x193147>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4e2e35,_0x1703d3,_0x3f221e,_0x303da0)=>{if(!_0x4e2e35)return pt(_0x5980ae,'Loading...');if(!_0x3f221e)return pt(_0x5980ae,'No\x20changes');const _0x3bc1b8=pt(_0x5980ae,'NUMBER_OF_CHANGES',_0x3f221e);return _0x303da0?pt(_0x5980ae,'X_OF_Y_CHANGES',[_0x1703d3+0x1,_0x3f221e]):_0x3bc1b8;}),_0x100064['set']({'label':pt(_0x5980ae,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x70c06a}),_0x490159['set']({'label':pt(_0x5980ae,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4eb334}),_0x100064['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x490159['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x100064['on']('execute',()=>this['fire']('execute','backward')),_0x490159['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',_0x3ce388['if']('_isStatusLabelVisible','ck-hidden',_0x12e8c1=>!_0x12e8c1)]},'children':[{'text':_0x3ce388['to']('isNavigationMode',_0x533e37=>_0x533e37?pt(_0x5980ae,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x5980ae,'Total')+':\x20')}]},{'text':_0x3ce388['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x100064,_0x490159]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x57c795{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x44a22e=this['editor']['editing']['view'];_0x44a22e['change'](_0x53de01=>{for(const _0x87460e of _0x44a22e['document']['roots'])_0x53de01['addClass'](Pt,_0x87460e);});}['hide'](){const _0x437b58=this['editor']['editing']['view'];_0x437b58['change'](_0x5176b6=>{for(const _0x29c074 of _0x437b58['document']['roots'])_0x5176b6['removeClass'](Pt,_0x29c074);});}},Lt=class extends _0x57c795{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Mt,Ut];}init(){const _0x435e1f=this['editor'],_0x8777b7=_0x435e1f['plugins']['get'](Mt),_0x26cf68=_0x435e1f['plugins']['get'](Ut);_0x435e1f['ui']['componentFactory']['add']('exitToEditing',_0x534f9f=>{const _0x2b7169=new _0x112eb0(_0x534f9f);return _0x2b7169['set']({'label':pt(_0x534f9f,'Back\x20to\x20editing'),'icon':_0x3ba824,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x2b7169,'execute',()=>{_0x435e1f['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x2b7169;}),_0x435e1f['ui']['componentFactory']['add']('restoreRevision',_0x44fe5e=>{const _0x589e26=new _0x112eb0(_0x44fe5e);return _0x589e26['set']({'label':pt(_0x44fe5e,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x589e26['bind']('isEnabled')['to'](_0x435e1f['commands']['get']('restoreRevision')),this['listenTo'](_0x589e26,'execute',()=>_0x435e1f['execute']('restoreRevision')),_0x589e26;}),_0x435e1f['ui']['componentFactory']['add']('changesNavigation',_0x3f4ae3=>{const _0x5a42c4=new Ht(_0x3f4ae3),_0x97f09f=_0x435e1f['commands']['get']('showPreviousChange'),_0x250e85=_0x435e1f['commands']['get']('showNextChange');return _0x5a42c4['bind']('isBackwardNavigationEnabled')['to'](_0x97f09f,'isEnabled'),_0x5a42c4['bind']('isForwardNavigationEnabled')['to'](_0x250e85,'isEnabled'),_0x5a42c4['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x8777b7),this['listenTo'](_0x5a42c4,'execute',(_0x361efb,_0x4b5f6c)=>{_0x435e1f['execute']('forward'===_0x4b5f6c?'showNextChange':'showPreviousChange');}),_0x5a42c4;}),_0x26cf68['show'](),_0x8777b7['on']('change:isReady',(_0x13279c,_0x4b658e,_0x4ca3ca)=>{_0x4ca3ca?_0x26cf68['hide']():_0x26cf68['show']();});}},Ft=class extends _0xd50028{['_resizeObserver']=null;constructor(_0x996fc5,_0x19dae6){super(_0x996fc5,_0x19dae6);const _0x3c5fdd=this['bindTemplate'];this['set']({'label':pt(_0x996fc5,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x996fc5,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3c5fdd['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x2261be(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x13ca39=this['fieldView']['element'];this['_tooltipString']=_0x13ca39['scrollWidth']>_0x13ca39['clientWidth']&&_0x13ca39['value']||'';}},$t=class extends at{constructor(_0xa87d9,_0x402c09,_0x5f44c8){super(_0xa87d9);const _0xe06582=new _0x56e938();_0xe06582['set']({'content':_0x51cd25,'viewBox':'0\x200\x2011\x2010'});const _0xf698f=['ck','ck-revision-history-sidebar__revision-author'];_0x5f44c8&&_0xf698f['push']('ck-revision-history-sidebar__revision-author_creator');const _0x2c9fb7=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0xa87d9,_0x5f44c8?'Revision\x20creator':'Revision\x20author')},'children':[_0xe06582,_0x402c09['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xf698f},'children':_0x2c9fb7});}};function jt(_0x8657ed,_0xa05507){const _0x27c097=_0x8657ed['bindTemplate'],_0x183080=_0x8657ed['locale'],_0x1a1cdb=ct(_0x183080);_0x1a1cdb['panelPosition']='sw';const _0x2d21f0=function(_0x5e6a40,_0x581201){const _0x220015=function(_0x585773,_0x269929){const _0x1e0b97=_0x585773['locale'],_0x349343={'Compare\x20against\x20selected':pt(_0x1e0b97,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x1e0b97,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x1e0b97,'Restore\x20this\x20revision')};return _0x269929['map'](_0x28ee04=>{const _0x2f5176=_0x349343[_0x28ee04['name']];return _0x2f5176&&_0x2f5176!==_0x28ee04['name']&&(_0x28ee04['name']=_0x2f5176),_0x28ee04;});}(_0x5e6a40,_0x581201),_0x32c629=new _0x4a1e3f();for(const _0x318b30 of _0x220015){const _0x48cfaa={'type':'button','model':new rt({'label':_0x318b30['name'],'class':_0x318b30['class'],'withText':!0x0,'role':'menuitem','_action':_0x318b30['action']})};_0x48cfaa['model']['bind']('isEnabled')['to'](_0x5e6a40,'isActionsDropdownOpen',_0x17b2cc=>'function'!=typeof _0x318b30['isEnabled']||(!_0x17b2cc||_0x318b30['isEnabled'](_0x5e6a40))),_0x32c629['add'](_0x48cfaa);}return _0x32c629;}(_0x8657ed,_0xa05507);return _0x8657ed['bind']('isActionsDropdownOpen')['to'](_0x1a1cdb,'isOpen'),_0x1a1cdb['buttonView']['set']({'label':pt(_0x183080,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x482ded}),_0x1a1cdb['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x27c097['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x27c097['to'](_0x280b1f=>_0x280b1f['stopPropagation']())}}),_0x1a1cdb['on']('execute',_0x358317=>{_0x8657ed['isReady']&&'function'==typeof _0x358317['source']['_action']&&_0x358317['source']['_action'](_0x8657ed);}),ht(_0x1a1cdb,_0x2d21f0,{'role':'menu'}),_0x1a1cdb['listenTo'](_0x8657ed,'change:isActionsDropdownOpen',(_0x628704,_0x266a65,_0x4095a2)=>{if(_0x4095a2)for(const _0x58237e of _0x1a1cdb['listView']['items']){const _0x37d985=_0x58237e['children']['first'],_0x2bf05a=_0xa05507['find'](_0xc40f2=>_0xc40f2['action']===_0x37d985['_action'])['isVisible'];_0x58237e['isVisible']=void 0x0===_0x2bf05a||_0x2bf05a(_0x8657ed);}}),_0x1a1cdb;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x5d1660(at);var Kt=class extends Bt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;constructor(_0x30ffb0,_0xe06364,_0x3c9f8f,_0x39f869){super(_0x30ffb0);const _0xd81e9a=this['bindTemplate'],_0x2bd7f5=function(_0x9f8ab4,_0x2c848f){const _0x51ae9a=Array['from'](_0x2c848f['authors'])['filter'](_0x167516=>_0x167516!=_0x2c848f['creator']);return _0x2c848f['creator']&&_0x51ae9a['unshift'](_0x2c848f['creator']),_0x51ae9a['map'](_0x2e9913=>new $t(_0x9f8ab4,_0x2e9913,_0x2e9913==_0x2c848f['creator']));}(_0x30ffb0,_0xe06364);this['id']=_0xe06364['id'],this['_revision']=_0xe06364,this['_requireRevisionName']=_0x39f869,this['bind']('name','createdAt')['to'](_0xe06364),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x15fd9e=>{return _0x3294c4=_0x30ffb0['uiLanguage'],(_0x4995d2=_0x15fd9e)['toLocaleDateString'](_0x3294c4,{'month':'long','day':'numeric'})+',\x20'+_0x4995d2['toLocaleTimeString'](_0x3294c4,{'hour':'numeric','minute':'numeric'});var _0x3294c4,_0x4995d2;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Ft(_0x30ffb0,lt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3b0da7=>_0x3b0da7||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x5671c9,_0x1afdea)=>_0x5671c9&&_0x1afdea),this['revisionActionsView']=_0x3c9f8f&&_0x3c9f8f['length']?jt(this,_0x3c9f8f):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0xd81e9a['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0xd81e9a['if']('isEnabled','ck-disabled',_0x168884=>!_0x168884),_0xd81e9a['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0xd81e9a['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0xd81e9a['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':_0xd81e9a['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':_0x2bd7f5}]},this['revisionActionsView']],'on':{'click':_0xd81e9a['to'](_0x843a3e=>{_0x843a3e['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x25d193=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x25d193,'change',()=>{this['_requireRevisionName']&&!_0x25d193['value']||this['fire']('setName',{'id':this['id'],'name':_0x25d193['value']}),_0x25d193['value']||(_0x25d193['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(_0x5e6e9d,_0x1fd797){const _0x2ee728=ft['fromJSDate'](_0x5e6e9d)['setLocale'](_0x1fd797),_0x48ac03=ft['local'](),_0x27f656=_0x48ac03['minus']({'days':0x1})['startOf']('day');let _0x59097b,_0x45917c;return _0x2ee728['hasSame'](_0x48ac03,'day')?(_0x59097b=_0x2ee728['startOf']('day')['toJSDate'](),_0x45917c=_0x2ee728['toRelativeCalendar']()):_0x2ee728['hasSame'](_0x27f656,'day')?(_0x59097b=_0x27f656['toJSDate'](),_0x45917c=_0x2ee728['toRelativeCalendar']()):_0x2ee728['hasSame'](_0x48ac03,'week')?(_0x59097b=_0x2ee728['startOf']('week')['toJSDate'](),_0x45917c=_0x2ee728['weekdayLong']||''):_0x2ee728['hasSame'](_0x48ac03,'year')?(_0x59097b=_0x2ee728['startOf']('month')['toJSDate'](),_0x45917c=_0x2ee728['monthLong']||''):(_0x59097b=_0x2ee728['startOf']('year')['toJSDate'](),_0x45917c=String(_0x2ee728['year'])),{'startDate':_0x59097b,'localizedPeriodName':_0x45917c};}var Gt=class extends at{startDate;['revisionViews'];_revisionActions;_requireRevisionName;constructor(_0x7f4f51,_0x4cb52a,_0x2b5597,_0x2b1fdf){super(_0x7f4f51);const _0x1f9515=qt(_0x4cb52a,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4cb52a,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x2b5597,this['_requireRevisionName']=_0x2b1fdf,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':_0x1f9515}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1141b2){const _0x4821b9=new Kt(this['locale'],_0x1141b2,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4821b9);}['removeRevision'](_0x7309e0){const _0x11b5ab=this['revisionViews']['find'](_0x141802=>_0x141802['id']===_0x7309e0['id']);this['revisionViews']['remove'](_0x11b5ab);}},Jt=class extends at{constructor(_0x2e2f08){super(_0x2e2f08);const _0x28992e=new _0x56e938();_0x28992e['content']=_0x116443,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x28992e,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[pt(_0x2e2f08,'Revision\x20history')]}]});}},Wt=class extends at{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;constructor(_0x1bf6da,_0x66f67b,_0x5cdbce,_0xfeac52){super(_0x1bf6da);const _0x980ea2=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x66f67b,this['_revisionActions']=_0x5cdbce,this['_requireRevisionName']=_0xfeac52,this['on']('select',(_0x144ca5,_0x55e94)=>{this['fire']('revisionSelected',_0x55e94);}),this['on']('setName',(_0x5bd7e8,_0x527c54)=>{this['fire']('revisionSetName',_0x527c54);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Jt(_0x1bf6da),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x980ea2['if']('isEnabled','ck-disabled',_0x2823d5=>!_0x2823d5)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0xce31e0 of this['_revisions'])this['_addRevision'](_0xce31e0);this['_revisions']['on']('add',(_0x1f0507,_0x18c728)=>{this['_addRevision'](_0x18c728);}),this['_revisions']['on']('remove',(_0x1d7436,_0x116a68)=>{this['_removeRevision'](_0x116a68);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x411c8e=>_0x411c8e['revisionViews']['map'](_0x4183b8=>_0x4183b8))['flat']();}selectRevision(_0x500ca4){for(const _0x52ee53 of this['revisionViews'])_0x500ca4&&_0x500ca4['id']===_0x52ee53['id']?_0x52ee53['select']():_0x52ee53['deselect']();}highlightRevisions(_0x5b3840){for(const _0x3819d3 of this['revisionViews'])_0x5b3840['some'](({id:_0x438d40})=>_0x438d40===_0x3819d3['id'])?_0x3819d3['highlight']():_0x3819d3['unhighlight']();}['_addRevision'](_0x460dc2){const _0x26d0b0=qt(_0x460dc2['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x46c8a5=this['_getTimePeriodViewByStartDate'](_0x26d0b0);_0x46c8a5||(_0x46c8a5=new Gt(this['locale'],_0x26d0b0,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x46c8a5)),_0x46c8a5['addRevision'](_0x460dc2);}['_removeRevision'](_0x12b0dc){const _0x3867a1=qt(_0x12b0dc['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x3867a1)['removeRevision'](_0x12b0dc);}_getTimePeriodViewByStartDate(_0x199d4c){return this['timePeriodViews']['find'](_0x5e13dc=>_0x5e13dc['startDate']['getTime']()===_0x199d4c['getTime']());}},Yt=class RevisionsSidebar extends _0x57c795{['_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(_0x1597c0){super(_0x1597c0),this['_revisionViewer']=_0x1597c0['plugins']['get'](Mt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x4ae7d5=this['_revisionsRepository']['_revisions'],_0x2ebd70=this['_createRevisionActions'](),_0x394009=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Wt(this['editor']['locale'],_0x4ae7d5,_0x2ebd70,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',(_0x23b6a4,_0x3aae8e)=>{_0x3aae8e['revisionViews']['on']('add',(_0x1367ee,_0x389c2c)=>{_0x389c2c['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)),_0x394009['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x2bb867=this['_revisionsRepository']['getRevision'](0x0);if(_0x2bb867){const _0x2d4905=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2bb867['id']);this['_revisionViewer']['compare'](_0x2bb867,_0x2d4905);}}_handleRevisionSelected(_0x69c033,_0x3c059e){const _0x44f295=this['_revisionsRepository']['getRevision'](_0x3c059e['id']),_0x144602=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x44f295['id']);this['_revisionViewer']['compare'](_0x44f295,_0x144602);}_handleRevisionSetName(_0xe072cf,_0xcbf686){this['_revisionsRepository']['getRevision'](_0xcbf686['id'])['setName'](_0xcbf686['name']);}['_handleDiffChange'](_0x147949,_0x35075e,_0x438045){const _0x17dc86=this['_revisionsRepository']['getRevisionsInDiff'](_0x438045);_0x17dc86['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x17dc86),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x17dc86[0x0]));}_createRevisionActions(){const _0x55f3ef=this['editor'],_0x529292=RevisionsSidebar['availableRevisionActions'],_0x48f8c2=_0x55f3ef['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x48f8c2['length'])return _0x48f8c2['map'](_0x5ce0c3=>{const _0x284913='string'==typeof _0x5ce0c3?Object['assign']({},_0x529292[_0x5ce0c3]):_0x5ce0c3;return _0x284913['action']=_0x284913['action']['bind'](this,_0x55f3ef),_0x284913['isVisible']&&(_0x284913['isVisible']=_0x284913['isVisible']['bind'](this,_0x55f3ef)),_0x284913;});}};function Xt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x425499},_0x13f814)=>{const _0x43ee01=_0x425499['get'](Mt),_0xc4e114=_0x43ee01['repository'];let _0xfe8d02=_0x43ee01['diff']['newRevisionId'],_0x14385e=_0x13f814['id'];_0xc4e114['getIndex'](_0xfe8d02)>_0xc4e114['getIndex'](_0x14385e)&&([_0xfe8d02,_0x14385e]=[_0x14385e,_0xfe8d02]),_0x43ee01['compare'](_0xfe8d02,_0x14385e);},'isVisible':({plugins:_0x46d1ff},_0x1b2706)=>{const _0x451a37=_0x46d1ff['get'](Mt);return!(_0x451a37['repository']['getRevisionsInDiff'](_0x451a37['diff'])['length']>0x2)&&!_0x1b2706['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x3cf73f,{id:_0x4c2434})=>{_0x3cf73f['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4c2434);},'isVisible':({plugins:_0x3047ac},_0x9b06d5)=>!!_0x3047ac['get'](Mt)['repository']['getLaterVisibleRevision'](_0x9b06d5['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4052e3},{id:_0x5a9d8a,revisionNameView:_0x46a5d8})=>{const _0x3c2bba=_0x4052e3['get'](Mt),_0x5053d1=_0x3c2bba['repository']['getEarlierVisibleRevision'](_0x5a9d8a);_0x3c2bba['compare'](_0x5a9d8a,_0x5053d1),_0x46a5d8['focus'](),_0x46a5d8['fieldView']['select']();}}};}var Qt=class extends _0x3893d1{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x28929d,_0x5d9775){super(_0x28929d),this['_view']=_0x5d9775,this['_toolbarConfig']=ut(_0x28929d['config']['get']('toolbar')),this['_elementReplacer']=new _0xa15115();}get element(){return this['view']['element'];}init(_0x3e6dd3){const _0x46648e=this['editor'],_0x3863fe=this['view'],_0x9312ca=_0x46648e['editing']['view'],_0x146ce6=_0x3863fe['editable'];_0x146ce6['name']=_0x9312ca['document']['getRoot']()['rootName'],_0x3863fe['render']();const _0x39e2a5=_0x146ce6['element'];this['setEditableElement'](_0x146ce6['name'],_0x39e2a5),_0x3863fe['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x9312ca['attachDomRoot'](_0x39e2a5),this['_elementReplacer']['replace'](_0x3e6dd3,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x49dde5=this['view'],_0x22ee35=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x22ee35['detachDomRoot'](_0x49dde5['editable']['name']),_0x49dde5['destroy']();}_initToolbar(){const _0x39f346=this['view'];_0x39f346['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x39f346['stickyPanel']['limiterElement']=_0x39f346['element'],_0x39f346['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x3674f7})=>_0x3674f7),_0x39f346['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x39f346['toolbar']);}},zt=class extends _0x3b2c1e{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x47ae5a,_0x1d25f5,_0x35af91={}){super(_0x47ae5a),this['stickyPanel']=new st(_0x47ae5a),this['toolbar']=new ot(_0x47ae5a,{'shouldGroupWhenFull':_0x35af91['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x4c416b(_0x47ae5a,_0x1d25f5);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const Zt=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x4842fe(_0xd42421);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2e3d68,_0x5b1c0e){super(_0x5b1c0e),this['sourceElement']=_0x2e3d68,this['model']['document']['createRoot']();const _0x4470d2=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x4470d2);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x4bd08f,_0x35b398){const _0x402238=new this(_0x4bd08f,_0x35b398);return await _0x402238['initPlugins'](),await _0x402238['ui']['init'](_0x4bd08f),await _0x402238['data']['init'](_0x402238['config']['get']('initialData')||''),_0x402238['fire']('ready'),_0x402238;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x57c795{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x332d6a){super(_0x332d6a),this['result']='end',_0x332d6a['editing']['view']['_overlayModeHint']='auto',_0x332d6a['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x57c795{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_t,St];}constructor(_0x5b5d17){if(super(_0x5b5d17),!this['editor']['config']['get']('revisionHistory'))throw new _0x5234db('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x416463=>this['_showRevisionViewer']({..._0x416463,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4c847a=>this['_closeRevisionViewer'](_0x4c847a)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x57d268=>this['_restoreRevision'](_0x57d268)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x2a20ac){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2a20ac;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x4ee2ff){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4ee2ff);}getRevision(_0x121a2b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x121a2b);}getRevisions(_0x33a747){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x33a747||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x107a51=this['editor'],_0x1d8d57=_0x2d8a3c(_0x107a51,ii),_0x13e191=_0x107a51['plugins']['get']('RevisionTracker'),_0x1de6e2=_0x107a51['plugins']['get'](_0x3e15a4)['users'];return _0x1d8d57['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1d8d57['lazyRoots'],(_0x1d8d57['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x57c795{static get requires(){return[Mt,_0x3e15a4];}init(){const _0x1e7222=this['editor']['plugins']['get'](_0x3e15a4);for(const _0x41d593 of _0x1de6e2)_0x41d593['isAnonymous']||_0x1e7222['getUser'](_0x41d593['id'])||_0x1e7222['addUser'](_0x41d593);const _0x1889e4=_0x13e191['repository']['getRevisions']();let _0x410474=null;const _0x5d3a94=this['editor']['plugins']['get']('RevisionViewer');_0x5d3a94['adapter']=_0x13e191['adapter'],_0x5d3a94['bind']('isEnabled')['to'](_0x13e191),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x107a51,'isReadOnly',_0x498b53=>!_0x498b53);for(const _0x1005ae of _0x1889e4){const _0x4b42e1=null===_0x1005ae['creator'];if(_0x4b42e1&&_0x1005ae['toVersion']===_0x1005ae['fromVersion'])continue;const _0x45518f=_0x1005ae['toJSON']();_0x5d3a94['addRevisionData'](_0x45518f,(_0x22254b,_0xa2654f,_0x1f8065)=>{if(_0x4b42e1){if(_0x410474)_0x410474['_update'](_0x22254b,_0xa2654f);else{if(!_0xa2654f){const _0x37e0aa=_0x1f8065['toJSON']();_0x37e0aa['id']=_0xb49d28(),_0x13e191['saveRevision'](_0x37e0aa,_0x1f8065['toVersion'])['then'](_0x2906c5=>{_0x410474=_0x2906c5;});}}}else _0x1005ae['_update'](_0x22254b,_0xa2654f);});}}},Yt),_0x1d8d57);}['_enhanceShowRevisionViewerCallback'](){const _0x557dfe=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x21c6e4=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x21c6e4['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x55e806=this['editor']['plugins']['get']('Dialog');_0x55e806['isOpen']&&_0x55e806['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x4de3be=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x364bfe of _0x4de3be)_0x364bfe['class']=_0x364bfe['class']?_0x364bfe['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x2f4e1e=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2f4e1e&&_0x2f4e1e['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x829bf4=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x829bf4&&_0x829bf4['setAttribute']('tabindex','-1');}}const _0x1520de=this['_getRevisionViewerEditorConfig']();return _0x557dfe(_0x1520de)['then'](_0x2569d9=>(this['_viewerEditor']=_0x2569d9,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'),_0x2569d9))['catch'](_0x4cbc65=>(console['error'](_0x4cbc65),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x362f5e=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 _0x30888d=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4d58d1 of _0x30888d)_0x4d58d1['class']='ck-tab-panel_disabled'===_0x4d58d1['class']?'':_0x4d58d1['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5662a2=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5662a2&&_0x5662a2['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x7eeac=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x7eeac&&_0x7eeac['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x362f5e(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x24c744=this['editor']['plugins']['get']('Annotations');_0x24c744['refreshVisibility'](),_0x24c744['refreshPositioning']();}});});}['_showRevisionViewer'](_0x45aaa2){const _0x5d8b84=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2a3465=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x32ab14=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x32ab14,_0x45aaa2)['then'](_0x7b9df=>(_0x2a3465['style']['display']='block',_0x5d8b84['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x7b9df));}['_closeRevisionViewer'](_0x13d47f){const _0xbf9386=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0xbf9386['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x13d47f['destroy']();}async _restoreRevision(_0x60ba1e){const _0x32e9c5=this['editor'],_0x9080db=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0xc98c9=_0x32e9c5['plugins']['get']('RevisionTracker'),_0x4a8f13=_0x32e9c5['plugins']['get']('RevisionHistoryUtils'),_0x1ac05c=_0x9080db['repository']['getRevision'](_0x60ba1e);let _0x25b8b6,_0x1fc895,_0x2acc61;try{await _0x4a8f13['loadRevisionData'](_0x1ac05c,this['adapter']),_0x25b8b6=_0x4a8f13['getRevisionDocumentData'](_0x1ac05c),_0x1fc895=_0x4a8f13['getRevisionRootsAttributes'](_0x1ac05c);}catch(_0x52aa71){return void console['error'](_0x52aa71);}_0x32e9c5['model']['change'](_0x27c39d=>{for(const _0x3f2c9a of Array['from'](_0x32e9c5['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x27c39d['removeMarker'](_0x3f2c9a);}),_0x9080db['isReady']=!0x1,_0x32e9c5['model']['enqueueChange'](_0x52dab7=>{_0x52dab7['setSelection'](null),_0x52dab7['removeSelectionAttribute'](_0x32e9c5['model']['document']['selection']['getAttributeKeys']());const _0x34588b=Object['keys'](_0x25b8b6);for(const _0x16a470 of _0x32e9c5['model']['document']['roots'])'$graveyard'!=_0x16a470['rootName']&&_0x16a470['isAttached']()&&!_0x34588b['includes'](_0x16a470['rootName'])&&_0x52dab7['detachRoot'](_0x16a470);for(const _0x59d357 of _0x34588b){let _0x1e4f4b=_0x32e9c5['model']['document']['getRoot'](_0x59d357);if(!_0x1e4f4b||!_0x1e4f4b['isAttached']()){const _0x26b811=_0x1ac05c['diffData']?.[_0x59d357]?.['rootElementName']||'$root';_0x1e4f4b=_0x52dab7['addRoot'](_0x59d357,_0x26b811);}const _0x156040=_0x1fc895[_0x59d357],_0x37f897=Object['keys'](_0x156040),_0x4b2b60=_0x25b8b6[_0x59d357];for(const _0x282039 of _0x1e4f4b['getAttributeKeys']())_0x37f897['includes'](_0x282039)||_0x52dab7['removeAttribute'](_0x282039,_0x1e4f4b);for(const _0x23cb08 of _0x37f897)_0x52dab7['setAttribute'](_0x23cb08,_0x1fc895[_0x59d357][_0x23cb08],_0x1e4f4b);_0x52dab7['remove'](_0x52dab7['createRangeIn'](_0x1e4f4b)),_0x52dab7['insert'](_0x32e9c5['data']['parse'](_0x4b2b60,_0x1e4f4b),_0x1e4f4b,0x0);}});const _0x51bbc7=pt(_0x32e9c5['locale'],'Restored');if(_0x1ac05c['name'])_0x2acc61=-0x1==_0x1ac05c['name']['indexOf'](_0x51bbc7)?_0x51bbc7+':\x20'+_0x1ac05c['name']:_0x1ac05c['name'];else _0x2acc61=_0x51bbc7+':\x20'+(_0x1ac05c['createdAt']['toLocaleDateString'](_0x32e9c5['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x1ac05c['createdAt']['toLocaleTimeString'](_0x32e9c5['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0xc98c9['saveRevision']({'name':_0x2acc61}),_0x9080db['isReady']=!0x0,_0x32e9c5['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};
|