@ckeditor/ckeditor5-revision-history 49.0.0-alpha.7 → 49.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{CKEditorError as
|
|
24
|
-
_0x4d35f();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x1737f7){super(),this['id']=_0x1737f7['id']||_0x27f7da(),this['creator']=_0x1737f7['creator']||null,this['authors']=_0x1737f7['authors']||[],this['diffData']=_0x1737f7['diffData']||null,this['toVersion']=_0x1737f7['toVersion']||0x0,this['fromVersion']=_0x1737f7['fromVersion']||0x0,this['set']('name',_0x1737f7['name']||''),this['set']('createdAt',_0x1737f7['createdAt']||new Date()),this['set']('attributes',_0x1737f7['attributes']||{});}setName(_0x20d02f){this['_update']({'name':_0x20d02f});}setAttribute(_0x3c8417,_0x1c38be){const _0x19b1b0=_0x1721d7(this['attributes']);_0x178a34(_0x19b1b0,_0x3c8417,_0x1c38be),this['_update']({'attributes':_0x19b1b0});}removeAttribute(_0x2d4732){const _0x31d7cc=_0x1721d7(this['attributes']);_0x3c216b(_0x31d7cc,_0x2d4732),this['_update']({'attributes':_0x31d7cc});}_update(_0x4dac7b,_0x3e0fd3=!0x1){let _0xb3847f=!0x1;const _0x28ca0f={'id':this['id']};for(const _0x3a6942 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x24a80e=_0x4dac7b[_0x3a6942];void 0x0!==_0x24a80e&&_0x24a80e!==this[_0x3a6942]&&(this[_0x3a6942]=_0x24a80e,_0x28ca0f[_0x3a6942]=_0x24a80e,_0xb3847f=!0x0);}_0xb3847f&&(_0x28ca0f['authors']&&(_0x28ca0f['authorsIds']=_0x28ca0f['authors']['map'](_0x3853d3=>_0x3853d3['id']),delete _0x28ca0f['authors']),this['fire']('_update',_0x28ca0f,_0x3e0fd3));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2e9965=>_0x2e9965['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0xc765d1{['_revisions'];static get requires(){return[_0x369e38];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x13c792){super(_0x13c792),this['_revisions']=new _0x2a4b06();}afterInit(){!async function(_0xc716e7){const _0x5add18='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x1ea3b0=0xeb829,_0x44b5aa=0x797a0,_0x571352={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x407059(_0x1ee10f){const _0x1ec9a5=new window['Promise'](_0x185a85=>{_0x1ee10f['once']('ready',_0x185a85);}),_0x3ad451=window['Date']['now'](),_0x54b43e=_0x1ee10f['config']['get']('licenseKey');async function _0x3c836d(){let _0x4c4637,_0x7c893f=null,_0x51824e=null;try{return'GPL'==_0x54b43e?'NotAllowed':(_0x4c4637=_0x1ca048(),_0x4c4637?(_0x4c4637['usageEndpoint']&&(_0x51824e=_0x32001c(_0x4c4637['usageEndpoint'],_0x4c4637['jti'])),await _0xe02d2e()?_0x575ac3()?_0x56175d()?'Expired':_0x362e2f()?('evaluation'==_0x4c4637['licenseType']&&(_0x7c893f=_0x4c5ab6('EvaluationLimit')),await _0x2a241e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x56175d(){const _0x2fa9cc=['evaluation','trial']['includes'](_0x4c4637['licenseType'])?_0x3ad451/0x3e8:0xe10*_0x44b5aa;return _0x4c4637['exp']<_0x2fa9cc;}function _0x575ac3(){const _0x19bd88=_0x4c4637['features'];if(!_0x19bd88)return!0x1;if(_0x19bd88['includes']('*'))return!0x0;if(_0x19bd88['includes']('RH'))return!0x0;if(_0x19bd88['includes']('RRH')){if(_0x4a072e())return!0x0;if(_0x21d642()||_0x5d044f())return!0x0;}return!0x1;}function _0x362e2f(){const _0x1b749c=_0x4c4637['licensedHosts'];if(!_0x1b749c||0x0==_0x1b749c['length'])return!0x0;const {hostname:_0x341fd0}=new URL(window['location']['href']);if(_0x1b749c['includes'](_0x341fd0))return!0x0;const _0x1cbb56=_0x341fd0['split']('.');return _0x1b749c['filter'](_0x31fa45=>_0x31fa45['includes']('*'))['map'](_0x8ed5a5=>_0x8ed5a5['split']('.'))['filter'](_0x2ec206=>_0x2ec206['length']<=_0x1cbb56['length'])['map'](_0x15e116=>Array(_0x1cbb56['length']-_0x15e116['length'])['fill']('*'===_0x15e116[0x0]?'*':'')['concat'](_0x15e116))['some'](_0x227a75=>_0x1cbb56['every']((_0x1dc47f,_0x55ca7f)=>_0x227a75[_0x55ca7f]===_0x1dc47f||'*'===_0x227a75[_0x55ca7f]));}function _0x2a241e(){return _0x7c893f&&_0x51824e?new window['Promise']((_0x520a89,_0x9a02fc)=>{_0x7c893f['then'](_0x520a89,_0x9a02fc),_0x51824e['then'](_0x277d40=>{'Valid'!=_0x277d40&&_0x520a89(_0x277d40);},_0x9a02fc);}):_0x7c893f||_0x51824e||'Valid';}}function _0x32001c(_0x315539,_0x46491a){return new window['Promise'](_0x2dac7e=>{if(_0x4d901b())return _0x2dac7e('Valid');_0x55ad1c(),_0x1ee10f['decorate']('_sendUsageRequest');let _0x5e5d36=!0x1;const _0x4b7ad1=_0x27f7da();function _0x507a16(_0x5a4b2f){return!!_0x5a4b2f&&('object'==typeof _0x5a4b2f||'function'==typeof _0x5a4b2f)&&'function'==typeof _0x5a4b2f['then']&&'function'==typeof _0x5a4b2f['catch'];}function _0x134bdf(_0x175809){_0x207f19(_0x175809)['then'](_0xc7d31a=>_0xc7d31a&&'ok'==_0xc7d31a['status']?_0x34b3b7(_0x3a1b45(_0x4b7ad1+_0x46491a))!=_0xc7d31a['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x390397=>(_0x5bd4e6(),_0x390397),()=>{const _0x305487=_0xe9a11b();return null==_0x305487?(_0x5bd4e6(),'Valid'):_0x3ad451-_0x305487>0x240c8400?'UsageLimit':'Valid';})['then'](_0x2dac7e)['catch'](()=>{_0x2dac7e('UsageLimit');});const _0x4053d2=0x36ee80;function _0x5bd4e6(){const _0x53e90f='llct-'+_0x34b3b7(_0x3a1b45(_0x315539)),_0x53878d=_0x2633c2(_0x34b3b7(window['Math']['ceil'](_0x3ad451/_0x4053d2)));window['localStorage']['setItem'](_0x53e90f,_0x53878d);}function _0xe9a11b(){const _0x45ebc7='llct-'+_0x34b3b7(_0x3a1b45(_0x315539)),_0x9f7b9c=window['localStorage']['getItem'](_0x45ebc7);return _0x9f7b9c?window['parseInt'](_0x2633c2(_0x9f7b9c),0x10)*_0x4053d2:null;}function _0x207f19(_0x181094){return new window['Promise']((_0x55c832,_0x568a90)=>{_0x181094['then'](_0x55c832,_0x568a90),window['setTimeout'](_0x568a90,0x1d4c0);});}}_0x1ee10f['on']('_sendUsageRequest',(_0x49d624,_0x1a2143)=>{if(_0x1a2143[0x0]!=_0x315539)return _0x2dac7e('UsageLimit');_0x1a2143[0x1]={..._0x1a2143[0x1],'requestId':_0x4b7ad1};},{'priority':'high'}),_0x1ee10f['on']('_sendUsageRequest',_0x2a370d=>{_0x507a16(_0x2a370d['return'])&&(_0x5e5d36=!0x0,_0x134bdf(_0x2a370d['return']));},{'priority':'low'}),_0x1ec9a5['then'](()=>{_0x5e5d36||_0x2dac7e('UsageLimit');});});function _0x4d901b(){return'auto'==_0x1ee10f['editing']['view']['_overlayModeHint'];}function _0x55ad1c(){_0x1ee10f['editing']['view']['_overlayModeHint']='auto';}}function _0x4c5ab6(_0x5bab8f){const _0x2761bf=[new window['Promise'](_0x34b0f4=>setTimeout(_0x34b0f4,0x93ecc)),_0x1ec9a5['then'](()=>new window['Promise'](_0x2014b9=>{const _0x257b7e=0x7,_0x4c0c69=_0xc716e7['_revisions'];function _0x3b992c(){_0x4c0c69['length']>=_0x257b7e&&_0x2014b9();}_0x3b992c(),_0x4c0c69['on']('add',_0x3b992c);})),new window['Promise'](_0x18a36b=>{function _0x4bbf42(){for(const _0x3f2b30 in window)if(window['Number']['isNaN'](window['Number'](_0x3f2b30))&&window[_0x3f2b30]==_0x1ea3b0)return _0x18a36b();'destroyed'!=_0x1ee10f['state']&&window['setTimeout'](_0x4bbf42,0x1388);}_0x262777('RevisionViewer')&&_0x4bbf42();})];return window['Promise']['race'](_0x2761bf)['then'](()=>_0x5bab8f);}async function _0x3b21df(){if(await _0x1ec9a5,_0x262777('RevisionViewer')){const _0x19f96e=_0xc716e7['getRevision'](0x0),_0x39e928=_0xc716e7['getEarlierVisibleRevision'](_0x19f96e['id']),_0x2810a2=_0x4edb9a('RevisionViewer');return await _0x2810a2['compare'](_0x19f96e['id'],_0x39e928?_0x39e928['id']:null,!0x0),_0x2810a2['unbind']('isEnabled'),_0x2810a2['isEnabled']=!0x1,_0x2810a2['compare']=_0x2f2680,void(_0x2810a2['_getDiff']=_0x2f2680);}if(_0x262777('RevisionTracker')){const _0x373713=_0x4edb9a('RevisionTracker');_0x373713['unbind']('isEnabled'),_0x373713['isEnabled']=!0x1,_0x373713['update']=_0x2f2680,_0x373713['saveRevision']=_0x2f2680;}_0x1ee10f['model']['change']=_0x2f2680,_0x1ee10f['model']['enqueueChange']=_0x2f2680,_0x1ee10f['enableReadOnlyMode']('model');}function _0x4a072e(){return _0x262777('WebSocketGateway')&&'connected'==_0x4edb9a('WebSocketGateway')['state'];}function _0x21d642(){return _0x262777('RevisionViewerIntegration');}function _0x5d044f(){return _0x262777('TrackChangesDataGetter');}function _0x588ab5(_0x1acd95){const _0x165f08=_0x197dce();_0x1ee10f[_0x165f08]='revisionHistoryLicenseKey'+_0x1acd95,_0x1acd95['endsWith']('Limit')&&(window[_0x197dce()]=_0x1ea3b0),'Valid'!=_0x1acd95&&_0x3b21df();}function _0x197dce(){const _0xdc78a7=window['String'](window['performance']['now']())['replace']('.','');let _0x917510='N';for(let _0x3c67f6=0x0;_0x3c67f6<_0xdc78a7['length'];_0x3c67f6+=0x2){let _0x29bf75=window['parseInt'](_0xdc78a7['substring'](_0x3c67f6,_0x3c67f6+0x2));_0x29bf75>=0x3e&&(_0x29bf75-=0x3e),_0x917510+=_0x5add18[_0x29bf75];}return _0x917510;}function _0x1ca048(){const _0x39175a=_0x54b43e['split']('.');if(0x3!=_0x39175a['length'])return null;return _0x22f0fd(_0x39175a[0x1]);function _0x22f0fd(_0x1aee99){const _0x5d9fe6=_0x8a3881(_0x1aee99);return _0x5d9fe6&&_0xf22722()?_0x5d9fe6:null;function _0xf22722(){const _0x851a4c=_0x5d9fe6['jti'],_0x556d1b=window['parseInt'](_0x851a4c['substring'](_0x851a4c['length']-0x8),0x10),_0x3fb3eb={..._0x5d9fe6,'jti':_0x851a4c['substring'](0x0,_0x851a4c['length']-0x8)};return delete _0x3fb3eb['vc'],_0x3a1b45(_0x3fb3eb)==_0x556d1b;}}}async function _0xe02d2e(){let _0xec73c8=!0x0;try{const [_0xf347fe,_0x471eaa,_0xe08d21]=_0x54b43e['split']('.');return _0x93dab2(_0xf347fe),await _0x13db09(_0xf347fe,_0x471eaa,_0xe08d21),_0xec73c8;}catch{return!0x1;}function _0x93dab2(_0x1e183c){const _0x34ea09=_0x8a3881(_0x1e183c);_0x34ea09&&'ES256'==_0x34ea09['alg']||(_0xec73c8=!0x1);}async function _0x13db09(_0x12fa1c,_0x248c3b,_0x524e10){const _0x3f0772=window['Uint8Array']['from'](_0x3bc4bd(_0x524e10),_0x159d17=>_0x159d17['charCodeAt'](0x0)),_0x1fcd00=new window['TextEncoder']()['encode'](_0x12fa1c+'.'+_0x248c3b),_0x3633c1=window['crypto']['subtle'];if(!_0x3633c1)return;const _0x4f84ee=await _0x3633c1['importKey']('jwk',_0x571352,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3633c1['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4f84ee,_0x3f0772,_0x1fcd00)||(_0xec73c8=!0x1);}}function _0x8a3881(_0x1f589e){return _0x1f589e['startsWith']('ey')?JSON['parse'](_0x3bc4bd(_0x1f589e)):null;}function _0x3bc4bd(_0x5dc1e3){return window['atob'](_0x5dc1e3['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3a1b45(_0x5157b4){let _0x50e274=0x1505;function _0xa7ed37(_0x42fa09){for(let _0xe89442=0x0;_0xe89442<_0x42fa09['length'];_0xe89442++){const _0x827cc7=_0x42fa09['charCodeAt'](_0xe89442);_0x50e274=(_0x50e274<<0x5)+_0x50e274+_0x827cc7,_0x50e274&=_0x50e274;}}function _0x427874(_0x58ae87){Array['isArray'](_0x58ae87)?_0x58ae87['forEach'](_0x427874):_0x58ae87&&'object'==typeof _0x58ae87?Object['entries'](_0x58ae87)['sort']()['forEach'](([_0xdc598f,_0x168882])=>{_0xa7ed37(_0xdc598f),_0x427874(_0x168882);}):_0xa7ed37(window['String'](_0x58ae87));}return _0x427874(_0x5157b4),_0x50e274>>>0x0;}function _0x34b3b7(_0x123f08){return _0x123f08['toString'](0x10)['padStart'](0x8,'0');}function _0x2633c2(_0x324b09){return _0x324b09['split']('')['reverse']()['join']('');}function _0x262777(_0x4435c3){return _0x1ee10f['plugins']['has'](_0x4435c3);}function _0x4edb9a(_0x2ed267){return _0x1ee10f['plugins']['get'](_0x2ed267);}function _0x2f2680(){}_0x588ab5(await _0x3c836d());}_0x407059(_0xc716e7['editor']);}(this);}createRevision(_0x440c11){const _0x2176c5=this['editor']['plugins']['get']('Users');return new yt({'id':_0x440c11['id'],'name':_0x440c11['name'],'creator':_0x440c11['creatorId']?_0x2176c5['getUser'](_0x440c11['creatorId']):null,'diffData':_0x440c11['diffData']||_0x440c11['data'],'authors':_0x440c11['authorsIds']['map'](_0x5f19f3=>_0x2176c5['getUser'](_0x5f19f3)),'createdAt':new Date(_0x440c11['createdAt']),'attributes':_0x440c11['attributes'],'fromVersion':_0x440c11['fromVersion'],'toVersion':_0x440c11['toVersion']});}['addRevision'](_0x1a1eb2,_0x4a34a6=0x0){this['_revisions']['add'](_0x1a1eb2,_0x4a34a6);}getRevision(_0x18e89d){return this['_revisions']['get'](_0x18e89d);}getRevisions(_0x2f8205={'toJSON':!0x1}){const _0x4cc02c=Array['from'](this['_revisions']);return _0x4cc02c['reverse'](),_0x2f8205['toJSON']?_0x4cc02c['map'](_0x36279c=>_0x36279c['toJSON']()):_0x4cc02c;}getIndex(_0x52794c){return this['_revisions']['getIndex'](_0x52794c);}getEarlierVisibleRevision(_0xcaf411){const [,_0xb692c9]=this['getRevisionsIterator'](_0xcaf411,{'direction':'earlier'});return _0xb692c9;}getLaterVisibleRevision(_0x233885){const [,_0x5ddc59]=this['getRevisionsIterator'](_0x233885,{'direction':'later'});return _0x5ddc59;}getRevisionsInDiff(_0x420636){const _0x875f7c=[];for(const _0x2e2ce8 of this['getRevisionsIterator'](_0x420636['newRevisionId']))if(_0x875f7c['push'](_0x2e2ce8),_0x2e2ce8['id']===_0x420636['oldRevisionId'])break;return _0x875f7c;}*getRevisionsIterator(_0x26b6f8,{direction:_0x168ed0='earlier',filter:_0x55bb44=()=>!0x0}={}){const _0x3bc71d='earlier'===_0x168ed0?0x1:-0x1;let _0x35c025=this['_revisions']['get'](_0x26b6f8),_0x242173=this['getIndex'](_0x35c025);for(yield _0x35c025;_0x35c025;){if(_0x242173+=_0x3bc71d,_0x35c025=this['getRevision'](_0x242173),!_0x35c025)return;_0x55bb44(_0x35c025)&&(yield _0x35c025);}}},Rt=class extends _0xc765d1{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x358c6f,'c'],[_0x286dcb,'a'],[_0x149753,'e'],[_0x417f3b,'r'],[_0x348b27,'u']]);_typeCharToViewClass=new Map([['c',_0x358c6f],['a',_0x286dcb],['e',_0x149753],['r',_0x417f3b],['u',_0x348b27]]);async loadRevisionData(_0x23a068,_0x42d7b0){if(_0x23a068['diffData']||!_0x42d7b0)return;const _0x766125=this['editor']['config']['get']('collaboration.channelId');_0x23a068['diffData']=(await _0x42d7b0['getRevision']({'channelId':_0x766125,'revisionId':_0x23a068['id']}))['diffData'];}getRevisionDocumentData(_0x333407){const _0x1167c4={};for(const _0x57a94c in _0x333407['diffData']){if(_0x333407['diffData'][_0x57a94c]['attachChange']&&!_0x333407['diffData'][_0x57a94c]['attachChange']['isAttached'])continue;const _0x44c678=this['_removeRevisionMarkers'](JSON['parse'](_0x333407['diffData'][_0x57a94c]['insertions'])),_0x53531c=this['editor']['editing']['view']['document'],_0x530687=new _0x5681f3(_0x53531c,_0x44c678['map'](_0x44cd6b=>this['_getViewFromDiffObj'](_0x44cd6b,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1167c4[_0x57a94c]=this['editor']['data']['processor']['toData'](_0x530687),this['editor']['data']['processor']['useFillerType']('default');}return _0x1167c4;}getRevisionRootsAttributes(_0x4b4cdc){const _0x44314d={};for(const _0xebe7d9 in _0x4b4cdc['diffData'])_0x4b4cdc['diffData'][_0xebe7d9]['attachChange']&&!_0x4b4cdc['diffData'][_0xebe7d9]['attachChange']['isAttached']||(_0x44314d[_0xebe7d9]=_0x4b4cdc['diffData'][_0xebe7d9]['attributesAfter']||{});return _0x44314d;}getRevisionRootsModelElements(_0x2fe588){const _0xd8a08b={};for(const _0x2e3640 in _0x2fe588['diffData']){if(_0x2fe588['diffData'][_0x2e3640]['attachChange']&&!_0x2fe588['diffData'][_0x2e3640]['attachChange']['isAttached'])continue;const _0x16f90e=_0x2fe588['diffData'][_0x2e3640]['rootElementName'];_0x16f90e&&(_0xd8a08b[_0x2e3640]=_0x16f90e);}return _0xd8a08b;}_getTypeCharForViewElement(_0x5a6442){return this['_viewClassToTypeChar']['get'](_0x5a6442['constructor']);}_getViewFromDiffObj(_0x543b91,_0x55425e){const _0x42b843=this['editor']['editing']['view']['document'];if('string'==typeof _0x543b91)return new _0x100f15(_0x42b843,_0x543b91);{let _0x443f4c,_0x109edd;_0x109edd='u'==_0x543b91['type']||'r'==_0x543b91['type']?[]:_0x543b91['children']['map'](_0x4509d2=>this['_getViewFromDiffObj'](_0x4509d2,_0x55425e));const _0x58508e=this['_typeCharToViewClass']['get'](_0x543b91['type'])||_0x7f263c,_0x5a7dcb=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x443f4c=new _0x58508e(_0x42b843,_0x543b91['name'],_0x543b91['attributes'],_0x109edd),'u'==_0x543b91['type']&&_0x543b91['children'][0x0]){const _0x2b7857=_0x543b91['children'][0x0];if(_0x443f4c['render']=function(_0x213a04){const _0x4d5e2b=_0x213a04['createElement']('div');return _0x4d5e2b['innerHTML']=_0x4a8697(_0x2b7857),_0x4d5e2b['childNodes'][0x0];},_0x55425e){const _0x2a3d09=new _0x5681f3(_0x42b843);_0x2a3d09['_appendChild'](_0x443f4c);const _0x21322a=Array['from'](_0x5a7dcb['viewChildrenToDom'](_0x2a3d09,{'bind':!0x1})),_0x2d4af3=_0x5a7dcb['domDocument']['createElement']('div');_0x2d4af3['append'](..._0x21322a),_0x443f4c=Array['from'](_0x5a7dcb['domChildrenToView'](_0x2d4af3))[0x0];}}else{if('r'==_0x543b91['type']&&_0x543b91['children'][0x0]){const _0x5adf91=_0x543b91['children'][0x0];if(_0x443f4c['render']=function(_0x3b1508){_0x3b1508['innerHTML']=_0x4a8697(_0x5adf91);},_0x55425e){const _0xba3e42=new _0x5681f3(_0x42b843);_0xba3e42['_appendChild'](_0x443f4c);const _0x2af10d=Array['from'](_0x5a7dcb['viewChildrenToDom'](_0xba3e42,{'bind':!0x1})),_0x3bd38b=_0x5a7dcb['domDocument']['createElement']('div');_0x3bd38b['append'](..._0x2af10d);const _0x26a439=Array['from'](_0x5a7dcb['domChildrenToView'](_0x3bd38b));_0x26a439['length']>0x1?_0x443f4c['_appendChild'](_0x26a439):_0x443f4c=_0x26a439[0x0];}}}if(_0x543b91['customProperties']){for(const [_0x213470,_0x5ec26f]of _0x543b91['customProperties'])_0x443f4c['_setCustomProperty'](_0x213470,_0x5ec26f);}const _0x5d350a=void 0x0===_0x543b91['fillerOffset']?null:_0x543b91['fillerOffset'];return null!==_0x5d350a&&(_0x443f4c['getFillerOffset']=()=>_0x5d350a),_0x443f4c;}}_makeModelFromViewString(_0x3fb957,_0x22abb0){const _0x7c3970=JSON['parse'](_0x3fb957),_0x24abaf=this['editor']['editing']['view']['document'],_0x18f1d0=new _0x5681f3(_0x24abaf,_0x7c3970['map'](_0x346d90=>this['_getViewFromDiffObj'](_0x346d90,!0x0))),_0x573af3=this['editor']['data']['toModel'](_0x18f1d0,_0x22abb0);return _0x573af3['name']=_0x22abb0,_0x573af3;}['_removeRevisionMarkers'](_0xf6dd5e){return(_0xf6dd5e=_0xf6dd5e['filter'](_0x2af2aa=>!_0x2af2aa['name']||'revision-start'!==_0x2af2aa['name']&&'revision-end'!==_0x2af2aa['name']))['forEach'](_0x41f071=>{'string'!=typeof _0x41f071&&(_0x41f071['children']=this['_removeRevisionMarkers'](_0x41f071['children']),_0x41f071['attributes']=_0x41f071['attributes']['filter'](_0x54f4a2=>!_0x54f4a2[0x0]['startsWith']('data-revision-')));}),_0xf6dd5e;}};function kt(_0x5a2dec,_0x2e6b3f,_0x50c4cd){const t=_0x5a2dec['t'];switch(_0x2e6b3f){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'},_0x50c4cd);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x50c4cd);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x50c4cd);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x50c4cd);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x50c4cd);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0xc765d1{['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[_0x369e38,bt,Rt,_0x1c18b9];}constructor(_0x9ffac5){super(_0x9ffac5),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x40759c=_0x27f7da();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x40759c},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 _0xf536b5=this['repository']['getRevision'](0x0),_0x5e8b62=_0xf536b5&&null===_0xf536b5['creator']?_0xf536b5:null;if(this['_continueCurrentRevision']=!!_0x5e8b62&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x511184=this['_source']['getCurrentRevisionId'](),_0x571324=this['repository']['getRevision'](_0x511184);if(_0x571324)this['_startingVersion']=_0x571324['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1419ee=this['_source']['history']['_operations']['find'](_0x2d3278=>!_0x2d3278['_isInit']),_0x187a0b=_0x1419ee?_0x1419ee['baseVersion']:this['_source']['history']['version'];_0xf536b5?(_0xf536b5['toVersion']<_0x187a0b&&_0xf536b5['_update']({'toVersion':_0x187a0b}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5e8b62['id'],this['_startingVersion']=_0x5e8b62['fromVersion']):(this['_startingVersion']=_0xf536b5['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x187a0b,this['_continueCurrentRevision']=!0x1);}}else _0x5e8b62&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5e8b62['toVersion'],this['editor']['model']['document']['history']['version']),_0x5e8b62['fromVersion']===_0x5e8b62['toVersion']?(0x0!==_0x5e8b62['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5e8b62['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5e8b62['id'],this['_startingVersion']=_0x5e8b62['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',_0x573b77=>!_0x573b77),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x527e73=[this['editor']];for(const _0x321119 of _0x527e73){let _0x2873d2;for(const _0x499c2a in _0x321119){const _0x13d9d2=_0x499c2a,_0x37e281=_0x321119[_0x13d9d2];if('revisionHistoryLicenseKeyValid'==_0x37e281||'revisionHistoryLicenseKeyInvalid'==_0x37e281||'revisionHistoryLicenseKeyExpired'==_0x37e281||'revisionHistoryLicenseKeyDomainLimit'==_0x37e281||'revisionHistoryLicenseKeyNotAllowed'==_0x37e281||'revisionHistoryLicenseKeyEvaluationLimit'==_0x37e281||'revisionHistoryLicenseKeyUsageLimit'==_0x37e281){delete _0x321119[_0x13d9d2],_0x2873d2=_0x37e281,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2873d2&&_0x321119['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2873d2&&_0x321119['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2873d2&&_0x321119['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2873d2&&_0x321119['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2873d2&&_0x321119['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2873d2&&_0x321119['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x4fb07d=this['repository']['getRevision'](0x0),_0x5e95b0=await this['getRevisionDocumentData'](_0x4fb07d),_0x359a11=await this['getRevisionRootsAttributes'](_0x4fb07d),_0x1c4f6d=this['_utils']['getRevisionRootsModelElements'](_0x4fb07d);this['_replaceEditorDataWithRevisionData'](_0x5e95b0,_0x359a11,_0x1c4f6d);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x138dda){this['_source']=_0x138dda;}async update(){const _0x14d7a1=await this['_source']['getLatestVersion']();if(_0x14d7a1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x13dc72=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x14d7a1});_0x13dc72['authors']=_0x13dc72['authorsIds']['map'](_0x1c9fea=>this['editor']['plugins']['get']('Users')['getUser'](_0x1c9fea)),this['currentRevision']['_update'](_0x13dc72);}}async['saveRevision'](_0x1922c7={},_0x20533d=null){const _0x3a1714=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x20533d>this['currentRevision']['toVersion']&&(_0x20533d=null),null===_0x20533d&&(_0x20533d=await this['_source']['getLatestVersion']());const _0x5468d9=this['_getFromVersion'](_0x20533d),_0x508b94=this['buildRevisionData']({'from':_0x5468d9,'to':_0x20533d});if(this['currentRevision']['toVersion']<_0x20533d){const _0x2d6027=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x20533d,'to':_0x20533d});_0x2d6027['authors']=[],_0x2d6027['authorsIds']=[],_0x2d6027['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2d6027,!0x0),delete _0x2d6027['authors'],_0x3a1714['push'](_0x2d6027);}const _0x262b01={..._0x1922c7,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x1922c7['name']||null,'id':_0x1922c7['id']||_0x27f7da(),..._0x508b94,'attributes':{..._0x1922c7['attributes'],..._0x508b94['attributes']}},_0x56ebe6=this['addRevisionData'](_0x262b01);_0x3a1714['push'](_0x262b01);const _0x25817e=this['repository']['getIndex'](_0x56ebe6);if(0x0!==_0x25817e){const _0x56cd1c=this['repository']['getRevision'](_0x25817e-0x1);if(_0x56cd1c['fromVersion']!==_0x20533d){const _0x2d717a=this['_revisionDataBuilder']['getData'](_0x20533d,_0x56cd1c['toVersion']),_0x4d3d0e={'id':_0x56cd1c['id'],'diffData':_0x2d717a['diffData'],'authorsIds':_0x2d717a['authorsIds'],'authors':_0x2d717a['authorsIds']['map'](_0x2a34fc=>this['editor']['plugins']['get']('Users')['getUser'](_0x2a34fc)),'fromVersion':_0x20533d};this['_stampAiAttribute'](_0x4d3d0e,_0x56cd1c,!!_0x2d717a['hasAIChanges']),_0x56cd1c===this['currentRevision']&&(_0x4d3d0e['createdAt']=new Date(_0x262b01['createdAt']['getTime']()+0xa)),_0x56cd1c['_update'](_0x4d3d0e,!0x0),delete _0x4d3d0e['authors'],_0x3a1714['push'](_0x4d3d0e);}}if(this['adapter']){for(const _0x174c62 of _0x3a1714)this['_bufferUpdate'](_0x174c62['id'],_0x174c62,!0x0);this['sendBufferedUpdates']();}return _0x56ebe6;}addRevisionData(_0x20926b){const _0x149e84=this['repository']['createRevision'](_0x20926b);return this['adapter']&&_0x149e84['on']('_update',(_0x25eb5f,_0x9b07c0,_0x45a1c6)=>{_0x45a1c6||(this['_bufferUpdate'](_0x9b07c0['id'],_0x9b07c0,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x149e84,this['_findInsertionIndex'](_0x149e84)),_0x149e84;}async getRevisionDocumentData(_0x1c59a9){return await this['_utils']['loadRevisionData'](_0x1c59a9,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1c59a9);}async getRevisionRootsAttributes(_0x15b8eb){return await this['_utils']['loadRevisionData'](_0x15b8eb,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x15b8eb);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x5aabdd=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3d6942=0x0;_0x3d6942<_0x5aabdd['length'];_0x3d6942++){const _0x29fe48=_0x5aabdd[_0x3d6942];let _0x21940c=!0x1;for(const _0x148916 of Object['keys'](_0x29fe48))void 0x0===_0x29fe48[_0x148916]?delete _0x29fe48[_0x148916]:'id'!==_0x148916&&(_0x21940c=!0x0);_0x21940c||(_0x5aabdd[_0x3d6942]=null);}if(_0x5aabdd=_0x5aabdd['filter'](_0x24be3d=>null!==_0x24be3d),!_0x5aabdd['length'])return;for(let _0x308646=0x0;_0x308646<_0x5aabdd['length'];_0x308646++){const _0x392783=_0x5aabdd[_0x308646];void 0x0!==_0x392783['fromVersion']&&void 0x0===_0x392783['toVersion']&&(_0x392783['toVersion']=this['repository']['getRevision'](_0x392783['id'])['toVersion']),void 0x0!==_0x392783['toVersion']&&void 0x0===_0x392783['fromVersion']&&(_0x392783['fromVersion']=this['repository']['getRevision'](_0x392783['id'])['fromVersion']);}const _0x89efd5=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x5aabdd,_0x89efd5)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x390ea2=>{if(_0x390ea2){for(const _0x5115da of _0x390ea2)this['setRevisionData']({'id':_0x5115da['id'],'createdAt':_0x5115da['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x5a463e,_0x2481de,_0x42537e){if(_0x42537e===(!!_0x2481de&&!!_0x2481de['attributes']['@ai']))return;const _0x535802={..._0x2481de?_0x2481de['attributes']:{},..._0x5a463e['attributes']};_0x42537e?_0x535802['@ai']=!0x0:delete _0x535802['@ai'],_0x5a463e['attributes']=_0x535802;}buildRevisionData({revision:_0xb5bc40=null,from:_0xb8e77a=null,to:_0x118b9a=null}){_0xb8e77a=null!==_0xb8e77a?_0xb8e77a:_0xb5bc40['fromVersion'],_0x118b9a=null!==_0x118b9a?_0x118b9a:_0xb5bc40['toVersion'];const _0x56af57=this['_revisionDataBuilder']['getData'](_0xb8e77a,_0x118b9a),_0xa7f106={'diffData':_0x56af57['diffData'],'authorsIds':_0x56af57['authorsIds'],'fromVersion':_0xb8e77a,'toVersion':_0x118b9a};if(this['_stampAiAttribute'](_0xa7f106,_0xb5bc40,!!_0x56af57['hasAIChanges']),!_0xb5bc40||_0x118b9a!==_0xb5bc40['toVersion']){const _0x5a2129=_0x118b9a-0x1,_0x2eea5a=this['_source']['history']['getOperation'](_0x5a2129);_0xa7f106['createdAt']=_0x2eea5a&&_0x2eea5a['createdAt']||new Date();}if(this['_loadedStateData']&&_0xb8e77a===this['_loadedStateData']['fromVersion']){for(const _0x3c1550 of this['_loadedStateData']['authors'])_0xa7f106['authorsIds']['includes'](_0x3c1550['id'])||_0xa7f106['authorsIds']['push'](_0x3c1550['id']);}return _0xa7f106;}_bufferUpdate(_0x5984c2,_0x257822,_0x2f148b){if(this['_bufferedUpdates']['has'](_0x5984c2)){const _0x371c46=this['_bufferedUpdates']['get'](_0x5984c2);_0x257822=_0x2f148b?{..._0x371c46,..._0x257822}:{..._0x257822,..._0x371c46};}this['_bufferedUpdates']['set'](_0x5984c2,_0x257822);}setRevisionData(_0x5ccb38){const _0x4086c2=this['repository']['getRevision'](_0x5ccb38['id']);if(_0x5ccb38['createdAt']&&(_0x5ccb38['createdAt']=new Date(_0x5ccb38['createdAt'])),_0x5ccb38['authorsIds']){const _0x14ca34=this['editor']['plugins']['get']('Users');_0x5ccb38['authors']=_0x5ccb38['authorsIds']['map'](_0x3a1c6f=>_0x14ca34['getUser'](_0x3a1c6f));}_0x4086c2['_update'](_0x5ccb38,!0x0);}_createInitialRevision(_0x34bf59){const _0x5ae224=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5ae224)this['_initialRevisionId']=_0x5ae224['id'];else{const _0x3e7b44=!this['editor']['model']['document']['roots']['find'](_0x2c112e=>this['editor']['model']['hasContent'](_0x2c112e)),_0x737b9e=this['editor']['plugins']['get']('Users')['me']['id'],_0x39562a=kt(this['editor']['locale'],_0x3e7b44?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x34bf59,'to':_0x34bf59,'id':this['_initialRevisionId'],'name':_0x39562a,'creatorId':_0x737b9e});}}_createCurrentRevision(_0x5786af){const _0xcb2c7a=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xcb2c7a),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5786af,'to':_0x5786af,'id':_0xcb2c7a,'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(_0x48d4f7,_0xb19d5c,_0x258e11){const _0x4dab5f={},_0x73cf97={},_0x1c0543={},_0x14168b=this['editor']['config']['get']('roots')||{};for(const [_0x5d9161,_0x17e0dd]of Object['entries'](_0x14168b))_0x17e0dd['lazyLoad']||(_0x4dab5f[_0x5d9161]=_0x17e0dd['initialData']??'',_0x73cf97[_0x5d9161]=_0x17e0dd['modelAttributes']||{},_0x17e0dd['modelElement']&&(_0x1c0543[_0x5d9161]=_0x17e0dd['modelElement']));for(const _0x50fbc0 of this['editor']['model']['document']['getRootNames']())_0x4dab5f[_0x50fbc0]??='',_0x73cf97[_0x50fbc0]??={};let _0x308c30=!0x1;const _0x84600b=Object['keys'](_0x4dab5f),_0x4acbc8=Object['keys'](_0x48d4f7);for(const _0x26745c of _0x84600b){if(_0x4dab5f[_0x26745c]!==_0x48d4f7[_0x26745c]&&''!==_0x4dab5f[_0x26745c]['trim']()){_0x308c30=!0x0;break;}if(!_0x219ba7(_0x73cf97[_0x26745c],_0xb19d5c[_0x26745c])&&Object['keys'](_0x73cf97[_0x26745c])['length']>0x0){_0x308c30=!0x0;break;}const _0x5f2106=_0x1c0543[_0x26745c],_0x12c377=_0x258e11[_0x26745c];if(_0x5f2106&&_0x12c377&&_0x5f2106!==_0x12c377){_0x308c30=!0x0;break;}}_0x308c30||(_0x308c30=_0x4acbc8['some'](_0x1e3c9d=>!this['editor']['model']['document']['getRoot'](_0x1e3c9d))),_0x308c30&&_0x222a9a('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4dab5f,'editorRootsAttributes':_0x73cf97,'editorRootsModelElements':_0x1c0543,'revisionData':_0x48d4f7,'revisionRootsAttributes':_0xb19d5c,'revisionRootsModelElements':_0x258e11});for(const [_0x6e72a9,_0x5401f3]of Object['entries'](_0x48d4f7))this['editor']['config']['set']('roots.'+_0x6e72a9+'.initialData',_0x5401f3);for(const [_0x2e4401,_0x4c6fc9]of Object['entries'](_0xb19d5c))this['editor']['config']['set']('roots.'+_0x2e4401+'.modelAttributes',_0x4c6fc9);const _0x1ab7a6=this['editor']['model']['document'];for(const [_0x1b0d3c,_0x400d88]of Object['entries'](_0x258e11)){this['editor']['config']['set']('roots.'+_0x1b0d3c+'.modelElement',_0x400d88);const _0x536076=_0x1ab7a6['getRoot'](_0x1b0d3c);_0x536076&&_0x536076['name']!==_0x400d88&&(_0x1ab7a6['roots']['remove'](_0x1b0d3c),_0x1ab7a6['createRoot'](_0x400d88,_0x1b0d3c));}}_addPendingAction(){if(!this['_pendingAction']){const _0x4d092d=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4d092d['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x4b83f3){const _0x519f77=this['repository']['getRevisions']();_0x519f77['reverse']();let _0x31017e=0x0;for(;_0x31017e<_0x519f77['length'];){const _0x138389=_0x519f77[_0x31017e];if(_0x138389===this['currentRevision']){_0x31017e++;continue;}if(_0x138389['id']===this['_initialRevisionId'])break;const _0x17a3ca=_0x4b83f3['toVersion']-_0x138389['toVersion']||_0x4b83f3['fromVersion']-_0x138389['fromVersion'];if(_0x17a3ca>0x0)break;if(_0x17a3ca<0x0)_0x31017e++;else{if(!_0x4b83f3['creator']&&_0x138389['creator'])break;if(_0x138389['creator']||!_0x4b83f3['creator']){if(_0x4b83f3['createdAt']>_0x138389['createdAt'])break;_0x31017e++;}else _0x31017e++;}}return _0x31017e;}_getFromVersion(_0x39dca9){const _0x326dd5=this['repository']['getRevisions']();_0x326dd5['reverse'](),_0x326dd5['shift']();const _0x28447f=_0x326dd5['find'](_0x346223=>_0x346223['toVersion']<=_0x39dca9)['toVersion'];return _0x28447f<this['_startingVersion']?this['_startingVersion']:_0x28447f;}['_makeRevision']({name:_0x8dff40,from:_0x2078ac,to:_0x33dcb2,creatorId:_0x4c22d6,id:_0x289bfd}){const _0x160d58=this['buildRevisionData']({'from':_0x2078ac,'to':_0x33dcb2});_0x160d58['name']=_0x8dff40,_0x160d58['creatorId']=_0x4c22d6,_0x160d58['id']=_0x289bfd;const _0x1044ed=this['addRevisionData'](_0x160d58);return this['adapter']&&this['_bufferUpdate'](_0x160d58['id'],_0x160d58,!0x0),_0x1044ed;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x212e3d){this['editor']=_0x212e3d,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x2ca1ca){this['source']=_0x2ca1ca;const _0x58a7bc=new Map(),_0xa9f5da=new Map(),_0xd1ca33=this['editor']['model']['document']['roots']['map'](_0x1ff163=>_0x1ff163['rootName']);for(const _0x19b387 of _0xd1ca33){const _0x18654c=this['editor']['model']['document']['getRoot'](_0x19b387),_0x473979=St(_0x18654c);_0x58a7bc['set'](_0x19b387,_0x473979),_0xa9f5da['set'](_0x19b387,Object['fromEntries'](_0x18654c['getAttributes']()));}const _0x44b29c=Array['from'](this['editor']['model']['markers'])['map'](_0x164448=>[_0x164448['name'],_0x164448['getRange']()]),_0x5bf137=this['source']['version'];this['_saveMetaData'](_0x5bf137,_0x58a7bc,_0x44b29c,_0xa9f5da),this['_startingRevisionId']=this['_revisionId'];const _0x46e0bb=new Map(),_0x1c828e=new Map();for(const _0x5acdc8 of _0xd1ca33){const _0x49296d=Et(_0x5acdc8,this['editor']['model']['document']['getRoot'](_0x5acdc8)['name']);_0x46e0bb['set'](_0x5acdc8,_0x49296d),_0x1c828e['set'](_0x5acdc8,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x46e0bb,[],_0x1c828e);}getData(_0x382f76,_0x3af607){if(this['_lastFrom']===_0x382f76&&this['_lastTo']<=_0x3af607)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3af607,!0x0);else{if(!this['_savedMetaData']['has'](_0x382f76)){const _0x2e8202=this['_getPreviousFrom'](_0x382f76);this['_calculateMetaData'](_0x2e8202,_0x382f76,!0x1);}this['_calculateMetaData'](_0x382f76,_0x3af607,!0x0);}return this['_lastFrom']=_0x382f76,this['_lastTo']=_0x3af607,this['_getState']();}loadState(_0x5c0742){if(!this['_savedMetaData']['has'](_0x5c0742['fromVersion'])){const _0x39af52=this['_getPreviousFrom'](_0x5c0742['fromVersion']);this['_calculateMetaData'](_0x39af52,_0x5c0742['fromVersion'],!0x1);}this['_calculateMetaData'](_0x5c0742['fromVersion'],_0x5c0742['toVersion'],!0x1);const _0x2be870=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5c0742['fromVersion'],this['_lastTo']=_0x5c0742['toVersion'];for(const _0x40fd58 in _0x5c0742['diffData']){const _0x409d5c=_0x5c0742['diffData'][_0x40fd58]['attachChange'],_0x1f2e25=_0x1721d7(_0x5c0742['diffData'][_0x40fd58]['attributesBefore'])||{},_0x5651b4=_0x5c0742['diffData'][_0x40fd58],_0x1bf291=_0x2be870['_makeModelFromViewString'](_0x5651b4['deletions'],_0x5651b4['rootElementName']||'$root');_0x1bf291['rootName']=_0x40fd58,_0x1bf291['_isAttached']=!_0x409d5c||!_0x409d5c['isAttached'],_0x1bf291['isAttached']=()=>_0x1bf291['_isAttached'],this['_baseRoots']['set'](_0x40fd58,_0x1bf291),this['_baseRootsAttributes']['set'](_0x40fd58,_0x1f2e25),_0x409d5c&&this['_touchedRoots']['set'](_0x40fd58,_0x409d5c);const _0x1c532b=this['_makeIdsRoot'](_0x1bf291);this['_baseIdsRoots']['set'](_0x40fd58,_0x1c532b);for(const [_0x44c5d4,_0x244b0e]of _0x1bf291['markers']){if(!_0x44c5d4['startsWith']('revision:'))continue;const _0x48f694=_0x44c5d4['split'](':')[0x2],_0x4d2738=_0x5651b4['aiSources']?.[_0x44c5d4]||null;for(const _0x26f7b7 of _0x244b0e['getWalker']({'singleCharacters':!0x0})){const _0x1b0858=this['_getVidAttributeName'](_0x26f7b7),_0x5d464a='elementEnd'==_0x26f7b7['type']?_0x26f7b7['previousPosition']['path']['slice'](0x0,-0x1):_0x26f7b7['previousPosition']['path'],_0x44b29a=_0x1c532b['getNodeByPath'](_0x5d464a)['getAttribute'](_0x1b0858);this['_touched']['set'](_0x44b29a,{'userId':_0x48f694,'aiSource':_0x4d2738});}_0x1bf291['markers']['delete'](_0x44c5d4);}}this['_startingRevisionId']=this['_revisionId'];const _0x3ce78c=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x23a434=>!this['_touched']['has'](_0x23a434));let _0x40d901=0x0;const _0x462d99=new Map();for(const _0x2709b6 in _0x5c0742['diffData']){const _0x3c1691=_0x5c0742['diffData'][_0x2709b6]['attachChange'],_0x31b882=_0x1721d7(_0x5c0742['diffData'][_0x2709b6]['attributesAfter'])||{},_0x52fdde=_0x5c0742['diffData'][_0x2709b6],_0x4aafe9=_0x2be870['_makeModelFromViewString'](_0x52fdde['insertions'],_0x52fdde['rootElementName']||'$root');_0x4aafe9['rootName']=_0x2709b6,_0x4aafe9['_isAttached']=!_0x3c1691||_0x3c1691['isAttached'],_0x4aafe9['isAttached']=()=>_0x4aafe9['_isAttached'],this['_diffRoots']['set'](_0x2709b6,_0x4aafe9),this['_diffRootsAttributes']['set'](_0x2709b6,_0x31b882);const _0x3e8a04=this['_makeIdsRoot'](_0x4aafe9,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2709b6,_0x3e8a04),_0x462d99['set'](_0x2709b6,_0x4aafe9['isAttached']()?_0x31b882:{});for(const [_0x565c51,_0x447d94]of _0x4aafe9['markers']){if(!_0x565c51['startsWith']('revision:'))continue;const _0x1a614d=_0x565c51['split'](':')[0x2],_0xf8a6ae=_0x52fdde['aiSources']?.[_0x565c51]||null;for(const _0x5a884c of _0x447d94['getWalker']({'singleCharacters':!0x0})){const _0x1bb1e3=this['_getVidAttributeName'](_0x5a884c),_0x3ec883=this['_revisionId']++,_0x23fcd9='elementEnd'==_0x5a884c['type']?_0x5a884c['previousPosition']['path']['slice'](0x0,-0x1):_0x5a884c['previousPosition']['path'];_0x3e8a04['getNodeByPath'](_0x23fcd9)['_setAttribute'](_0x1bb1e3,_0x3ec883),this['_touched']['set'](_0x3ec883,{'userId':_0x1a614d,'aiSource':_0xf8a6ae});}_0x4aafe9['markers']['delete'](_0x565c51);}for(const _0x253c08 of this['editor']['model']['createRangeIn'](_0x4aafe9)['getWalker']({'singleCharacters':!0x0})){const _0xfdd53b=this['_getVidAttributeName'](_0x253c08),_0x17829e='elementEnd'==_0x253c08['type']?_0x253c08['previousPosition']['path']['slice'](0x0,-0x1):_0x253c08['previousPosition']['path'],_0x55b4cd=_0x3e8a04['getNodeByPath'](_0x17829e);_0x55b4cd['getAttribute'](_0xfdd53b)>0x0||_0x55b4cd['_setAttribute'](_0xfdd53b,_0x3ce78c[_0x40d901++]);}for(const [_0x181538,_0x2fda6a]of _0x4aafe9['markers'])_0x181538['startsWith']('revision:')||this['_markers']['set'](_0x181538,_0x2fda6a);}const {roots:_0x41f005}=this['_savedMetaData']['get'](_0x5c0742['fromVersion']),{roots:_0x3e1ced}=this['_savedMetaData']['get'](_0x5c0742['toVersion']),_0x322c81=St(_0x41f005['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x322c81),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x322c81,Number['NEGATIVE_INFINITY']));const _0x2a4502=St(_0x3e1ced['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2a4502),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2a4502));const _0x174402=Array['from'](this['_diffRoots'])['map'](([_0x3e06e5,_0x13a60f])=>[_0x3e06e5,St(_0x13a60f)]);this['_saveMetaData'](this['_lastTo'],_0x174402,this['_markers'],_0x462d99);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x597273,_0x40ac08,_0x105baf,_0x33c66f){const _0x322033=new Map(_0x40ac08),_0xc5e318=new Map(_0x1721d7(_0x33c66f)),_0x4d77fd=new Map();for(const [_0x255f72,_0x4c91bc]of _0x105baf)_0x4d77fd['set'](_0x255f72,{'start':_0x4c91bc['start']['clone'](),'end':_0x4c91bc['end']['clone'](),'rootName':_0x4c91bc['root']['rootName']});this['_savedMetaData']['set'](_0x597273,{'roots':_0x322033,'markers':_0x4d77fd,'rootsAttributes':_0xc5e318});}_removeMetaData(_0x58d19a){this['_savedMetaData']['delete'](_0x58d19a);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}_makeIdsRoot(_0x3a8b35,_0x34caa7=null){let _0x555bc5=null;_0x3a8b35['is']('documentFragment')||(_0x555bc5=new _0x329f01(_0x3a8b35['name'],{'vid_start':null===_0x34caa7?this['_revisionId']++:_0x34caa7++}));const _0x2657bb=[];for(const _0x44b5f8 of _0x3a8b35['getChildren']())if(_0x44b5f8['is']('element')){_0x2657bb['push'](this['_makeIdsRoot'](_0x44b5f8,_0x34caa7));const _0x474cb7=_0x2657bb[_0x2657bb['length']-0x1];null!==_0x34caa7&&(_0x34caa7=_0x474cb7['is']('element','$text')?_0x474cb7['getAttribute']('vid')+0x1:_0x474cb7['getAttribute']('vid_end')+0x1);}else{for(let _0x399663=0x0;_0x399663<_0x44b5f8['offsetSize'];_0x399663++)_0x2657bb['push'](new _0x329f01('$text',{'vid':null===_0x34caa7?this['_revisionId']++:_0x34caa7++}));}if(_0x3a8b35['is']('documentFragment')){const _0x1d92bd=Et(_0x3a8b35['rootName'],_0x3a8b35['name']);return _0x1d92bd['_insertChild'](0x0,_0x2657bb),_0x1d92bd;}return _0x555bc5['_setAttribute']('vid_end',null===_0x34caa7?this['_revisionId']++:_0x34caa7),_0x555bc5['_insertChild'](0x0,_0x2657bb),_0x555bc5;}_calculateMetaData(_0x3d9d0d,_0x32e0b8,_0x52b6db){this['_reset']();const {roots:_0x45bb2e,markers:_0x45604f,rootsAttributes:_0x2cad3e}=this['_savedMetaData']['get'](_0x3d9d0d);this['_baseRoots']=new Map(_0x45bb2e),this['_baseRootsAttributes']=new Map(_0x1721d7(_0x2cad3e));for(const [_0x20a1da,_0x5961c1]of this['_baseRoots'])if('$graveyard'!==_0x20a1da&&(this['_diffRoots']['set'](_0x20a1da,St(_0x5961c1)),this['_diffRootsAttributes']=new Map(_0x1721d7(_0x2cad3e)),_0x52b6db)){const _0x18630a=this['_revisionId'];this['_idsRoots']['set'](_0x20a1da,this['_makeIdsRoot'](_0x5961c1)),this['_baseIdsRoots']['set'](_0x20a1da,this['_makeIdsRoot'](_0x5961c1,_0x18630a));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x52b6db&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x17081d,_0x493781]of _0x45604f){const _0x365575=this['_baseRoots']['get'](_0x493781['rootName']),_0x2882cb=this['_diffRoots']['get'](_0x493781['rootName']),_0x11b784=new _0x2a2117(_0x46ca69(_0x493781['start'],_0x365575),_0x46ca69(_0x493781['end'],_0x365575)),_0x526605=_0x4446b6(_0x11b784,_0x2882cb);_0x365575['markers']['set'](_0x17081d,_0x11b784),this['_markers']['set'](_0x17081d,_0x526605);}this['_applyOperations'](_0x3d9d0d,_0x32e0b8,_0x52b6db);}_applyOperations(_0x1aebe1,_0x42938a,_0x373726){for(const _0x3b8f6c of this['source']['getOperations'](_0x1aebe1,_0x42938a))this['_handleOperation'](_0x3b8f6c,_0x373726);for(const _0x418ce7 of this['_diffRoots']['values']())_0x418ce7['markers']['clear']();for(const [_0x3f6197,_0x2637bb]of this['_markers'])this['_diffRoots']['get'](_0x2637bb['root']['rootName'])['markers']['set'](_0x3f6197,_0x2637bb['clone']());const _0x50d940=new Map(),_0xdb8469=new Map();for(const [_0x329f7f,_0x596327]of this['_diffRoots'])_0x50d940['set'](_0x329f7f,St(_0x596327)),_0xdb8469['set'](_0x329f7f,this['_diffRootsAttributes']['get'](_0x329f7f));this['_saveMetaData'](_0x42938a,_0x50d940,this['_markers'],_0xdb8469);}_getPreviousFrom(_0x1e4ef7){const _0x55a758=Array['from'](this['_savedMetaData']['keys']());_0x55a758['sort']((_0x80deab,_0x2a5409)=>_0x80deab-_0x2a5409),_0x55a758['reverse']();for(const _0x50fe96 of _0x55a758)if(_0x50fe96<_0x1e4ef7)return _0x50fe96;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5c208f,_0x5542fd){const _0x208e53=Array['from'](_0x5542fd['markers'])['map'](([_0x244a5a,_0x4a0d71])=>[_0x244a5a,_0x4446b6(_0x4a0d71,_0x5c208f)]);_0x5c208f['markers']=new Map(_0x208e53);}_transformMarkers(_0x5dd9d8){for(const _0x44c5a0 of this['_markers']['values']()){const _0x418f4=_0x44c5a0['getTransformedByOperation'](_0x5dd9d8),_0x26dee2=_0x2a2117['_createFromRanges'](_0x418f4);_0x44c5a0['start']=_0x26dee2['start'],_0x44c5a0['end']=_0x26dee2['end'];}}_handleOperation(_0x8ec928,_0x40201f){if('addRoot'!=_0x8ec928['type']&&'detachRoot'!=_0x8ec928['type']){if('insert'==_0x8ec928['type']){const _0x264478=_0x8ec928['position']['root'],_0x24d7f1=_0x264478['rootName'],_0x33d1bf=_0x264478['name'];this['_diffRoots']['has'](_0x24d7f1)||(this['_diffRoots']['set'](_0x24d7f1,Et(_0x24d7f1,_0x33d1bf,!0x0)),this['_diffRootsAttributes']['set'](_0x24d7f1,{}),_0x40201f&&this['_idsRoots']['set'](_0x24d7f1,Et(_0x24d7f1,_0x33d1bf,!0x0)));}else{if('addRootAttribute'==_0x8ec928['type']||'removeRootAttribute'==_0x8ec928['type']||'changeRootAttribute'==_0x8ec928['type'])return void this['_handleRootAttributeOperation'](_0x8ec928);'marker'==_0x8ec928['type']&&this['_handleMarkerOperation'](_0x8ec928);}if('marker'!==_0x8ec928['type']){const _0x11413a=this['_cloneOperation'](_0x8ec928,this['_diffRoots']);_0x11413a['_execute'](),this['_transformMarkers'](_0x11413a);}if(_0x40201f)switch(_0x8ec928['type']){case'insert':this['_handleInsertOperation'](_0x8ec928);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x8ec928);break;case'merge':this['_handleMergeOperation'](_0x8ec928);break;case'split':this['_handleSplitOperation'](_0x8ec928);}}else this['_handleRootOperation'](_0x8ec928,_0x40201f);}_cloneOperation(_0xa05859,_0x3ce0c0){const _0x4240bc=_0xa05859['clone']();return _0x4240bc['_authorId']=_0xa05859['_authorId'],_0x4240bc['_aiSource']=_0xa05859['_aiSource'],_0x4240bc['baseVersion']=null,_0x3f34c4(_0x4240bc,_0x3ce0c0),_0x4240bc;}_getBaseVids(_0x454166){return _0x454166['map'](_0x532bee=>{const _0x57cbb6=this['_getVidAttributeName'](_0x532bee);return Number(_0x532bee['item']['getAttribute'](_0x57cbb6));});}_generateTape(_0x5433fa,_0x3011b5){if(_0x5433fa['is']('element','$text'))_0x3011b5['push']({'item':_0x5433fa,'type':'text'});else{_0x5433fa['is']('element')&&_0x3011b5['push']({'item':_0x5433fa,'type':'elementStart'});for(const _0x4fb466 of _0x5433fa['getChildren']())this['_generateTape'](_0x4fb466,_0x3011b5);_0x5433fa['is']('element')&&_0x3011b5['push']({'item':_0x5433fa,'type':'elementEnd'});}return _0x3011b5;}_getState(){const _0x4c1903=new Map(this['_touched']),_0x5d06e0=new Map(_0x4c1903),_0xb65d49=new Map(),_0x470e38={'insertions':{},'deletions':{}},_0x51fc34={'insertions':{},'deletions':{}},_0x1113b7=new Map(),_0x53324a=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1aea6d=new Map();_0x53324a['delete']('$graveyard');for(const _0x163ef2 of _0x53324a){const _0x356d9b=(this['_diffRoots']['get'](_0x163ef2)??this['_baseRoots']['get'](_0x163ef2))['name'],_0x30bbef=this['_diffRoots']['get'](_0x163ef2)||Et(_0x163ef2,_0x356d9b,!0x1),_0x2d3caf=this['_baseRoots']['get'](_0x163ef2)||Et(_0x163ef2,_0x356d9b,!0x1);_0x30bbef['isAttached']()||_0x2d3caf['isAttached']()?(_0x1aea6d['set'](_0x163ef2,_0x356d9b),_0x470e38['insertions'][_0x163ef2]=St(_0x30bbef),_0x470e38['deletions'][_0x163ef2]=St(_0x2d3caf),this['_copyMarkers'](_0x470e38['deletions'][_0x163ef2],_0x2d3caf),this['_copyMarkers'](_0x470e38['insertions'][_0x163ef2],_0x30bbef),_0x51fc34['insertions'][_0x163ef2]=this['_generateTape'](this['_idsRoots']['get'](_0x163ef2),[]),_0x51fc34['deletions'][_0x163ef2]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x163ef2)||Et(_0x163ef2,_0x356d9b,!0x1),[])):_0x53324a['delete'](_0x163ef2);}for(const _0x5de441 of _0x53324a){const _0x2748d5=_0x51fc34['insertions'][_0x5de441];for(const _0x14784 of _0x2748d5){const _0x226b9d=this['_getVidAttributeName'](_0x14784),_0x2dc1fc=_0x14784['item']['getAttribute'](_0x226b9d);_0x5d06e0['delete'](_0x2dc1fc),_0x2dc1fc>=this['_startingRevisionId']&&_0xb65d49['set'](_0x2dc1fc,_0x4c1903['get'](_0x2dc1fc));}}for(const _0x444ce5 of _0x53324a){const _0x259013=_0x51fc34['insertions'][_0x444ce5],_0x2c7ddc=this['_getBaseVids'](_0x51fc34['deletions'][_0x444ce5]);let _0x898f1e=0x0;for(const _0xde00e2 of _0x259013){const _0xad91b7=this['_getVidAttributeName'](_0xde00e2),_0x579bb6=_0xde00e2['item']['getAttribute'](_0xad91b7);if(!_0xb65d49['has'](_0x579bb6)&&!_0x1113b7['has'](_0x579bb6)){if(_0x5d06e0['has'](_0x579bb6))_0x898f1e++;else{if(_0x579bb6!=_0x2c7ddc[_0x898f1e]){const _0x4fab81=_0x4c1903['get'](_0x579bb6)||_0x4c1903['get'](_0x2c7ddc[_0x898f1e]);for(;_0x579bb6!=_0x2c7ddc[_0x898f1e];)_0x5d06e0['has'](_0x2c7ddc[_0x898f1e])||(_0x1113b7['set'](_0x2c7ddc[_0x898f1e],_0x4fab81),_0x4c1903['set'](_0x2c7ddc[_0x898f1e],_0x4fab81)),_0x898f1e++;}_0x898f1e++;}}}}for(const _0x290c4d of _0x53324a){const _0x3b244c=_0x51fc34['insertions'][_0x290c4d];for(const _0x43841a of _0x3b244c){const _0x3244b0=this['_getVidAttributeName'](_0x43841a),_0x59b95e=_0x43841a['item']['getAttribute'](_0x3244b0);if(_0x1113b7['has'](_0x59b95e)){const _0x501665=_0x1113b7['get'](_0x59b95e);_0x5d06e0['has'](_0x59b95e)||_0x5d06e0['set'](_0x59b95e,{..._0x501665}),_0xb65d49['set'](_0x59b95e,{..._0x501665});}}}for(const _0x4ff56c of _0x5d06e0['keys']())_0x4ff56c>=this['_startingRevisionId']&&_0x5d06e0['delete'](_0x4ff56c);const _0x890bda=new Map();for(const _0x3fdb48 of _0x53324a){let _0x5e28cb=_0x51fc34['insertions'][_0x3fdb48];for(const _0x3b7fe6 of _0x5e28cb)if(_0x3b7fe6['item']['is']('element','tableCell')){const _0x2fc627=this['_getVidAttributeName'](_0x3b7fe6),_0x46a0b0=_0x3b7fe6['item']['getAttribute'](_0x2fc627);if(_0xb65d49['has'](_0x46a0b0)){const _0x561a1b=_0x3b7fe6['item']['parent']['parent']['getAttribute']('vid_start'),_0x4bde7b=_0xb65d49['get'](_0x46a0b0),_0x232c44=_0x890bda['get'](_0x561a1b)||{'users':new Set(),'aiSource':null};_0x232c44['users']['add'](_0x4bde7b['userId']),_0x232c44['aiSource']=_0x232c44['aiSource']||_0x4bde7b['aiSource']||null,_0x890bda['set'](_0x561a1b,_0x232c44);}}_0x5e28cb=_0x51fc34['deletions'][_0x3fdb48];for(const _0x33dde9 of _0x5e28cb)if(_0x33dde9['item']['is']('element','tableCell')){const _0x310b6d=this['_getVidAttributeName'](_0x33dde9),_0x36626d=_0x33dde9['item']['getAttribute'](_0x310b6d);if(_0x5d06e0['has'](_0x36626d)){const _0x19b773=_0x33dde9['item']['parent']['parent']['getAttribute']('vid_start'),_0x3676c4=_0x5d06e0['get'](_0x36626d),_0x55f4ce=_0x890bda['get'](_0x19b773)||{'users':new Set(),'aiSource':null};_0x55f4ce['users']['add'](_0x3676c4['userId']),_0x55f4ce['aiSource']=_0x55f4ce['aiSource']||_0x3676c4['aiSource']||null,_0x890bda['set'](_0x19b773,_0x55f4ce);}}for(const _0x38594d of _0x890bda['keys']())(_0xb65d49['has'](_0x38594d)||_0x5d06e0['has'](_0x38594d))&&_0x890bda['delete'](_0x38594d);}for(const _0x105785 of _0x53324a){const _0x31420a=_0x51fc34['insertions'][_0x105785];let _0x3b169b=null,_0x279eb3=null,_0x47e198=null;for(const _0xcbbd19 of _0x31420a){const _0x2fe391=this['_getVidAttributeName'](_0xcbbd19),_0x192103=_0xcbbd19['item']['getAttribute'](_0x2fe391),_0x10230c=_0x890bda['get'](_0x192103);if(_0x10230c&&'elementStart'==_0xcbbd19['type']&&(_0x3b169b=Array['from'](_0x10230c['users'])[0x0],_0x279eb3=_0x10230c['aiSource'],_0x47e198=_0xcbbd19['item']['getAttribute']('vid_end')),_0x3b169b){const _0x12942f=_0x279eb3||_0x5d06e0['get'](_0x192103)?.['aiSource']||null,_0x188b36=_0x279eb3||_0xb65d49['get'](_0x192103)?.['aiSource']||null;_0x5d06e0['set'](_0x192103,{'userId':_0x3b169b,'aiSource':_0x12942f}),_0xb65d49['set'](_0x192103,{'userId':_0x3b169b,'aiSource':_0x188b36});}_0x192103==_0x47e198&&(_0x3b169b=null,_0x47e198=null);}}const _0x47c861={},_0x5b500e=new Set();for(const _0x13bb4d of _0x53324a){const _0x3e5f33=_0x470e38['deletions'][_0x13bb4d],_0xc39824=_0x470e38['insertions'][_0x13bb4d];for(const {userId:_0x5669b4}of this['_touchedMarkers']['values']())null!==_0x5669b4&&_0x5b500e['add'](_0x5669b4);for(const {userId:_0x44429e}of this['_touchedRoots']['values']())null!==_0x44429e&&_0x5b500e['add'](_0x44429e);const _0x1286d7={};this['_markChanges'](_0xc39824,_0x51fc34['insertions'][_0x13bb4d],_0xb65d49,'insertion',_0x5b500e,_0x1286d7),this['_markChanges'](_0x3e5f33,_0x51fc34['deletions'][_0x13bb4d],_0x5d06e0,'deletion',_0x5b500e,_0x1286d7),this['_collectSuggestionAiSources'](_0xc39824,_0x1286d7),this['_collectSuggestionAiSources'](_0x3e5f33,_0x1286d7),_0x47c861[_0x13bb4d]={'insertions':this['_prepareViewToSave'](_0xc39824),'deletions':this['_prepareViewToSave'](_0x3e5f33),'attachChange':this['_touchedRoots']['get'](_0x13bb4d)||null,'attributesBefore':_0x1721d7(this['_baseRootsAttributes']['get'](_0x13bb4d))||{},'attributesAfter':_0x1721d7(this['_diffRootsAttributes']['get'](_0x13bb4d)),'rootElementName':_0x1aea6d['get'](_0x13bb4d),'aiSources':_0x1286d7};}const _0x839ab9=Array['from'](_0xb65d49['values']())['some'](_0x2ceb91=>!(!_0x2ceb91||!_0x2ceb91['aiSource']))||Array['from'](_0x5d06e0['values']())['some'](_0x4e5c5f=>!(!_0x4e5c5f||!_0x4e5c5f['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x3cc76a=>this['_aiTouchedMarkers']['has'](_0x3cc76a));return{'diffData':_0x47c861,'authorsIds':Array['from'](_0x5b500e),'hasAIChanges':_0x839ab9};}_collectSuggestionAiSources(_0x509374,_0x389b10){const _0x376f30=_0x509374['markers'];for(const _0x135b49 of _0x376f30['keys']()){if(!_0x135b49['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x135b49))continue;const _0x26d6e9=this['_aiTouchedMarkers']['get'](_0x135b49);_0x26d6e9&&(_0x389b10[_0x135b49]=_0x26d6e9);}}_processRootBeforeSave(_0x5bf943){for(const [,_0x28285f]of _0x5bf943['markers']){const _0x10a623=_0x28285f['start']['getAncestors']()['filter'](_0x50e8b5=>'tableCell'==_0x50e8b5['name']);for(const _0x27b519 of _0x10a623)0x1==_0x27b519['childCount']&&_0x27b519['getChild'](0x0)['is']('element','paragraph')&&_0x27b519['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5037a2){this['_processRootBeforeSave'](_0x5037a2);const _0x6e7334=this['editor']['data']['toView'](_0x5037a2,{}),_0x277972=Array['from'](_0x6e7334['getChildren']())['map'](_0x39fe3b=>this['_getViewJson'](_0x39fe3b));return JSON['stringify'](_0x277972);}_getViewJson(_0x301b6f){if(_0x301b6f['is']('$text'))return _0x301b6f['data'];{const _0x5df9bc=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x411df7=_0x301b6f,_0x7c1e73=this['editor']['data']['htmlProcessor']['domConverter'],_0x3d71c7={'type':_0x5df9bc['_getTypeCharForViewElement'](_0x411df7),'name':_0x411df7['name'],'attributes':Array['from'](_0x411df7['getAttributes']()),'children':Array['from'](_0x411df7['getChildren']())['map'](_0x2a3ffe=>this['_getViewJson'](_0x2a3ffe))};if(_0x301b6f['is']('uiElement')&&'$comment'!=_0x301b6f['name']){const _0x27e0c3=_0x301b6f['render'](_0x7c1e73['domDocument'],_0x7c1e73);_0x3d71c7['children']['push'](_0x27e0c3['outerHTML']);}else{if(_0x301b6f['is']('rawElement')){const _0x53af15=_0x7c1e73['domDocument']['createElement'](_0x411df7['name']);_0x301b6f['render'](_0x53af15,_0x7c1e73),_0x3d71c7['children']['push'](_0x53af15['innerHTML']);}}const _0x52781f=Array['from'](_0x411df7['getCustomProperties']());_0x52781f['length']>0x0&&(_0x3d71c7['customProperties']=_0x52781f);const _0xb713e3=_0x411df7['getFillerOffset']();return null!==_0xb713e3&&(_0x3d71c7['fillerOffset']=_0xb713e3),_0x3d71c7;}}['_markChanges'](_0xf1520b,_0x37ecce,_0x2acc40,_0x5a50df,_0x21cd35,_0x380e54){let _0x3c5ecd=null,_0x3a9669=null,_0x3516cb=0x0;const _0x31fb29=this['editor']['model'];for(let _0x26ce26=0x0;_0x26ce26<_0x37ecce['length'];_0x26ce26++){const _0x2db7a6=this['_getVidAttributeName'](_0x37ecce[_0x26ce26]),_0x57ca45=_0x37ecce[_0x26ce26]['item']['getAttribute'](_0x2db7a6),_0x2856d5=_0x2acc40['get'](_0x57ca45),_0x5927c1=_0x26ce26==_0x37ecce['length']-0x1;!_0x3c5ecd&&_0x2856d5&&(_0x3c5ecd=_0x2856d5,_0x3a9669=_0x37ecce[_0x26ce26]);const _0x34e60c=!!_0x3c5ecd&&!!_0x2856d5&&_0x2856d5['userId']!=_0x3c5ecd['userId'],_0x48b60d=!!_0x3c5ecd&&!!_0x2856d5&&_0x2856d5['aiSource']!=_0x3c5ecd['aiSource'];_0x3c5ecd&&(!_0x2856d5||_0x34e60c||_0x48b60d)&&(_0x1ad959(_0x2856d5,Ot(_0x3a9669,_0xf1520b,_0x31fb29),Ot(_0x37ecce[_0x26ce26],_0xf1520b,_0x31fb29)),_0x3c5ecd=_0x2856d5||null,_0x3a9669=_0x2856d5?_0x37ecce[_0x26ce26]:null),_0x3c5ecd&&_0x5927c1&&_0x1ad959(_0x2856d5,Ot(_0x3a9669,_0xf1520b,_0x31fb29),Ct(_0x37ecce[_0x26ce26],_0xf1520b,_0x31fb29));}function _0x1ad959(_0x51f2e6,_0x239115,_0x1bd9cb){const _0x4f43c9=_0x3c5ecd['userId'],_0x25f4b8=_0x3c5ecd['aiSource'],_0x24fcdc='revision:'+_0x5a50df+':'+_0x4f43c9+':'+_0x3516cb++,_0x32ed0f=_0x31fb29['createRange'](_0x239115,_0x1bd9cb);_0xf1520b['markers']['set'](_0x24fcdc,_0x32ed0f),_0x25f4b8&&(_0x380e54[_0x24fcdc]=_0x25f4b8),null!==_0x4f43c9&&_0x21cd35['add'](_0x4f43c9);}}_getVidAttributeName(_0x4f1808){switch(_0x4f1808['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x4c9495){const _0xd3bdb=this['_idsRoots']['get'](_0x4c9495['position']['root']['rootName']),_0x41c163=_0x46ca69(_0x4c9495['position'],_0xd3bdb),_0x1ef4a0=null===_0x4c9495['_authorId']?null:_0x4c9495['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x345510=_0x4c9495['_aiSource']||null,_0x2b1f97=_0x41c163['parent'],_0x511a61=this['_revisionId'],_0x228c4b=[];for(const _0x4c2845 of _0x4c9495['nodes'])if(_0x4c2845['is']('element'))_0x228c4b['push'](this['_makeIdsRoot'](_0x4c2845));else{for(let _0x1e9bba=0x0;_0x1e9bba<_0x4c2845['offsetSize'];_0x1e9bba++)_0x228c4b['push'](new _0x329f01('$text',{'vid':this['_revisionId']++}));}const _0x7a30df=this['_revisionId'];for(let _0x2b4e67=_0x511a61;_0x2b4e67<_0x7a30df;_0x2b4e67++)this['_touched']['set'](_0x2b4e67,{'userId':_0x1ef4a0,'aiSource':_0x345510});_0x2b1f97['_insertChild'](_0x41c163['offset'],_0x228c4b);}_setTouched(_0x203f85,_0x5f0e72,_0x5e8c57){this['_touched']['set'](_0x203f85,{'userId':_0x5f0e72,'aiSource':_0x5e8c57||this['_touched']['get'](_0x203f85)?.['aiSource']||null});}_handleMoveOperation(_0x21d9b8){(_0x21d9b8=this['_cloneOperation'](_0x21d9b8,this['_idsRoots']))['_execute']();const _0x30e2fd=null===_0x21d9b8['_authorId']?null:_0x21d9b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x31f727=_0x21d9b8['_aiSource']||null,_0x36502a=_0x21d9b8['getMovedRangeStart'](),_0x31f5f2=_0x36502a['parent'],_0x828cb5=_0x36502a['offset'],_0x5aa67e=(_0x33cbe5,_0x11763d,_0x15483a)=>{for(let _0x1bccb2=_0x11763d;_0x1bccb2<_0x15483a;_0x1bccb2++){const _0x2d7886=_0x33cbe5['getChild'](_0x1bccb2);_0x2d7886['is']('element','$text')?this['_setTouched'](_0x2d7886['getAttribute']('vid'),_0x30e2fd,_0x31f727):(this['_setTouched'](_0x2d7886['getAttribute']('vid_start'),_0x30e2fd,_0x31f727),_0x5aa67e(_0x2d7886,0x0,_0x2d7886['childCount']),this['_setTouched'](_0x2d7886['getAttribute']('vid_end'),_0x30e2fd,_0x31f727));}};_0x5aa67e(_0x31f5f2,_0x828cb5,_0x828cb5+_0x21d9b8['howMany']);}_handleMergeOperation(_0x12b999){const _0x41c129=null===(_0x12b999=this['_cloneOperation'](_0x12b999,this['_idsRoots']))['_authorId']?null:_0x12b999['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x625b72=_0x12b999['_aiSource']||null,_0xbe7fcc=_0x12b999['targetPosition']['parent'],_0x1dd235=_0x12b999['sourcePosition']['parent'],_0x3d2647=_0xbe7fcc['getAttribute']('vid_end'),_0x261a76=_0x1dd235['getAttribute']('vid_start');_0xbe7fcc['_setAttribute']('vid_end',_0x1dd235['getAttribute']('vid_end')),_0x1dd235['_setAttribute']('vid_end',_0x3d2647),this['_setTouched'](_0x261a76,_0x41c129,_0x625b72),this['_setTouched'](_0x3d2647,_0x41c129,_0x625b72),_0x12b999['_execute']();}_handleSplitOperation(_0x432479){const _0x39f0cb=null===(_0x432479=this['_cloneOperation'](_0x432479,this['_idsRoots']))['_authorId']?null:_0x432479['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2a663b=_0x432479['_aiSource']||null,_0x447782=_0x432479['graveyardPosition'],_0x5b64d5=_0x432479['splitPosition']['parent'];_0x432479['_execute']();const _0x3de6e9=_0x5b64d5['getAttribute']('vid_end'),_0x36ea8a=_0x432479['insertionPosition']['nodeAfter'];if(_0x447782){const _0x210e33=_0x36ea8a['getAttribute']('vid_end'),_0x59c726=_0x5b64d5['getAttribute']('vid_end');_0x5b64d5['_setAttribute']('vid_end',_0x210e33),_0x36ea8a['_setAttribute']('vid_end',_0x59c726),this['_setTouched'](_0x5b64d5['getAttribute']('vid_end'),_0x39f0cb,_0x2a663b),this['_setTouched'](_0x36ea8a['getAttribute']('vid_start'),_0x39f0cb,_0x2a663b);}else{const _0x5676e4=this['_revisionId']++,_0x29f8d1=this['_revisionId']++;_0x5b64d5['_setAttribute']('vid_end',_0x5676e4),_0x36ea8a['_setAttribute']('vid_start',_0x29f8d1),_0x36ea8a['_setAttribute']('vid_end',_0x3de6e9),this['_setTouched'](_0x5676e4,_0x39f0cb,_0x2a663b),this['_setTouched'](_0x29f8d1,_0x39f0cb,_0x2a663b);}}_handleMarkerOperation(_0x4d74d8){if(!_0x4d74d8['affectsData'])return;const _0x12b768=(_0x4d74d8=this['_cloneOperation'](_0x4d74d8,this['_diffRoots']))['oldRange']?_0x4d74d8['oldRange']['root']:null,_0x32cdf6=_0x4d74d8['newRange']?_0x4d74d8['newRange']['root']:null;_0x12b768&&this['_markers']['delete'](_0x4d74d8['name']),_0x32cdf6&&this['_markers']['set'](_0x4d74d8['name'],_0x4d74d8['newRange']['clone']());const _0x2c442c=null===_0x4d74d8['_authorId']?null:_0x4d74d8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x474902=_0x4d74d8['name'];if(_0x4d74d8['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x474902,_0x4d74d8['_aiSource']),!this['_touchedMarkers']['has'](_0x474902))return void this['_touchedMarkers']['set'](_0x474902,{'range':_0x4d74d8['oldRange'],'userId':_0x2c442c});const _0x5868ed=this['_touchedMarkers']['get'](_0x474902),_0x11d0a8=_0x5868ed['range'],_0x4a3e79=_0x4d74d8['newRange'];null==_0x11d0a8&&null==_0x4a3e79||_0x11d0a8&&_0x4a3e79&&_0x11d0a8['isEqual'](_0x4a3e79)?this['_touchedMarkers']['delete'](_0x4d74d8['name']):_0x5868ed['userId']=_0x2c442c;}_handleRootOperation(_0x30f9b9,_0x6bbf07){this['_diffRoots']['has'](_0x30f9b9['rootName'])?this['_diffRoots']['get'](_0x30f9b9['rootName'])['_isAttached']=_0x30f9b9['isAdd']:(this['_diffRoots']['set'](_0x30f9b9['rootName'],Et(_0x30f9b9['rootName'],_0x30f9b9['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x30f9b9['rootName'],{}),_0x6bbf07&&this['_idsRoots']['set'](_0x30f9b9['rootName'],Et(_0x30f9b9['rootName'],_0x30f9b9['elementName'],!0x0)));const _0xa9197c=null===_0x30f9b9['_authorId']?null:_0x30f9b9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3f083e=this['_touchedRoots']['get'](_0x30f9b9['rootName']);_0x3f083e&&_0x3f083e['userId']===_0xa9197c?this['_touchedRoots']['delete'](_0x30f9b9['rootName']):this['_touchedRoots']['set'](_0x30f9b9['rootName'],{'userId':_0xa9197c,'isAttached':_0x30f9b9['isAdd']});}_handleRootAttributeOperation(_0x4cd417){const _0x34cf02=this['_diffRootsAttributes']['get'](_0x4cd417['root']['rootName']);null===_0x4cd417['newValue']?delete _0x34cf02[_0x4cd417['key']]:_0x34cf02[_0x4cd417['key']]=_0x4cd417['newValue'];}};function St(_0x18a756){const _0x2f5cf1=Et(_0x18a756['rootName'],_0x18a756['name'],_0x18a756['isAttached']());for(const _0x47f147 of _0x18a756['getChildren']()){const _0x6b3d25=_0x47f147['_clone'](!0x0);_0x2f5cf1['_appendChild'](_0x6b3d25);}return _0x2f5cf1;}function Et(_0x26504f,_0x4271a8,_0x15faee=!0x0){const _0x452ad2=new _0x48b379();return _0x452ad2['rootName']=_0x26504f,_0x452ad2['name']=_0x4271a8,_0x452ad2['_isAttached']=_0x15faee,_0x452ad2['isAttached']=()=>_0x452ad2['_isAttached'],_0x452ad2;}function Ot(_0x2f2c17,_0x541c67,_0x3729bf){const _0xc31c6c='elementEnd'==_0x2f2c17['type']?_0x3729bf['createPositionAt'](_0x2f2c17['item'],'end'):_0x3729bf['createPositionBefore'](_0x2f2c17['item']);return _0x3729bf['createPositionFromPath'](_0x541c67,_0xc31c6c['path'],_0xc31c6c['stickiness']);}function Ct(_0x2d0879,_0x5184e6,_0x245d29){const _0x548f4c='elementStart'==_0x2d0879['type']?_0x245d29['createPositionAt'](_0x2d0879['item'],0x0):_0x245d29['createPositionAfter'](_0x2d0879['item']);return _0x245d29['createPositionFromPath'](_0x5184e6,_0x548f4c['path'],_0x548f4c['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x4d35f();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x1362eb){super(),this['id']=_0x1362eb['id']||_0x27f7da(),this['author']=_0x1362eb['author'],this['type']=_0x1362eb['type'],this['data']=_0x1362eb['data']||{},this['rootName']=_0x1362eb['rootName'],this['set']('createdAt',_0x1362eb['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x427604,_0x580788){this['newRevisionId']=_0x427604,this['oldRevisionId']=_0x580788,this['changes']=new _0x2a4b06();}_setChanges(_0x432080){for(const _0x1714e7 of _0x432080)this['changes']['add'](_0x1714e7);}},Pt=class extends _0xc765d1{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x369e38,_0x196835,bt,Rt];}constructor(_0x7d6da){super(_0x7d6da),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',(_0x473f8f,_0xcdeeec,_0x1f2d56)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x277a4f=>{for(const _0x4aec25 of this['editor']['editing']['view']['document']['roots'])_0x1f2d56?_0x277a4f['removeClass']('ck-editor__editable__overlay',_0x4aec25):_0x277a4f['addClass']('ck-editor__editable__overlay',_0x4aec25);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0xfd1a0b=>null!==_0xfd1a0b),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x122ed6,_0x3e78be,_0x52bbd8)=>_0x122ed6&&_0x52bbd8?_0x3e78be['changes']['getIndex'](_0x52bbd8):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1b3981,_0x1a1f38)=>_0x1b3981?_0x1a1f38['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x196835),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x38a70f=this['editor'],_0x399f92=new $t(_0x38a70f,{'direction':'backward'}),_0x4b2e13=new $t(_0x38a70f,{'direction':'forward'});_0x38a70f['commands']['add']('showPreviousChange',_0x399f92),_0x38a70f['commands']['add']('showNextChange',_0x4b2e13),_0x38a70f['commands']['add']('restoreRevision',new Ft(_0x38a70f)),this['on']('change:numberOfChanges',()=>{_0x399f92['refresh'](),_0x4b2e13['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x38a70f['enableReadOnlyMode']('revision-viewer'),_0x38a70f['plugins']['has']('WidgetToolbarRepository')&&_0x38a70f['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x1312e5){return await this['_utils']['loadRevisionData'](_0x1312e5,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1312e5);}async getRevisionRootsAttributes(_0x2d9fc4){return await this['_utils']['loadRevisionData'](_0x2d9fc4,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2d9fc4);}async['compare'](_0x2eeda3,_0x5bc00d,_0x515baf=!0x1){if(!this['isEnabled'])return;const _0x1b69a4=this['diff'],_0x21ed31=this['repository'],_0x4d32a7='string'==typeof _0x2eeda3?_0x21ed31['getRevision'](_0x2eeda3):_0x2eeda3,_0x4e6400='string'==typeof _0x5bc00d?_0x21ed31['getRevision'](_0x5bc00d):_0x5bc00d,_0xe7abd6=_0x4d32a7['id'],_0x3bbebf=_0x4e6400?_0x4e6400['id']:null;if(!_0x515baf&&this['diff']&&this['diff']['newRevisionId']===_0xe7abd6&&this['diff']['oldRevisionId']===_0x3bbebf)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0xe7abd6,_0x3bbebf);const _0x5923bb=this['_getRevisionsRange'](_0x4d32a7,_0x4e6400,!0x0)['map'](_0x2aacc7=>this['_utils']['loadRevisionData'](_0x2aacc7,this['adapter']));return _0x5923bb['push'](new Promise(_0xebc8cb=>{setTimeout(_0xebc8cb,0x14);})),Promise['all'](_0x5923bb)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2671fc=this['_getDiff'](_0xe7abd6,_0x3bbebf);this['_cleanUpCommentMarkers'](_0x2671fc);for(const _0xd6f025 of _0x2671fc['changes'])this['_changeIdToChange']['set'](_0xd6f025['id'],_0xd6f025);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1575cc=>{for(const _0x351899 of this['editor']['model']['document']['getRootNames']())_0x1575cc['detachRoot'](_0x351899);for(const _0xa98e43 of Object['keys'](_0x2671fc['model'])){const _0x12a899=_0x2671fc['model'][_0xa98e43]['name'],_0xfd6013=_0x1575cc['addRoot'](_0xa98e43,_0x12a899);for(const _0x4bab08 of Object['keys'](_0x2671fc['attributes'][_0xa98e43]))_0x1575cc['setAttribute'](_0x4bab08,_0x2671fc['attributes'][_0xa98e43][_0x4bab08],_0xfd6013);_0x1575cc['insert'](_0x2671fc['model'][_0xa98e43],_0xfd6013,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2671fc['changes'])),this['isReady']=!0x0;})['catch'](_0x2c55c3=>{console['error'](_0x2c55c3),this['_cleanUp'](),_0x1b69a4&&(this['diff']=_0x1b69a4),this['isReady']=!0x0;});}addRevisionData(_0x333c08,_0x2db8c4){const _0x5d6ac7=this['repository']['createRevision'](_0x333c08);return _0x5d6ac7['on']('_update',(_0x36bfab,_0x1d7b01,_0x5cd0d4)=>_0x2db8c4(_0x1d7b01,_0x5cd0d4,_0x5d6ac7)),this['repository']['addRevision'](_0x5d6ac7),_0x5d6ac7;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x296a14=>{for(const _0x29f697 of this['editor']['model']['document']['getRootNames']())_0x296a14['detachRoot'](_0x29f697);});}_cleanUpCommentMarkers(_0x366461){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x507d02=this['_getVisibleCommentThreadIds']();for(const _0xee6b53 of Object['values'](_0x366461['model']))for(const _0x4a82fb of Array['from'](_0xee6b53['markers']['keys']()))_0x4a82fb['startsWith']('revision-comment:')&&!_0x507d02['has'](Ut(_0x4a82fb))&&_0xee6b53['markers']['delete'](_0x4a82fb);}_sortAndFilterDiffChanges(_0x44871f){const _0x1e2552=[],_0x409530=new Map();for(const _0x2fd3aa of this['editor']['model']['document']['getRootNames']()){const _0x495ec8=this['editor']['editing']['view']['getDomRoot'](_0x2fd3aa);if(!_0x495ec8)continue;const _0x23a053=_0x495ec8['getClientRects']()['item'](0x0);_0x23a053&&(_0x1e2552['push'](_0x2fd3aa),_0x409530['set'](_0x2fd3aa,_0x23a053));}return _0x1e2552['sort']((_0x574ebb,_0x592357)=>{const _0x3dd2e7=_0x409530['get'](_0x574ebb),_0x49a9ba=_0x409530['get'](_0x592357);return _0x3dd2e7['y']-_0x49a9ba['y']||_0x3dd2e7['x']-_0x49a9ba['x'];}),(_0x44871f=_0x44871f['filter'](_0x53da01=>_0x1e2552['includes'](_0x53da01['rootName'])))['sort']((_0x39c60e,_0x34231c)=>_0x1e2552['indexOf'](_0x39c60e['rootName'])-_0x1e2552['indexOf'](_0x34231c['rootName'])),_0x44871f;}['_makeTape'](_0x8123ec,_0x461213={}){const _0x3ca1f9=Array['from'](_0x8123ec['markers'])['filter'](([_0x2fbfc3,_0xe4edf])=>_0x2fbfc3['startsWith']('revision:')&&!_0xe4edf['isCollapsed']),_0x2cf13d=Array['from'](this['editor']['model']['createRangeIn'](_0x8123ec)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3ca1f9['length'])for(const _0xaa62aa of _0x2cf13d){const [_0x2867d4,_0x3b77ad]=_0x3ca1f9[0x0],[,_0x5b0a4f,_0x416736]=_0x2867d4['split'](':'),_0x499f6b=_0x461213[_0x2867d4]||null;if(_0x3b77ad['end']['isEqual'](_0xaa62aa['nextPosition'])&&_0x3ca1f9['shift'](),(_0xaa62aa['previousPosition']['isEqual'](_0x3b77ad['start'])||_0xaa62aa['previousPosition']['isAfter'](_0x3b77ad['start']))&&('insertion'==_0x5b0a4f?_0xaa62aa['isAdded']={'userId':_0x416736,'aiSource':_0x499f6b}:'deletion'==_0x5b0a4f&&(_0xaa62aa['isRemoved']={'userId':_0x416736,'aiSource':_0x499f6b})),0x0==_0x3ca1f9['length'])break;}return _0x2cf13d;}_refreshStartEndIndex(_0x507c74){const _0xd392f9=new Map();for(let _0x432329=0x0;_0x432329<_0x507c74['length'];_0x432329++)'text'===_0x507c74[_0x432329]['type']?(_0x507c74[_0x432329]['item']['startIndex']=_0x432329,_0x507c74[_0x432329]['item']['endIndex']=_0x432329):('elementStart'===_0x507c74[_0x432329]['type']?_0x507c74[_0x432329]['item']['startIndex']=_0x432329:'elementEnd'===_0x507c74[_0x432329]['type']&&(_0x507c74[_0x432329]['item']['endIndex']=_0x432329),_0xd392f9['set'](_0x507c74[_0x432329]['id'],_0x432329));for(const _0x3f0eb5 of _0xd392f9['values']())'elementStart'===_0x507c74[_0x3f0eb5]['type']?_0x507c74[_0x3f0eb5]['item']['endIndex']=_0xd392f9['get'](_0x507c74[_0x3f0eb5]['pairId']):'elementEnd'===_0x507c74[_0x3f0eb5]['type']&&(_0x507c74[_0x3f0eb5]['item']['startIndex']=_0xd392f9['get'](_0x507c74[_0x3f0eb5]['pairId']));}['_processTape'](_0x4c31c7){for(let _0x4d326f=0x0;_0x4d326f<_0x4c31c7['length'];_0x4d326f++){if('elementStart'===_0x4c31c7[_0x4d326f]['type'])_0x4c31c7[_0x4d326f]['item']['startIndex']=_0x4d326f;else{if('elementEnd'===_0x4c31c7[_0x4d326f]['type']){_0x4c31c7[_0x4d326f]['item']['endIndex']=_0x4d326f;const _0x3ebcef=_0x4c31c7[_0x4d326f]['item']['startIndex'];_0x4c31c7[_0x3ebcef]['pairId']=_0x4c31c7[_0x4d326f]['id'],_0x4c31c7[_0x4d326f]['pairId']=_0x4c31c7[_0x3ebcef]['id'];}else _0x4c31c7[_0x4d326f]['item']['startIndex']=_0x4d326f,_0x4c31c7[_0x4d326f]['item']['endIndex']=_0x4d326f,_0x4c31c7[_0x4d326f]['pairId']=null;}_0x4c31c7[_0x4d326f]['markersStart']||(_0x4c31c7[_0x4d326f]['markersStart']=[],_0x4c31c7[_0x4d326f]['markersEnd']=[]);}}_markInsertions(_0x20ee82,_0x443e66){const _0x4f170d=_0x20ee82['filter'](_0x1c59d4=>!_0x1c59d4['isAdded']);for(let _0x10b54d=0x0;_0x10b54d<_0x443e66['length'];_0x10b54d++)_0x443e66[_0x10b54d]['isAdded']&&(_0x4f170d[_0x10b54d]['isAdded']=_0x443e66[_0x10b54d]['isAdded']);}_getDiff(_0x140c94,_0xca09cb=null){const _0x564325=this['repository']['getRevision'](_0x140c94),_0x37f831=_0xca09cb?this['repository']['getRevision'](_0xca09cb):null,_0x4ce38c=this['_getRevisionsRange'](_0x564325,_0x37f831),_0x48d5c3=_0x4ce38c[_0x4ce38c['length']-0x1],_0x64926=new Map(),_0x4529cf={'model':{},'attributes':{},'changes':[]},_0x2842f4=new Set(),_0x5b1252=new Map();for(let _0xd8a12f=_0x4ce38c['length']-0x1;_0xd8a12f>=0x0;_0xd8a12f--){const _0x392010=_0x4ce38c[_0xd8a12f];for(const _0x2bce30 of Object['keys'](_0x392010['diffData']))if(_0x392010['diffData'][_0x2bce30]['attachChange']){const _0x31f5d5=_0x392010['diffData'][_0x2bce30]['attachChange'];_0x31f5d5['isAttached']?(_0x2842f4['add'](_0x2bce30),_0x5b1252['has'](_0x2bce30)&&_0x5b1252['get'](_0x2bce30)['userId']==_0x31f5d5['userId']?_0x5b1252['delete'](_0x2bce30):_0x5b1252['set'](_0x2bce30,_0x31f5d5)):_0x5b1252['has'](_0x2bce30)?(_0x2842f4['delete'](_0x2bce30),_0x5b1252['delete'](_0x2bce30)):(_0x2842f4['add'](_0x2bce30),_0x5b1252['set'](_0x2bce30,_0x31f5d5));}else _0x2842f4['add'](_0x2bce30);}for(const _0x142569 of _0x2842f4){const _0x2b00fa=_0x5b1252['has'](_0x142569)&&!_0x5b1252['get'](_0x142569)['isAttached'];let _0x1e4226=_0x2b00fa?_0x4ce38c['length']-0x1:0x0;const _0x45177e=_0x2b00fa?-0x1:0x1;for(;_0x4ce38c[_0x1e4226];){const _0x586e63=_0x4ce38c[_0x1e4226];if(_0x586e63['diffData'][_0x142569]){const _0x316e31=_0x2b00fa?_0x586e63['diffData'][_0x142569]['attributesBefore']:_0x586e63['diffData'][_0x142569]['attributesAfter'];_0x4529cf['attributes'][_0x142569]=_0x316e31?_0x1721d7(_0x316e31):{};break;}_0x1e4226+=_0x45177e;}}for(const _0x197dd6 of _0x4ce38c){_0x197dd6['model']={};for(const _0x49583e of _0x197dd6['authors'])_0x64926['set'](_0x49583e['id'],_0x49583e);for(const _0x5c870a of _0x2842f4){const _0x53f5fe=_0x197dd6['diffData'][_0x5c870a]?_0x197dd6['diffData'][_0x5c870a]['insertions']:'[]',_0x1df740=_0x197dd6['diffData'][_0x5c870a]?_0x197dd6['diffData'][_0x5c870a]['deletions']:'[]',_0x587278=_0x197dd6['diffData'][_0x5c870a]?.['rootElementName']||'$root';_0x197dd6['model'][_0x5c870a]={'insertions':this['_utils']['_makeModelFromViewString'](_0x53f5fe,_0x587278),'deletions':this['_utils']['_makeModelFromViewString'](_0x1df740,_0x587278)};}}for(const _0x35adbd of _0x2842f4){let _0x53402e=null,_0x3e4c1e=0x0;const _0x302de7=_0x4ce38c['map'](_0x451fc0=>_0x451fc0['diffData'][_0x35adbd]?.['rootElementName'])['find'](_0x19741e=>void 0x0!==_0x19741e)||'$root',_0x36b08c=new Map(Array['from'](_0x564325['model'][_0x35adbd]['insertions']['markers'])['filter'](([_0x2c3cf3])=>!_0x2c3cf3['startsWith']('revision:')));let _0x4b20c4=0x0;for(const _0x13f0ab of _0x4ce38c){const _0x906b5c=_0x13f0ab['diffData'][_0x35adbd]?.['aiSources']||{},_0x5c7fef=this['_makeTape'](_0x13f0ab['model'][_0x35adbd]['insertions'],_0x906b5c);_0x13f0ab==_0x564325?(_0x53402e=_0x5c7fef,_0x3e4c1e=_0x53402e['length'],_0x53402e['forEach'](_0x1eaecc=>{_0x1eaecc['id']=_0x4b20c4++;}),this['_processTape'](_0x53402e)):this['_markInsertions'](_0x53402e,_0x5c7fef);const _0x5ecf25=_0x53402e['filter'](_0x308339=>!_0x308339['isAdded'])['map'](_0x3184c2=>_0x3184c2['id']);let _0x2aae6c=0x0;const _0x5ea161=this['_makeTape'](_0x13f0ab['model'][_0x35adbd]['deletions'],_0x906b5c);_0x5ea161['forEach'](_0x5a9119=>{_0x5a9119['isRemoved']?_0x5a9119['id']=_0x3e4c1e++:_0x5a9119['id']=_0x5ecf25[_0x2aae6c++];}),this['_processTape'](_0x5ea161),this['_setDistance'](_0x53402e,'isAdded'),this['_setDistance'](_0x5ea161,'isRemoved'),_0x13f0ab==_0x564325&&this['_markMarkers'](_0x53402e,_0x36b08c),_0x53402e=this['_joinTapes'](_0x53402e,_0x5ea161),this['_refreshStartEndIndex'](_0x53402e),this['_setDistance'](_0x53402e,'isRemoved');}_0x53402e=_0x53402e['filter'](_0x2f480f=>!(_0x2f480f['isAdded']&&_0x2f480f['isRemoved']));const _0x50b770=new Map(_0x48d5c3['model'][_0x35adbd]['deletions']['markers']),_0x25a985=new Set(_0x36b08c['keys']());for(const _0x63e997 of _0x50b770['keys']())_0x25a985['delete'](_0x63e997);const _0x275bca=Object['assign']({},..._0x4ce38c['map'](_0x3ad9f6=>_0x3ad9f6['diffData'][_0x35adbd]?.['aiSources']));this['_markSuggestions'](_0x53402e,_0x25a985,_0x275bca),this['_fixObsoleteTags'](_0x53402e),_0x53402e=this['_removeMissingPairs'](_0x53402e),_0x53402e=this['_markMismatchedRemovedTags'](_0x53402e),_0x53402e=this['_removeUnsupportedChanges'](_0x53402e);const {root:_0x2f40a2,changes:_0x12650b}=this['_makeModelFromTape'](_0x53402e,_0x64926,_0x35adbd,_0x302de7);_0x4529cf['model'][_0x35adbd]=_0x2f40a2;const _0x14f2b2=_0x5b1252['get'](_0x35adbd);if(_0x14f2b2){const _0x3036ea=_0x64926['get'](_0x14f2b2['userId']),_0x4f2eb0=new Mt({'author':_0x3036ea,'type':_0x14f2b2['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x35adbd});_0x12650b['unshift'](_0x4f2eb0),_0x4529cf['attributes'][_0x35adbd]['revisionHistoryAttachChange']=_0x4f2eb0['id'];}_0x4529cf['changes']=_0x4529cf['changes']['concat'](_0x12650b);}return _0x4529cf;}['_markMarkers'](_0x57fc97,_0x3cbf9b){for(let _0x518326=0x0;_0x518326<_0x57fc97['length'];_0x518326++)for(const [_0x5455cc,_0x2dd263]of _0x3cbf9b)!_0x2dd263['isCollapsed']&&_0x2dd263['start']['isEqual'](_0x57fc97[_0x518326]['previousPosition'])&&_0x57fc97[_0x518326]['markersStart']['push'](_0x5455cc),_0x2dd263['end']['isEqual'](_0x57fc97[_0x518326]['nextPosition'])&&_0x57fc97[_0x518326]['markersEnd']['push'](_0x5455cc);}['_joinTapes'](_0x2fc682,_0x481ebb){let _0x1209b7=[],_0x1c9507=0x0,_0x520aec=0x0;for(;_0x1c9507<_0x2fc682['length']||_0x520aec<_0x481ebb['length'];){const _0x233407=_0x2fc682[_0x1c9507]||{},_0x6a7c2d=_0x481ebb[_0x520aec]||{};if(_0x233407['id']==_0x6a7c2d['id'])_0x1c9507++,_0x520aec++,_0x1209b7['push'](_0x233407);else{if(_0x6a7c2d['isRemoved']&&_0x233407['isAdded']){const {commonTape:_0x1f46f5,iEnd:_0x3980a1,jEnd:_0x248a17}=this['_threeWayMerge'](_0x2fc682,_0x1c9507,_0x481ebb,_0x520aec);_0x1209b7=_0x1209b7['concat'](_0x1f46f5),_0x1c9507=_0x3980a1,_0x520aec=_0x248a17;}else _0x6a7c2d['isRemoved']?(_0x520aec++,_0x1209b7['push'](_0x6a7c2d)):(_0x1c9507++,_0x1209b7['push'](_0x233407));}}return _0x1209b7;}_markSuggestions(_0x2a1cd9,_0x39432d,_0x4781a6){const _0xebcc27=[];for(let _0x25b8ca=0x0;_0x25b8ca<_0x2a1cd9['length'];_0x25b8ca++){for(let _0x206f0a=0x0;_0x206f0a<_0x2a1cd9[_0x25b8ca]['markersStart']['length'];_0x206f0a++){const _0x4d41d4=_0x2a1cd9[_0x25b8ca]['markersStart'][_0x206f0a];if(!_0x39432d['has'](_0x4d41d4))continue;const {group:_0x28f66b,type:_0x5f3b82,authorId:_0x83b315}=_0x4be76a(_0x4d41d4);if('revision-suggestion'!=_0x28f66b||'insertion'!=_0x5f3b82&&'deletion'!=_0x5f3b82)continue;const _0x4399b8=_0x4781a6['suggestion:'+_0x4d41d4['slice'](0x14)]||null;_0xebcc27['unshift']({'type':_0x5f3b82,'name':_0x4d41d4,'userId':_0x83b315,'aiSource':_0x4399b8}),_0x2a1cd9[_0x25b8ca]['markersStart']['splice'](_0x206f0a,0x1),_0x206f0a--;}_0x4e2a30(_0x2a1cd9[_0x25b8ca]);for(let _0x38a4b3=0x0;_0x38a4b3<_0x2a1cd9[_0x25b8ca]['markersEnd']['length'];_0x38a4b3++){const _0x375d42=_0x2a1cd9[_0x25b8ca]['markersEnd'][_0x38a4b3];if(!_0x39432d['has'](_0x375d42))continue;const {group:_0x4c3710,type:_0x57cc4f}=_0x4be76a(_0x375d42);if('revision-suggestion'!=_0x4c3710||'insertion'!=_0x57cc4f&&'deletion'!=_0x57cc4f)continue;_0x2a1cd9[_0x25b8ca]['markersEnd']['splice'](_0x38a4b3,0x1),_0x38a4b3--;const _0x3996fe=_0xebcc27['findIndex'](_0x40835e=>_0x40835e['name']==_0x375d42);_0x3996fe>-0x1&&_0xebcc27['splice'](_0x3996fe,0x1);}}function _0x4be76a(_0x6bfc4){const _0x101fa1=_0x6bfc4['split'](':');return{'group':_0x101fa1[0x0],'type':_0x101fa1[0x1],'subType':_0x101fa1['length']>=0x5?_0x101fa1[0x2]:null,'id':_0x101fa1['length']<0x5?_0x101fa1[0x2]:_0x101fa1[0x3],'authorId':_0x101fa1['length']<0x5?_0x101fa1[0x3]:_0x101fa1[0x4],'markerCount':0x6==_0x101fa1['length']?_0x101fa1[0x5]:null};}function _0x4e2a30(_0x2e2366){for(let _0x25a597=0x0;_0x25a597<_0xebcc27['length'];_0x25a597++){if(_0x2e2366['isAdded']&&'insertion'==_0xebcc27[_0x25a597]['type']&&_0x2e2366['isAdded']['userId']==_0xebcc27[_0x25a597]['userId'])return _0x2e2366['isAddSuggestion']={..._0xebcc27[_0x25a597],'aiSource':_0x2e2366['isAdded']['aiSource']||_0xebcc27[_0x25a597]['aiSource']},void delete _0x2e2366['isAdded'];if(!_0x2e2366['isAdded']&&!_0x2e2366['isRemoved']&&'deletion'==_0xebcc27[_0x25a597]['type'])return void(_0x2e2366['isRemoveSuggestion']=_0xebcc27[_0x25a597]);}}}_setDistance(_0xd506be,_0x162994){let _0xbea2ce=0x0,_0x2c6f66=!0x1;const _0x2ac7ec=new Map();for(const _0x4ef8bf of _0xd506be)_0x4ef8bf[_0x162994]?_0x2c6f66&&(_0xbea2ce++,_0x2c6f66=!0x1):(_0xbea2ce++,_0x2c6f66=!0x0),_0x2ac7ec['set'](_0x4ef8bf['id'],_0xbea2ce);for(let _0x12f100=0x0;_0x12f100<_0xd506be['length'];_0x12f100++){if('isRemoved'==_0x162994&&_0xd506be[_0x12f100]['isAdded']||'isAdded'==_0x162994&&_0xd506be[_0x12f100]['isRemoved'])continue;if('text'==_0xd506be[_0x12f100]['type']){_0xd506be[_0x12f100]['distance']=0x0;continue;}const _0x579839=_0x2ac7ec['get'](_0xd506be[_0x12f100]['pairId']),_0x33827b=_0x2ac7ec['get'](_0xd506be[_0x12f100]['id']);_0xd506be[_0x12f100]['distance']=_0x579839-_0x33827b;}}_getRevisionsRange(_0x55c368,_0x3c07ad,_0x493094=!0x1){const _0x33baf7=[];let _0x35c792=this['repository']['getIndex'](_0x55c368),_0x2aed9c=this['repository']['getIndex'](_0x3c07ad);for(-0x1==_0x2aed9c&&(_0x2aed9c=this['repository']['_revisions']['length'],_0x493094=!0x1);_0x35c792<_0x2aed9c;)_0x33baf7['push'](this['repository']['getRevision'](_0x35c792)),_0x35c792++;return _0x493094&&_0x33baf7['push'](this['repository']['getRevision'](_0x35c792)),_0x33baf7;}_threeWayMerge(_0x570eef,_0x218280,_0x568d96,_0x1ff6b7){const _0x393944=this['editor']['model']['schema'];let _0x201a5c=_0x218280;for(;_0x570eef[_0x201a5c]&&_0x570eef[_0x201a5c]['isAdded'];)_0x201a5c++;let _0x1a4051=_0x1ff6b7;for(;_0x568d96[_0x1a4051]&&_0x568d96[_0x1a4051]['isRemoved'];)_0x1a4051++;_0x538681(_0x570eef,_0x218280,_0x201a5c),_0x538681(_0x568d96,_0x1ff6b7,_0x1a4051);const _0x375642=_0x568d96['slice'](_0x1ff6b7,_0x1a4051)['concat'](_0x570eef['slice'](_0x218280,_0x201a5c));return _0x375642['sort']((_0x2d77a0,_0x11f7e9)=>_0x2d77a0['side']!=_0x11f7e9['side']?_0x2d77a0['side']-_0x11f7e9['side']:_0x2d77a0['level']!=_0x11f7e9['level']?_0x2d77a0['level']-_0x11f7e9['level']:_0x2d77a0['distance']!=_0x11f7e9['distance']?_0x11f7e9['distance']-_0x2d77a0['distance']:!!_0x2d77a0['isAdded']!=!!_0x11f7e9['isAdded']?-0x1==_0x2d77a0['side']||0x0==_0x2d77a0['side']?_0x2d77a0['isAdded']?-0x1:0x1:_0x2d77a0['isAdded']?0x1:-0x1:_0x2d77a0['index']-_0x11f7e9['index']),{'commonTape':_0x375642,'iEnd':_0x201a5c,'jEnd':_0x1a4051};function _0x538681(_0x525765,_0x503e7f,_0x1af27a){let _0x278576=-0x1,_0xadebac=Number['POSITIVE_INFINITY'],_0x1f86b8=!0x0;for(let _0x40a1f6=_0x503e7f;_0x40a1f6<_0x1af27a;_0x40a1f6++)if(_0x393944['isInline'](_0x525765[_0x40a1f6]['item'])||(_0x1f86b8=!0x1),_0x525765[_0x40a1f6]['item']['startIndex']<_0x503e7f&&(_0x278576=_0x40a1f6),_0x525765[_0x40a1f6]['item']['endIndex']>=_0x1af27a){_0xadebac=_0x40a1f6;break;}_0x1f86b8&&(_0x278576=_0x1af27a-0x1);for(let _0x50fdea=_0x503e7f;_0x50fdea<_0x1af27a;_0x50fdea++)_0x525765[_0x50fdea]['side']=_0x50fdea<=_0x278576?-0x1:_0x50fdea<_0xadebac?0x0:0x1,_0x525765[_0x50fdea]['index']=_0x50fdea;let _0x55e9d5=0x0;for(let _0xca8680=_0x503e7f;_0xca8680<=_0x278576;_0xca8680++)0x0==_0x525765[_0xca8680]['distance']?_0x525765[_0xca8680]['level']=_0x55e9d5:(_0x55e9d5++,_0x525765[_0xca8680]['level']=_0x55e9d5,_0x55e9d5++);for(let _0xb49400=_0x503e7f;_0xb49400<_0x1af27a;_0xb49400++)0x0==_0x525765[_0xb49400]['side']&&(_0x525765[_0xb49400]['level']=_0x55e9d5);_0x55e9d5=0x0;for(let _0x5dc9ed=_0x1af27a-0x1;_0x5dc9ed>=_0xadebac;_0x5dc9ed--)0x0==_0x525765[_0x5dc9ed]['distance']?_0x525765[_0x5dc9ed]['level']=_0x55e9d5:(_0x55e9d5--,_0x525765[_0x5dc9ed]['level']=_0x55e9d5,_0x55e9d5--);}}_fixObsoleteTags(_0x4198de){const _0x256ba3=new Map(),_0x2e81f0=this['editor']['model']['schema'];for(let _0x23a9e2=0x1;_0x23a9e2<_0x4198de['length'];_0x23a9e2++){let _0x2f2f64,_0x4984a0,_0x35c9e1;const _0x5ae0d0=_0x4198de[_0x23a9e2],_0x3257d2=_0x4198de[_0x23a9e2-0x1];if('text'==_0x5ae0d0['type'])continue;if(_0x5ae0d0['type']!=_0x3257d2['type'])continue;if(!_0x2e81f0['isBlock'](_0x3257d2['item'])||_0x2e81f0['isLimit'](_0x3257d2['item']))continue;if(!_0x2e81f0['isBlock'](_0x5ae0d0['item'])||_0x2e81f0['isLimit'](_0x5ae0d0['item']))continue;if((_0x4198de[_0x23a9e2]['isAdded']||_0x4198de[_0x23a9e2]['isAddSuggestion'])&&_0x4198de[_0x23a9e2-0x1]['isRemoved'])_0x2f2f64=_0x4198de[_0x23a9e2],_0x4984a0=_0x4198de[_0x23a9e2-0x1],_0x35c9e1=_0x23a9e2-0x1;else{if(!_0x4198de[_0x23a9e2]['isRemoved']||!_0x4198de[_0x23a9e2-0x1]['isAdded']&&!_0x4198de[_0x23a9e2-0x1]['isAddSuggestion'])continue;_0x2f2f64=_0x4198de[_0x23a9e2-0x1],_0x4984a0=_0x4198de[_0x23a9e2],_0x35c9e1=_0x23a9e2;}const _0x3afcf3=_0x2f2f64['level']==_0x4984a0['level'],_0x585788=Math['abs'](_0x2f2f64['level'])<Math['abs'](_0x4984a0['level'])&&0x0==_0x4984a0['distance'];(_0x3afcf3||_0x585788)&&(_0x256ba3['set'](_0x4984a0['id'],_0x2f2f64['id']),_0x4198de['splice'](_0x35c9e1,0x1),_0x23a9e2--,_0x2f2f64['isAdded']=!0x1);}for(let _0x534624=0x0;_0x534624<_0x4198de['length'];_0x534624++)_0x256ba3['has'](_0x4198de[_0x534624]['pairId'])&&(_0x4198de[_0x534624]['pairId']=_0x256ba3['get'](_0x4198de[_0x534624]['pairId']));}['_removeMissingPairs'](_0xf9c7c2){const _0x19a3b8=new Set(_0xf9c7c2['map'](_0x2444c9=>_0x2444c9['id']));for(let _0x55bd2f=0x0;_0x55bd2f<_0xf9c7c2['length'];_0x55bd2f++)_0x19a3b8['has'](_0xf9c7c2[_0x55bd2f]['pairId'])||0x0==_0xf9c7c2[_0x55bd2f]['distance']||(_0xf9c7c2[_0x55bd2f]['isIncorrect']=!0x0);return _0xf9c7c2['filter'](_0xb3564e=>!_0xb3564e['isIncorrect']);}_markMismatchedRemovedTags(_0x1cf3cc){const _0x4b0a33=new Set();for(let _0x24b444=0x0;_0x24b444<_0x1cf3cc['length'];_0x24b444++){if(_0x4b0a33['has'](_0x1cf3cc[_0x24b444]['id'])&&_0x1cf3cc[_0x24b444]['isRemoved']&&(_0x1cf3cc[_0x24b444]['isIncorrect']=!0x0),_0x1cf3cc[_0x24b444]['isIncorrect'])continue;if(0x0==_0x1cf3cc[_0x24b444]['distance'])continue;if('elementStart'!=_0x1cf3cc[_0x24b444]['type'])continue;if(null==_0x1cf3cc[_0x24b444]['pairId'])continue;let _0x1bd1f9=_0x24b444+0x1,_0x1e083a=0x0;for(;_0x1cf3cc[_0x1bd1f9]['id']!=_0x1cf3cc[_0x24b444]['pairId'];)'elementStart'==_0x1cf3cc[_0x1bd1f9]['type']?_0x1e083a++:'elementEnd'==_0x1cf3cc[_0x1bd1f9]['type']&&_0x1e083a--,_0x1bd1f9++;if(0x0!=_0x1e083a){if(_0x1cf3cc[_0x24b444]['isRemoved'])_0x1cf3cc[_0x24b444]['isIncorrect']=!0x0;else{for(;_0x1bd1f9!=_0x24b444;)_0x1cf3cc[_0x1bd1f9]['isRemoved']&&0x0!=_0x1cf3cc[_0x1bd1f9]['distance']&&(_0x1cf3cc[_0x1bd1f9]['isIncorrect']=!0x0,_0x4b0a33['add'](_0x1cf3cc[_0x1bd1f9]['pairId'])),_0x1bd1f9--;}}}return _0x1cf3cc['filter'](_0x311754=>!_0x311754['isIncorrect']);}_removeUnsupportedChanges(_0x4c91f7){const _0x200254=this['editor']['model']['schema'];for(let _0x2c9073=0x0;_0x2c9073<_0x4c91f7['length'];_0x2c9073++){if(!(_0x4c91f7[_0x2c9073]['isAdded']||_0x4c91f7[_0x2c9073]['isAddSuggestion']||_0x4c91f7[_0x2c9073]['isRemoved']||_0x4c91f7[_0x2c9073]['isRemoveSuggestion']))continue;if(0x0==_0x4c91f7[_0x2c9073]['distance'])continue;const _0x51f771=_0x4c91f7[_0x2c9073]['item'];_0x200254['isBlock'](_0x51f771)||_0x200254['isLimit'](_0x51f771)||(_0x4c91f7[_0x2c9073]['isAdded']&&delete _0x4c91f7[_0x2c9073]['isAdded'],_0x4c91f7[_0x2c9073]['isAddSuggestion']&&delete _0x4c91f7[_0x2c9073]['isAddSuggestion'],_0x4c91f7[_0x2c9073]['isRemoveSuggestion']&&delete _0x4c91f7[_0x2c9073]['isRemoveSuggestion'],_0x4c91f7[_0x2c9073]['isRemoved']&&(_0x4c91f7[_0x2c9073]['isIncorrect']=!0x0));}return _0x4c91f7['filter'](_0x2e9d72=>!_0x2e9d72['isIncorrect']);}['_makeModelFromTape'](_0x455f6e,_0x5f181b,_0x570257,_0xfeb5cc){const _0x2e9921=new _0x48b379(),_0x462eb6=[],_0x42d467=new Map(),_0x40ce54=this['editor']['model'],_0x240188=_0x40ce54['schema'],_0x18ca94=[_0x2e9921],_0x4440fb={},_0x899b90={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x2e9921['name']=_0xfeb5cc;let _0x1d12e9=null;const _0x1395a4=[0x0];for(let _0x11da7e=0x0;_0x11da7e<_0x455f6e['length'];_0x11da7e++)if('elementStart'===_0x455f6e[_0x11da7e]['type']){_0x455f6e[_0x11da7e]['previousPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4);const _0x770c1a=new _0x329f01(_0x455f6e[_0x11da7e]['item']['name'],_0x455f6e[_0x11da7e]['item']['getAttributes']());_0x18ca94[0x0]['_appendChild'](_0x770c1a),_0x1395a4['push'](0x0),_0x18ca94['unshift'](_0x770c1a),_0x455f6e[_0x11da7e]['nextPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4);}else'elementEnd'===_0x455f6e[_0x11da7e]['type']?(_0x18ca94['shift'](),_0x455f6e[_0x11da7e]['previousPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4),_0x1395a4['pop'](),_0x1395a4[_0x1395a4['length']-0x1]++,_0x455f6e[_0x11da7e]['nextPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4)):(_0x455f6e[_0x11da7e]['previousPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4),_0x1d12e9?_0x1d12e9['_data']+=_0x455f6e[_0x11da7e]['item']['data']:_0x1d12e9=new _0xfbffed(_0x455f6e[_0x11da7e]['item']['data'],_0x455f6e[_0x11da7e]['item']['getAttributes']()),_0x455f6e[_0x11da7e+0x1]&&'text'===_0x455f6e[_0x11da7e+0x1]['type']&&_0xffe481(_0x1d12e9,_0x455f6e[_0x11da7e+0x1]['item'])||(_0x18ca94[0x0]['_appendChild'](_0x1d12e9),_0x1d12e9=null),_0x1395a4[_0x1395a4['length']-0x1]+=_0x455f6e[_0x11da7e]['item']['offsetSize'],_0x455f6e[_0x11da7e]['nextPosition']=_0x40ce54['createPositionFromPath'](_0x2e9921,_0x1395a4));for(let _0x31d9e7=0x0;_0x31d9e7<_0x455f6e['length'];_0x31d9e7++){const _0x2dd645=_0x455f6e[_0x31d9e7]['previousPosition'],_0x27fcea=_0x455f6e[_0x31d9e7]['nextPosition'];for(const _0x315bf8 of _0x455f6e[_0x31d9e7]['markersStart'])_0x42d467['set'](_0x315bf8,{'start':_0x2dd645,'end':null});_0x45a058('isRemoveSuggestion',_0x31d9e7,_0x2dd645,_0x27fcea),_0x45a058('isAddSuggestion',_0x31d9e7,_0x2dd645,_0x27fcea),_0x45a058('isRemoved',_0x31d9e7,_0x2dd645,_0x27fcea),_0x45a058('isAdded',_0x31d9e7,_0x2dd645,_0x27fcea);for(const _0x3d3215 of _0x455f6e[_0x31d9e7]['markersEnd']){const _0x3ff884=_0x42d467['get'](_0x3d3215);_0x3ff884?_0x3ff884['end']=_0x27fcea:_0x42d467['set'](_0x3d3215,{'start':_0x27fcea,'end':_0x27fcea});}}for(const [_0x5332ec,_0x3bae96]of _0x42d467){const _0x4a3a64=this['editor']['model']['createRange'](_0x3bae96['start'],_0x3bae96['end']);_0x2e9921['markers']['set'](_0x5332ec,_0x4a3a64);}return _0x462eb6['sort']((_0x54c4aa,_0x3ac490)=>{const _0x2685b2=_0x2e9921['markers']['get']('revision:'+_0x54c4aa['id']),_0x4eb352=_0x2e9921['markers']['get']('revision:'+_0x3ac490['id']);return _0x2685b2['start']['isBefore'](_0x4eb352['start'])?-0x1:_0x2685b2['start']['isAfter'](_0x4eb352['start'])?0x1:_0x2685b2['end']['isBefore'](_0x4eb352['end'])?-0x1:_0x2685b2['end']['isAfter'](_0x4eb352['end'])?0x1:'add'===_0x54c4aa['type']?-0x1:0x1;}),{'root':_0x2e9921,'changes':_0x462eb6};function _0x45a058(_0x42fe32,_0x94bcbe,_0x19b436,_0x3b3c22){const _0x4d53e9=!!_0x455f6e[_0x94bcbe][_0x42fe32],_0x2d2ae2=_0x4d53e9?_0x455f6e[_0x94bcbe][_0x42fe32]['userId']:null,_0x3609d5=_0x4d53e9&&_0x455f6e[_0x94bcbe][_0x42fe32]['aiSource']||null,_0x8d029a=_0x94bcbe===_0x455f6e['length']-0x1,_0x4b9bb3=_0x899b90[_0x42fe32][0x0],_0x2f2bbe=_0x240188['isObject'](_0x455f6e[_0x94bcbe]['item']);!_0x4440fb[_0x42fe32]&&_0x4d53e9?_0x4440fb[_0x42fe32]={'start':_0x19b436,'tapeItem':_0x455f6e[_0x94bcbe],'userId':_0x2d2ae2,'aiSource':_0x3609d5,'type':_0x42fe32}:_0x4440fb[_0x42fe32]&&!_0x4d53e9?(_0x4440fb[_0x42fe32]['end']=_0x19b436,_0x3750d7(_0x4440fb[_0x42fe32]),_0x4440fb[_0x42fe32]=null):_0x4440fb[_0x42fe32]&&_0x4d53e9&&(_0x4440fb[_0x42fe32]['userId']!==_0x2d2ae2||_0x4440fb[_0x42fe32]['aiSource']!==_0x3609d5)&&(_0x4440fb[_0x42fe32]['end']=_0x19b436,_0x4b9bb3&&_0x4b9bb3['userId']===_0x4440fb[_0x42fe32]['userId']?_0x4b9bb3['change']['aiSource']=_0x4b9bb3['change']['aiSource']||_0x4440fb[_0x42fe32]['aiSource']:_0x3750d7(_0x4440fb[_0x42fe32]),_0x4440fb[_0x42fe32]={'start':_0x19b436,'tapeItem':_0x455f6e[_0x94bcbe],'userId':_0x2d2ae2,'aiSource':_0x3609d5,'type':_0x42fe32}),_0x4440fb[_0x42fe32]&&_0x2f2bbe&&('elementStart'!==_0x455f6e[_0x94bcbe]['type']||_0x4b9bb3&&_0x4b9bb3['userId']===_0x2d2ae2||_0x899b90[_0x42fe32]['unshift']({'userId':_0x2d2ae2,'object':_0x455f6e[_0x94bcbe]['item'],'change':_0x4440fb[_0x42fe32]}),'elementEnd'===_0x455f6e[_0x94bcbe]['type']&&_0x4b9bb3&&_0x4b9bb3['object']===_0x455f6e[_0x94bcbe]['item']&&(_0x899b90[_0x42fe32]['shift'](),_0x4440fb[_0x42fe32]=_0x4b9bb3['change'])),_0x4440fb[_0x42fe32]&&_0x8d029a&&(_0x4440fb[_0x42fe32]['end']=_0x3b3c22,_0x3750d7(_0x4440fb[_0x42fe32]),_0x4440fb[_0x42fe32]=null);}function _0x3750d7({start:_0x19ecb4,end:_0x59c9f6,tapeItem:_0x5da591,userId:_0x55905f,aiSource:_0x245c88,type:_0x1499e5}){const _0x18a946=_0x5da591['item'],_0x52580e=_0x40ce54['schema']['isBlock'](_0x18a946)&&!_0x40ce54['schema']['isLimit'](_0x18a946),_0x1f412d=_0x19ecb4['nodeAfter']==_0x59c9f6['parent']&&_0x59c9f6['isAtStart'];if(_0x52580e&&_0x1f412d)return;const _0x5c32b2=_0x40ce54['createRange'](_0x19ecb4,_0x59c9f6),_0x2da639=_0x5f181b['get'](_0x55905f),_0x23be03=new Mt({'author':_0x2da639,'type':'isAdded'==_0x1499e5||'isAddSuggestion'==_0x1499e5?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x1499e5||'isRemoveSuggestion'==_0x1499e5,'aiSource':_0x245c88||null},'createdAt':new Date(),'rootName':_0x570257});_0x462eb6['push'](_0x23be03),_0x2e9921['markers']['set']('revision:'+_0x23be03['id'],_0x5c32b2);}function _0xffe481(_0x1919c1,_0x888c28){const _0x587efd=_0x1919c1['getAttributes'](),_0x34d68b=_0x888c28['getAttributes']();for(const _0x34c4c1 of _0x587efd){if(_0x34c4c1[0x1]!==_0x888c28['getAttribute'](_0x34c4c1[0x0]))return!0x1;_0x34d68b['next']();}return _0x34d68b['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3ede90=>{const _0x2c6d2c=_0x3ede90['markerName']['split'](':')[0x1],_0x3abd8c=this['_getChangeFromId'](_0x2c6d2c);if(!_0x3abd8c)return null;const _0x3c39fd='add'==_0x3abd8c['type']?'insertion':'deletion',_0x13590d=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3c39fd];return _0x3abd8c['data']['isSuggestion']&&_0x13590d['push']('ck-suggestion-marker-'+_0x3c39fd+'-new'),this['activeChange']==_0x3abd8c&&_0x13590d['push']('ck-suggestion-marker--active'),{'classes':_0x13590d,'attributes':{'data-change-id':_0x2c6d2c}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x33a19c=>{_0x33a19c['on']('element:pre',(_0x15ff8b,_0x229280,_0x3e35c3)=>{const _0x3d6e71=_0x229280['viewItem']['getChild'](0x0);if(!_0x3d6e71||!_0x3d6e71['is']('element','code'))return;if(!_0x3e35c3['consumable']['consume'](_0x3d6e71,{'attributes':['vid_start','vid_end']}))return;const _0x5d3940=_0x229280['modelRange']['start']['nodeAfter'];_0x3e35c3['writer']['setAttribute']('vid_start',_0x3d6e71['getAttribute']('vid_start'),_0x5d3940),_0x3e35c3['writer']['setAttribute']('vid_end',_0x3d6e71['getAttribute']('vid_end'),_0x5d3940);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x28cc86=>{_0x28cc86['on']('element',(_0x3ec8a1,_0x5bb55c,_0x39cbd8)=>{if(!_0x39cbd8['consumable']['consume'](_0x5bb55c['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x5bb55c['modelRange']['isCollapsed'])return;const _0x56720b=_0x5bb55c['modelRange']['start']['nodeAfter'];_0x56720b['hasAttribute']('vid_start')||_0x56720b['hasAttribute']('vid')||(_0x39cbd8['writer']['setAttribute']('vid_start',_0x5bb55c['viewItem']['getAttribute']('vid_start'),_0x56720b),_0x39cbd8['writer']['setAttribute']('vid_end',_0x5bb55c['viewItem']['getAttribute']('vid_end'),_0x56720b));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x246933=>_0x246933['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x460d7d,[,_0x140ca1])=>{['vid_start','vid_end','vid']['includes'](_0x140ca1)&&(_0x460d7d['return']=!0x0,_0x460d7d['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xce6e63=>{_0xce6e63['on']('attribute:vid',(_0x26f858,_0x4f212b,_0x2e78c3)=>{if('\x20'!=_0x4f212b['item']['data']||_0x4f212b['item']['parent']['maxOffset']>0x1)return;if(!_0x2e78c3['consumable']['consume'](_0x4f212b['item'],_0x26f858['name']))return;const _0x4d06d4=_0x2e78c3['writer'],_0x28fc10=_0x2e78c3['mapper']['toViewRange'](_0x4f212b['range']);_0x4d06d4['wrap'](_0x28fc10,_0x4d06d4['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x2deb9f){const _0x163eec=_0x2deb9f['plugins']['get']('RevisionViewer');return(_0x586226,_0x3d1066,_0x2a516b)=>{const _0x21f060=_0x3d1066['markerName']['split'](':')[0x1],_0x45493e=_0x163eec['_getChangeFromId'](_0x21f060);if(!_0x45493e)return null;const _0x5825bc='add'==_0x45493e['type']?'split':'merge';if(!_0x2a516b['consumable']['test'](_0x3d1066['markerRange'],_0x586226['name']))return;const _0x266f0a=_0x3d1066['markerRange']['getWalker'](),_0xa94980=_0x3d1066['markerRange']['start'],_0xc887f9=_0x2deb9f['model']['schema'];let _0x49b955=null,_0x30ee59=null,_0x279937=!0x1,_0x39fecf=!0x1;for(const _0x233262 of _0x266f0a){const _0x1f03df=_0x233262['item'];_0x279937=_0x279937||_0xc887f9['isContent'](_0x1f03df);const _0x4eb54d=_0x2a516b['mapper']['toViewElement'](_0x1f03df);if(_0x4eb54d&&_0x4eb54d['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x233262['type']&&(_0xc887f9['isBlock'](_0x1f03df)&&!_0xc887f9['isLimit'](_0x1f03df)&&(_0x1f03df['nextSibling']||_0xa94980['isAtEnd']?_0x49b955&&_0x49b955['parent']==_0x1f03df||(_0x49b955=_0x1f03df,_0x432193(_0x233262['previousPosition']),_0x39fecf=!0x0):_0x30ee59=_0x30ee59||_0x233262['previousPosition']));}function _0x432193(_0x4cbcb2){const _0x533d78=_0x2a516b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5825bc}),_0x147f5a=_0x2a516b['mapper']['toViewPosition'](_0x4cbcb2);_0x45493e['data']['isSuggestion']&&_0x2a516b['writer']['addClass']('ck-suggestion-marker-'+_0x5825bc+'-new',_0x533d78),_0x163eec['activeChange']==_0x45493e&&_0x2a516b['writer']['addClass']('ck-suggestion-marker--active',_0x533d78),_0x2a516b['writer']['insert'](_0x147f5a,_0x533d78),_0x2a516b['mapper']['bindElementToMarker'](_0x533d78,_0x3d1066['markerName']);}_0x279937||_0x39fecf||!_0x30ee59||_0x432193(_0x30ee59);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x542f25,_0x598747,_0x81cacb)=>{const _0x8713d1=_0x81cacb['mapper']['markerNameToElements'](_0x598747['markerName']);if(_0x8713d1){for(const _0x818ea3 of _0x8713d1)(_0x818ea3['hasClass']('ck-suggestion-marker-split')||_0x818ea3['hasClass']('ck-suggestion-marker-merge'))&&(_0x81cacb['mapper']['unbindElementFromMarkerName'](_0x818ea3,_0x598747['markerName']),_0x81cacb['writer']['remove'](_0x818ea3));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4933cb,_0x34cbce,_0x2a9a99)=>{const _0x32cd7d=_0x34cbce['markerName']['split'](':')[0x1],_0x3ae466=this['_getChangeFromId'](_0x32cd7d);if(!_0x3ae466)return null;const _0x5f491c='add'==_0x3ae466['type']?'split':'merge';if(_0x2a9a99['consumable']['test'](_0x34cbce['markerRange'],_0x4933cb['name']))for(const _0x21d879 of _0x34cbce['markerRange']['getItems']()){if(!_0x21d879['is']('element','softBreak'))continue;const _0x4d3c34=_0x2a9a99['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5f491c}),_0x219aae=_0x2a9a99['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x21d879));_0x3ae466['data']['isSuggestion']&&_0x2a9a99['writer']['addClass']('ck-suggestion-marker-'+_0x5f491c+'-new',_0x4d3c34),this['activeChange']==_0x3ae466&&_0x2a9a99['writer']['addClass']('ck-suggestion-marker--active',_0x4d3c34),_0x2a9a99['writer']['insert'](_0x219aae,_0x4d3c34),_0x2a9a99['mapper']['bindElementToMarker'](_0x4d3c34,_0x34cbce['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x46e964=>{for(const _0x1a535d of this['editor']['model']['document']['getRootNames']()){const _0x4fc1aa=this['editor']['model']['document']['getRoot'](_0x1a535d),_0x13dd31=this['editor']['editing']['view']['document']['getRoot'](_0x1a535d);if(_0x13dd31){const _0x45524e=_0x4fc1aa['getAttribute']('revisionHistoryAttachChange');if(_0x46e964['removeAttribute']('data-change-id',_0x13dd31),_0x46e964['removeClass']('ck-revision-history-root-add',_0x13dd31),_0x46e964['removeClass']('ck-revision-history-root-remove',_0x13dd31),_0x46e964['removeClass']('ck-revision-history-root--active',_0x13dd31),_0x45524e){const _0x1b086f=this['_getChangeFromId'](_0x45524e);if(!_0x1b086f)return null;_0x46e964['setAttribute']('data-change-id',_0x45524e,_0x13dd31),_0x46e964['addClass']('ck-revision-history-root-'+_0x1b086f['type'],_0x13dd31),this['activeChange']==_0x1b086f&&_0x46e964['addClass']('ck-revision-history-root--active',_0x13dd31);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2b4325=>'revision-comment:'+_0x2b4325,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x55c7cc=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x55c7cc['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x51e9af=>'revision-suggestion:'+_0x51e9af,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x22c50f=>({'name':'suggestion:'+_0x22c50f,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4a6662=>{const _0x5650df=_0x4a6662['markerName']['split'](':')[0x1];return'insertion'!=_0x5650df&&'deletion'!=_0x5650df?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5650df]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2f9cef,_0x380f88,_0x35f9ac)=>{const _0x4496cb=_0x35f9ac['mapper']['markerNameToElements'](_0x380f88['markerName']);if(_0x4496cb){for(const _0x1ae4b1 of _0x4496cb)_0x1ae4b1['is']('uiElement')&&(_0x35f9ac['mapper']['unbindElementFromMarkerName'](_0x1ae4b1,_0x380f88['markerName']),_0x35f9ac['writer']['remove'](_0x1ae4b1));}},{'priority':'high'});}_getChangeFromId(_0x220809){return this['_changeIdToChange']['get'](_0x220809);}_getViewForChange(_0x48ebef){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x48ebef,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xd2733d,_0x5ca516,_0x54d3c4,_0x235615)=>{_0x235615&&this['_balloon']['remove'](_0x235615),_0x54d3c4&&(this['_balloon']['add']({'view':_0x54d3c4,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5314d1=this['editor']['editing'],_0x34264f=this['_getChangeFromId'](_0x54d3c4['changeId']);let _0xc88fc1;if(_0x34264f['data']['isOnRoot']){const _0x24a1e9=_0x5314d1['view']['getDomRoot'](_0x34264f['rootName']);_0xc88fc1=Array['from'](_0x24a1e9['getClientRects']());}else{const _0x410496=this['editor']['model']['markers']['get']('revision:'+_0x54d3c4['changeId']);_0xc88fc1=Array['from'](_0x5314d1['mapper']['markerNameToElements'](_0x410496['name']))['map'](_0x42a124=>_0x5314d1['view']['domConverter']['mapViewToDom'](_0x42a124))['map'](_0x3ee9c0=>Array['from'](_0x3ee9c0['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0xc88fc1['find'](_0x15f280=>_0x15f280['top']-0x3<=this['_activeViewTarget']['y']&&_0x15f280['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x15f280['left']-0x3<=this['_activeViewTarget']['x']&&_0x15f280['right']+0x3>=this['_activeViewTarget']['x'])||_0xc88fc1[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x18ea16,_0x25989b,_0x1dd22b,_0x45f675)=>{this['activeView']=_0x1dd22b?this['_getViewForChange'](_0x1dd22b):null,this['editor']['model']['change'](()=>{const _0x25c754=this['editor']['editing'];_0x45f675&&(_0x45f675['data']['isOnRoot']?_0x25c754['view']['change'](_0x53e7fd=>{_0x53e7fd['removeClass']('ck-revision-history-root--active',_0x25c754['view']['document']['getRoot'](_0x45f675['rootName']));}):_0x25c754['reconvertMarker']('revision:'+_0x45f675['id'])),_0x1dd22b&&(_0x1dd22b['data']['isOnRoot']?_0x25c754['view']['change'](_0x3c7f90=>{_0x3c7f90['addClass']('ck-revision-history-root--active',_0x25c754['view']['document']['getRoot'](_0x1dd22b['rootName']));}):_0x25c754['reconvertMarker']('revision:'+_0x1dd22b['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x37a214,_0x3adcc3)=>{if(this['activeChange'])return;const _0x1e1cad=this['_findChangeIdFromDomTarget'](_0x3adcc3['target']),_0x10d39a=this['_changeIdToChange']['get'](_0x1e1cad);_0x10d39a?(this['_activeViewTarget']={'x':_0x3adcc3['domEvent']['x'],'y':_0x3adcc3['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x10d39a)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x12c690,_0x57ba92)=>{const _0x5f4a35=this['_findChangeIdFromDomTarget'](_0x57ba92['target']),_0x1a2fb0=this['_changeIdToChange']['get'](_0x5f4a35);_0x1a2fb0?(this['_activeViewTarget']={'x':_0x57ba92['domEvent']['x'],'y':_0x57ba92['domEvent']['y']},_0x1a2fb0===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1a2fb0):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x19f92f){do{const _0x30ed51=_0x19f92f['getAttribute']('data-change-id');if(_0x30ed51)return _0x30ed51;_0x19f92f=_0x19f92f['parent'];}while(_0x19f92f);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x471749=>{for(const _0x85398a of this['editor']['model']['markers'])_0x471749['removeMarker'](_0x85398a);});}};function Ut(_0x2cb38b){return _0x2cb38b['split'](':')[0x1];}function Lt(_0x468407,_0xaeda49){return(_0xba1b2,_0x225d07,_0x47b502)=>{if(!_0x47b502['consumable']['test'](_0x225d07['markerRange'],_0xba1b2['name']))return;const _0x5a6ce4=_0x225d07['markerRange']['getWalker'](),_0x2a5419=_0x225d07['markerRange']['start'],_0x7b7ebb=_0x468407['model']['schema'];let _0x4c1f16=null,_0x7acf07=null,_0x4af062=!0x1,_0x227162=!0x1;for(const _0x225405 of _0x5a6ce4){const _0x7107e8=_0x225405['item'];_0x4af062=_0x4af062||_0x7b7ebb['isContent'](_0x7107e8);const _0x284894=_0x47b502['mapper']['toViewElement'](_0x7107e8);if(_0x284894&&_0x284894['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x225405['type']&&(_0x7b7ebb['isBlock'](_0x7107e8)&&!_0x7b7ebb['isLimit'](_0x7107e8)&&(_0x7107e8['nextSibling']||_0x2a5419['isAtEnd']?_0x4c1f16&&_0x4c1f16['parent']==_0x7107e8||(_0x4c1f16=_0x7107e8,_0x194a05(_0x225405['previousPosition']),_0x227162=!0x0):_0x7acf07=_0x7acf07||_0x225405['previousPosition']));}function _0x194a05(_0x6550d4){const _0x196944=_0x47b502['mapper']['toViewPosition'](_0x6550d4),_0x25ffd=_0x47b502['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xaeda49});_0x47b502['writer']['insert'](_0x196944,_0x25ffd),_0x47b502['mapper']['bindElementToMarker'](_0x25ffd,_0x225d07['markerName']);}_0x4af062||_0x227162||!_0x7acf07||_0x194a05(_0x7acf07);};}var Ft=class extends _0x37a0c7{constructor(_0x31c093){super(_0x31c093);const _0xc4c00c=_0x31c093['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0xc4c00c,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xc4c00c,'change:isEnabled',()=>this['refresh']());}execute(){const _0x27c109=this['editor'],_0x2b631c=_0x27c109['plugins']['get'](Pt),_0x6bd5cf=_0x2b631c['isReady']?_0x2b631c['diff']['newRevisionId']:null;_0x27c109['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x6bd5cf);}['refresh'](){const {isReady:_0x4cf695,isEnabled:_0x595f81,repository:_0x224b53,diff:_0x33e1f5}=this['editor']['plugins']['get'](Pt),_0x611a80=_0x33e1f5&&_0x224b53['getLaterVisibleRevision'](_0x33e1f5['newRevisionId']);this['isEnabled']=_0x4cf695&&_0x595f81&&Boolean(_0x611a80);}},$t=class extends _0x37a0c7{_step;constructor(_0x3b7cfe,{direction:_0x1d21db}){super(_0x3b7cfe);const _0x3235c3=_0x3b7cfe['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x1d21db?0x1:-0x1,this['listenTo'](_0x3235c3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3235c3,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3235c3,'change:activeChange',()=>this['refresh']());}execute(){const _0xc9d827=this['editor'],_0x12f025=_0xc9d827['plugins']['get'](Pt),{isNavigationMode:_0x55f244,currentChangeNumber:_0x278da2}=_0x12f025;let _0x24ee07;if(_0x12f025['activeChange']=_0x55f244?_0x12f025['diff']['changes']['get'](_0x278da2+this['_step']):_0x12f025['diff']['changes']['first'],_0x12f025['activeChange']['data']['isOnRoot'])_0x24ee07=_0xc9d827['editing']['view']['getDomRoot'](_0x12f025['activeChange']['rootName']);else{const _0x11f1e6=_0xc9d827['model']['markers']['get']('revision:'+_0x12f025['activeChange']['id']);_0x24ee07=_0x5f2ed6(_0xc9d827['editing'],_0x11f1e6);}_0x478df5({'target':_0x24ee07,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x25da3e,currentChangeNumber:_0x16ad1f,numberOfChanges:_0x1ecb74,isReady:_0x50ea27,isEnabled:_0x4a0ba1}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x4a0ba1&&_0x50ea27&&_0x1ecb74)&&(!_0x25da3e||(0x1===this['_step']?_0x16ad1f<_0x1ecb74-0x1:_0x16ad1f>0x0));}},Bt=class extends dt{constructor(_0x36acd2){super(_0x36acd2);const _0x1fce4d=this['bindTemplate'],_0x15b75e=new _0xd113c4(_0x36acd2),_0x53abc1=new _0xd113c4(_0x36acd2);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',(_0x5bf09e,_0x15849d)=>_0x5bf09e&&_0x15849d>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x237b19,_0x196e3d,_0x4bb05d,_0x49bab8)=>{if(!_0x237b19)return kt(_0x36acd2,'Loading...');if(!_0x4bb05d)return kt(_0x36acd2,'No\x20changes');const _0x1e96f9=kt(_0x36acd2,'NUMBER_OF_CHANGES',_0x4bb05d);return _0x49bab8?kt(_0x36acd2,'X_OF_Y_CHANGES',[_0x196e3d+0x1,_0x4bb05d]):_0x1e96f9;}),_0x15b75e['set']({'label':kt(_0x36acd2,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x9f76c9}),_0x53abc1['set']({'label':kt(_0x36acd2,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5a61ed}),_0x15b75e['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x53abc1['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x15b75e['on']('execute',()=>this['fire']('execute','backward')),_0x53abc1['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',_0x1fce4d['if']('_isStatusLabelVisible','ck-hidden',_0xd9cd73=>!_0xd9cd73)]},'children':[{'text':_0x1fce4d['to']('isNavigationMode',_0x18c1fd=>_0x18c1fd?kt(_0x36acd2,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x36acd2,'Total')+':\x20')}]},{'text':_0x1fce4d['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x15b75e,_0x53abc1]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0xc765d1{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x31e77c=this['editor']['editing']['view'];_0x31e77c['change'](_0x1cb563=>{for(const _0x2a0578 of _0x31e77c['document']['roots'])_0x1cb563['addClass'](jt,_0x2a0578);});}['hide'](){const _0x569e21=this['editor']['editing']['view'];_0x569e21['change'](_0x3afa3f=>{for(const _0x3f4757 of _0x569e21['document']['roots'])_0x3afa3f['removeClass'](jt,_0x3f4757);});}},Kt=class extends _0xc765d1{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x2c238d=this['editor'],_0x2a8188=_0x2c238d['plugins']['get'](Pt),_0x4c2dcc=_0x2c238d['plugins']['get'](Gt);_0x2c238d['ui']['componentFactory']['add']('exitToEditing',_0x247c57=>{const _0x14102e=new _0xd113c4(_0x247c57);return _0x14102e['set']({'label':kt(_0x247c57,'Back\x20to\x20editing'),'icon':_0x391628,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x14102e,'execute',()=>{_0x2c238d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x14102e;}),_0x2c238d['ui']['componentFactory']['add']('restoreRevision',_0x5a1595=>{const _0x1d8f6d=new _0xd113c4(_0x5a1595);return _0x1d8f6d['set']({'label':kt(_0x5a1595,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1d8f6d['bind']('isEnabled')['to'](_0x2c238d['commands']['get']('restoreRevision')),this['listenTo'](_0x1d8f6d,'execute',()=>_0x2c238d['execute']('restoreRevision')),_0x1d8f6d;}),_0x2c238d['ui']['componentFactory']['add']('changesNavigation',_0x5e960c=>{const _0x2afd62=new Bt(_0x5e960c),_0x4491e2=_0x2c238d['commands']['get']('showPreviousChange'),_0xb931a1=_0x2c238d['commands']['get']('showNextChange');return _0x2afd62['bind']('isBackwardNavigationEnabled')['to'](_0x4491e2,'isEnabled'),_0x2afd62['bind']('isForwardNavigationEnabled')['to'](_0xb931a1,'isEnabled'),_0x2afd62['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2a8188),this['listenTo'](_0x2afd62,'execute',(_0x51f67f,_0x14eddd)=>{_0x2c238d['execute']('forward'===_0x14eddd?'showNextChange':'showPreviousChange');}),_0x2afd62;}),_0x4c2dcc['show'](),_0x2a8188['on']('change:isReady',(_0x576234,_0x1a5b70,_0x203457)=>{_0x203457?_0x4c2dcc['hide']():_0x4c2dcc['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x55213b,_0x2240e9){super(_0x55213b,_0x2240e9);const _0x17ef30=this['bindTemplate'];this['set']({'label':kt(_0x55213b,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x55213b,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x17ef30['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x18d8d0(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x393976=this['fieldView']['element'];this['_tooltipString']=_0x393976['scrollWidth']>_0x393976['clientWidth']&&_0x393976['value']||'';}},Yt=class extends dt{constructor(_0x2fc264,_0x117435,_0x58ec39){super(_0x2fc264);const _0x2ae016=new _0xa758d2();_0x2ae016['set']({'content':_0x2a0aef,'viewBox':'0\x200\x2011\x2010'});const _0xb854cf=['ck','ck-revision-history-sidebar__revision-author'];_0x58ec39&&_0xb854cf['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3f7e62=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x2fc264,_0x58ec39?'Revision\x20creator':'Revision\x20author')},'children':[_0x2ae016,_0x117435['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xb854cf},'children':_0x3f7e62});}};function Jt(_0x299d93,_0x171065){const _0x8e27d8=_0x299d93['bindTemplate'],_0x2ea47b=_0x299d93['locale'],_0x1c1b0a=vt(_0x2ea47b);_0x1c1b0a['panelPosition']='sw';const _0x54e7aa=function(_0x2f39b1,_0x3c0b63){const _0x489410=function(_0x5c7b2f,_0xbd11c0){const _0x2e55ea=_0x5c7b2f['locale'],_0x52b9b1={'Compare\x20against\x20selected':kt(_0x2e55ea,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x2e55ea,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x2e55ea,'Restore\x20this\x20revision')};return _0xbd11c0['map'](_0x325499=>{const _0x19abaf=_0x52b9b1[_0x325499['name']];return _0x19abaf&&_0x19abaf!==_0x325499['name']&&(_0x325499['name']=_0x19abaf),_0x325499;});}(_0x2f39b1,_0x3c0b63),_0x4bcef7=new _0x2a4b06();for(const _0x356fb3 of _0x489410){const _0x1a84f7={'type':'button','model':new ut({'label':_0x356fb3['name'],'class':_0x356fb3['class'],'withText':!0x0,'role':'menuitem','_action':_0x356fb3['action']})};_0x1a84f7['model']['bind']('isEnabled')['to'](_0x2f39b1,'isActionsDropdownOpen',_0x52c9c1=>'function'!=typeof _0x356fb3['isEnabled']||(!_0x52c9c1||_0x356fb3['isEnabled'](_0x2f39b1))),_0x4bcef7['add'](_0x1a84f7);}return _0x4bcef7;}(_0x299d93,_0x171065);return _0x299d93['bind']('isActionsDropdownOpen')['to'](_0x1c1b0a,'isOpen'),_0x1c1b0a['buttonView']['set']({'label':kt(_0x2ea47b,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1eb543}),_0x1c1b0a['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x8e27d8['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x8e27d8['to'](_0x338d2f=>_0x338d2f['stopPropagation']())}}),_0x1c1b0a['on']('execute',_0xf2e8b1=>{_0x299d93['isReady']&&'function'==typeof _0xf2e8b1['source']['_action']&&_0xf2e8b1['source']['_action'](_0x299d93);}),ft(_0x1c1b0a,_0x54e7aa,{'role':'menu'}),_0x1c1b0a['listenTo'](_0x299d93,'change:isActionsDropdownOpen',(_0x14920e,_0x5c1a91,_0x51b80b)=>{if(_0x51b80b)for(const _0x1377ba of _0x1c1b0a['listView']['items']){const _0x106a57=_0x1377ba['children']['first'],_0x3e8776=_0x171065['find'](_0x2f60bb=>_0x2f60bb['action']===_0x106a57['_action'])['isVisible'];_0x1377ba['isVisible']=void 0x0===_0x3e8776||_0x3e8776(_0x299d93);}}),_0x1c1b0a;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x24e679,Collection as _0x520f62,ElementReplacer as _0x2e3fd6,FocusTracker as _0xa64bfb,KeystrokeHandler as _0x2d0e3c,ObservableMixin as _0x57c0bb,ResizeObserver as _0x354550,logWarning as _0x3905c1,scrollViewportToShowTarget as _0x98e9d6,trustedHtml as _0xe4f10,uid as _0x5289a7}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x144f08,isEqual as _0x538fa0,set as _0x4968aa,unset as _0xc0e3c}from'es-toolkit/compat';import{Command as _0x1ddd1c,Editor as _0x3a29f8,ElementApiMixin as _0x4c30f1,PendingActions as _0x55fafd,Plugin as _0x3ccb16}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x43ed20,PillView as _0x1d0883,Users as _0x312567,getMarkerDomElement as _0x3ec3b7,reRootOperation as _0x51ed69,reRootPosition as _0x289722,reRootRange as _0x3c9bdd,sanitizeEditorConfig as _0x1d9224}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x4acbd6,ModelElement as _0x28c730,ModelRange as _0x390c0d,ModelText as _0x42becd,ViewAttributeElement as _0x28d884,ViewContainerElement as _0x524a1a,ViewDocumentFragment as _0xabc291,ViewElement as _0x2d3953,ViewEmptyElement as _0x5569aa,ViewRawElement as _0x17020d,ViewText as _0x383b5e,ViewUIElement as _0x26f24c}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x4a149a,IconChevronUp as _0x343c90,IconHistory as _0x1f6913,IconSparkle as _0x2d837c,IconThreeVerticalDots as _0x467e7d,IconUndo as _0x2a5c35,IconUser as _0xac3ad6}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x268072,ButtonView as _0xfa6b1,ContextualBalloon as _0x300371,CssTransitionDisablerMixin as _0xe40d6,EditorUI as _0x598841,IconView as _0x4c1208,InlineEditableUIView as tt,LabeledFieldView as it,ListItemView as et,ListView as st,MenuBarMenuListItemButtonView as nt,MenuBarMenuListItemView as ot,MenuBarMenuListView as rt,MenuBarMenuView as at,StickyPanelView as ht,ToolbarSeparatorView as ct,ToolbarView as lt,UIModel as ut,View as dt,addListToDropdown as ft,createDropdown as vt,createLabeledInputText as gt,normalizeToolbarConfig as mt,submitHandler as _t}from'@ckeditor/ckeditor5-ui';import{DateTime as wt}from'luxon';const pt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x57c0bb();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x2d881c){super(),this['id']=_0x2d881c['id']||_0x5289a7(),this['creator']=_0x2d881c['creator']||null,this['authors']=_0x2d881c['authors']||[],this['diffData']=_0x2d881c['diffData']||null,this['toVersion']=_0x2d881c['toVersion']||0x0,this['fromVersion']=_0x2d881c['fromVersion']||0x0,this['set']('name',_0x2d881c['name']||''),this['set']('createdAt',_0x2d881c['createdAt']||new Date()),this['set']('attributes',_0x2d881c['attributes']||{});}setName(_0x2e7d63){this['_update']({'name':_0x2e7d63});}setAttribute(_0x536a23,_0x342934){const _0xf3bc6d=_0x144f08(this['attributes']);_0x4968aa(_0xf3bc6d,_0x536a23,_0x342934),this['_update']({'attributes':_0xf3bc6d});}removeAttribute(_0x59e59b){const _0x194d9f=_0x144f08(this['attributes']);_0xc0e3c(_0x194d9f,_0x59e59b),this['_update']({'attributes':_0x194d9f});}_update(_0x5c2d36,_0x5a95f3=!0x1){let _0x5812e7=!0x1;const _0x4795fa={'id':this['id']};for(const _0x1d16b4 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x1d7ecc=_0x5c2d36[_0x1d16b4];void 0x0!==_0x1d7ecc&&_0x1d7ecc!==this[_0x1d16b4]&&(this[_0x1d16b4]=_0x1d7ecc,_0x4795fa[_0x1d16b4]=_0x1d7ecc,_0x5812e7=!0x0);}_0x5812e7&&(_0x4795fa['authors']&&(_0x4795fa['authorsIds']=_0x4795fa['authors']['map'](_0x32fa42=>_0x32fa42['id']),delete _0x4795fa['authors']),this['fire']('_update',_0x4795fa,_0x5a95f3));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4f3c33=>_0x4f3c33['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x3ccb16{['_revisions'];static get requires(){return[_0x312567];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x405b1f){super(_0x405b1f),this['_revisions']=new _0x520f62();}afterInit(){!async function(_0x5d3103){const _0x44eba8='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x49574b=0xeb829,_0x3d9cb3=0x797b8,_0x23fdc4={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x2fc968(_0x55c3da){const _0x5effa8=new window['Promise'](_0x4e2494=>{_0x55c3da['once']('ready',_0x4e2494);}),_0x46dead=window['Date']['now'](),_0x3e3791=_0x55c3da['config']['get']('licenseKey');async function _0x23d7b6(){let _0x205ac9,_0x340a20=null,_0x3e0dd1=null;try{return'GPL'==_0x3e3791?'NotAllowed':(_0x205ac9=_0x459193(),_0x205ac9?(_0x205ac9['usageEndpoint']&&(_0x3e0dd1=_0x4bc903(_0x205ac9['usageEndpoint'],_0x205ac9['jti'])),await _0x3cb8bd()?_0x5a3096()?_0x4648df()?'Expired':_0x1e202b()?('evaluation'==_0x205ac9['licenseType']&&(_0x340a20=_0x3fcae4('EvaluationLimit')),await _0x5c54a9()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4648df(){const _0x2f56f7=['evaluation','trial']['includes'](_0x205ac9['licenseType'])?_0x46dead/0x3e8:0xe10*_0x3d9cb3;return _0x205ac9['exp']<_0x2f56f7;}function _0x5a3096(){const _0x21a57=_0x205ac9['features'];if(!_0x21a57)return!0x1;if(_0x21a57['includes']('*'))return!0x0;if(_0x21a57['includes']('RH'))return!0x0;if(_0x21a57['includes']('RRH')){if(_0x188ec7())return!0x0;if(_0x20125b()||_0x17e957())return!0x0;}return!0x1;}function _0x1e202b(){const _0x570773=_0x205ac9['licensedHosts'];if(!_0x570773||0x0==_0x570773['length'])return!0x0;const {hostname:_0x306ddd}=new URL(window['location']['href']);if(_0x570773['includes'](_0x306ddd))return!0x0;const _0x111790=_0x306ddd['split']('.');return _0x570773['filter'](_0x4cf020=>_0x4cf020['includes']('*'))['map'](_0x3e7676=>_0x3e7676['split']('.'))['filter'](_0x301826=>_0x301826['length']<=_0x111790['length'])['map'](_0x36576a=>Array(_0x111790['length']-_0x36576a['length'])['fill']('*'===_0x36576a[0x0]?'*':'')['concat'](_0x36576a))['some'](_0x5ebccc=>_0x111790['every']((_0x32a90e,_0x922d0)=>_0x5ebccc[_0x922d0]===_0x32a90e||'*'===_0x5ebccc[_0x922d0]));}function _0x5c54a9(){return _0x340a20&&_0x3e0dd1?new window['Promise']((_0x49343f,_0x333cdd)=>{_0x340a20['then'](_0x49343f,_0x333cdd),_0x3e0dd1['then'](_0x498b66=>{'Valid'!=_0x498b66&&_0x49343f(_0x498b66);},_0x333cdd);}):_0x340a20||_0x3e0dd1||'Valid';}}function _0x4bc903(_0x5edd18,_0x320b15){return new window['Promise'](_0x426553=>{if(_0x22258a())return _0x426553('Valid');_0x16761d(),_0x55c3da['decorate']('_sendUsageRequest');let _0x22e731=!0x1;const _0x78fb9b=_0x5289a7();function _0x103109(_0x1637f3){return!!_0x1637f3&&('object'==typeof _0x1637f3||'function'==typeof _0x1637f3)&&'function'==typeof _0x1637f3['then']&&'function'==typeof _0x1637f3['catch'];}function _0x565a8c(_0x492f2c){_0x57c7f1(_0x492f2c)['then'](_0x1ef500=>_0x1ef500&&'ok'==_0x1ef500['status']?_0x36bac0(_0x411190(_0x78fb9b+_0x320b15))!=_0x1ef500['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4b8b96=>(_0x15db3b(),_0x4b8b96),()=>{const _0x353dd9=_0x1f81b5();return null==_0x353dd9?(_0x15db3b(),'Valid'):_0x46dead-_0x353dd9>0x240c8400?'UsageLimit':'Valid';})['then'](_0x426553)['catch'](()=>{_0x426553('UsageLimit');});const _0xd5d92f=0x36ee80;function _0x15db3b(){const _0x141f70='llct-'+_0x36bac0(_0x411190(_0x5edd18)),_0x210bcf=_0x10d043(_0x36bac0(window['Math']['ceil'](_0x46dead/_0xd5d92f)));window['localStorage']['setItem'](_0x141f70,_0x210bcf);}function _0x1f81b5(){const _0x661d06='llct-'+_0x36bac0(_0x411190(_0x5edd18)),_0x1e44af=window['localStorage']['getItem'](_0x661d06);return _0x1e44af?window['parseInt'](_0x10d043(_0x1e44af),0x10)*_0xd5d92f:null;}function _0x57c7f1(_0x452e66){return new window['Promise']((_0x307b5f,_0x26cb78)=>{_0x452e66['then'](_0x307b5f,_0x26cb78),window['setTimeout'](_0x26cb78,0x1d4c0);});}}_0x55c3da['on']('_sendUsageRequest',(_0x2ec327,_0x4ca0c6)=>{if(_0x4ca0c6[0x0]!=_0x5edd18)return _0x426553('UsageLimit');_0x4ca0c6[0x1]={..._0x4ca0c6[0x1],'requestId':_0x78fb9b};},{'priority':'high'}),_0x55c3da['on']('_sendUsageRequest',_0x3c9c41=>{_0x103109(_0x3c9c41['return'])&&(_0x22e731=!0x0,_0x565a8c(_0x3c9c41['return']));},{'priority':'low'}),_0x5effa8['then'](()=>{_0x22e731||_0x426553('UsageLimit');});});function _0x22258a(){return'auto'==_0x55c3da['editing']['view']['_overlayModeHint'];}function _0x16761d(){_0x55c3da['editing']['view']['_overlayModeHint']='auto';}}function _0x3fcae4(_0xd17412){const _0x33c371=[new window['Promise'](_0x3e0cee=>setTimeout(_0x3e0cee,0x93ecc)),_0x5effa8['then'](()=>new window['Promise'](_0x35de56=>{const _0x4cb35e=0x7,_0x52b708=_0x5d3103['_revisions'];function _0x3d0d53(){_0x52b708['length']>=_0x4cb35e&&_0x35de56();}_0x3d0d53(),_0x52b708['on']('add',_0x3d0d53);})),new window['Promise'](_0x5854c3=>{function _0x5eab0b(){for(const _0x4a5bec in window)if(window['Number']['isNaN'](window['Number'](_0x4a5bec))&&window[_0x4a5bec]==_0x49574b)return _0x5854c3();'destroyed'!=_0x55c3da['state']&&window['setTimeout'](_0x5eab0b,0x1388);}_0x169a2a('RevisionViewer')&&_0x5eab0b();})];return window['Promise']['race'](_0x33c371)['then'](()=>_0xd17412);}async function _0x52d941(){if(await _0x5effa8,_0x169a2a('RevisionViewer')){const _0x13c7c2=_0x5d3103['getRevision'](0x0),_0x3a54f8=_0x5d3103['getEarlierVisibleRevision'](_0x13c7c2['id']),_0x4dcaa1=_0x3658c1('RevisionViewer');return await _0x4dcaa1['compare'](_0x13c7c2['id'],_0x3a54f8?_0x3a54f8['id']:null,!0x0),_0x4dcaa1['unbind']('isEnabled'),_0x4dcaa1['isEnabled']=!0x1,_0x4dcaa1['compare']=_0x21df41,void(_0x4dcaa1['_getDiff']=_0x21df41);}if(_0x169a2a('RevisionTracker')){const _0x24baf2=_0x3658c1('RevisionTracker');_0x24baf2['unbind']('isEnabled'),_0x24baf2['isEnabled']=!0x1,_0x24baf2['update']=_0x21df41,_0x24baf2['saveRevision']=_0x21df41;}_0x55c3da['model']['change']=_0x21df41,_0x55c3da['model']['enqueueChange']=_0x21df41,_0x55c3da['enableReadOnlyMode']('model');}function _0x188ec7(){return _0x169a2a('WebSocketGateway')&&'connected'==_0x3658c1('WebSocketGateway')['state'];}function _0x20125b(){return _0x169a2a('RevisionViewerIntegration');}function _0x17e957(){return _0x169a2a('TrackChangesDataGetter');}function _0x26bc3c(_0x142915){const _0x42918d=_0x5c6ceb();_0x55c3da[_0x42918d]='revisionHistoryLicenseKey'+_0x142915,_0x142915['endsWith']('Limit')&&(window[_0x5c6ceb()]=_0x49574b),'Valid'!=_0x142915&&_0x52d941();}function _0x5c6ceb(){const _0x4fdaab=window['String'](window['performance']['now']())['replace']('.','');let _0x47720b='N';for(let _0x9a7332=0x0;_0x9a7332<_0x4fdaab['length'];_0x9a7332+=0x2){let _0x13eaf6=window['parseInt'](_0x4fdaab['substring'](_0x9a7332,_0x9a7332+0x2));_0x13eaf6>=0x3e&&(_0x13eaf6-=0x3e),_0x47720b+=_0x44eba8[_0x13eaf6];}return _0x47720b;}function _0x459193(){const _0x194edf=_0x3e3791['split']('.');if(0x3!=_0x194edf['length'])return null;return _0x161df1(_0x194edf[0x1]);function _0x161df1(_0x1394ea){const _0x4765d2=_0x5e0779(_0x1394ea);return _0x4765d2&&_0x4e9675()?_0x4765d2:null;function _0x4e9675(){const _0xcf4676=_0x4765d2['jti'],_0x52c9eb=window['parseInt'](_0xcf4676['substring'](_0xcf4676['length']-0x8),0x10),_0x1a3d8e={..._0x4765d2,'jti':_0xcf4676['substring'](0x0,_0xcf4676['length']-0x8)};return delete _0x1a3d8e['vc'],_0x411190(_0x1a3d8e)==_0x52c9eb;}}}async function _0x3cb8bd(){let _0x5468f3=!0x0;try{const [_0x2821b6,_0x1cc77c,_0x5521ac]=_0x3e3791['split']('.');return _0x2c1693(_0x2821b6),await _0x22448c(_0x2821b6,_0x1cc77c,_0x5521ac),_0x5468f3;}catch{return!0x1;}function _0x2c1693(_0x39f86a){const _0x1e2304=_0x5e0779(_0x39f86a);_0x1e2304&&'ES256'==_0x1e2304['alg']||(_0x5468f3=!0x1);}async function _0x22448c(_0x5cb688,_0x1cab3c,_0x1121d2){const _0x1139a4=window['Uint8Array']['from'](_0x1b6d3c(_0x1121d2),_0x102006=>_0x102006['charCodeAt'](0x0)),_0x6dc372=new window['TextEncoder']()['encode'](_0x5cb688+'.'+_0x1cab3c),_0x24d049=window['crypto']['subtle'];if(!_0x24d049)return;const _0x50ec3e=await _0x24d049['importKey']('jwk',_0x23fdc4,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x24d049['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x50ec3e,_0x1139a4,_0x6dc372)||(_0x5468f3=!0x1);}}function _0x5e0779(_0x55157c){return _0x55157c['startsWith']('ey')?JSON['parse'](_0x1b6d3c(_0x55157c)):null;}function _0x1b6d3c(_0x526731){return window['atob'](_0x526731['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x411190(_0x4e1585){let _0x5462fc=0x1505;function _0x18ff81(_0x27ea9f){for(let _0x5724bc=0x0;_0x5724bc<_0x27ea9f['length'];_0x5724bc++){const _0x188268=_0x27ea9f['charCodeAt'](_0x5724bc);_0x5462fc=(_0x5462fc<<0x5)+_0x5462fc+_0x188268,_0x5462fc&=_0x5462fc;}}function _0x19c06f(_0x407db5){Array['isArray'](_0x407db5)?_0x407db5['forEach'](_0x19c06f):_0x407db5&&'object'==typeof _0x407db5?Object['entries'](_0x407db5)['sort']()['forEach'](([_0x5659ff,_0x569fd0])=>{_0x18ff81(_0x5659ff),_0x19c06f(_0x569fd0);}):_0x18ff81(window['String'](_0x407db5));}return _0x19c06f(_0x4e1585),_0x5462fc>>>0x0;}function _0x36bac0(_0x4471ed){return _0x4471ed['toString'](0x10)['padStart'](0x8,'0');}function _0x10d043(_0x1dadd6){return _0x1dadd6['split']('')['reverse']()['join']('');}function _0x169a2a(_0x26e35f){return _0x55c3da['plugins']['has'](_0x26e35f);}function _0x3658c1(_0x469e33){return _0x55c3da['plugins']['get'](_0x469e33);}function _0x21df41(){}_0x26bc3c(await _0x23d7b6());}_0x2fc968(_0x5d3103['editor']);}(this);}createRevision(_0x2a0f82){const _0x1ac7a7=this['editor']['plugins']['get']('Users');return new yt({'id':_0x2a0f82['id'],'name':_0x2a0f82['name'],'creator':_0x2a0f82['creatorId']?_0x1ac7a7['getUser'](_0x2a0f82['creatorId']):null,'diffData':_0x2a0f82['diffData']||_0x2a0f82['data'],'authors':_0x2a0f82['authorsIds']['map'](_0x902fac=>_0x1ac7a7['getUser'](_0x902fac)),'createdAt':new Date(_0x2a0f82['createdAt']),'attributes':_0x2a0f82['attributes'],'fromVersion':_0x2a0f82['fromVersion'],'toVersion':_0x2a0f82['toVersion']});}['addRevision'](_0x162eb2,_0x1090cf=0x0){this['_revisions']['add'](_0x162eb2,_0x1090cf);}getRevision(_0x4ae708){return this['_revisions']['get'](_0x4ae708);}getRevisions(_0x19f9d7={'toJSON':!0x1}){const _0x125b02=Array['from'](this['_revisions']);return _0x125b02['reverse'](),_0x19f9d7['toJSON']?_0x125b02['map'](_0x4ceef8=>_0x4ceef8['toJSON']()):_0x125b02;}getIndex(_0x1be798){return this['_revisions']['getIndex'](_0x1be798);}getEarlierVisibleRevision(_0x3d5fe7){const [,_0x1f7d3d]=this['getRevisionsIterator'](_0x3d5fe7,{'direction':'earlier'});return _0x1f7d3d;}getLaterVisibleRevision(_0x5be0cf){const [,_0x57a562]=this['getRevisionsIterator'](_0x5be0cf,{'direction':'later'});return _0x57a562;}getRevisionsInDiff(_0xf435d2){const _0x457ebf=[];for(const _0x5a1610 of this['getRevisionsIterator'](_0xf435d2['newRevisionId']))if(_0x457ebf['push'](_0x5a1610),_0x5a1610['id']===_0xf435d2['oldRevisionId'])break;return _0x457ebf;}*getRevisionsIterator(_0x48da3e,{direction:_0x50239d='earlier',filter:_0x51e20e=()=>!0x0}={}){const _0x50a11f='earlier'===_0x50239d?0x1:-0x1;let _0x43e68e=this['_revisions']['get'](_0x48da3e),_0x15b221=this['getIndex'](_0x43e68e);for(yield _0x43e68e;_0x43e68e;){if(_0x15b221+=_0x50a11f,_0x43e68e=this['getRevision'](_0x15b221),!_0x43e68e)return;_0x51e20e(_0x43e68e)&&(yield _0x43e68e);}}},Rt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x524a1a,'c'],[_0x28d884,'a'],[_0x5569aa,'e'],[_0x17020d,'r'],[_0x26f24c,'u']]);_typeCharToViewClass=new Map([['c',_0x524a1a],['a',_0x28d884],['e',_0x5569aa],['r',_0x17020d],['u',_0x26f24c]]);async loadRevisionData(_0x223a1d,_0x17dffa){if(_0x223a1d['diffData']||!_0x17dffa)return;const _0x599b43=this['editor']['config']['get']('collaboration.channelId');_0x223a1d['diffData']=(await _0x17dffa['getRevision']({'channelId':_0x599b43,'revisionId':_0x223a1d['id']}))['diffData'];}getRevisionDocumentData(_0x44fe6f){const _0x4af8d6={};for(const _0x990803 in _0x44fe6f['diffData']){if(_0x44fe6f['diffData'][_0x990803]['attachChange']&&!_0x44fe6f['diffData'][_0x990803]['attachChange']['isAttached'])continue;const _0x2eebce=this['_removeRevisionMarkers'](JSON['parse'](_0x44fe6f['diffData'][_0x990803]['insertions'])),_0x1a879a=this['editor']['editing']['view']['document'],_0x1e8274=new _0xabc291(_0x1a879a,_0x2eebce['map'](_0x145ac8=>this['_getViewFromDiffObj'](_0x145ac8,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4af8d6[_0x990803]=this['editor']['data']['processor']['toData'](_0x1e8274),this['editor']['data']['processor']['useFillerType']('default');}return _0x4af8d6;}getRevisionRootsAttributes(_0x279c42){const _0x4d0d82={};for(const _0x16282f in _0x279c42['diffData'])_0x279c42['diffData'][_0x16282f]['attachChange']&&!_0x279c42['diffData'][_0x16282f]['attachChange']['isAttached']||(_0x4d0d82[_0x16282f]=_0x279c42['diffData'][_0x16282f]['attributesAfter']||{});return _0x4d0d82;}getRevisionRootsModelElements(_0x4e2b1b){const _0x1481c0={};for(const _0x3a9c9c in _0x4e2b1b['diffData']){if(_0x4e2b1b['diffData'][_0x3a9c9c]['attachChange']&&!_0x4e2b1b['diffData'][_0x3a9c9c]['attachChange']['isAttached'])continue;const _0xa93616=_0x4e2b1b['diffData'][_0x3a9c9c]['rootElementName'];_0xa93616&&(_0x1481c0[_0x3a9c9c]=_0xa93616);}return _0x1481c0;}_getTypeCharForViewElement(_0x3ea5b6){return this['_viewClassToTypeChar']['get'](_0x3ea5b6['constructor']);}_getViewFromDiffObj(_0x539e0f,_0x52fca2){const _0x1b1e70=this['editor']['editing']['view']['document'];if('string'==typeof _0x539e0f)return new _0x383b5e(_0x1b1e70,_0x539e0f);{let _0x5f1837,_0x565bab;_0x565bab='u'==_0x539e0f['type']||'r'==_0x539e0f['type']?[]:_0x539e0f['children']['map'](_0x4c2e0b=>this['_getViewFromDiffObj'](_0x4c2e0b,_0x52fca2));const _0x364963=this['_typeCharToViewClass']['get'](_0x539e0f['type'])||_0x2d3953,_0x3e6808=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x5f1837=new _0x364963(_0x1b1e70,_0x539e0f['name'],_0x539e0f['attributes'],_0x565bab),'u'==_0x539e0f['type']&&_0x539e0f['children'][0x0]){const _0x331e0b=_0x539e0f['children'][0x0];if(_0x5f1837['render']=function(_0xbb05e1){const _0x189dab=_0xbb05e1['createElement']('div');return _0x189dab['innerHTML']=_0xe4f10(_0x331e0b),_0x189dab['childNodes'][0x0];},_0x52fca2){const _0x2b5cca=new _0xabc291(_0x1b1e70);_0x2b5cca['_appendChild'](_0x5f1837);const _0x5e650d=Array['from'](_0x3e6808['viewChildrenToDom'](_0x2b5cca,{'bind':!0x1})),_0x1747d0=_0x3e6808['domDocument']['createElement']('div');_0x1747d0['append'](..._0x5e650d),_0x5f1837=Array['from'](_0x3e6808['domChildrenToView'](_0x1747d0))[0x0];}}else{if('r'==_0x539e0f['type']&&_0x539e0f['children'][0x0]){const _0x1ded38=_0x539e0f['children'][0x0];if(_0x5f1837['render']=function(_0x3c016f){_0x3c016f['innerHTML']=_0xe4f10(_0x1ded38);},_0x52fca2){const _0x7be2b9=new _0xabc291(_0x1b1e70);_0x7be2b9['_appendChild'](_0x5f1837);const _0x4cae31=Array['from'](_0x3e6808['viewChildrenToDom'](_0x7be2b9,{'bind':!0x1})),_0x48930c=_0x3e6808['domDocument']['createElement']('div');_0x48930c['append'](..._0x4cae31);const _0x1e2783=Array['from'](_0x3e6808['domChildrenToView'](_0x48930c));_0x1e2783['length']>0x1?_0x5f1837['_appendChild'](_0x1e2783):_0x5f1837=_0x1e2783[0x0];}}}if(_0x539e0f['customProperties']){for(const [_0x1ae583,_0x417084]of _0x539e0f['customProperties'])_0x5f1837['_setCustomProperty'](_0x1ae583,_0x417084);}const _0x54ba6a=void 0x0===_0x539e0f['fillerOffset']?null:_0x539e0f['fillerOffset'];return null!==_0x54ba6a&&(_0x5f1837['getFillerOffset']=()=>_0x54ba6a),_0x5f1837;}}_makeModelFromViewString(_0x45bde7,_0xfb0c99){const _0xc020e7=JSON['parse'](_0x45bde7),_0x1cd224=this['editor']['editing']['view']['document'],_0x135430=new _0xabc291(_0x1cd224,_0xc020e7['map'](_0x2fddf1=>this['_getViewFromDiffObj'](_0x2fddf1,!0x0))),_0xfc96c5=this['editor']['data']['toModel'](_0x135430,_0xfb0c99);return _0xfc96c5['name']=_0xfb0c99,_0xfc96c5;}['_removeRevisionMarkers'](_0x2954f5){return(_0x2954f5=_0x2954f5['filter'](_0x65f21f=>!_0x65f21f['name']||'revision-start'!==_0x65f21f['name']&&'revision-end'!==_0x65f21f['name']))['forEach'](_0x50b327=>{'string'!=typeof _0x50b327&&(_0x50b327['children']=this['_removeRevisionMarkers'](_0x50b327['children']),_0x50b327['attributes']=_0x50b327['attributes']['filter'](_0x1c85c8=>!_0x1c85c8[0x0]['startsWith']('data-revision-')));}),_0x2954f5;}};function kt(_0x3e6fd7,_0x2ed7f8,_0x1722ec){const t=_0x3e6fd7['t'];switch(_0x2ed7f8){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'},_0x1722ec);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1722ec);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x1722ec);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x1722ec);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x1722ec);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x3ccb16{['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[_0x312567,bt,Rt,_0x55fafd];}constructor(_0x4bc2a9){super(_0x4bc2a9),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2e1c5d=_0x5289a7();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2e1c5d},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 _0x400e6a=this['repository']['getRevision'](0x0),_0xe84c79=_0x400e6a&&null===_0x400e6a['creator']?_0x400e6a:null;if(this['_continueCurrentRevision']=!!_0xe84c79&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1ada1e=this['_source']['getCurrentRevisionId'](),_0x4f7561=this['repository']['getRevision'](_0x1ada1e);if(_0x4f7561)this['_startingVersion']=_0x4f7561['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x54ff83=this['_source']['history']['_operations']['find'](_0x8bff9f=>!_0x8bff9f['_isInit']),_0x2b2ec5=_0x54ff83?_0x54ff83['baseVersion']:this['_source']['history']['version'];_0x400e6a?(_0x400e6a['toVersion']<_0x2b2ec5&&_0x400e6a['_update']({'toVersion':_0x2b2ec5}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xe84c79['id'],this['_startingVersion']=_0xe84c79['fromVersion']):(this['_startingVersion']=_0x400e6a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2b2ec5,this['_continueCurrentRevision']=!0x1);}}else _0xe84c79&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xe84c79['toVersion'],this['editor']['model']['document']['history']['version']),_0xe84c79['fromVersion']===_0xe84c79['toVersion']?(0x0!==_0xe84c79['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xe84c79['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xe84c79['id'],this['_startingVersion']=_0xe84c79['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',_0x4d3b46=>!_0x4d3b46),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x178ea0=[this['editor']];for(const _0x287368 of _0x178ea0){let _0x327ea7;for(const _0x3a0298 in _0x287368){const _0x490647=_0x3a0298,_0x272f9c=_0x287368[_0x490647];if('revisionHistoryLicenseKeyValid'==_0x272f9c||'revisionHistoryLicenseKeyInvalid'==_0x272f9c||'revisionHistoryLicenseKeyExpired'==_0x272f9c||'revisionHistoryLicenseKeyDomainLimit'==_0x272f9c||'revisionHistoryLicenseKeyNotAllowed'==_0x272f9c||'revisionHistoryLicenseKeyEvaluationLimit'==_0x272f9c||'revisionHistoryLicenseKeyUsageLimit'==_0x272f9c){delete _0x287368[_0x490647],_0x327ea7=_0x272f9c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x327ea7&&_0x287368['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x327ea7&&_0x287368['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x327ea7&&_0x287368['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x327ea7&&_0x287368['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x327ea7&&_0x287368['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x327ea7&&_0x287368['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x4e250c=this['repository']['getRevision'](0x0),_0x47c924=await this['getRevisionDocumentData'](_0x4e250c),_0x2a9da8=await this['getRevisionRootsAttributes'](_0x4e250c),_0x351da7=this['_utils']['getRevisionRootsModelElements'](_0x4e250c);this['_replaceEditorDataWithRevisionData'](_0x47c924,_0x2a9da8,_0x351da7);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x22db48){this['_source']=_0x22db48;}async update(){const _0x65957c=await this['_source']['getLatestVersion']();if(_0x65957c>this['currentRevision']['toVersion']){await this['_loadState']();const _0x31b567=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x65957c});_0x31b567['authors']=_0x31b567['authorsIds']['map'](_0x1262d1=>this['editor']['plugins']['get']('Users')['getUser'](_0x1262d1)),this['currentRevision']['_update'](_0x31b567);}}async['saveRevision'](_0x1b9b59={},_0x19f076=null){const _0x3a67dd=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x19f076>this['currentRevision']['toVersion']&&(_0x19f076=null),null===_0x19f076&&(_0x19f076=await this['_source']['getLatestVersion']());const _0x361398=this['_getFromVersion'](_0x19f076),_0x4a9d3a=this['buildRevisionData']({'from':_0x361398,'to':_0x19f076});if(this['currentRevision']['toVersion']<_0x19f076){const _0x226f52=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x19f076,'to':_0x19f076});_0x226f52['authors']=[],_0x226f52['authorsIds']=[],_0x226f52['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x226f52,!0x0),delete _0x226f52['authors'],_0x3a67dd['push'](_0x226f52);}const _0x2adbf5={..._0x1b9b59,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x1b9b59['name']||null,'id':_0x1b9b59['id']||_0x5289a7(),..._0x4a9d3a,'attributes':{..._0x1b9b59['attributes'],..._0x4a9d3a['attributes']}},_0x1a3e6e=this['addRevisionData'](_0x2adbf5);_0x3a67dd['push'](_0x2adbf5);const _0xae41d=this['repository']['getIndex'](_0x1a3e6e);if(0x0!==_0xae41d){const _0x627b85=this['repository']['getRevision'](_0xae41d-0x1);if(_0x627b85['fromVersion']!==_0x19f076){const _0x31425b=this['_revisionDataBuilder']['getData'](_0x19f076,_0x627b85['toVersion']),_0x5de086={'id':_0x627b85['id'],'diffData':_0x31425b['diffData'],'authorsIds':_0x31425b['authorsIds'],'authors':_0x31425b['authorsIds']['map'](_0x4eb8b2=>this['editor']['plugins']['get']('Users')['getUser'](_0x4eb8b2)),'fromVersion':_0x19f076};this['_stampAiAttribute'](_0x5de086,_0x627b85,!!_0x31425b['hasAIChanges']),_0x627b85===this['currentRevision']&&(_0x5de086['createdAt']=new Date(_0x2adbf5['createdAt']['getTime']()+0xa)),_0x627b85['_update'](_0x5de086,!0x0),delete _0x5de086['authors'],_0x3a67dd['push'](_0x5de086);}}if(this['adapter']){for(const _0x194bb1 of _0x3a67dd)this['_bufferUpdate'](_0x194bb1['id'],_0x194bb1,!0x0);this['sendBufferedUpdates']();}return _0x1a3e6e;}addRevisionData(_0xc87ba6){const _0x1a3328=this['repository']['createRevision'](_0xc87ba6);return this['adapter']&&_0x1a3328['on']('_update',(_0x4144a4,_0x1c44d7,_0x5082ad)=>{_0x5082ad||(this['_bufferUpdate'](_0x1c44d7['id'],_0x1c44d7,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1a3328,this['_findInsertionIndex'](_0x1a3328)),_0x1a3328;}async getRevisionDocumentData(_0xae8512){return await this['_utils']['loadRevisionData'](_0xae8512,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xae8512);}async getRevisionRootsAttributes(_0x1112c8){return await this['_utils']['loadRevisionData'](_0x1112c8,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1112c8);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x40fa55=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x4c0eb6=0x0;_0x4c0eb6<_0x40fa55['length'];_0x4c0eb6++){const _0x5852ad=_0x40fa55[_0x4c0eb6];let _0x4f3078=!0x1;for(const _0x25e1d3 of Object['keys'](_0x5852ad))void 0x0===_0x5852ad[_0x25e1d3]?delete _0x5852ad[_0x25e1d3]:'id'!==_0x25e1d3&&(_0x4f3078=!0x0);_0x4f3078||(_0x40fa55[_0x4c0eb6]=null);}if(_0x40fa55=_0x40fa55['filter'](_0x480734=>null!==_0x480734),!_0x40fa55['length'])return;for(let _0x26b7a2=0x0;_0x26b7a2<_0x40fa55['length'];_0x26b7a2++){const _0xe8a914=_0x40fa55[_0x26b7a2];void 0x0!==_0xe8a914['fromVersion']&&void 0x0===_0xe8a914['toVersion']&&(_0xe8a914['toVersion']=this['repository']['getRevision'](_0xe8a914['id'])['toVersion']),void 0x0!==_0xe8a914['toVersion']&&void 0x0===_0xe8a914['fromVersion']&&(_0xe8a914['fromVersion']=this['repository']['getRevision'](_0xe8a914['id'])['fromVersion']);}const _0x4366de=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x40fa55,_0x4366de)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x14825f=>{if(_0x14825f){for(const _0x41ef84 of _0x14825f)this['setRevisionData']({'id':_0x41ef84['id'],'createdAt':_0x41ef84['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x237111,_0x239349,_0x37fce1){if(_0x37fce1===(!!_0x239349&&!!_0x239349['attributes']['@ai']))return;const _0x4130bb={..._0x239349?_0x239349['attributes']:{},..._0x237111['attributes']};_0x37fce1?_0x4130bb['@ai']=!0x0:delete _0x4130bb['@ai'],_0x237111['attributes']=_0x4130bb;}buildRevisionData({revision:_0x58e20a=null,from:_0xe51299=null,to:_0x3355fe=null}){_0xe51299=null!==_0xe51299?_0xe51299:_0x58e20a['fromVersion'],_0x3355fe=null!==_0x3355fe?_0x3355fe:_0x58e20a['toVersion'];const _0x41aeb5=this['_revisionDataBuilder']['getData'](_0xe51299,_0x3355fe),_0x2fa54f={'diffData':_0x41aeb5['diffData'],'authorsIds':_0x41aeb5['authorsIds'],'fromVersion':_0xe51299,'toVersion':_0x3355fe};if(this['_stampAiAttribute'](_0x2fa54f,_0x58e20a,!!_0x41aeb5['hasAIChanges']),!_0x58e20a||_0x3355fe!==_0x58e20a['toVersion']){const _0x12a42b=_0x3355fe-0x1,_0x526f17=this['_source']['history']['getOperation'](_0x12a42b);_0x2fa54f['createdAt']=_0x526f17&&_0x526f17['createdAt']||new Date();}if(this['_loadedStateData']&&_0xe51299===this['_loadedStateData']['fromVersion']){for(const _0x4907d6 of this['_loadedStateData']['authors'])_0x2fa54f['authorsIds']['includes'](_0x4907d6['id'])||_0x2fa54f['authorsIds']['push'](_0x4907d6['id']);}return _0x2fa54f;}_bufferUpdate(_0x2eebe9,_0xf5d722,_0x5861f9){if(this['_bufferedUpdates']['has'](_0x2eebe9)){const _0x3525b3=this['_bufferedUpdates']['get'](_0x2eebe9);_0xf5d722=_0x5861f9?{..._0x3525b3,..._0xf5d722}:{..._0xf5d722,..._0x3525b3};}this['_bufferedUpdates']['set'](_0x2eebe9,_0xf5d722);}setRevisionData(_0x55acfa){const _0x297f96=this['repository']['getRevision'](_0x55acfa['id']);if(_0x55acfa['createdAt']&&(_0x55acfa['createdAt']=new Date(_0x55acfa['createdAt'])),_0x55acfa['authorsIds']){const _0x468bba=this['editor']['plugins']['get']('Users');_0x55acfa['authors']=_0x55acfa['authorsIds']['map'](_0x375b0d=>_0x468bba['getUser'](_0x375b0d));}_0x297f96['_update'](_0x55acfa,!0x0);}_createInitialRevision(_0x5b6afc){const _0x4d3133=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4d3133)this['_initialRevisionId']=_0x4d3133['id'];else{const _0x27d171=!this['editor']['model']['document']['roots']['find'](_0x1836db=>this['editor']['model']['hasContent'](_0x1836db)),_0x3c986a=this['editor']['plugins']['get']('Users')['me']['id'],_0xd41ce9=kt(this['editor']['locale'],_0x27d171?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5b6afc,'to':_0x5b6afc,'id':this['_initialRevisionId'],'name':_0xd41ce9,'creatorId':_0x3c986a});}}_createCurrentRevision(_0x10fbf3){const _0x2b4e7c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2b4e7c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x10fbf3,'to':_0x10fbf3,'id':_0x2b4e7c,'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(_0x4465df,_0x163c17,_0x1d25a8){const _0x15be32={},_0x181ad1={},_0x1bb0cd={},_0xa18adf=this['editor']['config']['get']('roots')||{};for(const [_0x3f70b0,_0x5dfdea]of Object['entries'](_0xa18adf))_0x5dfdea['lazyLoad']||(_0x15be32[_0x3f70b0]=_0x5dfdea['initialData']??'',_0x181ad1[_0x3f70b0]=_0x5dfdea['modelAttributes']||{},_0x5dfdea['modelElement']&&(_0x1bb0cd[_0x3f70b0]=_0x5dfdea['modelElement']));for(const _0x496a3a of this['editor']['model']['document']['getRootNames']())_0x15be32[_0x496a3a]??='',_0x181ad1[_0x496a3a]??={};let _0x4b5374=!0x1;const _0x1180aa=Object['keys'](_0x15be32),_0x11daf4=Object['keys'](_0x4465df);for(const _0x12385e of _0x1180aa){if(_0x15be32[_0x12385e]!==_0x4465df[_0x12385e]&&''!==_0x15be32[_0x12385e]['trim']()){_0x4b5374=!0x0;break;}if(!_0x538fa0(_0x181ad1[_0x12385e],_0x163c17[_0x12385e])&&Object['keys'](_0x181ad1[_0x12385e])['length']>0x0){_0x4b5374=!0x0;break;}const _0x2ee8a8=_0x1bb0cd[_0x12385e],_0x21c663=_0x1d25a8[_0x12385e];if(_0x2ee8a8&&_0x21c663&&_0x2ee8a8!==_0x21c663){_0x4b5374=!0x0;break;}}_0x4b5374||(_0x4b5374=_0x11daf4['some'](_0x293388=>!this['editor']['model']['document']['getRoot'](_0x293388))),_0x4b5374&&_0x3905c1('editor-initial-data-replaced-with-revision-data',{'editorData':_0x15be32,'editorRootsAttributes':_0x181ad1,'editorRootsModelElements':_0x1bb0cd,'revisionData':_0x4465df,'revisionRootsAttributes':_0x163c17,'revisionRootsModelElements':_0x1d25a8});for(const [_0x3ccd87,_0x28836d]of Object['entries'](_0x4465df))this['editor']['config']['set']('roots.'+_0x3ccd87+'.initialData',_0x28836d);for(const [_0x30d8ea,_0xd46164]of Object['entries'](_0x163c17))this['editor']['config']['set']('roots.'+_0x30d8ea+'.modelAttributes',_0xd46164);const _0x2076fd=this['editor']['model']['document'];for(const [_0x41bc24,_0x396c15]of Object['entries'](_0x1d25a8)){this['editor']['config']['set']('roots.'+_0x41bc24+'.modelElement',_0x396c15);const _0x23556c=_0x2076fd['getRoot'](_0x41bc24);_0x23556c&&_0x23556c['name']!==_0x396c15&&(_0x2076fd['roots']['remove'](_0x41bc24),_0x2076fd['createRoot'](_0x396c15,_0x41bc24));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2e6af2=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2e6af2['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x1d542a){const _0x4fb1ad=this['repository']['getRevisions']();_0x4fb1ad['reverse']();let _0x26e3e9=0x0;for(;_0x26e3e9<_0x4fb1ad['length'];){const _0x207da7=_0x4fb1ad[_0x26e3e9];if(_0x207da7===this['currentRevision']){_0x26e3e9++;continue;}if(_0x207da7['id']===this['_initialRevisionId'])break;const _0x709ac8=_0x1d542a['toVersion']-_0x207da7['toVersion']||_0x1d542a['fromVersion']-_0x207da7['fromVersion'];if(_0x709ac8>0x0)break;if(_0x709ac8<0x0)_0x26e3e9++;else{if(!_0x1d542a['creator']&&_0x207da7['creator'])break;if(_0x207da7['creator']||!_0x1d542a['creator']){if(_0x1d542a['createdAt']>_0x207da7['createdAt'])break;_0x26e3e9++;}else _0x26e3e9++;}}return _0x26e3e9;}_getFromVersion(_0x1e97ca){const _0x2f2c3f=this['repository']['getRevisions']();_0x2f2c3f['reverse'](),_0x2f2c3f['shift']();const _0x328672=_0x2f2c3f['find'](_0x3adffa=>_0x3adffa['toVersion']<=_0x1e97ca)['toVersion'];return _0x328672<this['_startingVersion']?this['_startingVersion']:_0x328672;}['_makeRevision']({name:_0x219496,from:_0x1a2910,to:_0x53a2e1,creatorId:_0x49f438,id:_0x55bdc6}){const _0x139d0f=this['buildRevisionData']({'from':_0x1a2910,'to':_0x53a2e1});_0x139d0f['name']=_0x219496,_0x139d0f['creatorId']=_0x49f438,_0x139d0f['id']=_0x55bdc6;const _0x9c9a34=this['addRevisionData'](_0x139d0f);return this['adapter']&&this['_bufferUpdate'](_0x139d0f['id'],_0x139d0f,!0x0),_0x9c9a34;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x561d0d){this['editor']=_0x561d0d,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x34936f){this['source']=_0x34936f;const _0x34e79f=new Map(),_0x1af8d6=new Map(),_0xbad2c0=this['editor']['model']['document']['roots']['map'](_0x2b65f0=>_0x2b65f0['rootName']);for(const _0x4f7481 of _0xbad2c0){const _0x28cf2d=this['editor']['model']['document']['getRoot'](_0x4f7481),_0x32a344=St(_0x28cf2d);_0x34e79f['set'](_0x4f7481,_0x32a344),_0x1af8d6['set'](_0x4f7481,Object['fromEntries'](_0x28cf2d['getAttributes']()));}const _0x247873=Array['from'](this['editor']['model']['markers'])['map'](_0x5a82b9=>[_0x5a82b9['name'],_0x5a82b9['getRange']()]),_0x1bef46=this['source']['version'];this['_saveMetaData'](_0x1bef46,_0x34e79f,_0x247873,_0x1af8d6),this['_startingRevisionId']=this['_revisionId'];const _0x3c94a1=new Map(),_0x407c60=new Map();for(const _0x2fa461 of _0xbad2c0){const _0x58a453=Et(_0x2fa461,this['editor']['model']['document']['getRoot'](_0x2fa461)['name']);_0x3c94a1['set'](_0x2fa461,_0x58a453),_0x407c60['set'](_0x2fa461,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3c94a1,[],_0x407c60);}getData(_0x35f582,_0x4fe200){if(this['_lastFrom']===_0x35f582&&this['_lastTo']<=_0x4fe200)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x4fe200,!0x0);else{if(!this['_savedMetaData']['has'](_0x35f582)){const _0x2e5084=this['_getPreviousFrom'](_0x35f582);this['_calculateMetaData'](_0x2e5084,_0x35f582,!0x1);}this['_calculateMetaData'](_0x35f582,_0x4fe200,!0x0);}return this['_lastFrom']=_0x35f582,this['_lastTo']=_0x4fe200,this['_getState']();}loadState(_0x3af0b9){if(!this['_savedMetaData']['has'](_0x3af0b9['fromVersion'])){const _0x239c29=this['_getPreviousFrom'](_0x3af0b9['fromVersion']);this['_calculateMetaData'](_0x239c29,_0x3af0b9['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3af0b9['fromVersion'],_0x3af0b9['toVersion'],!0x1);const _0xf41104=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3af0b9['fromVersion'],this['_lastTo']=_0x3af0b9['toVersion'];for(const _0x2d3840 in _0x3af0b9['diffData']){const _0x3dbc43=_0x3af0b9['diffData'][_0x2d3840]['attachChange'],_0x5e956d=_0x144f08(_0x3af0b9['diffData'][_0x2d3840]['attributesBefore'])||{},_0x4a19ea=_0x3af0b9['diffData'][_0x2d3840],_0x37532f=_0xf41104['_makeModelFromViewString'](_0x4a19ea['deletions'],_0x4a19ea['rootElementName']||'$root');_0x37532f['rootName']=_0x2d3840,_0x37532f['_isAttached']=!_0x3dbc43||!_0x3dbc43['isAttached'],_0x37532f['isAttached']=()=>_0x37532f['_isAttached'],this['_baseRoots']['set'](_0x2d3840,_0x37532f),this['_baseRootsAttributes']['set'](_0x2d3840,_0x5e956d),_0x3dbc43&&this['_touchedRoots']['set'](_0x2d3840,_0x3dbc43);const _0x183ac9=this['_makeIdsRoot'](_0x37532f);this['_baseIdsRoots']['set'](_0x2d3840,_0x183ac9);for(const [_0x204a26,_0x1b6245]of _0x37532f['markers']){if(!_0x204a26['startsWith']('revision:'))continue;const _0x19d3ba=_0x204a26['split'](':')[0x2],_0x2fcd5e=_0x4a19ea['aiSources']?.[_0x204a26]||null;for(const _0xe8d32d of _0x1b6245['getWalker']({'singleCharacters':!0x0})){const _0x2c517b=this['_getVidAttributeName'](_0xe8d32d),_0x437281='elementEnd'==_0xe8d32d['type']?_0xe8d32d['previousPosition']['path']['slice'](0x0,-0x1):_0xe8d32d['previousPosition']['path'],_0x49fbcd=_0x183ac9['getNodeByPath'](_0x437281)['getAttribute'](_0x2c517b);this['_touched']['set'](_0x49fbcd,{'userId':_0x19d3ba,'aiSource':_0x2fcd5e});}_0x37532f['markers']['delete'](_0x204a26);}}this['_startingRevisionId']=this['_revisionId'];const _0x2eb5dd=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x35cdff=>!this['_touched']['has'](_0x35cdff));let _0x3bc09c=0x0;const _0x30555e=new Map();for(const _0x23e6c2 in _0x3af0b9['diffData']){const _0x3af82e=_0x3af0b9['diffData'][_0x23e6c2]['attachChange'],_0x1c9df5=_0x144f08(_0x3af0b9['diffData'][_0x23e6c2]['attributesAfter'])||{},_0x285ebc=_0x3af0b9['diffData'][_0x23e6c2],_0x5f170b=_0xf41104['_makeModelFromViewString'](_0x285ebc['insertions'],_0x285ebc['rootElementName']||'$root');_0x5f170b['rootName']=_0x23e6c2,_0x5f170b['_isAttached']=!_0x3af82e||_0x3af82e['isAttached'],_0x5f170b['isAttached']=()=>_0x5f170b['_isAttached'],this['_diffRoots']['set'](_0x23e6c2,_0x5f170b),this['_diffRootsAttributes']['set'](_0x23e6c2,_0x1c9df5);const _0x1daaf4=this['_makeIdsRoot'](_0x5f170b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x23e6c2,_0x1daaf4),_0x30555e['set'](_0x23e6c2,_0x5f170b['isAttached']()?_0x1c9df5:{});for(const [_0x1c916c,_0xc8202f]of _0x5f170b['markers']){if(!_0x1c916c['startsWith']('revision:'))continue;const _0x2d6832=_0x1c916c['split'](':')[0x2],_0x3cbe93=_0x285ebc['aiSources']?.[_0x1c916c]||null;for(const _0x181cab of _0xc8202f['getWalker']({'singleCharacters':!0x0})){const _0x580345=this['_getVidAttributeName'](_0x181cab),_0x1dbdf9=this['_revisionId']++,_0x3ce121='elementEnd'==_0x181cab['type']?_0x181cab['previousPosition']['path']['slice'](0x0,-0x1):_0x181cab['previousPosition']['path'];_0x1daaf4['getNodeByPath'](_0x3ce121)['_setAttribute'](_0x580345,_0x1dbdf9),this['_touched']['set'](_0x1dbdf9,{'userId':_0x2d6832,'aiSource':_0x3cbe93});}_0x5f170b['markers']['delete'](_0x1c916c);}for(const _0xfe0ddb of this['editor']['model']['createRangeIn'](_0x5f170b)['getWalker']({'singleCharacters':!0x0})){const _0xdd2aa4=this['_getVidAttributeName'](_0xfe0ddb),_0x33fc89='elementEnd'==_0xfe0ddb['type']?_0xfe0ddb['previousPosition']['path']['slice'](0x0,-0x1):_0xfe0ddb['previousPosition']['path'],_0x45e32e=_0x1daaf4['getNodeByPath'](_0x33fc89);_0x45e32e['getAttribute'](_0xdd2aa4)>0x0||_0x45e32e['_setAttribute'](_0xdd2aa4,_0x2eb5dd[_0x3bc09c++]);}for(const [_0x3ae353,_0x4e1ffb]of _0x5f170b['markers'])_0x3ae353['startsWith']('revision:')||this['_markers']['set'](_0x3ae353,_0x4e1ffb);}const {roots:_0xa94598}=this['_savedMetaData']['get'](_0x3af0b9['fromVersion']),{roots:_0xeaa17f}=this['_savedMetaData']['get'](_0x3af0b9['toVersion']),_0x182b13=St(_0xa94598['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x182b13),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x182b13,Number['NEGATIVE_INFINITY']));const _0x630beb=St(_0xeaa17f['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x630beb),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x630beb));const _0xa302df=Array['from'](this['_diffRoots'])['map'](([_0x2941e5,_0x47813f])=>[_0x2941e5,St(_0x47813f)]);this['_saveMetaData'](this['_lastTo'],_0xa302df,this['_markers'],_0x30555e);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x456754,_0x3cd7de,_0x5cee19,_0x237280){const _0x2edc73=new Map(_0x3cd7de),_0x11eeda=new Map(_0x144f08(_0x237280)),_0x3a73e3=new Map();for(const [_0x5290be,_0x536c11]of _0x5cee19)_0x3a73e3['set'](_0x5290be,{'start':_0x536c11['start']['clone'](),'end':_0x536c11['end']['clone'](),'rootName':_0x536c11['root']['rootName']});this['_savedMetaData']['set'](_0x456754,{'roots':_0x2edc73,'markers':_0x3a73e3,'rootsAttributes':_0x11eeda});}_removeMetaData(_0x2e53fe){this['_savedMetaData']['delete'](_0x2e53fe);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}_makeIdsRoot(_0x20e88e,_0x114afd=null){let _0x2bf4de=null;_0x20e88e['is']('documentFragment')||(_0x2bf4de=new _0x28c730(_0x20e88e['name'],{'vid_start':null===_0x114afd?this['_revisionId']++:_0x114afd++}));const _0x15fd67=[];for(const _0x43cabb of _0x20e88e['getChildren']())if(_0x43cabb['is']('element')){_0x15fd67['push'](this['_makeIdsRoot'](_0x43cabb,_0x114afd));const _0x36c422=_0x15fd67[_0x15fd67['length']-0x1];null!==_0x114afd&&(_0x114afd=_0x36c422['is']('element','$text')?_0x36c422['getAttribute']('vid')+0x1:_0x36c422['getAttribute']('vid_end')+0x1);}else{for(let _0x48e7fc=0x0;_0x48e7fc<_0x43cabb['offsetSize'];_0x48e7fc++)_0x15fd67['push'](new _0x28c730('$text',{'vid':null===_0x114afd?this['_revisionId']++:_0x114afd++}));}if(_0x20e88e['is']('documentFragment')){const _0x717f95=Et(_0x20e88e['rootName'],_0x20e88e['name']);return _0x717f95['_insertChild'](0x0,_0x15fd67),_0x717f95;}return _0x2bf4de['_setAttribute']('vid_end',null===_0x114afd?this['_revisionId']++:_0x114afd),_0x2bf4de['_insertChild'](0x0,_0x15fd67),_0x2bf4de;}_calculateMetaData(_0x5e32fc,_0x150401,_0x113ee1){this['_reset']();const {roots:_0xef9b73,markers:_0x87ea9c,rootsAttributes:_0x274651}=this['_savedMetaData']['get'](_0x5e32fc);this['_baseRoots']=new Map(_0xef9b73),this['_baseRootsAttributes']=new Map(_0x144f08(_0x274651));for(const [_0x41f08b,_0x5d7aa8]of this['_baseRoots'])if('$graveyard'!==_0x41f08b&&(this['_diffRoots']['set'](_0x41f08b,St(_0x5d7aa8)),this['_diffRootsAttributes']=new Map(_0x144f08(_0x274651)),_0x113ee1)){const _0x5f3a06=this['_revisionId'];this['_idsRoots']['set'](_0x41f08b,this['_makeIdsRoot'](_0x5d7aa8)),this['_baseIdsRoots']['set'](_0x41f08b,this['_makeIdsRoot'](_0x5d7aa8,_0x5f3a06));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x113ee1&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1cdb26,_0xe73eb7]of _0x87ea9c){const _0x502fa7=this['_baseRoots']['get'](_0xe73eb7['rootName']),_0x4f899d=this['_diffRoots']['get'](_0xe73eb7['rootName']),_0x230775=new _0x390c0d(_0x289722(_0xe73eb7['start'],_0x502fa7),_0x289722(_0xe73eb7['end'],_0x502fa7)),_0xa049a4=_0x3c9bdd(_0x230775,_0x4f899d);_0x502fa7['markers']['set'](_0x1cdb26,_0x230775),this['_markers']['set'](_0x1cdb26,_0xa049a4);}this['_applyOperations'](_0x5e32fc,_0x150401,_0x113ee1);}_applyOperations(_0x198742,_0x3558ee,_0x29cf44){for(const _0x5a8b3d of this['source']['getOperations'](_0x198742,_0x3558ee))this['_handleOperation'](_0x5a8b3d,_0x29cf44);for(const _0x576e86 of this['_diffRoots']['values']())_0x576e86['markers']['clear']();for(const [_0x36e3af,_0x165e4e]of this['_markers'])this['_diffRoots']['get'](_0x165e4e['root']['rootName'])['markers']['set'](_0x36e3af,_0x165e4e['clone']());const _0x22f97a=new Map(),_0x427185=new Map();for(const [_0xc9c66d,_0x5a5611]of this['_diffRoots'])_0x22f97a['set'](_0xc9c66d,St(_0x5a5611)),_0x427185['set'](_0xc9c66d,this['_diffRootsAttributes']['get'](_0xc9c66d));this['_saveMetaData'](_0x3558ee,_0x22f97a,this['_markers'],_0x427185);}_getPreviousFrom(_0x5ab4d4){const _0x27990c=Array['from'](this['_savedMetaData']['keys']());_0x27990c['sort']((_0x5de164,_0x3ee46c)=>_0x5de164-_0x3ee46c),_0x27990c['reverse']();for(const _0x31be91 of _0x27990c)if(_0x31be91<_0x5ab4d4)return _0x31be91;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4b278f,_0x2bbe05){const _0x436362=Array['from'](_0x2bbe05['markers'])['map'](([_0x63b139,_0x5e037c])=>[_0x63b139,_0x3c9bdd(_0x5e037c,_0x4b278f)]);_0x4b278f['markers']=new Map(_0x436362);}_transformMarkers(_0x2bb28a){for(const _0x5c094f of this['_markers']['values']()){const _0xd4af9b=_0x5c094f['getTransformedByOperation'](_0x2bb28a),_0x54eeca=_0x390c0d['_createFromRanges'](_0xd4af9b);_0x5c094f['start']=_0x54eeca['start'],_0x5c094f['end']=_0x54eeca['end'];}}_handleOperation(_0x4028a2,_0x58252e){if('addRoot'!=_0x4028a2['type']&&'detachRoot'!=_0x4028a2['type']){if('insert'==_0x4028a2['type']){const _0x3b7085=_0x4028a2['position']['root'],_0x71f2b=_0x3b7085['rootName'],_0x230ba3=_0x3b7085['name'];this['_diffRoots']['has'](_0x71f2b)||(this['_diffRoots']['set'](_0x71f2b,Et(_0x71f2b,_0x230ba3,!0x0)),this['_diffRootsAttributes']['set'](_0x71f2b,{}),_0x58252e&&this['_idsRoots']['set'](_0x71f2b,Et(_0x71f2b,_0x230ba3,!0x0)));}else{if('addRootAttribute'==_0x4028a2['type']||'removeRootAttribute'==_0x4028a2['type']||'changeRootAttribute'==_0x4028a2['type'])return void this['_handleRootAttributeOperation'](_0x4028a2);'marker'==_0x4028a2['type']&&this['_handleMarkerOperation'](_0x4028a2);}if('marker'!==_0x4028a2['type']){const _0x4b720a=this['_cloneOperation'](_0x4028a2,this['_diffRoots']);_0x4b720a['_execute'](),this['_transformMarkers'](_0x4b720a);}if(_0x58252e)switch(_0x4028a2['type']){case'insert':this['_handleInsertOperation'](_0x4028a2);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4028a2);break;case'merge':this['_handleMergeOperation'](_0x4028a2);break;case'split':this['_handleSplitOperation'](_0x4028a2);}}else this['_handleRootOperation'](_0x4028a2,_0x58252e);}_cloneOperation(_0x464461,_0x1b8e59){const _0x359bbf=_0x464461['clone']();return _0x359bbf['_authorId']=_0x464461['_authorId'],_0x359bbf['_aiSource']=_0x464461['_aiSource'],_0x359bbf['baseVersion']=null,_0x51ed69(_0x359bbf,_0x1b8e59),_0x359bbf;}_getBaseVids(_0xbe4dbc){return _0xbe4dbc['map'](_0x28a8b2=>{const _0x306ae2=this['_getVidAttributeName'](_0x28a8b2);return Number(_0x28a8b2['item']['getAttribute'](_0x306ae2));});}_generateTape(_0x5159a9,_0x38b1ee){if(_0x5159a9['is']('element','$text'))_0x38b1ee['push']({'item':_0x5159a9,'type':'text'});else{_0x5159a9['is']('element')&&_0x38b1ee['push']({'item':_0x5159a9,'type':'elementStart'});for(const _0x11282b of _0x5159a9['getChildren']())this['_generateTape'](_0x11282b,_0x38b1ee);_0x5159a9['is']('element')&&_0x38b1ee['push']({'item':_0x5159a9,'type':'elementEnd'});}return _0x38b1ee;}_getState(){const _0x4e9f4f=new Map(this['_touched']),_0x24023c=new Map(_0x4e9f4f),_0x40ee3e=new Map(),_0x5a1178={'insertions':{},'deletions':{}},_0x1bd158={'insertions':{},'deletions':{}},_0x36d154=new Map(),_0x518d67=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x5e64c6=new Map();_0x518d67['delete']('$graveyard');for(const _0xc60760 of _0x518d67){const _0x4df9e6=(this['_diffRoots']['get'](_0xc60760)??this['_baseRoots']['get'](_0xc60760))['name'],_0x59fe49=this['_diffRoots']['get'](_0xc60760)||Et(_0xc60760,_0x4df9e6,!0x1),_0x2fe637=this['_baseRoots']['get'](_0xc60760)||Et(_0xc60760,_0x4df9e6,!0x1);_0x59fe49['isAttached']()||_0x2fe637['isAttached']()?(_0x5e64c6['set'](_0xc60760,_0x4df9e6),_0x5a1178['insertions'][_0xc60760]=St(_0x59fe49),_0x5a1178['deletions'][_0xc60760]=St(_0x2fe637),this['_copyMarkers'](_0x5a1178['deletions'][_0xc60760],_0x2fe637),this['_copyMarkers'](_0x5a1178['insertions'][_0xc60760],_0x59fe49),_0x1bd158['insertions'][_0xc60760]=this['_generateTape'](this['_idsRoots']['get'](_0xc60760),[]),_0x1bd158['deletions'][_0xc60760]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xc60760)||Et(_0xc60760,_0x4df9e6,!0x1),[])):_0x518d67['delete'](_0xc60760);}for(const _0x44277f of _0x518d67){const _0x11eda5=_0x1bd158['insertions'][_0x44277f];for(const _0x11fa81 of _0x11eda5){const _0x14a6b9=this['_getVidAttributeName'](_0x11fa81),_0x502fe0=_0x11fa81['item']['getAttribute'](_0x14a6b9);_0x24023c['delete'](_0x502fe0),_0x502fe0>=this['_startingRevisionId']&&_0x40ee3e['set'](_0x502fe0,_0x4e9f4f['get'](_0x502fe0));}}for(const _0x455de7 of _0x518d67){const _0x5a6b37=_0x1bd158['insertions'][_0x455de7],_0x2d98a3=this['_getBaseVids'](_0x1bd158['deletions'][_0x455de7]);let _0x15e2a3=0x0;for(const _0x2ee9e0 of _0x5a6b37){const _0x3e4d7d=this['_getVidAttributeName'](_0x2ee9e0),_0x13b357=_0x2ee9e0['item']['getAttribute'](_0x3e4d7d);if(!_0x40ee3e['has'](_0x13b357)&&!_0x36d154['has'](_0x13b357)){if(_0x24023c['has'](_0x13b357))_0x15e2a3++;else{if(_0x13b357!=_0x2d98a3[_0x15e2a3]){const _0x9deba1=_0x4e9f4f['get'](_0x13b357)||_0x4e9f4f['get'](_0x2d98a3[_0x15e2a3]);for(;_0x13b357!=_0x2d98a3[_0x15e2a3];)_0x24023c['has'](_0x2d98a3[_0x15e2a3])||(_0x36d154['set'](_0x2d98a3[_0x15e2a3],_0x9deba1),_0x4e9f4f['set'](_0x2d98a3[_0x15e2a3],_0x9deba1)),_0x15e2a3++;}_0x15e2a3++;}}}}for(const _0x2d503b of _0x518d67){const _0x1fbcf7=_0x1bd158['insertions'][_0x2d503b];for(const _0x568996 of _0x1fbcf7){const _0x24a9f2=this['_getVidAttributeName'](_0x568996),_0x1d442f=_0x568996['item']['getAttribute'](_0x24a9f2);if(_0x36d154['has'](_0x1d442f)){const _0x28cd17=_0x36d154['get'](_0x1d442f);_0x24023c['has'](_0x1d442f)||_0x24023c['set'](_0x1d442f,{..._0x28cd17}),_0x40ee3e['set'](_0x1d442f,{..._0x28cd17});}}}for(const _0x3c78da of _0x24023c['keys']())_0x3c78da>=this['_startingRevisionId']&&_0x24023c['delete'](_0x3c78da);const _0x5389fe=new Map();for(const _0x30a782 of _0x518d67){let _0x3c1eaa=_0x1bd158['insertions'][_0x30a782];for(const _0x1addb3 of _0x3c1eaa)if(_0x1addb3['item']['is']('element','tableCell')){const _0x300b6a=this['_getVidAttributeName'](_0x1addb3),_0x19f6b1=_0x1addb3['item']['getAttribute'](_0x300b6a);if(_0x40ee3e['has'](_0x19f6b1)){const _0x4384be=_0x1addb3['item']['parent']['parent']['getAttribute']('vid_start'),_0x4b93d1=_0x40ee3e['get'](_0x19f6b1),_0x496ec6=_0x5389fe['get'](_0x4384be)||{'users':new Set(),'aiSource':null};_0x496ec6['users']['add'](_0x4b93d1['userId']),_0x496ec6['aiSource']=_0x496ec6['aiSource']||_0x4b93d1['aiSource']||null,_0x5389fe['set'](_0x4384be,_0x496ec6);}}_0x3c1eaa=_0x1bd158['deletions'][_0x30a782];for(const _0x501d92 of _0x3c1eaa)if(_0x501d92['item']['is']('element','tableCell')){const _0x16ea4a=this['_getVidAttributeName'](_0x501d92),_0x17afc0=_0x501d92['item']['getAttribute'](_0x16ea4a);if(_0x24023c['has'](_0x17afc0)){const _0x2cdd0d=_0x501d92['item']['parent']['parent']['getAttribute']('vid_start'),_0x46a7bc=_0x24023c['get'](_0x17afc0),_0x414de0=_0x5389fe['get'](_0x2cdd0d)||{'users':new Set(),'aiSource':null};_0x414de0['users']['add'](_0x46a7bc['userId']),_0x414de0['aiSource']=_0x414de0['aiSource']||_0x46a7bc['aiSource']||null,_0x5389fe['set'](_0x2cdd0d,_0x414de0);}}for(const _0x391faf of _0x5389fe['keys']())(_0x40ee3e['has'](_0x391faf)||_0x24023c['has'](_0x391faf))&&_0x5389fe['delete'](_0x391faf);}for(const _0x114c4e of _0x518d67){const _0x47e259=_0x1bd158['insertions'][_0x114c4e];let _0x51cb5a=null,_0x2d21c7=null,_0x4c46a5=null;for(const _0x170342 of _0x47e259){const _0x1c5e24=this['_getVidAttributeName'](_0x170342),_0x35d51f=_0x170342['item']['getAttribute'](_0x1c5e24),_0x275e89=_0x5389fe['get'](_0x35d51f);if(_0x275e89&&'elementStart'==_0x170342['type']&&(_0x51cb5a=Array['from'](_0x275e89['users'])[0x0],_0x2d21c7=_0x275e89['aiSource'],_0x4c46a5=_0x170342['item']['getAttribute']('vid_end')),_0x51cb5a){const _0x4fe191=_0x2d21c7||_0x24023c['get'](_0x35d51f)?.['aiSource']||null,_0x100791=_0x2d21c7||_0x40ee3e['get'](_0x35d51f)?.['aiSource']||null;_0x24023c['set'](_0x35d51f,{'userId':_0x51cb5a,'aiSource':_0x4fe191}),_0x40ee3e['set'](_0x35d51f,{'userId':_0x51cb5a,'aiSource':_0x100791});}_0x35d51f==_0x4c46a5&&(_0x51cb5a=null,_0x4c46a5=null);}}const _0x16ba18={},_0x3aceab=new Set();for(const _0x501865 of _0x518d67){const _0x163e43=_0x5a1178['deletions'][_0x501865],_0x708316=_0x5a1178['insertions'][_0x501865];for(const {userId:_0x2f861c}of this['_touchedMarkers']['values']())null!==_0x2f861c&&_0x3aceab['add'](_0x2f861c);for(const {userId:_0x24757d}of this['_touchedRoots']['values']())null!==_0x24757d&&_0x3aceab['add'](_0x24757d);const _0x3578c0={};this['_markChanges'](_0x708316,_0x1bd158['insertions'][_0x501865],_0x40ee3e,'insertion',_0x3aceab,_0x3578c0),this['_markChanges'](_0x163e43,_0x1bd158['deletions'][_0x501865],_0x24023c,'deletion',_0x3aceab,_0x3578c0),this['_collectSuggestionAiSources'](_0x708316,_0x3578c0),this['_collectSuggestionAiSources'](_0x163e43,_0x3578c0),_0x16ba18[_0x501865]={'insertions':this['_prepareViewToSave'](_0x708316),'deletions':this['_prepareViewToSave'](_0x163e43),'attachChange':this['_touchedRoots']['get'](_0x501865)||null,'attributesBefore':_0x144f08(this['_baseRootsAttributes']['get'](_0x501865))||{},'attributesAfter':_0x144f08(this['_diffRootsAttributes']['get'](_0x501865)),'rootElementName':_0x5e64c6['get'](_0x501865),'aiSources':_0x3578c0};}const _0x20146b=Array['from'](_0x40ee3e['values']())['some'](_0x1e5429=>!(!_0x1e5429||!_0x1e5429['aiSource']))||Array['from'](_0x24023c['values']())['some'](_0x13a76f=>!(!_0x13a76f||!_0x13a76f['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x273210=>this['_aiTouchedMarkers']['has'](_0x273210));return{'diffData':_0x16ba18,'authorsIds':Array['from'](_0x3aceab),'hasAIChanges':_0x20146b};}_collectSuggestionAiSources(_0x1ad9fa,_0x2fffef){const _0x222ee4=_0x1ad9fa['markers'];for(const _0x1b5968 of _0x222ee4['keys']()){if(!_0x1b5968['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x1b5968))continue;const _0x13c1ba=this['_aiTouchedMarkers']['get'](_0x1b5968);_0x13c1ba&&(_0x2fffef[_0x1b5968]=_0x13c1ba);}}_processRootBeforeSave(_0x21c2df){for(const [,_0x172d6b]of _0x21c2df['markers']){const _0x402a07=_0x172d6b['start']['getAncestors']()['filter'](_0x49b13e=>'tableCell'==_0x49b13e['name']);for(const _0x5c21c0 of _0x402a07)0x1==_0x5c21c0['childCount']&&_0x5c21c0['getChild'](0x0)['is']('element','paragraph')&&_0x5c21c0['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x34b23f){this['_processRootBeforeSave'](_0x34b23f);const _0x420399=this['editor']['data']['toView'](_0x34b23f,{}),_0x314e8b=Array['from'](_0x420399['getChildren']())['map'](_0xfc2f8d=>this['_getViewJson'](_0xfc2f8d));return JSON['stringify'](_0x314e8b);}_getViewJson(_0x3db8c1){if(_0x3db8c1['is']('$text'))return _0x3db8c1['data'];{const _0x1e0d0c=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5691a0=_0x3db8c1,_0x3fc017=this['editor']['data']['htmlProcessor']['domConverter'],_0x4b3b9e={'type':_0x1e0d0c['_getTypeCharForViewElement'](_0x5691a0),'name':_0x5691a0['name'],'attributes':Array['from'](_0x5691a0['getAttributes']()),'children':Array['from'](_0x5691a0['getChildren']())['map'](_0x58b8c3=>this['_getViewJson'](_0x58b8c3))};if(_0x3db8c1['is']('uiElement')&&'$comment'!=_0x3db8c1['name']){const _0x2bead4=_0x3db8c1['render'](_0x3fc017['domDocument'],_0x3fc017);_0x4b3b9e['children']['push'](_0x2bead4['outerHTML']);}else{if(_0x3db8c1['is']('rawElement')){const _0x5ae06d=_0x3fc017['domDocument']['createElement'](_0x5691a0['name']);_0x3db8c1['render'](_0x5ae06d,_0x3fc017),_0x4b3b9e['children']['push'](_0x5ae06d['innerHTML']);}}const _0x23d490=Array['from'](_0x5691a0['getCustomProperties']());_0x23d490['length']>0x0&&(_0x4b3b9e['customProperties']=_0x23d490);const _0x315294=_0x5691a0['getFillerOffset']();return null!==_0x315294&&(_0x4b3b9e['fillerOffset']=_0x315294),_0x4b3b9e;}}['_markChanges'](_0x5e8e46,_0x237007,_0x31a179,_0x6de0f8,_0x48875f,_0x3863bf){let _0x3f8558=null,_0x23baaa=null,_0x5cccca=0x0;const _0x84e60b=this['editor']['model'];for(let _0x143651=0x0;_0x143651<_0x237007['length'];_0x143651++){const _0x485e5b=this['_getVidAttributeName'](_0x237007[_0x143651]),_0x137fd3=_0x237007[_0x143651]['item']['getAttribute'](_0x485e5b),_0x448ec3=_0x31a179['get'](_0x137fd3),_0x21fb0f=_0x143651==_0x237007['length']-0x1;!_0x3f8558&&_0x448ec3&&(_0x3f8558=_0x448ec3,_0x23baaa=_0x237007[_0x143651]);const _0x45e9de=!!_0x3f8558&&!!_0x448ec3&&_0x448ec3['userId']!=_0x3f8558['userId'],_0x5c5d07=!!_0x3f8558&&!!_0x448ec3&&_0x448ec3['aiSource']!=_0x3f8558['aiSource'];_0x3f8558&&(!_0x448ec3||_0x45e9de||_0x5c5d07)&&(_0x138ff5(_0x448ec3,Ot(_0x23baaa,_0x5e8e46,_0x84e60b),Ot(_0x237007[_0x143651],_0x5e8e46,_0x84e60b)),_0x3f8558=_0x448ec3||null,_0x23baaa=_0x448ec3?_0x237007[_0x143651]:null),_0x3f8558&&_0x21fb0f&&_0x138ff5(_0x448ec3,Ot(_0x23baaa,_0x5e8e46,_0x84e60b),Ct(_0x237007[_0x143651],_0x5e8e46,_0x84e60b));}function _0x138ff5(_0x10b518,_0x2ee86f,_0x5d54e8){const _0x42c349=_0x3f8558['userId'],_0x4c8d8a=_0x3f8558['aiSource'],_0x3ecfb3='revision:'+_0x6de0f8+':'+_0x42c349+':'+_0x5cccca++,_0xd56f84=_0x84e60b['createRange'](_0x2ee86f,_0x5d54e8);_0x5e8e46['markers']['set'](_0x3ecfb3,_0xd56f84),_0x4c8d8a&&(_0x3863bf[_0x3ecfb3]=_0x4c8d8a),null!==_0x42c349&&_0x48875f['add'](_0x42c349);}}_getVidAttributeName(_0x5ca80b){switch(_0x5ca80b['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x44c101){const _0x86551a=this['_idsRoots']['get'](_0x44c101['position']['root']['rootName']),_0x5918d8=_0x289722(_0x44c101['position'],_0x86551a),_0x767c79=null===_0x44c101['_authorId']?null:_0x44c101['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d3b68=_0x44c101['_aiSource']||null,_0x183946=_0x5918d8['parent'],_0x5a5f74=this['_revisionId'],_0x3a33a6=[];for(const _0x3b9c47 of _0x44c101['nodes'])if(_0x3b9c47['is']('element'))_0x3a33a6['push'](this['_makeIdsRoot'](_0x3b9c47));else{for(let _0x13dadd=0x0;_0x13dadd<_0x3b9c47['offsetSize'];_0x13dadd++)_0x3a33a6['push'](new _0x28c730('$text',{'vid':this['_revisionId']++}));}const _0xb3c3f8=this['_revisionId'];for(let _0x52387e=_0x5a5f74;_0x52387e<_0xb3c3f8;_0x52387e++)this['_touched']['set'](_0x52387e,{'userId':_0x767c79,'aiSource':_0x4d3b68});_0x183946['_insertChild'](_0x5918d8['offset'],_0x3a33a6);}_setTouched(_0x2ee003,_0x209544,_0x39ac0f){this['_touched']['set'](_0x2ee003,{'userId':_0x209544,'aiSource':_0x39ac0f||this['_touched']['get'](_0x2ee003)?.['aiSource']||null});}_handleMoveOperation(_0x2b49f0){(_0x2b49f0=this['_cloneOperation'](_0x2b49f0,this['_idsRoots']))['_execute']();const _0x16a2d6=null===_0x2b49f0['_authorId']?null:_0x2b49f0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x116a01=_0x2b49f0['_aiSource']||null,_0x1e8b83=_0x2b49f0['getMovedRangeStart'](),_0x4f7b4c=_0x1e8b83['parent'],_0x46c142=_0x1e8b83['offset'],_0xbf0a88=(_0x1a8488,_0x109f9e,_0x5a8760)=>{for(let _0x2065d5=_0x109f9e;_0x2065d5<_0x5a8760;_0x2065d5++){const _0x1040c1=_0x1a8488['getChild'](_0x2065d5);_0x1040c1['is']('element','$text')?this['_setTouched'](_0x1040c1['getAttribute']('vid'),_0x16a2d6,_0x116a01):(this['_setTouched'](_0x1040c1['getAttribute']('vid_start'),_0x16a2d6,_0x116a01),_0xbf0a88(_0x1040c1,0x0,_0x1040c1['childCount']),this['_setTouched'](_0x1040c1['getAttribute']('vid_end'),_0x16a2d6,_0x116a01));}};_0xbf0a88(_0x4f7b4c,_0x46c142,_0x46c142+_0x2b49f0['howMany']);}_handleMergeOperation(_0x4e5647){const _0x5c4ec2=null===(_0x4e5647=this['_cloneOperation'](_0x4e5647,this['_idsRoots']))['_authorId']?null:_0x4e5647['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4a8bbf=_0x4e5647['_aiSource']||null,_0x65a552=_0x4e5647['targetPosition']['parent'],_0x854fe5=_0x4e5647['sourcePosition']['parent'],_0x4e3b6f=_0x65a552['getAttribute']('vid_end'),_0x4dee27=_0x854fe5['getAttribute']('vid_start');_0x65a552['_setAttribute']('vid_end',_0x854fe5['getAttribute']('vid_end')),_0x854fe5['_setAttribute']('vid_end',_0x4e3b6f),this['_setTouched'](_0x4dee27,_0x5c4ec2,_0x4a8bbf),this['_setTouched'](_0x4e3b6f,_0x5c4ec2,_0x4a8bbf),_0x4e5647['_execute']();}_handleSplitOperation(_0x26eda0){const _0x249258=null===(_0x26eda0=this['_cloneOperation'](_0x26eda0,this['_idsRoots']))['_authorId']?null:_0x26eda0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x48a760=_0x26eda0['_aiSource']||null,_0x242121=_0x26eda0['graveyardPosition'],_0x45f6d2=_0x26eda0['splitPosition']['parent'];_0x26eda0['_execute']();const _0x4a74cf=_0x45f6d2['getAttribute']('vid_end'),_0x371e07=_0x26eda0['insertionPosition']['nodeAfter'];if(_0x242121){const _0x299327=_0x371e07['getAttribute']('vid_end'),_0x548501=_0x45f6d2['getAttribute']('vid_end');_0x45f6d2['_setAttribute']('vid_end',_0x299327),_0x371e07['_setAttribute']('vid_end',_0x548501),this['_setTouched'](_0x45f6d2['getAttribute']('vid_end'),_0x249258,_0x48a760),this['_setTouched'](_0x371e07['getAttribute']('vid_start'),_0x249258,_0x48a760);}else{const _0x177831=this['_revisionId']++,_0x583e05=this['_revisionId']++;_0x45f6d2['_setAttribute']('vid_end',_0x177831),_0x371e07['_setAttribute']('vid_start',_0x583e05),_0x371e07['_setAttribute']('vid_end',_0x4a74cf),this['_setTouched'](_0x177831,_0x249258,_0x48a760),this['_setTouched'](_0x583e05,_0x249258,_0x48a760);}}_handleMarkerOperation(_0x5e4bad){if(!_0x5e4bad['affectsData'])return;const _0x255efd=(_0x5e4bad=this['_cloneOperation'](_0x5e4bad,this['_diffRoots']))['oldRange']?_0x5e4bad['oldRange']['root']:null,_0x65a1aa=_0x5e4bad['newRange']?_0x5e4bad['newRange']['root']:null;_0x255efd&&this['_markers']['delete'](_0x5e4bad['name']),_0x65a1aa&&this['_markers']['set'](_0x5e4bad['name'],_0x5e4bad['newRange']['clone']());const _0x1c5236=null===_0x5e4bad['_authorId']?null:_0x5e4bad['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x396d98=_0x5e4bad['name'];if(_0x5e4bad['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x396d98,_0x5e4bad['_aiSource']),!this['_touchedMarkers']['has'](_0x396d98))return void this['_touchedMarkers']['set'](_0x396d98,{'range':_0x5e4bad['oldRange'],'userId':_0x1c5236});const _0x3f9c74=this['_touchedMarkers']['get'](_0x396d98),_0x1d78b6=_0x3f9c74['range'],_0x3aec5b=_0x5e4bad['newRange'];null==_0x1d78b6&&null==_0x3aec5b||_0x1d78b6&&_0x3aec5b&&_0x1d78b6['isEqual'](_0x3aec5b)?this['_touchedMarkers']['delete'](_0x5e4bad['name']):_0x3f9c74['userId']=_0x1c5236;}_handleRootOperation(_0x30befd,_0x38e144){this['_diffRoots']['has'](_0x30befd['rootName'])?this['_diffRoots']['get'](_0x30befd['rootName'])['_isAttached']=_0x30befd['isAdd']:(this['_diffRoots']['set'](_0x30befd['rootName'],Et(_0x30befd['rootName'],_0x30befd['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x30befd['rootName'],{}),_0x38e144&&this['_idsRoots']['set'](_0x30befd['rootName'],Et(_0x30befd['rootName'],_0x30befd['elementName'],!0x0)));const _0x2cd72a=null===_0x30befd['_authorId']?null:_0x30befd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2772bb=this['_touchedRoots']['get'](_0x30befd['rootName']);_0x2772bb&&_0x2772bb['userId']===_0x2cd72a?this['_touchedRoots']['delete'](_0x30befd['rootName']):this['_touchedRoots']['set'](_0x30befd['rootName'],{'userId':_0x2cd72a,'isAttached':_0x30befd['isAdd']});}_handleRootAttributeOperation(_0x14a676){const _0x2f7e6d=this['_diffRootsAttributes']['get'](_0x14a676['root']['rootName']);null===_0x14a676['newValue']?delete _0x2f7e6d[_0x14a676['key']]:_0x2f7e6d[_0x14a676['key']]=_0x14a676['newValue'];}};function St(_0x5990bc){const _0x1f9605=Et(_0x5990bc['rootName'],_0x5990bc['name'],_0x5990bc['isAttached']());for(const _0x5521a2 of _0x5990bc['getChildren']()){const _0x4da94c=_0x5521a2['_clone'](!0x0);_0x1f9605['_appendChild'](_0x4da94c);}return _0x1f9605;}function Et(_0x2b6500,_0x1f8ddf,_0x52b115=!0x0){const _0x402f05=new _0x4acbd6();return _0x402f05['rootName']=_0x2b6500,_0x402f05['name']=_0x1f8ddf,_0x402f05['_isAttached']=_0x52b115,_0x402f05['isAttached']=()=>_0x402f05['_isAttached'],_0x402f05;}function Ot(_0x1a7667,_0x517b5b,_0x58e493){const _0x116357='elementEnd'==_0x1a7667['type']?_0x58e493['createPositionAt'](_0x1a7667['item'],'end'):_0x58e493['createPositionBefore'](_0x1a7667['item']);return _0x58e493['createPositionFromPath'](_0x517b5b,_0x116357['path'],_0x116357['stickiness']);}function Ct(_0x575c94,_0x10db76,_0x36944a){const _0x57008b='elementStart'==_0x575c94['type']?_0x36944a['createPositionAt'](_0x575c94['item'],0x0):_0x36944a['createPositionAfter'](_0x575c94['item']);return _0x36944a['createPositionFromPath'](_0x10db76,_0x57008b['path'],_0x57008b['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0xe40d6(dt);var xt=class extends Nt{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x48e27c,_0x42479c){super(_0x48e27c),this['focusTracker']=new _0xa64bfb(),this['keystrokes']=new _0x2d0e3c(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x42479c),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'](),_t({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5e8922=_0xc65730=>_0xc65730['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5e8922),this['keystrokes']['set']('arrowleft',_0x5e8922),this['keystrokes']['set']('arrowup',_0x5e8922),this['keystrokes']['set']('arrowdown',_0x5e8922);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2b3953){this['revisionNameInputView']['fieldView']['element']['value']=_0x2b3953['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x53e080){const _0x12494c=new it(this['locale'],gt),_0x64c3d3=_0x12494c['fieldView'];_0x64c3d3['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1c6630=kt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x53e080&&(_0x1c6630+='\x20('+kt(this['locale'],'optional')+')'),(_0x12494c['label']=_0x1c6630,_0x64c3d3['on']('input',()=>{this['revisionNameInputValue']=_0x64c3d3['element']['value']['trim']();}),_0x12494c);}},Dt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At];}['_saveRevisionFormView'];init(){const _0x28dd22=this['editor'],_0x58c956=_0x28dd22['plugins']['get']('RevisionTracker');_0x28dd22['ui']['componentFactory']['add']('revisionHistory',_0x2b1ae8=>{const _0x50a31d=vt(_0x2b1ae8),_0x46b497=_0x50a31d['panelView']['children'],_0x2ec094=new st(_0x2b1ae8),_0x3095f1=new et(_0x2b1ae8),_0x1f34a0=this['_createSaveRevisionButton'](_0xfa6b1),_0x19bb17=new et(_0x2b1ae8),_0x4abb93=this['_createOpenRevisionButton'](_0xfa6b1);return _0x50a31d['bind']('isEnabled')['to'](_0x58c956,'isReady',_0x58c956,'isEnabled',_0x28dd22,'isReadOnly',(_0x170d25,_0x2fab05,_0x11a6e0)=>_0x170d25&&_0x2fab05&&!_0x11a6e0),_0x50a31d['buttonView']['set']({'icon':_0x1f6913,'label':kt(_0x2b1ae8,'Revision\x20history'),'tooltip':!0x0}),_0x1f34a0['set']({'withText':!0x0,'role':'menuitem'}),_0x4abb93['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x4abb93,'execute',()=>{_0x50a31d['isOpen']=!0x1,_0x28dd22['editing']['view']['focus']();},{'priority':'low'}),_0x3095f1['children']['add'](_0x1f34a0),_0x19bb17['children']['add'](_0x4abb93),_0x2ec094['role']='menu',_0x2ec094['items']['addMany']([_0x3095f1,_0x19bb17]),_0x46b497['add'](_0x2ec094),_0x50a31d;}),_0x28dd22['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x595fd2=this['editor'],_0x4f6144=_0x595fd2['locale'],_0x1b5841=_0x595fd2['plugins']['get']('RevisionTracker'),_0xea95c7=new at(_0x4f6144),_0xebc3e0=new rt(_0x4f6144);_0xea95c7['bind']('isEnabled')['to'](_0x1b5841,'isReady',_0x1b5841,'isEnabled',_0x595fd2,'isReadOnly',(_0x1333fb,_0x3aaa5d,_0x3688fc)=>_0x1333fb&&_0x3aaa5d&&!_0x3688fc),_0xea95c7['buttonView']['set']({'icon':_0x1f6913,'label':kt(_0x4f6144,'Revision\x20history')});const _0x1f7a1f=new ot(_0x4f6144,_0xea95c7),_0x260dbb=this['_createSaveRevisionButton'](nt);_0x260dbb['delegate']('execute')['to'](_0xea95c7),_0x1f7a1f['children']['add'](_0x260dbb),_0xebc3e0['items']['add'](_0x1f7a1f);const _0x15031e=new ot(_0x4f6144,_0xea95c7),_0x50ca60=this['_createOpenRevisionButton'](nt);return _0x50ca60['delegate']('execute')['to'](_0xea95c7),_0x15031e['children']['add'](_0x50ca60),_0xebc3e0['items']['add'](_0x15031e),_0xea95c7['panelView']['children']['add'](_0xebc3e0),_0xea95c7;}_createSaveRevisionButton(_0xbd3b75){const _0x16504e=this['editor'],_0x36c686=_0x16504e['plugins']['get']('RevisionTracker'),_0x5053e6=new _0xbd3b75(_0x16504e['locale']);return _0x5053e6['set']({'label':kt(_0x16504e['locale'],'Save\x20current\x20revision')}),_0x5053e6['bind']('isEnabled')['to'](_0x36c686,'isReady',_0x36c686,'isEnabled',_0x16504e,'isReadOnly',(_0x278d8e,_0x1d44cd,_0x321189)=>_0x278d8e&&_0x1d44cd&&!_0x321189),this['listenTo'](_0x5053e6,'execute',()=>{this['_showDialog']();}),_0x5053e6;}_createOpenRevisionButton(_0x569e47){const _0x17b560=this['editor'],_0x488efd=_0x17b560['plugins']['get']('RevisionTracker'),_0x16ef7a=new _0x569e47(_0x17b560['locale']);return _0x16ef7a['set']({'label':kt(_0x17b560['locale'],'Open\x20revision\x20history')}),_0x16ef7a['bind']('isEnabled')['to'](_0x488efd,'isReady',_0x17b560,'isReadOnly',(_0x4091ee,_0x547f27)=>_0x4091ee&&!_0x547f27),this['listenTo'](_0x16ef7a,'execute',()=>{_0x17b560['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x16ef7a;}['_showDialog'](){const _0x9ff3e0=this['editor'],_0x218e28=_0x9ff3e0['locale'],_0x4626d4=_0x9ff3e0['plugins']['get']('Dialog'),_0x54b65a=_0x9ff3e0['plugins']['get']('RevisionTracker');function _0x76851d(_0x2f43c0){_0x9ff3e0['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2f43c0['revisionName']?_0x2f43c0['revisionNameInputView']['errorText']=kt(_0x218e28,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x9ff3e0['plugins']['get'](At)['saveRevision']({'name':_0x2f43c0['revisionName']}),_0x4626d4['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x76851d(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x4626d4['show']({'id':'revisionSave','title':kt(_0x218e28,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':kt(_0x9ff3e0['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x4626d4['hide']()},{'label':kt(_0x9ff3e0['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4c8ab4){_0x4c8ab4['bind']('isEnabled')['to'](_0x54b65a,'isReady',_0x54b65a,'isEnabled',_0x9ff3e0,'isReadOnly',(_0xe68325,_0x276723,_0x324379)=>_0xe68325&&_0x276723&&!_0x324379);},'onExecute':()=>_0x76851d(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x204204=this['editor'],_0x6b4c82=_0x204204['locale'];this['_saveRevisionFormView']=new xt(_0x6b4c82,_0x204204['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Vt=class extends dt{['changeId'];['_model'];constructor(_0x3b78d1,_0x2942db,_0x310a23=!0x1){super(_0x3b78d1),this['_model']=_0x2942db,this['changeId']=_0x2942db['id'];const _0x322c11=this['bindTemplate'],_0x156d3a=_0x310a23&&!!_0x2942db['data']['aiSource'],_0x5ee6b0=_0x156d3a?this['_createAiIconView'](_0x3b78d1):null;this['set']('type',_0x2942db['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x322c11['to']('type',_0x54399f=>'ck-revision-change__'+_0x54399f),..._0x156d3a?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x156d3a?[this['_createAiDescriptionView'](_0x3b78d1,_0x2942db),_0x5ee6b0]:this['_getDescriptionChildren'](_0x3b78d1,_0x2942db)}]});}_getDescriptionChildren(_0x4947d7,_0x3e6953){let _0x865813='Removed\x20by';return _0x3e6953['data']['isSuggestion']?_0x865813='Suggested\x20by':'add'==_0x3e6953['type']&&(_0x865813='Added\x20by'),[this['_createLabel'](kt(_0x4947d7,_0x865813)),{'text':'\x20'+_0x3e6953['author']['name']}];}_createAiDescriptionView(_0x2507d7,_0x22d18b){let _0x51e069='AI_SOURCE_REMOVED_BY';_0x22d18b['data']['isSuggestion']?_0x51e069='AI_SOURCE_SUGGESTED_BY':'add'==_0x22d18b['type']&&(_0x51e069='AI_SOURCE_ADDED_BY');const _0x42f54b=new dt(_0x2507d7);return _0x42f54b['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0x42f54b['render'](),_0x42f54b['element']['innerHTML']=_0xe4f10(kt(_0x2507d7,_0x51e069,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+kt(_0x2507d7,'AI_SOURCE_AI')+'</span>'])),_0x42f54b['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x22d18b['author']['name'],_0x42f54b;}_createLabel(_0x2d6dec){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x2d6dec}]};}_createAiIconView(_0x1d4422){const _0x9c8f18=new _0x4c1208();return _0x9c8f18['content']=_0x2d837c,_0x9c8f18['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':kt(_0x1d4422,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x9c8f18;}['focus'](){this['element']['focus']();}};const Tt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x57c0bb();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x5bbf4d){super(),this['id']=_0x5bbf4d['id']||_0x5289a7(),this['author']=_0x5bbf4d['author'],this['type']=_0x5bbf4d['type'],this['data']=_0x5bbf4d['data']||{},this['rootName']=_0x5bbf4d['rootName'],this['set']('createdAt',_0x5bbf4d['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1354ab,_0x330bd8){this['newRevisionId']=_0x1354ab,this['oldRevisionId']=_0x330bd8,this['changes']=new _0x520f62();}_setChanges(_0xd948e7){for(const _0x2e1c23 of _0xd948e7)this['changes']['add'](_0x2e1c23);}},Pt=class extends _0x3ccb16{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x312567,_0x300371,bt,Rt];}constructor(_0x4f7b14){super(_0x4f7b14),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',(_0x6ab1ff,_0x393d7a,_0x181072)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x45c23b=>{for(const _0x4d611f of this['editor']['editing']['view']['document']['roots'])_0x181072?_0x45c23b['removeClass']('ck-editor__editable__overlay',_0x4d611f):_0x45c23b['addClass']('ck-editor__editable__overlay',_0x4d611f);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x57b56f=>null!==_0x57b56f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x42ade3,_0x1e2a59,_0x4bb0c2)=>_0x42ade3&&_0x4bb0c2?_0x1e2a59['changes']['getIndex'](_0x4bb0c2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x44d005,_0x599bcf)=>_0x44d005?_0x599bcf['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x300371),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x416e0d=this['editor'],_0x2b8094=new $t(_0x416e0d,{'direction':'backward'}),_0x466b55=new $t(_0x416e0d,{'direction':'forward'});_0x416e0d['commands']['add']('showPreviousChange',_0x2b8094),_0x416e0d['commands']['add']('showNextChange',_0x466b55),_0x416e0d['commands']['add']('restoreRevision',new Ft(_0x416e0d)),this['on']('change:numberOfChanges',()=>{_0x2b8094['refresh'](),_0x466b55['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x416e0d['enableReadOnlyMode']('revision-viewer'),_0x416e0d['plugins']['has']('WidgetToolbarRepository')&&_0x416e0d['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x12b329){return await this['_utils']['loadRevisionData'](_0x12b329,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x12b329);}async getRevisionRootsAttributes(_0x39eed8){return await this['_utils']['loadRevisionData'](_0x39eed8,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x39eed8);}async['compare'](_0x3545d5,_0x3632c8,_0x3eb166=!0x1){if(!this['isEnabled'])return;const _0x377f51=this['diff'],_0x5eae7d=this['repository'],_0x14340f='string'==typeof _0x3545d5?_0x5eae7d['getRevision'](_0x3545d5):_0x3545d5,_0x5a1b31='string'==typeof _0x3632c8?_0x5eae7d['getRevision'](_0x3632c8):_0x3632c8,_0x1c6f4f=_0x14340f['id'],_0x79667b=_0x5a1b31?_0x5a1b31['id']:null;if(!_0x3eb166&&this['diff']&&this['diff']['newRevisionId']===_0x1c6f4f&&this['diff']['oldRevisionId']===_0x79667b)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x1c6f4f,_0x79667b);const _0x3bdfbf=this['_getRevisionsRange'](_0x14340f,_0x5a1b31,!0x0)['map'](_0x2a51b7=>this['_utils']['loadRevisionData'](_0x2a51b7,this['adapter']));return _0x3bdfbf['push'](new Promise(_0x2b36af=>{setTimeout(_0x2b36af,0x14);})),Promise['all'](_0x3bdfbf)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2191a0=this['_getDiff'](_0x1c6f4f,_0x79667b);this['_cleanUpCommentMarkers'](_0x2191a0);for(const _0x2097c4 of _0x2191a0['changes'])this['_changeIdToChange']['set'](_0x2097c4['id'],_0x2097c4);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5cf956=>{for(const _0x135b9b of this['editor']['model']['document']['getRootNames']())_0x5cf956['detachRoot'](_0x135b9b);for(const _0x10d770 of Object['keys'](_0x2191a0['model'])){const _0xa1893a=_0x2191a0['model'][_0x10d770]['name'],_0x478667=_0x5cf956['addRoot'](_0x10d770,_0xa1893a);for(const _0x4f0107 of Object['keys'](_0x2191a0['attributes'][_0x10d770]))_0x5cf956['setAttribute'](_0x4f0107,_0x2191a0['attributes'][_0x10d770][_0x4f0107],_0x478667);_0x5cf956['insert'](_0x2191a0['model'][_0x10d770],_0x478667,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2191a0['changes'])),this['isReady']=!0x0;})['catch'](_0x1598f6=>{console['error'](_0x1598f6),this['_cleanUp'](),_0x377f51&&(this['diff']=_0x377f51),this['isReady']=!0x0;});}addRevisionData(_0x579f5e,_0xaca35a){const _0x350fb9=this['repository']['createRevision'](_0x579f5e);return _0x350fb9['on']('_update',(_0x33cd96,_0x39fae6,_0x3db29e)=>_0xaca35a(_0x39fae6,_0x3db29e,_0x350fb9)),this['repository']['addRevision'](_0x350fb9),_0x350fb9;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3f4478=>{for(const _0x426053 of this['editor']['model']['document']['getRootNames']())_0x3f4478['detachRoot'](_0x426053);});}_cleanUpCommentMarkers(_0x7c73f7){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x5ddc77=this['_getVisibleCommentThreadIds']();for(const _0xa78cf9 of Object['values'](_0x7c73f7['model']))for(const _0x1ce0a7 of Array['from'](_0xa78cf9['markers']['keys']()))_0x1ce0a7['startsWith']('revision-comment:')&&!_0x5ddc77['has'](Ut(_0x1ce0a7))&&_0xa78cf9['markers']['delete'](_0x1ce0a7);}_sortAndFilterDiffChanges(_0x9bc8d9){const _0x3ed016=[],_0xa2c906=new Map();for(const _0x279104 of this['editor']['model']['document']['getRootNames']()){const _0x271991=this['editor']['editing']['view']['getDomRoot'](_0x279104);if(!_0x271991)continue;const _0x17c5df=_0x271991['getClientRects']()['item'](0x0);_0x17c5df&&(_0x3ed016['push'](_0x279104),_0xa2c906['set'](_0x279104,_0x17c5df));}return _0x3ed016['sort']((_0x3eece9,_0x3bdfd0)=>{const _0x1e843d=_0xa2c906['get'](_0x3eece9),_0x13c10e=_0xa2c906['get'](_0x3bdfd0);return _0x1e843d['y']-_0x13c10e['y']||_0x1e843d['x']-_0x13c10e['x'];}),(_0x9bc8d9=_0x9bc8d9['filter'](_0xe9ffa1=>_0x3ed016['includes'](_0xe9ffa1['rootName'])))['sort']((_0x53c7f0,_0x2c0f2a)=>_0x3ed016['indexOf'](_0x53c7f0['rootName'])-_0x3ed016['indexOf'](_0x2c0f2a['rootName'])),_0x9bc8d9;}['_makeTape'](_0x5b387b,_0x197dc2={}){const _0x4224f5=Array['from'](_0x5b387b['markers'])['filter'](([_0x1831bb,_0x1c1bbc])=>_0x1831bb['startsWith']('revision:')&&!_0x1c1bbc['isCollapsed']),_0x53fb94=Array['from'](this['editor']['model']['createRangeIn'](_0x5b387b)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x4224f5['length'])for(const _0x540970 of _0x53fb94){const [_0xae4fe8,_0x2d22f9]=_0x4224f5[0x0],[,_0x941cba,_0x226aa8]=_0xae4fe8['split'](':'),_0x34aa19=_0x197dc2[_0xae4fe8]||null;if(_0x2d22f9['end']['isEqual'](_0x540970['nextPosition'])&&_0x4224f5['shift'](),(_0x540970['previousPosition']['isEqual'](_0x2d22f9['start'])||_0x540970['previousPosition']['isAfter'](_0x2d22f9['start']))&&('insertion'==_0x941cba?_0x540970['isAdded']={'userId':_0x226aa8,'aiSource':_0x34aa19}:'deletion'==_0x941cba&&(_0x540970['isRemoved']={'userId':_0x226aa8,'aiSource':_0x34aa19})),0x0==_0x4224f5['length'])break;}return _0x53fb94;}_refreshStartEndIndex(_0xd88482){const _0x30bbd6=new Map();for(let _0x3d5c81=0x0;_0x3d5c81<_0xd88482['length'];_0x3d5c81++)'text'===_0xd88482[_0x3d5c81]['type']?(_0xd88482[_0x3d5c81]['item']['startIndex']=_0x3d5c81,_0xd88482[_0x3d5c81]['item']['endIndex']=_0x3d5c81):('elementStart'===_0xd88482[_0x3d5c81]['type']?_0xd88482[_0x3d5c81]['item']['startIndex']=_0x3d5c81:'elementEnd'===_0xd88482[_0x3d5c81]['type']&&(_0xd88482[_0x3d5c81]['item']['endIndex']=_0x3d5c81),_0x30bbd6['set'](_0xd88482[_0x3d5c81]['id'],_0x3d5c81));for(const _0xa25a3e of _0x30bbd6['values']())'elementStart'===_0xd88482[_0xa25a3e]['type']?_0xd88482[_0xa25a3e]['item']['endIndex']=_0x30bbd6['get'](_0xd88482[_0xa25a3e]['pairId']):'elementEnd'===_0xd88482[_0xa25a3e]['type']&&(_0xd88482[_0xa25a3e]['item']['startIndex']=_0x30bbd6['get'](_0xd88482[_0xa25a3e]['pairId']));}['_processTape'](_0x2b9983){for(let _0x15bbd2=0x0;_0x15bbd2<_0x2b9983['length'];_0x15bbd2++){if('elementStart'===_0x2b9983[_0x15bbd2]['type'])_0x2b9983[_0x15bbd2]['item']['startIndex']=_0x15bbd2;else{if('elementEnd'===_0x2b9983[_0x15bbd2]['type']){_0x2b9983[_0x15bbd2]['item']['endIndex']=_0x15bbd2;const _0x7282a=_0x2b9983[_0x15bbd2]['item']['startIndex'];_0x2b9983[_0x7282a]['pairId']=_0x2b9983[_0x15bbd2]['id'],_0x2b9983[_0x15bbd2]['pairId']=_0x2b9983[_0x7282a]['id'];}else _0x2b9983[_0x15bbd2]['item']['startIndex']=_0x15bbd2,_0x2b9983[_0x15bbd2]['item']['endIndex']=_0x15bbd2,_0x2b9983[_0x15bbd2]['pairId']=null;}_0x2b9983[_0x15bbd2]['markersStart']||(_0x2b9983[_0x15bbd2]['markersStart']=[],_0x2b9983[_0x15bbd2]['markersEnd']=[]);}}_markInsertions(_0x4a92e7,_0x4f4162){const _0x214c30=_0x4a92e7['filter'](_0x40834f=>!_0x40834f['isAdded']);for(let _0x81d4b7=0x0;_0x81d4b7<_0x4f4162['length'];_0x81d4b7++)_0x4f4162[_0x81d4b7]['isAdded']&&(_0x214c30[_0x81d4b7]['isAdded']=_0x4f4162[_0x81d4b7]['isAdded']);}_getDiff(_0x1e8c3c,_0x28586d=null){const _0x200fa7=this['repository']['getRevision'](_0x1e8c3c),_0x21a9b2=_0x28586d?this['repository']['getRevision'](_0x28586d):null,_0xf84dbd=this['_getRevisionsRange'](_0x200fa7,_0x21a9b2),_0x4d59fa=_0xf84dbd[_0xf84dbd['length']-0x1],_0x15c9b4=new Map(),_0x1b4bc4={'model':{},'attributes':{},'changes':[]},_0x5304a4=new Set(),_0x1cadd5=new Map();for(let _0x2f967f=_0xf84dbd['length']-0x1;_0x2f967f>=0x0;_0x2f967f--){const _0x5181ec=_0xf84dbd[_0x2f967f];for(const _0x102f0f of Object['keys'](_0x5181ec['diffData']))if(_0x5181ec['diffData'][_0x102f0f]['attachChange']){const _0x29473f=_0x5181ec['diffData'][_0x102f0f]['attachChange'];_0x29473f['isAttached']?(_0x5304a4['add'](_0x102f0f),_0x1cadd5['has'](_0x102f0f)&&_0x1cadd5['get'](_0x102f0f)['userId']==_0x29473f['userId']?_0x1cadd5['delete'](_0x102f0f):_0x1cadd5['set'](_0x102f0f,_0x29473f)):_0x1cadd5['has'](_0x102f0f)?(_0x5304a4['delete'](_0x102f0f),_0x1cadd5['delete'](_0x102f0f)):(_0x5304a4['add'](_0x102f0f),_0x1cadd5['set'](_0x102f0f,_0x29473f));}else _0x5304a4['add'](_0x102f0f);}for(const _0x1edd16 of _0x5304a4){const _0x3a2cc1=_0x1cadd5['has'](_0x1edd16)&&!_0x1cadd5['get'](_0x1edd16)['isAttached'];let _0x21d8ef=_0x3a2cc1?_0xf84dbd['length']-0x1:0x0;const _0x5dcafd=_0x3a2cc1?-0x1:0x1;for(;_0xf84dbd[_0x21d8ef];){const _0x582105=_0xf84dbd[_0x21d8ef];if(_0x582105['diffData'][_0x1edd16]){const _0x51720b=_0x3a2cc1?_0x582105['diffData'][_0x1edd16]['attributesBefore']:_0x582105['diffData'][_0x1edd16]['attributesAfter'];_0x1b4bc4['attributes'][_0x1edd16]=_0x51720b?_0x144f08(_0x51720b):{};break;}_0x21d8ef+=_0x5dcafd;}}for(const _0x9a5fd9 of _0xf84dbd){_0x9a5fd9['model']={};for(const _0x566785 of _0x9a5fd9['authors'])_0x15c9b4['set'](_0x566785['id'],_0x566785);for(const _0x1c1475 of _0x5304a4){const _0x32958b=_0x9a5fd9['diffData'][_0x1c1475]?_0x9a5fd9['diffData'][_0x1c1475]['insertions']:'[]',_0x47fc86=_0x9a5fd9['diffData'][_0x1c1475]?_0x9a5fd9['diffData'][_0x1c1475]['deletions']:'[]',_0x4000a1=_0x9a5fd9['diffData'][_0x1c1475]?.['rootElementName']||'$root';_0x9a5fd9['model'][_0x1c1475]={'insertions':this['_utils']['_makeModelFromViewString'](_0x32958b,_0x4000a1),'deletions':this['_utils']['_makeModelFromViewString'](_0x47fc86,_0x4000a1)};}}for(const _0x56ccbd of _0x5304a4){let _0x3f7bd9=null,_0x155a94=0x0;const _0x3622fc=_0xf84dbd['map'](_0x1d54ac=>_0x1d54ac['diffData'][_0x56ccbd]?.['rootElementName'])['find'](_0x479b9b=>void 0x0!==_0x479b9b)||'$root',_0x5ed84b=new Map(Array['from'](_0x200fa7['model'][_0x56ccbd]['insertions']['markers'])['filter'](([_0x9c8357])=>!_0x9c8357['startsWith']('revision:')));let _0x5ea7a5=0x0;for(const _0x3426d7 of _0xf84dbd){const _0x501988=_0x3426d7['diffData'][_0x56ccbd]?.['aiSources']||{},_0x1e2d70=this['_makeTape'](_0x3426d7['model'][_0x56ccbd]['insertions'],_0x501988);_0x3426d7==_0x200fa7?(_0x3f7bd9=_0x1e2d70,_0x155a94=_0x3f7bd9['length'],_0x3f7bd9['forEach'](_0x236a70=>{_0x236a70['id']=_0x5ea7a5++;}),this['_processTape'](_0x3f7bd9)):this['_markInsertions'](_0x3f7bd9,_0x1e2d70);const _0x463080=_0x3f7bd9['filter'](_0x167a61=>!_0x167a61['isAdded'])['map'](_0x42d54e=>_0x42d54e['id']);let _0x1ac205=0x0;const _0x10ea08=this['_makeTape'](_0x3426d7['model'][_0x56ccbd]['deletions'],_0x501988);_0x10ea08['forEach'](_0x30aedb=>{_0x30aedb['isRemoved']?_0x30aedb['id']=_0x155a94++:_0x30aedb['id']=_0x463080[_0x1ac205++];}),this['_processTape'](_0x10ea08),this['_setDistance'](_0x3f7bd9,'isAdded'),this['_setDistance'](_0x10ea08,'isRemoved'),_0x3426d7==_0x200fa7&&this['_markMarkers'](_0x3f7bd9,_0x5ed84b),_0x3f7bd9=this['_joinTapes'](_0x3f7bd9,_0x10ea08),this['_refreshStartEndIndex'](_0x3f7bd9),this['_setDistance'](_0x3f7bd9,'isRemoved');}_0x3f7bd9=_0x3f7bd9['filter'](_0x1c3de0=>!(_0x1c3de0['isAdded']&&_0x1c3de0['isRemoved']));const _0x4868c6=new Map(_0x4d59fa['model'][_0x56ccbd]['deletions']['markers']),_0xb15a55=new Set(_0x5ed84b['keys']());for(const _0x37e0f3 of _0x4868c6['keys']())_0xb15a55['delete'](_0x37e0f3);const _0x4ae334=Object['assign']({},..._0xf84dbd['map'](_0x4ed3c1=>_0x4ed3c1['diffData'][_0x56ccbd]?.['aiSources']));this['_markSuggestions'](_0x3f7bd9,_0xb15a55,_0x4ae334),this['_fixObsoleteTags'](_0x3f7bd9),_0x3f7bd9=this['_removeMissingPairs'](_0x3f7bd9),_0x3f7bd9=this['_markMismatchedRemovedTags'](_0x3f7bd9),_0x3f7bd9=this['_removeUnsupportedChanges'](_0x3f7bd9);const {root:_0x2cd3d1,changes:_0x1ce5c5}=this['_makeModelFromTape'](_0x3f7bd9,_0x15c9b4,_0x56ccbd,_0x3622fc);_0x1b4bc4['model'][_0x56ccbd]=_0x2cd3d1;const _0x5b3f2d=_0x1cadd5['get'](_0x56ccbd);if(_0x5b3f2d){const _0x370741=_0x15c9b4['get'](_0x5b3f2d['userId']),_0x5c8b70=new Mt({'author':_0x370741,'type':_0x5b3f2d['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x56ccbd});_0x1ce5c5['unshift'](_0x5c8b70),_0x1b4bc4['attributes'][_0x56ccbd]['revisionHistoryAttachChange']=_0x5c8b70['id'];}_0x1b4bc4['changes']=_0x1b4bc4['changes']['concat'](_0x1ce5c5);}return _0x1b4bc4;}['_markMarkers'](_0x4652ef,_0x166f1e){for(let _0x39af44=0x0;_0x39af44<_0x4652ef['length'];_0x39af44++)for(const [_0x4b179d,_0x2ce0db]of _0x166f1e)!_0x2ce0db['isCollapsed']&&_0x2ce0db['start']['isEqual'](_0x4652ef[_0x39af44]['previousPosition'])&&_0x4652ef[_0x39af44]['markersStart']['push'](_0x4b179d),_0x2ce0db['end']['isEqual'](_0x4652ef[_0x39af44]['nextPosition'])&&_0x4652ef[_0x39af44]['markersEnd']['push'](_0x4b179d);}['_joinTapes'](_0x36d53c,_0x1197ea){let _0x44219e=[],_0x2f1097=0x0,_0x1eb919=0x0;for(;_0x2f1097<_0x36d53c['length']||_0x1eb919<_0x1197ea['length'];){const _0x1c241a=_0x36d53c[_0x2f1097]||{},_0x4f5803=_0x1197ea[_0x1eb919]||{};if(_0x1c241a['id']==_0x4f5803['id'])_0x2f1097++,_0x1eb919++,_0x44219e['push'](_0x1c241a);else{if(_0x4f5803['isRemoved']&&_0x1c241a['isAdded']){const {commonTape:_0x4292e9,iEnd:_0x3956f2,jEnd:_0x59bb49}=this['_threeWayMerge'](_0x36d53c,_0x2f1097,_0x1197ea,_0x1eb919);_0x44219e=_0x44219e['concat'](_0x4292e9),_0x2f1097=_0x3956f2,_0x1eb919=_0x59bb49;}else _0x4f5803['isRemoved']?(_0x1eb919++,_0x44219e['push'](_0x4f5803)):(_0x2f1097++,_0x44219e['push'](_0x1c241a));}}return _0x44219e;}_markSuggestions(_0x1e5a79,_0x400174,_0x3281aa){const _0x2237f6=[];for(let _0x19e952=0x0;_0x19e952<_0x1e5a79['length'];_0x19e952++){for(let _0x3bbbca=0x0;_0x3bbbca<_0x1e5a79[_0x19e952]['markersStart']['length'];_0x3bbbca++){const _0x3e674e=_0x1e5a79[_0x19e952]['markersStart'][_0x3bbbca];if(!_0x400174['has'](_0x3e674e))continue;const {group:_0x3795ae,type:_0x28e8d2,authorId:_0x4d17e2}=_0x58c95b(_0x3e674e);if('revision-suggestion'!=_0x3795ae||'insertion'!=_0x28e8d2&&'deletion'!=_0x28e8d2)continue;const _0x34da04=_0x3281aa['suggestion:'+_0x3e674e['slice'](0x14)]||null;_0x2237f6['unshift']({'type':_0x28e8d2,'name':_0x3e674e,'userId':_0x4d17e2,'aiSource':_0x34da04}),_0x1e5a79[_0x19e952]['markersStart']['splice'](_0x3bbbca,0x1),_0x3bbbca--;}_0x99fa64(_0x1e5a79[_0x19e952]);for(let _0x18349a=0x0;_0x18349a<_0x1e5a79[_0x19e952]['markersEnd']['length'];_0x18349a++){const _0x480691=_0x1e5a79[_0x19e952]['markersEnd'][_0x18349a];if(!_0x400174['has'](_0x480691))continue;const {group:_0x243841,type:_0x13facc}=_0x58c95b(_0x480691);if('revision-suggestion'!=_0x243841||'insertion'!=_0x13facc&&'deletion'!=_0x13facc)continue;_0x1e5a79[_0x19e952]['markersEnd']['splice'](_0x18349a,0x1),_0x18349a--;const _0x2336a9=_0x2237f6['findIndex'](_0x3940c7=>_0x3940c7['name']==_0x480691);_0x2336a9>-0x1&&_0x2237f6['splice'](_0x2336a9,0x1);}}function _0x58c95b(_0x5c669d){const _0x3036e5=_0x5c669d['split'](':');return{'group':_0x3036e5[0x0],'type':_0x3036e5[0x1],'subType':_0x3036e5['length']>=0x5?_0x3036e5[0x2]:null,'id':_0x3036e5['length']<0x5?_0x3036e5[0x2]:_0x3036e5[0x3],'authorId':_0x3036e5['length']<0x5?_0x3036e5[0x3]:_0x3036e5[0x4],'markerCount':0x6==_0x3036e5['length']?_0x3036e5[0x5]:null};}function _0x99fa64(_0x2c67d3){for(let _0x467f5b=0x0;_0x467f5b<_0x2237f6['length'];_0x467f5b++){if(_0x2c67d3['isAdded']&&'insertion'==_0x2237f6[_0x467f5b]['type']&&_0x2c67d3['isAdded']['userId']==_0x2237f6[_0x467f5b]['userId'])return _0x2c67d3['isAddSuggestion']={..._0x2237f6[_0x467f5b],'aiSource':_0x2c67d3['isAdded']['aiSource']||_0x2237f6[_0x467f5b]['aiSource']},void delete _0x2c67d3['isAdded'];if(!_0x2c67d3['isAdded']&&!_0x2c67d3['isRemoved']&&'deletion'==_0x2237f6[_0x467f5b]['type'])return void(_0x2c67d3['isRemoveSuggestion']=_0x2237f6[_0x467f5b]);}}}_setDistance(_0x4f5e5b,_0x5916bb){let _0xdffdb3=0x0,_0x12bdf0=!0x1;const _0x3e62fc=new Map();for(const _0x8a48a8 of _0x4f5e5b)_0x8a48a8[_0x5916bb]?_0x12bdf0&&(_0xdffdb3++,_0x12bdf0=!0x1):(_0xdffdb3++,_0x12bdf0=!0x0),_0x3e62fc['set'](_0x8a48a8['id'],_0xdffdb3);for(let _0x482adf=0x0;_0x482adf<_0x4f5e5b['length'];_0x482adf++){if('isRemoved'==_0x5916bb&&_0x4f5e5b[_0x482adf]['isAdded']||'isAdded'==_0x5916bb&&_0x4f5e5b[_0x482adf]['isRemoved'])continue;if('text'==_0x4f5e5b[_0x482adf]['type']){_0x4f5e5b[_0x482adf]['distance']=0x0;continue;}const _0x3f49a0=_0x3e62fc['get'](_0x4f5e5b[_0x482adf]['pairId']),_0x510b98=_0x3e62fc['get'](_0x4f5e5b[_0x482adf]['id']);_0x4f5e5b[_0x482adf]['distance']=_0x3f49a0-_0x510b98;}}_getRevisionsRange(_0x5ac608,_0xf4c226,_0x4e3afd=!0x1){const _0x38c875=[];let _0x25b2c7=this['repository']['getIndex'](_0x5ac608),_0x11dc95=this['repository']['getIndex'](_0xf4c226);for(-0x1==_0x11dc95&&(_0x11dc95=this['repository']['_revisions']['length'],_0x4e3afd=!0x1);_0x25b2c7<_0x11dc95;)_0x38c875['push'](this['repository']['getRevision'](_0x25b2c7)),_0x25b2c7++;return _0x4e3afd&&_0x38c875['push'](this['repository']['getRevision'](_0x25b2c7)),_0x38c875;}_threeWayMerge(_0x19dfcd,_0x516759,_0xa27330,_0x44504a){const _0x1f09d8=this['editor']['model']['schema'];let _0x3a610d=_0x516759;for(;_0x19dfcd[_0x3a610d]&&_0x19dfcd[_0x3a610d]['isAdded'];)_0x3a610d++;let _0x1f8682=_0x44504a;for(;_0xa27330[_0x1f8682]&&_0xa27330[_0x1f8682]['isRemoved'];)_0x1f8682++;_0x336cf3(_0x19dfcd,_0x516759,_0x3a610d),_0x336cf3(_0xa27330,_0x44504a,_0x1f8682);const _0x1c30f6=_0xa27330['slice'](_0x44504a,_0x1f8682)['concat'](_0x19dfcd['slice'](_0x516759,_0x3a610d));return _0x1c30f6['sort']((_0x202cb5,_0x5f27fc)=>_0x202cb5['side']!=_0x5f27fc['side']?_0x202cb5['side']-_0x5f27fc['side']:_0x202cb5['level']!=_0x5f27fc['level']?_0x202cb5['level']-_0x5f27fc['level']:_0x202cb5['distance']!=_0x5f27fc['distance']?_0x5f27fc['distance']-_0x202cb5['distance']:!!_0x202cb5['isAdded']!=!!_0x5f27fc['isAdded']?-0x1==_0x202cb5['side']||0x0==_0x202cb5['side']?_0x202cb5['isAdded']?-0x1:0x1:_0x202cb5['isAdded']?0x1:-0x1:_0x202cb5['index']-_0x5f27fc['index']),{'commonTape':_0x1c30f6,'iEnd':_0x3a610d,'jEnd':_0x1f8682};function _0x336cf3(_0x2b13a8,_0x272c45,_0x311b6e){let _0x4d0ef1=-0x1,_0x59d63b=Number['POSITIVE_INFINITY'],_0x5502cb=!0x0;for(let _0x2e0cbc=_0x272c45;_0x2e0cbc<_0x311b6e;_0x2e0cbc++)if(_0x1f09d8['isInline'](_0x2b13a8[_0x2e0cbc]['item'])||(_0x5502cb=!0x1),_0x2b13a8[_0x2e0cbc]['item']['startIndex']<_0x272c45&&(_0x4d0ef1=_0x2e0cbc),_0x2b13a8[_0x2e0cbc]['item']['endIndex']>=_0x311b6e){_0x59d63b=_0x2e0cbc;break;}_0x5502cb&&(_0x4d0ef1=_0x311b6e-0x1);for(let _0x57f09d=_0x272c45;_0x57f09d<_0x311b6e;_0x57f09d++)_0x2b13a8[_0x57f09d]['side']=_0x57f09d<=_0x4d0ef1?-0x1:_0x57f09d<_0x59d63b?0x0:0x1,_0x2b13a8[_0x57f09d]['index']=_0x57f09d;let _0xf11629=0x0;for(let _0x3823e0=_0x272c45;_0x3823e0<=_0x4d0ef1;_0x3823e0++)0x0==_0x2b13a8[_0x3823e0]['distance']?_0x2b13a8[_0x3823e0]['level']=_0xf11629:(_0xf11629++,_0x2b13a8[_0x3823e0]['level']=_0xf11629,_0xf11629++);for(let _0x33cd7a=_0x272c45;_0x33cd7a<_0x311b6e;_0x33cd7a++)0x0==_0x2b13a8[_0x33cd7a]['side']&&(_0x2b13a8[_0x33cd7a]['level']=_0xf11629);_0xf11629=0x0;for(let _0x142b37=_0x311b6e-0x1;_0x142b37>=_0x59d63b;_0x142b37--)0x0==_0x2b13a8[_0x142b37]['distance']?_0x2b13a8[_0x142b37]['level']=_0xf11629:(_0xf11629--,_0x2b13a8[_0x142b37]['level']=_0xf11629,_0xf11629--);}}_fixObsoleteTags(_0x3ed486){const _0x107cea=new Map(),_0xa35022=this['editor']['model']['schema'];for(let _0x50ec15=0x1;_0x50ec15<_0x3ed486['length'];_0x50ec15++){let _0x118ddb,_0x144373,_0x2d0f43;const _0x3168e3=_0x3ed486[_0x50ec15],_0x21fc21=_0x3ed486[_0x50ec15-0x1];if('text'==_0x3168e3['type'])continue;if(_0x3168e3['type']!=_0x21fc21['type'])continue;if(!_0xa35022['isBlock'](_0x21fc21['item'])||_0xa35022['isLimit'](_0x21fc21['item']))continue;if(!_0xa35022['isBlock'](_0x3168e3['item'])||_0xa35022['isLimit'](_0x3168e3['item']))continue;if((_0x3ed486[_0x50ec15]['isAdded']||_0x3ed486[_0x50ec15]['isAddSuggestion'])&&_0x3ed486[_0x50ec15-0x1]['isRemoved'])_0x118ddb=_0x3ed486[_0x50ec15],_0x144373=_0x3ed486[_0x50ec15-0x1],_0x2d0f43=_0x50ec15-0x1;else{if(!_0x3ed486[_0x50ec15]['isRemoved']||!_0x3ed486[_0x50ec15-0x1]['isAdded']&&!_0x3ed486[_0x50ec15-0x1]['isAddSuggestion'])continue;_0x118ddb=_0x3ed486[_0x50ec15-0x1],_0x144373=_0x3ed486[_0x50ec15],_0x2d0f43=_0x50ec15;}const _0x1fedec=_0x118ddb['level']==_0x144373['level'],_0x1189cd=Math['abs'](_0x118ddb['level'])<Math['abs'](_0x144373['level'])&&0x0==_0x144373['distance'];(_0x1fedec||_0x1189cd)&&(_0x107cea['set'](_0x144373['id'],_0x118ddb['id']),_0x3ed486['splice'](_0x2d0f43,0x1),_0x50ec15--,_0x118ddb['isAdded']=!0x1);}for(let _0x88044e=0x0;_0x88044e<_0x3ed486['length'];_0x88044e++)_0x107cea['has'](_0x3ed486[_0x88044e]['pairId'])&&(_0x3ed486[_0x88044e]['pairId']=_0x107cea['get'](_0x3ed486[_0x88044e]['pairId']));}['_removeMissingPairs'](_0xa03661){const _0x4940a0=new Set(_0xa03661['map'](_0x598c8d=>_0x598c8d['id']));for(let _0x5c95e3=0x0;_0x5c95e3<_0xa03661['length'];_0x5c95e3++)_0x4940a0['has'](_0xa03661[_0x5c95e3]['pairId'])||0x0==_0xa03661[_0x5c95e3]['distance']||(_0xa03661[_0x5c95e3]['isIncorrect']=!0x0);return _0xa03661['filter'](_0x2b7538=>!_0x2b7538['isIncorrect']);}_markMismatchedRemovedTags(_0x378936){const _0x5c09b3=new Set();for(let _0x39c81a=0x0;_0x39c81a<_0x378936['length'];_0x39c81a++){if(_0x5c09b3['has'](_0x378936[_0x39c81a]['id'])&&_0x378936[_0x39c81a]['isRemoved']&&(_0x378936[_0x39c81a]['isIncorrect']=!0x0),_0x378936[_0x39c81a]['isIncorrect'])continue;if(0x0==_0x378936[_0x39c81a]['distance'])continue;if('elementStart'!=_0x378936[_0x39c81a]['type'])continue;if(null==_0x378936[_0x39c81a]['pairId'])continue;let _0x3270ef=_0x39c81a+0x1,_0x22e99e=0x0;for(;_0x378936[_0x3270ef]['id']!=_0x378936[_0x39c81a]['pairId'];)'elementStart'==_0x378936[_0x3270ef]['type']?_0x22e99e++:'elementEnd'==_0x378936[_0x3270ef]['type']&&_0x22e99e--,_0x3270ef++;if(0x0!=_0x22e99e){if(_0x378936[_0x39c81a]['isRemoved'])_0x378936[_0x39c81a]['isIncorrect']=!0x0;else{for(;_0x3270ef!=_0x39c81a;)_0x378936[_0x3270ef]['isRemoved']&&0x0!=_0x378936[_0x3270ef]['distance']&&(_0x378936[_0x3270ef]['isIncorrect']=!0x0,_0x5c09b3['add'](_0x378936[_0x3270ef]['pairId'])),_0x3270ef--;}}}return _0x378936['filter'](_0x266ff6=>!_0x266ff6['isIncorrect']);}_removeUnsupportedChanges(_0x160d54){const _0x27a501=this['editor']['model']['schema'];for(let _0x513791=0x0;_0x513791<_0x160d54['length'];_0x513791++){if(!(_0x160d54[_0x513791]['isAdded']||_0x160d54[_0x513791]['isAddSuggestion']||_0x160d54[_0x513791]['isRemoved']||_0x160d54[_0x513791]['isRemoveSuggestion']))continue;if(0x0==_0x160d54[_0x513791]['distance'])continue;const _0x2f2db5=_0x160d54[_0x513791]['item'];_0x27a501['isBlock'](_0x2f2db5)||_0x27a501['isLimit'](_0x2f2db5)||(_0x160d54[_0x513791]['isAdded']&&delete _0x160d54[_0x513791]['isAdded'],_0x160d54[_0x513791]['isAddSuggestion']&&delete _0x160d54[_0x513791]['isAddSuggestion'],_0x160d54[_0x513791]['isRemoveSuggestion']&&delete _0x160d54[_0x513791]['isRemoveSuggestion'],_0x160d54[_0x513791]['isRemoved']&&(_0x160d54[_0x513791]['isIncorrect']=!0x0));}return _0x160d54['filter'](_0x5876ae=>!_0x5876ae['isIncorrect']);}['_makeModelFromTape'](_0x2e2918,_0x2ec99f,_0x5e2b20,_0x1056a2){const _0x156acc=new _0x4acbd6(),_0x264172=[],_0x21d6cc=new Map(),_0x56b1be=this['editor']['model'],_0x3edc86=_0x56b1be['schema'],_0x303829=[_0x156acc],_0x206601={},_0x4f5f80={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x156acc['name']=_0x1056a2;let _0x476aaa=null;const _0x33dd7f=[0x0];for(let _0x2f60b6=0x0;_0x2f60b6<_0x2e2918['length'];_0x2f60b6++)if('elementStart'===_0x2e2918[_0x2f60b6]['type']){_0x2e2918[_0x2f60b6]['previousPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f);const _0x1debae=new _0x28c730(_0x2e2918[_0x2f60b6]['item']['name'],_0x2e2918[_0x2f60b6]['item']['getAttributes']());_0x303829[0x0]['_appendChild'](_0x1debae),_0x33dd7f['push'](0x0),_0x303829['unshift'](_0x1debae),_0x2e2918[_0x2f60b6]['nextPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f);}else'elementEnd'===_0x2e2918[_0x2f60b6]['type']?(_0x303829['shift'](),_0x2e2918[_0x2f60b6]['previousPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f),_0x33dd7f['pop'](),_0x33dd7f[_0x33dd7f['length']-0x1]++,_0x2e2918[_0x2f60b6]['nextPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f)):(_0x2e2918[_0x2f60b6]['previousPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f),_0x476aaa?_0x476aaa['_data']+=_0x2e2918[_0x2f60b6]['item']['data']:_0x476aaa=new _0x42becd(_0x2e2918[_0x2f60b6]['item']['data'],_0x2e2918[_0x2f60b6]['item']['getAttributes']()),_0x2e2918[_0x2f60b6+0x1]&&'text'===_0x2e2918[_0x2f60b6+0x1]['type']&&_0x4668f7(_0x476aaa,_0x2e2918[_0x2f60b6+0x1]['item'])||(_0x303829[0x0]['_appendChild'](_0x476aaa),_0x476aaa=null),_0x33dd7f[_0x33dd7f['length']-0x1]+=_0x2e2918[_0x2f60b6]['item']['offsetSize'],_0x2e2918[_0x2f60b6]['nextPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f));for(let _0x380b44=0x0;_0x380b44<_0x2e2918['length'];_0x380b44++){const _0x58e7e8=_0x2e2918[_0x380b44]['previousPosition'],_0x22b0d5=_0x2e2918[_0x380b44]['nextPosition'];for(const _0x55dfd4 of _0x2e2918[_0x380b44]['markersStart'])_0x21d6cc['set'](_0x55dfd4,{'start':_0x58e7e8,'end':null});_0x4c2137('isRemoveSuggestion',_0x380b44,_0x58e7e8,_0x22b0d5),_0x4c2137('isAddSuggestion',_0x380b44,_0x58e7e8,_0x22b0d5),_0x4c2137('isRemoved',_0x380b44,_0x58e7e8,_0x22b0d5),_0x4c2137('isAdded',_0x380b44,_0x58e7e8,_0x22b0d5);for(const _0x423d9b of _0x2e2918[_0x380b44]['markersEnd']){const _0x146a85=_0x21d6cc['get'](_0x423d9b);_0x146a85?_0x146a85['end']=_0x22b0d5:_0x21d6cc['set'](_0x423d9b,{'start':_0x22b0d5,'end':_0x22b0d5});}}for(const [_0x2f9def,_0x243957]of _0x21d6cc){const _0x4957cc=this['editor']['model']['createRange'](_0x243957['start'],_0x243957['end']);_0x156acc['markers']['set'](_0x2f9def,_0x4957cc);}return _0x264172['sort']((_0x4e5b92,_0x466903)=>{const _0x41ac70=_0x156acc['markers']['get']('revision:'+_0x4e5b92['id']),_0x40fefa=_0x156acc['markers']['get']('revision:'+_0x466903['id']);return _0x41ac70['start']['isBefore'](_0x40fefa['start'])?-0x1:_0x41ac70['start']['isAfter'](_0x40fefa['start'])?0x1:_0x41ac70['end']['isBefore'](_0x40fefa['end'])?-0x1:_0x41ac70['end']['isAfter'](_0x40fefa['end'])?0x1:'add'===_0x4e5b92['type']?-0x1:0x1;}),{'root':_0x156acc,'changes':_0x264172};function _0x4c2137(_0x3b7ad7,_0x25666c,_0x55fe1f,_0x540746){const _0x12aab8=!!_0x2e2918[_0x25666c][_0x3b7ad7],_0x3efdb4=_0x12aab8?_0x2e2918[_0x25666c][_0x3b7ad7]['userId']:null,_0x5b9227=_0x12aab8&&_0x2e2918[_0x25666c][_0x3b7ad7]['aiSource']||null,_0x5114ba=_0x25666c===_0x2e2918['length']-0x1,_0x3e13b4=_0x4f5f80[_0x3b7ad7][0x0],_0x3f6b50=_0x3edc86['isObject'](_0x2e2918[_0x25666c]['item']);!_0x206601[_0x3b7ad7]&&_0x12aab8?_0x206601[_0x3b7ad7]={'start':_0x55fe1f,'tapeItem':_0x2e2918[_0x25666c],'userId':_0x3efdb4,'aiSource':_0x5b9227,'type':_0x3b7ad7}:_0x206601[_0x3b7ad7]&&!_0x12aab8?(_0x206601[_0x3b7ad7]['end']=_0x55fe1f,_0x3da67f(_0x206601[_0x3b7ad7]),_0x206601[_0x3b7ad7]=null):_0x206601[_0x3b7ad7]&&_0x12aab8&&(_0x206601[_0x3b7ad7]['userId']!==_0x3efdb4||_0x206601[_0x3b7ad7]['aiSource']!==_0x5b9227)&&(_0x206601[_0x3b7ad7]['end']=_0x55fe1f,_0x3e13b4&&_0x3e13b4['userId']===_0x206601[_0x3b7ad7]['userId']?_0x3e13b4['change']['aiSource']=_0x3e13b4['change']['aiSource']||_0x206601[_0x3b7ad7]['aiSource']:_0x3da67f(_0x206601[_0x3b7ad7]),_0x206601[_0x3b7ad7]={'start':_0x55fe1f,'tapeItem':_0x2e2918[_0x25666c],'userId':_0x3efdb4,'aiSource':_0x5b9227,'type':_0x3b7ad7}),_0x206601[_0x3b7ad7]&&_0x3f6b50&&('elementStart'!==_0x2e2918[_0x25666c]['type']||_0x3e13b4&&_0x3e13b4['userId']===_0x3efdb4||_0x4f5f80[_0x3b7ad7]['unshift']({'userId':_0x3efdb4,'object':_0x2e2918[_0x25666c]['item'],'change':_0x206601[_0x3b7ad7]}),'elementEnd'===_0x2e2918[_0x25666c]['type']&&_0x3e13b4&&_0x3e13b4['object']===_0x2e2918[_0x25666c]['item']&&(_0x4f5f80[_0x3b7ad7]['shift'](),_0x206601[_0x3b7ad7]=_0x3e13b4['change'])),_0x206601[_0x3b7ad7]&&_0x5114ba&&(_0x206601[_0x3b7ad7]['end']=_0x540746,_0x3da67f(_0x206601[_0x3b7ad7]),_0x206601[_0x3b7ad7]=null);}function _0x3da67f({start:_0x475d09,end:_0x1ad0b5,tapeItem:_0x57916f,userId:_0x5544bf,aiSource:_0x11766d,type:_0x2afeaf}){const _0x356edc=_0x57916f['item'],_0x365a31=_0x56b1be['schema']['isBlock'](_0x356edc)&&!_0x56b1be['schema']['isLimit'](_0x356edc),_0x3cdf3e=_0x475d09['nodeAfter']==_0x1ad0b5['parent']&&_0x1ad0b5['isAtStart'];if(_0x365a31&&_0x3cdf3e)return;const _0xe20150=_0x56b1be['createRange'](_0x475d09,_0x1ad0b5),_0x4aa45e=_0x2ec99f['get'](_0x5544bf),_0x31253c=new Mt({'author':_0x4aa45e,'type':'isAdded'==_0x2afeaf||'isAddSuggestion'==_0x2afeaf?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2afeaf||'isRemoveSuggestion'==_0x2afeaf,'aiSource':_0x11766d||null},'createdAt':new Date(),'rootName':_0x5e2b20});_0x264172['push'](_0x31253c),_0x156acc['markers']['set']('revision:'+_0x31253c['id'],_0xe20150);}function _0x4668f7(_0x3823a9,_0x5642c4){const _0x46a4f4=_0x3823a9['getAttributes'](),_0x32aa9a=_0x5642c4['getAttributes']();for(const _0x12ef2d of _0x46a4f4){if(_0x12ef2d[0x1]!==_0x5642c4['getAttribute'](_0x12ef2d[0x0]))return!0x1;_0x32aa9a['next']();}return _0x32aa9a['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1d8ce6=>{const _0x5ab55f=_0x1d8ce6['markerName']['split'](':')[0x1],_0xf2c957=this['_getChangeFromId'](_0x5ab55f);if(!_0xf2c957)return null;const _0x212cb2='add'==_0xf2c957['type']?'insertion':'deletion',_0x4780a3=['ck-suggestion-marker','ck-suggestion-marker-'+_0x212cb2];return _0xf2c957['data']['isSuggestion']&&_0x4780a3['push']('ck-suggestion-marker-'+_0x212cb2+'-new'),this['activeChange']==_0xf2c957&&_0x4780a3['push']('ck-suggestion-marker--active'),{'classes':_0x4780a3,'attributes':{'data-change-id':_0x5ab55f}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x24718d=>{_0x24718d['on']('element:pre',(_0x311d35,_0x430d93,_0x19f76b)=>{const _0x246f90=_0x430d93['viewItem']['getChild'](0x0);if(!_0x246f90||!_0x246f90['is']('element','code'))return;if(!_0x19f76b['consumable']['consume'](_0x246f90,{'attributes':['vid_start','vid_end']}))return;const _0xc5bee9=_0x430d93['modelRange']['start']['nodeAfter'];_0x19f76b['writer']['setAttribute']('vid_start',_0x246f90['getAttribute']('vid_start'),_0xc5bee9),_0x19f76b['writer']['setAttribute']('vid_end',_0x246f90['getAttribute']('vid_end'),_0xc5bee9);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x36a1d4=>{_0x36a1d4['on']('element',(_0x508a47,_0x4d22c9,_0x41d3e3)=>{if(!_0x41d3e3['consumable']['consume'](_0x4d22c9['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4d22c9['modelRange']['isCollapsed'])return;const _0x23a3a4=_0x4d22c9['modelRange']['start']['nodeAfter'];_0x23a3a4['hasAttribute']('vid_start')||_0x23a3a4['hasAttribute']('vid')||(_0x41d3e3['writer']['setAttribute']('vid_start',_0x4d22c9['viewItem']['getAttribute']('vid_start'),_0x23a3a4),_0x41d3e3['writer']['setAttribute']('vid_end',_0x4d22c9['viewItem']['getAttribute']('vid_end'),_0x23a3a4));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x5e062d=>_0x5e062d['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x1e91c2,[,_0xc96aed])=>{['vid_start','vid_end','vid']['includes'](_0xc96aed)&&(_0x1e91c2['return']=!0x0,_0x1e91c2['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x644204=>{_0x644204['on']('attribute:vid',(_0x434cb3,_0x479384,_0x3b0861)=>{if('\x20'!=_0x479384['item']['data']||_0x479384['item']['parent']['maxOffset']>0x1)return;if(!_0x3b0861['consumable']['consume'](_0x479384['item'],_0x434cb3['name']))return;const _0x44fd08=_0x3b0861['writer'],_0x1c1a58=_0x3b0861['mapper']['toViewRange'](_0x479384['range']);_0x44fd08['wrap'](_0x1c1a58,_0x44fd08['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x387f54){const _0x17ea6b=_0x387f54['plugins']['get']('RevisionViewer');return(_0x1602bf,_0x6483a4,_0x517d94)=>{const _0x4e3748=_0x6483a4['markerName']['split'](':')[0x1],_0x272b68=_0x17ea6b['_getChangeFromId'](_0x4e3748);if(!_0x272b68)return null;const _0x2f2933='add'==_0x272b68['type']?'split':'merge';if(!_0x517d94['consumable']['test'](_0x6483a4['markerRange'],_0x1602bf['name']))return;const _0x3e87aa=_0x6483a4['markerRange']['getWalker'](),_0x1c9d6f=_0x6483a4['markerRange']['start'],_0x12fd7c=_0x387f54['model']['schema'];let _0x388f48=null,_0x37082c=null,_0x1c6a23=!0x1,_0x68462d=!0x1;for(const _0x4b5a64 of _0x3e87aa){const _0x4891b7=_0x4b5a64['item'];_0x1c6a23=_0x1c6a23||_0x12fd7c['isContent'](_0x4891b7);const _0x18d41c=_0x517d94['mapper']['toViewElement'](_0x4891b7);if(_0x18d41c&&_0x18d41c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4b5a64['type']&&(_0x12fd7c['isBlock'](_0x4891b7)&&!_0x12fd7c['isLimit'](_0x4891b7)&&(_0x4891b7['nextSibling']||_0x1c9d6f['isAtEnd']?_0x388f48&&_0x388f48['parent']==_0x4891b7||(_0x388f48=_0x4891b7,_0x73243f(_0x4b5a64['previousPosition']),_0x68462d=!0x0):_0x37082c=_0x37082c||_0x4b5a64['previousPosition']));}function _0x73243f(_0x212508){const _0x5befad=_0x517d94['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2f2933}),_0x53fab5=_0x517d94['mapper']['toViewPosition'](_0x212508);_0x272b68['data']['isSuggestion']&&_0x517d94['writer']['addClass']('ck-suggestion-marker-'+_0x2f2933+'-new',_0x5befad),_0x17ea6b['activeChange']==_0x272b68&&_0x517d94['writer']['addClass']('ck-suggestion-marker--active',_0x5befad),_0x517d94['writer']['insert'](_0x53fab5,_0x5befad),_0x517d94['mapper']['bindElementToMarker'](_0x5befad,_0x6483a4['markerName']);}_0x1c6a23||_0x68462d||!_0x37082c||_0x73243f(_0x37082c);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2aca78,_0x166930,_0x2bfe6d)=>{const _0x56db6e=_0x2bfe6d['mapper']['markerNameToElements'](_0x166930['markerName']);if(_0x56db6e){for(const _0x44579e of _0x56db6e)(_0x44579e['hasClass']('ck-suggestion-marker-split')||_0x44579e['hasClass']('ck-suggestion-marker-merge'))&&(_0x2bfe6d['mapper']['unbindElementFromMarkerName'](_0x44579e,_0x166930['markerName']),_0x2bfe6d['writer']['remove'](_0x44579e));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3852da,_0x4b4249,_0x130569)=>{const _0x456418=_0x4b4249['markerName']['split'](':')[0x1],_0x585d5a=this['_getChangeFromId'](_0x456418);if(!_0x585d5a)return null;const _0x2769ec='add'==_0x585d5a['type']?'split':'merge';if(_0x130569['consumable']['test'](_0x4b4249['markerRange'],_0x3852da['name']))for(const _0x2a49a9 of _0x4b4249['markerRange']['getItems']()){if(!_0x2a49a9['is']('element','softBreak'))continue;const _0x3de75c=_0x130569['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2769ec}),_0x5c2314=_0x130569['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x2a49a9));_0x585d5a['data']['isSuggestion']&&_0x130569['writer']['addClass']('ck-suggestion-marker-'+_0x2769ec+'-new',_0x3de75c),this['activeChange']==_0x585d5a&&_0x130569['writer']['addClass']('ck-suggestion-marker--active',_0x3de75c),_0x130569['writer']['insert'](_0x5c2314,_0x3de75c),_0x130569['mapper']['bindElementToMarker'](_0x3de75c,_0x4b4249['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x8714cb=>{for(const _0x113a91 of this['editor']['model']['document']['getRootNames']()){const _0x90992a=this['editor']['model']['document']['getRoot'](_0x113a91),_0x41932c=this['editor']['editing']['view']['document']['getRoot'](_0x113a91);if(_0x41932c){const _0x1b4f86=_0x90992a['getAttribute']('revisionHistoryAttachChange');if(_0x8714cb['removeAttribute']('data-change-id',_0x41932c),_0x8714cb['removeClass']('ck-revision-history-root-add',_0x41932c),_0x8714cb['removeClass']('ck-revision-history-root-remove',_0x41932c),_0x8714cb['removeClass']('ck-revision-history-root--active',_0x41932c),_0x1b4f86){const _0x29fbd6=this['_getChangeFromId'](_0x1b4f86);if(!_0x29fbd6)return null;_0x8714cb['setAttribute']('data-change-id',_0x1b4f86,_0x41932c),_0x8714cb['addClass']('ck-revision-history-root-'+_0x29fbd6['type'],_0x41932c),this['activeChange']==_0x29fbd6&&_0x8714cb['addClass']('ck-revision-history-root--active',_0x41932c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x441ef9=>'revision-comment:'+_0x441ef9,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x4801ec=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x4801ec['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x225bc4=>'revision-suggestion:'+_0x225bc4,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3f9819=>({'name':'suggestion:'+_0x3f9819,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x117962=>{const _0x88e71e=_0x117962['markerName']['split'](':')[0x1];return'insertion'!=_0x88e71e&&'deletion'!=_0x88e71e?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x88e71e]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x46e891,_0xb67791,_0xc03b5b)=>{const _0x5da6c5=_0xc03b5b['mapper']['markerNameToElements'](_0xb67791['markerName']);if(_0x5da6c5){for(const _0x9b7941 of _0x5da6c5)_0x9b7941['is']('uiElement')&&(_0xc03b5b['mapper']['unbindElementFromMarkerName'](_0x9b7941,_0xb67791['markerName']),_0xc03b5b['writer']['remove'](_0x9b7941));}},{'priority':'high'});}_getChangeFromId(_0x1c205d){return this['_changeIdToChange']['get'](_0x1c205d);}_getViewForChange(_0x34baea){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x34baea,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x39b3d3,_0x2b5c66,_0x30483e,_0x199054)=>{_0x199054&&this['_balloon']['remove'](_0x199054),_0x30483e&&(this['_balloon']['add']({'view':_0x30483e,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x39554b=this['editor']['editing'],_0x1bac95=this['_getChangeFromId'](_0x30483e['changeId']);let _0x2d536a;if(_0x1bac95['data']['isOnRoot']){const _0x42e69b=_0x39554b['view']['getDomRoot'](_0x1bac95['rootName']);_0x2d536a=Array['from'](_0x42e69b['getClientRects']());}else{const _0x765865=this['editor']['model']['markers']['get']('revision:'+_0x30483e['changeId']);_0x2d536a=Array['from'](_0x39554b['mapper']['markerNameToElements'](_0x765865['name']))['map'](_0x1f41bc=>_0x39554b['view']['domConverter']['mapViewToDom'](_0x1f41bc))['map'](_0x301391=>Array['from'](_0x301391['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x2d536a['find'](_0x2a53fb=>_0x2a53fb['top']-0x3<=this['_activeViewTarget']['y']&&_0x2a53fb['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2a53fb['left']-0x3<=this['_activeViewTarget']['x']&&_0x2a53fb['right']+0x3>=this['_activeViewTarget']['x'])||_0x2d536a[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x12afc3,_0x29fe70,_0x521f29,_0x24b674)=>{this['activeView']=_0x521f29?this['_getViewForChange'](_0x521f29):null,this['editor']['model']['change'](()=>{const _0x2b7f29=this['editor']['editing'];_0x24b674&&(_0x24b674['data']['isOnRoot']?_0x2b7f29['view']['change'](_0x5a4dd5=>{_0x5a4dd5['removeClass']('ck-revision-history-root--active',_0x2b7f29['view']['document']['getRoot'](_0x24b674['rootName']));}):_0x2b7f29['reconvertMarker']('revision:'+_0x24b674['id'])),_0x521f29&&(_0x521f29['data']['isOnRoot']?_0x2b7f29['view']['change'](_0x7b5600=>{_0x7b5600['addClass']('ck-revision-history-root--active',_0x2b7f29['view']['document']['getRoot'](_0x521f29['rootName']));}):_0x2b7f29['reconvertMarker']('revision:'+_0x521f29['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x16fa6b,_0x162991)=>{if(this['activeChange'])return;const _0xee9608=this['_findChangeIdFromDomTarget'](_0x162991['target']),_0x25380e=this['_changeIdToChange']['get'](_0xee9608);_0x25380e?(this['_activeViewTarget']={'x':_0x162991['domEvent']['x'],'y':_0x162991['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x25380e)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4a0aaf,_0x5620a3)=>{const _0x412a8a=this['_findChangeIdFromDomTarget'](_0x5620a3['target']),_0x582805=this['_changeIdToChange']['get'](_0x412a8a);_0x582805?(this['_activeViewTarget']={'x':_0x5620a3['domEvent']['x'],'y':_0x5620a3['domEvent']['y']},_0x582805===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x582805):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x5c514f){do{const _0x2d8898=_0x5c514f['getAttribute']('data-change-id');if(_0x2d8898)return _0x2d8898;_0x5c514f=_0x5c514f['parent'];}while(_0x5c514f);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x390869=>{for(const _0x3af693 of this['editor']['model']['markers'])_0x390869['removeMarker'](_0x3af693);});}};function Ut(_0x32d48f){return _0x32d48f['split'](':')[0x1];}function Lt(_0x1a5a54,_0x2d5eac){return(_0x403176,_0x31f940,_0x2d6b4c)=>{if(!_0x2d6b4c['consumable']['test'](_0x31f940['markerRange'],_0x403176['name']))return;const _0xbbc7e1=_0x31f940['markerRange']['getWalker'](),_0x455a35=_0x31f940['markerRange']['start'],_0x1e3048=_0x1a5a54['model']['schema'];let _0xa4ac18=null,_0x3abd9e=null,_0x5ea654=!0x1,_0x5ab850=!0x1;for(const _0x4a90bb of _0xbbc7e1){const _0x1e8bc8=_0x4a90bb['item'];_0x5ea654=_0x5ea654||_0x1e3048['isContent'](_0x1e8bc8);const _0x4988fa=_0x2d6b4c['mapper']['toViewElement'](_0x1e8bc8);if(_0x4988fa&&_0x4988fa['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4a90bb['type']&&(_0x1e3048['isBlock'](_0x1e8bc8)&&!_0x1e3048['isLimit'](_0x1e8bc8)&&(_0x1e8bc8['nextSibling']||_0x455a35['isAtEnd']?_0xa4ac18&&_0xa4ac18['parent']==_0x1e8bc8||(_0xa4ac18=_0x1e8bc8,_0x4ea578(_0x4a90bb['previousPosition']),_0x5ab850=!0x0):_0x3abd9e=_0x3abd9e||_0x4a90bb['previousPosition']));}function _0x4ea578(_0x42e75e){const _0x155599=_0x2d6b4c['mapper']['toViewPosition'](_0x42e75e),_0x3af25a=_0x2d6b4c['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2d5eac});_0x2d6b4c['writer']['insert'](_0x155599,_0x3af25a),_0x2d6b4c['mapper']['bindElementToMarker'](_0x3af25a,_0x31f940['markerName']);}_0x5ea654||_0x5ab850||!_0x3abd9e||_0x4ea578(_0x3abd9e);};}var Ft=class extends _0x1ddd1c{constructor(_0x55eafb){super(_0x55eafb);const _0x94bfb3=_0x55eafb['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x94bfb3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x94bfb3,'change:isEnabled',()=>this['refresh']());}execute(){const _0x3dfd4c=this['editor'],_0x2debda=_0x3dfd4c['plugins']['get'](Pt),_0x22e5aa=_0x2debda['isReady']?_0x2debda['diff']['newRevisionId']:null;_0x3dfd4c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x22e5aa);}['refresh'](){const {isReady:_0x590ab4,isEnabled:_0x3160a0,repository:_0x1fbf19,diff:_0x560e5a}=this['editor']['plugins']['get'](Pt),_0x145a16=_0x560e5a&&_0x1fbf19['getLaterVisibleRevision'](_0x560e5a['newRevisionId']);this['isEnabled']=_0x590ab4&&_0x3160a0&&Boolean(_0x145a16);}},$t=class extends _0x1ddd1c{_step;constructor(_0x1874c5,{direction:_0x517533}){super(_0x1874c5);const _0x5a714f=_0x1874c5['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x517533?0x1:-0x1,this['listenTo'](_0x5a714f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5a714f,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5a714f,'change:activeChange',()=>this['refresh']());}execute(){const _0x26835a=this['editor'],_0x362ac2=_0x26835a['plugins']['get'](Pt),{isNavigationMode:_0x2f921f,currentChangeNumber:_0x36797f}=_0x362ac2;let _0x4ab517;if(_0x362ac2['activeChange']=_0x2f921f?_0x362ac2['diff']['changes']['get'](_0x36797f+this['_step']):_0x362ac2['diff']['changes']['first'],_0x362ac2['activeChange']['data']['isOnRoot'])_0x4ab517=_0x26835a['editing']['view']['getDomRoot'](_0x362ac2['activeChange']['rootName']);else{const _0x48a896=_0x26835a['model']['markers']['get']('revision:'+_0x362ac2['activeChange']['id']);_0x4ab517=_0x3ec3b7(_0x26835a['editing'],_0x48a896);}_0x98e9d6({'target':_0x4ab517,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x37987b,currentChangeNumber:_0x2d48c0,numberOfChanges:_0x5f26a2,isReady:_0x434610,isEnabled:_0x1259ed}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x1259ed&&_0x434610&&_0x5f26a2)&&(!_0x37987b||(0x1===this['_step']?_0x2d48c0<_0x5f26a2-0x1:_0x2d48c0>0x0));}},Bt=class extends dt{constructor(_0x2027d9){super(_0x2027d9);const _0x310704=this['bindTemplate'],_0x321334=new _0xfa6b1(_0x2027d9),_0x54a452=new _0xfa6b1(_0x2027d9);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',(_0x52ecfa,_0xaeb4c2)=>_0x52ecfa&&_0xaeb4c2>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x585848,_0x43798b,_0x260b64,_0x31d975)=>{if(!_0x585848)return kt(_0x2027d9,'Loading...');if(!_0x260b64)return kt(_0x2027d9,'No\x20changes');const _0x1ccf4c=kt(_0x2027d9,'NUMBER_OF_CHANGES',_0x260b64);return _0x31d975?kt(_0x2027d9,'X_OF_Y_CHANGES',[_0x43798b+0x1,_0x260b64]):_0x1ccf4c;}),_0x321334['set']({'label':kt(_0x2027d9,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x343c90}),_0x54a452['set']({'label':kt(_0x2027d9,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4a149a}),_0x321334['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x54a452['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x321334['on']('execute',()=>this['fire']('execute','backward')),_0x54a452['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',_0x310704['if']('_isStatusLabelVisible','ck-hidden',_0x36cc7a=>!_0x36cc7a)]},'children':[{'text':_0x310704['to']('isNavigationMode',_0x20196a=>_0x20196a?kt(_0x2027d9,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x2027d9,'Total')+':\x20')}]},{'text':_0x310704['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x321334,_0x54a452]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1845c8=this['editor']['editing']['view'];_0x1845c8['change'](_0x1afb52=>{for(const _0x48037a of _0x1845c8['document']['roots'])_0x1afb52['addClass'](jt,_0x48037a);});}['hide'](){const _0x2c8e25=this['editor']['editing']['view'];_0x2c8e25['change'](_0x1ef3b7=>{for(const _0xe3c171 of _0x2c8e25['document']['roots'])_0x1ef3b7['removeClass'](jt,_0xe3c171);});}},Kt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x50d73d=this['editor'],_0x112858=_0x50d73d['plugins']['get'](Pt),_0x3fba4f=_0x50d73d['plugins']['get'](Gt);_0x50d73d['ui']['componentFactory']['add']('exitToEditing',_0x535b67=>{const _0x3335a2=new _0xfa6b1(_0x535b67);return _0x3335a2['set']({'label':kt(_0x535b67,'Back\x20to\x20editing'),'icon':_0x2a5c35,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3335a2,'execute',()=>{_0x50d73d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3335a2;}),_0x50d73d['ui']['componentFactory']['add']('restoreRevision',_0x14b59f=>{const _0x239c11=new _0xfa6b1(_0x14b59f);return _0x239c11['set']({'label':kt(_0x14b59f,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x239c11['bind']('isEnabled')['to'](_0x50d73d['commands']['get']('restoreRevision')),this['listenTo'](_0x239c11,'execute',()=>_0x50d73d['execute']('restoreRevision')),_0x239c11;}),_0x50d73d['ui']['componentFactory']['add']('changesNavigation',_0x42bcf6=>{const _0x4b75e7=new Bt(_0x42bcf6),_0x47c20d=_0x50d73d['commands']['get']('showPreviousChange'),_0x14288f=_0x50d73d['commands']['get']('showNextChange');return _0x4b75e7['bind']('isBackwardNavigationEnabled')['to'](_0x47c20d,'isEnabled'),_0x4b75e7['bind']('isForwardNavigationEnabled')['to'](_0x14288f,'isEnabled'),_0x4b75e7['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x112858),this['listenTo'](_0x4b75e7,'execute',(_0x2d4632,_0x15524)=>{_0x50d73d['execute']('forward'===_0x15524?'showNextChange':'showPreviousChange');}),_0x4b75e7;}),_0x3fba4f['show'](),_0x112858['on']('change:isReady',(_0x2ca756,_0x181877,_0x4b0d7f)=>{_0x4b0d7f?_0x3fba4f['hide']():_0x3fba4f['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x60b761,_0x26ec76){super(_0x60b761,_0x26ec76);const _0x240262=this['bindTemplate'];this['set']({'label':kt(_0x60b761,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x60b761,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x240262['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x354550(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x115e66=this['fieldView']['element'];this['_tooltipString']=_0x115e66['scrollWidth']>_0x115e66['clientWidth']&&_0x115e66['value']||'';}},Yt=class extends dt{constructor(_0xb584c4,_0x516e6b,_0x45ab60){super(_0xb584c4);const _0x52a001=new _0x4c1208();_0x52a001['set']({'content':_0xac3ad6,'viewBox':'0\x200\x2011\x2010'});const _0x1c2569=['ck','ck-revision-history-sidebar__revision-author'];_0x45ab60&&_0x1c2569['push']('ck-revision-history-sidebar__revision-author_creator');const _0x188339=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0xb584c4,_0x45ab60?'Revision\x20creator':'Revision\x20author')},'children':[_0x52a001,_0x516e6b['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x1c2569},'children':_0x188339});}};function Jt(_0x190944,_0x46c3ea){const _0x344fe0=_0x190944['bindTemplate'],_0xde079a=_0x190944['locale'],_0x46e7fc=vt(_0xde079a);_0x46e7fc['panelPosition']='sw';const _0x31f369=function(_0x4a60fd,_0xd268f2){const _0x15e9d7=function(_0x2d6a97,_0x1635dd){const _0x466d8c=_0x2d6a97['locale'],_0x1b58d6={'Compare\x20against\x20selected':kt(_0x466d8c,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x466d8c,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x466d8c,'Restore\x20this\x20revision')};return _0x1635dd['map'](_0x3f9c17=>{const _0x34425e=_0x1b58d6[_0x3f9c17['name']];return _0x34425e&&_0x34425e!==_0x3f9c17['name']&&(_0x3f9c17['name']=_0x34425e),_0x3f9c17;});}(_0x4a60fd,_0xd268f2),_0x13f3d8=new _0x520f62();for(const _0x1b91d2 of _0x15e9d7){const _0x2b5e85={'type':'button','model':new ut({'label':_0x1b91d2['name'],'class':_0x1b91d2['class'],'withText':!0x0,'role':'menuitem','_action':_0x1b91d2['action']})};_0x2b5e85['model']['bind']('isEnabled')['to'](_0x4a60fd,'isActionsDropdownOpen',_0x5f4ad9=>'function'!=typeof _0x1b91d2['isEnabled']||(!_0x5f4ad9||_0x1b91d2['isEnabled'](_0x4a60fd))),_0x13f3d8['add'](_0x2b5e85);}return _0x13f3d8;}(_0x190944,_0x46c3ea);return _0x190944['bind']('isActionsDropdownOpen')['to'](_0x46e7fc,'isOpen'),_0x46e7fc['buttonView']['set']({'label':kt(_0xde079a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x467e7d}),_0x46e7fc['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x344fe0['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x344fe0['to'](_0x354c11=>_0x354c11['stopPropagation']())}}),_0x46e7fc['on']('execute',_0x2039f5=>{_0x190944['isReady']&&'function'==typeof _0x2039f5['source']['_action']&&_0x2039f5['source']['_action'](_0x190944);}),ft(_0x46e7fc,_0x31f369,{'role':'menu'}),_0x46e7fc['listenTo'](_0x190944,'change:isActionsDropdownOpen',(_0x3a4031,_0x2bd758,_0x39af69)=>{if(_0x39af69)for(const _0xf53b87 of _0x46e7fc['listView']['items']){const _0xec71e5=_0xf53b87['children']['first'],_0x5ef007=_0x46c3ea['find'](_0x58a5e1=>_0x58a5e1['action']===_0xec71e5['_action'])['isVisible'];_0xf53b87['isVisible']=void 0x0===_0x5ef007||_0x5ef007(_0x190944);}}),_0x46e7fc;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x43ed20(dt);var Xt=class extends Wt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0xebe67c,_0x4c0744,_0x57497b,_0x3f5ff8,_0x534a0d=!0x1){super(_0xebe67c);const _0x3b8592=this['bindTemplate'],_0x4d1d00=function(_0x103afc,_0x1098c0){const _0x10b460=Array['from'](_0x1098c0['authors'])['filter'](_0x4f2bc3=>_0x4f2bc3!=_0x1098c0['creator']);return _0x1098c0['creator']&&_0x10b460['unshift'](_0x1098c0['creator']),_0x10b460['map'](_0x53a4e3=>new Yt(_0x103afc,_0x53a4e3,_0x53a4e3==_0x1098c0['creator']));}(_0xebe67c,_0x4c0744);this['id']=_0x4c0744['id'],this['_revision']=_0x4c0744,this['_requireRevisionName']=_0x3f5ff8,this['bind']('_isAiGenerated')['to'](_0x4c0744,'attributes',_0x1ecf3b=>!(!_0x1ecf3b||!_0x1ecf3b['@ai'])),this['bind']('name','createdAt')['to'](_0x4c0744),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2354a6=>{return _0xe3ac46=_0xebe67c['uiLanguage'],(_0x3316ea=_0x2354a6)['toLocaleDateString'](_0xe3ac46,{'month':'long','day':'numeric'})+',\x20'+_0x3316ea['toLocaleTimeString'](_0xe3ac46,{'hour':'numeric','minute':'numeric'});var _0xe3ac46,_0x3316ea;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new qt(_0xebe67c,gt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3d3489=>_0x3d3489||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x3aec9d,_0x45eb50)=>_0x3aec9d&&_0x45eb50),this['revisionActionsView']=_0x57497b&&_0x57497b['length']?Jt(this,_0x57497b):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x534a0d?this['_createAiPillView'](_0xebe67c):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x3b8592['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x3b8592['if']('isEnabled','ck-disabled',_0x2d2521=>!_0x2d2521),_0x3b8592['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x3b8592['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x3b8592['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':_0x3b8592['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':_0x4d1d00}]},..._0x534a0d?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x3b8592['if']('_isAiGenerated','ck-hidden',_0x3b71f9=>!_0x3b71f9)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x3b8592['to'](_0x2ecd03=>{_0x2ecd03['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x3da415){const _0x3ba17d=new _0x1d0883(_0x3da415);return _0x3ba17d['set']({'icon':_0x2d837c,'label':kt(_0x3da415,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':kt(_0x3da415,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0x3ba17d['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x3ba17d;}['render'](){super['render']();const _0x51379b=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x51379b,'change',()=>{this['_requireRevisionName']&&!_0x51379b['value']||this['fire']('setName',{'id':this['id'],'name':_0x51379b['value']}),_0x51379b['value']||(_0x51379b['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(_0x5ea2cd,_0xa57d37){const _0x557dee=wt['fromJSDate'](_0x5ea2cd)['setLocale'](_0xa57d37),_0x4bca50=wt['local'](),_0x3f8e34=_0x4bca50['minus']({'days':0x1})['startOf']('day');let _0x2ad872,_0x1eb737;return _0x557dee['hasSame'](_0x4bca50,'day')?(_0x2ad872=_0x557dee['startOf']('day')['toJSDate'](),_0x1eb737=_0x557dee['toRelativeCalendar']()):_0x557dee['hasSame'](_0x3f8e34,'day')?(_0x2ad872=_0x3f8e34['toJSDate'](),_0x1eb737=_0x557dee['toRelativeCalendar']()):_0x557dee['hasSame'](_0x4bca50,'week')?(_0x2ad872=_0x557dee['startOf']('week')['toJSDate'](),_0x1eb737=_0x557dee['weekdayLong']||''):_0x557dee['hasSame'](_0x4bca50,'year')?(_0x2ad872=_0x557dee['startOf']('month')['toJSDate'](),_0x1eb737=_0x557dee['monthLong']||''):(_0x2ad872=_0x557dee['startOf']('year')['toJSDate'](),_0x1eb737=String(_0x557dee['year'])),{'startDate':_0x2ad872,'localizedPeriodName':_0x1eb737};}var zt=class extends dt{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x4e6932,_0x403988,_0x295012,_0xca6cb2,_0x2b2dca){super(_0x4e6932);const _0x54dec6=Qt(_0x403988,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x403988,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x295012,this['_requireRevisionName']=_0xca6cb2,this['_showAISource']=_0x2b2dca,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':_0x54dec6}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x48af33){const _0x53426c=new Xt(this['locale'],_0x48af33,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x53426c);}['removeRevision'](_0x36eb43){const _0x544a31=this['revisionViews']['find'](_0x260241=>_0x260241['id']===_0x36eb43['id']);this['revisionViews']['remove'](_0x544a31);}},Zt=class extends dt{constructor(_0x501296){super(_0x501296);const _0x3eca28=new _0x4c1208();_0x3eca28['content']=_0x1f6913,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x3eca28,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[kt(_0x501296,'Revision\x20history')]}]});}},ti=class extends dt{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x1ef719,_0x4debd3,_0x1992da,_0x2a3d7b,_0x33367d){super(_0x1ef719);const _0x255b99=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x4debd3,this['_revisionActions']=_0x1992da,this['_requireRevisionName']=_0x2a3d7b,this['_showAISource']=_0x33367d,this['on']('select',(_0x1a6616,_0x5451b3)=>{this['fire']('revisionSelected',_0x5451b3);}),this['on']('setName',(_0x43936a,_0x4c1ecb)=>{this['fire']('revisionSetName',_0x4c1ecb);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Zt(_0x1ef719),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x255b99['if']('isEnabled','ck-disabled',_0x51414f=>!_0x51414f)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x1c4b4c of this['_revisions'])this['_addRevision'](_0x1c4b4c);this['_revisions']['on']('add',(_0x300622,_0x5beab2)=>{this['_addRevision'](_0x5beab2);}),this['_revisions']['on']('remove',(_0x1480c8,_0x466fe9)=>{this['_removeRevision'](_0x466fe9);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x1457df=>_0x1457df['revisionViews']['map'](_0x340da3=>_0x340da3))['flat']();}selectRevision(_0x5bff4){for(const _0x1e4458 of this['revisionViews'])_0x5bff4&&_0x5bff4['id']===_0x1e4458['id']?_0x1e4458['select']():_0x1e4458['deselect']();}highlightRevisions(_0x5e76d2){for(const _0x5ea673 of this['revisionViews'])_0x5e76d2['some'](({id:_0x2eaab2})=>_0x2eaab2===_0x5ea673['id'])?_0x5ea673['highlight']():_0x5ea673['unhighlight']();}['_addRevision'](_0x48eeeb){const _0xe11b17=Qt(_0x48eeeb['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x14e8f9=this['_getTimePeriodViewByStartDate'](_0xe11b17);_0x14e8f9||(_0x14e8f9=new zt(this['locale'],_0xe11b17,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x14e8f9)),_0x14e8f9['addRevision'](_0x48eeeb);}['_removeRevision'](_0xfa6a69){const _0x50cb0f=Qt(_0xfa6a69['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x50cb0f)['removeRevision'](_0xfa6a69);}_getTimePeriodViewByStartDate(_0x2ed97c){return this['timePeriodViews']['find'](_0x106396=>_0x106396['startDate']['getTime']()===_0x2ed97c['getTime']());}},ii=class RevisionsSidebar extends _0x3ccb16{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(
|
|
30
|
-
_0x5b3859(_0x55a2d6);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4e4804,_0x4b70dd){super(_0x4b70dd),this['sourceElement']=_0x4e4804,this['model']['document']['createRoot']();const _0x3b4694=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x3b4694);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x1716dc,_0x1c081d){const _0x48611d=new this(_0x1716dc,_0x1c081d);return await _0x48611d['initPlugins'](),await _0x48611d['ui']['init'](_0x1716dc),await _0x48611d['data']['init'](_0x48611d['config']['get']('initialData')||''),_0x48611d['fire']('ready'),_0x48611d;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0xc765d1{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x36d022){super(_0x36d022),this['result']='end',_0x36d022['editing']['view']['_overlayModeHint']='auto',_0x36d022['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0xc765d1{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0x35c8e4){if(super(_0x35c8e4),!this['editor']['config']['get']('revisionHistory'))throw new _0x281a56('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x5a5178=>this['_showRevisionViewer']({..._0x5a5178,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x52477d=>this['_closeRevisionViewer'](_0x52477d)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x231f07=>this['_restoreRevision'](_0x231f07)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0xb5adfc){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0xb5adfc;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x2f43a1){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x2f43a1);}getRevision(_0x5dd474){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x5dd474);}getRevisions(_0x47a9ca){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x47a9ca||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x6d1b16=this['editor'],_0x15124b=_0x160cfa(_0x6d1b16,ai),_0x543288=_0x6d1b16['plugins']['get']('RevisionTracker'),_0xa0c815=_0x6d1b16['plugins']['get'](_0x369e38)['users'];return _0x15124b['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x15124b['lazyRoots'],(_0x15124b['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0xc765d1{static get requires(){return[Pt,_0x369e38];}init(){const _0x3d3a2d=this['editor']['plugins']['get'](_0x369e38);for(const _0x1af7e6 of _0xa0c815)_0x1af7e6['isAnonymous']||_0x3d3a2d['getUser'](_0x1af7e6['id'])||_0x3d3a2d['addUser'](_0x1af7e6);const _0x35d18f=_0x543288['repository']['getRevisions']();let _0x334351=null;const _0x3b1b8b=this['editor']['plugins']['get']('RevisionViewer');if(_0x3b1b8b['adapter']=_0x543288['adapter'],_0x3b1b8b['bind']('isEnabled')['to'](_0x543288),_0x6d1b16['plugins']['has']('CommentsRepository')){const _0x2e95e5=_0x6d1b16['plugins']['get']('CommentsRepository');_0x3b1b8b['_getVisibleCommentThreadIds']=()=>new Set(_0x2e95e5['getCommentThreads']()['filter'](_0x5b6822=>!_0x5b6822['isResolved'])['map'](_0x326f48=>_0x326f48['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x6d1b16,'isReadOnly',_0x1d0003=>!_0x1d0003);for(const _0x3ee69f of _0x35d18f){const _0x206171=null===_0x3ee69f['creator'];if(_0x206171&&_0x3ee69f['toVersion']===_0x3ee69f['fromVersion'])continue;const _0x244f35=_0x3ee69f['toJSON']();_0x3b1b8b['addRevisionData'](_0x244f35,(_0x27ccd0,_0x49bc72,_0x32541c)=>{if(_0x206171){if(_0x334351)_0x334351['_update'](_0x27ccd0,_0x49bc72);else{if(!_0x49bc72){const _0x2df943=_0x32541c['toJSON']();_0x2df943['id']=_0x27f7da(),_0x543288['saveRevision'](_0x2df943,_0x32541c['toVersion'])['then'](_0x48dc03=>{_0x334351=_0x48dc03;});}}}else _0x3ee69f['_update'](_0x27ccd0,_0x49bc72);});}}},ii),_0x15124b);}['_enhanceShowRevisionViewerCallback'](){const _0x1a6868=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x438e52=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x438e52['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5b17f7=this['editor']['plugins']['get']('Dialog');_0x5b17f7['isOpen']&&_0x5b17f7['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5f07b2=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x30cbf1 of _0x5f07b2)_0x30cbf1['class']=_0x30cbf1['class']?_0x30cbf1['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x21c6c9=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x21c6c9&&_0x21c6c9['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x21ee03=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x21ee03&&_0x21ee03['setAttribute']('tabindex','-1');}}const _0x39e32a=this['_getRevisionViewerEditorConfig']();return _0x1a6868(_0x39e32a)['then'](_0xa32abf=>(this['_viewerEditor']=_0xa32abf,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'),_0xa32abf))['catch'](_0x130df5=>(console['error'](_0x130df5),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x319f55=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 _0x5a73f8=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x5981e6 of _0x5a73f8)_0x5981e6['class']='ck-tab-panel_disabled'===_0x5981e6['class']?'':_0x5981e6['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x246980=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x246980&&_0x246980['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x9c880a=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x9c880a&&_0x9c880a['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x319f55(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x157228=this['editor']['plugins']['get']('Annotations');_0x157228['refreshVisibility'](),_0x157228['refreshPositioning']();}});});}['_showRevisionViewer'](_0x52f06e){const _0x5ee7e8=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xd75202=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3be389=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x3be389,_0x52f06e)['then'](_0x3a315d=>(_0xd75202['style']['display']='block',_0x5ee7e8['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3a315d));}['_closeRevisionViewer'](_0x201513){const _0x3fd3f7=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3fd3f7['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x201513['destroy']();}async _restoreRevision(_0x101a2c){const _0x398fc9=this['editor'],_0x4ab284=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3faff8=_0x398fc9['plugins']['get']('RevisionTracker'),_0x63a06e=_0x398fc9['plugins']['get']('RevisionHistoryUtils'),_0x243c5a=_0x4ab284['repository']['getRevision'](_0x101a2c);let _0x5a9b48,_0x25d2bd,_0x23f7e9;try{await _0x63a06e['loadRevisionData'](_0x243c5a,this['adapter']),_0x5a9b48=_0x63a06e['getRevisionDocumentData'](_0x243c5a),_0x25d2bd=_0x63a06e['getRevisionRootsAttributes'](_0x243c5a);}catch(_0x3f912c){return void console['error'](_0x3f912c);}_0x398fc9['model']['change'](_0xe409d6=>{for(const _0x25a467 of Array['from'](_0x398fc9['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xe409d6['removeMarker'](_0x25a467);}),_0x4ab284['isReady']=!0x1,_0x398fc9['model']['enqueueChange'](_0x1c9145=>{_0x1c9145['setSelection'](null),_0x1c9145['removeSelectionAttribute'](_0x398fc9['model']['document']['selection']['getAttributeKeys']());const _0xe7a21b=Object['keys'](_0x5a9b48);for(const _0x29ab9f of _0x398fc9['model']['document']['roots'])'$graveyard'!=_0x29ab9f['rootName']&&_0x29ab9f['isAttached']()&&!_0xe7a21b['includes'](_0x29ab9f['rootName'])&&_0x1c9145['detachRoot'](_0x29ab9f);for(const _0xaf3b4c of _0xe7a21b){let _0x1a91c8=_0x398fc9['model']['document']['getRoot'](_0xaf3b4c);if(!_0x1a91c8||!_0x1a91c8['isAttached']()){const _0x2b15a2=_0x243c5a['diffData']?.[_0xaf3b4c]?.['rootElementName']||'$root';_0x1a91c8=_0x1c9145['addRoot'](_0xaf3b4c,_0x2b15a2);}const _0x1bd96e=_0x25d2bd[_0xaf3b4c],_0x1696a8=Object['keys'](_0x1bd96e),_0x3479f6=_0x5a9b48[_0xaf3b4c];for(const _0x1e945e of _0x1a91c8['getAttributeKeys']())_0x1696a8['includes'](_0x1e945e)||_0x1c9145['removeAttribute'](_0x1e945e,_0x1a91c8);for(const _0x483ee9 of _0x1696a8)_0x1c9145['setAttribute'](_0x483ee9,_0x25d2bd[_0xaf3b4c][_0x483ee9],_0x1a91c8);_0x1c9145['remove'](_0x1c9145['createRangeIn'](_0x1a91c8)),_0x1c9145['insert'](_0x398fc9['data']['parse'](_0x3479f6,_0x1a91c8),_0x1a91c8,0x0);}});const _0x52bdd7=kt(_0x398fc9['locale'],'Restored');if(_0x243c5a['name'])_0x23f7e9=-0x1==_0x243c5a['name']['indexOf'](_0x52bdd7)?_0x52bdd7+':\x20'+_0x243c5a['name']:_0x243c5a['name'];else _0x23f7e9=_0x52bdd7+':\x20'+(_0x243c5a['createdAt']['toLocaleDateString'](_0x398fc9['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x243c5a['createdAt']['toLocaleTimeString'](_0x398fc9['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3faff8['saveRevision']({'name':_0x23f7e9}),_0x4ab284['isReady']=!0x0,_0x398fc9['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|
|
29
|
+
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(_0x1d0d2e){super(_0x1d0d2e),this['_revisionViewer']=_0x1d0d2e['plugins']['get'](Pt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x3e0307=this['_revisionsRepository']['_revisions'],_0x38776d=this['_createRevisionActions'](),_0x38c2da=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ti(this['editor']['locale'],_0x3e0307,_0x38776d,this['editor']['config']['get']('revisionHistory.requireRevisionName'),'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x32f46c,_0x342beb)=>{_0x342beb['revisionViews']['on']('add',(_0x14165b,_0x3c9f2f)=>{_0x3c9f2f['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)),_0x38c2da['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x224849=this['_revisionsRepository']['getRevision'](0x0);if(_0x224849){const _0x52624d=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x224849['id']);this['_revisionViewer']['compare'](_0x224849,_0x52624d);}}_handleRevisionSelected(_0x3c3720,_0x10ab10){const _0x35fa90=this['_revisionsRepository']['getRevision'](_0x10ab10['id']),_0x883441=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x35fa90['id']);this['_revisionViewer']['compare'](_0x35fa90,_0x883441);}_handleRevisionSetName(_0x27bd76,_0x1ffa82){this['_revisionsRepository']['getRevision'](_0x1ffa82['id'])['setName'](_0x1ffa82['name']);}['_handleDiffChange'](_0x16865a,_0x4e7205,_0x4a0a56){const _0xf73b5b=this['_revisionsRepository']['getRevisionsInDiff'](_0x4a0a56);_0xf73b5b['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0xf73b5b),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0xf73b5b[0x0]));}_createRevisionActions(){const _0x45fbdc=this['editor'],_0x397b20=RevisionsSidebar['availableRevisionActions'],_0x505fd7=_0x45fbdc['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x505fd7['length'])return _0x505fd7['map'](_0x513b40=>{const _0x4fd659='string'==typeof _0x513b40?Object['assign']({},_0x397b20[_0x513b40]):_0x513b40;return _0x4fd659['action']=_0x4fd659['action']['bind'](this,_0x45fbdc),_0x4fd659['isVisible']&&(_0x4fd659['isVisible']=_0x4fd659['isVisible']['bind'](this,_0x45fbdc)),_0x4fd659;});}};function ei(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x5928c1},_0x3b62e0)=>{const _0xb3fd65=_0x5928c1['get'](Pt),_0x25ad54=_0xb3fd65['repository'];let _0xc1a238=_0xb3fd65['diff']['newRevisionId'],_0x459bc6=_0x3b62e0['id'];_0x25ad54['getIndex'](_0xc1a238)>_0x25ad54['getIndex'](_0x459bc6)&&([_0xc1a238,_0x459bc6]=[_0x459bc6,_0xc1a238]),_0xb3fd65['compare'](_0xc1a238,_0x459bc6);},'isVisible':({plugins:_0xca102},_0x46db73)=>{const _0x21f517=_0xca102['get'](Pt);return!(_0x21f517['repository']['getRevisionsInDiff'](_0x21f517['diff'])['length']>0x2)&&!_0x46db73['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x3d5089,{id:_0x59c942})=>{_0x3d5089['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x59c942);},'isVisible':({plugins:_0x8924be},_0xee06eb)=>!!_0x8924be['get'](Pt)['repository']['getLaterVisibleRevision'](_0xee06eb['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x5e6d74},{id:_0x1bcba1,revisionNameView:_0x3890c1})=>{const _0x15136c=_0x5e6d74['get'](Pt),_0x2d2007=_0x15136c['repository']['getEarlierVisibleRevision'](_0x1bcba1);_0x15136c['compare'](_0x1bcba1,_0x2d2007),_0x3890c1['focus'](),_0x3890c1['fieldView']['select']();}}};}var si=class extends _0x598841{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x8974b0,_0x535e53){super(_0x8974b0),this['_view']=_0x535e53,this['_toolbarConfig']=mt(_0x8974b0['config']['get']('toolbar')),this['_elementReplacer']=new _0x2e3fd6();}get element(){return this['view']['element'];}init(_0x85f64a){const _0x100e3d=this['editor'],_0xd16af2=this['view'],_0x4f20ec=_0x100e3d['editing']['view'],_0x2e8c4f=_0xd16af2['editable'];_0x2e8c4f['name']=_0x4f20ec['document']['getRoot']()['rootName'],_0x2e8c4f['isMainFrameEditingRoot']=!0x0,_0xd16af2['render']();const _0x1dc69f=_0x2e8c4f['element'];this['setEditableElement'](_0x2e8c4f['name'],_0x1dc69f),_0xd16af2['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4f20ec['attachDomRoot'](_0x1dc69f),this['_elementReplacer']['replace'](_0x85f64a,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x108932=this['view'],_0x281e74=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x281e74['detachDomRoot'](_0x108932['editable']['name']),_0x108932['destroy']();}_initToolbar(){const _0x39adf5=this['view'];_0x39adf5['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x39adf5['stickyPanel']['limiterElement']=_0x39adf5['element'],_0x39adf5['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x57073d})=>_0x57073d),_0x39adf5['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x39adf5['toolbar']);}},ni=class extends _0x268072{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x5b1e4,_0x105fb7,_0x4bd249={}){super(_0x5b1e4),this['stickyPanel']=new ht(_0x5b1e4),this['toolbar']=new lt(_0x5b1e4,{'shouldGroupWhenFull':_0x4bd249['shouldToolbarGroupWhenFull']}),this['_editable']=new tt(_0x5b1e4,_0x105fb7);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const oi=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x4c30f1(_0x3a29f8);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x16c097,_0x48771c){super(_0x48771c),this['sourceElement']=_0x16c097,this['model']['document']['createRoot']();const _0x228d92=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x228d92);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x48ef14,_0x363dc7){const _0x19d298=new this(_0x48ef14,_0x363dc7);return await _0x19d298['initPlugins'](),await _0x19d298['ui']['init'](_0x48ef14),await _0x19d298['data']['init'](_0x19d298['config']['get']('initialData')||''),_0x19d298['fire']('ready'),_0x19d298;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x3ccb16{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f842d){super(_0x4f842d),this['result']='end',_0x4f842d['editing']['view']['_overlayModeHint']='auto',_0x4f842d['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x3ccb16{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0xcb1678){if(super(_0xcb1678),!this['editor']['config']['get']('revisionHistory'))throw new _0x24e679('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x36050d=>this['_showRevisionViewer']({..._0x36050d,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x34ccca=>this['_closeRevisionViewer'](_0x34ccca)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3852dd=>this['_restoreRevision'](_0x3852dd)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x501aa4){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x501aa4;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0xeb7e72){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0xeb7e72);}getRevision(_0x51e869){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x51e869);}getRevisions(_0x5a36a6){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x5a36a6||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x11e8d6=this['editor'],_0x50efee=_0x1d9224(_0x11e8d6,ai),_0x1affb0=_0x11e8d6['plugins']['get']('RevisionTracker'),_0x208337=_0x11e8d6['plugins']['get'](_0x312567)['users'];return _0x50efee['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x50efee['lazyRoots'],(_0x50efee['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x3ccb16{static get requires(){return[Pt,_0x312567];}init(){const _0x7c2282=this['editor']['plugins']['get'](_0x312567);for(const _0x270442 of _0x208337)_0x270442['isAnonymous']||_0x7c2282['getUser'](_0x270442['id'])||_0x7c2282['addUser'](_0x270442);const _0x5caa6d=_0x1affb0['repository']['getRevisions']();let _0x3d6209=null;const _0x26e74f=this['editor']['plugins']['get']('RevisionViewer');if(_0x26e74f['adapter']=_0x1affb0['adapter'],_0x26e74f['bind']('isEnabled')['to'](_0x1affb0),_0x11e8d6['plugins']['has']('CommentsRepository')){const _0x139c31=_0x11e8d6['plugins']['get']('CommentsRepository');_0x26e74f['_getVisibleCommentThreadIds']=()=>new Set(_0x139c31['getCommentThreads']()['filter'](_0x8afde2=>!_0x8afde2['isResolved'])['map'](_0x1fd5aa=>_0x1fd5aa['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x11e8d6,'isReadOnly',_0x93d2de=>!_0x93d2de);for(const _0x1c6577 of _0x5caa6d){const _0x60e1df=null===_0x1c6577['creator'];if(_0x60e1df&&_0x1c6577['toVersion']===_0x1c6577['fromVersion'])continue;const _0x5c0057=_0x1c6577['toJSON']();_0x26e74f['addRevisionData'](_0x5c0057,(_0x5c15a2,_0x4d65fd,_0x3fff0a)=>{if(_0x60e1df){if(_0x3d6209)_0x3d6209['_update'](_0x5c15a2,_0x4d65fd);else{if(!_0x4d65fd){const _0x1ce953=_0x3fff0a['toJSON']();_0x1ce953['id']=_0x5289a7(),_0x1affb0['saveRevision'](_0x1ce953,_0x3fff0a['toVersion'])['then'](_0x16fa81=>{_0x3d6209=_0x16fa81;});}}}else _0x1c6577['_update'](_0x5c15a2,_0x4d65fd);});}}},ii),_0x50efee);}['_enhanceShowRevisionViewerCallback'](){const _0x3420a8=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4bec2a=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x4bec2a['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x26da66=this['editor']['plugins']['get']('Dialog');_0x26da66['isOpen']&&_0x26da66['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0xcdfe39=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3e7208 of _0xcdfe39)_0x3e7208['class']=_0x3e7208['class']?_0x3e7208['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x29f3b9=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x29f3b9&&_0x29f3b9['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3301a5=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3301a5&&_0x3301a5['setAttribute']('tabindex','-1');}}const _0x195849=this['_getRevisionViewerEditorConfig']();return _0x3420a8(_0x195849)['then'](_0x1015db=>(this['_viewerEditor']=_0x1015db,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'),_0x1015db))['catch'](_0x385bc7=>(console['error'](_0x385bc7),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x5256fa=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 _0x359149=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x526aa1 of _0x359149)_0x526aa1['class']='ck-tab-panel_disabled'===_0x526aa1['class']?'':_0x526aa1['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x34ff4d=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x34ff4d&&_0x34ff4d['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1a0a48=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1a0a48&&_0x1a0a48['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x5256fa(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4a1b76=this['editor']['plugins']['get']('Annotations');_0x4a1b76['refreshVisibility'](),_0x4a1b76['refreshPositioning']();}});});}['_showRevisionViewer'](_0x3a03e8){const _0x3b8389=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x3426fb=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x19da3e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x19da3e,_0x3a03e8)['then'](_0x204ef3=>(_0x3426fb['style']['display']='block',_0x3b8389['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x204ef3));}['_closeRevisionViewer'](_0x571df8){const _0x54664b=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x54664b['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x571df8['destroy']();}async _restoreRevision(_0x75776f){const _0x6470d7=this['editor'],_0x38d488=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2a448c=_0x6470d7['plugins']['get']('RevisionTracker'),_0x534141=_0x6470d7['plugins']['get']('RevisionHistoryUtils'),_0x4c3549=_0x38d488['repository']['getRevision'](_0x75776f);let _0x283d44,_0x30e38d,_0x2bd41e;try{await _0x534141['loadRevisionData'](_0x4c3549,this['adapter']),_0x283d44=_0x534141['getRevisionDocumentData'](_0x4c3549),_0x30e38d=_0x534141['getRevisionRootsAttributes'](_0x4c3549);}catch(_0x298811){return void console['error'](_0x298811);}_0x6470d7['model']['change'](_0x2b4b9d=>{for(const _0x48a31e of Array['from'](_0x6470d7['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2b4b9d['removeMarker'](_0x48a31e);}),_0x38d488['isReady']=!0x1,_0x6470d7['model']['enqueueChange'](_0x49cf49=>{_0x49cf49['setSelection'](null),_0x49cf49['removeSelectionAttribute'](_0x6470d7['model']['document']['selection']['getAttributeKeys']());const _0x169d64=Object['keys'](_0x283d44);for(const _0x4991b1 of _0x6470d7['model']['document']['roots'])'$graveyard'!=_0x4991b1['rootName']&&_0x4991b1['isAttached']()&&!_0x169d64['includes'](_0x4991b1['rootName'])&&_0x49cf49['detachRoot'](_0x4991b1);for(const _0x46aad4 of _0x169d64){let _0x148e2f=_0x6470d7['model']['document']['getRoot'](_0x46aad4);if(!_0x148e2f||!_0x148e2f['isAttached']()){const _0x408359=_0x4c3549['diffData']?.[_0x46aad4]?.['rootElementName']||'$root';_0x148e2f=_0x49cf49['addRoot'](_0x46aad4,_0x408359);}const _0x3ec03b=_0x30e38d[_0x46aad4],_0x2380ac=Object['keys'](_0x3ec03b),_0x404a51=_0x283d44[_0x46aad4];for(const _0x1106aa of _0x148e2f['getAttributeKeys']())_0x2380ac['includes'](_0x1106aa)||_0x49cf49['removeAttribute'](_0x1106aa,_0x148e2f);for(const _0x27abf8 of _0x2380ac)_0x49cf49['setAttribute'](_0x27abf8,_0x30e38d[_0x46aad4][_0x27abf8],_0x148e2f);_0x49cf49['remove'](_0x49cf49['createRangeIn'](_0x148e2f)),_0x49cf49['insert'](_0x6470d7['data']['parse'](_0x404a51,_0x148e2f),_0x148e2f,0x0);}});const _0x58611a=kt(_0x6470d7['locale'],'Restored');if(_0x4c3549['name'])_0x2bd41e=-0x1==_0x4c3549['name']['indexOf'](_0x58611a)?_0x58611a+':\x20'+_0x4c3549['name']:_0x4c3549['name'];else _0x2bd41e=_0x58611a+':\x20'+(_0x4c3549['createdAt']['toLocaleDateString'](_0x6470d7['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4c3549['createdAt']['toLocaleTimeString'](_0x6470d7['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2a448c['saveRevision']({'name':_0x2bd41e}),_0x38d488['isReady']=!0x0,_0x6470d7['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|