UNPKG

@ckeditor/ckeditor5-export-inline-styles

Version:

The export with inline styles feature for CKEditor 5.

23 lines 3.51 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(_0x4f8e1d,_0x5e16a6){const _0x2e76c3=_0x4739,_0x4b8fe0=_0x4f8e1d();while(!![]){try{const _0x34d900=parseInt(_0x2e76c3(0x14d))/0x1+-parseInt(_0x2e76c3(0x146))/0x2*(-parseInt(_0x2e76c3(0x150))/0x3)+-parseInt(_0x2e76c3(0x144))/0x4+parseInt(_0x2e76c3(0x149))/0x5+-parseInt(_0x2e76c3(0x154))/0x6*(-parseInt(_0x2e76c3(0x14e))/0x7)+parseInt(_0x2e76c3(0x141))/0x8*(-parseInt(_0x2e76c3(0x151))/0x9)+-parseInt(_0x2e76c3(0x143))/0xa;if(_0x34d900===_0x5e16a6)break;else _0x4b8fe0['push'](_0x4b8fe0['shift']());}catch(_0x284f8b){_0x4b8fe0['push'](_0x4b8fe0['shift']());}}}(_0x49f5,0x36ba5));import{StylesMap as _0x151499}from'ckeditor5/src/engine.js';import{inlineStylesMapCSSVariables as _0x4c33e0}from'./exportinlinestylescssvariables.js';function _0x4739(_0x5dea40,_0x215187){const _0x49f5bb=_0x49f5();return _0x4739=function(_0x473900,_0x5cfb98){_0x473900=_0x473900-0x13e;let _0x305292=_0x49f5bb[_0x473900];return _0x305292;},_0x4739(_0x5dea40,_0x215187);}function _0x49f5(){const _0xc3e7c9=['set','1009090ApNbkA','1621028BLaWxL','style','246548kmwbwi','map','getStylesEntries','570185wmwjrx','element','fallbackCSSVariablesLookup','flatSelector','416874qtgmRf','5810qcfSNx','matches','9msDCVO','108RVLUVU','filter','setTo','426Ucytli','stylesProcessor','string','parsedCssRules','stylesMap','getAttribute','152888CRqGlv'];_0x49f5=function(){return _0xc3e7c9;};return _0x49f5();}export function getElementInlineStyles(_0x258088){const _0x314c24=_0x4739,_0x5d6a27=_0x258088[_0x314c24(0x14a)][_0x314c24(0x140)](_0x314c24(0x145))||'',_0x52a620=_0x258088[_0x314c24(0x13e)][_0x314c24(0x152)](_0x5ddd1d=>_0x258088[_0x314c24(0x14a)][_0x314c24(0x14f)](_0x5ddd1d[_0x314c24(0x14c)]))[_0x314c24(0x147)](_0x575171=>_0x575171[_0x314c24(0x13f)]),_0x4761fb=concatStylesMaps(_0x258088[_0x314c24(0x155)],[..._0x52a620,_0x5d6a27]);return{'localCSSVariables':_0x4c33e0(_0x258088[_0x314c24(0x14b)],_0x4761fb),'stylesMap':_0x4761fb};}export function concatStylesMaps(_0x391562,_0x4f7cef){const _0x2866a4=_0x4739,_0xc3867c=new _0x151499(_0x391562);for(const _0x41b095 of _0x4f7cef){let _0x515952=null;if(_0x515952=_0x2866a4(0x156)==typeof _0x41b095?new _0x151499(_0x391562)[_0x2866a4(0x153)](_0x41b095):_0x41b095,_0x515952){for(const [_0x3a8942,_0x585359]of _0x515952[_0x2866a4(0x148)]())_0xc3867c[_0x2866a4(0x142)](_0x3a8942,_0x585359);}}return _0xc3867c;}