@ckeditor/ckeditor5-revision-history 48.5.2 → 48.5.3
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
|
-
_0x426de8();var pt=class extends wt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x39ba6e){super(),this['id']=_0x39ba6e['id']||_0x494e52(),this['creator']=_0x39ba6e['creator']||null,this['authors']=_0x39ba6e['authors']||[],this['diffData']=_0x39ba6e['diffData']||null,this['toVersion']=_0x39ba6e['toVersion']||0x0,this['fromVersion']=_0x39ba6e['fromVersion']||0x0,this['set']('name',_0x39ba6e['name']||''),this['set']('createdAt',_0x39ba6e['createdAt']||new Date()),this['set']('attributes',_0x39ba6e['attributes']||{});}setName(_0x13c197){this['_update']({'name':_0x13c197});}setAttribute(_0x3023c3,_0x442542){const _0x1f72e9=_0x12b1ed(this['attributes']);_0x9c43d4(_0x1f72e9,_0x3023c3,_0x442542),this['_update']({'attributes':_0x1f72e9});}removeAttribute(_0x2c102b){const _0x2ba3a5=_0x12b1ed(this['attributes']);_0x51d2e8(_0x2ba3a5,_0x2c102b),this['_update']({'attributes':_0x2ba3a5});}_update(_0x482c3f,_0x4296d6=!0x1){let _0xf22deb=!0x1;const _0x2e5f84={'id':this['id']};for(const _0x25145f of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0xdec287=_0x482c3f[_0x25145f];void 0x0!==_0xdec287&&_0xdec287!==this[_0x25145f]&&(this[_0x25145f]=_0xdec287,_0x2e5f84[_0x25145f]=_0xdec287,_0xf22deb=!0x0);}_0xf22deb&&(_0x2e5f84['authors']&&(_0x2e5f84['authorsIds']=_0x2e5f84['authors']['map'](_0x443593=>_0x443593['id']),delete _0x2e5f84['authors']),this['fire']('_update',_0x2e5f84,_0x4296d6));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x59473d=>_0x59473d['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},yt=class extends _0x346362{['_revisions'];static get requires(){return[_0x232463];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x4e730e){super(_0x4e730e),this['_revisions']=new _0xbe92c9();}afterInit(){!async function(_0x322b63){const _0x8c17b='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x28eaa6=0xeb829,_0x33a95d=0x79650,_0x290f7d={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x2a520f(_0x303615){const _0x2cc1a8=new window['Promise'](_0x4639de=>{_0x303615['once']('ready',_0x4639de);}),_0x267a3c=window['Date']['now'](),_0x435d7f=_0x303615['config']['get']('licenseKey');async function _0x527897(){let _0x453322,_0x1e579c=null,_0x4eeb9b=null;try{return'GPL'==_0x435d7f?'NotAllowed':(_0x453322=_0x253ddd(),_0x453322?(_0x453322['usageEndpoint']&&(_0x4eeb9b=_0x4bdef7(_0x453322['usageEndpoint'],_0x453322['jti'])),await _0x4d5cf4()?_0x4dc4bc()?_0x2af680()?'Expired':_0x43ca6a()?('evaluation'==_0x453322['licenseType']&&(_0x1e579c=_0x5f3838('EvaluationLimit')),await _0x5a6059()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2af680(){const _0x582e71=['evaluation','trial']['includes'](_0x453322['licenseType'])?_0x267a3c/0x3e8:0xe10*_0x33a95d;return _0x453322['exp']<_0x582e71;}function _0x4dc4bc(){const _0x19a3ba=_0x453322['features'];if(!_0x19a3ba)return!0x1;if(_0x19a3ba['includes']('*'))return!0x0;if(_0x19a3ba['includes']('RH'))return!0x0;if(_0x19a3ba['includes']('RRH')){if(_0x16d315())return!0x0;if(_0x359038()||_0x7fa5f7())return!0x0;}return!0x1;}function _0x43ca6a(){const _0x5267da=_0x453322['licensedHosts'];if(!_0x5267da||0x0==_0x5267da['length'])return!0x0;const {hostname:_0x3712ad}=new URL(window['location']['href']);if(_0x5267da['includes'](_0x3712ad))return!0x0;const _0x786782=_0x3712ad['split']('.');return _0x5267da['filter'](_0x30d2b9=>_0x30d2b9['includes']('*'))['map'](_0x42f15a=>_0x42f15a['split']('.'))['filter'](_0x13f074=>_0x13f074['length']<=_0x786782['length'])['map'](_0x14123a=>Array(_0x786782['length']-_0x14123a['length'])['fill']('*'===_0x14123a[0x0]?'*':'')['concat'](_0x14123a))['some'](_0x5d1c86=>_0x786782['every']((_0x2c4125,_0x16a918)=>_0x5d1c86[_0x16a918]===_0x2c4125||'*'===_0x5d1c86[_0x16a918]));}function _0x5a6059(){return _0x1e579c&&_0x4eeb9b?new window['Promise']((_0x5884b5,_0x5f18f1)=>{_0x1e579c['then'](_0x5884b5,_0x5f18f1),_0x4eeb9b['then'](_0x3c5fe3=>{'Valid'!=_0x3c5fe3&&_0x5884b5(_0x3c5fe3);},_0x5f18f1);}):_0x1e579c||_0x4eeb9b||'Valid';}}function _0x4bdef7(_0x345dcf,_0x1c4afc){return new window['Promise'](_0x3f139c=>{if(_0x145049())return _0x3f139c('Valid');_0x562995(),_0x303615['decorate']('_sendUsageRequest');let _0x26bb5b=!0x1;const _0x211422=_0x494e52();function _0x25ac0c(_0x26916c){return!!_0x26916c&&('object'==typeof _0x26916c||'function'==typeof _0x26916c)&&'function'==typeof _0x26916c['then']&&'function'==typeof _0x26916c['catch'];}function _0x99e028(_0xa9acab){_0x2d86a2(_0xa9acab)['then'](_0x170258=>_0x170258&&'ok'==_0x170258['status']?_0x3bcaee(_0x1a1f28(_0x211422+_0x1c4afc))!=_0x170258['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x1666f7=>(_0x3ba392(),_0x1666f7),()=>{const _0x99d5bb=_0x2003a6();return null==_0x99d5bb?(_0x3ba392(),'Valid'):_0x267a3c-_0x99d5bb>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3f139c)['catch'](()=>{_0x3f139c('UsageLimit');});const _0x2fee08=0x36ee80;function _0x3ba392(){const _0x59e8e3='llct-'+_0x3bcaee(_0x1a1f28(_0x345dcf)),_0x33c467=_0x1f2612(_0x3bcaee(window['Math']['ceil'](_0x267a3c/_0x2fee08)));window['localStorage']['setItem'](_0x59e8e3,_0x33c467);}function _0x2003a6(){const _0x4ac0b5='llct-'+_0x3bcaee(_0x1a1f28(_0x345dcf)),_0x1bf9fb=window['localStorage']['getItem'](_0x4ac0b5);return _0x1bf9fb?window['parseInt'](_0x1f2612(_0x1bf9fb),0x10)*_0x2fee08:null;}function _0x2d86a2(_0x49f8b4){return new window['Promise']((_0x92c37a,_0xdb9487)=>{_0x49f8b4['then'](_0x92c37a,_0xdb9487),window['setTimeout'](_0xdb9487,0x1d4c0);});}}_0x303615['on']('_sendUsageRequest',(_0x4c0b88,_0x2d639d)=>{if(_0x2d639d[0x0]!=_0x345dcf)return _0x3f139c('UsageLimit');_0x2d639d[0x1]={..._0x2d639d[0x1],'requestId':_0x211422};},{'priority':'high'}),_0x303615['on']('_sendUsageRequest',_0x2a5d20=>{_0x25ac0c(_0x2a5d20['return'])&&(_0x26bb5b=!0x0,_0x99e028(_0x2a5d20['return']));},{'priority':'low'}),_0x2cc1a8['then'](()=>{_0x26bb5b||_0x3f139c('UsageLimit');});});function _0x145049(){return'auto'==_0x303615['editing']['view']['_overlayModeHint'];}function _0x562995(){_0x303615['editing']['view']['_overlayModeHint']='auto';}}function _0x5f3838(_0x3533df){const _0x1beeae=[new window['Promise'](_0x2c17ec=>setTimeout(_0x2c17ec,0x93ecc)),_0x2cc1a8['then'](()=>new window['Promise'](_0x17a8e7=>{const _0x10e79e=0x7,_0x34e63=_0x322b63['_revisions'];function _0x32253d(){_0x34e63['length']>=_0x10e79e&&_0x17a8e7();}_0x32253d(),_0x34e63['on']('add',_0x32253d);})),new window['Promise'](_0x549869=>{function _0x45a57f(){for(const _0x1f4cac in window)if(window['Number']['isNaN'](window['Number'](_0x1f4cac))&&window[_0x1f4cac]==_0x28eaa6)return _0x549869();'destroyed'!=_0x303615['state']&&window['setTimeout'](_0x45a57f,0x1388);}_0x4d3551('RevisionViewer')&&_0x45a57f();})];return window['Promise']['race'](_0x1beeae)['then'](()=>_0x3533df);}async function _0x396c16(){if(await _0x2cc1a8,_0x4d3551('RevisionViewer')){const _0x49bd86=_0x322b63['getRevision'](0x0),_0x2770f9=_0x322b63['getEarlierVisibleRevision'](_0x49bd86['id']),_0x5d9865=_0xa2ae6d('RevisionViewer');return await _0x5d9865['compare'](_0x49bd86['id'],_0x2770f9?_0x2770f9['id']:null,!0x0),_0x5d9865['unbind']('isEnabled'),_0x5d9865['isEnabled']=!0x1,_0x5d9865['compare']=_0x1b5474,void(_0x5d9865['_getDiff']=_0x1b5474);}if(_0x4d3551('RevisionTracker')){const _0x44eb80=_0xa2ae6d('RevisionTracker');_0x44eb80['unbind']('isEnabled'),_0x44eb80['isEnabled']=!0x1,_0x44eb80['update']=_0x1b5474,_0x44eb80['saveRevision']=_0x1b5474;}_0x303615['model']['change']=_0x1b5474,_0x303615['model']['enqueueChange']=_0x1b5474,_0x303615['enableReadOnlyMode']('model');}function _0x16d315(){return _0x4d3551('WebSocketGateway')&&'connected'==_0xa2ae6d('WebSocketGateway')['state'];}function _0x359038(){return _0x4d3551('RevisionViewerIntegration');}function _0x7fa5f7(){return _0x4d3551('TrackChangesDataGetter');}function _0x5b7e2a(_0x1e674f){const _0x3e0634=_0xa1c267();_0x303615[_0x3e0634]='revisionHistoryLicenseKey'+_0x1e674f,_0x1e674f['endsWith']('Limit')&&(window[_0xa1c267()]=_0x28eaa6),'Valid'!=_0x1e674f&&_0x396c16();}function _0xa1c267(){const _0x1d7fa6=window['String'](window['performance']['now']())['replace']('.','');let _0x18c7dd='N';for(let _0xca8753=0x0;_0xca8753<_0x1d7fa6['length'];_0xca8753+=0x2){let _0x4e1ba0=window['parseInt'](_0x1d7fa6['substring'](_0xca8753,_0xca8753+0x2));_0x4e1ba0>=0x3e&&(_0x4e1ba0-=0x3e),_0x18c7dd+=_0x8c17b[_0x4e1ba0];}return _0x18c7dd;}function _0x253ddd(){const _0x167b6f=_0x435d7f['split']('.');if(0x3!=_0x167b6f['length'])return null;return _0xdd663e(_0x167b6f[0x1]);function _0xdd663e(_0x3e7dc7){const _0x1824d7=_0xd8946d(_0x3e7dc7);return _0x1824d7&&_0x3ef875()?_0x1824d7:null;function _0x3ef875(){const _0x329b2e=_0x1824d7['jti'],_0x1bd715=window['parseInt'](_0x329b2e['substring'](_0x329b2e['length']-0x8),0x10),_0xc27d7a={..._0x1824d7,'jti':_0x329b2e['substring'](0x0,_0x329b2e['length']-0x8)};return delete _0xc27d7a['vc'],_0x1a1f28(_0xc27d7a)==_0x1bd715;}}}async function _0x4d5cf4(){let _0x4a6b6d=!0x0;try{const [_0x423c2b,_0x511054,_0x2a0995]=_0x435d7f['split']('.');return _0x5444f0(_0x423c2b),await _0x15c41d(_0x423c2b,_0x511054,_0x2a0995),_0x4a6b6d;}catch{return!0x1;}function _0x5444f0(_0x16c295){const _0x1dc9c1=_0xd8946d(_0x16c295);_0x1dc9c1&&'ES256'==_0x1dc9c1['alg']||(_0x4a6b6d=!0x1);}async function _0x15c41d(_0x352c96,_0x46d1ee,_0x3201d4){const _0x4a98e4=window['Uint8Array']['from'](_0x35e114(_0x3201d4),_0x2d6809=>_0x2d6809['charCodeAt'](0x0)),_0x13bc94=new window['TextEncoder']()['encode'](_0x352c96+'.'+_0x46d1ee),_0x2744b9=window['crypto']['subtle'];if(!_0x2744b9)return;const _0x389f51=await _0x2744b9['importKey']('jwk',_0x290f7d,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2744b9['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x389f51,_0x4a98e4,_0x13bc94)||(_0x4a6b6d=!0x1);}}function _0xd8946d(_0x35c613){return _0x35c613['startsWith']('ey')?JSON['parse'](_0x35e114(_0x35c613)):null;}function _0x35e114(_0x24d081){return window['atob'](_0x24d081['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1a1f28(_0x23cf77){let _0x1c9a39=0x1505;function _0x136eea(_0x1e8069){for(let _0x323ada=0x0;_0x323ada<_0x1e8069['length'];_0x323ada++){const _0x476ea9=_0x1e8069['charCodeAt'](_0x323ada);_0x1c9a39=(_0x1c9a39<<0x5)+_0x1c9a39+_0x476ea9,_0x1c9a39&=_0x1c9a39;}}function _0x4605a3(_0x8c41d8){Array['isArray'](_0x8c41d8)?_0x8c41d8['forEach'](_0x4605a3):_0x8c41d8&&'object'==typeof _0x8c41d8?Object['entries'](_0x8c41d8)['sort']()['forEach'](([_0x2cbea7,_0x3771a0])=>{_0x136eea(_0x2cbea7),_0x4605a3(_0x3771a0);}):_0x136eea(window['String'](_0x8c41d8));}return _0x4605a3(_0x23cf77),_0x1c9a39>>>0x0;}function _0x3bcaee(_0x450689){return _0x450689['toString'](0x10)['padStart'](0x8,'0');}function _0x1f2612(_0xf69b30){return _0xf69b30['split']('')['reverse']()['join']('');}function _0x4d3551(_0x3ac85e){return _0x303615['plugins']['has'](_0x3ac85e);}function _0xa2ae6d(_0x5ce2d3){return _0x303615['plugins']['get'](_0x5ce2d3);}function _0x1b5474(){}_0x5b7e2a(await _0x527897());}_0x2a520f(_0x322b63['editor']);}(this);}createRevision(_0x35aa58){const _0x69eabe=this['editor']['plugins']['get']('Users');return new pt({'id':_0x35aa58['id'],'name':_0x35aa58['name'],'creator':_0x35aa58['creatorId']?_0x69eabe['getUser'](_0x35aa58['creatorId']):null,'diffData':_0x35aa58['diffData']||_0x35aa58['data'],'authors':_0x35aa58['authorsIds']['map'](_0x33f8f3=>_0x69eabe['getUser'](_0x33f8f3)),'createdAt':new Date(_0x35aa58['createdAt']),'attributes':_0x35aa58['attributes'],'fromVersion':_0x35aa58['fromVersion'],'toVersion':_0x35aa58['toVersion']});}['addRevision'](_0x3ea6d3,_0x5a9777=0x0){this['_revisions']['add'](_0x3ea6d3,_0x5a9777);}getRevision(_0x404a56){return this['_revisions']['get'](_0x404a56);}getRevisions(_0x3f713e={'toJSON':!0x1}){const _0x76fc2f=Array['from'](this['_revisions']);return _0x76fc2f['reverse'](),_0x3f713e['toJSON']?_0x76fc2f['map'](_0x152242=>_0x152242['toJSON']()):_0x76fc2f;}getIndex(_0xbea988){return this['_revisions']['getIndex'](_0xbea988);}getEarlierVisibleRevision(_0x5ad7ec){const [,_0x711157]=this['getRevisionsIterator'](_0x5ad7ec,{'direction':'earlier'});return _0x711157;}getLaterVisibleRevision(_0x27f2ef){const [,_0x47e07b]=this['getRevisionsIterator'](_0x27f2ef,{'direction':'later'});return _0x47e07b;}getRevisionsInDiff(_0xfe8522){const _0x20daea=[];for(const _0x595886 of this['getRevisionsIterator'](_0xfe8522['newRevisionId']))if(_0x20daea['push'](_0x595886),_0x595886['id']===_0xfe8522['oldRevisionId'])break;return _0x20daea;}*getRevisionsIterator(_0x3e10cc,{direction:_0x51fb8e='earlier',filter:_0x4e9d6d=()=>!0x0}={}){const _0xda547e='earlier'===_0x51fb8e?0x1:-0x1;let _0x3b470c=this['_revisions']['get'](_0x3e10cc),_0x38ef8a=this['getIndex'](_0x3b470c);for(yield _0x3b470c;_0x3b470c;){if(_0x38ef8a+=_0xda547e,_0x3b470c=this['getRevision'](_0x38ef8a),!_0x3b470c)return;_0x4e9d6d(_0x3b470c)&&(yield _0x3b470c);}}},bt=class extends _0x346362{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3a111f,'c'],[_0x4b60f9,'a'],[_0x57be54,'e'],[_0x3f0bdc,'r'],[_0x2c7b58,'u']]);_typeCharToViewClass=new Map([['c',_0x3a111f],['a',_0x4b60f9],['e',_0x57be54],['r',_0x3f0bdc],['u',_0x2c7b58]]);async loadRevisionData(_0x461190,_0xfbd94c){if(_0x461190['diffData']||!_0xfbd94c)return;const _0x5e083f=this['editor']['config']['get']('collaboration.channelId');_0x461190['diffData']=(await _0xfbd94c['getRevision']({'channelId':_0x5e083f,'revisionId':_0x461190['id']}))['diffData'];}getRevisionDocumentData(_0x516bb7){const _0x46ad71={};for(const _0x422b70 in _0x516bb7['diffData']){if(_0x516bb7['diffData'][_0x422b70]['attachChange']&&!_0x516bb7['diffData'][_0x422b70]['attachChange']['isAttached'])continue;const _0x47619d=this['_removeRevisionMarkers'](JSON['parse'](_0x516bb7['diffData'][_0x422b70]['insertions'])),_0x4fbc24=this['editor']['editing']['view']['document'],_0x30b8b9=new _0x3fc909(_0x4fbc24,_0x47619d['map'](_0x1e617d=>this['_getViewFromDiffObj'](_0x1e617d,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x46ad71[_0x422b70]=this['editor']['data']['processor']['toData'](_0x30b8b9),this['editor']['data']['processor']['useFillerType']('default');}return _0x46ad71;}getRevisionRootsAttributes(_0x16544b){const _0x5d4dd7={};for(const _0x324719 in _0x16544b['diffData'])_0x16544b['diffData'][_0x324719]['attachChange']&&!_0x16544b['diffData'][_0x324719]['attachChange']['isAttached']||(_0x5d4dd7[_0x324719]=_0x16544b['diffData'][_0x324719]['attributesAfter']||{});return _0x5d4dd7;}getRevisionRootsModelElements(_0x2d98ef){const _0x59d848={};for(const _0x349c37 in _0x2d98ef['diffData']){if(_0x2d98ef['diffData'][_0x349c37]['attachChange']&&!_0x2d98ef['diffData'][_0x349c37]['attachChange']['isAttached'])continue;const _0x5a7908=_0x2d98ef['diffData'][_0x349c37]['rootElementName'];_0x5a7908&&(_0x59d848[_0x349c37]=_0x5a7908);}return _0x59d848;}_getTypeCharForViewElement(_0x2d59fe){return this['_viewClassToTypeChar']['get'](_0x2d59fe['constructor']);}_getViewFromDiffObj(_0x1be3e2,_0x5e0919){const _0x497b52=this['editor']['editing']['view']['document'];if('string'==typeof _0x1be3e2)return new _0x1c5ffb(_0x497b52,_0x1be3e2);{let _0x3f06f1,_0x5dd7e5;_0x5dd7e5='u'==_0x1be3e2['type']||'r'==_0x1be3e2['type']?[]:_0x1be3e2['children']['map'](_0x4bb271=>this['_getViewFromDiffObj'](_0x4bb271,_0x5e0919));const _0x47397a=this['_typeCharToViewClass']['get'](_0x1be3e2['type'])||_0x1ce10b,_0xcda852=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x3f06f1=new _0x47397a(_0x497b52,_0x1be3e2['name'],_0x1be3e2['attributes'],_0x5dd7e5),'u'==_0x1be3e2['type']&&_0x1be3e2['children'][0x0]){const _0x19abda=_0x1be3e2['children'][0x0];if(_0x3f06f1['render']=function(_0x339b3f){const _0x45104c=_0x339b3f['createElement']('div');return _0x45104c['innerHTML']=_0x19abda,_0x45104c['childNodes'][0x0];},_0x5e0919){const _0x7e35ce=new _0x3fc909(_0x497b52);_0x7e35ce['_appendChild'](_0x3f06f1);const _0x3da5a8=Array['from'](_0xcda852['viewChildrenToDom'](_0x7e35ce,{'bind':!0x1})),_0x130886=_0xcda852['domDocument']['createElement']('div');_0x130886['append'](..._0x3da5a8),_0x3f06f1=Array['from'](_0xcda852['domChildrenToView'](_0x130886))[0x0];}}else{if('r'==_0x1be3e2['type']&&_0x1be3e2['children'][0x0]){const _0x537237=_0x1be3e2['children'][0x0];if(_0x3f06f1['render']=function(_0x1748f3){_0x1748f3['innerHTML']=_0x537237;},_0x5e0919){const _0x1d4517=new _0x3fc909(_0x497b52);_0x1d4517['_appendChild'](_0x3f06f1);const _0x58eba9=Array['from'](_0xcda852['viewChildrenToDom'](_0x1d4517,{'bind':!0x1})),_0x3f87bb=_0xcda852['domDocument']['createElement']('div');_0x3f87bb['append'](..._0x58eba9);const _0x739263=Array['from'](_0xcda852['domChildrenToView'](_0x3f87bb));_0x739263['length']>0x1?_0x3f06f1['_appendChild'](_0x739263):_0x3f06f1=_0x739263[0x0];}}}if(_0x1be3e2['customProperties']){for(const [_0x495a2b,_0x5bb25c]of _0x1be3e2['customProperties'])_0x3f06f1['_setCustomProperty'](_0x495a2b,_0x5bb25c);}const _0x3d2629=void 0x0===_0x1be3e2['fillerOffset']?null:_0x1be3e2['fillerOffset'];return null!==_0x3d2629&&(_0x3f06f1['getFillerOffset']=()=>_0x3d2629),_0x3f06f1;}}_makeModelFromViewString(_0x38d64c,_0x1c2c9d){const _0x40556f=JSON['parse'](_0x38d64c),_0x9e9c0b=this['editor']['editing']['view']['document'],_0x49dd22=new _0x3fc909(_0x9e9c0b,_0x40556f['map'](_0x2af650=>this['_getViewFromDiffObj'](_0x2af650,!0x0))),_0x285c79=this['editor']['data']['toModel'](_0x49dd22,_0x1c2c9d);return _0x285c79['name']=_0x1c2c9d,_0x285c79;}['_removeRevisionMarkers'](_0x2fee58){return(_0x2fee58=_0x2fee58['filter'](_0x5012b7=>!_0x5012b7['name']||'revision-start'!==_0x5012b7['name']&&'revision-end'!==_0x5012b7['name']))['forEach'](_0x254bc0=>{'string'!=typeof _0x254bc0&&(_0x254bc0['children']=this['_removeRevisionMarkers'](_0x254bc0['children']),_0x254bc0['attributes']=_0x254bc0['attributes']['filter'](_0x5f5016=>!_0x5f5016[0x0]['startsWith']('data-revision-')));}),_0x2fee58;}};function Rt(_0x224bfa,_0x4a7401,_0x2bdedc){const t=_0x224bfa['t'];switch(_0x4a7401){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'},_0x2bdedc);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x2bdedc);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'},_0x2bdedc);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x2bdedc);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x2bdedc);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var kt=class extends _0x346362{['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[_0x232463,yt,bt,_0x3bd429];}constructor(_0x234340){super(_0x234340),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new At(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x5db393=_0x494e52();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x5db393},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 _0x5112a6=this['repository']['getRevision'](0x0),_0xe46e80=_0x5112a6&&null===_0x5112a6['creator']?_0x5112a6:null;if(this['_continueCurrentRevision']=!!_0xe46e80&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4335dd=this['_source']['getCurrentRevisionId'](),_0x1306c2=this['repository']['getRevision'](_0x4335dd);if(_0x1306c2)this['_startingVersion']=_0x1306c2['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x346220=this['_source']['history']['_operations']['find'](_0x4ca7c1=>!_0x4ca7c1['_isInit']),_0x20b9a2=_0x346220?_0x346220['baseVersion']:this['_source']['history']['version'];_0x5112a6?(_0x5112a6['toVersion']<_0x20b9a2&&_0x5112a6['_update']({'toVersion':_0x20b9a2}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xe46e80['id'],this['_startingVersion']=_0xe46e80['fromVersion']):(this['_startingVersion']=_0x5112a6['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x20b9a2,this['_continueCurrentRevision']=!0x1);}}else _0xe46e80&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xe46e80['toVersion'],this['editor']['model']['document']['history']['version']),_0xe46e80['fromVersion']===_0xe46e80['toVersion']?(0x0!==_0xe46e80['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xe46e80['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xe46e80['id'],this['_startingVersion']=_0xe46e80['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',_0x163805=>!_0x163805),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x217768=[this['editor']];for(const _0x528289 of _0x217768){let _0x1674d2;for(const _0x49e743 in _0x528289){const _0x59dce9=_0x49e743,_0x39ff05=_0x528289[_0x59dce9];if('revisionHistoryLicenseKeyValid'==_0x39ff05||'revisionHistoryLicenseKeyInvalid'==_0x39ff05||'revisionHistoryLicenseKeyExpired'==_0x39ff05||'revisionHistoryLicenseKeyDomainLimit'==_0x39ff05||'revisionHistoryLicenseKeyNotAllowed'==_0x39ff05||'revisionHistoryLicenseKeyEvaluationLimit'==_0x39ff05||'revisionHistoryLicenseKeyUsageLimit'==_0x39ff05){delete _0x528289[_0x59dce9],_0x1674d2=_0x39ff05,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x1674d2&&_0x528289['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x1674d2&&_0x528289['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x1674d2&&_0x528289['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x1674d2&&_0x528289['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x1674d2&&_0x528289['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x1674d2&&_0x528289['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x21ce40=this['repository']['getRevision'](0x0),_0x2ccb10=await this['getRevisionDocumentData'](_0x21ce40),_0x3f4434=await this['getRevisionRootsAttributes'](_0x21ce40),_0x319daf=this['_utils']['getRevisionRootsModelElements'](_0x21ce40);this['_replaceEditorDataWithRevisionData'](_0x2ccb10,_0x3f4434,_0x319daf);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x303cb4){this['_source']=_0x303cb4;}async update(){const _0x78374f=await this['_source']['getLatestVersion']();if(_0x78374f>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1e77c8=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x78374f});_0x1e77c8['authors']=_0x1e77c8['authorsIds']['map'](_0x136450=>this['editor']['plugins']['get']('Users')['getUser'](_0x136450)),this['currentRevision']['_update'](_0x1e77c8);}}async['saveRevision'](_0x3bb275={},_0x1bad89=null){const _0x1f0516=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x1bad89>this['currentRevision']['toVersion']&&(_0x1bad89=null),null===_0x1bad89&&(_0x1bad89=await this['_source']['getLatestVersion']());const _0x2479e3=this['_getFromVersion'](_0x1bad89),_0x3daabe=this['buildRevisionData']({'from':_0x2479e3,'to':_0x1bad89});if(this['currentRevision']['toVersion']<_0x1bad89){const _0x36ff56=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x1bad89,'to':_0x1bad89});_0x36ff56['authors']=[],_0x36ff56['authorsIds']=[],_0x36ff56['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x36ff56,!0x0),delete _0x36ff56['authors'],_0x1f0516['push'](_0x36ff56);}const _0x163c69={..._0x3bb275,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x3bb275['name']||null,'id':_0x3bb275['id']||_0x494e52(),..._0x3daabe,'attributes':{..._0x3bb275['attributes'],..._0x3daabe['attributes']}},_0x457c7a=this['addRevisionData'](_0x163c69);_0x1f0516['push'](_0x163c69);const _0x5a9d46=this['repository']['getIndex'](_0x457c7a);if(0x0!==_0x5a9d46){const _0xb39bf1=this['repository']['getRevision'](_0x5a9d46-0x1);if(_0xb39bf1['fromVersion']!==_0x1bad89){const _0x15ecc5=this['_revisionDataBuilder']['getData'](_0x1bad89,_0xb39bf1['toVersion']),_0x48bbac={'id':_0xb39bf1['id'],'diffData':_0x15ecc5['diffData'],'authorsIds':_0x15ecc5['authorsIds'],'authors':_0x15ecc5['authorsIds']['map'](_0xd770b2=>this['editor']['plugins']['get']('Users')['getUser'](_0xd770b2)),'fromVersion':_0x1bad89};this['_stampAiAttribute'](_0x48bbac,_0xb39bf1,!!_0x15ecc5['hasAIChanges']),_0xb39bf1===this['currentRevision']&&(_0x48bbac['createdAt']=new Date(_0x163c69['createdAt']['getTime']()+0xa)),_0xb39bf1['_update'](_0x48bbac,!0x0),delete _0x48bbac['authors'],_0x1f0516['push'](_0x48bbac);}}if(this['adapter']){for(const _0x3cab9e of _0x1f0516)this['_bufferUpdate'](_0x3cab9e['id'],_0x3cab9e,!0x0);this['sendBufferedUpdates']();}return _0x457c7a;}addRevisionData(_0x30f9b0){const _0x5705bd=this['repository']['createRevision'](_0x30f9b0);return this['adapter']&&_0x5705bd['on']('_update',(_0xd5dd47,_0x3228fa,_0x33833d)=>{_0x33833d||(this['_bufferUpdate'](_0x3228fa['id'],_0x3228fa,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5705bd,this['_findInsertionIndex'](_0x5705bd)),_0x5705bd;}async getRevisionDocumentData(_0x5686b3){return await this['_utils']['loadRevisionData'](_0x5686b3,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5686b3);}async getRevisionRootsAttributes(_0x2b5244){return await this['_utils']['loadRevisionData'](_0x2b5244,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2b5244);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x13ed3d=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x298a6b=0x0;_0x298a6b<_0x13ed3d['length'];_0x298a6b++){const _0x5b685b=_0x13ed3d[_0x298a6b];let _0x3deff6=!0x1;for(const _0x30d726 of Object['keys'](_0x5b685b))void 0x0===_0x5b685b[_0x30d726]?delete _0x5b685b[_0x30d726]:'id'!==_0x30d726&&(_0x3deff6=!0x0);_0x3deff6||(_0x13ed3d[_0x298a6b]=null);}if(_0x13ed3d=_0x13ed3d['filter'](_0x78ccbf=>null!==_0x78ccbf),!_0x13ed3d['length'])return;for(let _0x4532ab=0x0;_0x4532ab<_0x13ed3d['length'];_0x4532ab++){const _0x47e0ad=_0x13ed3d[_0x4532ab];void 0x0!==_0x47e0ad['fromVersion']&&void 0x0===_0x47e0ad['toVersion']&&(_0x47e0ad['toVersion']=this['repository']['getRevision'](_0x47e0ad['id'])['toVersion']),void 0x0!==_0x47e0ad['toVersion']&&void 0x0===_0x47e0ad['fromVersion']&&(_0x47e0ad['fromVersion']=this['repository']['getRevision'](_0x47e0ad['id'])['fromVersion']);}const _0x34fc2e=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x13ed3d,_0x34fc2e)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4d673f=>{if(_0x4d673f){for(const _0xb96dd7 of _0x4d673f)this['setRevisionData']({'id':_0xb96dd7['id'],'createdAt':_0xb96dd7['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0xb9b43c,_0x25364f,_0x21bccd){if(_0x21bccd===(!!_0x25364f&&!!_0x25364f['attributes']['@ai']))return;const _0x33067d={..._0x25364f?_0x25364f['attributes']:{},..._0xb9b43c['attributes']};_0x21bccd?_0x33067d['@ai']=!0x0:delete _0x33067d['@ai'],_0xb9b43c['attributes']=_0x33067d;}buildRevisionData({revision:_0x20fff6=null,from:_0x55fae7=null,to:_0x3565c0=null}){_0x55fae7=null!==_0x55fae7?_0x55fae7:_0x20fff6['fromVersion'],_0x3565c0=null!==_0x3565c0?_0x3565c0:_0x20fff6['toVersion'];const _0x1ca767=this['_revisionDataBuilder']['getData'](_0x55fae7,_0x3565c0),_0x2e0325={'diffData':_0x1ca767['diffData'],'authorsIds':_0x1ca767['authorsIds'],'fromVersion':_0x55fae7,'toVersion':_0x3565c0};if(this['_stampAiAttribute'](_0x2e0325,_0x20fff6,!!_0x1ca767['hasAIChanges']),!_0x20fff6||_0x3565c0!==_0x20fff6['toVersion']){const _0x47283b=_0x3565c0-0x1,_0x1c5522=this['_source']['history']['getOperation'](_0x47283b);_0x2e0325['createdAt']=_0x1c5522&&_0x1c5522['createdAt']||new Date();}if(this['_loadedStateData']&&_0x55fae7===this['_loadedStateData']['fromVersion']){for(const _0x228281 of this['_loadedStateData']['authors'])_0x2e0325['authorsIds']['includes'](_0x228281['id'])||_0x2e0325['authorsIds']['push'](_0x228281['id']);}return _0x2e0325;}_bufferUpdate(_0x137ed3,_0x549a4c,_0xab8059){if(this['_bufferedUpdates']['has'](_0x137ed3)){const _0x4889c8=this['_bufferedUpdates']['get'](_0x137ed3);_0x549a4c=_0xab8059?{..._0x4889c8,..._0x549a4c}:{..._0x549a4c,..._0x4889c8};}this['_bufferedUpdates']['set'](_0x137ed3,_0x549a4c);}setRevisionData(_0x51c2d5){const _0x5a77c9=this['repository']['getRevision'](_0x51c2d5['id']);if(_0x51c2d5['createdAt']&&(_0x51c2d5['createdAt']=new Date(_0x51c2d5['createdAt'])),_0x51c2d5['authorsIds']){const _0x51112c=this['editor']['plugins']['get']('Users');_0x51c2d5['authors']=_0x51c2d5['authorsIds']['map'](_0x24abea=>_0x51112c['getUser'](_0x24abea));}_0x5a77c9['_update'](_0x51c2d5,!0x0);}_createInitialRevision(_0x7f4105){const _0x3fac14=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3fac14)this['_initialRevisionId']=_0x3fac14['id'];else{const _0x17b28f=!this['editor']['model']['document']['roots']['find'](_0x2cd763=>this['editor']['model']['hasContent'](_0x2cd763)),_0x2f923b=this['editor']['plugins']['get']('Users')['me']['id'],_0x479973=Rt(this['editor']['locale'],_0x17b28f?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x7f4105,'to':_0x7f4105,'id':this['_initialRevisionId'],'name':_0x479973,'creatorId':_0x2f923b});}}_createCurrentRevision(_0x1c39a5){const _0x8917e5=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x8917e5),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1c39a5,'to':_0x1c39a5,'id':_0x8917e5,'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(_0x25e1ca,_0x3600b2,_0x55f634){const _0x306049={},_0x16a8a2={},_0x4105cf={},_0x42e44d=this['editor']['config']['get']('roots')||{};for(const [_0x1de04f,_0xc35be5]of Object['entries'](_0x42e44d))_0xc35be5['lazyLoad']||(_0x306049[_0x1de04f]=_0xc35be5['initialData']??'',_0x16a8a2[_0x1de04f]=_0xc35be5['modelAttributes']||{},_0xc35be5['modelElement']&&(_0x4105cf[_0x1de04f]=_0xc35be5['modelElement']));for(const _0x3dd0cf of this['editor']['model']['document']['getRootNames']())_0x306049[_0x3dd0cf]??='',_0x16a8a2[_0x3dd0cf]??={};let _0x30c6b4=!0x1;const _0xf319de=Object['keys'](_0x306049),_0x270539=Object['keys'](_0x25e1ca);for(const _0x7c730e of _0xf319de){if(_0x306049[_0x7c730e]!==_0x25e1ca[_0x7c730e]&&''!==_0x306049[_0x7c730e]['trim']()){_0x30c6b4=!0x0;break;}if(!_0x5706fe(_0x16a8a2[_0x7c730e],_0x3600b2[_0x7c730e])&&Object['keys'](_0x16a8a2[_0x7c730e])['length']>0x0){_0x30c6b4=!0x0;break;}const _0x26754a=_0x4105cf[_0x7c730e],_0x8d3cea=_0x55f634[_0x7c730e];if(_0x26754a&&_0x8d3cea&&_0x26754a!==_0x8d3cea){_0x30c6b4=!0x0;break;}}_0x30c6b4||(_0x30c6b4=_0x270539['some'](_0xebbd5e=>!this['editor']['model']['document']['getRoot'](_0xebbd5e))),_0x30c6b4&&_0x1b19db('editor-initial-data-replaced-with-revision-data',{'editorData':_0x306049,'editorRootsAttributes':_0x16a8a2,'editorRootsModelElements':_0x4105cf,'revisionData':_0x25e1ca,'revisionRootsAttributes':_0x3600b2,'revisionRootsModelElements':_0x55f634});for(const [_0x5c6df2,_0x3d1088]of Object['entries'](_0x25e1ca))this['editor']['config']['set']('roots.'+_0x5c6df2+'.initialData',_0x3d1088);for(const [_0x5d2db4,_0x20c647]of Object['entries'](_0x3600b2))this['editor']['config']['set']('roots.'+_0x5d2db4+'.modelAttributes',_0x20c647);const _0x4d7f19=this['editor']['model']['document'];for(const [_0x385abd,_0x3cff60]of Object['entries'](_0x55f634)){this['editor']['config']['set']('roots.'+_0x385abd+'.modelElement',_0x3cff60);const _0xe2a6d6=_0x4d7f19['getRoot'](_0x385abd);_0xe2a6d6&&_0xe2a6d6['name']!==_0x3cff60&&(_0x4d7f19['roots']['remove'](_0x385abd),_0x4d7f19['createRoot'](_0x3cff60,_0x385abd));}}_addPendingAction(){if(!this['_pendingAction']){const _0x37c42f=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x37c42f['add'](Rt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x527722){const _0x2a3878=this['repository']['getRevisions']();_0x2a3878['reverse']();let _0x20fbab=0x0;for(;_0x20fbab<_0x2a3878['length'];){const _0x40d9ae=_0x2a3878[_0x20fbab];if(_0x40d9ae===this['currentRevision']){_0x20fbab++;continue;}if(_0x40d9ae['id']===this['_initialRevisionId'])break;const _0x55f8cb=_0x527722['toVersion']-_0x40d9ae['toVersion']||_0x527722['fromVersion']-_0x40d9ae['fromVersion'];if(_0x55f8cb>0x0)break;if(_0x55f8cb<0x0)_0x20fbab++;else{if(!_0x527722['creator']&&_0x40d9ae['creator'])break;if(_0x40d9ae['creator']||!_0x527722['creator']){if(_0x527722['createdAt']>_0x40d9ae['createdAt'])break;_0x20fbab++;}else _0x20fbab++;}}return _0x20fbab;}_getFromVersion(_0x52e0b6){const _0x2dfa64=this['repository']['getRevisions']();_0x2dfa64['reverse'](),_0x2dfa64['shift']();const _0x27e838=_0x2dfa64['find'](_0x45cd5c=>_0x45cd5c['toVersion']<=_0x52e0b6)['toVersion'];return _0x27e838<this['_startingVersion']?this['_startingVersion']:_0x27e838;}['_makeRevision']({name:_0x4089f1,from:_0x2caa76,to:_0x27bc4b,creatorId:_0x49dec3,id:_0x58619e}){const _0x509d22=this['buildRevisionData']({'from':_0x2caa76,'to':_0x27bc4b});_0x509d22['name']=_0x4089f1,_0x509d22['creatorId']=_0x49dec3,_0x509d22['id']=_0x58619e;const _0x7ae0a8=this['addRevisionData'](_0x509d22);return this['adapter']&&this['_bufferUpdate'](_0x509d22['id'],_0x509d22,!0x0),_0x7ae0a8;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},At=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x3cfb20){this['editor']=_0x3cfb20,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(_0x1a3215){this['source']=_0x1a3215;const _0x445cd0=new Map(),_0x132515=new Map(),_0xd13974=this['editor']['model']['document']['roots']['map'](_0x117b00=>_0x117b00['rootName']);for(const _0x410174 of _0xd13974){const _0x466e08=this['editor']['model']['document']['getRoot'](_0x410174),_0x4e139a=It(_0x466e08);_0x445cd0['set'](_0x410174,_0x4e139a),_0x132515['set'](_0x410174,Object['fromEntries'](_0x466e08['getAttributes']()));}const _0x295c99=Array['from'](this['editor']['model']['markers'])['map'](_0x37a1db=>[_0x37a1db['name'],_0x37a1db['getRange']()]),_0xe48685=this['source']['version'];this['_saveMetaData'](_0xe48685,_0x445cd0,_0x295c99,_0x132515),this['_startingRevisionId']=this['_revisionId'];const _0x404901=new Map(),_0x337166=new Map();for(const _0x1fab50 of _0xd13974){const _0x5e8ce6=St(_0x1fab50,this['editor']['model']['document']['getRoot'](_0x1fab50)['name']);_0x404901['set'](_0x1fab50,_0x5e8ce6),_0x337166['set'](_0x1fab50,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x404901,[],_0x337166);}getData(_0x485146,_0x388abb){if(this['_lastFrom']===_0x485146&&this['_lastTo']<=_0x388abb)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x388abb,!0x0);else{if(!this['_savedMetaData']['has'](_0x485146)){const _0x591b79=this['_getPreviousFrom'](_0x485146);this['_calculateMetaData'](_0x591b79,_0x485146,!0x1);}this['_calculateMetaData'](_0x485146,_0x388abb,!0x0);}return this['_lastFrom']=_0x485146,this['_lastTo']=_0x388abb,this['_getState']();}loadState(_0x1c6ee6){if(!this['_savedMetaData']['has'](_0x1c6ee6['fromVersion'])){const _0x203765=this['_getPreviousFrom'](_0x1c6ee6['fromVersion']);this['_calculateMetaData'](_0x203765,_0x1c6ee6['fromVersion'],!0x1);}this['_calculateMetaData'](_0x1c6ee6['fromVersion'],_0x1c6ee6['toVersion'],!0x1);const _0x1803c3=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x1c6ee6['fromVersion'],this['_lastTo']=_0x1c6ee6['toVersion'];for(const _0x285de3 in _0x1c6ee6['diffData']){const _0x2fcba8=_0x1c6ee6['diffData'][_0x285de3]['attachChange'],_0x34243d=_0x12b1ed(_0x1c6ee6['diffData'][_0x285de3]['attributesBefore'])||{},_0x290dba=_0x1c6ee6['diffData'][_0x285de3],_0x1d5fbe=_0x1803c3['_makeModelFromViewString'](_0x290dba['deletions'],_0x290dba['rootElementName']||'$root');_0x1d5fbe['rootName']=_0x285de3,_0x1d5fbe['_isAttached']=!_0x2fcba8||!_0x2fcba8['isAttached'],_0x1d5fbe['isAttached']=()=>_0x1d5fbe['_isAttached'],this['_baseRoots']['set'](_0x285de3,_0x1d5fbe),this['_baseRootsAttributes']['set'](_0x285de3,_0x34243d),_0x2fcba8&&this['_touchedRoots']['set'](_0x285de3,_0x2fcba8);const _0x440007=this['_makeIdsRoot'](_0x1d5fbe);this['_baseIdsRoots']['set'](_0x285de3,_0x440007);for(const [_0x5eedeb,_0x2c1ae7]of _0x1d5fbe['markers']){if(!_0x5eedeb['startsWith']('revision:'))continue;const _0x23c3ab=_0x5eedeb['split'](':')[0x2],_0x4d913c=_0x290dba['aiSources']?.[_0x5eedeb]||null;for(const _0x4afc19 of _0x2c1ae7['getWalker']({'singleCharacters':!0x0})){const _0x490f8f=this['_getVidAttributeName'](_0x4afc19),_0x24f6ad='elementEnd'==_0x4afc19['type']?_0x4afc19['previousPosition']['path']['slice'](0x0,-0x1):_0x4afc19['previousPosition']['path'],_0x777716=_0x440007['getNodeByPath'](_0x24f6ad)['getAttribute'](_0x490f8f);this['_touched']['set'](_0x777716,{'userId':_0x23c3ab,'aiSource':_0x4d913c});}_0x1d5fbe['markers']['delete'](_0x5eedeb);}}this['_startingRevisionId']=this['_revisionId'];const _0x403830=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4a4996=>!this['_touched']['has'](_0x4a4996));let _0x288f08=0x0;const _0x20e411=new Map();for(const _0x5b8d48 in _0x1c6ee6['diffData']){const _0x35d1fe=_0x1c6ee6['diffData'][_0x5b8d48]['attachChange'],_0x450e80=_0x12b1ed(_0x1c6ee6['diffData'][_0x5b8d48]['attributesAfter'])||{},_0x22d8a3=_0x1c6ee6['diffData'][_0x5b8d48],_0x362803=_0x1803c3['_makeModelFromViewString'](_0x22d8a3['insertions'],_0x22d8a3['rootElementName']||'$root');_0x362803['rootName']=_0x5b8d48,_0x362803['_isAttached']=!_0x35d1fe||_0x35d1fe['isAttached'],_0x362803['isAttached']=()=>_0x362803['_isAttached'],this['_diffRoots']['set'](_0x5b8d48,_0x362803),this['_diffRootsAttributes']['set'](_0x5b8d48,_0x450e80);const _0x59ca64=this['_makeIdsRoot'](_0x362803,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5b8d48,_0x59ca64),_0x20e411['set'](_0x5b8d48,_0x362803['isAttached']()?_0x450e80:{});for(const [_0x55cb27,_0x3342b3]of _0x362803['markers']){if(!_0x55cb27['startsWith']('revision:'))continue;const _0x11d9f7=_0x55cb27['split'](':')[0x2],_0x1880b9=_0x22d8a3['aiSources']?.[_0x55cb27]||null;for(const _0x867fd2 of _0x3342b3['getWalker']({'singleCharacters':!0x0})){const _0x592ed8=this['_getVidAttributeName'](_0x867fd2),_0x54f0de=this['_revisionId']++,_0x1c878f='elementEnd'==_0x867fd2['type']?_0x867fd2['previousPosition']['path']['slice'](0x0,-0x1):_0x867fd2['previousPosition']['path'];_0x59ca64['getNodeByPath'](_0x1c878f)['_setAttribute'](_0x592ed8,_0x54f0de),this['_touched']['set'](_0x54f0de,{'userId':_0x11d9f7,'aiSource':_0x1880b9});}_0x362803['markers']['delete'](_0x55cb27);}for(const _0xda1bc of this['editor']['model']['createRangeIn'](_0x362803)['getWalker']({'singleCharacters':!0x0})){const _0xd7e00e=this['_getVidAttributeName'](_0xda1bc),_0x18a029='elementEnd'==_0xda1bc['type']?_0xda1bc['previousPosition']['path']['slice'](0x0,-0x1):_0xda1bc['previousPosition']['path'],_0x3c5ad9=_0x59ca64['getNodeByPath'](_0x18a029);_0x3c5ad9['getAttribute'](_0xd7e00e)>0x0||_0x3c5ad9['_setAttribute'](_0xd7e00e,_0x403830[_0x288f08++]);}for(const [_0x4dcaae,_0x15dd8f]of _0x362803['markers'])_0x4dcaae['startsWith']('revision:')||this['_markers']['set'](_0x4dcaae,_0x15dd8f);}const {roots:_0x448429}=this['_savedMetaData']['get'](_0x1c6ee6['fromVersion']),{roots:_0x31565b}=this['_savedMetaData']['get'](_0x1c6ee6['toVersion']),_0x696676=It(_0x448429['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x696676),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x696676,Number['NEGATIVE_INFINITY']));const _0x3f86eb=It(_0x31565b['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x3f86eb),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3f86eb));const _0x507145=Array['from'](this['_diffRoots'])['map'](([_0x4e71f4,_0x58b1ef])=>[_0x4e71f4,It(_0x58b1ef)]);this['_saveMetaData'](this['_lastTo'],_0x507145,this['_markers'],_0x20e411);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x288e90,_0x1293fc,_0x5ad362,_0x38d688){const _0x4c8677=new Map(_0x1293fc),_0x193723=new Map(_0x12b1ed(_0x38d688)),_0x14bc70=new Map();for(const [_0x4b26e1,_0x4880d2]of _0x5ad362)_0x14bc70['set'](_0x4b26e1,{'start':_0x4880d2['start']['clone'](),'end':_0x4880d2['end']['clone'](),'rootName':_0x4880d2['root']['rootName']});this['_savedMetaData']['set'](_0x288e90,{'roots':_0x4c8677,'markers':_0x14bc70,'rootsAttributes':_0x193723});}_removeMetaData(_0x245780){this['_savedMetaData']['delete'](_0x245780);}_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(_0x14d0c3,_0x45497e=null){let _0x3797ac=null;_0x14d0c3['is']('documentFragment')||(_0x3797ac=new _0xbf4b3e(_0x14d0c3['name'],{'vid_start':null===_0x45497e?this['_revisionId']++:_0x45497e++}));const _0x49144e=[];for(const _0x2374b4 of _0x14d0c3['getChildren']())if(_0x2374b4['is']('element')){_0x49144e['push'](this['_makeIdsRoot'](_0x2374b4,_0x45497e));const _0x141580=_0x49144e[_0x49144e['length']-0x1];null!==_0x45497e&&(_0x45497e=_0x141580['is']('element','$text')?_0x141580['getAttribute']('vid')+0x1:_0x141580['getAttribute']('vid_end')+0x1);}else{for(let _0x36baff=0x0;_0x36baff<_0x2374b4['offsetSize'];_0x36baff++)_0x49144e['push'](new _0xbf4b3e('$text',{'vid':null===_0x45497e?this['_revisionId']++:_0x45497e++}));}if(_0x14d0c3['is']('documentFragment')){const _0x64cb0f=St(_0x14d0c3['rootName'],_0x14d0c3['name']);return _0x64cb0f['_insertChild'](0x0,_0x49144e),_0x64cb0f;}return _0x3797ac['_setAttribute']('vid_end',null===_0x45497e?this['_revisionId']++:_0x45497e),_0x3797ac['_insertChild'](0x0,_0x49144e),_0x3797ac;}_calculateMetaData(_0x22a3fc,_0x6e001d,_0x331a7b){this['_reset']();const {roots:_0x127298,markers:_0x4bc6e3,rootsAttributes:_0xa60de7}=this['_savedMetaData']['get'](_0x22a3fc);this['_baseRoots']=new Map(_0x127298),this['_baseRootsAttributes']=new Map(_0x12b1ed(_0xa60de7));for(const [_0x2c2e0e,_0x598185]of this['_baseRoots'])if('$graveyard'!==_0x2c2e0e&&(this['_diffRoots']['set'](_0x2c2e0e,It(_0x598185)),this['_diffRootsAttributes']=new Map(_0x12b1ed(_0xa60de7)),_0x331a7b)){const _0x164e8c=this['_revisionId'];this['_idsRoots']['set'](_0x2c2e0e,this['_makeIdsRoot'](_0x598185)),this['_baseIdsRoots']['set'](_0x2c2e0e,this['_makeIdsRoot'](_0x598185,_0x164e8c));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',It(this['_baseRoots']['get']('$graveyard'))),_0x331a7b&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2fdd0e,_0x53d16b]of _0x4bc6e3){const _0x3aaa79=this['_baseRoots']['get'](_0x53d16b['rootName']),_0x3042b3=this['_diffRoots']['get'](_0x53d16b['rootName']),_0x44e438=new _0x210f72(_0x4d19e0(_0x53d16b['start'],_0x3aaa79),_0x4d19e0(_0x53d16b['end'],_0x3aaa79)),_0x4286b=_0x509b06(_0x44e438,_0x3042b3);_0x3aaa79['markers']['set'](_0x2fdd0e,_0x44e438),this['_markers']['set'](_0x2fdd0e,_0x4286b);}this['_applyOperations'](_0x22a3fc,_0x6e001d,_0x331a7b);}_applyOperations(_0x5b0563,_0x3aa012,_0x231a16){for(const _0x14a580 of this['source']['getOperations'](_0x5b0563,_0x3aa012))this['_handleOperation'](_0x14a580,_0x231a16);for(const _0x176b7b of this['_diffRoots']['values']())_0x176b7b['markers']['clear']();for(const [_0x41cf3e,_0x296ae9]of this['_markers'])this['_diffRoots']['get'](_0x296ae9['root']['rootName'])['markers']['set'](_0x41cf3e,_0x296ae9['clone']());const _0x2135a8=new Map(),_0x38d656=new Map();for(const [_0x3dc914,_0x1e7786]of this['_diffRoots'])_0x2135a8['set'](_0x3dc914,It(_0x1e7786)),_0x38d656['set'](_0x3dc914,this['_diffRootsAttributes']['get'](_0x3dc914));this['_saveMetaData'](_0x3aa012,_0x2135a8,this['_markers'],_0x38d656);}_getPreviousFrom(_0x382d83){const _0x2c6847=Array['from'](this['_savedMetaData']['keys']());_0x2c6847['sort']((_0x1917e1,_0x4e136e)=>_0x1917e1-_0x4e136e),_0x2c6847['reverse']();for(const _0x179da8 of _0x2c6847)if(_0x179da8<_0x382d83)return _0x179da8;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x51d082,_0x3386e6){const _0x236e04=Array['from'](_0x3386e6['markers'])['map'](([_0x2498e5,_0x263ea0])=>[_0x2498e5,_0x509b06(_0x263ea0,_0x51d082)]);_0x51d082['markers']=new Map(_0x236e04);}_transformMarkers(_0x2e6147){for(const _0x115536 of this['_markers']['values']()){const _0x5b5405=_0x115536['getTransformedByOperation'](_0x2e6147),_0x67ac28=_0x210f72['_createFromRanges'](_0x5b5405);_0x115536['start']=_0x67ac28['start'],_0x115536['end']=_0x67ac28['end'];}}_handleOperation(_0xd3b8d4,_0x331b27){if('addRoot'!=_0xd3b8d4['type']&&'detachRoot'!=_0xd3b8d4['type']){if('insert'==_0xd3b8d4['type']){const _0x1760fb=_0xd3b8d4['position']['root'],_0x447e01=_0x1760fb['rootName'],_0x2736d1=_0x1760fb['name'];this['_diffRoots']['has'](_0x447e01)||(this['_diffRoots']['set'](_0x447e01,St(_0x447e01,_0x2736d1,!0x0)),this['_diffRootsAttributes']['set'](_0x447e01,{}),_0x331b27&&this['_idsRoots']['set'](_0x447e01,St(_0x447e01,_0x2736d1,!0x0)));}else{if('addRootAttribute'==_0xd3b8d4['type']||'removeRootAttribute'==_0xd3b8d4['type']||'changeRootAttribute'==_0xd3b8d4['type'])return void this['_handleRootAttributeOperation'](_0xd3b8d4);'marker'==_0xd3b8d4['type']&&this['_handleMarkerOperation'](_0xd3b8d4);}if('marker'!==_0xd3b8d4['type']){const _0x5b467d=this['_cloneOperation'](_0xd3b8d4,this['_diffRoots']);_0x5b467d['_execute'](),this['_transformMarkers'](_0x5b467d);}if(_0x331b27)switch(_0xd3b8d4['type']){case'insert':this['_handleInsertOperation'](_0xd3b8d4);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xd3b8d4);break;case'merge':this['_handleMergeOperation'](_0xd3b8d4);break;case'split':this['_handleSplitOperation'](_0xd3b8d4);}}else this['_handleRootOperation'](_0xd3b8d4,_0x331b27);}_cloneOperation(_0x4effed,_0xcefd58){const _0x116a2f=_0x4effed['clone']();return _0x116a2f['_authorId']=_0x4effed['_authorId'],_0x116a2f['_aiSource']=_0x4effed['_aiSource'],_0x116a2f['baseVersion']=null,_0x51b9bb(_0x116a2f,_0xcefd58),_0x116a2f;}_getBaseVids(_0x3612b1){return _0x3612b1['map'](_0x1c1b68=>{const _0x49ff7a=this['_getVidAttributeName'](_0x1c1b68);return Number(_0x1c1b68['item']['getAttribute'](_0x49ff7a));});}_generateTape(_0x6a727,_0x263e84){if(_0x6a727['is']('element','$text'))_0x263e84['push']({'item':_0x6a727,'type':'text'});else{_0x6a727['is']('element')&&_0x263e84['push']({'item':_0x6a727,'type':'elementStart'});for(const _0x43ab06 of _0x6a727['getChildren']())this['_generateTape'](_0x43ab06,_0x263e84);_0x6a727['is']('element')&&_0x263e84['push']({'item':_0x6a727,'type':'elementEnd'});}return _0x263e84;}_getState(){const _0x3d0820=new Map(this['_touched']),_0x5e3db5=new Map(_0x3d0820),_0x4c5b8f=new Map(),_0x1c09ae={'insertions':{},'deletions':{}},_0x1d0754={'insertions':{},'deletions':{}},_0x3b8241=new Map(),_0x3e8505=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0xe9e627=new Map();_0x3e8505['delete']('$graveyard');for(const _0x30f79e of _0x3e8505){const _0x35aba0=(this['_diffRoots']['get'](_0x30f79e)??this['_baseRoots']['get'](_0x30f79e))['name'],_0x5d01c9=this['_diffRoots']['get'](_0x30f79e)||St(_0x30f79e,_0x35aba0,!0x1),_0x1ea49b=this['_baseRoots']['get'](_0x30f79e)||St(_0x30f79e,_0x35aba0,!0x1);_0x5d01c9['isAttached']()||_0x1ea49b['isAttached']()?(_0xe9e627['set'](_0x30f79e,_0x35aba0),_0x1c09ae['insertions'][_0x30f79e]=It(_0x5d01c9),_0x1c09ae['deletions'][_0x30f79e]=It(_0x1ea49b),this['_copyMarkers'](_0x1c09ae['deletions'][_0x30f79e],_0x1ea49b),this['_copyMarkers'](_0x1c09ae['insertions'][_0x30f79e],_0x5d01c9),_0x1d0754['insertions'][_0x30f79e]=this['_generateTape'](this['_idsRoots']['get'](_0x30f79e),[]),_0x1d0754['deletions'][_0x30f79e]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x30f79e)||St(_0x30f79e,_0x35aba0,!0x1),[])):_0x3e8505['delete'](_0x30f79e);}for(const _0x40c9aa of _0x3e8505){const _0x4c6fbd=_0x1d0754['insertions'][_0x40c9aa];for(const _0x443520 of _0x4c6fbd){const _0x4c2ceb=this['_getVidAttributeName'](_0x443520),_0x3af849=_0x443520['item']['getAttribute'](_0x4c2ceb);_0x5e3db5['delete'](_0x3af849),_0x3af849>=this['_startingRevisionId']&&_0x4c5b8f['set'](_0x3af849,_0x3d0820['get'](_0x3af849));}}for(const _0x1bd4ab of _0x3e8505){const _0x26f853=_0x1d0754['insertions'][_0x1bd4ab],_0x18e92f=this['_getBaseVids'](_0x1d0754['deletions'][_0x1bd4ab]);let _0x369383=0x0;for(const _0xdf9f1b of _0x26f853){const _0x161bbc=this['_getVidAttributeName'](_0xdf9f1b),_0x5826fe=_0xdf9f1b['item']['getAttribute'](_0x161bbc);if(!_0x4c5b8f['has'](_0x5826fe)&&!_0x3b8241['has'](_0x5826fe)){if(_0x5e3db5['has'](_0x5826fe))_0x369383++;else{if(_0x5826fe!=_0x18e92f[_0x369383]){const _0x10c2e8=_0x3d0820['get'](_0x5826fe)||_0x3d0820['get'](_0x18e92f[_0x369383]);for(;_0x5826fe!=_0x18e92f[_0x369383];)_0x5e3db5['has'](_0x18e92f[_0x369383])||(_0x3b8241['set'](_0x18e92f[_0x369383],_0x10c2e8),_0x3d0820['set'](_0x18e92f[_0x369383],_0x10c2e8)),_0x369383++;}_0x369383++;}}}}for(const _0x1f5a80 of _0x3e8505){const _0x5116cc=_0x1d0754['insertions'][_0x1f5a80];for(const _0x220f78 of _0x5116cc){const _0x349d1a=this['_getVidAttributeName'](_0x220f78),_0x26c5f0=_0x220f78['item']['getAttribute'](_0x349d1a);if(_0x3b8241['has'](_0x26c5f0)){const _0x396054=_0x3b8241['get'](_0x26c5f0);_0x5e3db5['has'](_0x26c5f0)||_0x5e3db5['set'](_0x26c5f0,{..._0x396054}),_0x4c5b8f['set'](_0x26c5f0,{..._0x396054});}}}for(const _0x2d34ec of _0x5e3db5['keys']())_0x2d34ec>=this['_startingRevisionId']&&_0x5e3db5['delete'](_0x2d34ec);const _0x5c2c9c=new Map();for(const _0x201e69 of _0x3e8505){let _0x57e6e2=_0x1d0754['insertions'][_0x201e69];for(const _0x411100 of _0x57e6e2)if(_0x411100['item']['is']('element','tableCell')){const _0x3bf04a=this['_getVidAttributeName'](_0x411100),_0x35fe8a=_0x411100['item']['getAttribute'](_0x3bf04a);if(_0x4c5b8f['has'](_0x35fe8a)){const _0x58e318=_0x411100['item']['parent']['parent']['getAttribute']('vid_start'),_0x2c41cd=_0x4c5b8f['get'](_0x35fe8a),_0x2202aa=_0x5c2c9c['get'](_0x58e318)||{'users':new Set(),'aiSource':null};_0x2202aa['users']['add'](_0x2c41cd['userId']),_0x2202aa['aiSource']=_0x2202aa['aiSource']||_0x2c41cd['aiSource']||null,_0x5c2c9c['set'](_0x58e318,_0x2202aa);}}_0x57e6e2=_0x1d0754['deletions'][_0x201e69];for(const _0x3a62f0 of _0x57e6e2)if(_0x3a62f0['item']['is']('element','tableCell')){const _0x26986f=this['_getVidAttributeName'](_0x3a62f0),_0x259ccd=_0x3a62f0['item']['getAttribute'](_0x26986f);if(_0x5e3db5['has'](_0x259ccd)){const _0x5e1be0=_0x3a62f0['item']['parent']['parent']['getAttribute']('vid_start'),_0x102419=_0x5e3db5['get'](_0x259ccd),_0x3b3f88=_0x5c2c9c['get'](_0x5e1be0)||{'users':new Set(),'aiSource':null};_0x3b3f88['users']['add'](_0x102419['userId']),_0x3b3f88['aiSource']=_0x3b3f88['aiSource']||_0x102419['aiSource']||null,_0x5c2c9c['set'](_0x5e1be0,_0x3b3f88);}}for(const _0x140d94 of _0x5c2c9c['keys']())(_0x4c5b8f['has'](_0x140d94)||_0x5e3db5['has'](_0x140d94))&&_0x5c2c9c['delete'](_0x140d94);}for(const _0x3d2632 of _0x3e8505){const _0x370dc8=_0x1d0754['insertions'][_0x3d2632];let _0x5b8612=null,_0x1dd528=null,_0x4ba3d1=null;for(const _0x5f38d8 of _0x370dc8){const _0x339dc5=this['_getVidAttributeName'](_0x5f38d8),_0x56bb97=_0x5f38d8['item']['getAttribute'](_0x339dc5),_0x1ba3fd=_0x5c2c9c['get'](_0x56bb97);if(_0x1ba3fd&&'elementStart'==_0x5f38d8['type']&&(_0x5b8612=Array['from'](_0x1ba3fd['users'])[0x0],_0x1dd528=_0x1ba3fd['aiSource'],_0x4ba3d1=_0x5f38d8['item']['getAttribute']('vid_end')),_0x5b8612){const _0x3ee2a4=_0x1dd528||_0x5e3db5['get'](_0x56bb97)?.['aiSource']||null,_0x276001=_0x1dd528||_0x4c5b8f['get'](_0x56bb97)?.['aiSource']||null;_0x5e3db5['set'](_0x56bb97,{'userId':_0x5b8612,'aiSource':_0x3ee2a4}),_0x4c5b8f['set'](_0x56bb97,{'userId':_0x5b8612,'aiSource':_0x276001});}_0x56bb97==_0x4ba3d1&&(_0x5b8612=null,_0x4ba3d1=null);}}const _0x1adfa9={},_0x312e83=new Set();for(const _0x23d694 of _0x3e8505){const _0x35cb68=_0x1c09ae['deletions'][_0x23d694],_0x2c2577=_0x1c09ae['insertions'][_0x23d694];for(const {userId:_0x654233}of this['_touchedMarkers']['values']())null!==_0x654233&&_0x312e83['add'](_0x654233);for(const {userId:_0xb88827}of this['_touchedRoots']['values']())null!==_0xb88827&&_0x312e83['add'](_0xb88827);const _0x3b0d7f={};this['_markChanges'](_0x2c2577,_0x1d0754['insertions'][_0x23d694],_0x4c5b8f,'insertion',_0x312e83,_0x3b0d7f),this['_markChanges'](_0x35cb68,_0x1d0754['deletions'][_0x23d694],_0x5e3db5,'deletion',_0x312e83,_0x3b0d7f),this['_collectSuggestionAiSources'](_0x2c2577,_0x3b0d7f),this['_collectSuggestionAiSources'](_0x35cb68,_0x3b0d7f),_0x1adfa9[_0x23d694]={'insertions':this['_prepareViewToSave'](_0x2c2577),'deletions':this['_prepareViewToSave'](_0x35cb68),'attachChange':this['_touchedRoots']['get'](_0x23d694)||null,'attributesBefore':_0x12b1ed(this['_baseRootsAttributes']['get'](_0x23d694))||{},'attributesAfter':_0x12b1ed(this['_diffRootsAttributes']['get'](_0x23d694)),'rootElementName':_0xe9e627['get'](_0x23d694),'aiSources':_0x3b0d7f};}const _0x29ea1e=Array['from'](_0x4c5b8f['values']())['some'](_0x2954be=>!(!_0x2954be||!_0x2954be['aiSource']))||Array['from'](_0x5e3db5['values']())['some'](_0x552f9a=>!(!_0x552f9a||!_0x552f9a['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x3992cb=>this['_aiTouchedMarkers']['has'](_0x3992cb));return{'diffData':_0x1adfa9,'authorsIds':Array['from'](_0x312e83),'hasAIChanges':_0x29ea1e};}_collectSuggestionAiSources(_0x1a3383,_0x16e39f){const _0x730b01=_0x1a3383['markers'];for(const _0x19fee7 of _0x730b01['keys']()){if(!_0x19fee7['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x19fee7))continue;const _0x5d8869=this['_aiTouchedMarkers']['get'](_0x19fee7);_0x5d8869&&(_0x16e39f[_0x19fee7]=_0x5d8869);}}_processRootBeforeSave(_0x2675ee){for(const [,_0x12291a]of _0x2675ee['markers']){const _0xd5ae9=_0x12291a['start']['getAncestors']()['filter'](_0x5cc9ca=>'tableCell'==_0x5cc9ca['name']);for(const _0x1db3b4 of _0xd5ae9)0x1==_0x1db3b4['childCount']&&_0x1db3b4['getChild'](0x0)['is']('element','paragraph')&&_0x1db3b4['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5b04a3){this['_processRootBeforeSave'](_0x5b04a3);const _0x4fb883=this['editor']['data']['toView'](_0x5b04a3,{}),_0x1f9f10=Array['from'](_0x4fb883['getChildren']())['map'](_0x5adcc3=>this['_getViewJson'](_0x5adcc3));return JSON['stringify'](_0x1f9f10);}_getViewJson(_0x572f00){if(_0x572f00['is']('$text'))return _0x572f00['data'];{const _0x25edaa=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x3d1fe8=_0x572f00,_0x36fe6e=this['editor']['data']['htmlProcessor']['domConverter'],_0x3e3ac5={'type':_0x25edaa['_getTypeCharForViewElement'](_0x3d1fe8),'name':_0x3d1fe8['name'],'attributes':Array['from'](_0x3d1fe8['getAttributes']()),'children':Array['from'](_0x3d1fe8['getChildren']())['map'](_0x121a41=>this['_getViewJson'](_0x121a41))};if(_0x572f00['is']('uiElement')&&'$comment'!=_0x572f00['name']){const _0x541907=_0x572f00['render'](_0x36fe6e['domDocument'],_0x36fe6e);_0x3e3ac5['children']['push'](_0x541907['outerHTML']);}else{if(_0x572f00['is']('rawElement')){const _0x536eb9=_0x36fe6e['domDocument']['createElement'](_0x3d1fe8['name']);_0x572f00['render'](_0x536eb9,_0x36fe6e),_0x3e3ac5['children']['push'](_0x536eb9['innerHTML']);}}const _0x275c24=Array['from'](_0x3d1fe8['getCustomProperties']());_0x275c24['length']>0x0&&(_0x3e3ac5['customProperties']=_0x275c24);const _0x124747=_0x3d1fe8['getFillerOffset']();return null!==_0x124747&&(_0x3e3ac5['fillerOffset']=_0x124747),_0x3e3ac5;}}['_markChanges'](_0x1767bf,_0x15a62c,_0x3d5195,_0x3871ef,_0x1fc337,_0x61d1c8){let _0x5ce7fa=null,_0x100eb9=null,_0x2d0bd0=0x0;const _0x268580=this['editor']['model'];for(let _0x2b3e23=0x0;_0x2b3e23<_0x15a62c['length'];_0x2b3e23++){const _0x3a3935=this['_getVidAttributeName'](_0x15a62c[_0x2b3e23]),_0x165c99=_0x15a62c[_0x2b3e23]['item']['getAttribute'](_0x3a3935),_0x14b5fa=_0x3d5195['get'](_0x165c99),_0x38ce2a=_0x2b3e23==_0x15a62c['length']-0x1;!_0x5ce7fa&&_0x14b5fa&&(_0x5ce7fa=_0x14b5fa,_0x100eb9=_0x15a62c[_0x2b3e23]);const _0x23bc46=!!_0x5ce7fa&&!!_0x14b5fa&&_0x14b5fa['userId']!=_0x5ce7fa['userId'],_0xdeb258=!!_0x5ce7fa&&!!_0x14b5fa&&_0x14b5fa['aiSource']!=_0x5ce7fa['aiSource'];_0x5ce7fa&&(!_0x14b5fa||_0x23bc46||_0xdeb258)&&(_0x24c91c(_0x14b5fa,Et(_0x100eb9,_0x1767bf,_0x268580),Et(_0x15a62c[_0x2b3e23],_0x1767bf,_0x268580)),_0x5ce7fa=_0x14b5fa||null,_0x100eb9=_0x14b5fa?_0x15a62c[_0x2b3e23]:null),_0x5ce7fa&&_0x38ce2a&&_0x24c91c(_0x14b5fa,Et(_0x100eb9,_0x1767bf,_0x268580),Ot(_0x15a62c[_0x2b3e23],_0x1767bf,_0x268580));}function _0x24c91c(_0x39d6b0,_0x1c5020,_0x1fca66){const _0x362439=_0x5ce7fa['userId'],_0x44d9c7=_0x5ce7fa['aiSource'],_0x3d6eee='revision:'+_0x3871ef+':'+_0x362439+':'+_0x2d0bd0++,_0x2ad238=_0x268580['createRange'](_0x1c5020,_0x1fca66);_0x1767bf['markers']['set'](_0x3d6eee,_0x2ad238),_0x44d9c7&&(_0x61d1c8[_0x3d6eee]=_0x44d9c7),null!==_0x362439&&_0x1fc337['add'](_0x362439);}}_getVidAttributeName(_0x40efef){switch(_0x40efef['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0xc95b82){const _0x32bebb=this['_idsRoots']['get'](_0xc95b82['position']['root']['rootName']),_0x2a0e3c=_0x4d19e0(_0xc95b82['position'],_0x32bebb),_0x3ffd0a=null===_0xc95b82['_authorId']?null:_0xc95b82['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4f40af=_0xc95b82['_aiSource']||null,_0x3f8e64=_0x2a0e3c['parent'],_0x565c6d=this['_revisionId'],_0x60724f=[];for(const _0x16030b of _0xc95b82['nodes'])if(_0x16030b['is']('element'))_0x60724f['push'](this['_makeIdsRoot'](_0x16030b));else{for(let _0xcb2e1f=0x0;_0xcb2e1f<_0x16030b['offsetSize'];_0xcb2e1f++)_0x60724f['push'](new _0xbf4b3e('$text',{'vid':this['_revisionId']++}));}const _0x333dbc=this['_revisionId'];for(let _0x45a501=_0x565c6d;_0x45a501<_0x333dbc;_0x45a501++)this['_touched']['set'](_0x45a501,{'userId':_0x3ffd0a,'aiSource':_0x4f40af});_0x3f8e64['_insertChild'](_0x2a0e3c['offset'],_0x60724f);}_setTouched(_0x2ac16e,_0x28548f,_0x136dc5){this['_touched']['set'](_0x2ac16e,{'userId':_0x28548f,'aiSource':_0x136dc5||this['_touched']['get'](_0x2ac16e)?.['aiSource']||null});}_handleMoveOperation(_0x2f39f4){(_0x2f39f4=this['_cloneOperation'](_0x2f39f4,this['_idsRoots']))['_execute']();const _0x231774=null===_0x2f39f4['_authorId']?null:_0x2f39f4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x16f5f3=_0x2f39f4['_aiSource']||null,_0x249ad4=_0x2f39f4['getMovedRangeStart'](),_0x223648=_0x249ad4['parent'],_0x2ed00f=_0x249ad4['offset'],_0x58ee3b=(_0x32ce1e,_0x1e2459,_0x3a0fdf)=>{for(let _0x408575=_0x1e2459;_0x408575<_0x3a0fdf;_0x408575++){const _0xab9cb0=_0x32ce1e['getChild'](_0x408575);_0xab9cb0['is']('element','$text')?this['_setTouched'](_0xab9cb0['getAttribute']('vid'),_0x231774,_0x16f5f3):(this['_setTouched'](_0xab9cb0['getAttribute']('vid_start'),_0x231774,_0x16f5f3),_0x58ee3b(_0xab9cb0,0x0,_0xab9cb0['childCount']),this['_setTouched'](_0xab9cb0['getAttribute']('vid_end'),_0x231774,_0x16f5f3));}};_0x58ee3b(_0x223648,_0x2ed00f,_0x2ed00f+_0x2f39f4['howMany']);}_handleMergeOperation(_0x41a1c5){const _0x15950f=null===(_0x41a1c5=this['_cloneOperation'](_0x41a1c5,this['_idsRoots']))['_authorId']?null:_0x41a1c5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x22c41d=_0x41a1c5['_aiSource']||null,_0x55de22=_0x41a1c5['targetPosition']['parent'],_0x8384b0=_0x41a1c5['sourcePosition']['parent'],_0x517a5a=_0x55de22['getAttribute']('vid_end'),_0x125af3=_0x8384b0['getAttribute']('vid_start');_0x55de22['_setAttribute']('vid_end',_0x8384b0['getAttribute']('vid_end')),_0x8384b0['_setAttribute']('vid_end',_0x517a5a),this['_setTouched'](_0x125af3,_0x15950f,_0x22c41d),this['_setTouched'](_0x517a5a,_0x15950f,_0x22c41d),_0x41a1c5['_execute']();}_handleSplitOperation(_0xc2b0aa){const _0x3cfcc9=null===(_0xc2b0aa=this['_cloneOperation'](_0xc2b0aa,this['_idsRoots']))['_authorId']?null:_0xc2b0aa['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x40f363=_0xc2b0aa['_aiSource']||null,_0x4e01bc=_0xc2b0aa['graveyardPosition'],_0x353542=_0xc2b0aa['splitPosition']['parent'];_0xc2b0aa['_execute']();const _0x18cb00=_0x353542['getAttribute']('vid_end'),_0x33a5ef=_0xc2b0aa['insertionPosition']['nodeAfter'];if(_0x4e01bc){const _0x55d5e1=_0x33a5ef['getAttribute']('vid_end'),_0x591d57=_0x353542['getAttribute']('vid_end');_0x353542['_setAttribute']('vid_end',_0x55d5e1),_0x33a5ef['_setAttribute']('vid_end',_0x591d57),this['_setTouched'](_0x353542['getAttribute']('vid_end'),_0x3cfcc9,_0x40f363),this['_setTouched'](_0x33a5ef['getAttribute']('vid_start'),_0x3cfcc9,_0x40f363);}else{const _0x55bb7b=this['_revisionId']++,_0x7d3eb3=this['_revisionId']++;_0x353542['_setAttribute']('vid_end',_0x55bb7b),_0x33a5ef['_setAttribute']('vid_start',_0x7d3eb3),_0x33a5ef['_setAttribute']('vid_end',_0x18cb00),this['_setTouched'](_0x55bb7b,_0x3cfcc9,_0x40f363),this['_setTouched'](_0x7d3eb3,_0x3cfcc9,_0x40f363);}}_handleMarkerOperation(_0x281aaa){if(!_0x281aaa['affectsData'])return;const _0x579fe9=(_0x281aaa=this['_cloneOperation'](_0x281aaa,this['_diffRoots']))['oldRange']?_0x281aaa['oldRange']['root']:null,_0x3468f9=_0x281aaa['newRange']?_0x281aaa['newRange']['root']:null;_0x579fe9&&this['_markers']['delete'](_0x281aaa['name']),_0x3468f9&&this['_markers']['set'](_0x281aaa['name'],_0x281aaa['newRange']['clone']());const _0x445952=null===_0x281aaa['_authorId']?null:_0x281aaa['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2bbce4=_0x281aaa['name'];if(_0x281aaa['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x2bbce4,_0x281aaa['_aiSource']),!this['_touchedMarkers']['has'](_0x2bbce4))return void this['_touchedMarkers']['set'](_0x2bbce4,{'range':_0x281aaa['oldRange'],'userId':_0x445952});const _0x46c45b=this['_touchedMarkers']['get'](_0x2bbce4),_0x535c62=_0x46c45b['range'],_0x254483=_0x281aaa['newRange'];null==_0x535c62&&null==_0x254483||_0x535c62&&_0x254483&&_0x535c62['isEqual'](_0x254483)?this['_touchedMarkers']['delete'](_0x281aaa['name']):_0x46c45b['userId']=_0x445952;}_handleRootOperation(_0x29c5cd,_0x1c7d3c){this['_diffRoots']['has'](_0x29c5cd['rootName'])?this['_diffRoots']['get'](_0x29c5cd['rootName'])['_isAttached']=_0x29c5cd['isAdd']:(this['_diffRoots']['set'](_0x29c5cd['rootName'],St(_0x29c5cd['rootName'],_0x29c5cd['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x29c5cd['rootName'],{}),_0x1c7d3c&&this['_idsRoots']['set'](_0x29c5cd['rootName'],St(_0x29c5cd['rootName'],_0x29c5cd['elementName'],!0x0)));const _0x38fc9b=null===_0x29c5cd['_authorId']?null:_0x29c5cd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1389ca=this['_touchedRoots']['get'](_0x29c5cd['rootName']);_0x1389ca&&_0x1389ca['userId']===_0x38fc9b?this['_touchedRoots']['delete'](_0x29c5cd['rootName']):this['_touchedRoots']['set'](_0x29c5cd['rootName'],{'userId':_0x38fc9b,'isAttached':_0x29c5cd['isAdd']});}_handleRootAttributeOperation(_0x566432){const _0xf231b1=this['_diffRootsAttributes']['get'](_0x566432['root']['rootName']);null===_0x566432['newValue']?delete _0xf231b1[_0x566432['key']]:_0xf231b1[_0x566432['key']]=_0x566432['newValue'];}};function It(_0x194117){const _0x2934e7=St(_0x194117['rootName'],_0x194117['name'],_0x194117['isAttached']());for(const _0x3caf20 of _0x194117['getChildren']()){const _0x3aa563=_0x3caf20['_clone'](!0x0);_0x2934e7['_appendChild'](_0x3aa563);}return _0x2934e7;}function St(_0xb30cff,_0x5db5c3,_0x1a19c9=!0x0){const _0x1e747d=new _0x26aeb5();return _0x1e747d['rootName']=_0xb30cff,_0x1e747d['name']=_0x5db5c3,_0x1e747d['_isAttached']=_0x1a19c9,_0x1e747d['isAttached']=()=>_0x1e747d['_isAttached'],_0x1e747d;}function Et(_0x4ab40c,_0x5f46fd,_0x1a82eb){const _0x4852d9='elementEnd'==_0x4ab40c['type']?_0x1a82eb['createPositionAt'](_0x4ab40c['item'],'end'):_0x1a82eb['createPositionBefore'](_0x4ab40c['item']);return _0x1a82eb['createPositionFromPath'](_0x5f46fd,_0x4852d9['path'],_0x4852d9['stickiness']);}function Ot(_0x1fa1d2,_0x2184e6,_0x2e8159){const _0x2c71cf='elementStart'==_0x1fa1d2['type']?_0x2e8159['createPositionAt'](_0x1fa1d2['item'],0x0):_0x2e8159['createPositionAfter'](_0x1fa1d2['item']);return _0x2e8159['createPositionFromPath'](_0x2184e6,_0x2c71cf['path'],_0x2c71cf['stickiness']);}const Ct=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x426de8();var Tt=class extends Vt{['id'];author;type;data;rootName;constructor(_0x96a42){super(),this['id']=_0x96a42['id']||_0x494e52(),this['author']=_0x96a42['author'],this['type']=_0x96a42['type'],this['data']=_0x96a42['data']||{},this['rootName']=_0x96a42['rootName'],this['set']('createdAt',_0x96a42['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Mt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1427c4,_0x111ca1){this['newRevisionId']=_0x1427c4,this['oldRevisionId']=_0x111ca1,this['changes']=new _0xbe92c9();}_setChanges(_0xf67cbb){for(const _0x1deeb5 of _0xf67cbb)this['changes']['add'](_0x1deeb5);}},Ht=class extends _0x346362{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[_0x232463,_0x1c1e93,yt,bt];}constructor(_0x29e874){super(_0x29e874),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',(_0x1b4536,_0x35d36e,_0x122589)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x1c4879=>{for(const _0x2ffb87 of this['editor']['editing']['view']['document']['roots'])_0x122589?_0x1c4879['removeClass']('ck-editor__editable__overlay',_0x2ffb87):_0x1c4879['addClass']('ck-editor__editable__overlay',_0x2ffb87);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x281fba=>null!==_0x281fba),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3731f5,_0x4dd691,_0x508309)=>_0x3731f5&&_0x508309?_0x4dd691['changes']['getIndex'](_0x508309):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x30d50d,_0x787275)=>_0x30d50d?_0x787275['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1c1e93),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x3b5369=this['editor'],_0x5ede4e=new Ft(_0x3b5369,{'direction':'backward'}),_0x41a76e=new Ft(_0x3b5369,{'direction':'forward'});_0x3b5369['commands']['add']('showPreviousChange',_0x5ede4e),_0x3b5369['commands']['add']('showNextChange',_0x41a76e),_0x3b5369['commands']['add']('restoreRevision',new Lt(_0x3b5369)),this['on']('change:numberOfChanges',()=>{_0x5ede4e['refresh'](),_0x41a76e['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x3b5369['enableReadOnlyMode']('revision-viewer'),_0x3b5369['plugins']['has']('WidgetToolbarRepository')&&_0x3b5369['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x321dfd){return await this['_utils']['loadRevisionData'](_0x321dfd,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x321dfd);}async getRevisionRootsAttributes(_0xb130b1){return await this['_utils']['loadRevisionData'](_0xb130b1,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xb130b1);}async['compare'](_0x3c3fb0,_0x5c6649,_0x2ff868=!0x1){if(!this['isEnabled'])return;const _0xa5aa98=this['diff'],_0x2a736c=this['repository'],_0x24b21b='string'==typeof _0x3c3fb0?_0x2a736c['getRevision'](_0x3c3fb0):_0x3c3fb0,_0x424ba4='string'==typeof _0x5c6649?_0x2a736c['getRevision'](_0x5c6649):_0x5c6649,_0x54578f=_0x24b21b['id'],_0x59288a=_0x424ba4?_0x424ba4['id']:null;if(!_0x2ff868&&this['diff']&&this['diff']['newRevisionId']===_0x54578f&&this['diff']['oldRevisionId']===_0x59288a)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Mt(_0x54578f,_0x59288a);const _0x70330a=this['_getRevisionsRange'](_0x24b21b,_0x424ba4,!0x0)['map'](_0x43966f=>this['_utils']['loadRevisionData'](_0x43966f,this['adapter']));return _0x70330a['push'](new Promise(_0x16e195=>{setTimeout(_0x16e195,0x14);})),Promise['all'](_0x70330a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x10a04f=this['_getDiff'](_0x54578f,_0x59288a);this['_cleanUpCommentMarkers'](_0x10a04f);for(const _0x5ca574 of _0x10a04f['changes'])this['_changeIdToChange']['set'](_0x5ca574['id'],_0x5ca574);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x310e45=>{for(const _0x3c3fd1 of this['editor']['model']['document']['getRootNames']())_0x310e45['detachRoot'](_0x3c3fd1);for(const _0x1238ba of Object['keys'](_0x10a04f['model'])){const _0x26b56c=_0x10a04f['model'][_0x1238ba]['name'],_0x195531=_0x310e45['addRoot'](_0x1238ba,_0x26b56c);for(const _0x30523a of Object['keys'](_0x10a04f['attributes'][_0x1238ba]))_0x310e45['setAttribute'](_0x30523a,_0x10a04f['attributes'][_0x1238ba][_0x30523a],_0x195531);_0x310e45['insert'](_0x10a04f['model'][_0x1238ba],_0x195531,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x10a04f['changes'])),this['isReady']=!0x0;})['catch'](_0x161cda=>{console['error'](_0x161cda),this['_cleanUp'](),_0xa5aa98&&(this['diff']=_0xa5aa98),this['isReady']=!0x0;});}addRevisionData(_0x265dd4,_0x552fae){const _0x3ccef4=this['repository']['createRevision'](_0x265dd4);return _0x3ccef4['on']('_update',(_0x2ba8bc,_0x362997,_0x192a30)=>_0x552fae(_0x362997,_0x192a30,_0x3ccef4)),this['repository']['addRevision'](_0x3ccef4),_0x3ccef4;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x165cc8=>{for(const _0x4dec3a of this['editor']['model']['document']['getRootNames']())_0x165cc8['detachRoot'](_0x4dec3a);});}_cleanUpCommentMarkers(_0x37a986){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x48a0e0=this['_getVisibleCommentThreadIds']();for(const _0x22640f of Object['values'](_0x37a986['model']))for(const _0x2fea6a of Array['from'](_0x22640f['markers']['keys']()))_0x2fea6a['startsWith']('revision-comment:')&&!_0x48a0e0['has'](Pt(_0x2fea6a))&&_0x22640f['markers']['delete'](_0x2fea6a);}_sortAndFilterDiffChanges(_0x20b83b){const _0xb35ccb=[],_0x393c6e=new Map();for(const _0x161455 of this['editor']['model']['document']['getRootNames']()){const _0x2a1d30=this['editor']['editing']['view']['getDomRoot'](_0x161455);if(!_0x2a1d30)continue;const _0x22f4da=_0x2a1d30['getClientRects']()['item'](0x0);_0x22f4da&&(_0xb35ccb['push'](_0x161455),_0x393c6e['set'](_0x161455,_0x22f4da));}return _0xb35ccb['sort']((_0x19ef4e,_0x5b6115)=>{const _0x48935f=_0x393c6e['get'](_0x19ef4e),_0x23ad5d=_0x393c6e['get'](_0x5b6115);return _0x48935f['y']-_0x23ad5d['y']||_0x48935f['x']-_0x23ad5d['x'];}),(_0x20b83b=_0x20b83b['filter'](_0x341858=>_0xb35ccb['includes'](_0x341858['rootName'])))['sort']((_0x38bc90,_0x4e5e6a)=>_0xb35ccb['indexOf'](_0x38bc90['rootName'])-_0xb35ccb['indexOf'](_0x4e5e6a['rootName'])),_0x20b83b;}['_makeTape'](_0x51a8dc,_0x247b06={}){const _0x173778=Array['from'](_0x51a8dc['markers'])['filter'](([_0x21140a,_0x54ba9d])=>_0x21140a['startsWith']('revision:')&&!_0x54ba9d['isCollapsed']),_0x51df27=Array['from'](this['editor']['model']['createRangeIn'](_0x51a8dc)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x173778['length'])for(const _0x2589e7 of _0x51df27){const [_0x54c59d,_0x1bf95e]=_0x173778[0x0],[,_0x527ba5,_0x5be695]=_0x54c59d['split'](':'),_0x5a23cd=_0x247b06[_0x54c59d]||null;if(_0x1bf95e['end']['isEqual'](_0x2589e7['nextPosition'])&&_0x173778['shift'](),(_0x2589e7['previousPosition']['isEqual'](_0x1bf95e['start'])||_0x2589e7['previousPosition']['isAfter'](_0x1bf95e['start']))&&('insertion'==_0x527ba5?_0x2589e7['isAdded']={'userId':_0x5be695,'aiSource':_0x5a23cd}:'deletion'==_0x527ba5&&(_0x2589e7['isRemoved']={'userId':_0x5be695,'aiSource':_0x5a23cd})),0x0==_0x173778['length'])break;}return _0x51df27;}_refreshStartEndIndex(_0x34404c){const _0x43c804=new Map();for(let _0x457038=0x0;_0x457038<_0x34404c['length'];_0x457038++)'text'===_0x34404c[_0x457038]['type']?(_0x34404c[_0x457038]['item']['startIndex']=_0x457038,_0x34404c[_0x457038]['item']['endIndex']=_0x457038):('elementStart'===_0x34404c[_0x457038]['type']?_0x34404c[_0x457038]['item']['startIndex']=_0x457038:'elementEnd'===_0x34404c[_0x457038]['type']&&(_0x34404c[_0x457038]['item']['endIndex']=_0x457038),_0x43c804['set'](_0x34404c[_0x457038]['id'],_0x457038));for(const _0x2567e9 of _0x43c804['values']())'elementStart'===_0x34404c[_0x2567e9]['type']?_0x34404c[_0x2567e9]['item']['endIndex']=_0x43c804['get'](_0x34404c[_0x2567e9]['pairId']):'elementEnd'===_0x34404c[_0x2567e9]['type']&&(_0x34404c[_0x2567e9]['item']['startIndex']=_0x43c804['get'](_0x34404c[_0x2567e9]['pairId']));}['_processTape'](_0x42c4cb){for(let _0x5f3c6b=0x0;_0x5f3c6b<_0x42c4cb['length'];_0x5f3c6b++){if('elementStart'===_0x42c4cb[_0x5f3c6b]['type'])_0x42c4cb[_0x5f3c6b]['item']['startIndex']=_0x5f3c6b;else{if('elementEnd'===_0x42c4cb[_0x5f3c6b]['type']){_0x42c4cb[_0x5f3c6b]['item']['endIndex']=_0x5f3c6b;const _0x61b4b1=_0x42c4cb[_0x5f3c6b]['item']['startIndex'];_0x42c4cb[_0x61b4b1]['pairId']=_0x42c4cb[_0x5f3c6b]['id'],_0x42c4cb[_0x5f3c6b]['pairId']=_0x42c4cb[_0x61b4b1]['id'];}else _0x42c4cb[_0x5f3c6b]['item']['startIndex']=_0x5f3c6b,_0x42c4cb[_0x5f3c6b]['item']['endIndex']=_0x5f3c6b,_0x42c4cb[_0x5f3c6b]['pairId']=null;}_0x42c4cb[_0x5f3c6b]['markersStart']||(_0x42c4cb[_0x5f3c6b]['markersStart']=[],_0x42c4cb[_0x5f3c6b]['markersEnd']=[]);}}_markInsertions(_0x59d022,_0x9be493){const _0x4aa757=_0x59d022['filter'](_0x1dfe9b=>!_0x1dfe9b['isAdded']);for(let _0x32aef5=0x0;_0x32aef5<_0x9be493['length'];_0x32aef5++)_0x9be493[_0x32aef5]['isAdded']&&(_0x4aa757[_0x32aef5]['isAdded']=_0x9be493[_0x32aef5]['isAdded']);}_getDiff(_0x1073fc,_0x13983a=null){const _0x32360a=this['repository']['getRevision'](_0x1073fc),_0x265663=_0x13983a?this['repository']['getRevision'](_0x13983a):null,_0x4cd726=this['_getRevisionsRange'](_0x32360a,_0x265663),_0x53d009=_0x4cd726[_0x4cd726['length']-0x1],_0x519b5e=new Map(),_0x48edd4={'model':{},'attributes':{},'changes':[]},_0x24ad3d=new Set(),_0x1e1b05=new Map();for(let _0x398a51=_0x4cd726['length']-0x1;_0x398a51>=0x0;_0x398a51--){const _0x2af5a0=_0x4cd726[_0x398a51];for(const _0x4ff64e of Object['keys'](_0x2af5a0['diffData']))if(_0x2af5a0['diffData'][_0x4ff64e]['attachChange']){const _0x10c5ce=_0x2af5a0['diffData'][_0x4ff64e]['attachChange'];_0x10c5ce['isAttached']?(_0x24ad3d['add'](_0x4ff64e),_0x1e1b05['has'](_0x4ff64e)&&_0x1e1b05['get'](_0x4ff64e)['userId']==_0x10c5ce['userId']?_0x1e1b05['delete'](_0x4ff64e):_0x1e1b05['set'](_0x4ff64e,_0x10c5ce)):_0x1e1b05['has'](_0x4ff64e)?(_0x24ad3d['delete'](_0x4ff64e),_0x1e1b05['delete'](_0x4ff64e)):(_0x24ad3d['add'](_0x4ff64e),_0x1e1b05['set'](_0x4ff64e,_0x10c5ce));}else _0x24ad3d['add'](_0x4ff64e);}for(const _0x19a28b of _0x24ad3d){const _0x4d1b91=_0x1e1b05['has'](_0x19a28b)&&!_0x1e1b05['get'](_0x19a28b)['isAttached'];let _0x407c44=_0x4d1b91?_0x4cd726['length']-0x1:0x0;const _0x2542f2=_0x4d1b91?-0x1:0x1;for(;_0x4cd726[_0x407c44];){const _0x3d6e37=_0x4cd726[_0x407c44];if(_0x3d6e37['diffData'][_0x19a28b]){const _0x2aed4a=_0x4d1b91?_0x3d6e37['diffData'][_0x19a28b]['attributesBefore']:_0x3d6e37['diffData'][_0x19a28b]['attributesAfter'];_0x48edd4['attributes'][_0x19a28b]=_0x2aed4a?_0x12b1ed(_0x2aed4a):{};break;}_0x407c44+=_0x2542f2;}}for(const _0x206d65 of _0x4cd726){_0x206d65['model']={};for(const _0x16b4a2 of _0x206d65['authors'])_0x519b5e['set'](_0x16b4a2['id'],_0x16b4a2);for(const _0x1f6b8e of _0x24ad3d){const _0x421c26=_0x206d65['diffData'][_0x1f6b8e]?_0x206d65['diffData'][_0x1f6b8e]['insertions']:'[]',_0x3d0a0a=_0x206d65['diffData'][_0x1f6b8e]?_0x206d65['diffData'][_0x1f6b8e]['deletions']:'[]',_0x56f728=_0x206d65['diffData'][_0x1f6b8e]?.['rootElementName']||'$root';_0x206d65['model'][_0x1f6b8e]={'insertions':this['_utils']['_makeModelFromViewString'](_0x421c26,_0x56f728),'deletions':this['_utils']['_makeModelFromViewString'](_0x3d0a0a,_0x56f728)};}}for(const _0x50c5ba of _0x24ad3d){let _0x5298c0=null,_0x3b9962=0x0;const _0x27eee6=_0x4cd726['map'](_0x5b91a3=>_0x5b91a3['diffData'][_0x50c5ba]?.['rootElementName'])['find'](_0x3a1a5a=>void 0x0!==_0x3a1a5a)||'$root',_0x3ba705=new Map(Array['from'](_0x32360a['model'][_0x50c5ba]['insertions']['markers'])['filter'](([_0x410a83])=>!_0x410a83['startsWith']('revision:')));let _0x18d488=0x0;for(const _0x44759b of _0x4cd726){const _0x5c5c14=_0x44759b['diffData'][_0x50c5ba]?.['aiSources']||{},_0x15058d=this['_makeTape'](_0x44759b['model'][_0x50c5ba]['insertions'],_0x5c5c14);_0x44759b==_0x32360a?(_0x5298c0=_0x15058d,_0x3b9962=_0x5298c0['length'],_0x5298c0['forEach'](_0x4204f1=>{_0x4204f1['id']=_0x18d488++;}),this['_processTape'](_0x5298c0)):this['_markInsertions'](_0x5298c0,_0x15058d);const _0x3398c9=_0x5298c0['filter'](_0x416d3b=>!_0x416d3b['isAdded'])['map'](_0x1a1a99=>_0x1a1a99['id']);let _0x4b003a=0x0;const _0xa6aaa8=this['_makeTape'](_0x44759b['model'][_0x50c5ba]['deletions'],_0x5c5c14);_0xa6aaa8['forEach'](_0x56c851=>{_0x56c851['isRemoved']?_0x56c851['id']=_0x3b9962++:_0x56c851['id']=_0x3398c9[_0x4b003a++];}),this['_processTape'](_0xa6aaa8),this['_setDistance'](_0x5298c0,'isAdded'),this['_setDistance'](_0xa6aaa8,'isRemoved'),_0x44759b==_0x32360a&&this['_markMarkers'](_0x5298c0,_0x3ba705),_0x5298c0=this['_joinTapes'](_0x5298c0,_0xa6aaa8),this['_refreshStartEndIndex'](_0x5298c0),this['_setDistance'](_0x5298c0,'isRemoved');}_0x5298c0=_0x5298c0['filter'](_0x2c35c4=>!(_0x2c35c4['isAdded']&&_0x2c35c4['isRemoved']));const _0x2440ad=new Map(_0x53d009['model'][_0x50c5ba]['deletions']['markers']),_0x26f3dd=new Set(_0x3ba705['keys']());for(const _0x3de89e of _0x2440ad['keys']())_0x26f3dd['delete'](_0x3de89e);const _0x19083d=Object['assign']({},..._0x4cd726['map'](_0x23c085=>_0x23c085['diffData'][_0x50c5ba]?.['aiSources']));this['_markSuggestions'](_0x5298c0,_0x26f3dd,_0x19083d),this['_fixObsoleteTags'](_0x5298c0),_0x5298c0=this['_removeMissingPairs'](_0x5298c0),_0x5298c0=this['_markMismatchedRemovedTags'](_0x5298c0),_0x5298c0=this['_removeUnsupportedChanges'](_0x5298c0);const {root:_0x40d8df,changes:_0x476c37}=this['_makeModelFromTape'](_0x5298c0,_0x519b5e,_0x50c5ba,_0x27eee6);_0x48edd4['model'][_0x50c5ba]=_0x40d8df;const _0x4d19de=_0x1e1b05['get'](_0x50c5ba);if(_0x4d19de){const _0x1735ce=_0x519b5e['get'](_0x4d19de['userId']),_0x28d574=new Tt({'author':_0x1735ce,'type':_0x4d19de['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x50c5ba});_0x476c37['unshift'](_0x28d574),_0x48edd4['attributes'][_0x50c5ba]['revisionHistoryAttachChange']=_0x28d574['id'];}_0x48edd4['changes']=_0x48edd4['changes']['concat'](_0x476c37);}return _0x48edd4;}['_markMarkers'](_0x5c37cc,_0x5a1068){for(let _0xc596f7=0x0;_0xc596f7<_0x5c37cc['length'];_0xc596f7++)for(const [_0x4fafc6,_0x27d211]of _0x5a1068)!_0x27d211['isCollapsed']&&_0x27d211['start']['isEqual'](_0x5c37cc[_0xc596f7]['previousPosition'])&&_0x5c37cc[_0xc596f7]['markersStart']['push'](_0x4fafc6),_0x27d211['end']['isEqual'](_0x5c37cc[_0xc596f7]['nextPosition'])&&_0x5c37cc[_0xc596f7]['markersEnd']['push'](_0x4fafc6);}['_joinTapes'](_0x33c3e2,_0x35ec00){let _0x43700b=[],_0x525194=0x0,_0x4d9796=0x0;for(;_0x525194<_0x33c3e2['length']||_0x4d9796<_0x35ec00['length'];){const _0x7b6710=_0x33c3e2[_0x525194]||{},_0x550094=_0x35ec00[_0x4d9796]||{};if(_0x7b6710['id']==_0x550094['id'])_0x525194++,_0x4d9796++,_0x43700b['push'](_0x7b6710);else{if(_0x550094['isRemoved']&&_0x7b6710['isAdded']){const {commonTape:_0x44613a,iEnd:_0x154c3b,jEnd:_0x46cf3d}=this['_threeWayMerge'](_0x33c3e2,_0x525194,_0x35ec00,_0x4d9796);_0x43700b=_0x43700b['concat'](_0x44613a),_0x525194=_0x154c3b,_0x4d9796=_0x46cf3d;}else _0x550094['isRemoved']?(_0x4d9796++,_0x43700b['push'](_0x550094)):(_0x525194++,_0x43700b['push'](_0x7b6710));}}return _0x43700b;}_markSuggestions(_0x3edf8c,_0x5a48cd,_0x4d7f9c){const _0xbfc653=[];for(let _0x3d4833=0x0;_0x3d4833<_0x3edf8c['length'];_0x3d4833++){for(let _0x1b2c31=0x0;_0x1b2c31<_0x3edf8c[_0x3d4833]['markersStart']['length'];_0x1b2c31++){const _0x25fe6c=_0x3edf8c[_0x3d4833]['markersStart'][_0x1b2c31];if(!_0x5a48cd['has'](_0x25fe6c))continue;const {group:_0x40f726,type:_0x23c168,authorId:_0x4b6004}=_0x352c54(_0x25fe6c);if('revision-suggestion'!=_0x40f726||'insertion'!=_0x23c168&&'deletion'!=_0x23c168)continue;const _0x2810f2=_0x4d7f9c['suggestion:'+_0x25fe6c['slice'](0x14)]||null;_0xbfc653['unshift']({'type':_0x23c168,'name':_0x25fe6c,'userId':_0x4b6004,'aiSource':_0x2810f2}),_0x3edf8c[_0x3d4833]['markersStart']['splice'](_0x1b2c31,0x1),_0x1b2c31--;}_0x1fbcaa(_0x3edf8c[_0x3d4833]);for(let _0x4a7baa=0x0;_0x4a7baa<_0x3edf8c[_0x3d4833]['markersEnd']['length'];_0x4a7baa++){const _0x3ffb4a=_0x3edf8c[_0x3d4833]['markersEnd'][_0x4a7baa];if(!_0x5a48cd['has'](_0x3ffb4a))continue;const {group:_0x368afc,type:_0x21b46f}=_0x352c54(_0x3ffb4a);if('revision-suggestion'!=_0x368afc||'insertion'!=_0x21b46f&&'deletion'!=_0x21b46f)continue;_0x3edf8c[_0x3d4833]['markersEnd']['splice'](_0x4a7baa,0x1),_0x4a7baa--;const _0x5d5ddc=_0xbfc653['findIndex'](_0x47434a=>_0x47434a['name']==_0x3ffb4a);_0x5d5ddc>-0x1&&_0xbfc653['splice'](_0x5d5ddc,0x1);}}function _0x352c54(_0x4e1895){const _0x4cf129=_0x4e1895['split'](':');return{'group':_0x4cf129[0x0],'type':_0x4cf129[0x1],'subType':_0x4cf129['length']>=0x5?_0x4cf129[0x2]:null,'id':_0x4cf129['length']<0x5?_0x4cf129[0x2]:_0x4cf129[0x3],'authorId':_0x4cf129['length']<0x5?_0x4cf129[0x3]:_0x4cf129[0x4],'markerCount':0x6==_0x4cf129['length']?_0x4cf129[0x5]:null};}function _0x1fbcaa(_0x137dfb){for(let _0x55add0=0x0;_0x55add0<_0xbfc653['length'];_0x55add0++){if(_0x137dfb['isAdded']&&'insertion'==_0xbfc653[_0x55add0]['type']&&_0x137dfb['isAdded']['userId']==_0xbfc653[_0x55add0]['userId'])return _0x137dfb['isAddSuggestion']={..._0xbfc653[_0x55add0],'aiSource':_0x137dfb['isAdded']['aiSource']||_0xbfc653[_0x55add0]['aiSource']},void delete _0x137dfb['isAdded'];if(!_0x137dfb['isAdded']&&!_0x137dfb['isRemoved']&&'deletion'==_0xbfc653[_0x55add0]['type'])return void(_0x137dfb['isRemoveSuggestion']=_0xbfc653[_0x55add0]);}}}_setDistance(_0x18e538,_0x2a16b9){let _0x153db4=0x0,_0x367df1=!0x1;const _0x2c1cab=new Map();for(const _0x448a66 of _0x18e538)_0x448a66[_0x2a16b9]?_0x367df1&&(_0x153db4++,_0x367df1=!0x1):(_0x153db4++,_0x367df1=!0x0),_0x2c1cab['set'](_0x448a66['id'],_0x153db4);for(let _0x35351e=0x0;_0x35351e<_0x18e538['length'];_0x35351e++){if('isRemoved'==_0x2a16b9&&_0x18e538[_0x35351e]['isAdded']||'isAdded'==_0x2a16b9&&_0x18e538[_0x35351e]['isRemoved'])continue;if('text'==_0x18e538[_0x35351e]['type']){_0x18e538[_0x35351e]['distance']=0x0;continue;}const _0x5504ef=_0x2c1cab['get'](_0x18e538[_0x35351e]['pairId']),_0xc06836=_0x2c1cab['get'](_0x18e538[_0x35351e]['id']);_0x18e538[_0x35351e]['distance']=_0x5504ef-_0xc06836;}}_getRevisionsRange(_0x116ac7,_0x98a3c,_0x56998a=!0x1){const _0x101c10=[];let _0x29b55b=this['repository']['getIndex'](_0x116ac7),_0x3f21ea=this['repository']['getIndex'](_0x98a3c);for(-0x1==_0x3f21ea&&(_0x3f21ea=this['repository']['_revisions']['length'],_0x56998a=!0x1);_0x29b55b<_0x3f21ea;)_0x101c10['push'](this['repository']['getRevision'](_0x29b55b)),_0x29b55b++;return _0x56998a&&_0x101c10['push'](this['repository']['getRevision'](_0x29b55b)),_0x101c10;}_threeWayMerge(_0x8d8c07,_0x7e2db5,_0x510973,_0x146cc8){const _0x3d211f=this['editor']['model']['schema'];let _0x58435f=_0x7e2db5;for(;_0x8d8c07[_0x58435f]&&_0x8d8c07[_0x58435f]['isAdded'];)_0x58435f++;let _0x4ddaba=_0x146cc8;for(;_0x510973[_0x4ddaba]&&_0x510973[_0x4ddaba]['isRemoved'];)_0x4ddaba++;_0x1a2a4a(_0x8d8c07,_0x7e2db5,_0x58435f),_0x1a2a4a(_0x510973,_0x146cc8,_0x4ddaba);const _0x3726c9=_0x510973['slice'](_0x146cc8,_0x4ddaba)['concat'](_0x8d8c07['slice'](_0x7e2db5,_0x58435f));return _0x3726c9['sort']((_0x5959db,_0x43e090)=>_0x5959db['side']!=_0x43e090['side']?_0x5959db['side']-_0x43e090['side']:_0x5959db['level']!=_0x43e090['level']?_0x5959db['level']-_0x43e090['level']:_0x5959db['distance']!=_0x43e090['distance']?_0x43e090['distance']-_0x5959db['distance']:!!_0x5959db['isAdded']!=!!_0x43e090['isAdded']?-0x1==_0x5959db['side']||0x0==_0x5959db['side']?_0x5959db['isAdded']?-0x1:0x1:_0x5959db['isAdded']?0x1:-0x1:_0x5959db['index']-_0x43e090['index']),{'commonTape':_0x3726c9,'iEnd':_0x58435f,'jEnd':_0x4ddaba};function _0x1a2a4a(_0x28a19c,_0x14ac3f,_0x352940){let _0xd0e41f=-0x1,_0x174282=Number['POSITIVE_INFINITY'],_0x12e190=!0x0;for(let _0x5d13f9=_0x14ac3f;_0x5d13f9<_0x352940;_0x5d13f9++)if(_0x3d211f['isInline'](_0x28a19c[_0x5d13f9]['item'])||(_0x12e190=!0x1),_0x28a19c[_0x5d13f9]['item']['startIndex']<_0x14ac3f&&(_0xd0e41f=_0x5d13f9),_0x28a19c[_0x5d13f9]['item']['endIndex']>=_0x352940){_0x174282=_0x5d13f9;break;}_0x12e190&&(_0xd0e41f=_0x352940-0x1);for(let _0x529e13=_0x14ac3f;_0x529e13<_0x352940;_0x529e13++)_0x28a19c[_0x529e13]['side']=_0x529e13<=_0xd0e41f?-0x1:_0x529e13<_0x174282?0x0:0x1,_0x28a19c[_0x529e13]['index']=_0x529e13;let _0x516753=0x0;for(let _0x48cb90=_0x14ac3f;_0x48cb90<=_0xd0e41f;_0x48cb90++)0x0==_0x28a19c[_0x48cb90]['distance']?_0x28a19c[_0x48cb90]['level']=_0x516753:(_0x516753++,_0x28a19c[_0x48cb90]['level']=_0x516753,_0x516753++);for(let _0x3a6477=_0x14ac3f;_0x3a6477<_0x352940;_0x3a6477++)0x0==_0x28a19c[_0x3a6477]['side']&&(_0x28a19c[_0x3a6477]['level']=_0x516753);_0x516753=0x0;for(let _0xe98060=_0x352940-0x1;_0xe98060>=_0x174282;_0xe98060--)0x0==_0x28a19c[_0xe98060]['distance']?_0x28a19c[_0xe98060]['level']=_0x516753:(_0x516753--,_0x28a19c[_0xe98060]['level']=_0x516753,_0x516753--);}}_fixObsoleteTags(_0x3ff97f){const _0x19ff9d=new Map(),_0x5c13d9=this['editor']['model']['schema'];for(let _0x253595=0x1;_0x253595<_0x3ff97f['length'];_0x253595++){let _0x7b3871,_0x4aee15,_0x37d365;const _0x30605f=_0x3ff97f[_0x253595],_0x5e5ed8=_0x3ff97f[_0x253595-0x1];if('text'==_0x30605f['type'])continue;if(_0x30605f['type']!=_0x5e5ed8['type'])continue;if(!_0x5c13d9['isBlock'](_0x5e5ed8['item'])||_0x5c13d9['isLimit'](_0x5e5ed8['item']))continue;if(!_0x5c13d9['isBlock'](_0x30605f['item'])||_0x5c13d9['isLimit'](_0x30605f['item']))continue;if((_0x3ff97f[_0x253595]['isAdded']||_0x3ff97f[_0x253595]['isAddSuggestion'])&&_0x3ff97f[_0x253595-0x1]['isRemoved'])_0x7b3871=_0x3ff97f[_0x253595],_0x4aee15=_0x3ff97f[_0x253595-0x1],_0x37d365=_0x253595-0x1;else{if(!_0x3ff97f[_0x253595]['isRemoved']||!_0x3ff97f[_0x253595-0x1]['isAdded']&&!_0x3ff97f[_0x253595-0x1]['isAddSuggestion'])continue;_0x7b3871=_0x3ff97f[_0x253595-0x1],_0x4aee15=_0x3ff97f[_0x253595],_0x37d365=_0x253595;}const _0x5e57e5=_0x7b3871['level']==_0x4aee15['level'],_0x77b8d2=Math['abs'](_0x7b3871['level'])<Math['abs'](_0x4aee15['level'])&&0x0==_0x4aee15['distance'];(_0x5e57e5||_0x77b8d2)&&(_0x19ff9d['set'](_0x4aee15['id'],_0x7b3871['id']),_0x3ff97f['splice'](_0x37d365,0x1),_0x253595--,_0x7b3871['isAdded']=!0x1);}for(let _0x5f632=0x0;_0x5f632<_0x3ff97f['length'];_0x5f632++)_0x19ff9d['has'](_0x3ff97f[_0x5f632]['pairId'])&&(_0x3ff97f[_0x5f632]['pairId']=_0x19ff9d['get'](_0x3ff97f[_0x5f632]['pairId']));}['_removeMissingPairs'](_0x29eaca){const _0x1fda9c=new Set(_0x29eaca['map'](_0x52ed2a=>_0x52ed2a['id']));for(let _0x2209fa=0x0;_0x2209fa<_0x29eaca['length'];_0x2209fa++)_0x1fda9c['has'](_0x29eaca[_0x2209fa]['pairId'])||0x0==_0x29eaca[_0x2209fa]['distance']||(_0x29eaca[_0x2209fa]['isIncorrect']=!0x0);return _0x29eaca['filter'](_0x2dc8ac=>!_0x2dc8ac['isIncorrect']);}_markMismatchedRemovedTags(_0x1d3ee0){const _0x1b4388=new Set();for(let _0x3c5969=0x0;_0x3c5969<_0x1d3ee0['length'];_0x3c5969++){if(_0x1b4388['has'](_0x1d3ee0[_0x3c5969]['id'])&&_0x1d3ee0[_0x3c5969]['isRemoved']&&(_0x1d3ee0[_0x3c5969]['isIncorrect']=!0x0),_0x1d3ee0[_0x3c5969]['isIncorrect'])continue;if(0x0==_0x1d3ee0[_0x3c5969]['distance'])continue;if('elementStart'!=_0x1d3ee0[_0x3c5969]['type'])continue;if(null==_0x1d3ee0[_0x3c5969]['pairId'])continue;let _0x5b23f=_0x3c5969+0x1,_0xac5a81=0x0;for(;_0x1d3ee0[_0x5b23f]['id']!=_0x1d3ee0[_0x3c5969]['pairId'];)'elementStart'==_0x1d3ee0[_0x5b23f]['type']?_0xac5a81++:'elementEnd'==_0x1d3ee0[_0x5b23f]['type']&&_0xac5a81--,_0x5b23f++;if(0x0!=_0xac5a81){if(_0x1d3ee0[_0x3c5969]['isRemoved'])_0x1d3ee0[_0x3c5969]['isIncorrect']=!0x0;else{for(;_0x5b23f!=_0x3c5969;)_0x1d3ee0[_0x5b23f]['isRemoved']&&0x0!=_0x1d3ee0[_0x5b23f]['distance']&&(_0x1d3ee0[_0x5b23f]['isIncorrect']=!0x0,_0x1b4388['add'](_0x1d3ee0[_0x5b23f]['pairId'])),_0x5b23f--;}}}return _0x1d3ee0['filter'](_0x15bc86=>!_0x15bc86['isIncorrect']);}_removeUnsupportedChanges(_0x48b9bc){const _0x251b0c=this['editor']['model']['schema'];for(let _0x4f4feb=0x0;_0x4f4feb<_0x48b9bc['length'];_0x4f4feb++){if(!(_0x48b9bc[_0x4f4feb]['isAdded']||_0x48b9bc[_0x4f4feb]['isAddSuggestion']||_0x48b9bc[_0x4f4feb]['isRemoved']||_0x48b9bc[_0x4f4feb]['isRemoveSuggestion']))continue;if(0x0==_0x48b9bc[_0x4f4feb]['distance'])continue;const _0x1e3494=_0x48b9bc[_0x4f4feb]['item'];_0x251b0c['isBlock'](_0x1e3494)||_0x251b0c['isLimit'](_0x1e3494)||(_0x48b9bc[_0x4f4feb]['isAdded']&&delete _0x48b9bc[_0x4f4feb]['isAdded'],_0x48b9bc[_0x4f4feb]['isAddSuggestion']&&delete _0x48b9bc[_0x4f4feb]['isAddSuggestion'],_0x48b9bc[_0x4f4feb]['isRemoveSuggestion']&&delete _0x48b9bc[_0x4f4feb]['isRemoveSuggestion'],_0x48b9bc[_0x4f4feb]['isRemoved']&&(_0x48b9bc[_0x4f4feb]['isIncorrect']=!0x0));}return _0x48b9bc['filter'](_0x2c6367=>!_0x2c6367['isIncorrect']);}['_makeModelFromTape'](_0xc88c2e,_0x3dab3a,_0x59cd60,_0x507fdb){const _0x1a0a12=new _0x26aeb5(),_0x32f35b=[],_0x532e20=new Map(),_0x3ba0e5=this['editor']['model'],_0x252b9d=_0x3ba0e5['schema'],_0x260085=[_0x1a0a12],_0x42756d={},_0x2e5ec9={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x1a0a12['name']=_0x507fdb;let _0x36b9ed=null;const _0x15a891=[0x0];for(let _0x2739e=0x0;_0x2739e<_0xc88c2e['length'];_0x2739e++)if('elementStart'===_0xc88c2e[_0x2739e]['type']){_0xc88c2e[_0x2739e]['previousPosition']=_0x3ba0e5['createPositionFromPath'](_0x1a0a12,_0x15a891);const _0x14fa7f=new _0xbf4b3e(_0xc88c2e[_0x2739e]['item']['name'],_0xc88c2e[_0x2739e]['item']['getAttributes']());_0x260085[0x0]['_appendChild'](_0x14fa7f),_0x15a891['push'](0x0),_0x260085['unshift'](_0x14fa7f),_0xc88c2e[_0x2739e]['nextPosition']=_0x3ba0e5['createPositionFromPath'](_0x1a0a12,_0x15a891);}else'elementEnd'===_0xc88c2e[_0x2739e]['type']?(_0x260085['shift'](),_0xc88c2e[_0x2739e]['previousPosition']=_0x3ba0e5['createPositionFromPath'](_0x1a0a12,_0x15a891),_0x15a891['pop'](),_0x15a891[_0x15a891['length']-0x1]++,_0xc88c2e[_0x2739e]['nextPosition']=_0x3ba0e5['createPositionFromPath'](_0x1a0a12,_0x15a891)):(_0xc88c2e[_0x2739e]['previousPosition']=_0x3ba0e5['createPositionFromPath'](_0x1a0a12,_0x15a891),_0x36b9ed?_0x36b9ed['_data']+=_0xc88c2e[_0x2739e]['item']['data']:_0x36b9ed=new _0x16a836(_0xc88c2e[_0x2739e]['item']['data'],_0xc88c2e[_0x2739e]['item']['getAttributes']()),_0xc88c2e[_0x2739e+0x1]&&'text'===_0xc88c2e[_0x2739e+0x1]['type']&&_0x369d66(_0x36b9ed,_0xc88c2e[_0x2739e+0x1]['item'])||(_0x260085[0x0]['_appendChild'](_0x36b9ed),_0x36b9ed=null),_0x15a891[_0x15a891['length']-0x1]+=_0xc88c2e[_0x2739e]['item']['offsetSize'],_0xc88c2e[_0x2739e]['nextPosition']=_0x3ba0e5['createPositionFromPath'](_0x1a0a12,_0x15a891));for(let _0x435a92=0x0;_0x435a92<_0xc88c2e['length'];_0x435a92++){const _0x318218=_0xc88c2e[_0x435a92]['previousPosition'],_0x12fe48=_0xc88c2e[_0x435a92]['nextPosition'];for(const _0x3c7c00 of _0xc88c2e[_0x435a92]['markersStart'])_0x532e20['set'](_0x3c7c00,{'start':_0x318218,'end':null});_0x92a34b('isRemoveSuggestion',_0x435a92,_0x318218,_0x12fe48),_0x92a34b('isAddSuggestion',_0x435a92,_0x318218,_0x12fe48),_0x92a34b('isRemoved',_0x435a92,_0x318218,_0x12fe48),_0x92a34b('isAdded',_0x435a92,_0x318218,_0x12fe48);for(const _0x1a15b9 of _0xc88c2e[_0x435a92]['markersEnd']){const _0x4647ab=_0x532e20['get'](_0x1a15b9);_0x4647ab?_0x4647ab['end']=_0x12fe48:_0x532e20['set'](_0x1a15b9,{'start':_0x12fe48,'end':_0x12fe48});}}for(const [_0x22c023,_0x3ca4a9]of _0x532e20){const _0x3f0238=this['editor']['model']['createRange'](_0x3ca4a9['start'],_0x3ca4a9['end']);_0x1a0a12['markers']['set'](_0x22c023,_0x3f0238);}return _0x32f35b['sort']((_0xae68fa,_0x1d4664)=>{const _0x3d6242=_0x1a0a12['markers']['get']('revision:'+_0xae68fa['id']),_0x2eef3c=_0x1a0a12['markers']['get']('revision:'+_0x1d4664['id']);return _0x3d6242['start']['isBefore'](_0x2eef3c['start'])?-0x1:_0x3d6242['start']['isAfter'](_0x2eef3c['start'])?0x1:_0x3d6242['end']['isBefore'](_0x2eef3c['end'])?-0x1:_0x3d6242['end']['isAfter'](_0x2eef3c['end'])?0x1:'add'===_0xae68fa['type']?-0x1:0x1;}),{'root':_0x1a0a12,'changes':_0x32f35b};function _0x92a34b(_0x2f8998,_0x5d9c0d,_0x972319,_0x454dab){const _0x367477=!!_0xc88c2e[_0x5d9c0d][_0x2f8998],_0x19d671=_0x367477?_0xc88c2e[_0x5d9c0d][_0x2f8998]['userId']:null,_0x88d0c8=_0x367477&&_0xc88c2e[_0x5d9c0d][_0x2f8998]['aiSource']||null,_0x45ee5e=_0x5d9c0d===_0xc88c2e['length']-0x1,_0x5b77f3=_0x2e5ec9[_0x2f8998][0x0],_0x472ba1=_0x252b9d['isObject'](_0xc88c2e[_0x5d9c0d]['item']);!_0x42756d[_0x2f8998]&&_0x367477?_0x42756d[_0x2f8998]={'start':_0x972319,'tapeItem':_0xc88c2e[_0x5d9c0d],'userId':_0x19d671,'aiSource':_0x88d0c8,'type':_0x2f8998}:_0x42756d[_0x2f8998]&&!_0x367477?(_0x42756d[_0x2f8998]['end']=_0x972319,_0x32fe64(_0x42756d[_0x2f8998]),_0x42756d[_0x2f8998]=null):_0x42756d[_0x2f8998]&&_0x367477&&(_0x42756d[_0x2f8998]['userId']!==_0x19d671||_0x42756d[_0x2f8998]['aiSource']!==_0x88d0c8)&&(_0x42756d[_0x2f8998]['end']=_0x972319,_0x5b77f3&&_0x5b77f3['userId']===_0x42756d[_0x2f8998]['userId']?_0x5b77f3['change']['aiSource']=_0x5b77f3['change']['aiSource']||_0x42756d[_0x2f8998]['aiSource']:_0x32fe64(_0x42756d[_0x2f8998]),_0x42756d[_0x2f8998]={'start':_0x972319,'tapeItem':_0xc88c2e[_0x5d9c0d],'userId':_0x19d671,'aiSource':_0x88d0c8,'type':_0x2f8998}),_0x42756d[_0x2f8998]&&_0x472ba1&&('elementStart'!==_0xc88c2e[_0x5d9c0d]['type']||_0x5b77f3&&_0x5b77f3['userId']===_0x19d671||_0x2e5ec9[_0x2f8998]['unshift']({'userId':_0x19d671,'object':_0xc88c2e[_0x5d9c0d]['item'],'change':_0x42756d[_0x2f8998]}),'elementEnd'===_0xc88c2e[_0x5d9c0d]['type']&&_0x5b77f3&&_0x5b77f3['object']===_0xc88c2e[_0x5d9c0d]['item']&&(_0x2e5ec9[_0x2f8998]['shift'](),_0x42756d[_0x2f8998]=_0x5b77f3['change'])),_0x42756d[_0x2f8998]&&_0x45ee5e&&(_0x42756d[_0x2f8998]['end']=_0x454dab,_0x32fe64(_0x42756d[_0x2f8998]),_0x42756d[_0x2f8998]=null);}function _0x32fe64({start:_0x4f3eaf,end:_0x247680,tapeItem:_0x391a91,userId:_0x3455e2,aiSource:_0x168630,type:_0x1e8f8c}){const _0x29f4ed=_0x391a91['item'],_0x42123d=_0x3ba0e5['schema']['isBlock'](_0x29f4ed)&&!_0x3ba0e5['schema']['isLimit'](_0x29f4ed),_0x19c492=_0x4f3eaf['nodeAfter']==_0x247680['parent']&&_0x247680['isAtStart'];if(_0x42123d&&_0x19c492)return;const _0x34727c=_0x3ba0e5['createRange'](_0x4f3eaf,_0x247680),_0x27e5ed=_0x3dab3a['get'](_0x3455e2),_0x3695e9=new Tt({'author':_0x27e5ed,'type':'isAdded'==_0x1e8f8c||'isAddSuggestion'==_0x1e8f8c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x1e8f8c||'isRemoveSuggestion'==_0x1e8f8c,'aiSource':_0x168630||null},'createdAt':new Date(),'rootName':_0x59cd60});_0x32f35b['push'](_0x3695e9),_0x1a0a12['markers']['set']('revision:'+_0x3695e9['id'],_0x34727c);}function _0x369d66(_0x437620,_0x5ae5dc){const _0x17ae31=_0x437620['getAttributes'](),_0x32e077=_0x5ae5dc['getAttributes']();for(const _0x2eeb7b of _0x17ae31){if(_0x2eeb7b[0x1]!==_0x5ae5dc['getAttribute'](_0x2eeb7b[0x0]))return!0x1;_0x32e077['next']();}return _0x32e077['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x4bea95=>{const _0x1c5e9f=_0x4bea95['markerName']['split'](':')[0x1],_0xe8e743=this['_getChangeFromId'](_0x1c5e9f);if(!_0xe8e743)return null;const _0x20fd5c='add'==_0xe8e743['type']?'insertion':'deletion',_0x381c62=['ck-suggestion-marker','ck-suggestion-marker-'+_0x20fd5c];return _0xe8e743['data']['isSuggestion']&&_0x381c62['push']('ck-suggestion-marker-'+_0x20fd5c+'-new'),this['activeChange']==_0xe8e743&&_0x381c62['push']('ck-suggestion-marker--active'),{'classes':_0x381c62,'attributes':{'data-change-id':_0x1c5e9f}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x18ff17=>{_0x18ff17['on']('element:pre',(_0x92ed3f,_0x41fca6,_0x20154b)=>{const _0xa733b8=_0x41fca6['viewItem']['getChild'](0x0);if(!_0xa733b8||!_0xa733b8['is']('element','code'))return;if(!_0x20154b['consumable']['consume'](_0xa733b8,{'attributes':['vid_start','vid_end']}))return;const _0x42bd29=_0x41fca6['modelRange']['start']['nodeAfter'];_0x20154b['writer']['setAttribute']('vid_start',_0xa733b8['getAttribute']('vid_start'),_0x42bd29),_0x20154b['writer']['setAttribute']('vid_end',_0xa733b8['getAttribute']('vid_end'),_0x42bd29);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x38accb=>{_0x38accb['on']('element',(_0xcdef10,_0xe7dde2,_0x297d92)=>{if(!_0x297d92['consumable']['consume'](_0xe7dde2['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0xe7dde2['modelRange']['isCollapsed'])return;const _0x58b2e5=_0xe7dde2['modelRange']['start']['nodeAfter'];_0x58b2e5['hasAttribute']('vid_start')||_0x58b2e5['hasAttribute']('vid')||(_0x297d92['writer']['setAttribute']('vid_start',_0xe7dde2['viewItem']['getAttribute']('vid_start'),_0x58b2e5),_0x297d92['writer']['setAttribute']('vid_end',_0xe7dde2['viewItem']['getAttribute']('vid_end'),_0x58b2e5));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x56f167=>_0x56f167['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x28adda,[,_0x440315])=>{['vid_start','vid_end','vid']['includes'](_0x440315)&&(_0x28adda['return']=!0x0,_0x28adda['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x334c9a=>{_0x334c9a['on']('attribute:vid',(_0x3d0476,_0x544ea0,_0x3e856d)=>{if('\x20'!=_0x544ea0['item']['data']||_0x544ea0['item']['parent']['maxOffset']>0x1)return;if(!_0x3e856d['consumable']['consume'](_0x544ea0['item'],_0x3d0476['name']))return;const _0x568369=_0x3e856d['writer'],_0xad1aab=_0x3e856d['mapper']['toViewRange'](_0x544ea0['range']);_0x568369['wrap'](_0xad1aab,_0x568369['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x867b76){const _0x1ad0ea=_0x867b76['plugins']['get']('RevisionViewer');return(_0x59ce55,_0x4f2e9b,_0x146fbf)=>{const _0xcdbc59=_0x4f2e9b['markerName']['split'](':')[0x1],_0x103d68=_0x1ad0ea['_getChangeFromId'](_0xcdbc59);if(!_0x103d68)return null;const _0xe18b73='add'==_0x103d68['type']?'split':'merge';if(!_0x146fbf['consumable']['test'](_0x4f2e9b['markerRange'],_0x59ce55['name']))return;const _0x2dadc0=_0x4f2e9b['markerRange']['getWalker'](),_0x100bcb=_0x4f2e9b['markerRange']['start'],_0x3f9c17=_0x867b76['model']['schema'];let _0x5ed4f9=null,_0x31f8ab=null,_0x13ec3e=!0x1,_0x597326=!0x1;for(const _0x170599 of _0x2dadc0){const _0x430d3a=_0x170599['item'];_0x13ec3e=_0x13ec3e||_0x3f9c17['isContent'](_0x430d3a);const _0x554e4a=_0x146fbf['mapper']['toViewElement'](_0x430d3a);if(_0x554e4a&&_0x554e4a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x170599['type']&&(_0x3f9c17['isBlock'](_0x430d3a)&&!_0x3f9c17['isLimit'](_0x430d3a)&&(_0x430d3a['nextSibling']||_0x100bcb['isAtEnd']?_0x5ed4f9&&_0x5ed4f9['parent']==_0x430d3a||(_0x5ed4f9=_0x430d3a,_0x457610(_0x170599['previousPosition']),_0x597326=!0x0):_0x31f8ab=_0x31f8ab||_0x170599['previousPosition']));}function _0x457610(_0x143a1b){const _0x4aae88=_0x146fbf['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xe18b73}),_0x1fdf2d=_0x146fbf['mapper']['toViewPosition'](_0x143a1b);_0x103d68['data']['isSuggestion']&&_0x146fbf['writer']['addClass']('ck-suggestion-marker-'+_0xe18b73+'-new',_0x4aae88),_0x1ad0ea['activeChange']==_0x103d68&&_0x146fbf['writer']['addClass']('ck-suggestion-marker--active',_0x4aae88),_0x146fbf['writer']['insert'](_0x1fdf2d,_0x4aae88),_0x146fbf['mapper']['bindElementToMarker'](_0x4aae88,_0x4f2e9b['markerName']);}_0x13ec3e||_0x597326||!_0x31f8ab||_0x457610(_0x31f8ab);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x80677b,_0x2aede0,_0x537adb)=>{const _0x45d69e=_0x537adb['mapper']['markerNameToElements'](_0x2aede0['markerName']);if(_0x45d69e){for(const _0x47dc87 of _0x45d69e)(_0x47dc87['hasClass']('ck-suggestion-marker-split')||_0x47dc87['hasClass']('ck-suggestion-marker-merge'))&&(_0x537adb['mapper']['unbindElementFromMarkerName'](_0x47dc87,_0x2aede0['markerName']),_0x537adb['writer']['remove'](_0x47dc87));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x27554a,_0x3f87a8,_0x5235eb)=>{const _0x3fdeb9=_0x3f87a8['markerName']['split'](':')[0x1],_0x466cb6=this['_getChangeFromId'](_0x3fdeb9);if(!_0x466cb6)return null;const _0x145093='add'==_0x466cb6['type']?'split':'merge';if(_0x5235eb['consumable']['test'](_0x3f87a8['markerRange'],_0x27554a['name']))for(const _0x32ec46 of _0x3f87a8['markerRange']['getItems']()){if(!_0x32ec46['is']('element','softBreak'))continue;const _0x373984=_0x5235eb['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x145093}),_0xc6f8=_0x5235eb['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x32ec46));_0x466cb6['data']['isSuggestion']&&_0x5235eb['writer']['addClass']('ck-suggestion-marker-'+_0x145093+'-new',_0x373984),this['activeChange']==_0x466cb6&&_0x5235eb['writer']['addClass']('ck-suggestion-marker--active',_0x373984),_0x5235eb['writer']['insert'](_0xc6f8,_0x373984),_0x5235eb['mapper']['bindElementToMarker'](_0x373984,_0x3f87a8['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4e11de=>{for(const _0x5ce97f of this['editor']['model']['document']['getRootNames']()){const _0xa89377=this['editor']['model']['document']['getRoot'](_0x5ce97f),_0x108dae=this['editor']['editing']['view']['document']['getRoot'](_0x5ce97f);if(_0x108dae){const _0xf114c9=_0xa89377['getAttribute']('revisionHistoryAttachChange');if(_0x4e11de['removeAttribute']('data-change-id',_0x108dae),_0x4e11de['removeClass']('ck-revision-history-root-add',_0x108dae),_0x4e11de['removeClass']('ck-revision-history-root-remove',_0x108dae),_0x4e11de['removeClass']('ck-revision-history-root--active',_0x108dae),_0xf114c9){const _0x1b1dc9=this['_getChangeFromId'](_0xf114c9);if(!_0x1b1dc9)return null;_0x4e11de['setAttribute']('data-change-id',_0xf114c9,_0x108dae),_0x4e11de['addClass']('ck-revision-history-root-'+_0x1b1dc9['type'],_0x108dae),this['activeChange']==_0x1b1dc9&&_0x4e11de['addClass']('ck-revision-history-root--active',_0x108dae);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xbb1b0a=>'revision-comment:'+_0xbb1b0a,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0xa0fdee=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Pt(_0xa0fdee['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x581e52=>'revision-suggestion:'+_0x581e52,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3c8da9=>({'name':'suggestion:'+_0x3c8da9,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x2f8476=>{const _0x56890d=_0x2f8476['markerName']['split'](':')[0x1];return'insertion'!=_0x56890d&&'deletion'!=_0x56890d?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x56890d]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ut(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ut(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0xa0c7d8,_0x13294a,_0x499c8e)=>{const _0x4131d0=_0x499c8e['mapper']['markerNameToElements'](_0x13294a['markerName']);if(_0x4131d0){for(const _0x4ae7fa of _0x4131d0)_0x4ae7fa['is']('uiElement')&&(_0x499c8e['mapper']['unbindElementFromMarkerName'](_0x4ae7fa,_0x13294a['markerName']),_0x499c8e['writer']['remove'](_0x4ae7fa));}},{'priority':'high'});}_getChangeFromId(_0xd7f3fb){return this['_changeIdToChange']['get'](_0xd7f3fb);}_getViewForChange(_0x478536){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Dt(this['editor']['locale'],_0x478536,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2ed1ce,_0x13b13d,_0x5dd92b,_0xa0bd61)=>{_0xa0bd61&&this['_balloon']['remove'](_0xa0bd61),_0x5dd92b&&(this['_balloon']['add']({'view':_0x5dd92b,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2bb775=this['editor']['editing'],_0x20106f=this['_getChangeFromId'](_0x5dd92b['changeId']);let _0x16696c;if(_0x20106f['data']['isOnRoot']){const _0x39d637=_0x2bb775['view']['getDomRoot'](_0x20106f['rootName']);_0x16696c=Array['from'](_0x39d637['getClientRects']());}else{const _0x199f89=this['editor']['model']['markers']['get']('revision:'+_0x5dd92b['changeId']);_0x16696c=Array['from'](_0x2bb775['mapper']['markerNameToElements'](_0x199f89['name']))['map'](_0x38c525=>_0x2bb775['view']['domConverter']['mapViewToDom'](_0x38c525))['map'](_0x54b4db=>Array['from'](_0x54b4db['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x16696c['find'](_0x47b6d7=>_0x47b6d7['top']-0x3<=this['_activeViewTarget']['y']&&_0x47b6d7['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x47b6d7['left']-0x3<=this['_activeViewTarget']['x']&&_0x47b6d7['right']+0x3>=this['_activeViewTarget']['x'])||_0x16696c[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x344c5c,_0x8aa08e,_0x50523d,_0x107bc6)=>{this['activeView']=_0x50523d?this['_getViewForChange'](_0x50523d):null,this['editor']['model']['change'](()=>{const _0x383cd3=this['editor']['editing'];_0x107bc6&&(_0x107bc6['data']['isOnRoot']?_0x383cd3['view']['change'](_0x6c1333=>{_0x6c1333['removeClass']('ck-revision-history-root--active',_0x383cd3['view']['document']['getRoot'](_0x107bc6['rootName']));}):_0x383cd3['reconvertMarker']('revision:'+_0x107bc6['id'])),_0x50523d&&(_0x50523d['data']['isOnRoot']?_0x383cd3['view']['change'](_0x53e834=>{_0x53e834['addClass']('ck-revision-history-root--active',_0x383cd3['view']['document']['getRoot'](_0x50523d['rootName']));}):_0x383cd3['reconvertMarker']('revision:'+_0x50523d['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3325f4,_0x5b1cef)=>{if(this['activeChange'])return;const _0x316de5=this['_findChangeIdFromDomTarget'](_0x5b1cef['target']),_0x5050b1=this['_changeIdToChange']['get'](_0x316de5);_0x5050b1?(this['_activeViewTarget']={'x':_0x5b1cef['domEvent']['x'],'y':_0x5b1cef['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x5050b1)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x510e26,_0x56a263)=>{const _0x1d1a35=this['_findChangeIdFromDomTarget'](_0x56a263['target']),_0x3a0567=this['_changeIdToChange']['get'](_0x1d1a35);_0x3a0567?(this['_activeViewTarget']={'x':_0x56a263['domEvent']['x'],'y':_0x56a263['domEvent']['y']},_0x3a0567===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x3a0567):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x4c7852){do{const _0x3e1306=_0x4c7852['getAttribute']('data-change-id');if(_0x3e1306)return _0x3e1306;_0x4c7852=_0x4c7852['parent'];}while(_0x4c7852);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x386d59=>{for(const _0x4dda17 of this['editor']['model']['markers'])_0x386d59['removeMarker'](_0x4dda17);});}};function Pt(_0x2e6fc5){return _0x2e6fc5['split'](':')[0x1];}function Ut(_0x381ccb,_0x18a94e){return(_0x5d09a8,_0x4bb555,_0x8836eb)=>{if(!_0x8836eb['consumable']['test'](_0x4bb555['markerRange'],_0x5d09a8['name']))return;const _0x2b5d61=_0x4bb555['markerRange']['getWalker'](),_0x176e51=_0x4bb555['markerRange']['start'],_0x10c210=_0x381ccb['model']['schema'];let _0x59c6ed=null,_0x3361a5=null,_0x595b82=!0x1,_0x4a9f6a=!0x1;for(const _0x5bf20a of _0x2b5d61){const _0x46607f=_0x5bf20a['item'];_0x595b82=_0x595b82||_0x10c210['isContent'](_0x46607f);const _0x482e5c=_0x8836eb['mapper']['toViewElement'](_0x46607f);if(_0x482e5c&&_0x482e5c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5bf20a['type']&&(_0x10c210['isBlock'](_0x46607f)&&!_0x10c210['isLimit'](_0x46607f)&&(_0x46607f['nextSibling']||_0x176e51['isAtEnd']?_0x59c6ed&&_0x59c6ed['parent']==_0x46607f||(_0x59c6ed=_0x46607f,_0x1a780f(_0x5bf20a['previousPosition']),_0x4a9f6a=!0x0):_0x3361a5=_0x3361a5||_0x5bf20a['previousPosition']));}function _0x1a780f(_0xc31903){const _0x3f8b3d=_0x8836eb['mapper']['toViewPosition'](_0xc31903),_0x4e0908=_0x8836eb['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x18a94e});_0x8836eb['writer']['insert'](_0x3f8b3d,_0x4e0908),_0x8836eb['mapper']['bindElementToMarker'](_0x4e0908,_0x4bb555['markerName']);}_0x595b82||_0x4a9f6a||!_0x3361a5||_0x1a780f(_0x3361a5);};}var Lt=class extends _0x13da06{constructor(_0x3f332b){super(_0x3f332b);const _0x23d171=_0x3f332b['plugins']['get'](Ht);this['affectsData']=!0x1,this['listenTo'](_0x23d171,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x23d171,'change:isEnabled',()=>this['refresh']());}execute(){const _0x3ddf02=this['editor'],_0x16e3d8=_0x3ddf02['plugins']['get'](Ht),_0x3cb1c6=_0x16e3d8['isReady']?_0x16e3d8['diff']['newRevisionId']:null;_0x3ddf02['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3cb1c6);}['refresh'](){const {isReady:_0x23d62c,isEnabled:_0x37aa76,repository:_0x759c79,diff:_0x2a8687}=this['editor']['plugins']['get'](Ht),_0x19e95f=_0x2a8687&&_0x759c79['getLaterVisibleRevision'](_0x2a8687['newRevisionId']);this['isEnabled']=_0x23d62c&&_0x37aa76&&Boolean(_0x19e95f);}},Ft=class extends _0x13da06{_step;constructor(_0x2cc158,{direction:_0x2d8943}){super(_0x2cc158);const _0x463066=_0x2cc158['plugins']['get'](Ht);this['affectsData']=!0x1,this['_step']='forward'===_0x2d8943?0x1:-0x1,this['listenTo'](_0x463066,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x463066,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x463066,'change:activeChange',()=>this['refresh']());}execute(){const _0xdb2aa0=this['editor'],_0x34563f=_0xdb2aa0['plugins']['get'](Ht),{isNavigationMode:_0x2c6be8,currentChangeNumber:_0x36da2b}=_0x34563f;let _0x51d102;if(_0x34563f['activeChange']=_0x2c6be8?_0x34563f['diff']['changes']['get'](_0x36da2b+this['_step']):_0x34563f['diff']['changes']['first'],_0x34563f['activeChange']['data']['isOnRoot'])_0x51d102=_0xdb2aa0['editing']['view']['getDomRoot'](_0x34563f['activeChange']['rootName']);else{const _0x579cf0=_0xdb2aa0['model']['markers']['get']('revision:'+_0x34563f['activeChange']['id']);_0x51d102=_0x15e3da(_0xdb2aa0['editing'],_0x579cf0);}_0x38cf38({'target':_0x51d102,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x20bddb,currentChangeNumber:_0x1f6532,numberOfChanges:_0x4acb8d,isReady:_0x148056,isEnabled:_0x98a635}=this['editor']['plugins']['get'](Ht);this['isEnabled']=!!(_0x98a635&&_0x148056&&_0x4acb8d)&&(!_0x20bddb||(0x1===this['_step']?_0x1f6532<_0x4acb8d-0x1:_0x1f6532>0x0));}},$t=class extends ut{constructor(_0x1fad7b){super(_0x1fad7b);const _0x4b345b=this['bindTemplate'],_0x2d90e9=new _0x5e5c23(_0x1fad7b),_0x1c5222=new _0x5e5c23(_0x1fad7b);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',(_0x2487c5,_0x502099)=>_0x2487c5&&_0x502099>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x24fa6a,_0x3be033,_0x32e0f9,_0x4fc3d5)=>{if(!_0x24fa6a)return Rt(_0x1fad7b,'Loading...');if(!_0x32e0f9)return Rt(_0x1fad7b,'No\x20changes');const _0x192558=Rt(_0x1fad7b,'NUMBER_OF_CHANGES',_0x32e0f9);return _0x4fc3d5?Rt(_0x1fad7b,'X_OF_Y_CHANGES',[_0x3be033+0x1,_0x32e0f9]):_0x192558;}),_0x2d90e9['set']({'label':Rt(_0x1fad7b,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x51c6dd}),_0x1c5222['set']({'label':Rt(_0x1fad7b,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x1e9bd1}),_0x2d90e9['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1c5222['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2d90e9['on']('execute',()=>this['fire']('execute','backward')),_0x1c5222['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',_0x4b345b['if']('_isStatusLabelVisible','ck-hidden',_0xb29d36=>!_0xb29d36)]},'children':[{'text':_0x4b345b['to']('isNavigationMode',_0x337fc4=>_0x337fc4?Rt(_0x1fad7b,'EDIT_X_OF_Y_REVISIONS')+':\x20':Rt(_0x1fad7b,'Total')+':\x20')}]},{'text':_0x4b345b['to']('_statusText')}]},new ht(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2d90e9,_0x1c5222]}]});}};const Bt='ck-editor__editable__loading-overlay';var jt=class extends _0x346362{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1eb993=this['editor']['editing']['view'];_0x1eb993['change'](_0x39caaa=>{for(const _0xc49d10 of _0x1eb993['document']['roots'])_0x39caaa['addClass'](Bt,_0xc49d10);});}['hide'](){const _0x3f78fb=this['editor']['editing']['view'];_0x3f78fb['change'](_0x10dfb7=>{for(const _0x2d2682 of _0x3f78fb['document']['roots'])_0x10dfb7['removeClass'](Bt,_0x2d2682);});}},Gt=class extends _0x346362{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht,jt];}init(){const _0x56cd97=this['editor'],_0x2be686=_0x56cd97['plugins']['get'](Ht),_0x1f1228=_0x56cd97['plugins']['get'](jt);_0x56cd97['ui']['componentFactory']['add']('exitToEditing',_0x100b99=>{const _0x212567=new _0x5e5c23(_0x100b99);return _0x212567['set']({'label':Rt(_0x100b99,'Back\x20to\x20editing'),'icon':_0x376710,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x212567,'execute',()=>{_0x56cd97['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x212567;}),_0x56cd97['ui']['componentFactory']['add']('restoreRevision',_0x213dd5=>{const _0x2c553b=new _0x5e5c23(_0x213dd5);return _0x2c553b['set']({'label':Rt(_0x213dd5,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2c553b['bind']('isEnabled')['to'](_0x56cd97['commands']['get']('restoreRevision')),this['listenTo'](_0x2c553b,'execute',()=>_0x56cd97['execute']('restoreRevision')),_0x2c553b;}),_0x56cd97['ui']['componentFactory']['add']('changesNavigation',_0x560cce=>{const _0x2dd02a=new $t(_0x560cce),_0x569158=_0x56cd97['commands']['get']('showPreviousChange'),_0x1145a1=_0x56cd97['commands']['get']('showNextChange');return _0x2dd02a['bind']('isBackwardNavigationEnabled')['to'](_0x569158,'isEnabled'),_0x2dd02a['bind']('isForwardNavigationEnabled')['to'](_0x1145a1,'isEnabled'),_0x2dd02a['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2be686),this['listenTo'](_0x2dd02a,'execute',(_0x3a1a44,_0x4c5b1a)=>{_0x56cd97['execute']('forward'===_0x4c5b1a?'showNextChange':'showPreviousChange');}),_0x2dd02a;}),_0x1f1228['show'](),_0x2be686['on']('change:isReady',(_0x12f510,_0x68c601,_0x54370c)=>{_0x54370c?_0x1f1228['hide']():_0x1f1228['show']();});}},Kt=class extends tt{['_resizeObserver']=null;constructor(_0xba55d0,_0x2a5468){super(_0xba55d0,_0x2a5468);const _0x147ba7=this['bindTemplate'];this['set']({'label':Rt(_0xba55d0,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=Rt(_0xba55d0,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x147ba7['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0xbf69d5(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x34b0d4=this['fieldView']['element'];this['_tooltipString']=_0x34b0d4['scrollWidth']>_0x34b0d4['clientWidth']&&_0x34b0d4['value']||'';}},qt=class extends ut{constructor(_0xc2a2e9,_0x25c4ab,_0x18ccba){super(_0xc2a2e9);const _0x4016cc=new _0x531655();_0x4016cc['set']({'content':_0x1afa58,'viewBox':'0\x200\x2011\x2010'});const _0x2e3d6f=['ck','ck-revision-history-sidebar__revision-author'];_0x18ccba&&_0x2e3d6f['push']('ck-revision-history-sidebar__revision-author_creator');const _0x39ad1a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':Rt(_0xc2a2e9,_0x18ccba?'Revision\x20creator':'Revision\x20author')},'children':[_0x4016cc,_0x25c4ab['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2e3d6f},'children':_0x39ad1a});}};function Yt(_0x1e5e98,_0xa03354){const _0x3a4a1c=_0x1e5e98['bindTemplate'],_0x472dce=_0x1e5e98['locale'],_0x3c6592=ft(_0x472dce);_0x3c6592['panelPosition']='sw';const _0x5df48c=function(_0x22a96a,_0x2f5209){const _0x45f782=function(_0x1ebc98,_0x3fef2b){const _0x581cbf=_0x1ebc98['locale'],_0x58ce8f={'Compare\x20against\x20selected':Rt(_0x581cbf,'Compare\x20against\x20selected'),'Name\x20this\x20revision':Rt(_0x581cbf,'Name\x20this\x20revision'),'Restore\x20this\x20revision':Rt(_0x581cbf,'Restore\x20this\x20revision')};return _0x3fef2b['map'](_0x3b80ff=>{const _0x1c40ce=_0x58ce8f[_0x3b80ff['name']];return _0x1c40ce&&_0x1c40ce!==_0x3b80ff['name']&&(_0x3b80ff['name']=_0x1c40ce),_0x3b80ff;});}(_0x22a96a,_0x2f5209),_0x2c71a8=new _0xbe92c9();for(const _0x30781a of _0x45f782){const _0x59a920={'type':'button','model':new lt({'label':_0x30781a['name'],'class':_0x30781a['class'],'withText':!0x0,'role':'menuitem','_action':_0x30781a['action']})};_0x59a920['model']['bind']('isEnabled')['to'](_0x22a96a,'isActionsDropdownOpen',_0x284569=>'function'!=typeof _0x30781a['isEnabled']||(!_0x284569||_0x30781a['isEnabled'](_0x22a96a))),_0x2c71a8['add'](_0x59a920);}return _0x2c71a8;}(_0x1e5e98,_0xa03354);return _0x1e5e98['bind']('isActionsDropdownOpen')['to'](_0x3c6592,'isOpen'),_0x3c6592['buttonView']['set']({'label':Rt(_0x472dce,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x49d523}),_0x3c6592['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3a4a1c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3a4a1c['to'](_0x32e3b1=>_0x32e3b1['stopPropagation']())}}),_0x3c6592['on']('execute',_0x585a9a=>{_0x1e5e98['isReady']&&'function'==typeof _0x585a9a['source']['_action']&&_0x585a9a['source']['_action'](_0x1e5e98);}),dt(_0x3c6592,_0x5df48c,{'role':'menu'}),_0x3c6592['listenTo'](_0x1e5e98,'change:isActionsDropdownOpen',(_0x526091,_0x1a5d96,_0x3e564d)=>{if(_0x3e564d)for(const _0x2e9170 of _0x3c6592['listView']['items']){const _0x519384=_0x2e9170['children']['first'],_0x56a1e2=_0xa03354['find'](_0x5912a1=>_0x5912a1['action']===_0x519384['_action'])['isVisible'];_0x2e9170['isVisible']=void 0x0===_0x56a1e2||_0x56a1e2(_0x1e5e98);}}),_0x3c6592;}const Jt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x3a814f,Collection as _0x2ec604,ElementReplacer as _0x1a25f0,FocusTracker as _0x253368,KeystrokeHandler as _0x340454,ObservableMixin as _0x1aab40,ResizeObserver as _0x522f19,logWarning as _0x211177,scrollViewportToShowTarget as _0x189bf5,uid as _0x17aa1f}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x1afd15,isEqual as _0x55db0c,set as _0x629e27,unset as _0x2426ca}from'es-toolkit/compat';import{Command as _0x5aebd8,Editor as _0x332c4e,ElementApiMixin as _0x346494,PendingActions as _0xff638c,Plugin as _0x560756}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x4f76d7,PillView as _0x4dbb8b,Users as _0xa0a7e,getMarkerDomElement as _0x397650,reRootOperation as _0x4cfc3e,reRootPosition as _0x3bea13,reRootRange as _0x4cd0b1,sanitizeEditorConfig as _0x4f3cc6}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x226390,ModelElement as _0x5eb196,ModelRange as _0x4deb36,ModelText as _0xe748af,ViewAttributeElement as _0x347913,ViewContainerElement as _0x47c3c6,ViewDocumentFragment as _0x42fe55,ViewElement as _0x7b5336,ViewEmptyElement as _0x3fe7a8,ViewRawElement as _0x319f29,ViewText as _0x35c90f,ViewUIElement as _0x18e7e8}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x25ea18,IconChevronUp as _0x2f2726,IconHistory as _0x1666dc,IconSparkle as _0x1b1789,IconThreeVerticalDots as _0x2477e6,IconUndo as _0x4723da,IconUser as _0x44432f}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x1026bb,ButtonView as _0x28da59,ContextualBalloon as _0x525ab0,CssTransitionDisablerMixin as _0x752e76,EditorUI as _0x4b98da,IconView as _0x47b26e,InlineEditableUIView as _0x3a3fd5,LabeledFieldView as tt,ListItemView as it,ListView as et,MenuBarMenuListItemButtonView as st,MenuBarMenuListItemView as nt,MenuBarMenuListView as ot,MenuBarMenuView as rt,StickyPanelView as at,ToolbarSeparatorView as ht,ToolbarView as ct,UIModel as lt,View as ut,addListToDropdown as dt,createDropdown as ft,createLabeledInputText as vt,normalizeToolbarConfig as gt,submitHandler as mt}from'@ckeditor/ckeditor5-ui';import{DateTime as _t}from'luxon';const wt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1aab40();var pt=class extends wt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x2650d2){super(),this['id']=_0x2650d2['id']||_0x17aa1f(),this['creator']=_0x2650d2['creator']||null,this['authors']=_0x2650d2['authors']||[],this['diffData']=_0x2650d2['diffData']||null,this['toVersion']=_0x2650d2['toVersion']||0x0,this['fromVersion']=_0x2650d2['fromVersion']||0x0,this['set']('name',_0x2650d2['name']||''),this['set']('createdAt',_0x2650d2['createdAt']||new Date()),this['set']('attributes',_0x2650d2['attributes']||{});}setName(_0x111fc5){this['_update']({'name':_0x111fc5});}setAttribute(_0x368f94,_0x6da367){const _0x2868b7=_0x1afd15(this['attributes']);_0x629e27(_0x2868b7,_0x368f94,_0x6da367),this['_update']({'attributes':_0x2868b7});}removeAttribute(_0xbfa41e){const _0x37d729=_0x1afd15(this['attributes']);_0x2426ca(_0x37d729,_0xbfa41e),this['_update']({'attributes':_0x37d729});}_update(_0x1055b3,_0x1fe169=!0x1){let _0x2f2048=!0x1;const _0x513fe9={'id':this['id']};for(const _0x33c73f of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x5517f2=_0x1055b3[_0x33c73f];void 0x0!==_0x5517f2&&_0x5517f2!==this[_0x33c73f]&&(this[_0x33c73f]=_0x5517f2,_0x513fe9[_0x33c73f]=_0x5517f2,_0x2f2048=!0x0);}_0x2f2048&&(_0x513fe9['authors']&&(_0x513fe9['authorsIds']=_0x513fe9['authors']['map'](_0x4b8b64=>_0x4b8b64['id']),delete _0x513fe9['authors']),this['fire']('_update',_0x513fe9,_0x1fe169));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x265241=>_0x265241['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},yt=class extends _0x560756{['_revisions'];static get requires(){return[_0xa0a7e];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x4e65de){super(_0x4e65de),this['_revisions']=new _0x2ec604();}afterInit(){!async function(_0x413ecc){const _0x3d05be='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0xa95c3a=0xeb829,_0x35b155=0x79998,_0x4b529c={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x482942(_0x3ce4dd){const _0xead4e6=new window['Promise'](_0x229d5d=>{_0x3ce4dd['once']('ready',_0x229d5d);}),_0x5661a1=window['Date']['now'](),_0x167203=_0x3ce4dd['config']['get']('licenseKey');async function _0x1a6db2(){let _0x4cda59,_0x4528d8=null,_0x11f8de=null;try{return'GPL'==_0x167203?'NotAllowed':(_0x4cda59=_0x42413b(),_0x4cda59?(_0x4cda59['usageEndpoint']&&(_0x11f8de=_0x2a9ce1(_0x4cda59['usageEndpoint'],_0x4cda59['jti'])),await _0xdc5945()?_0x2e3c07()?_0x20bb50()?'Expired':_0x2cf98d()?('evaluation'==_0x4cda59['licenseType']&&(_0x4528d8=_0x359efa('EvaluationLimit')),await _0x5bb01b()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x20bb50(){const _0x39b5a8=['evaluation','trial']['includes'](_0x4cda59['licenseType'])?_0x5661a1/0x3e8:0xe10*_0x35b155;return _0x4cda59['exp']<_0x39b5a8;}function _0x2e3c07(){const _0x396342=_0x4cda59['features'];if(!_0x396342)return!0x1;if(_0x396342['includes']('*'))return!0x0;if(_0x396342['includes']('RH'))return!0x0;if(_0x396342['includes']('RRH')){if(_0x10acdd())return!0x0;if(_0x552a7b()||_0x336e0c())return!0x0;}return!0x1;}function _0x2cf98d(){const _0x4512f1=_0x4cda59['licensedHosts'];if(!_0x4512f1||0x0==_0x4512f1['length'])return!0x0;const {hostname:_0x6e6d1b}=new URL(window['location']['href']);if(_0x4512f1['includes'](_0x6e6d1b))return!0x0;const _0x40453e=_0x6e6d1b['split']('.');return _0x4512f1['filter'](_0x56099b=>_0x56099b['includes']('*'))['map'](_0x215038=>_0x215038['split']('.'))['filter'](_0x190f2a=>_0x190f2a['length']<=_0x40453e['length'])['map'](_0x27a1cb=>Array(_0x40453e['length']-_0x27a1cb['length'])['fill']('*'===_0x27a1cb[0x0]?'*':'')['concat'](_0x27a1cb))['some'](_0xb427f5=>_0x40453e['every']((_0x244d7e,_0x5b1f6b)=>_0xb427f5[_0x5b1f6b]===_0x244d7e||'*'===_0xb427f5[_0x5b1f6b]));}function _0x5bb01b(){return _0x4528d8&&_0x11f8de?new window['Promise']((_0x2b1543,_0x3ed8b3)=>{_0x4528d8['then'](_0x2b1543,_0x3ed8b3),_0x11f8de['then'](_0xff9c4=>{'Valid'!=_0xff9c4&&_0x2b1543(_0xff9c4);},_0x3ed8b3);}):_0x4528d8||_0x11f8de||'Valid';}}function _0x2a9ce1(_0x12bef0,_0x5adbf0){return new window['Promise'](_0x4e6fc6=>{if(_0x225eda())return _0x4e6fc6('Valid');_0x1b565d(),_0x3ce4dd['decorate']('_sendUsageRequest');let _0x58d4d8=!0x1;const _0x49e1db=_0x17aa1f();function _0x45b232(_0x2bf849){return!!_0x2bf849&&('object'==typeof _0x2bf849||'function'==typeof _0x2bf849)&&'function'==typeof _0x2bf849['then']&&'function'==typeof _0x2bf849['catch'];}function _0x183eff(_0x32a8ad){_0x45f197(_0x32a8ad)['then'](_0x799f91=>_0x799f91&&'ok'==_0x799f91['status']?_0x2eb98e(_0x2f2cb0(_0x49e1db+_0x5adbf0))!=_0x799f91['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x33efbf=>(_0x41f58c(),_0x33efbf),()=>{const _0x3b400b=_0x3d16bd();return null==_0x3b400b?(_0x41f58c(),'Valid'):_0x5661a1-_0x3b400b>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4e6fc6)['catch'](()=>{_0x4e6fc6('UsageLimit');});const _0x286c59=0x36ee80;function _0x41f58c(){const _0x28191e='llct-'+_0x2eb98e(_0x2f2cb0(_0x12bef0)),_0x3e2d8a=_0x541989(_0x2eb98e(window['Math']['ceil'](_0x5661a1/_0x286c59)));window['localStorage']['setItem'](_0x28191e,_0x3e2d8a);}function _0x3d16bd(){const _0x502567='llct-'+_0x2eb98e(_0x2f2cb0(_0x12bef0)),_0xfb5d25=window['localStorage']['getItem'](_0x502567);return _0xfb5d25?window['parseInt'](_0x541989(_0xfb5d25),0x10)*_0x286c59:null;}function _0x45f197(_0x301691){return new window['Promise']((_0x3ad184,_0x29305f)=>{_0x301691['then'](_0x3ad184,_0x29305f),window['setTimeout'](_0x29305f,0x1d4c0);});}}_0x3ce4dd['on']('_sendUsageRequest',(_0x3c3a72,_0x2499b9)=>{if(_0x2499b9[0x0]!=_0x12bef0)return _0x4e6fc6('UsageLimit');_0x2499b9[0x1]={..._0x2499b9[0x1],'requestId':_0x49e1db};},{'priority':'high'}),_0x3ce4dd['on']('_sendUsageRequest',_0x2581ff=>{_0x45b232(_0x2581ff['return'])&&(_0x58d4d8=!0x0,_0x183eff(_0x2581ff['return']));},{'priority':'low'}),_0xead4e6['then'](()=>{_0x58d4d8||_0x4e6fc6('UsageLimit');});});function _0x225eda(){return'auto'==_0x3ce4dd['editing']['view']['_overlayModeHint'];}function _0x1b565d(){_0x3ce4dd['editing']['view']['_overlayModeHint']='auto';}}function _0x359efa(_0x5825d1){const _0x251ab4=[new window['Promise'](_0x14bda0=>setTimeout(_0x14bda0,0x93ecc)),_0xead4e6['then'](()=>new window['Promise'](_0x3dc944=>{const _0x397772=0x7,_0x3b26b7=_0x413ecc['_revisions'];function _0x55e439(){_0x3b26b7['length']>=_0x397772&&_0x3dc944();}_0x55e439(),_0x3b26b7['on']('add',_0x55e439);})),new window['Promise'](_0x228263=>{function _0x3b6b9c(){for(const _0x353614 in window)if(window['Number']['isNaN'](window['Number'](_0x353614))&&window[_0x353614]==_0xa95c3a)return _0x228263();'destroyed'!=_0x3ce4dd['state']&&window['setTimeout'](_0x3b6b9c,0x1388);}_0x5a05f1('RevisionViewer')&&_0x3b6b9c();})];return window['Promise']['race'](_0x251ab4)['then'](()=>_0x5825d1);}async function _0x4d30b0(){if(await _0xead4e6,_0x5a05f1('RevisionViewer')){const _0x49435f=_0x413ecc['getRevision'](0x0),_0x2c6655=_0x413ecc['getEarlierVisibleRevision'](_0x49435f['id']),_0x3de1ba=_0x4994f7('RevisionViewer');return await _0x3de1ba['compare'](_0x49435f['id'],_0x2c6655?_0x2c6655['id']:null,!0x0),_0x3de1ba['unbind']('isEnabled'),_0x3de1ba['isEnabled']=!0x1,_0x3de1ba['compare']=_0x471719,void(_0x3de1ba['_getDiff']=_0x471719);}if(_0x5a05f1('RevisionTracker')){const _0x5a6814=_0x4994f7('RevisionTracker');_0x5a6814['unbind']('isEnabled'),_0x5a6814['isEnabled']=!0x1,_0x5a6814['update']=_0x471719,_0x5a6814['saveRevision']=_0x471719;}_0x3ce4dd['model']['change']=_0x471719,_0x3ce4dd['model']['enqueueChange']=_0x471719,_0x3ce4dd['enableReadOnlyMode']('model');}function _0x10acdd(){return _0x5a05f1('WebSocketGateway')&&'connected'==_0x4994f7('WebSocketGateway')['state'];}function _0x552a7b(){return _0x5a05f1('RevisionViewerIntegration');}function _0x336e0c(){return _0x5a05f1('TrackChangesDataGetter');}function _0x239606(_0x652472){const _0x1b9236=_0x20177c();_0x3ce4dd[_0x1b9236]='revisionHistoryLicenseKey'+_0x652472,_0x652472['endsWith']('Limit')&&(window[_0x20177c()]=_0xa95c3a),'Valid'!=_0x652472&&_0x4d30b0();}function _0x20177c(){const _0x2748af=window['String'](window['performance']['now']())['replace']('.','');let _0x330821='N';for(let _0x48559f=0x0;_0x48559f<_0x2748af['length'];_0x48559f+=0x2){let _0x1d4dd3=window['parseInt'](_0x2748af['substring'](_0x48559f,_0x48559f+0x2));_0x1d4dd3>=0x3e&&(_0x1d4dd3-=0x3e),_0x330821+=_0x3d05be[_0x1d4dd3];}return _0x330821;}function _0x42413b(){const _0x1d1170=_0x167203['split']('.');if(0x3!=_0x1d1170['length'])return null;return _0x5f2d42(_0x1d1170[0x1]);function _0x5f2d42(_0x5a9eaa){const _0x35ba86=_0x4934bc(_0x5a9eaa);return _0x35ba86&&_0x5d4efa()?_0x35ba86:null;function _0x5d4efa(){const _0x5e6f77=_0x35ba86['jti'],_0x3d0421=window['parseInt'](_0x5e6f77['substring'](_0x5e6f77['length']-0x8),0x10),_0x110113={..._0x35ba86,'jti':_0x5e6f77['substring'](0x0,_0x5e6f77['length']-0x8)};return delete _0x110113['vc'],_0x2f2cb0(_0x110113)==_0x3d0421;}}}async function _0xdc5945(){let _0x4fa448=!0x0;try{const [_0x3de86f,_0x54f1d8,_0x51354f]=_0x167203['split']('.');return _0x2fdd41(_0x3de86f),await _0x54f883(_0x3de86f,_0x54f1d8,_0x51354f),_0x4fa448;}catch{return!0x1;}function _0x2fdd41(_0x37fecd){const _0x2d9dba=_0x4934bc(_0x37fecd);_0x2d9dba&&'ES256'==_0x2d9dba['alg']||(_0x4fa448=!0x1);}async function _0x54f883(_0x39eaf5,_0x1f0b5d,_0x409a3d){const _0x1f92e9=window['Uint8Array']['from'](_0x2ae8c6(_0x409a3d),_0x4d3f6c=>_0x4d3f6c['charCodeAt'](0x0)),_0x4eeb34=new window['TextEncoder']()['encode'](_0x39eaf5+'.'+_0x1f0b5d),_0x2fa99f=window['crypto']['subtle'];if(!_0x2fa99f)return;const _0x32076a=await _0x2fa99f['importKey']('jwk',_0x4b529c,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2fa99f['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x32076a,_0x1f92e9,_0x4eeb34)||(_0x4fa448=!0x1);}}function _0x4934bc(_0x4c8666){return _0x4c8666['startsWith']('ey')?JSON['parse'](_0x2ae8c6(_0x4c8666)):null;}function _0x2ae8c6(_0x46bfbe){return window['atob'](_0x46bfbe['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2f2cb0(_0x48e539){let _0x587ce6=0x1505;function _0x52f2ad(_0x1b51fc){for(let _0x634666=0x0;_0x634666<_0x1b51fc['length'];_0x634666++){const _0x488cbd=_0x1b51fc['charCodeAt'](_0x634666);_0x587ce6=(_0x587ce6<<0x5)+_0x587ce6+_0x488cbd,_0x587ce6&=_0x587ce6;}}function _0x35e533(_0x4126e8){Array['isArray'](_0x4126e8)?_0x4126e8['forEach'](_0x35e533):_0x4126e8&&'object'==typeof _0x4126e8?Object['entries'](_0x4126e8)['sort']()['forEach'](([_0x18bb2f,_0x1b9e3b])=>{_0x52f2ad(_0x18bb2f),_0x35e533(_0x1b9e3b);}):_0x52f2ad(window['String'](_0x4126e8));}return _0x35e533(_0x48e539),_0x587ce6>>>0x0;}function _0x2eb98e(_0xaf6037){return _0xaf6037['toString'](0x10)['padStart'](0x8,'0');}function _0x541989(_0x3d97f3){return _0x3d97f3['split']('')['reverse']()['join']('');}function _0x5a05f1(_0x49c191){return _0x3ce4dd['plugins']['has'](_0x49c191);}function _0x4994f7(_0x191d03){return _0x3ce4dd['plugins']['get'](_0x191d03);}function _0x471719(){}_0x239606(await _0x1a6db2());}_0x482942(_0x413ecc['editor']);}(this);}createRevision(_0x2acc58){const _0x2ee985=this['editor']['plugins']['get']('Users');return new pt({'id':_0x2acc58['id'],'name':_0x2acc58['name'],'creator':_0x2acc58['creatorId']?_0x2ee985['getUser'](_0x2acc58['creatorId']):null,'diffData':_0x2acc58['diffData']||_0x2acc58['data'],'authors':_0x2acc58['authorsIds']['map'](_0x14215a=>_0x2ee985['getUser'](_0x14215a)),'createdAt':new Date(_0x2acc58['createdAt']),'attributes':_0x2acc58['attributes'],'fromVersion':_0x2acc58['fromVersion'],'toVersion':_0x2acc58['toVersion']});}['addRevision'](_0x2c274e,_0x573c5f=0x0){this['_revisions']['add'](_0x2c274e,_0x573c5f);}getRevision(_0x107198){return this['_revisions']['get'](_0x107198);}getRevisions(_0x16cd09={'toJSON':!0x1}){const _0x4c94b4=Array['from'](this['_revisions']);return _0x4c94b4['reverse'](),_0x16cd09['toJSON']?_0x4c94b4['map'](_0x3740fb=>_0x3740fb['toJSON']()):_0x4c94b4;}getIndex(_0x5ef765){return this['_revisions']['getIndex'](_0x5ef765);}getEarlierVisibleRevision(_0x321b51){const [,_0x3d56c1]=this['getRevisionsIterator'](_0x321b51,{'direction':'earlier'});return _0x3d56c1;}getLaterVisibleRevision(_0x3d25da){const [,_0x288bd5]=this['getRevisionsIterator'](_0x3d25da,{'direction':'later'});return _0x288bd5;}getRevisionsInDiff(_0x2cbc11){const _0x25c68e=[];for(const _0x41b9a1 of this['getRevisionsIterator'](_0x2cbc11['newRevisionId']))if(_0x25c68e['push'](_0x41b9a1),_0x41b9a1['id']===_0x2cbc11['oldRevisionId'])break;return _0x25c68e;}*getRevisionsIterator(_0x550957,{direction:_0x5039b0='earlier',filter:_0x4aed72=()=>!0x0}={}){const _0x3b0120='earlier'===_0x5039b0?0x1:-0x1;let _0x3f8643=this['_revisions']['get'](_0x550957),_0x29ee11=this['getIndex'](_0x3f8643);for(yield _0x3f8643;_0x3f8643;){if(_0x29ee11+=_0x3b0120,_0x3f8643=this['getRevision'](_0x29ee11),!_0x3f8643)return;_0x4aed72(_0x3f8643)&&(yield _0x3f8643);}}},bt=class extends _0x560756{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x47c3c6,'c'],[_0x347913,'a'],[_0x3fe7a8,'e'],[_0x319f29,'r'],[_0x18e7e8,'u']]);_typeCharToViewClass=new Map([['c',_0x47c3c6],['a',_0x347913],['e',_0x3fe7a8],['r',_0x319f29],['u',_0x18e7e8]]);async loadRevisionData(_0x3af014,_0x509368){if(_0x3af014['diffData']||!_0x509368)return;const _0x4003b0=this['editor']['config']['get']('collaboration.channelId');_0x3af014['diffData']=(await _0x509368['getRevision']({'channelId':_0x4003b0,'revisionId':_0x3af014['id']}))['diffData'];}getRevisionDocumentData(_0x200f7f){const _0x64a023={};for(const _0x42ffbf in _0x200f7f['diffData']){if(_0x200f7f['diffData'][_0x42ffbf]['attachChange']&&!_0x200f7f['diffData'][_0x42ffbf]['attachChange']['isAttached'])continue;const _0x33cd0b=this['_removeRevisionMarkers'](JSON['parse'](_0x200f7f['diffData'][_0x42ffbf]['insertions'])),_0xb19374=this['editor']['editing']['view']['document'],_0x487572=new _0x42fe55(_0xb19374,_0x33cd0b['map'](_0x3d6d11=>this['_getViewFromDiffObj'](_0x3d6d11,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x64a023[_0x42ffbf]=this['editor']['data']['processor']['toData'](_0x487572),this['editor']['data']['processor']['useFillerType']('default');}return _0x64a023;}getRevisionRootsAttributes(_0x4279dd){const _0x106141={};for(const _0x1d87d3 in _0x4279dd['diffData'])_0x4279dd['diffData'][_0x1d87d3]['attachChange']&&!_0x4279dd['diffData'][_0x1d87d3]['attachChange']['isAttached']||(_0x106141[_0x1d87d3]=_0x4279dd['diffData'][_0x1d87d3]['attributesAfter']||{});return _0x106141;}getRevisionRootsModelElements(_0x285863){const _0x248158={};for(const _0x171012 in _0x285863['diffData']){if(_0x285863['diffData'][_0x171012]['attachChange']&&!_0x285863['diffData'][_0x171012]['attachChange']['isAttached'])continue;const _0x201f1c=_0x285863['diffData'][_0x171012]['rootElementName'];_0x201f1c&&(_0x248158[_0x171012]=_0x201f1c);}return _0x248158;}_getTypeCharForViewElement(_0x44b40e){return this['_viewClassToTypeChar']['get'](_0x44b40e['constructor']);}_getViewFromDiffObj(_0x138dfc,_0x354add){const _0x2cd01a=this['editor']['editing']['view']['document'];if('string'==typeof _0x138dfc)return new _0x35c90f(_0x2cd01a,_0x138dfc);{let _0x2b2120,_0x5ab49f;_0x5ab49f='u'==_0x138dfc['type']||'r'==_0x138dfc['type']?[]:_0x138dfc['children']['map'](_0x30f314=>this['_getViewFromDiffObj'](_0x30f314,_0x354add));const _0x56da89=this['_typeCharToViewClass']['get'](_0x138dfc['type'])||_0x7b5336,_0x3a0725=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2b2120=new _0x56da89(_0x2cd01a,_0x138dfc['name'],_0x138dfc['attributes'],_0x5ab49f),'u'==_0x138dfc['type']&&_0x138dfc['children'][0x0]){const _0x14d365=_0x138dfc['children'][0x0];if(_0x2b2120['render']=function(_0x4cf071){const _0x3b3214=_0x4cf071['createElement']('div');return _0x3b3214['innerHTML']=_0x14d365,_0x3b3214['childNodes'][0x0];},_0x354add){const _0x166bb7=new _0x42fe55(_0x2cd01a);_0x166bb7['_appendChild'](_0x2b2120);const _0x1e3217=Array['from'](_0x3a0725['viewChildrenToDom'](_0x166bb7,{'bind':!0x1})),_0x43a23e=_0x3a0725['domDocument']['createElement']('div');_0x43a23e['append'](..._0x1e3217),_0x2b2120=Array['from'](_0x3a0725['domChildrenToView'](_0x43a23e))[0x0];}}else{if('r'==_0x138dfc['type']&&_0x138dfc['children'][0x0]){const _0x5ed647=_0x138dfc['children'][0x0];if(_0x2b2120['render']=function(_0x29da23){_0x29da23['innerHTML']=_0x5ed647;},_0x354add){const _0x588e06=new _0x42fe55(_0x2cd01a);_0x588e06['_appendChild'](_0x2b2120);const _0x580cd4=Array['from'](_0x3a0725['viewChildrenToDom'](_0x588e06,{'bind':!0x1})),_0x3b1daf=_0x3a0725['domDocument']['createElement']('div');_0x3b1daf['append'](..._0x580cd4);const _0x2d3c51=Array['from'](_0x3a0725['domChildrenToView'](_0x3b1daf));_0x2d3c51['length']>0x1?_0x2b2120['_appendChild'](_0x2d3c51):_0x2b2120=_0x2d3c51[0x0];}}}if(_0x138dfc['customProperties']){for(const [_0x14517c,_0xa11162]of _0x138dfc['customProperties'])_0x2b2120['_setCustomProperty'](_0x14517c,_0xa11162);}const _0x483dc5=void 0x0===_0x138dfc['fillerOffset']?null:_0x138dfc['fillerOffset'];return null!==_0x483dc5&&(_0x2b2120['getFillerOffset']=()=>_0x483dc5),_0x2b2120;}}_makeModelFromViewString(_0x300480,_0x478fd7){const _0x1b03b1=JSON['parse'](_0x300480),_0x4b7241=this['editor']['editing']['view']['document'],_0x329cd5=new _0x42fe55(_0x4b7241,_0x1b03b1['map'](_0x438796=>this['_getViewFromDiffObj'](_0x438796,!0x0))),_0xcfc2ec=this['editor']['data']['toModel'](_0x329cd5,_0x478fd7);return _0xcfc2ec['name']=_0x478fd7,_0xcfc2ec;}['_removeRevisionMarkers'](_0x305135){return(_0x305135=_0x305135['filter'](_0x194d56=>!_0x194d56['name']||'revision-start'!==_0x194d56['name']&&'revision-end'!==_0x194d56['name']))['forEach'](_0x1b419f=>{'string'!=typeof _0x1b419f&&(_0x1b419f['children']=this['_removeRevisionMarkers'](_0x1b419f['children']),_0x1b419f['attributes']=_0x1b419f['attributes']['filter'](_0x483fe9=>!_0x483fe9[0x0]['startsWith']('data-revision-')));}),_0x305135;}};function Rt(_0x539829,_0x1c4667,_0x20d787){const t=_0x539829['t'];switch(_0x1c4667){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'},_0x20d787);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x20d787);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'},_0x20d787);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x20d787);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x20d787);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var kt=class extends _0x560756{['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[_0xa0a7e,yt,bt,_0xff638c];}constructor(_0x193928){super(_0x193928),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new At(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x387691=_0x17aa1f();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x387691},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 _0x8c6ed4=this['repository']['getRevision'](0x0),_0x26c8eb=_0x8c6ed4&&null===_0x8c6ed4['creator']?_0x8c6ed4:null;if(this['_continueCurrentRevision']=!!_0x26c8eb&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x87d55e=this['_source']['getCurrentRevisionId'](),_0x189fbf=this['repository']['getRevision'](_0x87d55e);if(_0x189fbf)this['_startingVersion']=_0x189fbf['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x39e1fe=this['_source']['history']['_operations']['find'](_0x34f3d9=>!_0x34f3d9['_isInit']),_0x15c84c=_0x39e1fe?_0x39e1fe['baseVersion']:this['_source']['history']['version'];_0x8c6ed4?(_0x8c6ed4['toVersion']<_0x15c84c&&_0x8c6ed4['_update']({'toVersion':_0x15c84c}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x26c8eb['id'],this['_startingVersion']=_0x26c8eb['fromVersion']):(this['_startingVersion']=_0x8c6ed4['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x15c84c,this['_continueCurrentRevision']=!0x1);}}else _0x26c8eb&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x26c8eb['toVersion'],this['editor']['model']['document']['history']['version']),_0x26c8eb['fromVersion']===_0x26c8eb['toVersion']?(0x0!==_0x26c8eb['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x26c8eb['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x26c8eb['id'],this['_startingVersion']=_0x26c8eb['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',_0x584f6f=>!_0x584f6f),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x321dc6=[this['editor']];for(const _0x544c18 of _0x321dc6){let _0x5ea0de;for(const _0x26f80e in _0x544c18){const _0x293214=_0x26f80e,_0x597119=_0x544c18[_0x293214];if('revisionHistoryLicenseKeyValid'==_0x597119||'revisionHistoryLicenseKeyInvalid'==_0x597119||'revisionHistoryLicenseKeyExpired'==_0x597119||'revisionHistoryLicenseKeyDomainLimit'==_0x597119||'revisionHistoryLicenseKeyNotAllowed'==_0x597119||'revisionHistoryLicenseKeyEvaluationLimit'==_0x597119||'revisionHistoryLicenseKeyUsageLimit'==_0x597119){delete _0x544c18[_0x293214],_0x5ea0de=_0x597119,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5ea0de&&_0x544c18['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5ea0de&&_0x544c18['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5ea0de&&_0x544c18['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5ea0de&&_0x544c18['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5ea0de&&_0x544c18['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5ea0de&&_0x544c18['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x56363f=this['repository']['getRevision'](0x0),_0x1f2351=await this['getRevisionDocumentData'](_0x56363f),_0x47c699=await this['getRevisionRootsAttributes'](_0x56363f),_0x3b1f8d=this['_utils']['getRevisionRootsModelElements'](_0x56363f);this['_replaceEditorDataWithRevisionData'](_0x1f2351,_0x47c699,_0x3b1f8d);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x4a2a53){this['_source']=_0x4a2a53;}async update(){const _0x4bbd6f=await this['_source']['getLatestVersion']();if(_0x4bbd6f>this['currentRevision']['toVersion']){await this['_loadState']();const _0x131cfa=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4bbd6f});_0x131cfa['authors']=_0x131cfa['authorsIds']['map'](_0x3226ee=>this['editor']['plugins']['get']('Users')['getUser'](_0x3226ee)),this['currentRevision']['_update'](_0x131cfa);}}async['saveRevision'](_0x5197d9={},_0x5b2ded=null){const _0x5446c2=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x5b2ded>this['currentRevision']['toVersion']&&(_0x5b2ded=null),null===_0x5b2ded&&(_0x5b2ded=await this['_source']['getLatestVersion']());const _0x15e9ec=this['_getFromVersion'](_0x5b2ded),_0x1afc9f=this['buildRevisionData']({'from':_0x15e9ec,'to':_0x5b2ded});if(this['currentRevision']['toVersion']<_0x5b2ded){const _0x2b5a3f=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x5b2ded,'to':_0x5b2ded});_0x2b5a3f['authors']=[],_0x2b5a3f['authorsIds']=[],_0x2b5a3f['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2b5a3f,!0x0),delete _0x2b5a3f['authors'],_0x5446c2['push'](_0x2b5a3f);}const _0x3f61a0={..._0x5197d9,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x5197d9['name']||null,'id':_0x5197d9['id']||_0x17aa1f(),..._0x1afc9f,'attributes':{..._0x5197d9['attributes'],..._0x1afc9f['attributes']}},_0x2b109f=this['addRevisionData'](_0x3f61a0);_0x5446c2['push'](_0x3f61a0);const _0x7f868a=this['repository']['getIndex'](_0x2b109f);if(0x0!==_0x7f868a){const _0x3d83a6=this['repository']['getRevision'](_0x7f868a-0x1);if(_0x3d83a6['fromVersion']!==_0x5b2ded){const _0x3eb275=this['_revisionDataBuilder']['getData'](_0x5b2ded,_0x3d83a6['toVersion']),_0x52128e={'id':_0x3d83a6['id'],'diffData':_0x3eb275['diffData'],'authorsIds':_0x3eb275['authorsIds'],'authors':_0x3eb275['authorsIds']['map'](_0x42f28d=>this['editor']['plugins']['get']('Users')['getUser'](_0x42f28d)),'fromVersion':_0x5b2ded};this['_stampAiAttribute'](_0x52128e,_0x3d83a6,!!_0x3eb275['hasAIChanges']),_0x3d83a6===this['currentRevision']&&(_0x52128e['createdAt']=new Date(_0x3f61a0['createdAt']['getTime']()+0xa)),_0x3d83a6['_update'](_0x52128e,!0x0),delete _0x52128e['authors'],_0x5446c2['push'](_0x52128e);}}if(this['adapter']){for(const _0x43d2a2 of _0x5446c2)this['_bufferUpdate'](_0x43d2a2['id'],_0x43d2a2,!0x0);this['sendBufferedUpdates']();}return _0x2b109f;}addRevisionData(_0x33624d){const _0x101565=this['repository']['createRevision'](_0x33624d);return this['adapter']&&_0x101565['on']('_update',(_0x13e8e9,_0x591d5f,_0x1a3aeb)=>{_0x1a3aeb||(this['_bufferUpdate'](_0x591d5f['id'],_0x591d5f,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x101565,this['_findInsertionIndex'](_0x101565)),_0x101565;}async getRevisionDocumentData(_0x597969){return await this['_utils']['loadRevisionData'](_0x597969,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x597969);}async getRevisionRootsAttributes(_0x8281b4){return await this['_utils']['loadRevisionData'](_0x8281b4,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x8281b4);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x499c66=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x106341=0x0;_0x106341<_0x499c66['length'];_0x106341++){const _0x174232=_0x499c66[_0x106341];let _0x3a3a3a=!0x1;for(const _0x4878e0 of Object['keys'](_0x174232))void 0x0===_0x174232[_0x4878e0]?delete _0x174232[_0x4878e0]:'id'!==_0x4878e0&&(_0x3a3a3a=!0x0);_0x3a3a3a||(_0x499c66[_0x106341]=null);}if(_0x499c66=_0x499c66['filter'](_0x7dea26=>null!==_0x7dea26),!_0x499c66['length'])return;for(let _0x1fbcf8=0x0;_0x1fbcf8<_0x499c66['length'];_0x1fbcf8++){const _0x5a91b6=_0x499c66[_0x1fbcf8];void 0x0!==_0x5a91b6['fromVersion']&&void 0x0===_0x5a91b6['toVersion']&&(_0x5a91b6['toVersion']=this['repository']['getRevision'](_0x5a91b6['id'])['toVersion']),void 0x0!==_0x5a91b6['toVersion']&&void 0x0===_0x5a91b6['fromVersion']&&(_0x5a91b6['fromVersion']=this['repository']['getRevision'](_0x5a91b6['id'])['fromVersion']);}const _0x366bfa=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x499c66,_0x366bfa)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0xc02f4e=>{if(_0xc02f4e){for(const _0x21f608 of _0xc02f4e)this['setRevisionData']({'id':_0x21f608['id'],'createdAt':_0x21f608['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x37f2b8,_0x207abc,_0x31c4ef){if(_0x31c4ef===(!!_0x207abc&&!!_0x207abc['attributes']['@ai']))return;const _0x4f8cc4={..._0x207abc?_0x207abc['attributes']:{},..._0x37f2b8['attributes']};_0x31c4ef?_0x4f8cc4['@ai']=!0x0:delete _0x4f8cc4['@ai'],_0x37f2b8['attributes']=_0x4f8cc4;}buildRevisionData({revision:_0x32e4f4=null,from:_0x56e4da=null,to:_0x1588e3=null}){_0x56e4da=null!==_0x56e4da?_0x56e4da:_0x32e4f4['fromVersion'],_0x1588e3=null!==_0x1588e3?_0x1588e3:_0x32e4f4['toVersion'];const _0x4fc0aa=this['_revisionDataBuilder']['getData'](_0x56e4da,_0x1588e3),_0x1e86d7={'diffData':_0x4fc0aa['diffData'],'authorsIds':_0x4fc0aa['authorsIds'],'fromVersion':_0x56e4da,'toVersion':_0x1588e3};if(this['_stampAiAttribute'](_0x1e86d7,_0x32e4f4,!!_0x4fc0aa['hasAIChanges']),!_0x32e4f4||_0x1588e3!==_0x32e4f4['toVersion']){const _0x24b094=_0x1588e3-0x1,_0xff9690=this['_source']['history']['getOperation'](_0x24b094);_0x1e86d7['createdAt']=_0xff9690&&_0xff9690['createdAt']||new Date();}if(this['_loadedStateData']&&_0x56e4da===this['_loadedStateData']['fromVersion']){for(const _0x4a3600 of this['_loadedStateData']['authors'])_0x1e86d7['authorsIds']['includes'](_0x4a3600['id'])||_0x1e86d7['authorsIds']['push'](_0x4a3600['id']);}return _0x1e86d7;}_bufferUpdate(_0x4caed3,_0xcd7dd8,_0x1036c6){if(this['_bufferedUpdates']['has'](_0x4caed3)){const _0x27dc8c=this['_bufferedUpdates']['get'](_0x4caed3);_0xcd7dd8=_0x1036c6?{..._0x27dc8c,..._0xcd7dd8}:{..._0xcd7dd8,..._0x27dc8c};}this['_bufferedUpdates']['set'](_0x4caed3,_0xcd7dd8);}setRevisionData(_0x301cc0){const _0x1fec15=this['repository']['getRevision'](_0x301cc0['id']);if(_0x301cc0['createdAt']&&(_0x301cc0['createdAt']=new Date(_0x301cc0['createdAt'])),_0x301cc0['authorsIds']){const _0xaa4036=this['editor']['plugins']['get']('Users');_0x301cc0['authors']=_0x301cc0['authorsIds']['map'](_0x500be8=>_0xaa4036['getUser'](_0x500be8));}_0x1fec15['_update'](_0x301cc0,!0x0);}_createInitialRevision(_0x288939){const _0x14caf8=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x14caf8)this['_initialRevisionId']=_0x14caf8['id'];else{const _0xdf62e9=!this['editor']['model']['document']['roots']['find'](_0x3de293=>this['editor']['model']['hasContent'](_0x3de293)),_0x2864c1=this['editor']['plugins']['get']('Users')['me']['id'],_0x2c0c95=Rt(this['editor']['locale'],_0xdf62e9?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x288939,'to':_0x288939,'id':this['_initialRevisionId'],'name':_0x2c0c95,'creatorId':_0x2864c1});}}_createCurrentRevision(_0x2d3ab5){const _0x1aaa62=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1aaa62),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2d3ab5,'to':_0x2d3ab5,'id':_0x1aaa62,'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(_0x368958,_0x22ac88,_0x2e11dd){const _0x32b718={},_0x1d67d4={},_0x9f5283={},_0x43e1e2=this['editor']['config']['get']('roots')||{};for(const [_0x345592,_0x56b357]of Object['entries'](_0x43e1e2))_0x56b357['lazyLoad']||(_0x32b718[_0x345592]=_0x56b357['initialData']??'',_0x1d67d4[_0x345592]=_0x56b357['modelAttributes']||{},_0x56b357['modelElement']&&(_0x9f5283[_0x345592]=_0x56b357['modelElement']));for(const _0x2f89ea of this['editor']['model']['document']['getRootNames']())_0x32b718[_0x2f89ea]??='',_0x1d67d4[_0x2f89ea]??={};let _0x1a45c3=!0x1;const _0x30debc=Object['keys'](_0x32b718),_0x4717b8=Object['keys'](_0x368958);for(const _0x1f3514 of _0x30debc){if(_0x32b718[_0x1f3514]!==_0x368958[_0x1f3514]&&''!==_0x32b718[_0x1f3514]['trim']()){_0x1a45c3=!0x0;break;}if(!_0x55db0c(_0x1d67d4[_0x1f3514],_0x22ac88[_0x1f3514])&&Object['keys'](_0x1d67d4[_0x1f3514])['length']>0x0){_0x1a45c3=!0x0;break;}const _0x112b25=_0x9f5283[_0x1f3514],_0xa0fc69=_0x2e11dd[_0x1f3514];if(_0x112b25&&_0xa0fc69&&_0x112b25!==_0xa0fc69){_0x1a45c3=!0x0;break;}}_0x1a45c3||(_0x1a45c3=_0x4717b8['some'](_0x3403c6=>!this['editor']['model']['document']['getRoot'](_0x3403c6))),_0x1a45c3&&_0x211177('editor-initial-data-replaced-with-revision-data',{'editorData':_0x32b718,'editorRootsAttributes':_0x1d67d4,'editorRootsModelElements':_0x9f5283,'revisionData':_0x368958,'revisionRootsAttributes':_0x22ac88,'revisionRootsModelElements':_0x2e11dd});for(const [_0x3f47ce,_0x4ddd4d]of Object['entries'](_0x368958))this['editor']['config']['set']('roots.'+_0x3f47ce+'.initialData',_0x4ddd4d);for(const [_0x382bad,_0x300841]of Object['entries'](_0x22ac88))this['editor']['config']['set']('roots.'+_0x382bad+'.modelAttributes',_0x300841);const _0x261902=this['editor']['model']['document'];for(const [_0x37f894,_0x2200d1]of Object['entries'](_0x2e11dd)){this['editor']['config']['set']('roots.'+_0x37f894+'.modelElement',_0x2200d1);const _0x4a609c=_0x261902['getRoot'](_0x37f894);_0x4a609c&&_0x4a609c['name']!==_0x2200d1&&(_0x261902['roots']['remove'](_0x37f894),_0x261902['createRoot'](_0x2200d1,_0x37f894));}}_addPendingAction(){if(!this['_pendingAction']){const _0x4d4b33=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4d4b33['add'](Rt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x2aa9bb){const _0x49f6ac=this['repository']['getRevisions']();_0x49f6ac['reverse']();let _0x58785f=0x0;for(;_0x58785f<_0x49f6ac['length'];){const _0x40de49=_0x49f6ac[_0x58785f];if(_0x40de49===this['currentRevision']){_0x58785f++;continue;}if(_0x40de49['id']===this['_initialRevisionId'])break;const _0x300472=_0x2aa9bb['toVersion']-_0x40de49['toVersion']||_0x2aa9bb['fromVersion']-_0x40de49['fromVersion'];if(_0x300472>0x0)break;if(_0x300472<0x0)_0x58785f++;else{if(!_0x2aa9bb['creator']&&_0x40de49['creator'])break;if(_0x40de49['creator']||!_0x2aa9bb['creator']){if(_0x2aa9bb['createdAt']>_0x40de49['createdAt'])break;_0x58785f++;}else _0x58785f++;}}return _0x58785f;}_getFromVersion(_0x25abbd){const _0x367aaf=this['repository']['getRevisions']();_0x367aaf['reverse'](),_0x367aaf['shift']();const _0x97e2a=_0x367aaf['find'](_0x404d5b=>_0x404d5b['toVersion']<=_0x25abbd)['toVersion'];return _0x97e2a<this['_startingVersion']?this['_startingVersion']:_0x97e2a;}['_makeRevision']({name:_0x419997,from:_0x553aa0,to:_0x26e65e,creatorId:_0x3e3ab6,id:_0x5e4f96}){const _0x3a0bed=this['buildRevisionData']({'from':_0x553aa0,'to':_0x26e65e});_0x3a0bed['name']=_0x419997,_0x3a0bed['creatorId']=_0x3e3ab6,_0x3a0bed['id']=_0x5e4f96;const _0x527cff=this['addRevisionData'](_0x3a0bed);return this['adapter']&&this['_bufferUpdate'](_0x3a0bed['id'],_0x3a0bed,!0x0),_0x527cff;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},At=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x3fc69b){this['editor']=_0x3fc69b,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(_0x57e717){this['source']=_0x57e717;const _0x546c7b=new Map(),_0xc874c4=new Map(),_0x1b8cf9=this['editor']['model']['document']['roots']['map'](_0x548d3b=>_0x548d3b['rootName']);for(const _0x248b69 of _0x1b8cf9){const _0x418431=this['editor']['model']['document']['getRoot'](_0x248b69),_0x48b1dd=It(_0x418431);_0x546c7b['set'](_0x248b69,_0x48b1dd),_0xc874c4['set'](_0x248b69,Object['fromEntries'](_0x418431['getAttributes']()));}const _0x3fac31=Array['from'](this['editor']['model']['markers'])['map'](_0x1b78dd=>[_0x1b78dd['name'],_0x1b78dd['getRange']()]),_0x5ca8d7=this['source']['version'];this['_saveMetaData'](_0x5ca8d7,_0x546c7b,_0x3fac31,_0xc874c4),this['_startingRevisionId']=this['_revisionId'];const _0x5345e5=new Map(),_0x34d053=new Map();for(const _0x29ee55 of _0x1b8cf9){const _0x323749=St(_0x29ee55,this['editor']['model']['document']['getRoot'](_0x29ee55)['name']);_0x5345e5['set'](_0x29ee55,_0x323749),_0x34d053['set'](_0x29ee55,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x5345e5,[],_0x34d053);}getData(_0x52313b,_0x341923){if(this['_lastFrom']===_0x52313b&&this['_lastTo']<=_0x341923)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x341923,!0x0);else{if(!this['_savedMetaData']['has'](_0x52313b)){const _0x3ada33=this['_getPreviousFrom'](_0x52313b);this['_calculateMetaData'](_0x3ada33,_0x52313b,!0x1);}this['_calculateMetaData'](_0x52313b,_0x341923,!0x0);}return this['_lastFrom']=_0x52313b,this['_lastTo']=_0x341923,this['_getState']();}loadState(_0x5d4d50){if(!this['_savedMetaData']['has'](_0x5d4d50['fromVersion'])){const _0x44b9b6=this['_getPreviousFrom'](_0x5d4d50['fromVersion']);this['_calculateMetaData'](_0x44b9b6,_0x5d4d50['fromVersion'],!0x1);}this['_calculateMetaData'](_0x5d4d50['fromVersion'],_0x5d4d50['toVersion'],!0x1);const _0x4d7c87=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5d4d50['fromVersion'],this['_lastTo']=_0x5d4d50['toVersion'];for(const _0x2d339f in _0x5d4d50['diffData']){const _0x48dca3=_0x5d4d50['diffData'][_0x2d339f]['attachChange'],_0x5788d1=_0x1afd15(_0x5d4d50['diffData'][_0x2d339f]['attributesBefore'])||{},_0x4b2600=_0x5d4d50['diffData'][_0x2d339f],_0x12d182=_0x4d7c87['_makeModelFromViewString'](_0x4b2600['deletions'],_0x4b2600['rootElementName']||'$root');_0x12d182['rootName']=_0x2d339f,_0x12d182['_isAttached']=!_0x48dca3||!_0x48dca3['isAttached'],_0x12d182['isAttached']=()=>_0x12d182['_isAttached'],this['_baseRoots']['set'](_0x2d339f,_0x12d182),this['_baseRootsAttributes']['set'](_0x2d339f,_0x5788d1),_0x48dca3&&this['_touchedRoots']['set'](_0x2d339f,_0x48dca3);const _0x140d1e=this['_makeIdsRoot'](_0x12d182);this['_baseIdsRoots']['set'](_0x2d339f,_0x140d1e);for(const [_0x5294e8,_0x3497d7]of _0x12d182['markers']){if(!_0x5294e8['startsWith']('revision:'))continue;const _0x2c5fc6=_0x5294e8['split'](':')[0x2],_0x289d5d=_0x4b2600['aiSources']?.[_0x5294e8]||null;for(const _0x3568a1 of _0x3497d7['getWalker']({'singleCharacters':!0x0})){const _0x5e7f71=this['_getVidAttributeName'](_0x3568a1),_0x1b9ea2='elementEnd'==_0x3568a1['type']?_0x3568a1['previousPosition']['path']['slice'](0x0,-0x1):_0x3568a1['previousPosition']['path'],_0x1b2507=_0x140d1e['getNodeByPath'](_0x1b9ea2)['getAttribute'](_0x5e7f71);this['_touched']['set'](_0x1b2507,{'userId':_0x2c5fc6,'aiSource':_0x289d5d});}_0x12d182['markers']['delete'](_0x5294e8);}}this['_startingRevisionId']=this['_revisionId'];const _0x338404=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x1d02f2=>!this['_touched']['has'](_0x1d02f2));let _0x250046=0x0;const _0x11440d=new Map();for(const _0x5db433 in _0x5d4d50['diffData']){const _0x3205c6=_0x5d4d50['diffData'][_0x5db433]['attachChange'],_0x20bb9f=_0x1afd15(_0x5d4d50['diffData'][_0x5db433]['attributesAfter'])||{},_0x2e729=_0x5d4d50['diffData'][_0x5db433],_0xc8ee5f=_0x4d7c87['_makeModelFromViewString'](_0x2e729['insertions'],_0x2e729['rootElementName']||'$root');_0xc8ee5f['rootName']=_0x5db433,_0xc8ee5f['_isAttached']=!_0x3205c6||_0x3205c6['isAttached'],_0xc8ee5f['isAttached']=()=>_0xc8ee5f['_isAttached'],this['_diffRoots']['set'](_0x5db433,_0xc8ee5f),this['_diffRootsAttributes']['set'](_0x5db433,_0x20bb9f);const _0x3d3524=this['_makeIdsRoot'](_0xc8ee5f,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5db433,_0x3d3524),_0x11440d['set'](_0x5db433,_0xc8ee5f['isAttached']()?_0x20bb9f:{});for(const [_0x365107,_0xc9d8fb]of _0xc8ee5f['markers']){if(!_0x365107['startsWith']('revision:'))continue;const _0x4531ff=_0x365107['split'](':')[0x2],_0x443316=_0x2e729['aiSources']?.[_0x365107]||null;for(const _0x2437c8 of _0xc9d8fb['getWalker']({'singleCharacters':!0x0})){const _0x210ed4=this['_getVidAttributeName'](_0x2437c8),_0x34dd81=this['_revisionId']++,_0x249253='elementEnd'==_0x2437c8['type']?_0x2437c8['previousPosition']['path']['slice'](0x0,-0x1):_0x2437c8['previousPosition']['path'];_0x3d3524['getNodeByPath'](_0x249253)['_setAttribute'](_0x210ed4,_0x34dd81),this['_touched']['set'](_0x34dd81,{'userId':_0x4531ff,'aiSource':_0x443316});}_0xc8ee5f['markers']['delete'](_0x365107);}for(const _0x59b323 of this['editor']['model']['createRangeIn'](_0xc8ee5f)['getWalker']({'singleCharacters':!0x0})){const _0x434b0a=this['_getVidAttributeName'](_0x59b323),_0xb2deb1='elementEnd'==_0x59b323['type']?_0x59b323['previousPosition']['path']['slice'](0x0,-0x1):_0x59b323['previousPosition']['path'],_0x14a58b=_0x3d3524['getNodeByPath'](_0xb2deb1);_0x14a58b['getAttribute'](_0x434b0a)>0x0||_0x14a58b['_setAttribute'](_0x434b0a,_0x338404[_0x250046++]);}for(const [_0x1cdb22,_0x556120]of _0xc8ee5f['markers'])_0x1cdb22['startsWith']('revision:')||this['_markers']['set'](_0x1cdb22,_0x556120);}const {roots:_0x13f9db}=this['_savedMetaData']['get'](_0x5d4d50['fromVersion']),{roots:_0x3d76ef}=this['_savedMetaData']['get'](_0x5d4d50['toVersion']),_0x394237=It(_0x13f9db['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x394237),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x394237,Number['NEGATIVE_INFINITY']));const _0x377d48=It(_0x3d76ef['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x377d48),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x377d48));const _0x5a3035=Array['from'](this['_diffRoots'])['map'](([_0x28f6e0,_0x2f4f9a])=>[_0x28f6e0,It(_0x2f4f9a)]);this['_saveMetaData'](this['_lastTo'],_0x5a3035,this['_markers'],_0x11440d);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x5b8d10,_0xa71983,_0x3f2404,_0x14c5c3){const _0x5481d7=new Map(_0xa71983),_0x14dd44=new Map(_0x1afd15(_0x14c5c3)),_0x2ffb0d=new Map();for(const [_0x38ea74,_0x509144]of _0x3f2404)_0x2ffb0d['set'](_0x38ea74,{'start':_0x509144['start']['clone'](),'end':_0x509144['end']['clone'](),'rootName':_0x509144['root']['rootName']});this['_savedMetaData']['set'](_0x5b8d10,{'roots':_0x5481d7,'markers':_0x2ffb0d,'rootsAttributes':_0x14dd44});}_removeMetaData(_0x5bb08f){this['_savedMetaData']['delete'](_0x5bb08f);}_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(_0x552d15,_0x12e662=null){let _0x2452e5=null;_0x552d15['is']('documentFragment')||(_0x2452e5=new _0x5eb196(_0x552d15['name'],{'vid_start':null===_0x12e662?this['_revisionId']++:_0x12e662++}));const _0x58b0a2=[];for(const _0x3dab3a of _0x552d15['getChildren']())if(_0x3dab3a['is']('element')){_0x58b0a2['push'](this['_makeIdsRoot'](_0x3dab3a,_0x12e662));const _0xfa56ed=_0x58b0a2[_0x58b0a2['length']-0x1];null!==_0x12e662&&(_0x12e662=_0xfa56ed['is']('element','$text')?_0xfa56ed['getAttribute']('vid')+0x1:_0xfa56ed['getAttribute']('vid_end')+0x1);}else{for(let _0x1eccd0=0x0;_0x1eccd0<_0x3dab3a['offsetSize'];_0x1eccd0++)_0x58b0a2['push'](new _0x5eb196('$text',{'vid':null===_0x12e662?this['_revisionId']++:_0x12e662++}));}if(_0x552d15['is']('documentFragment')){const _0x15d0b6=St(_0x552d15['rootName'],_0x552d15['name']);return _0x15d0b6['_insertChild'](0x0,_0x58b0a2),_0x15d0b6;}return _0x2452e5['_setAttribute']('vid_end',null===_0x12e662?this['_revisionId']++:_0x12e662),_0x2452e5['_insertChild'](0x0,_0x58b0a2),_0x2452e5;}_calculateMetaData(_0xc33a0b,_0x5a2e60,_0x37d320){this['_reset']();const {roots:_0x2eec41,markers:_0x140c53,rootsAttributes:_0x1ee00c}=this['_savedMetaData']['get'](_0xc33a0b);this['_baseRoots']=new Map(_0x2eec41),this['_baseRootsAttributes']=new Map(_0x1afd15(_0x1ee00c));for(const [_0x43cd10,_0x40744c]of this['_baseRoots'])if('$graveyard'!==_0x43cd10&&(this['_diffRoots']['set'](_0x43cd10,It(_0x40744c)),this['_diffRootsAttributes']=new Map(_0x1afd15(_0x1ee00c)),_0x37d320)){const _0x2dda4b=this['_revisionId'];this['_idsRoots']['set'](_0x43cd10,this['_makeIdsRoot'](_0x40744c)),this['_baseIdsRoots']['set'](_0x43cd10,this['_makeIdsRoot'](_0x40744c,_0x2dda4b));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',It(this['_baseRoots']['get']('$graveyard'))),_0x37d320&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2e0a37,_0x505f47]of _0x140c53){const _0x50e850=this['_baseRoots']['get'](_0x505f47['rootName']),_0x2a4111=this['_diffRoots']['get'](_0x505f47['rootName']),_0x41d3b8=new _0x4deb36(_0x3bea13(_0x505f47['start'],_0x50e850),_0x3bea13(_0x505f47['end'],_0x50e850)),_0x5d3631=_0x4cd0b1(_0x41d3b8,_0x2a4111);_0x50e850['markers']['set'](_0x2e0a37,_0x41d3b8),this['_markers']['set'](_0x2e0a37,_0x5d3631);}this['_applyOperations'](_0xc33a0b,_0x5a2e60,_0x37d320);}_applyOperations(_0x353293,_0x37c5b9,_0x5c1d8b){for(const _0x581760 of this['source']['getOperations'](_0x353293,_0x37c5b9))this['_handleOperation'](_0x581760,_0x5c1d8b);for(const _0x5f100b of this['_diffRoots']['values']())_0x5f100b['markers']['clear']();for(const [_0x3ddfe2,_0x257e1b]of this['_markers'])this['_diffRoots']['get'](_0x257e1b['root']['rootName'])['markers']['set'](_0x3ddfe2,_0x257e1b['clone']());const _0x1b40ea=new Map(),_0x39f61b=new Map();for(const [_0x27a1a3,_0x3f60a2]of this['_diffRoots'])_0x1b40ea['set'](_0x27a1a3,It(_0x3f60a2)),_0x39f61b['set'](_0x27a1a3,this['_diffRootsAttributes']['get'](_0x27a1a3));this['_saveMetaData'](_0x37c5b9,_0x1b40ea,this['_markers'],_0x39f61b);}_getPreviousFrom(_0x1826cf){const _0xfe05ae=Array['from'](this['_savedMetaData']['keys']());_0xfe05ae['sort']((_0x34634d,_0x3ea6f8)=>_0x34634d-_0x3ea6f8),_0xfe05ae['reverse']();for(const _0x296e7f of _0xfe05ae)if(_0x296e7f<_0x1826cf)return _0x296e7f;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5ed612,_0x126124){const _0x1c5453=Array['from'](_0x126124['markers'])['map'](([_0x2c5585,_0x527adc])=>[_0x2c5585,_0x4cd0b1(_0x527adc,_0x5ed612)]);_0x5ed612['markers']=new Map(_0x1c5453);}_transformMarkers(_0x4d9f07){for(const _0x409278 of this['_markers']['values']()){const _0x176444=_0x409278['getTransformedByOperation'](_0x4d9f07),_0x2ff65d=_0x4deb36['_createFromRanges'](_0x176444);_0x409278['start']=_0x2ff65d['start'],_0x409278['end']=_0x2ff65d['end'];}}_handleOperation(_0x1e30da,_0x155f78){if('addRoot'!=_0x1e30da['type']&&'detachRoot'!=_0x1e30da['type']){if('insert'==_0x1e30da['type']){const _0xd305c4=_0x1e30da['position']['root'],_0x109462=_0xd305c4['rootName'],_0x543224=_0xd305c4['name'];this['_diffRoots']['has'](_0x109462)||(this['_diffRoots']['set'](_0x109462,St(_0x109462,_0x543224,!0x0)),this['_diffRootsAttributes']['set'](_0x109462,{}),_0x155f78&&this['_idsRoots']['set'](_0x109462,St(_0x109462,_0x543224,!0x0)));}else{if('addRootAttribute'==_0x1e30da['type']||'removeRootAttribute'==_0x1e30da['type']||'changeRootAttribute'==_0x1e30da['type'])return void this['_handleRootAttributeOperation'](_0x1e30da);'marker'==_0x1e30da['type']&&this['_handleMarkerOperation'](_0x1e30da);}if('marker'!==_0x1e30da['type']){const _0x80cf80=this['_cloneOperation'](_0x1e30da,this['_diffRoots']);_0x80cf80['_execute'](),this['_transformMarkers'](_0x80cf80);}if(_0x155f78)switch(_0x1e30da['type']){case'insert':this['_handleInsertOperation'](_0x1e30da);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1e30da);break;case'merge':this['_handleMergeOperation'](_0x1e30da);break;case'split':this['_handleSplitOperation'](_0x1e30da);}}else this['_handleRootOperation'](_0x1e30da,_0x155f78);}_cloneOperation(_0x49c401,_0x5bac76){const _0x46e123=_0x49c401['clone']();return _0x46e123['_authorId']=_0x49c401['_authorId'],_0x46e123['_aiSource']=_0x49c401['_aiSource'],_0x46e123['baseVersion']=null,_0x4cfc3e(_0x46e123,_0x5bac76),_0x46e123;}_getBaseVids(_0x38988f){return _0x38988f['map'](_0x55703e=>{const _0x410013=this['_getVidAttributeName'](_0x55703e);return Number(_0x55703e['item']['getAttribute'](_0x410013));});}_generateTape(_0x18a078,_0x3c604b){if(_0x18a078['is']('element','$text'))_0x3c604b['push']({'item':_0x18a078,'type':'text'});else{_0x18a078['is']('element')&&_0x3c604b['push']({'item':_0x18a078,'type':'elementStart'});for(const _0x191a19 of _0x18a078['getChildren']())this['_generateTape'](_0x191a19,_0x3c604b);_0x18a078['is']('element')&&_0x3c604b['push']({'item':_0x18a078,'type':'elementEnd'});}return _0x3c604b;}_getState(){const _0x429bcb=new Map(this['_touched']),_0x193afa=new Map(_0x429bcb),_0x13044d=new Map(),_0x93889={'insertions':{},'deletions':{}},_0x23b6c2={'insertions':{},'deletions':{}},_0x18a0da=new Map(),_0x520732=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x4c1edd=new Map();_0x520732['delete']('$graveyard');for(const _0xa3f9de of _0x520732){const _0xd3fc03=(this['_diffRoots']['get'](_0xa3f9de)??this['_baseRoots']['get'](_0xa3f9de))['name'],_0x15811c=this['_diffRoots']['get'](_0xa3f9de)||St(_0xa3f9de,_0xd3fc03,!0x1),_0x2e7ae6=this['_baseRoots']['get'](_0xa3f9de)||St(_0xa3f9de,_0xd3fc03,!0x1);_0x15811c['isAttached']()||_0x2e7ae6['isAttached']()?(_0x4c1edd['set'](_0xa3f9de,_0xd3fc03),_0x93889['insertions'][_0xa3f9de]=It(_0x15811c),_0x93889['deletions'][_0xa3f9de]=It(_0x2e7ae6),this['_copyMarkers'](_0x93889['deletions'][_0xa3f9de],_0x2e7ae6),this['_copyMarkers'](_0x93889['insertions'][_0xa3f9de],_0x15811c),_0x23b6c2['insertions'][_0xa3f9de]=this['_generateTape'](this['_idsRoots']['get'](_0xa3f9de),[]),_0x23b6c2['deletions'][_0xa3f9de]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xa3f9de)||St(_0xa3f9de,_0xd3fc03,!0x1),[])):_0x520732['delete'](_0xa3f9de);}for(const _0x876cba of _0x520732){const _0x396923=_0x23b6c2['insertions'][_0x876cba];for(const _0x4dd219 of _0x396923){const _0x15d016=this['_getVidAttributeName'](_0x4dd219),_0x430d85=_0x4dd219['item']['getAttribute'](_0x15d016);_0x193afa['delete'](_0x430d85),_0x430d85>=this['_startingRevisionId']&&_0x13044d['set'](_0x430d85,_0x429bcb['get'](_0x430d85));}}for(const _0x422d16 of _0x520732){const _0x238fc3=_0x23b6c2['insertions'][_0x422d16],_0x37c494=this['_getBaseVids'](_0x23b6c2['deletions'][_0x422d16]);let _0x18953b=0x0;for(const _0x4a1e7c of _0x238fc3){const _0x327352=this['_getVidAttributeName'](_0x4a1e7c),_0x1832b0=_0x4a1e7c['item']['getAttribute'](_0x327352);if(!_0x13044d['has'](_0x1832b0)&&!_0x18a0da['has'](_0x1832b0)){if(_0x193afa['has'](_0x1832b0))_0x18953b++;else{if(_0x1832b0!=_0x37c494[_0x18953b]){const _0x3294bf=_0x429bcb['get'](_0x1832b0)||_0x429bcb['get'](_0x37c494[_0x18953b]);for(;_0x1832b0!=_0x37c494[_0x18953b];)_0x193afa['has'](_0x37c494[_0x18953b])||(_0x18a0da['set'](_0x37c494[_0x18953b],_0x3294bf),_0x429bcb['set'](_0x37c494[_0x18953b],_0x3294bf)),_0x18953b++;}_0x18953b++;}}}}for(const _0x59c857 of _0x520732){const _0x53cfaf=_0x23b6c2['insertions'][_0x59c857];for(const _0x4ef56e of _0x53cfaf){const _0x59dde5=this['_getVidAttributeName'](_0x4ef56e),_0x2f3723=_0x4ef56e['item']['getAttribute'](_0x59dde5);if(_0x18a0da['has'](_0x2f3723)){const _0x5ce6fd=_0x18a0da['get'](_0x2f3723);_0x193afa['has'](_0x2f3723)||_0x193afa['set'](_0x2f3723,{..._0x5ce6fd}),_0x13044d['set'](_0x2f3723,{..._0x5ce6fd});}}}for(const _0x554872 of _0x193afa['keys']())_0x554872>=this['_startingRevisionId']&&_0x193afa['delete'](_0x554872);const _0x2a0d3f=new Map();for(const _0x483083 of _0x520732){let _0x114a72=_0x23b6c2['insertions'][_0x483083];for(const _0x3d46c7 of _0x114a72)if(_0x3d46c7['item']['is']('element','tableCell')){const _0x5c1e1a=this['_getVidAttributeName'](_0x3d46c7),_0x4630dd=_0x3d46c7['item']['getAttribute'](_0x5c1e1a);if(_0x13044d['has'](_0x4630dd)){const _0x414b37=_0x3d46c7['item']['parent']['parent']['getAttribute']('vid_start'),_0x518e0e=_0x13044d['get'](_0x4630dd),_0x3000f6=_0x2a0d3f['get'](_0x414b37)||{'users':new Set(),'aiSource':null};_0x3000f6['users']['add'](_0x518e0e['userId']),_0x3000f6['aiSource']=_0x3000f6['aiSource']||_0x518e0e['aiSource']||null,_0x2a0d3f['set'](_0x414b37,_0x3000f6);}}_0x114a72=_0x23b6c2['deletions'][_0x483083];for(const _0x5583e1 of _0x114a72)if(_0x5583e1['item']['is']('element','tableCell')){const _0x52253f=this['_getVidAttributeName'](_0x5583e1),_0xa6c206=_0x5583e1['item']['getAttribute'](_0x52253f);if(_0x193afa['has'](_0xa6c206)){const _0xaa4dd=_0x5583e1['item']['parent']['parent']['getAttribute']('vid_start'),_0x17dc1c=_0x193afa['get'](_0xa6c206),_0xa2b4cf=_0x2a0d3f['get'](_0xaa4dd)||{'users':new Set(),'aiSource':null};_0xa2b4cf['users']['add'](_0x17dc1c['userId']),_0xa2b4cf['aiSource']=_0xa2b4cf['aiSource']||_0x17dc1c['aiSource']||null,_0x2a0d3f['set'](_0xaa4dd,_0xa2b4cf);}}for(const _0x177b70 of _0x2a0d3f['keys']())(_0x13044d['has'](_0x177b70)||_0x193afa['has'](_0x177b70))&&_0x2a0d3f['delete'](_0x177b70);}for(const _0x173978 of _0x520732){const _0x37310d=_0x23b6c2['insertions'][_0x173978];let _0x59f365=null,_0x274ef5=null,_0x166a89=null;for(const _0x58a68f of _0x37310d){const _0xa61b6c=this['_getVidAttributeName'](_0x58a68f),_0x1d0962=_0x58a68f['item']['getAttribute'](_0xa61b6c),_0x31ed26=_0x2a0d3f['get'](_0x1d0962);if(_0x31ed26&&'elementStart'==_0x58a68f['type']&&(_0x59f365=Array['from'](_0x31ed26['users'])[0x0],_0x274ef5=_0x31ed26['aiSource'],_0x166a89=_0x58a68f['item']['getAttribute']('vid_end')),_0x59f365){const _0x40183d=_0x274ef5||_0x193afa['get'](_0x1d0962)?.['aiSource']||null,_0x28935f=_0x274ef5||_0x13044d['get'](_0x1d0962)?.['aiSource']||null;_0x193afa['set'](_0x1d0962,{'userId':_0x59f365,'aiSource':_0x40183d}),_0x13044d['set'](_0x1d0962,{'userId':_0x59f365,'aiSource':_0x28935f});}_0x1d0962==_0x166a89&&(_0x59f365=null,_0x166a89=null);}}const _0x17712f={},_0x4158ad=new Set();for(const _0x4262aa of _0x520732){const _0x2c8f08=_0x93889['deletions'][_0x4262aa],_0x342bb3=_0x93889['insertions'][_0x4262aa];for(const {userId:_0x118e83}of this['_touchedMarkers']['values']())null!==_0x118e83&&_0x4158ad['add'](_0x118e83);for(const {userId:_0x26d35a}of this['_touchedRoots']['values']())null!==_0x26d35a&&_0x4158ad['add'](_0x26d35a);const _0x8ef82d={};this['_markChanges'](_0x342bb3,_0x23b6c2['insertions'][_0x4262aa],_0x13044d,'insertion',_0x4158ad,_0x8ef82d),this['_markChanges'](_0x2c8f08,_0x23b6c2['deletions'][_0x4262aa],_0x193afa,'deletion',_0x4158ad,_0x8ef82d),this['_collectSuggestionAiSources'](_0x342bb3,_0x8ef82d),this['_collectSuggestionAiSources'](_0x2c8f08,_0x8ef82d),_0x17712f[_0x4262aa]={'insertions':this['_prepareViewToSave'](_0x342bb3),'deletions':this['_prepareViewToSave'](_0x2c8f08),'attachChange':this['_touchedRoots']['get'](_0x4262aa)||null,'attributesBefore':_0x1afd15(this['_baseRootsAttributes']['get'](_0x4262aa))||{},'attributesAfter':_0x1afd15(this['_diffRootsAttributes']['get'](_0x4262aa)),'rootElementName':_0x4c1edd['get'](_0x4262aa),'aiSources':_0x8ef82d};}const _0x483e1e=Array['from'](_0x13044d['values']())['some'](_0x2ebffa=>!(!_0x2ebffa||!_0x2ebffa['aiSource']))||Array['from'](_0x193afa['values']())['some'](_0x3841a4=>!(!_0x3841a4||!_0x3841a4['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x36d221=>this['_aiTouchedMarkers']['has'](_0x36d221));return{'diffData':_0x17712f,'authorsIds':Array['from'](_0x4158ad),'hasAIChanges':_0x483e1e};}_collectSuggestionAiSources(_0x206f14,_0x5efa39){const _0x24bcc3=_0x206f14['markers'];for(const _0x43927f of _0x24bcc3['keys']()){if(!_0x43927f['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x43927f))continue;const _0xf0c0c4=this['_aiTouchedMarkers']['get'](_0x43927f);_0xf0c0c4&&(_0x5efa39[_0x43927f]=_0xf0c0c4);}}_processRootBeforeSave(_0x53628d){for(const [,_0x30cdf0]of _0x53628d['markers']){const _0x405df1=_0x30cdf0['start']['getAncestors']()['filter'](_0x58d859=>'tableCell'==_0x58d859['name']);for(const _0x1c13ba of _0x405df1)0x1==_0x1c13ba['childCount']&&_0x1c13ba['getChild'](0x0)['is']('element','paragraph')&&_0x1c13ba['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0xdd945){this['_processRootBeforeSave'](_0xdd945);const _0x273947=this['editor']['data']['toView'](_0xdd945,{}),_0x397a68=Array['from'](_0x273947['getChildren']())['map'](_0x5a9350=>this['_getViewJson'](_0x5a9350));return JSON['stringify'](_0x397a68);}_getViewJson(_0x287ea1){if(_0x287ea1['is']('$text'))return _0x287ea1['data'];{const _0x47104f=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1bd646=_0x287ea1,_0x5cacbf=this['editor']['data']['htmlProcessor']['domConverter'],_0x533a17={'type':_0x47104f['_getTypeCharForViewElement'](_0x1bd646),'name':_0x1bd646['name'],'attributes':Array['from'](_0x1bd646['getAttributes']()),'children':Array['from'](_0x1bd646['getChildren']())['map'](_0x9a1384=>this['_getViewJson'](_0x9a1384))};if(_0x287ea1['is']('uiElement')&&'$comment'!=_0x287ea1['name']){const _0x274e4f=_0x287ea1['render'](_0x5cacbf['domDocument'],_0x5cacbf);_0x533a17['children']['push'](_0x274e4f['outerHTML']);}else{if(_0x287ea1['is']('rawElement')){const _0x3b38c4=_0x5cacbf['domDocument']['createElement'](_0x1bd646['name']);_0x287ea1['render'](_0x3b38c4,_0x5cacbf),_0x533a17['children']['push'](_0x3b38c4['innerHTML']);}}const _0x2c613d=Array['from'](_0x1bd646['getCustomProperties']());_0x2c613d['length']>0x0&&(_0x533a17['customProperties']=_0x2c613d);const _0x207dc1=_0x1bd646['getFillerOffset']();return null!==_0x207dc1&&(_0x533a17['fillerOffset']=_0x207dc1),_0x533a17;}}['_markChanges'](_0x5c71ce,_0x3d0a06,_0x27f7e7,_0x26a3e2,_0x23dab7,_0x2f380c){let _0x2e63fe=null,_0xe98087=null,_0x293686=0x0;const _0x3490de=this['editor']['model'];for(let _0x3f5690=0x0;_0x3f5690<_0x3d0a06['length'];_0x3f5690++){const _0x56d23e=this['_getVidAttributeName'](_0x3d0a06[_0x3f5690]),_0x2bc02c=_0x3d0a06[_0x3f5690]['item']['getAttribute'](_0x56d23e),_0x2b0012=_0x27f7e7['get'](_0x2bc02c),_0x44d8a8=_0x3f5690==_0x3d0a06['length']-0x1;!_0x2e63fe&&_0x2b0012&&(_0x2e63fe=_0x2b0012,_0xe98087=_0x3d0a06[_0x3f5690]);const _0x573237=!!_0x2e63fe&&!!_0x2b0012&&_0x2b0012['userId']!=_0x2e63fe['userId'],_0x3a0173=!!_0x2e63fe&&!!_0x2b0012&&_0x2b0012['aiSource']!=_0x2e63fe['aiSource'];_0x2e63fe&&(!_0x2b0012||_0x573237||_0x3a0173)&&(_0xa75ede(_0x2b0012,Et(_0xe98087,_0x5c71ce,_0x3490de),Et(_0x3d0a06[_0x3f5690],_0x5c71ce,_0x3490de)),_0x2e63fe=_0x2b0012||null,_0xe98087=_0x2b0012?_0x3d0a06[_0x3f5690]:null),_0x2e63fe&&_0x44d8a8&&_0xa75ede(_0x2b0012,Et(_0xe98087,_0x5c71ce,_0x3490de),Ot(_0x3d0a06[_0x3f5690],_0x5c71ce,_0x3490de));}function _0xa75ede(_0x10fb7e,_0x4a4871,_0x3fee2d){const _0x28ecf4=_0x2e63fe['userId'],_0x29deee=_0x2e63fe['aiSource'],_0x426e25='revision:'+_0x26a3e2+':'+_0x28ecf4+':'+_0x293686++,_0x34c47f=_0x3490de['createRange'](_0x4a4871,_0x3fee2d);_0x5c71ce['markers']['set'](_0x426e25,_0x34c47f),_0x29deee&&(_0x2f380c[_0x426e25]=_0x29deee),null!==_0x28ecf4&&_0x23dab7['add'](_0x28ecf4);}}_getVidAttributeName(_0x20012a){switch(_0x20012a['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x107f81){const _0x42b481=this['_idsRoots']['get'](_0x107f81['position']['root']['rootName']),_0x5e4cfa=_0x3bea13(_0x107f81['position'],_0x42b481),_0x5f24f7=null===_0x107f81['_authorId']?null:_0x107f81['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4f7085=_0x107f81['_aiSource']||null,_0x525ca4=_0x5e4cfa['parent'],_0x478388=this['_revisionId'],_0x1914e6=[];for(const _0x321f86 of _0x107f81['nodes'])if(_0x321f86['is']('element'))_0x1914e6['push'](this['_makeIdsRoot'](_0x321f86));else{for(let _0x1f0a8d=0x0;_0x1f0a8d<_0x321f86['offsetSize'];_0x1f0a8d++)_0x1914e6['push'](new _0x5eb196('$text',{'vid':this['_revisionId']++}));}const _0x483b68=this['_revisionId'];for(let _0x5cee6b=_0x478388;_0x5cee6b<_0x483b68;_0x5cee6b++)this['_touched']['set'](_0x5cee6b,{'userId':_0x5f24f7,'aiSource':_0x4f7085});_0x525ca4['_insertChild'](_0x5e4cfa['offset'],_0x1914e6);}_setTouched(_0x3606c1,_0xd2051f,_0x4e9dcd){this['_touched']['set'](_0x3606c1,{'userId':_0xd2051f,'aiSource':_0x4e9dcd||this['_touched']['get'](_0x3606c1)?.['aiSource']||null});}_handleMoveOperation(_0x2cf6b3){(_0x2cf6b3=this['_cloneOperation'](_0x2cf6b3,this['_idsRoots']))['_execute']();const _0x581796=null===_0x2cf6b3['_authorId']?null:_0x2cf6b3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x15419a=_0x2cf6b3['_aiSource']||null,_0x269e56=_0x2cf6b3['getMovedRangeStart'](),_0x59f565=_0x269e56['parent'],_0x46ac26=_0x269e56['offset'],_0x582599=(_0x2f2529,_0x8b98fd,_0xff0ab7)=>{for(let _0x2e9398=_0x8b98fd;_0x2e9398<_0xff0ab7;_0x2e9398++){const _0x53c39c=_0x2f2529['getChild'](_0x2e9398);_0x53c39c['is']('element','$text')?this['_setTouched'](_0x53c39c['getAttribute']('vid'),_0x581796,_0x15419a):(this['_setTouched'](_0x53c39c['getAttribute']('vid_start'),_0x581796,_0x15419a),_0x582599(_0x53c39c,0x0,_0x53c39c['childCount']),this['_setTouched'](_0x53c39c['getAttribute']('vid_end'),_0x581796,_0x15419a));}};_0x582599(_0x59f565,_0x46ac26,_0x46ac26+_0x2cf6b3['howMany']);}_handleMergeOperation(_0x114095){const _0x576b53=null===(_0x114095=this['_cloneOperation'](_0x114095,this['_idsRoots']))['_authorId']?null:_0x114095['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5b22ec=_0x114095['_aiSource']||null,_0x1315c5=_0x114095['targetPosition']['parent'],_0x236d8b=_0x114095['sourcePosition']['parent'],_0x44ebf9=_0x1315c5['getAttribute']('vid_end'),_0x4450db=_0x236d8b['getAttribute']('vid_start');_0x1315c5['_setAttribute']('vid_end',_0x236d8b['getAttribute']('vid_end')),_0x236d8b['_setAttribute']('vid_end',_0x44ebf9),this['_setTouched'](_0x4450db,_0x576b53,_0x5b22ec),this['_setTouched'](_0x44ebf9,_0x576b53,_0x5b22ec),_0x114095['_execute']();}_handleSplitOperation(_0x2653f9){const _0x166e75=null===(_0x2653f9=this['_cloneOperation'](_0x2653f9,this['_idsRoots']))['_authorId']?null:_0x2653f9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x9f2e4e=_0x2653f9['_aiSource']||null,_0x2b69dd=_0x2653f9['graveyardPosition'],_0x459354=_0x2653f9['splitPosition']['parent'];_0x2653f9['_execute']();const _0x2ff1e5=_0x459354['getAttribute']('vid_end'),_0x3c960a=_0x2653f9['insertionPosition']['nodeAfter'];if(_0x2b69dd){const _0x506d78=_0x3c960a['getAttribute']('vid_end'),_0xa54010=_0x459354['getAttribute']('vid_end');_0x459354['_setAttribute']('vid_end',_0x506d78),_0x3c960a['_setAttribute']('vid_end',_0xa54010),this['_setTouched'](_0x459354['getAttribute']('vid_end'),_0x166e75,_0x9f2e4e),this['_setTouched'](_0x3c960a['getAttribute']('vid_start'),_0x166e75,_0x9f2e4e);}else{const _0x24d7b9=this['_revisionId']++,_0x1658fa=this['_revisionId']++;_0x459354['_setAttribute']('vid_end',_0x24d7b9),_0x3c960a['_setAttribute']('vid_start',_0x1658fa),_0x3c960a['_setAttribute']('vid_end',_0x2ff1e5),this['_setTouched'](_0x24d7b9,_0x166e75,_0x9f2e4e),this['_setTouched'](_0x1658fa,_0x166e75,_0x9f2e4e);}}_handleMarkerOperation(_0x20187d){if(!_0x20187d['affectsData'])return;const _0x15ab54=(_0x20187d=this['_cloneOperation'](_0x20187d,this['_diffRoots']))['oldRange']?_0x20187d['oldRange']['root']:null,_0x51095c=_0x20187d['newRange']?_0x20187d['newRange']['root']:null;_0x15ab54&&this['_markers']['delete'](_0x20187d['name']),_0x51095c&&this['_markers']['set'](_0x20187d['name'],_0x20187d['newRange']['clone']());const _0x27164e=null===_0x20187d['_authorId']?null:_0x20187d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xc4e9a=_0x20187d['name'];if(_0x20187d['_aiSource']&&this['_aiTouchedMarkers']['set'](_0xc4e9a,_0x20187d['_aiSource']),!this['_touchedMarkers']['has'](_0xc4e9a))return void this['_touchedMarkers']['set'](_0xc4e9a,{'range':_0x20187d['oldRange'],'userId':_0x27164e});const _0x51d85d=this['_touchedMarkers']['get'](_0xc4e9a),_0xb413c6=_0x51d85d['range'],_0x27b76b=_0x20187d['newRange'];null==_0xb413c6&&null==_0x27b76b||_0xb413c6&&_0x27b76b&&_0xb413c6['isEqual'](_0x27b76b)?this['_touchedMarkers']['delete'](_0x20187d['name']):_0x51d85d['userId']=_0x27164e;}_handleRootOperation(_0x1d6a83,_0x8954f4){this['_diffRoots']['has'](_0x1d6a83['rootName'])?this['_diffRoots']['get'](_0x1d6a83['rootName'])['_isAttached']=_0x1d6a83['isAdd']:(this['_diffRoots']['set'](_0x1d6a83['rootName'],St(_0x1d6a83['rootName'],_0x1d6a83['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1d6a83['rootName'],{}),_0x8954f4&&this['_idsRoots']['set'](_0x1d6a83['rootName'],St(_0x1d6a83['rootName'],_0x1d6a83['elementName'],!0x0)));const _0x3bc2f1=null===_0x1d6a83['_authorId']?null:_0x1d6a83['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x342ce1=this['_touchedRoots']['get'](_0x1d6a83['rootName']);_0x342ce1&&_0x342ce1['userId']===_0x3bc2f1?this['_touchedRoots']['delete'](_0x1d6a83['rootName']):this['_touchedRoots']['set'](_0x1d6a83['rootName'],{'userId':_0x3bc2f1,'isAttached':_0x1d6a83['isAdd']});}_handleRootAttributeOperation(_0x58ea4d){const _0x26e7da=this['_diffRootsAttributes']['get'](_0x58ea4d['root']['rootName']);null===_0x58ea4d['newValue']?delete _0x26e7da[_0x58ea4d['key']]:_0x26e7da[_0x58ea4d['key']]=_0x58ea4d['newValue'];}};function It(_0x118586){const _0x296140=St(_0x118586['rootName'],_0x118586['name'],_0x118586['isAttached']());for(const _0x18c59e of _0x118586['getChildren']()){const _0x349640=_0x18c59e['_clone'](!0x0);_0x296140['_appendChild'](_0x349640);}return _0x296140;}function St(_0xd85e15,_0x4c9ab2,_0x13b8f0=!0x0){const _0x350e15=new _0x226390();return _0x350e15['rootName']=_0xd85e15,_0x350e15['name']=_0x4c9ab2,_0x350e15['_isAttached']=_0x13b8f0,_0x350e15['isAttached']=()=>_0x350e15['_isAttached'],_0x350e15;}function Et(_0x5f69a9,_0x4cd51f,_0x3f862d){const _0x1d012e='elementEnd'==_0x5f69a9['type']?_0x3f862d['createPositionAt'](_0x5f69a9['item'],'end'):_0x3f862d['createPositionBefore'](_0x5f69a9['item']);return _0x3f862d['createPositionFromPath'](_0x4cd51f,_0x1d012e['path'],_0x1d012e['stickiness']);}function Ot(_0x30d818,_0x4879b4,_0x385337){const _0x429b92='elementStart'==_0x30d818['type']?_0x385337['createPositionAt'](_0x30d818['item'],0x0):_0x385337['createPositionAfter'](_0x30d818['item']);return _0x385337['createPositionFromPath'](_0x4879b4,_0x429b92['path'],_0x429b92['stickiness']);}const Ct=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x752e76(ut);var Nt=class extends Ct{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x43d858,_0x20c0ce){super(_0x43d858),this['focusTracker']=new _0x253368(),this['keystrokes']=new _0x340454(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x20c0ce),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'](),mt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x143fd5=_0x3346f1=>_0x3346f1['stopPropagation']();this['keystrokes']['set']('arrowright',_0x143fd5),this['keystrokes']['set']('arrowleft',_0x143fd5),this['keystrokes']['set']('arrowup',_0x143fd5),this['keystrokes']['set']('arrowdown',_0x143fd5);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x27f0d3){this['revisionNameInputView']['fieldView']['element']['value']=_0x27f0d3['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x4d34cb){const _0x2d6b7f=new tt(this['locale'],vt),_0xb19aac=_0x2d6b7f['fieldView'];_0xb19aac['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x17664b=Rt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x4d34cb&&(_0x17664b+='\x20('+Rt(this['locale'],'optional')+')'),(_0x2d6b7f['label']=_0x17664b,_0xb19aac['on']('input',()=>{this['revisionNameInputValue']=_0xb19aac['element']['value']['trim']();}),_0x2d6b7f);}},xt=class extends _0x560756{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt];}['_saveRevisionFormView'];init(){const _0x65b75b=this['editor'],_0x2c23ba=_0x65b75b['plugins']['get']('RevisionTracker');_0x65b75b['ui']['componentFactory']['add']('revisionHistory',_0x36a620=>{const _0x3491e5=ft(_0x36a620),_0x489d39=_0x3491e5['panelView']['children'],_0x4939fd=new et(_0x36a620),_0x426617=new it(_0x36a620),_0x4596d4=this['_createSaveRevisionButton'](_0x28da59),_0x5438b3=new it(_0x36a620),_0x3a65a0=this['_createOpenRevisionButton'](_0x28da59);return _0x3491e5['bind']('isEnabled')['to'](_0x2c23ba,'isReady',_0x2c23ba,'isEnabled',_0x65b75b,'isReadOnly',(_0x5845ec,_0x3fa47a,_0x466089)=>_0x5845ec&&_0x3fa47a&&!_0x466089),_0x3491e5['buttonView']['set']({'icon':_0x1666dc,'label':Rt(_0x36a620,'Revision\x20history'),'tooltip':!0x0}),_0x4596d4['set']({'withText':!0x0,'role':'menuitem'}),_0x3a65a0['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x3a65a0,'execute',()=>{_0x3491e5['isOpen']=!0x1,_0x65b75b['editing']['view']['focus']();},{'priority':'low'}),_0x426617['children']['add'](_0x4596d4),_0x5438b3['children']['add'](_0x3a65a0),_0x4939fd['role']='menu',_0x4939fd['items']['addMany']([_0x426617,_0x5438b3]),_0x489d39['add'](_0x4939fd),_0x3491e5;}),_0x65b75b['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x5349b3=this['editor'],_0x5f4473=_0x5349b3['locale'],_0x31b43e=_0x5349b3['plugins']['get']('RevisionTracker'),_0x3b6d35=new rt(_0x5f4473),_0x5e2c5d=new ot(_0x5f4473);_0x3b6d35['bind']('isEnabled')['to'](_0x31b43e,'isReady',_0x31b43e,'isEnabled',_0x5349b3,'isReadOnly',(_0x5c3cf6,_0x6db44b,_0x445293)=>_0x5c3cf6&&_0x6db44b&&!_0x445293),_0x3b6d35['buttonView']['set']({'icon':_0x1666dc,'label':Rt(_0x5f4473,'Revision\x20history')});const _0x409954=new nt(_0x5f4473,_0x3b6d35),_0x1c6c41=this['_createSaveRevisionButton'](st);_0x1c6c41['delegate']('execute')['to'](_0x3b6d35),_0x409954['children']['add'](_0x1c6c41),_0x5e2c5d['items']['add'](_0x409954);const _0x5d9eac=new nt(_0x5f4473,_0x3b6d35),_0x41fd5a=this['_createOpenRevisionButton'](st);return _0x41fd5a['delegate']('execute')['to'](_0x3b6d35),_0x5d9eac['children']['add'](_0x41fd5a),_0x5e2c5d['items']['add'](_0x5d9eac),_0x3b6d35['panelView']['children']['add'](_0x5e2c5d),_0x3b6d35;}_createSaveRevisionButton(_0x3fe56d){const _0x54c5eb=this['editor'],_0x4a3499=_0x54c5eb['plugins']['get']('RevisionTracker'),_0x439960=new _0x3fe56d(_0x54c5eb['locale']);return _0x439960['set']({'label':Rt(_0x54c5eb['locale'],'Save\x20current\x20revision')}),_0x439960['bind']('isEnabled')['to'](_0x4a3499,'isReady',_0x4a3499,'isEnabled',_0x54c5eb,'isReadOnly',(_0x7509ff,_0x2b521c,_0x34c54c)=>_0x7509ff&&_0x2b521c&&!_0x34c54c),this['listenTo'](_0x439960,'execute',()=>{this['_showDialog']();}),_0x439960;}_createOpenRevisionButton(_0x258f4f){const _0x46dcf4=this['editor'],_0x3bcef1=_0x46dcf4['plugins']['get']('RevisionTracker'),_0x279521=new _0x258f4f(_0x46dcf4['locale']);return _0x279521['set']({'label':Rt(_0x46dcf4['locale'],'Open\x20revision\x20history')}),_0x279521['bind']('isEnabled')['to'](_0x3bcef1,'isReady',_0x46dcf4,'isReadOnly',(_0x3d0267,_0x3ca7ca)=>_0x3d0267&&!_0x3ca7ca),this['listenTo'](_0x279521,'execute',()=>{_0x46dcf4['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x279521;}['_showDialog'](){const _0x4a17fe=this['editor'],_0x3664ae=_0x4a17fe['locale'],_0x16dcc0=_0x4a17fe['plugins']['get']('Dialog'),_0x4c6c09=_0x4a17fe['plugins']['get']('RevisionTracker');function _0x2c5733(_0x4c9529){_0x4a17fe['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4c9529['revisionName']?_0x4c9529['revisionNameInputView']['errorText']=Rt(_0x3664ae,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4a17fe['plugins']['get'](kt)['saveRevision']({'name':_0x4c9529['revisionName']}),_0x16dcc0['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x2c5733(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x16dcc0['show']({'id':'revisionSave','title':Rt(_0x3664ae,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':Rt(_0x4a17fe['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x16dcc0['hide']()},{'label':Rt(_0x4a17fe['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3c4e80){_0x3c4e80['bind']('isEnabled')['to'](_0x4c6c09,'isReady',_0x4c6c09,'isEnabled',_0x4a17fe,'isReadOnly',(_0x5c3c72,_0x505b8c,_0x1c7d21)=>_0x5c3c72&&_0x505b8c&&!_0x1c7d21);},'onExecute':()=>_0x2c5733(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x4f607e=this['editor'],_0x2a6fbe=_0x4f607e['locale'];this['_saveRevisionFormView']=new Nt(_0x2a6fbe,_0x4f607e['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Dt=class extends ut{['changeId'];['_model'];constructor(_0x77584c,_0x47732f,_0x17d7f7=!0x1){super(_0x77584c),this['_model']=_0x47732f,this['changeId']=_0x47732f['id'];const _0x5b4272=this['bindTemplate'],_0x4390ee=_0x17d7f7&&!!_0x47732f['data']['aiSource'],_0x248812=_0x4390ee?this['_createAiIconView'](_0x77584c):null;this['set']('type',_0x47732f['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5b4272['to']('type',_0x2f0f88=>'ck-revision-change__'+_0x2f0f88),..._0x4390ee?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x4390ee?[this['_createAiDescriptionView'](_0x77584c,_0x47732f),_0x248812]:this['_getDescriptionChildren'](_0x77584c,_0x47732f)}]});}_getDescriptionChildren(_0x4e2e8c,_0x2cc273){let _0x13501e='Removed\x20by';return _0x2cc273['data']['isSuggestion']?_0x13501e='Suggested\x20by':'add'==_0x2cc273['type']&&(_0x13501e='Added\x20by'),[this['_createLabel'](Rt(_0x4e2e8c,_0x13501e)),{'text':'\x20'+_0x2cc273['author']['name']}];}_createAiDescriptionView(_0x243088,_0x455512){let _0x192c45='AI_SOURCE_REMOVED_BY';_0x455512['data']['isSuggestion']?_0x192c45='AI_SOURCE_SUGGESTED_BY':'add'==_0x455512['type']&&(_0x192c45='AI_SOURCE_ADDED_BY');const _0x51d3d5=new ut(_0x243088);return _0x51d3d5['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0x51d3d5['render'](),_0x51d3d5['element']['innerHTML']=Rt(_0x243088,_0x192c45,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+Rt(_0x243088,'AI_SOURCE_AI')+'</span>']),_0x51d3d5['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x455512['author']['name'],_0x51d3d5;}_createLabel(_0xfdc8c5){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0xfdc8c5}]};}_createAiIconView(_0x1fba5a){const _0x40dff3=new _0x47b26e();return _0x40dff3['content']=_0x1b1789,_0x40dff3['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':Rt(_0x1fba5a,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x40dff3;}['focus'](){this['element']['focus']();}};const Vt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x1aab40();var Tt=class extends Vt{['id'];author;type;data;rootName;constructor(_0x5bcf72){super(),this['id']=_0x5bcf72['id']||_0x17aa1f(),this['author']=_0x5bcf72['author'],this['type']=_0x5bcf72['type'],this['data']=_0x5bcf72['data']||{},this['rootName']=_0x5bcf72['rootName'],this['set']('createdAt',_0x5bcf72['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Mt=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x230afd,_0x4c8519){this['newRevisionId']=_0x230afd,this['oldRevisionId']=_0x4c8519,this['changes']=new _0x2ec604();}_setChanges(_0x53e696){for(const _0xa5f7e9 of _0x53e696)this['changes']['add'](_0xa5f7e9);}},Ht=class extends _0x560756{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[_0xa0a7e,_0x525ab0,yt,bt];}constructor(_0x350943){super(_0x350943),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',(_0x17b115,_0x34e228,_0x10e1e8)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x487ab2=>{for(const _0x235ec0 of this['editor']['editing']['view']['document']['roots'])_0x10e1e8?_0x487ab2['removeClass']('ck-editor__editable__overlay',_0x235ec0):_0x487ab2['addClass']('ck-editor__editable__overlay',_0x235ec0);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2459a5=>null!==_0x2459a5),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3abf6c,_0x37aab5,_0x3dd3e5)=>_0x3abf6c&&_0x3dd3e5?_0x37aab5['changes']['getIndex'](_0x3dd3e5):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1fba7b,_0x388962)=>_0x1fba7b?_0x388962['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x525ab0),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x54d17a=this['editor'],_0x4348d2=new Ft(_0x54d17a,{'direction':'backward'}),_0x99cb20=new Ft(_0x54d17a,{'direction':'forward'});_0x54d17a['commands']['add']('showPreviousChange',_0x4348d2),_0x54d17a['commands']['add']('showNextChange',_0x99cb20),_0x54d17a['commands']['add']('restoreRevision',new Lt(_0x54d17a)),this['on']('change:numberOfChanges',()=>{_0x4348d2['refresh'](),_0x99cb20['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x54d17a['enableReadOnlyMode']('revision-viewer'),_0x54d17a['plugins']['has']('WidgetToolbarRepository')&&_0x54d17a['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x2773e0){return await this['_utils']['loadRevisionData'](_0x2773e0,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2773e0);}async getRevisionRootsAttributes(_0x4996f6){return await this['_utils']['loadRevisionData'](_0x4996f6,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4996f6);}async['compare'](_0x516051,_0x34c5dc,_0x1e8f13=!0x1){if(!this['isEnabled'])return;const _0x14c8b1=this['diff'],_0x1fe981=this['repository'],_0x222f35='string'==typeof _0x516051?_0x1fe981['getRevision'](_0x516051):_0x516051,_0x306595='string'==typeof _0x34c5dc?_0x1fe981['getRevision'](_0x34c5dc):_0x34c5dc,_0x56368a=_0x222f35['id'],_0x5789c1=_0x306595?_0x306595['id']:null;if(!_0x1e8f13&&this['diff']&&this['diff']['newRevisionId']===_0x56368a&&this['diff']['oldRevisionId']===_0x5789c1)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Mt(_0x56368a,_0x5789c1);const _0x1b9a96=this['_getRevisionsRange'](_0x222f35,_0x306595,!0x0)['map'](_0x13faf7=>this['_utils']['loadRevisionData'](_0x13faf7,this['adapter']));return _0x1b9a96['push'](new Promise(_0x22c271=>{setTimeout(_0x22c271,0x14);})),Promise['all'](_0x1b9a96)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x1c793c=this['_getDiff'](_0x56368a,_0x5789c1);this['_cleanUpCommentMarkers'](_0x1c793c);for(const _0x277d26 of _0x1c793c['changes'])this['_changeIdToChange']['set'](_0x277d26['id'],_0x277d26);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xb109d1=>{for(const _0x561eaf of this['editor']['model']['document']['getRootNames']())_0xb109d1['detachRoot'](_0x561eaf);for(const _0x252494 of Object['keys'](_0x1c793c['model'])){const _0x42754=_0x1c793c['model'][_0x252494]['name'],_0x230d2e=_0xb109d1['addRoot'](_0x252494,_0x42754);for(const _0x33fbc8 of Object['keys'](_0x1c793c['attributes'][_0x252494]))_0xb109d1['setAttribute'](_0x33fbc8,_0x1c793c['attributes'][_0x252494][_0x33fbc8],_0x230d2e);_0xb109d1['insert'](_0x1c793c['model'][_0x252494],_0x230d2e,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x1c793c['changes'])),this['isReady']=!0x0;})['catch'](_0x17472f=>{console['error'](_0x17472f),this['_cleanUp'](),_0x14c8b1&&(this['diff']=_0x14c8b1),this['isReady']=!0x0;});}addRevisionData(_0x5c7d37,_0x3fda6e){const _0x51ebe3=this['repository']['createRevision'](_0x5c7d37);return _0x51ebe3['on']('_update',(_0x4213cd,_0x1e35d1,_0x50bbf4)=>_0x3fda6e(_0x1e35d1,_0x50bbf4,_0x51ebe3)),this['repository']['addRevision'](_0x51ebe3),_0x51ebe3;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x556222=>{for(const _0x5d1f22 of this['editor']['model']['document']['getRootNames']())_0x556222['detachRoot'](_0x5d1f22);});}_cleanUpCommentMarkers(_0x1092d8){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x1b168f=this['_getVisibleCommentThreadIds']();for(const _0xdc5760 of Object['values'](_0x1092d8['model']))for(const _0x1b7ebd of Array['from'](_0xdc5760['markers']['keys']()))_0x1b7ebd['startsWith']('revision-comment:')&&!_0x1b168f['has'](Pt(_0x1b7ebd))&&_0xdc5760['markers']['delete'](_0x1b7ebd);}_sortAndFilterDiffChanges(_0x5079e6){const _0x374165=[],_0x451040=new Map();for(const _0x275c88 of this['editor']['model']['document']['getRootNames']()){const _0x450752=this['editor']['editing']['view']['getDomRoot'](_0x275c88);if(!_0x450752)continue;const _0x2738e2=_0x450752['getClientRects']()['item'](0x0);_0x2738e2&&(_0x374165['push'](_0x275c88),_0x451040['set'](_0x275c88,_0x2738e2));}return _0x374165['sort']((_0xaef812,_0x227a3f)=>{const _0x9bb617=_0x451040['get'](_0xaef812),_0x3e0c2f=_0x451040['get'](_0x227a3f);return _0x9bb617['y']-_0x3e0c2f['y']||_0x9bb617['x']-_0x3e0c2f['x'];}),(_0x5079e6=_0x5079e6['filter'](_0x47ddaf=>_0x374165['includes'](_0x47ddaf['rootName'])))['sort']((_0x42e696,_0x3324de)=>_0x374165['indexOf'](_0x42e696['rootName'])-_0x374165['indexOf'](_0x3324de['rootName'])),_0x5079e6;}['_makeTape'](_0x26de3d,_0x878f7c={}){const _0x5bee40=Array['from'](_0x26de3d['markers'])['filter'](([_0x3d3bb1,_0x913b3e])=>_0x3d3bb1['startsWith']('revision:')&&!_0x913b3e['isCollapsed']),_0x388acc=Array['from'](this['editor']['model']['createRangeIn'](_0x26de3d)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x5bee40['length'])for(const _0x231bb8 of _0x388acc){const [_0x479dcc,_0x5593e1]=_0x5bee40[0x0],[,_0x41d656,_0x88cd00]=_0x479dcc['split'](':'),_0x21a782=_0x878f7c[_0x479dcc]||null;if(_0x5593e1['end']['isEqual'](_0x231bb8['nextPosition'])&&_0x5bee40['shift'](),(_0x231bb8['previousPosition']['isEqual'](_0x5593e1['start'])||_0x231bb8['previousPosition']['isAfter'](_0x5593e1['start']))&&('insertion'==_0x41d656?_0x231bb8['isAdded']={'userId':_0x88cd00,'aiSource':_0x21a782}:'deletion'==_0x41d656&&(_0x231bb8['isRemoved']={'userId':_0x88cd00,'aiSource':_0x21a782})),0x0==_0x5bee40['length'])break;}return _0x388acc;}_refreshStartEndIndex(_0xfb13d4){const _0x25ffc7=new Map();for(let _0x522ea1=0x0;_0x522ea1<_0xfb13d4['length'];_0x522ea1++)'text'===_0xfb13d4[_0x522ea1]['type']?(_0xfb13d4[_0x522ea1]['item']['startIndex']=_0x522ea1,_0xfb13d4[_0x522ea1]['item']['endIndex']=_0x522ea1):('elementStart'===_0xfb13d4[_0x522ea1]['type']?_0xfb13d4[_0x522ea1]['item']['startIndex']=_0x522ea1:'elementEnd'===_0xfb13d4[_0x522ea1]['type']&&(_0xfb13d4[_0x522ea1]['item']['endIndex']=_0x522ea1),_0x25ffc7['set'](_0xfb13d4[_0x522ea1]['id'],_0x522ea1));for(const _0x3cd04f of _0x25ffc7['values']())'elementStart'===_0xfb13d4[_0x3cd04f]['type']?_0xfb13d4[_0x3cd04f]['item']['endIndex']=_0x25ffc7['get'](_0xfb13d4[_0x3cd04f]['pairId']):'elementEnd'===_0xfb13d4[_0x3cd04f]['type']&&(_0xfb13d4[_0x3cd04f]['item']['startIndex']=_0x25ffc7['get'](_0xfb13d4[_0x3cd04f]['pairId']));}['_processTape'](_0x5313c9){for(let _0x34d72b=0x0;_0x34d72b<_0x5313c9['length'];_0x34d72b++){if('elementStart'===_0x5313c9[_0x34d72b]['type'])_0x5313c9[_0x34d72b]['item']['startIndex']=_0x34d72b;else{if('elementEnd'===_0x5313c9[_0x34d72b]['type']){_0x5313c9[_0x34d72b]['item']['endIndex']=_0x34d72b;const _0x2feacc=_0x5313c9[_0x34d72b]['item']['startIndex'];_0x5313c9[_0x2feacc]['pairId']=_0x5313c9[_0x34d72b]['id'],_0x5313c9[_0x34d72b]['pairId']=_0x5313c9[_0x2feacc]['id'];}else _0x5313c9[_0x34d72b]['item']['startIndex']=_0x34d72b,_0x5313c9[_0x34d72b]['item']['endIndex']=_0x34d72b,_0x5313c9[_0x34d72b]['pairId']=null;}_0x5313c9[_0x34d72b]['markersStart']||(_0x5313c9[_0x34d72b]['markersStart']=[],_0x5313c9[_0x34d72b]['markersEnd']=[]);}}_markInsertions(_0xfc28a5,_0x2583de){const _0x49efeb=_0xfc28a5['filter'](_0x3f4a56=>!_0x3f4a56['isAdded']);for(let _0x5e0654=0x0;_0x5e0654<_0x2583de['length'];_0x5e0654++)_0x2583de[_0x5e0654]['isAdded']&&(_0x49efeb[_0x5e0654]['isAdded']=_0x2583de[_0x5e0654]['isAdded']);}_getDiff(_0x5ec58b,_0x383dc6=null){const _0x510a74=this['repository']['getRevision'](_0x5ec58b),_0x2f3215=_0x383dc6?this['repository']['getRevision'](_0x383dc6):null,_0x16b8ab=this['_getRevisionsRange'](_0x510a74,_0x2f3215),_0x2219c1=_0x16b8ab[_0x16b8ab['length']-0x1],_0xe6148=new Map(),_0x36cf68={'model':{},'attributes':{},'changes':[]},_0x1f3eaa=new Set(),_0x1aa69d=new Map();for(let _0x14e5c2=_0x16b8ab['length']-0x1;_0x14e5c2>=0x0;_0x14e5c2--){const _0x54e83b=_0x16b8ab[_0x14e5c2];for(const _0xbc7e93 of Object['keys'](_0x54e83b['diffData']))if(_0x54e83b['diffData'][_0xbc7e93]['attachChange']){const _0x3c5f31=_0x54e83b['diffData'][_0xbc7e93]['attachChange'];_0x3c5f31['isAttached']?(_0x1f3eaa['add'](_0xbc7e93),_0x1aa69d['has'](_0xbc7e93)&&_0x1aa69d['get'](_0xbc7e93)['userId']==_0x3c5f31['userId']?_0x1aa69d['delete'](_0xbc7e93):_0x1aa69d['set'](_0xbc7e93,_0x3c5f31)):_0x1aa69d['has'](_0xbc7e93)?(_0x1f3eaa['delete'](_0xbc7e93),_0x1aa69d['delete'](_0xbc7e93)):(_0x1f3eaa['add'](_0xbc7e93),_0x1aa69d['set'](_0xbc7e93,_0x3c5f31));}else _0x1f3eaa['add'](_0xbc7e93);}for(const _0x7297aa of _0x1f3eaa){const _0x148492=_0x1aa69d['has'](_0x7297aa)&&!_0x1aa69d['get'](_0x7297aa)['isAttached'];let _0x4d0947=_0x148492?_0x16b8ab['length']-0x1:0x0;const _0xab3edc=_0x148492?-0x1:0x1;for(;_0x16b8ab[_0x4d0947];){const _0x26d0c2=_0x16b8ab[_0x4d0947];if(_0x26d0c2['diffData'][_0x7297aa]){const _0x1f12ca=_0x148492?_0x26d0c2['diffData'][_0x7297aa]['attributesBefore']:_0x26d0c2['diffData'][_0x7297aa]['attributesAfter'];_0x36cf68['attributes'][_0x7297aa]=_0x1f12ca?_0x1afd15(_0x1f12ca):{};break;}_0x4d0947+=_0xab3edc;}}for(const _0x5226bc of _0x16b8ab){_0x5226bc['model']={};for(const _0x1940bf of _0x5226bc['authors'])_0xe6148['set'](_0x1940bf['id'],_0x1940bf);for(const _0x29d49d of _0x1f3eaa){const _0x432507=_0x5226bc['diffData'][_0x29d49d]?_0x5226bc['diffData'][_0x29d49d]['insertions']:'[]',_0x1d5125=_0x5226bc['diffData'][_0x29d49d]?_0x5226bc['diffData'][_0x29d49d]['deletions']:'[]',_0x3b077f=_0x5226bc['diffData'][_0x29d49d]?.['rootElementName']||'$root';_0x5226bc['model'][_0x29d49d]={'insertions':this['_utils']['_makeModelFromViewString'](_0x432507,_0x3b077f),'deletions':this['_utils']['_makeModelFromViewString'](_0x1d5125,_0x3b077f)};}}for(const _0x959984 of _0x1f3eaa){let _0x5f2acf=null,_0x15e727=0x0;const _0x295d29=_0x16b8ab['map'](_0x5787d4=>_0x5787d4['diffData'][_0x959984]?.['rootElementName'])['find'](_0x2850e3=>void 0x0!==_0x2850e3)||'$root',_0x24dfc5=new Map(Array['from'](_0x510a74['model'][_0x959984]['insertions']['markers'])['filter'](([_0x19719b])=>!_0x19719b['startsWith']('revision:')));let _0x1274a8=0x0;for(const _0x3fb6b4 of _0x16b8ab){const _0x27d37c=_0x3fb6b4['diffData'][_0x959984]?.['aiSources']||{},_0x2e9ea7=this['_makeTape'](_0x3fb6b4['model'][_0x959984]['insertions'],_0x27d37c);_0x3fb6b4==_0x510a74?(_0x5f2acf=_0x2e9ea7,_0x15e727=_0x5f2acf['length'],_0x5f2acf['forEach'](_0x1a7f07=>{_0x1a7f07['id']=_0x1274a8++;}),this['_processTape'](_0x5f2acf)):this['_markInsertions'](_0x5f2acf,_0x2e9ea7);const _0x4caeda=_0x5f2acf['filter'](_0x1ebb63=>!_0x1ebb63['isAdded'])['map'](_0x4260ee=>_0x4260ee['id']);let _0x4cfe32=0x0;const _0x54cb8f=this['_makeTape'](_0x3fb6b4['model'][_0x959984]['deletions'],_0x27d37c);_0x54cb8f['forEach'](_0x3e2f16=>{_0x3e2f16['isRemoved']?_0x3e2f16['id']=_0x15e727++:_0x3e2f16['id']=_0x4caeda[_0x4cfe32++];}),this['_processTape'](_0x54cb8f),this['_setDistance'](_0x5f2acf,'isAdded'),this['_setDistance'](_0x54cb8f,'isRemoved'),_0x3fb6b4==_0x510a74&&this['_markMarkers'](_0x5f2acf,_0x24dfc5),_0x5f2acf=this['_joinTapes'](_0x5f2acf,_0x54cb8f),this['_refreshStartEndIndex'](_0x5f2acf),this['_setDistance'](_0x5f2acf,'isRemoved');}_0x5f2acf=_0x5f2acf['filter'](_0x1e7b7d=>!(_0x1e7b7d['isAdded']&&_0x1e7b7d['isRemoved']));const _0x409ec3=new Map(_0x2219c1['model'][_0x959984]['deletions']['markers']),_0x24316b=new Set(_0x24dfc5['keys']());for(const _0x843ef2 of _0x409ec3['keys']())_0x24316b['delete'](_0x843ef2);const _0x8387a9=Object['assign']({},..._0x16b8ab['map'](_0x44ec52=>_0x44ec52['diffData'][_0x959984]?.['aiSources']));this['_markSuggestions'](_0x5f2acf,_0x24316b,_0x8387a9),this['_fixObsoleteTags'](_0x5f2acf),_0x5f2acf=this['_removeMissingPairs'](_0x5f2acf),_0x5f2acf=this['_markMismatchedRemovedTags'](_0x5f2acf),_0x5f2acf=this['_removeUnsupportedChanges'](_0x5f2acf);const {root:_0xd7f2e5,changes:_0x48fd6d}=this['_makeModelFromTape'](_0x5f2acf,_0xe6148,_0x959984,_0x295d29);_0x36cf68['model'][_0x959984]=_0xd7f2e5;const _0x2251c0=_0x1aa69d['get'](_0x959984);if(_0x2251c0){const _0x301839=_0xe6148['get'](_0x2251c0['userId']),_0x2748e6=new Tt({'author':_0x301839,'type':_0x2251c0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x959984});_0x48fd6d['unshift'](_0x2748e6),_0x36cf68['attributes'][_0x959984]['revisionHistoryAttachChange']=_0x2748e6['id'];}_0x36cf68['changes']=_0x36cf68['changes']['concat'](_0x48fd6d);}return _0x36cf68;}['_markMarkers'](_0x4c6394,_0x25f928){for(let _0x995145=0x0;_0x995145<_0x4c6394['length'];_0x995145++)for(const [_0x1e5053,_0x4ecd73]of _0x25f928)!_0x4ecd73['isCollapsed']&&_0x4ecd73['start']['isEqual'](_0x4c6394[_0x995145]['previousPosition'])&&_0x4c6394[_0x995145]['markersStart']['push'](_0x1e5053),_0x4ecd73['end']['isEqual'](_0x4c6394[_0x995145]['nextPosition'])&&_0x4c6394[_0x995145]['markersEnd']['push'](_0x1e5053);}['_joinTapes'](_0x240e5f,_0x51b329){let _0x37a781=[],_0x330d99=0x0,_0x502de1=0x0;for(;_0x330d99<_0x240e5f['length']||_0x502de1<_0x51b329['length'];){const _0x369c02=_0x240e5f[_0x330d99]||{},_0x362ff6=_0x51b329[_0x502de1]||{};if(_0x369c02['id']==_0x362ff6['id'])_0x330d99++,_0x502de1++,_0x37a781['push'](_0x369c02);else{if(_0x362ff6['isRemoved']&&_0x369c02['isAdded']){const {commonTape:_0xbd489a,iEnd:_0x455c08,jEnd:_0xcd869a}=this['_threeWayMerge'](_0x240e5f,_0x330d99,_0x51b329,_0x502de1);_0x37a781=_0x37a781['concat'](_0xbd489a),_0x330d99=_0x455c08,_0x502de1=_0xcd869a;}else _0x362ff6['isRemoved']?(_0x502de1++,_0x37a781['push'](_0x362ff6)):(_0x330d99++,_0x37a781['push'](_0x369c02));}}return _0x37a781;}_markSuggestions(_0x29a238,_0x1b61be,_0x542d7a){const _0x1e27db=[];for(let _0x2b758b=0x0;_0x2b758b<_0x29a238['length'];_0x2b758b++){for(let _0x1dbe8e=0x0;_0x1dbe8e<_0x29a238[_0x2b758b]['markersStart']['length'];_0x1dbe8e++){const _0x5d9ddb=_0x29a238[_0x2b758b]['markersStart'][_0x1dbe8e];if(!_0x1b61be['has'](_0x5d9ddb))continue;const {group:_0x3b332f,type:_0x107654,authorId:_0x54624e}=_0x586811(_0x5d9ddb);if('revision-suggestion'!=_0x3b332f||'insertion'!=_0x107654&&'deletion'!=_0x107654)continue;const _0x495884=_0x542d7a['suggestion:'+_0x5d9ddb['slice'](0x14)]||null;_0x1e27db['unshift']({'type':_0x107654,'name':_0x5d9ddb,'userId':_0x54624e,'aiSource':_0x495884}),_0x29a238[_0x2b758b]['markersStart']['splice'](_0x1dbe8e,0x1),_0x1dbe8e--;}_0x4cb0a4(_0x29a238[_0x2b758b]);for(let _0x5954f5=0x0;_0x5954f5<_0x29a238[_0x2b758b]['markersEnd']['length'];_0x5954f5++){const _0x3f7a52=_0x29a238[_0x2b758b]['markersEnd'][_0x5954f5];if(!_0x1b61be['has'](_0x3f7a52))continue;const {group:_0x562d99,type:_0x342fc4}=_0x586811(_0x3f7a52);if('revision-suggestion'!=_0x562d99||'insertion'!=_0x342fc4&&'deletion'!=_0x342fc4)continue;_0x29a238[_0x2b758b]['markersEnd']['splice'](_0x5954f5,0x1),_0x5954f5--;const _0x587fe7=_0x1e27db['findIndex'](_0x3ec993=>_0x3ec993['name']==_0x3f7a52);_0x587fe7>-0x1&&_0x1e27db['splice'](_0x587fe7,0x1);}}function _0x586811(_0x4803e8){const _0x2c360b=_0x4803e8['split'](':');return{'group':_0x2c360b[0x0],'type':_0x2c360b[0x1],'subType':_0x2c360b['length']>=0x5?_0x2c360b[0x2]:null,'id':_0x2c360b['length']<0x5?_0x2c360b[0x2]:_0x2c360b[0x3],'authorId':_0x2c360b['length']<0x5?_0x2c360b[0x3]:_0x2c360b[0x4],'markerCount':0x6==_0x2c360b['length']?_0x2c360b[0x5]:null};}function _0x4cb0a4(_0x42a3ed){for(let _0x357d0b=0x0;_0x357d0b<_0x1e27db['length'];_0x357d0b++){if(_0x42a3ed['isAdded']&&'insertion'==_0x1e27db[_0x357d0b]['type']&&_0x42a3ed['isAdded']['userId']==_0x1e27db[_0x357d0b]['userId'])return _0x42a3ed['isAddSuggestion']={..._0x1e27db[_0x357d0b],'aiSource':_0x42a3ed['isAdded']['aiSource']||_0x1e27db[_0x357d0b]['aiSource']},void delete _0x42a3ed['isAdded'];if(!_0x42a3ed['isAdded']&&!_0x42a3ed['isRemoved']&&'deletion'==_0x1e27db[_0x357d0b]['type'])return void(_0x42a3ed['isRemoveSuggestion']=_0x1e27db[_0x357d0b]);}}}_setDistance(_0x61ae44,_0x35b76d){let _0x237c67=0x0,_0xda23da=!0x1;const _0x7c59bc=new Map();for(const _0x57c167 of _0x61ae44)_0x57c167[_0x35b76d]?_0xda23da&&(_0x237c67++,_0xda23da=!0x1):(_0x237c67++,_0xda23da=!0x0),_0x7c59bc['set'](_0x57c167['id'],_0x237c67);for(let _0xd035f1=0x0;_0xd035f1<_0x61ae44['length'];_0xd035f1++){if('isRemoved'==_0x35b76d&&_0x61ae44[_0xd035f1]['isAdded']||'isAdded'==_0x35b76d&&_0x61ae44[_0xd035f1]['isRemoved'])continue;if('text'==_0x61ae44[_0xd035f1]['type']){_0x61ae44[_0xd035f1]['distance']=0x0;continue;}const _0x2f0a43=_0x7c59bc['get'](_0x61ae44[_0xd035f1]['pairId']),_0x46452e=_0x7c59bc['get'](_0x61ae44[_0xd035f1]['id']);_0x61ae44[_0xd035f1]['distance']=_0x2f0a43-_0x46452e;}}_getRevisionsRange(_0x797608,_0x15f536,_0x2b7155=!0x1){const _0x685a4d=[];let _0x5e6aaa=this['repository']['getIndex'](_0x797608),_0x89de90=this['repository']['getIndex'](_0x15f536);for(-0x1==_0x89de90&&(_0x89de90=this['repository']['_revisions']['length'],_0x2b7155=!0x1);_0x5e6aaa<_0x89de90;)_0x685a4d['push'](this['repository']['getRevision'](_0x5e6aaa)),_0x5e6aaa++;return _0x2b7155&&_0x685a4d['push'](this['repository']['getRevision'](_0x5e6aaa)),_0x685a4d;}_threeWayMerge(_0x5991f7,_0x3defc5,_0x3f13b4,_0x4ec2cb){const _0x41364d=this['editor']['model']['schema'];let _0x1bbb22=_0x3defc5;for(;_0x5991f7[_0x1bbb22]&&_0x5991f7[_0x1bbb22]['isAdded'];)_0x1bbb22++;let _0x3f00f0=_0x4ec2cb;for(;_0x3f13b4[_0x3f00f0]&&_0x3f13b4[_0x3f00f0]['isRemoved'];)_0x3f00f0++;_0x1db8e9(_0x5991f7,_0x3defc5,_0x1bbb22),_0x1db8e9(_0x3f13b4,_0x4ec2cb,_0x3f00f0);const _0x49d1fc=_0x3f13b4['slice'](_0x4ec2cb,_0x3f00f0)['concat'](_0x5991f7['slice'](_0x3defc5,_0x1bbb22));return _0x49d1fc['sort']((_0x938688,_0x393961)=>_0x938688['side']!=_0x393961['side']?_0x938688['side']-_0x393961['side']:_0x938688['level']!=_0x393961['level']?_0x938688['level']-_0x393961['level']:_0x938688['distance']!=_0x393961['distance']?_0x393961['distance']-_0x938688['distance']:!!_0x938688['isAdded']!=!!_0x393961['isAdded']?-0x1==_0x938688['side']||0x0==_0x938688['side']?_0x938688['isAdded']?-0x1:0x1:_0x938688['isAdded']?0x1:-0x1:_0x938688['index']-_0x393961['index']),{'commonTape':_0x49d1fc,'iEnd':_0x1bbb22,'jEnd':_0x3f00f0};function _0x1db8e9(_0x11bc3e,_0x11ac68,_0x3df836){let _0x3b18ad=-0x1,_0x140582=Number['POSITIVE_INFINITY'],_0x621d35=!0x0;for(let _0x5c595d=_0x11ac68;_0x5c595d<_0x3df836;_0x5c595d++)if(_0x41364d['isInline'](_0x11bc3e[_0x5c595d]['item'])||(_0x621d35=!0x1),_0x11bc3e[_0x5c595d]['item']['startIndex']<_0x11ac68&&(_0x3b18ad=_0x5c595d),_0x11bc3e[_0x5c595d]['item']['endIndex']>=_0x3df836){_0x140582=_0x5c595d;break;}_0x621d35&&(_0x3b18ad=_0x3df836-0x1);for(let _0x4f216a=_0x11ac68;_0x4f216a<_0x3df836;_0x4f216a++)_0x11bc3e[_0x4f216a]['side']=_0x4f216a<=_0x3b18ad?-0x1:_0x4f216a<_0x140582?0x0:0x1,_0x11bc3e[_0x4f216a]['index']=_0x4f216a;let _0x367756=0x0;for(let _0x32a235=_0x11ac68;_0x32a235<=_0x3b18ad;_0x32a235++)0x0==_0x11bc3e[_0x32a235]['distance']?_0x11bc3e[_0x32a235]['level']=_0x367756:(_0x367756++,_0x11bc3e[_0x32a235]['level']=_0x367756,_0x367756++);for(let _0x5e6e74=_0x11ac68;_0x5e6e74<_0x3df836;_0x5e6e74++)0x0==_0x11bc3e[_0x5e6e74]['side']&&(_0x11bc3e[_0x5e6e74]['level']=_0x367756);_0x367756=0x0;for(let _0x1b9dad=_0x3df836-0x1;_0x1b9dad>=_0x140582;_0x1b9dad--)0x0==_0x11bc3e[_0x1b9dad]['distance']?_0x11bc3e[_0x1b9dad]['level']=_0x367756:(_0x367756--,_0x11bc3e[_0x1b9dad]['level']=_0x367756,_0x367756--);}}_fixObsoleteTags(_0x352f54){const _0x197a0d=new Map(),_0x2c4ce9=this['editor']['model']['schema'];for(let _0x3b0709=0x1;_0x3b0709<_0x352f54['length'];_0x3b0709++){let _0x1099e7,_0x1b5944,_0x217cf7;const _0x121938=_0x352f54[_0x3b0709],_0x3fa9e6=_0x352f54[_0x3b0709-0x1];if('text'==_0x121938['type'])continue;if(_0x121938['type']!=_0x3fa9e6['type'])continue;if(!_0x2c4ce9['isBlock'](_0x3fa9e6['item'])||_0x2c4ce9['isLimit'](_0x3fa9e6['item']))continue;if(!_0x2c4ce9['isBlock'](_0x121938['item'])||_0x2c4ce9['isLimit'](_0x121938['item']))continue;if((_0x352f54[_0x3b0709]['isAdded']||_0x352f54[_0x3b0709]['isAddSuggestion'])&&_0x352f54[_0x3b0709-0x1]['isRemoved'])_0x1099e7=_0x352f54[_0x3b0709],_0x1b5944=_0x352f54[_0x3b0709-0x1],_0x217cf7=_0x3b0709-0x1;else{if(!_0x352f54[_0x3b0709]['isRemoved']||!_0x352f54[_0x3b0709-0x1]['isAdded']&&!_0x352f54[_0x3b0709-0x1]['isAddSuggestion'])continue;_0x1099e7=_0x352f54[_0x3b0709-0x1],_0x1b5944=_0x352f54[_0x3b0709],_0x217cf7=_0x3b0709;}const _0x38df49=_0x1099e7['level']==_0x1b5944['level'],_0x2d0dd8=Math['abs'](_0x1099e7['level'])<Math['abs'](_0x1b5944['level'])&&0x0==_0x1b5944['distance'];(_0x38df49||_0x2d0dd8)&&(_0x197a0d['set'](_0x1b5944['id'],_0x1099e7['id']),_0x352f54['splice'](_0x217cf7,0x1),_0x3b0709--,_0x1099e7['isAdded']=!0x1);}for(let _0x17ff24=0x0;_0x17ff24<_0x352f54['length'];_0x17ff24++)_0x197a0d['has'](_0x352f54[_0x17ff24]['pairId'])&&(_0x352f54[_0x17ff24]['pairId']=_0x197a0d['get'](_0x352f54[_0x17ff24]['pairId']));}['_removeMissingPairs'](_0x2a5a51){const _0x1b156c=new Set(_0x2a5a51['map'](_0x3d9980=>_0x3d9980['id']));for(let _0x313d03=0x0;_0x313d03<_0x2a5a51['length'];_0x313d03++)_0x1b156c['has'](_0x2a5a51[_0x313d03]['pairId'])||0x0==_0x2a5a51[_0x313d03]['distance']||(_0x2a5a51[_0x313d03]['isIncorrect']=!0x0);return _0x2a5a51['filter'](_0x509703=>!_0x509703['isIncorrect']);}_markMismatchedRemovedTags(_0x208418){const _0x6d7292=new Set();for(let _0x45702a=0x0;_0x45702a<_0x208418['length'];_0x45702a++){if(_0x6d7292['has'](_0x208418[_0x45702a]['id'])&&_0x208418[_0x45702a]['isRemoved']&&(_0x208418[_0x45702a]['isIncorrect']=!0x0),_0x208418[_0x45702a]['isIncorrect'])continue;if(0x0==_0x208418[_0x45702a]['distance'])continue;if('elementStart'!=_0x208418[_0x45702a]['type'])continue;if(null==_0x208418[_0x45702a]['pairId'])continue;let _0x37fe58=_0x45702a+0x1,_0x2ab4f5=0x0;for(;_0x208418[_0x37fe58]['id']!=_0x208418[_0x45702a]['pairId'];)'elementStart'==_0x208418[_0x37fe58]['type']?_0x2ab4f5++:'elementEnd'==_0x208418[_0x37fe58]['type']&&_0x2ab4f5--,_0x37fe58++;if(0x0!=_0x2ab4f5){if(_0x208418[_0x45702a]['isRemoved'])_0x208418[_0x45702a]['isIncorrect']=!0x0;else{for(;_0x37fe58!=_0x45702a;)_0x208418[_0x37fe58]['isRemoved']&&0x0!=_0x208418[_0x37fe58]['distance']&&(_0x208418[_0x37fe58]['isIncorrect']=!0x0,_0x6d7292['add'](_0x208418[_0x37fe58]['pairId'])),_0x37fe58--;}}}return _0x208418['filter'](_0x1f8233=>!_0x1f8233['isIncorrect']);}_removeUnsupportedChanges(_0x448620){const _0x343bf1=this['editor']['model']['schema'];for(let _0x365fb9=0x0;_0x365fb9<_0x448620['length'];_0x365fb9++){if(!(_0x448620[_0x365fb9]['isAdded']||_0x448620[_0x365fb9]['isAddSuggestion']||_0x448620[_0x365fb9]['isRemoved']||_0x448620[_0x365fb9]['isRemoveSuggestion']))continue;if(0x0==_0x448620[_0x365fb9]['distance'])continue;const _0x1ccba7=_0x448620[_0x365fb9]['item'];_0x343bf1['isBlock'](_0x1ccba7)||_0x343bf1['isLimit'](_0x1ccba7)||(_0x448620[_0x365fb9]['isAdded']&&delete _0x448620[_0x365fb9]['isAdded'],_0x448620[_0x365fb9]['isAddSuggestion']&&delete _0x448620[_0x365fb9]['isAddSuggestion'],_0x448620[_0x365fb9]['isRemoveSuggestion']&&delete _0x448620[_0x365fb9]['isRemoveSuggestion'],_0x448620[_0x365fb9]['isRemoved']&&(_0x448620[_0x365fb9]['isIncorrect']=!0x0));}return _0x448620['filter'](_0x38ef30=>!_0x38ef30['isIncorrect']);}['_makeModelFromTape'](_0x56c155,_0x246b7c,_0x41462f,_0x435cc4){const _0x290166=new _0x226390(),_0x185b4d=[],_0x3f9333=new Map(),_0x3f8e19=this['editor']['model'],_0x3c324c=_0x3f8e19['schema'],_0x19639d=[_0x290166],_0x3aeece={},_0x1fb3f1={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x290166['name']=_0x435cc4;let _0x5cc62f=null;const _0x3c72c3=[0x0];for(let _0x52fe80=0x0;_0x52fe80<_0x56c155['length'];_0x52fe80++)if('elementStart'===_0x56c155[_0x52fe80]['type']){_0x56c155[_0x52fe80]['previousPosition']=_0x3f8e19['createPositionFromPath'](_0x290166,_0x3c72c3);const _0x46fd9f=new _0x5eb196(_0x56c155[_0x52fe80]['item']['name'],_0x56c155[_0x52fe80]['item']['getAttributes']());_0x19639d[0x0]['_appendChild'](_0x46fd9f),_0x3c72c3['push'](0x0),_0x19639d['unshift'](_0x46fd9f),_0x56c155[_0x52fe80]['nextPosition']=_0x3f8e19['createPositionFromPath'](_0x290166,_0x3c72c3);}else'elementEnd'===_0x56c155[_0x52fe80]['type']?(_0x19639d['shift'](),_0x56c155[_0x52fe80]['previousPosition']=_0x3f8e19['createPositionFromPath'](_0x290166,_0x3c72c3),_0x3c72c3['pop'](),_0x3c72c3[_0x3c72c3['length']-0x1]++,_0x56c155[_0x52fe80]['nextPosition']=_0x3f8e19['createPositionFromPath'](_0x290166,_0x3c72c3)):(_0x56c155[_0x52fe80]['previousPosition']=_0x3f8e19['createPositionFromPath'](_0x290166,_0x3c72c3),_0x5cc62f?_0x5cc62f['_data']+=_0x56c155[_0x52fe80]['item']['data']:_0x5cc62f=new _0xe748af(_0x56c155[_0x52fe80]['item']['data'],_0x56c155[_0x52fe80]['item']['getAttributes']()),_0x56c155[_0x52fe80+0x1]&&'text'===_0x56c155[_0x52fe80+0x1]['type']&&_0x58e9f8(_0x5cc62f,_0x56c155[_0x52fe80+0x1]['item'])||(_0x19639d[0x0]['_appendChild'](_0x5cc62f),_0x5cc62f=null),_0x3c72c3[_0x3c72c3['length']-0x1]+=_0x56c155[_0x52fe80]['item']['offsetSize'],_0x56c155[_0x52fe80]['nextPosition']=_0x3f8e19['createPositionFromPath'](_0x290166,_0x3c72c3));for(let _0x2c014e=0x0;_0x2c014e<_0x56c155['length'];_0x2c014e++){const _0x389e92=_0x56c155[_0x2c014e]['previousPosition'],_0x68b2b8=_0x56c155[_0x2c014e]['nextPosition'];for(const _0x6c6c31 of _0x56c155[_0x2c014e]['markersStart'])_0x3f9333['set'](_0x6c6c31,{'start':_0x389e92,'end':null});_0x26cff0('isRemoveSuggestion',_0x2c014e,_0x389e92,_0x68b2b8),_0x26cff0('isAddSuggestion',_0x2c014e,_0x389e92,_0x68b2b8),_0x26cff0('isRemoved',_0x2c014e,_0x389e92,_0x68b2b8),_0x26cff0('isAdded',_0x2c014e,_0x389e92,_0x68b2b8);for(const _0x4b8d53 of _0x56c155[_0x2c014e]['markersEnd']){const _0x5bdf9e=_0x3f9333['get'](_0x4b8d53);_0x5bdf9e?_0x5bdf9e['end']=_0x68b2b8:_0x3f9333['set'](_0x4b8d53,{'start':_0x68b2b8,'end':_0x68b2b8});}}for(const [_0x381fe9,_0x40c2be]of _0x3f9333){const _0x561a61=this['editor']['model']['createRange'](_0x40c2be['start'],_0x40c2be['end']);_0x290166['markers']['set'](_0x381fe9,_0x561a61);}return _0x185b4d['sort']((_0x1061bc,_0x29b2ff)=>{const _0x57ae27=_0x290166['markers']['get']('revision:'+_0x1061bc['id']),_0x4df30e=_0x290166['markers']['get']('revision:'+_0x29b2ff['id']);return _0x57ae27['start']['isBefore'](_0x4df30e['start'])?-0x1:_0x57ae27['start']['isAfter'](_0x4df30e['start'])?0x1:_0x57ae27['end']['isBefore'](_0x4df30e['end'])?-0x1:_0x57ae27['end']['isAfter'](_0x4df30e['end'])?0x1:'add'===_0x1061bc['type']?-0x1:0x1;}),{'root':_0x290166,'changes':_0x185b4d};function _0x26cff0(_0x5e4fa9,_0x564b52,_0x453bae,_0x5889cf){const _0xad6899=!!_0x56c155[_0x564b52][_0x5e4fa9],_0x12c2f1=_0xad6899?_0x56c155[_0x564b52][_0x5e4fa9]['userId']:null,_0x48276a=_0xad6899&&_0x56c155[_0x564b52][_0x5e4fa9]['aiSource']||null,_0x5ada84=_0x564b52===_0x56c155['length']-0x1,_0x5608b7=_0x1fb3f1[_0x5e4fa9][0x0],_0x2e4166=_0x3c324c['isObject'](_0x56c155[_0x564b52]['item']);!_0x3aeece[_0x5e4fa9]&&_0xad6899?_0x3aeece[_0x5e4fa9]={'start':_0x453bae,'tapeItem':_0x56c155[_0x564b52],'userId':_0x12c2f1,'aiSource':_0x48276a,'type':_0x5e4fa9}:_0x3aeece[_0x5e4fa9]&&!_0xad6899?(_0x3aeece[_0x5e4fa9]['end']=_0x453bae,_0x13df81(_0x3aeece[_0x5e4fa9]),_0x3aeece[_0x5e4fa9]=null):_0x3aeece[_0x5e4fa9]&&_0xad6899&&(_0x3aeece[_0x5e4fa9]['userId']!==_0x12c2f1||_0x3aeece[_0x5e4fa9]['aiSource']!==_0x48276a)&&(_0x3aeece[_0x5e4fa9]['end']=_0x453bae,_0x5608b7&&_0x5608b7['userId']===_0x3aeece[_0x5e4fa9]['userId']?_0x5608b7['change']['aiSource']=_0x5608b7['change']['aiSource']||_0x3aeece[_0x5e4fa9]['aiSource']:_0x13df81(_0x3aeece[_0x5e4fa9]),_0x3aeece[_0x5e4fa9]={'start':_0x453bae,'tapeItem':_0x56c155[_0x564b52],'userId':_0x12c2f1,'aiSource':_0x48276a,'type':_0x5e4fa9}),_0x3aeece[_0x5e4fa9]&&_0x2e4166&&('elementStart'!==_0x56c155[_0x564b52]['type']||_0x5608b7&&_0x5608b7['userId']===_0x12c2f1||_0x1fb3f1[_0x5e4fa9]['unshift']({'userId':_0x12c2f1,'object':_0x56c155[_0x564b52]['item'],'change':_0x3aeece[_0x5e4fa9]}),'elementEnd'===_0x56c155[_0x564b52]['type']&&_0x5608b7&&_0x5608b7['object']===_0x56c155[_0x564b52]['item']&&(_0x1fb3f1[_0x5e4fa9]['shift'](),_0x3aeece[_0x5e4fa9]=_0x5608b7['change'])),_0x3aeece[_0x5e4fa9]&&_0x5ada84&&(_0x3aeece[_0x5e4fa9]['end']=_0x5889cf,_0x13df81(_0x3aeece[_0x5e4fa9]),_0x3aeece[_0x5e4fa9]=null);}function _0x13df81({start:_0x5b2036,end:_0x58d276,tapeItem:_0x3a1cf3,userId:_0x90f537,aiSource:_0x20025e,type:_0x3aa7eb}){const _0x10c4a0=_0x3a1cf3['item'],_0x1b77f8=_0x3f8e19['schema']['isBlock'](_0x10c4a0)&&!_0x3f8e19['schema']['isLimit'](_0x10c4a0),_0x2a5ef6=_0x5b2036['nodeAfter']==_0x58d276['parent']&&_0x58d276['isAtStart'];if(_0x1b77f8&&_0x2a5ef6)return;const _0x457fe5=_0x3f8e19['createRange'](_0x5b2036,_0x58d276),_0x49986b=_0x246b7c['get'](_0x90f537),_0x569101=new Tt({'author':_0x49986b,'type':'isAdded'==_0x3aa7eb||'isAddSuggestion'==_0x3aa7eb?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3aa7eb||'isRemoveSuggestion'==_0x3aa7eb,'aiSource':_0x20025e||null},'createdAt':new Date(),'rootName':_0x41462f});_0x185b4d['push'](_0x569101),_0x290166['markers']['set']('revision:'+_0x569101['id'],_0x457fe5);}function _0x58e9f8(_0x496d7b,_0x87d298){const _0x228fa1=_0x496d7b['getAttributes'](),_0x3be7f0=_0x87d298['getAttributes']();for(const _0x3c5cda of _0x228fa1){if(_0x3c5cda[0x1]!==_0x87d298['getAttribute'](_0x3c5cda[0x0]))return!0x1;_0x3be7f0['next']();}return _0x3be7f0['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x5d4abf=>{const _0x32d62d=_0x5d4abf['markerName']['split'](':')[0x1],_0x3f588f=this['_getChangeFromId'](_0x32d62d);if(!_0x3f588f)return null;const _0x25f95c='add'==_0x3f588f['type']?'insertion':'deletion',_0x5dbfb1=['ck-suggestion-marker','ck-suggestion-marker-'+_0x25f95c];return _0x3f588f['data']['isSuggestion']&&_0x5dbfb1['push']('ck-suggestion-marker-'+_0x25f95c+'-new'),this['activeChange']==_0x3f588f&&_0x5dbfb1['push']('ck-suggestion-marker--active'),{'classes':_0x5dbfb1,'attributes':{'data-change-id':_0x32d62d}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x31152f=>{_0x31152f['on']('element:pre',(_0x1d7984,_0x2ee55f,_0x22411a)=>{const _0x537622=_0x2ee55f['viewItem']['getChild'](0x0);if(!_0x537622||!_0x537622['is']('element','code'))return;if(!_0x22411a['consumable']['consume'](_0x537622,{'attributes':['vid_start','vid_end']}))return;const _0x57b943=_0x2ee55f['modelRange']['start']['nodeAfter'];_0x22411a['writer']['setAttribute']('vid_start',_0x537622['getAttribute']('vid_start'),_0x57b943),_0x22411a['writer']['setAttribute']('vid_end',_0x537622['getAttribute']('vid_end'),_0x57b943);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x4b9653=>{_0x4b9653['on']('element',(_0x3822fb,_0x48d06e,_0x514ce2)=>{if(!_0x514ce2['consumable']['consume'](_0x48d06e['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x48d06e['modelRange']['isCollapsed'])return;const _0x32ab71=_0x48d06e['modelRange']['start']['nodeAfter'];_0x32ab71['hasAttribute']('vid_start')||_0x32ab71['hasAttribute']('vid')||(_0x514ce2['writer']['setAttribute']('vid_start',_0x48d06e['viewItem']['getAttribute']('vid_start'),_0x32ab71),_0x514ce2['writer']['setAttribute']('vid_end',_0x48d06e['viewItem']['getAttribute']('vid_end'),_0x32ab71));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x48a820=>_0x48a820['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x51afe3,[,_0x1424f7])=>{['vid_start','vid_end','vid']['includes'](_0x1424f7)&&(_0x51afe3['return']=!0x0,_0x51afe3['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xb8be06=>{_0xb8be06['on']('attribute:vid',(_0x30ad9b,_0x4e2602,_0x2d8608)=>{if('\x20'!=_0x4e2602['item']['data']||_0x4e2602['item']['parent']['maxOffset']>0x1)return;if(!_0x2d8608['consumable']['consume'](_0x4e2602['item'],_0x30ad9b['name']))return;const _0x39fb1b=_0x2d8608['writer'],_0x2e6ebe=_0x2d8608['mapper']['toViewRange'](_0x4e2602['range']);_0x39fb1b['wrap'](_0x2e6ebe,_0x39fb1b['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x176bed){const _0x232a48=_0x176bed['plugins']['get']('RevisionViewer');return(_0x57202c,_0x557d32,_0x3fc910)=>{const _0x95f2bd=_0x557d32['markerName']['split'](':')[0x1],_0x5ec69a=_0x232a48['_getChangeFromId'](_0x95f2bd);if(!_0x5ec69a)return null;const _0x354359='add'==_0x5ec69a['type']?'split':'merge';if(!_0x3fc910['consumable']['test'](_0x557d32['markerRange'],_0x57202c['name']))return;const _0x36c8d5=_0x557d32['markerRange']['getWalker'](),_0x24c31f=_0x557d32['markerRange']['start'],_0x59f884=_0x176bed['model']['schema'];let _0x532f73=null,_0x44545a=null,_0x1d5282=!0x1,_0x48d634=!0x1;for(const _0x1100e4 of _0x36c8d5){const _0x1ea574=_0x1100e4['item'];_0x1d5282=_0x1d5282||_0x59f884['isContent'](_0x1ea574);const _0x3a2931=_0x3fc910['mapper']['toViewElement'](_0x1ea574);if(_0x3a2931&&_0x3a2931['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1100e4['type']&&(_0x59f884['isBlock'](_0x1ea574)&&!_0x59f884['isLimit'](_0x1ea574)&&(_0x1ea574['nextSibling']||_0x24c31f['isAtEnd']?_0x532f73&&_0x532f73['parent']==_0x1ea574||(_0x532f73=_0x1ea574,_0xcdb00e(_0x1100e4['previousPosition']),_0x48d634=!0x0):_0x44545a=_0x44545a||_0x1100e4['previousPosition']));}function _0xcdb00e(_0x284eb5){const _0x4bbd8f=_0x3fc910['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x354359}),_0x4f7809=_0x3fc910['mapper']['toViewPosition'](_0x284eb5);_0x5ec69a['data']['isSuggestion']&&_0x3fc910['writer']['addClass']('ck-suggestion-marker-'+_0x354359+'-new',_0x4bbd8f),_0x232a48['activeChange']==_0x5ec69a&&_0x3fc910['writer']['addClass']('ck-suggestion-marker--active',_0x4bbd8f),_0x3fc910['writer']['insert'](_0x4f7809,_0x4bbd8f),_0x3fc910['mapper']['bindElementToMarker'](_0x4bbd8f,_0x557d32['markerName']);}_0x1d5282||_0x48d634||!_0x44545a||_0xcdb00e(_0x44545a);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x86ba70,_0x5b19fe,_0x53db1f)=>{const _0x44c69a=_0x53db1f['mapper']['markerNameToElements'](_0x5b19fe['markerName']);if(_0x44c69a){for(const _0x4d38b6 of _0x44c69a)(_0x4d38b6['hasClass']('ck-suggestion-marker-split')||_0x4d38b6['hasClass']('ck-suggestion-marker-merge'))&&(_0x53db1f['mapper']['unbindElementFromMarkerName'](_0x4d38b6,_0x5b19fe['markerName']),_0x53db1f['writer']['remove'](_0x4d38b6));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x534148,_0x82e822,_0x548aae)=>{const _0x401d90=_0x82e822['markerName']['split'](':')[0x1],_0x1680a3=this['_getChangeFromId'](_0x401d90);if(!_0x1680a3)return null;const _0x23fc12='add'==_0x1680a3['type']?'split':'merge';if(_0x548aae['consumable']['test'](_0x82e822['markerRange'],_0x534148['name']))for(const _0x363491 of _0x82e822['markerRange']['getItems']()){if(!_0x363491['is']('element','softBreak'))continue;const _0x34a449=_0x548aae['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x23fc12}),_0x5255c7=_0x548aae['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x363491));_0x1680a3['data']['isSuggestion']&&_0x548aae['writer']['addClass']('ck-suggestion-marker-'+_0x23fc12+'-new',_0x34a449),this['activeChange']==_0x1680a3&&_0x548aae['writer']['addClass']('ck-suggestion-marker--active',_0x34a449),_0x548aae['writer']['insert'](_0x5255c7,_0x34a449),_0x548aae['mapper']['bindElementToMarker'](_0x34a449,_0x82e822['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4673c7=>{for(const _0x4da2e3 of this['editor']['model']['document']['getRootNames']()){const _0x50d6e6=this['editor']['model']['document']['getRoot'](_0x4da2e3),_0x3de093=this['editor']['editing']['view']['document']['getRoot'](_0x4da2e3);if(_0x3de093){const _0x1efdd7=_0x50d6e6['getAttribute']('revisionHistoryAttachChange');if(_0x4673c7['removeAttribute']('data-change-id',_0x3de093),_0x4673c7['removeClass']('ck-revision-history-root-add',_0x3de093),_0x4673c7['removeClass']('ck-revision-history-root-remove',_0x3de093),_0x4673c7['removeClass']('ck-revision-history-root--active',_0x3de093),_0x1efdd7){const _0x4a1601=this['_getChangeFromId'](_0x1efdd7);if(!_0x4a1601)return null;_0x4673c7['setAttribute']('data-change-id',_0x1efdd7,_0x3de093),_0x4673c7['addClass']('ck-revision-history-root-'+_0x4a1601['type'],_0x3de093),this['activeChange']==_0x4a1601&&_0x4673c7['addClass']('ck-revision-history-root--active',_0x3de093);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x58524a=>'revision-comment:'+_0x58524a,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x236402=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Pt(_0x236402['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x9be2d1=>'revision-suggestion:'+_0x9be2d1,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x209bbd=>({'name':'suggestion:'+_0x209bbd,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x25e524=>{const _0x3cc4d5=_0x25e524['markerName']['split'](':')[0x1];return'insertion'!=_0x3cc4d5&&'deletion'!=_0x3cc4d5?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3cc4d5]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Ut(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Ut(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x5cd6d6,_0x2da831,_0x1b781c)=>{const _0x5967d0=_0x1b781c['mapper']['markerNameToElements'](_0x2da831['markerName']);if(_0x5967d0){for(const _0x11d6c4 of _0x5967d0)_0x11d6c4['is']('uiElement')&&(_0x1b781c['mapper']['unbindElementFromMarkerName'](_0x11d6c4,_0x2da831['markerName']),_0x1b781c['writer']['remove'](_0x11d6c4));}},{'priority':'high'});}_getChangeFromId(_0x5b3802){return this['_changeIdToChange']['get'](_0x5b3802);}_getViewForChange(_0x2703c4){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Dt(this['editor']['locale'],_0x2703c4,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5945f2,_0x5267d7,_0x40357d,_0x40c191)=>{_0x40c191&&this['_balloon']['remove'](_0x40c191),_0x40357d&&(this['_balloon']['add']({'view':_0x40357d,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x40a121=this['editor']['editing'],_0x444e2e=this['_getChangeFromId'](_0x40357d['changeId']);let _0x542462;if(_0x444e2e['data']['isOnRoot']){const _0x3738da=_0x40a121['view']['getDomRoot'](_0x444e2e['rootName']);_0x542462=Array['from'](_0x3738da['getClientRects']());}else{const _0xac74e3=this['editor']['model']['markers']['get']('revision:'+_0x40357d['changeId']);_0x542462=Array['from'](_0x40a121['mapper']['markerNameToElements'](_0xac74e3['name']))['map'](_0x29eea1=>_0x40a121['view']['domConverter']['mapViewToDom'](_0x29eea1))['map'](_0x5f0ce5=>Array['from'](_0x5f0ce5['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x542462['find'](_0xcb0234=>_0xcb0234['top']-0x3<=this['_activeViewTarget']['y']&&_0xcb0234['bottom']+0x3>=this['_activeViewTarget']['y']&&_0xcb0234['left']-0x3<=this['_activeViewTarget']['x']&&_0xcb0234['right']+0x3>=this['_activeViewTarget']['x'])||_0x542462[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5b7416,_0x92404d,_0x12fb94,_0xe5c839)=>{this['activeView']=_0x12fb94?this['_getViewForChange'](_0x12fb94):null,this['editor']['model']['change'](()=>{const _0x308b6c=this['editor']['editing'];_0xe5c839&&(_0xe5c839['data']['isOnRoot']?_0x308b6c['view']['change'](_0x3fc451=>{_0x3fc451['removeClass']('ck-revision-history-root--active',_0x308b6c['view']['document']['getRoot'](_0xe5c839['rootName']));}):_0x308b6c['reconvertMarker']('revision:'+_0xe5c839['id'])),_0x12fb94&&(_0x12fb94['data']['isOnRoot']?_0x308b6c['view']['change'](_0x44510e=>{_0x44510e['addClass']('ck-revision-history-root--active',_0x308b6c['view']['document']['getRoot'](_0x12fb94['rootName']));}):_0x308b6c['reconvertMarker']('revision:'+_0x12fb94['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x4052d1,_0x101fe9)=>{if(this['activeChange'])return;const _0x5ed229=this['_findChangeIdFromDomTarget'](_0x101fe9['target']),_0x3d1dd1=this['_changeIdToChange']['get'](_0x5ed229);_0x3d1dd1?(this['_activeViewTarget']={'x':_0x101fe9['domEvent']['x'],'y':_0x101fe9['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3d1dd1)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2bbebf,_0x2cbfc6)=>{const _0xced7fe=this['_findChangeIdFromDomTarget'](_0x2cbfc6['target']),_0x60509b=this['_changeIdToChange']['get'](_0xced7fe);_0x60509b?(this['_activeViewTarget']={'x':_0x2cbfc6['domEvent']['x'],'y':_0x2cbfc6['domEvent']['y']},_0x60509b===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x60509b):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x2aed81){do{const _0x222610=_0x2aed81['getAttribute']('data-change-id');if(_0x222610)return _0x222610;_0x2aed81=_0x2aed81['parent'];}while(_0x2aed81);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x2fc1a6=>{for(const _0x5b816e of this['editor']['model']['markers'])_0x2fc1a6['removeMarker'](_0x5b816e);});}};function Pt(_0x13ecc5){return _0x13ecc5['split'](':')[0x1];}function Ut(_0x5da143,_0x5790d9){return(_0x4610ad,_0x33fdf6,_0x169200)=>{if(!_0x169200['consumable']['test'](_0x33fdf6['markerRange'],_0x4610ad['name']))return;const _0x5b4139=_0x33fdf6['markerRange']['getWalker'](),_0x5c212d=_0x33fdf6['markerRange']['start'],_0xa5be83=_0x5da143['model']['schema'];let _0x48f7af=null,_0x34b748=null,_0x57b2f9=!0x1,_0x22f6d4=!0x1;for(const _0x27ccf2 of _0x5b4139){const _0x33252f=_0x27ccf2['item'];_0x57b2f9=_0x57b2f9||_0xa5be83['isContent'](_0x33252f);const _0x203137=_0x169200['mapper']['toViewElement'](_0x33252f);if(_0x203137&&_0x203137['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x27ccf2['type']&&(_0xa5be83['isBlock'](_0x33252f)&&!_0xa5be83['isLimit'](_0x33252f)&&(_0x33252f['nextSibling']||_0x5c212d['isAtEnd']?_0x48f7af&&_0x48f7af['parent']==_0x33252f||(_0x48f7af=_0x33252f,_0xd927d1(_0x27ccf2['previousPosition']),_0x22f6d4=!0x0):_0x34b748=_0x34b748||_0x27ccf2['previousPosition']));}function _0xd927d1(_0x24f7b0){const _0x30e3a6=_0x169200['mapper']['toViewPosition'](_0x24f7b0),_0x57bea8=_0x169200['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5790d9});_0x169200['writer']['insert'](_0x30e3a6,_0x57bea8),_0x169200['mapper']['bindElementToMarker'](_0x57bea8,_0x33fdf6['markerName']);}_0x57b2f9||_0x22f6d4||!_0x34b748||_0xd927d1(_0x34b748);};}var Lt=class extends _0x5aebd8{constructor(_0x57d294){super(_0x57d294);const _0x267da4=_0x57d294['plugins']['get'](Ht);this['affectsData']=!0x1,this['listenTo'](_0x267da4,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x267da4,'change:isEnabled',()=>this['refresh']());}execute(){const _0x51aeb6=this['editor'],_0x255b93=_0x51aeb6['plugins']['get'](Ht),_0x216768=_0x255b93['isReady']?_0x255b93['diff']['newRevisionId']:null;_0x51aeb6['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x216768);}['refresh'](){const {isReady:_0x1fddc3,isEnabled:_0x35389e,repository:_0x1ad2a4,diff:_0x2f9b83}=this['editor']['plugins']['get'](Ht),_0x252e76=_0x2f9b83&&_0x1ad2a4['getLaterVisibleRevision'](_0x2f9b83['newRevisionId']);this['isEnabled']=_0x1fddc3&&_0x35389e&&Boolean(_0x252e76);}},Ft=class extends _0x5aebd8{_step;constructor(_0x3d60b1,{direction:_0xb928e6}){super(_0x3d60b1);const _0x36f6b1=_0x3d60b1['plugins']['get'](Ht);this['affectsData']=!0x1,this['_step']='forward'===_0xb928e6?0x1:-0x1,this['listenTo'](_0x36f6b1,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x36f6b1,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x36f6b1,'change:activeChange',()=>this['refresh']());}execute(){const _0x17a04d=this['editor'],_0x598a16=_0x17a04d['plugins']['get'](Ht),{isNavigationMode:_0x2ea251,currentChangeNumber:_0x1f5b11}=_0x598a16;let _0x4fd2d0;if(_0x598a16['activeChange']=_0x2ea251?_0x598a16['diff']['changes']['get'](_0x1f5b11+this['_step']):_0x598a16['diff']['changes']['first'],_0x598a16['activeChange']['data']['isOnRoot'])_0x4fd2d0=_0x17a04d['editing']['view']['getDomRoot'](_0x598a16['activeChange']['rootName']);else{const _0x570091=_0x17a04d['model']['markers']['get']('revision:'+_0x598a16['activeChange']['id']);_0x4fd2d0=_0x397650(_0x17a04d['editing'],_0x570091);}_0x189bf5({'target':_0x4fd2d0,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x40ed56,currentChangeNumber:_0x37a986,numberOfChanges:_0x2da311,isReady:_0x146a2a,isEnabled:_0x20a512}=this['editor']['plugins']['get'](Ht);this['isEnabled']=!!(_0x20a512&&_0x146a2a&&_0x2da311)&&(!_0x40ed56||(0x1===this['_step']?_0x37a986<_0x2da311-0x1:_0x37a986>0x0));}},$t=class extends ut{constructor(_0x24cce2){super(_0x24cce2);const _0x276afa=this['bindTemplate'],_0x1ee6a7=new _0x28da59(_0x24cce2),_0x3ce069=new _0x28da59(_0x24cce2);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',(_0x1faf26,_0x2aff4f)=>_0x1faf26&&_0x2aff4f>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3c2739,_0x47040f,_0x267873,_0x8b2a0f)=>{if(!_0x3c2739)return Rt(_0x24cce2,'Loading...');if(!_0x267873)return Rt(_0x24cce2,'No\x20changes');const _0x1c092d=Rt(_0x24cce2,'NUMBER_OF_CHANGES',_0x267873);return _0x8b2a0f?Rt(_0x24cce2,'X_OF_Y_CHANGES',[_0x47040f+0x1,_0x267873]):_0x1c092d;}),_0x1ee6a7['set']({'label':Rt(_0x24cce2,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x2f2726}),_0x3ce069['set']({'label':Rt(_0x24cce2,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x25ea18}),_0x1ee6a7['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x3ce069['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1ee6a7['on']('execute',()=>this['fire']('execute','backward')),_0x3ce069['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',_0x276afa['if']('_isStatusLabelVisible','ck-hidden',_0x8b6e9b=>!_0x8b6e9b)]},'children':[{'text':_0x276afa['to']('isNavigationMode',_0x2036c6=>_0x2036c6?Rt(_0x24cce2,'EDIT_X_OF_Y_REVISIONS')+':\x20':Rt(_0x24cce2,'Total')+':\x20')}]},{'text':_0x276afa['to']('_statusText')}]},new ht(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1ee6a7,_0x3ce069]}]});}};const Bt='ck-editor__editable__loading-overlay';var jt=class extends _0x560756{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x86aef7=this['editor']['editing']['view'];_0x86aef7['change'](_0x144feb=>{for(const _0x22254c of _0x86aef7['document']['roots'])_0x144feb['addClass'](Bt,_0x22254c);});}['hide'](){const _0x52456f=this['editor']['editing']['view'];_0x52456f['change'](_0x4053e1=>{for(const _0x4d0054 of _0x52456f['document']['roots'])_0x4053e1['removeClass'](Bt,_0x4d0054);});}},Gt=class extends _0x560756{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht,jt];}init(){const _0x47a30a=this['editor'],_0x343136=_0x47a30a['plugins']['get'](Ht),_0x36f4a4=_0x47a30a['plugins']['get'](jt);_0x47a30a['ui']['componentFactory']['add']('exitToEditing',_0x6b0d4c=>{const _0x7d968f=new _0x28da59(_0x6b0d4c);return _0x7d968f['set']({'label':Rt(_0x6b0d4c,'Back\x20to\x20editing'),'icon':_0x4723da,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x7d968f,'execute',()=>{_0x47a30a['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x7d968f;}),_0x47a30a['ui']['componentFactory']['add']('restoreRevision',_0x4914d0=>{const _0x5074e7=new _0x28da59(_0x4914d0);return _0x5074e7['set']({'label':Rt(_0x4914d0,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x5074e7['bind']('isEnabled')['to'](_0x47a30a['commands']['get']('restoreRevision')),this['listenTo'](_0x5074e7,'execute',()=>_0x47a30a['execute']('restoreRevision')),_0x5074e7;}),_0x47a30a['ui']['componentFactory']['add']('changesNavigation',_0x282706=>{const _0x33f3cf=new $t(_0x282706),_0x1311ad=_0x47a30a['commands']['get']('showPreviousChange'),_0x1d064a=_0x47a30a['commands']['get']('showNextChange');return _0x33f3cf['bind']('isBackwardNavigationEnabled')['to'](_0x1311ad,'isEnabled'),_0x33f3cf['bind']('isForwardNavigationEnabled')['to'](_0x1d064a,'isEnabled'),_0x33f3cf['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x343136),this['listenTo'](_0x33f3cf,'execute',(_0x4cd636,_0x3e0655)=>{_0x47a30a['execute']('forward'===_0x3e0655?'showNextChange':'showPreviousChange');}),_0x33f3cf;}),_0x36f4a4['show'](),_0x343136['on']('change:isReady',(_0x5b24b0,_0x417d1b,_0x32c56b)=>{_0x32c56b?_0x36f4a4['hide']():_0x36f4a4['show']();});}},Kt=class extends tt{['_resizeObserver']=null;constructor(_0xad47f,_0x4d543d){super(_0xad47f,_0x4d543d);const _0x40a88f=this['bindTemplate'];this['set']({'label':Rt(_0xad47f,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=Rt(_0xad47f,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x40a88f['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x522f19(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x30d26=this['fieldView']['element'];this['_tooltipString']=_0x30d26['scrollWidth']>_0x30d26['clientWidth']&&_0x30d26['value']||'';}},qt=class extends ut{constructor(_0x16d817,_0x21e5ab,_0x1b3f8c){super(_0x16d817);const _0x2307f2=new _0x47b26e();_0x2307f2['set']({'content':_0x44432f,'viewBox':'0\x200\x2011\x2010'});const _0x481673=['ck','ck-revision-history-sidebar__revision-author'];_0x1b3f8c&&_0x481673['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1448fa=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':Rt(_0x16d817,_0x1b3f8c?'Revision\x20creator':'Revision\x20author')},'children':[_0x2307f2,_0x21e5ab['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x481673},'children':_0x1448fa});}};function Yt(_0x17667e,_0x561310){const _0x5d4547=_0x17667e['bindTemplate'],_0x6acd89=_0x17667e['locale'],_0x104ebc=ft(_0x6acd89);_0x104ebc['panelPosition']='sw';const _0x202920=function(_0x249bb2,_0x18bb65){const _0x3df868=function(_0x47838a,_0x3030c1){const _0x1c56d5=_0x47838a['locale'],_0x4fe4af={'Compare\x20against\x20selected':Rt(_0x1c56d5,'Compare\x20against\x20selected'),'Name\x20this\x20revision':Rt(_0x1c56d5,'Name\x20this\x20revision'),'Restore\x20this\x20revision':Rt(_0x1c56d5,'Restore\x20this\x20revision')};return _0x3030c1['map'](_0x1f82d4=>{const _0x8a006c=_0x4fe4af[_0x1f82d4['name']];return _0x8a006c&&_0x8a006c!==_0x1f82d4['name']&&(_0x1f82d4['name']=_0x8a006c),_0x1f82d4;});}(_0x249bb2,_0x18bb65),_0x5e72d9=new _0x2ec604();for(const _0x25c5d6 of _0x3df868){const _0x1d3268={'type':'button','model':new lt({'label':_0x25c5d6['name'],'class':_0x25c5d6['class'],'withText':!0x0,'role':'menuitem','_action':_0x25c5d6['action']})};_0x1d3268['model']['bind']('isEnabled')['to'](_0x249bb2,'isActionsDropdownOpen',_0x51a0ff=>'function'!=typeof _0x25c5d6['isEnabled']||(!_0x51a0ff||_0x25c5d6['isEnabled'](_0x249bb2))),_0x5e72d9['add'](_0x1d3268);}return _0x5e72d9;}(_0x17667e,_0x561310);return _0x17667e['bind']('isActionsDropdownOpen')['to'](_0x104ebc,'isOpen'),_0x104ebc['buttonView']['set']({'label':Rt(_0x6acd89,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2477e6}),_0x104ebc['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5d4547['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x5d4547['to'](_0x5af58c=>_0x5af58c['stopPropagation']())}}),_0x104ebc['on']('execute',_0x438b28=>{_0x17667e['isReady']&&'function'==typeof _0x438b28['source']['_action']&&_0x438b28['source']['_action'](_0x17667e);}),dt(_0x104ebc,_0x202920,{'role':'menu'}),_0x104ebc['listenTo'](_0x17667e,'change:isActionsDropdownOpen',(_0x13e0b1,_0x9c845b,_0x282b6e)=>{if(_0x282b6e)for(const _0x20046f of _0x104ebc['listView']['items']){const _0x497f73=_0x20046f['children']['first'],_0x3cbe33=_0x561310['find'](_0x363940=>_0x363940['action']===_0x497f73['_action'])['isVisible'];_0x20046f['isVisible']=void 0x0===_0x3cbe33||_0x3cbe33(_0x17667e);}}),_0x104ebc;}const Jt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x4f76d7(ut);var Wt=class extends Jt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0x2073a8,_0xa827b7,_0x17707f,_0x421781,_0x59f163=!0x1){super(_0x2073a8);const _0x419963=this['bindTemplate'],_0x59cf96=function(_0x1bf615,_0x30582f){const _0x3dfb58=Array['from'](_0x30582f['authors'])['filter'](_0x322d7d=>_0x322d7d!=_0x30582f['creator']);return _0x30582f['creator']&&_0x3dfb58['unshift'](_0x30582f['creator']),_0x3dfb58['map'](_0x1f5ba6=>new qt(_0x1bf615,_0x1f5ba6,_0x1f5ba6==_0x30582f['creator']));}(_0x2073a8,_0xa827b7);this['id']=_0xa827b7['id'],this['_revision']=_0xa827b7,this['_requireRevisionName']=_0x421781,this['bind']('_isAiGenerated')['to'](_0xa827b7,'attributes',_0x49681d=>!(!_0x49681d||!_0x49681d['@ai'])),this['bind']('name','createdAt')['to'](_0xa827b7),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x3f2525=>{return _0x3e8e90=_0x2073a8['uiLanguage'],(_0x549fce=_0x3f2525)['toLocaleDateString'](_0x3e8e90,{'month':'long','day':'numeric'})+',\x20'+_0x549fce['toLocaleTimeString'](_0x3e8e90,{'hour':'numeric','minute':'numeric'});var _0x3e8e90,_0x549fce;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Kt(_0x2073a8,vt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x9b398b=>_0x9b398b||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x15a065,_0x4bbe0e)=>_0x15a065&&_0x4bbe0e),this['revisionActionsView']=_0x17707f&&_0x17707f['length']?Yt(this,_0x17707f):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x59f163?this['_createAiPillView'](_0x2073a8):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x419963['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x419963['if']('isEnabled','ck-disabled',_0x13cff4=>!_0x13cff4),_0x419963['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x419963['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x419963['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':_0x419963['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':_0x59cf96}]},..._0x59f163?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x419963['if']('_isAiGenerated','ck-hidden',_0xf2b709=>!_0xf2b709)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x419963['to'](_0x225dad=>{_0x225dad['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x3b8825){const _0x4ab509=new _0x4dbb8b(_0x3b8825);return _0x4ab509['set']({'icon':_0x1b1789,'label':Rt(_0x3b8825,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':Rt(_0x3b8825,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','class':'ck-pill_ai'}),_0x4ab509['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x4ab509;}['render'](){super['render']();const _0x39d832=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x39d832,'change',()=>{this['_requireRevisionName']&&!_0x39d832['value']||this['fire']('setName',{'id':this['id'],'name':_0x39d832['value']}),_0x39d832['value']||(_0x39d832['value']=this['name']?this['name']:this['_createdAtFormatted']);});}select(){this['isSelected']=!0x0;}deselect(){this['isSelected']=!0x1;}highlight(){this['isHighlighted']=!0x0;}unhighlight(){this['isHighlighted']=!0x1;}};function Xt(_0x1f3fae,_0x455530){const _0x12e395=_t['fromJSDate'](_0x1f3fae)['setLocale'](_0x455530),_0x413ea2=_t['local'](),_0x4ccd04=_0x413ea2['minus']({'days':0x1})['startOf']('day');let _0x344baa,_0xc5c9c2;return _0x12e395['hasSame'](_0x413ea2,'day')?(_0x344baa=_0x12e395['startOf']('day')['toJSDate'](),_0xc5c9c2=_0x12e395['toRelativeCalendar']()):_0x12e395['hasSame'](_0x4ccd04,'day')?(_0x344baa=_0x4ccd04['toJSDate'](),_0xc5c9c2=_0x12e395['toRelativeCalendar']()):_0x12e395['hasSame'](_0x413ea2,'week')?(_0x344baa=_0x12e395['startOf']('week')['toJSDate'](),_0xc5c9c2=_0x12e395['weekdayLong']||''):_0x12e395['hasSame'](_0x413ea2,'year')?(_0x344baa=_0x12e395['startOf']('month')['toJSDate'](),_0xc5c9c2=_0x12e395['monthLong']||''):(_0x344baa=_0x12e395['startOf']('year')['toJSDate'](),_0xc5c9c2=String(_0x12e395['year'])),{'startDate':_0x344baa,'localizedPeriodName':_0xc5c9c2};}var Qt=class extends ut{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x1567c0,_0x59b5ef,_0x4a70e8,_0x16d34f,_0x2f3a41){super(_0x1567c0);const _0x56a493=Xt(_0x59b5ef,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x59b5ef,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4a70e8,this['_requireRevisionName']=_0x16d34f,this['_showAISource']=_0x2f3a41,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':_0x56a493}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x28834c){const _0x2ba443=new Wt(this['locale'],_0x28834c,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0x2ba443);}['removeRevision'](_0x72316a){const _0x57f370=this['revisionViews']['find'](_0x2d2bb8=>_0x2d2bb8['id']===_0x72316a['id']);this['revisionViews']['remove'](_0x57f370);}},zt=class extends ut{constructor(_0x1f9f69){super(_0x1f9f69);const _0x159c82=new _0x47b26e();_0x159c82['content']=_0x1666dc,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x159c82,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[Rt(_0x1f9f69,'Revision\x20history')]}]});}},Zt=class extends ut{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x5b1852,_0x36eb18,_0x52882b,_0x505c71,_0xe9359f){super(_0x5b1852);const _0x4d5db5=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x36eb18,this['_revisionActions']=_0x52882b,this['_requireRevisionName']=_0x505c71,this['_showAISource']=_0xe9359f,this['on']('select',(_0x4d28d6,_0x4fa32c)=>{this['fire']('revisionSelected',_0x4fa32c);}),this['on']('setName',(_0x4e5806,_0x7bbac1)=>{this['fire']('revisionSetName',_0x7bbac1);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new zt(_0x5b1852),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4d5db5['if']('isEnabled','ck-disabled',_0x18fbbf=>!_0x18fbbf)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x217f4f of this['_revisions'])this['_addRevision'](_0x217f4f);this['_revisions']['on']('add',(_0x356146,_0xd36588)=>{this['_addRevision'](_0xd36588);}),this['_revisions']['on']('remove',(_0x340be5,_0x53b7f6)=>{this['_removeRevision'](_0x53b7f6);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2b9790=>_0x2b9790['revisionViews']['map'](_0x1f04b7=>_0x1f04b7))['flat']();}selectRevision(_0x48e216){for(const _0x4ac40e of this['revisionViews'])_0x48e216&&_0x48e216['id']===_0x4ac40e['id']?_0x4ac40e['select']():_0x4ac40e['deselect']();}highlightRevisions(_0x5a9467){for(const _0xcead76 of this['revisionViews'])_0x5a9467['some'](({id:_0xa0b6ef})=>_0xa0b6ef===_0xcead76['id'])?_0xcead76['highlight']():_0xcead76['unhighlight']();}['_addRevision'](_0x2d0374){const _0x2f1175=Xt(_0x2d0374['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x6f5dea=this['_getTimePeriodViewByStartDate'](_0x2f1175);_0x6f5dea||(_0x6f5dea=new Qt(this['locale'],_0x2f1175,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x6f5dea)),_0x6f5dea['addRevision'](_0x2d0374);}['_removeRevision'](_0x39e65b){const _0x33952f=Xt(_0x39e65b['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x33952f)['removeRevision'](_0x39e65b);}_getTimePeriodViewByStartDate(_0x30914d){return this['timePeriodViews']['find'](_0x36e489=>_0x36e489['startDate']['getTime']()===_0x30914d['getTime']());}},ti=class RevisionsSidebar extends _0x560756{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ii();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht];}constructor(
|
|
30
|
-
_0xbe827(_0x29f53a);var oi=class extends ni{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x3dc468,_0x1bb495){super(_0x1bb495),this['sourceElement']=_0x3dc468,this['model']['document']['createRoot']();const _0x2e6a32=new si(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ei(this,_0x2e6a32);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x5833f1,_0x3c1e72){const _0xd76fe8=new this(_0x5833f1,_0x3c1e72);return await _0xd76fe8['initPlugins'](),await _0xd76fe8['ui']['init'](_0x5833f1),await _0xd76fe8['data']['init'](_0xd76fe8['config']['get']('initialData')||''),_0xd76fe8['fire']('ready'),_0xd76fe8;}};const ri=['RevisionHistoryUI','RestrictedEditingMode'];var ai=class extends _0x346362{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ad48a){super(_0x2ad48a),this['result']='end',_0x2ad48a['editing']['view']['_overlayModeHint']='auto',_0x2ad48a['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},hi=class extends _0x346362{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt,xt];}constructor(_0x5f518b){if(super(_0x5f518b),!this['editor']['config']['get']('revisionHistory'))throw new _0x138664('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x439f79=>this['_showRevisionViewer']({..._0x439f79,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x3c6d11=>this['_closeRevisionViewer'](_0x3c6d11)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x847fe1=>this['_restoreRevision'](_0x847fe1)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x14a1a0){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x14a1a0;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x4d3e2c){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4d3e2c);}getRevision(_0x3037ad){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3037ad);}getRevisions(_0x1dce26){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1dce26||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x2dfef8=this['editor'],_0x26b900=_0x45800f(_0x2dfef8,ri),_0x531da3=_0x2dfef8['plugins']['get']('RevisionTracker'),_0x352851=_0x2dfef8['plugins']['get'](_0x232463)['users'];return _0x26b900['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x26b900['lazyRoots'],(_0x26b900['plugins']['push'](ai,Ht,Gt,class RevisionViewerInit extends _0x346362{static get requires(){return[Ht,_0x232463];}init(){const _0x44d645=this['editor']['plugins']['get'](_0x232463);for(const _0x2aa9cc of _0x352851)_0x2aa9cc['isAnonymous']||_0x44d645['getUser'](_0x2aa9cc['id'])||_0x44d645['addUser'](_0x2aa9cc);const _0x18f982=_0x531da3['repository']['getRevisions']();let _0xaf3d34=null;const _0x12557d=this['editor']['plugins']['get']('RevisionViewer');if(_0x12557d['adapter']=_0x531da3['adapter'],_0x12557d['bind']('isEnabled')['to'](_0x531da3),_0x2dfef8['plugins']['has']('CommentsRepository')){const _0x23c84b=_0x2dfef8['plugins']['get']('CommentsRepository');_0x12557d['_getVisibleCommentThreadIds']=()=>new Set(_0x23c84b['getCommentThreads']()['filter'](_0x49851e=>!_0x49851e['isResolved'])['map'](_0x11e015=>_0x11e015['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x2dfef8,'isReadOnly',_0x57a173=>!_0x57a173);for(const _0x2b5b67 of _0x18f982){const _0x39db8f=null===_0x2b5b67['creator'];if(_0x39db8f&&_0x2b5b67['toVersion']===_0x2b5b67['fromVersion'])continue;const _0x49b429=_0x2b5b67['toJSON']();_0x12557d['addRevisionData'](_0x49b429,(_0x43e1dd,_0xc998a3,_0x34d5cc)=>{if(_0x39db8f){if(_0xaf3d34)_0xaf3d34['_update'](_0x43e1dd,_0xc998a3);else{if(!_0xc998a3){const _0x2cc2a4=_0x34d5cc['toJSON']();_0x2cc2a4['id']=_0x494e52(),_0x531da3['saveRevision'](_0x2cc2a4,_0x34d5cc['toVersion'])['then'](_0x509978=>{_0xaf3d34=_0x509978;});}}}else _0x2b5b67['_update'](_0x43e1dd,_0xc998a3);});}}},ti),_0x26b900);}['_enhanceShowRevisionViewerCallback'](){const _0x3da939=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4afc9c=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x4afc9c['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x37fe7d=this['editor']['plugins']['get']('Dialog');_0x37fe7d['isOpen']&&_0x37fe7d['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0xc5cad7=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x2d9cc6 of _0xc5cad7)_0x2d9cc6['class']=_0x2d9cc6['class']?_0x2d9cc6['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0xa62dc4=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0xa62dc4&&_0xa62dc4['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x14416d=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x14416d&&_0x14416d['setAttribute']('tabindex','-1');}}const _0x140962=this['_getRevisionViewerEditorConfig']();return _0x3da939(_0x140962)['then'](_0x9a5a68=>(this['_viewerEditor']=_0x9a5a68,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'),_0x9a5a68))['catch'](_0x8236ec=>(console['error'](_0x8236ec),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4b1102=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 _0x134109=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x31c82d of _0x134109)_0x31c82d['class']='ck-tab-panel_disabled'===_0x31c82d['class']?'':_0x31c82d['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x364535=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x364535&&_0x364535['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x5ab435=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x5ab435&&_0x5ab435['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4b1102(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x59eda5=this['editor']['plugins']['get']('Annotations');_0x59eda5['refreshVisibility'](),_0x59eda5['refreshPositioning']();}});});}['_showRevisionViewer'](_0x42f13b){const _0x45869d=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x118986=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x5b4e8a=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return oi['create'](_0x5b4e8a,_0x42f13b)['then'](_0x46cbbf=>(_0x118986['style']['display']='block',_0x45869d['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x46cbbf));}['_closeRevisionViewer'](_0x3f5bf7){const _0x2d0c8e=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x2d0c8e['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x3f5bf7['destroy']();}async _restoreRevision(_0x2f6401){const _0x5c475c=this['editor'],_0x473419=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2e521d=_0x5c475c['plugins']['get']('RevisionTracker'),_0x3a762e=_0x5c475c['plugins']['get']('RevisionHistoryUtils'),_0xe02a84=_0x473419['repository']['getRevision'](_0x2f6401);let _0x58298a,_0x35aeaf,_0x391493;try{await _0x3a762e['loadRevisionData'](_0xe02a84,this['adapter']),_0x58298a=_0x3a762e['getRevisionDocumentData'](_0xe02a84),_0x35aeaf=_0x3a762e['getRevisionRootsAttributes'](_0xe02a84);}catch(_0x3f49ea){return void console['error'](_0x3f49ea);}_0x5c475c['model']['change'](_0x4c778a=>{for(const _0x56dafc of Array['from'](_0x5c475c['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4c778a['removeMarker'](_0x56dafc);}),_0x473419['isReady']=!0x1,_0x5c475c['model']['enqueueChange'](_0x3aaf18=>{_0x3aaf18['setSelection'](null),_0x3aaf18['removeSelectionAttribute'](_0x5c475c['model']['document']['selection']['getAttributeKeys']());const _0x293a0d=Object['keys'](_0x58298a);for(const _0x261b27 of _0x5c475c['model']['document']['roots'])'$graveyard'!=_0x261b27['rootName']&&_0x261b27['isAttached']()&&!_0x293a0d['includes'](_0x261b27['rootName'])&&_0x3aaf18['detachRoot'](_0x261b27);for(const _0x427609 of _0x293a0d){let _0x6d203c=_0x5c475c['model']['document']['getRoot'](_0x427609);if(!_0x6d203c||!_0x6d203c['isAttached']()){const _0x57e192=_0xe02a84['diffData']?.[_0x427609]?.['rootElementName']||'$root';_0x6d203c=_0x3aaf18['addRoot'](_0x427609,_0x57e192);}const _0xabb074=_0x35aeaf[_0x427609],_0x1980ab=Object['keys'](_0xabb074),_0x36a883=_0x58298a[_0x427609];for(const _0x25a00d of _0x6d203c['getAttributeKeys']())_0x1980ab['includes'](_0x25a00d)||_0x3aaf18['removeAttribute'](_0x25a00d,_0x6d203c);for(const _0x41e093 of _0x1980ab)_0x3aaf18['setAttribute'](_0x41e093,_0x35aeaf[_0x427609][_0x41e093],_0x6d203c);_0x3aaf18['remove'](_0x3aaf18['createRangeIn'](_0x6d203c)),_0x3aaf18['insert'](_0x5c475c['data']['parse'](_0x36a883,_0x6d203c),_0x6d203c,0x0);}});const _0x778d7d=Rt(_0x5c475c['locale'],'Restored');if(_0xe02a84['name'])_0x391493=-0x1==_0xe02a84['name']['indexOf'](_0x778d7d)?_0x778d7d+':\x20'+_0xe02a84['name']:_0xe02a84['name'];else _0x391493=_0x778d7d+':\x20'+(_0xe02a84['createdAt']['toLocaleDateString'](_0x5c475c['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xe02a84['createdAt']['toLocaleTimeString'](_0x5c475c['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2e521d['saveRevision']({'name':_0x391493}),_0x473419['isReady']=!0x0,_0x5c475c['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Lt as RestoreRevisionCommand,pt as Revision,hi as RevisionHistory,xt as RevisionHistoryUI,bt as RevisionHistoryUtils,kt as RevisionTracker,Ht as RevisionViewer,oi as RevisionViewerEditor,ai as RevisionViewerIntegration,jt as RevisionViewerLoadingOverlay,Gt as RevisionViewerUI,yt as RevisionsRepository,ti as RevisionsSidebar,Ft as ShowChangeCommand};
|
|
29
|
+
ii();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ht];}constructor(_0x11678f){super(_0x11678f),this['_revisionViewer']=_0x11678f['plugins']['get'](Ht),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x59e4f0=this['_revisionsRepository']['_revisions'],_0x1d8c94=this['_createRevisionActions'](),_0x2a6573=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Zt(this['editor']['locale'],_0x59e4f0,_0x1d8c94,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',(_0x3538d1,_0x177b74)=>{_0x177b74['revisionViews']['on']('add',(_0x541c60,_0x14fde0)=>{_0x14fde0['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)),_0x2a6573['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x3315fc=this['_revisionsRepository']['getRevision'](0x0);if(_0x3315fc){const _0x4eb163=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3315fc['id']);this['_revisionViewer']['compare'](_0x3315fc,_0x4eb163);}}_handleRevisionSelected(_0xd786bb,_0x5ab3d3){const _0x390347=this['_revisionsRepository']['getRevision'](_0x5ab3d3['id']),_0x26733b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x390347['id']);this['_revisionViewer']['compare'](_0x390347,_0x26733b);}_handleRevisionSetName(_0x550aea,_0x915fcd){this['_revisionsRepository']['getRevision'](_0x915fcd['id'])['setName'](_0x915fcd['name']);}['_handleDiffChange'](_0x5c5a28,_0x244061,_0xa544e6){const _0xee4d6d=this['_revisionsRepository']['getRevisionsInDiff'](_0xa544e6);_0xee4d6d['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0xee4d6d),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0xee4d6d[0x0]));}_createRevisionActions(){const _0x52e825=this['editor'],_0x8fda79=RevisionsSidebar['availableRevisionActions'],_0x3e1d0d=_0x52e825['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x3e1d0d['length'])return _0x3e1d0d['map'](_0x18c927=>{const _0x2477f9='string'==typeof _0x18c927?Object['assign']({},_0x8fda79[_0x18c927]):_0x18c927;return _0x2477f9['action']=_0x2477f9['action']['bind'](this,_0x52e825),_0x2477f9['isVisible']&&(_0x2477f9['isVisible']=_0x2477f9['isVisible']['bind'](this,_0x52e825)),_0x2477f9;});}};function ii(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4c4f9f},_0x31f84c)=>{const _0x585bfe=_0x4c4f9f['get'](Ht),_0x1b8921=_0x585bfe['repository'];let _0x1fa75e=_0x585bfe['diff']['newRevisionId'],_0x5ee4e8=_0x31f84c['id'];_0x1b8921['getIndex'](_0x1fa75e)>_0x1b8921['getIndex'](_0x5ee4e8)&&([_0x1fa75e,_0x5ee4e8]=[_0x5ee4e8,_0x1fa75e]),_0x585bfe['compare'](_0x1fa75e,_0x5ee4e8);},'isVisible':({plugins:_0x371f20},_0x5c89bf)=>{const _0x17802e=_0x371f20['get'](Ht);return!(_0x17802e['repository']['getRevisionsInDiff'](_0x17802e['diff'])['length']>0x2)&&!_0x5c89bf['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4a1874,{id:_0x5ec4b1})=>{_0x4a1874['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5ec4b1);},'isVisible':({plugins:_0x32cfc7},_0x32a2d2)=>!!_0x32cfc7['get'](Ht)['repository']['getLaterVisibleRevision'](_0x32a2d2['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x1935eb},{id:_0x357c8a,revisionNameView:_0x13a7e4})=>{const _0x5ef714=_0x1935eb['get'](Ht),_0x463827=_0x5ef714['repository']['getEarlierVisibleRevision'](_0x357c8a);_0x5ef714['compare'](_0x357c8a,_0x463827),_0x13a7e4['focus'](),_0x13a7e4['fieldView']['select']();}}};}var ei=class extends _0x4b98da{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x2d239b,_0x1764f7){super(_0x2d239b),this['_view']=_0x1764f7,this['_toolbarConfig']=gt(_0x2d239b['config']['get']('toolbar')),this['_elementReplacer']=new _0x1a25f0();}get element(){return this['view']['element'];}init(_0x4344bb){const _0x2f5d42=this['editor'],_0x5eab3a=this['view'],_0x19d6f4=_0x2f5d42['editing']['view'],_0x2c1c4f=_0x5eab3a['editable'];_0x2c1c4f['name']=_0x19d6f4['document']['getRoot']()['rootName'],_0x5eab3a['render']();const _0x4eb050=_0x2c1c4f['element'];this['setEditableElement'](_0x2c1c4f['name'],_0x4eb050),_0x5eab3a['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x19d6f4['attachDomRoot'](_0x4eb050),this['_elementReplacer']['replace'](_0x4344bb,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0x4fbe6b=this['view'],_0x423166=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x423166['detachDomRoot'](_0x4fbe6b['editable']['name']),_0x4fbe6b['destroy']();}_initToolbar(){const _0x47758c=this['view'];_0x47758c['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x47758c['stickyPanel']['limiterElement']=_0x47758c['element'],_0x47758c['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x76da73})=>_0x76da73),_0x47758c['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x47758c['toolbar']);}},si=class extends _0x1026bb{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0x23ccc1,_0x225a0e,_0x2599e2={}){super(_0x23ccc1),this['stickyPanel']=new at(_0x23ccc1),this['toolbar']=new ct(_0x23ccc1,{'shouldGroupWhenFull':_0x2599e2['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x3a3fd5(_0x23ccc1,_0x225a0e);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const ni=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x346494(_0x332c4e);var oi=class extends ni{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1332cb,_0x2d816e){super(_0x2d816e),this['sourceElement']=_0x1332cb,this['model']['document']['createRoot']();const _0x287e9d=new si(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new ei(this,_0x287e9d);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x11c50c,_0x516730){const _0x565859=new this(_0x11c50c,_0x516730);return await _0x565859['initPlugins'](),await _0x565859['ui']['init'](_0x11c50c),await _0x565859['data']['init'](_0x565859['config']['get']('initialData')||''),_0x565859['fire']('ready'),_0x565859;}};const ri=['RevisionHistoryUI','RestrictedEditingMode'];var ai=class extends _0x560756{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10d3a6){super(_0x10d3a6),this['result']='end',_0x10d3a6['editing']['view']['_overlayModeHint']='auto',_0x10d3a6['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},hi=class extends _0x560756{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[kt,xt];}constructor(_0x4a6927){if(super(_0x4a6927),!this['editor']['config']['get']('revisionHistory'))throw new _0x3a814f('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4b8aa3=>this['_showRevisionViewer']({..._0x4b8aa3,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1f11b7=>this['_closeRevisionViewer'](_0x1f11b7)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x127df3=>this['_restoreRevision'](_0x127df3)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x22df65){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x22df65;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x236a55){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x236a55);}getRevision(_0x4156bc){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x4156bc);}getRevisions(_0x22e20f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x22e20f||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x4cb0f7=this['editor'],_0x1fa3f9=_0x4f3cc6(_0x4cb0f7,ri),_0x4a91fc=_0x4cb0f7['plugins']['get']('RevisionTracker'),_0x4a00a4=_0x4cb0f7['plugins']['get'](_0xa0a7e)['users'];return _0x1fa3f9['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1fa3f9['lazyRoots'],(_0x1fa3f9['plugins']['push'](ai,Ht,Gt,class RevisionViewerInit extends _0x560756{static get requires(){return[Ht,_0xa0a7e];}init(){const _0x447a39=this['editor']['plugins']['get'](_0xa0a7e);for(const _0x2847ea of _0x4a00a4)_0x2847ea['isAnonymous']||_0x447a39['getUser'](_0x2847ea['id'])||_0x447a39['addUser'](_0x2847ea);const _0x206c53=_0x4a91fc['repository']['getRevisions']();let _0x211022=null;const _0x1f35e0=this['editor']['plugins']['get']('RevisionViewer');if(_0x1f35e0['adapter']=_0x4a91fc['adapter'],_0x1f35e0['bind']('isEnabled')['to'](_0x4a91fc),_0x4cb0f7['plugins']['has']('CommentsRepository')){const _0x4293ae=_0x4cb0f7['plugins']['get']('CommentsRepository');_0x1f35e0['_getVisibleCommentThreadIds']=()=>new Set(_0x4293ae['getCommentThreads']()['filter'](_0x1fc1e5=>!_0x1fc1e5['isResolved'])['map'](_0x940e28=>_0x940e28['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4cb0f7,'isReadOnly',_0x17a9ec=>!_0x17a9ec);for(const _0x36e8be of _0x206c53){const _0x4dd226=null===_0x36e8be['creator'];if(_0x4dd226&&_0x36e8be['toVersion']===_0x36e8be['fromVersion'])continue;const _0x1a9102=_0x36e8be['toJSON']();_0x1f35e0['addRevisionData'](_0x1a9102,(_0x1a661c,_0x3953e0,_0x1c3dbb)=>{if(_0x4dd226){if(_0x211022)_0x211022['_update'](_0x1a661c,_0x3953e0);else{if(!_0x3953e0){const _0x2b96bf=_0x1c3dbb['toJSON']();_0x2b96bf['id']=_0x17aa1f(),_0x4a91fc['saveRevision'](_0x2b96bf,_0x1c3dbb['toVersion'])['then'](_0x563094=>{_0x211022=_0x563094;});}}}else _0x36e8be['_update'](_0x1a661c,_0x3953e0);});}}},ti),_0x1fa3f9);}['_enhanceShowRevisionViewerCallback'](){const _0x56b2d3=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x93d7e7=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x93d7e7['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5de823=this['editor']['plugins']['get']('Dialog');_0x5de823['isOpen']&&_0x5de823['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x2bf5a2=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x278a0d of _0x2bf5a2)_0x278a0d['class']=_0x278a0d['class']?_0x278a0d['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x317c25=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x317c25&&_0x317c25['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3b2742=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3b2742&&_0x3b2742['setAttribute']('tabindex','-1');}}const _0x69b22=this['_getRevisionViewerEditorConfig']();return _0x56b2d3(_0x69b22)['then'](_0x6cc36c=>(this['_viewerEditor']=_0x6cc36c,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'),_0x6cc36c))['catch'](_0x78754e=>(console['error'](_0x78754e),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x53fd48=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 _0x22ac57=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x8d2374 of _0x22ac57)_0x8d2374['class']='ck-tab-panel_disabled'===_0x8d2374['class']?'':_0x8d2374['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5d0073=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5d0073&&_0x5d0073['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x39d7ad=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x39d7ad&&_0x39d7ad['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x53fd48(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x314a98=this['editor']['plugins']['get']('Annotations');_0x314a98['refreshVisibility'](),_0x314a98['refreshPositioning']();}});});}['_showRevisionViewer'](_0x43c6a7){const _0xc495a1=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x7b9f71=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x5b2dcd=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return oi['create'](_0x5b2dcd,_0x43c6a7)['then'](_0x5726db=>(_0x7b9f71['style']['display']='block',_0xc495a1['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x5726db));}['_closeRevisionViewer'](_0x5ed051){const _0x540532=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x540532['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x5ed051['destroy']();}async _restoreRevision(_0xc08dd8){const _0x41f417=this['editor'],_0x39a776=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x14ceba=_0x41f417['plugins']['get']('RevisionTracker'),_0x21ce8f=_0x41f417['plugins']['get']('RevisionHistoryUtils'),_0x3a5518=_0x39a776['repository']['getRevision'](_0xc08dd8);let _0x27871e,_0x19281e,_0x1acd32;try{await _0x21ce8f['loadRevisionData'](_0x3a5518,this['adapter']),_0x27871e=_0x21ce8f['getRevisionDocumentData'](_0x3a5518),_0x19281e=_0x21ce8f['getRevisionRootsAttributes'](_0x3a5518);}catch(_0x760353){return void console['error'](_0x760353);}_0x41f417['model']['change'](_0x2ddd1c=>{for(const _0x1dc56f of Array['from'](_0x41f417['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2ddd1c['removeMarker'](_0x1dc56f);}),_0x39a776['isReady']=!0x1,_0x41f417['model']['enqueueChange'](_0x891f2f=>{_0x891f2f['setSelection'](null),_0x891f2f['removeSelectionAttribute'](_0x41f417['model']['document']['selection']['getAttributeKeys']());const _0x444f16=Object['keys'](_0x27871e);for(const _0x17089c of _0x41f417['model']['document']['roots'])'$graveyard'!=_0x17089c['rootName']&&_0x17089c['isAttached']()&&!_0x444f16['includes'](_0x17089c['rootName'])&&_0x891f2f['detachRoot'](_0x17089c);for(const _0x450e9e of _0x444f16){let _0x145fd1=_0x41f417['model']['document']['getRoot'](_0x450e9e);if(!_0x145fd1||!_0x145fd1['isAttached']()){const _0x5135b8=_0x3a5518['diffData']?.[_0x450e9e]?.['rootElementName']||'$root';_0x145fd1=_0x891f2f['addRoot'](_0x450e9e,_0x5135b8);}const _0x194453=_0x19281e[_0x450e9e],_0x1fbd1c=Object['keys'](_0x194453),_0x1e0cf3=_0x27871e[_0x450e9e];for(const _0x15b06a of _0x145fd1['getAttributeKeys']())_0x1fbd1c['includes'](_0x15b06a)||_0x891f2f['removeAttribute'](_0x15b06a,_0x145fd1);for(const _0x19410d of _0x1fbd1c)_0x891f2f['setAttribute'](_0x19410d,_0x19281e[_0x450e9e][_0x19410d],_0x145fd1);_0x891f2f['remove'](_0x891f2f['createRangeIn'](_0x145fd1)),_0x891f2f['insert'](_0x41f417['data']['parse'](_0x1e0cf3,_0x145fd1),_0x145fd1,0x0);}});const _0x3e912b=Rt(_0x41f417['locale'],'Restored');if(_0x3a5518['name'])_0x1acd32=-0x1==_0x3a5518['name']['indexOf'](_0x3e912b)?_0x3e912b+':\x20'+_0x3a5518['name']:_0x3a5518['name'];else _0x1acd32=_0x3e912b+':\x20'+(_0x3a5518['createdAt']['toLocaleDateString'](_0x41f417['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3a5518['createdAt']['toLocaleTimeString'](_0x41f417['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x14ceba['saveRevision']({'name':_0x1acd32}),_0x39a776['isReady']=!0x0,_0x41f417['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Lt as RestoreRevisionCommand,pt as Revision,hi as RevisionHistory,xt as RevisionHistoryUI,bt as RevisionHistoryUtils,kt as RevisionTracker,Ht as RevisionViewer,oi as RevisionViewerEditor,ai as RevisionViewerIntegration,jt as RevisionViewerLoadingOverlay,Gt as RevisionViewerUI,yt as RevisionsRepository,ti as RevisionsSidebar,Ft as ShowChangeCommand};
|