@ckeditor/ckeditor5-export-inline-styles
Version:
The export with inline styles feature for CKEditor 5.
23 lines • 4.64 kB
JavaScript
/*
* 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(_0x57f2fe,_0xbc0b03){const _0x1fd5d=_0x12d5,_0x3625cf=_0x57f2fe();while(!![]){try{const _0x44cb1e=-parseInt(_0x1fd5d(0x82))/0x1*(parseInt(_0x1fd5d(0x8a))/0x2)+parseInt(_0x1fd5d(0x78))/0x3*(parseInt(_0x1fd5d(0x7c))/0x4)+parseInt(_0x1fd5d(0x7b))/0x5+-parseInt(_0x1fd5d(0x89))/0x6*(parseInt(_0x1fd5d(0x84))/0x7)+-parseInt(_0x1fd5d(0x88))/0x8*(parseInt(_0x1fd5d(0x83))/0x9)+parseInt(_0x1fd5d(0x7f))/0xa*(-parseInt(_0x1fd5d(0x79))/0xb)+parseInt(_0x1fd5d(0x6f))/0xc;if(_0x44cb1e===_0xbc0b03)break;else _0x3625cf['push'](_0x3625cf['shift']());}catch(_0x158a1c){_0x3625cf['push'](_0x3625cf['shift']());}}}(_0x530b,0x66b67));import{calculate as _0xbb5f04,compare as _0x4d1834}from'specificity';function _0x530b(){const _0xb45b28=['25761564UqaDWw','join','replace','cssText','inlineCss','stylesProcessor','sort','specificity','specificityArray','27sJTJqg','11FJqBya','setTo','1783445DJGBsE','54764BSmRrS','cssRules','filter','6511430veoqyk','length','flatMap','352664gsoIHa','9HtLnoS','357WcNWeC','from','stylesheets','trim','3771672eiMPQv','85968PHslCB','2vyTWhd','map'];_0x530b=function(){return _0xb45b28;};return _0x530b();}import{StylesMap as _0x15d461}from'ckeditor5/src/engine.js';import{collectStylesheets as _0x1211da}from'ckeditor5/src/utils.js';import{collectRootStylesheetsVariables as _0x1bf168}from'./exportinlinestylescssvariables.js';import{splitByTopLevelComma as _0x114b07}from'../exportinlinestylesutils.js';export default async function r(_0x29a847){const _0x24a857=_0x12d5,_0x3bac37=[await _0x1211da(_0x29a847[_0x24a857(0x86)]),_0x29a847[_0x24a857(0x73)]][_0x24a857(0x7e)](_0x17782d=>_0x17782d&&_0x17782d[_0x24a857(0x80)])[_0x24a857(0x70)]('\x0a'),_0x9378e=await async function(_0x1b5dc6,_0x39a38c){const _0x143793=_0x24a857,_0x105b92=new CSSStyleSheet();return await _0x105b92[_0x143793(0x71)](_0x39a38c),w(Array[_0x143793(0x85)](_0x105b92[_0x143793(0x7d)])[_0x143793(0x7e)](_0xed8b51=>_0xed8b51 instanceof CSSStyleRule))[_0x143793(0x81)](({selectorText:_0xef786d,contentCssText:_0x2e91f9})=>{const _0x40e3f3=_0x143793,_0x43549d=_0x114b07(_0xef786d),_0x59c08d=new _0x15d461(_0x1b5dc6)[_0x40e3f3(0x7a)](_0x2e91f9);return _0x43549d[_0x40e3f3(0x6e)](_0x4aa481=>({'stylesMap':_0x59c08d,'flatSelector':_0x4aa481,'specificity':_0xbb5f04(_0x4aa481)[0x0][_0x40e3f3(0x77)]}));})[_0x143793(0x75)]((_0x420e6a,_0x4f1d6e)=>_0x4d1834(_0x420e6a[_0x143793(0x76)],_0x4f1d6e[_0x143793(0x76)]));}(_0x29a847[_0x24a857(0x74)],_0x3bac37);return{'parsedCssRules':_0x9378e,'rootCssVariables':_0x1bf168(_0x9378e)};}function _0x12d5(_0x20a7c1,_0x976949){const _0x530bb2=_0x530b();return _0x12d5=function(_0x12d5ec,_0x32fe65){_0x12d5ec=_0x12d5ec-0x6e;let _0x579f56=_0x530bb2[_0x12d5ec];return _0x579f56;},_0x12d5(_0x20a7c1,_0x976949);}function w(_0x3d81a0,_0x464b63=''){const _0x433223=_0x12d5;return _0x3d81a0[_0x433223(0x81)](_0x27ff50=>{const _0x69ecf5=_0x433223,{selectorText:_0x22a050,cssText:_0x2efb22,cssRules:_0x53f9a4}=_0x27ff50;if(!_0x22a050)return[];const _0x5df7a6=_0x22a050[_0x69ecf5(0x71)](/&/g,_0x464b63);let _0x31aff7=_0x2efb22[_0x69ecf5(0x71)](_0x22a050,'')[_0x69ecf5(0x87)]()[_0x69ecf5(0x71)](/^{|}$/g,'');if(!_0x53f9a4||!_0x53f9a4[_0x69ecf5(0x80)])return[{'selectorText':_0x5df7a6,'contentCssText':_0x31aff7}];for(const _0x138379 of _0x53f9a4)_0x31aff7=_0x31aff7[_0x69ecf5(0x71)](_0x138379[_0x69ecf5(0x72)],'')[_0x69ecf5(0x87)]();return[{'selectorText':_0x5df7a6,'contentCssText':_0x31aff7},...w(Array[_0x69ecf5(0x85)](_0x53f9a4),_0x5df7a6)];});}