UNPKG

@ckeditor/ckeditor5-export-word

Version:

Export to Word feature for CKEditor 5.

23 lines • 8.45 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(_0x513332,_0x4294da){const _0x20b9b5=_0x1fb0,_0x2da66e=_0x513332();while(!![]){try{const _0x3b7ad7=parseInt(_0x20b9b5(0x1ea))/0x1+-parseInt(_0x20b9b5(0x20e))/0x2+-parseInt(_0x20b9b5(0x20f))/0x3+parseInt(_0x20b9b5(0x1ee))/0x4+-parseInt(_0x20b9b5(0x211))/0x5*(parseInt(_0x20b9b5(0x1f2))/0x6)+-parseInt(_0x20b9b5(0x20b))/0x7+-parseInt(_0x20b9b5(0x1ef))/0x8*(-parseInt(_0x20b9b5(0x21d))/0x9);if(_0x3b7ad7===_0x4294da)break;else _0x2da66e['push'](_0x2da66e['shift']());}catch(_0x10bb6a){_0x2da66e['push'](_0x2da66e['shift']());}}}(_0x11ba,0xde03c));export function getConverterOptions(_0x812fe6,_0x40e89e={}){const _0x511480=_0x1fb0,_0x343db6=_0x812fe6[_0x511480(0x220)][_0x511480(0x1f8)](_0x511480(0x216)),_0x1964a8=_0x812fe6[_0x511480(0x220)][_0x511480(0x1f8)](_0x511480(0x21e)),_0x5aab66=_0x812fe6[_0x511480(0x220)][_0x511480(0x1f8)](_0x511480(0x21c)),_0xeffb9=_0x40e89e;if(_0x343db6&&_0x1964a8){const _0x269584=getComments(_0x812fe6[_0x511480(0x220)][_0x511480(0x1fe)](_0x511480(0x21e))[_0x511480(0x1ec)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x511480(0x20d)](_0x269584)[_0x511480(0x210)]&&(_0xeffb9[_0x511480(0x208)]=_0x269584);}if(_0x343db6&&_0x5aab66){const _0x39f40b=_0x812fe6[_0x511480(0x220)][_0x511480(0x1fe)](_0x511480(0x21c)),_0x3cbaea=_0x812fe6[_0x511480(0x220)][_0x511480(0x1fe)](_0x511480(0x216)),_0x3a62fb=getSuggestions(_0x39f40b[_0x511480(0x201)]({'toJSON':!0x0}),_0x3cbaea[_0x511480(0x206)]);Object[_0x511480(0x20d)](_0x3a62fb)[_0x511480(0x210)]&&(_0xeffb9[_0x511480(0x20a)]=_0x3a62fb);}return(_0xeffb9[_0x511480(0x20a)]||_0xeffb9[_0x511480(0x208)])&&(_0xeffb9[_0x511480(0x1f3)]=new Intl[(_0x511480(0x218))]()[_0x511480(0x1f1)]()[_0x511480(0x20c)]),_0xeffb9;}export function getComments(_0x331477){const _0xe2fce5=_0x1fb0,_0x39f909={};if(!_0x331477[_0xe2fce5(0x210)])return _0x39f909;for(const _0x1c5f1d of _0x331477)_0x1c5f1d[_0xe2fce5(0x208)][_0xe2fce5(0x200)](_0xfe33c3=>{const _0x537f90=_0xe2fce5;void 0x0===_0x39f909[_0x1c5f1d['id']]&&(_0x39f909[_0x1c5f1d['id']]=[]),_0x39f909[_0x1c5f1d['id']][_0x537f90(0x1ff)]({'author':_0xfe33c3[_0x537f90(0x1fc)][_0x537f90(0x1ed)],'content':_0xfe33c3[_0x537f90(0x21f)],'created':_0xfe33c3[_0x537f90(0x1fb)],'is_resolved':_0x1c5f1d[_0x537f90(0x215)]});});return _0x39f909;}export function getSuggestions(_0x5dca84,_0x6014e2){const _0x5c768b=_0x1fb0,_0x66239c={};if(!_0x5dca84[_0x5c768b(0x210)]||!_0x6014e2[_0x5c768b(0x210)])return _0x66239c;for(const {id:_0xd35869,createdAt:_0x5c3b17,authorId:_0x7e0778,attributes:_0x40ee31}of _0x5dca84){const _0x5d4280=_0x40ee31&&_0x40ee31[_0x5c768b(0x217)],_0x54b7ae=_0x5d4280?_0x5d4280[_0x5c768b(0x1fa)]:_0x6014e2[_0x5c768b(0x1fe)](_0x7e0778)[_0x5c768b(0x1ed)];_0x66239c[_0xd35869]={'author':_0x54b7ae,'created':_0x5c3b17};}return _0x66239c;}export function getConverterOptionsV2(_0x510892,_0x323e0b={}){const _0x523db1=_0x1fb0,_0x599705=_0x510892[_0x523db1(0x220)][_0x523db1(0x1f8)](_0x523db1(0x216)),_0x3e080d=_0x510892[_0x523db1(0x220)][_0x523db1(0x1f8)](_0x523db1(0x21e)),_0x4db117=_0x510892[_0x523db1(0x220)][_0x523db1(0x1f8)](_0x523db1(0x21c)),_0x470b1c=_0x510892[_0x523db1(0x220)][_0x523db1(0x1f8)](_0x523db1(0x204)),_0x489d19=_0x510892[_0x523db1(0x213)][_0x523db1(0x219)],_0xd615bb=_0x323e0b,_0x190b66={};if(_0xd615bb[_0x523db1(0x21a)]=_0xd615bb[_0x523db1(0x21a)]||{},_0xd615bb[_0x523db1(0x21a)][_0x523db1(0x212)]=_0xd615bb[_0x523db1(0x21a)][_0x523db1(0x212)]||_0x489d19,_0x599705&&_0x3e080d){const _0x2c9357=getCommentsV2(_0x510892[_0x523db1(0x220)][_0x523db1(0x1fe)](_0x523db1(0x21e))[_0x523db1(0x1ec)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));_0x2c9357[_0x523db1(0x210)]&&(_0x190b66[_0x523db1(0x203)]=_0x2c9357);}if(_0x599705&&_0x4db117){const _0x47b042=_0x510892[_0x523db1(0x220)][_0x523db1(0x1fe)](_0x523db1(0x21c)),_0x5d9355=_0x510892[_0x523db1(0x220)][_0x523db1(0x1fe)](_0x523db1(0x216)),_0x46f14c=getSuggestionsV2(_0x47b042[_0x523db1(0x201)]({'toJSON':!0x0}),_0x5d9355[_0x523db1(0x206)]);_0x46f14c[_0x523db1(0x210)]&&(_0x190b66[_0x523db1(0x20a)]=_0x46f14c);}if(_0x470b1c){const _0xd05c9c=_0x510892[_0x523db1(0x220)][_0x523db1(0x1fe)](_0x523db1(0x1e9)),_0x431f3b=_0xd05c9c[_0x523db1(0x209)],{prefix:_0xc93aa8,suffix:_0x2af6b8}=_0x510892[_0x523db1(0x1eb)][_0x523db1(0x1fe)](_0x523db1(0x1f6));if(_0xd615bb[_0x523db1(0x202)]={'prefix':_0xc93aa8,'suffix':_0x2af6b8},_0x523db1(0x1f4)!==_0x431f3b){_0xd615bb[_0x523db1(0x202)][_0x523db1(0x1f0)]={};const _0x2c32d2=_0x523db1(0x207),_0x9e156d=_0x523db1(0x1f7)===_0x431f3b?_0xd05c9c[_0x523db1(0x214)]():_0xd05c9c[_0x523db1(0x21b)](_0x431f3b,!0x0);for(const _0x50cbc9 of Object[_0x523db1(0x1f9)](_0x9e156d)){const [_0x1ebb0d,_0x41bc57]=_0x50cbc9;_0x523db1(0x1e8)===_0xd05c9c[_0x523db1(0x1fd)](_0x1ebb0d)?_0xd615bb[_0x523db1(0x202)][_0x523db1(0x1f0)][_0x1ebb0d]=null!==_0x41bc57?_0x41bc57:_0x2c32d2:_0xd615bb[_0x523db1(0x202)][_0x523db1(0x1f0)][_0x1ebb0d]=null!==_0x41bc57?_0x41bc57:_0xd05c9c[_0x523db1(0x205)](_0x1ebb0d)||_0x1ebb0d;}}}return(_0x190b66[_0x523db1(0x203)]||_0x190b66[_0x523db1(0x20a)])&&(_0xd615bb[_0x523db1(0x1f3)]=new Intl[(_0x523db1(0x218))]()[_0x523db1(0x1f1)]()[_0x523db1(0x20c)],_0xd615bb[_0x523db1(0x1f5)]=_0x190b66),_0xd615bb;}export function getCommentsV2(_0x159e99){const _0x27f6cc=_0x1fb0,_0x1a6283=[];if(!_0x159e99[_0x27f6cc(0x210)])return _0x1a6283;for(const _0x13c930 of _0x159e99){const _0x990ec4=_0x13c930[_0x27f6cc(0x208)][_0x27f6cc(0x200)](_0x333acb=>({'author':_0x333acb[_0x27f6cc(0x1fc)][_0x27f6cc(0x1ed)],'content':_0x333acb[_0x27f6cc(0x21f)],'created_at':_0x333acb[_0x27f6cc(0x1fb)]}));_0x1a6283[_0x27f6cc(0x1ff)]({'thread_id':_0x13c930['id'],'is_resolved':_0x13c930[_0x27f6cc(0x215)],'comments':_0x990ec4});}return _0x1a6283;}export function getSuggestionsV2(_0x54abe5,_0x4056c0){const _0xdcb71f=_0x1fb0;return _0x54abe5[_0xdcb71f(0x210)]&&_0x4056c0[_0xdcb71f(0x210)]?_0x54abe5[_0xdcb71f(0x200)](({id:_0x52ff3b,createdAt:_0x15ab06,authorId:_0x6d1391,attributes:_0x2ba514})=>{const _0x352973=_0xdcb71f,_0x3128c4=_0x2ba514&&_0x2ba514[_0x352973(0x217)];return{'id':_0x52ff3b,'author':_0x3128c4?_0x3128c4[_0x352973(0x1fa)]:_0x4056c0[_0x352973(0x1fe)](_0x6d1391)[_0x352973(0x1ed)],'created_at':_0x15ab06};}):[];}function _0x1fb0(_0x23a060,_0x488141){const _0x11bad4=_0x11ba();return _0x1fb0=function(_0x1fb02c,_0x4f4241){_0x1fb02c=_0x1fb02c-0x1e8;let _0x41b591=_0x11bad4[_0x1fb02c];return _0x41b591;},_0x1fb0(_0x23a060,_0x488141);}function _0x11ba(){const _0x5c9d07=['getSuggestions','merge_fields','comment_threads','MergeFields','getLabel','users','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP88B8AAuUB8e2ujYwAAAAASUVORK5CYII=','comments','previewMode','suggestions','5799178DgmQhz','timeZone','keys','353798cbjqWO','5438637cHQlwM','length','4973470lTsgYr','language','locale','getDefaultValues','isResolved','Users','@external','DateTimeFormat','contentLanguage','document','getDataSetValues','TrackChanges','9JqdWQN','CommentsRepository','content','plugins','image','MergeFieldsEditing','1453998SzDKka','config','getCommentThreads','name','6649312DlTPlF','12847776kyPGla','data','resolvedOptions','6naTaiL','timezone','$labels','collaboration_features','mergeFields','$defaultValues','has','entries','authorName','createdAt','author','getMergeFieldType','get','push','map'];_0x11ba=function(){return _0x5c9d07;};return _0x11ba();}