@ckeditor/ckeditor5-export-inline-styles 48.3.1-alpha.1 → 48.4.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x1c7e73,Plugin as _0x36f454}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x5e2957,createElement as _0x290de4,uid as _0x2ee08a}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x2e285b,addMarginStylesRules as _0x21950a,addPaddingStylesRules as _0xfc2f46}from'@ckeditor/ckeditor5-engine';import{calculate as _0x3333f2,compare as _0xae2c3a}from'specificity';function f(_0x27c418){const _0x45428e=[];let _0xbde638='',_0xf961a7=0x0;for(;_0xf961a7<_0x27c418['length'];){const _0x11de97=_0x27c418[_0xf961a7];if('('===_0x11de97){const _0x7f4f5a=y(_0x27c418,_0xf961a7+0x1);if(-0x1===_0x7f4f5a)return[];_0xbde638+=_0x27c418['slice'](_0xf961a7,_0x7f4f5a+0x1),_0xf961a7=_0x7f4f5a+0x1;}else','!==_0x11de97||_0xbde638['endsWith']('\x5c')?(_0xbde638+=_0x11de97,_0xf961a7++):(_0x45428e['push'](_0xbde638['trim']()),_0xbde638='',_0xf961a7++);}return _0xbde638['trim']()&&_0x45428e['push'](_0xbde638['trim']()),_0x45428e['filter'](Boolean);}function y(_0x54d81b,_0x380a5f){let _0x14f72c=0x1;for(let _0x45e98f=_0x380a5f;_0x45e98f<_0x54d81b['length'];_0x45e98f++){const _0x5f1d4b=_0x54d81b[_0x45e98f];if('('===_0x5f1d4b)_0x14f72c++;else{if(')'===_0x5f1d4b&&(_0x14f72c--,0x0===_0x14f72c))return _0x45e98f;}}return-0x1;}function d(_0x47dec1){return _0x47dec1['replace'](/!\s*important/i,'')['trim']();}function w(_0x3d537b){const _0x4e463b=new Map();for(const {stylesMap:_0x4a4de5,flatSelector:_0x104b31}of _0x3d537b){if(':root'!==_0x104b31)continue;const _0x380104=p(_0x4e463b['get']['bind'](_0x4e463b),_0x4a4de5);for(const [_0x4ec8b7,_0x28eb92]of _0x380104)_0x4e463b['set'](_0x4ec8b7,_0x28eb92);}return _0x4e463b;}function p(_0x23f400,_0x52ec75){const _0x3d8d19=new Map(),_0x2ec6e0=_0xbd1fbb=>_0x3d8d19['has'](_0xbd1fbb)?_0x3d8d19['get'](_0xbd1fbb):_0x23f400(_0xbd1fbb);for(const [_0x5082e3,_0x20f8f8]of _0x52ec75['getStylesEntries']())if(_0x20f8f8&&_0x5082e3['startsWith']('--')){const _0x1b8d13=m(_0x2ec6e0,_0x20f8f8);_0x3d8d19['set'](_0x5082e3,_0x1b8d13),_0x52ec75['remove'](_0x5082e3);}for(const [_0x5f536d,_0x50a0d6]of _0x52ec75['getStylesEntries']())if(_0x50a0d6){const _0x30b292=m(_0x2ec6e0,_0x50a0d6);_0x52ec75['set'](_0x5f536d,_0x30b292);}return _0x3d8d19;}function m(_0x2b6362,_0x114d07){return function(_0x417fef,_0x2949b7){let _0x13b376='',_0x33a9cb=0x0;for(;_0x33a9cb<_0x417fef['length'];){const _0x5b725e=_0x417fef['indexOf']('var(',_0x33a9cb);if(-0x1===_0x5b725e){_0x13b376+=_0x417fef['slice'](_0x33a9cb);break;}_0x13b376+=_0x417fef['slice'](_0x33a9cb,_0x5b725e);const _0x25a44b=_0x5b725e+0x4,_0x33f344=y(_0x417fef,_0x25a44b);_0x13b376+=_0x2949b7(_0x417fef['substring'](_0x25a44b,_0x33f344)),_0x33a9cb=_0x33f344+0x1;}return _0x13b376;}(_0x114d07,_0x1cec3b=>{const [_0x96487f,_0x27bfbf]=f(_0x1cec3b),_0x3af675=_0x2b6362(_0x96487f);return void 0x0!==_0x3af675?_0x3af675:_0x27bfbf?m(_0x2b6362,_0x27bfbf):'var('+_0x96487f+')';});}async function h(_0x9f7792){const _0x10607e=[await _0x5e2957(_0x9f7792['stylesheets']),_0x9f7792['inlineCss']]['filter'](_0x1cff36=>_0x1cff36&&_0x1cff36['length'])['join']('\x0a'),_0x5f2694=await async function(_0x5ef362,_0x223062){const _0x5b880e=new CSSStyleSheet();return await _0x5b880e['replace'](_0x223062),S(Array['from'](_0x5b880e['cssRules'])['filter'](_0x12b91e=>_0x12b91e instanceof CSSStyleRule))['flatMap'](({selectorText:_0x3aebb5,contentCssText:_0x347a6e})=>{const _0x5eb1b5=f(_0x3aebb5),_0x5e66b7=new _0x2e285b(_0x5ef362)['setTo'](_0x347a6e);return _0x5eb1b5['map'](_0x5b8e94=>{const _0x64f0e2=function(_0x3565f4){const _0x5abf49=':where(';let _0x2016a2=_0x3565f4,_0x5e21d3=0x0;for(let _0x4bf006=0x0;_0x4bf006<0x64;_0x4bf006++){const _0x159b74=_0x2016a2['indexOf'](_0x5abf49,_0x5e21d3);if(-0x1===_0x159b74)break;let _0x17c15e=0x0;for(let _0x268295=0x0;_0x268295<_0x159b74;_0x268295++)'('===_0x2016a2[_0x268295]?_0x17c15e++:')'===_0x2016a2[_0x268295]&&_0x17c15e--;if(_0x17c15e>0x0){_0x5e21d3=_0x159b74+0x7;continue;}let _0x42acff=-0x1;for(let _0x3073cd=_0x159b74+0x7,_0x312749=0x1;_0x3073cd<_0x2016a2['length'];_0x3073cd++)if('('===_0x2016a2[_0x3073cd]?_0x312749++:')'===_0x2016a2[_0x3073cd]&&_0x312749--,!_0x312749){_0x42acff=_0x3073cd;break;}-0x1!==_0x42acff?(_0x2016a2=_0x2016a2['slice'](0x0,_0x159b74)+_0x2016a2['slice'](_0x42acff+0x1),_0x5e21d3=_0x159b74):_0x5e21d3=_0x159b74+0x7;}return _0x2016a2['replace'](/\s+/g,'\x20')['trim']();}(_0x5b8e94);return{'stylesMap':_0x5e66b7,'flatSelector':_0x5b8e94,'specificity':_0x64f0e2?_0x3333f2(_0x64f0e2)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0]};});})['sort']((_0x2b1d4e,_0x47eb46)=>_0xae2c3a(_0x2b1d4e['specificity'],_0x47eb46['specificity']));}(_0x9f7792['stylesProcessor'],_0x10607e);return{'parsedCssRules':_0x5f2694,'rootCssVariables':w(_0x5f2694)};}function S(_0x16b847,_0x14e549=''){return _0x16b847['flatMap'](_0x1725be=>{const {selectorText:_0x59bd8d,cssText:_0x5605eb,cssRules:_0x27facb}=_0x1725be;if(!_0x59bd8d)return[];const _0x2c07db=_0x59bd8d['replace'](/&/g,_0x14e549);let _0x3245f1=_0x5605eb['replace'](_0x59bd8d,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x27facb||!_0x27facb['length'])return[{'selectorText':_0x2c07db,'contentCssText':_0x3245f1}];for(const _0x485f4b of _0x27facb)_0x3245f1=_0x3245f1['replace'](_0x485f4b['cssText'],'')['trim']();return[{'selectorText':_0x2c07db,'contentCssText':_0x3245f1},...S(Array['from'](_0x27facb),_0x2c07db)];});}function L(_0x2e0f83,_0x4f9218){const _0x5b9600=new _0x2e285b(_0x2e0f83);for(const _0x5158ff of _0x4f9218){let _0x23d3f7=null;if(_0x23d3f7='string'==typeof _0x5158ff?new _0x2e285b(_0x2e0f83)['setTo'](_0x5158ff):_0x5158ff,_0x23d3f7){for(const [_0x4a71e8,_0x5f21ca]of _0x23d3f7['getStylesEntries']())_0x5b9600['set'](_0x4a71e8,_0x5f21ca);}}return _0x5b9600;}var g=class extends _0x1c7e73{['_stylesProcessor'];constructor(_0xca40cf){super(_0xca40cf),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x21950a(this['_stylesProcessor']),_0xfc2f46(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async['execute'](_0x5e7855){const _0x2c72d8=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x1e7f71}=this['editor']['locale'],{rootName:_0x40cc77='main',dataControllerDowncastOptions:_0x401aa9={},transformations:_0x16f426=_0x2c72d8['transformations']||[]}=_0x5e7855||{};this['isBusy']=!0x0,this['refresh']();const _0x3652f5=this['_getRootDataHTMLFragment'](_0x40cc77,_0x401aa9),_0x1921f7=_0x290de4(_0x3652f5['ownerDocument'],'div',{'dir':_0x1e7f71,'class':'ck-content'},[_0x3652f5]);return this['_collectAndApplyStyles'](_0x16f426,_0x1921f7)['then'](()=>{const _0x1ad2b1=function(_0x4d51d4){const _0x48a397=_0x4d51d4['ownerDocument']['createDocumentFragment']();for(;_0x4d51d4['firstChild'];)_0x48a397['appendChild'](_0x4d51d4['firstChild']);return _0x48a397;}(_0x1921f7),_0x5af9ab=_0x1921f7['getAttribute']('style');if(_0x5af9ab)for(const _0x53365a of _0x1ad2b1['children']){const _0x1b9490=_0x53365a['getAttribute']('style'),_0x5b18ac=L(this['_stylesProcessor'],[_0x5af9ab,_0x1b9490]);_0x53365a['setAttribute']('style',x(_0x5b18ac));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x1ad2b1);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_getRootDataHTMLFragment'](_0x10d531,_0xa64a57){const {data:_0x4d8fa9,model:_0x55f64e}=this['editor'],_0x412c87=_0x55f64e['document']['getRoot'](_0x10d531),_0x22c48b=_0x4d8fa9['toView'](_0x412c87,_0xa64a57);return _0x4d8fa9['htmlProcessor']['domConverter']['viewToDom'](_0x22c48b);}async['_collectAndApplyStyles'](_0x238bc8,_0x56d8f4){const {stylesheets:_0x3a23ad,inlineCss:_0x226e5c,stripCssClasses:_0x1109bd}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x5c0baa,rootCssVariables:_0x59b128}=await h({'stylesheets':_0x3a23ad||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x226e5c}),_0x2df138=[];this['_processElementTree']({'transformations':_0x238bc8,'parsedCssRules':_0x5c0baa,'element':_0x56d8f4,'stripCssClasses':_0x1109bd,'parentCSSVariablesLookup':_0x59b128['get']['bind'](_0x59b128),'runAfterDocumentTransformation':_0x35f83c=>{_0x2df138['unshift'](_0x35f83c);}});for(const _0x3e0401 of _0x2df138)_0x3e0401();}['_processElementTree']({element:_0xddc658,parsedCssRules:_0x164aef,parentCSSVariablesLookup:_0x5d0b79,runAfterDocumentTransformation:_0x410742,stripCssClasses:_0x386065,transformations:_0x59db14}){const {stylesMap:_0x39d200,localCSSVariables:_0x46ea0c}=function(_0x22fe3b){const _0x3a0489=_0x22fe3b['element']['getAttribute']('style')||'',_0x2dda98=_0x22fe3b['parsedCssRules']['filter'](_0x498de4=>_0x22fe3b['element']['matches'](_0x498de4['flatSelector']))['map'](_0x187cbe=>_0x187cbe['stylesMap']),_0x2d1bf1=L(_0x22fe3b['stylesProcessor'],[..._0x2dda98,_0x3a0489]);return{'localCSSVariables':p(_0x22fe3b['fallbackCSSVariablesLookup'],_0x2d1bf1),'stylesMap':_0x2d1bf1};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x5d0b79,'parsedCssRules':_0x164aef,'element':_0xddc658}),_0x405402=[];for(const _0xba20b3 of _0x59db14){const _0x4c8815=_0xba20b3(_0xddc658,_0x39d200,{'runAfterDocumentTransformation':_0x410742,'runAfterChildrenTransformation':_0x45b53e=>{_0x405402['unshift'](_0x45b53e);}});_0x4c8815&&_0x4c8815 instanceof HTMLElement&&(_0xddc658=_0x4c8815);}_0x39d200['size']?_0xddc658['setAttribute']('style',x(_0x39d200)):_0xddc658['removeAttribute']('style');const _0x52b1b0=_0x55ee08=>_0x46ea0c['has'](_0x55ee08)?_0x46ea0c['get'](_0x55ee08):_0x5d0b79(_0x55ee08);for(const _0x5e5ffd of _0xddc658['children'])_0x5e5ffd instanceof HTMLElement&&this['_processElementTree']({'element':_0x5e5ffd,'parsedCssRules':_0x164aef,'stripCssClasses':_0x386065,'transformations':_0x59db14,'parentCSSVariablesLookup':_0x52b1b0,'runAfterDocumentTransformation':_0x410742});_0x386065&&_0xddc658['removeAttribute']('class');for(const _0x28c117 of _0x405402)_0x28c117();}};function x(_0x2f332d){return _0x2f332d['getStylesEntries']()['map'](_0x559883=>_0x559883['join'](':'))['join'](';')+';';}var C=class extends _0x36f454{static get['pluginName'](){return'ExportInlineStylesEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['editor']['config']['define']('exportInlineStyles',{}),this['editor']['commands']['add']('exportInlineStyles',new g(this['editor']));}['afterInit'](){!async function(_0x6202b1){const _0x240a88='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x3f222c=0x78fc0,_0x1ecde5=window['Date']['now'](),_0x28c50f=_0x6202b1['editor'],_0x3d7d1a=new window['Promise'](_0xe7d15c=>{_0x28c50f['once']('ready',_0xe7d15c);}),_0x9072a9={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x534b2b=_0x28c50f['config']['get']('licenseKey');async function _0x3350c8(){let _0x20c376,_0x3f3610=null,_0x5e45e6=null;try{return'GPL'==_0x534b2b?'NotAllowed':(_0x20c376=_0x395fc0(),_0x20c376?(_0x20c376['usageEndpoint']&&(_0x5e45e6=_0x192c32(_0x20c376['usageEndpoint'],_0x20c376['jti'])),await _0x429e9e()?_0x3d1698()?_0x967e1a()?'Expired':_0x488be0()?('evaluation'==_0x20c376['licenseType']&&(_0x3f3610=_0x1f1474('EvaluationLimit')),await _0x367249()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x967e1a(){const _0x299cc2=['evaluation','trial']['includes'](_0x20c376['licenseType'])?_0x1ecde5/0x3e8:0xe10*_0x3f222c;return _0x20c376['exp']<_0x299cc2;}function _0x3d1698(){const _0x4a980a=_0x20c376['features'];return!!_0x4a980a&&(!!_0x4a980a['includes']('*')||!!_0x4a980a['includes']('EIS'));}function _0x488be0(){const _0x1e8782=_0x20c376['licensedHosts'];if(!_0x1e8782||0x0==_0x1e8782['length'])return!0x0;const {hostname:_0x55f768}=new URL(window['location']['href']);if(_0x1e8782['includes'](_0x55f768))return!0x0;const _0xbb3af0=_0x55f768['split']('.');return _0x1e8782['filter'](_0x53a91c=>_0x53a91c['includes']('*'))['map'](_0x373488=>_0x373488['split']('.'))['filter'](_0x421c40=>_0x421c40['length']<=_0xbb3af0['length'])['map'](_0x3d292f=>Array(_0xbb3af0['length']-_0x3d292f['length'])['fill']('*'===_0x3d292f[0x0]?'*':'')['concat'](_0x3d292f))['some'](_0x4f3ce8=>_0xbb3af0['every']((_0x2a0fc0,_0x5571ff)=>_0x4f3ce8[_0x5571ff]===_0x2a0fc0||'*'===_0x4f3ce8[_0x5571ff]));}function _0x367249(){return _0x3f3610&&_0x5e45e6?new window['Promise']((_0x380aaf,_0x86e4f4)=>{_0x3f3610['then'](_0x380aaf,_0x86e4f4),_0x5e45e6['then'](_0x3b2121=>{'Valid'!=_0x3b2121&&_0x380aaf(_0x3b2121);},_0x86e4f4);}):_0x3f3610||_0x5e45e6||'Valid';}}function _0x192c32(_0x278566,_0x48210b){return new window['Promise'](_0x49aba4=>{if(_0x2b7d1())return _0x49aba4('Valid');_0x28e910(),_0x28c50f['decorate']('_sendUsageRequest');let _0x2ca509=!0x1;const _0x1c2ca3=_0x2ee08a();function _0x30dbc7(_0x235464){return!!_0x235464&&('object'==typeof _0x235464||'function'==typeof _0x235464)&&'function'==typeof _0x235464['then']&&'function'==typeof _0x235464['catch'];}function _0x4998b1(_0x32ab3e){_0x505623(_0x32ab3e)['then'](_0xc3afbb=>_0xc3afbb&&'ok'==_0xc3afbb['status']?_0x5b09e1(_0x24fffa(_0x1c2ca3+_0x48210b))!=_0xc3afbb['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x51b5c3=>(_0x19ad2f(),_0x51b5c3),()=>{const _0x3e0a66=_0x92eb11();return null==_0x3e0a66?(_0x19ad2f(),'Valid'):_0x1ecde5-_0x3e0a66>0x240c8400?'UsageLimit':'Valid';})['then'](_0x49aba4)['catch'](()=>{_0x49aba4('UsageLimit');});const _0x13347f=0x36ee80;function _0x19ad2f(){const _0xc029='llct-'+_0x5b09e1(_0x24fffa(_0x278566)),_0x5f3894=_0x583490(_0x5b09e1(window['Math']['ceil'](_0x1ecde5/_0x13347f)));window['localStorage']['setItem'](_0xc029,_0x5f3894);}function _0x92eb11(){const _0x566886='llct-'+_0x5b09e1(_0x24fffa(_0x278566)),_0x5a5bdc=window['localStorage']['getItem'](_0x566886);return _0x5a5bdc?window['parseInt'](_0x583490(_0x5a5bdc),0x10)*_0x13347f:null;}function _0x505623(_0xb49c6f){return new window['Promise']((_0x2f9912,_0x52f09f)=>{_0xb49c6f['then'](_0x2f9912,_0x52f09f),window['setTimeout'](_0x52f09f,0x1d4c0);});}}_0x28c50f['on']('_sendUsageRequest',(_0x4d1a67,_0xe296f8)=>{if(_0xe296f8[0x0]!=_0x278566)return _0x49aba4('UsageLimit');_0xe296f8[0x1]={..._0xe296f8[0x1],'requestId':_0x1c2ca3};},{'priority':'high'}),_0x28c50f['on']('_sendUsageRequest',_0x4b56ea=>{_0x30dbc7(_0x4b56ea['return'])&&(_0x2ca509=!0x0,_0x4998b1(_0x4b56ea['return']));},{'priority':'low'}),_0x3d7d1a['then'](()=>{_0x2ca509||_0x49aba4('UsageLimit');});});function _0x2b7d1(){return'auto'==_0x28c50f['editing']['view']['_overlayModeHint'];}function _0x28e910(){_0x28c50f['editing']['view']['_overlayModeHint']='auto';}}function _0x1f1474(_0x53790a){const _0x506433=[new window['Promise'](_0x32598c=>setTimeout(_0x32598c,0x93ecc)),_0x3d7d1a['then'](()=>new window['Promise'](_0x3e6e33=>{let _0x45e049=0x0;_0x28c50f['model']['on']('applyOperation',(_0x514ca1,_0x496aeb)=>{_0x496aeb[0x0]['isDocumentOperation']&&_0x45e049++,0x5e8==_0x45e049&&(_0x3e6e33(),_0x514ca1['off']());});}))];return window['Promise']['race'](_0x506433)['then'](()=>_0x53790a);}async function _0x592175(){await _0x3d7d1a;const _0x2eda8e=_0x28c50f['commands']['get']('exportInlineStyles');_0x2eda8e&&_0x2eda8e['on']('execute',_0x4a9a71=>{_0x4a9a71['stop']();},{'priority':'highest'}),_0x28c50f['model']['change']=_0x1cd2ea,_0x28c50f['model']['enqueueChange']=_0x1cd2ea,_0x28c50f['enableReadOnlyMode']('model');}function _0x724a02(_0x4aa5c1){const _0x45f5d2=_0x2e157a();_0x28c50f[_0x45f5d2]='exportInlineStylesLicenseKey'+_0x4aa5c1,'Valid'!=_0x4aa5c1&&_0x592175();}function _0x2e157a(){const _0x2ea62a=window['String'](window['performance']['now']())['replace']('.','');let _0x6f6ba8='D';for(let _0xc3512f=0x0;_0xc3512f<_0x2ea62a['length'];_0xc3512f+=0x2){let _0x76639=window['parseInt'](_0x2ea62a['substring'](_0xc3512f,_0xc3512f+0x2));_0x76639>=0x3e&&(_0x76639-=0x3e),_0x6f6ba8+=_0x240a88[_0x76639];}return _0x6f6ba8;}function _0x395fc0(){const _0x305f15=_0x534b2b['split']('.');if(0x3!=_0x305f15['length'])return null;return _0x244fee(_0x305f15[0x1]);function _0x244fee(_0x2975c3){const _0x1d327e=_0x42bcc2(_0x2975c3);return _0x1d327e&&_0xcd4c4b()?_0x1d327e:null;function _0xcd4c4b(){const _0x34d598=_0x1d327e['jti'],_0x3471bc=window['parseInt'](_0x34d598['substring'](_0x34d598['length']-0x8),0x10),_0x21ac3a={..._0x1d327e,'jti':_0x34d598['substring'](0x0,_0x34d598['length']-0x8)};return delete _0x21ac3a['vc'],_0x24fffa(_0x21ac3a)==_0x3471bc;}}}async function _0x429e9e(){let _0x31abc9=!0x0;try{const [_0x287184,_0x5170ee,_0x1ca987]=_0x534b2b['split']('.');return _0x24cb3f(_0x287184),await _0x2d2bc0(_0x287184,_0x5170ee,_0x1ca987),_0x31abc9;}catch{return!0x1;}function _0x24cb3f(_0x4dc107){const _0x1a4636=_0x42bcc2(_0x4dc107);_0x1a4636&&'ES256'==_0x1a4636['alg']||(_0x31abc9=!0x1);}async function _0x2d2bc0(_0x12c1bd,_0x148706,_0x5cf685){const _0x614350=window['Uint8Array']['from'](_0x17f157(_0x5cf685),_0x48f332=>_0x48f332['charCodeAt'](0x0)),_0x4e2d26=new window['TextEncoder']()['encode'](_0x12c1bd+'.'+_0x148706),_0x5d4197=window['crypto']['subtle'];if(!_0x5d4197)return;const _0x357c74=await _0x5d4197['importKey']('jwk',_0x9072a9,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5d4197['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x357c74,_0x614350,_0x4e2d26)||(_0x31abc9=!0x1);}}function _0x42bcc2(_0x120fd0){return _0x120fd0['startsWith']('ey')?JSON['parse'](_0x17f157(_0x120fd0)):null;}function _0x17f157(_0x247d37){return window['atob'](_0x247d37['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x24fffa(_0x4ddcbd){let _0x24ab2a=0x1505;function _0x5dff05(_0x23c601){for(let _0x42728d=0x0;_0x42728d<_0x23c601['length'];_0x42728d++){const _0x33c389=_0x23c601['charCodeAt'](_0x42728d);_0x24ab2a=(_0x24ab2a<<0x5)+_0x24ab2a+_0x33c389,_0x24ab2a&=_0x24ab2a;}}function _0x5963e0(_0x4346a6){Array['isArray'](_0x4346a6)?_0x4346a6['forEach'](_0x5963e0):_0x4346a6&&'object'==typeof _0x4346a6?Object['entries'](_0x4346a6)['sort']()['forEach'](([_0x138b9a,_0x385a7c])=>{_0x5dff05(_0x138b9a),_0x5963e0(_0x385a7c);}):_0x5dff05(window['String'](_0x4346a6));}return _0x5963e0(_0x4ddcbd),_0x24ab2a>>>0x0;}function _0x5b09e1(_0x2e587d){return _0x2e587d['toString'](0x10)['padStart'](0x8,'0');}function _0x583490(_0x59e05b){return _0x59e05b['split']('')['reverse']()['join']('');}function _0x1cd2ea(){}_0x724a02(await _0x3350c8());}(this);}},I=class extends _0x36f454{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'ExportInlineStyles';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[C];}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1df3e2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3d5cac;for(const _0x5a1f15 in _0x1df3e2){const _0x50d807=_0x5a1f15,_0xb4de82=_0x1df3e2[_0x50d807];if('exportInlineStylesLicenseKeyValid'==_0xb4de82||'exportInlineStylesLicenseKeyInvalid'==_0xb4de82||'exportInlineStylesLicenseKeyExpired'==_0xb4de82||'exportInlineStylesLicenseKeyDomainLimit'==_0xb4de82||'exportInlineStylesLicenseKeyNotAllowed'==_0xb4de82||'exportInlineStylesLicenseKeyEvaluationLimit'==_0xb4de82||'exportInlineStylesLicenseKeyUsageLimit'==_0xb4de82){delete _0x1df3e2[_0x50d807],_0x3d5cac=_0xb4de82,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x3d5cac&&_0x1df3e2['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x3d5cac&&_0x1df3e2['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x3d5cac&&_0x1df3e2['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x3d5cac&&_0x1df3e2['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x3d5cac&&_0x1df3e2['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x3d5cac&&_0x1df3e2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}};export{I as ExportInlineStyles,g as ExportInlineStylesCommand,C as ExportInlineStylesEditing,d as dropImportantStyleSuffix};
|
|
23
|
+
import{Command as _0x872d68,Plugin as _0x5c523e}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x38373d,createElement as _0x35896d,uid as _0x27d62b}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x2b7b1f,addMarginStylesRules as _0x4cea01,addPaddingStylesRules as _0x2fa5cf}from'@ckeditor/ckeditor5-engine';import{calculate as _0x53a1c3,compare as _0x33cee1}from'specificity';function f(_0x3cc888){const _0x351e24=[];let _0x343d1d='',_0xe46f99=0x0;for(;_0xe46f99<_0x3cc888['length'];){const _0x53f464=_0x3cc888[_0xe46f99];if('('===_0x53f464){const _0x29def8=y(_0x3cc888,_0xe46f99+0x1);if(-0x1===_0x29def8)return[];_0x343d1d+=_0x3cc888['slice'](_0xe46f99,_0x29def8+0x1),_0xe46f99=_0x29def8+0x1;}else','!==_0x53f464||_0x343d1d['endsWith']('\x5c')?(_0x343d1d+=_0x53f464,_0xe46f99++):(_0x351e24['push'](_0x343d1d['trim']()),_0x343d1d='',_0xe46f99++);}return _0x343d1d['trim']()&&_0x351e24['push'](_0x343d1d['trim']()),_0x351e24['filter'](Boolean);}function y(_0x25ed13,_0x26aa5f){let _0x1a389d=0x1;for(let _0x1f53d7=_0x26aa5f;_0x1f53d7<_0x25ed13['length'];_0x1f53d7++){const _0x3e9e87=_0x25ed13[_0x1f53d7];if('('===_0x3e9e87)_0x1a389d++;else{if(')'===_0x3e9e87&&(_0x1a389d--,0x0===_0x1a389d))return _0x1f53d7;}}return-0x1;}function d(_0x1ac667){return _0x1ac667['replace'](/!\s*important/i,'')['trim']();}function w(_0x181291){const _0x5f46c9=new Map();for(const {stylesMap:_0x40b3a0,flatSelector:_0x320a33}of _0x181291){if(':root'!==_0x320a33)continue;const _0x283065=p(_0x5f46c9['get']['bind'](_0x5f46c9),_0x40b3a0);for(const [_0x1cfef3,_0x2ad4d4]of _0x283065)_0x5f46c9['set'](_0x1cfef3,_0x2ad4d4);}return _0x5f46c9;}function p(_0x2a4d60,_0x481c33){const _0x473650=new Map(),_0x308ca7=_0x36e507=>_0x473650['has'](_0x36e507)?_0x473650['get'](_0x36e507):_0x2a4d60(_0x36e507);for(const [_0x148cdb,_0x27b976]of _0x481c33['getStylesEntries']())if(_0x27b976&&_0x148cdb['startsWith']('--')){const _0x1b2c1c=m(_0x308ca7,_0x27b976);_0x473650['set'](_0x148cdb,_0x1b2c1c),_0x481c33['remove'](_0x148cdb);}for(const [_0x2faca0,_0x5b4b40]of _0x481c33['getStylesEntries']())if(_0x5b4b40){const _0x1aab54=m(_0x308ca7,_0x5b4b40);_0x481c33['set'](_0x2faca0,_0x1aab54);}return _0x473650;}function m(_0x3dc824,_0x4ed2ec){return function(_0x359f31,_0x36a75c){let _0x20ab76='',_0x15968e=0x0;for(;_0x15968e<_0x359f31['length'];){const _0x26cc46=_0x359f31['indexOf']('var(',_0x15968e);if(-0x1===_0x26cc46){_0x20ab76+=_0x359f31['slice'](_0x15968e);break;}_0x20ab76+=_0x359f31['slice'](_0x15968e,_0x26cc46);const _0x394dd5=_0x26cc46+0x4,_0x3af241=y(_0x359f31,_0x394dd5);_0x20ab76+=_0x36a75c(_0x359f31['substring'](_0x394dd5,_0x3af241)),_0x15968e=_0x3af241+0x1;}return _0x20ab76;}(_0x4ed2ec,_0x6c1ae2=>{const [_0x333729,_0x13a4d2]=f(_0x6c1ae2),_0x1d71e1=_0x3dc824(_0x333729);return void 0x0!==_0x1d71e1?_0x1d71e1:_0x13a4d2?m(_0x3dc824,_0x13a4d2):'var('+_0x333729+')';});}async function h(_0x30c0e4){const _0x587e93=[await _0x38373d(_0x30c0e4['stylesheets']),_0x30c0e4['inlineCss']]['filter'](_0x533b83=>_0x533b83&&_0x533b83['length'])['join']('\x0a'),_0x2bc8b7=await async function(_0x1302a8,_0x5db12d){const _0x31d74f=new CSSStyleSheet();return await _0x31d74f['replace'](_0x5db12d),S(Array['from'](_0x31d74f['cssRules'])['filter'](_0x18091e=>_0x18091e instanceof CSSStyleRule))['flatMap'](({selectorText:_0xc39850,contentCssText:_0x508cfd})=>{const _0x2d8ae9=f(_0xc39850),_0x216940=new _0x2b7b1f(_0x1302a8)['setTo'](_0x508cfd);return _0x2d8ae9['map'](_0x21f68f=>{const _0x2a5f63=function(_0x85b5cb){const _0x35a4d6=':where(';let _0x3e7158=_0x85b5cb,_0x537b8d=0x0;for(let _0x2908c1=0x0;_0x2908c1<0x64;_0x2908c1++){const _0x8bb2b2=_0x3e7158['indexOf'](_0x35a4d6,_0x537b8d);if(-0x1===_0x8bb2b2)break;let _0x671b2e=0x0;for(let _0x1225c5=0x0;_0x1225c5<_0x8bb2b2;_0x1225c5++)'('===_0x3e7158[_0x1225c5]?_0x671b2e++:')'===_0x3e7158[_0x1225c5]&&_0x671b2e--;if(_0x671b2e>0x0){_0x537b8d=_0x8bb2b2+0x7;continue;}let _0x1be582=-0x1;for(let _0x54d330=_0x8bb2b2+0x7,_0x1e449a=0x1;_0x54d330<_0x3e7158['length'];_0x54d330++)if('('===_0x3e7158[_0x54d330]?_0x1e449a++:')'===_0x3e7158[_0x54d330]&&_0x1e449a--,!_0x1e449a){_0x1be582=_0x54d330;break;}-0x1!==_0x1be582?(_0x3e7158=_0x3e7158['slice'](0x0,_0x8bb2b2)+_0x3e7158['slice'](_0x1be582+0x1),_0x537b8d=_0x8bb2b2):_0x537b8d=_0x8bb2b2+0x7;}return _0x3e7158['replace'](/\s+/g,'\x20')['trim']();}(_0x21f68f),_0x4fe5d7=_0x2a5f63?_0x53a1c3(_0x2a5f63)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x216940,'flatSelector':_0x21f68f,'specificity':_0x4fe5d7};});})['sort']((_0x42562c,_0x2f3e99)=>_0x33cee1(_0x42562c['specificity'],_0x2f3e99['specificity']));}(_0x30c0e4['stylesProcessor'],_0x587e93);return{'parsedCssRules':_0x2bc8b7,'rootCssVariables':w(_0x2bc8b7)};}function S(_0x36b264,_0x5339cf=''){return _0x36b264['flatMap'](_0x5e26f6=>{const {selectorText:_0x2c514c,cssText:_0x1793f0,cssRules:_0x369f4d}=_0x5e26f6;if(!_0x2c514c)return[];const _0x3efbee=_0x2c514c['replace'](/&/g,_0x5339cf);let _0x5c8273=_0x1793f0['replace'](_0x2c514c,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x369f4d||!_0x369f4d['length'])return[{'selectorText':_0x3efbee,'contentCssText':_0x5c8273}];for(const _0x52d18c of _0x369f4d)_0x5c8273=_0x5c8273['replace'](_0x52d18c['cssText'],'')['trim']();return[{'selectorText':_0x3efbee,'contentCssText':_0x5c8273},...S(Array['from'](_0x369f4d),_0x3efbee)];});}function L(_0x44cf91,_0x1d0b5d){const _0x364595=new _0x2b7b1f(_0x44cf91);for(const _0x593ae6 of _0x1d0b5d){let _0x13c3f2;if(_0x13c3f2='string'==typeof _0x593ae6?new _0x2b7b1f(_0x44cf91)['setTo'](_0x593ae6):_0x593ae6,_0x13c3f2){for(const [_0xa2ea1f,_0xf7204f]of _0x13c3f2['getStylesEntries']())_0x364595['set'](_0xa2ea1f,_0xf7204f);}}return _0x364595;}var g=class extends _0x872d68{_stylesProcessor;constructor(_0x54de2d){super(_0x54de2d),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x4cea01(this['_stylesProcessor']),_0x2fa5cf(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x8c88f4){const _0x2cceca=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0xce706b}=this['editor']['locale'],{rootName:_0x2eb2e0='main',dataControllerDowncastOptions:_0x44850f={},transformations:_0xcb66a6=_0x2cceca['transformations']||[]}=_0x8c88f4||{};this['isBusy']=!0x0,this['refresh']();const _0x432661=this['_getRootDataHTMLFragment'](_0x2eb2e0,_0x44850f),_0x587494=_0x35896d(_0x432661['ownerDocument'],'div',{'dir':_0xce706b,'class':'ck-content'},[_0x432661]);return this['_collectAndApplyStyles'](_0xcb66a6,_0x587494)['then'](()=>{const _0x397192=function(_0xff3288){const _0x1f035a=_0xff3288['ownerDocument']['createDocumentFragment']();for(;_0xff3288['firstChild'];)_0x1f035a['appendChild'](_0xff3288['firstChild']);return _0x1f035a;}(_0x587494),_0x322b4d=_0x587494['getAttribute']('style');if(_0x322b4d)for(const _0x37631c of _0x397192['children']){const _0x5f4982=_0x37631c['getAttribute']('style'),_0xe6dfd5=L(this['_stylesProcessor'],[_0x322b4d,_0x5f4982]);_0x37631c['setAttribute']('style',x(_0xe6dfd5));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x397192);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0xe1a7a0,_0x298601){const {data:_0x4e87a1,model:_0x460a46}=this['editor'],_0xef60b6=_0x460a46['document']['getRoot'](_0xe1a7a0),_0x9ed1e6=_0x4e87a1['toView'](_0xef60b6,_0x298601);return _0x4e87a1['htmlProcessor']['domConverter']['viewToDom'](_0x9ed1e6);}async _collectAndApplyStyles(_0x383e7e,_0x16ffe1){const {stylesheets:_0x414a39,inlineCss:_0xa99edf,stripCssClasses:_0x482f5d}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x2b1eab,rootCssVariables:_0x3f3a85}=await h({'stylesheets':_0x414a39||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0xa99edf}),_0x5ae504=[];this['_processElementTree']({'transformations':_0x383e7e,'parsedCssRules':_0x2b1eab,'element':_0x16ffe1,'stripCssClasses':_0x482f5d,'parentCSSVariablesLookup':_0x3f3a85['get']['bind'](_0x3f3a85),'runAfterDocumentTransformation':_0x1cd485=>{_0x5ae504['unshift'](_0x1cd485);}});for(const _0x464210 of _0x5ae504)_0x464210();}_processElementTree({element:_0x5208bc,parsedCssRules:_0x432f86,parentCSSVariablesLookup:_0x3cda91,runAfterDocumentTransformation:_0x3ca15e,stripCssClasses:_0x31873e,transformations:_0x5a4e52}){const {stylesMap:_0x594bfb,localCSSVariables:_0x124278}=function(_0x26f583){const _0x2fc2e1=_0x26f583['element']['getAttribute']('style')||'',_0x51524b=_0x26f583['parsedCssRules']['filter'](_0x5d7d73=>_0x26f583['element']['matches'](_0x5d7d73['flatSelector']))['map'](_0x3a1811=>_0x3a1811['stylesMap']),_0x3c11de=L(_0x26f583['stylesProcessor'],[..._0x51524b,_0x2fc2e1]);return{'localCSSVariables':p(_0x26f583['fallbackCSSVariablesLookup'],_0x3c11de),'stylesMap':_0x3c11de};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x3cda91,'parsedCssRules':_0x432f86,'element':_0x5208bc}),_0x1c41a8=[];for(const _0x10fdc5 of _0x5a4e52){const _0x88edbc=_0x10fdc5(_0x5208bc,_0x594bfb,{'runAfterDocumentTransformation':_0x3ca15e,'runAfterChildrenTransformation':_0x85c0fd=>{_0x1c41a8['unshift'](_0x85c0fd);}});_0x88edbc&&_0x88edbc instanceof HTMLElement&&(_0x5208bc=_0x88edbc);}_0x594bfb['size']?_0x5208bc['setAttribute']('style',x(_0x594bfb)):_0x5208bc['removeAttribute']('style');const _0x4db15c=_0x33192f=>_0x124278['has'](_0x33192f)?_0x124278['get'](_0x33192f):_0x3cda91(_0x33192f);for(const _0x13ff84 of _0x5208bc['children'])_0x13ff84 instanceof HTMLElement&&this['_processElementTree']({'element':_0x13ff84,'parsedCssRules':_0x432f86,'stripCssClasses':_0x31873e,'transformations':_0x5a4e52,'parentCSSVariablesLookup':_0x4db15c,'runAfterDocumentTransformation':_0x3ca15e});_0x31873e&&_0x5208bc['removeAttribute']('class');for(const _0x49ce27 of _0x1c41a8)_0x49ce27();}};function x(_0x5c4252){return _0x5c4252['getStylesEntries']()['map'](_0x38e1c6=>_0x38e1c6['join'](':'))['join'](';')+';';}var C=class extends _0x5c523e{static get['pluginName'](){return'ExportInlineStylesEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){this['editor']['config']['define']('exportInlineStyles',{}),this['editor']['commands']['add']('exportInlineStyles',new g(this['editor']));}afterInit(){!async function(_0x1fb043){const _0x470b77='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x283c4e=0x79128,_0x4efdf8=window['Date']['now'](),_0x420cfd=_0x1fb043['editor'],_0x137f52=new window['Promise'](_0x5bf578=>{_0x420cfd['once']('ready',_0x5bf578);}),_0xf4628={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x21c615=_0x420cfd['config']['get']('licenseKey');async function _0x37bca9(){let _0x415ca5,_0x1a93dd=null,_0x3ed600=null;try{return'GPL'==_0x21c615?'NotAllowed':(_0x415ca5=_0x3602cb(),_0x415ca5?(_0x415ca5['usageEndpoint']&&(_0x3ed600=_0xd17c42(_0x415ca5['usageEndpoint'],_0x415ca5['jti'])),await _0xa569f9()?_0x3c0468()?_0x9f0d1e()?'Expired':_0xf3244d()?('evaluation'==_0x415ca5['licenseType']&&(_0x1a93dd=_0x4c440f('EvaluationLimit')),await _0x4f918a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x9f0d1e(){const _0x1ece7a=['evaluation','trial']['includes'](_0x415ca5['licenseType'])?_0x4efdf8/0x3e8:0xe10*_0x283c4e;return _0x415ca5['exp']<_0x1ece7a;}function _0x3c0468(){const _0x567b93=_0x415ca5['features'];return!!_0x567b93&&(!!_0x567b93['includes']('*')||!!_0x567b93['includes']('EIS'));}function _0xf3244d(){const _0xacf89=_0x415ca5['licensedHosts'];if(!_0xacf89||0x0==_0xacf89['length'])return!0x0;const {hostname:_0x2ef543}=new URL(window['location']['href']);if(_0xacf89['includes'](_0x2ef543))return!0x0;const _0x9ed802=_0x2ef543['split']('.');return _0xacf89['filter'](_0x308762=>_0x308762['includes']('*'))['map'](_0x3d1ac0=>_0x3d1ac0['split']('.'))['filter'](_0x4313cc=>_0x4313cc['length']<=_0x9ed802['length'])['map'](_0x5ec0bb=>Array(_0x9ed802['length']-_0x5ec0bb['length'])['fill']('*'===_0x5ec0bb[0x0]?'*':'')['concat'](_0x5ec0bb))['some'](_0x3141c3=>_0x9ed802['every']((_0x59a281,_0x4b1c2f)=>_0x3141c3[_0x4b1c2f]===_0x59a281||'*'===_0x3141c3[_0x4b1c2f]));}function _0x4f918a(){return _0x1a93dd&&_0x3ed600?new window['Promise']((_0x2b750a,_0x2b4aab)=>{_0x1a93dd['then'](_0x2b750a,_0x2b4aab),_0x3ed600['then'](_0x312713=>{'Valid'!=_0x312713&&_0x2b750a(_0x312713);},_0x2b4aab);}):_0x1a93dd||_0x3ed600||'Valid';}}function _0xd17c42(_0x5c43ae,_0xd3c4f7){return new window['Promise'](_0x160707=>{if(_0x2fea8f())return _0x160707('Valid');_0x143ab5(),_0x420cfd['decorate']('_sendUsageRequest');let _0x3f9fc3=!0x1;const _0x2e6d26=_0x27d62b();function _0x416cf0(_0x1c0f4d){return!!_0x1c0f4d&&('object'==typeof _0x1c0f4d||'function'==typeof _0x1c0f4d)&&'function'==typeof _0x1c0f4d['then']&&'function'==typeof _0x1c0f4d['catch'];}function _0x19c974(_0x26e2bb){_0x171c25(_0x26e2bb)['then'](_0x459292=>_0x459292&&'ok'==_0x459292['status']?_0x127838(_0x32fec2(_0x2e6d26+_0xd3c4f7))!=_0x459292['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x451257=>(_0x9bb9f0(),_0x451257),()=>{const _0x28ddc9=_0x15b650();return null==_0x28ddc9?(_0x9bb9f0(),'Valid'):_0x4efdf8-_0x28ddc9>0x240c8400?'UsageLimit':'Valid';})['then'](_0x160707)['catch'](()=>{_0x160707('UsageLimit');});const _0x213030=0x36ee80;function _0x9bb9f0(){const _0x39a858='llct-'+_0x127838(_0x32fec2(_0x5c43ae)),_0xfb02ae=_0x79e69a(_0x127838(window['Math']['ceil'](_0x4efdf8/_0x213030)));window['localStorage']['setItem'](_0x39a858,_0xfb02ae);}function _0x15b650(){const _0x3966e7='llct-'+_0x127838(_0x32fec2(_0x5c43ae)),_0x3e6963=window['localStorage']['getItem'](_0x3966e7);return _0x3e6963?window['parseInt'](_0x79e69a(_0x3e6963),0x10)*_0x213030:null;}function _0x171c25(_0x280892){return new window['Promise']((_0x2ea573,_0x51e59f)=>{_0x280892['then'](_0x2ea573,_0x51e59f),window['setTimeout'](_0x51e59f,0x1d4c0);});}}_0x420cfd['on']('_sendUsageRequest',(_0x2cb96b,_0xf34cd5)=>{if(_0xf34cd5[0x0]!=_0x5c43ae)return _0x160707('UsageLimit');_0xf34cd5[0x1]={..._0xf34cd5[0x1],'requestId':_0x2e6d26};},{'priority':'high'}),_0x420cfd['on']('_sendUsageRequest',_0x309195=>{_0x416cf0(_0x309195['return'])&&(_0x3f9fc3=!0x0,_0x19c974(_0x309195['return']));},{'priority':'low'}),_0x137f52['then'](()=>{_0x3f9fc3||_0x160707('UsageLimit');});});function _0x2fea8f(){return'auto'==_0x420cfd['editing']['view']['_overlayModeHint'];}function _0x143ab5(){_0x420cfd['editing']['view']['_overlayModeHint']='auto';}}function _0x4c440f(_0x513320){const _0x4c559c=[new window['Promise'](_0x1f2a6d=>setTimeout(_0x1f2a6d,0x93ecc)),_0x137f52['then'](()=>new window['Promise'](_0x5776c2=>{let _0x276297=0x0;_0x420cfd['model']['on']('applyOperation',(_0x321e96,_0x29e8c3)=>{_0x29e8c3[0x0]['isDocumentOperation']&&_0x276297++,0x5e8==_0x276297&&(_0x5776c2(),_0x321e96['off']());});}))];return window['Promise']['race'](_0x4c559c)['then'](()=>_0x513320);}async function _0x567d85(){await _0x137f52;const _0x1efd31=_0x420cfd['commands']['get']('exportInlineStyles');_0x1efd31&&_0x1efd31['on']('execute',_0x25ce0f=>{_0x25ce0f['stop']();},{'priority':'highest'}),_0x420cfd['model']['change']=_0x4f8041,_0x420cfd['model']['enqueueChange']=_0x4f8041,_0x420cfd['enableReadOnlyMode']('model');}function _0x175f64(_0x2a7765){const _0x29c662=_0x2d6c55();_0x420cfd[_0x29c662]='exportInlineStylesLicenseKey'+_0x2a7765,'Valid'!=_0x2a7765&&_0x567d85();}function _0x2d6c55(){const _0x4d4da8=window['String'](window['performance']['now']())['replace']('.','');let _0x111434='D';for(let _0x272821=0x0;_0x272821<_0x4d4da8['length'];_0x272821+=0x2){let _0x479cdb=window['parseInt'](_0x4d4da8['substring'](_0x272821,_0x272821+0x2));_0x479cdb>=0x3e&&(_0x479cdb-=0x3e),_0x111434+=_0x470b77[_0x479cdb];}return _0x111434;}function _0x3602cb(){const _0x3ab281=_0x21c615['split']('.');if(0x3!=_0x3ab281['length'])return null;return _0x4d284b(_0x3ab281[0x1]);function _0x4d284b(_0x45e02a){const _0x4ea08a=_0x7fb1f1(_0x45e02a);return _0x4ea08a&&_0x2509d2()?_0x4ea08a:null;function _0x2509d2(){const _0x2699ec=_0x4ea08a['jti'],_0x5d6a67=window['parseInt'](_0x2699ec['substring'](_0x2699ec['length']-0x8),0x10),_0x235aa1={..._0x4ea08a,'jti':_0x2699ec['substring'](0x0,_0x2699ec['length']-0x8)};return delete _0x235aa1['vc'],_0x32fec2(_0x235aa1)==_0x5d6a67;}}}async function _0xa569f9(){let _0x21563d=!0x0;try{const [_0x14e038,_0x489a50,_0x33e3be]=_0x21c615['split']('.');return _0x253d45(_0x14e038),await _0x192559(_0x14e038,_0x489a50,_0x33e3be),_0x21563d;}catch{return!0x1;}function _0x253d45(_0x31f9fd){const _0x54ee57=_0x7fb1f1(_0x31f9fd);_0x54ee57&&'ES256'==_0x54ee57['alg']||(_0x21563d=!0x1);}async function _0x192559(_0x23694a,_0x3b35e3,_0x2c50ff){const _0x544a84=window['Uint8Array']['from'](_0x11a4c5(_0x2c50ff),_0x1846e8=>_0x1846e8['charCodeAt'](0x0)),_0x5dab44=new window['TextEncoder']()['encode'](_0x23694a+'.'+_0x3b35e3),_0x20b1a3=window['crypto']['subtle'];if(!_0x20b1a3)return;const _0x12adf5=await _0x20b1a3['importKey']('jwk',_0xf4628,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x20b1a3['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x12adf5,_0x544a84,_0x5dab44)||(_0x21563d=!0x1);}}function _0x7fb1f1(_0x1f5c4d){return _0x1f5c4d['startsWith']('ey')?JSON['parse'](_0x11a4c5(_0x1f5c4d)):null;}function _0x11a4c5(_0x16dcd3){return window['atob'](_0x16dcd3['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x32fec2(_0x4894c0){let _0x55c3b3=0x1505;function _0x277607(_0x56f1b5){for(let _0x30669d=0x0;_0x30669d<_0x56f1b5['length'];_0x30669d++){const _0x325546=_0x56f1b5['charCodeAt'](_0x30669d);_0x55c3b3=(_0x55c3b3<<0x5)+_0x55c3b3+_0x325546,_0x55c3b3&=_0x55c3b3;}}function _0xa65a29(_0x3ba8ca){Array['isArray'](_0x3ba8ca)?_0x3ba8ca['forEach'](_0xa65a29):_0x3ba8ca&&'object'==typeof _0x3ba8ca?Object['entries'](_0x3ba8ca)['sort']()['forEach'](([_0x251e00,_0x2978e4])=>{_0x277607(_0x251e00),_0xa65a29(_0x2978e4);}):_0x277607(window['String'](_0x3ba8ca));}return _0xa65a29(_0x4894c0),_0x55c3b3>>>0x0;}function _0x127838(_0x310b91){return _0x310b91['toString'](0x10)['padStart'](0x8,'0');}function _0x79e69a(_0x5a6594){return _0x5a6594['split']('')['reverse']()['join']('');}function _0x4f8041(){}_0x175f64(await _0x37bca9());}(this);}},I=class extends _0x5c523e{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'ExportInlineStyles';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[C];}init(){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x51ffce=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5d1e12;for(const _0x3b5f9b in _0x51ffce){const _0x54cfca=_0x3b5f9b,_0x4d66b0=_0x51ffce[_0x54cfca];if('exportInlineStylesLicenseKeyValid'==_0x4d66b0||'exportInlineStylesLicenseKeyInvalid'==_0x4d66b0||'exportInlineStylesLicenseKeyExpired'==_0x4d66b0||'exportInlineStylesLicenseKeyDomainLimit'==_0x4d66b0||'exportInlineStylesLicenseKeyNotAllowed'==_0x4d66b0||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x4d66b0||'exportInlineStylesLicenseKeyUsageLimit'==_0x4d66b0){delete _0x51ffce[_0x54cfca],_0x5d1e12=_0x4d66b0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x5d1e12&&_0x51ffce['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x5d1e12&&_0x51ffce['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x5d1e12&&_0x51ffce['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x5d1e12&&_0x51ffce['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x5d1e12&&_0x51ffce['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x5d1e12&&_0x51ffce['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}};export{I as ExportInlineStyles,g as ExportInlineStylesCommand,C as ExportInlineStylesEditing,d as dropImportantStyleSuffix};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-export-inline-styles",
|
|
3
|
-
"version": "48.
|
|
3
|
+
"version": "48.4.0-alpha.0",
|
|
4
4
|
"description": "The export with inline styles feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ckeditor/ckeditor5-core": "48.
|
|
38
|
-
"@ckeditor/ckeditor5-engine": "48.
|
|
39
|
-
"@ckeditor/ckeditor5-utils": "48.
|
|
37
|
+
"@ckeditor/ckeditor5-core": "48.4.0-alpha.0",
|
|
38
|
+
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.0",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.0",
|
|
40
40
|
"specificity": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|