@ckeditor/ckeditor5-export-word
Version:
Export to Word feature for CKEditor 5.
23 lines • 8.63 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
function _0x3d17(){const _0x5ce93d=['resolvedOptions','getSuggestions','comment_threads','@external','17215kjVfVk','map','keys','MergeFieldsEditing','collaboration_features','length','TrackChanges','config','27NmrJsL','getLabel','Users','$labels','1128ubEKlS','getMergeFieldType','content','76487rbsvKE','authorName','isResolved','890uXoChf','previewMode','merge_fields','1219803IomVqt','image','$defaultValues','language','suggestions','getCommentThreads','getDefaultValues','timeZone','author','entries','MergeFields','get','2751zrUoix','createdAt','68yJNvYa','locale','has','DateTimeFormat','325800EgaedH','getDataSetValues','2tQHmiN','name','mergeFields','comments','data','CommentsRepository','547168YpVgAL','users','document','plugins','contentLanguage','timezone','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP88B8AAuUB8e2ujYwAAAAASUVORK5CYII=','push','36Xvqvjn','108755LQfboc'];_0x3d17=function(){return _0x5ce93d;};return _0x3d17();}(function(_0x43267c,_0x317ff3){const _0x23cf34=_0x3a11,_0x12a6b7=_0x43267c();while(!![]){try{const _0x3d779e=parseInt(_0x23cf34(0x14a))/0x1*(parseInt(_0x23cf34(0x164))/0x2)+-parseInt(_0x23cf34(0x162))/0x3+parseInt(_0x23cf34(0x15e))/0x4*(parseInt(_0x23cf34(0x173))/0x5)+parseInt(_0x23cf34(0x147))/0x6*(-parseInt(_0x23cf34(0x15c))/0x7)+-parseInt(_0x23cf34(0x16a))/0x8*(parseInt(_0x23cf34(0x180))/0x9)+-parseInt(_0x23cf34(0x14d))/0xa*(parseInt(_0x23cf34(0x178))/0xb)+parseInt(_0x23cf34(0x172))/0xc*(parseInt(_0x23cf34(0x150))/0xd);if(_0x3d779e===_0x317ff3)break;else _0x12a6b7['push'](_0x12a6b7['shift']());}catch(_0x2d0845){_0x12a6b7['push'](_0x12a6b7['shift']());}}}(_0x3d17,0x31056));export function getConverterOptions(_0x6cf988,_0xe56ddd={}){const _0x51bc17=_0x3a11,_0x499e74=_0x6cf988[_0x51bc17(0x16d)][_0x51bc17(0x160)](_0x51bc17(0x145)),_0x769c16=_0x6cf988[_0x51bc17(0x16d)][_0x51bc17(0x160)](_0x51bc17(0x169)),_0xa1775d=_0x6cf988[_0x51bc17(0x16d)][_0x51bc17(0x160)](_0x51bc17(0x17e)),_0x396163=_0xe56ddd;if(_0x499e74&&_0x769c16){const _0x555bc9=getComments(_0x6cf988[_0x51bc17(0x16d)][_0x51bc17(0x15b)](_0x51bc17(0x169))[_0x51bc17(0x155)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x51bc17(0x17a)](_0x555bc9)[_0x51bc17(0x17d)]&&(_0x396163[_0x51bc17(0x167)]=_0x555bc9);}if(_0x499e74&&_0xa1775d){const _0xed81d2=_0x6cf988[_0x51bc17(0x16d)][_0x51bc17(0x15b)](_0x51bc17(0x17e)),_0x5844a2=_0x6cf988[_0x51bc17(0x16d)][_0x51bc17(0x15b)](_0x51bc17(0x145)),_0x3cef98=getSuggestions(_0xed81d2[_0x51bc17(0x175)]({'toJSON':!0x0}),_0x5844a2[_0x51bc17(0x16b)]);Object[_0x51bc17(0x17a)](_0x3cef98)[_0x51bc17(0x17d)]&&(_0x396163[_0x51bc17(0x154)]=_0x3cef98);}return(_0x396163[_0x51bc17(0x154)]||_0x396163[_0x51bc17(0x167)])&&(_0x396163[_0x51bc17(0x16f)]=new Intl[(_0x51bc17(0x161))]()[_0x51bc17(0x174)]()[_0x51bc17(0x157)]),_0x396163;}export function getComments(_0x3d3197){const _0x717289=_0x3a11,_0x486e6d={};if(!_0x3d3197[_0x717289(0x17d)])return _0x486e6d;for(const _0xe7cff2 of _0x3d3197)_0xe7cff2[_0x717289(0x167)][_0x717289(0x179)](_0x5819be=>{const _0x9f7dea=_0x717289;void 0x0===_0x486e6d[_0xe7cff2['id']]&&(_0x486e6d[_0xe7cff2['id']]=[]),_0x486e6d[_0xe7cff2['id']][_0x9f7dea(0x171)]({'author':_0x5819be[_0x9f7dea(0x158)][_0x9f7dea(0x165)],'content':_0x5819be[_0x9f7dea(0x149)],'created':_0x5819be[_0x9f7dea(0x15d)],'is_resolved':_0xe7cff2[_0x9f7dea(0x14c)]});});return _0x486e6d;}export function getSuggestions(_0x5005a6,_0xdce5fa){const _0x127ff0=_0x3a11,_0x4d4361={};if(!_0x5005a6[_0x127ff0(0x17d)]||!_0xdce5fa[_0x127ff0(0x17d)])return _0x4d4361;for(const {id:_0x147198,createdAt:_0x59cfe4,authorId:_0x4c6844,attributes:_0x107afd}of _0x5005a6){const _0x4e5e7a=_0x107afd&&_0x107afd[_0x127ff0(0x177)],_0x47141a=_0x4e5e7a?_0x4e5e7a[_0x127ff0(0x14b)]:_0xdce5fa[_0x127ff0(0x15b)](_0x4c6844)[_0x127ff0(0x165)];_0x4d4361[_0x147198]={'author':_0x47141a,'created':_0x59cfe4};}return _0x4d4361;}function _0x3a11(_0x1b27d2,_0x7b749a){const _0x3d1770=_0x3d17();return _0x3a11=function(_0x3a116a,_0x3c39f6){_0x3a116a=_0x3a116a-0x145;let _0x35288b=_0x3d1770[_0x3a116a];return _0x35288b;},_0x3a11(_0x1b27d2,_0x7b749a);}export function getConverterOptionsV2(_0x3d3c46,_0xdc8d11={}){const _0x43ec90=_0x3a11,_0x24d3b6=_0x3d3c46[_0x43ec90(0x16d)][_0x43ec90(0x160)](_0x43ec90(0x145)),_0x22e8e6=_0x3d3c46[_0x43ec90(0x16d)][_0x43ec90(0x160)](_0x43ec90(0x169)),_0x3389af=_0x3d3c46[_0x43ec90(0x16d)][_0x43ec90(0x160)](_0x43ec90(0x17e)),_0x575cb4=_0x3d3c46[_0x43ec90(0x16d)][_0x43ec90(0x160)](_0x43ec90(0x15a)),_0x4c44f2=_0x3d3c46[_0x43ec90(0x15f)][_0x43ec90(0x16e)],_0x5807fe=_0xdc8d11,_0x35a559={};if(_0x5807fe[_0x43ec90(0x16c)]=_0x5807fe[_0x43ec90(0x16c)]||{},_0x5807fe[_0x43ec90(0x16c)][_0x43ec90(0x153)]=_0x5807fe[_0x43ec90(0x16c)][_0x43ec90(0x153)]||_0x4c44f2,_0x24d3b6&&_0x22e8e6){const _0x352aa9=getCommentsV2(_0x3d3c46[_0x43ec90(0x16d)][_0x43ec90(0x15b)](_0x43ec90(0x169))[_0x43ec90(0x155)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));_0x352aa9[_0x43ec90(0x17d)]&&(_0x35a559[_0x43ec90(0x176)]=_0x352aa9);}if(_0x24d3b6&&_0x3389af){const _0x2b6b38=_0x3d3c46[_0x43ec90(0x16d)][_0x43ec90(0x15b)](_0x43ec90(0x17e)),_0x44ca5a=_0x3d3c46[_0x43ec90(0x16d)][_0x43ec90(0x15b)](_0x43ec90(0x145)),_0x312810=getSuggestionsV2(_0x2b6b38[_0x43ec90(0x175)]({'toJSON':!0x0}),_0x44ca5a[_0x43ec90(0x16b)]);_0x312810[_0x43ec90(0x17d)]&&(_0x35a559[_0x43ec90(0x154)]=_0x312810);}if(_0x575cb4){const _0x4ae11e=_0x3d3c46[_0x43ec90(0x16d)][_0x43ec90(0x15b)](_0x43ec90(0x17b)),_0x59d965=_0x4ae11e[_0x43ec90(0x14e)],{prefix:_0x55aaab,suffix:_0x2d50db}=_0x3d3c46[_0x43ec90(0x17f)][_0x43ec90(0x15b)](_0x43ec90(0x166));if(_0x5807fe[_0x43ec90(0x14f)]={'prefix':_0x55aaab,'suffix':_0x2d50db},_0x43ec90(0x146)!==_0x59d965){_0x5807fe[_0x43ec90(0x14f)][_0x43ec90(0x168)]={};const _0x5c318f=_0x43ec90(0x170),_0x2fee4b=_0x43ec90(0x152)===_0x59d965?_0x4ae11e[_0x43ec90(0x156)]():_0x4ae11e[_0x43ec90(0x163)](_0x59d965,!0x0);for(const _0x5bb17b of Object[_0x43ec90(0x159)](_0x2fee4b)){const [_0x3d8731,_0x26c8f9]=_0x5bb17b;_0x43ec90(0x151)===_0x4ae11e[_0x43ec90(0x148)](_0x3d8731)?_0x5807fe[_0x43ec90(0x14f)][_0x43ec90(0x168)][_0x3d8731]=null!==_0x26c8f9?_0x26c8f9:_0x5c318f:_0x5807fe[_0x43ec90(0x14f)][_0x43ec90(0x168)][_0x3d8731]=null!==_0x26c8f9?_0x26c8f9:_0x4ae11e[_0x43ec90(0x181)](_0x3d8731)||_0x3d8731;}}}return(_0x35a559[_0x43ec90(0x176)]||_0x35a559[_0x43ec90(0x154)])&&(_0x5807fe[_0x43ec90(0x16f)]=new Intl[(_0x43ec90(0x161))]()[_0x43ec90(0x174)]()[_0x43ec90(0x157)],_0x5807fe[_0x43ec90(0x17c)]=_0x35a559),_0x5807fe;}export function getCommentsV2(_0x4a30fc){const _0x7d64cc=_0x3a11,_0x513a82=[];if(!_0x4a30fc[_0x7d64cc(0x17d)])return _0x513a82;for(const _0x522e69 of _0x4a30fc){const _0xff4034=_0x522e69[_0x7d64cc(0x167)][_0x7d64cc(0x179)](_0x139abe=>({'author':_0x139abe[_0x7d64cc(0x158)][_0x7d64cc(0x165)],'content':_0x139abe[_0x7d64cc(0x149)],'created_at':_0x139abe[_0x7d64cc(0x15d)]}));_0x513a82[_0x7d64cc(0x171)]({'thread_id':_0x522e69['id'],'is_resolved':_0x522e69[_0x7d64cc(0x14c)],'comments':_0xff4034});}return _0x513a82;}export function getSuggestionsV2(_0x384983,_0x485e76){const _0x107f90=_0x3a11;return _0x384983[_0x107f90(0x17d)]&&_0x485e76[_0x107f90(0x17d)]?_0x384983[_0x107f90(0x179)](({id:_0x26dbdd,createdAt:_0x5d277f,authorId:_0x1eb588,attributes:_0xfc0e6f})=>{const _0x5e9696=_0x107f90,_0x1984ce=_0xfc0e6f&&_0xfc0e6f[_0x5e9696(0x177)];return{'id':_0x26dbdd,'author':_0x1984ce?_0x1984ce[_0x5e9696(0x14b)]:_0x485e76[_0x5e9696(0x15b)](_0x1eb588)[_0x5e9696(0x165)],'created_at':_0x5d277f};}):[];}