UNPKG

@ckeditor/ckeditor5-export-word

Version:

Export to Word feature for CKEditor 5.

23 lines • 7.23 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x24d5d0=_0x4f3c;(function(_0x4d4c65,_0x93cde){const _0x3b52c6=_0x4f3c,_0x2b10ec=_0x4d4c65();while(!![]){try{const _0x341fb5=-parseInt(_0x3b52c6(0x20b))/0x1*(parseInt(_0x3b52c6(0x232))/0x2)+parseInt(_0x3b52c6(0x1fe))/0x3*(parseInt(_0x3b52c6(0x1e4))/0x4)+parseInt(_0x3b52c6(0x21f))/0x5*(parseInt(_0x3b52c6(0x1f5))/0x6)+-parseInt(_0x3b52c6(0x216))/0x7*(parseInt(_0x3b52c6(0x1f0))/0x8)+parseInt(_0x3b52c6(0x1ec))/0x9*(parseInt(_0x3b52c6(0x22b))/0xa)+-parseInt(_0x3b52c6(0x219))/0xb+parseInt(_0x3b52c6(0x209))/0xc*(parseInt(_0x3b52c6(0x21b))/0xd);if(_0x341fb5===_0x93cde)break;else _0x2b10ec['push'](_0x2b10ec['shift']());}catch(_0x2aa47a){_0x2b10ec['push'](_0x2b10ec['shift']());}}}(_0x41d9,0x39909));function _0x41d9(){const _0x22d757=['get','plugins','version','https://docx-converter.cke-cs.com/v1/convert','10tSjobw','fetch','converterOptions','click','locale','value','application/docx','119466oHfiHZ','export-word-v1-api-is-deprecated','format','auto_pagination','Notification','margin_bottom','1421728wyWAkf','converterUrl','fileName','margin_top','pending','href','POST','_token','862443TcVJXv','config','Word\x20document\x20export\x20started','suggestions','152uZUzwI','download','finally','<div\x20class=\x22ck-content\x22\x20dir=\x22','remove','114bPTKFr','set','catch','createObjectURL','Word\x20document\x20export\x20failed','comments','options','stringify','</div>','3SOTEfa','refresh','affectsData','dataCallback','assertive','blob','header','ExportWord','_downloadFile','An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.','ariaLiveAnnouncer','48AfxgUf','margin_left','7NokBnF','editor','URL','announce','token','Word\x20document\x20export\x20successful','data','status','https://docx-converter.cke-cs.com/v2/convert/html-docx','document.docx','stylesheets','46466YgZjxp','EDITOR_STYLES','execute','3993462ZDjplf','orientation','2187224iYbRjW','then','margin_right','isEnabled','4955rIKhvt','footer','showWarning','createElement','function','contentLanguageDirection','isBusy','application/json'];_0x41d9=function(){return _0x22d757;};return _0x41d9();}import{Command as _0x38ac8}from'ckeditor5/src/core.js';import{logWarning as _0xaae1e,collectStylesheets as _0x10d26b}from'ckeditor5/src/utils.js';import{getConverterOptions as _0x7d226,getConverterOptionsV2 as _0x4b4a38}from'./utils.js';import{getTranslation as _0x5e8a17}from'./utils/common-translations.js';function _0x4f3c(_0x3a570d,_0x30e29b){const _0x41d9b1=_0x41d9();return _0x4f3c=function(_0x4f3cd3,_0x232c76){_0x4f3cd3=_0x4f3cd3-0x1e1;let _0x2b724a=_0x41d9b1[_0x4f3cd3];return _0x2b724a;},_0x4f3c(_0x3a570d,_0x30e29b);}const h=[_0x24d5d0(0x21a),_0x24d5d0(0x1e7),_0x24d5d0(0x21d),_0x24d5d0(0x1e3),_0x24d5d0(0x20a),_0x24d5d0(0x234),_0x24d5d0(0x204),_0x24d5d0(0x220),_0x24d5d0(0x1fa),_0x24d5d0(0x1ef)];export default class i extends _0x38ac8{constructor(_0x48fdd8){const _0x462cd0=_0x24d5d0;super(_0x48fdd8),this[_0x462cd0(0x1f6)](_0x462cd0(0x225),!0x1),this[_0x462cd0(0x200)]=!0x1;}[_0x24d5d0(0x1ff)](){const _0x49a9c9=_0x24d5d0;this[_0x49a9c9(0x21e)]=!this[_0x49a9c9(0x225)],this[_0x49a9c9(0x230)]=this[_0x49a9c9(0x225)]?_0x49a9c9(0x1e8):void 0x0;}[_0x24d5d0(0x218)](_0x23f27c={}){const _0x594406=_0x24d5d0,_0x47d7af=this[_0x594406(0x20c)],_0x1d6bc5=_0x23f27c[_0x594406(0x229)]||0x2,_0x269fa6=0x1===_0x1d6bc5,_0x5dfb27=_0x23f27c[_0x594406(0x1e5)]||(_0x269fa6?_0x594406(0x22a):_0x594406(0x213)),_0x5c39ef=_0x23f27c[_0x594406(0x22d)]||{},_0x25c2db=_0x47d7af[_0x594406(0x228)][_0x594406(0x227)](_0x594406(0x205)),_0x576bbf=_0x23f27c[_0x594406(0x20f)]||_0x25c2db[_0x594406(0x1eb)],_0x3eb75e=!0x0===_0x5c39ef[_0x594406(0x1e1)],_0xf0707a=_0x23f27c[_0x594406(0x201)]||(_0x2b9310=>_0x2b9310[_0x594406(0x211)][_0x594406(0x227)]({'pagination':_0x3eb75e}));return 0x2===_0x1d6bc5&&function(_0x199109){for(const _0x51c2b8 of h)if(void 0x0!==_0x199109[_0x51c2b8])return!0x0;return!0x1;}(_0x5c39ef)&&_0xaae1e(_0x594406(0x233)),this[_0x594406(0x225)]=!0x0,this[_0x594406(0x1ff)](),_0x10d26b(_0x23f27c[_0x594406(0x215)]||[_0x594406(0x217)])[_0x594406(0x21c)](async _0x55a99a=>{const _0x5cab86=_0x594406;_0x47d7af['ui'][_0x5cab86(0x208)][_0x5cab86(0x20e)](_0x5e8a17(_0x47d7af[_0x5cab86(0x22f)],_0x5cab86(0x1ee)));const _0x2a2f57=await _0xf0707a(_0x47d7af),_0x3d2c68={'html':_0x5cab86(0x1f3)+_0x47d7af[_0x5cab86(0x22f)][_0x5cab86(0x224)]+'\x22>'+_0x2a2f57+_0x5cab86(0x1fd),'css':_0x55a99a,[_0x269fa6?_0x5cab86(0x1fb):_0x5cab86(0x1ed)]:{..._0x5c39ef,..._0x269fa6?_0x7d226(_0x47d7af,_0x5c39ef):_0x4b4a38(_0x47d7af,_0x5c39ef)}},_0x26fdfa={'method':_0x5cab86(0x1ea),'headers':{'Content-Type':_0x5cab86(0x226),'Accept':_0x5cab86(0x231),..._0x576bbf?{'Authorization':_0x576bbf[_0x5cab86(0x230)]}:null},'body':JSON[_0x5cab86(0x1fc)](_0x3d2c68)};return window[_0x5cab86(0x22c)](_0x5dfb27,_0x26fdfa)[_0x5cab86(0x21c)](_0x184d90=>{const _0x3048b9=_0x5cab86;if(0xc8!==_0x184d90[_0x3048b9(0x212)])throw _0x184d90;return _0x184d90[_0x3048b9(0x203)]();})[_0x5cab86(0x21c)](_0x11517a=>{const _0x524e9a=_0x5cab86;_0x47d7af['ui'][_0x524e9a(0x208)][_0x524e9a(0x20e)](_0x5e8a17(_0x47d7af[_0x524e9a(0x22f)],_0x524e9a(0x210)));const _0x536543=_0x524e9a(0x223)==typeof _0x23f27c[_0x524e9a(0x1e6)]?_0x23f27c[_0x524e9a(0x1e6)]():_0x23f27c[_0x524e9a(0x1e6)];this[_0x524e9a(0x206)](_0x11517a,_0x536543||_0x524e9a(0x214));});})[_0x594406(0x1f7)](_0x4f2e38=>{const _0x1b69a3=_0x594406,_0x3d57a0=_0x47d7af[_0x1b69a3(0x228)][_0x1b69a3(0x227)](_0x1b69a3(0x1e2));throw _0x47d7af['ui'][_0x1b69a3(0x208)][_0x1b69a3(0x20e)](_0x5e8a17(_0x47d7af[_0x1b69a3(0x22f)],_0x1b69a3(0x1f9)),{'politeness':_0x1b69a3(0x202)}),_0x3d57a0[_0x1b69a3(0x221)](_0x5e8a17(_0x47d7af[_0x1b69a3(0x22f)],_0x1b69a3(0x207))),_0x4f2e38;})[_0x594406(0x1f2)](()=>{const _0x85523c=_0x594406;this[_0x85523c(0x225)]=!0x1,this[_0x85523c(0x1ff)]();});}[_0x24d5d0(0x206)](_0x369dfb,_0x3be578){const _0x238823=_0x24d5d0,_0x15f118=document[_0x238823(0x222)]('a');_0x15f118[_0x238823(0x1e9)]=window[_0x238823(0x20d)][_0x238823(0x1f8)](_0x369dfb),_0x15f118[_0x238823(0x1f1)]=_0x3be578,_0x15f118[_0x238823(0x22e)](),_0x15f118[_0x238823(0x1f4)]();}}