@ckeditor/ckeditor5-revision-history 49.1.0-alpha.0 → 49.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.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.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
|
-
_0xc0251e();var bt=class extends yt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x51cb00){super(),this['id']=_0x51cb00['id']||_0x5a9e0c(),this['creator']=_0x51cb00['creator']||null,this['authors']=_0x51cb00['authors']||[],this['diffData']=_0x51cb00['diffData']||null,this['toVersion']=_0x51cb00['toVersion']||0x0,this['fromVersion']=_0x51cb00['fromVersion']||0x0,this['set']('name',_0x51cb00['name']||''),this['set']('createdAt',_0x51cb00['createdAt']||new Date()),this['set']('attributes',_0x51cb00['attributes']||{});}setName(_0x14afdb){this['_update']({'name':_0x14afdb});}setAttribute(_0x1c49d4,_0x359800){const _0x1567e4=_0x3ef400(this['attributes']);_0x228ef7(_0x1567e4,_0x1c49d4,_0x359800),this['_update']({'attributes':_0x1567e4});}removeAttribute(_0x462d0b){const _0x2021e4=_0x3ef400(this['attributes']);_0x467441(_0x2021e4,_0x462d0b),this['_update']({'attributes':_0x2021e4});}_update(_0x8088bf,_0x36c0d6=!0x1){let _0x387b68=!0x1;const _0x5d8a59={'id':this['id']};for(const _0x171863 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x36cf10=_0x8088bf[_0x171863];void 0x0!==_0x36cf10&&_0x36cf10!==this[_0x171863]&&(this[_0x171863]=_0x36cf10,_0x5d8a59[_0x171863]=_0x36cf10,_0x387b68=!0x0);}_0x387b68&&(_0x5d8a59['authors']&&(_0x5d8a59['authorsIds']=_0x5d8a59['authors']['map'](_0x53cf6d=>_0x53cf6d['id']),delete _0x5d8a59['authors']),this['fire']('_update',_0x5d8a59,_0x36c0d6));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x29e296=>_0x29e296['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},Rt=class extends _0x3c4294{['_revisions'];static get requires(){return[_0x2c9bd7];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x46bc3b){super(_0x46bc3b),this['_revisions']=new _0x4ae41b();}afterInit(){!async function(_0x26ef8b){const _0x4b5b87='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x4f3009=0xeb829,_0x4edbc6=0x799b0,_0x1ee284={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x11db50(_0x280989){const _0x149088=new window['Promise'](_0x593b30=>{_0x280989['once']('ready',_0x593b30);}),_0xea0f56=window['Date']['now'](),_0x2d2579=_0x280989['config']['get']('licenseKey');async function _0x1ee1c5(){let _0x2c7616,_0x590885=null,_0x4fef47=null;try{return'GPL'==_0x2d2579?'NotAllowed':(_0x2c7616=_0x13db3b(),_0x2c7616?(_0x2c7616['usageEndpoint']&&(_0x4fef47=_0x4aec67(_0x2c7616['usageEndpoint'],_0x2c7616['jti'])),await _0x20c61a()?_0x30e012()?_0x4a26dd()?'Expired':_0x4f7e78()?('evaluation'==_0x2c7616['licenseType']&&(_0x590885=_0x14e9d4('EvaluationLimit')),await _0x1c46b8()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4a26dd(){const _0x531431=['evaluation','trial']['includes'](_0x2c7616['licenseType'])?_0xea0f56/0x3e8:0xe10*_0x4edbc6;return _0x2c7616['exp']<_0x531431;}function _0x30e012(){const _0xb35e42=_0x2c7616['features'];if(!_0xb35e42)return!0x1;if(_0xb35e42['includes']('*'))return!0x0;if(_0xb35e42['includes']('RH'))return!0x0;if(_0xb35e42['includes']('RRH')){if(_0x49bbce())return!0x0;if(_0x9199e1()||_0x472548())return!0x0;}return!0x1;}function _0x4f7e78(){const _0x159f57=_0x2c7616['licensedHosts'];if(!_0x159f57||0x0==_0x159f57['length'])return!0x0;const {hostname:_0x81f648}=new URL(window['location']['href']);if(_0x159f57['includes'](_0x81f648))return!0x0;const _0x4ea072=_0x81f648['split']('.');return _0x159f57['filter'](_0x414ead=>_0x414ead['includes']('*'))['map'](_0x407ad5=>_0x407ad5['split']('.'))['filter'](_0x4744ce=>_0x4744ce['length']<=_0x4ea072['length'])['map'](_0x1d5b1b=>Array(_0x4ea072['length']-_0x1d5b1b['length'])['fill']('*'===_0x1d5b1b[0x0]?'*':'')['concat'](_0x1d5b1b))['some'](_0x6238dd=>_0x4ea072['every']((_0x270e72,_0x1fc531)=>_0x6238dd[_0x1fc531]===_0x270e72||'*'===_0x6238dd[_0x1fc531]));}function _0x1c46b8(){return _0x590885&&_0x4fef47?new window['Promise']((_0x26097d,_0x12d2b0)=>{_0x590885['then'](_0x26097d,_0x12d2b0),_0x4fef47['then'](_0x78784d=>{'Valid'!=_0x78784d&&_0x26097d(_0x78784d);},_0x12d2b0);}):_0x590885||_0x4fef47||'Valid';}}function _0x4aec67(_0xf3f9aa,_0x57da00){return new window['Promise'](_0x595ce0=>{if(_0x2a58cc())return _0x595ce0('Valid');_0x370afc(),_0x280989['decorate']('_sendUsageRequest');let _0x40415e=!0x1;const _0x452bcd=_0x5a9e0c();function _0x420809(_0x5d7514){return!!_0x5d7514&&('object'==typeof _0x5d7514||'function'==typeof _0x5d7514)&&'function'==typeof _0x5d7514['then']&&'function'==typeof _0x5d7514['catch'];}function _0xbf303(_0x1af178){_0x2e2c79(_0x1af178)['then'](_0x1fe441=>_0x1fe441&&'ok'==_0x1fe441['status']?_0x5ae3c7(_0x3147e1(_0x452bcd+_0x57da00))!=_0x1fe441['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4ca7df=>(_0x5ccac3(),_0x4ca7df),()=>{const _0x5536c2=_0x503310();return null==_0x5536c2?(_0x5ccac3(),'Valid'):_0xea0f56-_0x5536c2>0x240c8400?'UsageLimit':'Valid';})['then'](_0x595ce0)['catch'](()=>{_0x595ce0('UsageLimit');});const _0x419fdd=0x36ee80;function _0x5ccac3(){const _0x2fc03e='llct-'+_0x5ae3c7(_0x3147e1(_0xf3f9aa)),_0x5afb3a=_0x3cb662(_0x5ae3c7(window['Math']['ceil'](_0xea0f56/_0x419fdd)));window['localStorage']['setItem'](_0x2fc03e,_0x5afb3a);}function _0x503310(){const _0x4a9d81='llct-'+_0x5ae3c7(_0x3147e1(_0xf3f9aa)),_0x5c7a88=window['localStorage']['getItem'](_0x4a9d81);return _0x5c7a88?window['parseInt'](_0x3cb662(_0x5c7a88),0x10)*_0x419fdd:null;}function _0x2e2c79(_0x307627){return new window['Promise']((_0x23fc0a,_0x19b3b5)=>{_0x307627['then'](_0x23fc0a,_0x19b3b5),window['setTimeout'](_0x19b3b5,0x1d4c0);});}}_0x280989['on']('_sendUsageRequest',(_0x240f3c,_0x129b7c)=>{if(_0x129b7c[0x0]!=_0xf3f9aa)return _0x595ce0('UsageLimit');_0x129b7c[0x1]={..._0x129b7c[0x1],'requestId':_0x452bcd};},{'priority':'high'}),_0x280989['on']('_sendUsageRequest',_0x1665e1=>{_0x420809(_0x1665e1['return'])&&(_0x40415e=!0x0,_0xbf303(_0x1665e1['return']));},{'priority':'low'}),_0x149088['then'](()=>{_0x40415e||_0x595ce0('UsageLimit');});});function _0x2a58cc(){return'auto'==_0x280989['editing']['view']['_overlayModeHint'];}function _0x370afc(){_0x280989['editing']['view']['_overlayModeHint']='auto';}}function _0x14e9d4(_0x3b3310){const _0x13fc75=[new window['Promise'](_0xaafb3d=>setTimeout(_0xaafb3d,0x93ecc)),_0x149088['then'](()=>new window['Promise'](_0x49c2c5=>{const _0xc0a23d=0x7,_0x5a3e5c=_0x26ef8b['_revisions'];function _0x162a35(){_0x5a3e5c['length']>=_0xc0a23d&&_0x49c2c5();}_0x162a35(),_0x5a3e5c['on']('add',_0x162a35);})),new window['Promise'](_0x49c99e=>{function _0x4bc45d(){for(const _0x547c39 in window)if(window['Number']['isNaN'](window['Number'](_0x547c39))&&window[_0x547c39]==_0x4f3009)return _0x49c99e();'destroyed'!=_0x280989['state']&&window['setTimeout'](_0x4bc45d,0x1388);}_0x3bae73('RevisionViewer')&&_0x4bc45d();})];return window['Promise']['race'](_0x13fc75)['then'](()=>_0x3b3310);}async function _0x20a8fc(){if(await _0x149088,_0x3bae73('RevisionViewer')){const _0x2f0dd1=_0x26ef8b['getRevision'](0x0),_0x1aa2f6=_0x26ef8b['getEarlierVisibleRevision'](_0x2f0dd1['id']),_0x117e03=_0x5c9491('RevisionViewer');return await _0x117e03['compare'](_0x2f0dd1['id'],_0x1aa2f6?_0x1aa2f6['id']:null,!0x0),_0x117e03['unbind']('isEnabled'),_0x117e03['isEnabled']=!0x1,_0x117e03['compare']=_0x5a7053,void(_0x117e03['_getDiff']=_0x5a7053);}if(_0x3bae73('RevisionTracker')){const _0x568de5=_0x5c9491('RevisionTracker');_0x568de5['unbind']('isEnabled'),_0x568de5['isEnabled']=!0x1,_0x568de5['update']=_0x5a7053,_0x568de5['saveRevision']=_0x5a7053;}_0x280989['model']['change']=_0x5a7053,_0x280989['model']['enqueueChange']=_0x5a7053,_0x280989['enableReadOnlyMode']('model');}function _0x49bbce(){return _0x3bae73('WebSocketGateway')&&'connected'==_0x5c9491('WebSocketGateway')['state'];}function _0x9199e1(){return _0x3bae73('RevisionViewerIntegration');}function _0x472548(){return _0x3bae73('TrackChangesDataGetter');}function _0x209306(_0x10509b){const _0xe910ed=_0x1534a9();_0x280989[_0xe910ed]='revisionHistoryLicenseKey'+_0x10509b,_0x10509b['endsWith']('Limit')&&(window[_0x1534a9()]=_0x4f3009),'Valid'!=_0x10509b&&_0x20a8fc();}function _0x1534a9(){const _0x5d8644=window['String'](window['performance']['now']())['replace']('.','');let _0x24648b='g';for(let _0xdf6443=0x0;_0xdf6443<_0x5d8644['length'];_0xdf6443+=0x2){let _0x27bb48=window['parseInt'](_0x5d8644['substring'](_0xdf6443,_0xdf6443+0x2));_0x27bb48>=0x3e&&(_0x27bb48-=0x3e),_0x24648b+=_0x4b5b87[_0x27bb48];}return _0x24648b;}function _0x13db3b(){const _0x24ff7d=_0x2d2579['split']('.');if(0x3!=_0x24ff7d['length'])return null;return _0x5421a1(_0x24ff7d[0x1]);function _0x5421a1(_0x5ba741){const _0x3e69a2=_0x4768d3(_0x5ba741);return _0x3e69a2&&_0xc400e7()?_0x3e69a2:null;function _0xc400e7(){const _0x400dca=_0x3e69a2['jti'],_0x30fff6=window['parseInt'](_0x400dca['substring'](_0x400dca['length']-0x8),0x10),_0x9c25a7={..._0x3e69a2,'jti':_0x400dca['substring'](0x0,_0x400dca['length']-0x8)};return delete _0x9c25a7['vc'],_0x3147e1(_0x9c25a7)==_0x30fff6;}}}async function _0x20c61a(){let _0x13a5e1=!0x0;try{const [_0x540481,_0x38451f,_0xd9b502]=_0x2d2579['split']('.');return _0x1c6f1e(_0x540481),await _0x270fd8(_0x540481,_0x38451f,_0xd9b502),_0x13a5e1;}catch{return!0x1;}function _0x1c6f1e(_0x56412b){const _0x451645=_0x4768d3(_0x56412b);_0x451645&&'ES256'==_0x451645['alg']||(_0x13a5e1=!0x1);}async function _0x270fd8(_0x58eb91,_0x14a05a,_0x7d2242){const _0x3a1faa=window['Uint8Array']['from'](_0xd8558d(_0x7d2242),_0x27bacf=>_0x27bacf['charCodeAt'](0x0)),_0x23a294=new window['TextEncoder']()['encode'](_0x58eb91+'.'+_0x14a05a),_0x23941d=window['crypto']['subtle'];if(!_0x23941d)return;const _0x25ac1d=await _0x23941d['importKey']('jwk',_0x1ee284,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x23941d['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x25ac1d,_0x3a1faa,_0x23a294)||(_0x13a5e1=!0x1);}}function _0x4768d3(_0x49842c){return _0x49842c['startsWith']('ey')?JSON['parse'](_0xd8558d(_0x49842c)):null;}function _0xd8558d(_0x2e3f1d){return window['atob'](_0x2e3f1d['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3147e1(_0x116e57){let _0x28f6eb=0x1505;function _0x5d70b2(_0x27929f){for(let _0x3ed64b=0x0;_0x3ed64b<_0x27929f['length'];_0x3ed64b++){const _0x1e70e5=_0x27929f['charCodeAt'](_0x3ed64b);_0x28f6eb=(_0x28f6eb<<0x5)+_0x28f6eb+_0x1e70e5,_0x28f6eb&=_0x28f6eb;}}function _0x2f4e44(_0x18200c){Array['isArray'](_0x18200c)?_0x18200c['forEach'](_0x2f4e44):_0x18200c&&'object'==typeof _0x18200c?Object['entries'](_0x18200c)['sort']()['forEach'](([_0x14bb75,_0xd472a0])=>{_0x5d70b2(_0x14bb75),_0x2f4e44(_0xd472a0);}):_0x5d70b2(window['String'](_0x18200c));}return _0x2f4e44(_0x116e57),_0x28f6eb>>>0x0;}function _0x5ae3c7(_0x226e8a){return _0x226e8a['toString'](0x10)['padStart'](0x8,'0');}function _0x3cb662(_0x5b88cb){return _0x5b88cb['split']('')['reverse']()['join']('');}function _0x3bae73(_0x44e6cf){return _0x280989['plugins']['has'](_0x44e6cf);}function _0x5c9491(_0x322024){return _0x280989['plugins']['get'](_0x322024);}function _0x5a7053(){}_0x209306(await _0x1ee1c5());}_0x11db50(_0x26ef8b['editor']);}(this);}createRevision(_0x1b4475){const _0x1a9d7a=this['editor']['plugins']['get']('Users');return new bt({'id':_0x1b4475['id'],'name':_0x1b4475['name'],'creator':_0x1b4475['creatorId']?_0x1a9d7a['getUser'](_0x1b4475['creatorId']):null,'diffData':_0x1b4475['diffData']||_0x1b4475['data'],'authors':_0x1b4475['authorsIds']['map'](_0x5f36b9=>_0x1a9d7a['getUser'](_0x5f36b9)),'createdAt':new Date(_0x1b4475['createdAt']),'attributes':_0x1b4475['attributes'],'fromVersion':_0x1b4475['fromVersion'],'toVersion':_0x1b4475['toVersion']});}['addRevision'](_0x8b9687,_0x212d16=0x0){this['_revisions']['add'](_0x8b9687,_0x212d16);}getRevision(_0x2e0498){return this['_revisions']['get'](_0x2e0498);}getRevisions(_0x285528={'toJSON':!0x1}){const _0x2e81b0=Array['from'](this['_revisions']);return _0x2e81b0['reverse'](),_0x285528['toJSON']?_0x2e81b0['map'](_0xed28ad=>_0xed28ad['toJSON']()):_0x2e81b0;}getIndex(_0x5d77e7){return this['_revisions']['getIndex'](_0x5d77e7);}getEarlierVisibleRevision(_0x52bcdb){const [,_0x324016]=this['getRevisionsIterator'](_0x52bcdb,{'direction':'earlier'});return _0x324016;}getLaterVisibleRevision(_0x22675a){const [,_0xa2f332]=this['getRevisionsIterator'](_0x22675a,{'direction':'later'});return _0xa2f332;}getRevisionsInDiff(_0x23350b){const _0x5ab01b=[];for(const _0x23760c of this['getRevisionsIterator'](_0x23350b['newRevisionId']))if(_0x5ab01b['push'](_0x23760c),_0x23760c['id']===_0x23350b['oldRevisionId'])break;return _0x5ab01b;}*getRevisionsIterator(_0x4f18be,{direction:_0x17e212='earlier',filter:_0x471ff8=()=>!0x0}={}){const _0x18d51b='earlier'===_0x17e212?0x1:-0x1;let _0x3503fa=this['_revisions']['get'](_0x4f18be),_0x15cc7e=this['getIndex'](_0x3503fa);for(yield _0x3503fa;_0x3503fa;){if(_0x15cc7e+=_0x18d51b,_0x3503fa=this['getRevision'](_0x15cc7e),!_0x3503fa)return;_0x471ff8(_0x3503fa)&&(yield _0x3503fa);}}},kt=class extends _0x3c4294{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x230112,'c'],[_0x2dc7ab,'a'],[_0x4bae08,'e'],[_0x5e11d9,'r'],[_0x597258,'u']]);_typeCharToViewClass=new Map([['c',_0x230112],['a',_0x2dc7ab],['e',_0x4bae08],['r',_0x5e11d9],['u',_0x597258]]);async loadRevisionData(_0x4fb885,_0x5051ac){if(_0x4fb885['diffData']||!_0x5051ac)return;const _0x473aee=this['editor']['config']['get']('collaboration.channelId');_0x4fb885['diffData']=(await _0x5051ac['getRevision']({'channelId':_0x473aee,'revisionId':_0x4fb885['id']}))['diffData'];}getRevisionDocumentData(_0x5be30f){const _0x339f28={};for(const _0x1b366e in _0x5be30f['diffData']){if(_0x5be30f['diffData'][_0x1b366e]['attachChange']&&!_0x5be30f['diffData'][_0x1b366e]['attachChange']['isAttached'])continue;const _0x5610bb=this['_removeRevisionMarkers'](JSON['parse'](_0x5be30f['diffData'][_0x1b366e]['insertions'])),_0x5d01f6=this['editor']['editing']['view']['document'],_0x1eb7f1=new _0x404b21(_0x5d01f6,_0x5610bb['map'](_0x6035ca=>this['_getViewFromDiffObj'](_0x6035ca,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x339f28[_0x1b366e]=this['editor']['data']['processor']['toData'](_0x1eb7f1),this['editor']['data']['processor']['useFillerType']('default');}return _0x339f28;}getRevisionRootsAttributes(_0x2324a6){const _0x507a19={};for(const _0x3fb6fc in _0x2324a6['diffData'])_0x2324a6['diffData'][_0x3fb6fc]['attachChange']&&!_0x2324a6['diffData'][_0x3fb6fc]['attachChange']['isAttached']||(_0x507a19[_0x3fb6fc]=_0x2324a6['diffData'][_0x3fb6fc]['attributesAfter']||{});return _0x507a19;}getRevisionRootsModelElements(_0x2c4f1b){const _0x34a367={};for(const _0x3a988f in _0x2c4f1b['diffData']){if(_0x2c4f1b['diffData'][_0x3a988f]['attachChange']&&!_0x2c4f1b['diffData'][_0x3a988f]['attachChange']['isAttached'])continue;const _0x120e4a=_0x2c4f1b['diffData'][_0x3a988f]['rootElementName'];_0x120e4a&&(_0x34a367[_0x3a988f]=_0x120e4a);}return _0x34a367;}_getTypeCharForViewElement(_0x200392){return this['_viewClassToTypeChar']['get'](_0x200392['constructor']);}_getViewFromDiffObj(_0x3f69b6,_0x2f5bd3){const _0x4c38f0=this['editor']['editing']['view']['document'];if('string'==typeof _0x3f69b6)return new _0x487176(_0x4c38f0,_0x3f69b6);{let _0x2c67b3,_0x4ce102;_0x4ce102='u'==_0x3f69b6['type']||'r'==_0x3f69b6['type']?[]:_0x3f69b6['children']['map'](_0x30d277=>this['_getViewFromDiffObj'](_0x30d277,_0x2f5bd3));const _0x368a0f=this['_typeCharToViewClass']['get'](_0x3f69b6['type'])||_0x19d94b,_0x4fd55e=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2c67b3=new _0x368a0f(_0x4c38f0,_0x3f69b6['name'],_0x3f69b6['attributes'],_0x4ce102),'u'==_0x3f69b6['type']&&_0x3f69b6['children'][0x0]){const _0x22d72f=_0x3f69b6['children'][0x0];if(_0x2c67b3['render']=function(_0x4ea9c2){const _0x369254=_0x4ea9c2['createElement']('div');return _0x369254['innerHTML']=_0x3111b3(_0x22d72f),_0x369254['childNodes'][0x0];},_0x2f5bd3){const _0x164df5=new _0x404b21(_0x4c38f0);_0x164df5['_appendChild'](_0x2c67b3);const _0x18b174=Array['from'](_0x4fd55e['viewChildrenToDom'](_0x164df5,{'bind':!0x1})),_0x208b5a=_0x4fd55e['domDocument']['createElement']('div');_0x208b5a['append'](..._0x18b174),_0x2c67b3=Array['from'](_0x4fd55e['domChildrenToView'](_0x208b5a))[0x0];}}else{if('r'==_0x3f69b6['type']&&_0x3f69b6['children'][0x0]){const _0x4aba01=_0x3f69b6['children'][0x0];if(_0x2c67b3['render']=function(_0x2fd9c7){_0x2fd9c7['innerHTML']=_0x3111b3(_0x4aba01);},_0x2f5bd3){const _0x7aadf0=new _0x404b21(_0x4c38f0);_0x7aadf0['_appendChild'](_0x2c67b3);const _0x33276f=Array['from'](_0x4fd55e['viewChildrenToDom'](_0x7aadf0,{'bind':!0x1})),_0x4a6dbd=_0x4fd55e['domDocument']['createElement']('div');_0x4a6dbd['append'](..._0x33276f);const _0x54c65e=Array['from'](_0x4fd55e['domChildrenToView'](_0x4a6dbd));_0x54c65e['length']>0x1?_0x2c67b3['_appendChild'](_0x54c65e):_0x2c67b3=_0x54c65e[0x0];}}}if(_0x3f69b6['customProperties']){for(const [_0x4e5b04,_0x3d842e]of _0x3f69b6['customProperties'])_0x2c67b3['_setCustomProperty'](_0x4e5b04,_0x3d842e);}const _0x5e54ba=void 0x0===_0x3f69b6['fillerOffset']?null:_0x3f69b6['fillerOffset'];return null!==_0x5e54ba&&(_0x2c67b3['getFillerOffset']=()=>_0x5e54ba),_0x2c67b3;}}_makeModelFromViewString(_0x49998a,_0x22c3f5){const _0x3e88fa=JSON['parse'](_0x49998a),_0xc865f6=this['editor']['editing']['view']['document'],_0x2f0c6f=new _0x404b21(_0xc865f6,_0x3e88fa['map'](_0x51c2e0=>this['_getViewFromDiffObj'](_0x51c2e0,!0x0))),_0x2d965a=this['editor']['data']['toModel'](_0x2f0c6f,_0x22c3f5);return _0x2d965a['name']=_0x22c3f5,_0x2d965a;}['_removeRevisionMarkers'](_0x294c37){return(_0x294c37=_0x294c37['filter'](_0xd039fe=>!_0xd039fe['name']||'revision-start'!==_0xd039fe['name']&&'revision-end'!==_0xd039fe['name']))['forEach'](_0x3d9580=>{'string'!=typeof _0x3d9580&&(_0x3d9580['children']=this['_removeRevisionMarkers'](_0x3d9580['children']),_0x3d9580['attributes']=_0x3d9580['attributes']['filter'](_0x3bb4c6=>!_0x3bb4c6[0x0]['startsWith']('data-revision-')));}),_0x294c37;}};function At(_0x8effe4,_0x4d5673,_0x45149f){const t=_0x8effe4['t'];switch(_0x4d5673){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'},_0x45149f);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x45149f);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'},_0x45149f);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x45149f);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x45149f);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var Et=class extends _0x3c4294{['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[_0x2c9bd7,Rt,kt,_0x4c4288];}constructor(_0x13a69d){super(_0x13a69d),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 _0x230a87=_0x5a9e0c();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x230a87},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 _0x597a8d=this['repository']['getRevision'](0x0),_0x5bc5f3=_0x597a8d&&null===_0x597a8d['creator']?_0x597a8d:null;if(this['_continueCurrentRevision']=!!_0x5bc5f3&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4d31eb=this['_source']['getCurrentRevisionId'](),_0x8f52b5=this['repository']['getRevision'](_0x4d31eb);if(_0x8f52b5)this['_startingVersion']=_0x8f52b5['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4abd2d=this['_source']['history']['_operations']['find'](_0x18214f=>!_0x18214f['_isInit']),_0x234d19=_0x4abd2d?_0x4abd2d['baseVersion']:this['_source']['history']['version'];_0x597a8d?(_0x597a8d['toVersion']<_0x234d19&&_0x597a8d['_update']({'toVersion':_0x234d19}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5bc5f3['id'],this['_startingVersion']=_0x5bc5f3['fromVersion']):(this['_startingVersion']=_0x597a8d['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x234d19,this['_continueCurrentRevision']=!0x1);}}else _0x5bc5f3&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5bc5f3['toVersion'],this['editor']['model']['document']['history']['version']),_0x5bc5f3['fromVersion']===_0x5bc5f3['toVersion']?(0x0!==_0x5bc5f3['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5bc5f3['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5bc5f3['id'],this['_startingVersion']=_0x5bc5f3['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',_0x407814=>!_0x407814),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x1c5eeb=[this['editor']];for(const _0x4562ee of _0x1c5eeb){let _0x4c7eb7;for(const _0x477d08 in _0x4562ee){const _0x537f72=_0x477d08,_0x3847e4=_0x4562ee[_0x537f72];if('revisionHistoryLicenseKeyValid'==_0x3847e4||'revisionHistoryLicenseKeyInvalid'==_0x3847e4||'revisionHistoryLicenseKeyExpired'==_0x3847e4||'revisionHistoryLicenseKeyDomainLimit'==_0x3847e4||'revisionHistoryLicenseKeyNotAllowed'==_0x3847e4||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3847e4||'revisionHistoryLicenseKeyUsageLimit'==_0x3847e4){delete _0x4562ee[_0x537f72],_0x4c7eb7=_0x3847e4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4c7eb7&&_0x4562ee['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0xf42ed4=this['repository']['getRevision'](0x0),_0x46d494=await this['getRevisionDocumentData'](_0xf42ed4),_0x462ddf=await this['getRevisionRootsAttributes'](_0xf42ed4),_0x23ae44=this['_utils']['getRevisionRootsModelElements'](_0xf42ed4);this['_replaceEditorDataWithRevisionData'](_0x46d494,_0x462ddf,_0x23ae44);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x20e6f5){this['_source']=_0x20e6f5;}async update(){const _0x327f76=await this['_source']['getLatestVersion']();if(_0x327f76>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3e742a=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x327f76});_0x3e742a['authors']=_0x3e742a['authorsIds']['map'](_0x4dfe0b=>this['editor']['plugins']['get']('Users')['getUser'](_0x4dfe0b)),this['currentRevision']['_update'](_0x3e742a);}}async['saveRevision'](_0x19a033={},_0x5db98a=null){const _0x87e9e=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x5db98a>this['currentRevision']['toVersion']&&(_0x5db98a=null),null===_0x5db98a&&(_0x5db98a=await this['_source']['getLatestVersion']());const _0x58ec18=this['_getFromVersion'](_0x5db98a),_0x421d02=this['buildRevisionData']({'from':_0x58ec18,'to':_0x5db98a});if(this['currentRevision']['toVersion']<_0x5db98a){const _0x380f51=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x5db98a,'to':_0x5db98a});_0x380f51['authors']=[],_0x380f51['authorsIds']=[],_0x380f51['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x380f51,!0x0),delete _0x380f51['authors'],_0x87e9e['push'](_0x380f51);}const _0x2dac8f={..._0x19a033,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x19a033['name']||null,'id':_0x19a033['id']||_0x5a9e0c(),..._0x421d02,'attributes':{..._0x19a033['attributes'],..._0x421d02['attributes']}},_0x2d5e94=this['addRevisionData'](_0x2dac8f);_0x87e9e['push'](_0x2dac8f);const _0x55d496=this['repository']['getIndex'](_0x2d5e94);if(0x0!==_0x55d496){const _0x35bf06=this['repository']['getRevision'](_0x55d496-0x1);if(_0x35bf06['fromVersion']!==_0x5db98a){const _0x6866ea=this['_revisionDataBuilder']['getData'](_0x5db98a,_0x35bf06['toVersion']),_0x529e27={'id':_0x35bf06['id'],'diffData':_0x6866ea['diffData'],'authorsIds':_0x6866ea['authorsIds'],'authors':_0x6866ea['authorsIds']['map'](_0x5bc480=>this['editor']['plugins']['get']('Users')['getUser'](_0x5bc480)),'fromVersion':_0x5db98a};this['_stampAiAttribute'](_0x529e27,_0x35bf06,!!_0x6866ea['hasAIChanges']),_0x35bf06===this['currentRevision']&&(_0x529e27['createdAt']=new Date(_0x2dac8f['createdAt']['getTime']()+0xa)),_0x35bf06['_update'](_0x529e27,!0x0),delete _0x529e27['authors'],_0x87e9e['push'](_0x529e27);}}if(this['adapter']){for(const _0x55fafe of _0x87e9e)this['_bufferUpdate'](_0x55fafe['id'],_0x55fafe,!0x0);this['sendBufferedUpdates']();}return _0x2d5e94;}addRevisionData(_0x5d9630){const _0x2d1c03=this['repository']['createRevision'](_0x5d9630);return this['adapter']&&_0x2d1c03['on']('_update',(_0x6f523e,_0x2ee038,_0x25aad2)=>{_0x25aad2||(this['_bufferUpdate'](_0x2ee038['id'],_0x2ee038,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2d1c03,this['_findInsertionIndex'](_0x2d1c03)),_0x2d1c03;}async getRevisionDocumentData(_0x3f0470){return await this['_utils']['loadRevisionData'](_0x3f0470,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3f0470);}async getRevisionRootsAttributes(_0x381821){return await this['_utils']['loadRevisionData'](_0x381821,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x381821);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x208283=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x5b329e=0x0;_0x5b329e<_0x208283['length'];_0x5b329e++){const _0x2c70a0=_0x208283[_0x5b329e];let _0x1d0ccf=!0x1;for(const _0x291095 of Object['keys'](_0x2c70a0))void 0x0===_0x2c70a0[_0x291095]?delete _0x2c70a0[_0x291095]:'id'!==_0x291095&&(_0x1d0ccf=!0x0);_0x1d0ccf||(_0x208283[_0x5b329e]=null);}if(_0x208283=_0x208283['filter'](_0x462a25=>null!==_0x462a25),!_0x208283['length'])return;for(let _0x481fa7=0x0;_0x481fa7<_0x208283['length'];_0x481fa7++){const _0x21c623=_0x208283[_0x481fa7];void 0x0!==_0x21c623['fromVersion']&&void 0x0===_0x21c623['toVersion']&&(_0x21c623['toVersion']=this['repository']['getRevision'](_0x21c623['id'])['toVersion']),void 0x0!==_0x21c623['toVersion']&&void 0x0===_0x21c623['fromVersion']&&(_0x21c623['fromVersion']=this['repository']['getRevision'](_0x21c623['id'])['fromVersion']);}const _0x2f31aa=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x208283,_0x2f31aa)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x525baa=>{if(_0x525baa){for(const _0x2f3ce8 of _0x525baa)this['setRevisionData']({'id':_0x2f3ce8['id'],'createdAt':_0x2f3ce8['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x46283d,_0x32494e,_0x8cff3e){if(_0x8cff3e===(!!_0x32494e&&!!_0x32494e['attributes']['@ai']))return;const _0x4779f9={..._0x32494e?_0x32494e['attributes']:{},..._0x46283d['attributes']};_0x8cff3e?_0x4779f9['@ai']=!0x0:delete _0x4779f9['@ai'],_0x46283d['attributes']=_0x4779f9;}buildRevisionData({revision:_0x2e4ff8=null,from:_0x252fc5=null,to:_0x1071df=null}){_0x252fc5=null!==_0x252fc5?_0x252fc5:_0x2e4ff8['fromVersion'],_0x1071df=null!==_0x1071df?_0x1071df:_0x2e4ff8['toVersion'];const _0x572a55=this['_revisionDataBuilder']['getData'](_0x252fc5,_0x1071df),_0x3b8db2={'diffData':_0x572a55['diffData'],'authorsIds':_0x572a55['authorsIds'],'fromVersion':_0x252fc5,'toVersion':_0x1071df};if(this['_stampAiAttribute'](_0x3b8db2,_0x2e4ff8,!!_0x572a55['hasAIChanges']),!_0x2e4ff8||_0x1071df!==_0x2e4ff8['toVersion']){const _0x3478d7=_0x1071df-0x1,_0x375f3f=this['_source']['history']['getOperation'](_0x3478d7);_0x3b8db2['createdAt']=_0x375f3f&&_0x375f3f['createdAt']||new Date();}if(this['_loadedStateData']&&_0x252fc5===this['_loadedStateData']['fromVersion']){for(const _0x58e1da of this['_loadedStateData']['authors'])_0x3b8db2['authorsIds']['includes'](_0x58e1da['id'])||_0x3b8db2['authorsIds']['push'](_0x58e1da['id']);}return _0x3b8db2;}_bufferUpdate(_0xb60ead,_0x43cc5e,_0x3a84b8){if(this['_bufferedUpdates']['has'](_0xb60ead)){const _0x59a582=this['_bufferedUpdates']['get'](_0xb60ead);_0x43cc5e=_0x3a84b8?{..._0x59a582,..._0x43cc5e}:{..._0x43cc5e,..._0x59a582};}this['_bufferedUpdates']['set'](_0xb60ead,_0x43cc5e);}setRevisionData(_0x4e4142){const _0x12367f=this['repository']['getRevision'](_0x4e4142['id']);if(_0x4e4142['createdAt']&&(_0x4e4142['createdAt']=new Date(_0x4e4142['createdAt'])),_0x4e4142['authorsIds']){const _0x4a6696=this['editor']['plugins']['get']('Users');_0x4e4142['authors']=_0x4e4142['authorsIds']['map'](_0x4a8369=>_0x4a6696['getUser'](_0x4a8369));}_0x12367f['_update'](_0x4e4142,!0x0);}_createInitialRevision(_0x685698){const _0x52d2f2=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x52d2f2)this['_initialRevisionId']=_0x52d2f2['id'];else{const _0x1e5b93=!this['editor']['model']['document']['roots']['find'](_0x4815bc=>this['editor']['model']['hasContent'](_0x4815bc)),_0x5420ce=this['editor']['plugins']['get']('Users')['me']['id'],_0x24b307=At(this['editor']['locale'],_0x1e5b93?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x685698,'to':_0x685698,'id':this['_initialRevisionId'],'name':_0x24b307,'creatorId':_0x5420ce});}}_createCurrentRevision(_0x583171){const _0x2bfed9=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2bfed9),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x583171,'to':_0x583171,'id':_0x2bfed9,'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(_0xaed9c0,_0x13b9bf,_0x2c3815){const _0x2d1ab6={},_0x143014={},_0x1dc48f={},_0x589af9=this['editor']['config']['get']('roots')||{};for(const [_0x177b02,_0x3d052d]of Object['entries'](_0x589af9))_0x3d052d['lazyLoad']||(_0x2d1ab6[_0x177b02]=_0x3d052d['initialData']??'',_0x143014[_0x177b02]=_0x3d052d['modelAttributes']||{},_0x3d052d['modelElement']&&(_0x1dc48f[_0x177b02]=_0x3d052d['modelElement']));for(const _0x491816 of this['editor']['model']['document']['getRootNames']())_0x2d1ab6[_0x491816]??='',_0x143014[_0x491816]??={};let _0x30b378=!0x1;const _0x25efea=Object['keys'](_0x2d1ab6),_0x2be152=Object['keys'](_0xaed9c0);for(const _0x28a7a8 of _0x25efea){if(_0x2d1ab6[_0x28a7a8]!==_0xaed9c0[_0x28a7a8]&&''!==_0x2d1ab6[_0x28a7a8]['trim']()){_0x30b378=!0x0;break;}if(!_0x2863c2(_0x143014[_0x28a7a8],_0x13b9bf[_0x28a7a8])&&Object['keys'](_0x143014[_0x28a7a8])['length']>0x0){_0x30b378=!0x0;break;}const _0x427bd0=_0x1dc48f[_0x28a7a8],_0xd6e543=_0x2c3815[_0x28a7a8];if(_0x427bd0&&_0xd6e543&&_0x427bd0!==_0xd6e543){_0x30b378=!0x0;break;}}_0x30b378||(_0x30b378=_0x2be152['some'](_0x1174c3=>!this['editor']['model']['document']['getRoot'](_0x1174c3))),_0x30b378&&_0x310429('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2d1ab6,'editorRootsAttributes':_0x143014,'editorRootsModelElements':_0x1dc48f,'revisionData':_0xaed9c0,'revisionRootsAttributes':_0x13b9bf,'revisionRootsModelElements':_0x2c3815});for(const [_0x54dde9,_0x44524d]of Object['entries'](_0xaed9c0))this['editor']['config']['set']('roots.'+_0x54dde9+'.initialData',_0x44524d);for(const [_0x2fdbdf,_0x5c69fb]of Object['entries'](_0x13b9bf))this['editor']['config']['set']('roots.'+_0x2fdbdf+'.modelAttributes',_0x5c69fb);const _0x33651f=this['editor']['model']['document'];for(const [_0x265ac7,_0x394708]of Object['entries'](_0x2c3815)){this['editor']['config']['set']('roots.'+_0x265ac7+'.modelElement',_0x394708);const _0x54cf58=_0x33651f['getRoot'](_0x265ac7);_0x54cf58&&_0x54cf58['name']!==_0x394708&&(_0x33651f['roots']['remove'](_0x265ac7),_0x33651f['createRoot'](_0x394708,_0x265ac7));}}_addPendingAction(){if(!this['_pendingAction']){const _0x19240e=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x19240e['add'](At(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x3d5988){const _0x11b206=this['repository']['getRevisions']();_0x11b206['reverse']();let _0x39c3e4=0x0;for(;_0x39c3e4<_0x11b206['length'];){const _0x1c9150=_0x11b206[_0x39c3e4];if(_0x1c9150===this['currentRevision']){_0x39c3e4++;continue;}if(_0x1c9150['id']===this['_initialRevisionId'])break;const _0x3994fa=_0x3d5988['toVersion']-_0x1c9150['toVersion']||_0x3d5988['fromVersion']-_0x1c9150['fromVersion'];if(_0x3994fa>0x0)break;if(_0x3994fa<0x0)_0x39c3e4++;else{if(!_0x3d5988['creator']&&_0x1c9150['creator'])break;if(_0x1c9150['creator']||!_0x3d5988['creator']){if(_0x3d5988['createdAt']>_0x1c9150['createdAt'])break;_0x39c3e4++;}else _0x39c3e4++;}}return _0x39c3e4;}_getFromVersion(_0x266d1a){const _0x46877b=this['repository']['getRevisions']();_0x46877b['reverse'](),_0x46877b['shift']();const _0xe75398=_0x46877b['find'](_0x36fdcc=>_0x36fdcc['toVersion']<=_0x266d1a)['toVersion'];return _0xe75398<this['_startingVersion']?this['_startingVersion']:_0xe75398;}['_makeRevision']({name:_0x413e4c,from:_0x4db1c5,to:_0xd365ee,creatorId:_0x2f7efa,id:_0x3372c5}){const _0x1396c8=this['buildRevisionData']({'from':_0x4db1c5,'to':_0xd365ee});_0x1396c8['name']=_0x413e4c,_0x1396c8['creatorId']=_0x2f7efa,_0x1396c8['id']=_0x3372c5;const _0x5404c1=this['addRevisionData'](_0x1396c8);return this['adapter']&&this['_bufferUpdate'](_0x1396c8['id'],_0x1396c8,!0x0),_0x5404c1;}_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(_0x552026){this['editor']=_0x552026,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(_0xe6d166){this['source']=_0xe6d166;const _0x17120c=new Map(),_0x4a09fa=new Map(),_0x5311b7=this['editor']['model']['document']['roots']['map'](_0x4cecf7=>_0x4cecf7['rootName']);for(const _0x54626b of _0x5311b7){const _0x5410c4=this['editor']['model']['document']['getRoot'](_0x54626b),_0x3993fd=St(_0x5410c4);_0x17120c['set'](_0x54626b,_0x3993fd),_0x4a09fa['set'](_0x54626b,Object['fromEntries'](_0x5410c4['getAttributes']()));}const _0x6c714b=Array['from'](this['editor']['model']['markers'])['map'](_0x5f3937=>[_0x5f3937['name'],_0x5f3937['getRange']()]),_0x48d764=this['source']['version'];this['_saveMetaData'](_0x48d764,_0x17120c,_0x6c714b,_0x4a09fa),this['_startingRevisionId']=this['_revisionId'];const _0x141cac=new Map(),_0x14d00f=new Map();for(const _0x164c7a of _0x5311b7){const _0x10c422=Ot(_0x164c7a,this['editor']['model']['document']['getRoot'](_0x164c7a)['name']);_0x141cac['set'](_0x164c7a,_0x10c422),_0x14d00f['set'](_0x164c7a,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x141cac,[],_0x14d00f);}getData(_0x223268,_0x2179be){if(this['_lastFrom']===_0x223268&&this['_lastTo']<=_0x2179be)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2179be,!0x0);else{if(!this['_savedMetaData']['has'](_0x223268)){const _0x3574b8=this['_getPreviousFrom'](_0x223268);this['_calculateMetaData'](_0x3574b8,_0x223268,!0x1);}this['_calculateMetaData'](_0x223268,_0x2179be,!0x0);}return this['_lastFrom']=_0x223268,this['_lastTo']=_0x2179be,this['_getState']();}loadState(_0x4ac10f){if(!this['_savedMetaData']['has'](_0x4ac10f['fromVersion'])){const _0xe18e88=this['_getPreviousFrom'](_0x4ac10f['fromVersion']);this['_calculateMetaData'](_0xe18e88,_0x4ac10f['fromVersion'],!0x1);}this['_calculateMetaData'](_0x4ac10f['fromVersion'],_0x4ac10f['toVersion'],!0x1);const _0x154b61=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x4ac10f['fromVersion'],this['_lastTo']=_0x4ac10f['toVersion'];for(const _0x43f0a7 in _0x4ac10f['diffData']){const _0x3bdf41=_0x4ac10f['diffData'][_0x43f0a7]['attachChange'],_0x47d7ea=_0x3ef400(_0x4ac10f['diffData'][_0x43f0a7]['attributesBefore'])||{},_0x36e2ce=_0x4ac10f['diffData'][_0x43f0a7],_0x5521b0=_0x154b61['_makeModelFromViewString'](_0x36e2ce['deletions'],_0x36e2ce['rootElementName']||'$root');_0x5521b0['rootName']=_0x43f0a7,_0x5521b0['_isAttached']=!_0x3bdf41||!_0x3bdf41['isAttached'],_0x5521b0['isAttached']=()=>_0x5521b0['_isAttached'],this['_baseRoots']['set'](_0x43f0a7,_0x5521b0),this['_baseRootsAttributes']['set'](_0x43f0a7,_0x47d7ea),_0x3bdf41&&this['_touchedRoots']['set'](_0x43f0a7,_0x3bdf41);const _0x149b74=this['_makeIdsRoot'](_0x5521b0);this['_baseIdsRoots']['set'](_0x43f0a7,_0x149b74);for(const [_0x11aa97,_0x5c0781]of _0x5521b0['markers']){if(!_0x11aa97['startsWith']('revision:'))continue;const _0xdff0e0=_0x11aa97['split'](':')[0x2],_0x5a7093=_0x36e2ce['aiSources']?.[_0x11aa97]||null;for(const _0x4e2b61 of _0x5c0781['getWalker']({'singleCharacters':!0x0})){const _0x474e69=this['_getVidAttributeName'](_0x4e2b61),_0x5482bf='elementEnd'==_0x4e2b61['type']?_0x4e2b61['previousPosition']['path']['slice'](0x0,-0x1):_0x4e2b61['previousPosition']['path'],_0x52e31a=_0x149b74['getNodeByPath'](_0x5482bf)['getAttribute'](_0x474e69);this['_touched']['set'](_0x52e31a,{'userId':_0xdff0e0,'aiSource':_0x5a7093});}_0x5521b0['markers']['delete'](_0x11aa97);}}this['_startingRevisionId']=this['_revisionId'];const _0x270a8c=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2615e5=>!this['_touched']['has'](_0x2615e5));let _0x4d954e=0x0;const _0x14a85c=new Map();for(const _0x327dc9 in _0x4ac10f['diffData']){const _0x1e3241=_0x4ac10f['diffData'][_0x327dc9]['attachChange'],_0x225431=_0x3ef400(_0x4ac10f['diffData'][_0x327dc9]['attributesAfter'])||{},_0x5cf37c=_0x4ac10f['diffData'][_0x327dc9],_0x4d795b=_0x154b61['_makeModelFromViewString'](_0x5cf37c['insertions'],_0x5cf37c['rootElementName']||'$root');_0x4d795b['rootName']=_0x327dc9,_0x4d795b['_isAttached']=!_0x1e3241||_0x1e3241['isAttached'],_0x4d795b['isAttached']=()=>_0x4d795b['_isAttached'],this['_diffRoots']['set'](_0x327dc9,_0x4d795b),this['_diffRootsAttributes']['set'](_0x327dc9,_0x225431);const _0x8ad717=this['_makeIdsRoot'](_0x4d795b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x327dc9,_0x8ad717),_0x14a85c['set'](_0x327dc9,_0x4d795b['isAttached']()?_0x225431:{});for(const [_0x4be9d5,_0x3afd5a]of _0x4d795b['markers']){if(!_0x4be9d5['startsWith']('revision:'))continue;const _0x586a3c=_0x4be9d5['split'](':')[0x2],_0x1adeb0=_0x5cf37c['aiSources']?.[_0x4be9d5]||null;for(const _0x545a39 of _0x3afd5a['getWalker']({'singleCharacters':!0x0})){const _0x14a28d=this['_getVidAttributeName'](_0x545a39),_0x262108=this['_revisionId']++,_0x35e63d='elementEnd'==_0x545a39['type']?_0x545a39['previousPosition']['path']['slice'](0x0,-0x1):_0x545a39['previousPosition']['path'];_0x8ad717['getNodeByPath'](_0x35e63d)['_setAttribute'](_0x14a28d,_0x262108),this['_touched']['set'](_0x262108,{'userId':_0x586a3c,'aiSource':_0x1adeb0});}_0x4d795b['markers']['delete'](_0x4be9d5);}for(const _0x32fea2 of this['editor']['model']['createRangeIn'](_0x4d795b)['getWalker']({'singleCharacters':!0x0})){const _0x26d904=this['_getVidAttributeName'](_0x32fea2),_0x2398a0='elementEnd'==_0x32fea2['type']?_0x32fea2['previousPosition']['path']['slice'](0x0,-0x1):_0x32fea2['previousPosition']['path'],_0x2db11c=_0x8ad717['getNodeByPath'](_0x2398a0);_0x2db11c['getAttribute'](_0x26d904)>0x0||_0x2db11c['_setAttribute'](_0x26d904,_0x270a8c[_0x4d954e++]);}for(const [_0x474538,_0x13e3e1]of _0x4d795b['markers'])_0x474538['startsWith']('revision:')||this['_markers']['set'](_0x474538,_0x13e3e1);}const {roots:_0x12f57f}=this['_savedMetaData']['get'](_0x4ac10f['fromVersion']),{roots:_0x1fe107}=this['_savedMetaData']['get'](_0x4ac10f['toVersion']),_0x3d77a0=St(_0x12f57f['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x3d77a0),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3d77a0,Number['NEGATIVE_INFINITY']));const _0xc4020e=St(_0x1fe107['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0xc4020e),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xc4020e));const _0xedf5b9=Array['from'](this['_diffRoots'])['map'](([_0x21a42f,_0x30da8b])=>[_0x21a42f,St(_0x30da8b)]);this['_saveMetaData'](this['_lastTo'],_0xedf5b9,this['_markers'],_0x14a85c);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x54102c,_0xbfcb6d,_0x1af649,_0x31f6dd){const _0x503f5c=new Map(_0xbfcb6d),_0x458fac=new Map(_0x3ef400(_0x31f6dd)),_0x10592c=new Map();for(const [_0x9fbbde,_0x151b14]of _0x1af649)_0x10592c['set'](_0x9fbbde,{'start':_0x151b14['start']['clone'](),'end':_0x151b14['end']['clone'](),'rootName':_0x151b14['root']['rootName']});this['_savedMetaData']['set'](_0x54102c,{'roots':_0x503f5c,'markers':_0x10592c,'rootsAttributes':_0x458fac});}_removeMetaData(_0x4f67e6){this['_savedMetaData']['delete'](_0x4f67e6);}_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(_0x58549a,_0x46a401=null){let _0x96b039=null;_0x58549a['is']('documentFragment')||(_0x96b039=new _0x2f35f3(_0x58549a['name'],{'vid_start':null===_0x46a401?this['_revisionId']++:_0x46a401++}));const _0x4f6acd=[];for(const _0x1e02f5 of _0x58549a['getChildren']())if(_0x1e02f5['is']('element')){_0x4f6acd['push'](this['_makeIdsRoot'](_0x1e02f5,_0x46a401));const _0x2b9470=_0x4f6acd[_0x4f6acd['length']-0x1];null!==_0x46a401&&(_0x46a401=_0x2b9470['is']('element','$text')?_0x2b9470['getAttribute']('vid')+0x1:_0x2b9470['getAttribute']('vid_end')+0x1);}else{for(let _0x48adbc=0x0;_0x48adbc<_0x1e02f5['offsetSize'];_0x48adbc++)_0x4f6acd['push'](new _0x2f35f3('$text',{'vid':null===_0x46a401?this['_revisionId']++:_0x46a401++}));}if(_0x58549a['is']('documentFragment')){const _0x495070=Ot(_0x58549a['rootName'],_0x58549a['name']);return _0x495070['_insertChild'](0x0,_0x4f6acd),_0x495070;}return _0x96b039['_setAttribute']('vid_end',null===_0x46a401?this['_revisionId']++:_0x46a401),_0x96b039['_insertChild'](0x0,_0x4f6acd),_0x96b039;}_calculateMetaData(_0x2eedc4,_0x30fe08,_0x21c6a2){this['_reset']();const {roots:_0x1baa39,markers:_0x20c44a,rootsAttributes:_0x13bdfc}=this['_savedMetaData']['get'](_0x2eedc4);this['_baseRoots']=new Map(_0x1baa39),this['_baseRootsAttributes']=new Map(_0x3ef400(_0x13bdfc));for(const [_0x507993,_0x45a565]of this['_baseRoots'])if('$graveyard'!==_0x507993&&(this['_diffRoots']['set'](_0x507993,St(_0x45a565)),this['_diffRootsAttributes']=new Map(_0x3ef400(_0x13bdfc)),_0x21c6a2)){const _0x2f0cb6=this['_revisionId'];this['_idsRoots']['set'](_0x507993,this['_makeIdsRoot'](_0x45a565)),this['_baseIdsRoots']['set'](_0x507993,this['_makeIdsRoot'](_0x45a565,_0x2f0cb6));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x21c6a2&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x37649a,_0x3e45d6]of _0x20c44a){const _0x1cc14e=this['_baseRoots']['get'](_0x3e45d6['rootName']),_0x5b2771=this['_diffRoots']['get'](_0x3e45d6['rootName']),_0x2f77d0=new _0x59fca0(_0x56bb1(_0x3e45d6['start'],_0x1cc14e),_0x56bb1(_0x3e45d6['end'],_0x1cc14e)),_0x2fdc5f=_0x45bc6e(_0x2f77d0,_0x5b2771);_0x1cc14e['markers']['set'](_0x37649a,_0x2f77d0),this['_markers']['set'](_0x37649a,_0x2fdc5f);}this['_applyOperations'](_0x2eedc4,_0x30fe08,_0x21c6a2);}_applyOperations(_0x579c38,_0x4e670b,_0xcb084b){for(const _0x437df5 of this['source']['getOperations'](_0x579c38,_0x4e670b))this['_handleOperation'](_0x437df5,_0xcb084b);for(const _0x138723 of this['_diffRoots']['values']())_0x138723['markers']['clear']();for(const [_0x1b8551,_0x258b26]of this['_markers'])this['_diffRoots']['get'](_0x258b26['root']['rootName'])['markers']['set'](_0x1b8551,_0x258b26['clone']());const _0x3fbcb4=new Map(),_0x50b628=new Map();for(const [_0x1bb038,_0x5435d9]of this['_diffRoots'])_0x3fbcb4['set'](_0x1bb038,St(_0x5435d9)),_0x50b628['set'](_0x1bb038,this['_diffRootsAttributes']['get'](_0x1bb038));this['_saveMetaData'](_0x4e670b,_0x3fbcb4,this['_markers'],_0x50b628);}_getPreviousFrom(_0x572048){const _0x2c04b9=Array['from'](this['_savedMetaData']['keys']());_0x2c04b9['sort']((_0x51f777,_0x47df94)=>_0x51f777-_0x47df94),_0x2c04b9['reverse']();for(const _0x114710 of _0x2c04b9)if(_0x114710<_0x572048)return _0x114710;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x483389,_0x3eb1dc){const _0x3d1146=Array['from'](_0x3eb1dc['markers'])['map'](([_0x398793,_0x502f92])=>[_0x398793,_0x45bc6e(_0x502f92,_0x483389)]);_0x483389['markers']=new Map(_0x3d1146);}_transformMarkers(_0x37555c){for(const _0x18bf9a of this['_markers']['values']()){const _0x4a5e26=_0x18bf9a['getTransformedByOperation'](_0x37555c),_0x4546c8=_0x59fca0['_createFromRanges'](_0x4a5e26);_0x18bf9a['start']=_0x4546c8['start'],_0x18bf9a['end']=_0x4546c8['end'];}}_handleOperation(_0x2174ea,_0x249139){if('addRoot'!=_0x2174ea['type']&&'detachRoot'!=_0x2174ea['type']){if('insert'==_0x2174ea['type']){const _0x22649c=_0x2174ea['position']['root'],_0x58b6ff=_0x22649c['rootName'],_0x3425e3=_0x22649c['name'];this['_diffRoots']['has'](_0x58b6ff)||(this['_diffRoots']['set'](_0x58b6ff,Ot(_0x58b6ff,_0x3425e3,!0x0)),this['_diffRootsAttributes']['set'](_0x58b6ff,{}),_0x249139&&this['_idsRoots']['set'](_0x58b6ff,Ot(_0x58b6ff,_0x3425e3,!0x0)));}else{if('addRootAttribute'==_0x2174ea['type']||'removeRootAttribute'==_0x2174ea['type']||'changeRootAttribute'==_0x2174ea['type'])return void this['_handleRootAttributeOperation'](_0x2174ea);'marker'==_0x2174ea['type']&&this['_handleMarkerOperation'](_0x2174ea);}if('marker'!==_0x2174ea['type']){const _0x2f1c8d=this['_cloneOperation'](_0x2174ea,this['_diffRoots']);_0x2f1c8d['_execute'](),this['_transformMarkers'](_0x2f1c8d);}if(_0x249139)switch(_0x2174ea['type']){case'insert':this['_handleInsertOperation'](_0x2174ea);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2174ea);break;case'merge':this['_handleMergeOperation'](_0x2174ea);break;case'split':this['_handleSplitOperation'](_0x2174ea);}}else this['_handleRootOperation'](_0x2174ea,_0x249139);}_cloneOperation(_0x30c331,_0x4879c5){const _0x17698e=_0x30c331['clone']();return _0x17698e['_authorId']=_0x30c331['_authorId'],_0x17698e['_aiSource']=_0x30c331['_aiSource'],_0x17698e['baseVersion']=null,_0x1aee78(_0x17698e,_0x4879c5),_0x17698e;}_getBaseVids(_0x20d195){return _0x20d195['map'](_0x45ba07=>{const _0x29b1d0=this['_getVidAttributeName'](_0x45ba07);return Number(_0x45ba07['item']['getAttribute'](_0x29b1d0));});}_generateTape(_0x5692ff,_0x3c4bf1){if(_0x5692ff['is']('element','$text'))_0x3c4bf1['push']({'item':_0x5692ff,'type':'text'});else{_0x5692ff['is']('element')&&_0x3c4bf1['push']({'item':_0x5692ff,'type':'elementStart'});for(const _0x221f50 of _0x5692ff['getChildren']())this['_generateTape'](_0x221f50,_0x3c4bf1);_0x5692ff['is']('element')&&_0x3c4bf1['push']({'item':_0x5692ff,'type':'elementEnd'});}return _0x3c4bf1;}_getState(){const _0x530094=new Map(this['_touched']),_0x1e115b=new Map(_0x530094),_0x589f3e=new Map(),_0x104459={'insertions':{},'deletions':{}},_0x4ad899={'insertions':{},'deletions':{}},_0x50ba3e=new Map(),_0x1bb074=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1dbbb3=new Map();_0x1bb074['delete']('$graveyard');for(const _0x390a01 of _0x1bb074){const _0x340c2e=(this['_diffRoots']['get'](_0x390a01)??this['_baseRoots']['get'](_0x390a01))['name'],_0xe1d2fa=this['_diffRoots']['get'](_0x390a01)||Ot(_0x390a01,_0x340c2e,!0x1),_0x49e2a1=this['_baseRoots']['get'](_0x390a01)||Ot(_0x390a01,_0x340c2e,!0x1);_0xe1d2fa['isAttached']()||_0x49e2a1['isAttached']()?(_0x1dbbb3['set'](_0x390a01,_0x340c2e),_0x104459['insertions'][_0x390a01]=St(_0xe1d2fa),_0x104459['deletions'][_0x390a01]=St(_0x49e2a1),this['_copyMarkers'](_0x104459['deletions'][_0x390a01],_0x49e2a1),this['_copyMarkers'](_0x104459['insertions'][_0x390a01],_0xe1d2fa),_0x4ad899['insertions'][_0x390a01]=this['_generateTape'](this['_idsRoots']['get'](_0x390a01),[]),_0x4ad899['deletions'][_0x390a01]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x390a01)||Ot(_0x390a01,_0x340c2e,!0x1),[])):_0x1bb074['delete'](_0x390a01);}for(const _0x1058b3 of _0x1bb074){const _0x562591=_0x4ad899['insertions'][_0x1058b3];for(const _0x3e4623 of _0x562591){const _0xf08b23=this['_getVidAttributeName'](_0x3e4623),_0x332376=_0x3e4623['item']['getAttribute'](_0xf08b23);_0x1e115b['delete'](_0x332376),_0x332376>=this['_startingRevisionId']&&_0x589f3e['set'](_0x332376,_0x530094['get'](_0x332376));}}for(const _0x15b387 of _0x1bb074){const _0x253797=_0x4ad899['insertions'][_0x15b387],_0xf5d5f8=this['_getBaseVids'](_0x4ad899['deletions'][_0x15b387]);let _0x1dae19=0x0;for(const _0x42dbca of _0x253797){const _0x5ad19d=this['_getVidAttributeName'](_0x42dbca),_0x59105d=_0x42dbca['item']['getAttribute'](_0x5ad19d);if(!_0x589f3e['has'](_0x59105d)&&!_0x50ba3e['has'](_0x59105d)){if(_0x1e115b['has'](_0x59105d))_0x1dae19++;else{if(_0x59105d!=_0xf5d5f8[_0x1dae19]){const _0x3adb6c=_0x530094['get'](_0x59105d)||_0x530094['get'](_0xf5d5f8[_0x1dae19]);for(;_0x59105d!=_0xf5d5f8[_0x1dae19];)_0x1e115b['has'](_0xf5d5f8[_0x1dae19])||(_0x50ba3e['set'](_0xf5d5f8[_0x1dae19],_0x3adb6c),_0x530094['set'](_0xf5d5f8[_0x1dae19],_0x3adb6c)),_0x1dae19++;}_0x1dae19++;}}}}for(const _0xafdc84 of _0x1bb074){const _0x155182=_0x4ad899['insertions'][_0xafdc84];for(const _0x34b925 of _0x155182){const _0x43e7e0=this['_getVidAttributeName'](_0x34b925),_0x4ac0f2=_0x34b925['item']['getAttribute'](_0x43e7e0);if(_0x50ba3e['has'](_0x4ac0f2)){const _0x42bf34=_0x50ba3e['get'](_0x4ac0f2);_0x1e115b['has'](_0x4ac0f2)||_0x1e115b['set'](_0x4ac0f2,{..._0x42bf34}),_0x589f3e['set'](_0x4ac0f2,{..._0x42bf34});}}}for(const _0x5d9f90 of _0x1e115b['keys']())_0x5d9f90>=this['_startingRevisionId']&&_0x1e115b['delete'](_0x5d9f90);const _0x54582f=new Map();for(const _0x44b788 of _0x1bb074){let _0x2c45ea=_0x4ad899['insertions'][_0x44b788];for(const _0x4b1616 of _0x2c45ea)if(_0x4b1616['item']['is']('element','tableCell')){const _0x5ef4e4=this['_getVidAttributeName'](_0x4b1616),_0x25d0fc=_0x4b1616['item']['getAttribute'](_0x5ef4e4);if(_0x589f3e['has'](_0x25d0fc)){const _0x4d323c=_0x4b1616['item']['parent']['parent']['getAttribute']('vid_start'),_0x1d27b7=_0x589f3e['get'](_0x25d0fc),_0x38107b=_0x54582f['get'](_0x4d323c)||{'users':new Set(),'aiSource':null};_0x38107b['users']['add'](_0x1d27b7['userId']),_0x38107b['aiSource']=_0x38107b['aiSource']||_0x1d27b7['aiSource']||null,_0x54582f['set'](_0x4d323c,_0x38107b);}}_0x2c45ea=_0x4ad899['deletions'][_0x44b788];for(const _0x37a466 of _0x2c45ea)if(_0x37a466['item']['is']('element','tableCell')){const _0x3da111=this['_getVidAttributeName'](_0x37a466),_0x4d4520=_0x37a466['item']['getAttribute'](_0x3da111);if(_0x1e115b['has'](_0x4d4520)){const _0x48f156=_0x37a466['item']['parent']['parent']['getAttribute']('vid_start'),_0x314889=_0x1e115b['get'](_0x4d4520),_0x21c56e=_0x54582f['get'](_0x48f156)||{'users':new Set(),'aiSource':null};_0x21c56e['users']['add'](_0x314889['userId']),_0x21c56e['aiSource']=_0x21c56e['aiSource']||_0x314889['aiSource']||null,_0x54582f['set'](_0x48f156,_0x21c56e);}}for(const _0x34f022 of _0x54582f['keys']())(_0x589f3e['has'](_0x34f022)||_0x1e115b['has'](_0x34f022))&&_0x54582f['delete'](_0x34f022);}for(const _0x42efc5 of _0x1bb074){const _0x23c9c1=_0x4ad899['insertions'][_0x42efc5];let _0x59aaeb=null,_0x487198=null,_0x3c0200=null;for(const _0x78b84f of _0x23c9c1){const _0x48bc39=this['_getVidAttributeName'](_0x78b84f),_0x3605c6=_0x78b84f['item']['getAttribute'](_0x48bc39),_0x446ae0=_0x54582f['get'](_0x3605c6);if(_0x446ae0&&'elementStart'==_0x78b84f['type']&&(_0x59aaeb=Array['from'](_0x446ae0['users'])[0x0],_0x487198=_0x446ae0['aiSource'],_0x3c0200=_0x78b84f['item']['getAttribute']('vid_end')),_0x59aaeb){const _0x3405e2=_0x487198||_0x1e115b['get'](_0x3605c6)?.['aiSource']||null,_0x388316=_0x487198||_0x589f3e['get'](_0x3605c6)?.['aiSource']||null;_0x1e115b['set'](_0x3605c6,{'userId':_0x59aaeb,'aiSource':_0x3405e2}),_0x589f3e['set'](_0x3605c6,{'userId':_0x59aaeb,'aiSource':_0x388316});}_0x3605c6==_0x3c0200&&(_0x59aaeb=null,_0x3c0200=null);}}const _0x1db37b={},_0xadc102=new Set();for(const _0x4b0d8c of _0x1bb074){const _0x1ce578=_0x104459['deletions'][_0x4b0d8c],_0x11aa3a=_0x104459['insertions'][_0x4b0d8c];for(const {userId:_0x16b7d7}of this['_touchedMarkers']['values']())null!==_0x16b7d7&&_0xadc102['add'](_0x16b7d7);for(const {userId:_0x3ff137}of this['_touchedRoots']['values']())null!==_0x3ff137&&_0xadc102['add'](_0x3ff137);const _0x3af94e={};this['_markChanges'](_0x11aa3a,_0x4ad899['insertions'][_0x4b0d8c],_0x589f3e,'insertion',_0xadc102,_0x3af94e),this['_markChanges'](_0x1ce578,_0x4ad899['deletions'][_0x4b0d8c],_0x1e115b,'deletion',_0xadc102,_0x3af94e),this['_collectSuggestionAiSources'](_0x11aa3a,_0x3af94e),this['_collectSuggestionAiSources'](_0x1ce578,_0x3af94e),_0x1db37b[_0x4b0d8c]={'insertions':this['_prepareViewToSave'](_0x11aa3a),'deletions':this['_prepareViewToSave'](_0x1ce578),'attachChange':this['_touchedRoots']['get'](_0x4b0d8c)||null,'attributesBefore':_0x3ef400(this['_baseRootsAttributes']['get'](_0x4b0d8c))||{},'attributesAfter':_0x3ef400(this['_diffRootsAttributes']['get'](_0x4b0d8c)),'rootElementName':_0x1dbbb3['get'](_0x4b0d8c),'aiSources':_0x3af94e};}const _0x509e15=Array['from'](_0x589f3e['values']())['some'](_0x542f8c=>!(!_0x542f8c||!_0x542f8c['aiSource']))||Array['from'](_0x1e115b['values']())['some'](_0x19d8fa=>!(!_0x19d8fa||!_0x19d8fa['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x48172d=>this['_aiTouchedMarkers']['has'](_0x48172d));return{'diffData':_0x1db37b,'authorsIds':Array['from'](_0xadc102),'hasAIChanges':_0x509e15};}_collectSuggestionAiSources(_0x57597f,_0x3c3ecb){const _0x2c0986=_0x57597f['markers'];for(const _0x4d85fd of _0x2c0986['keys']()){if(!_0x4d85fd['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x4d85fd))continue;const _0x248f29=this['_aiTouchedMarkers']['get'](_0x4d85fd);_0x248f29&&(_0x3c3ecb[_0x4d85fd]=_0x248f29);}}_processRootBeforeSave(_0x20b6ab){for(const [,_0x431ae1]of _0x20b6ab['markers']){const _0x362081=_0x431ae1['start']['getAncestors']()['filter'](_0x34f4b3=>'tableCell'==_0x34f4b3['name']);for(const _0x495e4c of _0x362081)0x1==_0x495e4c['childCount']&&_0x495e4c['getChild'](0x0)['is']('element','paragraph')&&_0x495e4c['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x59640b){this['_processRootBeforeSave'](_0x59640b);const _0x19ecda=this['editor']['data']['toView'](_0x59640b,{}),_0x183167=Array['from'](_0x19ecda['getChildren']())['map'](_0x3cfd71=>this['_getViewJson'](_0x3cfd71));return JSON['stringify'](_0x183167);}_getViewJson(_0x49800b){if(_0x49800b['is']('$text'))return _0x49800b['data'];{const _0x17c540=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x9a3d8e=_0x49800b,_0xdb5e95=this['editor']['data']['htmlProcessor']['domConverter'],_0x5a8464={'type':_0x17c540['_getTypeCharForViewElement'](_0x9a3d8e),'name':_0x9a3d8e['name'],'attributes':Array['from'](_0x9a3d8e['getAttributes']()),'children':Array['from'](_0x9a3d8e['getChildren']())['map'](_0x20cb60=>this['_getViewJson'](_0x20cb60))};if(_0x49800b['is']('uiElement')&&'$comment'!=_0x49800b['name']){const _0x4e9164=_0x49800b['render'](_0xdb5e95['domDocument'],_0xdb5e95);_0x5a8464['children']['push'](_0x4e9164['outerHTML']);}else{if(_0x49800b['is']('rawElement')){const _0x294c8a=_0xdb5e95['domDocument']['createElement'](_0x9a3d8e['name']);_0x49800b['render'](_0x294c8a,_0xdb5e95),_0x5a8464['children']['push'](_0x294c8a['innerHTML']);}}const _0x6e188c=Array['from'](_0x9a3d8e['getCustomProperties']());_0x6e188c['length']>0x0&&(_0x5a8464['customProperties']=_0x6e188c);const _0x5a54f4=_0x9a3d8e['getFillerOffset']();return null!==_0x5a54f4&&(_0x5a8464['fillerOffset']=_0x5a54f4),_0x5a8464;}}['_markChanges'](_0x516a94,_0x4109c7,_0x38eb61,_0x589ecc,_0x138ccc,_0x2c4a23){let _0x419840=null,_0x2f88bd=null,_0x4284e8=0x0;const _0x432a79=this['editor']['model'];for(let _0x319b26=0x0;_0x319b26<_0x4109c7['length'];_0x319b26++){const _0x3819f8=this['_getVidAttributeName'](_0x4109c7[_0x319b26]),_0x3d0516=_0x4109c7[_0x319b26]['item']['getAttribute'](_0x3819f8),_0x2f0d1a=_0x38eb61['get'](_0x3d0516),_0x58b2f3=_0x319b26==_0x4109c7['length']-0x1;!_0x419840&&_0x2f0d1a&&(_0x419840=_0x2f0d1a,_0x2f88bd=_0x4109c7[_0x319b26]);const _0x463fe6=!!_0x419840&&!!_0x2f0d1a&&_0x2f0d1a['userId']!=_0x419840['userId'],_0xcac514=!!_0x419840&&!!_0x2f0d1a&&_0x2f0d1a['aiSource']!=_0x419840['aiSource'];_0x419840&&(!_0x2f0d1a||_0x463fe6||_0xcac514)&&(_0x27d4e0(_0x2f0d1a,Ct(_0x2f88bd,_0x516a94,_0x432a79),Ct(_0x4109c7[_0x319b26],_0x516a94,_0x432a79)),_0x419840=_0x2f0d1a||null,_0x2f88bd=_0x2f0d1a?_0x4109c7[_0x319b26]:null),_0x419840&&_0x58b2f3&&_0x27d4e0(_0x2f0d1a,Ct(_0x2f88bd,_0x516a94,_0x432a79),Nt(_0x4109c7[_0x319b26],_0x516a94,_0x432a79));}function _0x27d4e0(_0x15a324,_0x1fb49f,_0x1cdf55){const _0x56fc66=_0x419840['userId'],_0x5adde6=_0x419840['aiSource'],_0xc1ff00='revision:'+_0x589ecc+':'+_0x56fc66+':'+_0x4284e8++,_0x39fd99=_0x432a79['createRange'](_0x1fb49f,_0x1cdf55);_0x516a94['markers']['set'](_0xc1ff00,_0x39fd99),_0x5adde6&&(_0x2c4a23[_0xc1ff00]=_0x5adde6),null!==_0x56fc66&&_0x138ccc['add'](_0x56fc66);}}_getVidAttributeName(_0x516e97){switch(_0x516e97['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x30fc76){const _0x70f068=this['_idsRoots']['get'](_0x30fc76['position']['root']['rootName']),_0x559dbe=_0x56bb1(_0x30fc76['position'],_0x70f068),_0x322902=null===_0x30fc76['_authorId']?null:_0x30fc76['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x373f9f=_0x30fc76['_aiSource']||null,_0x3456fd=_0x559dbe['parent'],_0x533b10=this['_revisionId'],_0x3113cc=[];for(const _0x577c02 of _0x30fc76['nodes'])if(_0x577c02['is']('element'))_0x3113cc['push'](this['_makeIdsRoot'](_0x577c02));else{for(let _0x2e7676=0x0;_0x2e7676<_0x577c02['offsetSize'];_0x2e7676++)_0x3113cc['push'](new _0x2f35f3('$text',{'vid':this['_revisionId']++}));}const _0x381f25=this['_revisionId'];for(let _0x2773f2=_0x533b10;_0x2773f2<_0x381f25;_0x2773f2++)this['_touched']['set'](_0x2773f2,{'userId':_0x322902,'aiSource':_0x373f9f});_0x3456fd['_insertChild'](_0x559dbe['offset'],_0x3113cc);}_setTouched(_0xf45e6,_0x222204,_0x32b6a7){this['_touched']['set'](_0xf45e6,{'userId':_0x222204,'aiSource':_0x32b6a7||this['_touched']['get'](_0xf45e6)?.['aiSource']||null});}_handleMoveOperation(_0x499ae0){(_0x499ae0=this['_cloneOperation'](_0x499ae0,this['_idsRoots']))['_execute']();const _0x3c16bf=null===_0x499ae0['_authorId']?null:_0x499ae0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1dca60=_0x499ae0['_aiSource']||null,_0x1c0382=_0x499ae0['getMovedRangeStart'](),_0x55d6e7=_0x1c0382['parent'],_0x3cd3f2=_0x1c0382['offset'],_0x3802d2=(_0x4c6c9c,_0x43727e,_0x338aa4)=>{for(let _0x377649=_0x43727e;_0x377649<_0x338aa4;_0x377649++){const _0xc03b65=_0x4c6c9c['getChild'](_0x377649);_0xc03b65['is']('element','$text')?this['_setTouched'](_0xc03b65['getAttribute']('vid'),_0x3c16bf,_0x1dca60):(this['_setTouched'](_0xc03b65['getAttribute']('vid_start'),_0x3c16bf,_0x1dca60),_0x3802d2(_0xc03b65,0x0,_0xc03b65['childCount']),this['_setTouched'](_0xc03b65['getAttribute']('vid_end'),_0x3c16bf,_0x1dca60));}};_0x3802d2(_0x55d6e7,_0x3cd3f2,_0x3cd3f2+_0x499ae0['howMany']);}_handleMergeOperation(_0x54ee80){const _0x646840=null===(_0x54ee80=this['_cloneOperation'](_0x54ee80,this['_idsRoots']))['_authorId']?null:_0x54ee80['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x48d0b3=_0x54ee80['_aiSource']||null,_0x56d306=_0x54ee80['targetPosition']['parent'],_0x3d5a2e=_0x54ee80['sourcePosition']['parent'],_0x40e2d3=_0x56d306['getAttribute']('vid_end'),_0x418af7=_0x3d5a2e['getAttribute']('vid_start');_0x56d306['_setAttribute']('vid_end',_0x3d5a2e['getAttribute']('vid_end')),_0x3d5a2e['_setAttribute']('vid_end',_0x40e2d3),this['_setTouched'](_0x418af7,_0x646840,_0x48d0b3),this['_setTouched'](_0x40e2d3,_0x646840,_0x48d0b3),_0x54ee80['_execute']();}_handleSplitOperation(_0x21f4c4){const _0x3baa9e=null===(_0x21f4c4=this['_cloneOperation'](_0x21f4c4,this['_idsRoots']))['_authorId']?null:_0x21f4c4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x393f36=_0x21f4c4['_aiSource']||null,_0x82063d=_0x21f4c4['graveyardPosition'],_0x511f19=_0x21f4c4['splitPosition']['parent'];_0x21f4c4['_execute']();const _0x89f6c1=_0x511f19['getAttribute']('vid_end'),_0xc74f43=_0x21f4c4['insertionPosition']['nodeAfter'];if(_0x82063d){const _0x1d1e81=_0xc74f43['getAttribute']('vid_end'),_0x33bd82=_0x511f19['getAttribute']('vid_end');_0x511f19['_setAttribute']('vid_end',_0x1d1e81),_0xc74f43['_setAttribute']('vid_end',_0x33bd82),this['_setTouched'](_0x511f19['getAttribute']('vid_end'),_0x3baa9e,_0x393f36),this['_setTouched'](_0xc74f43['getAttribute']('vid_start'),_0x3baa9e,_0x393f36);}else{const _0x14134f=this['_revisionId']++,_0x3e3c5a=this['_revisionId']++;_0x511f19['_setAttribute']('vid_end',_0x14134f),_0xc74f43['_setAttribute']('vid_start',_0x3e3c5a),_0xc74f43['_setAttribute']('vid_end',_0x89f6c1),this['_setTouched'](_0x14134f,_0x3baa9e,_0x393f36),this['_setTouched'](_0x3e3c5a,_0x3baa9e,_0x393f36);}}_handleMarkerOperation(_0x5019ef){if(!_0x5019ef['affectsData'])return;const _0x459bb9=(_0x5019ef=this['_cloneOperation'](_0x5019ef,this['_diffRoots']))['oldRange']?_0x5019ef['oldRange']['root']:null,_0x34c21f=_0x5019ef['newRange']?_0x5019ef['newRange']['root']:null;_0x459bb9&&this['_markers']['delete'](_0x5019ef['name']),_0x34c21f&&this['_markers']['set'](_0x5019ef['name'],_0x5019ef['newRange']['clone']());const _0x32aff0=null===_0x5019ef['_authorId']?null:_0x5019ef['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xe67c88=_0x5019ef['name'];if(_0x5019ef['_aiSource']&&this['_aiTouchedMarkers']['set'](_0xe67c88,_0x5019ef['_aiSource']),!this['_touchedMarkers']['has'](_0xe67c88))return void this['_touchedMarkers']['set'](_0xe67c88,{'range':_0x5019ef['oldRange'],'userId':_0x32aff0});const _0x368a83=this['_touchedMarkers']['get'](_0xe67c88),_0x49a42d=_0x368a83['range'],_0x470080=_0x5019ef['newRange'];null==_0x49a42d&&null==_0x470080||_0x49a42d&&_0x470080&&_0x49a42d['isEqual'](_0x470080)?this['_touchedMarkers']['delete'](_0x5019ef['name']):_0x368a83['userId']=_0x32aff0;}_handleRootOperation(_0xe74f37,_0x95e88f){this['_diffRoots']['has'](_0xe74f37['rootName'])?this['_diffRoots']['get'](_0xe74f37['rootName'])['_isAttached']=_0xe74f37['isAdd']:(this['_diffRoots']['set'](_0xe74f37['rootName'],Ot(_0xe74f37['rootName'],_0xe74f37['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0xe74f37['rootName'],{}),_0x95e88f&&this['_idsRoots']['set'](_0xe74f37['rootName'],Ot(_0xe74f37['rootName'],_0xe74f37['elementName'],!0x0)));const _0x1c51ab=null===_0xe74f37['_authorId']?null:_0xe74f37['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x306ed5=this['_touchedRoots']['get'](_0xe74f37['rootName']);_0x306ed5&&_0x306ed5['userId']===_0x1c51ab?this['_touchedRoots']['delete'](_0xe74f37['rootName']):this['_touchedRoots']['set'](_0xe74f37['rootName'],{'userId':_0x1c51ab,'isAttached':_0xe74f37['isAdd']});}_handleRootAttributeOperation(_0x26b6b0){const _0x18ea6c=this['_diffRootsAttributes']['get'](_0x26b6b0['root']['rootName']);null===_0x26b6b0['newValue']?delete _0x18ea6c[_0x26b6b0['key']]:_0x18ea6c[_0x26b6b0['key']]=_0x26b6b0['newValue'];}};function St(_0x7ebe0c){const _0x370531=Ot(_0x7ebe0c['rootName'],_0x7ebe0c['name'],_0x7ebe0c['isAttached']());for(const _0x14622a of _0x7ebe0c['getChildren']()){const _0x4f04fc=_0x14622a['_clone'](!0x0);_0x370531['_appendChild'](_0x4f04fc);}return _0x370531;}function Ot(_0x199da2,_0x4972ef,_0x15c819=!0x0){const _0x2aec09=new _0xc42c44();return _0x2aec09['rootName']=_0x199da2,_0x2aec09['name']=_0x4972ef,_0x2aec09['_isAttached']=_0x15c819,_0x2aec09['isAttached']=()=>_0x2aec09['_isAttached'],_0x2aec09;}function Ct(_0x4133b5,_0x13bf5c,_0xfaed0b){const _0x44a3bf='elementEnd'==_0x4133b5['type']?_0xfaed0b['createPositionAt'](_0x4133b5['item'],'end'):_0xfaed0b['createPositionBefore'](_0x4133b5['item']);return _0xfaed0b['createPositionFromPath'](_0x13bf5c,_0x44a3bf['path'],_0x44a3bf['stickiness']);}function Nt(_0x3c9f37,_0x3efec8,_0x247869){const _0x4db8d1='elementStart'==_0x3c9f37['type']?_0x247869['createPositionAt'](_0x3c9f37['item'],0x0):_0x247869['createPositionAfter'](_0x3c9f37['item']);return _0x247869['createPositionFromPath'](_0x3efec8,_0x4db8d1['path'],_0x4db8d1['stickiness']);}const xt=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0xc0251e();var Ht=class extends Mt{['id'];author;type;data;rootName;constructor(_0x22a33c){super(),this['id']=_0x22a33c['id']||_0x5a9e0c(),this['author']=_0x22a33c['author'],this['type']=_0x22a33c['type'],this['data']=_0x22a33c['data']||{},this['rootName']=_0x22a33c['rootName'],this['set']('createdAt',_0x22a33c['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Pt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x51760a,_0xbb8880){this['newRevisionId']=_0x51760a,this['oldRevisionId']=_0xbb8880,this['changes']=new _0x4ae41b();}_setChanges(_0x101198){for(const _0x1b78e3 of _0x101198)this['changes']['add'](_0x1b78e3);}},Ut=class extends _0x3c4294{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[_0x2c9bd7,_0x124255,Rt,kt];}constructor(_0x533a73){super(_0x533a73),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',(_0x1fff01,_0x1bb4fd,_0x682dd8)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x9b699=>{for(const _0x7a29b3 of this['editor']['editing']['view']['document']['roots'])_0x682dd8?_0x9b699['removeClass']('ck-editor__editable__overlay',_0x7a29b3):_0x9b699['addClass']('ck-editor__editable__overlay',_0x7a29b3);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5cd21d=>null!==_0x5cd21d),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x45d7f8,_0x4b6dd2,_0x3a5748)=>_0x45d7f8&&_0x3a5748?_0x4b6dd2['changes']['getIndex'](_0x3a5748):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x465ad0,_0x5cc36a)=>_0x465ad0?_0x5cc36a['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x124255),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0xebf6b2=this['editor'],_0x4b28c8=new $t(_0xebf6b2,{'direction':'backward'}),_0x9f92a8=new $t(_0xebf6b2,{'direction':'forward'});_0xebf6b2['commands']['add']('showPreviousChange',_0x4b28c8),_0xebf6b2['commands']['add']('showNextChange',_0x9f92a8),_0xebf6b2['commands']['add']('restoreRevision',new Ft(_0xebf6b2)),this['on']('change:numberOfChanges',()=>{_0x4b28c8['refresh'](),_0x9f92a8['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0xebf6b2['enableReadOnlyMode']('revision-viewer'),_0xebf6b2['plugins']['has']('WidgetToolbarRepository')&&_0xebf6b2['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0xcf0cbb){return await this['_utils']['loadRevisionData'](_0xcf0cbb,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xcf0cbb);}async getRevisionRootsAttributes(_0x32b4bd){return await this['_utils']['loadRevisionData'](_0x32b4bd,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x32b4bd);}async['compare'](_0x5c689c,_0x1cef8f,_0x1da054=!0x1){if(!this['isEnabled'])return;const _0x57d6a0=this['diff'],_0x3a63c4=this['repository'],_0xcfd10b='string'==typeof _0x5c689c?_0x3a63c4['getRevision'](_0x5c689c):_0x5c689c,_0xd05776='string'==typeof _0x1cef8f?_0x3a63c4['getRevision'](_0x1cef8f):_0x1cef8f,_0x51fe05=_0xcfd10b['id'],_0x3596f8=_0xd05776?_0xd05776['id']:null;if(!_0x1da054&&this['diff']&&this['diff']['newRevisionId']===_0x51fe05&&this['diff']['oldRevisionId']===_0x3596f8)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Pt(_0x51fe05,_0x3596f8);const _0x28e3fd=this['_getRevisionsRange'](_0xcfd10b,_0xd05776,!0x0)['map'](_0x2fb0e1=>this['_utils']['loadRevisionData'](_0x2fb0e1,this['adapter']));return _0x28e3fd['push'](new Promise(_0x20cbb7=>{setTimeout(_0x20cbb7,0x14);})),Promise['all'](_0x28e3fd)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2f3f4d=this['_getDiff'](_0x51fe05,_0x3596f8);this['_cleanUpCommentMarkers'](_0x2f3f4d);for(const _0x58b35b of _0x2f3f4d['changes'])this['_changeIdToChange']['set'](_0x58b35b['id'],_0x58b35b);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x82c1e4=>{for(const _0x5b197e of this['editor']['model']['document']['getRootNames']())_0x82c1e4['detachRoot'](_0x5b197e);for(const _0xdeb904 of Object['keys'](_0x2f3f4d['model'])){const _0x4601f4=_0x2f3f4d['model'][_0xdeb904]['name'],_0x10d59f=_0x82c1e4['addRoot'](_0xdeb904,_0x4601f4);for(const _0x1210d6 of Object['keys'](_0x2f3f4d['attributes'][_0xdeb904]))_0x82c1e4['setAttribute'](_0x1210d6,_0x2f3f4d['attributes'][_0xdeb904][_0x1210d6],_0x10d59f);_0x82c1e4['insert'](_0x2f3f4d['model'][_0xdeb904],_0x10d59f,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2f3f4d['changes'])),this['isReady']=!0x0;})['catch'](_0x20546e=>{console['error'](_0x20546e),this['_cleanUp'](),_0x57d6a0&&(this['diff']=_0x57d6a0),this['isReady']=!0x0;});}addRevisionData(_0x1bbe27,_0x100131){const _0x130eda=this['repository']['createRevision'](_0x1bbe27);return _0x130eda['on']('_update',(_0x3ae38e,_0x723b36,_0x519493)=>_0x100131(_0x723b36,_0x519493,_0x130eda)),this['repository']['addRevision'](_0x130eda),_0x130eda;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x725e73=>{for(const _0x217a25 of this['editor']['model']['document']['getRootNames']())_0x725e73['detachRoot'](_0x217a25);});}_cleanUpCommentMarkers(_0x2968cb){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x438bca=this['_getVisibleCommentThreadIds']();for(const _0x5e3a5c of Object['values'](_0x2968cb['model']))for(const _0x521cd0 of Array['from'](_0x5e3a5c['markers']['keys']()))_0x521cd0['startsWith']('revision-comment:')&&!_0x438bca['has'](Lt(_0x521cd0))&&_0x5e3a5c['markers']['delete'](_0x521cd0);}_sortAndFilterDiffChanges(_0x303b4f){const _0x18bf5e=[],_0x32b9d0=new Map();for(const _0x43115d of this['editor']['model']['document']['getRootNames']()){const _0x31fbed=this['editor']['editing']['view']['getDomRoot'](_0x43115d);if(!_0x31fbed)continue;const _0x15edc7=_0x31fbed['getClientRects']()['item'](0x0);_0x15edc7&&(_0x18bf5e['push'](_0x43115d),_0x32b9d0['set'](_0x43115d,_0x15edc7));}return _0x18bf5e['sort']((_0x5520a0,_0x25babe)=>{const _0x4855f6=_0x32b9d0['get'](_0x5520a0),_0x4817a0=_0x32b9d0['get'](_0x25babe);return _0x4855f6['y']-_0x4817a0['y']||_0x4855f6['x']-_0x4817a0['x'];}),(_0x303b4f=_0x303b4f['filter'](_0x18aa6d=>_0x18bf5e['includes'](_0x18aa6d['rootName'])))['sort']((_0x21cbdf,_0x27fc2d)=>_0x18bf5e['indexOf'](_0x21cbdf['rootName'])-_0x18bf5e['indexOf'](_0x27fc2d['rootName'])),_0x303b4f;}['_makeTape'](_0x46ffcb,_0x4eaf10={}){const _0x55de77=Array['from'](_0x46ffcb['markers'])['filter'](([_0x244a5f,_0x171cee])=>_0x244a5f['startsWith']('revision:')&&!_0x171cee['isCollapsed']),_0x45ff2b=Array['from'](this['editor']['model']['createRangeIn'](_0x46ffcb)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x55de77['length'])for(const _0x4b6064 of _0x45ff2b){const [_0x1d6123,_0x55202e]=_0x55de77[0x0],[,_0x56753b,_0x103d57]=_0x1d6123['split'](':'),_0x1f1db8=_0x4eaf10[_0x1d6123]||null;if(_0x55202e['end']['isEqual'](_0x4b6064['nextPosition'])&&_0x55de77['shift'](),(_0x4b6064['previousPosition']['isEqual'](_0x55202e['start'])||_0x4b6064['previousPosition']['isAfter'](_0x55202e['start']))&&('insertion'==_0x56753b?_0x4b6064['isAdded']={'userId':_0x103d57,'aiSource':_0x1f1db8}:'deletion'==_0x56753b&&(_0x4b6064['isRemoved']={'userId':_0x103d57,'aiSource':_0x1f1db8})),0x0==_0x55de77['length'])break;}return _0x45ff2b;}_refreshStartEndIndex(_0x43304a){const _0x2be660=new Map();for(let _0x2ca811=0x0;_0x2ca811<_0x43304a['length'];_0x2ca811++)'text'===_0x43304a[_0x2ca811]['type']?(_0x43304a[_0x2ca811]['item']['startIndex']=_0x2ca811,_0x43304a[_0x2ca811]['item']['endIndex']=_0x2ca811):('elementStart'===_0x43304a[_0x2ca811]['type']?_0x43304a[_0x2ca811]['item']['startIndex']=_0x2ca811:'elementEnd'===_0x43304a[_0x2ca811]['type']&&(_0x43304a[_0x2ca811]['item']['endIndex']=_0x2ca811),_0x2be660['set'](_0x43304a[_0x2ca811]['id'],_0x2ca811));for(const _0x5f3dc0 of _0x2be660['values']())'elementStart'===_0x43304a[_0x5f3dc0]['type']?_0x43304a[_0x5f3dc0]['item']['endIndex']=_0x2be660['get'](_0x43304a[_0x5f3dc0]['pairId']):'elementEnd'===_0x43304a[_0x5f3dc0]['type']&&(_0x43304a[_0x5f3dc0]['item']['startIndex']=_0x2be660['get'](_0x43304a[_0x5f3dc0]['pairId']));}['_processTape'](_0x3a25f5){for(let _0x59f0af=0x0;_0x59f0af<_0x3a25f5['length'];_0x59f0af++){if('elementStart'===_0x3a25f5[_0x59f0af]['type'])_0x3a25f5[_0x59f0af]['item']['startIndex']=_0x59f0af;else{if('elementEnd'===_0x3a25f5[_0x59f0af]['type']){_0x3a25f5[_0x59f0af]['item']['endIndex']=_0x59f0af;const _0x6a4eda=_0x3a25f5[_0x59f0af]['item']['startIndex'];_0x3a25f5[_0x6a4eda]['pairId']=_0x3a25f5[_0x59f0af]['id'],_0x3a25f5[_0x59f0af]['pairId']=_0x3a25f5[_0x6a4eda]['id'];}else _0x3a25f5[_0x59f0af]['item']['startIndex']=_0x59f0af,_0x3a25f5[_0x59f0af]['item']['endIndex']=_0x59f0af,_0x3a25f5[_0x59f0af]['pairId']=null;}_0x3a25f5[_0x59f0af]['markersStart']||(_0x3a25f5[_0x59f0af]['markersStart']=[],_0x3a25f5[_0x59f0af]['markersEnd']=[]);}}_markInsertions(_0x39a453,_0x2bbf32){const _0x19c9ee=_0x39a453['filter'](_0x167508=>!_0x167508['isAdded']);for(let _0x2e248b=0x0;_0x2e248b<_0x2bbf32['length'];_0x2e248b++)_0x2bbf32[_0x2e248b]['isAdded']&&(_0x19c9ee[_0x2e248b]['isAdded']=_0x2bbf32[_0x2e248b]['isAdded']);}_getDiff(_0x2f66c7,_0x23e1a9=null){const _0xf65bae=this['repository']['getRevision'](_0x2f66c7),_0x42970b=_0x23e1a9?this['repository']['getRevision'](_0x23e1a9):null,_0x1595ad=this['_getRevisionsRange'](_0xf65bae,_0x42970b),_0x1fb39e=_0x1595ad[_0x1595ad['length']-0x1],_0x46cb3f=new Map(),_0x2d62a4={'model':{},'attributes':{},'changes':[]},_0x45cc08=new Set(),_0x521c16=new Map();for(let _0x1f492f=_0x1595ad['length']-0x1;_0x1f492f>=0x0;_0x1f492f--){const _0x2f142d=_0x1595ad[_0x1f492f];for(const _0x5151cd of Object['keys'](_0x2f142d['diffData']))if(_0x2f142d['diffData'][_0x5151cd]['attachChange']){const _0x1efb3d=_0x2f142d['diffData'][_0x5151cd]['attachChange'];_0x1efb3d['isAttached']?(_0x45cc08['add'](_0x5151cd),_0x521c16['has'](_0x5151cd)&&_0x521c16['get'](_0x5151cd)['userId']==_0x1efb3d['userId']?_0x521c16['delete'](_0x5151cd):_0x521c16['set'](_0x5151cd,_0x1efb3d)):_0x521c16['has'](_0x5151cd)?(_0x45cc08['delete'](_0x5151cd),_0x521c16['delete'](_0x5151cd)):(_0x45cc08['add'](_0x5151cd),_0x521c16['set'](_0x5151cd,_0x1efb3d));}else _0x45cc08['add'](_0x5151cd);}for(const _0x17b1ab of _0x45cc08){const _0x59d622=_0x521c16['has'](_0x17b1ab)&&!_0x521c16['get'](_0x17b1ab)['isAttached'];let _0x3cf932=_0x59d622?_0x1595ad['length']-0x1:0x0;const _0x4cfd94=_0x59d622?-0x1:0x1;for(;_0x1595ad[_0x3cf932];){const _0x12aabc=_0x1595ad[_0x3cf932];if(_0x12aabc['diffData'][_0x17b1ab]){const _0x88b954=_0x59d622?_0x12aabc['diffData'][_0x17b1ab]['attributesBefore']:_0x12aabc['diffData'][_0x17b1ab]['attributesAfter'];_0x2d62a4['attributes'][_0x17b1ab]=_0x88b954?_0x3ef400(_0x88b954):{};break;}_0x3cf932+=_0x4cfd94;}}for(const _0x560a39 of _0x1595ad){_0x560a39['model']={};for(const _0x2b49e7 of _0x560a39['authors'])_0x46cb3f['set'](_0x2b49e7['id'],_0x2b49e7);for(const _0x500c9d of _0x45cc08){const _0x1c725a=_0x560a39['diffData'][_0x500c9d]?_0x560a39['diffData'][_0x500c9d]['insertions']:'[]',_0x487d49=_0x560a39['diffData'][_0x500c9d]?_0x560a39['diffData'][_0x500c9d]['deletions']:'[]',_0x194865=_0x560a39['diffData'][_0x500c9d]?.['rootElementName']||'$root';_0x560a39['model'][_0x500c9d]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1c725a,_0x194865),'deletions':this['_utils']['_makeModelFromViewString'](_0x487d49,_0x194865)};}}for(const _0x35a6ca of _0x45cc08){let _0x378e59=null,_0x3995ff=0x0;const _0x233cda=_0x1595ad['map'](_0x45d3bb=>_0x45d3bb['diffData'][_0x35a6ca]?.['rootElementName'])['find'](_0x503340=>void 0x0!==_0x503340)||'$root',_0x7ec68a=new Map(Array['from'](_0xf65bae['model'][_0x35a6ca]['insertions']['markers'])['filter'](([_0x58d2d3])=>!_0x58d2d3['startsWith']('revision:')));let _0x257cb2=0x0;for(const _0x47f024 of _0x1595ad){const _0x2b2b02=_0x47f024['diffData'][_0x35a6ca]?.['aiSources']||{},_0x19f226=this['_makeTape'](_0x47f024['model'][_0x35a6ca]['insertions'],_0x2b2b02);_0x47f024==_0xf65bae?(_0x378e59=_0x19f226,_0x3995ff=_0x378e59['length'],_0x378e59['forEach'](_0x1692e7=>{_0x1692e7['id']=_0x257cb2++;}),this['_processTape'](_0x378e59)):this['_markInsertions'](_0x378e59,_0x19f226);const _0x2987f2=_0x378e59['filter'](_0x54ecb3=>!_0x54ecb3['isAdded'])['map'](_0x3d2446=>_0x3d2446['id']);let _0x543fb6=0x0;const _0x2a7be1=this['_makeTape'](_0x47f024['model'][_0x35a6ca]['deletions'],_0x2b2b02);_0x2a7be1['forEach'](_0x37c475=>{_0x37c475['isRemoved']?_0x37c475['id']=_0x3995ff++:_0x37c475['id']=_0x2987f2[_0x543fb6++];}),this['_processTape'](_0x2a7be1),this['_setDistance'](_0x378e59,'isAdded'),this['_setDistance'](_0x2a7be1,'isRemoved'),_0x47f024==_0xf65bae&&this['_markMarkers'](_0x378e59,_0x7ec68a),_0x378e59=this['_joinTapes'](_0x378e59,_0x2a7be1),this['_refreshStartEndIndex'](_0x378e59),this['_setDistance'](_0x378e59,'isRemoved');}_0x378e59=_0x378e59['filter'](_0x126009=>!(_0x126009['isAdded']&&_0x126009['isRemoved']));const _0x4ac8c7=new Map(_0x1fb39e['model'][_0x35a6ca]['deletions']['markers']),_0x383eb7=new Set(_0x7ec68a['keys']());for(const _0xa5d536 of _0x4ac8c7['keys']())_0x383eb7['delete'](_0xa5d536);const _0x1bdea1=Object['assign']({},..._0x1595ad['map'](_0x171c44=>_0x171c44['diffData'][_0x35a6ca]?.['aiSources']));this['_markSuggestions'](_0x378e59,_0x383eb7,_0x1bdea1),this['_fixObsoleteTags'](_0x378e59),_0x378e59=this['_removeMissingPairs'](_0x378e59),_0x378e59=this['_markMismatchedRemovedTags'](_0x378e59),_0x378e59=this['_removeUnsupportedChanges'](_0x378e59);const {root:_0x10660c,changes:_0x595368}=this['_makeModelFromTape'](_0x378e59,_0x46cb3f,_0x35a6ca,_0x233cda);_0x2d62a4['model'][_0x35a6ca]=_0x10660c;const _0x4e79e2=_0x521c16['get'](_0x35a6ca);if(_0x4e79e2){const _0xc7ab40=_0x46cb3f['get'](_0x4e79e2['userId']),_0x39b3b1=new Ht({'author':_0xc7ab40,'type':_0x4e79e2['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x35a6ca});_0x595368['unshift'](_0x39b3b1),_0x2d62a4['attributes'][_0x35a6ca]['revisionHistoryAttachChange']=_0x39b3b1['id'];}_0x2d62a4['changes']=_0x2d62a4['changes']['concat'](_0x595368);}return _0x2d62a4;}['_markMarkers'](_0x4bc872,_0x5e5994){for(let _0x39da28=0x0;_0x39da28<_0x4bc872['length'];_0x39da28++)for(const [_0x5e06c0,_0xece2c1]of _0x5e5994)!_0xece2c1['isCollapsed']&&_0xece2c1['start']['isEqual'](_0x4bc872[_0x39da28]['previousPosition'])&&_0x4bc872[_0x39da28]['markersStart']['push'](_0x5e06c0),_0xece2c1['end']['isEqual'](_0x4bc872[_0x39da28]['nextPosition'])&&_0x4bc872[_0x39da28]['markersEnd']['push'](_0x5e06c0);}['_joinTapes'](_0x29f84e,_0x5bfb1a){let _0x207974=[],_0x5e9c34=0x0,_0x28b6f4=0x0;for(;_0x5e9c34<_0x29f84e['length']||_0x28b6f4<_0x5bfb1a['length'];){const _0x2b7b12=_0x29f84e[_0x5e9c34]||{},_0x85e5cf=_0x5bfb1a[_0x28b6f4]||{};if(_0x2b7b12['id']==_0x85e5cf['id'])_0x5e9c34++,_0x28b6f4++,_0x207974['push'](_0x2b7b12);else{if(_0x85e5cf['isRemoved']&&_0x2b7b12['isAdded']){const {commonTape:_0x14a45d,iEnd:_0x4f6428,jEnd:_0x3dc912}=this['_threeWayMerge'](_0x29f84e,_0x5e9c34,_0x5bfb1a,_0x28b6f4);_0x207974=_0x207974['concat'](_0x14a45d),_0x5e9c34=_0x4f6428,_0x28b6f4=_0x3dc912;}else _0x85e5cf['isRemoved']?(_0x28b6f4++,_0x207974['push'](_0x85e5cf)):(_0x5e9c34++,_0x207974['push'](_0x2b7b12));}}return _0x207974;}_markSuggestions(_0x8bd541,_0x279a68,_0x1ae51b){const _0xb8a350=[];for(let _0x55eb65=0x0;_0x55eb65<_0x8bd541['length'];_0x55eb65++){for(let _0x263f27=0x0;_0x263f27<_0x8bd541[_0x55eb65]['markersStart']['length'];_0x263f27++){const _0x2b3768=_0x8bd541[_0x55eb65]['markersStart'][_0x263f27];if(!_0x279a68['has'](_0x2b3768))continue;const {group:_0x4c8686,type:_0x519757,authorId:_0x19e2ce}=_0x2a57c8(_0x2b3768);if('revision-suggestion'!=_0x4c8686||'insertion'!=_0x519757&&'deletion'!=_0x519757)continue;const _0x5dfce8=_0x1ae51b['suggestion:'+_0x2b3768['slice'](0x14)]||null;_0xb8a350['unshift']({'type':_0x519757,'name':_0x2b3768,'userId':_0x19e2ce,'aiSource':_0x5dfce8}),_0x8bd541[_0x55eb65]['markersStart']['splice'](_0x263f27,0x1),_0x263f27--;}_0x2774fe(_0x8bd541[_0x55eb65]);for(let _0x5475d1=0x0;_0x5475d1<_0x8bd541[_0x55eb65]['markersEnd']['length'];_0x5475d1++){const _0x4e75ba=_0x8bd541[_0x55eb65]['markersEnd'][_0x5475d1];if(!_0x279a68['has'](_0x4e75ba))continue;const {group:_0x52d933,type:_0x4c483f}=_0x2a57c8(_0x4e75ba);if('revision-suggestion'!=_0x52d933||'insertion'!=_0x4c483f&&'deletion'!=_0x4c483f)continue;_0x8bd541[_0x55eb65]['markersEnd']['splice'](_0x5475d1,0x1),_0x5475d1--;const _0x44343f=_0xb8a350['findIndex'](_0x3a5895=>_0x3a5895['name']==_0x4e75ba);_0x44343f>-0x1&&_0xb8a350['splice'](_0x44343f,0x1);}}function _0x2a57c8(_0x22b26a){const _0x51961a=_0x22b26a['split'](':');return{'group':_0x51961a[0x0],'type':_0x51961a[0x1],'subType':_0x51961a['length']>=0x5?_0x51961a[0x2]:null,'id':_0x51961a['length']<0x5?_0x51961a[0x2]:_0x51961a[0x3],'authorId':_0x51961a['length']<0x5?_0x51961a[0x3]:_0x51961a[0x4],'markerCount':0x6==_0x51961a['length']?_0x51961a[0x5]:null};}function _0x2774fe(_0x47ac2a){for(let _0x1a086a=0x0;_0x1a086a<_0xb8a350['length'];_0x1a086a++){if(_0x47ac2a['isAdded']&&'insertion'==_0xb8a350[_0x1a086a]['type']&&_0x47ac2a['isAdded']['userId']==_0xb8a350[_0x1a086a]['userId'])return _0x47ac2a['isAddSuggestion']={..._0xb8a350[_0x1a086a],'aiSource':_0x47ac2a['isAdded']['aiSource']||_0xb8a350[_0x1a086a]['aiSource']},void delete _0x47ac2a['isAdded'];if(!_0x47ac2a['isAdded']&&!_0x47ac2a['isRemoved']&&'deletion'==_0xb8a350[_0x1a086a]['type'])return void(_0x47ac2a['isRemoveSuggestion']=_0xb8a350[_0x1a086a]);}}}_setDistance(_0x4d87d0,_0x1a50c0){let _0x45f601=0x0,_0x32521c=!0x1;const _0x4618f1=new Map();for(const _0x2cd591 of _0x4d87d0)_0x2cd591[_0x1a50c0]?_0x32521c&&(_0x45f601++,_0x32521c=!0x1):(_0x45f601++,_0x32521c=!0x0),_0x4618f1['set'](_0x2cd591['id'],_0x45f601);for(let _0x1af36f=0x0;_0x1af36f<_0x4d87d0['length'];_0x1af36f++){if('isRemoved'==_0x1a50c0&&_0x4d87d0[_0x1af36f]['isAdded']||'isAdded'==_0x1a50c0&&_0x4d87d0[_0x1af36f]['isRemoved'])continue;if('text'==_0x4d87d0[_0x1af36f]['type']){_0x4d87d0[_0x1af36f]['distance']=0x0;continue;}const _0x59e89b=_0x4618f1['get'](_0x4d87d0[_0x1af36f]['pairId']),_0x13847d=_0x4618f1['get'](_0x4d87d0[_0x1af36f]['id']);_0x4d87d0[_0x1af36f]['distance']=_0x59e89b-_0x13847d;}}_getRevisionsRange(_0xa8a3cd,_0x4c34c5,_0x402dfb=!0x1){const _0x45d03c=[];let _0x47b26c=this['repository']['getIndex'](_0xa8a3cd),_0xbd2948=this['repository']['getIndex'](_0x4c34c5);for(-0x1==_0xbd2948&&(_0xbd2948=this['repository']['_revisions']['length'],_0x402dfb=!0x1);_0x47b26c<_0xbd2948;)_0x45d03c['push'](this['repository']['getRevision'](_0x47b26c)),_0x47b26c++;return _0x402dfb&&_0x45d03c['push'](this['repository']['getRevision'](_0x47b26c)),_0x45d03c;}_threeWayMerge(_0x418c4b,_0x1d371c,_0x1c8053,_0x494e37){const _0x50faa8=this['editor']['model']['schema'];let _0x5d6149=_0x1d371c;for(;_0x418c4b[_0x5d6149]&&_0x418c4b[_0x5d6149]['isAdded'];)_0x5d6149++;let _0x40a816=_0x494e37;for(;_0x1c8053[_0x40a816]&&_0x1c8053[_0x40a816]['isRemoved'];)_0x40a816++;_0x55f969(_0x418c4b,_0x1d371c,_0x5d6149),_0x55f969(_0x1c8053,_0x494e37,_0x40a816);const _0x55567b=_0x1c8053['slice'](_0x494e37,_0x40a816)['concat'](_0x418c4b['slice'](_0x1d371c,_0x5d6149));return _0x55567b['sort']((_0x3743c4,_0x40006d)=>_0x3743c4['side']!=_0x40006d['side']?_0x3743c4['side']-_0x40006d['side']:_0x3743c4['level']!=_0x40006d['level']?_0x3743c4['level']-_0x40006d['level']:_0x3743c4['distance']!=_0x40006d['distance']?_0x40006d['distance']-_0x3743c4['distance']:!!_0x3743c4['isAdded']!=!!_0x40006d['isAdded']?-0x1==_0x3743c4['side']||0x0==_0x3743c4['side']?_0x3743c4['isAdded']?-0x1:0x1:_0x3743c4['isAdded']?0x1:-0x1:_0x3743c4['index']-_0x40006d['index']),{'commonTape':_0x55567b,'iEnd':_0x5d6149,'jEnd':_0x40a816};function _0x55f969(_0x5e7b99,_0x265217,_0x4e7d3f){let _0x2c6c57=-0x1,_0x52431b=Number['POSITIVE_INFINITY'],_0x3370d4=!0x0;for(let _0x4b211f=_0x265217;_0x4b211f<_0x4e7d3f;_0x4b211f++)if(_0x50faa8['isInline'](_0x5e7b99[_0x4b211f]['item'])||(_0x3370d4=!0x1),_0x5e7b99[_0x4b211f]['item']['startIndex']<_0x265217&&(_0x2c6c57=_0x4b211f),_0x5e7b99[_0x4b211f]['item']['endIndex']>=_0x4e7d3f){_0x52431b=_0x4b211f;break;}_0x3370d4&&(_0x2c6c57=_0x4e7d3f-0x1);for(let _0x44f3f7=_0x265217;_0x44f3f7<_0x4e7d3f;_0x44f3f7++)_0x5e7b99[_0x44f3f7]['side']=_0x44f3f7<=_0x2c6c57?-0x1:_0x44f3f7<_0x52431b?0x0:0x1,_0x5e7b99[_0x44f3f7]['index']=_0x44f3f7;let _0x456a43=0x0;for(let _0x51c64f=_0x265217;_0x51c64f<=_0x2c6c57;_0x51c64f++)0x0==_0x5e7b99[_0x51c64f]['distance']?_0x5e7b99[_0x51c64f]['level']=_0x456a43:(_0x456a43++,_0x5e7b99[_0x51c64f]['level']=_0x456a43,_0x456a43++);for(let _0x2cf415=_0x265217;_0x2cf415<_0x4e7d3f;_0x2cf415++)0x0==_0x5e7b99[_0x2cf415]['side']&&(_0x5e7b99[_0x2cf415]['level']=_0x456a43);_0x456a43=0x0;for(let _0x48c2f1=_0x4e7d3f-0x1;_0x48c2f1>=_0x52431b;_0x48c2f1--)0x0==_0x5e7b99[_0x48c2f1]['distance']?_0x5e7b99[_0x48c2f1]['level']=_0x456a43:(_0x456a43--,_0x5e7b99[_0x48c2f1]['level']=_0x456a43,_0x456a43--);}}_fixObsoleteTags(_0x5c974e){const _0x2c6987=new Map(),_0x62606d=this['editor']['model']['schema'];for(let _0x28f843=0x1;_0x28f843<_0x5c974e['length'];_0x28f843++){let _0x238376,_0x2d5f13,_0x37f966;const _0x288d7a=_0x5c974e[_0x28f843],_0x245a8e=_0x5c974e[_0x28f843-0x1];if('text'==_0x288d7a['type'])continue;if(_0x288d7a['type']!=_0x245a8e['type'])continue;if(!_0x62606d['isBlock'](_0x245a8e['item'])||_0x62606d['isLimit'](_0x245a8e['item']))continue;if(!_0x62606d['isBlock'](_0x288d7a['item'])||_0x62606d['isLimit'](_0x288d7a['item']))continue;if((_0x5c974e[_0x28f843]['isAdded']||_0x5c974e[_0x28f843]['isAddSuggestion'])&&_0x5c974e[_0x28f843-0x1]['isRemoved'])_0x238376=_0x5c974e[_0x28f843],_0x2d5f13=_0x5c974e[_0x28f843-0x1],_0x37f966=_0x28f843-0x1;else{if(!_0x5c974e[_0x28f843]['isRemoved']||!_0x5c974e[_0x28f843-0x1]['isAdded']&&!_0x5c974e[_0x28f843-0x1]['isAddSuggestion'])continue;_0x238376=_0x5c974e[_0x28f843-0x1],_0x2d5f13=_0x5c974e[_0x28f843],_0x37f966=_0x28f843;}const _0x59c1b4=_0x238376['level']==_0x2d5f13['level'],_0xb1a8a1=Math['abs'](_0x238376['level'])<Math['abs'](_0x2d5f13['level'])&&0x0==_0x2d5f13['distance'];(_0x59c1b4||_0xb1a8a1)&&(_0x2c6987['set'](_0x2d5f13['id'],_0x238376['id']),_0x5c974e['splice'](_0x37f966,0x1),_0x28f843--,_0x238376['isAdded']=!0x1);}for(let _0x23ec52=0x0;_0x23ec52<_0x5c974e['length'];_0x23ec52++)_0x2c6987['has'](_0x5c974e[_0x23ec52]['pairId'])&&(_0x5c974e[_0x23ec52]['pairId']=_0x2c6987['get'](_0x5c974e[_0x23ec52]['pairId']));}['_removeMissingPairs'](_0x522ab6){const _0x556f8b=new Set(_0x522ab6['map'](_0x5a8f9f=>_0x5a8f9f['id']));for(let _0x1e9504=0x0;_0x1e9504<_0x522ab6['length'];_0x1e9504++)_0x556f8b['has'](_0x522ab6[_0x1e9504]['pairId'])||0x0==_0x522ab6[_0x1e9504]['distance']||(_0x522ab6[_0x1e9504]['isIncorrect']=!0x0);return _0x522ab6['filter'](_0x5e0e8a=>!_0x5e0e8a['isIncorrect']);}_markMismatchedRemovedTags(_0xca282d){const _0x5f174c=new Set();for(let _0x51da2c=0x0;_0x51da2c<_0xca282d['length'];_0x51da2c++){if(_0x5f174c['has'](_0xca282d[_0x51da2c]['id'])&&_0xca282d[_0x51da2c]['isRemoved']&&(_0xca282d[_0x51da2c]['isIncorrect']=!0x0),_0xca282d[_0x51da2c]['isIncorrect'])continue;if(0x0==_0xca282d[_0x51da2c]['distance'])continue;if('elementStart'!=_0xca282d[_0x51da2c]['type'])continue;if(null==_0xca282d[_0x51da2c]['pairId'])continue;let _0x57df1b=_0x51da2c+0x1,_0x168399=0x0;for(;_0xca282d[_0x57df1b]['id']!=_0xca282d[_0x51da2c]['pairId'];)'elementStart'==_0xca282d[_0x57df1b]['type']?_0x168399++:'elementEnd'==_0xca282d[_0x57df1b]['type']&&_0x168399--,_0x57df1b++;if(0x0!=_0x168399){if(_0xca282d[_0x51da2c]['isRemoved'])_0xca282d[_0x51da2c]['isIncorrect']=!0x0;else{for(;_0x57df1b!=_0x51da2c;)_0xca282d[_0x57df1b]['isRemoved']&&0x0!=_0xca282d[_0x57df1b]['distance']&&(_0xca282d[_0x57df1b]['isIncorrect']=!0x0,_0x5f174c['add'](_0xca282d[_0x57df1b]['pairId'])),_0x57df1b--;}}}return _0xca282d['filter'](_0x43706f=>!_0x43706f['isIncorrect']);}_removeUnsupportedChanges(_0x795755){const _0x4436de=this['editor']['model']['schema'];for(let _0x289b45=0x0;_0x289b45<_0x795755['length'];_0x289b45++){if(!(_0x795755[_0x289b45]['isAdded']||_0x795755[_0x289b45]['isAddSuggestion']||_0x795755[_0x289b45]['isRemoved']||_0x795755[_0x289b45]['isRemoveSuggestion']))continue;if(0x0==_0x795755[_0x289b45]['distance'])continue;const _0x2b0f7e=_0x795755[_0x289b45]['item'];_0x4436de['isBlock'](_0x2b0f7e)||_0x4436de['isLimit'](_0x2b0f7e)||(_0x795755[_0x289b45]['isAdded']&&delete _0x795755[_0x289b45]['isAdded'],_0x795755[_0x289b45]['isAddSuggestion']&&delete _0x795755[_0x289b45]['isAddSuggestion'],_0x795755[_0x289b45]['isRemoveSuggestion']&&delete _0x795755[_0x289b45]['isRemoveSuggestion'],_0x795755[_0x289b45]['isRemoved']&&(_0x795755[_0x289b45]['isIncorrect']=!0x0));}return _0x795755['filter'](_0x47b811=>!_0x47b811['isIncorrect']);}['_makeModelFromTape'](_0x43668b,_0x2418c0,_0x426ddb,_0xe788ec){const _0x2bcb4b=new _0xc42c44(),_0x3a6d7f=[],_0x59177a=new Map(),_0x3eda9f=this['editor']['model'],_0x36ef96=_0x3eda9f['schema'],_0x34d654=[_0x2bcb4b],_0x3dd2b3={},_0x3811de={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x2bcb4b['name']=_0xe788ec;let _0x8cb0d8=null;const _0x239ce9=[0x0];for(let _0x29a9f8=0x0;_0x29a9f8<_0x43668b['length'];_0x29a9f8++)if('elementStart'===_0x43668b[_0x29a9f8]['type']){_0x43668b[_0x29a9f8]['previousPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9);const _0x2dc7e1=new _0x2f35f3(_0x43668b[_0x29a9f8]['item']['name'],_0x43668b[_0x29a9f8]['item']['getAttributes']());_0x34d654[0x0]['_appendChild'](_0x2dc7e1),_0x239ce9['push'](0x0),_0x34d654['unshift'](_0x2dc7e1),_0x43668b[_0x29a9f8]['nextPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9);}else'elementEnd'===_0x43668b[_0x29a9f8]['type']?(_0x34d654['shift'](),_0x43668b[_0x29a9f8]['previousPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9),_0x239ce9['pop'](),_0x239ce9[_0x239ce9['length']-0x1]++,_0x43668b[_0x29a9f8]['nextPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9)):(_0x43668b[_0x29a9f8]['previousPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9),_0x8cb0d8?_0x8cb0d8['_data']+=_0x43668b[_0x29a9f8]['item']['data']:_0x8cb0d8=new _0xfcc423(_0x43668b[_0x29a9f8]['item']['data'],_0x43668b[_0x29a9f8]['item']['getAttributes']()),_0x43668b[_0x29a9f8+0x1]&&'text'===_0x43668b[_0x29a9f8+0x1]['type']&&_0x4aed44(_0x8cb0d8,_0x43668b[_0x29a9f8+0x1]['item'])||(_0x34d654[0x0]['_appendChild'](_0x8cb0d8),_0x8cb0d8=null),_0x239ce9[_0x239ce9['length']-0x1]+=_0x43668b[_0x29a9f8]['item']['offsetSize'],_0x43668b[_0x29a9f8]['nextPosition']=_0x3eda9f['createPositionFromPath'](_0x2bcb4b,_0x239ce9));for(let _0x4834bb=0x0;_0x4834bb<_0x43668b['length'];_0x4834bb++){const _0x18fbb0=_0x43668b[_0x4834bb]['previousPosition'],_0x5a86bc=_0x43668b[_0x4834bb]['nextPosition'];for(const _0x11b484 of _0x43668b[_0x4834bb]['markersStart'])_0x59177a['set'](_0x11b484,{'start':_0x18fbb0,'end':null});_0x48ac6a('isRemoveSuggestion',_0x4834bb,_0x18fbb0,_0x5a86bc),_0x48ac6a('isAddSuggestion',_0x4834bb,_0x18fbb0,_0x5a86bc),_0x48ac6a('isRemoved',_0x4834bb,_0x18fbb0,_0x5a86bc),_0x48ac6a('isAdded',_0x4834bb,_0x18fbb0,_0x5a86bc);for(const _0x5d0ccf of _0x43668b[_0x4834bb]['markersEnd']){const _0x387cc9=_0x59177a['get'](_0x5d0ccf);_0x387cc9?_0x387cc9['end']=_0x5a86bc:_0x59177a['set'](_0x5d0ccf,{'start':_0x5a86bc,'end':_0x5a86bc});}}for(const [_0x180cbe,_0x412e8c]of _0x59177a){const _0x23d5f8=this['editor']['model']['createRange'](_0x412e8c['start'],_0x412e8c['end']);_0x2bcb4b['markers']['set'](_0x180cbe,_0x23d5f8);}return _0x3a6d7f['sort']((_0x5e282e,_0x18f031)=>{const _0x54a6df=_0x2bcb4b['markers']['get']('revision:'+_0x5e282e['id']),_0x43736e=_0x2bcb4b['markers']['get']('revision:'+_0x18f031['id']);return _0x54a6df['start']['isBefore'](_0x43736e['start'])?-0x1:_0x54a6df['start']['isAfter'](_0x43736e['start'])?0x1:_0x54a6df['end']['isBefore'](_0x43736e['end'])?-0x1:_0x54a6df['end']['isAfter'](_0x43736e['end'])?0x1:'add'===_0x5e282e['type']?-0x1:0x1;}),{'root':_0x2bcb4b,'changes':_0x3a6d7f};function _0x48ac6a(_0xb99d89,_0x430b0b,_0x59a196,_0x1d48f2){const _0x5769a0=!!_0x43668b[_0x430b0b][_0xb99d89],_0x3ad4fa=_0x5769a0?_0x43668b[_0x430b0b][_0xb99d89]['userId']:null,_0x1fad5c=_0x5769a0&&_0x43668b[_0x430b0b][_0xb99d89]['aiSource']||null,_0x10c146=_0x430b0b===_0x43668b['length']-0x1,_0x2c517e=_0x3811de[_0xb99d89][0x0],_0x5de4b0=_0x36ef96['isObject'](_0x43668b[_0x430b0b]['item']);!_0x3dd2b3[_0xb99d89]&&_0x5769a0?_0x3dd2b3[_0xb99d89]={'start':_0x59a196,'tapeItem':_0x43668b[_0x430b0b],'userId':_0x3ad4fa,'aiSource':_0x1fad5c,'type':_0xb99d89}:_0x3dd2b3[_0xb99d89]&&!_0x5769a0?(_0x3dd2b3[_0xb99d89]['end']=_0x59a196,_0x1e224e(_0x3dd2b3[_0xb99d89]),_0x3dd2b3[_0xb99d89]=null):_0x3dd2b3[_0xb99d89]&&_0x5769a0&&(_0x3dd2b3[_0xb99d89]['userId']!==_0x3ad4fa||_0x3dd2b3[_0xb99d89]['aiSource']!==_0x1fad5c)&&(_0x3dd2b3[_0xb99d89]['end']=_0x59a196,_0x2c517e&&_0x2c517e['userId']===_0x3dd2b3[_0xb99d89]['userId']?_0x2c517e['change']['aiSource']=_0x2c517e['change']['aiSource']||_0x3dd2b3[_0xb99d89]['aiSource']:_0x1e224e(_0x3dd2b3[_0xb99d89]),_0x3dd2b3[_0xb99d89]={'start':_0x59a196,'tapeItem':_0x43668b[_0x430b0b],'userId':_0x3ad4fa,'aiSource':_0x1fad5c,'type':_0xb99d89}),_0x3dd2b3[_0xb99d89]&&_0x5de4b0&&('elementStart'!==_0x43668b[_0x430b0b]['type']||_0x2c517e&&_0x2c517e['userId']===_0x3ad4fa||_0x3811de[_0xb99d89]['unshift']({'userId':_0x3ad4fa,'object':_0x43668b[_0x430b0b]['item'],'change':_0x3dd2b3[_0xb99d89]}),'elementEnd'===_0x43668b[_0x430b0b]['type']&&_0x2c517e&&_0x2c517e['object']===_0x43668b[_0x430b0b]['item']&&(_0x3811de[_0xb99d89]['shift'](),_0x3dd2b3[_0xb99d89]=_0x2c517e['change'])),_0x3dd2b3[_0xb99d89]&&_0x10c146&&(_0x3dd2b3[_0xb99d89]['end']=_0x1d48f2,_0x1e224e(_0x3dd2b3[_0xb99d89]),_0x3dd2b3[_0xb99d89]=null);}function _0x1e224e({start:_0x2fcc2e,end:_0x702d3a,tapeItem:_0x2fb750,userId:_0x489ee1,aiSource:_0x2ef23f,type:_0x17b131}){const _0x59b1cd=_0x2fb750['item'],_0x1abf4=_0x3eda9f['schema']['isBlock'](_0x59b1cd)&&!_0x3eda9f['schema']['isLimit'](_0x59b1cd),_0x52b2be=_0x2fcc2e['nodeAfter']==_0x702d3a['parent']&&_0x702d3a['isAtStart'];if(_0x1abf4&&_0x52b2be)return;const _0x2e49d4=_0x3eda9f['createRange'](_0x2fcc2e,_0x702d3a),_0x5f002a=_0x2418c0['get'](_0x489ee1),_0x2e7e3c=new Ht({'author':_0x5f002a,'type':'isAdded'==_0x17b131||'isAddSuggestion'==_0x17b131?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x17b131||'isRemoveSuggestion'==_0x17b131,'aiSource':_0x2ef23f||null},'createdAt':new Date(),'rootName':_0x426ddb});_0x3a6d7f['push'](_0x2e7e3c),_0x2bcb4b['markers']['set']('revision:'+_0x2e7e3c['id'],_0x2e49d4);}function _0x4aed44(_0x5e179c,_0x1173b5){const _0x117c7b=_0x5e179c['getAttributes'](),_0x1155fe=_0x1173b5['getAttributes']();for(const _0x27f4fc of _0x117c7b){if(_0x27f4fc[0x1]!==_0x1173b5['getAttribute'](_0x27f4fc[0x0]))return!0x1;_0x1155fe['next']();}return _0x1155fe['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x12485e=>{const _0x3eba67=_0x12485e['markerName']['split'](':')[0x1],_0x4233e3=this['_getChangeFromId'](_0x3eba67);if(!_0x4233e3)return null;const _0x41b9b7='add'==_0x4233e3['type']?'insertion':'deletion',_0x128edb=['ck-suggestion-marker','ck-suggestion-marker-'+_0x41b9b7];return _0x4233e3['data']['isSuggestion']&&_0x128edb['push']('ck-suggestion-marker-'+_0x41b9b7+'-new'),this['activeChange']==_0x4233e3&&_0x128edb['push']('ck-suggestion-marker--active'),{'classes':_0x128edb,'attributes':{'data-change-id':_0x3eba67}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x34a2c1=>{_0x34a2c1['on']('element:pre',(_0x32ffc2,_0x4badb5,_0x4e25a6)=>{const _0x1cb0a2=_0x4badb5['viewItem']['getChild'](0x0);if(!_0x1cb0a2||!_0x1cb0a2['is']('element','code'))return;if(!_0x4e25a6['consumable']['consume'](_0x1cb0a2,{'attributes':['vid_start','vid_end']}))return;const _0x435394=_0x4badb5['modelRange']['start']['nodeAfter'];_0x4e25a6['writer']['setAttribute']('vid_start',_0x1cb0a2['getAttribute']('vid_start'),_0x435394),_0x4e25a6['writer']['setAttribute']('vid_end',_0x1cb0a2['getAttribute']('vid_end'),_0x435394);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x323d2b=>{_0x323d2b['on']('element',(_0x5e26d0,_0x580c2f,_0x1d05f9)=>{if(!_0x1d05f9['consumable']['consume'](_0x580c2f['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x580c2f['modelRange']['isCollapsed'])return;const _0x579e89=_0x580c2f['modelRange']['start']['nodeAfter'];_0x579e89['hasAttribute']('vid_start')||_0x579e89['hasAttribute']('vid')||(_0x1d05f9['writer']['setAttribute']('vid_start',_0x580c2f['viewItem']['getAttribute']('vid_start'),_0x579e89),_0x1d05f9['writer']['setAttribute']('vid_end',_0x580c2f['viewItem']['getAttribute']('vid_end'),_0x579e89));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x563859=>_0x563859['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3247d4,[,_0x2d42c3])=>{['vid_start','vid_end','vid']['includes'](_0x2d42c3)&&(_0x3247d4['return']=!0x0,_0x3247d4['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5c21f1=>{_0x5c21f1['on']('attribute:vid',(_0x499918,_0x5e38e3,_0x3ac338)=>{if('\x20'!=_0x5e38e3['item']['data']||_0x5e38e3['item']['parent']['maxOffset']>0x1)return;if(!_0x3ac338['consumable']['consume'](_0x5e38e3['item'],_0x499918['name']))return;const _0x30a187=_0x3ac338['writer'],_0x1ac479=_0x3ac338['mapper']['toViewRange'](_0x5e38e3['range']);_0x30a187['wrap'](_0x1ac479,_0x30a187['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4a8c9b){const _0xb5abf7=_0x4a8c9b['plugins']['get']('RevisionViewer');return(_0x408837,_0x626d98,_0x2e53f8)=>{const _0x2b2bd8=_0x626d98['markerName']['split'](':')[0x1],_0x1d7e6d=_0xb5abf7['_getChangeFromId'](_0x2b2bd8);if(!_0x1d7e6d)return null;const _0x5c40d6='add'==_0x1d7e6d['type']?'split':'merge';if(!_0x2e53f8['consumable']['test'](_0x626d98['markerRange'],_0x408837['name']))return;const _0xdff58b=_0x626d98['markerRange']['getWalker'](),_0x3d16e5=_0x626d98['markerRange']['start'],_0x15724e=_0x4a8c9b['model']['schema'];let _0x53ad0c=null,_0x102c83=null,_0x1d3231=!0x1,_0x389f27=!0x1;for(const _0x4b0c6c of _0xdff58b){const _0x329e13=_0x4b0c6c['item'];_0x1d3231=_0x1d3231||_0x15724e['isContent'](_0x329e13);const _0x5b14bc=_0x2e53f8['mapper']['toViewElement'](_0x329e13);if(_0x5b14bc&&_0x5b14bc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4b0c6c['type']&&(_0x15724e['isBlock'](_0x329e13)&&!_0x15724e['isLimit'](_0x329e13)&&(_0x329e13['nextSibling']||_0x3d16e5['isAtEnd']?_0x53ad0c&&_0x53ad0c['parent']==_0x329e13||(_0x53ad0c=_0x329e13,_0x2960f5(_0x4b0c6c['previousPosition']),_0x389f27=!0x0):_0x102c83=_0x102c83||_0x4b0c6c['previousPosition']));}function _0x2960f5(_0x9f9eb6){const _0x46d425=_0x2e53f8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5c40d6}),_0x96389e=_0x2e53f8['mapper']['toViewPosition'](_0x9f9eb6);_0x1d7e6d['data']['isSuggestion']&&_0x2e53f8['writer']['addClass']('ck-suggestion-marker-'+_0x5c40d6+'-new',_0x46d425),_0xb5abf7['activeChange']==_0x1d7e6d&&_0x2e53f8['writer']['addClass']('ck-suggestion-marker--active',_0x46d425),_0x2e53f8['writer']['insert'](_0x96389e,_0x46d425),_0x2e53f8['mapper']['bindElementToMarker'](_0x46d425,_0x626d98['markerName']);}_0x1d3231||_0x389f27||!_0x102c83||_0x2960f5(_0x102c83);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x43d4a0,_0x497496,_0x2c3258)=>{const _0x1845cc=_0x2c3258['mapper']['markerNameToElements'](_0x497496['markerName']);if(_0x1845cc){for(const _0x3375c0 of _0x1845cc)(_0x3375c0['hasClass']('ck-suggestion-marker-split')||_0x3375c0['hasClass']('ck-suggestion-marker-merge'))&&(_0x2c3258['mapper']['unbindElementFromMarkerName'](_0x3375c0,_0x497496['markerName']),_0x2c3258['writer']['remove'](_0x3375c0));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x13d4dd,_0x334478,_0xc8d840)=>{const _0x356656=_0x334478['markerName']['split'](':')[0x1],_0x216c3c=this['_getChangeFromId'](_0x356656);if(!_0x216c3c)return null;const _0x3f6fab='add'==_0x216c3c['type']?'split':'merge';if(_0xc8d840['consumable']['test'](_0x334478['markerRange'],_0x13d4dd['name']))for(const _0x10f1e0 of _0x334478['markerRange']['getItems']()){if(!_0x10f1e0['is']('element','softBreak'))continue;const _0xf1336b=_0xc8d840['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3f6fab}),_0x77f20b=_0xc8d840['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x10f1e0));_0x216c3c['data']['isSuggestion']&&_0xc8d840['writer']['addClass']('ck-suggestion-marker-'+_0x3f6fab+'-new',_0xf1336b),this['activeChange']==_0x216c3c&&_0xc8d840['writer']['addClass']('ck-suggestion-marker--active',_0xf1336b),_0xc8d840['writer']['insert'](_0x77f20b,_0xf1336b),_0xc8d840['mapper']['bindElementToMarker'](_0xf1336b,_0x334478['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x5f4310=>{for(const _0x50f1ca of this['editor']['model']['document']['getRootNames']()){const _0x31d9c1=this['editor']['model']['document']['getRoot'](_0x50f1ca),_0x2fb015=this['editor']['editing']['view']['document']['getRoot'](_0x50f1ca);if(_0x2fb015){const _0x2a66bd=_0x31d9c1['getAttribute']('revisionHistoryAttachChange');if(_0x5f4310['removeAttribute']('data-change-id',_0x2fb015),_0x5f4310['removeClass']('ck-revision-history-root-add',_0x2fb015),_0x5f4310['removeClass']('ck-revision-history-root-remove',_0x2fb015),_0x5f4310['removeClass']('ck-revision-history-root--active',_0x2fb015),_0x2a66bd){const _0x75da35=this['_getChangeFromId'](_0x2a66bd);if(!_0x75da35)return null;_0x5f4310['setAttribute']('data-change-id',_0x2a66bd,_0x2fb015),_0x5f4310['addClass']('ck-revision-history-root-'+_0x75da35['type'],_0x2fb015),this['activeChange']==_0x75da35&&_0x5f4310['addClass']('ck-revision-history-root--active',_0x2fb015);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x10fa8e=>'revision-comment:'+_0x10fa8e,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x547427=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Lt(_0x547427['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x23b4cf=>'revision-suggestion:'+_0x23b4cf,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4a56d9=>({'name':'suggestion:'+_0x4a56d9,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x34f599=>{const _0x33042c=_0x34f599['markerName']['split'](':')[0x1];return'insertion'!=_0x33042c&&'deletion'!=_0x33042c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x33042c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Bt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Bt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x28c162,_0x39c3df,_0xd40fc3)=>{const _0xe8aff6=_0xd40fc3['mapper']['markerNameToElements'](_0x39c3df['markerName']);if(_0xe8aff6){for(const _0x32eb23 of _0xe8aff6)_0x32eb23['is']('uiElement')&&(_0xd40fc3['mapper']['unbindElementFromMarkerName'](_0x32eb23,_0x39c3df['markerName']),_0xd40fc3['writer']['remove'](_0x32eb23));}},{'priority':'high'});}_getChangeFromId(_0x36aa59){return this['_changeIdToChange']['get'](_0x36aa59);}_getViewForChange(_0x45b652){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Tt(this['editor']['locale'],_0x45b652,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5d7993,_0x2d46b3,_0x39b534,_0x5af8aa)=>{_0x5af8aa&&this['_balloon']['remove'](_0x5af8aa),_0x39b534&&(this['_balloon']['add']({'view':_0x39b534,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2511be=this['editor']['editing'],_0x3fa50b=this['_getChangeFromId'](_0x39b534['changeId']);let _0x19a7fb;if(_0x3fa50b['data']['isOnRoot']){const _0xdbe93a=_0x2511be['view']['getDomRoot'](_0x3fa50b['rootName']);_0x19a7fb=Array['from'](_0xdbe93a['getClientRects']());}else{const _0x51dac6=this['editor']['model']['markers']['get']('revision:'+_0x39b534['changeId']);_0x19a7fb=Array['from'](_0x2511be['mapper']['markerNameToElements'](_0x51dac6['name']))['map'](_0x111e6a=>_0x2511be['view']['domConverter']['mapViewToDom'](_0x111e6a))['map'](_0x2ed1df=>Array['from'](_0x2ed1df['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x19a7fb['find'](_0x2099a8=>_0x2099a8['top']-0x3<=this['_activeViewTarget']['y']&&_0x2099a8['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2099a8['left']-0x3<=this['_activeViewTarget']['x']&&_0x2099a8['right']+0x3>=this['_activeViewTarget']['x'])||_0x19a7fb[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x3d6c9a,_0xdc3884,_0x78112b,_0x2127da)=>{this['activeView']=_0x78112b?this['_getViewForChange'](_0x78112b):null,this['editor']['model']['change'](()=>{const _0x35d769=this['editor']['editing'];_0x2127da&&(_0x2127da['data']['isOnRoot']?_0x35d769['view']['change'](_0x223682=>{_0x223682['removeClass']('ck-revision-history-root--active',_0x35d769['view']['document']['getRoot'](_0x2127da['rootName']));}):_0x35d769['reconvertMarker']('revision:'+_0x2127da['id'])),_0x78112b&&(_0x78112b['data']['isOnRoot']?_0x35d769['view']['change'](_0x3dfa22=>{_0x3dfa22['addClass']('ck-revision-history-root--active',_0x35d769['view']['document']['getRoot'](_0x78112b['rootName']));}):_0x35d769['reconvertMarker']('revision:'+_0x78112b['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x136265,_0x596941)=>{if(this['activeChange'])return;const _0x213f8e=this['_findChangeIdFromDomTarget'](_0x596941['target']),_0x2ce1bc=this['_changeIdToChange']['get'](_0x213f8e);_0x2ce1bc?(this['_activeViewTarget']={'x':_0x596941['domEvent']['x'],'y':_0x596941['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x2ce1bc)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x60f446,_0x4b9e50)=>{const _0x281b89=this['_findChangeIdFromDomTarget'](_0x4b9e50['target']),_0x53d04c=this['_changeIdToChange']['get'](_0x281b89);_0x53d04c?(this['_activeViewTarget']={'x':_0x4b9e50['domEvent']['x'],'y':_0x4b9e50['domEvent']['y']},_0x53d04c===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x53d04c):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x2d31db){do{const _0x398292=_0x2d31db['getAttribute']('data-change-id');if(_0x398292)return _0x398292;_0x2d31db=_0x2d31db['parent'];}while(_0x2d31db);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x46c789=>{for(const _0x19d7d5 of this['editor']['model']['markers'])_0x46c789['removeMarker'](_0x19d7d5);});}};function Lt(_0x4a74b3){return _0x4a74b3['split'](':')[0x1];}function Bt(_0x4fdc6a,_0x5096dc){return(_0x2c7788,_0x1731c5,_0x34c16e)=>{if(!_0x34c16e['consumable']['test'](_0x1731c5['markerRange'],_0x2c7788['name']))return;const _0x31ca4d=_0x1731c5['markerRange']['getWalker'](),_0xd4af40=_0x1731c5['markerRange']['start'],_0x1c242f=_0x4fdc6a['model']['schema'];let _0x5d2bbb=null,_0x239703=null,_0x27b64c=!0x1,_0x356479=!0x1;for(const _0x4e9556 of _0x31ca4d){const _0x3ddd73=_0x4e9556['item'];_0x27b64c=_0x27b64c||_0x1c242f['isContent'](_0x3ddd73);const _0x398fc2=_0x34c16e['mapper']['toViewElement'](_0x3ddd73);if(_0x398fc2&&_0x398fc2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4e9556['type']&&(_0x1c242f['isBlock'](_0x3ddd73)&&!_0x1c242f['isLimit'](_0x3ddd73)&&(_0x3ddd73['nextSibling']||_0xd4af40['isAtEnd']?_0x5d2bbb&&_0x5d2bbb['parent']==_0x3ddd73||(_0x5d2bbb=_0x3ddd73,_0x39dc09(_0x4e9556['previousPosition']),_0x356479=!0x0):_0x239703=_0x239703||_0x4e9556['previousPosition']));}function _0x39dc09(_0x363ffa){const _0x4b1d63=_0x34c16e['mapper']['toViewPosition'](_0x363ffa),_0x4e44a7=_0x34c16e['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5096dc});_0x34c16e['writer']['insert'](_0x4b1d63,_0x4e44a7),_0x34c16e['mapper']['bindElementToMarker'](_0x4e44a7,_0x1731c5['markerName']);}_0x27b64c||_0x356479||!_0x239703||_0x39dc09(_0x239703);};}var Ft=class extends _0x2ea1de{constructor(_0x1dfb06){super(_0x1dfb06);const _0x15bd8f=_0x1dfb06['plugins']['get'](Ut);this['affectsData']=!0x1,this['listenTo'](_0x15bd8f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x15bd8f,'change:isEnabled',()=>this['refresh']());}execute(){const _0x4537f1=this['editor'],_0x2e71e4=_0x4537f1['plugins']['get'](Ut),_0x1699e4=_0x2e71e4['isReady']?_0x2e71e4['diff']['newRevisionId']:null;_0x4537f1['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1699e4);}['refresh'](){const {isReady:_0x36e31d,isEnabled:_0x36b4ba,repository:_0x2139e8,diff:_0x36af79}=this['editor']['plugins']['get'](Ut),_0x575b88=_0x36af79&&_0x2139e8['getLaterVisibleRevision'](_0x36af79['newRevisionId']);this['isEnabled']=_0x36e31d&&_0x36b4ba&&Boolean(_0x575b88);}},$t=class extends _0x2ea1de{_step;constructor(_0xe7d3d0,{direction:_0x2da719}){super(_0xe7d3d0);const _0x1aee0e=_0xe7d3d0['plugins']['get'](Ut);this['affectsData']=!0x1,this['_step']='forward'===_0x2da719?0x1:-0x1,this['listenTo'](_0x1aee0e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1aee0e,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1aee0e,'change:activeChange',()=>this['refresh']());}execute(){const _0x37e816=this['editor'],_0x3def0a=_0x37e816['plugins']['get'](Ut),{isNavigationMode:_0x3dfc1b,currentChangeNumber:_0x3f3132}=_0x3def0a;let _0x344591;if(_0x3def0a['activeChange']=_0x3dfc1b?_0x3def0a['diff']['changes']['get'](_0x3f3132+this['_step']):_0x3def0a['diff']['changes']['first'],_0x3def0a['activeChange']['data']['isOnRoot'])_0x344591=_0x37e816['editing']['view']['getDomRoot'](_0x3def0a['activeChange']['rootName']);else{const _0x5e7e33=_0x37e816['model']['markers']['get']('revision:'+_0x3def0a['activeChange']['id']);_0x344591=_0x19ab88(_0x37e816['editing'],_0x5e7e33);}_0x2444ec({'target':_0x344591,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x5eddfd,currentChangeNumber:_0x481e2a,numberOfChanges:_0x1640d5,isReady:_0x301618,isEnabled:_0x354f54}=this['editor']['plugins']['get'](Ut);this['isEnabled']=!!(_0x354f54&&_0x301618&&_0x1640d5)&&(!_0x5eddfd||(0x1===this['_step']?_0x481e2a<_0x1640d5-0x1:_0x481e2a>0x0));}},jt=class extends ft{constructor(_0x4686d9){super(_0x4686d9);const _0xfd228=this['bindTemplate'],_0x49afcd=new _0x1b2b54(_0x4686d9),_0x528a53=new _0x1b2b54(_0x4686d9);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',(_0x55047c,_0x15544f)=>_0x55047c&&_0x15544f>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x221a23,_0x3e9ae5,_0x3e55a3,_0x5d188f)=>{if(!_0x221a23)return At(_0x4686d9,'Loading...');if(!_0x3e55a3)return At(_0x4686d9,'No\x20changes');const _0x392e31=At(_0x4686d9,'NUMBER_OF_CHANGES',_0x3e55a3);return _0x5d188f?At(_0x4686d9,'X_OF_Y_CHANGES',[_0x3e9ae5+0x1,_0x3e55a3]):_0x392e31;}),_0x49afcd['set']({'label':At(_0x4686d9,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1555fc}),_0x528a53['set']({'label':At(_0x4686d9,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3a9006}),_0x49afcd['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x528a53['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x49afcd['on']('execute',()=>this['fire']('execute','backward')),_0x528a53['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',_0xfd228['if']('_isStatusLabelVisible','ck-hidden',_0x5a8137=>!_0x5a8137)]},'children':[{'text':_0xfd228['to']('isNavigationMode',_0x22653e=>_0x22653e?At(_0x4686d9,'EDIT_X_OF_Y_REVISIONS')+':\x20':At(_0x4686d9,'Total')+':\x20')}]},{'text':_0xfd228['to']('_statusText')}]},new lt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x49afcd,_0x528a53]}]});}};const Gt='ck-editor__editable__loading-overlay';var Kt=class extends _0x3c4294{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1d5322=this['editor']['editing']['view'];_0x1d5322['change'](_0x4d5284=>{for(const _0x457aea of _0x1d5322['document']['roots'])_0x4d5284['addClass'](Gt,_0x457aea);});}['hide'](){const _0x815703=this['editor']['editing']['view'];_0x815703['change'](_0x1e6c20=>{for(const _0x2771d3 of _0x815703['document']['roots'])_0x1e6c20['removeClass'](Gt,_0x2771d3);});}},qt=class extends _0x3c4294{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ut,Kt];}init(){const _0x338921=this['editor'],_0x27b487=_0x338921['plugins']['get'](Ut),_0x33975a=_0x338921['plugins']['get'](Kt);_0x338921['ui']['componentFactory']['add']('exitToEditing',_0xfb7a5d=>{const _0x23675e=new _0x1b2b54(_0xfb7a5d);return _0x23675e['set']({'label':At(_0xfb7a5d,'Back\x20to\x20editing'),'icon':_0x230776,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x23675e,'execute',()=>{_0x338921['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x23675e;}),_0x338921['ui']['componentFactory']['add']('restoreRevision',_0x620507=>{const _0xf53686=new _0x1b2b54(_0x620507);return _0xf53686['set']({'label':At(_0x620507,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0xf53686['bind']('isEnabled')['to'](_0x338921['commands']['get']('restoreRevision')),this['listenTo'](_0xf53686,'execute',()=>_0x338921['execute']('restoreRevision')),_0xf53686;}),_0x338921['ui']['componentFactory']['add']('changesNavigation',_0x1532e1=>{const _0x366b74=new jt(_0x1532e1),_0x37c4b5=_0x338921['commands']['get']('showPreviousChange'),_0x31269a=_0x338921['commands']['get']('showNextChange');return _0x366b74['bind']('isBackwardNavigationEnabled')['to'](_0x37c4b5,'isEnabled'),_0x366b74['bind']('isForwardNavigationEnabled')['to'](_0x31269a,'isEnabled'),_0x366b74['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x27b487),this['listenTo'](_0x366b74,'execute',(_0x44e08a,_0x4ee21d)=>{_0x338921['execute']('forward'===_0x4ee21d?'showNextChange':'showPreviousChange');}),_0x366b74;}),_0x33975a['show'](),_0x27b487['on']('change:isReady',(_0x2b12d3,_0x4b0c22,_0x426a63)=>{_0x426a63?_0x33975a['hide']():_0x33975a['show']();});}},Yt=class extends st{['_resizeObserver']=null;constructor(_0x3e1fd5,_0x49d59c){super(_0x3e1fd5,_0x49d59c);const _0x3703b0=this['bindTemplate'];this['set']({'label':At(_0x3e1fd5,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=At(_0x3e1fd5,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3703b0['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x3a57ef(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']()),this['on']('change:isEnabled',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0xbb1577=this['fieldView']['element'];this['_tooltipString']=!this['isEnabled']&&_0xbb1577['scrollWidth']>_0xbb1577['clientWidth']&&_0xbb1577['value']||'';}},Jt=class extends ft{constructor(_0x242e8e,_0x169d63,_0x2c72f8){super(_0x242e8e);const _0x37771e=new tt();_0x37771e['set']({'content':_0x39d7d6,'viewBox':'0\x200\x2011\x2010'});const _0xe08520=['ck','ck-revision-history-sidebar__revision-author'];_0x2c72f8&&_0xe08520['push']('ck-revision-history-sidebar__revision-author_creator');const _0x351dc4=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':At(_0x242e8e,_0x2c72f8?'Revision\x20creator':'Revision\x20author')},'children':[_0x37771e,_0x169d63['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xe08520},'children':_0x351dc4});}};function Wt(_0x12087c,_0x4ab5b7){const _0x441585=_0x12087c['bindTemplate'],_0x1098a2=_0x12087c['locale'],_0x1953c8=gt(_0x1098a2);_0x1953c8['panelPositionLimiter']=()=>{const _0x482d0e=_0x1953c8['buttonView']['element'];return _0x482d0e&&_0x4a7a50(_0x482d0e);};const _0x3d45e8=function(_0x4f6058,_0x175f58){const _0xed14b=function(_0x4c1494,_0x549a85){const _0x4d1035=_0x4c1494['locale'],_0xe29a1d={'Compare\x20against\x20selected':At(_0x4d1035,'Compare\x20against\x20selected'),'Name\x20this\x20revision':At(_0x4d1035,'Name\x20this\x20revision'),'Restore\x20this\x20revision':At(_0x4d1035,'Restore\x20this\x20revision')};return _0x549a85['map'](_0x2ca8ad=>{const _0x49a804=_0xe29a1d[_0x2ca8ad['name']];return _0x49a804&&_0x49a804!==_0x2ca8ad['name']&&(_0x2ca8ad['name']=_0x49a804),_0x2ca8ad;});}(_0x4f6058,_0x175f58),_0x28b0af=new _0x4ae41b();for(const _0x12372a of _0xed14b){const _0xfa7be1={'type':'button','model':new dt({'label':_0x12372a['name'],'class':_0x12372a['class'],'withText':!0x0,'role':'menuitem','_action':_0x12372a['action']})};_0xfa7be1['model']['bind']('isEnabled')['to'](_0x4f6058,'isActionsDropdownOpen',_0x3f9b55=>'function'!=typeof _0x12372a['isEnabled']||(!_0x3f9b55||_0x12372a['isEnabled'](_0x4f6058))),_0x28b0af['add'](_0xfa7be1);}return _0x28b0af;}(_0x12087c,_0x4ab5b7);return _0x12087c['bind']('isActionsDropdownOpen')['to'](_0x1953c8,'isOpen'),_0x1953c8['buttonView']['set']({'label':At(_0x1098a2,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'rtl'===_0x1098a2['uiLanguageDirection']?'se':'sw','icon':_0x546cf7,'class':'ck-button_small','tabindex':0x0}),_0x1953c8['buttonView']['extendTemplate']({'attributes':{'aria-labelledby':_0x12087c['revisionNameView']['fieldView']['id'],'aria-describedby':[_0x12087c['_dateElementId'],_0x12087c['_authorsElementId']]}}),_0x1953c8['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x441585['if']('isActionsDropdownOpen','ck-on'),_0x441585['if']('isEditing','ck-hidden')]},'on':{'click':_0x441585['to'](_0x2a79cd=>_0x2a79cd['stopPropagation']())}}),_0x1953c8['on']('execute',_0x4c6039=>{_0x12087c['isReady']&&'function'==typeof _0x4c6039['source']['_action']&&_0x4c6039['source']['_action'](_0x12087c);}),vt(_0x1953c8,_0x3d45e8,{'role':'menu'}),_0x1953c8['listenTo'](_0x12087c,'change:isActionsDropdownOpen',(_0x519af4,_0x5daeba,_0x114e6d)=>{if(_0x114e6d)for(const _0x39e358 of _0x1953c8['listView']['items']){const _0x472766=_0x39e358['children']['first'],_0x1cdf1c=_0x4ab5b7['find'](_0x411708=>_0x411708['action']===_0x472766['_action'])['isVisible'];_0x39e358['isVisible']=void 0x0===_0x1cdf1c||_0x1cdf1c(_0x12087c);}}),_0x1953c8;}const Xt=/* #__PURE__ -- @preserve */
|
|
27
|
-
_0x17f891(ft);var Qt=class extends Xt{['id'];['revisionNameView'];revisionActionsView;saveButtonView;cancelButtonView;_keystrokes;['_revision'];_requireRevisionName;['_aiPillView'];_dateElementId;_authorsElementId;constructor(_0x5bdb12,_0x2cfcdd,_0x1f828f,_0x13e7e9,_0xc97954=!0x1){super(_0x5bdb12);const _0x114713=this['bindTemplate'],_0x10a363=function(_0x31f5c9,_0x28ca2d){const _0x27aaab=Array['from'](_0x28ca2d['authors'])['filter'](_0xb9ab72=>_0xb9ab72!=_0x28ca2d['creator']);return _0x28ca2d['creator']&&_0x27aaab['unshift'](_0x28ca2d['creator']),_0x27aaab['map'](_0x1af79f=>new Jt(_0x31f5c9,_0x1af79f,_0x1af79f==_0x28ca2d['creator']));}(_0x5bdb12,_0x2cfcdd);this['id']=_0x2cfcdd['id'],this['_revision']=_0x2cfcdd,this['_requireRevisionName']=_0x13e7e9,this['bind']('_isAiGenerated')['to'](_0x2cfcdd,'attributes',_0x23cf28=>!(!_0x23cf28||!_0x23cf28['@ai'])),this['bind']('name','createdAt')['to'](_0x2cfcdd),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1d665c=>{return _0x1dca81=_0x5bdb12['uiLanguage'],(_0x2b43ac=_0x1d665c)['toLocaleDateString'](_0x1dca81,{'month':'long','day':'numeric'})+',\x20'+_0x2b43ac['toLocaleTimeString'](_0x1dca81,{'hour':'numeric','minute':'numeric'});var _0x1dca81,_0x2b43ac;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isEditing',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['_keystrokes']=new _0x2e7552(),this['_dateElementId']='ck-revision-history-revision-date-'+_0x5a9e0c(),this['_authorsElementId']='ck-revision-history-revision-authors-'+_0x5a9e0c(),this['revisionNameView']=new Yt(_0x5bdb12,mt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'class':['ck-input_small'],'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x2f2027=>_0x2f2027||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isEditing',this,'isEnabled',(_0x4ad1db,_0x4c846d)=>_0x4ad1db&&_0x4c846d),this['revisionNameView']['fieldView']['bind']('tabIndex')['to'](this['revisionNameView']['fieldView'],'isReadOnly',_0x1e5114=>_0x1e5114?-0x1:void 0x0),this['saveButtonView']=this['_createSaveButtonView'](_0x5bdb12),this['cancelButtonView']=this['_createCancelButtonView'](_0x5bdb12),this['revisionActionsView']=_0x1f828f&&_0x1f828f['length']?Wt(this,_0x1f828f):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0xc97954?this['_createAiPillView'](_0x5bdb12):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x114713['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x114713['if']('isEnabled','ck-disabled',_0x59fb10=>!_0x59fb10),_0x114713['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x114713['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x114713['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open'),_0x114713['if']('isEditing','ck-revision-history-sidebar__revision_editing')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date',_0x114713['if']('isEditing','ck-hidden')],'id':this['_dateElementId']},'children':[{'text':_0x114713['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__edit-actions',_0x114713['if']('isEditing','ck-hidden',_0x1caaf8=>!_0x1caaf8)]},'children':[this['cancelButtonView'],this['saveButtonView']],'on':{'click':_0x114713['to'](_0x29fa91=>_0x29fa91['stopPropagation']())}},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors'],'id':this['_authorsElementId']},'children':_0x10a363}]},..._0xc97954?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x114713['if']('_isAiGenerated','ck-hidden',_0x2cacb4=>!_0x2cacb4)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x114713['to'](_0x291795=>{_0x291795['srcElement']['closest']('.ck-confirm-view')||this['isEditing']&&this['revisionNameView']['element']['contains'](_0x291795['target'])||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x241eaa){const _0x26c8c7=new _0x358c61(_0x241eaa);return _0x26c8c7['set']({'icon':_0x2ea3e0,'label':At(_0x241eaa,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':At(_0x241eaa,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0x26c8c7['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x26c8c7;}_createSaveButtonView(_0x5ba9f4){const _0x1433f9=new _0x1b2b54(_0x5ba9f4),_0xad1d63=this['revisionNameView']['fieldView'];return _0x1433f9['set']({'label':At(_0x5ba9f4,'Save'),'withText':!0x0,'class':'ck-button-action\x20ck-button_small','tabindex':0x0}),_0x1433f9['bind']('isEnabled')['to'](this,'isEnabled',_0xad1d63,'isEmpty',(_0x3c2840,_0x54610c)=>_0x3c2840&&!(this['_requireRevisionName']&&_0x54610c)),_0x1433f9['on']('execute',()=>this['_saveName']()),_0x1433f9;}_createCancelButtonView(_0x5b6b3d){const _0x14032d=new _0x1b2b54(_0x5b6b3d);return _0x14032d['set']({'label':At(_0x5b6b3d,'Cancel'),'withText':!0x0,'class':'ck-button_small','tabindex':0x0}),_0x14032d['on']('execute',()=>this['_finishEditing']()),_0x14032d;}['_saveName'](){const _0x33ca0c=this['revisionNameView']['fieldView']['element']['value'];this['_requireRevisionName']&&!_0x33ca0c||(_0x33ca0c===this['name']||!this['name']&&_0x33ca0c===this['_createdAtFormatted']||this['fire']('setName',{'id':this['id'],'name':_0x33ca0c}),this['_finishEditing']());}_finishEditing(){const _0x5722cd=this['revisionNameView']['fieldView'],_0x5c59b1=this['_hasKeyboardFocus']();_0x5722cd['element']['value']=_0x5722cd['value'],_0x5722cd['isEmpty']=!_0x5722cd['element']['value'],this['isEditing']=!0x1,_0x5c59b1&&this['revisionActionsView']&&this['revisionActionsView']['focus']();}['_hasKeyboardFocus'](){const _0x144c7d=this['element']['getRootNode']()['activeElement'];return!!_0x144c7d&&this['element']['contains'](_0x144c7d)&&_0x144c7d['matches'](':focus-visible');}['render'](){super['render']();const _0x450b07=this['revisionNameView']['fieldView']['element'];this['_keystrokes']['listenTo'](this['element']),this['_keystrokes']['set']('Enter',(_0x7ad4a,_0x51fbc0)=>{this['isEditing']&&_0x7ad4a['target']===_0x450b07&&(this['_saveName'](),_0x51fbc0());}),this['_keystrokes']['set']('Esc',(_0x45301e,_0x564159)=>{this['isEditing']&&(this['_finishEditing'](),_0x564159());});}destroy(){super['destroy'](),this['_keystrokes']['destroy']();}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function zt(_0x2bea6d,_0x2cd79e){const _0xef633d=pt['fromJSDate'](_0x2bea6d)['setLocale'](_0x2cd79e),_0x248471=pt['local'](),_0x269c7e=_0x248471['minus']({'days':0x1})['startOf']('day');let _0x29b697,_0x2346b4;return _0xef633d['hasSame'](_0x248471,'day')?(_0x29b697=_0xef633d['startOf']('day')['toJSDate'](),_0x2346b4=_0xef633d['toRelativeCalendar']()):_0xef633d['hasSame'](_0x269c7e,'day')?(_0x29b697=_0x269c7e['toJSDate'](),_0x2346b4=_0xef633d['toRelativeCalendar']()):_0xef633d['hasSame'](_0x248471,'week')?(_0x29b697=_0xef633d['startOf']('week')['toJSDate'](),_0x2346b4=_0xef633d['weekdayLong']||''):_0xef633d['hasSame'](_0x248471,'year')?(_0x29b697=_0xef633d['startOf']('month')['toJSDate'](),_0x2346b4=_0xef633d['monthLong']||''):(_0x29b697=_0xef633d['startOf']('year')['toJSDate'](),_0x2346b4=String(_0xef633d['year'])),{'startDate':_0x29b697,'localizedPeriodName':_0x2346b4};}var Zt=class extends ft{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x3bd494,_0x529c68,_0x13e211,_0x24ed8c,_0x13abec){super(_0x3bd494);const _0x1aaf9a=zt(_0x529c68,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x529c68,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x13e211,this['_requireRevisionName']=_0x24ed8c,this['_showAISource']=_0x13abec,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':_0x1aaf9a}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2e5aba){const _0x51874d=new Qt(this['locale'],_0x2e5aba,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x51874d);}['removeRevision'](_0x1246cc){const _0x4f9269=this['revisionViews']['find'](_0x2f1e8a=>_0x2f1e8a['id']===_0x1246cc['id']);this['revisionViews']['remove'](_0x4f9269);}},ti=class extends ft{constructor(_0x45e04e){super(_0x45e04e);const _0x3d8263=new tt();_0x3d8263['content']=_0x4afdb8,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x3d8263,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[At(_0x45e04e,'Revision\x20history')]}]});}},ii=class extends ft{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x264d16,_0x4fa380,_0x12ebc4,_0x15a5bc,_0x4935c7){super(_0x264d16);const _0x28147c=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x4fa380,this['_revisionActions']=_0x12ebc4,this['_requireRevisionName']=_0x15a5bc,this['_showAISource']=_0x4935c7,this['on']('select',(_0x492052,_0x3effa7)=>{this['fire']('revisionSelected',_0x3effa7);}),this['on']('setName',(_0xf63ead,_0x446995)=>{this['fire']('revisionSetName',_0x446995);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar'],'dir':_0x264d16['uiLanguageDirection']},'children':[new ti(_0x264d16),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x28147c['if']('isEnabled','ck-disabled',_0x1f6750=>!_0x1f6750)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x550f2d of this['_revisions'])this['_addRevision'](_0x550f2d);this['_revisions']['on']('add',(_0x5c2b37,_0x533dc1)=>{this['_addRevision'](_0x533dc1);}),this['_revisions']['on']('remove',(_0x32ba0d,_0x5683dc)=>{this['_removeRevision'](_0x5683dc);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x3e696a=>_0x3e696a['revisionViews']['map'](_0x40f9f6=>_0x40f9f6))['flat']();}selectRevision(_0x3e2b37){for(const _0x4db42c of this['revisionViews'])_0x3e2b37&&_0x3e2b37['id']===_0x4db42c['id']?_0x4db42c['select']():_0x4db42c['deselect']();}highlightRevisions(_0x20d92b){for(const _0xd37b51 of this['revisionViews'])_0x20d92b['some'](({id:_0x42b2dc})=>_0x42b2dc===_0xd37b51['id'])?_0xd37b51['highlight']():_0xd37b51['unhighlight']();}['_addRevision'](_0x54a2f0){const _0x43dac4=zt(_0x54a2f0['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x528036=this['_getTimePeriodViewByStartDate'](_0x43dac4);_0x528036||(_0x528036=new Zt(this['locale'],_0x43dac4,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x528036)),_0x528036['addRevision'](_0x54a2f0);}['_removeRevision'](_0x5c9417){const _0x5d6aba=zt(_0x5c9417['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x5d6aba)['removeRevision'](_0x5c9417);}_getTimePeriodViewByStartDate(_0x2150ad){return this['timePeriodViews']['find'](_0x19ac7d=>_0x19ac7d['startDate']['getTime']()===_0x2150ad['getTime']());}},si=class RevisionsSidebar extends _0x3c4294{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
23
|
+
import{CKEditorError as _0x448b0b,Collection as _0x31f909,ElementReplacer as _0x3ab338,FocusTracker as _0x2163a4,KeystrokeHandler as _0x1bd414,ObservableMixin as _0x332a00,ResizeObserver as _0x4344f0,findClosestScrollableAncestor as _0x3f4597,logWarning as _0x2a14f9,scrollViewportToShowTarget as _0x5d1544,trustedHtml as _0xdcb980,uid as _0x3a7148}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x40925b,isEqual as _0x231559,set as _0x547e5e,unset as _0x4eb5ad}from'es-toolkit/compat';import{Command as _0x1509a1,Editor as _0x162dfb,ElementApiMixin as _0x19491a,PendingActions as _0x2345e7,Plugin as _0x3fc6d1}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x46f367,PillView as _0xd0a35a,Users as _0x3b484f,getMarkerDomElement as _0x25901d,reRootOperation as _0x4f0444,reRootPosition as _0x497596,reRootRange as _0x27a38a,sanitizeEditorConfig as _0x1bdda9}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x4f9233,ModelElement as _0x3930eb,ModelRange as _0x41ff3f,ModelText as _0x54ac0c,ViewAttributeElement as _0x195469,ViewContainerElement as _0x1b6a4d,ViewDocumentFragment as _0x55d7cf,ViewElement as _0x2ac467,ViewEmptyElement as _0x3921e1,ViewRawElement as _0x31dda2,ViewText as _0x1feb7c,ViewUIElement as _0x590873}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x3182cc,IconChevronUp as _0x2dc25d,IconHistory as _0x50ae18,IconSparkle as _0x34331d,IconThreeVerticalDots as _0x4bf2a6,IconUndo as _0x258595,IconUser as _0x1b0e51}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x20d50a,ButtonView as _0x46dff5,ContextualBalloon as _0x5340b4,CssTransitionDisablerMixin as _0x245727,EditorUI as _0x5cf401,IconView as tt,InlineEditableUIView as it,LabeledFieldView as st,ListItemView as et,ListView as nt,MenuBarMenuListItemButtonView as ot,MenuBarMenuListItemView as rt,MenuBarMenuListView as at,MenuBarMenuView as ht,StickyPanelView as ct,ToolbarSeparatorView as lt,ToolbarView as ut,UIModel as dt,View as ft,addListToDropdown as vt,createDropdown as gt,createLabeledInputText as mt,normalizeToolbarConfig as _t,submitHandler as wt}from'@ckeditor/ckeditor5-ui';import{DateTime as pt}from'luxon';const yt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x332a00();var bt=class extends yt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x320fdf){super(),this['id']=_0x320fdf['id']||_0x3a7148(),this['creator']=_0x320fdf['creator']||null,this['authors']=_0x320fdf['authors']||[],this['diffData']=_0x320fdf['diffData']||null,this['toVersion']=_0x320fdf['toVersion']||0x0,this['fromVersion']=_0x320fdf['fromVersion']||0x0,this['set']('name',_0x320fdf['name']||''),this['set']('createdAt',_0x320fdf['createdAt']||new Date()),this['set']('attributes',_0x320fdf['attributes']||{});}setName(_0x4f01b9){this['_update']({'name':_0x4f01b9});}setAttribute(_0x4dde5d,_0x2ee09f){const _0x2cb52f=_0x40925b(this['attributes']);_0x547e5e(_0x2cb52f,_0x4dde5d,_0x2ee09f),this['_update']({'attributes':_0x2cb52f});}removeAttribute(_0x226741){const _0x4fcc65=_0x40925b(this['attributes']);_0x4eb5ad(_0x4fcc65,_0x226741),this['_update']({'attributes':_0x4fcc65});}_update(_0x349f8a,_0x2c8886=!0x1){let _0x5ac8b9=!0x1;const _0x5ebbc4={'id':this['id']};for(const _0x1b6080 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x386548=_0x349f8a[_0x1b6080];void 0x0!==_0x386548&&_0x386548!==this[_0x1b6080]&&(this[_0x1b6080]=_0x386548,_0x5ebbc4[_0x1b6080]=_0x386548,_0x5ac8b9=!0x0);}_0x5ac8b9&&(_0x5ebbc4['authors']&&(_0x5ebbc4['authorsIds']=_0x5ebbc4['authors']['map'](_0xdc77db=>_0xdc77db['id']),delete _0x5ebbc4['authors']),this['fire']('_update',_0x5ebbc4,_0x2c8886));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2c6767=>_0x2c6767['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},Rt=class extends _0x3fc6d1{['_revisions'];static get requires(){return[_0x3b484f];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x5cf591){super(_0x5cf591),this['_revisions']=new _0x31f909();}afterInit(){!async function(_0x3f7bfd){const _0x4b55a2='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0xc79185=0xeb829,_0x36c860=0x799e0,_0x249811={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x2c3a22(_0x49bec3){const _0x51a147=new window['Promise'](_0x5b17a5=>{_0x49bec3['once']('ready',_0x5b17a5);}),_0x3268c0=window['Date']['now'](),_0x5da9f8=_0x49bec3['config']['get']('licenseKey');async function _0x28e31b(){let _0x1455b0,_0x166bb7=null,_0x276cc8=null;try{return'GPL'==_0x5da9f8?'NotAllowed':(_0x1455b0=_0x3e92ab(),_0x1455b0?(_0x1455b0['usageEndpoint']&&(_0x276cc8=_0x104b53(_0x1455b0['usageEndpoint'],_0x1455b0['jti'])),await _0x35a65b()?_0xf64779()?_0x4ec720()?'Expired':_0x308fa5()?('evaluation'==_0x1455b0['licenseType']&&(_0x166bb7=_0x361ee5('EvaluationLimit')),await _0x3ce30f()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4ec720(){const _0x372eaf=['evaluation','trial']['includes'](_0x1455b0['licenseType'])?_0x3268c0/0x3e8:0xe10*_0x36c860;return _0x1455b0['exp']<_0x372eaf;}function _0xf64779(){const _0x17c657=_0x1455b0['features'];if(!_0x17c657)return!0x1;if(_0x17c657['includes']('*'))return!0x0;if(_0x17c657['includes']('RH'))return!0x0;if(_0x17c657['includes']('RRH')){if(_0x4c0e6b())return!0x0;if(_0x2aeaa7()||_0x1796f0())return!0x0;}return!0x1;}function _0x308fa5(){const _0x3aa26b=_0x1455b0['licensedHosts'];if(!_0x3aa26b||0x0==_0x3aa26b['length'])return!0x0;const {hostname:_0x426dbd}=new URL(window['location']['href']);if(_0x3aa26b['includes'](_0x426dbd))return!0x0;const _0x190045=_0x426dbd['split']('.');return _0x3aa26b['filter'](_0x394e14=>_0x394e14['includes']('*'))['map'](_0x442f9d=>_0x442f9d['split']('.'))['filter'](_0x2d05e6=>_0x2d05e6['length']<=_0x190045['length'])['map'](_0x47beea=>Array(_0x190045['length']-_0x47beea['length'])['fill']('*'===_0x47beea[0x0]?'*':'')['concat'](_0x47beea))['some'](_0x62cdf6=>_0x190045['every']((_0x19adde,_0x3d2233)=>_0x62cdf6[_0x3d2233]===_0x19adde||'*'===_0x62cdf6[_0x3d2233]));}function _0x3ce30f(){return _0x166bb7&&_0x276cc8?new window['Promise']((_0x17eeef,_0x22628a)=>{_0x166bb7['then'](_0x17eeef,_0x22628a),_0x276cc8['then'](_0x3c0d98=>{'Valid'!=_0x3c0d98&&_0x17eeef(_0x3c0d98);},_0x22628a);}):_0x166bb7||_0x276cc8||'Valid';}}function _0x104b53(_0x2840ff,_0x36256b){return new window['Promise'](_0x5e9e90=>{if(_0x245130())return _0x5e9e90('Valid');_0x18edaa(),_0x49bec3['decorate']('_sendUsageRequest');let _0xfc30c3=!0x1;const _0x280858=_0x3a7148();function _0x4e8c2e(_0x48f07a){return!!_0x48f07a&&('object'==typeof _0x48f07a||'function'==typeof _0x48f07a)&&'function'==typeof _0x48f07a['then']&&'function'==typeof _0x48f07a['catch'];}function _0x1d73e4(_0x3c667b){_0x568cc5(_0x3c667b)['then'](_0x426c42=>_0x426c42&&'ok'==_0x426c42['status']?_0x39dbb8(_0xae50fe(_0x280858+_0x36256b))!=_0x426c42['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x59b9c7=>(_0x3781c8(),_0x59b9c7),()=>{const _0x259bb6=_0x5527bc();return null==_0x259bb6?(_0x3781c8(),'Valid'):_0x3268c0-_0x259bb6>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5e9e90)['catch'](()=>{_0x5e9e90('UsageLimit');});const _0x4ea648=0x36ee80;function _0x3781c8(){const _0x4c3081='llct-'+_0x39dbb8(_0xae50fe(_0x2840ff)),_0x540249=_0x311429(_0x39dbb8(window['Math']['ceil'](_0x3268c0/_0x4ea648)));window['localStorage']['setItem'](_0x4c3081,_0x540249);}function _0x5527bc(){const _0x4dece0='llct-'+_0x39dbb8(_0xae50fe(_0x2840ff)),_0x2b3650=window['localStorage']['getItem'](_0x4dece0);return _0x2b3650?window['parseInt'](_0x311429(_0x2b3650),0x10)*_0x4ea648:null;}function _0x568cc5(_0x2eb812){return new window['Promise']((_0x582f52,_0x28093a)=>{_0x2eb812['then'](_0x582f52,_0x28093a),window['setTimeout'](_0x28093a,0x1d4c0);});}}_0x49bec3['on']('_sendUsageRequest',(_0x3fd2df,_0x27f5fb)=>{if(_0x27f5fb[0x0]!=_0x2840ff)return _0x5e9e90('UsageLimit');_0x27f5fb[0x1]={..._0x27f5fb[0x1],'requestId':_0x280858};},{'priority':'high'}),_0x49bec3['on']('_sendUsageRequest',_0x5a124d=>{_0x4e8c2e(_0x5a124d['return'])&&(_0xfc30c3=!0x0,_0x1d73e4(_0x5a124d['return']));},{'priority':'low'}),_0x51a147['then'](()=>{_0xfc30c3||_0x5e9e90('UsageLimit');});});function _0x245130(){return'auto'==_0x49bec3['editing']['view']['_overlayModeHint'];}function _0x18edaa(){_0x49bec3['editing']['view']['_overlayModeHint']='auto';}}function _0x361ee5(_0x1ac599){const _0xbaab00=[new window['Promise'](_0xaf5fab=>setTimeout(_0xaf5fab,0x93ecc)),_0x51a147['then'](()=>new window['Promise'](_0x2a4619=>{const _0xea5128=0x7,_0xe707d7=_0x3f7bfd['_revisions'];function _0x59aa79(){_0xe707d7['length']>=_0xea5128&&_0x2a4619();}_0x59aa79(),_0xe707d7['on']('add',_0x59aa79);})),new window['Promise'](_0x11de7f=>{function _0xabda34(){for(const _0x47ec62 in window)if(window['Number']['isNaN'](window['Number'](_0x47ec62))&&window[_0x47ec62]==_0xc79185)return _0x11de7f();'destroyed'!=_0x49bec3['state']&&window['setTimeout'](_0xabda34,0x1388);}_0x25cd91('RevisionViewer')&&_0xabda34();})];return window['Promise']['race'](_0xbaab00)['then'](()=>_0x1ac599);}async function _0x5dff90(){if(await _0x51a147,_0x25cd91('RevisionViewer')){const _0x16bdf6=_0x3f7bfd['getRevision'](0x0),_0x119887=_0x3f7bfd['getEarlierVisibleRevision'](_0x16bdf6['id']),_0x2915e6=_0x3324b9('RevisionViewer');return await _0x2915e6['compare'](_0x16bdf6['id'],_0x119887?_0x119887['id']:null,!0x0),_0x2915e6['unbind']('isEnabled'),_0x2915e6['isEnabled']=!0x1,_0x2915e6['compare']=_0x655cc9,void(_0x2915e6['_getDiff']=_0x655cc9);}if(_0x25cd91('RevisionTracker')){const _0x596697=_0x3324b9('RevisionTracker');_0x596697['unbind']('isEnabled'),_0x596697['isEnabled']=!0x1,_0x596697['update']=_0x655cc9,_0x596697['saveRevision']=_0x655cc9;}_0x49bec3['model']['change']=_0x655cc9,_0x49bec3['model']['enqueueChange']=_0x655cc9,_0x49bec3['enableReadOnlyMode']('model');}function _0x4c0e6b(){return _0x25cd91('WebSocketGateway')&&'connected'==_0x3324b9('WebSocketGateway')['state'];}function _0x2aeaa7(){return _0x25cd91('RevisionViewerIntegration');}function _0x1796f0(){return _0x25cd91('TrackChangesDataGetter');}function _0x3f1bc1(_0x474fdd){const _0x4b7c22=_0x5c7ed1();_0x49bec3[_0x4b7c22]='revisionHistoryLicenseKey'+_0x474fdd,_0x474fdd['endsWith']('Limit')&&(window[_0x5c7ed1()]=_0xc79185),'Valid'!=_0x474fdd&&_0x5dff90();}function _0x5c7ed1(){const _0x11b61f=window['String'](window['performance']['now']())['replace']('.','');let _0x401e4d='g';for(let _0x41f854=0x0;_0x41f854<_0x11b61f['length'];_0x41f854+=0x2){let _0x228e06=window['parseInt'](_0x11b61f['substring'](_0x41f854,_0x41f854+0x2));_0x228e06>=0x3e&&(_0x228e06-=0x3e),_0x401e4d+=_0x4b55a2[_0x228e06];}return _0x401e4d;}function _0x3e92ab(){const _0x29a583=_0x5da9f8['split']('.');if(0x3!=_0x29a583['length'])return null;return _0xb7b834(_0x29a583[0x1]);function _0xb7b834(_0x3f9526){const _0x56fc3f=_0x3cc078(_0x3f9526);return _0x56fc3f&&_0x56ed93()?_0x56fc3f:null;function _0x56ed93(){const _0x4ba199=_0x56fc3f['jti'],_0x5f58da=window['parseInt'](_0x4ba199['substring'](_0x4ba199['length']-0x8),0x10),_0x5bdd81={..._0x56fc3f,'jti':_0x4ba199['substring'](0x0,_0x4ba199['length']-0x8)};return delete _0x5bdd81['vc'],_0xae50fe(_0x5bdd81)==_0x5f58da;}}}async function _0x35a65b(){let _0x1b8d12=!0x0;try{const [_0xbcfa88,_0x6fb7f3,_0x4ef3f8]=_0x5da9f8['split']('.');return _0x40f1d7(_0xbcfa88),await _0x2382d4(_0xbcfa88,_0x6fb7f3,_0x4ef3f8),_0x1b8d12;}catch{return!0x1;}function _0x40f1d7(_0x1d90cd){const _0x37810d=_0x3cc078(_0x1d90cd);_0x37810d&&'ES256'==_0x37810d['alg']||(_0x1b8d12=!0x1);}async function _0x2382d4(_0x9b3812,_0x244703,_0x429f49){const _0x3517bf=window['Uint8Array']['from'](_0x23e676(_0x429f49),_0x2500fb=>_0x2500fb['charCodeAt'](0x0)),_0x207bf0=new window['TextEncoder']()['encode'](_0x9b3812+'.'+_0x244703),_0x3b1723=window['crypto']['subtle'];if(!_0x3b1723)return;const _0x2d5ef7=await _0x3b1723['importKey']('jwk',_0x249811,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3b1723['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2d5ef7,_0x3517bf,_0x207bf0)||(_0x1b8d12=!0x1);}}function _0x3cc078(_0x5809fd){return _0x5809fd['startsWith']('ey')?JSON['parse'](_0x23e676(_0x5809fd)):null;}function _0x23e676(_0x32c80b){return window['atob'](_0x32c80b['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xae50fe(_0x590bf0){let _0x1b17de=0x1505;function _0x4a05fe(_0x1aa7ac){for(let _0x48d48f=0x0;_0x48d48f<_0x1aa7ac['length'];_0x48d48f++){const _0x3eeb5c=_0x1aa7ac['charCodeAt'](_0x48d48f);_0x1b17de=(_0x1b17de<<0x5)+_0x1b17de+_0x3eeb5c,_0x1b17de&=_0x1b17de;}}function _0x4496ac(_0x3ae2b2){Array['isArray'](_0x3ae2b2)?_0x3ae2b2['forEach'](_0x4496ac):_0x3ae2b2&&'object'==typeof _0x3ae2b2?Object['entries'](_0x3ae2b2)['sort']()['forEach'](([_0x413405,_0x429123])=>{_0x4a05fe(_0x413405),_0x4496ac(_0x429123);}):_0x4a05fe(window['String'](_0x3ae2b2));}return _0x4496ac(_0x590bf0),_0x1b17de>>>0x0;}function _0x39dbb8(_0x436bd3){return _0x436bd3['toString'](0x10)['padStart'](0x8,'0');}function _0x311429(_0x21668c){return _0x21668c['split']('')['reverse']()['join']('');}function _0x25cd91(_0x272e7f){return _0x49bec3['plugins']['has'](_0x272e7f);}function _0x3324b9(_0x2308ae){return _0x49bec3['plugins']['get'](_0x2308ae);}function _0x655cc9(){}_0x3f1bc1(await _0x28e31b());}_0x2c3a22(_0x3f7bfd['editor']);}(this);}createRevision(_0x18c9c3){const _0x53a223=this['editor']['plugins']['get']('Users');return new bt({'id':_0x18c9c3['id'],'name':_0x18c9c3['name'],'creator':_0x18c9c3['creatorId']?_0x53a223['getUser'](_0x18c9c3['creatorId']):null,'diffData':_0x18c9c3['diffData']||_0x18c9c3['data'],'authors':_0x18c9c3['authorsIds']['map'](_0x5e3228=>_0x53a223['getUser'](_0x5e3228)),'createdAt':new Date(_0x18c9c3['createdAt']),'attributes':_0x18c9c3['attributes'],'fromVersion':_0x18c9c3['fromVersion'],'toVersion':_0x18c9c3['toVersion']});}['addRevision'](_0x4ecd31,_0x2501c8=0x0){this['_revisions']['add'](_0x4ecd31,_0x2501c8);}getRevision(_0x3d93fc){return this['_revisions']['get'](_0x3d93fc);}getRevisions(_0x2a7740={'toJSON':!0x1}){const _0x17a52c=Array['from'](this['_revisions']);return _0x17a52c['reverse'](),_0x2a7740['toJSON']?_0x17a52c['map'](_0x139bf5=>_0x139bf5['toJSON']()):_0x17a52c;}getIndex(_0xcc2c60){return this['_revisions']['getIndex'](_0xcc2c60);}getEarlierVisibleRevision(_0x553d0c){const [,_0x4500e4]=this['getRevisionsIterator'](_0x553d0c,{'direction':'earlier'});return _0x4500e4;}getLaterVisibleRevision(_0x4b5a2f){const [,_0x545518]=this['getRevisionsIterator'](_0x4b5a2f,{'direction':'later'});return _0x545518;}getRevisionsInDiff(_0x3f70e6){const _0x320ebf=[];for(const _0x295312 of this['getRevisionsIterator'](_0x3f70e6['newRevisionId']))if(_0x320ebf['push'](_0x295312),_0x295312['id']===_0x3f70e6['oldRevisionId'])break;return _0x320ebf;}*getRevisionsIterator(_0x15664,{direction:_0x1e11e5='earlier',filter:_0x2850b=()=>!0x0}={}){const _0x47965d='earlier'===_0x1e11e5?0x1:-0x1;let _0x5d21ba=this['_revisions']['get'](_0x15664),_0x16289d=this['getIndex'](_0x5d21ba);for(yield _0x5d21ba;_0x5d21ba;){if(_0x16289d+=_0x47965d,_0x5d21ba=this['getRevision'](_0x16289d),!_0x5d21ba)return;_0x2850b(_0x5d21ba)&&(yield _0x5d21ba);}}},kt=class extends _0x3fc6d1{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1b6a4d,'c'],[_0x195469,'a'],[_0x3921e1,'e'],[_0x31dda2,'r'],[_0x590873,'u']]);_typeCharToViewClass=new Map([['c',_0x1b6a4d],['a',_0x195469],['e',_0x3921e1],['r',_0x31dda2],['u',_0x590873]]);async loadRevisionData(_0x5362ea,_0x4e0c87){if(_0x5362ea['diffData']||!_0x4e0c87)return;const _0x57fbe5=this['editor']['config']['get']('collaboration.channelId');_0x5362ea['diffData']=(await _0x4e0c87['getRevision']({'channelId':_0x57fbe5,'revisionId':_0x5362ea['id']}))['diffData'];}getRevisionDocumentData(_0x2c2d7a){const _0x116505={};for(const _0x184af5 in _0x2c2d7a['diffData']){if(_0x2c2d7a['diffData'][_0x184af5]['attachChange']&&!_0x2c2d7a['diffData'][_0x184af5]['attachChange']['isAttached'])continue;const _0x2ab034=this['_removeRevisionMarkers'](JSON['parse'](_0x2c2d7a['diffData'][_0x184af5]['insertions'])),_0x3ab836=this['editor']['editing']['view']['document'],_0x49eae6=new _0x55d7cf(_0x3ab836,_0x2ab034['map'](_0x3fe705=>this['_getViewFromDiffObj'](_0x3fe705,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x116505[_0x184af5]=this['editor']['data']['processor']['toData'](_0x49eae6),this['editor']['data']['processor']['useFillerType']('default');}return _0x116505;}getRevisionRootsAttributes(_0x9cc2f8){const _0x3ce893={};for(const _0x5f177f in _0x9cc2f8['diffData'])_0x9cc2f8['diffData'][_0x5f177f]['attachChange']&&!_0x9cc2f8['diffData'][_0x5f177f]['attachChange']['isAttached']||(_0x3ce893[_0x5f177f]=_0x9cc2f8['diffData'][_0x5f177f]['attributesAfter']||{});return _0x3ce893;}getRevisionRootsModelElements(_0x312b73){const _0x53a2f1={};for(const _0x1aad9e in _0x312b73['diffData']){if(_0x312b73['diffData'][_0x1aad9e]['attachChange']&&!_0x312b73['diffData'][_0x1aad9e]['attachChange']['isAttached'])continue;const _0x15036=_0x312b73['diffData'][_0x1aad9e]['rootElementName'];_0x15036&&(_0x53a2f1[_0x1aad9e]=_0x15036);}return _0x53a2f1;}_getTypeCharForViewElement(_0x579990){return this['_viewClassToTypeChar']['get'](_0x579990['constructor']);}_getViewFromDiffObj(_0x421440,_0x3890de){const _0x43df9c=this['editor']['editing']['view']['document'];if('string'==typeof _0x421440)return new _0x1feb7c(_0x43df9c,_0x421440);{let _0x23715e,_0x21493c;_0x21493c='u'==_0x421440['type']||'r'==_0x421440['type']?[]:_0x421440['children']['map'](_0x879449=>this['_getViewFromDiffObj'](_0x879449,_0x3890de));const _0x3db533=this['_typeCharToViewClass']['get'](_0x421440['type'])||_0x2ac467,_0x5bd550=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x23715e=new _0x3db533(_0x43df9c,_0x421440['name'],_0x421440['attributes'],_0x21493c),'u'==_0x421440['type']&&_0x421440['children'][0x0]){const _0x7b9117=_0x421440['children'][0x0];if(_0x23715e['render']=function(_0x407fe3){const _0x1144ef=_0x407fe3['createElement']('div');return _0x1144ef['innerHTML']=_0xdcb980(_0x7b9117),_0x1144ef['childNodes'][0x0];},_0x3890de){const _0x55bbbc=new _0x55d7cf(_0x43df9c);_0x55bbbc['_appendChild'](_0x23715e);const _0x11e6af=Array['from'](_0x5bd550['viewChildrenToDom'](_0x55bbbc,{'bind':!0x1})),_0x1092fd=_0x5bd550['domDocument']['createElement']('div');_0x1092fd['append'](..._0x11e6af),_0x23715e=Array['from'](_0x5bd550['domChildrenToView'](_0x1092fd))[0x0];}}else{if('r'==_0x421440['type']&&_0x421440['children'][0x0]){const _0x15e6ba=_0x421440['children'][0x0];if(_0x23715e['render']=function(_0x3dd8e8){_0x3dd8e8['innerHTML']=_0xdcb980(_0x15e6ba);},_0x3890de){const _0x40bd18=new _0x55d7cf(_0x43df9c);_0x40bd18['_appendChild'](_0x23715e);const _0xcfc9c8=Array['from'](_0x5bd550['viewChildrenToDom'](_0x40bd18,{'bind':!0x1})),_0x5bab05=_0x5bd550['domDocument']['createElement']('div');_0x5bab05['append'](..._0xcfc9c8);const _0x503f7c=Array['from'](_0x5bd550['domChildrenToView'](_0x5bab05));_0x503f7c['length']>0x1?_0x23715e['_appendChild'](_0x503f7c):_0x23715e=_0x503f7c[0x0];}}}if(_0x421440['customProperties']){for(const [_0xcea46b,_0x503372]of _0x421440['customProperties'])_0x23715e['_setCustomProperty'](_0xcea46b,_0x503372);}const _0x452aa4=void 0x0===_0x421440['fillerOffset']?null:_0x421440['fillerOffset'];return null!==_0x452aa4&&(_0x23715e['getFillerOffset']=()=>_0x452aa4),_0x23715e;}}_makeModelFromViewString(_0x8b6347,_0x51bd21){const _0x437541=JSON['parse'](_0x8b6347),_0x2ff964=this['editor']['editing']['view']['document'],_0x51d163=new _0x55d7cf(_0x2ff964,_0x437541['map'](_0x1d7c5e=>this['_getViewFromDiffObj'](_0x1d7c5e,!0x0))),_0x4eac20=this['editor']['data']['toModel'](_0x51d163,_0x51bd21);return _0x4eac20['name']=_0x51bd21,_0x4eac20;}['_removeRevisionMarkers'](_0xe9f3e8){return(_0xe9f3e8=_0xe9f3e8['filter'](_0x2a6259=>!_0x2a6259['name']||'revision-start'!==_0x2a6259['name']&&'revision-end'!==_0x2a6259['name']))['forEach'](_0x181f6a=>{'string'!=typeof _0x181f6a&&(_0x181f6a['children']=this['_removeRevisionMarkers'](_0x181f6a['children']),_0x181f6a['attributes']=_0x181f6a['attributes']['filter'](_0x29b719=>!_0x29b719[0x0]['startsWith']('data-revision-')));}),_0xe9f3e8;}};function At(_0x489a60,_0x1d4546,_0x559d92){const t=_0x489a60['t'];switch(_0x1d4546){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'},_0x559d92);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x559d92);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'},_0x559d92);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x559d92);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x559d92);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var Et=class extends _0x3fc6d1{['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[_0x3b484f,Rt,kt,_0x2345e7];}constructor(_0x475573){super(_0x475573),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 _0x40048a=_0x3a7148();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x40048a},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 _0xce9e2=this['repository']['getRevision'](0x0),_0x26b7f0=_0xce9e2&&null===_0xce9e2['creator']?_0xce9e2:null;if(this['_continueCurrentRevision']=!!_0x26b7f0&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x519344=this['_source']['getCurrentRevisionId'](),_0x2e19af=this['repository']['getRevision'](_0x519344);if(_0x2e19af)this['_startingVersion']=_0x2e19af['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x596e4d=this['_source']['history']['_operations']['find'](_0x57d39=>!_0x57d39['_isInit']),_0x3b45cd=_0x596e4d?_0x596e4d['baseVersion']:this['_source']['history']['version'];_0xce9e2?(_0xce9e2['toVersion']<_0x3b45cd&&_0xce9e2['_update']({'toVersion':_0x3b45cd}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x26b7f0['id'],this['_startingVersion']=_0x26b7f0['fromVersion']):(this['_startingVersion']=_0xce9e2['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x3b45cd,this['_continueCurrentRevision']=!0x1);}}else _0x26b7f0&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x26b7f0['toVersion'],this['editor']['model']['document']['history']['version']),_0x26b7f0['fromVersion']===_0x26b7f0['toVersion']?(0x0!==_0x26b7f0['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x26b7f0['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x26b7f0['id'],this['_startingVersion']=_0x26b7f0['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',_0x5717bc=>!_0x5717bc),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x17ed33=[this['editor']];for(const _0x170215 of _0x17ed33){let _0x13362c;for(const _0x17af7b in _0x170215){const _0x94514f=_0x17af7b,_0x170b12=_0x170215[_0x94514f];if('revisionHistoryLicenseKeyValid'==_0x170b12||'revisionHistoryLicenseKeyInvalid'==_0x170b12||'revisionHistoryLicenseKeyExpired'==_0x170b12||'revisionHistoryLicenseKeyDomainLimit'==_0x170b12||'revisionHistoryLicenseKeyNotAllowed'==_0x170b12||'revisionHistoryLicenseKeyEvaluationLimit'==_0x170b12||'revisionHistoryLicenseKeyUsageLimit'==_0x170b12){delete _0x170215[_0x94514f],_0x13362c=_0x170b12,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x13362c&&_0x170215['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x13362c&&_0x170215['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x13362c&&_0x170215['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x13362c&&_0x170215['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x13362c&&_0x170215['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x13362c&&_0x170215['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x45f3a4=this['repository']['getRevision'](0x0),_0x4ded6a=await this['getRevisionDocumentData'](_0x45f3a4),_0x4e2d4a=await this['getRevisionRootsAttributes'](_0x45f3a4),_0x413c9c=this['_utils']['getRevisionRootsModelElements'](_0x45f3a4);this['_replaceEditorDataWithRevisionData'](_0x4ded6a,_0x4e2d4a,_0x413c9c);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0xbdd3ac){this['_source']=_0xbdd3ac;}async update(){const _0x1c7d56=await this['_source']['getLatestVersion']();if(_0x1c7d56>this['currentRevision']['toVersion']){await this['_loadState']();const _0x497b6b=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1c7d56});_0x497b6b['authors']=_0x497b6b['authorsIds']['map'](_0x39a097=>this['editor']['plugins']['get']('Users')['getUser'](_0x39a097)),this['currentRevision']['_update'](_0x497b6b);}}async['saveRevision'](_0x412560={},_0x37962d=null){const _0x1568bf=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x37962d>this['currentRevision']['toVersion']&&(_0x37962d=null),null===_0x37962d&&(_0x37962d=await this['_source']['getLatestVersion']());const _0x51d520=this['_getFromVersion'](_0x37962d),_0x5877cf=this['buildRevisionData']({'from':_0x51d520,'to':_0x37962d});if(this['currentRevision']['toVersion']<_0x37962d){const _0xf09bb=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x37962d,'to':_0x37962d});_0xf09bb['authors']=[],_0xf09bb['authorsIds']=[],_0xf09bb['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xf09bb,!0x0),delete _0xf09bb['authors'],_0x1568bf['push'](_0xf09bb);}const _0x58dd5b={..._0x412560,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x412560['name']||null,'id':_0x412560['id']||_0x3a7148(),..._0x5877cf,'attributes':{..._0x412560['attributes'],..._0x5877cf['attributes']}},_0x5ca159=this['addRevisionData'](_0x58dd5b);_0x1568bf['push'](_0x58dd5b);const _0x5a131c=this['repository']['getIndex'](_0x5ca159);if(0x0!==_0x5a131c){const _0x37570d=this['repository']['getRevision'](_0x5a131c-0x1);if(_0x37570d['fromVersion']!==_0x37962d){const _0x3c7316=this['_revisionDataBuilder']['getData'](_0x37962d,_0x37570d['toVersion']),_0x5bb2af={'id':_0x37570d['id'],'diffData':_0x3c7316['diffData'],'authorsIds':_0x3c7316['authorsIds'],'authors':_0x3c7316['authorsIds']['map'](_0x4ebb11=>this['editor']['plugins']['get']('Users')['getUser'](_0x4ebb11)),'fromVersion':_0x37962d};this['_stampAiAttribute'](_0x5bb2af,_0x37570d,!!_0x3c7316['hasAIChanges']),_0x37570d===this['currentRevision']&&(_0x5bb2af['createdAt']=new Date(_0x58dd5b['createdAt']['getTime']()+0xa)),_0x37570d['_update'](_0x5bb2af,!0x0),delete _0x5bb2af['authors'],_0x1568bf['push'](_0x5bb2af);}}if(this['adapter']){for(const _0x239c2d of _0x1568bf)this['_bufferUpdate'](_0x239c2d['id'],_0x239c2d,!0x0);this['sendBufferedUpdates']();}return _0x5ca159;}addRevisionData(_0x3c369d){const _0x1bb5de=this['repository']['createRevision'](_0x3c369d);return this['adapter']&&_0x1bb5de['on']('_update',(_0x52cd37,_0x47fd6d,_0x644ec9)=>{_0x644ec9||(this['_bufferUpdate'](_0x47fd6d['id'],_0x47fd6d,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1bb5de,this['_findInsertionIndex'](_0x1bb5de)),_0x1bb5de;}async getRevisionDocumentData(_0x38f63){return await this['_utils']['loadRevisionData'](_0x38f63,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x38f63);}async getRevisionRootsAttributes(_0x91845d){return await this['_utils']['loadRevisionData'](_0x91845d,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x91845d);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0xbf519d=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x301ffe=0x0;_0x301ffe<_0xbf519d['length'];_0x301ffe++){const _0x439064=_0xbf519d[_0x301ffe];let _0x11e5d8=!0x1;for(const _0x19f7ff of Object['keys'](_0x439064))void 0x0===_0x439064[_0x19f7ff]?delete _0x439064[_0x19f7ff]:'id'!==_0x19f7ff&&(_0x11e5d8=!0x0);_0x11e5d8||(_0xbf519d[_0x301ffe]=null);}if(_0xbf519d=_0xbf519d['filter'](_0xd6ef7=>null!==_0xd6ef7),!_0xbf519d['length'])return;for(let _0x3d0ebb=0x0;_0x3d0ebb<_0xbf519d['length'];_0x3d0ebb++){const _0x2e5053=_0xbf519d[_0x3d0ebb];void 0x0!==_0x2e5053['fromVersion']&&void 0x0===_0x2e5053['toVersion']&&(_0x2e5053['toVersion']=this['repository']['getRevision'](_0x2e5053['id'])['toVersion']),void 0x0!==_0x2e5053['toVersion']&&void 0x0===_0x2e5053['fromVersion']&&(_0x2e5053['fromVersion']=this['repository']['getRevision'](_0x2e5053['id'])['fromVersion']);}const _0x4b31f8=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0xbf519d,_0x4b31f8)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4a0a49=>{if(_0x4a0a49){for(const _0xc69604 of _0x4a0a49)this['setRevisionData']({'id':_0xc69604['id'],'createdAt':_0xc69604['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x3c3863,_0x34af6e,_0x393aee){if(_0x393aee===(!!_0x34af6e&&!!_0x34af6e['attributes']['@ai']))return;const _0xd6391b={..._0x34af6e?_0x34af6e['attributes']:{},..._0x3c3863['attributes']};_0x393aee?_0xd6391b['@ai']=!0x0:delete _0xd6391b['@ai'],_0x3c3863['attributes']=_0xd6391b;}buildRevisionData({revision:_0x4955b9=null,from:_0x4fc9ab=null,to:_0xbbb472=null}){_0x4fc9ab=null!==_0x4fc9ab?_0x4fc9ab:_0x4955b9['fromVersion'],_0xbbb472=null!==_0xbbb472?_0xbbb472:_0x4955b9['toVersion'];const _0x5d061a=this['_revisionDataBuilder']['getData'](_0x4fc9ab,_0xbbb472),_0x2217d1={'diffData':_0x5d061a['diffData'],'authorsIds':_0x5d061a['authorsIds'],'fromVersion':_0x4fc9ab,'toVersion':_0xbbb472};if(this['_stampAiAttribute'](_0x2217d1,_0x4955b9,!!_0x5d061a['hasAIChanges']),!_0x4955b9||_0xbbb472!==_0x4955b9['toVersion']){const _0x4a1547=_0xbbb472-0x1,_0x1794d1=this['_source']['history']['getOperation'](_0x4a1547);_0x2217d1['createdAt']=_0x1794d1&&_0x1794d1['createdAt']||new Date();}if(this['_loadedStateData']&&_0x4fc9ab===this['_loadedStateData']['fromVersion']){for(const _0x5f4280 of this['_loadedStateData']['authors'])_0x2217d1['authorsIds']['includes'](_0x5f4280['id'])||_0x2217d1['authorsIds']['push'](_0x5f4280['id']);}return _0x2217d1;}_bufferUpdate(_0x497604,_0x3aa94e,_0x2fdde3){if(this['_bufferedUpdates']['has'](_0x497604)){const _0x10aede=this['_bufferedUpdates']['get'](_0x497604);_0x3aa94e=_0x2fdde3?{..._0x10aede,..._0x3aa94e}:{..._0x3aa94e,..._0x10aede};}this['_bufferedUpdates']['set'](_0x497604,_0x3aa94e);}setRevisionData(_0x15266d){const _0x3dc91b=this['repository']['getRevision'](_0x15266d['id']);if(_0x15266d['createdAt']&&(_0x15266d['createdAt']=new Date(_0x15266d['createdAt'])),_0x15266d['authorsIds']){const _0xc52523=this['editor']['plugins']['get']('Users');_0x15266d['authors']=_0x15266d['authorsIds']['map'](_0x53882b=>_0xc52523['getUser'](_0x53882b));}_0x3dc91b['_update'](_0x15266d,!0x0);}_createInitialRevision(_0xd5b127){const _0x11d1ce=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x11d1ce)this['_initialRevisionId']=_0x11d1ce['id'];else{const _0x5c481b=!this['editor']['model']['document']['roots']['find'](_0x4ae6db=>this['editor']['model']['hasContent'](_0x4ae6db)),_0x3da526=this['editor']['plugins']['get']('Users')['me']['id'],_0x521ae0=At(this['editor']['locale'],_0x5c481b?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0xd5b127,'to':_0xd5b127,'id':this['_initialRevisionId'],'name':_0x521ae0,'creatorId':_0x3da526});}}_createCurrentRevision(_0x4015d2){const _0x54f234=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x54f234),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4015d2,'to':_0x4015d2,'id':_0x54f234,'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(_0x2dec86,_0xe2efd,_0x114c22){const _0x58c719={},_0x4046e5={},_0x3f09e7={},_0x37186=this['editor']['config']['get']('roots')||{};for(const [_0x48cf79,_0x52abc6]of Object['entries'](_0x37186))_0x52abc6['lazyLoad']||(_0x58c719[_0x48cf79]=_0x52abc6['initialData']??'',_0x4046e5[_0x48cf79]=_0x52abc6['modelAttributes']||{},_0x52abc6['modelElement']&&(_0x3f09e7[_0x48cf79]=_0x52abc6['modelElement']));for(const _0xe0bcc1 of this['editor']['model']['document']['getRootNames']())_0x58c719[_0xe0bcc1]??='',_0x4046e5[_0xe0bcc1]??={};let _0x2c83cf=!0x1;const _0x19ee9a=Object['keys'](_0x58c719),_0x2bfa6d=Object['keys'](_0x2dec86);for(const _0x98166a of _0x19ee9a){if(_0x58c719[_0x98166a]!==_0x2dec86[_0x98166a]&&''!==_0x58c719[_0x98166a]['trim']()){_0x2c83cf=!0x0;break;}if(!_0x231559(_0x4046e5[_0x98166a],_0xe2efd[_0x98166a])&&Object['keys'](_0x4046e5[_0x98166a])['length']>0x0){_0x2c83cf=!0x0;break;}const _0x6c9d59=_0x3f09e7[_0x98166a],_0x332feb=_0x114c22[_0x98166a];if(_0x6c9d59&&_0x332feb&&_0x6c9d59!==_0x332feb){_0x2c83cf=!0x0;break;}}_0x2c83cf||(_0x2c83cf=_0x2bfa6d['some'](_0x4b8ea4=>!this['editor']['model']['document']['getRoot'](_0x4b8ea4))),_0x2c83cf&&_0x2a14f9('editor-initial-data-replaced-with-revision-data',{'editorData':_0x58c719,'editorRootsAttributes':_0x4046e5,'editorRootsModelElements':_0x3f09e7,'revisionData':_0x2dec86,'revisionRootsAttributes':_0xe2efd,'revisionRootsModelElements':_0x114c22});for(const [_0x19af51,_0x16bfcf]of Object['entries'](_0x2dec86))this['editor']['config']['set']('roots.'+_0x19af51+'.initialData',_0x16bfcf);for(const [_0x183edf,_0x36c4d7]of Object['entries'](_0xe2efd))this['editor']['config']['set']('roots.'+_0x183edf+'.modelAttributes',_0x36c4d7);const _0x186b9d=this['editor']['model']['document'];for(const [_0x3cd4cf,_0x29f566]of Object['entries'](_0x114c22)){this['editor']['config']['set']('roots.'+_0x3cd4cf+'.modelElement',_0x29f566);const _0x347977=_0x186b9d['getRoot'](_0x3cd4cf);_0x347977&&_0x347977['name']!==_0x29f566&&(_0x186b9d['roots']['remove'](_0x3cd4cf),_0x186b9d['createRoot'](_0x29f566,_0x3cd4cf));}}_addPendingAction(){if(!this['_pendingAction']){const _0x5065c9=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x5065c9['add'](At(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x4b3ad7){const _0x4ce1e1=this['repository']['getRevisions']();_0x4ce1e1['reverse']();let _0x5df1d7=0x0;for(;_0x5df1d7<_0x4ce1e1['length'];){const _0x366526=_0x4ce1e1[_0x5df1d7];if(_0x366526===this['currentRevision']){_0x5df1d7++;continue;}if(_0x366526['id']===this['_initialRevisionId'])break;const _0x4a7691=_0x4b3ad7['toVersion']-_0x366526['toVersion']||_0x4b3ad7['fromVersion']-_0x366526['fromVersion'];if(_0x4a7691>0x0)break;if(_0x4a7691<0x0)_0x5df1d7++;else{if(!_0x4b3ad7['creator']&&_0x366526['creator'])break;if(_0x366526['creator']||!_0x4b3ad7['creator']){if(_0x4b3ad7['createdAt']>_0x366526['createdAt'])break;_0x5df1d7++;}else _0x5df1d7++;}}return _0x5df1d7;}_getFromVersion(_0x1ff5ab){const _0x48e26f=this['repository']['getRevisions']();_0x48e26f['reverse'](),_0x48e26f['shift']();const _0x4796a7=_0x48e26f['find'](_0x54051b=>_0x54051b['toVersion']<=_0x1ff5ab)['toVersion'];return _0x4796a7<this['_startingVersion']?this['_startingVersion']:_0x4796a7;}['_makeRevision']({name:_0x4f584b,from:_0x414f71,to:_0x12399b,creatorId:_0x37af12,id:_0x5b861b}){const _0x5ea4ff=this['buildRevisionData']({'from':_0x414f71,'to':_0x12399b});_0x5ea4ff['name']=_0x4f584b,_0x5ea4ff['creatorId']=_0x37af12,_0x5ea4ff['id']=_0x5b861b;const _0x209d47=this['addRevisionData'](_0x5ea4ff);return this['adapter']&&this['_bufferUpdate'](_0x5ea4ff['id'],_0x5ea4ff,!0x0),_0x209d47;}_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(_0x4ffc11){this['editor']=_0x4ffc11,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(_0x3fd23c){this['source']=_0x3fd23c;const _0x5eea3c=new Map(),_0x4406c7=new Map(),_0x1bb46c=this['editor']['model']['document']['roots']['map'](_0x16bc5a=>_0x16bc5a['rootName']);for(const _0x409f57 of _0x1bb46c){const _0x412284=this['editor']['model']['document']['getRoot'](_0x409f57),_0x534dc7=St(_0x412284);_0x5eea3c['set'](_0x409f57,_0x534dc7),_0x4406c7['set'](_0x409f57,Object['fromEntries'](_0x412284['getAttributes']()));}const _0x6baefd=Array['from'](this['editor']['model']['markers'])['map'](_0x443b68=>[_0x443b68['name'],_0x443b68['getRange']()]),_0x3259e2=this['source']['version'];this['_saveMetaData'](_0x3259e2,_0x5eea3c,_0x6baefd,_0x4406c7),this['_startingRevisionId']=this['_revisionId'];const _0x3bc376=new Map(),_0x40b522=new Map();for(const _0x1e162a of _0x1bb46c){const _0x30cca6=Ot(_0x1e162a,this['editor']['model']['document']['getRoot'](_0x1e162a)['name']);_0x3bc376['set'](_0x1e162a,_0x30cca6),_0x40b522['set'](_0x1e162a,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3bc376,[],_0x40b522);}getData(_0xb29f80,_0x1fb308){if(this['_lastFrom']===_0xb29f80&&this['_lastTo']<=_0x1fb308)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1fb308,!0x0);else{if(!this['_savedMetaData']['has'](_0xb29f80)){const _0x5945e7=this['_getPreviousFrom'](_0xb29f80);this['_calculateMetaData'](_0x5945e7,_0xb29f80,!0x1);}this['_calculateMetaData'](_0xb29f80,_0x1fb308,!0x0);}return this['_lastFrom']=_0xb29f80,this['_lastTo']=_0x1fb308,this['_getState']();}loadState(_0x311c08){if(!this['_savedMetaData']['has'](_0x311c08['fromVersion'])){const _0x56db2e=this['_getPreviousFrom'](_0x311c08['fromVersion']);this['_calculateMetaData'](_0x56db2e,_0x311c08['fromVersion'],!0x1);}this['_calculateMetaData'](_0x311c08['fromVersion'],_0x311c08['toVersion'],!0x1);const _0x469d58=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x311c08['fromVersion'],this['_lastTo']=_0x311c08['toVersion'];for(const _0x160cbd in _0x311c08['diffData']){const _0x5dea71=_0x311c08['diffData'][_0x160cbd]['attachChange'],_0x5bf732=_0x40925b(_0x311c08['diffData'][_0x160cbd]['attributesBefore'])||{},_0x5e788f=_0x311c08['diffData'][_0x160cbd],_0x13bd01=_0x469d58['_makeModelFromViewString'](_0x5e788f['deletions'],_0x5e788f['rootElementName']||'$root');_0x13bd01['rootName']=_0x160cbd,_0x13bd01['_isAttached']=!_0x5dea71||!_0x5dea71['isAttached'],_0x13bd01['isAttached']=()=>_0x13bd01['_isAttached'],this['_baseRoots']['set'](_0x160cbd,_0x13bd01),this['_baseRootsAttributes']['set'](_0x160cbd,_0x5bf732),_0x5dea71&&this['_touchedRoots']['set'](_0x160cbd,_0x5dea71);const _0x153658=this['_makeIdsRoot'](_0x13bd01);this['_baseIdsRoots']['set'](_0x160cbd,_0x153658);for(const [_0x3bcc4e,_0x50d80c]of _0x13bd01['markers']){if(!_0x3bcc4e['startsWith']('revision:'))continue;const _0x52b29e=_0x3bcc4e['split'](':')[0x2],_0x21f91d=_0x5e788f['aiSources']?.[_0x3bcc4e]||null;for(const _0x184f3c of _0x50d80c['getWalker']({'singleCharacters':!0x0})){const _0x52058b=this['_getVidAttributeName'](_0x184f3c),_0x386d0b='elementEnd'==_0x184f3c['type']?_0x184f3c['previousPosition']['path']['slice'](0x0,-0x1):_0x184f3c['previousPosition']['path'],_0x3a3f64=_0x153658['getNodeByPath'](_0x386d0b)['getAttribute'](_0x52058b);this['_touched']['set'](_0x3a3f64,{'userId':_0x52b29e,'aiSource':_0x21f91d});}_0x13bd01['markers']['delete'](_0x3bcc4e);}}this['_startingRevisionId']=this['_revisionId'];const _0x4ce976=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5e80d1=>!this['_touched']['has'](_0x5e80d1));let _0x404561=0x0;const _0x2c5f7b=new Map();for(const _0x5e75dd in _0x311c08['diffData']){const _0x5f091e=_0x311c08['diffData'][_0x5e75dd]['attachChange'],_0x488126=_0x40925b(_0x311c08['diffData'][_0x5e75dd]['attributesAfter'])||{},_0x1b34fb=_0x311c08['diffData'][_0x5e75dd],_0x29686b=_0x469d58['_makeModelFromViewString'](_0x1b34fb['insertions'],_0x1b34fb['rootElementName']||'$root');_0x29686b['rootName']=_0x5e75dd,_0x29686b['_isAttached']=!_0x5f091e||_0x5f091e['isAttached'],_0x29686b['isAttached']=()=>_0x29686b['_isAttached'],this['_diffRoots']['set'](_0x5e75dd,_0x29686b),this['_diffRootsAttributes']['set'](_0x5e75dd,_0x488126);const _0x4d6e4c=this['_makeIdsRoot'](_0x29686b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5e75dd,_0x4d6e4c),_0x2c5f7b['set'](_0x5e75dd,_0x29686b['isAttached']()?_0x488126:{});for(const [_0x5b7997,_0xb15ce7]of _0x29686b['markers']){if(!_0x5b7997['startsWith']('revision:'))continue;const _0x5e080e=_0x5b7997['split'](':')[0x2],_0x2f3b4a=_0x1b34fb['aiSources']?.[_0x5b7997]||null;for(const _0x2797f0 of _0xb15ce7['getWalker']({'singleCharacters':!0x0})){const _0xf6d943=this['_getVidAttributeName'](_0x2797f0),_0x58ab3a=this['_revisionId']++,_0x313250='elementEnd'==_0x2797f0['type']?_0x2797f0['previousPosition']['path']['slice'](0x0,-0x1):_0x2797f0['previousPosition']['path'];_0x4d6e4c['getNodeByPath'](_0x313250)['_setAttribute'](_0xf6d943,_0x58ab3a),this['_touched']['set'](_0x58ab3a,{'userId':_0x5e080e,'aiSource':_0x2f3b4a});}_0x29686b['markers']['delete'](_0x5b7997);}for(const _0x2f2c76 of this['editor']['model']['createRangeIn'](_0x29686b)['getWalker']({'singleCharacters':!0x0})){const _0x1e1d12=this['_getVidAttributeName'](_0x2f2c76),_0x1d781a='elementEnd'==_0x2f2c76['type']?_0x2f2c76['previousPosition']['path']['slice'](0x0,-0x1):_0x2f2c76['previousPosition']['path'],_0x518368=_0x4d6e4c['getNodeByPath'](_0x1d781a);_0x518368['getAttribute'](_0x1e1d12)>0x0||_0x518368['_setAttribute'](_0x1e1d12,_0x4ce976[_0x404561++]);}for(const [_0x29abba,_0x3b5d8d]of _0x29686b['markers'])_0x29abba['startsWith']('revision:')||this['_markers']['set'](_0x29abba,_0x3b5d8d);}const {roots:_0x43cabb}=this['_savedMetaData']['get'](_0x311c08['fromVersion']),{roots:_0x1d2cc8}=this['_savedMetaData']['get'](_0x311c08['toVersion']),_0x687325=St(_0x43cabb['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x687325),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x687325,Number['NEGATIVE_INFINITY']));const _0x5d3f5e=St(_0x1d2cc8['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x5d3f5e),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5d3f5e));const _0x26a2ab=Array['from'](this['_diffRoots'])['map'](([_0x491794,_0x2202c1])=>[_0x491794,St(_0x2202c1)]);this['_saveMetaData'](this['_lastTo'],_0x26a2ab,this['_markers'],_0x2c5f7b);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x22b925,_0x2858f5,_0x2cd074,_0x70e8c9){const _0x447879=new Map(_0x2858f5),_0x78a0a9=new Map(_0x40925b(_0x70e8c9)),_0x27eefb=new Map();for(const [_0x2d6b60,_0x3ab43e]of _0x2cd074)_0x27eefb['set'](_0x2d6b60,{'start':_0x3ab43e['start']['clone'](),'end':_0x3ab43e['end']['clone'](),'rootName':_0x3ab43e['root']['rootName']});this['_savedMetaData']['set'](_0x22b925,{'roots':_0x447879,'markers':_0x27eefb,'rootsAttributes':_0x78a0a9});}_removeMetaData(_0xab8298){this['_savedMetaData']['delete'](_0xab8298);}_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(_0x1c3573,_0x1a84a8=null){let _0x17c919=null;_0x1c3573['is']('documentFragment')||(_0x17c919=new _0x3930eb(_0x1c3573['name'],{'vid_start':null===_0x1a84a8?this['_revisionId']++:_0x1a84a8++}));const _0x3b2692=[];for(const _0x2e4993 of _0x1c3573['getChildren']())if(_0x2e4993['is']('element')){_0x3b2692['push'](this['_makeIdsRoot'](_0x2e4993,_0x1a84a8));const _0xbcafcb=_0x3b2692[_0x3b2692['length']-0x1];null!==_0x1a84a8&&(_0x1a84a8=_0xbcafcb['is']('element','$text')?_0xbcafcb['getAttribute']('vid')+0x1:_0xbcafcb['getAttribute']('vid_end')+0x1);}else{for(let _0x452047=0x0;_0x452047<_0x2e4993['offsetSize'];_0x452047++)_0x3b2692['push'](new _0x3930eb('$text',{'vid':null===_0x1a84a8?this['_revisionId']++:_0x1a84a8++}));}if(_0x1c3573['is']('documentFragment')){const _0x1e3cd0=Ot(_0x1c3573['rootName'],_0x1c3573['name']);return _0x1e3cd0['_insertChild'](0x0,_0x3b2692),_0x1e3cd0;}return _0x17c919['_setAttribute']('vid_end',null===_0x1a84a8?this['_revisionId']++:_0x1a84a8),_0x17c919['_insertChild'](0x0,_0x3b2692),_0x17c919;}_calculateMetaData(_0x1fca84,_0x45c381,_0x203f92){this['_reset']();const {roots:_0x1f7a9b,markers:_0x1063ad,rootsAttributes:_0x20d093}=this['_savedMetaData']['get'](_0x1fca84);this['_baseRoots']=new Map(_0x1f7a9b),this['_baseRootsAttributes']=new Map(_0x40925b(_0x20d093));for(const [_0x550bdf,_0x4ba837]of this['_baseRoots'])if('$graveyard'!==_0x550bdf&&(this['_diffRoots']['set'](_0x550bdf,St(_0x4ba837)),this['_diffRootsAttributes']=new Map(_0x40925b(_0x20d093)),_0x203f92)){const _0x5e1123=this['_revisionId'];this['_idsRoots']['set'](_0x550bdf,this['_makeIdsRoot'](_0x4ba837)),this['_baseIdsRoots']['set'](_0x550bdf,this['_makeIdsRoot'](_0x4ba837,_0x5e1123));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x203f92&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x354dc9,_0x29ce57]of _0x1063ad){const _0x4fd869=this['_baseRoots']['get'](_0x29ce57['rootName']),_0x22f4fb=this['_diffRoots']['get'](_0x29ce57['rootName']),_0x5662a7=new _0x41ff3f(_0x497596(_0x29ce57['start'],_0x4fd869),_0x497596(_0x29ce57['end'],_0x4fd869)),_0x31f753=_0x27a38a(_0x5662a7,_0x22f4fb);_0x4fd869['markers']['set'](_0x354dc9,_0x5662a7),this['_markers']['set'](_0x354dc9,_0x31f753);}this['_applyOperations'](_0x1fca84,_0x45c381,_0x203f92);}_applyOperations(_0x2e04b2,_0x1f016b,_0x43a4d3){for(const _0x5a4964 of this['source']['getOperations'](_0x2e04b2,_0x1f016b))this['_handleOperation'](_0x5a4964,_0x43a4d3);for(const _0x4b2087 of this['_diffRoots']['values']())_0x4b2087['markers']['clear']();for(const [_0x185a2f,_0x28ad1f]of this['_markers'])this['_diffRoots']['get'](_0x28ad1f['root']['rootName'])['markers']['set'](_0x185a2f,_0x28ad1f['clone']());const _0x1b1b44=new Map(),_0x4b42ce=new Map();for(const [_0x5d5316,_0xc3604f]of this['_diffRoots'])_0x1b1b44['set'](_0x5d5316,St(_0xc3604f)),_0x4b42ce['set'](_0x5d5316,this['_diffRootsAttributes']['get'](_0x5d5316));this['_saveMetaData'](_0x1f016b,_0x1b1b44,this['_markers'],_0x4b42ce);}_getPreviousFrom(_0x4f1e54){const _0xfa3d0e=Array['from'](this['_savedMetaData']['keys']());_0xfa3d0e['sort']((_0x3b4b93,_0x379f11)=>_0x3b4b93-_0x379f11),_0xfa3d0e['reverse']();for(const _0x1eb192 of _0xfa3d0e)if(_0x1eb192<_0x4f1e54)return _0x1eb192;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5a1785,_0x40a638){const _0x26e8a8=Array['from'](_0x40a638['markers'])['map'](([_0x189b86,_0x510b8f])=>[_0x189b86,_0x27a38a(_0x510b8f,_0x5a1785)]);_0x5a1785['markers']=new Map(_0x26e8a8);}_transformMarkers(_0x31d04d){for(const _0x33f9c7 of this['_markers']['values']()){const _0x1b66a0=_0x33f9c7['getTransformedByOperation'](_0x31d04d),_0x40631c=_0x41ff3f['_createFromRanges'](_0x1b66a0);_0x33f9c7['start']=_0x40631c['start'],_0x33f9c7['end']=_0x40631c['end'];}}_handleOperation(_0x519468,_0x53011){if('addRoot'!=_0x519468['type']&&'detachRoot'!=_0x519468['type']){if('insert'==_0x519468['type']){const _0x3c44d6=_0x519468['position']['root'],_0x39b883=_0x3c44d6['rootName'],_0x2900c5=_0x3c44d6['name'];this['_diffRoots']['has'](_0x39b883)||(this['_diffRoots']['set'](_0x39b883,Ot(_0x39b883,_0x2900c5,!0x0)),this['_diffRootsAttributes']['set'](_0x39b883,{}),_0x53011&&this['_idsRoots']['set'](_0x39b883,Ot(_0x39b883,_0x2900c5,!0x0)));}else{if('addRootAttribute'==_0x519468['type']||'removeRootAttribute'==_0x519468['type']||'changeRootAttribute'==_0x519468['type'])return void this['_handleRootAttributeOperation'](_0x519468);'marker'==_0x519468['type']&&this['_handleMarkerOperation'](_0x519468);}if('marker'!==_0x519468['type']){const _0xb56fb9=this['_cloneOperation'](_0x519468,this['_diffRoots']);_0xb56fb9['_execute'](),this['_transformMarkers'](_0xb56fb9);}if(_0x53011)switch(_0x519468['type']){case'insert':this['_handleInsertOperation'](_0x519468);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x519468);break;case'merge':this['_handleMergeOperation'](_0x519468);break;case'split':this['_handleSplitOperation'](_0x519468);}}else this['_handleRootOperation'](_0x519468,_0x53011);}_cloneOperation(_0x57afa3,_0x5ca346){const _0x163d59=_0x57afa3['clone']();return _0x163d59['_authorId']=_0x57afa3['_authorId'],_0x163d59['_aiSource']=_0x57afa3['_aiSource'],_0x163d59['baseVersion']=null,_0x4f0444(_0x163d59,_0x5ca346),_0x163d59;}_getBaseVids(_0x4e6e98){return _0x4e6e98['map'](_0x222de9=>{const _0x1ac730=this['_getVidAttributeName'](_0x222de9);return Number(_0x222de9['item']['getAttribute'](_0x1ac730));});}_generateTape(_0x2f461a,_0x279c3c){if(_0x2f461a['is']('element','$text'))_0x279c3c['push']({'item':_0x2f461a,'type':'text'});else{_0x2f461a['is']('element')&&_0x279c3c['push']({'item':_0x2f461a,'type':'elementStart'});for(const _0x35b3f9 of _0x2f461a['getChildren']())this['_generateTape'](_0x35b3f9,_0x279c3c);_0x2f461a['is']('element')&&_0x279c3c['push']({'item':_0x2f461a,'type':'elementEnd'});}return _0x279c3c;}_getState(){const _0x3ceccc=new Map(this['_touched']),_0x3fce64=new Map(_0x3ceccc),_0x49dc20=new Map(),_0x30a8c5={'insertions':{},'deletions':{}},_0x33d1ac={'insertions':{},'deletions':{}},_0x4edda4=new Map(),_0x28b01b=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x414d68=new Map();_0x28b01b['delete']('$graveyard');for(const _0x155b68 of _0x28b01b){const _0x4756b7=(this['_diffRoots']['get'](_0x155b68)??this['_baseRoots']['get'](_0x155b68))['name'],_0x1652e2=this['_diffRoots']['get'](_0x155b68)||Ot(_0x155b68,_0x4756b7,!0x1),_0x31ecb7=this['_baseRoots']['get'](_0x155b68)||Ot(_0x155b68,_0x4756b7,!0x1);_0x1652e2['isAttached']()||_0x31ecb7['isAttached']()?(_0x414d68['set'](_0x155b68,_0x4756b7),_0x30a8c5['insertions'][_0x155b68]=St(_0x1652e2),_0x30a8c5['deletions'][_0x155b68]=St(_0x31ecb7),this['_copyMarkers'](_0x30a8c5['deletions'][_0x155b68],_0x31ecb7),this['_copyMarkers'](_0x30a8c5['insertions'][_0x155b68],_0x1652e2),_0x33d1ac['insertions'][_0x155b68]=this['_generateTape'](this['_idsRoots']['get'](_0x155b68),[]),_0x33d1ac['deletions'][_0x155b68]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x155b68)||Ot(_0x155b68,_0x4756b7,!0x1),[])):_0x28b01b['delete'](_0x155b68);}for(const _0x53beee of _0x28b01b){const _0x596d7a=_0x33d1ac['insertions'][_0x53beee];for(const _0x4af7cb of _0x596d7a){const _0x28e2cd=this['_getVidAttributeName'](_0x4af7cb),_0x9fc997=_0x4af7cb['item']['getAttribute'](_0x28e2cd);_0x3fce64['delete'](_0x9fc997),_0x9fc997>=this['_startingRevisionId']&&_0x49dc20['set'](_0x9fc997,_0x3ceccc['get'](_0x9fc997));}}for(const _0x488559 of _0x28b01b){const _0xe0ff2d=_0x33d1ac['insertions'][_0x488559],_0x3b37ca=this['_getBaseVids'](_0x33d1ac['deletions'][_0x488559]);let _0x59be76=0x0;for(const _0x3127bb of _0xe0ff2d){const _0x531cdd=this['_getVidAttributeName'](_0x3127bb),_0x2d72c0=_0x3127bb['item']['getAttribute'](_0x531cdd);if(!_0x49dc20['has'](_0x2d72c0)&&!_0x4edda4['has'](_0x2d72c0)){if(_0x3fce64['has'](_0x2d72c0))_0x59be76++;else{if(_0x2d72c0!=_0x3b37ca[_0x59be76]){const _0xa4ea33=_0x3ceccc['get'](_0x2d72c0)||_0x3ceccc['get'](_0x3b37ca[_0x59be76]);for(;_0x2d72c0!=_0x3b37ca[_0x59be76];)_0x3fce64['has'](_0x3b37ca[_0x59be76])||(_0x4edda4['set'](_0x3b37ca[_0x59be76],_0xa4ea33),_0x3ceccc['set'](_0x3b37ca[_0x59be76],_0xa4ea33)),_0x59be76++;}_0x59be76++;}}}}for(const _0x1ad898 of _0x28b01b){const _0x47fd9c=_0x33d1ac['insertions'][_0x1ad898];for(const _0x3acb24 of _0x47fd9c){const _0x465450=this['_getVidAttributeName'](_0x3acb24),_0x1beb7e=_0x3acb24['item']['getAttribute'](_0x465450);if(_0x4edda4['has'](_0x1beb7e)){const _0x17642d=_0x4edda4['get'](_0x1beb7e);_0x3fce64['has'](_0x1beb7e)||_0x3fce64['set'](_0x1beb7e,{..._0x17642d}),_0x49dc20['set'](_0x1beb7e,{..._0x17642d});}}}for(const _0x29219f of _0x3fce64['keys']())_0x29219f>=this['_startingRevisionId']&&_0x3fce64['delete'](_0x29219f);const _0x116ae3=new Map();for(const _0x52435d of _0x28b01b){let _0x2407d7=_0x33d1ac['insertions'][_0x52435d];for(const _0x9c760c of _0x2407d7)if(_0x9c760c['item']['is']('element','tableCell')){const _0x12ecd8=this['_getVidAttributeName'](_0x9c760c),_0x1efde4=_0x9c760c['item']['getAttribute'](_0x12ecd8);if(_0x49dc20['has'](_0x1efde4)){const _0x2c87a8=_0x9c760c['item']['parent']['parent']['getAttribute']('vid_start'),_0x1deddd=_0x49dc20['get'](_0x1efde4),_0x44f389=_0x116ae3['get'](_0x2c87a8)||{'users':new Set(),'aiSource':null};_0x44f389['users']['add'](_0x1deddd['userId']),_0x44f389['aiSource']=_0x44f389['aiSource']||_0x1deddd['aiSource']||null,_0x116ae3['set'](_0x2c87a8,_0x44f389);}}_0x2407d7=_0x33d1ac['deletions'][_0x52435d];for(const _0x18f505 of _0x2407d7)if(_0x18f505['item']['is']('element','tableCell')){const _0x43551e=this['_getVidAttributeName'](_0x18f505),_0x31b504=_0x18f505['item']['getAttribute'](_0x43551e);if(_0x3fce64['has'](_0x31b504)){const _0x3bb955=_0x18f505['item']['parent']['parent']['getAttribute']('vid_start'),_0x35b33e=_0x3fce64['get'](_0x31b504),_0x45511d=_0x116ae3['get'](_0x3bb955)||{'users':new Set(),'aiSource':null};_0x45511d['users']['add'](_0x35b33e['userId']),_0x45511d['aiSource']=_0x45511d['aiSource']||_0x35b33e['aiSource']||null,_0x116ae3['set'](_0x3bb955,_0x45511d);}}for(const _0x318e57 of _0x116ae3['keys']())(_0x49dc20['has'](_0x318e57)||_0x3fce64['has'](_0x318e57))&&_0x116ae3['delete'](_0x318e57);}for(const _0x4a15ea of _0x28b01b){const _0x446e8b=_0x33d1ac['insertions'][_0x4a15ea];let _0x636360=null,_0x1feeb6=null,_0x5ccf0f=null;for(const _0x25dd29 of _0x446e8b){const _0x4bfbef=this['_getVidAttributeName'](_0x25dd29),_0x2e94c7=_0x25dd29['item']['getAttribute'](_0x4bfbef),_0x4ee5cd=_0x116ae3['get'](_0x2e94c7);if(_0x4ee5cd&&'elementStart'==_0x25dd29['type']&&(_0x636360=Array['from'](_0x4ee5cd['users'])[0x0],_0x1feeb6=_0x4ee5cd['aiSource'],_0x5ccf0f=_0x25dd29['item']['getAttribute']('vid_end')),_0x636360){const _0x44dc70=_0x1feeb6||_0x3fce64['get'](_0x2e94c7)?.['aiSource']||null,_0x6630e3=_0x1feeb6||_0x49dc20['get'](_0x2e94c7)?.['aiSource']||null;_0x3fce64['set'](_0x2e94c7,{'userId':_0x636360,'aiSource':_0x44dc70}),_0x49dc20['set'](_0x2e94c7,{'userId':_0x636360,'aiSource':_0x6630e3});}_0x2e94c7==_0x5ccf0f&&(_0x636360=null,_0x5ccf0f=null);}}const _0x2233b4={},_0x17aa91=new Set();for(const _0x39eda2 of _0x28b01b){const _0x2ffb98=_0x30a8c5['deletions'][_0x39eda2],_0x5fbec8=_0x30a8c5['insertions'][_0x39eda2];for(const {userId:_0x2d426e}of this['_touchedMarkers']['values']())null!==_0x2d426e&&_0x17aa91['add'](_0x2d426e);for(const {userId:_0x4dc925}of this['_touchedRoots']['values']())null!==_0x4dc925&&_0x17aa91['add'](_0x4dc925);const _0x62e136={};this['_markChanges'](_0x5fbec8,_0x33d1ac['insertions'][_0x39eda2],_0x49dc20,'insertion',_0x17aa91,_0x62e136),this['_markChanges'](_0x2ffb98,_0x33d1ac['deletions'][_0x39eda2],_0x3fce64,'deletion',_0x17aa91,_0x62e136),this['_collectSuggestionAiSources'](_0x5fbec8,_0x62e136),this['_collectSuggestionAiSources'](_0x2ffb98,_0x62e136),_0x2233b4[_0x39eda2]={'insertions':this['_prepareViewToSave'](_0x5fbec8),'deletions':this['_prepareViewToSave'](_0x2ffb98),'attachChange':this['_touchedRoots']['get'](_0x39eda2)||null,'attributesBefore':_0x40925b(this['_baseRootsAttributes']['get'](_0x39eda2))||{},'attributesAfter':_0x40925b(this['_diffRootsAttributes']['get'](_0x39eda2)),'rootElementName':_0x414d68['get'](_0x39eda2),'aiSources':_0x62e136};}const _0x2b6851=Array['from'](_0x49dc20['values']())['some'](_0x418b52=>!(!_0x418b52||!_0x418b52['aiSource']))||Array['from'](_0x3fce64['values']())['some'](_0xbef6fe=>!(!_0xbef6fe||!_0xbef6fe['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x491a67=>this['_aiTouchedMarkers']['has'](_0x491a67));return{'diffData':_0x2233b4,'authorsIds':Array['from'](_0x17aa91),'hasAIChanges':_0x2b6851};}_collectSuggestionAiSources(_0x2e0474,_0x2ccca0){const _0x4cab33=_0x2e0474['markers'];for(const _0x112269 of _0x4cab33['keys']()){if(!_0x112269['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x112269))continue;const _0x2b04a6=this['_aiTouchedMarkers']['get'](_0x112269);_0x2b04a6&&(_0x2ccca0[_0x112269]=_0x2b04a6);}}_processRootBeforeSave(_0x11ab21){for(const [,_0x291f15]of _0x11ab21['markers']){const _0x125cdc=_0x291f15['start']['getAncestors']()['filter'](_0x49117f=>'tableCell'==_0x49117f['name']);for(const _0x1947aa of _0x125cdc)0x1==_0x1947aa['childCount']&&_0x1947aa['getChild'](0x0)['is']('element','paragraph')&&_0x1947aa['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5d29c5){this['_processRootBeforeSave'](_0x5d29c5);const _0x51ddef=this['editor']['data']['toView'](_0x5d29c5,{}),_0x3d58d8=Array['from'](_0x51ddef['getChildren']())['map'](_0x56a66f=>this['_getViewJson'](_0x56a66f));return JSON['stringify'](_0x3d58d8);}_getViewJson(_0x398761){if(_0x398761['is']('$text'))return _0x398761['data'];{const _0x22937e=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1a511b=_0x398761,_0x1466ec=this['editor']['data']['htmlProcessor']['domConverter'],_0x37b634={'type':_0x22937e['_getTypeCharForViewElement'](_0x1a511b),'name':_0x1a511b['name'],'attributes':Array['from'](_0x1a511b['getAttributes']()),'children':Array['from'](_0x1a511b['getChildren']())['map'](_0x3b6187=>this['_getViewJson'](_0x3b6187))};if(_0x398761['is']('uiElement')&&'$comment'!=_0x398761['name']){const _0x1e9ecc=_0x398761['render'](_0x1466ec['domDocument'],_0x1466ec);_0x37b634['children']['push'](_0x1e9ecc['outerHTML']);}else{if(_0x398761['is']('rawElement')){const _0x2296eb=_0x1466ec['domDocument']['createElement'](_0x1a511b['name']);_0x398761['render'](_0x2296eb,_0x1466ec),_0x37b634['children']['push'](_0x2296eb['innerHTML']);}}const _0x428704=Array['from'](_0x1a511b['getCustomProperties']());_0x428704['length']>0x0&&(_0x37b634['customProperties']=_0x428704);const _0x3109bc=_0x1a511b['getFillerOffset']();return null!==_0x3109bc&&(_0x37b634['fillerOffset']=_0x3109bc),_0x37b634;}}['_markChanges'](_0x1a315b,_0x59b611,_0x398311,_0x1ebfe0,_0x1df633,_0x1d64a7){let _0x46554f=null,_0x11cfc6=null,_0x10b83d=0x0;const _0x5b856f=this['editor']['model'];for(let _0x24fb11=0x0;_0x24fb11<_0x59b611['length'];_0x24fb11++){const _0x4377d0=this['_getVidAttributeName'](_0x59b611[_0x24fb11]),_0x4c34c1=_0x59b611[_0x24fb11]['item']['getAttribute'](_0x4377d0),_0x48350a=_0x398311['get'](_0x4c34c1),_0x128c73=_0x24fb11==_0x59b611['length']-0x1;!_0x46554f&&_0x48350a&&(_0x46554f=_0x48350a,_0x11cfc6=_0x59b611[_0x24fb11]);const _0x12242f=!!_0x46554f&&!!_0x48350a&&_0x48350a['userId']!=_0x46554f['userId'],_0x16ac8d=!!_0x46554f&&!!_0x48350a&&_0x48350a['aiSource']!=_0x46554f['aiSource'];_0x46554f&&(!_0x48350a||_0x12242f||_0x16ac8d)&&(_0x42a129(_0x48350a,Ct(_0x11cfc6,_0x1a315b,_0x5b856f),Ct(_0x59b611[_0x24fb11],_0x1a315b,_0x5b856f)),_0x46554f=_0x48350a||null,_0x11cfc6=_0x48350a?_0x59b611[_0x24fb11]:null),_0x46554f&&_0x128c73&&_0x42a129(_0x48350a,Ct(_0x11cfc6,_0x1a315b,_0x5b856f),Nt(_0x59b611[_0x24fb11],_0x1a315b,_0x5b856f));}function _0x42a129(_0x496958,_0xb4129e,_0x1161b0){const _0x597d30=_0x46554f['userId'],_0x3ee15e=_0x46554f['aiSource'],_0x20b103='revision:'+_0x1ebfe0+':'+_0x597d30+':'+_0x10b83d++,_0xdb04a1=_0x5b856f['createRange'](_0xb4129e,_0x1161b0);_0x1a315b['markers']['set'](_0x20b103,_0xdb04a1),_0x3ee15e&&(_0x1d64a7[_0x20b103]=_0x3ee15e),null!==_0x597d30&&_0x1df633['add'](_0x597d30);}}_getVidAttributeName(_0x427cda){switch(_0x427cda['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x26899c){const _0x20e73a=this['_idsRoots']['get'](_0x26899c['position']['root']['rootName']),_0x2137a9=_0x497596(_0x26899c['position'],_0x20e73a),_0x33157a=null===_0x26899c['_authorId']?null:_0x26899c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1aa0e6=_0x26899c['_aiSource']||null,_0x58ed9e=_0x2137a9['parent'],_0x161b07=this['_revisionId'],_0x10f8d4=[];for(const _0x25fb8f of _0x26899c['nodes'])if(_0x25fb8f['is']('element'))_0x10f8d4['push'](this['_makeIdsRoot'](_0x25fb8f));else{for(let _0x19e624=0x0;_0x19e624<_0x25fb8f['offsetSize'];_0x19e624++)_0x10f8d4['push'](new _0x3930eb('$text',{'vid':this['_revisionId']++}));}const _0x1b6593=this['_revisionId'];for(let _0x4ff4dd=_0x161b07;_0x4ff4dd<_0x1b6593;_0x4ff4dd++)this['_touched']['set'](_0x4ff4dd,{'userId':_0x33157a,'aiSource':_0x1aa0e6});_0x58ed9e['_insertChild'](_0x2137a9['offset'],_0x10f8d4);}_setTouched(_0x45ee30,_0x1bbd79,_0x28c8db){this['_touched']['set'](_0x45ee30,{'userId':_0x1bbd79,'aiSource':_0x28c8db||this['_touched']['get'](_0x45ee30)?.['aiSource']||null});}_handleMoveOperation(_0x4ec794){(_0x4ec794=this['_cloneOperation'](_0x4ec794,this['_idsRoots']))['_execute']();const _0x1f2613=null===_0x4ec794['_authorId']?null:_0x4ec794['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1d359b=_0x4ec794['_aiSource']||null,_0x5be603=_0x4ec794['getMovedRangeStart'](),_0x30e747=_0x5be603['parent'],_0x568299=_0x5be603['offset'],_0xc26cea=(_0x34c03b,_0x2ebe97,_0x2976fc)=>{for(let _0x1a6d88=_0x2ebe97;_0x1a6d88<_0x2976fc;_0x1a6d88++){const _0x3081cf=_0x34c03b['getChild'](_0x1a6d88);_0x3081cf['is']('element','$text')?this['_setTouched'](_0x3081cf['getAttribute']('vid'),_0x1f2613,_0x1d359b):(this['_setTouched'](_0x3081cf['getAttribute']('vid_start'),_0x1f2613,_0x1d359b),_0xc26cea(_0x3081cf,0x0,_0x3081cf['childCount']),this['_setTouched'](_0x3081cf['getAttribute']('vid_end'),_0x1f2613,_0x1d359b));}};_0xc26cea(_0x30e747,_0x568299,_0x568299+_0x4ec794['howMany']);}_handleMergeOperation(_0x4b3494){const _0x4919d7=null===(_0x4b3494=this['_cloneOperation'](_0x4b3494,this['_idsRoots']))['_authorId']?null:_0x4b3494['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xe448dc=_0x4b3494['_aiSource']||null,_0x3ef6ce=_0x4b3494['targetPosition']['parent'],_0x3f8928=_0x4b3494['sourcePosition']['parent'],_0x456386=_0x3ef6ce['getAttribute']('vid_end'),_0x4724fc=_0x3f8928['getAttribute']('vid_start');_0x3ef6ce['_setAttribute']('vid_end',_0x3f8928['getAttribute']('vid_end')),_0x3f8928['_setAttribute']('vid_end',_0x456386),this['_setTouched'](_0x4724fc,_0x4919d7,_0xe448dc),this['_setTouched'](_0x456386,_0x4919d7,_0xe448dc),_0x4b3494['_execute']();}_handleSplitOperation(_0x6ad825){const _0x27e16c=null===(_0x6ad825=this['_cloneOperation'](_0x6ad825,this['_idsRoots']))['_authorId']?null:_0x6ad825['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2f0e55=_0x6ad825['_aiSource']||null,_0x4c9460=_0x6ad825['graveyardPosition'],_0x265f02=_0x6ad825['splitPosition']['parent'];_0x6ad825['_execute']();const _0x5ac8ef=_0x265f02['getAttribute']('vid_end'),_0x2b8a04=_0x6ad825['insertionPosition']['nodeAfter'];if(_0x4c9460){const _0xbff913=_0x2b8a04['getAttribute']('vid_end'),_0x29ec16=_0x265f02['getAttribute']('vid_end');_0x265f02['_setAttribute']('vid_end',_0xbff913),_0x2b8a04['_setAttribute']('vid_end',_0x29ec16),this['_setTouched'](_0x265f02['getAttribute']('vid_end'),_0x27e16c,_0x2f0e55),this['_setTouched'](_0x2b8a04['getAttribute']('vid_start'),_0x27e16c,_0x2f0e55);}else{const _0xbe3623=this['_revisionId']++,_0x457a69=this['_revisionId']++;_0x265f02['_setAttribute']('vid_end',_0xbe3623),_0x2b8a04['_setAttribute']('vid_start',_0x457a69),_0x2b8a04['_setAttribute']('vid_end',_0x5ac8ef),this['_setTouched'](_0xbe3623,_0x27e16c,_0x2f0e55),this['_setTouched'](_0x457a69,_0x27e16c,_0x2f0e55);}}_handleMarkerOperation(_0x5d9d86){if(!_0x5d9d86['affectsData'])return;const _0x511f34=(_0x5d9d86=this['_cloneOperation'](_0x5d9d86,this['_diffRoots']))['oldRange']?_0x5d9d86['oldRange']['root']:null,_0xd18ddd=_0x5d9d86['newRange']?_0x5d9d86['newRange']['root']:null;_0x511f34&&this['_markers']['delete'](_0x5d9d86['name']),_0xd18ddd&&this['_markers']['set'](_0x5d9d86['name'],_0x5d9d86['newRange']['clone']());const _0x313377=null===_0x5d9d86['_authorId']?null:_0x5d9d86['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x157a8b=_0x5d9d86['name'];if(_0x5d9d86['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x157a8b,_0x5d9d86['_aiSource']),!this['_touchedMarkers']['has'](_0x157a8b))return void this['_touchedMarkers']['set'](_0x157a8b,{'range':_0x5d9d86['oldRange'],'userId':_0x313377});const _0x4fceba=this['_touchedMarkers']['get'](_0x157a8b),_0x2e6c60=_0x4fceba['range'],_0x38fd43=_0x5d9d86['newRange'];null==_0x2e6c60&&null==_0x38fd43||_0x2e6c60&&_0x38fd43&&_0x2e6c60['isEqual'](_0x38fd43)?this['_touchedMarkers']['delete'](_0x5d9d86['name']):_0x4fceba['userId']=_0x313377;}_handleRootOperation(_0x1c182f,_0x124082){this['_diffRoots']['has'](_0x1c182f['rootName'])?this['_diffRoots']['get'](_0x1c182f['rootName'])['_isAttached']=_0x1c182f['isAdd']:(this['_diffRoots']['set'](_0x1c182f['rootName'],Ot(_0x1c182f['rootName'],_0x1c182f['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1c182f['rootName'],{}),_0x124082&&this['_idsRoots']['set'](_0x1c182f['rootName'],Ot(_0x1c182f['rootName'],_0x1c182f['elementName'],!0x0)));const _0x445cf4=null===_0x1c182f['_authorId']?null:_0x1c182f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x343a76=this['_touchedRoots']['get'](_0x1c182f['rootName']);_0x343a76&&_0x343a76['userId']===_0x445cf4?this['_touchedRoots']['delete'](_0x1c182f['rootName']):this['_touchedRoots']['set'](_0x1c182f['rootName'],{'userId':_0x445cf4,'isAttached':_0x1c182f['isAdd']});}_handleRootAttributeOperation(_0x3df89d){const _0xb8f9d0=this['_diffRootsAttributes']['get'](_0x3df89d['root']['rootName']);null===_0x3df89d['newValue']?delete _0xb8f9d0[_0x3df89d['key']]:_0xb8f9d0[_0x3df89d['key']]=_0x3df89d['newValue'];}};function St(_0x174518){const _0x16bb61=Ot(_0x174518['rootName'],_0x174518['name'],_0x174518['isAttached']());for(const _0x37fd4b of _0x174518['getChildren']()){const _0x34a67a=_0x37fd4b['_clone'](!0x0);_0x16bb61['_appendChild'](_0x34a67a);}return _0x16bb61;}function Ot(_0x3eab28,_0x17116c,_0x304aca=!0x0){const _0x5dcc88=new _0x4f9233();return _0x5dcc88['rootName']=_0x3eab28,_0x5dcc88['name']=_0x17116c,_0x5dcc88['_isAttached']=_0x304aca,_0x5dcc88['isAttached']=()=>_0x5dcc88['_isAttached'],_0x5dcc88;}function Ct(_0xdad54a,_0x225d59,_0x4189ed){const _0x55de19='elementEnd'==_0xdad54a['type']?_0x4189ed['createPositionAt'](_0xdad54a['item'],'end'):_0x4189ed['createPositionBefore'](_0xdad54a['item']);return _0x4189ed['createPositionFromPath'](_0x225d59,_0x55de19['path'],_0x55de19['stickiness']);}function Nt(_0x1b7e61,_0x23de10,_0x356402){const _0x114e28='elementStart'==_0x1b7e61['type']?_0x356402['createPositionAt'](_0x1b7e61['item'],0x0):_0x356402['createPositionAfter'](_0x1b7e61['item']);return _0x356402['createPositionFromPath'](_0x23de10,_0x114e28['path'],_0x114e28['stickiness']);}const xt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x245727(ft);var Vt=class extends xt{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x42e26a,_0x553a87){super(_0x42e26a),this['focusTracker']=new _0x2163a4(),this['keystrokes']=new _0x1bd414(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x553a87),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'](),wt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5e1edb=_0x48641c=>_0x48641c['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5e1edb),this['keystrokes']['set']('arrowleft',_0x5e1edb),this['keystrokes']['set']('arrowup',_0x5e1edb),this['keystrokes']['set']('arrowdown',_0x5e1edb);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x3079ff){this['revisionNameInputView']['fieldView']['element']['value']=_0x3079ff['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x4eba96){const _0x222cfb=new st(this['locale'],mt),_0x40fc8e=_0x222cfb['fieldView'];_0x40fc8e['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1cc874=At(this['locale'],'Name\x20of\x20the\x20revision');return!_0x4eba96&&(_0x1cc874+='\x20('+At(this['locale'],'optional')+')'),(_0x222cfb['label']=_0x1cc874,_0x40fc8e['on']('input',()=>{this['revisionNameInputValue']=_0x40fc8e['element']['value']['trim']();}),_0x222cfb);}},Dt=class extends _0x3fc6d1{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Et];}['_saveRevisionFormView'];init(){const _0x5d0bde=this['editor'],_0x5094ea=_0x5d0bde['plugins']['get']('RevisionTracker');_0x5d0bde['ui']['componentFactory']['add']('revisionHistory',_0x3115fc=>{const _0x43b00c=gt(_0x3115fc),_0x141745=_0x43b00c['panelView']['children'],_0x2f295d=new nt(_0x3115fc),_0x12bb64=new et(_0x3115fc),_0x1c5d9d=this['_createSaveRevisionButton'](_0x46dff5),_0x19c02b=new et(_0x3115fc),_0x5c9e7a=this['_createOpenRevisionButton'](_0x46dff5);return _0x43b00c['bind']('isEnabled')['to'](_0x5094ea,'isReady',_0x5094ea,'isEnabled',_0x5d0bde,'isReadOnly',(_0x5cceaf,_0xdd5fdb,_0x3d7e5d)=>_0x5cceaf&&_0xdd5fdb&&!_0x3d7e5d),_0x43b00c['buttonView']['set']({'icon':_0x50ae18,'label':At(_0x3115fc,'Revision\x20history'),'tooltip':!0x0}),_0x1c5d9d['set']({'withText':!0x0,'role':'menuitem'}),_0x5c9e7a['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x5c9e7a,'execute',()=>{_0x43b00c['isOpen']=!0x1,_0x5d0bde['editing']['view']['focus']();},{'priority':'low'}),_0x12bb64['children']['add'](_0x1c5d9d),_0x19c02b['children']['add'](_0x5c9e7a),_0x2f295d['role']='menu',_0x2f295d['items']['addMany']([_0x12bb64,_0x19c02b]),_0x141745['add'](_0x2f295d),_0x43b00c;}),_0x5d0bde['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x34fff4=this['editor'],_0x2d620e=_0x34fff4['locale'],_0x37d689=_0x34fff4['plugins']['get']('RevisionTracker'),_0x383cf8=new ht(_0x2d620e),_0x3b1989=new at(_0x2d620e);_0x383cf8['bind']('isEnabled')['to'](_0x37d689,'isReady',_0x37d689,'isEnabled',_0x34fff4,'isReadOnly',(_0x2738d3,_0xb0591d,_0x16b078)=>_0x2738d3&&_0xb0591d&&!_0x16b078),_0x383cf8['buttonView']['set']({'icon':_0x50ae18,'label':At(_0x2d620e,'Revision\x20history')});const _0x2a1583=new rt(_0x2d620e,_0x383cf8),_0x13e5ab=this['_createSaveRevisionButton'](ot);_0x13e5ab['delegate']('execute')['to'](_0x383cf8),_0x2a1583['children']['add'](_0x13e5ab),_0x3b1989['items']['add'](_0x2a1583);const _0x20177a=new rt(_0x2d620e,_0x383cf8),_0x2c03fe=this['_createOpenRevisionButton'](ot);return _0x2c03fe['delegate']('execute')['to'](_0x383cf8),_0x20177a['children']['add'](_0x2c03fe),_0x3b1989['items']['add'](_0x20177a),_0x383cf8['panelView']['children']['add'](_0x3b1989),_0x383cf8;}_createSaveRevisionButton(_0x57404b){const _0x20db28=this['editor'],_0x5f5a0b=_0x20db28['plugins']['get']('RevisionTracker'),_0x24f531=new _0x57404b(_0x20db28['locale']);return _0x24f531['set']({'label':At(_0x20db28['locale'],'Save\x20current\x20revision')}),_0x24f531['bind']('isEnabled')['to'](_0x5f5a0b,'isReady',_0x5f5a0b,'isEnabled',_0x20db28,'isReadOnly',(_0x2ab459,_0x19ab4d,_0xaed986)=>_0x2ab459&&_0x19ab4d&&!_0xaed986),this['listenTo'](_0x24f531,'execute',()=>{this['_showDialog']();}),_0x24f531;}_createOpenRevisionButton(_0x2f19ea){const _0x2ea7da=this['editor'],_0x40a0c1=_0x2ea7da['plugins']['get']('RevisionTracker'),_0x43425a=new _0x2f19ea(_0x2ea7da['locale']);return _0x43425a['set']({'label':At(_0x2ea7da['locale'],'Open\x20revision\x20history')}),_0x43425a['bind']('isEnabled')['to'](_0x40a0c1,'isReady',_0x2ea7da,'isReadOnly',(_0x691891,_0x1f9a2b)=>_0x691891&&!_0x1f9a2b),this['listenTo'](_0x43425a,'execute',()=>{_0x2ea7da['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x43425a;}['_showDialog'](){const _0x5b32a5=this['editor'],_0x40d96f=_0x5b32a5['locale'],_0x35dd19=_0x5b32a5['plugins']['get']('Dialog'),_0x7d59eb=_0x5b32a5['plugins']['get']('RevisionTracker');function _0x1e7a7d(_0x416ad8){_0x5b32a5['config']['get']('revisionHistory.requireRevisionName')&&''===_0x416ad8['revisionName']?_0x416ad8['revisionNameInputView']['errorText']=At(_0x40d96f,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x5b32a5['plugins']['get'](Et)['saveRevision']({'name':_0x416ad8['revisionName']}),_0x35dd19['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1e7a7d(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x35dd19['show']({'id':'revisionSave','title':At(_0x40d96f,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':At(_0x5b32a5['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x35dd19['hide']()},{'label':At(_0x5b32a5['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3856c6){_0x3856c6['bind']('isEnabled')['to'](_0x7d59eb,'isReady',_0x7d59eb,'isEnabled',_0x5b32a5,'isReadOnly',(_0x1a44e0,_0x26d34d,_0x38ad63)=>_0x1a44e0&&_0x26d34d&&!_0x38ad63);},'onExecute':()=>_0x1e7a7d(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x40cff4=this['editor'],_0x53694d=_0x40cff4['locale'];this['_saveRevisionFormView']=new Vt(_0x53694d,_0x40cff4['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Tt=class extends ft{['changeId'];['_model'];constructor(_0x2b06a6,_0x197001,_0x1eef6b=!0x1){super(_0x2b06a6),this['_model']=_0x197001,this['changeId']=_0x197001['id'];const _0x203bd2=this['bindTemplate'],_0x2d786d=_0x1eef6b&&!!_0x197001['data']['aiSource'],_0x3fbbc7=_0x2d786d?this['_createAiIconView'](_0x2b06a6):null;this['set']('type',_0x197001['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x203bd2['to']('type',_0x1bc30b=>'ck-revision-change__'+_0x1bc30b),..._0x2d786d?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x2d786d?[this['_createAiDescriptionView'](_0x2b06a6,_0x197001),_0x3fbbc7]:this['_getDescriptionChildren'](_0x2b06a6,_0x197001)}]});}_getDescriptionChildren(_0x11eb75,_0x1e9195){let _0x4375e8='Removed\x20by';return _0x1e9195['data']['isSuggestion']?_0x4375e8='Suggested\x20by':'add'==_0x1e9195['type']&&(_0x4375e8='Added\x20by'),[this['_createLabel'](At(_0x11eb75,_0x4375e8)),{'text':'\x20'+_0x1e9195['author']['name']}];}_createAiDescriptionView(_0x5e3a83,_0x4e2360){let _0x3a850b='AI_SOURCE_REMOVED_BY';_0x4e2360['data']['isSuggestion']?_0x3a850b='AI_SOURCE_SUGGESTED_BY':'add'==_0x4e2360['type']&&(_0x3a850b='AI_SOURCE_ADDED_BY');const _0xc88710=new ft(_0x5e3a83);return _0xc88710['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0xc88710['render'](),_0xc88710['element']['innerHTML']=_0xdcb980(At(_0x5e3a83,_0x3a850b,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+At(_0x5e3a83,'AI_SOURCE_AI')+'</span>'])),_0xc88710['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x4e2360['author']['name'],_0xc88710;}_createLabel(_0x355e3a){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x355e3a}]};}_createAiIconView(_0x47ab88){const _0x5cfd02=new tt();return _0x5cfd02['content']=_0x34331d,_0x5cfd02['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':At(_0x47ab88,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x5cfd02;}['focus'](){this['element']['focus']();}};const Mt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x332a00();var Ht=class extends Mt{['id'];author;type;data;rootName;constructor(_0x3356c9){super(),this['id']=_0x3356c9['id']||_0x3a7148(),this['author']=_0x3356c9['author'],this['type']=_0x3356c9['type'],this['data']=_0x3356c9['data']||{},this['rootName']=_0x3356c9['rootName'],this['set']('createdAt',_0x3356c9['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Pt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x36443d,_0x58330f){this['newRevisionId']=_0x36443d,this['oldRevisionId']=_0x58330f,this['changes']=new _0x31f909();}_setChanges(_0x5046b2){for(const _0x8f94d8 of _0x5046b2)this['changes']['add'](_0x8f94d8);}},Ut=class extends _0x3fc6d1{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[_0x3b484f,_0x5340b4,Rt,kt];}constructor(_0x1d4a65){super(_0x1d4a65),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',(_0x2ab125,_0x41904f,_0x52bd93)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2d7b44=>{for(const _0x370f71 of this['editor']['editing']['view']['document']['roots'])_0x52bd93?_0x2d7b44['removeClass']('ck-editor__editable__overlay',_0x370f71):_0x2d7b44['addClass']('ck-editor__editable__overlay',_0x370f71);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5dcf6f=>null!==_0x5dcf6f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x22737a,_0x36b9a4,_0x23265d)=>_0x22737a&&_0x23265d?_0x36b9a4['changes']['getIndex'](_0x23265d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x774530,_0x267f91)=>_0x774530?_0x267f91['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x5340b4),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x34517e=this['editor'],_0x4dbc4d=new $t(_0x34517e,{'direction':'backward'}),_0x1a2f4b=new $t(_0x34517e,{'direction':'forward'});_0x34517e['commands']['add']('showPreviousChange',_0x4dbc4d),_0x34517e['commands']['add']('showNextChange',_0x1a2f4b),_0x34517e['commands']['add']('restoreRevision',new Ft(_0x34517e)),this['on']('change:numberOfChanges',()=>{_0x4dbc4d['refresh'](),_0x1a2f4b['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x34517e['enableReadOnlyMode']('revision-viewer'),_0x34517e['plugins']['has']('WidgetToolbarRepository')&&_0x34517e['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x390abe){return await this['_utils']['loadRevisionData'](_0x390abe,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x390abe);}async getRevisionRootsAttributes(_0x129111){return await this['_utils']['loadRevisionData'](_0x129111,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x129111);}async['compare'](_0x541616,_0x2c4e0d,_0xa6968b=!0x1){if(!this['isEnabled'])return;const _0x9590ea=this['diff'],_0x33a225=this['repository'],_0x39d19f='string'==typeof _0x541616?_0x33a225['getRevision'](_0x541616):_0x541616,_0x2f3549='string'==typeof _0x2c4e0d?_0x33a225['getRevision'](_0x2c4e0d):_0x2c4e0d,_0x1f7562=_0x39d19f['id'],_0x313e23=_0x2f3549?_0x2f3549['id']:null;if(!_0xa6968b&&this['diff']&&this['diff']['newRevisionId']===_0x1f7562&&this['diff']['oldRevisionId']===_0x313e23)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Pt(_0x1f7562,_0x313e23);const _0x3199bd=this['_getRevisionsRange'](_0x39d19f,_0x2f3549,!0x0)['map'](_0x3591aa=>this['_utils']['loadRevisionData'](_0x3591aa,this['adapter']));return _0x3199bd['push'](new Promise(_0x1b856c=>{setTimeout(_0x1b856c,0x14);})),Promise['all'](_0x3199bd)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x5c966a=this['_getDiff'](_0x1f7562,_0x313e23);this['_cleanUpCommentMarkers'](_0x5c966a);for(const _0x9e1cee of _0x5c966a['changes'])this['_changeIdToChange']['set'](_0x9e1cee['id'],_0x9e1cee);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2e4afd=>{for(const _0x2d0333 of this['editor']['model']['document']['getRootNames']())_0x2e4afd['detachRoot'](_0x2d0333);for(const _0x558dee of Object['keys'](_0x5c966a['model'])){const _0x22c87c=_0x5c966a['model'][_0x558dee]['name'],_0xd9881e=_0x2e4afd['addRoot'](_0x558dee,_0x22c87c);for(const _0x432e81 of Object['keys'](_0x5c966a['attributes'][_0x558dee]))_0x2e4afd['setAttribute'](_0x432e81,_0x5c966a['attributes'][_0x558dee][_0x432e81],_0xd9881e);_0x2e4afd['insert'](_0x5c966a['model'][_0x558dee],_0xd9881e,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x5c966a['changes'])),this['isReady']=!0x0;})['catch'](_0x276117=>{console['error'](_0x276117),this['_cleanUp'](),_0x9590ea&&(this['diff']=_0x9590ea),this['isReady']=!0x0;});}addRevisionData(_0x38a904,_0x26a887){const _0x2a0477=this['repository']['createRevision'](_0x38a904);return _0x2a0477['on']('_update',(_0x5597a0,_0x302e10,_0xe81ccf)=>_0x26a887(_0x302e10,_0xe81ccf,_0x2a0477)),this['repository']['addRevision'](_0x2a0477),_0x2a0477;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x58d855=>{for(const _0x5143c8 of this['editor']['model']['document']['getRootNames']())_0x58d855['detachRoot'](_0x5143c8);});}_cleanUpCommentMarkers(_0x3298e2){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x26b1ea=this['_getVisibleCommentThreadIds']();for(const _0x2c379c of Object['values'](_0x3298e2['model']))for(const _0x349164 of Array['from'](_0x2c379c['markers']['keys']()))_0x349164['startsWith']('revision-comment:')&&!_0x26b1ea['has'](Lt(_0x349164))&&_0x2c379c['markers']['delete'](_0x349164);}_sortAndFilterDiffChanges(_0x413a85){const _0x5746f7=[],_0x38401c=new Map();for(const _0xccfe21 of this['editor']['model']['document']['getRootNames']()){const _0x4b8022=this['editor']['editing']['view']['getDomRoot'](_0xccfe21);if(!_0x4b8022)continue;const _0x169065=_0x4b8022['getClientRects']()['item'](0x0);_0x169065&&(_0x5746f7['push'](_0xccfe21),_0x38401c['set'](_0xccfe21,_0x169065));}return _0x5746f7['sort']((_0x26f6cc,_0x3973ab)=>{const _0x4fd6e0=_0x38401c['get'](_0x26f6cc),_0x25711f=_0x38401c['get'](_0x3973ab);return _0x4fd6e0['y']-_0x25711f['y']||_0x4fd6e0['x']-_0x25711f['x'];}),(_0x413a85=_0x413a85['filter'](_0x1c24ac=>_0x5746f7['includes'](_0x1c24ac['rootName'])))['sort']((_0x154738,_0x1d18f6)=>_0x5746f7['indexOf'](_0x154738['rootName'])-_0x5746f7['indexOf'](_0x1d18f6['rootName'])),_0x413a85;}['_makeTape'](_0x49b5ae,_0x5da802={}){const _0x326a74=Array['from'](_0x49b5ae['markers'])['filter'](([_0x2863f1,_0x18fdb5])=>_0x2863f1['startsWith']('revision:')&&!_0x18fdb5['isCollapsed']),_0x4ac13b=Array['from'](this['editor']['model']['createRangeIn'](_0x49b5ae)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x326a74['length'])for(const _0x231d4e of _0x4ac13b){const [_0x459ac8,_0x10728a]=_0x326a74[0x0],[,_0x30ccd6,_0x391142]=_0x459ac8['split'](':'),_0x3090b5=_0x5da802[_0x459ac8]||null;if(_0x10728a['end']['isEqual'](_0x231d4e['nextPosition'])&&_0x326a74['shift'](),(_0x231d4e['previousPosition']['isEqual'](_0x10728a['start'])||_0x231d4e['previousPosition']['isAfter'](_0x10728a['start']))&&('insertion'==_0x30ccd6?_0x231d4e['isAdded']={'userId':_0x391142,'aiSource':_0x3090b5}:'deletion'==_0x30ccd6&&(_0x231d4e['isRemoved']={'userId':_0x391142,'aiSource':_0x3090b5})),0x0==_0x326a74['length'])break;}return _0x4ac13b;}_refreshStartEndIndex(_0x192d69){const _0x2b5958=new Map();for(let _0x59286e=0x0;_0x59286e<_0x192d69['length'];_0x59286e++)'text'===_0x192d69[_0x59286e]['type']?(_0x192d69[_0x59286e]['item']['startIndex']=_0x59286e,_0x192d69[_0x59286e]['item']['endIndex']=_0x59286e):('elementStart'===_0x192d69[_0x59286e]['type']?_0x192d69[_0x59286e]['item']['startIndex']=_0x59286e:'elementEnd'===_0x192d69[_0x59286e]['type']&&(_0x192d69[_0x59286e]['item']['endIndex']=_0x59286e),_0x2b5958['set'](_0x192d69[_0x59286e]['id'],_0x59286e));for(const _0x4aea98 of _0x2b5958['values']())'elementStart'===_0x192d69[_0x4aea98]['type']?_0x192d69[_0x4aea98]['item']['endIndex']=_0x2b5958['get'](_0x192d69[_0x4aea98]['pairId']):'elementEnd'===_0x192d69[_0x4aea98]['type']&&(_0x192d69[_0x4aea98]['item']['startIndex']=_0x2b5958['get'](_0x192d69[_0x4aea98]['pairId']));}['_processTape'](_0x8e91f2){for(let _0x4f6fbc=0x0;_0x4f6fbc<_0x8e91f2['length'];_0x4f6fbc++){if('elementStart'===_0x8e91f2[_0x4f6fbc]['type'])_0x8e91f2[_0x4f6fbc]['item']['startIndex']=_0x4f6fbc;else{if('elementEnd'===_0x8e91f2[_0x4f6fbc]['type']){_0x8e91f2[_0x4f6fbc]['item']['endIndex']=_0x4f6fbc;const _0x1cfaa6=_0x8e91f2[_0x4f6fbc]['item']['startIndex'];_0x8e91f2[_0x1cfaa6]['pairId']=_0x8e91f2[_0x4f6fbc]['id'],_0x8e91f2[_0x4f6fbc]['pairId']=_0x8e91f2[_0x1cfaa6]['id'];}else _0x8e91f2[_0x4f6fbc]['item']['startIndex']=_0x4f6fbc,_0x8e91f2[_0x4f6fbc]['item']['endIndex']=_0x4f6fbc,_0x8e91f2[_0x4f6fbc]['pairId']=null;}_0x8e91f2[_0x4f6fbc]['markersStart']||(_0x8e91f2[_0x4f6fbc]['markersStart']=[],_0x8e91f2[_0x4f6fbc]['markersEnd']=[]);}}_markInsertions(_0x11533c,_0xad6f90){const _0x3afbe5=_0x11533c['filter'](_0x543ad9=>!_0x543ad9['isAdded']);for(let _0x47bc73=0x0;_0x47bc73<_0xad6f90['length'];_0x47bc73++)_0xad6f90[_0x47bc73]['isAdded']&&(_0x3afbe5[_0x47bc73]['isAdded']=_0xad6f90[_0x47bc73]['isAdded']);}_getDiff(_0x5b3d2e,_0xe9049f=null){const _0xb6f36b=this['repository']['getRevision'](_0x5b3d2e),_0x89270e=_0xe9049f?this['repository']['getRevision'](_0xe9049f):null,_0x20b561=this['_getRevisionsRange'](_0xb6f36b,_0x89270e),_0x52b64=_0x20b561[_0x20b561['length']-0x1],_0x395cec=new Map(),_0x3a0ec4={'model':{},'attributes':{},'changes':[]},_0x5efb65=new Set(),_0xc9938b=new Map();for(let _0x2817e4=_0x20b561['length']-0x1;_0x2817e4>=0x0;_0x2817e4--){const _0x29f7b1=_0x20b561[_0x2817e4];for(const _0x13ab4b of Object['keys'](_0x29f7b1['diffData']))if(_0x29f7b1['diffData'][_0x13ab4b]['attachChange']){const _0x2c1456=_0x29f7b1['diffData'][_0x13ab4b]['attachChange'];_0x2c1456['isAttached']?(_0x5efb65['add'](_0x13ab4b),_0xc9938b['has'](_0x13ab4b)&&_0xc9938b['get'](_0x13ab4b)['userId']==_0x2c1456['userId']?_0xc9938b['delete'](_0x13ab4b):_0xc9938b['set'](_0x13ab4b,_0x2c1456)):_0xc9938b['has'](_0x13ab4b)?(_0x5efb65['delete'](_0x13ab4b),_0xc9938b['delete'](_0x13ab4b)):(_0x5efb65['add'](_0x13ab4b),_0xc9938b['set'](_0x13ab4b,_0x2c1456));}else _0x5efb65['add'](_0x13ab4b);}for(const _0x3d6583 of _0x5efb65){const _0x5600e6=_0xc9938b['has'](_0x3d6583)&&!_0xc9938b['get'](_0x3d6583)['isAttached'];let _0x42a731=_0x5600e6?_0x20b561['length']-0x1:0x0;const _0xded058=_0x5600e6?-0x1:0x1;for(;_0x20b561[_0x42a731];){const _0x1f7637=_0x20b561[_0x42a731];if(_0x1f7637['diffData'][_0x3d6583]){const _0xa75539=_0x5600e6?_0x1f7637['diffData'][_0x3d6583]['attributesBefore']:_0x1f7637['diffData'][_0x3d6583]['attributesAfter'];_0x3a0ec4['attributes'][_0x3d6583]=_0xa75539?_0x40925b(_0xa75539):{};break;}_0x42a731+=_0xded058;}}for(const _0xe7fb6b of _0x20b561){_0xe7fb6b['model']={};for(const _0x351baf of _0xe7fb6b['authors'])_0x395cec['set'](_0x351baf['id'],_0x351baf);for(const _0x413c5d of _0x5efb65){const _0x26b9a8=_0xe7fb6b['diffData'][_0x413c5d]?_0xe7fb6b['diffData'][_0x413c5d]['insertions']:'[]',_0x33062c=_0xe7fb6b['diffData'][_0x413c5d]?_0xe7fb6b['diffData'][_0x413c5d]['deletions']:'[]',_0x4e80b7=_0xe7fb6b['diffData'][_0x413c5d]?.['rootElementName']||'$root';_0xe7fb6b['model'][_0x413c5d]={'insertions':this['_utils']['_makeModelFromViewString'](_0x26b9a8,_0x4e80b7),'deletions':this['_utils']['_makeModelFromViewString'](_0x33062c,_0x4e80b7)};}}for(const _0x45f76a of _0x5efb65){let _0x436a33=null,_0x53b85a=0x0;const _0x1e340a=_0x20b561['map'](_0x2718cf=>_0x2718cf['diffData'][_0x45f76a]?.['rootElementName'])['find'](_0xf52708=>void 0x0!==_0xf52708)||'$root',_0x13ef82=new Map(Array['from'](_0xb6f36b['model'][_0x45f76a]['insertions']['markers'])['filter'](([_0x130429])=>!_0x130429['startsWith']('revision:')));let _0x2d66a9=0x0;for(const _0x1bde7b of _0x20b561){const _0x231cd2=_0x1bde7b['diffData'][_0x45f76a]?.['aiSources']||{},_0x135d68=this['_makeTape'](_0x1bde7b['model'][_0x45f76a]['insertions'],_0x231cd2);_0x1bde7b==_0xb6f36b?(_0x436a33=_0x135d68,_0x53b85a=_0x436a33['length'],_0x436a33['forEach'](_0x77ed0e=>{_0x77ed0e['id']=_0x2d66a9++;}),this['_processTape'](_0x436a33)):this['_markInsertions'](_0x436a33,_0x135d68);const _0x52f45c=_0x436a33['filter'](_0x24cd18=>!_0x24cd18['isAdded'])['map'](_0x1347b6=>_0x1347b6['id']);let _0x55c1c4=0x0;const _0x542c4c=this['_makeTape'](_0x1bde7b['model'][_0x45f76a]['deletions'],_0x231cd2);_0x542c4c['forEach'](_0x545082=>{_0x545082['isRemoved']?_0x545082['id']=_0x53b85a++:_0x545082['id']=_0x52f45c[_0x55c1c4++];}),this['_processTape'](_0x542c4c),this['_setDistance'](_0x436a33,'isAdded'),this['_setDistance'](_0x542c4c,'isRemoved'),_0x1bde7b==_0xb6f36b&&this['_markMarkers'](_0x436a33,_0x13ef82),_0x436a33=this['_joinTapes'](_0x436a33,_0x542c4c),this['_refreshStartEndIndex'](_0x436a33),this['_setDistance'](_0x436a33,'isRemoved');}_0x436a33=_0x436a33['filter'](_0x1a6e9c=>!(_0x1a6e9c['isAdded']&&_0x1a6e9c['isRemoved']));const _0x4ecac4=new Map(_0x52b64['model'][_0x45f76a]['deletions']['markers']),_0x205b8d=new Set(_0x13ef82['keys']());for(const _0x6b14c0 of _0x4ecac4['keys']())_0x205b8d['delete'](_0x6b14c0);const _0x42008b=Object['assign']({},..._0x20b561['map'](_0x429bdb=>_0x429bdb['diffData'][_0x45f76a]?.['aiSources']));this['_markSuggestions'](_0x436a33,_0x205b8d,_0x42008b),this['_fixObsoleteTags'](_0x436a33),_0x436a33=this['_removeMissingPairs'](_0x436a33),_0x436a33=this['_markMismatchedRemovedTags'](_0x436a33),_0x436a33=this['_removeUnsupportedChanges'](_0x436a33);const {root:_0x2577ec,changes:_0x4c968c}=this['_makeModelFromTape'](_0x436a33,_0x395cec,_0x45f76a,_0x1e340a);_0x3a0ec4['model'][_0x45f76a]=_0x2577ec;const _0x1f71f4=_0xc9938b['get'](_0x45f76a);if(_0x1f71f4){const _0x5890e2=_0x395cec['get'](_0x1f71f4['userId']),_0x2ecb3c=new Ht({'author':_0x5890e2,'type':_0x1f71f4['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x45f76a});_0x4c968c['unshift'](_0x2ecb3c),_0x3a0ec4['attributes'][_0x45f76a]['revisionHistoryAttachChange']=_0x2ecb3c['id'];}_0x3a0ec4['changes']=_0x3a0ec4['changes']['concat'](_0x4c968c);}return _0x3a0ec4;}['_markMarkers'](_0x13a3c1,_0x3ab20e){for(let _0xc643cf=0x0;_0xc643cf<_0x13a3c1['length'];_0xc643cf++)for(const [_0x52e58d,_0x55cb82]of _0x3ab20e)!_0x55cb82['isCollapsed']&&_0x55cb82['start']['isEqual'](_0x13a3c1[_0xc643cf]['previousPosition'])&&_0x13a3c1[_0xc643cf]['markersStart']['push'](_0x52e58d),_0x55cb82['end']['isEqual'](_0x13a3c1[_0xc643cf]['nextPosition'])&&_0x13a3c1[_0xc643cf]['markersEnd']['push'](_0x52e58d);}['_joinTapes'](_0x8d8821,_0x2cb54f){let _0x59da52=[],_0x5368ac=0x0,_0x5846d9=0x0;for(;_0x5368ac<_0x8d8821['length']||_0x5846d9<_0x2cb54f['length'];){const _0x2ac8bf=_0x8d8821[_0x5368ac]||{},_0x100281=_0x2cb54f[_0x5846d9]||{};if(_0x2ac8bf['id']==_0x100281['id'])_0x5368ac++,_0x5846d9++,_0x59da52['push'](_0x2ac8bf);else{if(_0x100281['isRemoved']&&_0x2ac8bf['isAdded']){const {commonTape:_0x2770be,iEnd:_0xceb9e0,jEnd:_0x619782}=this['_threeWayMerge'](_0x8d8821,_0x5368ac,_0x2cb54f,_0x5846d9);_0x59da52=_0x59da52['concat'](_0x2770be),_0x5368ac=_0xceb9e0,_0x5846d9=_0x619782;}else _0x100281['isRemoved']?(_0x5846d9++,_0x59da52['push'](_0x100281)):(_0x5368ac++,_0x59da52['push'](_0x2ac8bf));}}return _0x59da52;}_markSuggestions(_0x5397cb,_0x4d3918,_0x45c2af){const _0x5a9460=[];for(let _0x2314a5=0x0;_0x2314a5<_0x5397cb['length'];_0x2314a5++){for(let _0x2f5ecd=0x0;_0x2f5ecd<_0x5397cb[_0x2314a5]['markersStart']['length'];_0x2f5ecd++){const _0xc93d9=_0x5397cb[_0x2314a5]['markersStart'][_0x2f5ecd];if(!_0x4d3918['has'](_0xc93d9))continue;const {group:_0x390fd5,type:_0x3d223e,authorId:_0x41d056}=_0xd83962(_0xc93d9);if('revision-suggestion'!=_0x390fd5||'insertion'!=_0x3d223e&&'deletion'!=_0x3d223e)continue;const _0x5d4377=_0x45c2af['suggestion:'+_0xc93d9['slice'](0x14)]||null;_0x5a9460['unshift']({'type':_0x3d223e,'name':_0xc93d9,'userId':_0x41d056,'aiSource':_0x5d4377}),_0x5397cb[_0x2314a5]['markersStart']['splice'](_0x2f5ecd,0x1),_0x2f5ecd--;}_0x34d36f(_0x5397cb[_0x2314a5]);for(let _0x28d20c=0x0;_0x28d20c<_0x5397cb[_0x2314a5]['markersEnd']['length'];_0x28d20c++){const _0x579647=_0x5397cb[_0x2314a5]['markersEnd'][_0x28d20c];if(!_0x4d3918['has'](_0x579647))continue;const {group:_0x2889a8,type:_0xa4b04c}=_0xd83962(_0x579647);if('revision-suggestion'!=_0x2889a8||'insertion'!=_0xa4b04c&&'deletion'!=_0xa4b04c)continue;_0x5397cb[_0x2314a5]['markersEnd']['splice'](_0x28d20c,0x1),_0x28d20c--;const _0x47e9b3=_0x5a9460['findIndex'](_0x1de08e=>_0x1de08e['name']==_0x579647);_0x47e9b3>-0x1&&_0x5a9460['splice'](_0x47e9b3,0x1);}}function _0xd83962(_0x2d6b59){const _0x477969=_0x2d6b59['split'](':');return{'group':_0x477969[0x0],'type':_0x477969[0x1],'subType':_0x477969['length']>=0x5?_0x477969[0x2]:null,'id':_0x477969['length']<0x5?_0x477969[0x2]:_0x477969[0x3],'authorId':_0x477969['length']<0x5?_0x477969[0x3]:_0x477969[0x4],'markerCount':0x6==_0x477969['length']?_0x477969[0x5]:null};}function _0x34d36f(_0x30ae0d){for(let _0x5405a1=0x0;_0x5405a1<_0x5a9460['length'];_0x5405a1++){if(_0x30ae0d['isAdded']&&'insertion'==_0x5a9460[_0x5405a1]['type']&&_0x30ae0d['isAdded']['userId']==_0x5a9460[_0x5405a1]['userId'])return _0x30ae0d['isAddSuggestion']={..._0x5a9460[_0x5405a1],'aiSource':_0x30ae0d['isAdded']['aiSource']||_0x5a9460[_0x5405a1]['aiSource']},void delete _0x30ae0d['isAdded'];if(!_0x30ae0d['isAdded']&&!_0x30ae0d['isRemoved']&&'deletion'==_0x5a9460[_0x5405a1]['type'])return void(_0x30ae0d['isRemoveSuggestion']=_0x5a9460[_0x5405a1]);}}}_setDistance(_0x4aa447,_0x4eaed7){let _0x55c3e0=0x0,_0xbb4712=!0x1;const _0x5c8daa=new Map();for(const _0x1d3931 of _0x4aa447)_0x1d3931[_0x4eaed7]?_0xbb4712&&(_0x55c3e0++,_0xbb4712=!0x1):(_0x55c3e0++,_0xbb4712=!0x0),_0x5c8daa['set'](_0x1d3931['id'],_0x55c3e0);for(let _0x3df34f=0x0;_0x3df34f<_0x4aa447['length'];_0x3df34f++){if('isRemoved'==_0x4eaed7&&_0x4aa447[_0x3df34f]['isAdded']||'isAdded'==_0x4eaed7&&_0x4aa447[_0x3df34f]['isRemoved'])continue;if('text'==_0x4aa447[_0x3df34f]['type']){_0x4aa447[_0x3df34f]['distance']=0x0;continue;}const _0x1cd0fe=_0x5c8daa['get'](_0x4aa447[_0x3df34f]['pairId']),_0x5c4564=_0x5c8daa['get'](_0x4aa447[_0x3df34f]['id']);_0x4aa447[_0x3df34f]['distance']=_0x1cd0fe-_0x5c4564;}}_getRevisionsRange(_0x161eef,_0x506c09,_0x36fc16=!0x1){const _0x31d1c6=[];let _0x5db261=this['repository']['getIndex'](_0x161eef),_0x34e877=this['repository']['getIndex'](_0x506c09);for(-0x1==_0x34e877&&(_0x34e877=this['repository']['_revisions']['length'],_0x36fc16=!0x1);_0x5db261<_0x34e877;)_0x31d1c6['push'](this['repository']['getRevision'](_0x5db261)),_0x5db261++;return _0x36fc16&&_0x31d1c6['push'](this['repository']['getRevision'](_0x5db261)),_0x31d1c6;}_threeWayMerge(_0x34f6d9,_0x3ec939,_0x1d0218,_0x31b745){const _0x5e934c=this['editor']['model']['schema'];let _0xbaea76=_0x3ec939;for(;_0x34f6d9[_0xbaea76]&&_0x34f6d9[_0xbaea76]['isAdded'];)_0xbaea76++;let _0x53654b=_0x31b745;for(;_0x1d0218[_0x53654b]&&_0x1d0218[_0x53654b]['isRemoved'];)_0x53654b++;_0x76f087(_0x34f6d9,_0x3ec939,_0xbaea76),_0x76f087(_0x1d0218,_0x31b745,_0x53654b);const _0x99ba65=_0x1d0218['slice'](_0x31b745,_0x53654b)['concat'](_0x34f6d9['slice'](_0x3ec939,_0xbaea76));return _0x99ba65['sort']((_0x42cb8c,_0x593846)=>_0x42cb8c['side']!=_0x593846['side']?_0x42cb8c['side']-_0x593846['side']:_0x42cb8c['level']!=_0x593846['level']?_0x42cb8c['level']-_0x593846['level']:_0x42cb8c['distance']!=_0x593846['distance']?_0x593846['distance']-_0x42cb8c['distance']:!!_0x42cb8c['isAdded']!=!!_0x593846['isAdded']?-0x1==_0x42cb8c['side']||0x0==_0x42cb8c['side']?_0x42cb8c['isAdded']?-0x1:0x1:_0x42cb8c['isAdded']?0x1:-0x1:_0x42cb8c['index']-_0x593846['index']),{'commonTape':_0x99ba65,'iEnd':_0xbaea76,'jEnd':_0x53654b};function _0x76f087(_0xf13f2d,_0x57aab1,_0x466267){let _0xcace0a=-0x1,_0x46f6b1=Number['POSITIVE_INFINITY'],_0xc206f7=!0x0;for(let _0x331559=_0x57aab1;_0x331559<_0x466267;_0x331559++)if(_0x5e934c['isInline'](_0xf13f2d[_0x331559]['item'])||(_0xc206f7=!0x1),_0xf13f2d[_0x331559]['item']['startIndex']<_0x57aab1&&(_0xcace0a=_0x331559),_0xf13f2d[_0x331559]['item']['endIndex']>=_0x466267){_0x46f6b1=_0x331559;break;}_0xc206f7&&(_0xcace0a=_0x466267-0x1);for(let _0x3b0a63=_0x57aab1;_0x3b0a63<_0x466267;_0x3b0a63++)_0xf13f2d[_0x3b0a63]['side']=_0x3b0a63<=_0xcace0a?-0x1:_0x3b0a63<_0x46f6b1?0x0:0x1,_0xf13f2d[_0x3b0a63]['index']=_0x3b0a63;let _0xb9ad0e=0x0;for(let _0x15c404=_0x57aab1;_0x15c404<=_0xcace0a;_0x15c404++)0x0==_0xf13f2d[_0x15c404]['distance']?_0xf13f2d[_0x15c404]['level']=_0xb9ad0e:(_0xb9ad0e++,_0xf13f2d[_0x15c404]['level']=_0xb9ad0e,_0xb9ad0e++);for(let _0x4f5637=_0x57aab1;_0x4f5637<_0x466267;_0x4f5637++)0x0==_0xf13f2d[_0x4f5637]['side']&&(_0xf13f2d[_0x4f5637]['level']=_0xb9ad0e);_0xb9ad0e=0x0;for(let _0x1c6f32=_0x466267-0x1;_0x1c6f32>=_0x46f6b1;_0x1c6f32--)0x0==_0xf13f2d[_0x1c6f32]['distance']?_0xf13f2d[_0x1c6f32]['level']=_0xb9ad0e:(_0xb9ad0e--,_0xf13f2d[_0x1c6f32]['level']=_0xb9ad0e,_0xb9ad0e--);}}_fixObsoleteTags(_0x579672){const _0x1998ef=new Map(),_0x1916e5=this['editor']['model']['schema'];for(let _0x2ff9fd=0x1;_0x2ff9fd<_0x579672['length'];_0x2ff9fd++){let _0x4ed409,_0x2649a2,_0x3a31eb;const _0x30d05d=_0x579672[_0x2ff9fd],_0x4bd425=_0x579672[_0x2ff9fd-0x1];if('text'==_0x30d05d['type'])continue;if(_0x30d05d['type']!=_0x4bd425['type'])continue;if(!_0x1916e5['isBlock'](_0x4bd425['item'])||_0x1916e5['isLimit'](_0x4bd425['item']))continue;if(!_0x1916e5['isBlock'](_0x30d05d['item'])||_0x1916e5['isLimit'](_0x30d05d['item']))continue;if((_0x579672[_0x2ff9fd]['isAdded']||_0x579672[_0x2ff9fd]['isAddSuggestion'])&&_0x579672[_0x2ff9fd-0x1]['isRemoved'])_0x4ed409=_0x579672[_0x2ff9fd],_0x2649a2=_0x579672[_0x2ff9fd-0x1],_0x3a31eb=_0x2ff9fd-0x1;else{if(!_0x579672[_0x2ff9fd]['isRemoved']||!_0x579672[_0x2ff9fd-0x1]['isAdded']&&!_0x579672[_0x2ff9fd-0x1]['isAddSuggestion'])continue;_0x4ed409=_0x579672[_0x2ff9fd-0x1],_0x2649a2=_0x579672[_0x2ff9fd],_0x3a31eb=_0x2ff9fd;}const _0x1c0ec9=_0x4ed409['level']==_0x2649a2['level'],_0xba6854=Math['abs'](_0x4ed409['level'])<Math['abs'](_0x2649a2['level'])&&0x0==_0x2649a2['distance'];(_0x1c0ec9||_0xba6854)&&(_0x1998ef['set'](_0x2649a2['id'],_0x4ed409['id']),_0x579672['splice'](_0x3a31eb,0x1),_0x2ff9fd--,_0x4ed409['isAdded']=!0x1);}for(let _0x304d66=0x0;_0x304d66<_0x579672['length'];_0x304d66++)_0x1998ef['has'](_0x579672[_0x304d66]['pairId'])&&(_0x579672[_0x304d66]['pairId']=_0x1998ef['get'](_0x579672[_0x304d66]['pairId']));}['_removeMissingPairs'](_0x496ec5){const _0x5b6c62=new Set(_0x496ec5['map'](_0x5d507d=>_0x5d507d['id']));for(let _0x4b12c7=0x0;_0x4b12c7<_0x496ec5['length'];_0x4b12c7++)_0x5b6c62['has'](_0x496ec5[_0x4b12c7]['pairId'])||0x0==_0x496ec5[_0x4b12c7]['distance']||(_0x496ec5[_0x4b12c7]['isIncorrect']=!0x0);return _0x496ec5['filter'](_0x2c4bb7=>!_0x2c4bb7['isIncorrect']);}_markMismatchedRemovedTags(_0x49ad42){const _0x2d0284=new Set();for(let _0x39d08a=0x0;_0x39d08a<_0x49ad42['length'];_0x39d08a++){if(_0x2d0284['has'](_0x49ad42[_0x39d08a]['id'])&&_0x49ad42[_0x39d08a]['isRemoved']&&(_0x49ad42[_0x39d08a]['isIncorrect']=!0x0),_0x49ad42[_0x39d08a]['isIncorrect'])continue;if(0x0==_0x49ad42[_0x39d08a]['distance'])continue;if('elementStart'!=_0x49ad42[_0x39d08a]['type'])continue;if(null==_0x49ad42[_0x39d08a]['pairId'])continue;let _0xde9479=_0x39d08a+0x1,_0x479913=0x0;for(;_0x49ad42[_0xde9479]['id']!=_0x49ad42[_0x39d08a]['pairId'];)'elementStart'==_0x49ad42[_0xde9479]['type']?_0x479913++:'elementEnd'==_0x49ad42[_0xde9479]['type']&&_0x479913--,_0xde9479++;if(0x0!=_0x479913){if(_0x49ad42[_0x39d08a]['isRemoved'])_0x49ad42[_0x39d08a]['isIncorrect']=!0x0;else{for(;_0xde9479!=_0x39d08a;)_0x49ad42[_0xde9479]['isRemoved']&&0x0!=_0x49ad42[_0xde9479]['distance']&&(_0x49ad42[_0xde9479]['isIncorrect']=!0x0,_0x2d0284['add'](_0x49ad42[_0xde9479]['pairId'])),_0xde9479--;}}}return _0x49ad42['filter'](_0x46b67e=>!_0x46b67e['isIncorrect']);}_removeUnsupportedChanges(_0x146930){const _0x42c93d=this['editor']['model']['schema'];for(let _0x25bfaf=0x0;_0x25bfaf<_0x146930['length'];_0x25bfaf++){if(!(_0x146930[_0x25bfaf]['isAdded']||_0x146930[_0x25bfaf]['isAddSuggestion']||_0x146930[_0x25bfaf]['isRemoved']||_0x146930[_0x25bfaf]['isRemoveSuggestion']))continue;if(0x0==_0x146930[_0x25bfaf]['distance'])continue;const _0x51875d=_0x146930[_0x25bfaf]['item'];_0x42c93d['isBlock'](_0x51875d)||_0x42c93d['isLimit'](_0x51875d)||(_0x146930[_0x25bfaf]['isAdded']&&delete _0x146930[_0x25bfaf]['isAdded'],_0x146930[_0x25bfaf]['isAddSuggestion']&&delete _0x146930[_0x25bfaf]['isAddSuggestion'],_0x146930[_0x25bfaf]['isRemoveSuggestion']&&delete _0x146930[_0x25bfaf]['isRemoveSuggestion'],_0x146930[_0x25bfaf]['isRemoved']&&(_0x146930[_0x25bfaf]['isIncorrect']=!0x0));}return _0x146930['filter'](_0x3600c7=>!_0x3600c7['isIncorrect']);}['_makeModelFromTape'](_0x4ddc3c,_0xb1b67e,_0x255b9e,_0x5bf049){const _0x5b28c7=new _0x4f9233(),_0x30aaf9=[],_0x1fdbe0=new Map(),_0xfdcf4d=this['editor']['model'],_0x58e11f=_0xfdcf4d['schema'],_0x4ceba3=[_0x5b28c7],_0x21c178={},_0xaff000={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x5b28c7['name']=_0x5bf049;let _0x448200=null;const _0x5230ce=[0x0];for(let _0x710591=0x0;_0x710591<_0x4ddc3c['length'];_0x710591++)if('elementStart'===_0x4ddc3c[_0x710591]['type']){_0x4ddc3c[_0x710591]['previousPosition']=_0xfdcf4d['createPositionFromPath'](_0x5b28c7,_0x5230ce);const _0x154326=new _0x3930eb(_0x4ddc3c[_0x710591]['item']['name'],_0x4ddc3c[_0x710591]['item']['getAttributes']());_0x4ceba3[0x0]['_appendChild'](_0x154326),_0x5230ce['push'](0x0),_0x4ceba3['unshift'](_0x154326),_0x4ddc3c[_0x710591]['nextPosition']=_0xfdcf4d['createPositionFromPath'](_0x5b28c7,_0x5230ce);}else'elementEnd'===_0x4ddc3c[_0x710591]['type']?(_0x4ceba3['shift'](),_0x4ddc3c[_0x710591]['previousPosition']=_0xfdcf4d['createPositionFromPath'](_0x5b28c7,_0x5230ce),_0x5230ce['pop'](),_0x5230ce[_0x5230ce['length']-0x1]++,_0x4ddc3c[_0x710591]['nextPosition']=_0xfdcf4d['createPositionFromPath'](_0x5b28c7,_0x5230ce)):(_0x4ddc3c[_0x710591]['previousPosition']=_0xfdcf4d['createPositionFromPath'](_0x5b28c7,_0x5230ce),_0x448200?_0x448200['_data']+=_0x4ddc3c[_0x710591]['item']['data']:_0x448200=new _0x54ac0c(_0x4ddc3c[_0x710591]['item']['data'],_0x4ddc3c[_0x710591]['item']['getAttributes']()),_0x4ddc3c[_0x710591+0x1]&&'text'===_0x4ddc3c[_0x710591+0x1]['type']&&_0xc19553(_0x448200,_0x4ddc3c[_0x710591+0x1]['item'])||(_0x4ceba3[0x0]['_appendChild'](_0x448200),_0x448200=null),_0x5230ce[_0x5230ce['length']-0x1]+=_0x4ddc3c[_0x710591]['item']['offsetSize'],_0x4ddc3c[_0x710591]['nextPosition']=_0xfdcf4d['createPositionFromPath'](_0x5b28c7,_0x5230ce));for(let _0x38d39e=0x0;_0x38d39e<_0x4ddc3c['length'];_0x38d39e++){const _0xe5ab77=_0x4ddc3c[_0x38d39e]['previousPosition'],_0x58bfe4=_0x4ddc3c[_0x38d39e]['nextPosition'];for(const _0x1e8dde of _0x4ddc3c[_0x38d39e]['markersStart'])_0x1fdbe0['set'](_0x1e8dde,{'start':_0xe5ab77,'end':null});_0x5f00e9('isRemoveSuggestion',_0x38d39e,_0xe5ab77,_0x58bfe4),_0x5f00e9('isAddSuggestion',_0x38d39e,_0xe5ab77,_0x58bfe4),_0x5f00e9('isRemoved',_0x38d39e,_0xe5ab77,_0x58bfe4),_0x5f00e9('isAdded',_0x38d39e,_0xe5ab77,_0x58bfe4);for(const _0x3a80f2 of _0x4ddc3c[_0x38d39e]['markersEnd']){const _0xfc00c7=_0x1fdbe0['get'](_0x3a80f2);_0xfc00c7?_0xfc00c7['end']=_0x58bfe4:_0x1fdbe0['set'](_0x3a80f2,{'start':_0x58bfe4,'end':_0x58bfe4});}}for(const [_0x2358c4,_0x3215ba]of _0x1fdbe0){const _0x206483=this['editor']['model']['createRange'](_0x3215ba['start'],_0x3215ba['end']);_0x5b28c7['markers']['set'](_0x2358c4,_0x206483);}return _0x30aaf9['sort']((_0x2ccbc7,_0x185b14)=>{const _0x48149b=_0x5b28c7['markers']['get']('revision:'+_0x2ccbc7['id']),_0x48b509=_0x5b28c7['markers']['get']('revision:'+_0x185b14['id']);return _0x48149b['start']['isBefore'](_0x48b509['start'])?-0x1:_0x48149b['start']['isAfter'](_0x48b509['start'])?0x1:_0x48149b['end']['isBefore'](_0x48b509['end'])?-0x1:_0x48149b['end']['isAfter'](_0x48b509['end'])?0x1:'add'===_0x2ccbc7['type']?-0x1:0x1;}),{'root':_0x5b28c7,'changes':_0x30aaf9};function _0x5f00e9(_0x5dfebe,_0x1795f7,_0x45a8e9,_0x11ee35){const _0x438974=!!_0x4ddc3c[_0x1795f7][_0x5dfebe],_0x50e35d=_0x438974?_0x4ddc3c[_0x1795f7][_0x5dfebe]['userId']:null,_0x570d13=_0x438974&&_0x4ddc3c[_0x1795f7][_0x5dfebe]['aiSource']||null,_0x35f785=_0x1795f7===_0x4ddc3c['length']-0x1,_0x223d86=_0xaff000[_0x5dfebe][0x0],_0x538e34=_0x58e11f['isObject'](_0x4ddc3c[_0x1795f7]['item']);!_0x21c178[_0x5dfebe]&&_0x438974?_0x21c178[_0x5dfebe]={'start':_0x45a8e9,'tapeItem':_0x4ddc3c[_0x1795f7],'userId':_0x50e35d,'aiSource':_0x570d13,'type':_0x5dfebe}:_0x21c178[_0x5dfebe]&&!_0x438974?(_0x21c178[_0x5dfebe]['end']=_0x45a8e9,_0xcadf82(_0x21c178[_0x5dfebe]),_0x21c178[_0x5dfebe]=null):_0x21c178[_0x5dfebe]&&_0x438974&&(_0x21c178[_0x5dfebe]['userId']!==_0x50e35d||_0x21c178[_0x5dfebe]['aiSource']!==_0x570d13)&&(_0x21c178[_0x5dfebe]['end']=_0x45a8e9,_0x223d86&&_0x223d86['userId']===_0x21c178[_0x5dfebe]['userId']?_0x223d86['change']['aiSource']=_0x223d86['change']['aiSource']||_0x21c178[_0x5dfebe]['aiSource']:_0xcadf82(_0x21c178[_0x5dfebe]),_0x21c178[_0x5dfebe]={'start':_0x45a8e9,'tapeItem':_0x4ddc3c[_0x1795f7],'userId':_0x50e35d,'aiSource':_0x570d13,'type':_0x5dfebe}),_0x21c178[_0x5dfebe]&&_0x538e34&&('elementStart'!==_0x4ddc3c[_0x1795f7]['type']||_0x223d86&&_0x223d86['userId']===_0x50e35d||_0xaff000[_0x5dfebe]['unshift']({'userId':_0x50e35d,'object':_0x4ddc3c[_0x1795f7]['item'],'change':_0x21c178[_0x5dfebe]}),'elementEnd'===_0x4ddc3c[_0x1795f7]['type']&&_0x223d86&&_0x223d86['object']===_0x4ddc3c[_0x1795f7]['item']&&(_0xaff000[_0x5dfebe]['shift'](),_0x21c178[_0x5dfebe]=_0x223d86['change'])),_0x21c178[_0x5dfebe]&&_0x35f785&&(_0x21c178[_0x5dfebe]['end']=_0x11ee35,_0xcadf82(_0x21c178[_0x5dfebe]),_0x21c178[_0x5dfebe]=null);}function _0xcadf82({start:_0x5657ce,end:_0x510df8,tapeItem:_0x294ee2,userId:_0x16d174,aiSource:_0x1bc771,type:_0xd8d055}){const _0x105571=_0x294ee2['item'],_0x551823=_0xfdcf4d['schema']['isBlock'](_0x105571)&&!_0xfdcf4d['schema']['isLimit'](_0x105571),_0x1e6f29=_0x5657ce['nodeAfter']==_0x510df8['parent']&&_0x510df8['isAtStart'];if(_0x551823&&_0x1e6f29)return;const _0x6e74c0=_0xfdcf4d['createRange'](_0x5657ce,_0x510df8),_0x767c00=_0xb1b67e['get'](_0x16d174),_0xd8ce21=new Ht({'author':_0x767c00,'type':'isAdded'==_0xd8d055||'isAddSuggestion'==_0xd8d055?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0xd8d055||'isRemoveSuggestion'==_0xd8d055,'aiSource':_0x1bc771||null},'createdAt':new Date(),'rootName':_0x255b9e});_0x30aaf9['push'](_0xd8ce21),_0x5b28c7['markers']['set']('revision:'+_0xd8ce21['id'],_0x6e74c0);}function _0xc19553(_0x23dbf0,_0x4f909f){const _0x5cc461=_0x23dbf0['getAttributes'](),_0x109c7f=_0x4f909f['getAttributes']();for(const _0x587bc9 of _0x5cc461){if(_0x587bc9[0x1]!==_0x4f909f['getAttribute'](_0x587bc9[0x0]))return!0x1;_0x109c7f['next']();}return _0x109c7f['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x8289b8=>{const _0x58b958=_0x8289b8['markerName']['split'](':')[0x1],_0x36c128=this['_getChangeFromId'](_0x58b958);if(!_0x36c128)return null;const _0x478db0='add'==_0x36c128['type']?'insertion':'deletion',_0x267e0e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x478db0];return _0x36c128['data']['isSuggestion']&&_0x267e0e['push']('ck-suggestion-marker-'+_0x478db0+'-new'),this['activeChange']==_0x36c128&&_0x267e0e['push']('ck-suggestion-marker--active'),{'classes':_0x267e0e,'attributes':{'data-change-id':_0x58b958}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x48e9c9=>{_0x48e9c9['on']('element:pre',(_0x3308c6,_0x22c408,_0x4c2ebc)=>{const _0x1e6ed9=_0x22c408['viewItem']['getChild'](0x0);if(!_0x1e6ed9||!_0x1e6ed9['is']('element','code'))return;if(!_0x4c2ebc['consumable']['consume'](_0x1e6ed9,{'attributes':['vid_start','vid_end']}))return;const _0x2b2f8a=_0x22c408['modelRange']['start']['nodeAfter'];_0x4c2ebc['writer']['setAttribute']('vid_start',_0x1e6ed9['getAttribute']('vid_start'),_0x2b2f8a),_0x4c2ebc['writer']['setAttribute']('vid_end',_0x1e6ed9['getAttribute']('vid_end'),_0x2b2f8a);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1994de=>{_0x1994de['on']('element',(_0x13d89f,_0x100316,_0x36450a)=>{if(!_0x36450a['consumable']['consume'](_0x100316['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x100316['modelRange']['isCollapsed'])return;const _0x24a4d2=_0x100316['modelRange']['start']['nodeAfter'];_0x24a4d2['hasAttribute']('vid_start')||_0x24a4d2['hasAttribute']('vid')||(_0x36450a['writer']['setAttribute']('vid_start',_0x100316['viewItem']['getAttribute']('vid_start'),_0x24a4d2),_0x36450a['writer']['setAttribute']('vid_end',_0x100316['viewItem']['getAttribute']('vid_end'),_0x24a4d2));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x63e432=>_0x63e432['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4c9af4,[,_0x5d28c7])=>{['vid_start','vid_end','vid']['includes'](_0x5d28c7)&&(_0x4c9af4['return']=!0x0,_0x4c9af4['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1e4171=>{_0x1e4171['on']('attribute:vid',(_0xb94941,_0x2d7b4d,_0x25c3be)=>{if('\x20'!=_0x2d7b4d['item']['data']||_0x2d7b4d['item']['parent']['maxOffset']>0x1)return;if(!_0x25c3be['consumable']['consume'](_0x2d7b4d['item'],_0xb94941['name']))return;const _0x9dbe3a=_0x25c3be['writer'],_0x499a40=_0x25c3be['mapper']['toViewRange'](_0x2d7b4d['range']);_0x9dbe3a['wrap'](_0x499a40,_0x9dbe3a['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x15d687){const _0x88ad6c=_0x15d687['plugins']['get']('RevisionViewer');return(_0x1769e5,_0x2df59f,_0x5c9f3c)=>{const _0x1f91b1=_0x2df59f['markerName']['split'](':')[0x1],_0x570549=_0x88ad6c['_getChangeFromId'](_0x1f91b1);if(!_0x570549)return null;const _0x2ddf50='add'==_0x570549['type']?'split':'merge';if(!_0x5c9f3c['consumable']['test'](_0x2df59f['markerRange'],_0x1769e5['name']))return;const _0x30dab9=_0x2df59f['markerRange']['getWalker'](),_0x328793=_0x2df59f['markerRange']['start'],_0x46a18c=_0x15d687['model']['schema'];let _0xa5738a=null,_0x532fb9=null,_0x177e17=!0x1,_0x17b725=!0x1;for(const _0x306b21 of _0x30dab9){const _0x51d11c=_0x306b21['item'];_0x177e17=_0x177e17||_0x46a18c['isContent'](_0x51d11c);const _0x158863=_0x5c9f3c['mapper']['toViewElement'](_0x51d11c);if(_0x158863&&_0x158863['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x306b21['type']&&(_0x46a18c['isBlock'](_0x51d11c)&&!_0x46a18c['isLimit'](_0x51d11c)&&(_0x51d11c['nextSibling']||_0x328793['isAtEnd']?_0xa5738a&&_0xa5738a['parent']==_0x51d11c||(_0xa5738a=_0x51d11c,_0x596d80(_0x306b21['previousPosition']),_0x17b725=!0x0):_0x532fb9=_0x532fb9||_0x306b21['previousPosition']));}function _0x596d80(_0x3a1d25){const _0x58d351=_0x5c9f3c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2ddf50}),_0x299bf0=_0x5c9f3c['mapper']['toViewPosition'](_0x3a1d25);_0x570549['data']['isSuggestion']&&_0x5c9f3c['writer']['addClass']('ck-suggestion-marker-'+_0x2ddf50+'-new',_0x58d351),_0x88ad6c['activeChange']==_0x570549&&_0x5c9f3c['writer']['addClass']('ck-suggestion-marker--active',_0x58d351),_0x5c9f3c['writer']['insert'](_0x299bf0,_0x58d351),_0x5c9f3c['mapper']['bindElementToMarker'](_0x58d351,_0x2df59f['markerName']);}_0x177e17||_0x17b725||!_0x532fb9||_0x596d80(_0x532fb9);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x39061c,_0x5e3b9d,_0x46657d)=>{const _0x590a9a=_0x46657d['mapper']['markerNameToElements'](_0x5e3b9d['markerName']);if(_0x590a9a){for(const _0x2fcf4f of _0x590a9a)(_0x2fcf4f['hasClass']('ck-suggestion-marker-split')||_0x2fcf4f['hasClass']('ck-suggestion-marker-merge'))&&(_0x46657d['mapper']['unbindElementFromMarkerName'](_0x2fcf4f,_0x5e3b9d['markerName']),_0x46657d['writer']['remove'](_0x2fcf4f));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x52bd99,_0x3d2d2a,_0x22ede1)=>{const _0x554091=_0x3d2d2a['markerName']['split'](':')[0x1],_0x37d569=this['_getChangeFromId'](_0x554091);if(!_0x37d569)return null;const _0x24d8f1='add'==_0x37d569['type']?'split':'merge';if(_0x22ede1['consumable']['test'](_0x3d2d2a['markerRange'],_0x52bd99['name']))for(const _0x4a6bf0 of _0x3d2d2a['markerRange']['getItems']()){if(!_0x4a6bf0['is']('element','softBreak'))continue;const _0x4ebf2c=_0x22ede1['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x24d8f1}),_0x4b10a2=_0x22ede1['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4a6bf0));_0x37d569['data']['isSuggestion']&&_0x22ede1['writer']['addClass']('ck-suggestion-marker-'+_0x24d8f1+'-new',_0x4ebf2c),this['activeChange']==_0x37d569&&_0x22ede1['writer']['addClass']('ck-suggestion-marker--active',_0x4ebf2c),_0x22ede1['writer']['insert'](_0x4b10a2,_0x4ebf2c),_0x22ede1['mapper']['bindElementToMarker'](_0x4ebf2c,_0x3d2d2a['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3c64dd=>{for(const _0xcc9d7b of this['editor']['model']['document']['getRootNames']()){const _0x4951c0=this['editor']['model']['document']['getRoot'](_0xcc9d7b),_0x513cfb=this['editor']['editing']['view']['document']['getRoot'](_0xcc9d7b);if(_0x513cfb){const _0x234747=_0x4951c0['getAttribute']('revisionHistoryAttachChange');if(_0x3c64dd['removeAttribute']('data-change-id',_0x513cfb),_0x3c64dd['removeClass']('ck-revision-history-root-add',_0x513cfb),_0x3c64dd['removeClass']('ck-revision-history-root-remove',_0x513cfb),_0x3c64dd['removeClass']('ck-revision-history-root--active',_0x513cfb),_0x234747){const _0x4383b1=this['_getChangeFromId'](_0x234747);if(!_0x4383b1)return null;_0x3c64dd['setAttribute']('data-change-id',_0x234747,_0x513cfb),_0x3c64dd['addClass']('ck-revision-history-root-'+_0x4383b1['type'],_0x513cfb),this['activeChange']==_0x4383b1&&_0x3c64dd['addClass']('ck-revision-history-root--active',_0x513cfb);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x442c2a=>'revision-comment:'+_0x442c2a,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x7d0079=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Lt(_0x7d0079['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2b48ca=>'revision-suggestion:'+_0x2b48ca,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4fad70=>({'name':'suggestion:'+_0x4fad70,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x5191c=>{const _0x13f907=_0x5191c['markerName']['split'](':')[0x1];return'insertion'!=_0x13f907&&'deletion'!=_0x13f907?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x13f907]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Bt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Bt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0xd03930,_0x2c3ed7,_0x9048d7)=>{const _0x200b19=_0x9048d7['mapper']['markerNameToElements'](_0x2c3ed7['markerName']);if(_0x200b19){for(const _0x233efe of _0x200b19)_0x233efe['is']('uiElement')&&(_0x9048d7['mapper']['unbindElementFromMarkerName'](_0x233efe,_0x2c3ed7['markerName']),_0x9048d7['writer']['remove'](_0x233efe));}},{'priority':'high'});}_getChangeFromId(_0x3ddbd6){return this['_changeIdToChange']['get'](_0x3ddbd6);}_getViewForChange(_0x2ff534){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Tt(this['editor']['locale'],_0x2ff534,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xd5698e,_0x5dd604,_0x429894,_0x5b0cef)=>{_0x5b0cef&&this['_balloon']['remove'](_0x5b0cef),_0x429894&&(this['_balloon']['add']({'view':_0x429894,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2256a0=this['editor']['editing'],_0x377367=this['_getChangeFromId'](_0x429894['changeId']);let _0x444b17;if(_0x377367['data']['isOnRoot']){const _0x289f60=_0x2256a0['view']['getDomRoot'](_0x377367['rootName']);_0x444b17=Array['from'](_0x289f60['getClientRects']());}else{const _0x11569e=this['editor']['model']['markers']['get']('revision:'+_0x429894['changeId']);_0x444b17=Array['from'](_0x2256a0['mapper']['markerNameToElements'](_0x11569e['name']))['map'](_0x266b99=>_0x2256a0['view']['domConverter']['mapViewToDom'](_0x266b99))['map'](_0x3a441d=>Array['from'](_0x3a441d['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x444b17['find'](_0x20e87a=>_0x20e87a['top']-0x3<=this['_activeViewTarget']['y']&&_0x20e87a['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x20e87a['left']-0x3<=this['_activeViewTarget']['x']&&_0x20e87a['right']+0x3>=this['_activeViewTarget']['x'])||_0x444b17[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x45e9cd,_0xca1ad3,_0x503e9f,_0x49fba7)=>{this['activeView']=_0x503e9f?this['_getViewForChange'](_0x503e9f):null,this['editor']['model']['change'](()=>{const _0x3f4e36=this['editor']['editing'];_0x49fba7&&(_0x49fba7['data']['isOnRoot']?_0x3f4e36['view']['change'](_0x2ed839=>{_0x2ed839['removeClass']('ck-revision-history-root--active',_0x3f4e36['view']['document']['getRoot'](_0x49fba7['rootName']));}):_0x3f4e36['reconvertMarker']('revision:'+_0x49fba7['id'])),_0x503e9f&&(_0x503e9f['data']['isOnRoot']?_0x3f4e36['view']['change'](_0x3f9947=>{_0x3f9947['addClass']('ck-revision-history-root--active',_0x3f4e36['view']['document']['getRoot'](_0x503e9f['rootName']));}):_0x3f4e36['reconvertMarker']('revision:'+_0x503e9f['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3a71db,_0x33b444)=>{if(this['activeChange'])return;const _0x326170=this['_findChangeIdFromDomTarget'](_0x33b444['target']),_0x6edcad=this['_changeIdToChange']['get'](_0x326170);_0x6edcad?(this['_activeViewTarget']={'x':_0x33b444['domEvent']['x'],'y':_0x33b444['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x6edcad)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x46953a,_0xac1930)=>{const _0x2d33a1=this['_findChangeIdFromDomTarget'](_0xac1930['target']),_0x3d75c3=this['_changeIdToChange']['get'](_0x2d33a1);_0x3d75c3?(this['_activeViewTarget']={'x':_0xac1930['domEvent']['x'],'y':_0xac1930['domEvent']['y']},_0x3d75c3===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x3d75c3):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x2306d8){do{const _0x363545=_0x2306d8['getAttribute']('data-change-id');if(_0x363545)return _0x363545;_0x2306d8=_0x2306d8['parent'];}while(_0x2306d8);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x2307df=>{for(const _0x489540 of this['editor']['model']['markers'])_0x2307df['removeMarker'](_0x489540);});}};function Lt(_0x1fc514){return _0x1fc514['split'](':')[0x1];}function Bt(_0x48ec8c,_0x586eb0){return(_0x2c4bca,_0x1ab2fd,_0xe37015)=>{if(!_0xe37015['consumable']['test'](_0x1ab2fd['markerRange'],_0x2c4bca['name']))return;const _0x469e77=_0x1ab2fd['markerRange']['getWalker'](),_0x2f16e7=_0x1ab2fd['markerRange']['start'],_0x294b52=_0x48ec8c['model']['schema'];let _0x1e9ce1=null,_0x171e46=null,_0xf398cd=!0x1,_0x2d391c=!0x1;for(const _0x2f3d13 of _0x469e77){const _0x31bf3d=_0x2f3d13['item'];_0xf398cd=_0xf398cd||_0x294b52['isContent'](_0x31bf3d);const _0x4e9abc=_0xe37015['mapper']['toViewElement'](_0x31bf3d);if(_0x4e9abc&&_0x4e9abc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2f3d13['type']&&(_0x294b52['isBlock'](_0x31bf3d)&&!_0x294b52['isLimit'](_0x31bf3d)&&(_0x31bf3d['nextSibling']||_0x2f16e7['isAtEnd']?_0x1e9ce1&&_0x1e9ce1['parent']==_0x31bf3d||(_0x1e9ce1=_0x31bf3d,_0x4fb52e(_0x2f3d13['previousPosition']),_0x2d391c=!0x0):_0x171e46=_0x171e46||_0x2f3d13['previousPosition']));}function _0x4fb52e(_0x466762){const _0x1b76ba=_0xe37015['mapper']['toViewPosition'](_0x466762),_0xa050d3=_0xe37015['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x586eb0});_0xe37015['writer']['insert'](_0x1b76ba,_0xa050d3),_0xe37015['mapper']['bindElementToMarker'](_0xa050d3,_0x1ab2fd['markerName']);}_0xf398cd||_0x2d391c||!_0x171e46||_0x4fb52e(_0x171e46);};}var Ft=class extends _0x1509a1{constructor(_0x98f078){super(_0x98f078);const _0x20b645=_0x98f078['plugins']['get'](Ut);this['affectsData']=!0x1,this['listenTo'](_0x20b645,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x20b645,'change:isEnabled',()=>this['refresh']());}execute(){const _0x5cf48e=this['editor'],_0x19a677=_0x5cf48e['plugins']['get'](Ut),_0x391a3a=_0x19a677['isReady']?_0x19a677['diff']['newRevisionId']:null;_0x5cf48e['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x391a3a);}['refresh'](){const {isReady:_0x8438ba,isEnabled:_0x423dbd,repository:_0x344cf6,diff:_0x58a134}=this['editor']['plugins']['get'](Ut),_0x17461b=_0x58a134&&_0x344cf6['getLaterVisibleRevision'](_0x58a134['newRevisionId']);this['isEnabled']=_0x8438ba&&_0x423dbd&&Boolean(_0x17461b);}},$t=class extends _0x1509a1{_step;constructor(_0x2b108a,{direction:_0x14ef5e}){super(_0x2b108a);const _0x437977=_0x2b108a['plugins']['get'](Ut);this['affectsData']=!0x1,this['_step']='forward'===_0x14ef5e?0x1:-0x1,this['listenTo'](_0x437977,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x437977,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x437977,'change:activeChange',()=>this['refresh']());}execute(){const _0x1d4876=this['editor'],_0x55d477=_0x1d4876['plugins']['get'](Ut),{isNavigationMode:_0x3805f3,currentChangeNumber:_0x5bd83d}=_0x55d477;let _0x3ff5c4;if(_0x55d477['activeChange']=_0x3805f3?_0x55d477['diff']['changes']['get'](_0x5bd83d+this['_step']):_0x55d477['diff']['changes']['first'],_0x55d477['activeChange']['data']['isOnRoot'])_0x3ff5c4=_0x1d4876['editing']['view']['getDomRoot'](_0x55d477['activeChange']['rootName']);else{const _0x36347a=_0x1d4876['model']['markers']['get']('revision:'+_0x55d477['activeChange']['id']);_0x3ff5c4=_0x25901d(_0x1d4876['editing'],_0x36347a);}_0x5d1544({'target':_0x3ff5c4,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x5b1044,currentChangeNumber:_0x153073,numberOfChanges:_0x5c15d9,isReady:_0x50597c,isEnabled:_0x307da0}=this['editor']['plugins']['get'](Ut);this['isEnabled']=!!(_0x307da0&&_0x50597c&&_0x5c15d9)&&(!_0x5b1044||(0x1===this['_step']?_0x153073<_0x5c15d9-0x1:_0x153073>0x0));}},jt=class extends ft{constructor(_0x51b52a){super(_0x51b52a);const _0x27e075=this['bindTemplate'],_0x47a32c=new _0x46dff5(_0x51b52a),_0xd4283c=new _0x46dff5(_0x51b52a);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',(_0x20499b,_0x29a87d)=>_0x20499b&&_0x29a87d>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x126ea9,_0x48ff64,_0x520047,_0x30475f)=>{if(!_0x126ea9)return At(_0x51b52a,'Loading...');if(!_0x520047)return At(_0x51b52a,'No\x20changes');const _0x97ae62=At(_0x51b52a,'NUMBER_OF_CHANGES',_0x520047);return _0x30475f?At(_0x51b52a,'X_OF_Y_CHANGES',[_0x48ff64+0x1,_0x520047]):_0x97ae62;}),_0x47a32c['set']({'label':At(_0x51b52a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x2dc25d}),_0xd4283c['set']({'label':At(_0x51b52a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3182cc}),_0x47a32c['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0xd4283c['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x47a32c['on']('execute',()=>this['fire']('execute','backward')),_0xd4283c['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',_0x27e075['if']('_isStatusLabelVisible','ck-hidden',_0x284e05=>!_0x284e05)]},'children':[{'text':_0x27e075['to']('isNavigationMode',_0x4667ec=>_0x4667ec?At(_0x51b52a,'EDIT_X_OF_Y_REVISIONS')+':\x20':At(_0x51b52a,'Total')+':\x20')}]},{'text':_0x27e075['to']('_statusText')}]},new lt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x47a32c,_0xd4283c]}]});}};const Gt='ck-editor__editable__loading-overlay';var Kt=class extends _0x3fc6d1{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1ec96d=this['editor']['editing']['view'];_0x1ec96d['change'](_0x2d1d20=>{for(const _0x2b18df of _0x1ec96d['document']['roots'])_0x2d1d20['addClass'](Gt,_0x2b18df);});}['hide'](){const _0x26dd7a=this['editor']['editing']['view'];_0x26dd7a['change'](_0x2fd601=>{for(const _0x3a7923 of _0x26dd7a['document']['roots'])_0x2fd601['removeClass'](Gt,_0x3a7923);});}},qt=class extends _0x3fc6d1{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ut,Kt];}init(){const _0x2813de=this['editor'],_0x3e7b87=_0x2813de['plugins']['get'](Ut),_0x135e4d=_0x2813de['plugins']['get'](Kt);_0x2813de['ui']['componentFactory']['add']('exitToEditing',_0x2b4791=>{const _0x598f93=new _0x46dff5(_0x2b4791);return _0x598f93['set']({'label':At(_0x2b4791,'Back\x20to\x20editing'),'icon':_0x258595,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x598f93,'execute',()=>{_0x2813de['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x598f93;}),_0x2813de['ui']['componentFactory']['add']('restoreRevision',_0x1169f3=>{const _0xb96b05=new _0x46dff5(_0x1169f3);return _0xb96b05['set']({'label':At(_0x1169f3,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0xb96b05['bind']('isEnabled')['to'](_0x2813de['commands']['get']('restoreRevision')),this['listenTo'](_0xb96b05,'execute',()=>_0x2813de['execute']('restoreRevision')),_0xb96b05;}),_0x2813de['ui']['componentFactory']['add']('changesNavigation',_0x37af8c=>{const _0x341081=new jt(_0x37af8c),_0x26c9b8=_0x2813de['commands']['get']('showPreviousChange'),_0x136442=_0x2813de['commands']['get']('showNextChange');return _0x341081['bind']('isBackwardNavigationEnabled')['to'](_0x26c9b8,'isEnabled'),_0x341081['bind']('isForwardNavigationEnabled')['to'](_0x136442,'isEnabled'),_0x341081['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3e7b87),this['listenTo'](_0x341081,'execute',(_0x769aeb,_0x1a8f75)=>{_0x2813de['execute']('forward'===_0x1a8f75?'showNextChange':'showPreviousChange');}),_0x341081;}),_0x135e4d['show'](),_0x3e7b87['on']('change:isReady',(_0x28f744,_0x428b26,_0x5c0352)=>{_0x5c0352?_0x135e4d['hide']():_0x135e4d['show']();});}},Yt=class extends st{['_resizeObserver']=null;constructor(_0x33bd29,_0x5272a8){super(_0x33bd29,_0x5272a8);const _0xb9399e=this['bindTemplate'];this['set']({'label':At(_0x33bd29,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=At(_0x33bd29,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0xb9399e['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x4344f0(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']()),this['on']('change:isEnabled',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x56dd83=this['fieldView']['element'];this['_tooltipString']=!this['isEnabled']&&_0x56dd83['scrollWidth']>_0x56dd83['clientWidth']&&_0x56dd83['value']||'';}},Jt=class extends ft{constructor(_0x22c0c1,_0x164335,_0x4f0376){super(_0x22c0c1);const _0x3c039a=new tt();_0x3c039a['set']({'content':_0x1b0e51,'viewBox':'0\x200\x2011\x2010'});const _0x8da50f=['ck','ck-revision-history-sidebar__revision-author'];_0x4f0376&&_0x8da50f['push']('ck-revision-history-sidebar__revision-author_creator');const _0x29dc6c=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':At(_0x22c0c1,_0x4f0376?'Revision\x20creator':'Revision\x20author')},'children':[_0x3c039a,_0x164335['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x8da50f},'children':_0x29dc6c});}};function Wt(_0x17827f,_0x377c49){const _0x34c764=_0x17827f['bindTemplate'],_0x3ba5fa=_0x17827f['locale'],_0x5f91c7=gt(_0x3ba5fa);_0x5f91c7['panelPositionLimiter']=()=>{const _0x5d99f8=_0x5f91c7['buttonView']['element'];return _0x5d99f8&&_0x3f4597(_0x5d99f8);};const _0x50a4ed=function(_0xe87ced,_0x317b1a){const _0x3929a0=function(_0x4cf641,_0x51a3b9){const _0x62110b=_0x4cf641['locale'],_0xd2f6e3={'Compare\x20against\x20selected':At(_0x62110b,'Compare\x20against\x20selected'),'Name\x20this\x20revision':At(_0x62110b,'Name\x20this\x20revision'),'Restore\x20this\x20revision':At(_0x62110b,'Restore\x20this\x20revision')};return _0x51a3b9['map'](_0x48a989=>{const _0x2eae46=_0xd2f6e3[_0x48a989['name']];return _0x2eae46&&_0x2eae46!==_0x48a989['name']&&(_0x48a989['name']=_0x2eae46),_0x48a989;});}(_0xe87ced,_0x317b1a),_0x5d0a57=new _0x31f909();for(const _0x25c598 of _0x3929a0){const _0x2d9272={'type':'button','model':new dt({'label':_0x25c598['name'],'class':_0x25c598['class'],'withText':!0x0,'role':'menuitem','_action':_0x25c598['action']})};_0x2d9272['model']['bind']('isEnabled')['to'](_0xe87ced,'isActionsDropdownOpen',_0x559926=>'function'!=typeof _0x25c598['isEnabled']||(!_0x559926||_0x25c598['isEnabled'](_0xe87ced))),_0x5d0a57['add'](_0x2d9272);}return _0x5d0a57;}(_0x17827f,_0x377c49);return _0x17827f['bind']('isActionsDropdownOpen')['to'](_0x5f91c7,'isOpen'),_0x5f91c7['buttonView']['set']({'label':At(_0x3ba5fa,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'rtl'===_0x3ba5fa['uiLanguageDirection']?'se':'sw','icon':_0x4bf2a6,'class':'ck-button_small','tabindex':0x0}),_0x5f91c7['buttonView']['extendTemplate']({'attributes':{'aria-labelledby':_0x17827f['revisionNameView']['fieldView']['id'],'aria-describedby':[_0x17827f['_dateElementId'],_0x17827f['_authorsElementId']]}}),_0x5f91c7['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x34c764['if']('isActionsDropdownOpen','ck-on'),_0x34c764['if']('isEditing','ck-hidden')]},'on':{'click':_0x34c764['to'](_0x396c38=>_0x396c38['stopPropagation']())}}),_0x5f91c7['on']('execute',_0x34b9f3=>{_0x17827f['isReady']&&'function'==typeof _0x34b9f3['source']['_action']&&_0x34b9f3['source']['_action'](_0x17827f);}),vt(_0x5f91c7,_0x50a4ed,{'role':'menu'}),_0x5f91c7['listenTo'](_0x17827f,'change:isActionsDropdownOpen',(_0x288af1,_0xdcad95,_0x446791)=>{if(_0x446791)for(const _0x519fbd of _0x5f91c7['listView']['items']){const _0x53afe3=_0x519fbd['children']['first'],_0x265a9a=_0x377c49['find'](_0x433ef6=>_0x433ef6['action']===_0x53afe3['_action'])['isVisible'];_0x519fbd['isVisible']=void 0x0===_0x265a9a||_0x265a9a(_0x17827f);}}),_0x5f91c7;}const Xt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x46f367(ft);var Qt=class extends Xt{['id'];['revisionNameView'];revisionActionsView;saveButtonView;cancelButtonView;_keystrokes;['_revision'];_requireRevisionName;['_aiPillView'];_dateElementId;_authorsElementId;constructor(_0x39e602,_0x5d187e,_0x2f839d,_0xd1d9a8,_0x5065aa=!0x1){super(_0x39e602);const _0x2c4ae5=this['bindTemplate'],_0x181178=function(_0x325073,_0x503426){const _0x254b3c=Array['from'](_0x503426['authors'])['filter'](_0x3093b5=>_0x3093b5!=_0x503426['creator']);return _0x503426['creator']&&_0x254b3c['unshift'](_0x503426['creator']),_0x254b3c['map'](_0x910d08=>new Jt(_0x325073,_0x910d08,_0x910d08==_0x503426['creator']));}(_0x39e602,_0x5d187e);this['id']=_0x5d187e['id'],this['_revision']=_0x5d187e,this['_requireRevisionName']=_0xd1d9a8,this['bind']('_isAiGenerated')['to'](_0x5d187e,'attributes',_0x4d9170=>!(!_0x4d9170||!_0x4d9170['@ai'])),this['bind']('name','createdAt')['to'](_0x5d187e),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2e17d1=>{return _0x298539=_0x39e602['uiLanguage'],(_0x4bb9ca=_0x2e17d1)['toLocaleDateString'](_0x298539,{'month':'long','day':'numeric'})+',\x20'+_0x4bb9ca['toLocaleTimeString'](_0x298539,{'hour':'numeric','minute':'numeric'});var _0x298539,_0x4bb9ca;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isEditing',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['_keystrokes']=new _0x1bd414(),this['_dateElementId']='ck-revision-history-revision-date-'+_0x3a7148(),this['_authorsElementId']='ck-revision-history-revision-authors-'+_0x3a7148(),this['revisionNameView']=new Yt(_0x39e602,mt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'class':['ck-input_small'],'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x19c960=>_0x19c960||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isEditing',this,'isEnabled',(_0x886ced,_0x5600d6)=>_0x886ced&&_0x5600d6),this['revisionNameView']['fieldView']['bind']('tabIndex')['to'](this['revisionNameView']['fieldView'],'isReadOnly',_0x46328d=>_0x46328d?-0x1:void 0x0),this['saveButtonView']=this['_createSaveButtonView'](_0x39e602),this['cancelButtonView']=this['_createCancelButtonView'](_0x39e602),this['revisionActionsView']=_0x2f839d&&_0x2f839d['length']?Wt(this,_0x2f839d):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x5065aa?this['_createAiPillView'](_0x39e602):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x2c4ae5['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x2c4ae5['if']('isEnabled','ck-disabled',_0x157913=>!_0x157913),_0x2c4ae5['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x2c4ae5['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x2c4ae5['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open'),_0x2c4ae5['if']('isEditing','ck-revision-history-sidebar__revision_editing')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date',_0x2c4ae5['if']('isEditing','ck-hidden')],'id':this['_dateElementId']},'children':[{'text':_0x2c4ae5['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__edit-actions',_0x2c4ae5['if']('isEditing','ck-hidden',_0x257def=>!_0x257def)]},'children':[this['cancelButtonView'],this['saveButtonView']],'on':{'click':_0x2c4ae5['to'](_0x4f4521=>_0x4f4521['stopPropagation']())}},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors'],'id':this['_authorsElementId']},'children':_0x181178}]},..._0x5065aa?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x2c4ae5['if']('_isAiGenerated','ck-hidden',_0x130e62=>!_0x130e62)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x2c4ae5['to'](_0x2ed362=>{_0x2ed362['srcElement']['closest']('.ck-confirm-view')||this['isEditing']&&this['revisionNameView']['element']['contains'](_0x2ed362['target'])||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x42d4c5){const _0x18db6a=new _0xd0a35a(_0x42d4c5);return _0x18db6a['set']({'icon':_0x34331d,'label':At(_0x42d4c5,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':At(_0x42d4c5,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0x18db6a['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x18db6a;}_createSaveButtonView(_0x313f56){const _0x2c0b62=new _0x46dff5(_0x313f56),_0x5a8823=this['revisionNameView']['fieldView'];return _0x2c0b62['set']({'label':At(_0x313f56,'Save'),'withText':!0x0,'class':'ck-button-action\x20ck-button_small','tabindex':0x0}),_0x2c0b62['bind']('isEnabled')['to'](this,'isEnabled',_0x5a8823,'isEmpty',(_0x23ebb5,_0x3bc623)=>_0x23ebb5&&!(this['_requireRevisionName']&&_0x3bc623)),_0x2c0b62['on']('execute',()=>this['_saveName']()),_0x2c0b62;}_createCancelButtonView(_0x432fa6){const _0x1531b4=new _0x46dff5(_0x432fa6);return _0x1531b4['set']({'label':At(_0x432fa6,'Cancel'),'withText':!0x0,'class':'ck-button_small','tabindex':0x0}),_0x1531b4['on']('execute',()=>this['_finishEditing']()),_0x1531b4;}['_saveName'](){const _0x293477=this['revisionNameView']['fieldView']['element']['value'];this['_requireRevisionName']&&!_0x293477||(_0x293477===this['name']||!this['name']&&_0x293477===this['_createdAtFormatted']||this['fire']('setName',{'id':this['id'],'name':_0x293477}),this['_finishEditing']());}_finishEditing(){const _0x241425=this['revisionNameView']['fieldView'],_0x43c6c0=this['_hasKeyboardFocus']();_0x241425['element']['value']=_0x241425['value'],_0x241425['isEmpty']=!_0x241425['element']['value'],this['isEditing']=!0x1,_0x43c6c0&&this['revisionActionsView']&&this['revisionActionsView']['focus']();}['_hasKeyboardFocus'](){const _0x1e36fa=this['element']['getRootNode']()['activeElement'];return!!_0x1e36fa&&this['element']['contains'](_0x1e36fa)&&_0x1e36fa['matches'](':focus-visible');}['render'](){super['render']();const _0x3be36d=this['revisionNameView']['fieldView']['element'];this['_keystrokes']['listenTo'](this['element']),this['_keystrokes']['set']('Enter',(_0x5b1272,_0xf3c724)=>{this['isEditing']&&_0x5b1272['target']===_0x3be36d&&(this['_saveName'](),_0xf3c724());}),this['_keystrokes']['set']('Esc',(_0x10852c,_0xc30b05)=>{this['isEditing']&&(this['_finishEditing'](),_0xc30b05());});}destroy(){super['destroy'](),this['_keystrokes']['destroy']();}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function zt(_0x1ed099,_0x302c69){const _0x3e8dd6=pt['fromJSDate'](_0x1ed099)['setLocale'](_0x302c69),_0x597ca2=pt['local'](),_0x185cf9=_0x597ca2['minus']({'days':0x1})['startOf']('day');let _0x215024,_0xf0edb5;return _0x3e8dd6['hasSame'](_0x597ca2,'day')?(_0x215024=_0x3e8dd6['startOf']('day')['toJSDate'](),_0xf0edb5=_0x3e8dd6['toRelativeCalendar']()):_0x3e8dd6['hasSame'](_0x185cf9,'day')?(_0x215024=_0x185cf9['toJSDate'](),_0xf0edb5=_0x3e8dd6['toRelativeCalendar']()):_0x3e8dd6['hasSame'](_0x597ca2,'week')?(_0x215024=_0x3e8dd6['startOf']('week')['toJSDate'](),_0xf0edb5=_0x3e8dd6['weekdayLong']||''):_0x3e8dd6['hasSame'](_0x597ca2,'year')?(_0x215024=_0x3e8dd6['startOf']('month')['toJSDate'](),_0xf0edb5=_0x3e8dd6['monthLong']||''):(_0x215024=_0x3e8dd6['startOf']('year')['toJSDate'](),_0xf0edb5=String(_0x3e8dd6['year'])),{'startDate':_0x215024,'localizedPeriodName':_0xf0edb5};}var Zt=class extends ft{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0xff887b,_0x7f5362,_0x38894f,_0x762633,_0x4ab6eb){super(_0xff887b);const _0x9e6e5b=zt(_0x7f5362,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x7f5362,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x38894f,this['_requireRevisionName']=_0x762633,this['_showAISource']=_0x4ab6eb,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':_0x9e6e5b}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x4789e9){const _0x37c7fe=new Qt(this['locale'],_0x4789e9,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x37c7fe);}['removeRevision'](_0xfe3629){const _0x2826c1=this['revisionViews']['find'](_0x371818=>_0x371818['id']===_0xfe3629['id']);this['revisionViews']['remove'](_0x2826c1);}},ti=class extends ft{constructor(_0x296433){super(_0x296433);const _0x1cf88a=new tt();_0x1cf88a['content']=_0x50ae18,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x1cf88a,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[At(_0x296433,'Revision\x20history')]}]});}},ii=class extends ft{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x516aea,_0x2224ee,_0x5c037a,_0x1a9b2e,_0x5f30d0){super(_0x516aea);const _0x2df3f9=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x2224ee,this['_revisionActions']=_0x5c037a,this['_requireRevisionName']=_0x1a9b2e,this['_showAISource']=_0x5f30d0,this['on']('select',(_0x77ca60,_0x739328)=>{this['fire']('revisionSelected',_0x739328);}),this['on']('setName',(_0x424961,_0x375e65)=>{this['fire']('revisionSetName',_0x375e65);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar'],'dir':_0x516aea['uiLanguageDirection']},'children':[new ti(_0x516aea),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x2df3f9['if']('isEnabled','ck-disabled',_0x52b5fd=>!_0x52b5fd)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x254b10 of this['_revisions'])this['_addRevision'](_0x254b10);this['_revisions']['on']('add',(_0x173c45,_0x5ced2a)=>{this['_addRevision'](_0x5ced2a);}),this['_revisions']['on']('remove',(_0x4d7817,_0x2968bf)=>{this['_removeRevision'](_0x2968bf);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0xa97990=>_0xa97990['revisionViews']['map'](_0x53814a=>_0x53814a))['flat']();}selectRevision(_0x52f5f1){for(const _0x1a7f72 of this['revisionViews'])_0x52f5f1&&_0x52f5f1['id']===_0x1a7f72['id']?_0x1a7f72['select']():_0x1a7f72['deselect']();}highlightRevisions(_0x337720){for(const _0x599d7c of this['revisionViews'])_0x337720['some'](({id:_0x17eaff})=>_0x17eaff===_0x599d7c['id'])?_0x599d7c['highlight']():_0x599d7c['unhighlight']();}['_addRevision'](_0x21b403){const _0x1b27f8=zt(_0x21b403['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x268ff6=this['_getTimePeriodViewByStartDate'](_0x1b27f8);_0x268ff6||(_0x268ff6=new Zt(this['locale'],_0x1b27f8,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x268ff6)),_0x268ff6['addRevision'](_0x21b403);}['_removeRevision'](_0x94a9f){const _0x18abf4=zt(_0x94a9f['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x18abf4)['removeRevision'](_0x94a9f);}_getTimePeriodViewByStartDate(_0x2c7f94){return this['timePeriodViews']['find'](_0x41b6e0=>_0x41b6e0['startDate']['getTime']()===_0x2c7f94['getTime']());}},si=class RevisionsSidebar extends _0x3fc6d1{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['nameRevision','compareAgainstSelected','restoreRevision'])());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[Ut];}constructor(
|
|
30
|
-
_0x3dacdc(_0x33d07e);var ai=class extends ri{['_ui'];get['ui'](){return this['_ui'];}constructor(_0xbf7f3,_0x406fc4){super(_0x406fc4),this['sourceElement']=_0xbf7f3,this['model']['document']['createRoot']();const _0xaf491a=new oi(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ni(this,_0xaf491a);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x248ecd,_0x5118a1){const _0x1024df=new this(_0x248ecd,_0x5118a1);return await _0x1024df['initPlugins'](),await _0x1024df['ui']['init'](_0x248ecd),await _0x1024df['data']['init'](_0x1024df['config']['get']('initialData')||''),_0x1024df['fire']('ready'),_0x1024df;}};const hi=['RevisionHistoryUI','RestrictedEditingMode'];var ci=class extends _0x3c4294{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3bfd62){super(_0x3bfd62),this['result']='end',_0x3bfd62['editing']['view']['_overlayModeHint']='auto',_0x3bfd62['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},li=class extends _0x3c4294{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Et,Dt];}constructor(_0x29a24a){if(super(_0x29a24a),!this['editor']['config']['get']('revisionHistory'))throw new _0x42c032('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4e3e32=>this['_showRevisionViewer']({..._0x4e3e32,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x10ed5e=>this['_closeRevisionViewer'](_0x10ed5e)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x538d30=>this['_restoreRevision'](_0x538d30)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x43893f){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x43893f;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x1200e9){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1200e9);}getRevision(_0x31b2f5){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x31b2f5);}getRevisions(_0x2daf3b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2daf3b||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x5df0f9=this['editor'],_0x22dff0=_0x16e77b(_0x5df0f9,hi),_0x5011de=_0x5df0f9['plugins']['get']('RevisionTracker'),_0x3237b0=_0x5df0f9['plugins']['get'](_0x2c9bd7)['users'];return _0x22dff0['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x22dff0['lazyRoots'],(_0x22dff0['plugins']['push'](ci,Ut,qt,class RevisionViewerInit extends _0x3c4294{static get requires(){return[Ut,_0x2c9bd7];}init(){const _0x1855f3=this['editor']['plugins']['get'](_0x2c9bd7);for(const _0x509c60 of _0x3237b0)_0x509c60['isAnonymous']||_0x1855f3['getUser'](_0x509c60['id'])||_0x1855f3['addUser'](_0x509c60);const _0x153475=_0x5011de['repository']['getRevisions']();let _0x7cfb4b=null;const _0x3d7a60=this['editor']['plugins']['get']('RevisionViewer');if(_0x3d7a60['adapter']=_0x5011de['adapter'],_0x3d7a60['bind']('isEnabled')['to'](_0x5011de),_0x5df0f9['plugins']['has']('CommentsRepository')){const _0x4657a2=_0x5df0f9['plugins']['get']('CommentsRepository');_0x3d7a60['_getVisibleCommentThreadIds']=()=>new Set(_0x4657a2['getCommentThreads']()['filter'](_0x21581c=>!_0x21581c['isResolved'])['map'](_0x471161=>_0x471161['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x5df0f9,'isReadOnly',_0x5d129b=>!_0x5d129b);for(const _0x5e3899 of _0x153475){const _0x33c838=null===_0x5e3899['creator'];if(_0x33c838&&_0x5e3899['toVersion']===_0x5e3899['fromVersion'])continue;const _0x34d039=_0x5e3899['toJSON']();_0x3d7a60['addRevisionData'](_0x34d039,(_0x476031,_0x3f583c,_0x183dd4)=>{if(_0x33c838){if(_0x7cfb4b)_0x7cfb4b['_update'](_0x476031,_0x3f583c);else{if(!_0x3f583c){const _0xe109f8=_0x183dd4['toJSON']();_0xe109f8['id']=_0x5a9e0c(),_0x5011de['saveRevision'](_0xe109f8,_0x183dd4['toVersion'])['then'](_0x4ab805=>{_0x7cfb4b=_0x4ab805;});}}}else _0x5e3899['_update'](_0x476031,_0x3f583c);});}}},si),_0x22dff0);}['_enhanceShowRevisionViewerCallback'](){const _0x4e267d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x1cf704=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x1cf704['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x43df54=this['editor']['plugins']['get']('Dialog');_0x43df54['isOpen']&&_0x43df54['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x53c970=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x21ade9 of _0x53c970)_0x21ade9['class']=_0x21ade9['class']?_0x21ade9['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x16adbf=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x16adbf&&_0x16adbf['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x121f6d=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x121f6d&&_0x121f6d['setAttribute']('tabindex','-1');}}const _0x4f8707=this['_getRevisionViewerEditorConfig']();return _0x4e267d(_0x4f8707)['then'](_0x123f1a=>(this['_viewerEditor']=_0x123f1a,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'),_0x123f1a))['catch'](_0x4750ac=>(console['error'](_0x4750ac),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x351b01=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 _0x21a293=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x97497a of _0x21a293)_0x97497a['class']='ck-tab-panel_disabled'===_0x97497a['class']?'':_0x97497a['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x40c921=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x40c921&&_0x40c921['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1792de=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1792de&&_0x1792de['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x351b01(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3598f0=this['editor']['plugins']['get']('Annotations');_0x3598f0['refreshVisibility'](),_0x3598f0['refreshPositioning']();}});});}['_showRevisionViewer'](_0x39e767){const _0x31b84c=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x3055c2=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x54ed84=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ai['create'](_0x54ed84,_0x39e767)['then'](_0x28e424=>(_0x3055c2['style']['display']='block',_0x31b84c['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x28e424));}['_closeRevisionViewer'](_0x49d980){const _0x3b50b9=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3b50b9['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x49d980['destroy']();}async _restoreRevision(_0xfdd627){const _0x4be6d8=this['editor'],_0x3171a5=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x401a27=_0x4be6d8['plugins']['get']('RevisionTracker'),_0x4142a4=_0x4be6d8['plugins']['get']('RevisionHistoryUtils'),_0x4ab2cb=_0x3171a5['repository']['getRevision'](_0xfdd627);let _0x2dd9c3,_0x201178,_0x10a513;try{await _0x4142a4['loadRevisionData'](_0x4ab2cb,this['adapter']),_0x2dd9c3=_0x4142a4['getRevisionDocumentData'](_0x4ab2cb),_0x201178=_0x4142a4['getRevisionRootsAttributes'](_0x4ab2cb);}catch(_0x44d8c7){return void console['error'](_0x44d8c7);}_0x4be6d8['model']['change'](_0x42262f=>{for(const _0x550afe of Array['from'](_0x4be6d8['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x42262f['removeMarker'](_0x550afe);}),_0x3171a5['isReady']=!0x1,_0x4be6d8['model']['enqueueChange'](_0x4d18f7=>{_0x4d18f7['setSelection'](null),_0x4d18f7['removeSelectionAttribute'](_0x4be6d8['model']['document']['selection']['getAttributeKeys']());const _0x440336=Object['keys'](_0x2dd9c3);for(const _0x4e8cc3 of _0x4be6d8['model']['document']['roots'])'$graveyard'!=_0x4e8cc3['rootName']&&_0x4e8cc3['isAttached']()&&!_0x440336['includes'](_0x4e8cc3['rootName'])&&_0x4d18f7['detachRoot'](_0x4e8cc3);for(const _0x53f6a1 of _0x440336){let _0x41d75a=_0x4be6d8['model']['document']['getRoot'](_0x53f6a1);if(!_0x41d75a||!_0x41d75a['isAttached']()){const _0x2b9ee0=_0x4ab2cb['diffData']?.[_0x53f6a1]?.['rootElementName']||'$root';_0x41d75a=_0x4d18f7['addRoot'](_0x53f6a1,_0x2b9ee0);}const _0xcb95b2=_0x201178[_0x53f6a1],_0x35556e=Object['keys'](_0xcb95b2),_0x48e616=_0x2dd9c3[_0x53f6a1];for(const _0x305cc5 of _0x41d75a['getAttributeKeys']())_0x35556e['includes'](_0x305cc5)||_0x4d18f7['removeAttribute'](_0x305cc5,_0x41d75a);for(const _0x239b2a of _0x35556e)_0x4d18f7['setAttribute'](_0x239b2a,_0x201178[_0x53f6a1][_0x239b2a],_0x41d75a);_0x4d18f7['remove'](_0x4d18f7['createRangeIn'](_0x41d75a)),_0x4d18f7['insert'](_0x4be6d8['data']['parse'](_0x48e616,_0x41d75a),_0x41d75a,0x0);}});const _0x22aa00=At(_0x4be6d8['locale'],'Restored');if(_0x4ab2cb['name'])_0x10a513=-0x1==_0x4ab2cb['name']['indexOf'](_0x22aa00)?_0x22aa00+':\x20'+_0x4ab2cb['name']:_0x4ab2cb['name'];else _0x10a513=_0x22aa00+':\x20'+(_0x4ab2cb['createdAt']['toLocaleDateString'](_0x4be6d8['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4ab2cb['createdAt']['toLocaleTimeString'](_0x4be6d8['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x401a27['saveRevision']({'name':_0x10a513}),_0x3171a5['isReady']=!0x0,_0x4be6d8['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,bt as Revision,li as RevisionHistory,Dt as RevisionHistoryUI,kt as RevisionHistoryUtils,Et as RevisionTracker,Ut as RevisionViewer,ai as RevisionViewerEditor,ci as RevisionViewerIntegration,Kt as RevisionViewerLoadingOverlay,qt as RevisionViewerUI,Rt as RevisionsRepository,si 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[Ut];}constructor(_0x2de8e2){super(_0x2de8e2),this['_revisionViewer']=_0x2de8e2['plugins']['get'](Ut),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x37622c=this['_revisionsRepository']['_revisions'],_0x3bec26=this['_createRevisionActions'](),_0x2aa9ed=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ii(this['editor']['locale'],_0x37622c,_0x3bec26,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',(_0x51d608,_0x30ad6f)=>{_0x30ad6f['revisionViews']['on']('add',(_0x37130d,_0x24a2f8)=>{_0x24a2f8['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)),_0x2aa9ed['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x5cb224=this['_revisionsRepository']['getRevision'](0x0);if(_0x5cb224){const _0x1a0639=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5cb224['id']);this['_revisionViewer']['compare'](_0x5cb224,_0x1a0639);}}_handleRevisionSelected(_0x3e2841,_0xa4f94a){const _0x17f1a3=this['_revisionsRepository']['getRevision'](_0xa4f94a['id']),_0x4c9cd0=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x17f1a3['id']);this['_revisionViewer']['compare'](_0x17f1a3,_0x4c9cd0);}_handleRevisionSetName(_0x5b54a4,_0x190f8b){this['_revisionsRepository']['getRevision'](_0x190f8b['id'])['setName'](_0x190f8b['name']);}['_handleDiffChange'](_0x4e8681,_0x5db0da,_0x338afd){const _0x3eb684=this['_revisionsRepository']['getRevisionsInDiff'](_0x338afd);_0x3eb684['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x3eb684),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x3eb684[0x0]));}_createRevisionActions(){const _0x5688b8=this['editor'],_0x3cfa5c=RevisionsSidebar['availableRevisionActions'],_0xcae67c=_0x5688b8['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0xcae67c['length'])return _0xcae67c['map'](_0xa1263b=>{const _0x405228='string'==typeof _0xa1263b?Object['assign']({},_0x3cfa5c[_0xa1263b]):_0xa1263b;return _0x405228['action']=_0x405228['action']['bind'](this,_0x5688b8),_0x405228['isVisible']&&(_0x405228['isVisible']=_0x405228['isVisible']['bind'](this,_0x5688b8)),_0x405228;});}};function ei(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x326c78},_0x421505)=>{const _0x2a1136=_0x326c78['get'](Ut),_0x193821=_0x2a1136['repository'];let _0x4e1d21=_0x2a1136['diff']['newRevisionId'],_0x339d1f=_0x421505['id'];_0x193821['getIndex'](_0x4e1d21)>_0x193821['getIndex'](_0x339d1f)&&([_0x4e1d21,_0x339d1f]=[_0x339d1f,_0x4e1d21]),_0x2a1136['compare'](_0x4e1d21,_0x339d1f);},'isVisible':({plugins:_0x10bd80},_0x14be52)=>{const _0x51ca80=_0x10bd80['get'](Ut);return!(_0x51ca80['repository']['getRevisionsInDiff'](_0x51ca80['diff'])['length']>0x2)&&!_0x14be52['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x28663e,{id:_0x3f2f8b})=>{_0x28663e['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3f2f8b);},'isVisible':({plugins:_0x4a709},_0x199fcd)=>!!_0x4a709['get'](Ut)['repository']['getLaterVisibleRevision'](_0x199fcd['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':(_0x5863ed,_0x291634)=>{_0x291634['isEditing']=!0x0,_0x291634['revisionNameView']['focus'](),_0x291634['revisionNameView']['fieldView']['select']();}}};}var ni=class extends _0x5cf401{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x3e2ca5,_0x4374dc){super(_0x3e2ca5),this['_view']=_0x4374dc,this['_toolbarConfig']=_t(_0x3e2ca5['config']['get']('toolbar')),this['_elementReplacer']=new _0x3ab338();}get element(){return this['view']['element'];}init(_0x334c41){const _0x51d0b9=this['editor'],_0x5ab48c=this['view'],_0x5e67c0=_0x51d0b9['editing']['view'],_0x5ae01b=_0x5ab48c['editable'];_0x5ae01b['name']=_0x5e67c0['document']['getRoot']()['rootName'],_0x5ae01b['isMainFrameEditingRoot']=!0x0,_0x5ab48c['render']();const _0x36dafc=_0x5ae01b['element'];this['setEditableElement'](_0x5ae01b['name'],_0x36dafc),_0x5ab48c['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5e67c0['attachDomRoot'](_0x36dafc),this['_elementReplacer']['replace'](_0x334c41,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x504b84=this['view'],_0x2e41d6=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x2e41d6['detachDomRoot'](_0x504b84['editable']['name']),_0x504b84['destroy']();}_initToolbar(){const _0x1263db=this['view'];_0x1263db['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x1263db['stickyPanel']['limiterElement']=_0x1263db['element'],_0x1263db['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x63a49d})=>_0x63a49d),_0x1263db['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x1263db['toolbar']);}},oi=class extends _0x20d50a{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x459997,_0x46ab52,_0x1fd22d={}){super(_0x459997),this['stickyPanel']=new ct(_0x459997),this['toolbar']=new ut(_0x459997,{'shouldGroupWhenFull':_0x1fd22d['shouldToolbarGroupWhenFull']}),this['_editable']=new it(_0x459997,_0x46ab52),this['extendTemplate']({'attributes':{'class':'ck-revision-viewer-editor'}});}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const ri=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x19491a(_0x162dfb);var ai=class extends ri{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x121e89,_0x38989e){super(_0x38989e),this['sourceElement']=_0x121e89,this['model']['document']['createRoot']();const _0x285ef9=new oi(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ni(this,_0x285ef9);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x4f91b7,_0x4dc68b){const _0x52979b=new this(_0x4f91b7,_0x4dc68b);return await _0x52979b['initPlugins'](),await _0x52979b['ui']['init'](_0x4f91b7),await _0x52979b['data']['init'](_0x52979b['config']['get']('initialData')||''),_0x52979b['fire']('ready'),_0x52979b;}};const hi=['RevisionHistoryUI','RestrictedEditingMode'];var ci=class extends _0x3fc6d1{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c59f1){super(_0x1c59f1),this['result']='end',_0x1c59f1['editing']['view']['_overlayModeHint']='auto',_0x1c59f1['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},li=class extends _0x3fc6d1{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Et,Dt];}constructor(_0x382cda){if(super(_0x382cda),!this['editor']['config']['get']('revisionHistory'))throw new _0x448b0b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x40d485=>this['_showRevisionViewer']({..._0x40d485,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4fa09c=>this['_closeRevisionViewer'](_0x4fa09c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x579948=>this['_restoreRevision'](_0x579948)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x35df0b){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x35df0b;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x1765a5){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1765a5);}getRevision(_0x4df4c0){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x4df4c0);}getRevisions(_0x421264){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x421264||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x26cfa4=this['editor'],_0x3f3432=_0x1bdda9(_0x26cfa4,hi),_0x20075a=_0x26cfa4['plugins']['get']('RevisionTracker'),_0x18bff6=_0x26cfa4['plugins']['get'](_0x3b484f)['users'];return _0x3f3432['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x3f3432['lazyRoots'],(_0x3f3432['plugins']['push'](ci,Ut,qt,class RevisionViewerInit extends _0x3fc6d1{static get requires(){return[Ut,_0x3b484f];}init(){const _0x1d1cd7=this['editor']['plugins']['get'](_0x3b484f);for(const _0x5a33c2 of _0x18bff6)_0x5a33c2['isAnonymous']||_0x1d1cd7['getUser'](_0x5a33c2['id'])||_0x1d1cd7['addUser'](_0x5a33c2);const _0x20c64f=_0x20075a['repository']['getRevisions']();let _0x354b2d=null;const _0x272d59=this['editor']['plugins']['get']('RevisionViewer');if(_0x272d59['adapter']=_0x20075a['adapter'],_0x272d59['bind']('isEnabled')['to'](_0x20075a),_0x26cfa4['plugins']['has']('CommentsRepository')){const _0x382b53=_0x26cfa4['plugins']['get']('CommentsRepository');_0x272d59['_getVisibleCommentThreadIds']=()=>new Set(_0x382b53['getCommentThreads']()['filter'](_0x1a5bc4=>!_0x1a5bc4['isResolved'])['map'](_0x3bc22f=>_0x3bc22f['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x26cfa4,'isReadOnly',_0x38b4ab=>!_0x38b4ab);for(const _0x393d67 of _0x20c64f){const _0x56c6f8=null===_0x393d67['creator'];if(_0x56c6f8&&_0x393d67['toVersion']===_0x393d67['fromVersion'])continue;const _0x5e4877=_0x393d67['toJSON']();_0x272d59['addRevisionData'](_0x5e4877,(_0x3d7c6c,_0x2c61dc,_0x3f5829)=>{if(_0x56c6f8){if(_0x354b2d)_0x354b2d['_update'](_0x3d7c6c,_0x2c61dc);else{if(!_0x2c61dc){const _0x5a3fd3=_0x3f5829['toJSON']();_0x5a3fd3['id']=_0x3a7148(),_0x20075a['saveRevision'](_0x5a3fd3,_0x3f5829['toVersion'])['then'](_0x4c375a=>{_0x354b2d=_0x4c375a;});}}}else _0x393d67['_update'](_0x3d7c6c,_0x2c61dc);});}}},si),_0x3f3432);}['_enhanceShowRevisionViewerCallback'](){const _0x33878f=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x2f5a6f=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x2f5a6f['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x158d26=this['editor']['plugins']['get']('Dialog');_0x158d26['isOpen']&&_0x158d26['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x215952=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3a6e12 of _0x215952)_0x3a6e12['class']=_0x3a6e12['class']?_0x3a6e12['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x52afc8=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x52afc8&&_0x52afc8['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x24526b=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x24526b&&_0x24526b['setAttribute']('tabindex','-1');}}const _0xbd7e43=this['_getRevisionViewerEditorConfig']();return _0x33878f(_0xbd7e43)['then'](_0x35a5ec=>(this['_viewerEditor']=_0x35a5ec,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'),_0x35a5ec))['catch'](_0x23d139=>(console['error'](_0x23d139),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x38defe=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 _0x1f3557=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x325c88 of _0x1f3557)_0x325c88['class']='ck-tab-panel_disabled'===_0x325c88['class']?'':_0x325c88['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x360343=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x360343&&_0x360343['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4562a1=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4562a1&&_0x4562a1['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x38defe(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2accec=this['editor']['plugins']['get']('Annotations');_0x2accec['refreshVisibility'](),_0x2accec['refreshPositioning']();}});});}['_showRevisionViewer'](_0x42af47){const _0x324664=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x29932a=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0xc18f1a=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ai['create'](_0xc18f1a,_0x42af47)['then'](_0x29e8c8=>(_0x29932a['style']['display']='block',_0x324664['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x29e8c8));}['_closeRevisionViewer'](_0x47de70){const _0x804c15=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x804c15['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x47de70['destroy']();}async _restoreRevision(_0x41fcc5){const _0x2e8ebd=this['editor'],_0x415cb2=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x7011ea=_0x2e8ebd['plugins']['get']('RevisionTracker'),_0x45a20e=_0x2e8ebd['plugins']['get']('RevisionHistoryUtils'),_0x31b294=_0x415cb2['repository']['getRevision'](_0x41fcc5);let _0x398114,_0x458dce,_0x104be3;try{await _0x45a20e['loadRevisionData'](_0x31b294,this['adapter']),_0x398114=_0x45a20e['getRevisionDocumentData'](_0x31b294),_0x458dce=_0x45a20e['getRevisionRootsAttributes'](_0x31b294);}catch(_0x564600){return void console['error'](_0x564600);}_0x2e8ebd['model']['change'](_0x194648=>{for(const _0x434cf8 of Array['from'](_0x2e8ebd['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x194648['removeMarker'](_0x434cf8);}),_0x415cb2['isReady']=!0x1,_0x2e8ebd['model']['enqueueChange'](_0x2ea7f3=>{_0x2ea7f3['setSelection'](null),_0x2ea7f3['removeSelectionAttribute'](_0x2e8ebd['model']['document']['selection']['getAttributeKeys']());const _0xb87fc6=Object['keys'](_0x398114);for(const _0x356dc3 of _0x2e8ebd['model']['document']['roots'])'$graveyard'!=_0x356dc3['rootName']&&_0x356dc3['isAttached']()&&!_0xb87fc6['includes'](_0x356dc3['rootName'])&&_0x2ea7f3['detachRoot'](_0x356dc3);for(const _0x1fc98e of _0xb87fc6){let _0x3adabc=_0x2e8ebd['model']['document']['getRoot'](_0x1fc98e);if(!_0x3adabc||!_0x3adabc['isAttached']()){const _0x1c1d16=_0x31b294['diffData']?.[_0x1fc98e]?.['rootElementName']||'$root';_0x3adabc=_0x2ea7f3['addRoot'](_0x1fc98e,_0x1c1d16);}const _0xe798be=_0x458dce[_0x1fc98e],_0xdda8a4=Object['keys'](_0xe798be),_0x3ca170=_0x398114[_0x1fc98e];for(const _0x16c033 of _0x3adabc['getAttributeKeys']())_0xdda8a4['includes'](_0x16c033)||_0x2ea7f3['removeAttribute'](_0x16c033,_0x3adabc);for(const _0x227b47 of _0xdda8a4)_0x2ea7f3['setAttribute'](_0x227b47,_0x458dce[_0x1fc98e][_0x227b47],_0x3adabc);_0x2ea7f3['remove'](_0x2ea7f3['createRangeIn'](_0x3adabc)),_0x2ea7f3['insert'](_0x2e8ebd['data']['parse'](_0x3ca170,_0x3adabc),_0x3adabc,0x0);}});const _0x59f5c2=At(_0x2e8ebd['locale'],'Restored');if(_0x31b294['name'])_0x104be3=-0x1==_0x31b294['name']['indexOf'](_0x59f5c2)?_0x59f5c2+':\x20'+_0x31b294['name']:_0x31b294['name'];else _0x104be3=_0x59f5c2+':\x20'+(_0x31b294['createdAt']['toLocaleDateString'](_0x2e8ebd['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x31b294['createdAt']['toLocaleTimeString'](_0x2e8ebd['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x7011ea['saveRevision']({'name':_0x104be3}),_0x415cb2['isReady']=!0x0,_0x2e8ebd['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,bt as Revision,li as RevisionHistory,Dt as RevisionHistoryUI,kt as RevisionHistoryUtils,Et as RevisionTracker,Ut as RevisionViewer,ai as RevisionViewerEditor,ci as RevisionViewerIntegration,Kt as RevisionViewerLoadingOverlay,qt as RevisionViewerUI,Rt as RevisionsRepository,si as RevisionsSidebar,$t as ShowChangeCommand};
|