UNPKG

@ckeditor/ckeditor5-export-inline-styles

Version:

The export with inline styles feature for CKEditor 5.

23 lines 4.37 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 _0x1253(){const _0x2e56e6=['set','1760NUHIaO','2OYnRMW','bind','28VGhSIc','var(','6703436uQbLXw','indexOf','3140632FiBFQE','22616gjCCqb','6613212WfFMQf','remove','length','14592033PodbQa','4162038aYOdyk','has','substring','get','startsWith',':root','slice','getStylesEntries','5lfEkQG','683209rtIMmn'];_0x1253=function(){return _0x2e56e6;};return _0x1253();}(function(_0xd9c857,_0x388128){const _0x6e0876=_0xe001,_0x58fb94=_0xd9c857();while(!![]){try{const _0x5c43fe=-parseInt(_0x6e0876(0x181))/0x1+-parseInt(_0x6e0876(0x184))/0x2*(-parseInt(_0x6e0876(0x190))/0x3)+parseInt(_0x6e0876(0x188))/0x4+-parseInt(_0x6e0876(0x180))/0x5*(parseInt(_0x6e0876(0x18c))/0x6)+parseInt(_0x6e0876(0x186))/0x7*(parseInt(_0x6e0876(0x18a))/0x8)+-parseInt(_0x6e0876(0x18f))/0x9+-parseInt(_0x6e0876(0x183))/0xa*(parseInt(_0x6e0876(0x18b))/0xb);if(_0x5c43fe===_0x388128)break;else _0x58fb94['push'](_0x58fb94['shift']());}catch(_0x23880b){_0x58fb94['push'](_0x58fb94['shift']());}}}(_0x1253,0xd3295));import{findMatchingParenthesis as _0x25fab9,splitByTopLevelComma as _0x5c5f50}from'../exportinlinestylesutils.js';function _0xe001(_0x49787e,_0x11354e){const _0x125323=_0x1253();return _0xe001=function(_0xe0012,_0x5141b6){_0xe0012=_0xe0012-0x17f;let _0x13de53=_0x125323[_0xe0012];return _0x13de53;},_0xe001(_0x49787e,_0x11354e);}export function collectRootStylesheetsVariables(_0x2e11d6){const _0x293a4d=_0xe001,_0x705d69=new Map();for(const {stylesMap:_0x1be05c,flatSelector:_0x3352f9}of _0x2e11d6){if(_0x293a4d(0x195)!==_0x3352f9)continue;const _0x2c791d=inlineStylesMapCSSVariables(_0x705d69[_0x293a4d(0x193)][_0x293a4d(0x185)](_0x705d69),_0x1be05c);for(const [_0x50b26b,_0x520d5d]of _0x2c791d)_0x705d69[_0x293a4d(0x182)](_0x50b26b,_0x520d5d);}return _0x705d69;}export function inlineStylesMapCSSVariables(_0x5d6342,_0x61c5f3){const _0x25537c=_0xe001,_0x2df5be=new Map(),_0xf6e8f8=_0x9f6621=>_0x2df5be[_0x25537c(0x191)](_0x9f6621)?_0x2df5be[_0x25537c(0x193)](_0x9f6621):_0x5d6342(_0x9f6621);for(const [_0x11421a,_0x59a6a1]of _0x61c5f3[_0x25537c(0x17f)]())if(_0x59a6a1&&_0x11421a[_0x25537c(0x194)]('--')){const _0x20112e=b(_0xf6e8f8,_0x59a6a1);_0x2df5be[_0x25537c(0x182)](_0x11421a,_0x20112e),_0x61c5f3[_0x25537c(0x18d)](_0x11421a);}for(const [_0x1425b3,_0x289a97]of _0x61c5f3[_0x25537c(0x17f)]())if(_0x289a97){const _0x886b6c=b(_0xf6e8f8,_0x289a97);_0x61c5f3[_0x25537c(0x182)](_0x1425b3,_0x886b6c);}return _0x2df5be;}function b(_0x56b889,_0x5e539c){return function(_0x3f2643,_0x2dd2ca){const _0x5ca27f=_0xe001;let _0x7159d0='',_0x38a163=0x0;for(;_0x38a163<_0x3f2643[_0x5ca27f(0x18e)];){const _0xe918fb=_0x3f2643[_0x5ca27f(0x189)](_0x5ca27f(0x187),_0x38a163);if(-0x1===_0xe918fb){_0x7159d0+=_0x3f2643[_0x5ca27f(0x196)](_0x38a163);break;}_0x7159d0+=_0x3f2643[_0x5ca27f(0x196)](_0x38a163,_0xe918fb);const _0xe8efcd=_0xe918fb+0x4,_0x3a7e38=_0x25fab9(_0x3f2643,_0xe8efcd);_0x7159d0+=_0x2dd2ca(_0x3f2643[_0x5ca27f(0x192)](_0xe8efcd,_0x3a7e38)),_0x38a163=_0x3a7e38+0x1;}return _0x7159d0;}(_0x5e539c,_0x1d9f86=>{const _0x56654d=_0xe001,[_0x487d08,_0x3106a8]=_0x5c5f50(_0x1d9f86),_0x3e1463=_0x56b889(_0x487d08);return void 0x0!==_0x3e1463?_0x3e1463:_0x3106a8?b(_0x56b889,_0x3106a8):_0x56654d(0x187)+_0x487d08+')';});}