UNPKG

@ckeditor/ckeditor5-export-word

Version:

Export to Word feature for CKEditor 5.

23 lines • 8.41 kB
/* * 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 _0x13b3(_0x37fd1a,_0x3500df){const _0x25a192=_0x25a1();return _0x13b3=function(_0x13b3a2,_0x653921){_0x13b3a2=_0x13b3a2-0x136;let _0x5f204f=_0x25a192[_0x13b3a2];return _0x5f204f;},_0x13b3(_0x37fd1a,_0x3500df);}function _0x25a1(){const _0x2be1c3=['users','isResolved','Users','resolvedOptions','3517040orhBPb','contentLanguage','config','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP88B8AAuUB8e2ujYwAAAAASUVORK5CYII=','locale','authorName','getLabel','previewMode','image','collaboration_features','data','push','suggestions','14424zMpSVA','get','TrackChanges','mergeFields','5140954dgRxhO','getDefaultValues','has','getSuggestions','comment_threads','content','CommentsRepository','plugins','@external','23167168XmYyCN','document','entries','map','language','getDataSetValues','comments','merge_fields','createdAt','author','$labels','2540xefaGy','MergeFields','2211968wYzIyK','length','getMergeFieldType','keys','timeZone','3174630SQNeeV','name','getCommentThreads','DateTimeFormat','979086NcSEBA','$defaultValues','timezone','MergeFieldsEditing'];_0x25a1=function(){return _0x2be1c3;};return _0x25a1();}(function(_0x425015,_0x405d44){const _0x392503=_0x13b3,_0x1e24e3=_0x425015();while(!![]){try{const _0x511eee=parseInt(_0x392503(0x152))/0x1+parseInt(_0x392503(0x149))/0x2+parseInt(_0x392503(0x14e))/0x3+parseInt(_0x392503(0x15a))/0x4+-parseInt(_0x392503(0x147))/0x5*(parseInt(_0x392503(0x167))/0x6)+parseInt(_0x392503(0x16b))/0x7+-parseInt(_0x392503(0x13c))/0x8;if(_0x511eee===_0x405d44)break;else _0x1e24e3['push'](_0x1e24e3['shift']());}catch(_0x2b5933){_0x1e24e3['push'](_0x1e24e3['shift']());}}}(_0x25a1,0x9c35a));export function getConverterOptions(_0x25a691,_0x42df80={}){const _0xb6f6e9=_0x13b3,_0xf16424=_0x25a691[_0xb6f6e9(0x13a)][_0xb6f6e9(0x16d)](_0xb6f6e9(0x158)),_0x579dd4=_0x25a691[_0xb6f6e9(0x13a)][_0xb6f6e9(0x16d)](_0xb6f6e9(0x139)),_0x4a67d4=_0x25a691[_0xb6f6e9(0x13a)][_0xb6f6e9(0x16d)](_0xb6f6e9(0x169)),_0x1379ea=_0x42df80;if(_0xf16424&&_0x579dd4){const _0x2b2d14=getComments(_0x25a691[_0xb6f6e9(0x13a)][_0xb6f6e9(0x168)](_0xb6f6e9(0x139))[_0xb6f6e9(0x150)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0xb6f6e9(0x14c)](_0x2b2d14)[_0xb6f6e9(0x14a)]&&(_0x1379ea[_0xb6f6e9(0x142)]=_0x2b2d14);}if(_0xf16424&&_0x4a67d4){const _0x4e0c00=_0x25a691[_0xb6f6e9(0x13a)][_0xb6f6e9(0x168)](_0xb6f6e9(0x169)),_0x16d0a2=_0x25a691[_0xb6f6e9(0x13a)][_0xb6f6e9(0x168)](_0xb6f6e9(0x158)),_0x5d1b7f=getSuggestions(_0x4e0c00[_0xb6f6e9(0x136)]({'toJSON':!0x0}),_0x16d0a2[_0xb6f6e9(0x156)]);Object[_0xb6f6e9(0x14c)](_0x5d1b7f)[_0xb6f6e9(0x14a)]&&(_0x1379ea[_0xb6f6e9(0x166)]=_0x5d1b7f);}return(_0x1379ea[_0xb6f6e9(0x166)]||_0x1379ea[_0xb6f6e9(0x142)])&&(_0x1379ea[_0xb6f6e9(0x154)]=new Intl[(_0xb6f6e9(0x151))]()[_0xb6f6e9(0x159)]()[_0xb6f6e9(0x14d)]),_0x1379ea;}export function getComments(_0xcce7b7){const _0xac9138=_0x13b3,_0x2e770d={};if(!_0xcce7b7[_0xac9138(0x14a)])return _0x2e770d;for(const _0x3c8a85 of _0xcce7b7)_0x3c8a85[_0xac9138(0x142)][_0xac9138(0x13f)](_0x108ddd=>{const _0x17000a=_0xac9138;void 0x0===_0x2e770d[_0x3c8a85['id']]&&(_0x2e770d[_0x3c8a85['id']]=[]),_0x2e770d[_0x3c8a85['id']][_0x17000a(0x165)]({'author':_0x108ddd[_0x17000a(0x145)][_0x17000a(0x14f)],'content':_0x108ddd[_0x17000a(0x138)],'created':_0x108ddd[_0x17000a(0x144)],'is_resolved':_0x3c8a85[_0x17000a(0x157)]});});return _0x2e770d;}export function getSuggestions(_0x10a33b,_0x14fa5d){const _0x57f43d=_0x13b3,_0x480d15={};if(!_0x10a33b[_0x57f43d(0x14a)]||!_0x14fa5d[_0x57f43d(0x14a)])return _0x480d15;for(const {id:_0xeec3d0,createdAt:_0x598889,authorId:_0x35bff3,attributes:_0x31f309}of _0x10a33b){const _0x2c4f0e=_0x31f309&&_0x31f309[_0x57f43d(0x13b)],_0x11bacc=_0x2c4f0e?_0x2c4f0e[_0x57f43d(0x15f)]:_0x14fa5d[_0x57f43d(0x168)](_0x35bff3)[_0x57f43d(0x14f)];_0x480d15[_0xeec3d0]={'author':_0x11bacc,'created':_0x598889};}return _0x480d15;}export function getConverterOptionsV2(_0x15cb19,_0x527645={}){const _0x573026=_0x13b3,_0x36c677=_0x15cb19[_0x573026(0x13a)][_0x573026(0x16d)](_0x573026(0x158)),_0x5d34f1=_0x15cb19[_0x573026(0x13a)][_0x573026(0x16d)](_0x573026(0x139)),_0x4bb2a4=_0x15cb19[_0x573026(0x13a)][_0x573026(0x16d)](_0x573026(0x169)),_0x49eace=_0x15cb19[_0x573026(0x13a)][_0x573026(0x16d)](_0x573026(0x148)),_0x204202=_0x15cb19[_0x573026(0x15e)][_0x573026(0x15b)],_0x31b95b=_0x527645,_0x1ee927={};if(_0x31b95b[_0x573026(0x13d)]=_0x31b95b[_0x573026(0x13d)]||{},_0x31b95b[_0x573026(0x13d)][_0x573026(0x140)]=_0x31b95b[_0x573026(0x13d)][_0x573026(0x140)]||_0x204202,_0x36c677&&_0x5d34f1){const _0x3a0981=getCommentsV2(_0x15cb19[_0x573026(0x13a)][_0x573026(0x168)](_0x573026(0x139))[_0x573026(0x150)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));_0x3a0981[_0x573026(0x14a)]&&(_0x1ee927[_0x573026(0x137)]=_0x3a0981);}if(_0x36c677&&_0x4bb2a4){const _0x143e86=_0x15cb19[_0x573026(0x13a)][_0x573026(0x168)](_0x573026(0x169)),_0x194e8e=_0x15cb19[_0x573026(0x13a)][_0x573026(0x168)](_0x573026(0x158)),_0x3879b6=getSuggestionsV2(_0x143e86[_0x573026(0x136)]({'toJSON':!0x0}),_0x194e8e[_0x573026(0x156)]);_0x3879b6[_0x573026(0x14a)]&&(_0x1ee927[_0x573026(0x166)]=_0x3879b6);}if(_0x49eace){const _0x226459=_0x15cb19[_0x573026(0x13a)][_0x573026(0x168)](_0x573026(0x155)),_0x33e6d7=_0x226459[_0x573026(0x161)],{prefix:_0x413b7a,suffix:_0x498048}=_0x15cb19[_0x573026(0x15c)][_0x573026(0x168)](_0x573026(0x16a));if(_0x31b95b[_0x573026(0x143)]={'prefix':_0x413b7a,'suffix':_0x498048},_0x573026(0x146)!==_0x33e6d7){_0x31b95b[_0x573026(0x143)][_0x573026(0x164)]={};const _0x593f46=_0x573026(0x15d),_0x95ada=_0x573026(0x153)===_0x33e6d7?_0x226459[_0x573026(0x16c)]():_0x226459[_0x573026(0x141)](_0x33e6d7,!0x0);for(const _0x329c18 of Object[_0x573026(0x13e)](_0x95ada)){const [_0x295f03,_0x54267a]=_0x329c18;_0x573026(0x162)===_0x226459[_0x573026(0x14b)](_0x295f03)?_0x31b95b[_0x573026(0x143)][_0x573026(0x164)][_0x295f03]=null!==_0x54267a?_0x54267a:_0x593f46:_0x31b95b[_0x573026(0x143)][_0x573026(0x164)][_0x295f03]=null!==_0x54267a?_0x54267a:_0x226459[_0x573026(0x160)](_0x295f03)||_0x295f03;}}}return(_0x1ee927[_0x573026(0x137)]||_0x1ee927[_0x573026(0x166)])&&(_0x31b95b[_0x573026(0x154)]=new Intl[(_0x573026(0x151))]()[_0x573026(0x159)]()[_0x573026(0x14d)],_0x31b95b[_0x573026(0x163)]=_0x1ee927),_0x31b95b;}export function getCommentsV2(_0x1ceda1){const _0x57eb08=_0x13b3,_0x576180=[];if(!_0x1ceda1[_0x57eb08(0x14a)])return _0x576180;for(const _0x1dcfc0 of _0x1ceda1){const _0x485684=_0x1dcfc0[_0x57eb08(0x142)][_0x57eb08(0x13f)](_0x134101=>({'author':_0x134101[_0x57eb08(0x145)][_0x57eb08(0x14f)],'content':_0x134101[_0x57eb08(0x138)],'created_at':_0x134101[_0x57eb08(0x144)]}));_0x576180[_0x57eb08(0x165)]({'thread_id':_0x1dcfc0['id'],'is_resolved':_0x1dcfc0[_0x57eb08(0x157)],'comments':_0x485684});}return _0x576180;}export function getSuggestionsV2(_0x6a05ac,_0x53eb93){const _0x54e0ef=_0x13b3;return _0x6a05ac[_0x54e0ef(0x14a)]&&_0x53eb93[_0x54e0ef(0x14a)]?_0x6a05ac[_0x54e0ef(0x13f)](({id:_0x50fc9b,createdAt:_0x154b87,authorId:_0x56cfc2,attributes:_0x4f6ca0})=>{const _0x1cbeb5=_0x54e0ef,_0x5eb3fe=_0x4f6ca0&&_0x4f6ca0[_0x1cbeb5(0x13b)];return{'id':_0x50fc9b,'author':_0x5eb3fe?_0x5eb3fe[_0x1cbeb5(0x15f)]:_0x53eb93[_0x1cbeb5(0x168)](_0x56cfc2)[_0x1cbeb5(0x14f)],'created_at':_0x154b87};}):[];}