@ckeditor/ckeditor5-revision-history 49.0.0-alpha.0 → 49.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{CKEditorError as
|
|
24
|
-
_0x3e0f7e();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x1aece3){super(),this['id']=_0x1aece3['id']||_0x164a82(),this['creator']=_0x1aece3['creator']||null,this['authors']=_0x1aece3['authors']||[],this['diffData']=_0x1aece3['diffData']||null,this['toVersion']=_0x1aece3['toVersion']||0x0,this['fromVersion']=_0x1aece3['fromVersion']||0x0,this['set']('name',_0x1aece3['name']||''),this['set']('createdAt',_0x1aece3['createdAt']||new Date()),this['set']('attributes',_0x1aece3['attributes']||{});}setName(_0x5e907f){this['_update']({'name':_0x5e907f});}setAttribute(_0x18c3c3,_0x19fe8f){const _0x404f3c=_0x2b595f(this['attributes']);_0x87871a(_0x404f3c,_0x18c3c3,_0x19fe8f),this['_update']({'attributes':_0x404f3c});}removeAttribute(_0x4e8673){const _0x5ea1fa=_0x2b595f(this['attributes']);_0x3f4e7d(_0x5ea1fa,_0x4e8673),this['_update']({'attributes':_0x5ea1fa});}_update(_0x2c4519,_0x58307b=!0x1){let _0x483205=!0x1;const _0xc92ab5={'id':this['id']};for(const _0x4cc66b of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x3a7713=_0x2c4519[_0x4cc66b];void 0x0!==_0x3a7713&&_0x3a7713!==this[_0x4cc66b]&&(this[_0x4cc66b]=_0x3a7713,_0xc92ab5[_0x4cc66b]=_0x3a7713,_0x483205=!0x0);}_0x483205&&(_0xc92ab5['authors']&&(_0xc92ab5['authorsIds']=_0xc92ab5['authors']['map'](_0x8e57a8=>_0x8e57a8['id']),delete _0xc92ab5['authors']),this['fire']('_update',_0xc92ab5,_0x58307b));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x44e5ce=>_0x44e5ce['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x149c71{['_revisions'];static get requires(){return[_0x1b7fe0];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x3477c1){super(_0x3477c1),this['_revisions']=new _0x29b214();}afterInit(){!async function(_0x40f311){const _0x12f190='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x17247d=0xeb829,_0x5e4b37=0x79710,_0x529986={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0xd0c073(_0x2bdce7){const _0x2313d3=new window['Promise'](_0x25daf5=>{_0x2bdce7['once']('ready',_0x25daf5);}),_0x15e3ea=window['Date']['now'](),_0x1c1405=_0x2bdce7['config']['get']('licenseKey');async function _0x4fded2(){let _0xf713a9,_0xfe138b=null,_0x59e054=null;try{return'GPL'==_0x1c1405?'NotAllowed':(_0xf713a9=_0x241ff3(),_0xf713a9?(_0xf713a9['usageEndpoint']&&(_0x59e054=_0x26fdd4(_0xf713a9['usageEndpoint'],_0xf713a9['jti'])),await _0x4853d4()?_0x1dc021()?_0x28e4a5()?'Expired':_0x30eb37()?('evaluation'==_0xf713a9['licenseType']&&(_0xfe138b=_0x5932b2('EvaluationLimit')),await _0x2b6f04()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x28e4a5(){const _0x22d035=['evaluation','trial']['includes'](_0xf713a9['licenseType'])?_0x15e3ea/0x3e8:0xe10*_0x5e4b37;return _0xf713a9['exp']<_0x22d035;}function _0x1dc021(){const _0x36dade=_0xf713a9['features'];if(!_0x36dade)return!0x1;if(_0x36dade['includes']('*'))return!0x0;if(_0x36dade['includes']('RH'))return!0x0;if(_0x36dade['includes']('RRH')){if(_0x39911b())return!0x0;if(_0x5b42f5()||_0x1c530f())return!0x0;}return!0x1;}function _0x30eb37(){const _0x264aa1=_0xf713a9['licensedHosts'];if(!_0x264aa1||0x0==_0x264aa1['length'])return!0x0;const {hostname:_0x1808f8}=new URL(window['location']['href']);if(_0x264aa1['includes'](_0x1808f8))return!0x0;const _0x10633b=_0x1808f8['split']('.');return _0x264aa1['filter'](_0x5238b9=>_0x5238b9['includes']('*'))['map'](_0x18aad9=>_0x18aad9['split']('.'))['filter'](_0x5f18ae=>_0x5f18ae['length']<=_0x10633b['length'])['map'](_0x3a54eb=>Array(_0x10633b['length']-_0x3a54eb['length'])['fill']('*'===_0x3a54eb[0x0]?'*':'')['concat'](_0x3a54eb))['some'](_0x1b1520=>_0x10633b['every']((_0xfa82ed,_0x16b67d)=>_0x1b1520[_0x16b67d]===_0xfa82ed||'*'===_0x1b1520[_0x16b67d]));}function _0x2b6f04(){return _0xfe138b&&_0x59e054?new window['Promise']((_0x4013e4,_0xa7e14d)=>{_0xfe138b['then'](_0x4013e4,_0xa7e14d),_0x59e054['then'](_0x3953a2=>{'Valid'!=_0x3953a2&&_0x4013e4(_0x3953a2);},_0xa7e14d);}):_0xfe138b||_0x59e054||'Valid';}}function _0x26fdd4(_0x1b6893,_0x200d69){return new window['Promise'](_0x525550=>{if(_0x3b0e30())return _0x525550('Valid');_0x4838ec(),_0x2bdce7['decorate']('_sendUsageRequest');let _0x382fa2=!0x1;const _0x39ad08=_0x164a82();function _0xa7983c(_0x292772){return!!_0x292772&&('object'==typeof _0x292772||'function'==typeof _0x292772)&&'function'==typeof _0x292772['then']&&'function'==typeof _0x292772['catch'];}function _0x5752a4(_0x5c426f){_0x3d9697(_0x5c426f)['then'](_0x5e1453=>_0x5e1453&&'ok'==_0x5e1453['status']?_0x16d91e(_0x5913a9(_0x39ad08+_0x200d69))!=_0x5e1453['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2244a4=>(_0x9bf308(),_0x2244a4),()=>{const _0x4ea707=_0x4df46f();return null==_0x4ea707?(_0x9bf308(),'Valid'):_0x15e3ea-_0x4ea707>0x240c8400?'UsageLimit':'Valid';})['then'](_0x525550)['catch'](()=>{_0x525550('UsageLimit');});const _0x662335=0x36ee80;function _0x9bf308(){const _0x3db711='llct-'+_0x16d91e(_0x5913a9(_0x1b6893)),_0x3a964a=_0x160645(_0x16d91e(window['Math']['ceil'](_0x15e3ea/_0x662335)));window['localStorage']['setItem'](_0x3db711,_0x3a964a);}function _0x4df46f(){const _0x5552fb='llct-'+_0x16d91e(_0x5913a9(_0x1b6893)),_0x575f3d=window['localStorage']['getItem'](_0x5552fb);return _0x575f3d?window['parseInt'](_0x160645(_0x575f3d),0x10)*_0x662335:null;}function _0x3d9697(_0x48845d){return new window['Promise']((_0x168cfa,_0x1329dc)=>{_0x48845d['then'](_0x168cfa,_0x1329dc),window['setTimeout'](_0x1329dc,0x1d4c0);});}}_0x2bdce7['on']('_sendUsageRequest',(_0x25ca85,_0x4fe4b4)=>{if(_0x4fe4b4[0x0]!=_0x1b6893)return _0x525550('UsageLimit');_0x4fe4b4[0x1]={..._0x4fe4b4[0x1],'requestId':_0x39ad08};},{'priority':'high'}),_0x2bdce7['on']('_sendUsageRequest',_0xab44e8=>{_0xa7983c(_0xab44e8['return'])&&(_0x382fa2=!0x0,_0x5752a4(_0xab44e8['return']));},{'priority':'low'}),_0x2313d3['then'](()=>{_0x382fa2||_0x525550('UsageLimit');});});function _0x3b0e30(){return'auto'==_0x2bdce7['editing']['view']['_overlayModeHint'];}function _0x4838ec(){_0x2bdce7['editing']['view']['_overlayModeHint']='auto';}}function _0x5932b2(_0x59a14b){const _0x171d79=[new window['Promise'](_0x300124=>setTimeout(_0x300124,0x93ecc)),_0x2313d3['then'](()=>new window['Promise'](_0x1e6c27=>{const _0x66cbd1=0x7,_0x216ba2=_0x40f311['_revisions'];function _0x1c329e(){_0x216ba2['length']>=_0x66cbd1&&_0x1e6c27();}_0x1c329e(),_0x216ba2['on']('add',_0x1c329e);})),new window['Promise'](_0x2c01b6=>{function _0x106162(){for(const _0x1f4524 in window)if(window['Number']['isNaN'](window['Number'](_0x1f4524))&&window[_0x1f4524]==_0x17247d)return _0x2c01b6();'destroyed'!=_0x2bdce7['state']&&window['setTimeout'](_0x106162,0x1388);}_0x22e7eb('RevisionViewer')&&_0x106162();})];return window['Promise']['race'](_0x171d79)['then'](()=>_0x59a14b);}async function _0x2f063f(){if(await _0x2313d3,_0x22e7eb('RevisionViewer')){const _0x5da832=_0x40f311['getRevision'](0x0),_0x3fbb40=_0x40f311['getEarlierVisibleRevision'](_0x5da832['id']),_0x5ef4d9=_0x18e757('RevisionViewer');return await _0x5ef4d9['compare'](_0x5da832['id'],_0x3fbb40?_0x3fbb40['id']:null,!0x0),_0x5ef4d9['unbind']('isEnabled'),_0x5ef4d9['isEnabled']=!0x1,_0x5ef4d9['compare']=_0xf036b2,void(_0x5ef4d9['_getDiff']=_0xf036b2);}if(_0x22e7eb('RevisionTracker')){const _0x1cd17f=_0x18e757('RevisionTracker');_0x1cd17f['unbind']('isEnabled'),_0x1cd17f['isEnabled']=!0x1,_0x1cd17f['update']=_0xf036b2,_0x1cd17f['saveRevision']=_0xf036b2;}_0x2bdce7['model']['change']=_0xf036b2,_0x2bdce7['model']['enqueueChange']=_0xf036b2,_0x2bdce7['enableReadOnlyMode']('model');}function _0x39911b(){return _0x22e7eb('WebSocketGateway')&&'connected'==_0x18e757('WebSocketGateway')['state'];}function _0x5b42f5(){return _0x22e7eb('RevisionViewerIntegration');}function _0x1c530f(){return _0x22e7eb('TrackChangesDataGetter');}function _0x320202(_0x41bfbb){const _0x38f830=_0x224078();_0x2bdce7[_0x38f830]='revisionHistoryLicenseKey'+_0x41bfbb,_0x41bfbb['endsWith']('Limit')&&(window[_0x224078()]=_0x17247d),'Valid'!=_0x41bfbb&&_0x2f063f();}function _0x224078(){const _0x1f78c0=window['String'](window['performance']['now']())['replace']('.','');let _0x2aeb2e='N';for(let _0x5091bc=0x0;_0x5091bc<_0x1f78c0['length'];_0x5091bc+=0x2){let _0x4b0f95=window['parseInt'](_0x1f78c0['substring'](_0x5091bc,_0x5091bc+0x2));_0x4b0f95>=0x3e&&(_0x4b0f95-=0x3e),_0x2aeb2e+=_0x12f190[_0x4b0f95];}return _0x2aeb2e;}function _0x241ff3(){const _0xc0b566=_0x1c1405['split']('.');if(0x3!=_0xc0b566['length'])return null;return _0x2d8833(_0xc0b566[0x1]);function _0x2d8833(_0x17a9f1){const _0x544076=_0x2ecea7(_0x17a9f1);return _0x544076&&_0x1bea97()?_0x544076:null;function _0x1bea97(){const _0x232cea=_0x544076['jti'],_0x596651=window['parseInt'](_0x232cea['substring'](_0x232cea['length']-0x8),0x10),_0x141baf={..._0x544076,'jti':_0x232cea['substring'](0x0,_0x232cea['length']-0x8)};return delete _0x141baf['vc'],_0x5913a9(_0x141baf)==_0x596651;}}}async function _0x4853d4(){let _0x3d2bf7=!0x0;try{const [_0x594e85,_0x27a626,_0x5baa27]=_0x1c1405['split']('.');return _0x23f4c4(_0x594e85),await _0x13b200(_0x594e85,_0x27a626,_0x5baa27),_0x3d2bf7;}catch{return!0x1;}function _0x23f4c4(_0x404b7c){const _0x4f5156=_0x2ecea7(_0x404b7c);_0x4f5156&&'ES256'==_0x4f5156['alg']||(_0x3d2bf7=!0x1);}async function _0x13b200(_0x44d320,_0x1e93cf,_0x40815e){const _0x2ef16a=window['Uint8Array']['from'](_0x369b7c(_0x40815e),_0x2476f8=>_0x2476f8['charCodeAt'](0x0)),_0x5e5d62=new window['TextEncoder']()['encode'](_0x44d320+'.'+_0x1e93cf),_0x58a3ef=window['crypto']['subtle'];if(!_0x58a3ef)return;const _0x5185d5=await _0x58a3ef['importKey']('jwk',_0x529986,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x58a3ef['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x5185d5,_0x2ef16a,_0x5e5d62)||(_0x3d2bf7=!0x1);}}function _0x2ecea7(_0x130bdf){return _0x130bdf['startsWith']('ey')?JSON['parse'](_0x369b7c(_0x130bdf)):null;}function _0x369b7c(_0x8fe2eb){return window['atob'](_0x8fe2eb['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5913a9(_0x256fdf){let _0x23071=0x1505;function _0x444478(_0x44b415){for(let _0x5d72bf=0x0;_0x5d72bf<_0x44b415['length'];_0x5d72bf++){const _0x256dbb=_0x44b415['charCodeAt'](_0x5d72bf);_0x23071=(_0x23071<<0x5)+_0x23071+_0x256dbb,_0x23071&=_0x23071;}}function _0x2f33b6(_0x894c5f){Array['isArray'](_0x894c5f)?_0x894c5f['forEach'](_0x2f33b6):_0x894c5f&&'object'==typeof _0x894c5f?Object['entries'](_0x894c5f)['sort']()['forEach'](([_0x4f440b,_0x14cb98])=>{_0x444478(_0x4f440b),_0x2f33b6(_0x14cb98);}):_0x444478(window['String'](_0x894c5f));}return _0x2f33b6(_0x256fdf),_0x23071>>>0x0;}function _0x16d91e(_0x3e899e){return _0x3e899e['toString'](0x10)['padStart'](0x8,'0');}function _0x160645(_0x49a349){return _0x49a349['split']('')['reverse']()['join']('');}function _0x22e7eb(_0x570588){return _0x2bdce7['plugins']['has'](_0x570588);}function _0x18e757(_0x24a28c){return _0x2bdce7['plugins']['get'](_0x24a28c);}function _0xf036b2(){}_0x320202(await _0x4fded2());}_0xd0c073(_0x40f311['editor']);}(this);}createRevision(_0x24e76d){const _0x2c8870=this['editor']['plugins']['get']('Users');return new yt({'id':_0x24e76d['id'],'name':_0x24e76d['name'],'creator':_0x24e76d['creatorId']?_0x2c8870['getUser'](_0x24e76d['creatorId']):null,'diffData':_0x24e76d['diffData']||_0x24e76d['data'],'authors':_0x24e76d['authorsIds']['map'](_0x37d38b=>_0x2c8870['getUser'](_0x37d38b)),'createdAt':new Date(_0x24e76d['createdAt']),'attributes':_0x24e76d['attributes'],'fromVersion':_0x24e76d['fromVersion'],'toVersion':_0x24e76d['toVersion']});}['addRevision'](_0x23f91c,_0x54d3ce=0x0){this['_revisions']['add'](_0x23f91c,_0x54d3ce);}getRevision(_0x3e07e9){return this['_revisions']['get'](_0x3e07e9);}getRevisions(_0x5c1db5={'toJSON':!0x1}){const _0x41a8c8=Array['from'](this['_revisions']);return _0x41a8c8['reverse'](),_0x5c1db5['toJSON']?_0x41a8c8['map'](_0xbbf73b=>_0xbbf73b['toJSON']()):_0x41a8c8;}getIndex(_0x39a2e7){return this['_revisions']['getIndex'](_0x39a2e7);}getEarlierVisibleRevision(_0x3bb34d){const [,_0x14425b]=this['getRevisionsIterator'](_0x3bb34d,{'direction':'earlier'});return _0x14425b;}getLaterVisibleRevision(_0x3e187e){const [,_0xbdce5f]=this['getRevisionsIterator'](_0x3e187e,{'direction':'later'});return _0xbdce5f;}getRevisionsInDiff(_0x4310ec){const _0x5f31ad=[];for(const _0x47532e of this['getRevisionsIterator'](_0x4310ec['newRevisionId']))if(_0x5f31ad['push'](_0x47532e),_0x47532e['id']===_0x4310ec['oldRevisionId'])break;return _0x5f31ad;}*getRevisionsIterator(_0x22a65f,{direction:_0x53c31f='earlier',filter:_0x56c51d=()=>!0x0}={}){const _0xe5bc41='earlier'===_0x53c31f?0x1:-0x1;let _0x55b88d=this['_revisions']['get'](_0x22a65f),_0x56aea3=this['getIndex'](_0x55b88d);for(yield _0x55b88d;_0x55b88d;){if(_0x56aea3+=_0xe5bc41,_0x55b88d=this['getRevision'](_0x56aea3),!_0x55b88d)return;_0x56c51d(_0x55b88d)&&(yield _0x55b88d);}}},Rt=class extends _0x149c71{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1fad18,'c'],[_0x4ff23c,'a'],[_0x29f762,'e'],[_0x4e7dc5,'r'],[_0x37e5eb,'u']]);_typeCharToViewClass=new Map([['c',_0x1fad18],['a',_0x4ff23c],['e',_0x29f762],['r',_0x4e7dc5],['u',_0x37e5eb]]);async loadRevisionData(_0x1ee21b,_0x4bdad9){if(_0x1ee21b['diffData']||!_0x4bdad9)return;const _0x4e518f=this['editor']['config']['get']('collaboration.channelId');_0x1ee21b['diffData']=(await _0x4bdad9['getRevision']({'channelId':_0x4e518f,'revisionId':_0x1ee21b['id']}))['diffData'];}getRevisionDocumentData(_0x3a5f00){const _0x1997d3={};for(const _0x979e5f in _0x3a5f00['diffData']){if(_0x3a5f00['diffData'][_0x979e5f]['attachChange']&&!_0x3a5f00['diffData'][_0x979e5f]['attachChange']['isAttached'])continue;const _0x3db3e8=this['_removeRevisionMarkers'](JSON['parse'](_0x3a5f00['diffData'][_0x979e5f]['insertions'])),_0x34c736=this['editor']['editing']['view']['document'],_0x966f61=new _0x183c6a(_0x34c736,_0x3db3e8['map'](_0x3d01e5=>this['_getViewFromDiffObj'](_0x3d01e5,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1997d3[_0x979e5f]=this['editor']['data']['processor']['toData'](_0x966f61),this['editor']['data']['processor']['useFillerType']('default');}return _0x1997d3;}getRevisionRootsAttributes(_0x1c41d4){const _0x437440={};for(const _0x3d0b5e in _0x1c41d4['diffData'])_0x1c41d4['diffData'][_0x3d0b5e]['attachChange']&&!_0x1c41d4['diffData'][_0x3d0b5e]['attachChange']['isAttached']||(_0x437440[_0x3d0b5e]=_0x1c41d4['diffData'][_0x3d0b5e]['attributesAfter']||{});return _0x437440;}getRevisionRootsModelElements(_0x399f21){const _0x2921a5={};for(const _0xefa352 in _0x399f21['diffData']){if(_0x399f21['diffData'][_0xefa352]['attachChange']&&!_0x399f21['diffData'][_0xefa352]['attachChange']['isAttached'])continue;const _0x56f669=_0x399f21['diffData'][_0xefa352]['rootElementName'];_0x56f669&&(_0x2921a5[_0xefa352]=_0x56f669);}return _0x2921a5;}_getTypeCharForViewElement(_0x4fe9cc){return this['_viewClassToTypeChar']['get'](_0x4fe9cc['constructor']);}_getViewFromDiffObj(_0xeb0c8,_0x499737){const _0x25c91=this['editor']['editing']['view']['document'];if('string'==typeof _0xeb0c8)return new _0x41a322(_0x25c91,_0xeb0c8);{let _0x374a4c,_0x89689c;_0x89689c='u'==_0xeb0c8['type']||'r'==_0xeb0c8['type']?[]:_0xeb0c8['children']['map'](_0x9f2925=>this['_getViewFromDiffObj'](_0x9f2925,_0x499737));const _0x32e698=this['_typeCharToViewClass']['get'](_0xeb0c8['type'])||_0x1c12fb,_0x44eebf=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x374a4c=new _0x32e698(_0x25c91,_0xeb0c8['name'],_0xeb0c8['attributes'],_0x89689c),'u'==_0xeb0c8['type']&&_0xeb0c8['children'][0x0]){const _0x3ad7c6=_0xeb0c8['children'][0x0];if(_0x374a4c['render']=function(_0x113cf4){const _0x3043b3=_0x113cf4['createElement']('div');return _0x3043b3['innerHTML']=_0x16e1fd(_0x3ad7c6),_0x3043b3['childNodes'][0x0];},_0x499737){const _0x29e314=new _0x183c6a(_0x25c91);_0x29e314['_appendChild'](_0x374a4c);const _0xece7c3=Array['from'](_0x44eebf['viewChildrenToDom'](_0x29e314,{'bind':!0x1})),_0x164393=_0x44eebf['domDocument']['createElement']('div');_0x164393['append'](..._0xece7c3),_0x374a4c=Array['from'](_0x44eebf['domChildrenToView'](_0x164393))[0x0];}}else{if('r'==_0xeb0c8['type']&&_0xeb0c8['children'][0x0]){const _0x22ef51=_0xeb0c8['children'][0x0];if(_0x374a4c['render']=function(_0x28af3e){_0x28af3e['innerHTML']=_0x16e1fd(_0x22ef51);},_0x499737){const _0x4a6d81=new _0x183c6a(_0x25c91);_0x4a6d81['_appendChild'](_0x374a4c);const _0x53ea24=Array['from'](_0x44eebf['viewChildrenToDom'](_0x4a6d81,{'bind':!0x1})),_0x4010b1=_0x44eebf['domDocument']['createElement']('div');_0x4010b1['append'](..._0x53ea24);const _0x58f627=Array['from'](_0x44eebf['domChildrenToView'](_0x4010b1));_0x58f627['length']>0x1?_0x374a4c['_appendChild'](_0x58f627):_0x374a4c=_0x58f627[0x0];}}}if(_0xeb0c8['customProperties']){for(const [_0x1f6c4f,_0x9b9b7c]of _0xeb0c8['customProperties'])_0x374a4c['_setCustomProperty'](_0x1f6c4f,_0x9b9b7c);}const _0x328edb=void 0x0===_0xeb0c8['fillerOffset']?null:_0xeb0c8['fillerOffset'];return null!==_0x328edb&&(_0x374a4c['getFillerOffset']=()=>_0x328edb),_0x374a4c;}}_makeModelFromViewString(_0x1d680b,_0x406e53){const _0x41a29f=JSON['parse'](_0x1d680b),_0x2a8099=this['editor']['editing']['view']['document'],_0x3326a9=new _0x183c6a(_0x2a8099,_0x41a29f['map'](_0x4d40c6=>this['_getViewFromDiffObj'](_0x4d40c6,!0x0))),_0xf5049f=this['editor']['data']['toModel'](_0x3326a9,_0x406e53);return _0xf5049f['name']=_0x406e53,_0xf5049f;}['_removeRevisionMarkers'](_0x9cf0a4){return(_0x9cf0a4=_0x9cf0a4['filter'](_0x17d394=>!_0x17d394['name']||'revision-start'!==_0x17d394['name']&&'revision-end'!==_0x17d394['name']))['forEach'](_0x5499da=>{'string'!=typeof _0x5499da&&(_0x5499da['children']=this['_removeRevisionMarkers'](_0x5499da['children']),_0x5499da['attributes']=_0x5499da['attributes']['filter'](_0x569ea2=>!_0x569ea2[0x0]['startsWith']('data-revision-')));}),_0x9cf0a4;}};function kt(_0x3f3b0a,_0x3fde49,_0x1d8d61){const t=_0x3f3b0a['t'];switch(_0x3fde49){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'},_0x1d8d61);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1d8d61);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'},_0x1d8d61);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x1d8d61);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x1d8d61);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x149c71{['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[_0x1b7fe0,bt,Rt,_0x47b0ba];}constructor(_0x1cd5fe){super(_0x1cd5fe),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 _0x18ed49=_0x164a82();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x18ed49},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 _0x276987=this['repository']['getRevision'](0x0),_0x241f2b=_0x276987&&null===_0x276987['creator']?_0x276987:null;if(this['_continueCurrentRevision']=!!_0x241f2b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x15678b=this['_source']['getCurrentRevisionId'](),_0x34d19e=this['repository']['getRevision'](_0x15678b);if(_0x34d19e)this['_startingVersion']=_0x34d19e['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x8cdb74=this['_source']['history']['_operations']['find'](_0x3d67a8=>!_0x3d67a8['_isInit']),_0x131b92=_0x8cdb74?_0x8cdb74['baseVersion']:this['_source']['history']['version'];_0x276987?(_0x276987['toVersion']<_0x131b92&&_0x276987['_update']({'toVersion':_0x131b92}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x241f2b['id'],this['_startingVersion']=_0x241f2b['fromVersion']):(this['_startingVersion']=_0x276987['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x131b92,this['_continueCurrentRevision']=!0x1);}}else _0x241f2b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x241f2b['toVersion'],this['editor']['model']['document']['history']['version']),_0x241f2b['fromVersion']===_0x241f2b['toVersion']?(0x0!==_0x241f2b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x241f2b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x241f2b['id'],this['_startingVersion']=_0x241f2b['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',_0x4f27c1=>!_0x4f27c1),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x104e3d=[this['editor']];for(const _0x4384db of _0x104e3d){let _0x471e37;for(const _0x2135e7 in _0x4384db){const _0x19ac8a=_0x2135e7,_0x2fd163=_0x4384db[_0x19ac8a];if('revisionHistoryLicenseKeyValid'==_0x2fd163||'revisionHistoryLicenseKeyInvalid'==_0x2fd163||'revisionHistoryLicenseKeyExpired'==_0x2fd163||'revisionHistoryLicenseKeyDomainLimit'==_0x2fd163||'revisionHistoryLicenseKeyNotAllowed'==_0x2fd163||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2fd163||'revisionHistoryLicenseKeyUsageLimit'==_0x2fd163){delete _0x4384db[_0x19ac8a],_0x471e37=_0x2fd163,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x471e37&&_0x4384db['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x471e37&&_0x4384db['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x471e37&&_0x4384db['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x471e37&&_0x4384db['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x471e37&&_0x4384db['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x471e37&&_0x4384db['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x1f5e47=this['repository']['getRevision'](0x0),_0xe69b47=await this['getRevisionDocumentData'](_0x1f5e47),_0x2daf53=await this['getRevisionRootsAttributes'](_0x1f5e47),_0x171a25=this['_utils']['getRevisionRootsModelElements'](_0x1f5e47);this['_replaceEditorDataWithRevisionData'](_0xe69b47,_0x2daf53,_0x171a25);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x34f4c6){this['_source']=_0x34f4c6;}async update(){const _0x3035ab=await this['_source']['getLatestVersion']();if(_0x3035ab>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5bb33f=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3035ab});_0x5bb33f['authors']=_0x5bb33f['authorsIds']['map'](_0x1fe210=>this['editor']['plugins']['get']('Users')['getUser'](_0x1fe210)),this['currentRevision']['_update'](_0x5bb33f);}}async['saveRevision'](_0x2c4d80={},_0x451928=null){const _0x1fb382=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x451928>this['currentRevision']['toVersion']&&(_0x451928=null),null===_0x451928&&(_0x451928=await this['_source']['getLatestVersion']());const _0x2f04cd=this['_getFromVersion'](_0x451928),_0x7024e3=this['buildRevisionData']({'from':_0x2f04cd,'to':_0x451928});if(this['currentRevision']['toVersion']<_0x451928){const _0x597b02=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x451928,'to':_0x451928});_0x597b02['authors']=[],_0x597b02['authorsIds']=[],_0x597b02['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x597b02,!0x0),delete _0x597b02['authors'],_0x1fb382['push'](_0x597b02);}const _0x44e91a={..._0x2c4d80,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x2c4d80['name']||null,'id':_0x2c4d80['id']||_0x164a82(),..._0x7024e3,'attributes':{..._0x2c4d80['attributes'],..._0x7024e3['attributes']}},_0x113019=this['addRevisionData'](_0x44e91a);_0x1fb382['push'](_0x44e91a);const _0x168827=this['repository']['getIndex'](_0x113019);if(0x0!==_0x168827){const _0x478b0b=this['repository']['getRevision'](_0x168827-0x1);if(_0x478b0b['fromVersion']!==_0x451928){const _0x431441=this['_revisionDataBuilder']['getData'](_0x451928,_0x478b0b['toVersion']),_0x104195={'id':_0x478b0b['id'],'diffData':_0x431441['diffData'],'authorsIds':_0x431441['authorsIds'],'authors':_0x431441['authorsIds']['map'](_0xd19ad9=>this['editor']['plugins']['get']('Users')['getUser'](_0xd19ad9)),'fromVersion':_0x451928};this['_stampAiAttribute'](_0x104195,_0x478b0b,!!_0x431441['hasAIChanges']),_0x478b0b===this['currentRevision']&&(_0x104195['createdAt']=new Date(_0x44e91a['createdAt']['getTime']()+0xa)),_0x478b0b['_update'](_0x104195,!0x0),delete _0x104195['authors'],_0x1fb382['push'](_0x104195);}}if(this['adapter']){for(const _0x36d230 of _0x1fb382)this['_bufferUpdate'](_0x36d230['id'],_0x36d230,!0x0);this['sendBufferedUpdates']();}return _0x113019;}addRevisionData(_0x22a2a1){const _0x448f3f=this['repository']['createRevision'](_0x22a2a1);return this['adapter']&&_0x448f3f['on']('_update',(_0xa7dc71,_0x4184d4,_0x4caa65)=>{_0x4caa65||(this['_bufferUpdate'](_0x4184d4['id'],_0x4184d4,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x448f3f,this['_findInsertionIndex'](_0x448f3f)),_0x448f3f;}async getRevisionDocumentData(_0x1f8056){return await this['_utils']['loadRevisionData'](_0x1f8056,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1f8056);}async getRevisionRootsAttributes(_0x4f9cff){return await this['_utils']['loadRevisionData'](_0x4f9cff,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4f9cff);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x10fcef=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x576d27=0x0;_0x576d27<_0x10fcef['length'];_0x576d27++){const _0xeff7b9=_0x10fcef[_0x576d27];let _0x4e1995=!0x1;for(const _0x52e91f of Object['keys'](_0xeff7b9))void 0x0===_0xeff7b9[_0x52e91f]?delete _0xeff7b9[_0x52e91f]:'id'!==_0x52e91f&&(_0x4e1995=!0x0);_0x4e1995||(_0x10fcef[_0x576d27]=null);}if(_0x10fcef=_0x10fcef['filter'](_0x38839e=>null!==_0x38839e),!_0x10fcef['length'])return;for(let _0x4e124c=0x0;_0x4e124c<_0x10fcef['length'];_0x4e124c++){const _0x26559a=_0x10fcef[_0x4e124c];void 0x0!==_0x26559a['fromVersion']&&void 0x0===_0x26559a['toVersion']&&(_0x26559a['toVersion']=this['repository']['getRevision'](_0x26559a['id'])['toVersion']),void 0x0!==_0x26559a['toVersion']&&void 0x0===_0x26559a['fromVersion']&&(_0x26559a['fromVersion']=this['repository']['getRevision'](_0x26559a['id'])['fromVersion']);}const _0x14d8c6=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x10fcef,_0x14d8c6)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x5da60b=>{if(_0x5da60b){for(const _0x301973 of _0x5da60b)this['setRevisionData']({'id':_0x301973['id'],'createdAt':_0x301973['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x46b1be,_0x243bcd,_0x4d386d){if(_0x4d386d===(!!_0x243bcd&&!!_0x243bcd['attributes']['@ai']))return;const _0x1f2405={..._0x243bcd?_0x243bcd['attributes']:{},..._0x46b1be['attributes']};_0x4d386d?_0x1f2405['@ai']=!0x0:delete _0x1f2405['@ai'],_0x46b1be['attributes']=_0x1f2405;}buildRevisionData({revision:_0x49116a=null,from:_0x49a92e=null,to:_0x1a97d7=null}){_0x49a92e=null!==_0x49a92e?_0x49a92e:_0x49116a['fromVersion'],_0x1a97d7=null!==_0x1a97d7?_0x1a97d7:_0x49116a['toVersion'];const _0x4d5635=this['_revisionDataBuilder']['getData'](_0x49a92e,_0x1a97d7),_0x768d82={'diffData':_0x4d5635['diffData'],'authorsIds':_0x4d5635['authorsIds'],'fromVersion':_0x49a92e,'toVersion':_0x1a97d7};if(this['_stampAiAttribute'](_0x768d82,_0x49116a,!!_0x4d5635['hasAIChanges']),!_0x49116a||_0x1a97d7!==_0x49116a['toVersion']){const _0x3e7379=_0x1a97d7-0x1,_0x475c74=this['_source']['history']['getOperation'](_0x3e7379);_0x768d82['createdAt']=_0x475c74&&_0x475c74['createdAt']||new Date();}if(this['_loadedStateData']&&_0x49a92e===this['_loadedStateData']['fromVersion']){for(const _0x455ae5 of this['_loadedStateData']['authors'])_0x768d82['authorsIds']['includes'](_0x455ae5['id'])||_0x768d82['authorsIds']['push'](_0x455ae5['id']);}return _0x768d82;}_bufferUpdate(_0x15ca23,_0x2b890e,_0x2e007f){if(this['_bufferedUpdates']['has'](_0x15ca23)){const _0x4463d5=this['_bufferedUpdates']['get'](_0x15ca23);_0x2b890e=_0x2e007f?{..._0x4463d5,..._0x2b890e}:{..._0x2b890e,..._0x4463d5};}this['_bufferedUpdates']['set'](_0x15ca23,_0x2b890e);}setRevisionData(_0x53fe28){const _0x291011=this['repository']['getRevision'](_0x53fe28['id']);if(_0x53fe28['createdAt']&&(_0x53fe28['createdAt']=new Date(_0x53fe28['createdAt'])),_0x53fe28['authorsIds']){const _0x495bd4=this['editor']['plugins']['get']('Users');_0x53fe28['authors']=_0x53fe28['authorsIds']['map'](_0x94457f=>_0x495bd4['getUser'](_0x94457f));}_0x291011['_update'](_0x53fe28,!0x0);}_createInitialRevision(_0x32ab8c){const _0x5029a9=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5029a9)this['_initialRevisionId']=_0x5029a9['id'];else{const _0x5d1516=!this['editor']['model']['document']['roots']['find'](_0x416566=>this['editor']['model']['hasContent'](_0x416566)),_0x2a7566=this['editor']['plugins']['get']('Users')['me']['id'],_0x192181=kt(this['editor']['locale'],_0x5d1516?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x32ab8c,'to':_0x32ab8c,'id':this['_initialRevisionId'],'name':_0x192181,'creatorId':_0x2a7566});}}_createCurrentRevision(_0x5e2226){const _0x10b696=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x10b696),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5e2226,'to':_0x5e2226,'id':_0x10b696,'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(_0x47ebc5,_0x27aa74,_0x428d6b){const _0x68f77e={},_0x37ef26={},_0x3e4631={},_0x133484=this['editor']['config']['get']('roots')||{};for(const [_0x53305a,_0x1c38a9]of Object['entries'](_0x133484))_0x1c38a9['lazyLoad']||(_0x68f77e[_0x53305a]=_0x1c38a9['initialData']??'',_0x37ef26[_0x53305a]=_0x1c38a9['modelAttributes']||{},_0x1c38a9['modelElement']&&(_0x3e4631[_0x53305a]=_0x1c38a9['modelElement']));for(const _0x5e32ae of this['editor']['model']['document']['getRootNames']())_0x68f77e[_0x5e32ae]??='',_0x37ef26[_0x5e32ae]??={};let _0x4cb081=!0x1;const _0x538437=Object['keys'](_0x68f77e),_0x262703=Object['keys'](_0x47ebc5);for(const _0x1c2aa7 of _0x538437){if(_0x68f77e[_0x1c2aa7]!==_0x47ebc5[_0x1c2aa7]&&''!==_0x68f77e[_0x1c2aa7]['trim']()){_0x4cb081=!0x0;break;}if(!_0x19c116(_0x37ef26[_0x1c2aa7],_0x27aa74[_0x1c2aa7])&&Object['keys'](_0x37ef26[_0x1c2aa7])['length']>0x0){_0x4cb081=!0x0;break;}const _0xc4bcb0=_0x3e4631[_0x1c2aa7],_0x31224a=_0x428d6b[_0x1c2aa7];if(_0xc4bcb0&&_0x31224a&&_0xc4bcb0!==_0x31224a){_0x4cb081=!0x0;break;}}_0x4cb081||(_0x4cb081=_0x262703['some'](_0xf9e1b4=>!this['editor']['model']['document']['getRoot'](_0xf9e1b4))),_0x4cb081&&_0x4ffd83('editor-initial-data-replaced-with-revision-data',{'editorData':_0x68f77e,'editorRootsAttributes':_0x37ef26,'editorRootsModelElements':_0x3e4631,'revisionData':_0x47ebc5,'revisionRootsAttributes':_0x27aa74,'revisionRootsModelElements':_0x428d6b});for(const [_0x40dc53,_0xe24f79]of Object['entries'](_0x47ebc5))this['editor']['config']['set']('roots.'+_0x40dc53+'.initialData',_0xe24f79);for(const [_0x521bb9,_0x29df08]of Object['entries'](_0x27aa74))this['editor']['config']['set']('roots.'+_0x521bb9+'.modelAttributes',_0x29df08);const _0x51679b=this['editor']['model']['document'];for(const [_0x40c72d,_0x1e0ab3]of Object['entries'](_0x428d6b)){this['editor']['config']['set']('roots.'+_0x40c72d+'.modelElement',_0x1e0ab3);const _0x3d77a4=_0x51679b['getRoot'](_0x40c72d);_0x3d77a4&&_0x3d77a4['name']!==_0x1e0ab3&&(_0x51679b['roots']['remove'](_0x40c72d),_0x51679b['createRoot'](_0x1e0ab3,_0x40c72d));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2206f7=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2206f7['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x5d038a){const _0x2a6deb=this['repository']['getRevisions']();_0x2a6deb['reverse']();let _0x536cc1=0x0;for(;_0x536cc1<_0x2a6deb['length'];){const _0x54b269=_0x2a6deb[_0x536cc1];if(_0x54b269===this['currentRevision']){_0x536cc1++;continue;}if(_0x54b269['id']===this['_initialRevisionId'])break;const _0x10a4fb=_0x5d038a['toVersion']-_0x54b269['toVersion']||_0x5d038a['fromVersion']-_0x54b269['fromVersion'];if(_0x10a4fb>0x0)break;if(_0x10a4fb<0x0)_0x536cc1++;else{if(!_0x5d038a['creator']&&_0x54b269['creator'])break;if(_0x54b269['creator']||!_0x5d038a['creator']){if(_0x5d038a['createdAt']>_0x54b269['createdAt'])break;_0x536cc1++;}else _0x536cc1++;}}return _0x536cc1;}_getFromVersion(_0x5f4ed5){const _0x181e2a=this['repository']['getRevisions']();_0x181e2a['reverse'](),_0x181e2a['shift']();const _0x51d4d0=_0x181e2a['find'](_0x3f9d96=>_0x3f9d96['toVersion']<=_0x5f4ed5)['toVersion'];return _0x51d4d0<this['_startingVersion']?this['_startingVersion']:_0x51d4d0;}['_makeRevision']({name:_0x31f730,from:_0x523df8,to:_0x39c1a4,creatorId:_0x3403a6,id:_0x39431c}){const _0xf6738b=this['buildRevisionData']({'from':_0x523df8,'to':_0x39c1a4});_0xf6738b['name']=_0x31f730,_0xf6738b['creatorId']=_0x3403a6,_0xf6738b['id']=_0x39431c;const _0x16e98e=this['addRevisionData'](_0xf6738b);return this['adapter']&&this['_bufferUpdate'](_0xf6738b['id'],_0xf6738b,!0x0),_0x16e98e;}_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(_0x3c96d4){this['editor']=_0x3c96d4,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(_0x19def8){this['source']=_0x19def8;const _0x124973=new Map(),_0x1bad8d=new Map(),_0x1856e6=this['editor']['model']['document']['roots']['map'](_0x3b326c=>_0x3b326c['rootName']);for(const _0x9c19f8 of _0x1856e6){const _0x3c5cce=this['editor']['model']['document']['getRoot'](_0x9c19f8),_0x2b1c6e=St(_0x3c5cce);_0x124973['set'](_0x9c19f8,_0x2b1c6e),_0x1bad8d['set'](_0x9c19f8,Object['fromEntries'](_0x3c5cce['getAttributes']()));}const _0x5e562e=Array['from'](this['editor']['model']['markers'])['map'](_0x24363a=>[_0x24363a['name'],_0x24363a['getRange']()]),_0x1c9821=this['source']['version'];this['_saveMetaData'](_0x1c9821,_0x124973,_0x5e562e,_0x1bad8d),this['_startingRevisionId']=this['_revisionId'];const _0x2daa16=new Map(),_0x5296d9=new Map();for(const _0x5a898d of _0x1856e6){const _0x4865bf=Et(_0x5a898d,this['editor']['model']['document']['getRoot'](_0x5a898d)['name']);_0x2daa16['set'](_0x5a898d,_0x4865bf),_0x5296d9['set'](_0x5a898d,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2daa16,[],_0x5296d9);}getData(_0x32b878,_0x486a29){if(this['_lastFrom']===_0x32b878&&this['_lastTo']<=_0x486a29)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x486a29,!0x0);else{if(!this['_savedMetaData']['has'](_0x32b878)){const _0x240f8a=this['_getPreviousFrom'](_0x32b878);this['_calculateMetaData'](_0x240f8a,_0x32b878,!0x1);}this['_calculateMetaData'](_0x32b878,_0x486a29,!0x0);}return this['_lastFrom']=_0x32b878,this['_lastTo']=_0x486a29,this['_getState']();}loadState(_0x50d105){if(!this['_savedMetaData']['has'](_0x50d105['fromVersion'])){const _0x5796a5=this['_getPreviousFrom'](_0x50d105['fromVersion']);this['_calculateMetaData'](_0x5796a5,_0x50d105['fromVersion'],!0x1);}this['_calculateMetaData'](_0x50d105['fromVersion'],_0x50d105['toVersion'],!0x1);const _0x29a31f=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x50d105['fromVersion'],this['_lastTo']=_0x50d105['toVersion'];for(const _0x1cfb33 in _0x50d105['diffData']){const _0x86aa4c=_0x50d105['diffData'][_0x1cfb33]['attachChange'],_0x390139=_0x2b595f(_0x50d105['diffData'][_0x1cfb33]['attributesBefore'])||{},_0x2892e0=_0x50d105['diffData'][_0x1cfb33],_0x34da30=_0x29a31f['_makeModelFromViewString'](_0x2892e0['deletions'],_0x2892e0['rootElementName']||'$root');_0x34da30['rootName']=_0x1cfb33,_0x34da30['_isAttached']=!_0x86aa4c||!_0x86aa4c['isAttached'],_0x34da30['isAttached']=()=>_0x34da30['_isAttached'],this['_baseRoots']['set'](_0x1cfb33,_0x34da30),this['_baseRootsAttributes']['set'](_0x1cfb33,_0x390139),_0x86aa4c&&this['_touchedRoots']['set'](_0x1cfb33,_0x86aa4c);const _0x33a4b8=this['_makeIdsRoot'](_0x34da30);this['_baseIdsRoots']['set'](_0x1cfb33,_0x33a4b8);for(const [_0x3f2b31,_0x4ab399]of _0x34da30['markers']){if(!_0x3f2b31['startsWith']('revision:'))continue;const _0x2f7fc6=_0x3f2b31['split'](':')[0x2],_0x19fc90=_0x2892e0['aiSources']?.[_0x3f2b31]||null;for(const _0xe5d16f of _0x4ab399['getWalker']({'singleCharacters':!0x0})){const _0x91cf61=this['_getVidAttributeName'](_0xe5d16f),_0x4cc403='elementEnd'==_0xe5d16f['type']?_0xe5d16f['previousPosition']['path']['slice'](0x0,-0x1):_0xe5d16f['previousPosition']['path'],_0xc75a15=_0x33a4b8['getNodeByPath'](_0x4cc403)['getAttribute'](_0x91cf61);this['_touched']['set'](_0xc75a15,{'userId':_0x2f7fc6,'aiSource':_0x19fc90});}_0x34da30['markers']['delete'](_0x3f2b31);}}this['_startingRevisionId']=this['_revisionId'];const _0x5841a6=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3fa283=>!this['_touched']['has'](_0x3fa283));let _0x38294c=0x0;const _0x245d30=new Map();for(const _0x5cae5e in _0x50d105['diffData']){const _0x33038b=_0x50d105['diffData'][_0x5cae5e]['attachChange'],_0x5449e5=_0x2b595f(_0x50d105['diffData'][_0x5cae5e]['attributesAfter'])||{},_0x1196d4=_0x50d105['diffData'][_0x5cae5e],_0x510228=_0x29a31f['_makeModelFromViewString'](_0x1196d4['insertions'],_0x1196d4['rootElementName']||'$root');_0x510228['rootName']=_0x5cae5e,_0x510228['_isAttached']=!_0x33038b||_0x33038b['isAttached'],_0x510228['isAttached']=()=>_0x510228['_isAttached'],this['_diffRoots']['set'](_0x5cae5e,_0x510228),this['_diffRootsAttributes']['set'](_0x5cae5e,_0x5449e5);const _0x54b0e2=this['_makeIdsRoot'](_0x510228,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5cae5e,_0x54b0e2),_0x245d30['set'](_0x5cae5e,_0x510228['isAttached']()?_0x5449e5:{});for(const [_0x1773ce,_0x56bdf9]of _0x510228['markers']){if(!_0x1773ce['startsWith']('revision:'))continue;const _0x386630=_0x1773ce['split'](':')[0x2],_0x54cbeb=_0x1196d4['aiSources']?.[_0x1773ce]||null;for(const _0x2039bc of _0x56bdf9['getWalker']({'singleCharacters':!0x0})){const _0x127c5e=this['_getVidAttributeName'](_0x2039bc),_0x1650fa=this['_revisionId']++,_0x153a91='elementEnd'==_0x2039bc['type']?_0x2039bc['previousPosition']['path']['slice'](0x0,-0x1):_0x2039bc['previousPosition']['path'];_0x54b0e2['getNodeByPath'](_0x153a91)['_setAttribute'](_0x127c5e,_0x1650fa),this['_touched']['set'](_0x1650fa,{'userId':_0x386630,'aiSource':_0x54cbeb});}_0x510228['markers']['delete'](_0x1773ce);}for(const _0x3d501e of this['editor']['model']['createRangeIn'](_0x510228)['getWalker']({'singleCharacters':!0x0})){const _0xb84897=this['_getVidAttributeName'](_0x3d501e),_0x2367d3='elementEnd'==_0x3d501e['type']?_0x3d501e['previousPosition']['path']['slice'](0x0,-0x1):_0x3d501e['previousPosition']['path'],_0x5979a3=_0x54b0e2['getNodeByPath'](_0x2367d3);_0x5979a3['getAttribute'](_0xb84897)>0x0||_0x5979a3['_setAttribute'](_0xb84897,_0x5841a6[_0x38294c++]);}for(const [_0x45dadd,_0x371c99]of _0x510228['markers'])_0x45dadd['startsWith']('revision:')||this['_markers']['set'](_0x45dadd,_0x371c99);}const {roots:_0x703b9c}=this['_savedMetaData']['get'](_0x50d105['fromVersion']),{roots:_0x14590a}=this['_savedMetaData']['get'](_0x50d105['toVersion']),_0x397609=St(_0x703b9c['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x397609),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x397609,Number['NEGATIVE_INFINITY']));const _0x28438b=St(_0x14590a['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x28438b),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x28438b));const _0xd902d4=Array['from'](this['_diffRoots'])['map'](([_0x2b355c,_0x119b5e])=>[_0x2b355c,St(_0x119b5e)]);this['_saveMetaData'](this['_lastTo'],_0xd902d4,this['_markers'],_0x245d30);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0xa63876,_0x5d5447,_0x3bc3eb,_0x5f1ed5){const _0x58078d=new Map(_0x5d5447),_0x511704=new Map(_0x2b595f(_0x5f1ed5)),_0x4792fa=new Map();for(const [_0x1abcfa,_0x5f1359]of _0x3bc3eb)_0x4792fa['set'](_0x1abcfa,{'start':_0x5f1359['start']['clone'](),'end':_0x5f1359['end']['clone'](),'rootName':_0x5f1359['root']['rootName']});this['_savedMetaData']['set'](_0xa63876,{'roots':_0x58078d,'markers':_0x4792fa,'rootsAttributes':_0x511704});}_removeMetaData(_0x152a2e){this['_savedMetaData']['delete'](_0x152a2e);}_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(_0x279dc5,_0x16b962=null){let _0x2bd4ca=null;_0x279dc5['is']('documentFragment')||(_0x2bd4ca=new _0x2bedc6(_0x279dc5['name'],{'vid_start':null===_0x16b962?this['_revisionId']++:_0x16b962++}));const _0x5ab169=[];for(const _0x198074 of _0x279dc5['getChildren']())if(_0x198074['is']('element')){_0x5ab169['push'](this['_makeIdsRoot'](_0x198074,_0x16b962));const _0xfda5f6=_0x5ab169[_0x5ab169['length']-0x1];null!==_0x16b962&&(_0x16b962=_0xfda5f6['is']('element','$text')?_0xfda5f6['getAttribute']('vid')+0x1:_0xfda5f6['getAttribute']('vid_end')+0x1);}else{for(let _0x5783e2=0x0;_0x5783e2<_0x198074['offsetSize'];_0x5783e2++)_0x5ab169['push'](new _0x2bedc6('$text',{'vid':null===_0x16b962?this['_revisionId']++:_0x16b962++}));}if(_0x279dc5['is']('documentFragment')){const _0x442af8=Et(_0x279dc5['rootName'],_0x279dc5['name']);return _0x442af8['_insertChild'](0x0,_0x5ab169),_0x442af8;}return _0x2bd4ca['_setAttribute']('vid_end',null===_0x16b962?this['_revisionId']++:_0x16b962),_0x2bd4ca['_insertChild'](0x0,_0x5ab169),_0x2bd4ca;}_calculateMetaData(_0x2ade4f,_0xa7f647,_0x17c5e5){this['_reset']();const {roots:_0x41e590,markers:_0x153e7c,rootsAttributes:_0x421947}=this['_savedMetaData']['get'](_0x2ade4f);this['_baseRoots']=new Map(_0x41e590),this['_baseRootsAttributes']=new Map(_0x2b595f(_0x421947));for(const [_0x173e6c,_0x4e2051]of this['_baseRoots'])if('$graveyard'!==_0x173e6c&&(this['_diffRoots']['set'](_0x173e6c,St(_0x4e2051)),this['_diffRootsAttributes']=new Map(_0x2b595f(_0x421947)),_0x17c5e5)){const _0x565a45=this['_revisionId'];this['_idsRoots']['set'](_0x173e6c,this['_makeIdsRoot'](_0x4e2051)),this['_baseIdsRoots']['set'](_0x173e6c,this['_makeIdsRoot'](_0x4e2051,_0x565a45));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x17c5e5&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x371e60,_0x510b22]of _0x153e7c){const _0x26e65d=this['_baseRoots']['get'](_0x510b22['rootName']),_0x49a6ed=this['_diffRoots']['get'](_0x510b22['rootName']),_0x53a3c1=new _0x21ca2d(_0x11effe(_0x510b22['start'],_0x26e65d),_0x11effe(_0x510b22['end'],_0x26e65d)),_0x82300b=_0x189007(_0x53a3c1,_0x49a6ed);_0x26e65d['markers']['set'](_0x371e60,_0x53a3c1),this['_markers']['set'](_0x371e60,_0x82300b);}this['_applyOperations'](_0x2ade4f,_0xa7f647,_0x17c5e5);}_applyOperations(_0x34dcff,_0x322a35,_0x3ad617){for(const _0x41b3e3 of this['source']['getOperations'](_0x34dcff,_0x322a35))this['_handleOperation'](_0x41b3e3,_0x3ad617);for(const _0x595dc8 of this['_diffRoots']['values']())_0x595dc8['markers']['clear']();for(const [_0x5aac08,_0x4674cd]of this['_markers'])this['_diffRoots']['get'](_0x4674cd['root']['rootName'])['markers']['set'](_0x5aac08,_0x4674cd['clone']());const _0x3c805b=new Map(),_0x4b8924=new Map();for(const [_0x3d6053,_0x524948]of this['_diffRoots'])_0x3c805b['set'](_0x3d6053,St(_0x524948)),_0x4b8924['set'](_0x3d6053,this['_diffRootsAttributes']['get'](_0x3d6053));this['_saveMetaData'](_0x322a35,_0x3c805b,this['_markers'],_0x4b8924);}_getPreviousFrom(_0x193f7d){const _0xc69852=Array['from'](this['_savedMetaData']['keys']());_0xc69852['sort']((_0x28c656,_0x38bbd1)=>_0x28c656-_0x38bbd1),_0xc69852['reverse']();for(const _0x14d237 of _0xc69852)if(_0x14d237<_0x193f7d)return _0x14d237;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4e4038,_0x28c2db){const _0x475401=Array['from'](_0x28c2db['markers'])['map'](([_0x51f40c,_0x145700])=>[_0x51f40c,_0x189007(_0x145700,_0x4e4038)]);_0x4e4038['markers']=new Map(_0x475401);}_transformMarkers(_0x24e5f5){for(const _0x287063 of this['_markers']['values']()){const _0x4ae838=_0x287063['getTransformedByOperation'](_0x24e5f5),_0x451d0b=_0x21ca2d['_createFromRanges'](_0x4ae838);_0x287063['start']=_0x451d0b['start'],_0x287063['end']=_0x451d0b['end'];}}_handleOperation(_0x2ae06e,_0x31feaa){if('addRoot'!=_0x2ae06e['type']&&'detachRoot'!=_0x2ae06e['type']){if('insert'==_0x2ae06e['type']){const _0x3ceb2a=_0x2ae06e['position']['root'],_0x3f5c3a=_0x3ceb2a['rootName'],_0x1d6504=_0x3ceb2a['name'];this['_diffRoots']['has'](_0x3f5c3a)||(this['_diffRoots']['set'](_0x3f5c3a,Et(_0x3f5c3a,_0x1d6504,!0x0)),this['_diffRootsAttributes']['set'](_0x3f5c3a,{}),_0x31feaa&&this['_idsRoots']['set'](_0x3f5c3a,Et(_0x3f5c3a,_0x1d6504,!0x0)));}else{if('addRootAttribute'==_0x2ae06e['type']||'removeRootAttribute'==_0x2ae06e['type']||'changeRootAttribute'==_0x2ae06e['type'])return void this['_handleRootAttributeOperation'](_0x2ae06e);'marker'==_0x2ae06e['type']&&this['_handleMarkerOperation'](_0x2ae06e);}if('marker'!==_0x2ae06e['type']){const _0x5c1455=this['_cloneOperation'](_0x2ae06e,this['_diffRoots']);_0x5c1455['_execute'](),this['_transformMarkers'](_0x5c1455);}if(_0x31feaa)switch(_0x2ae06e['type']){case'insert':this['_handleInsertOperation'](_0x2ae06e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2ae06e);break;case'merge':this['_handleMergeOperation'](_0x2ae06e);break;case'split':this['_handleSplitOperation'](_0x2ae06e);}}else this['_handleRootOperation'](_0x2ae06e,_0x31feaa);}_cloneOperation(_0x3f5cfa,_0x336853){const _0x325905=_0x3f5cfa['clone']();return _0x325905['_authorId']=_0x3f5cfa['_authorId'],_0x325905['_aiSource']=_0x3f5cfa['_aiSource'],_0x325905['baseVersion']=null,_0x2424b3(_0x325905,_0x336853),_0x325905;}_getBaseVids(_0x56931a){return _0x56931a['map'](_0x5204cd=>{const _0x10e7e2=this['_getVidAttributeName'](_0x5204cd);return Number(_0x5204cd['item']['getAttribute'](_0x10e7e2));});}_generateTape(_0x15aac3,_0x130b20){if(_0x15aac3['is']('element','$text'))_0x130b20['push']({'item':_0x15aac3,'type':'text'});else{_0x15aac3['is']('element')&&_0x130b20['push']({'item':_0x15aac3,'type':'elementStart'});for(const _0x5f594f of _0x15aac3['getChildren']())this['_generateTape'](_0x5f594f,_0x130b20);_0x15aac3['is']('element')&&_0x130b20['push']({'item':_0x15aac3,'type':'elementEnd'});}return _0x130b20;}_getState(){const _0x3f4227=new Map(this['_touched']),_0x4bacee=new Map(_0x3f4227),_0x9786da=new Map(),_0x4e76da={'insertions':{},'deletions':{}},_0x431152={'insertions':{},'deletions':{}},_0x1d43b5=new Map(),_0x36e003=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x2952e6=new Map();_0x36e003['delete']('$graveyard');for(const _0x74bfd0 of _0x36e003){const _0x2fb8c4=(this['_diffRoots']['get'](_0x74bfd0)??this['_baseRoots']['get'](_0x74bfd0))['name'],_0x260c3a=this['_diffRoots']['get'](_0x74bfd0)||Et(_0x74bfd0,_0x2fb8c4,!0x1),_0x5bc6a0=this['_baseRoots']['get'](_0x74bfd0)||Et(_0x74bfd0,_0x2fb8c4,!0x1);_0x260c3a['isAttached']()||_0x5bc6a0['isAttached']()?(_0x2952e6['set'](_0x74bfd0,_0x2fb8c4),_0x4e76da['insertions'][_0x74bfd0]=St(_0x260c3a),_0x4e76da['deletions'][_0x74bfd0]=St(_0x5bc6a0),this['_copyMarkers'](_0x4e76da['deletions'][_0x74bfd0],_0x5bc6a0),this['_copyMarkers'](_0x4e76da['insertions'][_0x74bfd0],_0x260c3a),_0x431152['insertions'][_0x74bfd0]=this['_generateTape'](this['_idsRoots']['get'](_0x74bfd0),[]),_0x431152['deletions'][_0x74bfd0]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x74bfd0)||Et(_0x74bfd0,_0x2fb8c4,!0x1),[])):_0x36e003['delete'](_0x74bfd0);}for(const _0x251a38 of _0x36e003){const _0x57033a=_0x431152['insertions'][_0x251a38];for(const _0x19da0a of _0x57033a){const _0x34166d=this['_getVidAttributeName'](_0x19da0a),_0x32eee6=_0x19da0a['item']['getAttribute'](_0x34166d);_0x4bacee['delete'](_0x32eee6),_0x32eee6>=this['_startingRevisionId']&&_0x9786da['set'](_0x32eee6,_0x3f4227['get'](_0x32eee6));}}for(const _0x410e1e of _0x36e003){const _0x156d67=_0x431152['insertions'][_0x410e1e],_0x5f1148=this['_getBaseVids'](_0x431152['deletions'][_0x410e1e]);let _0x4c76bb=0x0;for(const _0x1ea2a9 of _0x156d67){const _0x314904=this['_getVidAttributeName'](_0x1ea2a9),_0x1f3da7=_0x1ea2a9['item']['getAttribute'](_0x314904);if(!_0x9786da['has'](_0x1f3da7)&&!_0x1d43b5['has'](_0x1f3da7)){if(_0x4bacee['has'](_0x1f3da7))_0x4c76bb++;else{if(_0x1f3da7!=_0x5f1148[_0x4c76bb]){const _0x40e468=_0x3f4227['get'](_0x1f3da7)||_0x3f4227['get'](_0x5f1148[_0x4c76bb]);for(;_0x1f3da7!=_0x5f1148[_0x4c76bb];)_0x4bacee['has'](_0x5f1148[_0x4c76bb])||(_0x1d43b5['set'](_0x5f1148[_0x4c76bb],_0x40e468),_0x3f4227['set'](_0x5f1148[_0x4c76bb],_0x40e468)),_0x4c76bb++;}_0x4c76bb++;}}}}for(const _0x19fdf6 of _0x36e003){const _0x168ca5=_0x431152['insertions'][_0x19fdf6];for(const _0xca5eea of _0x168ca5){const _0x16a193=this['_getVidAttributeName'](_0xca5eea),_0x146aa6=_0xca5eea['item']['getAttribute'](_0x16a193);if(_0x1d43b5['has'](_0x146aa6)){const _0x21e9b4=_0x1d43b5['get'](_0x146aa6);_0x4bacee['has'](_0x146aa6)||_0x4bacee['set'](_0x146aa6,{..._0x21e9b4}),_0x9786da['set'](_0x146aa6,{..._0x21e9b4});}}}for(const _0x3444bc of _0x4bacee['keys']())_0x3444bc>=this['_startingRevisionId']&&_0x4bacee['delete'](_0x3444bc);const _0x358f26=new Map();for(const _0x10ca5c of _0x36e003){let _0x2b2c66=_0x431152['insertions'][_0x10ca5c];for(const _0x16f2d8 of _0x2b2c66)if(_0x16f2d8['item']['is']('element','tableCell')){const _0x59ae5c=this['_getVidAttributeName'](_0x16f2d8),_0x40cd7c=_0x16f2d8['item']['getAttribute'](_0x59ae5c);if(_0x9786da['has'](_0x40cd7c)){const _0xe1f742=_0x16f2d8['item']['parent']['parent']['getAttribute']('vid_start'),_0x212c3f=_0x9786da['get'](_0x40cd7c),_0x43ec4c=_0x358f26['get'](_0xe1f742)||{'users':new Set(),'aiSource':null};_0x43ec4c['users']['add'](_0x212c3f['userId']),_0x43ec4c['aiSource']=_0x43ec4c['aiSource']||_0x212c3f['aiSource']||null,_0x358f26['set'](_0xe1f742,_0x43ec4c);}}_0x2b2c66=_0x431152['deletions'][_0x10ca5c];for(const _0xd2eb59 of _0x2b2c66)if(_0xd2eb59['item']['is']('element','tableCell')){const _0x183ba0=this['_getVidAttributeName'](_0xd2eb59),_0x537074=_0xd2eb59['item']['getAttribute'](_0x183ba0);if(_0x4bacee['has'](_0x537074)){const _0x52a9bb=_0xd2eb59['item']['parent']['parent']['getAttribute']('vid_start'),_0x53fa98=_0x4bacee['get'](_0x537074),_0x3b3bfd=_0x358f26['get'](_0x52a9bb)||{'users':new Set(),'aiSource':null};_0x3b3bfd['users']['add'](_0x53fa98['userId']),_0x3b3bfd['aiSource']=_0x3b3bfd['aiSource']||_0x53fa98['aiSource']||null,_0x358f26['set'](_0x52a9bb,_0x3b3bfd);}}for(const _0x7d831f of _0x358f26['keys']())(_0x9786da['has'](_0x7d831f)||_0x4bacee['has'](_0x7d831f))&&_0x358f26['delete'](_0x7d831f);}for(const _0x1e9239 of _0x36e003){const _0x1b476d=_0x431152['insertions'][_0x1e9239];let _0x4923e9=null,_0x57be0b=null,_0x11475e=null;for(const _0x1c1260 of _0x1b476d){const _0x268675=this['_getVidAttributeName'](_0x1c1260),_0x3389b3=_0x1c1260['item']['getAttribute'](_0x268675),_0x6020ce=_0x358f26['get'](_0x3389b3);if(_0x6020ce&&'elementStart'==_0x1c1260['type']&&(_0x4923e9=Array['from'](_0x6020ce['users'])[0x0],_0x57be0b=_0x6020ce['aiSource'],_0x11475e=_0x1c1260['item']['getAttribute']('vid_end')),_0x4923e9){const _0x54fff3=_0x57be0b||_0x4bacee['get'](_0x3389b3)?.['aiSource']||null,_0x39e7fa=_0x57be0b||_0x9786da['get'](_0x3389b3)?.['aiSource']||null;_0x4bacee['set'](_0x3389b3,{'userId':_0x4923e9,'aiSource':_0x54fff3}),_0x9786da['set'](_0x3389b3,{'userId':_0x4923e9,'aiSource':_0x39e7fa});}_0x3389b3==_0x11475e&&(_0x4923e9=null,_0x11475e=null);}}const _0x17291e={},_0xa27345=new Set();for(const _0x2aee67 of _0x36e003){const _0x12ff8f=_0x4e76da['deletions'][_0x2aee67],_0xbbb5c1=_0x4e76da['insertions'][_0x2aee67];for(const {userId:_0x2500a7}of this['_touchedMarkers']['values']())null!==_0x2500a7&&_0xa27345['add'](_0x2500a7);for(const {userId:_0x2ac5ae}of this['_touchedRoots']['values']())null!==_0x2ac5ae&&_0xa27345['add'](_0x2ac5ae);const _0x7349e6={};this['_markChanges'](_0xbbb5c1,_0x431152['insertions'][_0x2aee67],_0x9786da,'insertion',_0xa27345,_0x7349e6),this['_markChanges'](_0x12ff8f,_0x431152['deletions'][_0x2aee67],_0x4bacee,'deletion',_0xa27345,_0x7349e6),this['_collectSuggestionAiSources'](_0xbbb5c1,_0x7349e6),this['_collectSuggestionAiSources'](_0x12ff8f,_0x7349e6),_0x17291e[_0x2aee67]={'insertions':this['_prepareViewToSave'](_0xbbb5c1),'deletions':this['_prepareViewToSave'](_0x12ff8f),'attachChange':this['_touchedRoots']['get'](_0x2aee67)||null,'attributesBefore':_0x2b595f(this['_baseRootsAttributes']['get'](_0x2aee67))||{},'attributesAfter':_0x2b595f(this['_diffRootsAttributes']['get'](_0x2aee67)),'rootElementName':_0x2952e6['get'](_0x2aee67),'aiSources':_0x7349e6};}const _0x1d6d06=Array['from'](_0x9786da['values']())['some'](_0x4cab87=>!(!_0x4cab87||!_0x4cab87['aiSource']))||Array['from'](_0x4bacee['values']())['some'](_0x211ec0=>!(!_0x211ec0||!_0x211ec0['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x5bee75=>this['_aiTouchedMarkers']['has'](_0x5bee75));return{'diffData':_0x17291e,'authorsIds':Array['from'](_0xa27345),'hasAIChanges':_0x1d6d06};}_collectSuggestionAiSources(_0x58654b,_0x28c5f3){const _0x272b5f=_0x58654b['markers'];for(const _0x471d12 of _0x272b5f['keys']()){if(!_0x471d12['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x471d12))continue;const _0x48ef59=this['_aiTouchedMarkers']['get'](_0x471d12);_0x48ef59&&(_0x28c5f3[_0x471d12]=_0x48ef59);}}_processRootBeforeSave(_0x4a2d7d){for(const [,_0x179654]of _0x4a2d7d['markers']){const _0x36c68e=_0x179654['start']['getAncestors']()['filter'](_0x126179=>'tableCell'==_0x126179['name']);for(const _0x304082 of _0x36c68e)0x1==_0x304082['childCount']&&_0x304082['getChild'](0x0)['is']('element','paragraph')&&_0x304082['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x11880b){this['_processRootBeforeSave'](_0x11880b);const _0x5d7d23=this['editor']['data']['toView'](_0x11880b,{}),_0x3c7ca4=Array['from'](_0x5d7d23['getChildren']())['map'](_0x1fcd87=>this['_getViewJson'](_0x1fcd87));return JSON['stringify'](_0x3c7ca4);}_getViewJson(_0x1994a3){if(_0x1994a3['is']('$text'))return _0x1994a3['data'];{const _0x14e312=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x271b5e=_0x1994a3,_0x44d44b=this['editor']['data']['htmlProcessor']['domConverter'],_0x4e9968={'type':_0x14e312['_getTypeCharForViewElement'](_0x271b5e),'name':_0x271b5e['name'],'attributes':Array['from'](_0x271b5e['getAttributes']()),'children':Array['from'](_0x271b5e['getChildren']())['map'](_0x4f5b41=>this['_getViewJson'](_0x4f5b41))};if(_0x1994a3['is']('uiElement')&&'$comment'!=_0x1994a3['name']){const _0x5d10e2=_0x1994a3['render'](_0x44d44b['domDocument'],_0x44d44b);_0x4e9968['children']['push'](_0x5d10e2['outerHTML']);}else{if(_0x1994a3['is']('rawElement')){const _0x4dff60=_0x44d44b['domDocument']['createElement'](_0x271b5e['name']);_0x1994a3['render'](_0x4dff60,_0x44d44b),_0x4e9968['children']['push'](_0x4dff60['innerHTML']);}}const _0x2f7da2=Array['from'](_0x271b5e['getCustomProperties']());_0x2f7da2['length']>0x0&&(_0x4e9968['customProperties']=_0x2f7da2);const _0x20b64c=_0x271b5e['getFillerOffset']();return null!==_0x20b64c&&(_0x4e9968['fillerOffset']=_0x20b64c),_0x4e9968;}}['_markChanges'](_0x245c0e,_0x50e7ae,_0x1525f2,_0x254208,_0x299595,_0x335ff2){let _0x51cfcc=null,_0xe78951=null,_0x1933f8=0x0;const _0x289a1c=this['editor']['model'];for(let _0x4fb59b=0x0;_0x4fb59b<_0x50e7ae['length'];_0x4fb59b++){const _0x5c3a0e=this['_getVidAttributeName'](_0x50e7ae[_0x4fb59b]),_0x443713=_0x50e7ae[_0x4fb59b]['item']['getAttribute'](_0x5c3a0e),_0x5c9618=_0x1525f2['get'](_0x443713),_0x3fde31=_0x4fb59b==_0x50e7ae['length']-0x1;!_0x51cfcc&&_0x5c9618&&(_0x51cfcc=_0x5c9618,_0xe78951=_0x50e7ae[_0x4fb59b]);const _0x5692e1=!!_0x51cfcc&&!!_0x5c9618&&_0x5c9618['userId']!=_0x51cfcc['userId'],_0x4ffd67=!!_0x51cfcc&&!!_0x5c9618&&_0x5c9618['aiSource']!=_0x51cfcc['aiSource'];_0x51cfcc&&(!_0x5c9618||_0x5692e1||_0x4ffd67)&&(_0x396b06(_0x5c9618,Ot(_0xe78951,_0x245c0e,_0x289a1c),Ot(_0x50e7ae[_0x4fb59b],_0x245c0e,_0x289a1c)),_0x51cfcc=_0x5c9618||null,_0xe78951=_0x5c9618?_0x50e7ae[_0x4fb59b]:null),_0x51cfcc&&_0x3fde31&&_0x396b06(_0x5c9618,Ot(_0xe78951,_0x245c0e,_0x289a1c),Ct(_0x50e7ae[_0x4fb59b],_0x245c0e,_0x289a1c));}function _0x396b06(_0x5e1bf4,_0x575962,_0x15d20b){const _0x3eab25=_0x51cfcc['userId'],_0x33c76b=_0x51cfcc['aiSource'],_0x514be0='revision:'+_0x254208+':'+_0x3eab25+':'+_0x1933f8++,_0x5263fa=_0x289a1c['createRange'](_0x575962,_0x15d20b);_0x245c0e['markers']['set'](_0x514be0,_0x5263fa),_0x33c76b&&(_0x335ff2[_0x514be0]=_0x33c76b),null!==_0x3eab25&&_0x299595['add'](_0x3eab25);}}_getVidAttributeName(_0x24e473){switch(_0x24e473['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x1c9900){const _0xc4f0ae=this['_idsRoots']['get'](_0x1c9900['position']['root']['rootName']),_0x5879ed=_0x11effe(_0x1c9900['position'],_0xc4f0ae),_0x4ce445=null===_0x1c9900['_authorId']?null:_0x1c9900['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4b0966=_0x1c9900['_aiSource']||null,_0x2a729b=_0x5879ed['parent'],_0x4ddc0b=this['_revisionId'],_0x532a3c=[];for(const _0x3dd26d of _0x1c9900['nodes'])if(_0x3dd26d['is']('element'))_0x532a3c['push'](this['_makeIdsRoot'](_0x3dd26d));else{for(let _0xbff207=0x0;_0xbff207<_0x3dd26d['offsetSize'];_0xbff207++)_0x532a3c['push'](new _0x2bedc6('$text',{'vid':this['_revisionId']++}));}const _0x508631=this['_revisionId'];for(let _0xa19c0a=_0x4ddc0b;_0xa19c0a<_0x508631;_0xa19c0a++)this['_touched']['set'](_0xa19c0a,{'userId':_0x4ce445,'aiSource':_0x4b0966});_0x2a729b['_insertChild'](_0x5879ed['offset'],_0x532a3c);}_setTouched(_0x44b28b,_0x5456f8,_0x4768f1){this['_touched']['set'](_0x44b28b,{'userId':_0x5456f8,'aiSource':_0x4768f1||this['_touched']['get'](_0x44b28b)?.['aiSource']||null});}_handleMoveOperation(_0x5d9f17){(_0x5d9f17=this['_cloneOperation'](_0x5d9f17,this['_idsRoots']))['_execute']();const _0x355d17=null===_0x5d9f17['_authorId']?null:_0x5d9f17['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x193918=_0x5d9f17['_aiSource']||null,_0x77f5e8=_0x5d9f17['getMovedRangeStart'](),_0x29c949=_0x77f5e8['parent'],_0x10e549=_0x77f5e8['offset'],_0x5030dd=(_0x4e3e77,_0x3e4399,_0x51455c)=>{for(let _0x1b2554=_0x3e4399;_0x1b2554<_0x51455c;_0x1b2554++){const _0x4ba754=_0x4e3e77['getChild'](_0x1b2554);_0x4ba754['is']('element','$text')?this['_setTouched'](_0x4ba754['getAttribute']('vid'),_0x355d17,_0x193918):(this['_setTouched'](_0x4ba754['getAttribute']('vid_start'),_0x355d17,_0x193918),_0x5030dd(_0x4ba754,0x0,_0x4ba754['childCount']),this['_setTouched'](_0x4ba754['getAttribute']('vid_end'),_0x355d17,_0x193918));}};_0x5030dd(_0x29c949,_0x10e549,_0x10e549+_0x5d9f17['howMany']);}_handleMergeOperation(_0x5bd084){const _0x29273c=null===(_0x5bd084=this['_cloneOperation'](_0x5bd084,this['_idsRoots']))['_authorId']?null:_0x5bd084['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43fcf2=_0x5bd084['_aiSource']||null,_0x3e8a1b=_0x5bd084['targetPosition']['parent'],_0x410e58=_0x5bd084['sourcePosition']['parent'],_0x107a24=_0x3e8a1b['getAttribute']('vid_end'),_0x39fa0a=_0x410e58['getAttribute']('vid_start');_0x3e8a1b['_setAttribute']('vid_end',_0x410e58['getAttribute']('vid_end')),_0x410e58['_setAttribute']('vid_end',_0x107a24),this['_setTouched'](_0x39fa0a,_0x29273c,_0x43fcf2),this['_setTouched'](_0x107a24,_0x29273c,_0x43fcf2),_0x5bd084['_execute']();}_handleSplitOperation(_0x3d0390){const _0x423f62=null===(_0x3d0390=this['_cloneOperation'](_0x3d0390,this['_idsRoots']))['_authorId']?null:_0x3d0390['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5d647e=_0x3d0390['_aiSource']||null,_0x41912f=_0x3d0390['graveyardPosition'],_0x4464db=_0x3d0390['splitPosition']['parent'];_0x3d0390['_execute']();const _0x4e1505=_0x4464db['getAttribute']('vid_end'),_0x104a9b=_0x3d0390['insertionPosition']['nodeAfter'];if(_0x41912f){const _0x367b91=_0x104a9b['getAttribute']('vid_end'),_0x46a589=_0x4464db['getAttribute']('vid_end');_0x4464db['_setAttribute']('vid_end',_0x367b91),_0x104a9b['_setAttribute']('vid_end',_0x46a589),this['_setTouched'](_0x4464db['getAttribute']('vid_end'),_0x423f62,_0x5d647e),this['_setTouched'](_0x104a9b['getAttribute']('vid_start'),_0x423f62,_0x5d647e);}else{const _0x5c449c=this['_revisionId']++,_0x1b6c3f=this['_revisionId']++;_0x4464db['_setAttribute']('vid_end',_0x5c449c),_0x104a9b['_setAttribute']('vid_start',_0x1b6c3f),_0x104a9b['_setAttribute']('vid_end',_0x4e1505),this['_setTouched'](_0x5c449c,_0x423f62,_0x5d647e),this['_setTouched'](_0x1b6c3f,_0x423f62,_0x5d647e);}}_handleMarkerOperation(_0x13dbde){if(!_0x13dbde['affectsData'])return;const _0x2676bf=(_0x13dbde=this['_cloneOperation'](_0x13dbde,this['_diffRoots']))['oldRange']?_0x13dbde['oldRange']['root']:null,_0x5c2726=_0x13dbde['newRange']?_0x13dbde['newRange']['root']:null;_0x2676bf&&this['_markers']['delete'](_0x13dbde['name']),_0x5c2726&&this['_markers']['set'](_0x13dbde['name'],_0x13dbde['newRange']['clone']());const _0x5ef36a=null===_0x13dbde['_authorId']?null:_0x13dbde['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x304e34=_0x13dbde['name'];if(_0x13dbde['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x304e34,_0x13dbde['_aiSource']),!this['_touchedMarkers']['has'](_0x304e34))return void this['_touchedMarkers']['set'](_0x304e34,{'range':_0x13dbde['oldRange'],'userId':_0x5ef36a});const _0x3b76ba=this['_touchedMarkers']['get'](_0x304e34),_0x586e81=_0x3b76ba['range'],_0x1c3148=_0x13dbde['newRange'];null==_0x586e81&&null==_0x1c3148||_0x586e81&&_0x1c3148&&_0x586e81['isEqual'](_0x1c3148)?this['_touchedMarkers']['delete'](_0x13dbde['name']):_0x3b76ba['userId']=_0x5ef36a;}_handleRootOperation(_0x4dafd4,_0x45fe2b){this['_diffRoots']['has'](_0x4dafd4['rootName'])?this['_diffRoots']['get'](_0x4dafd4['rootName'])['_isAttached']=_0x4dafd4['isAdd']:(this['_diffRoots']['set'](_0x4dafd4['rootName'],Et(_0x4dafd4['rootName'],_0x4dafd4['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x4dafd4['rootName'],{}),_0x45fe2b&&this['_idsRoots']['set'](_0x4dafd4['rootName'],Et(_0x4dafd4['rootName'],_0x4dafd4['elementName'],!0x0)));const _0xcc66e3=null===_0x4dafd4['_authorId']?null:_0x4dafd4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xb60279=this['_touchedRoots']['get'](_0x4dafd4['rootName']);_0xb60279&&_0xb60279['userId']===_0xcc66e3?this['_touchedRoots']['delete'](_0x4dafd4['rootName']):this['_touchedRoots']['set'](_0x4dafd4['rootName'],{'userId':_0xcc66e3,'isAttached':_0x4dafd4['isAdd']});}_handleRootAttributeOperation(_0x3c4471){const _0xb5e973=this['_diffRootsAttributes']['get'](_0x3c4471['root']['rootName']);null===_0x3c4471['newValue']?delete _0xb5e973[_0x3c4471['key']]:_0xb5e973[_0x3c4471['key']]=_0x3c4471['newValue'];}};function St(_0x12e3cd){const _0x1a93cb=Et(_0x12e3cd['rootName'],_0x12e3cd['name'],_0x12e3cd['isAttached']());for(const _0x529db0 of _0x12e3cd['getChildren']()){const _0x5ab486=_0x529db0['_clone'](!0x0);_0x1a93cb['_appendChild'](_0x5ab486);}return _0x1a93cb;}function Et(_0x1ab669,_0x49c765,_0x4234a3=!0x0){const _0x4d3a83=new _0x411dfa();return _0x4d3a83['rootName']=_0x1ab669,_0x4d3a83['name']=_0x49c765,_0x4d3a83['_isAttached']=_0x4234a3,_0x4d3a83['isAttached']=()=>_0x4d3a83['_isAttached'],_0x4d3a83;}function Ot(_0x15143f,_0x3468fd,_0x3227e8){const _0x5ad581='elementEnd'==_0x15143f['type']?_0x3227e8['createPositionAt'](_0x15143f['item'],'end'):_0x3227e8['createPositionBefore'](_0x15143f['item']);return _0x3227e8['createPositionFromPath'](_0x3468fd,_0x5ad581['path'],_0x5ad581['stickiness']);}function Ct(_0xe15d05,_0x4b5974,_0x3e0ad4){const _0x1f4f83='elementStart'==_0xe15d05['type']?_0x3e0ad4['createPositionAt'](_0xe15d05['item'],0x0):_0x3e0ad4['createPositionAfter'](_0xe15d05['item']);return _0x3e0ad4['createPositionFromPath'](_0x4b5974,_0x1f4f83['path'],_0x1f4f83['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x3e0f7e();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x57ac42){super(),this['id']=_0x57ac42['id']||_0x164a82(),this['author']=_0x57ac42['author'],this['type']=_0x57ac42['type'],this['data']=_0x57ac42['data']||{},this['rootName']=_0x57ac42['rootName'],this['set']('createdAt',_0x57ac42['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1d002b,_0x1e1bb2){this['newRevisionId']=_0x1d002b,this['oldRevisionId']=_0x1e1bb2,this['changes']=new _0x29b214();}_setChanges(_0x2ad811){for(const _0x470d68 of _0x2ad811)this['changes']['add'](_0x470d68);}},Pt=class extends _0x149c71{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[_0x1b7fe0,_0x18d040,bt,Rt];}constructor(_0x50d058){super(_0x50d058),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',(_0x5ec4f6,_0x41fa69,_0x2647ba)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x392eaa=>{for(const _0x59b708 of this['editor']['editing']['view']['document']['roots'])_0x2647ba?_0x392eaa['removeClass']('ck-editor__editable__overlay',_0x59b708):_0x392eaa['addClass']('ck-editor__editable__overlay',_0x59b708);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x48ff8a=>null!==_0x48ff8a),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x29ce31,_0xb4c96b,_0x9c5999)=>_0x29ce31&&_0x9c5999?_0xb4c96b['changes']['getIndex'](_0x9c5999):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x471aa4,_0x11e0e3)=>_0x471aa4?_0x11e0e3['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x18d040),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x357645=this['editor'],_0x2c4605=new $t(_0x357645,{'direction':'backward'}),_0x50050d=new $t(_0x357645,{'direction':'forward'});_0x357645['commands']['add']('showPreviousChange',_0x2c4605),_0x357645['commands']['add']('showNextChange',_0x50050d),_0x357645['commands']['add']('restoreRevision',new Ft(_0x357645)),this['on']('change:numberOfChanges',()=>{_0x2c4605['refresh'](),_0x50050d['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x357645['enableReadOnlyMode']('revision-viewer'),_0x357645['plugins']['has']('WidgetToolbarRepository')&&_0x357645['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x5ad16e){return await this['_utils']['loadRevisionData'](_0x5ad16e,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5ad16e);}async getRevisionRootsAttributes(_0x4fa5a0){return await this['_utils']['loadRevisionData'](_0x4fa5a0,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4fa5a0);}async['compare'](_0x19428a,_0xdd60d6,_0x78a3c0=!0x1){if(!this['isEnabled'])return;const _0x2cce15=this['diff'],_0x1f56c3=this['repository'],_0x58774e='string'==typeof _0x19428a?_0x1f56c3['getRevision'](_0x19428a):_0x19428a,_0x407f38='string'==typeof _0xdd60d6?_0x1f56c3['getRevision'](_0xdd60d6):_0xdd60d6,_0x268c4b=_0x58774e['id'],_0xb93408=_0x407f38?_0x407f38['id']:null;if(!_0x78a3c0&&this['diff']&&this['diff']['newRevisionId']===_0x268c4b&&this['diff']['oldRevisionId']===_0xb93408)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x268c4b,_0xb93408);const _0x1f11bc=this['_getRevisionsRange'](_0x58774e,_0x407f38,!0x0)['map'](_0x174c38=>this['_utils']['loadRevisionData'](_0x174c38,this['adapter']));return _0x1f11bc['push'](new Promise(_0x1fcd80=>{setTimeout(_0x1fcd80,0x14);})),Promise['all'](_0x1f11bc)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x464665=this['_getDiff'](_0x268c4b,_0xb93408);this['_cleanUpCommentMarkers'](_0x464665);for(const _0x18c843 of _0x464665['changes'])this['_changeIdToChange']['set'](_0x18c843['id'],_0x18c843);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x6ccb32=>{for(const _0x1c57bd of this['editor']['model']['document']['getRootNames']())_0x6ccb32['detachRoot'](_0x1c57bd);for(const _0x125613 of Object['keys'](_0x464665['model'])){const _0x5af6a1=_0x464665['model'][_0x125613]['name'],_0x1cb669=_0x6ccb32['addRoot'](_0x125613,_0x5af6a1);for(const _0xee72f of Object['keys'](_0x464665['attributes'][_0x125613]))_0x6ccb32['setAttribute'](_0xee72f,_0x464665['attributes'][_0x125613][_0xee72f],_0x1cb669);_0x6ccb32['insert'](_0x464665['model'][_0x125613],_0x1cb669,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x464665['changes'])),this['isReady']=!0x0;})['catch'](_0x16b521=>{console['error'](_0x16b521),this['_cleanUp'](),_0x2cce15&&(this['diff']=_0x2cce15),this['isReady']=!0x0;});}addRevisionData(_0x3f9473,_0x4654c4){const _0x5570e3=this['repository']['createRevision'](_0x3f9473);return _0x5570e3['on']('_update',(_0x4b87e1,_0x490551,_0x4482b4)=>_0x4654c4(_0x490551,_0x4482b4,_0x5570e3)),this['repository']['addRevision'](_0x5570e3),_0x5570e3;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x48cbe0=>{for(const _0x38832d of this['editor']['model']['document']['getRootNames']())_0x48cbe0['detachRoot'](_0x38832d);});}_cleanUpCommentMarkers(_0x47be3c){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x3a4a85=this['_getVisibleCommentThreadIds']();for(const _0x57e258 of Object['values'](_0x47be3c['model']))for(const _0x1f5e03 of Array['from'](_0x57e258['markers']['keys']()))_0x1f5e03['startsWith']('revision-comment:')&&!_0x3a4a85['has'](Ut(_0x1f5e03))&&_0x57e258['markers']['delete'](_0x1f5e03);}_sortAndFilterDiffChanges(_0x38920a){const _0x466de6=[],_0x131ff7=new Map();for(const _0x5f0e65 of this['editor']['model']['document']['getRootNames']()){const _0x2e57b0=this['editor']['editing']['view']['getDomRoot'](_0x5f0e65);if(!_0x2e57b0)continue;const _0x14ee03=_0x2e57b0['getClientRects']()['item'](0x0);_0x14ee03&&(_0x466de6['push'](_0x5f0e65),_0x131ff7['set'](_0x5f0e65,_0x14ee03));}return _0x466de6['sort']((_0x5efdcd,_0x4d78a8)=>{const _0x3ccc75=_0x131ff7['get'](_0x5efdcd),_0x3d222e=_0x131ff7['get'](_0x4d78a8);return _0x3ccc75['y']-_0x3d222e['y']||_0x3ccc75['x']-_0x3d222e['x'];}),(_0x38920a=_0x38920a['filter'](_0x3f1e00=>_0x466de6['includes'](_0x3f1e00['rootName'])))['sort']((_0x513d08,_0x3e96e4)=>_0x466de6['indexOf'](_0x513d08['rootName'])-_0x466de6['indexOf'](_0x3e96e4['rootName'])),_0x38920a;}['_makeTape'](_0x16a465,_0x37710a={}){const _0x33989e=Array['from'](_0x16a465['markers'])['filter'](([_0x2d0c81,_0x2b5c5c])=>_0x2d0c81['startsWith']('revision:')&&!_0x2b5c5c['isCollapsed']),_0x20c213=Array['from'](this['editor']['model']['createRangeIn'](_0x16a465)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x33989e['length'])for(const _0xaa2b34 of _0x20c213){const [_0x301df6,_0x4638b9]=_0x33989e[0x0],[,_0x3a9c62,_0x3ca69b]=_0x301df6['split'](':'),_0x421e9a=_0x37710a[_0x301df6]||null;if(_0x4638b9['end']['isEqual'](_0xaa2b34['nextPosition'])&&_0x33989e['shift'](),(_0xaa2b34['previousPosition']['isEqual'](_0x4638b9['start'])||_0xaa2b34['previousPosition']['isAfter'](_0x4638b9['start']))&&('insertion'==_0x3a9c62?_0xaa2b34['isAdded']={'userId':_0x3ca69b,'aiSource':_0x421e9a}:'deletion'==_0x3a9c62&&(_0xaa2b34['isRemoved']={'userId':_0x3ca69b,'aiSource':_0x421e9a})),0x0==_0x33989e['length'])break;}return _0x20c213;}_refreshStartEndIndex(_0x259ae3){const _0x3802dc=new Map();for(let _0x5bb47b=0x0;_0x5bb47b<_0x259ae3['length'];_0x5bb47b++)'text'===_0x259ae3[_0x5bb47b]['type']?(_0x259ae3[_0x5bb47b]['item']['startIndex']=_0x5bb47b,_0x259ae3[_0x5bb47b]['item']['endIndex']=_0x5bb47b):('elementStart'===_0x259ae3[_0x5bb47b]['type']?_0x259ae3[_0x5bb47b]['item']['startIndex']=_0x5bb47b:'elementEnd'===_0x259ae3[_0x5bb47b]['type']&&(_0x259ae3[_0x5bb47b]['item']['endIndex']=_0x5bb47b),_0x3802dc['set'](_0x259ae3[_0x5bb47b]['id'],_0x5bb47b));for(const _0x224b36 of _0x3802dc['values']())'elementStart'===_0x259ae3[_0x224b36]['type']?_0x259ae3[_0x224b36]['item']['endIndex']=_0x3802dc['get'](_0x259ae3[_0x224b36]['pairId']):'elementEnd'===_0x259ae3[_0x224b36]['type']&&(_0x259ae3[_0x224b36]['item']['startIndex']=_0x3802dc['get'](_0x259ae3[_0x224b36]['pairId']));}['_processTape'](_0x52fb52){for(let _0x3668ec=0x0;_0x3668ec<_0x52fb52['length'];_0x3668ec++){if('elementStart'===_0x52fb52[_0x3668ec]['type'])_0x52fb52[_0x3668ec]['item']['startIndex']=_0x3668ec;else{if('elementEnd'===_0x52fb52[_0x3668ec]['type']){_0x52fb52[_0x3668ec]['item']['endIndex']=_0x3668ec;const _0x2a91ff=_0x52fb52[_0x3668ec]['item']['startIndex'];_0x52fb52[_0x2a91ff]['pairId']=_0x52fb52[_0x3668ec]['id'],_0x52fb52[_0x3668ec]['pairId']=_0x52fb52[_0x2a91ff]['id'];}else _0x52fb52[_0x3668ec]['item']['startIndex']=_0x3668ec,_0x52fb52[_0x3668ec]['item']['endIndex']=_0x3668ec,_0x52fb52[_0x3668ec]['pairId']=null;}_0x52fb52[_0x3668ec]['markersStart']||(_0x52fb52[_0x3668ec]['markersStart']=[],_0x52fb52[_0x3668ec]['markersEnd']=[]);}}_markInsertions(_0x598902,_0x5092be){const _0x4e8737=_0x598902['filter'](_0x4de669=>!_0x4de669['isAdded']);for(let _0x5b8609=0x0;_0x5b8609<_0x5092be['length'];_0x5b8609++)_0x5092be[_0x5b8609]['isAdded']&&(_0x4e8737[_0x5b8609]['isAdded']=_0x5092be[_0x5b8609]['isAdded']);}_getDiff(_0xbe58a9,_0x4fa818=null){const _0x124db2=this['repository']['getRevision'](_0xbe58a9),_0x5c97a7=_0x4fa818?this['repository']['getRevision'](_0x4fa818):null,_0x53ac1e=this['_getRevisionsRange'](_0x124db2,_0x5c97a7),_0x4eaaa9=_0x53ac1e[_0x53ac1e['length']-0x1],_0x13ed17=new Map(),_0xae62bc={'model':{},'attributes':{},'changes':[]},_0x2c635e=new Set(),_0x4354ca=new Map();for(let _0x1687d0=_0x53ac1e['length']-0x1;_0x1687d0>=0x0;_0x1687d0--){const _0x42af7=_0x53ac1e[_0x1687d0];for(const _0x2ccde7 of Object['keys'](_0x42af7['diffData']))if(_0x42af7['diffData'][_0x2ccde7]['attachChange']){const _0x5bff45=_0x42af7['diffData'][_0x2ccde7]['attachChange'];_0x5bff45['isAttached']?(_0x2c635e['add'](_0x2ccde7),_0x4354ca['has'](_0x2ccde7)&&_0x4354ca['get'](_0x2ccde7)['userId']==_0x5bff45['userId']?_0x4354ca['delete'](_0x2ccde7):_0x4354ca['set'](_0x2ccde7,_0x5bff45)):_0x4354ca['has'](_0x2ccde7)?(_0x2c635e['delete'](_0x2ccde7),_0x4354ca['delete'](_0x2ccde7)):(_0x2c635e['add'](_0x2ccde7),_0x4354ca['set'](_0x2ccde7,_0x5bff45));}else _0x2c635e['add'](_0x2ccde7);}for(const _0x13dc34 of _0x2c635e){const _0xcd3933=_0x4354ca['has'](_0x13dc34)&&!_0x4354ca['get'](_0x13dc34)['isAttached'];let _0x6d7a97=_0xcd3933?_0x53ac1e['length']-0x1:0x0;const _0x2f58f1=_0xcd3933?-0x1:0x1;for(;_0x53ac1e[_0x6d7a97];){const _0x291560=_0x53ac1e[_0x6d7a97];if(_0x291560['diffData'][_0x13dc34]){const _0x537588=_0xcd3933?_0x291560['diffData'][_0x13dc34]['attributesBefore']:_0x291560['diffData'][_0x13dc34]['attributesAfter'];_0xae62bc['attributes'][_0x13dc34]=_0x537588?_0x2b595f(_0x537588):{};break;}_0x6d7a97+=_0x2f58f1;}}for(const _0x23adad of _0x53ac1e){_0x23adad['model']={};for(const _0x52e667 of _0x23adad['authors'])_0x13ed17['set'](_0x52e667['id'],_0x52e667);for(const _0x161885 of _0x2c635e){const _0x1c2293=_0x23adad['diffData'][_0x161885]?_0x23adad['diffData'][_0x161885]['insertions']:'[]',_0x3cdcb2=_0x23adad['diffData'][_0x161885]?_0x23adad['diffData'][_0x161885]['deletions']:'[]',_0x2cdfc8=_0x23adad['diffData'][_0x161885]?.['rootElementName']||'$root';_0x23adad['model'][_0x161885]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1c2293,_0x2cdfc8),'deletions':this['_utils']['_makeModelFromViewString'](_0x3cdcb2,_0x2cdfc8)};}}for(const _0x5ba033 of _0x2c635e){let _0x46a35d=null,_0x5d50d4=0x0;const _0x2e29d0=_0x53ac1e['map'](_0x4ae7fd=>_0x4ae7fd['diffData'][_0x5ba033]?.['rootElementName'])['find'](_0x530acb=>void 0x0!==_0x530acb)||'$root',_0x32a807=new Map(Array['from'](_0x124db2['model'][_0x5ba033]['insertions']['markers'])['filter'](([_0x1e6c88])=>!_0x1e6c88['startsWith']('revision:')));let _0x1463cb=0x0;for(const _0x548566 of _0x53ac1e){const _0x1c3994=_0x548566['diffData'][_0x5ba033]?.['aiSources']||{},_0x1a7f84=this['_makeTape'](_0x548566['model'][_0x5ba033]['insertions'],_0x1c3994);_0x548566==_0x124db2?(_0x46a35d=_0x1a7f84,_0x5d50d4=_0x46a35d['length'],_0x46a35d['forEach'](_0x805c46=>{_0x805c46['id']=_0x1463cb++;}),this['_processTape'](_0x46a35d)):this['_markInsertions'](_0x46a35d,_0x1a7f84);const _0x3798e9=_0x46a35d['filter'](_0x4c93cf=>!_0x4c93cf['isAdded'])['map'](_0x5c536a=>_0x5c536a['id']);let _0x200491=0x0;const _0x3fec33=this['_makeTape'](_0x548566['model'][_0x5ba033]['deletions'],_0x1c3994);_0x3fec33['forEach'](_0x4fddf9=>{_0x4fddf9['isRemoved']?_0x4fddf9['id']=_0x5d50d4++:_0x4fddf9['id']=_0x3798e9[_0x200491++];}),this['_processTape'](_0x3fec33),this['_setDistance'](_0x46a35d,'isAdded'),this['_setDistance'](_0x3fec33,'isRemoved'),_0x548566==_0x124db2&&this['_markMarkers'](_0x46a35d,_0x32a807),_0x46a35d=this['_joinTapes'](_0x46a35d,_0x3fec33),this['_refreshStartEndIndex'](_0x46a35d),this['_setDistance'](_0x46a35d,'isRemoved');}_0x46a35d=_0x46a35d['filter'](_0x5ee299=>!(_0x5ee299['isAdded']&&_0x5ee299['isRemoved']));const _0x3a61f7=new Map(_0x4eaaa9['model'][_0x5ba033]['deletions']['markers']),_0x2a25e5=new Set(_0x32a807['keys']());for(const _0x288c43 of _0x3a61f7['keys']())_0x2a25e5['delete'](_0x288c43);const _0x1298fb=Object['assign']({},..._0x53ac1e['map'](_0x211ffc=>_0x211ffc['diffData'][_0x5ba033]?.['aiSources']));this['_markSuggestions'](_0x46a35d,_0x2a25e5,_0x1298fb),this['_fixObsoleteTags'](_0x46a35d),_0x46a35d=this['_removeMissingPairs'](_0x46a35d),_0x46a35d=this['_markMismatchedRemovedTags'](_0x46a35d),_0x46a35d=this['_removeUnsupportedChanges'](_0x46a35d);const {root:_0x3d0c62,changes:_0xb83d74}=this['_makeModelFromTape'](_0x46a35d,_0x13ed17,_0x5ba033,_0x2e29d0);_0xae62bc['model'][_0x5ba033]=_0x3d0c62;const _0x318d63=_0x4354ca['get'](_0x5ba033);if(_0x318d63){const _0x24f45e=_0x13ed17['get'](_0x318d63['userId']),_0x334e91=new Mt({'author':_0x24f45e,'type':_0x318d63['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5ba033});_0xb83d74['unshift'](_0x334e91),_0xae62bc['attributes'][_0x5ba033]['revisionHistoryAttachChange']=_0x334e91['id'];}_0xae62bc['changes']=_0xae62bc['changes']['concat'](_0xb83d74);}return _0xae62bc;}['_markMarkers'](_0x2453d0,_0x5ace32){for(let _0x4237de=0x0;_0x4237de<_0x2453d0['length'];_0x4237de++)for(const [_0x3452f0,_0x499dd1]of _0x5ace32)!_0x499dd1['isCollapsed']&&_0x499dd1['start']['isEqual'](_0x2453d0[_0x4237de]['previousPosition'])&&_0x2453d0[_0x4237de]['markersStart']['push'](_0x3452f0),_0x499dd1['end']['isEqual'](_0x2453d0[_0x4237de]['nextPosition'])&&_0x2453d0[_0x4237de]['markersEnd']['push'](_0x3452f0);}['_joinTapes'](_0x47cc1b,_0x1d391a){let _0x1dc491=[],_0x20d355=0x0,_0x490eb1=0x0;for(;_0x20d355<_0x47cc1b['length']||_0x490eb1<_0x1d391a['length'];){const _0x6670d7=_0x47cc1b[_0x20d355]||{},_0x596ab0=_0x1d391a[_0x490eb1]||{};if(_0x6670d7['id']==_0x596ab0['id'])_0x20d355++,_0x490eb1++,_0x1dc491['push'](_0x6670d7);else{if(_0x596ab0['isRemoved']&&_0x6670d7['isAdded']){const {commonTape:_0x3326fe,iEnd:_0x1f7526,jEnd:_0x1def39}=this['_threeWayMerge'](_0x47cc1b,_0x20d355,_0x1d391a,_0x490eb1);_0x1dc491=_0x1dc491['concat'](_0x3326fe),_0x20d355=_0x1f7526,_0x490eb1=_0x1def39;}else _0x596ab0['isRemoved']?(_0x490eb1++,_0x1dc491['push'](_0x596ab0)):(_0x20d355++,_0x1dc491['push'](_0x6670d7));}}return _0x1dc491;}_markSuggestions(_0x11381c,_0x1c87b3,_0x1d7a8a){const _0x49f933=[];for(let _0x57a965=0x0;_0x57a965<_0x11381c['length'];_0x57a965++){for(let _0x5e3127=0x0;_0x5e3127<_0x11381c[_0x57a965]['markersStart']['length'];_0x5e3127++){const _0xb8f186=_0x11381c[_0x57a965]['markersStart'][_0x5e3127];if(!_0x1c87b3['has'](_0xb8f186))continue;const {group:_0x5ad389,type:_0x3f9108,authorId:_0x59e84d}=_0x31e208(_0xb8f186);if('revision-suggestion'!=_0x5ad389||'insertion'!=_0x3f9108&&'deletion'!=_0x3f9108)continue;const _0x2fc5ab=_0x1d7a8a['suggestion:'+_0xb8f186['slice'](0x14)]||null;_0x49f933['unshift']({'type':_0x3f9108,'name':_0xb8f186,'userId':_0x59e84d,'aiSource':_0x2fc5ab}),_0x11381c[_0x57a965]['markersStart']['splice'](_0x5e3127,0x1),_0x5e3127--;}_0x2c2b25(_0x11381c[_0x57a965]);for(let _0x22b66e=0x0;_0x22b66e<_0x11381c[_0x57a965]['markersEnd']['length'];_0x22b66e++){const _0x105063=_0x11381c[_0x57a965]['markersEnd'][_0x22b66e];if(!_0x1c87b3['has'](_0x105063))continue;const {group:_0x18389c,type:_0x1d5831}=_0x31e208(_0x105063);if('revision-suggestion'!=_0x18389c||'insertion'!=_0x1d5831&&'deletion'!=_0x1d5831)continue;_0x11381c[_0x57a965]['markersEnd']['splice'](_0x22b66e,0x1),_0x22b66e--;const _0xdf1a85=_0x49f933['findIndex'](_0xc89a99=>_0xc89a99['name']==_0x105063);_0xdf1a85>-0x1&&_0x49f933['splice'](_0xdf1a85,0x1);}}function _0x31e208(_0x297b89){const _0x512ad6=_0x297b89['split'](':');return{'group':_0x512ad6[0x0],'type':_0x512ad6[0x1],'subType':_0x512ad6['length']>=0x5?_0x512ad6[0x2]:null,'id':_0x512ad6['length']<0x5?_0x512ad6[0x2]:_0x512ad6[0x3],'authorId':_0x512ad6['length']<0x5?_0x512ad6[0x3]:_0x512ad6[0x4],'markerCount':0x6==_0x512ad6['length']?_0x512ad6[0x5]:null};}function _0x2c2b25(_0x433339){for(let _0x1aaf75=0x0;_0x1aaf75<_0x49f933['length'];_0x1aaf75++){if(_0x433339['isAdded']&&'insertion'==_0x49f933[_0x1aaf75]['type']&&_0x433339['isAdded']['userId']==_0x49f933[_0x1aaf75]['userId'])return _0x433339['isAddSuggestion']={..._0x49f933[_0x1aaf75],'aiSource':_0x433339['isAdded']['aiSource']||_0x49f933[_0x1aaf75]['aiSource']},void delete _0x433339['isAdded'];if(!_0x433339['isAdded']&&!_0x433339['isRemoved']&&'deletion'==_0x49f933[_0x1aaf75]['type'])return void(_0x433339['isRemoveSuggestion']=_0x49f933[_0x1aaf75]);}}}_setDistance(_0x25d900,_0x172da2){let _0x40c483=0x0,_0x1f9544=!0x1;const _0x209709=new Map();for(const _0x5bcacc of _0x25d900)_0x5bcacc[_0x172da2]?_0x1f9544&&(_0x40c483++,_0x1f9544=!0x1):(_0x40c483++,_0x1f9544=!0x0),_0x209709['set'](_0x5bcacc['id'],_0x40c483);for(let _0x5547eb=0x0;_0x5547eb<_0x25d900['length'];_0x5547eb++){if('isRemoved'==_0x172da2&&_0x25d900[_0x5547eb]['isAdded']||'isAdded'==_0x172da2&&_0x25d900[_0x5547eb]['isRemoved'])continue;if('text'==_0x25d900[_0x5547eb]['type']){_0x25d900[_0x5547eb]['distance']=0x0;continue;}const _0xd37906=_0x209709['get'](_0x25d900[_0x5547eb]['pairId']),_0x3866c4=_0x209709['get'](_0x25d900[_0x5547eb]['id']);_0x25d900[_0x5547eb]['distance']=_0xd37906-_0x3866c4;}}_getRevisionsRange(_0x19e2e9,_0x17a0a8,_0x404f36=!0x1){const _0x5b0006=[];let _0x20e57d=this['repository']['getIndex'](_0x19e2e9),_0x15172b=this['repository']['getIndex'](_0x17a0a8);for(-0x1==_0x15172b&&(_0x15172b=this['repository']['_revisions']['length'],_0x404f36=!0x1);_0x20e57d<_0x15172b;)_0x5b0006['push'](this['repository']['getRevision'](_0x20e57d)),_0x20e57d++;return _0x404f36&&_0x5b0006['push'](this['repository']['getRevision'](_0x20e57d)),_0x5b0006;}_threeWayMerge(_0x384347,_0x5e73ca,_0x31aa34,_0x548b6e){const _0x146bd0=this['editor']['model']['schema'];let _0x37c60d=_0x5e73ca;for(;_0x384347[_0x37c60d]&&_0x384347[_0x37c60d]['isAdded'];)_0x37c60d++;let _0x304313=_0x548b6e;for(;_0x31aa34[_0x304313]&&_0x31aa34[_0x304313]['isRemoved'];)_0x304313++;_0x11ff64(_0x384347,_0x5e73ca,_0x37c60d),_0x11ff64(_0x31aa34,_0x548b6e,_0x304313);const _0xa744d=_0x31aa34['slice'](_0x548b6e,_0x304313)['concat'](_0x384347['slice'](_0x5e73ca,_0x37c60d));return _0xa744d['sort']((_0x220e4,_0x5e349e)=>_0x220e4['side']!=_0x5e349e['side']?_0x220e4['side']-_0x5e349e['side']:_0x220e4['level']!=_0x5e349e['level']?_0x220e4['level']-_0x5e349e['level']:_0x220e4['distance']!=_0x5e349e['distance']?_0x5e349e['distance']-_0x220e4['distance']:!!_0x220e4['isAdded']!=!!_0x5e349e['isAdded']?-0x1==_0x220e4['side']||0x0==_0x220e4['side']?_0x220e4['isAdded']?-0x1:0x1:_0x220e4['isAdded']?0x1:-0x1:_0x220e4['index']-_0x5e349e['index']),{'commonTape':_0xa744d,'iEnd':_0x37c60d,'jEnd':_0x304313};function _0x11ff64(_0x5a7189,_0x345741,_0x28f419){let _0x2c4773=-0x1,_0x46060a=Number['POSITIVE_INFINITY'],_0x465a7a=!0x0;for(let _0x65b1f0=_0x345741;_0x65b1f0<_0x28f419;_0x65b1f0++)if(_0x146bd0['isInline'](_0x5a7189[_0x65b1f0]['item'])||(_0x465a7a=!0x1),_0x5a7189[_0x65b1f0]['item']['startIndex']<_0x345741&&(_0x2c4773=_0x65b1f0),_0x5a7189[_0x65b1f0]['item']['endIndex']>=_0x28f419){_0x46060a=_0x65b1f0;break;}_0x465a7a&&(_0x2c4773=_0x28f419-0x1);for(let _0x32368f=_0x345741;_0x32368f<_0x28f419;_0x32368f++)_0x5a7189[_0x32368f]['side']=_0x32368f<=_0x2c4773?-0x1:_0x32368f<_0x46060a?0x0:0x1,_0x5a7189[_0x32368f]['index']=_0x32368f;let _0x49f923=0x0;for(let _0xd06471=_0x345741;_0xd06471<=_0x2c4773;_0xd06471++)0x0==_0x5a7189[_0xd06471]['distance']?_0x5a7189[_0xd06471]['level']=_0x49f923:(_0x49f923++,_0x5a7189[_0xd06471]['level']=_0x49f923,_0x49f923++);for(let _0x27ad65=_0x345741;_0x27ad65<_0x28f419;_0x27ad65++)0x0==_0x5a7189[_0x27ad65]['side']&&(_0x5a7189[_0x27ad65]['level']=_0x49f923);_0x49f923=0x0;for(let _0x26d1dd=_0x28f419-0x1;_0x26d1dd>=_0x46060a;_0x26d1dd--)0x0==_0x5a7189[_0x26d1dd]['distance']?_0x5a7189[_0x26d1dd]['level']=_0x49f923:(_0x49f923--,_0x5a7189[_0x26d1dd]['level']=_0x49f923,_0x49f923--);}}_fixObsoleteTags(_0x5f0c0d){const _0x2f2a1b=new Map(),_0x4adf91=this['editor']['model']['schema'];for(let _0x145ced=0x1;_0x145ced<_0x5f0c0d['length'];_0x145ced++){let _0x38b7ef,_0x113fdb,_0x5bc01d;const _0x3c6708=_0x5f0c0d[_0x145ced],_0x37b3ee=_0x5f0c0d[_0x145ced-0x1];if('text'==_0x3c6708['type'])continue;if(_0x3c6708['type']!=_0x37b3ee['type'])continue;if(!_0x4adf91['isBlock'](_0x37b3ee['item'])||_0x4adf91['isLimit'](_0x37b3ee['item']))continue;if(!_0x4adf91['isBlock'](_0x3c6708['item'])||_0x4adf91['isLimit'](_0x3c6708['item']))continue;if((_0x5f0c0d[_0x145ced]['isAdded']||_0x5f0c0d[_0x145ced]['isAddSuggestion'])&&_0x5f0c0d[_0x145ced-0x1]['isRemoved'])_0x38b7ef=_0x5f0c0d[_0x145ced],_0x113fdb=_0x5f0c0d[_0x145ced-0x1],_0x5bc01d=_0x145ced-0x1;else{if(!_0x5f0c0d[_0x145ced]['isRemoved']||!_0x5f0c0d[_0x145ced-0x1]['isAdded']&&!_0x5f0c0d[_0x145ced-0x1]['isAddSuggestion'])continue;_0x38b7ef=_0x5f0c0d[_0x145ced-0x1],_0x113fdb=_0x5f0c0d[_0x145ced],_0x5bc01d=_0x145ced;}const _0x4aaa3a=_0x38b7ef['level']==_0x113fdb['level'],_0x2438d8=Math['abs'](_0x38b7ef['level'])<Math['abs'](_0x113fdb['level'])&&0x0==_0x113fdb['distance'];(_0x4aaa3a||_0x2438d8)&&(_0x2f2a1b['set'](_0x113fdb['id'],_0x38b7ef['id']),_0x5f0c0d['splice'](_0x5bc01d,0x1),_0x145ced--,_0x38b7ef['isAdded']=!0x1);}for(let _0x53469d=0x0;_0x53469d<_0x5f0c0d['length'];_0x53469d++)_0x2f2a1b['has'](_0x5f0c0d[_0x53469d]['pairId'])&&(_0x5f0c0d[_0x53469d]['pairId']=_0x2f2a1b['get'](_0x5f0c0d[_0x53469d]['pairId']));}['_removeMissingPairs'](_0x5d074e){const _0x5f3b88=new Set(_0x5d074e['map'](_0x26825f=>_0x26825f['id']));for(let _0x3d1ce7=0x0;_0x3d1ce7<_0x5d074e['length'];_0x3d1ce7++)_0x5f3b88['has'](_0x5d074e[_0x3d1ce7]['pairId'])||0x0==_0x5d074e[_0x3d1ce7]['distance']||(_0x5d074e[_0x3d1ce7]['isIncorrect']=!0x0);return _0x5d074e['filter'](_0x37ec7a=>!_0x37ec7a['isIncorrect']);}_markMismatchedRemovedTags(_0x537520){const _0xf8de41=new Set();for(let _0x58efb4=0x0;_0x58efb4<_0x537520['length'];_0x58efb4++){if(_0xf8de41['has'](_0x537520[_0x58efb4]['id'])&&_0x537520[_0x58efb4]['isRemoved']&&(_0x537520[_0x58efb4]['isIncorrect']=!0x0),_0x537520[_0x58efb4]['isIncorrect'])continue;if(0x0==_0x537520[_0x58efb4]['distance'])continue;if('elementStart'!=_0x537520[_0x58efb4]['type'])continue;if(null==_0x537520[_0x58efb4]['pairId'])continue;let _0x1fd367=_0x58efb4+0x1,_0x5f0a6d=0x0;for(;_0x537520[_0x1fd367]['id']!=_0x537520[_0x58efb4]['pairId'];)'elementStart'==_0x537520[_0x1fd367]['type']?_0x5f0a6d++:'elementEnd'==_0x537520[_0x1fd367]['type']&&_0x5f0a6d--,_0x1fd367++;if(0x0!=_0x5f0a6d){if(_0x537520[_0x58efb4]['isRemoved'])_0x537520[_0x58efb4]['isIncorrect']=!0x0;else{for(;_0x1fd367!=_0x58efb4;)_0x537520[_0x1fd367]['isRemoved']&&0x0!=_0x537520[_0x1fd367]['distance']&&(_0x537520[_0x1fd367]['isIncorrect']=!0x0,_0xf8de41['add'](_0x537520[_0x1fd367]['pairId'])),_0x1fd367--;}}}return _0x537520['filter'](_0x2cd7c2=>!_0x2cd7c2['isIncorrect']);}_removeUnsupportedChanges(_0xf7b627){const _0x49609c=this['editor']['model']['schema'];for(let _0x4f6069=0x0;_0x4f6069<_0xf7b627['length'];_0x4f6069++){if(!(_0xf7b627[_0x4f6069]['isAdded']||_0xf7b627[_0x4f6069]['isAddSuggestion']||_0xf7b627[_0x4f6069]['isRemoved']||_0xf7b627[_0x4f6069]['isRemoveSuggestion']))continue;if(0x0==_0xf7b627[_0x4f6069]['distance'])continue;const _0x224b57=_0xf7b627[_0x4f6069]['item'];_0x49609c['isBlock'](_0x224b57)||_0x49609c['isLimit'](_0x224b57)||(_0xf7b627[_0x4f6069]['isAdded']&&delete _0xf7b627[_0x4f6069]['isAdded'],_0xf7b627[_0x4f6069]['isAddSuggestion']&&delete _0xf7b627[_0x4f6069]['isAddSuggestion'],_0xf7b627[_0x4f6069]['isRemoveSuggestion']&&delete _0xf7b627[_0x4f6069]['isRemoveSuggestion'],_0xf7b627[_0x4f6069]['isRemoved']&&(_0xf7b627[_0x4f6069]['isIncorrect']=!0x0));}return _0xf7b627['filter'](_0x16577b=>!_0x16577b['isIncorrect']);}['_makeModelFromTape'](_0x15e6c8,_0x48f4a0,_0x36f06f,_0x41f2f3){const _0x392fd8=new _0x411dfa(),_0x55b70b=[],_0x42ac42=new Map(),_0x4c5a6d=this['editor']['model'],_0x4b9da0=_0x4c5a6d['schema'],_0x479b0c=[_0x392fd8],_0xda86f0={},_0xc73e5c={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x392fd8['name']=_0x41f2f3;let _0x15598d=null;const _0x1d4080=[0x0];for(let _0x458fc2=0x0;_0x458fc2<_0x15e6c8['length'];_0x458fc2++)if('elementStart'===_0x15e6c8[_0x458fc2]['type']){_0x15e6c8[_0x458fc2]['previousPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080);const _0x1b5bd8=new _0x2bedc6(_0x15e6c8[_0x458fc2]['item']['name'],_0x15e6c8[_0x458fc2]['item']['getAttributes']());_0x479b0c[0x0]['_appendChild'](_0x1b5bd8),_0x1d4080['push'](0x0),_0x479b0c['unshift'](_0x1b5bd8),_0x15e6c8[_0x458fc2]['nextPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080);}else'elementEnd'===_0x15e6c8[_0x458fc2]['type']?(_0x479b0c['shift'](),_0x15e6c8[_0x458fc2]['previousPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080),_0x1d4080['pop'](),_0x1d4080[_0x1d4080['length']-0x1]++,_0x15e6c8[_0x458fc2]['nextPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080)):(_0x15e6c8[_0x458fc2]['previousPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080),_0x15598d?_0x15598d['_data']+=_0x15e6c8[_0x458fc2]['item']['data']:_0x15598d=new _0x55fe07(_0x15e6c8[_0x458fc2]['item']['data'],_0x15e6c8[_0x458fc2]['item']['getAttributes']()),_0x15e6c8[_0x458fc2+0x1]&&'text'===_0x15e6c8[_0x458fc2+0x1]['type']&&_0x15f58d(_0x15598d,_0x15e6c8[_0x458fc2+0x1]['item'])||(_0x479b0c[0x0]['_appendChild'](_0x15598d),_0x15598d=null),_0x1d4080[_0x1d4080['length']-0x1]+=_0x15e6c8[_0x458fc2]['item']['offsetSize'],_0x15e6c8[_0x458fc2]['nextPosition']=_0x4c5a6d['createPositionFromPath'](_0x392fd8,_0x1d4080));for(let _0x1074c7=0x0;_0x1074c7<_0x15e6c8['length'];_0x1074c7++){const _0x3afa5a=_0x15e6c8[_0x1074c7]['previousPosition'],_0x4efbb5=_0x15e6c8[_0x1074c7]['nextPosition'];for(const _0x5f588d of _0x15e6c8[_0x1074c7]['markersStart'])_0x42ac42['set'](_0x5f588d,{'start':_0x3afa5a,'end':null});_0x1dc94d('isRemoveSuggestion',_0x1074c7,_0x3afa5a,_0x4efbb5),_0x1dc94d('isAddSuggestion',_0x1074c7,_0x3afa5a,_0x4efbb5),_0x1dc94d('isRemoved',_0x1074c7,_0x3afa5a,_0x4efbb5),_0x1dc94d('isAdded',_0x1074c7,_0x3afa5a,_0x4efbb5);for(const _0x120746 of _0x15e6c8[_0x1074c7]['markersEnd']){const _0x25f3df=_0x42ac42['get'](_0x120746);_0x25f3df?_0x25f3df['end']=_0x4efbb5:_0x42ac42['set'](_0x120746,{'start':_0x4efbb5,'end':_0x4efbb5});}}for(const [_0x248531,_0x471227]of _0x42ac42){const _0x47d10d=this['editor']['model']['createRange'](_0x471227['start'],_0x471227['end']);_0x392fd8['markers']['set'](_0x248531,_0x47d10d);}return _0x55b70b['sort']((_0xd0d5f7,_0x4adebb)=>{const _0x98afe6=_0x392fd8['markers']['get']('revision:'+_0xd0d5f7['id']),_0x3c7cd6=_0x392fd8['markers']['get']('revision:'+_0x4adebb['id']);return _0x98afe6['start']['isBefore'](_0x3c7cd6['start'])?-0x1:_0x98afe6['start']['isAfter'](_0x3c7cd6['start'])?0x1:_0x98afe6['end']['isBefore'](_0x3c7cd6['end'])?-0x1:_0x98afe6['end']['isAfter'](_0x3c7cd6['end'])?0x1:'add'===_0xd0d5f7['type']?-0x1:0x1;}),{'root':_0x392fd8,'changes':_0x55b70b};function _0x1dc94d(_0xcbddbf,_0x38efc5,_0xcad00a,_0x7d328d){const _0x43c6df=!!_0x15e6c8[_0x38efc5][_0xcbddbf],_0x4828c4=_0x43c6df?_0x15e6c8[_0x38efc5][_0xcbddbf]['userId']:null,_0x1db8f2=_0x43c6df&&_0x15e6c8[_0x38efc5][_0xcbddbf]['aiSource']||null,_0x2217a0=_0x38efc5===_0x15e6c8['length']-0x1,_0x3604f9=_0xc73e5c[_0xcbddbf][0x0],_0x3bc3c1=_0x4b9da0['isObject'](_0x15e6c8[_0x38efc5]['item']);!_0xda86f0[_0xcbddbf]&&_0x43c6df?_0xda86f0[_0xcbddbf]={'start':_0xcad00a,'tapeItem':_0x15e6c8[_0x38efc5],'userId':_0x4828c4,'aiSource':_0x1db8f2,'type':_0xcbddbf}:_0xda86f0[_0xcbddbf]&&!_0x43c6df?(_0xda86f0[_0xcbddbf]['end']=_0xcad00a,_0x23277f(_0xda86f0[_0xcbddbf]),_0xda86f0[_0xcbddbf]=null):_0xda86f0[_0xcbddbf]&&_0x43c6df&&(_0xda86f0[_0xcbddbf]['userId']!==_0x4828c4||_0xda86f0[_0xcbddbf]['aiSource']!==_0x1db8f2)&&(_0xda86f0[_0xcbddbf]['end']=_0xcad00a,_0x3604f9&&_0x3604f9['userId']===_0xda86f0[_0xcbddbf]['userId']?_0x3604f9['change']['aiSource']=_0x3604f9['change']['aiSource']||_0xda86f0[_0xcbddbf]['aiSource']:_0x23277f(_0xda86f0[_0xcbddbf]),_0xda86f0[_0xcbddbf]={'start':_0xcad00a,'tapeItem':_0x15e6c8[_0x38efc5],'userId':_0x4828c4,'aiSource':_0x1db8f2,'type':_0xcbddbf}),_0xda86f0[_0xcbddbf]&&_0x3bc3c1&&('elementStart'!==_0x15e6c8[_0x38efc5]['type']||_0x3604f9&&_0x3604f9['userId']===_0x4828c4||_0xc73e5c[_0xcbddbf]['unshift']({'userId':_0x4828c4,'object':_0x15e6c8[_0x38efc5]['item'],'change':_0xda86f0[_0xcbddbf]}),'elementEnd'===_0x15e6c8[_0x38efc5]['type']&&_0x3604f9&&_0x3604f9['object']===_0x15e6c8[_0x38efc5]['item']&&(_0xc73e5c[_0xcbddbf]['shift'](),_0xda86f0[_0xcbddbf]=_0x3604f9['change'])),_0xda86f0[_0xcbddbf]&&_0x2217a0&&(_0xda86f0[_0xcbddbf]['end']=_0x7d328d,_0x23277f(_0xda86f0[_0xcbddbf]),_0xda86f0[_0xcbddbf]=null);}function _0x23277f({start:_0xf9a73e,end:_0x3d2979,tapeItem:_0x380cfc,userId:_0x48da8c,aiSource:_0x5d95af,type:_0x34ee4c}){const _0x4568c9=_0x380cfc['item'],_0x322689=_0x4c5a6d['schema']['isBlock'](_0x4568c9)&&!_0x4c5a6d['schema']['isLimit'](_0x4568c9),_0x46790e=_0xf9a73e['nodeAfter']==_0x3d2979['parent']&&_0x3d2979['isAtStart'];if(_0x322689&&_0x46790e)return;const _0x3b1714=_0x4c5a6d['createRange'](_0xf9a73e,_0x3d2979),_0x320635=_0x48f4a0['get'](_0x48da8c),_0x5a6fed=new Mt({'author':_0x320635,'type':'isAdded'==_0x34ee4c||'isAddSuggestion'==_0x34ee4c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x34ee4c||'isRemoveSuggestion'==_0x34ee4c,'aiSource':_0x5d95af||null},'createdAt':new Date(),'rootName':_0x36f06f});_0x55b70b['push'](_0x5a6fed),_0x392fd8['markers']['set']('revision:'+_0x5a6fed['id'],_0x3b1714);}function _0x15f58d(_0x32d1e1,_0x162c9e){const _0x8fe5f2=_0x32d1e1['getAttributes'](),_0x326050=_0x162c9e['getAttributes']();for(const _0x11af96 of _0x8fe5f2){if(_0x11af96[0x1]!==_0x162c9e['getAttribute'](_0x11af96[0x0]))return!0x1;_0x326050['next']();}return _0x326050['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x2dcb4a=>{const _0x416030=_0x2dcb4a['markerName']['split'](':')[0x1],_0x431376=this['_getChangeFromId'](_0x416030);if(!_0x431376)return null;const _0x48fb1e='add'==_0x431376['type']?'insertion':'deletion',_0x58279e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x48fb1e];return _0x431376['data']['isSuggestion']&&_0x58279e['push']('ck-suggestion-marker-'+_0x48fb1e+'-new'),this['activeChange']==_0x431376&&_0x58279e['push']('ck-suggestion-marker--active'),{'classes':_0x58279e,'attributes':{'data-change-id':_0x416030}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x1f1f9d=>{_0x1f1f9d['on']('element:pre',(_0x5a70c7,_0x541f88,_0x2c3191)=>{const _0x546fe1=_0x541f88['viewItem']['getChild'](0x0);if(!_0x546fe1||!_0x546fe1['is']('element','code'))return;if(!_0x2c3191['consumable']['consume'](_0x546fe1,{'attributes':['vid_start','vid_end']}))return;const _0x115cb2=_0x541f88['modelRange']['start']['nodeAfter'];_0x2c3191['writer']['setAttribute']('vid_start',_0x546fe1['getAttribute']('vid_start'),_0x115cb2),_0x2c3191['writer']['setAttribute']('vid_end',_0x546fe1['getAttribute']('vid_end'),_0x115cb2);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x8a9692=>{_0x8a9692['on']('element',(_0x22a3ad,_0x16d46c,_0x501a84)=>{if(!_0x501a84['consumable']['consume'](_0x16d46c['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x16d46c['modelRange']['isCollapsed'])return;const _0x6c0072=_0x16d46c['modelRange']['start']['nodeAfter'];_0x6c0072['hasAttribute']('vid_start')||_0x6c0072['hasAttribute']('vid')||(_0x501a84['writer']['setAttribute']('vid_start',_0x16d46c['viewItem']['getAttribute']('vid_start'),_0x6c0072),_0x501a84['writer']['setAttribute']('vid_end',_0x16d46c['viewItem']['getAttribute']('vid_end'),_0x6c0072));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x6facb1=>_0x6facb1['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4c4467,[,_0x332ca6])=>{['vid_start','vid_end','vid']['includes'](_0x332ca6)&&(_0x4c4467['return']=!0x0,_0x4c4467['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5bc9b2=>{_0x5bc9b2['on']('attribute:vid',(_0x25dc2f,_0x299bb4,_0x94dd94)=>{if('\x20'!=_0x299bb4['item']['data']||_0x299bb4['item']['parent']['maxOffset']>0x1)return;if(!_0x94dd94['consumable']['consume'](_0x299bb4['item'],_0x25dc2f['name']))return;const _0x38b0bb=_0x94dd94['writer'],_0x3cfc01=_0x94dd94['mapper']['toViewRange'](_0x299bb4['range']);_0x38b0bb['wrap'](_0x3cfc01,_0x38b0bb['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x102e9e){const _0x17df11=_0x102e9e['plugins']['get']('RevisionViewer');return(_0x559e41,_0x44f72f,_0x52bffd)=>{const _0x50b011=_0x44f72f['markerName']['split'](':')[0x1],_0x2044d4=_0x17df11['_getChangeFromId'](_0x50b011);if(!_0x2044d4)return null;const _0x154eb4='add'==_0x2044d4['type']?'split':'merge';if(!_0x52bffd['consumable']['test'](_0x44f72f['markerRange'],_0x559e41['name']))return;const _0x415fe4=_0x44f72f['markerRange']['getWalker'](),_0x4bbacc=_0x44f72f['markerRange']['start'],_0x1f02c2=_0x102e9e['model']['schema'];let _0x4949a8=null,_0x3835c2=null,_0xc3c755=!0x1,_0x121a83=!0x1;for(const _0x289806 of _0x415fe4){const _0x18ceb1=_0x289806['item'];_0xc3c755=_0xc3c755||_0x1f02c2['isContent'](_0x18ceb1);const _0x8c02dc=_0x52bffd['mapper']['toViewElement'](_0x18ceb1);if(_0x8c02dc&&_0x8c02dc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x289806['type']&&(_0x1f02c2['isBlock'](_0x18ceb1)&&!_0x1f02c2['isLimit'](_0x18ceb1)&&(_0x18ceb1['nextSibling']||_0x4bbacc['isAtEnd']?_0x4949a8&&_0x4949a8['parent']==_0x18ceb1||(_0x4949a8=_0x18ceb1,_0xb5c91b(_0x289806['previousPosition']),_0x121a83=!0x0):_0x3835c2=_0x3835c2||_0x289806['previousPosition']));}function _0xb5c91b(_0x449bbb){const _0xedd730=_0x52bffd['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x154eb4}),_0x408d1c=_0x52bffd['mapper']['toViewPosition'](_0x449bbb);_0x2044d4['data']['isSuggestion']&&_0x52bffd['writer']['addClass']('ck-suggestion-marker-'+_0x154eb4+'-new',_0xedd730),_0x17df11['activeChange']==_0x2044d4&&_0x52bffd['writer']['addClass']('ck-suggestion-marker--active',_0xedd730),_0x52bffd['writer']['insert'](_0x408d1c,_0xedd730),_0x52bffd['mapper']['bindElementToMarker'](_0xedd730,_0x44f72f['markerName']);}_0xc3c755||_0x121a83||!_0x3835c2||_0xb5c91b(_0x3835c2);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x4a7cbd,_0x2da5e3,_0x1fd923)=>{const _0xb0577=_0x1fd923['mapper']['markerNameToElements'](_0x2da5e3['markerName']);if(_0xb0577){for(const _0x28b626 of _0xb0577)(_0x28b626['hasClass']('ck-suggestion-marker-split')||_0x28b626['hasClass']('ck-suggestion-marker-merge'))&&(_0x1fd923['mapper']['unbindElementFromMarkerName'](_0x28b626,_0x2da5e3['markerName']),_0x1fd923['writer']['remove'](_0x28b626));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3937e0,_0x41c2f4,_0x312e77)=>{const _0x57c5d6=_0x41c2f4['markerName']['split'](':')[0x1],_0x343265=this['_getChangeFromId'](_0x57c5d6);if(!_0x343265)return null;const _0x384897='add'==_0x343265['type']?'split':'merge';if(_0x312e77['consumable']['test'](_0x41c2f4['markerRange'],_0x3937e0['name']))for(const _0x59b998 of _0x41c2f4['markerRange']['getItems']()){if(!_0x59b998['is']('element','softBreak'))continue;const _0x31cc22=_0x312e77['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x384897}),_0x48cd4d=_0x312e77['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x59b998));_0x343265['data']['isSuggestion']&&_0x312e77['writer']['addClass']('ck-suggestion-marker-'+_0x384897+'-new',_0x31cc22),this['activeChange']==_0x343265&&_0x312e77['writer']['addClass']('ck-suggestion-marker--active',_0x31cc22),_0x312e77['writer']['insert'](_0x48cd4d,_0x31cc22),_0x312e77['mapper']['bindElementToMarker'](_0x31cc22,_0x41c2f4['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x42c209=>{for(const _0x12ff4d of this['editor']['model']['document']['getRootNames']()){const _0x22dfb0=this['editor']['model']['document']['getRoot'](_0x12ff4d),_0x181b9c=this['editor']['editing']['view']['document']['getRoot'](_0x12ff4d);if(_0x181b9c){const _0x2f026b=_0x22dfb0['getAttribute']('revisionHistoryAttachChange');if(_0x42c209['removeAttribute']('data-change-id',_0x181b9c),_0x42c209['removeClass']('ck-revision-history-root-add',_0x181b9c),_0x42c209['removeClass']('ck-revision-history-root-remove',_0x181b9c),_0x42c209['removeClass']('ck-revision-history-root--active',_0x181b9c),_0x2f026b){const _0x5a9a1b=this['_getChangeFromId'](_0x2f026b);if(!_0x5a9a1b)return null;_0x42c209['setAttribute']('data-change-id',_0x2f026b,_0x181b9c),_0x42c209['addClass']('ck-revision-history-root-'+_0x5a9a1b['type'],_0x181b9c),this['activeChange']==_0x5a9a1b&&_0x42c209['addClass']('ck-revision-history-root--active',_0x181b9c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2cc3b2=>'revision-comment:'+_0x2cc3b2,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0xcb8732=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0xcb8732['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x156046=>'revision-suggestion:'+_0x156046,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x411cf0=>({'name':'suggestion:'+_0x411cf0,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0xc04aab=>{const _0x1e1614=_0xc04aab['markerName']['split'](':')[0x1];return'insertion'!=_0x1e1614&&'deletion'!=_0x1e1614?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x1e1614]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3deb8a,_0x216222,_0x2e6ea9)=>{const _0x3fbd9b=_0x2e6ea9['mapper']['markerNameToElements'](_0x216222['markerName']);if(_0x3fbd9b){for(const _0x301983 of _0x3fbd9b)_0x301983['is']('uiElement')&&(_0x2e6ea9['mapper']['unbindElementFromMarkerName'](_0x301983,_0x216222['markerName']),_0x2e6ea9['writer']['remove'](_0x301983));}},{'priority':'high'});}_getChangeFromId(_0x11d706){return this['_changeIdToChange']['get'](_0x11d706);}_getViewForChange(_0x1c9e77){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x1c9e77,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xab52df,_0x428450,_0x2ed8b7,_0xb7dac7)=>{_0xb7dac7&&this['_balloon']['remove'](_0xb7dac7),_0x2ed8b7&&(this['_balloon']['add']({'view':_0x2ed8b7,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0xf5ba74=this['editor']['editing'],_0x49027d=this['_getChangeFromId'](_0x2ed8b7['changeId']);let _0x52829f;if(_0x49027d['data']['isOnRoot']){const _0x3479a3=_0xf5ba74['view']['getDomRoot'](_0x49027d['rootName']);_0x52829f=Array['from'](_0x3479a3['getClientRects']());}else{const _0x54f8e4=this['editor']['model']['markers']['get']('revision:'+_0x2ed8b7['changeId']);_0x52829f=Array['from'](_0xf5ba74['mapper']['markerNameToElements'](_0x54f8e4['name']))['map'](_0x50d1e6=>_0xf5ba74['view']['domConverter']['mapViewToDom'](_0x50d1e6))['map'](_0x44102b=>Array['from'](_0x44102b['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x52829f['find'](_0x14f4ec=>_0x14f4ec['top']-0x3<=this['_activeViewTarget']['y']&&_0x14f4ec['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x14f4ec['left']-0x3<=this['_activeViewTarget']['x']&&_0x14f4ec['right']+0x3>=this['_activeViewTarget']['x'])||_0x52829f[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x3fb5cd,_0x5ca1c9,_0x23de7b,_0x3c8268)=>{this['activeView']=_0x23de7b?this['_getViewForChange'](_0x23de7b):null,this['editor']['model']['change'](()=>{const _0x264cb2=this['editor']['editing'];_0x3c8268&&(_0x3c8268['data']['isOnRoot']?_0x264cb2['view']['change'](_0x28be43=>{_0x28be43['removeClass']('ck-revision-history-root--active',_0x264cb2['view']['document']['getRoot'](_0x3c8268['rootName']));}):_0x264cb2['reconvertMarker']('revision:'+_0x3c8268['id'])),_0x23de7b&&(_0x23de7b['data']['isOnRoot']?_0x264cb2['view']['change'](_0x42d16a=>{_0x42d16a['addClass']('ck-revision-history-root--active',_0x264cb2['view']['document']['getRoot'](_0x23de7b['rootName']));}):_0x264cb2['reconvertMarker']('revision:'+_0x23de7b['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x36e7b7,_0xd7c2d2)=>{if(this['activeChange'])return;const _0x1b635d=this['_findChangeIdFromDomTarget'](_0xd7c2d2['target']),_0x377a70=this['_changeIdToChange']['get'](_0x1b635d);_0x377a70?(this['_activeViewTarget']={'x':_0xd7c2d2['domEvent']['x'],'y':_0xd7c2d2['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x377a70)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x14e569,_0x1e26a0)=>{const _0x2feffb=this['_findChangeIdFromDomTarget'](_0x1e26a0['target']),_0x2b52ac=this['_changeIdToChange']['get'](_0x2feffb);_0x2b52ac?(this['_activeViewTarget']={'x':_0x1e26a0['domEvent']['x'],'y':_0x1e26a0['domEvent']['y']},_0x2b52ac===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2b52ac):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x41e4e0){do{const _0x41cf95=_0x41e4e0['getAttribute']('data-change-id');if(_0x41cf95)return _0x41cf95;_0x41e4e0=_0x41e4e0['parent'];}while(_0x41e4e0);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5ddcc3=>{for(const _0x55e84d of this['editor']['model']['markers'])_0x5ddcc3['removeMarker'](_0x55e84d);});}};function Ut(_0x3dd795){return _0x3dd795['split'](':')[0x1];}function Lt(_0x55a8c2,_0x249215){return(_0x38e422,_0x406598,_0x5e6059)=>{if(!_0x5e6059['consumable']['test'](_0x406598['markerRange'],_0x38e422['name']))return;const _0x2a7210=_0x406598['markerRange']['getWalker'](),_0x355916=_0x406598['markerRange']['start'],_0x4decb3=_0x55a8c2['model']['schema'];let _0x4de033=null,_0x159b01=null,_0x1b1905=!0x1,_0x18eb04=!0x1;for(const _0x53b4e4 of _0x2a7210){const _0x299de5=_0x53b4e4['item'];_0x1b1905=_0x1b1905||_0x4decb3['isContent'](_0x299de5);const _0xb2ec5a=_0x5e6059['mapper']['toViewElement'](_0x299de5);if(_0xb2ec5a&&_0xb2ec5a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x53b4e4['type']&&(_0x4decb3['isBlock'](_0x299de5)&&!_0x4decb3['isLimit'](_0x299de5)&&(_0x299de5['nextSibling']||_0x355916['isAtEnd']?_0x4de033&&_0x4de033['parent']==_0x299de5||(_0x4de033=_0x299de5,_0x513e26(_0x53b4e4['previousPosition']),_0x18eb04=!0x0):_0x159b01=_0x159b01||_0x53b4e4['previousPosition']));}function _0x513e26(_0x181616){const _0x576c7e=_0x5e6059['mapper']['toViewPosition'](_0x181616),_0x3b7134=_0x5e6059['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x249215});_0x5e6059['writer']['insert'](_0x576c7e,_0x3b7134),_0x5e6059['mapper']['bindElementToMarker'](_0x3b7134,_0x406598['markerName']);}_0x1b1905||_0x18eb04||!_0x159b01||_0x513e26(_0x159b01);};}var Ft=class extends _0x38fd12{constructor(_0x409f80){super(_0x409f80);const _0x468170=_0x409f80['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x468170,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x468170,'change:isEnabled',()=>this['refresh']());}execute(){const _0x5286cb=this['editor'],_0x3a4d00=_0x5286cb['plugins']['get'](Pt),_0x4fcf9b=_0x3a4d00['isReady']?_0x3a4d00['diff']['newRevisionId']:null;_0x5286cb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4fcf9b);}['refresh'](){const {isReady:_0x16fe44,isEnabled:_0x39390a,repository:_0x6830db,diff:_0xb4e250}=this['editor']['plugins']['get'](Pt),_0x582f93=_0xb4e250&&_0x6830db['getLaterVisibleRevision'](_0xb4e250['newRevisionId']);this['isEnabled']=_0x16fe44&&_0x39390a&&Boolean(_0x582f93);}},$t=class extends _0x38fd12{_step;constructor(_0x4fc292,{direction:_0x3a7087}){super(_0x4fc292);const _0x19c88d=_0x4fc292['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x3a7087?0x1:-0x1,this['listenTo'](_0x19c88d,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x19c88d,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x19c88d,'change:activeChange',()=>this['refresh']());}execute(){const _0x514bcc=this['editor'],_0x8d3e05=_0x514bcc['plugins']['get'](Pt),{isNavigationMode:_0x3e8496,currentChangeNumber:_0x1214ee}=_0x8d3e05;let _0xc7db2e;if(_0x8d3e05['activeChange']=_0x3e8496?_0x8d3e05['diff']['changes']['get'](_0x1214ee+this['_step']):_0x8d3e05['diff']['changes']['first'],_0x8d3e05['activeChange']['data']['isOnRoot'])_0xc7db2e=_0x514bcc['editing']['view']['getDomRoot'](_0x8d3e05['activeChange']['rootName']);else{const _0x310659=_0x514bcc['model']['markers']['get']('revision:'+_0x8d3e05['activeChange']['id']);_0xc7db2e=_0xb30b1f(_0x514bcc['editing'],_0x310659);}_0x49c812({'target':_0xc7db2e,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x577ead,currentChangeNumber:_0x28a5e8,numberOfChanges:_0x26d489,isReady:_0x26dbdf,isEnabled:_0x1ad287}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x1ad287&&_0x26dbdf&&_0x26d489)&&(!_0x577ead||(0x1===this['_step']?_0x28a5e8<_0x26d489-0x1:_0x28a5e8>0x0));}},Bt=class extends dt{constructor(_0x3ec1cf){super(_0x3ec1cf);const _0x5286ef=this['bindTemplate'],_0x425bb0=new _0x2828f9(_0x3ec1cf),_0x296c61=new _0x2828f9(_0x3ec1cf);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',(_0xd4be23,_0x24e729)=>_0xd4be23&&_0x24e729>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x44b3fe,_0x8f6b0e,_0x4fedb2,_0xc70aef)=>{if(!_0x44b3fe)return kt(_0x3ec1cf,'Loading...');if(!_0x4fedb2)return kt(_0x3ec1cf,'No\x20changes');const _0x598d0e=kt(_0x3ec1cf,'NUMBER_OF_CHANGES',_0x4fedb2);return _0xc70aef?kt(_0x3ec1cf,'X_OF_Y_CHANGES',[_0x8f6b0e+0x1,_0x4fedb2]):_0x598d0e;}),_0x425bb0['set']({'label':kt(_0x3ec1cf,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3c7c33}),_0x296c61['set']({'label':kt(_0x3ec1cf,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x58db84}),_0x425bb0['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x296c61['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x425bb0['on']('execute',()=>this['fire']('execute','backward')),_0x296c61['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',_0x5286ef['if']('_isStatusLabelVisible','ck-hidden',_0x47cd54=>!_0x47cd54)]},'children':[{'text':_0x5286ef['to']('isNavigationMode',_0x2f5914=>_0x2f5914?kt(_0x3ec1cf,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x3ec1cf,'Total')+':\x20')}]},{'text':_0x5286ef['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x425bb0,_0x296c61]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x149c71{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x59a2ad=this['editor']['editing']['view'];_0x59a2ad['change'](_0x2d66f9=>{for(const _0x12865e of _0x59a2ad['document']['roots'])_0x2d66f9['addClass'](jt,_0x12865e);});}['hide'](){const _0x53f10e=this['editor']['editing']['view'];_0x53f10e['change'](_0x6901cb=>{for(const _0x5ea93c of _0x53f10e['document']['roots'])_0x6901cb['removeClass'](jt,_0x5ea93c);});}},Kt=class extends _0x149c71{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x1e7a66=this['editor'],_0x4ff570=_0x1e7a66['plugins']['get'](Pt),_0x527b50=_0x1e7a66['plugins']['get'](Gt);_0x1e7a66['ui']['componentFactory']['add']('exitToEditing',_0x289998=>{const _0x150d8d=new _0x2828f9(_0x289998);return _0x150d8d['set']({'label':kt(_0x289998,'Back\x20to\x20editing'),'icon':_0xbd625a,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x150d8d,'execute',()=>{_0x1e7a66['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x150d8d;}),_0x1e7a66['ui']['componentFactory']['add']('restoreRevision',_0x272a40=>{const _0x3b865e=new _0x2828f9(_0x272a40);return _0x3b865e['set']({'label':kt(_0x272a40,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x3b865e['bind']('isEnabled')['to'](_0x1e7a66['commands']['get']('restoreRevision')),this['listenTo'](_0x3b865e,'execute',()=>_0x1e7a66['execute']('restoreRevision')),_0x3b865e;}),_0x1e7a66['ui']['componentFactory']['add']('changesNavigation',_0x4a30cb=>{const _0x295eae=new Bt(_0x4a30cb),_0x5baacf=_0x1e7a66['commands']['get']('showPreviousChange'),_0x2fcc10=_0x1e7a66['commands']['get']('showNextChange');return _0x295eae['bind']('isBackwardNavigationEnabled')['to'](_0x5baacf,'isEnabled'),_0x295eae['bind']('isForwardNavigationEnabled')['to'](_0x2fcc10,'isEnabled'),_0x295eae['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x4ff570),this['listenTo'](_0x295eae,'execute',(_0x54f06d,_0x25b900)=>{_0x1e7a66['execute']('forward'===_0x25b900?'showNextChange':'showPreviousChange');}),_0x295eae;}),_0x527b50['show'](),_0x4ff570['on']('change:isReady',(_0x14cc5a,_0x5ea1b5,_0x4d30c6)=>{_0x4d30c6?_0x527b50['hide']():_0x527b50['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x4f7be2,_0x9e4763){super(_0x4f7be2,_0x9e4763);const _0x8c1f31=this['bindTemplate'];this['set']({'label':kt(_0x4f7be2,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x4f7be2,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x8c1f31['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x5b511d(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x533be1=this['fieldView']['element'];this['_tooltipString']=_0x533be1['scrollWidth']>_0x533be1['clientWidth']&&_0x533be1['value']||'';}},Yt=class extends dt{constructor(_0x3a41d5,_0x37704f,_0x4767e4){super(_0x3a41d5);const _0x11fd2b=new _0x2813f5();_0x11fd2b['set']({'content':_0x362c27,'viewBox':'0\x200\x2011\x2010'});const _0x20802c=['ck','ck-revision-history-sidebar__revision-author'];_0x4767e4&&_0x20802c['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3bc9b2=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x3a41d5,_0x4767e4?'Revision\x20creator':'Revision\x20author')},'children':[_0x11fd2b,_0x37704f['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x20802c},'children':_0x3bc9b2});}};function Jt(_0x16ca19,_0x2337e4){const _0x852cb1=_0x16ca19['bindTemplate'],_0x2266ec=_0x16ca19['locale'],_0x36600a=vt(_0x2266ec);_0x36600a['panelPosition']='sw';const _0x16f2fc=function(_0x4cfbe9,_0xd61943){const _0x38d6dc=function(_0x35a05a,_0x4c98e4){const _0x59a4e1=_0x35a05a['locale'],_0x28bd13={'Compare\x20against\x20selected':kt(_0x59a4e1,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x59a4e1,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x59a4e1,'Restore\x20this\x20revision')};return _0x4c98e4['map'](_0x35cabd=>{const _0x37b4eb=_0x28bd13[_0x35cabd['name']];return _0x37b4eb&&_0x37b4eb!==_0x35cabd['name']&&(_0x35cabd['name']=_0x37b4eb),_0x35cabd;});}(_0x4cfbe9,_0xd61943),_0x251c6c=new _0x29b214();for(const _0x1b46a3 of _0x38d6dc){const _0x55e78d={'type':'button','model':new ut({'label':_0x1b46a3['name'],'class':_0x1b46a3['class'],'withText':!0x0,'role':'menuitem','_action':_0x1b46a3['action']})};_0x55e78d['model']['bind']('isEnabled')['to'](_0x4cfbe9,'isActionsDropdownOpen',_0x217371=>'function'!=typeof _0x1b46a3['isEnabled']||(!_0x217371||_0x1b46a3['isEnabled'](_0x4cfbe9))),_0x251c6c['add'](_0x55e78d);}return _0x251c6c;}(_0x16ca19,_0x2337e4);return _0x16ca19['bind']('isActionsDropdownOpen')['to'](_0x36600a,'isOpen'),_0x36600a['buttonView']['set']({'label':kt(_0x2266ec,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1a6c25}),_0x36600a['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x852cb1['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x852cb1['to'](_0x2ea7e0=>_0x2ea7e0['stopPropagation']())}}),_0x36600a['on']('execute',_0xd0ad3d=>{_0x16ca19['isReady']&&'function'==typeof _0xd0ad3d['source']['_action']&&_0xd0ad3d['source']['_action'](_0x16ca19);}),ft(_0x36600a,_0x16f2fc,{'role':'menu'}),_0x36600a['listenTo'](_0x16ca19,'change:isActionsDropdownOpen',(_0x5de848,_0x51fa5f,_0x3200fb)=>{if(_0x3200fb)for(const _0x417184 of _0x36600a['listView']['items']){const _0x1db5c1=_0x417184['children']['first'],_0x37a856=_0x2337e4['find'](_0x5ed8d1=>_0x5ed8d1['action']===_0x1db5c1['_action'])['isVisible'];_0x417184['isVisible']=void 0x0===_0x37a856||_0x37a856(_0x16ca19);}}),_0x36600a;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x2be8de,Collection as _0x4a5c87,ElementReplacer as _0x57c629,FocusTracker as _0x4066f3,KeystrokeHandler as _0x427814,ObservableMixin as _0x6714c0,ResizeObserver as _0x52e81b,logWarning as _0x4b8393,scrollViewportToShowTarget as _0x175b99,trustedHtml as _0x2e6ac4,uid as _0x463db6}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x319a1d,isEqual as _0x12802e,set as _0x1b4d25,unset as _0x41c561}from'es-toolkit/compat';import{Command as _0x99685,Editor as _0xda5396,ElementApiMixin as _0x559762,PendingActions as _0x5839e0,Plugin as _0x425632}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0xdb0a5,PillView as _0x3cbf88,Users as _0xacfea9,getMarkerDomElement as _0x56288d,reRootOperation as _0x5d8b59,reRootPosition as _0x6deac0,reRootRange as _0x2f1d78,sanitizeEditorConfig as _0x463892}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x384ec3,ModelElement as _0x47c9c9,ModelRange as _0x150a98,ModelText as _0x53d605,ViewAttributeElement as _0x46a018,ViewContainerElement as _0x356f5e,ViewDocumentFragment as _0x568339,ViewElement as _0xe0cf57,ViewEmptyElement as _0x3705a4,ViewRawElement as _0x154333,ViewText as _0x2c5aae,ViewUIElement as _0x4a6718}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x4a9e38,IconChevronUp as _0x5704a5,IconHistory as _0x3ae085,IconSparkle as _0x2ea1bc,IconThreeVerticalDots as _0x322985,IconUndo as _0x3d7291,IconUser as _0x22dde7}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x1b76a7,ButtonView as _0x2bddaa,ContextualBalloon as _0x14cbb3,CssTransitionDisablerMixin as _0x44dc82,EditorUI as _0x5f5629,IconView as _0xcee50d,InlineEditableUIView as tt,LabeledFieldView as it,ListItemView as et,ListView as st,MenuBarMenuListItemButtonView as nt,MenuBarMenuListItemView as ot,MenuBarMenuListView as rt,MenuBarMenuView as at,StickyPanelView as ht,ToolbarSeparatorView as ct,ToolbarView as lt,UIModel as ut,View as dt,addListToDropdown as ft,createDropdown as vt,createLabeledInputText as gt,normalizeToolbarConfig as mt,submitHandler as _t}from'@ckeditor/ckeditor5-ui';import{DateTime as wt}from'luxon';const pt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x6714c0();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x322211){super(),this['id']=_0x322211['id']||_0x463db6(),this['creator']=_0x322211['creator']||null,this['authors']=_0x322211['authors']||[],this['diffData']=_0x322211['diffData']||null,this['toVersion']=_0x322211['toVersion']||0x0,this['fromVersion']=_0x322211['fromVersion']||0x0,this['set']('name',_0x322211['name']||''),this['set']('createdAt',_0x322211['createdAt']||new Date()),this['set']('attributes',_0x322211['attributes']||{});}setName(_0x4ac695){this['_update']({'name':_0x4ac695});}setAttribute(_0x288f36,_0x2111e9){const _0x10a5dc=_0x319a1d(this['attributes']);_0x1b4d25(_0x10a5dc,_0x288f36,_0x2111e9),this['_update']({'attributes':_0x10a5dc});}removeAttribute(_0x242f6e){const _0x4e8394=_0x319a1d(this['attributes']);_0x41c561(_0x4e8394,_0x242f6e),this['_update']({'attributes':_0x4e8394});}_update(_0x2afcd4,_0xd8c7be=!0x1){let _0x4a7b66=!0x1;const _0x569ed2={'id':this['id']};for(const _0x6e4181 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x1c43b7=_0x2afcd4[_0x6e4181];void 0x0!==_0x1c43b7&&_0x1c43b7!==this[_0x6e4181]&&(this[_0x6e4181]=_0x1c43b7,_0x569ed2[_0x6e4181]=_0x1c43b7,_0x4a7b66=!0x0);}_0x4a7b66&&(_0x569ed2['authors']&&(_0x569ed2['authorsIds']=_0x569ed2['authors']['map'](_0x3620ba=>_0x3620ba['id']),delete _0x569ed2['authors']),this['fire']('_update',_0x569ed2,_0xd8c7be));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x1f41f6=>_0x1f41f6['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x425632{['_revisions'];static get requires(){return[_0xacfea9];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x586a17){super(_0x586a17),this['_revisions']=new _0x4a5c87();}afterInit(){!async function(_0x11fc8d){const _0x4f3088='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x105286=0xeb829,_0x235ad2=0x79728,_0xe009af={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x96ce2a(_0x118488){const _0x291ccb=new window['Promise'](_0x14b84b=>{_0x118488['once']('ready',_0x14b84b);}),_0x2dd95e=window['Date']['now'](),_0x2bdd6b=_0x118488['config']['get']('licenseKey');async function _0x4b0795(){let _0x367622,_0x2d4fbf=null,_0x13d213=null;try{return'GPL'==_0x2bdd6b?'NotAllowed':(_0x367622=_0x35359d(),_0x367622?(_0x367622['usageEndpoint']&&(_0x13d213=_0x436646(_0x367622['usageEndpoint'],_0x367622['jti'])),await _0x176a8c()?_0x5ea891()?_0x36496b()?'Expired':_0x1b98d7()?('evaluation'==_0x367622['licenseType']&&(_0x2d4fbf=_0x5bd4bb('EvaluationLimit')),await _0x3e66ab()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x36496b(){const _0x54aa17=['evaluation','trial']['includes'](_0x367622['licenseType'])?_0x2dd95e/0x3e8:0xe10*_0x235ad2;return _0x367622['exp']<_0x54aa17;}function _0x5ea891(){const _0x3d99bf=_0x367622['features'];if(!_0x3d99bf)return!0x1;if(_0x3d99bf['includes']('*'))return!0x0;if(_0x3d99bf['includes']('RH'))return!0x0;if(_0x3d99bf['includes']('RRH')){if(_0x13c9d0())return!0x0;if(_0x4fbf00()||_0x46c38())return!0x0;}return!0x1;}function _0x1b98d7(){const _0x3a5a1c=_0x367622['licensedHosts'];if(!_0x3a5a1c||0x0==_0x3a5a1c['length'])return!0x0;const {hostname:_0x41a3cb}=new URL(window['location']['href']);if(_0x3a5a1c['includes'](_0x41a3cb))return!0x0;const _0x5fa3d3=_0x41a3cb['split']('.');return _0x3a5a1c['filter'](_0x398ec0=>_0x398ec0['includes']('*'))['map'](_0x289acc=>_0x289acc['split']('.'))['filter'](_0x414841=>_0x414841['length']<=_0x5fa3d3['length'])['map'](_0x1d693a=>Array(_0x5fa3d3['length']-_0x1d693a['length'])['fill']('*'===_0x1d693a[0x0]?'*':'')['concat'](_0x1d693a))['some'](_0x1418df=>_0x5fa3d3['every']((_0x2e2057,_0x5c3e62)=>_0x1418df[_0x5c3e62]===_0x2e2057||'*'===_0x1418df[_0x5c3e62]));}function _0x3e66ab(){return _0x2d4fbf&&_0x13d213?new window['Promise']((_0x3b4d74,_0x28b979)=>{_0x2d4fbf['then'](_0x3b4d74,_0x28b979),_0x13d213['then'](_0x13841b=>{'Valid'!=_0x13841b&&_0x3b4d74(_0x13841b);},_0x28b979);}):_0x2d4fbf||_0x13d213||'Valid';}}function _0x436646(_0x2bff85,_0x531e1e){return new window['Promise'](_0x59f350=>{if(_0x197af8())return _0x59f350('Valid');_0x4cc969(),_0x118488['decorate']('_sendUsageRequest');let _0x5362ba=!0x1;const _0x323144=_0x463db6();function _0x2cff2d(_0x16dd4a){return!!_0x16dd4a&&('object'==typeof _0x16dd4a||'function'==typeof _0x16dd4a)&&'function'==typeof _0x16dd4a['then']&&'function'==typeof _0x16dd4a['catch'];}function _0x44b472(_0xec994d){_0x2f885a(_0xec994d)['then'](_0x1e7469=>_0x1e7469&&'ok'==_0x1e7469['status']?_0x164f9a(_0x16f50e(_0x323144+_0x531e1e))!=_0x1e7469['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4cef88=>(_0x264488(),_0x4cef88),()=>{const _0x234a75=_0x43cf4b();return null==_0x234a75?(_0x264488(),'Valid'):_0x2dd95e-_0x234a75>0x240c8400?'UsageLimit':'Valid';})['then'](_0x59f350)['catch'](()=>{_0x59f350('UsageLimit');});const _0x4bafdf=0x36ee80;function _0x264488(){const _0x4b23f0='llct-'+_0x164f9a(_0x16f50e(_0x2bff85)),_0x44ae79=_0x3e2790(_0x164f9a(window['Math']['ceil'](_0x2dd95e/_0x4bafdf)));window['localStorage']['setItem'](_0x4b23f0,_0x44ae79);}function _0x43cf4b(){const _0xb66dd7='llct-'+_0x164f9a(_0x16f50e(_0x2bff85)),_0x220b7a=window['localStorage']['getItem'](_0xb66dd7);return _0x220b7a?window['parseInt'](_0x3e2790(_0x220b7a),0x10)*_0x4bafdf:null;}function _0x2f885a(_0x1f051c){return new window['Promise']((_0x2c6525,_0x2154cb)=>{_0x1f051c['then'](_0x2c6525,_0x2154cb),window['setTimeout'](_0x2154cb,0x1d4c0);});}}_0x118488['on']('_sendUsageRequest',(_0x3d26aa,_0x2a47a8)=>{if(_0x2a47a8[0x0]!=_0x2bff85)return _0x59f350('UsageLimit');_0x2a47a8[0x1]={..._0x2a47a8[0x1],'requestId':_0x323144};},{'priority':'high'}),_0x118488['on']('_sendUsageRequest',_0xfcec6c=>{_0x2cff2d(_0xfcec6c['return'])&&(_0x5362ba=!0x0,_0x44b472(_0xfcec6c['return']));},{'priority':'low'}),_0x291ccb['then'](()=>{_0x5362ba||_0x59f350('UsageLimit');});});function _0x197af8(){return'auto'==_0x118488['editing']['view']['_overlayModeHint'];}function _0x4cc969(){_0x118488['editing']['view']['_overlayModeHint']='auto';}}function _0x5bd4bb(_0x1039a9){const _0x2bbacf=[new window['Promise'](_0xd09c0=>setTimeout(_0xd09c0,0x93ecc)),_0x291ccb['then'](()=>new window['Promise'](_0x4cc1d8=>{const _0x58fa45=0x7,_0x3aeaa6=_0x11fc8d['_revisions'];function _0x5201a5(){_0x3aeaa6['length']>=_0x58fa45&&_0x4cc1d8();}_0x5201a5(),_0x3aeaa6['on']('add',_0x5201a5);})),new window['Promise'](_0x33826a=>{function _0x158a71(){for(const _0x3dff5d in window)if(window['Number']['isNaN'](window['Number'](_0x3dff5d))&&window[_0x3dff5d]==_0x105286)return _0x33826a();'destroyed'!=_0x118488['state']&&window['setTimeout'](_0x158a71,0x1388);}_0x572c8a('RevisionViewer')&&_0x158a71();})];return window['Promise']['race'](_0x2bbacf)['then'](()=>_0x1039a9);}async function _0x382da1(){if(await _0x291ccb,_0x572c8a('RevisionViewer')){const _0x522f38=_0x11fc8d['getRevision'](0x0),_0x44b77e=_0x11fc8d['getEarlierVisibleRevision'](_0x522f38['id']),_0x3d3063=_0x1539e4('RevisionViewer');return await _0x3d3063['compare'](_0x522f38['id'],_0x44b77e?_0x44b77e['id']:null,!0x0),_0x3d3063['unbind']('isEnabled'),_0x3d3063['isEnabled']=!0x1,_0x3d3063['compare']=_0x11ad2a,void(_0x3d3063['_getDiff']=_0x11ad2a);}if(_0x572c8a('RevisionTracker')){const _0x8d5c8b=_0x1539e4('RevisionTracker');_0x8d5c8b['unbind']('isEnabled'),_0x8d5c8b['isEnabled']=!0x1,_0x8d5c8b['update']=_0x11ad2a,_0x8d5c8b['saveRevision']=_0x11ad2a;}_0x118488['model']['change']=_0x11ad2a,_0x118488['model']['enqueueChange']=_0x11ad2a,_0x118488['enableReadOnlyMode']('model');}function _0x13c9d0(){return _0x572c8a('WebSocketGateway')&&'connected'==_0x1539e4('WebSocketGateway')['state'];}function _0x4fbf00(){return _0x572c8a('RevisionViewerIntegration');}function _0x46c38(){return _0x572c8a('TrackChangesDataGetter');}function _0x514366(_0x4c4ebc){const _0x50639e=_0x53a316();_0x118488[_0x50639e]='revisionHistoryLicenseKey'+_0x4c4ebc,_0x4c4ebc['endsWith']('Limit')&&(window[_0x53a316()]=_0x105286),'Valid'!=_0x4c4ebc&&_0x382da1();}function _0x53a316(){const _0x394423=window['String'](window['performance']['now']())['replace']('.','');let _0xef3ec5='N';for(let _0x344dd3=0x0;_0x344dd3<_0x394423['length'];_0x344dd3+=0x2){let _0x362a5e=window['parseInt'](_0x394423['substring'](_0x344dd3,_0x344dd3+0x2));_0x362a5e>=0x3e&&(_0x362a5e-=0x3e),_0xef3ec5+=_0x4f3088[_0x362a5e];}return _0xef3ec5;}function _0x35359d(){const _0x15b874=_0x2bdd6b['split']('.');if(0x3!=_0x15b874['length'])return null;return _0x56436f(_0x15b874[0x1]);function _0x56436f(_0x101f5f){const _0x26d15d=_0x5b94b0(_0x101f5f);return _0x26d15d&&_0x153931()?_0x26d15d:null;function _0x153931(){const _0xb754bb=_0x26d15d['jti'],_0x46233f=window['parseInt'](_0xb754bb['substring'](_0xb754bb['length']-0x8),0x10),_0x5c9b27={..._0x26d15d,'jti':_0xb754bb['substring'](0x0,_0xb754bb['length']-0x8)};return delete _0x5c9b27['vc'],_0x16f50e(_0x5c9b27)==_0x46233f;}}}async function _0x176a8c(){let _0x17c21c=!0x0;try{const [_0x2cb1c5,_0x2a75d8,_0x12a090]=_0x2bdd6b['split']('.');return _0x335e74(_0x2cb1c5),await _0x24f8f8(_0x2cb1c5,_0x2a75d8,_0x12a090),_0x17c21c;}catch{return!0x1;}function _0x335e74(_0x427b4a){const _0x467f4c=_0x5b94b0(_0x427b4a);_0x467f4c&&'ES256'==_0x467f4c['alg']||(_0x17c21c=!0x1);}async function _0x24f8f8(_0x252b03,_0x304bbf,_0x439672){const _0x9166c9=window['Uint8Array']['from'](_0x33efa8(_0x439672),_0x396924=>_0x396924['charCodeAt'](0x0)),_0x1f8873=new window['TextEncoder']()['encode'](_0x252b03+'.'+_0x304bbf),_0x147836=window['crypto']['subtle'];if(!_0x147836)return;const _0x545e00=await _0x147836['importKey']('jwk',_0xe009af,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x147836['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x545e00,_0x9166c9,_0x1f8873)||(_0x17c21c=!0x1);}}function _0x5b94b0(_0x149be8){return _0x149be8['startsWith']('ey')?JSON['parse'](_0x33efa8(_0x149be8)):null;}function _0x33efa8(_0x45203c){return window['atob'](_0x45203c['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x16f50e(_0x2192c6){let _0xf23d77=0x1505;function _0x3a1513(_0x5ab26c){for(let _0x4f3270=0x0;_0x4f3270<_0x5ab26c['length'];_0x4f3270++){const _0x4401a0=_0x5ab26c['charCodeAt'](_0x4f3270);_0xf23d77=(_0xf23d77<<0x5)+_0xf23d77+_0x4401a0,_0xf23d77&=_0xf23d77;}}function _0x1b8910(_0x32ace6){Array['isArray'](_0x32ace6)?_0x32ace6['forEach'](_0x1b8910):_0x32ace6&&'object'==typeof _0x32ace6?Object['entries'](_0x32ace6)['sort']()['forEach'](([_0x12b3c9,_0x3041a5])=>{_0x3a1513(_0x12b3c9),_0x1b8910(_0x3041a5);}):_0x3a1513(window['String'](_0x32ace6));}return _0x1b8910(_0x2192c6),_0xf23d77>>>0x0;}function _0x164f9a(_0x5c02d5){return _0x5c02d5['toString'](0x10)['padStart'](0x8,'0');}function _0x3e2790(_0x1a1867){return _0x1a1867['split']('')['reverse']()['join']('');}function _0x572c8a(_0x31d2d5){return _0x118488['plugins']['has'](_0x31d2d5);}function _0x1539e4(_0x29e059){return _0x118488['plugins']['get'](_0x29e059);}function _0x11ad2a(){}_0x514366(await _0x4b0795());}_0x96ce2a(_0x11fc8d['editor']);}(this);}createRevision(_0x16a0e6){const _0x865de6=this['editor']['plugins']['get']('Users');return new yt({'id':_0x16a0e6['id'],'name':_0x16a0e6['name'],'creator':_0x16a0e6['creatorId']?_0x865de6['getUser'](_0x16a0e6['creatorId']):null,'diffData':_0x16a0e6['diffData']||_0x16a0e6['data'],'authors':_0x16a0e6['authorsIds']['map'](_0x184b37=>_0x865de6['getUser'](_0x184b37)),'createdAt':new Date(_0x16a0e6['createdAt']),'attributes':_0x16a0e6['attributes'],'fromVersion':_0x16a0e6['fromVersion'],'toVersion':_0x16a0e6['toVersion']});}['addRevision'](_0xa432e9,_0x11b422=0x0){this['_revisions']['add'](_0xa432e9,_0x11b422);}getRevision(_0xd770b3){return this['_revisions']['get'](_0xd770b3);}getRevisions(_0x34fd9a={'toJSON':!0x1}){const _0x1547b4=Array['from'](this['_revisions']);return _0x1547b4['reverse'](),_0x34fd9a['toJSON']?_0x1547b4['map'](_0x3aecf0=>_0x3aecf0['toJSON']()):_0x1547b4;}getIndex(_0x667fb3){return this['_revisions']['getIndex'](_0x667fb3);}getEarlierVisibleRevision(_0x582ad9){const [,_0x2c9cc5]=this['getRevisionsIterator'](_0x582ad9,{'direction':'earlier'});return _0x2c9cc5;}getLaterVisibleRevision(_0x4cbe82){const [,_0x383118]=this['getRevisionsIterator'](_0x4cbe82,{'direction':'later'});return _0x383118;}getRevisionsInDiff(_0x301235){const _0x42e6c2=[];for(const _0x1e211f of this['getRevisionsIterator'](_0x301235['newRevisionId']))if(_0x42e6c2['push'](_0x1e211f),_0x1e211f['id']===_0x301235['oldRevisionId'])break;return _0x42e6c2;}*getRevisionsIterator(_0x15fb8f,{direction:_0x49efc2='earlier',filter:_0x8d326d=()=>!0x0}={}){const _0x5bd7ae='earlier'===_0x49efc2?0x1:-0x1;let _0x2eb6a7=this['_revisions']['get'](_0x15fb8f),_0x15c970=this['getIndex'](_0x2eb6a7);for(yield _0x2eb6a7;_0x2eb6a7;){if(_0x15c970+=_0x5bd7ae,_0x2eb6a7=this['getRevision'](_0x15c970),!_0x2eb6a7)return;_0x8d326d(_0x2eb6a7)&&(yield _0x2eb6a7);}}},Rt=class extends _0x425632{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x356f5e,'c'],[_0x46a018,'a'],[_0x3705a4,'e'],[_0x154333,'r'],[_0x4a6718,'u']]);_typeCharToViewClass=new Map([['c',_0x356f5e],['a',_0x46a018],['e',_0x3705a4],['r',_0x154333],['u',_0x4a6718]]);async loadRevisionData(_0x4f3b2e,_0x526b84){if(_0x4f3b2e['diffData']||!_0x526b84)return;const _0x56ddac=this['editor']['config']['get']('collaboration.channelId');_0x4f3b2e['diffData']=(await _0x526b84['getRevision']({'channelId':_0x56ddac,'revisionId':_0x4f3b2e['id']}))['diffData'];}getRevisionDocumentData(_0x28d11a){const _0x315d5e={};for(const _0x411ec9 in _0x28d11a['diffData']){if(_0x28d11a['diffData'][_0x411ec9]['attachChange']&&!_0x28d11a['diffData'][_0x411ec9]['attachChange']['isAttached'])continue;const _0x4ad487=this['_removeRevisionMarkers'](JSON['parse'](_0x28d11a['diffData'][_0x411ec9]['insertions'])),_0x4097e6=this['editor']['editing']['view']['document'],_0x386835=new _0x568339(_0x4097e6,_0x4ad487['map'](_0x7cd9a2=>this['_getViewFromDiffObj'](_0x7cd9a2,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x315d5e[_0x411ec9]=this['editor']['data']['processor']['toData'](_0x386835),this['editor']['data']['processor']['useFillerType']('default');}return _0x315d5e;}getRevisionRootsAttributes(_0x3b9771){const _0x12dc0e={};for(const _0x3414a1 in _0x3b9771['diffData'])_0x3b9771['diffData'][_0x3414a1]['attachChange']&&!_0x3b9771['diffData'][_0x3414a1]['attachChange']['isAttached']||(_0x12dc0e[_0x3414a1]=_0x3b9771['diffData'][_0x3414a1]['attributesAfter']||{});return _0x12dc0e;}getRevisionRootsModelElements(_0x3807fa){const _0xaace95={};for(const _0xf6e862 in _0x3807fa['diffData']){if(_0x3807fa['diffData'][_0xf6e862]['attachChange']&&!_0x3807fa['diffData'][_0xf6e862]['attachChange']['isAttached'])continue;const _0x44f51e=_0x3807fa['diffData'][_0xf6e862]['rootElementName'];_0x44f51e&&(_0xaace95[_0xf6e862]=_0x44f51e);}return _0xaace95;}_getTypeCharForViewElement(_0xe9aa1b){return this['_viewClassToTypeChar']['get'](_0xe9aa1b['constructor']);}_getViewFromDiffObj(_0x5997d3,_0x5c536f){const _0x6eb394=this['editor']['editing']['view']['document'];if('string'==typeof _0x5997d3)return new _0x2c5aae(_0x6eb394,_0x5997d3);{let _0x35b3cd,_0x24a209;_0x24a209='u'==_0x5997d3['type']||'r'==_0x5997d3['type']?[]:_0x5997d3['children']['map'](_0x1577e2=>this['_getViewFromDiffObj'](_0x1577e2,_0x5c536f));const _0x27c358=this['_typeCharToViewClass']['get'](_0x5997d3['type'])||_0xe0cf57,_0x23d2d3=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x35b3cd=new _0x27c358(_0x6eb394,_0x5997d3['name'],_0x5997d3['attributes'],_0x24a209),'u'==_0x5997d3['type']&&_0x5997d3['children'][0x0]){const _0x557f9a=_0x5997d3['children'][0x0];if(_0x35b3cd['render']=function(_0xfe2537){const _0x39788d=_0xfe2537['createElement']('div');return _0x39788d['innerHTML']=_0x2e6ac4(_0x557f9a),_0x39788d['childNodes'][0x0];},_0x5c536f){const _0x4868f9=new _0x568339(_0x6eb394);_0x4868f9['_appendChild'](_0x35b3cd);const _0x4905c7=Array['from'](_0x23d2d3['viewChildrenToDom'](_0x4868f9,{'bind':!0x1})),_0x2b40a0=_0x23d2d3['domDocument']['createElement']('div');_0x2b40a0['append'](..._0x4905c7),_0x35b3cd=Array['from'](_0x23d2d3['domChildrenToView'](_0x2b40a0))[0x0];}}else{if('r'==_0x5997d3['type']&&_0x5997d3['children'][0x0]){const _0x70a39b=_0x5997d3['children'][0x0];if(_0x35b3cd['render']=function(_0x151675){_0x151675['innerHTML']=_0x2e6ac4(_0x70a39b);},_0x5c536f){const _0x4f7a8a=new _0x568339(_0x6eb394);_0x4f7a8a['_appendChild'](_0x35b3cd);const _0x2090e3=Array['from'](_0x23d2d3['viewChildrenToDom'](_0x4f7a8a,{'bind':!0x1})),_0x4a30e8=_0x23d2d3['domDocument']['createElement']('div');_0x4a30e8['append'](..._0x2090e3);const _0x4090d4=Array['from'](_0x23d2d3['domChildrenToView'](_0x4a30e8));_0x4090d4['length']>0x1?_0x35b3cd['_appendChild'](_0x4090d4):_0x35b3cd=_0x4090d4[0x0];}}}if(_0x5997d3['customProperties']){for(const [_0x135ed7,_0x55d61b]of _0x5997d3['customProperties'])_0x35b3cd['_setCustomProperty'](_0x135ed7,_0x55d61b);}const _0x3bc9d3=void 0x0===_0x5997d3['fillerOffset']?null:_0x5997d3['fillerOffset'];return null!==_0x3bc9d3&&(_0x35b3cd['getFillerOffset']=()=>_0x3bc9d3),_0x35b3cd;}}_makeModelFromViewString(_0x40e9fc,_0x4b869d){const _0x1cbf6a=JSON['parse'](_0x40e9fc),_0x5b2b87=this['editor']['editing']['view']['document'],_0x2be1b5=new _0x568339(_0x5b2b87,_0x1cbf6a['map'](_0x37b2f2=>this['_getViewFromDiffObj'](_0x37b2f2,!0x0))),_0x3f0073=this['editor']['data']['toModel'](_0x2be1b5,_0x4b869d);return _0x3f0073['name']=_0x4b869d,_0x3f0073;}['_removeRevisionMarkers'](_0x3d23d4){return(_0x3d23d4=_0x3d23d4['filter'](_0x518a69=>!_0x518a69['name']||'revision-start'!==_0x518a69['name']&&'revision-end'!==_0x518a69['name']))['forEach'](_0x41d815=>{'string'!=typeof _0x41d815&&(_0x41d815['children']=this['_removeRevisionMarkers'](_0x41d815['children']),_0x41d815['attributes']=_0x41d815['attributes']['filter'](_0x371f77=>!_0x371f77[0x0]['startsWith']('data-revision-')));}),_0x3d23d4;}};function kt(_0x28ac4c,_0x51d34d,_0x18a7b8){const t=_0x28ac4c['t'];switch(_0x51d34d){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'},_0x18a7b8);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x18a7b8);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'},_0x18a7b8);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x18a7b8);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x18a7b8);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x425632{['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[_0xacfea9,bt,Rt,_0x5839e0];}constructor(_0x2b8492){super(_0x2b8492),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 _0x992ba0=_0x463db6();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x992ba0},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 _0x1c52f9=this['repository']['getRevision'](0x0),_0x4395b0=_0x1c52f9&&null===_0x1c52f9['creator']?_0x1c52f9:null;if(this['_continueCurrentRevision']=!!_0x4395b0&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1f445d=this['_source']['getCurrentRevisionId'](),_0x3a6ab0=this['repository']['getRevision'](_0x1f445d);if(_0x3a6ab0)this['_startingVersion']=_0x3a6ab0['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3e48c4=this['_source']['history']['_operations']['find'](_0x2d3421=>!_0x2d3421['_isInit']),_0x48edd9=_0x3e48c4?_0x3e48c4['baseVersion']:this['_source']['history']['version'];_0x1c52f9?(_0x1c52f9['toVersion']<_0x48edd9&&_0x1c52f9['_update']({'toVersion':_0x48edd9}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x4395b0['id'],this['_startingVersion']=_0x4395b0['fromVersion']):(this['_startingVersion']=_0x1c52f9['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x48edd9,this['_continueCurrentRevision']=!0x1);}}else _0x4395b0&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x4395b0['toVersion'],this['editor']['model']['document']['history']['version']),_0x4395b0['fromVersion']===_0x4395b0['toVersion']?(0x0!==_0x4395b0['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x4395b0['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x4395b0['id'],this['_startingVersion']=_0x4395b0['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',_0x22e553=>!_0x22e553),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x377b27=[this['editor']];for(const _0x525b2a of _0x377b27){let _0x41b5fc;for(const _0x4818c4 in _0x525b2a){const _0x5bf7a3=_0x4818c4,_0x55d6f9=_0x525b2a[_0x5bf7a3];if('revisionHistoryLicenseKeyValid'==_0x55d6f9||'revisionHistoryLicenseKeyInvalid'==_0x55d6f9||'revisionHistoryLicenseKeyExpired'==_0x55d6f9||'revisionHistoryLicenseKeyDomainLimit'==_0x55d6f9||'revisionHistoryLicenseKeyNotAllowed'==_0x55d6f9||'revisionHistoryLicenseKeyEvaluationLimit'==_0x55d6f9||'revisionHistoryLicenseKeyUsageLimit'==_0x55d6f9){delete _0x525b2a[_0x5bf7a3],_0x41b5fc=_0x55d6f9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x41b5fc&&_0x525b2a['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x41b5fc&&_0x525b2a['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x41b5fc&&_0x525b2a['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x41b5fc&&_0x525b2a['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x41b5fc&&_0x525b2a['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x41b5fc&&_0x525b2a['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x285313=this['repository']['getRevision'](0x0),_0x18f260=await this['getRevisionDocumentData'](_0x285313),_0x237e92=await this['getRevisionRootsAttributes'](_0x285313),_0x3e91a7=this['_utils']['getRevisionRootsModelElements'](_0x285313);this['_replaceEditorDataWithRevisionData'](_0x18f260,_0x237e92,_0x3e91a7);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x554e81){this['_source']=_0x554e81;}async update(){const _0x3dc7bd=await this['_source']['getLatestVersion']();if(_0x3dc7bd>this['currentRevision']['toVersion']){await this['_loadState']();const _0x2dde03=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3dc7bd});_0x2dde03['authors']=_0x2dde03['authorsIds']['map'](_0x5e51cb=>this['editor']['plugins']['get']('Users')['getUser'](_0x5e51cb)),this['currentRevision']['_update'](_0x2dde03);}}async['saveRevision'](_0x4d01da={},_0x111cad=null){const _0x2d2547=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x111cad>this['currentRevision']['toVersion']&&(_0x111cad=null),null===_0x111cad&&(_0x111cad=await this['_source']['getLatestVersion']());const _0x4a01b4=this['_getFromVersion'](_0x111cad),_0x3ee05b=this['buildRevisionData']({'from':_0x4a01b4,'to':_0x111cad});if(this['currentRevision']['toVersion']<_0x111cad){const _0x5e0e34=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x111cad,'to':_0x111cad});_0x5e0e34['authors']=[],_0x5e0e34['authorsIds']=[],_0x5e0e34['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x5e0e34,!0x0),delete _0x5e0e34['authors'],_0x2d2547['push'](_0x5e0e34);}const _0xd1bd54={..._0x4d01da,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x4d01da['name']||null,'id':_0x4d01da['id']||_0x463db6(),..._0x3ee05b,'attributes':{..._0x4d01da['attributes'],..._0x3ee05b['attributes']}},_0x1eca93=this['addRevisionData'](_0xd1bd54);_0x2d2547['push'](_0xd1bd54);const _0xb67d0d=this['repository']['getIndex'](_0x1eca93);if(0x0!==_0xb67d0d){const _0x40d1e9=this['repository']['getRevision'](_0xb67d0d-0x1);if(_0x40d1e9['fromVersion']!==_0x111cad){const _0x57a298=this['_revisionDataBuilder']['getData'](_0x111cad,_0x40d1e9['toVersion']),_0x49fae9={'id':_0x40d1e9['id'],'diffData':_0x57a298['diffData'],'authorsIds':_0x57a298['authorsIds'],'authors':_0x57a298['authorsIds']['map'](_0x1b8a16=>this['editor']['plugins']['get']('Users')['getUser'](_0x1b8a16)),'fromVersion':_0x111cad};this['_stampAiAttribute'](_0x49fae9,_0x40d1e9,!!_0x57a298['hasAIChanges']),_0x40d1e9===this['currentRevision']&&(_0x49fae9['createdAt']=new Date(_0xd1bd54['createdAt']['getTime']()+0xa)),_0x40d1e9['_update'](_0x49fae9,!0x0),delete _0x49fae9['authors'],_0x2d2547['push'](_0x49fae9);}}if(this['adapter']){for(const _0xeca48 of _0x2d2547)this['_bufferUpdate'](_0xeca48['id'],_0xeca48,!0x0);this['sendBufferedUpdates']();}return _0x1eca93;}addRevisionData(_0x4b6407){const _0x2bc5e0=this['repository']['createRevision'](_0x4b6407);return this['adapter']&&_0x2bc5e0['on']('_update',(_0x176e26,_0x26cf51,_0x3eb1d1)=>{_0x3eb1d1||(this['_bufferUpdate'](_0x26cf51['id'],_0x26cf51,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2bc5e0,this['_findInsertionIndex'](_0x2bc5e0)),_0x2bc5e0;}async getRevisionDocumentData(_0x2b6692){return await this['_utils']['loadRevisionData'](_0x2b6692,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2b6692);}async getRevisionRootsAttributes(_0x5e5df0){return await this['_utils']['loadRevisionData'](_0x5e5df0,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5e5df0);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x5aec92=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x407fe0=0x0;_0x407fe0<_0x5aec92['length'];_0x407fe0++){const _0x5681a1=_0x5aec92[_0x407fe0];let _0x16022f=!0x1;for(const _0x21cb28 of Object['keys'](_0x5681a1))void 0x0===_0x5681a1[_0x21cb28]?delete _0x5681a1[_0x21cb28]:'id'!==_0x21cb28&&(_0x16022f=!0x0);_0x16022f||(_0x5aec92[_0x407fe0]=null);}if(_0x5aec92=_0x5aec92['filter'](_0x348e5d=>null!==_0x348e5d),!_0x5aec92['length'])return;for(let _0x21a07d=0x0;_0x21a07d<_0x5aec92['length'];_0x21a07d++){const _0x388095=_0x5aec92[_0x21a07d];void 0x0!==_0x388095['fromVersion']&&void 0x0===_0x388095['toVersion']&&(_0x388095['toVersion']=this['repository']['getRevision'](_0x388095['id'])['toVersion']),void 0x0!==_0x388095['toVersion']&&void 0x0===_0x388095['fromVersion']&&(_0x388095['fromVersion']=this['repository']['getRevision'](_0x388095['id'])['fromVersion']);}const _0x35a853=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x5aec92,_0x35a853)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x216fbf=>{if(_0x216fbf){for(const _0x1a35e9 of _0x216fbf)this['setRevisionData']({'id':_0x1a35e9['id'],'createdAt':_0x1a35e9['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x10381,_0x809acd,_0xcd3e6e){if(_0xcd3e6e===(!!_0x809acd&&!!_0x809acd['attributes']['@ai']))return;const _0x2fa875={..._0x809acd?_0x809acd['attributes']:{},..._0x10381['attributes']};_0xcd3e6e?_0x2fa875['@ai']=!0x0:delete _0x2fa875['@ai'],_0x10381['attributes']=_0x2fa875;}buildRevisionData({revision:_0x3898b3=null,from:_0x13ef9f=null,to:_0x5dc15a=null}){_0x13ef9f=null!==_0x13ef9f?_0x13ef9f:_0x3898b3['fromVersion'],_0x5dc15a=null!==_0x5dc15a?_0x5dc15a:_0x3898b3['toVersion'];const _0x565c05=this['_revisionDataBuilder']['getData'](_0x13ef9f,_0x5dc15a),_0x3727af={'diffData':_0x565c05['diffData'],'authorsIds':_0x565c05['authorsIds'],'fromVersion':_0x13ef9f,'toVersion':_0x5dc15a};if(this['_stampAiAttribute'](_0x3727af,_0x3898b3,!!_0x565c05['hasAIChanges']),!_0x3898b3||_0x5dc15a!==_0x3898b3['toVersion']){const _0x59b174=_0x5dc15a-0x1,_0x3a8f67=this['_source']['history']['getOperation'](_0x59b174);_0x3727af['createdAt']=_0x3a8f67&&_0x3a8f67['createdAt']||new Date();}if(this['_loadedStateData']&&_0x13ef9f===this['_loadedStateData']['fromVersion']){for(const _0x1a12af of this['_loadedStateData']['authors'])_0x3727af['authorsIds']['includes'](_0x1a12af['id'])||_0x3727af['authorsIds']['push'](_0x1a12af['id']);}return _0x3727af;}_bufferUpdate(_0x22c941,_0x56e0a3,_0x529aea){if(this['_bufferedUpdates']['has'](_0x22c941)){const _0x57280b=this['_bufferedUpdates']['get'](_0x22c941);_0x56e0a3=_0x529aea?{..._0x57280b,..._0x56e0a3}:{..._0x56e0a3,..._0x57280b};}this['_bufferedUpdates']['set'](_0x22c941,_0x56e0a3);}setRevisionData(_0x45367f){const _0x59cde1=this['repository']['getRevision'](_0x45367f['id']);if(_0x45367f['createdAt']&&(_0x45367f['createdAt']=new Date(_0x45367f['createdAt'])),_0x45367f['authorsIds']){const _0x237d74=this['editor']['plugins']['get']('Users');_0x45367f['authors']=_0x45367f['authorsIds']['map'](_0x2d5da=>_0x237d74['getUser'](_0x2d5da));}_0x59cde1['_update'](_0x45367f,!0x0);}_createInitialRevision(_0x1b76ba){const _0x129cdb=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x129cdb)this['_initialRevisionId']=_0x129cdb['id'];else{const _0x9f1d46=!this['editor']['model']['document']['roots']['find'](_0x5b6e00=>this['editor']['model']['hasContent'](_0x5b6e00)),_0x5d9c95=this['editor']['plugins']['get']('Users')['me']['id'],_0x3d58d5=kt(this['editor']['locale'],_0x9f1d46?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x1b76ba,'to':_0x1b76ba,'id':this['_initialRevisionId'],'name':_0x3d58d5,'creatorId':_0x5d9c95});}}_createCurrentRevision(_0x2623e9){const _0x1c4a26=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1c4a26),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2623e9,'to':_0x2623e9,'id':_0x1c4a26,'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(_0x489f24,_0x33c631,_0x19d2ef){const _0x485934={},_0x546006={},_0x217770={},_0x299588=this['editor']['config']['get']('roots')||{};for(const [_0x17596f,_0xfb3b75]of Object['entries'](_0x299588))_0xfb3b75['lazyLoad']||(_0x485934[_0x17596f]=_0xfb3b75['initialData']??'',_0x546006[_0x17596f]=_0xfb3b75['modelAttributes']||{},_0xfb3b75['modelElement']&&(_0x217770[_0x17596f]=_0xfb3b75['modelElement']));for(const _0x185316 of this['editor']['model']['document']['getRootNames']())_0x485934[_0x185316]??='',_0x546006[_0x185316]??={};let _0x168955=!0x1;const _0x142ab1=Object['keys'](_0x485934),_0x4b1683=Object['keys'](_0x489f24);for(const _0x499aa7 of _0x142ab1){if(_0x485934[_0x499aa7]!==_0x489f24[_0x499aa7]&&''!==_0x485934[_0x499aa7]['trim']()){_0x168955=!0x0;break;}if(!_0x12802e(_0x546006[_0x499aa7],_0x33c631[_0x499aa7])&&Object['keys'](_0x546006[_0x499aa7])['length']>0x0){_0x168955=!0x0;break;}const _0x49652b=_0x217770[_0x499aa7],_0x5ab0cb=_0x19d2ef[_0x499aa7];if(_0x49652b&&_0x5ab0cb&&_0x49652b!==_0x5ab0cb){_0x168955=!0x0;break;}}_0x168955||(_0x168955=_0x4b1683['some'](_0x1d3d8d=>!this['editor']['model']['document']['getRoot'](_0x1d3d8d))),_0x168955&&_0x4b8393('editor-initial-data-replaced-with-revision-data',{'editorData':_0x485934,'editorRootsAttributes':_0x546006,'editorRootsModelElements':_0x217770,'revisionData':_0x489f24,'revisionRootsAttributes':_0x33c631,'revisionRootsModelElements':_0x19d2ef});for(const [_0x391625,_0x4290bd]of Object['entries'](_0x489f24))this['editor']['config']['set']('roots.'+_0x391625+'.initialData',_0x4290bd);for(const [_0x538179,_0xb2a796]of Object['entries'](_0x33c631))this['editor']['config']['set']('roots.'+_0x538179+'.modelAttributes',_0xb2a796);const _0x1469a8=this['editor']['model']['document'];for(const [_0x284c07,_0x47dc3d]of Object['entries'](_0x19d2ef)){this['editor']['config']['set']('roots.'+_0x284c07+'.modelElement',_0x47dc3d);const _0x1b7e28=_0x1469a8['getRoot'](_0x284c07);_0x1b7e28&&_0x1b7e28['name']!==_0x47dc3d&&(_0x1469a8['roots']['remove'](_0x284c07),_0x1469a8['createRoot'](_0x47dc3d,_0x284c07));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2020bf=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2020bf['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x4dc508){const _0x20e49a=this['repository']['getRevisions']();_0x20e49a['reverse']();let _0x1fde6c=0x0;for(;_0x1fde6c<_0x20e49a['length'];){const _0x1b2e4a=_0x20e49a[_0x1fde6c];if(_0x1b2e4a===this['currentRevision']){_0x1fde6c++;continue;}if(_0x1b2e4a['id']===this['_initialRevisionId'])break;const _0x5d2e09=_0x4dc508['toVersion']-_0x1b2e4a['toVersion']||_0x4dc508['fromVersion']-_0x1b2e4a['fromVersion'];if(_0x5d2e09>0x0)break;if(_0x5d2e09<0x0)_0x1fde6c++;else{if(!_0x4dc508['creator']&&_0x1b2e4a['creator'])break;if(_0x1b2e4a['creator']||!_0x4dc508['creator']){if(_0x4dc508['createdAt']>_0x1b2e4a['createdAt'])break;_0x1fde6c++;}else _0x1fde6c++;}}return _0x1fde6c;}_getFromVersion(_0x54c8ff){const _0x2cb711=this['repository']['getRevisions']();_0x2cb711['reverse'](),_0x2cb711['shift']();const _0x2ef821=_0x2cb711['find'](_0x46faae=>_0x46faae['toVersion']<=_0x54c8ff)['toVersion'];return _0x2ef821<this['_startingVersion']?this['_startingVersion']:_0x2ef821;}['_makeRevision']({name:_0x397607,from:_0x3ae926,to:_0x47c4d8,creatorId:_0x1debac,id:_0x6643a1}){const _0x1a9aba=this['buildRevisionData']({'from':_0x3ae926,'to':_0x47c4d8});_0x1a9aba['name']=_0x397607,_0x1a9aba['creatorId']=_0x1debac,_0x1a9aba['id']=_0x6643a1;const _0x23fdb4=this['addRevisionData'](_0x1a9aba);return this['adapter']&&this['_bufferUpdate'](_0x1a9aba['id'],_0x1a9aba,!0x0),_0x23fdb4;}_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(_0x1c2d6c){this['editor']=_0x1c2d6c,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(_0x8efaa6){this['source']=_0x8efaa6;const _0x2e5658=new Map(),_0x2b71e0=new Map(),_0x2cd8c1=this['editor']['model']['document']['roots']['map'](_0x390276=>_0x390276['rootName']);for(const _0x5b312c of _0x2cd8c1){const _0x1706eb=this['editor']['model']['document']['getRoot'](_0x5b312c),_0x36be81=St(_0x1706eb);_0x2e5658['set'](_0x5b312c,_0x36be81),_0x2b71e0['set'](_0x5b312c,Object['fromEntries'](_0x1706eb['getAttributes']()));}const _0x247e29=Array['from'](this['editor']['model']['markers'])['map'](_0x488884=>[_0x488884['name'],_0x488884['getRange']()]),_0x3519cf=this['source']['version'];this['_saveMetaData'](_0x3519cf,_0x2e5658,_0x247e29,_0x2b71e0),this['_startingRevisionId']=this['_revisionId'];const _0xddce3a=new Map(),_0x356f47=new Map();for(const _0x42a124 of _0x2cd8c1){const _0x18724e=Et(_0x42a124,this['editor']['model']['document']['getRoot'](_0x42a124)['name']);_0xddce3a['set'](_0x42a124,_0x18724e),_0x356f47['set'](_0x42a124,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0xddce3a,[],_0x356f47);}getData(_0x29348d,_0x1a4be0){if(this['_lastFrom']===_0x29348d&&this['_lastTo']<=_0x1a4be0)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1a4be0,!0x0);else{if(!this['_savedMetaData']['has'](_0x29348d)){const _0x4ccaff=this['_getPreviousFrom'](_0x29348d);this['_calculateMetaData'](_0x4ccaff,_0x29348d,!0x1);}this['_calculateMetaData'](_0x29348d,_0x1a4be0,!0x0);}return this['_lastFrom']=_0x29348d,this['_lastTo']=_0x1a4be0,this['_getState']();}loadState(_0x34f435){if(!this['_savedMetaData']['has'](_0x34f435['fromVersion'])){const _0x34c10e=this['_getPreviousFrom'](_0x34f435['fromVersion']);this['_calculateMetaData'](_0x34c10e,_0x34f435['fromVersion'],!0x1);}this['_calculateMetaData'](_0x34f435['fromVersion'],_0x34f435['toVersion'],!0x1);const _0x886ad4=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x34f435['fromVersion'],this['_lastTo']=_0x34f435['toVersion'];for(const _0x8adb5e in _0x34f435['diffData']){const _0x4ab622=_0x34f435['diffData'][_0x8adb5e]['attachChange'],_0x3e8962=_0x319a1d(_0x34f435['diffData'][_0x8adb5e]['attributesBefore'])||{},_0x428cd3=_0x34f435['diffData'][_0x8adb5e],_0x46dc14=_0x886ad4['_makeModelFromViewString'](_0x428cd3['deletions'],_0x428cd3['rootElementName']||'$root');_0x46dc14['rootName']=_0x8adb5e,_0x46dc14['_isAttached']=!_0x4ab622||!_0x4ab622['isAttached'],_0x46dc14['isAttached']=()=>_0x46dc14['_isAttached'],this['_baseRoots']['set'](_0x8adb5e,_0x46dc14),this['_baseRootsAttributes']['set'](_0x8adb5e,_0x3e8962),_0x4ab622&&this['_touchedRoots']['set'](_0x8adb5e,_0x4ab622);const _0x5b5c35=this['_makeIdsRoot'](_0x46dc14);this['_baseIdsRoots']['set'](_0x8adb5e,_0x5b5c35);for(const [_0x4ea5f1,_0x4721d6]of _0x46dc14['markers']){if(!_0x4ea5f1['startsWith']('revision:'))continue;const _0x32470c=_0x4ea5f1['split'](':')[0x2],_0x541358=_0x428cd3['aiSources']?.[_0x4ea5f1]||null;for(const _0x205548 of _0x4721d6['getWalker']({'singleCharacters':!0x0})){const _0x6a15e4=this['_getVidAttributeName'](_0x205548),_0x486c86='elementEnd'==_0x205548['type']?_0x205548['previousPosition']['path']['slice'](0x0,-0x1):_0x205548['previousPosition']['path'],_0x36bded=_0x5b5c35['getNodeByPath'](_0x486c86)['getAttribute'](_0x6a15e4);this['_touched']['set'](_0x36bded,{'userId':_0x32470c,'aiSource':_0x541358});}_0x46dc14['markers']['delete'](_0x4ea5f1);}}this['_startingRevisionId']=this['_revisionId'];const _0x398465=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2fcd15=>!this['_touched']['has'](_0x2fcd15));let _0x59b1ec=0x0;const _0x3a46d1=new Map();for(const _0x240534 in _0x34f435['diffData']){const _0xca72eb=_0x34f435['diffData'][_0x240534]['attachChange'],_0xaba159=_0x319a1d(_0x34f435['diffData'][_0x240534]['attributesAfter'])||{},_0x1a6ef7=_0x34f435['diffData'][_0x240534],_0x11aef0=_0x886ad4['_makeModelFromViewString'](_0x1a6ef7['insertions'],_0x1a6ef7['rootElementName']||'$root');_0x11aef0['rootName']=_0x240534,_0x11aef0['_isAttached']=!_0xca72eb||_0xca72eb['isAttached'],_0x11aef0['isAttached']=()=>_0x11aef0['_isAttached'],this['_diffRoots']['set'](_0x240534,_0x11aef0),this['_diffRootsAttributes']['set'](_0x240534,_0xaba159);const _0x170676=this['_makeIdsRoot'](_0x11aef0,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x240534,_0x170676),_0x3a46d1['set'](_0x240534,_0x11aef0['isAttached']()?_0xaba159:{});for(const [_0x1a38a6,_0x5166c3]of _0x11aef0['markers']){if(!_0x1a38a6['startsWith']('revision:'))continue;const _0x13ddc5=_0x1a38a6['split'](':')[0x2],_0x298f1c=_0x1a6ef7['aiSources']?.[_0x1a38a6]||null;for(const _0x6d0512 of _0x5166c3['getWalker']({'singleCharacters':!0x0})){const _0x1b6b76=this['_getVidAttributeName'](_0x6d0512),_0x27049a=this['_revisionId']++,_0x50c0f4='elementEnd'==_0x6d0512['type']?_0x6d0512['previousPosition']['path']['slice'](0x0,-0x1):_0x6d0512['previousPosition']['path'];_0x170676['getNodeByPath'](_0x50c0f4)['_setAttribute'](_0x1b6b76,_0x27049a),this['_touched']['set'](_0x27049a,{'userId':_0x13ddc5,'aiSource':_0x298f1c});}_0x11aef0['markers']['delete'](_0x1a38a6);}for(const _0x59be11 of this['editor']['model']['createRangeIn'](_0x11aef0)['getWalker']({'singleCharacters':!0x0})){const _0x5b91cd=this['_getVidAttributeName'](_0x59be11),_0xffb062='elementEnd'==_0x59be11['type']?_0x59be11['previousPosition']['path']['slice'](0x0,-0x1):_0x59be11['previousPosition']['path'],_0x595902=_0x170676['getNodeByPath'](_0xffb062);_0x595902['getAttribute'](_0x5b91cd)>0x0||_0x595902['_setAttribute'](_0x5b91cd,_0x398465[_0x59b1ec++]);}for(const [_0x49dd08,_0xa16e19]of _0x11aef0['markers'])_0x49dd08['startsWith']('revision:')||this['_markers']['set'](_0x49dd08,_0xa16e19);}const {roots:_0x3484ae}=this['_savedMetaData']['get'](_0x34f435['fromVersion']),{roots:_0x3e7e6b}=this['_savedMetaData']['get'](_0x34f435['toVersion']),_0x47c6f3=St(_0x3484ae['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x47c6f3),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x47c6f3,Number['NEGATIVE_INFINITY']));const _0x3492ef=St(_0x3e7e6b['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x3492ef),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3492ef));const _0x1ea6ac=Array['from'](this['_diffRoots'])['map'](([_0x4e2adc,_0x5ed21e])=>[_0x4e2adc,St(_0x5ed21e)]);this['_saveMetaData'](this['_lastTo'],_0x1ea6ac,this['_markers'],_0x3a46d1);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x4d2f8e,_0x4d147e,_0x3d9cf4,_0x32e207){const _0xc4138a=new Map(_0x4d147e),_0x5f52c1=new Map(_0x319a1d(_0x32e207)),_0x18cccc=new Map();for(const [_0x284dfe,_0x456a2a]of _0x3d9cf4)_0x18cccc['set'](_0x284dfe,{'start':_0x456a2a['start']['clone'](),'end':_0x456a2a['end']['clone'](),'rootName':_0x456a2a['root']['rootName']});this['_savedMetaData']['set'](_0x4d2f8e,{'roots':_0xc4138a,'markers':_0x18cccc,'rootsAttributes':_0x5f52c1});}_removeMetaData(_0x4c868d){this['_savedMetaData']['delete'](_0x4c868d);}_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(_0x51711d,_0x28ae1=null){let _0x864dec=null;_0x51711d['is']('documentFragment')||(_0x864dec=new _0x47c9c9(_0x51711d['name'],{'vid_start':null===_0x28ae1?this['_revisionId']++:_0x28ae1++}));const _0x5bc7e2=[];for(const _0x288212 of _0x51711d['getChildren']())if(_0x288212['is']('element')){_0x5bc7e2['push'](this['_makeIdsRoot'](_0x288212,_0x28ae1));const _0x5ac813=_0x5bc7e2[_0x5bc7e2['length']-0x1];null!==_0x28ae1&&(_0x28ae1=_0x5ac813['is']('element','$text')?_0x5ac813['getAttribute']('vid')+0x1:_0x5ac813['getAttribute']('vid_end')+0x1);}else{for(let _0x156ccf=0x0;_0x156ccf<_0x288212['offsetSize'];_0x156ccf++)_0x5bc7e2['push'](new _0x47c9c9('$text',{'vid':null===_0x28ae1?this['_revisionId']++:_0x28ae1++}));}if(_0x51711d['is']('documentFragment')){const _0x52818a=Et(_0x51711d['rootName'],_0x51711d['name']);return _0x52818a['_insertChild'](0x0,_0x5bc7e2),_0x52818a;}return _0x864dec['_setAttribute']('vid_end',null===_0x28ae1?this['_revisionId']++:_0x28ae1),_0x864dec['_insertChild'](0x0,_0x5bc7e2),_0x864dec;}_calculateMetaData(_0x404096,_0x4484a0,_0x36c757){this['_reset']();const {roots:_0x35d043,markers:_0x19afd7,rootsAttributes:_0x2db4ee}=this['_savedMetaData']['get'](_0x404096);this['_baseRoots']=new Map(_0x35d043),this['_baseRootsAttributes']=new Map(_0x319a1d(_0x2db4ee));for(const [_0x2b0bdf,_0x280fdb]of this['_baseRoots'])if('$graveyard'!==_0x2b0bdf&&(this['_diffRoots']['set'](_0x2b0bdf,St(_0x280fdb)),this['_diffRootsAttributes']=new Map(_0x319a1d(_0x2db4ee)),_0x36c757)){const _0x1d17a1=this['_revisionId'];this['_idsRoots']['set'](_0x2b0bdf,this['_makeIdsRoot'](_0x280fdb)),this['_baseIdsRoots']['set'](_0x2b0bdf,this['_makeIdsRoot'](_0x280fdb,_0x1d17a1));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x36c757&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x153098,_0x40106a]of _0x19afd7){const _0x3c7248=this['_baseRoots']['get'](_0x40106a['rootName']),_0x385ed4=this['_diffRoots']['get'](_0x40106a['rootName']),_0x5ea6cc=new _0x150a98(_0x6deac0(_0x40106a['start'],_0x3c7248),_0x6deac0(_0x40106a['end'],_0x3c7248)),_0x38de07=_0x2f1d78(_0x5ea6cc,_0x385ed4);_0x3c7248['markers']['set'](_0x153098,_0x5ea6cc),this['_markers']['set'](_0x153098,_0x38de07);}this['_applyOperations'](_0x404096,_0x4484a0,_0x36c757);}_applyOperations(_0x57d83f,_0x577e20,_0x46270e){for(const _0x4de1bf of this['source']['getOperations'](_0x57d83f,_0x577e20))this['_handleOperation'](_0x4de1bf,_0x46270e);for(const _0x3ea506 of this['_diffRoots']['values']())_0x3ea506['markers']['clear']();for(const [_0x186403,_0xe50816]of this['_markers'])this['_diffRoots']['get'](_0xe50816['root']['rootName'])['markers']['set'](_0x186403,_0xe50816['clone']());const _0x52de87=new Map(),_0x25e1ec=new Map();for(const [_0x49a79e,_0xb7e188]of this['_diffRoots'])_0x52de87['set'](_0x49a79e,St(_0xb7e188)),_0x25e1ec['set'](_0x49a79e,this['_diffRootsAttributes']['get'](_0x49a79e));this['_saveMetaData'](_0x577e20,_0x52de87,this['_markers'],_0x25e1ec);}_getPreviousFrom(_0x19dab1){const _0x491d35=Array['from'](this['_savedMetaData']['keys']());_0x491d35['sort']((_0x34e320,_0x484e48)=>_0x34e320-_0x484e48),_0x491d35['reverse']();for(const _0x173a49 of _0x491d35)if(_0x173a49<_0x19dab1)return _0x173a49;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1529bf,_0x1f1e0c){const _0x1ccbce=Array['from'](_0x1f1e0c['markers'])['map'](([_0x3a24d4,_0x31a55a])=>[_0x3a24d4,_0x2f1d78(_0x31a55a,_0x1529bf)]);_0x1529bf['markers']=new Map(_0x1ccbce);}_transformMarkers(_0x1b4e8e){for(const _0x5e4c48 of this['_markers']['values']()){const _0x3fce87=_0x5e4c48['getTransformedByOperation'](_0x1b4e8e),_0x53222a=_0x150a98['_createFromRanges'](_0x3fce87);_0x5e4c48['start']=_0x53222a['start'],_0x5e4c48['end']=_0x53222a['end'];}}_handleOperation(_0x1983a0,_0x392077){if('addRoot'!=_0x1983a0['type']&&'detachRoot'!=_0x1983a0['type']){if('insert'==_0x1983a0['type']){const _0x59b993=_0x1983a0['position']['root'],_0x4509f7=_0x59b993['rootName'],_0x3d83e=_0x59b993['name'];this['_diffRoots']['has'](_0x4509f7)||(this['_diffRoots']['set'](_0x4509f7,Et(_0x4509f7,_0x3d83e,!0x0)),this['_diffRootsAttributes']['set'](_0x4509f7,{}),_0x392077&&this['_idsRoots']['set'](_0x4509f7,Et(_0x4509f7,_0x3d83e,!0x0)));}else{if('addRootAttribute'==_0x1983a0['type']||'removeRootAttribute'==_0x1983a0['type']||'changeRootAttribute'==_0x1983a0['type'])return void this['_handleRootAttributeOperation'](_0x1983a0);'marker'==_0x1983a0['type']&&this['_handleMarkerOperation'](_0x1983a0);}if('marker'!==_0x1983a0['type']){const _0x398625=this['_cloneOperation'](_0x1983a0,this['_diffRoots']);_0x398625['_execute'](),this['_transformMarkers'](_0x398625);}if(_0x392077)switch(_0x1983a0['type']){case'insert':this['_handleInsertOperation'](_0x1983a0);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1983a0);break;case'merge':this['_handleMergeOperation'](_0x1983a0);break;case'split':this['_handleSplitOperation'](_0x1983a0);}}else this['_handleRootOperation'](_0x1983a0,_0x392077);}_cloneOperation(_0x3fb60a,_0x3c02a0){const _0x378fbc=_0x3fb60a['clone']();return _0x378fbc['_authorId']=_0x3fb60a['_authorId'],_0x378fbc['_aiSource']=_0x3fb60a['_aiSource'],_0x378fbc['baseVersion']=null,_0x5d8b59(_0x378fbc,_0x3c02a0),_0x378fbc;}_getBaseVids(_0x929e70){return _0x929e70['map'](_0x5e1863=>{const _0x2cd4a4=this['_getVidAttributeName'](_0x5e1863);return Number(_0x5e1863['item']['getAttribute'](_0x2cd4a4));});}_generateTape(_0x560f72,_0x5b93c6){if(_0x560f72['is']('element','$text'))_0x5b93c6['push']({'item':_0x560f72,'type':'text'});else{_0x560f72['is']('element')&&_0x5b93c6['push']({'item':_0x560f72,'type':'elementStart'});for(const _0x4dcae3 of _0x560f72['getChildren']())this['_generateTape'](_0x4dcae3,_0x5b93c6);_0x560f72['is']('element')&&_0x5b93c6['push']({'item':_0x560f72,'type':'elementEnd'});}return _0x5b93c6;}_getState(){const _0x5d860a=new Map(this['_touched']),_0x2cc781=new Map(_0x5d860a),_0x582cd3=new Map(),_0x139cbd={'insertions':{},'deletions':{}},_0x406f9f={'insertions':{},'deletions':{}},_0x3bb7a4=new Map(),_0x80f5fb=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x39a9c5=new Map();_0x80f5fb['delete']('$graveyard');for(const _0x53d66f of _0x80f5fb){const _0x5a614a=(this['_diffRoots']['get'](_0x53d66f)??this['_baseRoots']['get'](_0x53d66f))['name'],_0x1f61e7=this['_diffRoots']['get'](_0x53d66f)||Et(_0x53d66f,_0x5a614a,!0x1),_0x5ec35b=this['_baseRoots']['get'](_0x53d66f)||Et(_0x53d66f,_0x5a614a,!0x1);_0x1f61e7['isAttached']()||_0x5ec35b['isAttached']()?(_0x39a9c5['set'](_0x53d66f,_0x5a614a),_0x139cbd['insertions'][_0x53d66f]=St(_0x1f61e7),_0x139cbd['deletions'][_0x53d66f]=St(_0x5ec35b),this['_copyMarkers'](_0x139cbd['deletions'][_0x53d66f],_0x5ec35b),this['_copyMarkers'](_0x139cbd['insertions'][_0x53d66f],_0x1f61e7),_0x406f9f['insertions'][_0x53d66f]=this['_generateTape'](this['_idsRoots']['get'](_0x53d66f),[]),_0x406f9f['deletions'][_0x53d66f]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x53d66f)||Et(_0x53d66f,_0x5a614a,!0x1),[])):_0x80f5fb['delete'](_0x53d66f);}for(const _0x40d42d of _0x80f5fb){const _0x570015=_0x406f9f['insertions'][_0x40d42d];for(const _0x4fe7d2 of _0x570015){const _0x5ef08d=this['_getVidAttributeName'](_0x4fe7d2),_0xcb9be2=_0x4fe7d2['item']['getAttribute'](_0x5ef08d);_0x2cc781['delete'](_0xcb9be2),_0xcb9be2>=this['_startingRevisionId']&&_0x582cd3['set'](_0xcb9be2,_0x5d860a['get'](_0xcb9be2));}}for(const _0x2ec18e of _0x80f5fb){const _0x226e06=_0x406f9f['insertions'][_0x2ec18e],_0x1c0fe5=this['_getBaseVids'](_0x406f9f['deletions'][_0x2ec18e]);let _0x578fa9=0x0;for(const _0x293c04 of _0x226e06){const _0x22c9ac=this['_getVidAttributeName'](_0x293c04),_0xf70d55=_0x293c04['item']['getAttribute'](_0x22c9ac);if(!_0x582cd3['has'](_0xf70d55)&&!_0x3bb7a4['has'](_0xf70d55)){if(_0x2cc781['has'](_0xf70d55))_0x578fa9++;else{if(_0xf70d55!=_0x1c0fe5[_0x578fa9]){const _0x2a2708=_0x5d860a['get'](_0xf70d55)||_0x5d860a['get'](_0x1c0fe5[_0x578fa9]);for(;_0xf70d55!=_0x1c0fe5[_0x578fa9];)_0x2cc781['has'](_0x1c0fe5[_0x578fa9])||(_0x3bb7a4['set'](_0x1c0fe5[_0x578fa9],_0x2a2708),_0x5d860a['set'](_0x1c0fe5[_0x578fa9],_0x2a2708)),_0x578fa9++;}_0x578fa9++;}}}}for(const _0xf3acb6 of _0x80f5fb){const _0x32bfb1=_0x406f9f['insertions'][_0xf3acb6];for(const _0xb42d01 of _0x32bfb1){const _0x123f57=this['_getVidAttributeName'](_0xb42d01),_0x2d3e2d=_0xb42d01['item']['getAttribute'](_0x123f57);if(_0x3bb7a4['has'](_0x2d3e2d)){const _0x33e9cc=_0x3bb7a4['get'](_0x2d3e2d);_0x2cc781['has'](_0x2d3e2d)||_0x2cc781['set'](_0x2d3e2d,{..._0x33e9cc}),_0x582cd3['set'](_0x2d3e2d,{..._0x33e9cc});}}}for(const _0x465dbb of _0x2cc781['keys']())_0x465dbb>=this['_startingRevisionId']&&_0x2cc781['delete'](_0x465dbb);const _0x3e4416=new Map();for(const _0x2a026f of _0x80f5fb){let _0x38c88a=_0x406f9f['insertions'][_0x2a026f];for(const _0x39410a of _0x38c88a)if(_0x39410a['item']['is']('element','tableCell')){const _0x28243c=this['_getVidAttributeName'](_0x39410a),_0x40fd51=_0x39410a['item']['getAttribute'](_0x28243c);if(_0x582cd3['has'](_0x40fd51)){const _0x2858c0=_0x39410a['item']['parent']['parent']['getAttribute']('vid_start'),_0x1b8141=_0x582cd3['get'](_0x40fd51),_0x375923=_0x3e4416['get'](_0x2858c0)||{'users':new Set(),'aiSource':null};_0x375923['users']['add'](_0x1b8141['userId']),_0x375923['aiSource']=_0x375923['aiSource']||_0x1b8141['aiSource']||null,_0x3e4416['set'](_0x2858c0,_0x375923);}}_0x38c88a=_0x406f9f['deletions'][_0x2a026f];for(const _0x1cf4c6 of _0x38c88a)if(_0x1cf4c6['item']['is']('element','tableCell')){const _0x163ee8=this['_getVidAttributeName'](_0x1cf4c6),_0x3c6777=_0x1cf4c6['item']['getAttribute'](_0x163ee8);if(_0x2cc781['has'](_0x3c6777)){const _0x50a132=_0x1cf4c6['item']['parent']['parent']['getAttribute']('vid_start'),_0x1e332e=_0x2cc781['get'](_0x3c6777),_0x350144=_0x3e4416['get'](_0x50a132)||{'users':new Set(),'aiSource':null};_0x350144['users']['add'](_0x1e332e['userId']),_0x350144['aiSource']=_0x350144['aiSource']||_0x1e332e['aiSource']||null,_0x3e4416['set'](_0x50a132,_0x350144);}}for(const _0x473e4c of _0x3e4416['keys']())(_0x582cd3['has'](_0x473e4c)||_0x2cc781['has'](_0x473e4c))&&_0x3e4416['delete'](_0x473e4c);}for(const _0x4b478d of _0x80f5fb){const _0x481b9d=_0x406f9f['insertions'][_0x4b478d];let _0x4dfe7e=null,_0x40ad66=null,_0x6cbff8=null;for(const _0x5556bb of _0x481b9d){const _0x250dd8=this['_getVidAttributeName'](_0x5556bb),_0x493750=_0x5556bb['item']['getAttribute'](_0x250dd8),_0x34ec0f=_0x3e4416['get'](_0x493750);if(_0x34ec0f&&'elementStart'==_0x5556bb['type']&&(_0x4dfe7e=Array['from'](_0x34ec0f['users'])[0x0],_0x40ad66=_0x34ec0f['aiSource'],_0x6cbff8=_0x5556bb['item']['getAttribute']('vid_end')),_0x4dfe7e){const _0x1399d3=_0x40ad66||_0x2cc781['get'](_0x493750)?.['aiSource']||null,_0x1b5a29=_0x40ad66||_0x582cd3['get'](_0x493750)?.['aiSource']||null;_0x2cc781['set'](_0x493750,{'userId':_0x4dfe7e,'aiSource':_0x1399d3}),_0x582cd3['set'](_0x493750,{'userId':_0x4dfe7e,'aiSource':_0x1b5a29});}_0x493750==_0x6cbff8&&(_0x4dfe7e=null,_0x6cbff8=null);}}const _0x54f902={},_0x5b4949=new Set();for(const _0x66036d of _0x80f5fb){const _0x4f2527=_0x139cbd['deletions'][_0x66036d],_0x44e377=_0x139cbd['insertions'][_0x66036d];for(const {userId:_0x1886a1}of this['_touchedMarkers']['values']())null!==_0x1886a1&&_0x5b4949['add'](_0x1886a1);for(const {userId:_0x5b2e5a}of this['_touchedRoots']['values']())null!==_0x5b2e5a&&_0x5b4949['add'](_0x5b2e5a);const _0x1f9f56={};this['_markChanges'](_0x44e377,_0x406f9f['insertions'][_0x66036d],_0x582cd3,'insertion',_0x5b4949,_0x1f9f56),this['_markChanges'](_0x4f2527,_0x406f9f['deletions'][_0x66036d],_0x2cc781,'deletion',_0x5b4949,_0x1f9f56),this['_collectSuggestionAiSources'](_0x44e377,_0x1f9f56),this['_collectSuggestionAiSources'](_0x4f2527,_0x1f9f56),_0x54f902[_0x66036d]={'insertions':this['_prepareViewToSave'](_0x44e377),'deletions':this['_prepareViewToSave'](_0x4f2527),'attachChange':this['_touchedRoots']['get'](_0x66036d)||null,'attributesBefore':_0x319a1d(this['_baseRootsAttributes']['get'](_0x66036d))||{},'attributesAfter':_0x319a1d(this['_diffRootsAttributes']['get'](_0x66036d)),'rootElementName':_0x39a9c5['get'](_0x66036d),'aiSources':_0x1f9f56};}const _0x24b5f2=Array['from'](_0x582cd3['values']())['some'](_0x701bc3=>!(!_0x701bc3||!_0x701bc3['aiSource']))||Array['from'](_0x2cc781['values']())['some'](_0xa249b1=>!(!_0xa249b1||!_0xa249b1['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x5b264c=>this['_aiTouchedMarkers']['has'](_0x5b264c));return{'diffData':_0x54f902,'authorsIds':Array['from'](_0x5b4949),'hasAIChanges':_0x24b5f2};}_collectSuggestionAiSources(_0x16bd69,_0x5bb2c8){const _0x452a4e=_0x16bd69['markers'];for(const _0x36d13e of _0x452a4e['keys']()){if(!_0x36d13e['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x36d13e))continue;const _0x24a897=this['_aiTouchedMarkers']['get'](_0x36d13e);_0x24a897&&(_0x5bb2c8[_0x36d13e]=_0x24a897);}}_processRootBeforeSave(_0x2bf6f4){for(const [,_0x120153]of _0x2bf6f4['markers']){const _0x5d3549=_0x120153['start']['getAncestors']()['filter'](_0x57e85a=>'tableCell'==_0x57e85a['name']);for(const _0x2c1320 of _0x5d3549)0x1==_0x2c1320['childCount']&&_0x2c1320['getChild'](0x0)['is']('element','paragraph')&&_0x2c1320['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x27e37f){this['_processRootBeforeSave'](_0x27e37f);const _0x514fb0=this['editor']['data']['toView'](_0x27e37f,{}),_0x3e48c1=Array['from'](_0x514fb0['getChildren']())['map'](_0x1861c0=>this['_getViewJson'](_0x1861c0));return JSON['stringify'](_0x3e48c1);}_getViewJson(_0x410282){if(_0x410282['is']('$text'))return _0x410282['data'];{const _0x5e4d84=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x17149d=_0x410282,_0x4115ae=this['editor']['data']['htmlProcessor']['domConverter'],_0x568e09={'type':_0x5e4d84['_getTypeCharForViewElement'](_0x17149d),'name':_0x17149d['name'],'attributes':Array['from'](_0x17149d['getAttributes']()),'children':Array['from'](_0x17149d['getChildren']())['map'](_0x10088c=>this['_getViewJson'](_0x10088c))};if(_0x410282['is']('uiElement')&&'$comment'!=_0x410282['name']){const _0x38c85e=_0x410282['render'](_0x4115ae['domDocument'],_0x4115ae);_0x568e09['children']['push'](_0x38c85e['outerHTML']);}else{if(_0x410282['is']('rawElement')){const _0x15156d=_0x4115ae['domDocument']['createElement'](_0x17149d['name']);_0x410282['render'](_0x15156d,_0x4115ae),_0x568e09['children']['push'](_0x15156d['innerHTML']);}}const _0x45e892=Array['from'](_0x17149d['getCustomProperties']());_0x45e892['length']>0x0&&(_0x568e09['customProperties']=_0x45e892);const _0x2591dc=_0x17149d['getFillerOffset']();return null!==_0x2591dc&&(_0x568e09['fillerOffset']=_0x2591dc),_0x568e09;}}['_markChanges'](_0x1c7381,_0x87c4b0,_0x23ea6c,_0x2bf7e2,_0x20a135,_0x571816){let _0x1581bd=null,_0x52fb27=null,_0x3ebd47=0x0;const _0x360a7a=this['editor']['model'];for(let _0x5f2d50=0x0;_0x5f2d50<_0x87c4b0['length'];_0x5f2d50++){const _0x2e835f=this['_getVidAttributeName'](_0x87c4b0[_0x5f2d50]),_0x57ff88=_0x87c4b0[_0x5f2d50]['item']['getAttribute'](_0x2e835f),_0x1a66db=_0x23ea6c['get'](_0x57ff88),_0x73b8ed=_0x5f2d50==_0x87c4b0['length']-0x1;!_0x1581bd&&_0x1a66db&&(_0x1581bd=_0x1a66db,_0x52fb27=_0x87c4b0[_0x5f2d50]);const _0x467a1b=!!_0x1581bd&&!!_0x1a66db&&_0x1a66db['userId']!=_0x1581bd['userId'],_0x236149=!!_0x1581bd&&!!_0x1a66db&&_0x1a66db['aiSource']!=_0x1581bd['aiSource'];_0x1581bd&&(!_0x1a66db||_0x467a1b||_0x236149)&&(_0x2d0cec(_0x1a66db,Ot(_0x52fb27,_0x1c7381,_0x360a7a),Ot(_0x87c4b0[_0x5f2d50],_0x1c7381,_0x360a7a)),_0x1581bd=_0x1a66db||null,_0x52fb27=_0x1a66db?_0x87c4b0[_0x5f2d50]:null),_0x1581bd&&_0x73b8ed&&_0x2d0cec(_0x1a66db,Ot(_0x52fb27,_0x1c7381,_0x360a7a),Ct(_0x87c4b0[_0x5f2d50],_0x1c7381,_0x360a7a));}function _0x2d0cec(_0x3831fe,_0xb4094a,_0x5b8c49){const _0x8ce64a=_0x1581bd['userId'],_0x1e18ad=_0x1581bd['aiSource'],_0x470539='revision:'+_0x2bf7e2+':'+_0x8ce64a+':'+_0x3ebd47++,_0x943543=_0x360a7a['createRange'](_0xb4094a,_0x5b8c49);_0x1c7381['markers']['set'](_0x470539,_0x943543),_0x1e18ad&&(_0x571816[_0x470539]=_0x1e18ad),null!==_0x8ce64a&&_0x20a135['add'](_0x8ce64a);}}_getVidAttributeName(_0x5e8a6b){switch(_0x5e8a6b['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x3f2ad3){const _0x2ce53a=this['_idsRoots']['get'](_0x3f2ad3['position']['root']['rootName']),_0x13bced=_0x6deac0(_0x3f2ad3['position'],_0x2ce53a),_0x2c5403=null===_0x3f2ad3['_authorId']?null:_0x3f2ad3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2f2278=_0x3f2ad3['_aiSource']||null,_0x3cd2b2=_0x13bced['parent'],_0x52a092=this['_revisionId'],_0x1e2e53=[];for(const _0x2294d3 of _0x3f2ad3['nodes'])if(_0x2294d3['is']('element'))_0x1e2e53['push'](this['_makeIdsRoot'](_0x2294d3));else{for(let _0x1f8d1f=0x0;_0x1f8d1f<_0x2294d3['offsetSize'];_0x1f8d1f++)_0x1e2e53['push'](new _0x47c9c9('$text',{'vid':this['_revisionId']++}));}const _0x4f730b=this['_revisionId'];for(let _0x31aebc=_0x52a092;_0x31aebc<_0x4f730b;_0x31aebc++)this['_touched']['set'](_0x31aebc,{'userId':_0x2c5403,'aiSource':_0x2f2278});_0x3cd2b2['_insertChild'](_0x13bced['offset'],_0x1e2e53);}_setTouched(_0x2017df,_0x2bd549,_0x2ba20f){this['_touched']['set'](_0x2017df,{'userId':_0x2bd549,'aiSource':_0x2ba20f||this['_touched']['get'](_0x2017df)?.['aiSource']||null});}_handleMoveOperation(_0x4f0431){(_0x4f0431=this['_cloneOperation'](_0x4f0431,this['_idsRoots']))['_execute']();const _0x201101=null===_0x4f0431['_authorId']?null:_0x4f0431['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x932ee7=_0x4f0431['_aiSource']||null,_0x3cbd64=_0x4f0431['getMovedRangeStart'](),_0x26ce0b=_0x3cbd64['parent'],_0x11fc9e=_0x3cbd64['offset'],_0x206af6=(_0x3888ed,_0x122f19,_0x42c7ec)=>{for(let _0x11ae8e=_0x122f19;_0x11ae8e<_0x42c7ec;_0x11ae8e++){const _0xc01a0e=_0x3888ed['getChild'](_0x11ae8e);_0xc01a0e['is']('element','$text')?this['_setTouched'](_0xc01a0e['getAttribute']('vid'),_0x201101,_0x932ee7):(this['_setTouched'](_0xc01a0e['getAttribute']('vid_start'),_0x201101,_0x932ee7),_0x206af6(_0xc01a0e,0x0,_0xc01a0e['childCount']),this['_setTouched'](_0xc01a0e['getAttribute']('vid_end'),_0x201101,_0x932ee7));}};_0x206af6(_0x26ce0b,_0x11fc9e,_0x11fc9e+_0x4f0431['howMany']);}_handleMergeOperation(_0x67feac){const _0x16f195=null===(_0x67feac=this['_cloneOperation'](_0x67feac,this['_idsRoots']))['_authorId']?null:_0x67feac['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x39bff2=_0x67feac['_aiSource']||null,_0x140131=_0x67feac['targetPosition']['parent'],_0x3e3ce0=_0x67feac['sourcePosition']['parent'],_0xcc9a7c=_0x140131['getAttribute']('vid_end'),_0xf93465=_0x3e3ce0['getAttribute']('vid_start');_0x140131['_setAttribute']('vid_end',_0x3e3ce0['getAttribute']('vid_end')),_0x3e3ce0['_setAttribute']('vid_end',_0xcc9a7c),this['_setTouched'](_0xf93465,_0x16f195,_0x39bff2),this['_setTouched'](_0xcc9a7c,_0x16f195,_0x39bff2),_0x67feac['_execute']();}_handleSplitOperation(_0x284e82){const _0x17ce83=null===(_0x284e82=this['_cloneOperation'](_0x284e82,this['_idsRoots']))['_authorId']?null:_0x284e82['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3d3d03=_0x284e82['_aiSource']||null,_0x355638=_0x284e82['graveyardPosition'],_0x5295bf=_0x284e82['splitPosition']['parent'];_0x284e82['_execute']();const _0x27d819=_0x5295bf['getAttribute']('vid_end'),_0x39f60e=_0x284e82['insertionPosition']['nodeAfter'];if(_0x355638){const _0x4d5a32=_0x39f60e['getAttribute']('vid_end'),_0x1b2f94=_0x5295bf['getAttribute']('vid_end');_0x5295bf['_setAttribute']('vid_end',_0x4d5a32),_0x39f60e['_setAttribute']('vid_end',_0x1b2f94),this['_setTouched'](_0x5295bf['getAttribute']('vid_end'),_0x17ce83,_0x3d3d03),this['_setTouched'](_0x39f60e['getAttribute']('vid_start'),_0x17ce83,_0x3d3d03);}else{const _0x2b8c94=this['_revisionId']++,_0xfc304a=this['_revisionId']++;_0x5295bf['_setAttribute']('vid_end',_0x2b8c94),_0x39f60e['_setAttribute']('vid_start',_0xfc304a),_0x39f60e['_setAttribute']('vid_end',_0x27d819),this['_setTouched'](_0x2b8c94,_0x17ce83,_0x3d3d03),this['_setTouched'](_0xfc304a,_0x17ce83,_0x3d3d03);}}_handleMarkerOperation(_0x7a65bb){if(!_0x7a65bb['affectsData'])return;const _0x4bd6bc=(_0x7a65bb=this['_cloneOperation'](_0x7a65bb,this['_diffRoots']))['oldRange']?_0x7a65bb['oldRange']['root']:null,_0x223cbc=_0x7a65bb['newRange']?_0x7a65bb['newRange']['root']:null;_0x4bd6bc&&this['_markers']['delete'](_0x7a65bb['name']),_0x223cbc&&this['_markers']['set'](_0x7a65bb['name'],_0x7a65bb['newRange']['clone']());const _0x179002=null===_0x7a65bb['_authorId']?null:_0x7a65bb['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x111f45=_0x7a65bb['name'];if(_0x7a65bb['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x111f45,_0x7a65bb['_aiSource']),!this['_touchedMarkers']['has'](_0x111f45))return void this['_touchedMarkers']['set'](_0x111f45,{'range':_0x7a65bb['oldRange'],'userId':_0x179002});const _0x30f9fc=this['_touchedMarkers']['get'](_0x111f45),_0x46e09f=_0x30f9fc['range'],_0x4dacfb=_0x7a65bb['newRange'];null==_0x46e09f&&null==_0x4dacfb||_0x46e09f&&_0x4dacfb&&_0x46e09f['isEqual'](_0x4dacfb)?this['_touchedMarkers']['delete'](_0x7a65bb['name']):_0x30f9fc['userId']=_0x179002;}_handleRootOperation(_0x37f92b,_0xea283a){this['_diffRoots']['has'](_0x37f92b['rootName'])?this['_diffRoots']['get'](_0x37f92b['rootName'])['_isAttached']=_0x37f92b['isAdd']:(this['_diffRoots']['set'](_0x37f92b['rootName'],Et(_0x37f92b['rootName'],_0x37f92b['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x37f92b['rootName'],{}),_0xea283a&&this['_idsRoots']['set'](_0x37f92b['rootName'],Et(_0x37f92b['rootName'],_0x37f92b['elementName'],!0x0)));const _0xbdb406=null===_0x37f92b['_authorId']?null:_0x37f92b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1b4699=this['_touchedRoots']['get'](_0x37f92b['rootName']);_0x1b4699&&_0x1b4699['userId']===_0xbdb406?this['_touchedRoots']['delete'](_0x37f92b['rootName']):this['_touchedRoots']['set'](_0x37f92b['rootName'],{'userId':_0xbdb406,'isAttached':_0x37f92b['isAdd']});}_handleRootAttributeOperation(_0x734cb9){const _0x514d5c=this['_diffRootsAttributes']['get'](_0x734cb9['root']['rootName']);null===_0x734cb9['newValue']?delete _0x514d5c[_0x734cb9['key']]:_0x514d5c[_0x734cb9['key']]=_0x734cb9['newValue'];}};function St(_0x4d4f0b){const _0x38b57d=Et(_0x4d4f0b['rootName'],_0x4d4f0b['name'],_0x4d4f0b['isAttached']());for(const _0x124022 of _0x4d4f0b['getChildren']()){const _0x480780=_0x124022['_clone'](!0x0);_0x38b57d['_appendChild'](_0x480780);}return _0x38b57d;}function Et(_0x269093,_0x928a54,_0x292877=!0x0){const _0x2430d3=new _0x384ec3();return _0x2430d3['rootName']=_0x269093,_0x2430d3['name']=_0x928a54,_0x2430d3['_isAttached']=_0x292877,_0x2430d3['isAttached']=()=>_0x2430d3['_isAttached'],_0x2430d3;}function Ot(_0x8c58b5,_0x5351fd,_0x5900e2){const _0x33b6b0='elementEnd'==_0x8c58b5['type']?_0x5900e2['createPositionAt'](_0x8c58b5['item'],'end'):_0x5900e2['createPositionBefore'](_0x8c58b5['item']);return _0x5900e2['createPositionFromPath'](_0x5351fd,_0x33b6b0['path'],_0x33b6b0['stickiness']);}function Ct(_0x599ee4,_0xeff913,_0x23738d){const _0x2c141c='elementStart'==_0x599ee4['type']?_0x23738d['createPositionAt'](_0x599ee4['item'],0x0):_0x23738d['createPositionAfter'](_0x599ee4['item']);return _0x23738d['createPositionFromPath'](_0xeff913,_0x2c141c['path'],_0x2c141c['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x44dc82(dt);var xt=class extends Nt{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x2715e8,_0x2dfd49){super(_0x2715e8),this['focusTracker']=new _0x4066f3(),this['keystrokes']=new _0x427814(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2dfd49),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_t({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5518e7=_0x53968a=>_0x53968a['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5518e7),this['keystrokes']['set']('arrowleft',_0x5518e7),this['keystrokes']['set']('arrowup',_0x5518e7),this['keystrokes']['set']('arrowdown',_0x5518e7);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xd835e1){this['revisionNameInputView']['fieldView']['element']['value']=_0xd835e1['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x219e71){const _0x194df8=new it(this['locale'],gt),_0x8c0d10=_0x194df8['fieldView'];_0x8c0d10['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x3b4c93=kt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x219e71&&(_0x3b4c93+='\x20('+kt(this['locale'],'optional')+')'),(_0x194df8['label']=_0x3b4c93,_0x8c0d10['on']('input',()=>{this['revisionNameInputValue']=_0x8c0d10['element']['value']['trim']();}),_0x194df8);}},Dt=class extends _0x425632{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At];}['_saveRevisionFormView'];init(){const _0x4f8a67=this['editor'],_0x147501=_0x4f8a67['plugins']['get']('RevisionTracker');_0x4f8a67['ui']['componentFactory']['add']('revisionHistory',_0x963ba=>{const _0x2c29ec=vt(_0x963ba),_0x290d54=_0x2c29ec['panelView']['children'],_0x190474=new st(_0x963ba),_0x139d85=new et(_0x963ba),_0x25f2ed=this['_createSaveRevisionButton'](_0x2bddaa),_0x3b98b7=new et(_0x963ba),_0x77538a=this['_createOpenRevisionButton'](_0x2bddaa);return _0x2c29ec['bind']('isEnabled')['to'](_0x147501,'isReady',_0x147501,'isEnabled',_0x4f8a67,'isReadOnly',(_0x1e41a8,_0xa2a7cd,_0x14747d)=>_0x1e41a8&&_0xa2a7cd&&!_0x14747d),_0x2c29ec['buttonView']['set']({'icon':_0x3ae085,'label':kt(_0x963ba,'Revision\x20history'),'tooltip':!0x0}),_0x25f2ed['set']({'withText':!0x0,'role':'menuitem'}),_0x77538a['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x77538a,'execute',()=>{_0x2c29ec['isOpen']=!0x1,_0x4f8a67['editing']['view']['focus']();},{'priority':'low'}),_0x139d85['children']['add'](_0x25f2ed),_0x3b98b7['children']['add'](_0x77538a),_0x190474['role']='menu',_0x190474['items']['addMany']([_0x139d85,_0x3b98b7]),_0x290d54['add'](_0x190474),_0x2c29ec;}),_0x4f8a67['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x5dcfc2=this['editor'],_0x172444=_0x5dcfc2['locale'],_0x5ad3de=_0x5dcfc2['plugins']['get']('RevisionTracker'),_0xdb6089=new at(_0x172444),_0x320552=new rt(_0x172444);_0xdb6089['bind']('isEnabled')['to'](_0x5ad3de,'isReady',_0x5ad3de,'isEnabled',_0x5dcfc2,'isReadOnly',(_0x32e9cb,_0x5c2c89,_0x4c4503)=>_0x32e9cb&&_0x5c2c89&&!_0x4c4503),_0xdb6089['buttonView']['set']({'icon':_0x3ae085,'label':kt(_0x172444,'Revision\x20history')});const _0x577d88=new ot(_0x172444,_0xdb6089),_0x4df989=this['_createSaveRevisionButton'](nt);_0x4df989['delegate']('execute')['to'](_0xdb6089),_0x577d88['children']['add'](_0x4df989),_0x320552['items']['add'](_0x577d88);const _0x44ec86=new ot(_0x172444,_0xdb6089),_0x61ef39=this['_createOpenRevisionButton'](nt);return _0x61ef39['delegate']('execute')['to'](_0xdb6089),_0x44ec86['children']['add'](_0x61ef39),_0x320552['items']['add'](_0x44ec86),_0xdb6089['panelView']['children']['add'](_0x320552),_0xdb6089;}_createSaveRevisionButton(_0x5ce0a7){const _0x2677c5=this['editor'],_0x1a80ac=_0x2677c5['plugins']['get']('RevisionTracker'),_0x2b67e2=new _0x5ce0a7(_0x2677c5['locale']);return _0x2b67e2['set']({'label':kt(_0x2677c5['locale'],'Save\x20current\x20revision')}),_0x2b67e2['bind']('isEnabled')['to'](_0x1a80ac,'isReady',_0x1a80ac,'isEnabled',_0x2677c5,'isReadOnly',(_0x1ae2f7,_0x2bdfaa,_0x284bec)=>_0x1ae2f7&&_0x2bdfaa&&!_0x284bec),this['listenTo'](_0x2b67e2,'execute',()=>{this['_showDialog']();}),_0x2b67e2;}_createOpenRevisionButton(_0x1d987e){const _0x1ab0ab=this['editor'],_0x274d2f=_0x1ab0ab['plugins']['get']('RevisionTracker'),_0x180ad3=new _0x1d987e(_0x1ab0ab['locale']);return _0x180ad3['set']({'label':kt(_0x1ab0ab['locale'],'Open\x20revision\x20history')}),_0x180ad3['bind']('isEnabled')['to'](_0x274d2f,'isReady',_0x1ab0ab,'isReadOnly',(_0x4a78c8,_0x22603e)=>_0x4a78c8&&!_0x22603e),this['listenTo'](_0x180ad3,'execute',()=>{_0x1ab0ab['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x180ad3;}['_showDialog'](){const _0x4b1c02=this['editor'],_0x5a0806=_0x4b1c02['locale'],_0x3a5828=_0x4b1c02['plugins']['get']('Dialog'),_0x34ef15=_0x4b1c02['plugins']['get']('RevisionTracker');function _0x3d76d7(_0x3d0e8b){_0x4b1c02['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3d0e8b['revisionName']?_0x3d0e8b['revisionNameInputView']['errorText']=kt(_0x5a0806,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4b1c02['plugins']['get'](At)['saveRevision']({'name':_0x3d0e8b['revisionName']}),_0x3a5828['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3d76d7(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3a5828['show']({'id':'revisionSave','title':kt(_0x5a0806,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':kt(_0x4b1c02['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3a5828['hide']()},{'label':kt(_0x4b1c02['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x31e93c){_0x31e93c['bind']('isEnabled')['to'](_0x34ef15,'isReady',_0x34ef15,'isEnabled',_0x4b1c02,'isReadOnly',(_0x54a4dd,_0x366a15,_0x4c8863)=>_0x54a4dd&&_0x366a15&&!_0x4c8863);},'onExecute':()=>_0x3d76d7(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x2b4315=this['editor'],_0x5d8714=_0x2b4315['locale'];this['_saveRevisionFormView']=new xt(_0x5d8714,_0x2b4315['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Vt=class extends dt{['changeId'];['_model'];constructor(_0x44993b,_0x2110d9,_0x8bb762=!0x1){super(_0x44993b),this['_model']=_0x2110d9,this['changeId']=_0x2110d9['id'];const _0x4ff749=this['bindTemplate'],_0x54020e=_0x8bb762&&!!_0x2110d9['data']['aiSource'],_0x2edd8b=_0x54020e?this['_createAiIconView'](_0x44993b):null;this['set']('type',_0x2110d9['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x4ff749['to']('type',_0x23e7c9=>'ck-revision-change__'+_0x23e7c9),..._0x54020e?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x54020e?[this['_createAiDescriptionView'](_0x44993b,_0x2110d9),_0x2edd8b]:this['_getDescriptionChildren'](_0x44993b,_0x2110d9)}]});}_getDescriptionChildren(_0x4b0023,_0x210c5a){let _0x1ff4ef='Removed\x20by';return _0x210c5a['data']['isSuggestion']?_0x1ff4ef='Suggested\x20by':'add'==_0x210c5a['type']&&(_0x1ff4ef='Added\x20by'),[this['_createLabel'](kt(_0x4b0023,_0x1ff4ef)),{'text':'\x20'+_0x210c5a['author']['name']}];}_createAiDescriptionView(_0x3bbe9f,_0x101af9){let _0x16e437='AI_SOURCE_REMOVED_BY';_0x101af9['data']['isSuggestion']?_0x16e437='AI_SOURCE_SUGGESTED_BY':'add'==_0x101af9['type']&&(_0x16e437='AI_SOURCE_ADDED_BY');const _0xc0873e=new dt(_0x3bbe9f);return _0xc0873e['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0xc0873e['render'](),_0xc0873e['element']['innerHTML']=_0x2e6ac4(kt(_0x3bbe9f,_0x16e437,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+kt(_0x3bbe9f,'AI_SOURCE_AI')+'</span>'])),_0xc0873e['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x101af9['author']['name'],_0xc0873e;}_createLabel(_0x35bb5b){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x35bb5b}]};}_createAiIconView(_0x5a134c){const _0x54c76b=new _0xcee50d();return _0x54c76b['content']=_0x2ea1bc,_0x54c76b['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':kt(_0x5a134c,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x54c76b;}['focus'](){this['element']['focus']();}};const Tt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x6714c0();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x4cd0b0){super(),this['id']=_0x4cd0b0['id']||_0x463db6(),this['author']=_0x4cd0b0['author'],this['type']=_0x4cd0b0['type'],this['data']=_0x4cd0b0['data']||{},this['rootName']=_0x4cd0b0['rootName'],this['set']('createdAt',_0x4cd0b0['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x26488f,_0xbb14c6){this['newRevisionId']=_0x26488f,this['oldRevisionId']=_0xbb14c6,this['changes']=new _0x4a5c87();}_setChanges(_0x300c9d){for(const _0x433cf9 of _0x300c9d)this['changes']['add'](_0x433cf9);}},Pt=class extends _0x425632{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[_0xacfea9,_0x14cbb3,bt,Rt];}constructor(_0x2bef5f){super(_0x2bef5f),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',(_0xecec19,_0x47881f,_0xf5a0a)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x403a04=>{for(const _0x1dead5 of this['editor']['editing']['view']['document']['roots'])_0xf5a0a?_0x403a04['removeClass']('ck-editor__editable__overlay',_0x1dead5):_0x403a04['addClass']('ck-editor__editable__overlay',_0x1dead5);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x1ce56a=>null!==_0x1ce56a),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x9dd090,_0x190167,_0x33d2d2)=>_0x9dd090&&_0x33d2d2?_0x190167['changes']['getIndex'](_0x33d2d2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0xf59ff9,_0x28f2d4)=>_0xf59ff9?_0x28f2d4['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x14cbb3),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x597740=this['editor'],_0x29d1cc=new $t(_0x597740,{'direction':'backward'}),_0x6cfc86=new $t(_0x597740,{'direction':'forward'});_0x597740['commands']['add']('showPreviousChange',_0x29d1cc),_0x597740['commands']['add']('showNextChange',_0x6cfc86),_0x597740['commands']['add']('restoreRevision',new Ft(_0x597740)),this['on']('change:numberOfChanges',()=>{_0x29d1cc['refresh'](),_0x6cfc86['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x597740['enableReadOnlyMode']('revision-viewer'),_0x597740['plugins']['has']('WidgetToolbarRepository')&&_0x597740['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x5b8e86){return await this['_utils']['loadRevisionData'](_0x5b8e86,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5b8e86);}async getRevisionRootsAttributes(_0x1f000b){return await this['_utils']['loadRevisionData'](_0x1f000b,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1f000b);}async['compare'](_0x1abf5e,_0x151fa8,_0x5c2b74=!0x1){if(!this['isEnabled'])return;const _0x2cb61b=this['diff'],_0x858d0=this['repository'],_0x3791ff='string'==typeof _0x1abf5e?_0x858d0['getRevision'](_0x1abf5e):_0x1abf5e,_0x4abd02='string'==typeof _0x151fa8?_0x858d0['getRevision'](_0x151fa8):_0x151fa8,_0x497d87=_0x3791ff['id'],_0x4465e1=_0x4abd02?_0x4abd02['id']:null;if(!_0x5c2b74&&this['diff']&&this['diff']['newRevisionId']===_0x497d87&&this['diff']['oldRevisionId']===_0x4465e1)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x497d87,_0x4465e1);const _0x4814eb=this['_getRevisionsRange'](_0x3791ff,_0x4abd02,!0x0)['map'](_0x2e6bd1=>this['_utils']['loadRevisionData'](_0x2e6bd1,this['adapter']));return _0x4814eb['push'](new Promise(_0x518c60=>{setTimeout(_0x518c60,0x14);})),Promise['all'](_0x4814eb)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x104afe=this['_getDiff'](_0x497d87,_0x4465e1);this['_cleanUpCommentMarkers'](_0x104afe);for(const _0x6ce606 of _0x104afe['changes'])this['_changeIdToChange']['set'](_0x6ce606['id'],_0x6ce606);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x877152=>{for(const _0x492234 of this['editor']['model']['document']['getRootNames']())_0x877152['detachRoot'](_0x492234);for(const _0x5c6971 of Object['keys'](_0x104afe['model'])){const _0x5bf784=_0x104afe['model'][_0x5c6971]['name'],_0x40a63e=_0x877152['addRoot'](_0x5c6971,_0x5bf784);for(const _0x2e634f of Object['keys'](_0x104afe['attributes'][_0x5c6971]))_0x877152['setAttribute'](_0x2e634f,_0x104afe['attributes'][_0x5c6971][_0x2e634f],_0x40a63e);_0x877152['insert'](_0x104afe['model'][_0x5c6971],_0x40a63e,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x104afe['changes'])),this['isReady']=!0x0;})['catch'](_0x277227=>{console['error'](_0x277227),this['_cleanUp'](),_0x2cb61b&&(this['diff']=_0x2cb61b),this['isReady']=!0x0;});}addRevisionData(_0x12fb6d,_0xaffe10){const _0x56cfc3=this['repository']['createRevision'](_0x12fb6d);return _0x56cfc3['on']('_update',(_0x13963b,_0x2c81d3,_0x4f1d7a)=>_0xaffe10(_0x2c81d3,_0x4f1d7a,_0x56cfc3)),this['repository']['addRevision'](_0x56cfc3),_0x56cfc3;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x430746=>{for(const _0x3a197a of this['editor']['model']['document']['getRootNames']())_0x430746['detachRoot'](_0x3a197a);});}_cleanUpCommentMarkers(_0x10a397){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x848c7f=this['_getVisibleCommentThreadIds']();for(const _0x4ac183 of Object['values'](_0x10a397['model']))for(const _0x496049 of Array['from'](_0x4ac183['markers']['keys']()))_0x496049['startsWith']('revision-comment:')&&!_0x848c7f['has'](Ut(_0x496049))&&_0x4ac183['markers']['delete'](_0x496049);}_sortAndFilterDiffChanges(_0x4a549c){const _0x480888=[],_0x1c5413=new Map();for(const _0x153162 of this['editor']['model']['document']['getRootNames']()){const _0x5e45ed=this['editor']['editing']['view']['getDomRoot'](_0x153162);if(!_0x5e45ed)continue;const _0xb78a7e=_0x5e45ed['getClientRects']()['item'](0x0);_0xb78a7e&&(_0x480888['push'](_0x153162),_0x1c5413['set'](_0x153162,_0xb78a7e));}return _0x480888['sort']((_0x410a95,_0x52d3e8)=>{const _0xeff877=_0x1c5413['get'](_0x410a95),_0x237b35=_0x1c5413['get'](_0x52d3e8);return _0xeff877['y']-_0x237b35['y']||_0xeff877['x']-_0x237b35['x'];}),(_0x4a549c=_0x4a549c['filter'](_0x547cf3=>_0x480888['includes'](_0x547cf3['rootName'])))['sort']((_0x38d4c7,_0x1eac58)=>_0x480888['indexOf'](_0x38d4c7['rootName'])-_0x480888['indexOf'](_0x1eac58['rootName'])),_0x4a549c;}['_makeTape'](_0x196c2c,_0x46890a={}){const _0x3635b1=Array['from'](_0x196c2c['markers'])['filter'](([_0x5e1107,_0x56197f])=>_0x5e1107['startsWith']('revision:')&&!_0x56197f['isCollapsed']),_0x26383f=Array['from'](this['editor']['model']['createRangeIn'](_0x196c2c)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3635b1['length'])for(const _0xb26343 of _0x26383f){const [_0x322e02,_0x41ddae]=_0x3635b1[0x0],[,_0x2aeac6,_0x5efecf]=_0x322e02['split'](':'),_0xd8d8b5=_0x46890a[_0x322e02]||null;if(_0x41ddae['end']['isEqual'](_0xb26343['nextPosition'])&&_0x3635b1['shift'](),(_0xb26343['previousPosition']['isEqual'](_0x41ddae['start'])||_0xb26343['previousPosition']['isAfter'](_0x41ddae['start']))&&('insertion'==_0x2aeac6?_0xb26343['isAdded']={'userId':_0x5efecf,'aiSource':_0xd8d8b5}:'deletion'==_0x2aeac6&&(_0xb26343['isRemoved']={'userId':_0x5efecf,'aiSource':_0xd8d8b5})),0x0==_0x3635b1['length'])break;}return _0x26383f;}_refreshStartEndIndex(_0x5c1af7){const _0x61e02e=new Map();for(let _0x32a9ad=0x0;_0x32a9ad<_0x5c1af7['length'];_0x32a9ad++)'text'===_0x5c1af7[_0x32a9ad]['type']?(_0x5c1af7[_0x32a9ad]['item']['startIndex']=_0x32a9ad,_0x5c1af7[_0x32a9ad]['item']['endIndex']=_0x32a9ad):('elementStart'===_0x5c1af7[_0x32a9ad]['type']?_0x5c1af7[_0x32a9ad]['item']['startIndex']=_0x32a9ad:'elementEnd'===_0x5c1af7[_0x32a9ad]['type']&&(_0x5c1af7[_0x32a9ad]['item']['endIndex']=_0x32a9ad),_0x61e02e['set'](_0x5c1af7[_0x32a9ad]['id'],_0x32a9ad));for(const _0x579be4 of _0x61e02e['values']())'elementStart'===_0x5c1af7[_0x579be4]['type']?_0x5c1af7[_0x579be4]['item']['endIndex']=_0x61e02e['get'](_0x5c1af7[_0x579be4]['pairId']):'elementEnd'===_0x5c1af7[_0x579be4]['type']&&(_0x5c1af7[_0x579be4]['item']['startIndex']=_0x61e02e['get'](_0x5c1af7[_0x579be4]['pairId']));}['_processTape'](_0x5948bb){for(let _0xd1349f=0x0;_0xd1349f<_0x5948bb['length'];_0xd1349f++){if('elementStart'===_0x5948bb[_0xd1349f]['type'])_0x5948bb[_0xd1349f]['item']['startIndex']=_0xd1349f;else{if('elementEnd'===_0x5948bb[_0xd1349f]['type']){_0x5948bb[_0xd1349f]['item']['endIndex']=_0xd1349f;const _0x454e82=_0x5948bb[_0xd1349f]['item']['startIndex'];_0x5948bb[_0x454e82]['pairId']=_0x5948bb[_0xd1349f]['id'],_0x5948bb[_0xd1349f]['pairId']=_0x5948bb[_0x454e82]['id'];}else _0x5948bb[_0xd1349f]['item']['startIndex']=_0xd1349f,_0x5948bb[_0xd1349f]['item']['endIndex']=_0xd1349f,_0x5948bb[_0xd1349f]['pairId']=null;}_0x5948bb[_0xd1349f]['markersStart']||(_0x5948bb[_0xd1349f]['markersStart']=[],_0x5948bb[_0xd1349f]['markersEnd']=[]);}}_markInsertions(_0x4f4abc,_0x4a1c04){const _0x413fb9=_0x4f4abc['filter'](_0x5b94e2=>!_0x5b94e2['isAdded']);for(let _0x1cbc34=0x0;_0x1cbc34<_0x4a1c04['length'];_0x1cbc34++)_0x4a1c04[_0x1cbc34]['isAdded']&&(_0x413fb9[_0x1cbc34]['isAdded']=_0x4a1c04[_0x1cbc34]['isAdded']);}_getDiff(_0x4c8e85,_0x3016fc=null){const _0x13b347=this['repository']['getRevision'](_0x4c8e85),_0x107aa8=_0x3016fc?this['repository']['getRevision'](_0x3016fc):null,_0x2d5e55=this['_getRevisionsRange'](_0x13b347,_0x107aa8),_0x59ab2d=_0x2d5e55[_0x2d5e55['length']-0x1],_0x4af3c9=new Map(),_0x3fd295={'model':{},'attributes':{},'changes':[]},_0x12a146=new Set(),_0x5f2d66=new Map();for(let _0x175975=_0x2d5e55['length']-0x1;_0x175975>=0x0;_0x175975--){const _0x36aae2=_0x2d5e55[_0x175975];for(const _0x53ba5c of Object['keys'](_0x36aae2['diffData']))if(_0x36aae2['diffData'][_0x53ba5c]['attachChange']){const _0x2cac54=_0x36aae2['diffData'][_0x53ba5c]['attachChange'];_0x2cac54['isAttached']?(_0x12a146['add'](_0x53ba5c),_0x5f2d66['has'](_0x53ba5c)&&_0x5f2d66['get'](_0x53ba5c)['userId']==_0x2cac54['userId']?_0x5f2d66['delete'](_0x53ba5c):_0x5f2d66['set'](_0x53ba5c,_0x2cac54)):_0x5f2d66['has'](_0x53ba5c)?(_0x12a146['delete'](_0x53ba5c),_0x5f2d66['delete'](_0x53ba5c)):(_0x12a146['add'](_0x53ba5c),_0x5f2d66['set'](_0x53ba5c,_0x2cac54));}else _0x12a146['add'](_0x53ba5c);}for(const _0x39fe51 of _0x12a146){const _0x1ecd84=_0x5f2d66['has'](_0x39fe51)&&!_0x5f2d66['get'](_0x39fe51)['isAttached'];let _0x3043f3=_0x1ecd84?_0x2d5e55['length']-0x1:0x0;const _0x2560c0=_0x1ecd84?-0x1:0x1;for(;_0x2d5e55[_0x3043f3];){const _0x3fb532=_0x2d5e55[_0x3043f3];if(_0x3fb532['diffData'][_0x39fe51]){const _0xabfed5=_0x1ecd84?_0x3fb532['diffData'][_0x39fe51]['attributesBefore']:_0x3fb532['diffData'][_0x39fe51]['attributesAfter'];_0x3fd295['attributes'][_0x39fe51]=_0xabfed5?_0x319a1d(_0xabfed5):{};break;}_0x3043f3+=_0x2560c0;}}for(const _0x466f34 of _0x2d5e55){_0x466f34['model']={};for(const _0x1a9629 of _0x466f34['authors'])_0x4af3c9['set'](_0x1a9629['id'],_0x1a9629);for(const _0x274eba of _0x12a146){const _0x3e8186=_0x466f34['diffData'][_0x274eba]?_0x466f34['diffData'][_0x274eba]['insertions']:'[]',_0x18b327=_0x466f34['diffData'][_0x274eba]?_0x466f34['diffData'][_0x274eba]['deletions']:'[]',_0x4d4d17=_0x466f34['diffData'][_0x274eba]?.['rootElementName']||'$root';_0x466f34['model'][_0x274eba]={'insertions':this['_utils']['_makeModelFromViewString'](_0x3e8186,_0x4d4d17),'deletions':this['_utils']['_makeModelFromViewString'](_0x18b327,_0x4d4d17)};}}for(const _0x28a0d5 of _0x12a146){let _0x43e5ad=null,_0x2e2dc2=0x0;const _0x10261b=_0x2d5e55['map'](_0x55d6d9=>_0x55d6d9['diffData'][_0x28a0d5]?.['rootElementName'])['find'](_0x3930c4=>void 0x0!==_0x3930c4)||'$root',_0x14edce=new Map(Array['from'](_0x13b347['model'][_0x28a0d5]['insertions']['markers'])['filter'](([_0x138874])=>!_0x138874['startsWith']('revision:')));let _0x3f111f=0x0;for(const _0x127ef4 of _0x2d5e55){const _0x499b32=_0x127ef4['diffData'][_0x28a0d5]?.['aiSources']||{},_0x2c4c02=this['_makeTape'](_0x127ef4['model'][_0x28a0d5]['insertions'],_0x499b32);_0x127ef4==_0x13b347?(_0x43e5ad=_0x2c4c02,_0x2e2dc2=_0x43e5ad['length'],_0x43e5ad['forEach'](_0xf6b99d=>{_0xf6b99d['id']=_0x3f111f++;}),this['_processTape'](_0x43e5ad)):this['_markInsertions'](_0x43e5ad,_0x2c4c02);const _0x28227f=_0x43e5ad['filter'](_0x5caa4b=>!_0x5caa4b['isAdded'])['map'](_0x364178=>_0x364178['id']);let _0x55a3b6=0x0;const _0x28489a=this['_makeTape'](_0x127ef4['model'][_0x28a0d5]['deletions'],_0x499b32);_0x28489a['forEach'](_0x25d197=>{_0x25d197['isRemoved']?_0x25d197['id']=_0x2e2dc2++:_0x25d197['id']=_0x28227f[_0x55a3b6++];}),this['_processTape'](_0x28489a),this['_setDistance'](_0x43e5ad,'isAdded'),this['_setDistance'](_0x28489a,'isRemoved'),_0x127ef4==_0x13b347&&this['_markMarkers'](_0x43e5ad,_0x14edce),_0x43e5ad=this['_joinTapes'](_0x43e5ad,_0x28489a),this['_refreshStartEndIndex'](_0x43e5ad),this['_setDistance'](_0x43e5ad,'isRemoved');}_0x43e5ad=_0x43e5ad['filter'](_0x5395e1=>!(_0x5395e1['isAdded']&&_0x5395e1['isRemoved']));const _0x1f7251=new Map(_0x59ab2d['model'][_0x28a0d5]['deletions']['markers']),_0x2d5451=new Set(_0x14edce['keys']());for(const _0x6cab51 of _0x1f7251['keys']())_0x2d5451['delete'](_0x6cab51);const _0x3afe1d=Object['assign']({},..._0x2d5e55['map'](_0x521a01=>_0x521a01['diffData'][_0x28a0d5]?.['aiSources']));this['_markSuggestions'](_0x43e5ad,_0x2d5451,_0x3afe1d),this['_fixObsoleteTags'](_0x43e5ad),_0x43e5ad=this['_removeMissingPairs'](_0x43e5ad),_0x43e5ad=this['_markMismatchedRemovedTags'](_0x43e5ad),_0x43e5ad=this['_removeUnsupportedChanges'](_0x43e5ad);const {root:_0x18f82d,changes:_0x27483b}=this['_makeModelFromTape'](_0x43e5ad,_0x4af3c9,_0x28a0d5,_0x10261b);_0x3fd295['model'][_0x28a0d5]=_0x18f82d;const _0x45e8f0=_0x5f2d66['get'](_0x28a0d5);if(_0x45e8f0){const _0x3be48d=_0x4af3c9['get'](_0x45e8f0['userId']),_0x4d7205=new Mt({'author':_0x3be48d,'type':_0x45e8f0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x28a0d5});_0x27483b['unshift'](_0x4d7205),_0x3fd295['attributes'][_0x28a0d5]['revisionHistoryAttachChange']=_0x4d7205['id'];}_0x3fd295['changes']=_0x3fd295['changes']['concat'](_0x27483b);}return _0x3fd295;}['_markMarkers'](_0x308262,_0x1d1335){for(let _0x2cf569=0x0;_0x2cf569<_0x308262['length'];_0x2cf569++)for(const [_0x376be,_0xabb760]of _0x1d1335)!_0xabb760['isCollapsed']&&_0xabb760['start']['isEqual'](_0x308262[_0x2cf569]['previousPosition'])&&_0x308262[_0x2cf569]['markersStart']['push'](_0x376be),_0xabb760['end']['isEqual'](_0x308262[_0x2cf569]['nextPosition'])&&_0x308262[_0x2cf569]['markersEnd']['push'](_0x376be);}['_joinTapes'](_0x282c3d,_0xcae446){let _0x51ed4a=[],_0x5a8fac=0x0,_0x2215e8=0x0;for(;_0x5a8fac<_0x282c3d['length']||_0x2215e8<_0xcae446['length'];){const _0x5ce5eb=_0x282c3d[_0x5a8fac]||{},_0x157359=_0xcae446[_0x2215e8]||{};if(_0x5ce5eb['id']==_0x157359['id'])_0x5a8fac++,_0x2215e8++,_0x51ed4a['push'](_0x5ce5eb);else{if(_0x157359['isRemoved']&&_0x5ce5eb['isAdded']){const {commonTape:_0x16babe,iEnd:_0x2c8578,jEnd:_0x172fe0}=this['_threeWayMerge'](_0x282c3d,_0x5a8fac,_0xcae446,_0x2215e8);_0x51ed4a=_0x51ed4a['concat'](_0x16babe),_0x5a8fac=_0x2c8578,_0x2215e8=_0x172fe0;}else _0x157359['isRemoved']?(_0x2215e8++,_0x51ed4a['push'](_0x157359)):(_0x5a8fac++,_0x51ed4a['push'](_0x5ce5eb));}}return _0x51ed4a;}_markSuggestions(_0x3fcd4a,_0x2f8bb9,_0x44824b){const _0x2404a1=[];for(let _0x5b44f4=0x0;_0x5b44f4<_0x3fcd4a['length'];_0x5b44f4++){for(let _0x5be0a3=0x0;_0x5be0a3<_0x3fcd4a[_0x5b44f4]['markersStart']['length'];_0x5be0a3++){const _0x2d6ab0=_0x3fcd4a[_0x5b44f4]['markersStart'][_0x5be0a3];if(!_0x2f8bb9['has'](_0x2d6ab0))continue;const {group:_0x5e087b,type:_0x412948,authorId:_0x7a797a}=_0x146d8b(_0x2d6ab0);if('revision-suggestion'!=_0x5e087b||'insertion'!=_0x412948&&'deletion'!=_0x412948)continue;const _0x95b399=_0x44824b['suggestion:'+_0x2d6ab0['slice'](0x14)]||null;_0x2404a1['unshift']({'type':_0x412948,'name':_0x2d6ab0,'userId':_0x7a797a,'aiSource':_0x95b399}),_0x3fcd4a[_0x5b44f4]['markersStart']['splice'](_0x5be0a3,0x1),_0x5be0a3--;}_0x5becb0(_0x3fcd4a[_0x5b44f4]);for(let _0x4b9d8d=0x0;_0x4b9d8d<_0x3fcd4a[_0x5b44f4]['markersEnd']['length'];_0x4b9d8d++){const _0x4126ba=_0x3fcd4a[_0x5b44f4]['markersEnd'][_0x4b9d8d];if(!_0x2f8bb9['has'](_0x4126ba))continue;const {group:_0x20f625,type:_0x3c737b}=_0x146d8b(_0x4126ba);if('revision-suggestion'!=_0x20f625||'insertion'!=_0x3c737b&&'deletion'!=_0x3c737b)continue;_0x3fcd4a[_0x5b44f4]['markersEnd']['splice'](_0x4b9d8d,0x1),_0x4b9d8d--;const _0xb2cdf4=_0x2404a1['findIndex'](_0x5a20f7=>_0x5a20f7['name']==_0x4126ba);_0xb2cdf4>-0x1&&_0x2404a1['splice'](_0xb2cdf4,0x1);}}function _0x146d8b(_0xb8064){const _0x2d615b=_0xb8064['split'](':');return{'group':_0x2d615b[0x0],'type':_0x2d615b[0x1],'subType':_0x2d615b['length']>=0x5?_0x2d615b[0x2]:null,'id':_0x2d615b['length']<0x5?_0x2d615b[0x2]:_0x2d615b[0x3],'authorId':_0x2d615b['length']<0x5?_0x2d615b[0x3]:_0x2d615b[0x4],'markerCount':0x6==_0x2d615b['length']?_0x2d615b[0x5]:null};}function _0x5becb0(_0x101b9f){for(let _0x5d179b=0x0;_0x5d179b<_0x2404a1['length'];_0x5d179b++){if(_0x101b9f['isAdded']&&'insertion'==_0x2404a1[_0x5d179b]['type']&&_0x101b9f['isAdded']['userId']==_0x2404a1[_0x5d179b]['userId'])return _0x101b9f['isAddSuggestion']={..._0x2404a1[_0x5d179b],'aiSource':_0x101b9f['isAdded']['aiSource']||_0x2404a1[_0x5d179b]['aiSource']},void delete _0x101b9f['isAdded'];if(!_0x101b9f['isAdded']&&!_0x101b9f['isRemoved']&&'deletion'==_0x2404a1[_0x5d179b]['type'])return void(_0x101b9f['isRemoveSuggestion']=_0x2404a1[_0x5d179b]);}}}_setDistance(_0x54f5aa,_0x18b39a){let _0x471423=0x0,_0x3ec3f0=!0x1;const _0x147668=new Map();for(const _0x3edb26 of _0x54f5aa)_0x3edb26[_0x18b39a]?_0x3ec3f0&&(_0x471423++,_0x3ec3f0=!0x1):(_0x471423++,_0x3ec3f0=!0x0),_0x147668['set'](_0x3edb26['id'],_0x471423);for(let _0x20a017=0x0;_0x20a017<_0x54f5aa['length'];_0x20a017++){if('isRemoved'==_0x18b39a&&_0x54f5aa[_0x20a017]['isAdded']||'isAdded'==_0x18b39a&&_0x54f5aa[_0x20a017]['isRemoved'])continue;if('text'==_0x54f5aa[_0x20a017]['type']){_0x54f5aa[_0x20a017]['distance']=0x0;continue;}const _0x40fbf2=_0x147668['get'](_0x54f5aa[_0x20a017]['pairId']),_0x10f676=_0x147668['get'](_0x54f5aa[_0x20a017]['id']);_0x54f5aa[_0x20a017]['distance']=_0x40fbf2-_0x10f676;}}_getRevisionsRange(_0x10c47e,_0x531d21,_0x9a500f=!0x1){const _0x5bf832=[];let _0x5b66aa=this['repository']['getIndex'](_0x10c47e),_0x5b3a3f=this['repository']['getIndex'](_0x531d21);for(-0x1==_0x5b3a3f&&(_0x5b3a3f=this['repository']['_revisions']['length'],_0x9a500f=!0x1);_0x5b66aa<_0x5b3a3f;)_0x5bf832['push'](this['repository']['getRevision'](_0x5b66aa)),_0x5b66aa++;return _0x9a500f&&_0x5bf832['push'](this['repository']['getRevision'](_0x5b66aa)),_0x5bf832;}_threeWayMerge(_0x57214f,_0x4c9c6c,_0x3bd7d3,_0x58dfa0){const _0x1b88bc=this['editor']['model']['schema'];let _0x251edd=_0x4c9c6c;for(;_0x57214f[_0x251edd]&&_0x57214f[_0x251edd]['isAdded'];)_0x251edd++;let _0x2a1775=_0x58dfa0;for(;_0x3bd7d3[_0x2a1775]&&_0x3bd7d3[_0x2a1775]['isRemoved'];)_0x2a1775++;_0x2e3902(_0x57214f,_0x4c9c6c,_0x251edd),_0x2e3902(_0x3bd7d3,_0x58dfa0,_0x2a1775);const _0x59587e=_0x3bd7d3['slice'](_0x58dfa0,_0x2a1775)['concat'](_0x57214f['slice'](_0x4c9c6c,_0x251edd));return _0x59587e['sort']((_0x35075a,_0x5e7a32)=>_0x35075a['side']!=_0x5e7a32['side']?_0x35075a['side']-_0x5e7a32['side']:_0x35075a['level']!=_0x5e7a32['level']?_0x35075a['level']-_0x5e7a32['level']:_0x35075a['distance']!=_0x5e7a32['distance']?_0x5e7a32['distance']-_0x35075a['distance']:!!_0x35075a['isAdded']!=!!_0x5e7a32['isAdded']?-0x1==_0x35075a['side']||0x0==_0x35075a['side']?_0x35075a['isAdded']?-0x1:0x1:_0x35075a['isAdded']?0x1:-0x1:_0x35075a['index']-_0x5e7a32['index']),{'commonTape':_0x59587e,'iEnd':_0x251edd,'jEnd':_0x2a1775};function _0x2e3902(_0x15156b,_0xcc7a24,_0xcbcf8){let _0x23b7f7=-0x1,_0xd0a57=Number['POSITIVE_INFINITY'],_0x3373d9=!0x0;for(let _0x444b0c=_0xcc7a24;_0x444b0c<_0xcbcf8;_0x444b0c++)if(_0x1b88bc['isInline'](_0x15156b[_0x444b0c]['item'])||(_0x3373d9=!0x1),_0x15156b[_0x444b0c]['item']['startIndex']<_0xcc7a24&&(_0x23b7f7=_0x444b0c),_0x15156b[_0x444b0c]['item']['endIndex']>=_0xcbcf8){_0xd0a57=_0x444b0c;break;}_0x3373d9&&(_0x23b7f7=_0xcbcf8-0x1);for(let _0x4a7c2e=_0xcc7a24;_0x4a7c2e<_0xcbcf8;_0x4a7c2e++)_0x15156b[_0x4a7c2e]['side']=_0x4a7c2e<=_0x23b7f7?-0x1:_0x4a7c2e<_0xd0a57?0x0:0x1,_0x15156b[_0x4a7c2e]['index']=_0x4a7c2e;let _0x5eb935=0x0;for(let _0x4e49ff=_0xcc7a24;_0x4e49ff<=_0x23b7f7;_0x4e49ff++)0x0==_0x15156b[_0x4e49ff]['distance']?_0x15156b[_0x4e49ff]['level']=_0x5eb935:(_0x5eb935++,_0x15156b[_0x4e49ff]['level']=_0x5eb935,_0x5eb935++);for(let _0x4c864d=_0xcc7a24;_0x4c864d<_0xcbcf8;_0x4c864d++)0x0==_0x15156b[_0x4c864d]['side']&&(_0x15156b[_0x4c864d]['level']=_0x5eb935);_0x5eb935=0x0;for(let _0x22154a=_0xcbcf8-0x1;_0x22154a>=_0xd0a57;_0x22154a--)0x0==_0x15156b[_0x22154a]['distance']?_0x15156b[_0x22154a]['level']=_0x5eb935:(_0x5eb935--,_0x15156b[_0x22154a]['level']=_0x5eb935,_0x5eb935--);}}_fixObsoleteTags(_0x45082e){const _0x31871d=new Map(),_0xea8d73=this['editor']['model']['schema'];for(let _0x531dab=0x1;_0x531dab<_0x45082e['length'];_0x531dab++){let _0x26d03b,_0x4460e5,_0x2eec16;const _0x7294ff=_0x45082e[_0x531dab],_0x1dcd82=_0x45082e[_0x531dab-0x1];if('text'==_0x7294ff['type'])continue;if(_0x7294ff['type']!=_0x1dcd82['type'])continue;if(!_0xea8d73['isBlock'](_0x1dcd82['item'])||_0xea8d73['isLimit'](_0x1dcd82['item']))continue;if(!_0xea8d73['isBlock'](_0x7294ff['item'])||_0xea8d73['isLimit'](_0x7294ff['item']))continue;if((_0x45082e[_0x531dab]['isAdded']||_0x45082e[_0x531dab]['isAddSuggestion'])&&_0x45082e[_0x531dab-0x1]['isRemoved'])_0x26d03b=_0x45082e[_0x531dab],_0x4460e5=_0x45082e[_0x531dab-0x1],_0x2eec16=_0x531dab-0x1;else{if(!_0x45082e[_0x531dab]['isRemoved']||!_0x45082e[_0x531dab-0x1]['isAdded']&&!_0x45082e[_0x531dab-0x1]['isAddSuggestion'])continue;_0x26d03b=_0x45082e[_0x531dab-0x1],_0x4460e5=_0x45082e[_0x531dab],_0x2eec16=_0x531dab;}const _0x52632b=_0x26d03b['level']==_0x4460e5['level'],_0x3f0f21=Math['abs'](_0x26d03b['level'])<Math['abs'](_0x4460e5['level'])&&0x0==_0x4460e5['distance'];(_0x52632b||_0x3f0f21)&&(_0x31871d['set'](_0x4460e5['id'],_0x26d03b['id']),_0x45082e['splice'](_0x2eec16,0x1),_0x531dab--,_0x26d03b['isAdded']=!0x1);}for(let _0x497351=0x0;_0x497351<_0x45082e['length'];_0x497351++)_0x31871d['has'](_0x45082e[_0x497351]['pairId'])&&(_0x45082e[_0x497351]['pairId']=_0x31871d['get'](_0x45082e[_0x497351]['pairId']));}['_removeMissingPairs'](_0x3ca13f){const _0x57fa74=new Set(_0x3ca13f['map'](_0x24af1e=>_0x24af1e['id']));for(let _0x11b6a9=0x0;_0x11b6a9<_0x3ca13f['length'];_0x11b6a9++)_0x57fa74['has'](_0x3ca13f[_0x11b6a9]['pairId'])||0x0==_0x3ca13f[_0x11b6a9]['distance']||(_0x3ca13f[_0x11b6a9]['isIncorrect']=!0x0);return _0x3ca13f['filter'](_0x3acb43=>!_0x3acb43['isIncorrect']);}_markMismatchedRemovedTags(_0x3aa022){const _0x13f23a=new Set();for(let _0x333490=0x0;_0x333490<_0x3aa022['length'];_0x333490++){if(_0x13f23a['has'](_0x3aa022[_0x333490]['id'])&&_0x3aa022[_0x333490]['isRemoved']&&(_0x3aa022[_0x333490]['isIncorrect']=!0x0),_0x3aa022[_0x333490]['isIncorrect'])continue;if(0x0==_0x3aa022[_0x333490]['distance'])continue;if('elementStart'!=_0x3aa022[_0x333490]['type'])continue;if(null==_0x3aa022[_0x333490]['pairId'])continue;let _0x4aa06c=_0x333490+0x1,_0x3890c4=0x0;for(;_0x3aa022[_0x4aa06c]['id']!=_0x3aa022[_0x333490]['pairId'];)'elementStart'==_0x3aa022[_0x4aa06c]['type']?_0x3890c4++:'elementEnd'==_0x3aa022[_0x4aa06c]['type']&&_0x3890c4--,_0x4aa06c++;if(0x0!=_0x3890c4){if(_0x3aa022[_0x333490]['isRemoved'])_0x3aa022[_0x333490]['isIncorrect']=!0x0;else{for(;_0x4aa06c!=_0x333490;)_0x3aa022[_0x4aa06c]['isRemoved']&&0x0!=_0x3aa022[_0x4aa06c]['distance']&&(_0x3aa022[_0x4aa06c]['isIncorrect']=!0x0,_0x13f23a['add'](_0x3aa022[_0x4aa06c]['pairId'])),_0x4aa06c--;}}}return _0x3aa022['filter'](_0x5d06ca=>!_0x5d06ca['isIncorrect']);}_removeUnsupportedChanges(_0x5d4a6f){const _0x5b186f=this['editor']['model']['schema'];for(let _0x3af743=0x0;_0x3af743<_0x5d4a6f['length'];_0x3af743++){if(!(_0x5d4a6f[_0x3af743]['isAdded']||_0x5d4a6f[_0x3af743]['isAddSuggestion']||_0x5d4a6f[_0x3af743]['isRemoved']||_0x5d4a6f[_0x3af743]['isRemoveSuggestion']))continue;if(0x0==_0x5d4a6f[_0x3af743]['distance'])continue;const _0xb0f8fa=_0x5d4a6f[_0x3af743]['item'];_0x5b186f['isBlock'](_0xb0f8fa)||_0x5b186f['isLimit'](_0xb0f8fa)||(_0x5d4a6f[_0x3af743]['isAdded']&&delete _0x5d4a6f[_0x3af743]['isAdded'],_0x5d4a6f[_0x3af743]['isAddSuggestion']&&delete _0x5d4a6f[_0x3af743]['isAddSuggestion'],_0x5d4a6f[_0x3af743]['isRemoveSuggestion']&&delete _0x5d4a6f[_0x3af743]['isRemoveSuggestion'],_0x5d4a6f[_0x3af743]['isRemoved']&&(_0x5d4a6f[_0x3af743]['isIncorrect']=!0x0));}return _0x5d4a6f['filter'](_0x210a18=>!_0x210a18['isIncorrect']);}['_makeModelFromTape'](_0x134303,_0x48c89a,_0x592834,_0x181fb7){const _0x11adf2=new _0x384ec3(),_0x9b1c82=[],_0x3206a4=new Map(),_0x3f5fb1=this['editor']['model'],_0x4bd969=_0x3f5fb1['schema'],_0x164c6d=[_0x11adf2],_0x10a7c1={},_0x116549={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x11adf2['name']=_0x181fb7;let _0x4e5a81=null;const _0x5819d7=[0x0];for(let _0x2c6c92=0x0;_0x2c6c92<_0x134303['length'];_0x2c6c92++)if('elementStart'===_0x134303[_0x2c6c92]['type']){_0x134303[_0x2c6c92]['previousPosition']=_0x3f5fb1['createPositionFromPath'](_0x11adf2,_0x5819d7);const _0x5015a9=new _0x47c9c9(_0x134303[_0x2c6c92]['item']['name'],_0x134303[_0x2c6c92]['item']['getAttributes']());_0x164c6d[0x0]['_appendChild'](_0x5015a9),_0x5819d7['push'](0x0),_0x164c6d['unshift'](_0x5015a9),_0x134303[_0x2c6c92]['nextPosition']=_0x3f5fb1['createPositionFromPath'](_0x11adf2,_0x5819d7);}else'elementEnd'===_0x134303[_0x2c6c92]['type']?(_0x164c6d['shift'](),_0x134303[_0x2c6c92]['previousPosition']=_0x3f5fb1['createPositionFromPath'](_0x11adf2,_0x5819d7),_0x5819d7['pop'](),_0x5819d7[_0x5819d7['length']-0x1]++,_0x134303[_0x2c6c92]['nextPosition']=_0x3f5fb1['createPositionFromPath'](_0x11adf2,_0x5819d7)):(_0x134303[_0x2c6c92]['previousPosition']=_0x3f5fb1['createPositionFromPath'](_0x11adf2,_0x5819d7),_0x4e5a81?_0x4e5a81['_data']+=_0x134303[_0x2c6c92]['item']['data']:_0x4e5a81=new _0x53d605(_0x134303[_0x2c6c92]['item']['data'],_0x134303[_0x2c6c92]['item']['getAttributes']()),_0x134303[_0x2c6c92+0x1]&&'text'===_0x134303[_0x2c6c92+0x1]['type']&&_0x12de97(_0x4e5a81,_0x134303[_0x2c6c92+0x1]['item'])||(_0x164c6d[0x0]['_appendChild'](_0x4e5a81),_0x4e5a81=null),_0x5819d7[_0x5819d7['length']-0x1]+=_0x134303[_0x2c6c92]['item']['offsetSize'],_0x134303[_0x2c6c92]['nextPosition']=_0x3f5fb1['createPositionFromPath'](_0x11adf2,_0x5819d7));for(let _0x25bef5=0x0;_0x25bef5<_0x134303['length'];_0x25bef5++){const _0x219cf6=_0x134303[_0x25bef5]['previousPosition'],_0x4c25d1=_0x134303[_0x25bef5]['nextPosition'];for(const _0x4905bb of _0x134303[_0x25bef5]['markersStart'])_0x3206a4['set'](_0x4905bb,{'start':_0x219cf6,'end':null});_0x39a33c('isRemoveSuggestion',_0x25bef5,_0x219cf6,_0x4c25d1),_0x39a33c('isAddSuggestion',_0x25bef5,_0x219cf6,_0x4c25d1),_0x39a33c('isRemoved',_0x25bef5,_0x219cf6,_0x4c25d1),_0x39a33c('isAdded',_0x25bef5,_0x219cf6,_0x4c25d1);for(const _0x5f4e84 of _0x134303[_0x25bef5]['markersEnd']){const _0x598975=_0x3206a4['get'](_0x5f4e84);_0x598975?_0x598975['end']=_0x4c25d1:_0x3206a4['set'](_0x5f4e84,{'start':_0x4c25d1,'end':_0x4c25d1});}}for(const [_0x17926a,_0x40344e]of _0x3206a4){const _0x27edfa=this['editor']['model']['createRange'](_0x40344e['start'],_0x40344e['end']);_0x11adf2['markers']['set'](_0x17926a,_0x27edfa);}return _0x9b1c82['sort']((_0x3dd154,_0x56d388)=>{const _0x41b624=_0x11adf2['markers']['get']('revision:'+_0x3dd154['id']),_0x7e41ac=_0x11adf2['markers']['get']('revision:'+_0x56d388['id']);return _0x41b624['start']['isBefore'](_0x7e41ac['start'])?-0x1:_0x41b624['start']['isAfter'](_0x7e41ac['start'])?0x1:_0x41b624['end']['isBefore'](_0x7e41ac['end'])?-0x1:_0x41b624['end']['isAfter'](_0x7e41ac['end'])?0x1:'add'===_0x3dd154['type']?-0x1:0x1;}),{'root':_0x11adf2,'changes':_0x9b1c82};function _0x39a33c(_0xfb6ddb,_0x50eb7c,_0x3d6ca4,_0x24ab93){const _0x527a27=!!_0x134303[_0x50eb7c][_0xfb6ddb],_0x49af0f=_0x527a27?_0x134303[_0x50eb7c][_0xfb6ddb]['userId']:null,_0x29dbe5=_0x527a27&&_0x134303[_0x50eb7c][_0xfb6ddb]['aiSource']||null,_0xfcf9a=_0x50eb7c===_0x134303['length']-0x1,_0x118ab3=_0x116549[_0xfb6ddb][0x0],_0x15433b=_0x4bd969['isObject'](_0x134303[_0x50eb7c]['item']);!_0x10a7c1[_0xfb6ddb]&&_0x527a27?_0x10a7c1[_0xfb6ddb]={'start':_0x3d6ca4,'tapeItem':_0x134303[_0x50eb7c],'userId':_0x49af0f,'aiSource':_0x29dbe5,'type':_0xfb6ddb}:_0x10a7c1[_0xfb6ddb]&&!_0x527a27?(_0x10a7c1[_0xfb6ddb]['end']=_0x3d6ca4,_0x3ece6d(_0x10a7c1[_0xfb6ddb]),_0x10a7c1[_0xfb6ddb]=null):_0x10a7c1[_0xfb6ddb]&&_0x527a27&&(_0x10a7c1[_0xfb6ddb]['userId']!==_0x49af0f||_0x10a7c1[_0xfb6ddb]['aiSource']!==_0x29dbe5)&&(_0x10a7c1[_0xfb6ddb]['end']=_0x3d6ca4,_0x118ab3&&_0x118ab3['userId']===_0x10a7c1[_0xfb6ddb]['userId']?_0x118ab3['change']['aiSource']=_0x118ab3['change']['aiSource']||_0x10a7c1[_0xfb6ddb]['aiSource']:_0x3ece6d(_0x10a7c1[_0xfb6ddb]),_0x10a7c1[_0xfb6ddb]={'start':_0x3d6ca4,'tapeItem':_0x134303[_0x50eb7c],'userId':_0x49af0f,'aiSource':_0x29dbe5,'type':_0xfb6ddb}),_0x10a7c1[_0xfb6ddb]&&_0x15433b&&('elementStart'!==_0x134303[_0x50eb7c]['type']||_0x118ab3&&_0x118ab3['userId']===_0x49af0f||_0x116549[_0xfb6ddb]['unshift']({'userId':_0x49af0f,'object':_0x134303[_0x50eb7c]['item'],'change':_0x10a7c1[_0xfb6ddb]}),'elementEnd'===_0x134303[_0x50eb7c]['type']&&_0x118ab3&&_0x118ab3['object']===_0x134303[_0x50eb7c]['item']&&(_0x116549[_0xfb6ddb]['shift'](),_0x10a7c1[_0xfb6ddb]=_0x118ab3['change'])),_0x10a7c1[_0xfb6ddb]&&_0xfcf9a&&(_0x10a7c1[_0xfb6ddb]['end']=_0x24ab93,_0x3ece6d(_0x10a7c1[_0xfb6ddb]),_0x10a7c1[_0xfb6ddb]=null);}function _0x3ece6d({start:_0x412eb7,end:_0x520294,tapeItem:_0x549a1b,userId:_0x39b201,aiSource:_0x2f768c,type:_0x3e5c58}){const _0x355743=_0x549a1b['item'],_0x214514=_0x3f5fb1['schema']['isBlock'](_0x355743)&&!_0x3f5fb1['schema']['isLimit'](_0x355743),_0x8f4074=_0x412eb7['nodeAfter']==_0x520294['parent']&&_0x520294['isAtStart'];if(_0x214514&&_0x8f4074)return;const _0x3eaef7=_0x3f5fb1['createRange'](_0x412eb7,_0x520294),_0x20daee=_0x48c89a['get'](_0x39b201),_0x35ebdb=new Mt({'author':_0x20daee,'type':'isAdded'==_0x3e5c58||'isAddSuggestion'==_0x3e5c58?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3e5c58||'isRemoveSuggestion'==_0x3e5c58,'aiSource':_0x2f768c||null},'createdAt':new Date(),'rootName':_0x592834});_0x9b1c82['push'](_0x35ebdb),_0x11adf2['markers']['set']('revision:'+_0x35ebdb['id'],_0x3eaef7);}function _0x12de97(_0x4d4236,_0x3455c0){const _0x5e7968=_0x4d4236['getAttributes'](),_0x27ec7b=_0x3455c0['getAttributes']();for(const _0x3986df of _0x5e7968){if(_0x3986df[0x1]!==_0x3455c0['getAttribute'](_0x3986df[0x0]))return!0x1;_0x27ec7b['next']();}return _0x27ec7b['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3aa639=>{const _0x55921d=_0x3aa639['markerName']['split'](':')[0x1],_0x43fc61=this['_getChangeFromId'](_0x55921d);if(!_0x43fc61)return null;const _0x1f9772='add'==_0x43fc61['type']?'insertion':'deletion',_0x1fa49f=['ck-suggestion-marker','ck-suggestion-marker-'+_0x1f9772];return _0x43fc61['data']['isSuggestion']&&_0x1fa49f['push']('ck-suggestion-marker-'+_0x1f9772+'-new'),this['activeChange']==_0x43fc61&&_0x1fa49f['push']('ck-suggestion-marker--active'),{'classes':_0x1fa49f,'attributes':{'data-change-id':_0x55921d}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x4669b9=>{_0x4669b9['on']('element:pre',(_0x19ac4c,_0xcb09b6,_0x5a9485)=>{const _0x191771=_0xcb09b6['viewItem']['getChild'](0x0);if(!_0x191771||!_0x191771['is']('element','code'))return;if(!_0x5a9485['consumable']['consume'](_0x191771,{'attributes':['vid_start','vid_end']}))return;const _0x37c18a=_0xcb09b6['modelRange']['start']['nodeAfter'];_0x5a9485['writer']['setAttribute']('vid_start',_0x191771['getAttribute']('vid_start'),_0x37c18a),_0x5a9485['writer']['setAttribute']('vid_end',_0x191771['getAttribute']('vid_end'),_0x37c18a);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x262d7d=>{_0x262d7d['on']('element',(_0x428d57,_0x6db1fb,_0x56496b)=>{if(!_0x56496b['consumable']['consume'](_0x6db1fb['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x6db1fb['modelRange']['isCollapsed'])return;const _0x2eebbc=_0x6db1fb['modelRange']['start']['nodeAfter'];_0x2eebbc['hasAttribute']('vid_start')||_0x2eebbc['hasAttribute']('vid')||(_0x56496b['writer']['setAttribute']('vid_start',_0x6db1fb['viewItem']['getAttribute']('vid_start'),_0x2eebbc),_0x56496b['writer']['setAttribute']('vid_end',_0x6db1fb['viewItem']['getAttribute']('vid_end'),_0x2eebbc));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x3c088d=>_0x3c088d['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0xaf612,[,_0x125ce6])=>{['vid_start','vid_end','vid']['includes'](_0x125ce6)&&(_0xaf612['return']=!0x0,_0xaf612['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x45235d=>{_0x45235d['on']('attribute:vid',(_0x141fcd,_0xd7d30d,_0x58a6c3)=>{if('\x20'!=_0xd7d30d['item']['data']||_0xd7d30d['item']['parent']['maxOffset']>0x1)return;if(!_0x58a6c3['consumable']['consume'](_0xd7d30d['item'],_0x141fcd['name']))return;const _0x5da6da=_0x58a6c3['writer'],_0x2fcdad=_0x58a6c3['mapper']['toViewRange'](_0xd7d30d['range']);_0x5da6da['wrap'](_0x2fcdad,_0x5da6da['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x2e8888){const _0x531b96=_0x2e8888['plugins']['get']('RevisionViewer');return(_0x1997c9,_0x453617,_0x3f40e3)=>{const _0x10afb5=_0x453617['markerName']['split'](':')[0x1],_0x148c77=_0x531b96['_getChangeFromId'](_0x10afb5);if(!_0x148c77)return null;const _0x19260e='add'==_0x148c77['type']?'split':'merge';if(!_0x3f40e3['consumable']['test'](_0x453617['markerRange'],_0x1997c9['name']))return;const _0x5a6bac=_0x453617['markerRange']['getWalker'](),_0x5554ea=_0x453617['markerRange']['start'],_0x307d47=_0x2e8888['model']['schema'];let _0x1cfad4=null,_0xc46e47=null,_0xb23aa2=!0x1,_0x3a6159=!0x1;for(const _0x2f3611 of _0x5a6bac){const _0x3475b4=_0x2f3611['item'];_0xb23aa2=_0xb23aa2||_0x307d47['isContent'](_0x3475b4);const _0x2d37dc=_0x3f40e3['mapper']['toViewElement'](_0x3475b4);if(_0x2d37dc&&_0x2d37dc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2f3611['type']&&(_0x307d47['isBlock'](_0x3475b4)&&!_0x307d47['isLimit'](_0x3475b4)&&(_0x3475b4['nextSibling']||_0x5554ea['isAtEnd']?_0x1cfad4&&_0x1cfad4['parent']==_0x3475b4||(_0x1cfad4=_0x3475b4,_0x3424e4(_0x2f3611['previousPosition']),_0x3a6159=!0x0):_0xc46e47=_0xc46e47||_0x2f3611['previousPosition']));}function _0x3424e4(_0x361352){const _0x206efe=_0x3f40e3['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x19260e}),_0x596721=_0x3f40e3['mapper']['toViewPosition'](_0x361352);_0x148c77['data']['isSuggestion']&&_0x3f40e3['writer']['addClass']('ck-suggestion-marker-'+_0x19260e+'-new',_0x206efe),_0x531b96['activeChange']==_0x148c77&&_0x3f40e3['writer']['addClass']('ck-suggestion-marker--active',_0x206efe),_0x3f40e3['writer']['insert'](_0x596721,_0x206efe),_0x3f40e3['mapper']['bindElementToMarker'](_0x206efe,_0x453617['markerName']);}_0xb23aa2||_0x3a6159||!_0xc46e47||_0x3424e4(_0xc46e47);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x360b43,_0x27bab2,_0x56c994)=>{const _0x1ad2f5=_0x56c994['mapper']['markerNameToElements'](_0x27bab2['markerName']);if(_0x1ad2f5){for(const _0x5a1017 of _0x1ad2f5)(_0x5a1017['hasClass']('ck-suggestion-marker-split')||_0x5a1017['hasClass']('ck-suggestion-marker-merge'))&&(_0x56c994['mapper']['unbindElementFromMarkerName'](_0x5a1017,_0x27bab2['markerName']),_0x56c994['writer']['remove'](_0x5a1017));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1ee4b9,_0x127c02,_0x4b76b0)=>{const _0x498286=_0x127c02['markerName']['split'](':')[0x1],_0x5b3dde=this['_getChangeFromId'](_0x498286);if(!_0x5b3dde)return null;const _0x1bfb33='add'==_0x5b3dde['type']?'split':'merge';if(_0x4b76b0['consumable']['test'](_0x127c02['markerRange'],_0x1ee4b9['name']))for(const _0x8a86fe of _0x127c02['markerRange']['getItems']()){if(!_0x8a86fe['is']('element','softBreak'))continue;const _0x883e36=_0x4b76b0['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1bfb33}),_0x32d0ca=_0x4b76b0['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x8a86fe));_0x5b3dde['data']['isSuggestion']&&_0x4b76b0['writer']['addClass']('ck-suggestion-marker-'+_0x1bfb33+'-new',_0x883e36),this['activeChange']==_0x5b3dde&&_0x4b76b0['writer']['addClass']('ck-suggestion-marker--active',_0x883e36),_0x4b76b0['writer']['insert'](_0x32d0ca,_0x883e36),_0x4b76b0['mapper']['bindElementToMarker'](_0x883e36,_0x127c02['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x34fbc7=>{for(const _0x24d5c1 of this['editor']['model']['document']['getRootNames']()){const _0x13c718=this['editor']['model']['document']['getRoot'](_0x24d5c1),_0x86faf2=this['editor']['editing']['view']['document']['getRoot'](_0x24d5c1);if(_0x86faf2){const _0x175b88=_0x13c718['getAttribute']('revisionHistoryAttachChange');if(_0x34fbc7['removeAttribute']('data-change-id',_0x86faf2),_0x34fbc7['removeClass']('ck-revision-history-root-add',_0x86faf2),_0x34fbc7['removeClass']('ck-revision-history-root-remove',_0x86faf2),_0x34fbc7['removeClass']('ck-revision-history-root--active',_0x86faf2),_0x175b88){const _0x42150e=this['_getChangeFromId'](_0x175b88);if(!_0x42150e)return null;_0x34fbc7['setAttribute']('data-change-id',_0x175b88,_0x86faf2),_0x34fbc7['addClass']('ck-revision-history-root-'+_0x42150e['type'],_0x86faf2),this['activeChange']==_0x42150e&&_0x34fbc7['addClass']('ck-revision-history-root--active',_0x86faf2);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xd04b20=>'revision-comment:'+_0xd04b20,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x58862e=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x58862e['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2cda57=>'revision-suggestion:'+_0x2cda57,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x21a32f=>({'name':'suggestion:'+_0x21a32f,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x369291=>{const _0x2cf9df=_0x369291['markerName']['split'](':')[0x1];return'insertion'!=_0x2cf9df&&'deletion'!=_0x2cf9df?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2cf9df]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x57597f,_0x1c9685,_0x188f2d)=>{const _0x441656=_0x188f2d['mapper']['markerNameToElements'](_0x1c9685['markerName']);if(_0x441656){for(const _0x5c6e88 of _0x441656)_0x5c6e88['is']('uiElement')&&(_0x188f2d['mapper']['unbindElementFromMarkerName'](_0x5c6e88,_0x1c9685['markerName']),_0x188f2d['writer']['remove'](_0x5c6e88));}},{'priority':'high'});}_getChangeFromId(_0x233797){return this['_changeIdToChange']['get'](_0x233797);}_getViewForChange(_0x3ce815){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x3ce815,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2b9808,_0xb7e5d2,_0x350752,_0x326883)=>{_0x326883&&this['_balloon']['remove'](_0x326883),_0x350752&&(this['_balloon']['add']({'view':_0x350752,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x412878=this['editor']['editing'],_0x1effef=this['_getChangeFromId'](_0x350752['changeId']);let _0x5c4102;if(_0x1effef['data']['isOnRoot']){const _0x424602=_0x412878['view']['getDomRoot'](_0x1effef['rootName']);_0x5c4102=Array['from'](_0x424602['getClientRects']());}else{const _0x1845a9=this['editor']['model']['markers']['get']('revision:'+_0x350752['changeId']);_0x5c4102=Array['from'](_0x412878['mapper']['markerNameToElements'](_0x1845a9['name']))['map'](_0x345362=>_0x412878['view']['domConverter']['mapViewToDom'](_0x345362))['map'](_0x3d5219=>Array['from'](_0x3d5219['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x5c4102['find'](_0x1ca3ee=>_0x1ca3ee['top']-0x3<=this['_activeViewTarget']['y']&&_0x1ca3ee['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1ca3ee['left']-0x3<=this['_activeViewTarget']['x']&&_0x1ca3ee['right']+0x3>=this['_activeViewTarget']['x'])||_0x5c4102[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x1c9b14,_0x2c41a0,_0x4ad3f1,_0x212b4a)=>{this['activeView']=_0x4ad3f1?this['_getViewForChange'](_0x4ad3f1):null,this['editor']['model']['change'](()=>{const _0x5740e7=this['editor']['editing'];_0x212b4a&&(_0x212b4a['data']['isOnRoot']?_0x5740e7['view']['change'](_0x4213c0=>{_0x4213c0['removeClass']('ck-revision-history-root--active',_0x5740e7['view']['document']['getRoot'](_0x212b4a['rootName']));}):_0x5740e7['reconvertMarker']('revision:'+_0x212b4a['id'])),_0x4ad3f1&&(_0x4ad3f1['data']['isOnRoot']?_0x5740e7['view']['change'](_0x30c8d0=>{_0x30c8d0['addClass']('ck-revision-history-root--active',_0x5740e7['view']['document']['getRoot'](_0x4ad3f1['rootName']));}):_0x5740e7['reconvertMarker']('revision:'+_0x4ad3f1['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x42c1d9,_0x28666d)=>{if(this['activeChange'])return;const _0x5db0c2=this['_findChangeIdFromDomTarget'](_0x28666d['target']),_0x514142=this['_changeIdToChange']['get'](_0x5db0c2);_0x514142?(this['_activeViewTarget']={'x':_0x28666d['domEvent']['x'],'y':_0x28666d['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x514142)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x1c1b85,_0x484150)=>{const _0x268959=this['_findChangeIdFromDomTarget'](_0x484150['target']),_0x4a86c3=this['_changeIdToChange']['get'](_0x268959);_0x4a86c3?(this['_activeViewTarget']={'x':_0x484150['domEvent']['x'],'y':_0x484150['domEvent']['y']},_0x4a86c3===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x4a86c3):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x1cbbf8){do{const _0xd838c2=_0x1cbbf8['getAttribute']('data-change-id');if(_0xd838c2)return _0xd838c2;_0x1cbbf8=_0x1cbbf8['parent'];}while(_0x1cbbf8);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x153aaf=>{for(const _0x17a7db of this['editor']['model']['markers'])_0x153aaf['removeMarker'](_0x17a7db);});}};function Ut(_0x4caf50){return _0x4caf50['split'](':')[0x1];}function Lt(_0x172b0b,_0x413d7a){return(_0x49b52,_0x239f1f,_0x1851b2)=>{if(!_0x1851b2['consumable']['test'](_0x239f1f['markerRange'],_0x49b52['name']))return;const _0x33c3e4=_0x239f1f['markerRange']['getWalker'](),_0x3ceced=_0x239f1f['markerRange']['start'],_0x3e7d9c=_0x172b0b['model']['schema'];let _0x379ed9=null,_0x3dbada=null,_0x214e78=!0x1,_0x39e79b=!0x1;for(const _0x3377ea of _0x33c3e4){const _0x3a75fd=_0x3377ea['item'];_0x214e78=_0x214e78||_0x3e7d9c['isContent'](_0x3a75fd);const _0x45a2be=_0x1851b2['mapper']['toViewElement'](_0x3a75fd);if(_0x45a2be&&_0x45a2be['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3377ea['type']&&(_0x3e7d9c['isBlock'](_0x3a75fd)&&!_0x3e7d9c['isLimit'](_0x3a75fd)&&(_0x3a75fd['nextSibling']||_0x3ceced['isAtEnd']?_0x379ed9&&_0x379ed9['parent']==_0x3a75fd||(_0x379ed9=_0x3a75fd,_0xa76b7e(_0x3377ea['previousPosition']),_0x39e79b=!0x0):_0x3dbada=_0x3dbada||_0x3377ea['previousPosition']));}function _0xa76b7e(_0x183fbb){const _0x2cf356=_0x1851b2['mapper']['toViewPosition'](_0x183fbb),_0x10914a=_0x1851b2['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x413d7a});_0x1851b2['writer']['insert'](_0x2cf356,_0x10914a),_0x1851b2['mapper']['bindElementToMarker'](_0x10914a,_0x239f1f['markerName']);}_0x214e78||_0x39e79b||!_0x3dbada||_0xa76b7e(_0x3dbada);};}var Ft=class extends _0x99685{constructor(_0xd9319e){super(_0xd9319e);const _0x1bab4e=_0xd9319e['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x1bab4e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1bab4e,'change:isEnabled',()=>this['refresh']());}execute(){const _0x2fa663=this['editor'],_0x36d918=_0x2fa663['plugins']['get'](Pt),_0x2bc867=_0x36d918['isReady']?_0x36d918['diff']['newRevisionId']:null;_0x2fa663['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2bc867);}['refresh'](){const {isReady:_0x21c43c,isEnabled:_0xe78275,repository:_0x3c1b8b,diff:_0x835af0}=this['editor']['plugins']['get'](Pt),_0x3f6015=_0x835af0&&_0x3c1b8b['getLaterVisibleRevision'](_0x835af0['newRevisionId']);this['isEnabled']=_0x21c43c&&_0xe78275&&Boolean(_0x3f6015);}},$t=class extends _0x99685{_step;constructor(_0x28f06a,{direction:_0x4e0c36}){super(_0x28f06a);const _0x3dab52=_0x28f06a['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x4e0c36?0x1:-0x1,this['listenTo'](_0x3dab52,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3dab52,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3dab52,'change:activeChange',()=>this['refresh']());}execute(){const _0x11c5a4=this['editor'],_0x32b76d=_0x11c5a4['plugins']['get'](Pt),{isNavigationMode:_0x50301a,currentChangeNumber:_0x2b81f9}=_0x32b76d;let _0x466074;if(_0x32b76d['activeChange']=_0x50301a?_0x32b76d['diff']['changes']['get'](_0x2b81f9+this['_step']):_0x32b76d['diff']['changes']['first'],_0x32b76d['activeChange']['data']['isOnRoot'])_0x466074=_0x11c5a4['editing']['view']['getDomRoot'](_0x32b76d['activeChange']['rootName']);else{const _0x26a674=_0x11c5a4['model']['markers']['get']('revision:'+_0x32b76d['activeChange']['id']);_0x466074=_0x56288d(_0x11c5a4['editing'],_0x26a674);}_0x175b99({'target':_0x466074,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x56a716,currentChangeNumber:_0x494e25,numberOfChanges:_0x1c437d,isReady:_0x2471e5,isEnabled:_0x4f56bb}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x4f56bb&&_0x2471e5&&_0x1c437d)&&(!_0x56a716||(0x1===this['_step']?_0x494e25<_0x1c437d-0x1:_0x494e25>0x0));}},Bt=class extends dt{constructor(_0x54fa4a){super(_0x54fa4a);const _0x54b2ee=this['bindTemplate'],_0x23b862=new _0x2bddaa(_0x54fa4a),_0x326e7e=new _0x2bddaa(_0x54fa4a);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',(_0x36df80,_0x43f914)=>_0x36df80&&_0x43f914>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2a1124,_0x1d7d59,_0x58e3f5,_0x250eeb)=>{if(!_0x2a1124)return kt(_0x54fa4a,'Loading...');if(!_0x58e3f5)return kt(_0x54fa4a,'No\x20changes');const _0x195627=kt(_0x54fa4a,'NUMBER_OF_CHANGES',_0x58e3f5);return _0x250eeb?kt(_0x54fa4a,'X_OF_Y_CHANGES',[_0x1d7d59+0x1,_0x58e3f5]):_0x195627;}),_0x23b862['set']({'label':kt(_0x54fa4a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x5704a5}),_0x326e7e['set']({'label':kt(_0x54fa4a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4a9e38}),_0x23b862['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x326e7e['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x23b862['on']('execute',()=>this['fire']('execute','backward')),_0x326e7e['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',_0x54b2ee['if']('_isStatusLabelVisible','ck-hidden',_0x2b2984=>!_0x2b2984)]},'children':[{'text':_0x54b2ee['to']('isNavigationMode',_0x31b034=>_0x31b034?kt(_0x54fa4a,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x54fa4a,'Total')+':\x20')}]},{'text':_0x54b2ee['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x23b862,_0x326e7e]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x425632{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x38b71e=this['editor']['editing']['view'];_0x38b71e['change'](_0x154a4e=>{for(const _0x3c25da of _0x38b71e['document']['roots'])_0x154a4e['addClass'](jt,_0x3c25da);});}['hide'](){const _0x1756c7=this['editor']['editing']['view'];_0x1756c7['change'](_0x1a5117=>{for(const _0x1b47e6 of _0x1756c7['document']['roots'])_0x1a5117['removeClass'](jt,_0x1b47e6);});}},Kt=class extends _0x425632{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x5d30ed=this['editor'],_0x118361=_0x5d30ed['plugins']['get'](Pt),_0x5a0d5d=_0x5d30ed['plugins']['get'](Gt);_0x5d30ed['ui']['componentFactory']['add']('exitToEditing',_0x681dca=>{const _0x1b1743=new _0x2bddaa(_0x681dca);return _0x1b1743['set']({'label':kt(_0x681dca,'Back\x20to\x20editing'),'icon':_0x3d7291,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1b1743,'execute',()=>{_0x5d30ed['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1b1743;}),_0x5d30ed['ui']['componentFactory']['add']('restoreRevision',_0x1b0a82=>{const _0x1f201f=new _0x2bddaa(_0x1b0a82);return _0x1f201f['set']({'label':kt(_0x1b0a82,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1f201f['bind']('isEnabled')['to'](_0x5d30ed['commands']['get']('restoreRevision')),this['listenTo'](_0x1f201f,'execute',()=>_0x5d30ed['execute']('restoreRevision')),_0x1f201f;}),_0x5d30ed['ui']['componentFactory']['add']('changesNavigation',_0x4e7b43=>{const _0x1374d5=new Bt(_0x4e7b43),_0x6f4796=_0x5d30ed['commands']['get']('showPreviousChange'),_0x405472=_0x5d30ed['commands']['get']('showNextChange');return _0x1374d5['bind']('isBackwardNavigationEnabled')['to'](_0x6f4796,'isEnabled'),_0x1374d5['bind']('isForwardNavigationEnabled')['to'](_0x405472,'isEnabled'),_0x1374d5['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x118361),this['listenTo'](_0x1374d5,'execute',(_0x11adea,_0x1f284b)=>{_0x5d30ed['execute']('forward'===_0x1f284b?'showNextChange':'showPreviousChange');}),_0x1374d5;}),_0x5a0d5d['show'](),_0x118361['on']('change:isReady',(_0x14247a,_0x50a1e9,_0x27f130)=>{_0x27f130?_0x5a0d5d['hide']():_0x5a0d5d['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x522e1b,_0x9a0c10){super(_0x522e1b,_0x9a0c10);const _0x138558=this['bindTemplate'];this['set']({'label':kt(_0x522e1b,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x522e1b,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x138558['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x52e81b(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x552142=this['fieldView']['element'];this['_tooltipString']=_0x552142['scrollWidth']>_0x552142['clientWidth']&&_0x552142['value']||'';}},Yt=class extends dt{constructor(_0x392558,_0x5751c0,_0x1eb0c7){super(_0x392558);const _0x5d5995=new _0xcee50d();_0x5d5995['set']({'content':_0x22dde7,'viewBox':'0\x200\x2011\x2010'});const _0x436ee0=['ck','ck-revision-history-sidebar__revision-author'];_0x1eb0c7&&_0x436ee0['push']('ck-revision-history-sidebar__revision-author_creator');const _0x33c68d=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x392558,_0x1eb0c7?'Revision\x20creator':'Revision\x20author')},'children':[_0x5d5995,_0x5751c0['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x436ee0},'children':_0x33c68d});}};function Jt(_0x3a5959,_0x6d3923){const _0x8a220b=_0x3a5959['bindTemplate'],_0x4f23aa=_0x3a5959['locale'],_0x19b8f4=vt(_0x4f23aa);_0x19b8f4['panelPosition']='sw';const _0x4e15b3=function(_0x4cfb79,_0x3a5a1e){const _0x2cf4c4=function(_0x2dac5b,_0x4a8f6d){const _0x58991b=_0x2dac5b['locale'],_0x3cc51f={'Compare\x20against\x20selected':kt(_0x58991b,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x58991b,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x58991b,'Restore\x20this\x20revision')};return _0x4a8f6d['map'](_0x3bbbb1=>{const _0x1f66ac=_0x3cc51f[_0x3bbbb1['name']];return _0x1f66ac&&_0x1f66ac!==_0x3bbbb1['name']&&(_0x3bbbb1['name']=_0x1f66ac),_0x3bbbb1;});}(_0x4cfb79,_0x3a5a1e),_0x31aec9=new _0x4a5c87();for(const _0x2c7d66 of _0x2cf4c4){const _0x56bfa5={'type':'button','model':new ut({'label':_0x2c7d66['name'],'class':_0x2c7d66['class'],'withText':!0x0,'role':'menuitem','_action':_0x2c7d66['action']})};_0x56bfa5['model']['bind']('isEnabled')['to'](_0x4cfb79,'isActionsDropdownOpen',_0x448ae6=>'function'!=typeof _0x2c7d66['isEnabled']||(!_0x448ae6||_0x2c7d66['isEnabled'](_0x4cfb79))),_0x31aec9['add'](_0x56bfa5);}return _0x31aec9;}(_0x3a5959,_0x6d3923);return _0x3a5959['bind']('isActionsDropdownOpen')['to'](_0x19b8f4,'isOpen'),_0x19b8f4['buttonView']['set']({'label':kt(_0x4f23aa,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x322985}),_0x19b8f4['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x8a220b['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x8a220b['to'](_0x1e73f1=>_0x1e73f1['stopPropagation']())}}),_0x19b8f4['on']('execute',_0x317f7d=>{_0x3a5959['isReady']&&'function'==typeof _0x317f7d['source']['_action']&&_0x317f7d['source']['_action'](_0x3a5959);}),ft(_0x19b8f4,_0x4e15b3,{'role':'menu'}),_0x19b8f4['listenTo'](_0x3a5959,'change:isActionsDropdownOpen',(_0x5ef381,_0x37a957,_0x1b626a)=>{if(_0x1b626a)for(const _0x13c57e of _0x19b8f4['listView']['items']){const _0x6a02df=_0x13c57e['children']['first'],_0x62b3d1=_0x6d3923['find'](_0xf13a4=>_0xf13a4['action']===_0x6a02df['_action'])['isVisible'];_0x13c57e['isVisible']=void 0x0===_0x62b3d1||_0x62b3d1(_0x3a5959);}}),_0x19b8f4;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0xdb0a5(dt);var Xt=class extends Wt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0xa8cf64,_0x59eb90,_0x31777c,_0x5b6311,_0x2f3e95=!0x1){super(_0xa8cf64);const _0x11ece3=this['bindTemplate'],_0x4c7434=function(_0x302b74,_0x4f1ce7){const _0x12dc19=Array['from'](_0x4f1ce7['authors'])['filter'](_0x4b2c87=>_0x4b2c87!=_0x4f1ce7['creator']);return _0x4f1ce7['creator']&&_0x12dc19['unshift'](_0x4f1ce7['creator']),_0x12dc19['map'](_0x9956e0=>new Yt(_0x302b74,_0x9956e0,_0x9956e0==_0x4f1ce7['creator']));}(_0xa8cf64,_0x59eb90);this['id']=_0x59eb90['id'],this['_revision']=_0x59eb90,this['_requireRevisionName']=_0x5b6311,this['bind']('_isAiGenerated')['to'](_0x59eb90,'attributes',_0x400f27=>!(!_0x400f27||!_0x400f27['@ai'])),this['bind']('name','createdAt')['to'](_0x59eb90),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x4f61c6=>{return _0x2ddeea=_0xa8cf64['uiLanguage'],(_0x3c9aac=_0x4f61c6)['toLocaleDateString'](_0x2ddeea,{'month':'long','day':'numeric'})+',\x20'+_0x3c9aac['toLocaleTimeString'](_0x2ddeea,{'hour':'numeric','minute':'numeric'});var _0x2ddeea,_0x3c9aac;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new qt(_0xa8cf64,gt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x289258=>_0x289258||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x39a3e8,_0x69ca90)=>_0x39a3e8&&_0x69ca90),this['revisionActionsView']=_0x31777c&&_0x31777c['length']?Jt(this,_0x31777c):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x2f3e95?this['_createAiPillView'](_0xa8cf64):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x11ece3['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x11ece3['if']('isEnabled','ck-disabled',_0x21c219=>!_0x21c219),_0x11ece3['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x11ece3['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x11ece3['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x11ece3['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x4c7434}]},..._0x2f3e95?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x11ece3['if']('_isAiGenerated','ck-hidden',_0x35e34e=>!_0x35e34e)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x11ece3['to'](_0x52e0f5=>{_0x52e0f5['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x1c951c){const _0x4cd3df=new _0x3cbf88(_0x1c951c);return _0x4cd3df['set']({'icon':_0x2ea1bc,'label':kt(_0x1c951c,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':kt(_0x1c951c,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0x4cd3df['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x4cd3df;}['render'](){super['render']();const _0x3f051f=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x3f051f,'change',()=>{this['_requireRevisionName']&&!_0x3f051f['value']||this['fire']('setName',{'id':this['id'],'name':_0x3f051f['value']}),_0x3f051f['value']||(_0x3f051f['value']=this['name']?this['name']:this['_createdAtFormatted']);});}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function Qt(_0x30e5a9,_0x239b0c){const _0x72f197=wt['fromJSDate'](_0x30e5a9)['setLocale'](_0x239b0c),_0x312ae4=wt['local'](),_0x4800ca=_0x312ae4['minus']({'days':0x1})['startOf']('day');let _0x231236,_0x56c20f;return _0x72f197['hasSame'](_0x312ae4,'day')?(_0x231236=_0x72f197['startOf']('day')['toJSDate'](),_0x56c20f=_0x72f197['toRelativeCalendar']()):_0x72f197['hasSame'](_0x4800ca,'day')?(_0x231236=_0x4800ca['toJSDate'](),_0x56c20f=_0x72f197['toRelativeCalendar']()):_0x72f197['hasSame'](_0x312ae4,'week')?(_0x231236=_0x72f197['startOf']('week')['toJSDate'](),_0x56c20f=_0x72f197['weekdayLong']||''):_0x72f197['hasSame'](_0x312ae4,'year')?(_0x231236=_0x72f197['startOf']('month')['toJSDate'](),_0x56c20f=_0x72f197['monthLong']||''):(_0x231236=_0x72f197['startOf']('year')['toJSDate'](),_0x56c20f=String(_0x72f197['year'])),{'startDate':_0x231236,'localizedPeriodName':_0x56c20f};}var zt=class extends dt{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x4c1838,_0x5e2bf6,_0x1cf29b,_0x7ebccc,_0x5356f3){super(_0x4c1838);const _0x424ab2=Qt(_0x5e2bf6,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5e2bf6,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x1cf29b,this['_requireRevisionName']=_0x7ebccc,this['_showAISource']=_0x5356f3,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':_0x424ab2}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1190d9){const _0xde1522=new Xt(this['locale'],_0x1190d9,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0xde1522);}['removeRevision'](_0x5157c2){const _0x7fb08c=this['revisionViews']['find'](_0x19c842=>_0x19c842['id']===_0x5157c2['id']);this['revisionViews']['remove'](_0x7fb08c);}},Zt=class extends dt{constructor(_0x12be33){super(_0x12be33);const _0x14b850=new _0xcee50d();_0x14b850['content']=_0x3ae085,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x14b850,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[kt(_0x12be33,'Revision\x20history')]}]});}},ti=class extends dt{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x1769f1,_0xb248a4,_0x5b0751,_0x5c552e,_0xe10988){super(_0x1769f1);const _0x3425d5=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0xb248a4,this['_revisionActions']=_0x5b0751,this['_requireRevisionName']=_0x5c552e,this['_showAISource']=_0xe10988,this['on']('select',(_0x53b89b,_0x3f35a4)=>{this['fire']('revisionSelected',_0x3f35a4);}),this['on']('setName',(_0x56fdb5,_0x3ebeb8)=>{this['fire']('revisionSetName',_0x3ebeb8);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Zt(_0x1769f1),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x3425d5['if']('isEnabled','ck-disabled',_0x2c6150=>!_0x2c6150)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x4ad512 of this['_revisions'])this['_addRevision'](_0x4ad512);this['_revisions']['on']('add',(_0x295d5f,_0x2762ee)=>{this['_addRevision'](_0x2762ee);}),this['_revisions']['on']('remove',(_0x57e653,_0x591812)=>{this['_removeRevision'](_0x591812);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x1d90cf=>_0x1d90cf['revisionViews']['map'](_0x1621ae=>_0x1621ae))['flat']();}selectRevision(_0x579247){for(const _0x51d0f9 of this['revisionViews'])_0x579247&&_0x579247['id']===_0x51d0f9['id']?_0x51d0f9['select']():_0x51d0f9['deselect']();}highlightRevisions(_0x113c4e){for(const _0xe87152 of this['revisionViews'])_0x113c4e['some'](({id:_0x3297c6})=>_0x3297c6===_0xe87152['id'])?_0xe87152['highlight']():_0xe87152['unhighlight']();}['_addRevision'](_0x443bbf){const _0x1343d0=Qt(_0x443bbf['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0xb330b8=this['_getTimePeriodViewByStartDate'](_0x1343d0);_0xb330b8||(_0xb330b8=new zt(this['locale'],_0x1343d0,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0xb330b8)),_0xb330b8['addRevision'](_0x443bbf);}['_removeRevision'](_0x736c7e){const _0x2a6f4b=Qt(_0x736c7e['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x2a6f4b)['removeRevision'](_0x736c7e);}_getTimePeriodViewByStartDate(_0x37dd05){return this['timePeriodViews']['find'](_0x129ce1=>_0x129ce1['startDate']['getTime']()===_0x37dd05['getTime']());}},ii=class RevisionsSidebar extends _0x425632{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(
|
|
30
|
-
_0x23962d(_0x4586a5);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5c5e40,_0xcc4915){super(_0xcc4915),this['sourceElement']=_0x5c5e40,this['model']['document']['createRoot']();const _0x326399=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x326399);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x4813ea,_0x316d73){const _0x4eaca1=new this(_0x4813ea,_0x316d73);return await _0x4eaca1['initPlugins'](),await _0x4eaca1['ui']['init'](_0x4813ea),await _0x4eaca1['data']['init'](_0x4eaca1['config']['get']('initialData')||''),_0x4eaca1['fire']('ready'),_0x4eaca1;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x149c71{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5bc37f){super(_0x5bc37f),this['result']='end',_0x5bc37f['editing']['view']['_overlayModeHint']='auto',_0x5bc37f['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x149c71{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0x55fa9f){if(super(_0x55fa9f),!this['editor']['config']['get']('revisionHistory'))throw new _0x2e30a8('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x208342=>this['_showRevisionViewer']({..._0x208342,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x481ff3=>this['_closeRevisionViewer'](_0x481ff3)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3c382f=>this['_restoreRevision'](_0x3c382f)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x3e0b8e){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3e0b8e;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x1e70dc){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1e70dc);}getRevision(_0x1c5bbe){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1c5bbe);}getRevisions(_0x4feab0){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x4feab0||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x4f5b85=this['editor'],_0xd44dac=_0x5cb3d0(_0x4f5b85,ai),_0x2cbf0e=_0x4f5b85['plugins']['get']('RevisionTracker'),_0x369f5f=_0x4f5b85['plugins']['get'](_0x1b7fe0)['users'];return _0xd44dac['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0xd44dac['lazyRoots'],(_0xd44dac['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x149c71{static get requires(){return[Pt,_0x1b7fe0];}init(){const _0x53bee9=this['editor']['plugins']['get'](_0x1b7fe0);for(const _0xe93fc6 of _0x369f5f)_0xe93fc6['isAnonymous']||_0x53bee9['getUser'](_0xe93fc6['id'])||_0x53bee9['addUser'](_0xe93fc6);const _0x48ab82=_0x2cbf0e['repository']['getRevisions']();let _0x567432=null;const _0x14138f=this['editor']['plugins']['get']('RevisionViewer');if(_0x14138f['adapter']=_0x2cbf0e['adapter'],_0x14138f['bind']('isEnabled')['to'](_0x2cbf0e),_0x4f5b85['plugins']['has']('CommentsRepository')){const _0x172070=_0x4f5b85['plugins']['get']('CommentsRepository');_0x14138f['_getVisibleCommentThreadIds']=()=>new Set(_0x172070['getCommentThreads']()['filter'](_0x13ff83=>!_0x13ff83['isResolved'])['map'](_0x5be4b6=>_0x5be4b6['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4f5b85,'isReadOnly',_0xa157a8=>!_0xa157a8);for(const _0x5a37c5 of _0x48ab82){const _0x314eba=null===_0x5a37c5['creator'];if(_0x314eba&&_0x5a37c5['toVersion']===_0x5a37c5['fromVersion'])continue;const _0x5383ec=_0x5a37c5['toJSON']();_0x14138f['addRevisionData'](_0x5383ec,(_0xf518f8,_0x509b04,_0x595600)=>{if(_0x314eba){if(_0x567432)_0x567432['_update'](_0xf518f8,_0x509b04);else{if(!_0x509b04){const _0x55492b=_0x595600['toJSON']();_0x55492b['id']=_0x164a82(),_0x2cbf0e['saveRevision'](_0x55492b,_0x595600['toVersion'])['then'](_0x2af74c=>{_0x567432=_0x2af74c;});}}}else _0x5a37c5['_update'](_0xf518f8,_0x509b04);});}}},ii),_0xd44dac);}['_enhanceShowRevisionViewerCallback'](){const _0x30a65f=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4efce0=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x4efce0['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x2c623e=this['editor']['plugins']['get']('Dialog');_0x2c623e['isOpen']&&_0x2c623e['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x57fdb4=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x39d5b7 of _0x57fdb4)_0x39d5b7['class']=_0x39d5b7['class']?_0x39d5b7['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x22bd99=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x22bd99&&_0x22bd99['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xb21269=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xb21269&&_0xb21269['setAttribute']('tabindex','-1');}}const _0xce7509=this['_getRevisionViewerEditorConfig']();return _0x30a65f(_0xce7509)['then'](_0x30492f=>(this['_viewerEditor']=_0x30492f,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'),_0x30492f))['catch'](_0x279dfd=>(console['error'](_0x279dfd),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x199f3d=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 _0x5632f0=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4a82e9 of _0x5632f0)_0x4a82e9['class']='ck-tab-panel_disabled'===_0x4a82e9['class']?'':_0x4a82e9['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x10ad86=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x10ad86&&_0x10ad86['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x196dee=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x196dee&&_0x196dee['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x199f3d(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2b388c=this['editor']['plugins']['get']('Annotations');_0x2b388c['refreshVisibility'](),_0x2b388c['refreshPositioning']();}});});}['_showRevisionViewer'](_0x511fe9){const _0x3a02b0=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1c4dc4=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x25293d=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x25293d,_0x511fe9)['then'](_0x1b92af=>(_0x1c4dc4['style']['display']='block',_0x3a02b0['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1b92af));}['_closeRevisionViewer'](_0x4eca93){const _0x40f210=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x40f210['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x4eca93['destroy']();}async _restoreRevision(_0x39df13){const _0x5c991b=this['editor'],_0x9846a5=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x4531b0=_0x5c991b['plugins']['get']('RevisionTracker'),_0x127b49=_0x5c991b['plugins']['get']('RevisionHistoryUtils'),_0x54f576=_0x9846a5['repository']['getRevision'](_0x39df13);let _0x3374e5,_0x569225,_0x247241;try{await _0x127b49['loadRevisionData'](_0x54f576,this['adapter']),_0x3374e5=_0x127b49['getRevisionDocumentData'](_0x54f576),_0x569225=_0x127b49['getRevisionRootsAttributes'](_0x54f576);}catch(_0x1762e3){return void console['error'](_0x1762e3);}_0x5c991b['model']['change'](_0xe0c5dd=>{for(const _0x39220e of Array['from'](_0x5c991b['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xe0c5dd['removeMarker'](_0x39220e);}),_0x9846a5['isReady']=!0x1,_0x5c991b['model']['enqueueChange'](_0x4fbd6d=>{_0x4fbd6d['setSelection'](null),_0x4fbd6d['removeSelectionAttribute'](_0x5c991b['model']['document']['selection']['getAttributeKeys']());const _0x4482a5=Object['keys'](_0x3374e5);for(const _0x2532d8 of _0x5c991b['model']['document']['roots'])'$graveyard'!=_0x2532d8['rootName']&&_0x2532d8['isAttached']()&&!_0x4482a5['includes'](_0x2532d8['rootName'])&&_0x4fbd6d['detachRoot'](_0x2532d8);for(const _0x2b02a2 of _0x4482a5){let _0x173030=_0x5c991b['model']['document']['getRoot'](_0x2b02a2);if(!_0x173030||!_0x173030['isAttached']()){const _0x41e700=_0x54f576['diffData']?.[_0x2b02a2]?.['rootElementName']||'$root';_0x173030=_0x4fbd6d['addRoot'](_0x2b02a2,_0x41e700);}const _0x1dec0a=_0x569225[_0x2b02a2],_0x1f3627=Object['keys'](_0x1dec0a),_0x50eb8e=_0x3374e5[_0x2b02a2];for(const _0x5a8eba of _0x173030['getAttributeKeys']())_0x1f3627['includes'](_0x5a8eba)||_0x4fbd6d['removeAttribute'](_0x5a8eba,_0x173030);for(const _0x233e7b of _0x1f3627)_0x4fbd6d['setAttribute'](_0x233e7b,_0x569225[_0x2b02a2][_0x233e7b],_0x173030);_0x4fbd6d['remove'](_0x4fbd6d['createRangeIn'](_0x173030)),_0x4fbd6d['insert'](_0x5c991b['data']['parse'](_0x50eb8e,_0x173030),_0x173030,0x0);}});const _0x4ed5cc=kt(_0x5c991b['locale'],'Restored');if(_0x54f576['name'])_0x247241=-0x1==_0x54f576['name']['indexOf'](_0x4ed5cc)?_0x4ed5cc+':\x20'+_0x54f576['name']:_0x54f576['name'];else _0x247241=_0x4ed5cc+':\x20'+(_0x54f576['createdAt']['toLocaleDateString'](_0x5c991b['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x54f576['createdAt']['toLocaleTimeString'](_0x5c991b['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x4531b0['saveRevision']({'name':_0x247241}),_0x9846a5['isReady']=!0x0,_0x5c991b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|
|
29
|
+
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(_0x548d99){super(_0x548d99),this['_revisionViewer']=_0x548d99['plugins']['get'](Pt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x462a0f=this['_revisionsRepository']['_revisions'],_0x453d05=this['_createRevisionActions'](),_0x1bd57d=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ti(this['editor']['locale'],_0x462a0f,_0x453d05,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',(_0x4b3260,_0x583ba9)=>{_0x583ba9['revisionViews']['on']('add',(_0x4e4589,_0x5e98ed)=>{_0x5e98ed['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)),_0x1bd57d['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x322111=this['_revisionsRepository']['getRevision'](0x0);if(_0x322111){const _0x35ac45=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x322111['id']);this['_revisionViewer']['compare'](_0x322111,_0x35ac45);}}_handleRevisionSelected(_0x4a9481,_0x39bfac){const _0x17b01d=this['_revisionsRepository']['getRevision'](_0x39bfac['id']),_0x3eeac6=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x17b01d['id']);this['_revisionViewer']['compare'](_0x17b01d,_0x3eeac6);}_handleRevisionSetName(_0x4c2206,_0x24688c){this['_revisionsRepository']['getRevision'](_0x24688c['id'])['setName'](_0x24688c['name']);}['_handleDiffChange'](_0xeb7504,_0x4112e7,_0x3e4776){const _0x5239d1=this['_revisionsRepository']['getRevisionsInDiff'](_0x3e4776);_0x5239d1['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x5239d1),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x5239d1[0x0]));}_createRevisionActions(){const _0x129ffc=this['editor'],_0x538a12=RevisionsSidebar['availableRevisionActions'],_0x5e8ebf=_0x129ffc['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x5e8ebf['length'])return _0x5e8ebf['map'](_0x1dc1a3=>{const _0x1a8608='string'==typeof _0x1dc1a3?Object['assign']({},_0x538a12[_0x1dc1a3]):_0x1dc1a3;return _0x1a8608['action']=_0x1a8608['action']['bind'](this,_0x129ffc),_0x1a8608['isVisible']&&(_0x1a8608['isVisible']=_0x1a8608['isVisible']['bind'](this,_0x129ffc)),_0x1a8608;});}};function ei(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x83ea31},_0x356099)=>{const _0x45f6a2=_0x83ea31['get'](Pt),_0x571594=_0x45f6a2['repository'];let _0x41452c=_0x45f6a2['diff']['newRevisionId'],_0x2afafc=_0x356099['id'];_0x571594['getIndex'](_0x41452c)>_0x571594['getIndex'](_0x2afafc)&&([_0x41452c,_0x2afafc]=[_0x2afafc,_0x41452c]),_0x45f6a2['compare'](_0x41452c,_0x2afafc);},'isVisible':({plugins:_0x715f2e},_0x193551)=>{const _0x2e34d5=_0x715f2e['get'](Pt);return!(_0x2e34d5['repository']['getRevisionsInDiff'](_0x2e34d5['diff'])['length']>0x2)&&!_0x193551['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x153f2f,{id:_0x1eca21})=>{_0x153f2f['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1eca21);},'isVisible':({plugins:_0x109ae4},_0x311134)=>!!_0x109ae4['get'](Pt)['repository']['getLaterVisibleRevision'](_0x311134['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x30535a},{id:_0x133b35,revisionNameView:_0x242832})=>{const _0x58382a=_0x30535a['get'](Pt),_0xd33eb3=_0x58382a['repository']['getEarlierVisibleRevision'](_0x133b35);_0x58382a['compare'](_0x133b35,_0xd33eb3),_0x242832['focus'](),_0x242832['fieldView']['select']();}}};}var si=class extends _0x5f5629{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x313bfc,_0x2ac86b){super(_0x313bfc),this['_view']=_0x2ac86b,this['_toolbarConfig']=mt(_0x313bfc['config']['get']('toolbar')),this['_elementReplacer']=new _0x57c629();}get element(){return this['view']['element'];}init(_0x430b98){const _0x5c2e91=this['editor'],_0x514f20=this['view'],_0x52b99f=_0x5c2e91['editing']['view'],_0xb5e04=_0x514f20['editable'];_0xb5e04['name']=_0x52b99f['document']['getRoot']()['rootName'],_0x514f20['render']();const _0x3b33fb=_0xb5e04['element'];this['setEditableElement'](_0xb5e04['name'],_0x3b33fb),_0x514f20['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x52b99f['attachDomRoot'](_0x3b33fb),this['_elementReplacer']['replace'](_0x430b98,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x28e002=this['view'],_0x15b1e0=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x15b1e0['detachDomRoot'](_0x28e002['editable']['name']),_0x28e002['destroy']();}_initToolbar(){const _0x3146e7=this['view'];_0x3146e7['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3146e7['stickyPanel']['limiterElement']=_0x3146e7['element'],_0x3146e7['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x41148c})=>_0x41148c),_0x3146e7['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3146e7['toolbar']);}},ni=class extends _0x1b76a7{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x44e296,_0x3203a4,_0x165ece={}){super(_0x44e296),this['stickyPanel']=new ht(_0x44e296),this['toolbar']=new lt(_0x44e296,{'shouldGroupWhenFull':_0x165ece['shouldToolbarGroupWhenFull']}),this['_editable']=new tt(_0x44e296,_0x3203a4);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const oi=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x559762(_0xda5396);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x3db8a9,_0x5c73ec){super(_0x5c73ec),this['sourceElement']=_0x3db8a9,this['model']['document']['createRoot']();const _0x21c6c0=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x21c6c0);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x7c383a,_0x4a0007){const _0xd0b760=new this(_0x7c383a,_0x4a0007);return await _0xd0b760['initPlugins'](),await _0xd0b760['ui']['init'](_0x7c383a),await _0xd0b760['data']['init'](_0xd0b760['config']['get']('initialData')||''),_0xd0b760['fire']('ready'),_0xd0b760;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x425632{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b98a1){super(_0x5b98a1),this['result']='end',_0x5b98a1['editing']['view']['_overlayModeHint']='auto',_0x5b98a1['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x425632{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0x2a94d4){if(super(_0x2a94d4),!this['editor']['config']['get']('revisionHistory'))throw new _0x2be8de('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x289aad=>this['_showRevisionViewer']({..._0x289aad,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0xcce92e=>this['_closeRevisionViewer'](_0xcce92e)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1d954c=>this['_restoreRevision'](_0x1d954c)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x21f508){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x21f508;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x295a59){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x295a59);}getRevision(_0x75ded6){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x75ded6);}getRevisions(_0x1f74a3){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1f74a3||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x2adc31=this['editor'],_0x5bc3f4=_0x463892(_0x2adc31,ai),_0x1e52f2=_0x2adc31['plugins']['get']('RevisionTracker'),_0xc3fc33=_0x2adc31['plugins']['get'](_0xacfea9)['users'];return _0x5bc3f4['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5bc3f4['lazyRoots'],(_0x5bc3f4['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x425632{static get requires(){return[Pt,_0xacfea9];}init(){const _0x2e0931=this['editor']['plugins']['get'](_0xacfea9);for(const _0x1fc6ea of _0xc3fc33)_0x1fc6ea['isAnonymous']||_0x2e0931['getUser'](_0x1fc6ea['id'])||_0x2e0931['addUser'](_0x1fc6ea);const _0xbe9847=_0x1e52f2['repository']['getRevisions']();let _0x596b9f=null;const _0x361a28=this['editor']['plugins']['get']('RevisionViewer');if(_0x361a28['adapter']=_0x1e52f2['adapter'],_0x361a28['bind']('isEnabled')['to'](_0x1e52f2),_0x2adc31['plugins']['has']('CommentsRepository')){const _0x1b76e7=_0x2adc31['plugins']['get']('CommentsRepository');_0x361a28['_getVisibleCommentThreadIds']=()=>new Set(_0x1b76e7['getCommentThreads']()['filter'](_0x4d6621=>!_0x4d6621['isResolved'])['map'](_0x2b5a5f=>_0x2b5a5f['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x2adc31,'isReadOnly',_0x2b3941=>!_0x2b3941);for(const _0x31553b of _0xbe9847){const _0x59f049=null===_0x31553b['creator'];if(_0x59f049&&_0x31553b['toVersion']===_0x31553b['fromVersion'])continue;const _0x5d80d1=_0x31553b['toJSON']();_0x361a28['addRevisionData'](_0x5d80d1,(_0x218f34,_0x507d68,_0x5c86d3)=>{if(_0x59f049){if(_0x596b9f)_0x596b9f['_update'](_0x218f34,_0x507d68);else{if(!_0x507d68){const _0x5c5847=_0x5c86d3['toJSON']();_0x5c5847['id']=_0x463db6(),_0x1e52f2['saveRevision'](_0x5c5847,_0x5c86d3['toVersion'])['then'](_0x2923da=>{_0x596b9f=_0x2923da;});}}}else _0x31553b['_update'](_0x218f34,_0x507d68);});}}},ii),_0x5bc3f4);}['_enhanceShowRevisionViewerCallback'](){const _0x29461f=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x569640=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x569640['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x66876a=this['editor']['plugins']['get']('Dialog');_0x66876a['isOpen']&&_0x66876a['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x3e6b6b=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x563ba6 of _0x3e6b6b)_0x563ba6['class']=_0x563ba6['class']?_0x563ba6['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0xe582c6=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0xe582c6&&_0xe582c6['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xa90a1a=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xa90a1a&&_0xa90a1a['setAttribute']('tabindex','-1');}}const _0x33daf6=this['_getRevisionViewerEditorConfig']();return _0x29461f(_0x33daf6)['then'](_0x42a313=>(this['_viewerEditor']=_0x42a313,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'),_0x42a313))['catch'](_0x2e37ca=>(console['error'](_0x2e37ca),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3774a1=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 _0x4d024a=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x56d137 of _0x4d024a)_0x56d137['class']='ck-tab-panel_disabled'===_0x56d137['class']?'':_0x56d137['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x1dbda5=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x1dbda5&&_0x1dbda5['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x37ebfd=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x37ebfd&&_0x37ebfd['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x3774a1(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x1d245f=this['editor']['plugins']['get']('Annotations');_0x1d245f['refreshVisibility'](),_0x1d245f['refreshPositioning']();}});});}['_showRevisionViewer'](_0x52aaca){const _0x4ca77a=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x269cd7=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4005b4=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x4005b4,_0x52aaca)['then'](_0x4face8=>(_0x269cd7['style']['display']='block',_0x4ca77a['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x4face8));}['_closeRevisionViewer'](_0x2d007d){const _0x52bb1e=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x52bb1e['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x2d007d['destroy']();}async _restoreRevision(_0x36ebd5){const _0x1e8402=this['editor'],_0x112f4b=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x5667c2=_0x1e8402['plugins']['get']('RevisionTracker'),_0x55bcad=_0x1e8402['plugins']['get']('RevisionHistoryUtils'),_0x3dca2d=_0x112f4b['repository']['getRevision'](_0x36ebd5);let _0x157277,_0x25025f,_0x26064a;try{await _0x55bcad['loadRevisionData'](_0x3dca2d,this['adapter']),_0x157277=_0x55bcad['getRevisionDocumentData'](_0x3dca2d),_0x25025f=_0x55bcad['getRevisionRootsAttributes'](_0x3dca2d);}catch(_0x53137b){return void console['error'](_0x53137b);}_0x1e8402['model']['change'](_0x5a23d=>{for(const _0x1f5a83 of Array['from'](_0x1e8402['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5a23d['removeMarker'](_0x1f5a83);}),_0x112f4b['isReady']=!0x1,_0x1e8402['model']['enqueueChange'](_0x371e5e=>{_0x371e5e['setSelection'](null),_0x371e5e['removeSelectionAttribute'](_0x1e8402['model']['document']['selection']['getAttributeKeys']());const _0x5b3302=Object['keys'](_0x157277);for(const _0x11e737 of _0x1e8402['model']['document']['roots'])'$graveyard'!=_0x11e737['rootName']&&_0x11e737['isAttached']()&&!_0x5b3302['includes'](_0x11e737['rootName'])&&_0x371e5e['detachRoot'](_0x11e737);for(const _0x3c071c of _0x5b3302){let _0x43f770=_0x1e8402['model']['document']['getRoot'](_0x3c071c);if(!_0x43f770||!_0x43f770['isAttached']()){const _0x3a620a=_0x3dca2d['diffData']?.[_0x3c071c]?.['rootElementName']||'$root';_0x43f770=_0x371e5e['addRoot'](_0x3c071c,_0x3a620a);}const _0x58c8b4=_0x25025f[_0x3c071c],_0xa767fd=Object['keys'](_0x58c8b4),_0x40d4f8=_0x157277[_0x3c071c];for(const _0x7c5416 of _0x43f770['getAttributeKeys']())_0xa767fd['includes'](_0x7c5416)||_0x371e5e['removeAttribute'](_0x7c5416,_0x43f770);for(const _0x256da1 of _0xa767fd)_0x371e5e['setAttribute'](_0x256da1,_0x25025f[_0x3c071c][_0x256da1],_0x43f770);_0x371e5e['remove'](_0x371e5e['createRangeIn'](_0x43f770)),_0x371e5e['insert'](_0x1e8402['data']['parse'](_0x40d4f8,_0x43f770),_0x43f770,0x0);}});const _0x333cc1=kt(_0x1e8402['locale'],'Restored');if(_0x3dca2d['name'])_0x26064a=-0x1==_0x3dca2d['name']['indexOf'](_0x333cc1)?_0x333cc1+':\x20'+_0x3dca2d['name']:_0x3dca2d['name'];else _0x26064a=_0x333cc1+':\x20'+(_0x3dca2d['createdAt']['toLocaleDateString'](_0x1e8402['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3dca2d['createdAt']['toLocaleTimeString'](_0x1e8402['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x5667c2['saveRevision']({'name':_0x26064a}),_0x112f4b['isReady']=!0x0,_0x1e8402['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|