@ckeditor/ckeditor5-export-inline-styles 48.5.0-alpha.2 → 48.5.0-alpha.4
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 _0x162aec,Plugin as _0x1e96a3}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x293d68,createElement as _0x4655a5,uid as _0x2b270d}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x125274,addMarginStylesRules as _0x423d80,addPaddingStylesRules as _0x104240}from'@ckeditor/ckeditor5-engine';import{calculate as _0x28870c,compare as _0x2dacb5}from'specificity';function f(_0x2aa12d){const _0x2bd0b7=[];let _0x59d1e6='',_0x192f6a=0x0;for(;_0x192f6a<_0x2aa12d['length'];){const _0x2bda40=_0x2aa12d[_0x192f6a];if('('===_0x2bda40){const _0x351be7=y(_0x2aa12d,_0x192f6a+0x1);if(-0x1===_0x351be7)return[];_0x59d1e6+=_0x2aa12d['slice'](_0x192f6a,_0x351be7+0x1),_0x192f6a=_0x351be7+0x1;}else','!==_0x2bda40||_0x59d1e6['endsWith']('\x5c')?(_0x59d1e6+=_0x2bda40,_0x192f6a++):(_0x2bd0b7['push'](_0x59d1e6['trim']()),_0x59d1e6='',_0x192f6a++);}return _0x59d1e6['trim']()&&_0x2bd0b7['push'](_0x59d1e6['trim']()),_0x2bd0b7['filter'](Boolean);}function y(_0x459b80,_0x31b512){let _0x3635fb=0x1;for(let _0x574ebc=_0x31b512;_0x574ebc<_0x459b80['length'];_0x574ebc++){const _0x110ca2=_0x459b80[_0x574ebc];if('('===_0x110ca2)_0x3635fb++;else{if(')'===_0x110ca2&&(_0x3635fb--,0x0===_0x3635fb))return _0x574ebc;}}return-0x1;}function d(_0x4a26bd){return _0x4a26bd['replace'](/!\s*important/i,'')['trim']();}function w(_0x2d4f82){const _0x178f86=new Map();for(const {stylesMap:_0x93805,flatSelector:_0x3503b1}of _0x2d4f82){if(':root'!==_0x3503b1)continue;const _0x49157c=p(_0x178f86['get']['bind'](_0x178f86),_0x93805);for(const [_0x3c9781,_0x2da5a3]of _0x49157c)_0x178f86['set'](_0x3c9781,_0x2da5a3);}return _0x178f86;}function p(_0x549b80,_0x60487){const _0x1e6658=new Map(),_0x25bb7b=_0x34bf92=>_0x1e6658['has'](_0x34bf92)?_0x1e6658['get'](_0x34bf92):_0x549b80(_0x34bf92);for(const [_0x35dc8a,_0x35a9aa]of _0x60487['getStylesEntries']())if(_0x35a9aa&&_0x35dc8a['startsWith']('--')){const _0xbd261=m(_0x25bb7b,_0x35a9aa);_0x1e6658['set'](_0x35dc8a,_0xbd261),_0x60487['remove'](_0x35dc8a);}for(const [_0x3da1a2,_0x443673]of _0x60487['getStylesEntries']())if(_0x443673){const _0x306c74=m(_0x25bb7b,_0x443673);_0x60487['set'](_0x3da1a2,_0x306c74);}return _0x1e6658;}function m(_0x5bc993,_0x4142a0){return function(_0x40b4b1,_0x2d6eb7){let _0x55c98b='',_0x487f0c=0x0;for(;_0x487f0c<_0x40b4b1['length'];){const _0x3f7bb8=_0x40b4b1['indexOf']('var(',_0x487f0c);if(-0x1===_0x3f7bb8){_0x55c98b+=_0x40b4b1['slice'](_0x487f0c);break;}_0x55c98b+=_0x40b4b1['slice'](_0x487f0c,_0x3f7bb8);const _0x37a6c7=_0x3f7bb8+0x4,_0x155ec9=y(_0x40b4b1,_0x37a6c7);_0x55c98b+=_0x2d6eb7(_0x40b4b1['substring'](_0x37a6c7,_0x155ec9)),_0x487f0c=_0x155ec9+0x1;}return _0x55c98b;}(_0x4142a0,_0x13e626=>{const [_0x403c1a,_0x40a841]=f(_0x13e626),_0x3d6c4d=_0x5bc993(_0x403c1a);return void 0x0!==_0x3d6c4d?_0x3d6c4d:_0x40a841?m(_0x5bc993,_0x40a841):'var('+_0x403c1a+')';});}async function h(_0x4a8953){const _0x51d383=[await _0x293d68(_0x4a8953['stylesheets']),_0x4a8953['inlineCss']]['filter'](_0x161034=>_0x161034&&_0x161034['length'])['join']('\x0a'),_0x32c80d=await async function(_0x2a2f37,_0x530b09){const _0x5bf5f3=new CSSStyleSheet();return await _0x5bf5f3['replace'](_0x530b09),S(Array['from'](_0x5bf5f3['cssRules'])['filter'](_0xd71fad=>_0xd71fad instanceof CSSStyleRule))['flatMap'](({selectorText:_0x441e1e,contentCssText:_0x495246})=>{const _0x34c852=f(_0x441e1e),_0x4e8bf2=new _0x125274(_0x2a2f37)['setTo'](_0x495246);return _0x34c852['map'](_0x5b1afb=>{const _0x439a83=function(_0x533928){const _0x27abf4=':where(';let _0x598c02=_0x533928,_0x124ecf=0x0;for(let _0x43c2c4=0x0;_0x43c2c4<0x64;_0x43c2c4++){const _0x181855=_0x598c02['indexOf'](_0x27abf4,_0x124ecf);if(-0x1===_0x181855)break;let _0x539a87=0x0;for(let _0x1fe142=0x0;_0x1fe142<_0x181855;_0x1fe142++)'('===_0x598c02[_0x1fe142]?_0x539a87++:')'===_0x598c02[_0x1fe142]&&_0x539a87--;if(_0x539a87>0x0){_0x124ecf=_0x181855+0x7;continue;}let _0x36b1e7=-0x1;for(let _0x40ec93=_0x181855+0x7,_0x5b0a4c=0x1;_0x40ec93<_0x598c02['length'];_0x40ec93++)if('('===_0x598c02[_0x40ec93]?_0x5b0a4c++:')'===_0x598c02[_0x40ec93]&&_0x5b0a4c--,!_0x5b0a4c){_0x36b1e7=_0x40ec93;break;}-0x1!==_0x36b1e7?(_0x598c02=_0x598c02['slice'](0x0,_0x181855)+_0x598c02['slice'](_0x36b1e7+0x1),_0x124ecf=_0x181855):_0x124ecf=_0x181855+0x7;}return _0x598c02['replace'](/\s+/g,'\x20')['trim']();}(_0x5b1afb),_0x4838f9=_0x439a83?_0x28870c(_0x439a83)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x4e8bf2,'flatSelector':_0x5b1afb,'specificity':_0x4838f9};});})['sort']((_0xba6c2a,_0x449e67)=>_0x2dacb5(_0xba6c2a['specificity'],_0x449e67['specificity']));}(_0x4a8953['stylesProcessor'],_0x51d383);return{'parsedCssRules':_0x32c80d,'rootCssVariables':w(_0x32c80d)};}function S(_0x1a0e05,_0x26461a=''){return _0x1a0e05['flatMap'](_0x4948b0=>{const {selectorText:_0x3c8a0c,cssText:_0x51460c,cssRules:_0x2efa2d}=_0x4948b0;if(!_0x3c8a0c)return[];const _0x32ec24=_0x3c8a0c['replace'](/&/g,_0x26461a);let _0x2f5ab0=_0x51460c['replace'](_0x3c8a0c,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x2efa2d||!_0x2efa2d['length'])return[{'selectorText':_0x32ec24,'contentCssText':_0x2f5ab0}];for(const _0x4322fe of _0x2efa2d)_0x2f5ab0=_0x2f5ab0['replace'](_0x4322fe['cssText'],'')['trim']();return[{'selectorText':_0x32ec24,'contentCssText':_0x2f5ab0},...S(Array['from'](_0x2efa2d),_0x32ec24)];});}function L(_0x16930e,_0x353bcf){const _0x575de8=new _0x125274(_0x16930e);for(const _0x38031a of _0x353bcf){let _0x6be40a;if(_0x6be40a='string'==typeof _0x38031a?new _0x125274(_0x16930e)['setTo'](_0x38031a):_0x38031a,_0x6be40a){for(const [_0x4270aa,_0x25f36a]of _0x6be40a['getStylesEntries']())_0x575de8['set'](_0x4270aa,_0x25f36a);}}return _0x575de8;}var g=class extends _0x162aec{_stylesProcessor;constructor(_0x48d9f7){super(_0x48d9f7),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x423d80(this['_stylesProcessor']),_0x104240(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0xbde65a){const _0xd27598=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x38f2b6}=this['editor']['locale'],{rootName:_0x301611='main',dataControllerDowncastOptions:_0x7e23db={},transformations:_0x265df9=_0xd27598['transformations']||[]}=_0xbde65a||{};this['isBusy']=!0x0,this['refresh']();const _0x42fffe=this['_getRootDataHTMLFragment'](_0x301611,_0x7e23db),_0x595eea=_0x4655a5(_0x42fffe['ownerDocument'],'div',{'dir':_0x38f2b6,'class':'ck-content'},[_0x42fffe]);return this['_collectAndApplyStyles'](_0x265df9,_0x595eea)['then'](()=>{const _0x286089=function(_0x2a4154){const _0x4d96ef=_0x2a4154['ownerDocument']['createDocumentFragment']();for(;_0x2a4154['firstChild'];)_0x4d96ef['appendChild'](_0x2a4154['firstChild']);return _0x4d96ef;}(_0x595eea),_0xd54dc=_0x595eea['getAttribute']('style');if(_0xd54dc)for(const _0x512d05 of _0x286089['children']){const _0x2416c9=_0x512d05['getAttribute']('style'),_0x666ddc=L(this['_stylesProcessor'],[_0xd54dc,_0x2416c9]);_0x512d05['setAttribute']('style',x(_0x666ddc));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x286089);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x2f6674,_0x1602d2){const {data:_0x307cd9,model:_0x112d41}=this['editor'],_0x119891=_0x112d41['document']['getRoot'](_0x2f6674),_0xcefab0=_0x307cd9['toView'](_0x119891,_0x1602d2);return _0x307cd9['htmlProcessor']['domConverter']['viewToDom'](_0xcefab0);}async _collectAndApplyStyles(_0x3f9ece,_0x351093){const {stylesheets:_0x4d43f6,inlineCss:_0x3df709,stripCssClasses:_0x384519}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x5ef070,rootCssVariables:_0x8a6895}=await h({'stylesheets':_0x4d43f6||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x3df709}),_0x224417=[];this['_processElementTree']({'transformations':_0x3f9ece,'parsedCssRules':_0x5ef070,'element':_0x351093,'stripCssClasses':_0x384519,'parentCSSVariablesLookup':_0x8a6895['get']['bind'](_0x8a6895),'runAfterDocumentTransformation':_0x47c519=>{_0x224417['unshift'](_0x47c519);}});for(const _0x437b36 of _0x224417)_0x437b36();}_processElementTree({element:_0x2b0344,parsedCssRules:_0x156dd5,parentCSSVariablesLookup:_0x3d8224,runAfterDocumentTransformation:_0x5062d4,stripCssClasses:_0x5983a2,transformations:_0x380543}){const {stylesMap:_0x194232,localCSSVariables:_0x97e6b1}=function(_0x1d7357){const _0xe686c=_0x1d7357['element']['getAttribute']('style')||'',_0x4a8818=_0x1d7357['parsedCssRules']['filter'](_0x1a3ac2=>_0x1d7357['element']['matches'](_0x1a3ac2['flatSelector']))['map'](_0x4465ab=>_0x4465ab['stylesMap']),_0x50c9d6=L(_0x1d7357['stylesProcessor'],[..._0x4a8818,_0xe686c]);return{'localCSSVariables':p(_0x1d7357['fallbackCSSVariablesLookup'],_0x50c9d6),'stylesMap':_0x50c9d6};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x3d8224,'parsedCssRules':_0x156dd5,'element':_0x2b0344}),_0x2714e1=[];for(const _0xc2555b of _0x380543){const _0x34869f=_0xc2555b(_0x2b0344,_0x194232,{'runAfterDocumentTransformation':_0x5062d4,'runAfterChildrenTransformation':_0x553394=>{_0x2714e1['unshift'](_0x553394);}});_0x34869f&&_0x34869f instanceof HTMLElement&&(_0x2b0344=_0x34869f);}_0x194232['size']?_0x2b0344['setAttribute']('style',x(_0x194232)):_0x2b0344['removeAttribute']('style');const _0x2dca34=_0x324e4b=>_0x97e6b1['has'](_0x324e4b)?_0x97e6b1['get'](_0x324e4b):_0x3d8224(_0x324e4b);for(const _0x50d4d2 of _0x2b0344['children'])_0x50d4d2 instanceof HTMLElement&&this['_processElementTree']({'element':_0x50d4d2,'parsedCssRules':_0x156dd5,'stripCssClasses':_0x5983a2,'transformations':_0x380543,'parentCSSVariablesLookup':_0x2dca34,'runAfterDocumentTransformation':_0x5062d4});_0x5983a2&&_0x2b0344['removeAttribute']('class');for(const _0x56258a of _0x2714e1)_0x56258a();}};function x(_0x3028d2){return _0x3028d2['getStylesEntries']()['map'](_0x2887da=>_0x2887da['join'](':'))['join'](';')+';';}var C=class extends _0x1e96a3{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(_0x1b9ce8){const _0x153572='QiLRCSOsZ8pAvDdaPJUE3oxjKlzM2uXgrtGfeyh5cNFkmBw9I6WH0qnb4T17YV',_0x2fe0f2=0x793f8,_0x2fbbe7={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x45df43(_0x1a9c8a){const _0x4a34f5=new window['Promise'](_0x13c0ef=>{_0x1a9c8a['once']('ready',_0x13c0ef);}),_0x15485d=window['Date']['now'](),_0x44ad42=_0x1a9c8a['config']['get']('licenseKey');async function _0x5cfdd7(){let _0x29960e,_0x1caaa6=null,_0x9e796=null;try{return'GPL'==_0x44ad42?'NotAllowed':(_0x29960e=_0x4fcfff(),_0x29960e?(_0x29960e['usageEndpoint']&&(_0x9e796=_0x277937(_0x29960e['usageEndpoint'],_0x29960e['jti'])),await _0xe58efe()?_0x34b119()?_0x3f3b92()?'Expired':_0x1c6d48()?('evaluation'==_0x29960e['licenseType']&&(_0x1caaa6=_0x118487('EvaluationLimit')),await _0x36413c()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x3f3b92(){const _0x50ab7b=['evaluation','trial']['includes'](_0x29960e['licenseType'])?_0x15485d/0x3e8:0xe10*_0x2fe0f2;return _0x29960e['exp']<_0x50ab7b;}function _0x34b119(){const _0x35d63a=_0x29960e['features'];return!!_0x35d63a&&(!!_0x35d63a['includes']('*')||!!_0x35d63a['includes']('EIS'));}function _0x1c6d48(){const _0x256d21=_0x29960e['licensedHosts'];if(!_0x256d21||0x0==_0x256d21['length'])return!0x0;const {hostname:_0x52188d}=new URL(window['location']['href']);if(_0x256d21['includes'](_0x52188d))return!0x0;const _0x3b98f8=_0x52188d['split']('.');return _0x256d21['filter'](_0x2626ac=>_0x2626ac['includes']('*'))['map'](_0x161afa=>_0x161afa['split']('.'))['filter'](_0x31cfe2=>_0x31cfe2['length']<=_0x3b98f8['length'])['map'](_0x4a2cc4=>Array(_0x3b98f8['length']-_0x4a2cc4['length'])['fill']('*'===_0x4a2cc4[0x0]?'*':'')['concat'](_0x4a2cc4))['some'](_0x40dbe7=>_0x3b98f8['every']((_0x4f58be,_0x22afab)=>_0x40dbe7[_0x22afab]===_0x4f58be||'*'===_0x40dbe7[_0x22afab]));}function _0x36413c(){return _0x1caaa6&&_0x9e796?new window['Promise']((_0x49d544,_0x3b69a0)=>{_0x1caaa6['then'](_0x49d544,_0x3b69a0),_0x9e796['then'](_0x5838a2=>{'Valid'!=_0x5838a2&&_0x49d544(_0x5838a2);},_0x3b69a0);}):_0x1caaa6||_0x9e796||'Valid';}}function _0x277937(_0x5c28b1,_0x167222){return new window['Promise'](_0x390ad4=>{if(_0x177723())return _0x390ad4('Valid');_0x455daa(),_0x1a9c8a['decorate']('_sendUsageRequest');let _0x17f081=!0x1;const _0x490c3a=_0x2b270d();function _0x1f2f09(_0x11c07f){return!!_0x11c07f&&('object'==typeof _0x11c07f||'function'==typeof _0x11c07f)&&'function'==typeof _0x11c07f['then']&&'function'==typeof _0x11c07f['catch'];}function _0x54e62e(_0x393b4e){_0x42c274(_0x393b4e)['then'](_0x58e091=>_0x58e091&&'ok'==_0x58e091['status']?_0xd9c3b1(_0x3b2e9c(_0x490c3a+_0x167222))!=_0x58e091['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x28eb9b=>(_0x123fe6(),_0x28eb9b),()=>{const _0x4ef024=_0x473da0();return null==_0x4ef024?(_0x123fe6(),'Valid'):_0x15485d-_0x4ef024>0x240c8400?'UsageLimit':'Valid';})['then'](_0x390ad4)['catch'](()=>{_0x390ad4('UsageLimit');});const _0x276d00=0x36ee80;function _0x123fe6(){const _0x2f30ec='llct-'+_0xd9c3b1(_0x3b2e9c(_0x5c28b1)),_0x3e3a45=_0x416f64(_0xd9c3b1(window['Math']['ceil'](_0x15485d/_0x276d00)));window['localStorage']['setItem'](_0x2f30ec,_0x3e3a45);}function _0x473da0(){const _0x1d5bee='llct-'+_0xd9c3b1(_0x3b2e9c(_0x5c28b1)),_0x4be033=window['localStorage']['getItem'](_0x1d5bee);return _0x4be033?window['parseInt'](_0x416f64(_0x4be033),0x10)*_0x276d00:null;}function _0x42c274(_0x2af08b){return new window['Promise']((_0x3cb3df,_0x540cdc)=>{_0x2af08b['then'](_0x3cb3df,_0x540cdc),window['setTimeout'](_0x540cdc,0x1d4c0);});}}_0x1a9c8a['on']('_sendUsageRequest',(_0x46dd10,_0x14ecc1)=>{if(_0x14ecc1[0x0]!=_0x5c28b1)return _0x390ad4('UsageLimit');_0x14ecc1[0x1]={..._0x14ecc1[0x1],'requestId':_0x490c3a};},{'priority':'high'}),_0x1a9c8a['on']('_sendUsageRequest',_0x422e0e=>{_0x1f2f09(_0x422e0e['return'])&&(_0x17f081=!0x0,_0x54e62e(_0x422e0e['return']));},{'priority':'low'}),_0x4a34f5['then'](()=>{_0x17f081||_0x390ad4('UsageLimit');});});function _0x177723(){return'auto'==_0x1a9c8a['editing']['view']['_overlayModeHint'];}function _0x455daa(){_0x1a9c8a['editing']['view']['_overlayModeHint']='auto';}}function _0x118487(_0x33f8de){const _0x1a53fe=[new window['Promise'](_0x606b53=>setTimeout(_0x606b53,0x93ecc)),_0x4a34f5['then'](()=>new window['Promise'](_0x4c7fec=>{let _0x1d33d1=0x0;_0x1a9c8a['model']['on']('applyOperation',(_0x57133b,_0x3f045e)=>{_0x3f045e[0x0]['isDocumentOperation']&&_0x1d33d1++,0x5e8==_0x1d33d1&&(_0x4c7fec(),_0x57133b['off']());});}))];return window['Promise']['race'](_0x1a53fe)['then'](()=>_0x33f8de);}async function _0x1b8c2e(){await _0x4a34f5;const _0x14ac8e=_0x1a9c8a['commands']['get']('exportInlineStyles');_0x14ac8e&&_0x14ac8e['on']('execute',_0x2dcc8e=>{_0x2dcc8e['stop']();},{'priority':'highest'}),_0x1a9c8a['model']['change']=_0x55b140,_0x1a9c8a['model']['enqueueChange']=_0x55b140,_0x1a9c8a['enableReadOnlyMode']('model');}function _0x4b7421(_0x2a21cd){const _0x4bcb71=_0x4a73db();_0x1a9c8a[_0x4bcb71]='exportInlineStylesLicenseKey'+_0x2a21cd,'Valid'!=_0x2a21cd&&_0x1b8c2e();}function _0x4a73db(){const _0x563a4c=window['String'](window['performance']['now']())['replace']('.','');let _0x3ca5aa='Q';for(let _0x48a812=0x0;_0x48a812<_0x563a4c['length'];_0x48a812+=0x2){let _0x11582b=window['parseInt'](_0x563a4c['substring'](_0x48a812,_0x48a812+0x2));_0x11582b>=0x3e&&(_0x11582b-=0x3e),_0x3ca5aa+=_0x153572[_0x11582b];}return _0x3ca5aa;}function _0x4fcfff(){const _0x519174=_0x44ad42['split']('.');if(0x3!=_0x519174['length'])return null;return _0x47e158(_0x519174[0x1]);function _0x47e158(_0x5662e8){const _0x23dcc6=_0x1b516e(_0x5662e8);return _0x23dcc6&&_0x4ab8cc()?_0x23dcc6:null;function _0x4ab8cc(){const _0x13c901=_0x23dcc6['jti'],_0x446a73=window['parseInt'](_0x13c901['substring'](_0x13c901['length']-0x8),0x10),_0x1c48ed={..._0x23dcc6,'jti':_0x13c901['substring'](0x0,_0x13c901['length']-0x8)};return delete _0x1c48ed['vc'],_0x3b2e9c(_0x1c48ed)==_0x446a73;}}}async function _0xe58efe(){let _0xe158c0=!0x0;try{const [_0x3ba85e,_0x44d1c7,_0x58c13b]=_0x44ad42['split']('.');return _0x191f02(_0x3ba85e),await _0x369da2(_0x3ba85e,_0x44d1c7,_0x58c13b),_0xe158c0;}catch{return!0x1;}function _0x191f02(_0x2d4f95){const _0x5a41cd=_0x1b516e(_0x2d4f95);_0x5a41cd&&'ES256'==_0x5a41cd['alg']||(_0xe158c0=!0x1);}async function _0x369da2(_0x4e15fb,_0x245046,_0xef7c01){const _0x1741ca=window['Uint8Array']['from'](_0x13641c(_0xef7c01),_0x4bbdb2=>_0x4bbdb2['charCodeAt'](0x0)),_0x5f4edb=new window['TextEncoder']()['encode'](_0x4e15fb+'.'+_0x245046),_0x4b3131=window['crypto']['subtle'];if(!_0x4b3131)return;const _0x570513=await _0x4b3131['importKey']('jwk',_0x2fbbe7,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4b3131['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x570513,_0x1741ca,_0x5f4edb)||(_0xe158c0=!0x1);}}function _0x1b516e(_0x4f5f43){return _0x4f5f43['startsWith']('ey')?JSON['parse'](_0x13641c(_0x4f5f43)):null;}function _0x13641c(_0xe6ede2){return window['atob'](_0xe6ede2['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3b2e9c(_0x189349){let _0x2ab8d2=0x1505;function _0x51a5f6(_0x1c577a){for(let _0x1ee376=0x0;_0x1ee376<_0x1c577a['length'];_0x1ee376++){const _0x595dde=_0x1c577a['charCodeAt'](_0x1ee376);_0x2ab8d2=(_0x2ab8d2<<0x5)+_0x2ab8d2+_0x595dde,_0x2ab8d2&=_0x2ab8d2;}}function _0x2ee8b9(_0x68399e){Array['isArray'](_0x68399e)?_0x68399e['forEach'](_0x2ee8b9):_0x68399e&&'object'==typeof _0x68399e?Object['entries'](_0x68399e)['sort']()['forEach'](([_0x37a338,_0x76d708])=>{_0x51a5f6(_0x37a338),_0x2ee8b9(_0x76d708);}):_0x51a5f6(window['String'](_0x68399e));}return _0x2ee8b9(_0x189349),_0x2ab8d2>>>0x0;}function _0xd9c3b1(_0xde6e2c){return _0xde6e2c['toString'](0x10)['padStart'](0x8,'0');}function _0x416f64(_0x3a40da){return _0x3a40da['split']('')['reverse']()['join']('');}function _0x55b140(){}_0x4b7421(await _0x5cfdd7());}_0x45df43(_0x1b9ce8['editor']);}(this);}},I=class extends _0x1e96a3{['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'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x244918=[this['editor']];for(const _0x184e87 of _0x244918){let _0x442148;for(const _0x1106f1 in _0x184e87){const _0x8f112a=_0x1106f1,_0x6b9e45=_0x184e87[_0x8f112a];if('exportInlineStylesLicenseKeyValid'==_0x6b9e45||'exportInlineStylesLicenseKeyInvalid'==_0x6b9e45||'exportInlineStylesLicenseKeyExpired'==_0x6b9e45||'exportInlineStylesLicenseKeyDomainLimit'==_0x6b9e45||'exportInlineStylesLicenseKeyNotAllowed'==_0x6b9e45||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x6b9e45||'exportInlineStylesLicenseKeyUsageLimit'==_0x6b9e45){delete _0x184e87[_0x8f112a],_0x442148=_0x6b9e45,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x442148&&_0x184e87['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x442148&&_0x184e87['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x442148&&_0x184e87['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x442148&&_0x184e87['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x442148&&_0x184e87['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x442148&&_0x184e87['_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 _0x30ccec,Plugin as _0x5cb465}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x4efa62,createElement as _0x512d74,uid as _0x4bb466}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x26fc74,addMarginStylesRules as _0x409c98,addPaddingStylesRules as _0x3a1328}from'@ckeditor/ckeditor5-engine';import{calculate as _0x4a62f7,compare as _0x5c9a02}from'specificity';function f(_0x566bfe){const _0x912da0=[];let _0x444e3b='',_0x1df30e=0x0;for(;_0x1df30e<_0x566bfe['length'];){const _0x3a2172=_0x566bfe[_0x1df30e];if('('===_0x3a2172){const _0x5e24d7=y(_0x566bfe,_0x1df30e+0x1);if(-0x1===_0x5e24d7)return[];_0x444e3b+=_0x566bfe['slice'](_0x1df30e,_0x5e24d7+0x1),_0x1df30e=_0x5e24d7+0x1;}else','!==_0x3a2172||_0x444e3b['endsWith']('\x5c')?(_0x444e3b+=_0x3a2172,_0x1df30e++):(_0x912da0['push'](_0x444e3b['trim']()),_0x444e3b='',_0x1df30e++);}return _0x444e3b['trim']()&&_0x912da0['push'](_0x444e3b['trim']()),_0x912da0['filter'](Boolean);}function y(_0x8321d5,_0x192da9){let _0x3e429b=0x1;for(let _0x27ab02=_0x192da9;_0x27ab02<_0x8321d5['length'];_0x27ab02++){const _0xafeaa7=_0x8321d5[_0x27ab02];if('('===_0xafeaa7)_0x3e429b++;else{if(')'===_0xafeaa7&&(_0x3e429b--,0x0===_0x3e429b))return _0x27ab02;}}return-0x1;}function d(_0x9078a9){return _0x9078a9['replace'](/!\s*important/i,'')['trim']();}function w(_0xe909be){const _0xb40e9c=new Map();for(const {stylesMap:_0x502753,flatSelector:_0x3c7956}of _0xe909be){if(':root'!==_0x3c7956)continue;const _0xd25723=p(_0xb40e9c['get']['bind'](_0xb40e9c),_0x502753);for(const [_0x28c756,_0xbf86c4]of _0xd25723)_0xb40e9c['set'](_0x28c756,_0xbf86c4);}return _0xb40e9c;}function p(_0x343f4f,_0x195686){const _0xccbd51=new Map(),_0x173b29=_0x117af6=>_0xccbd51['has'](_0x117af6)?_0xccbd51['get'](_0x117af6):_0x343f4f(_0x117af6);for(const [_0x3f9176,_0x459a10]of _0x195686['getStylesEntries']())if(_0x459a10&&_0x3f9176['startsWith']('--')){const _0x4465af=m(_0x173b29,_0x459a10);_0xccbd51['set'](_0x3f9176,_0x4465af),_0x195686['remove'](_0x3f9176);}for(const [_0x389091,_0x5a52e8]of _0x195686['getStylesEntries']())if(_0x5a52e8){const _0x2c43e4=m(_0x173b29,_0x5a52e8);_0x195686['set'](_0x389091,_0x2c43e4);}return _0xccbd51;}function m(_0x71b1f5,_0xa39b19){return function(_0x98a2e3,_0x3b2482){let _0x3266d7='',_0x4dbdae=0x0;for(;_0x4dbdae<_0x98a2e3['length'];){const _0x3a4a5c=_0x98a2e3['indexOf']('var(',_0x4dbdae);if(-0x1===_0x3a4a5c){_0x3266d7+=_0x98a2e3['slice'](_0x4dbdae);break;}_0x3266d7+=_0x98a2e3['slice'](_0x4dbdae,_0x3a4a5c);const _0x2bf38b=_0x3a4a5c+0x4,_0x23f9ad=y(_0x98a2e3,_0x2bf38b);_0x3266d7+=_0x3b2482(_0x98a2e3['substring'](_0x2bf38b,_0x23f9ad)),_0x4dbdae=_0x23f9ad+0x1;}return _0x3266d7;}(_0xa39b19,_0x57f84b=>{const [_0x3023ba,_0x4ea9c3]=f(_0x57f84b),_0x153a95=_0x71b1f5(_0x3023ba);return void 0x0!==_0x153a95?_0x153a95:_0x4ea9c3?m(_0x71b1f5,_0x4ea9c3):'var('+_0x3023ba+')';});}async function h(_0x585076){const _0x20099a=[await _0x4efa62(_0x585076['stylesheets']),_0x585076['inlineCss']]['filter'](_0x3e21b5=>_0x3e21b5&&_0x3e21b5['length'])['join']('\x0a'),_0x555cbb=await async function(_0x16f38c,_0x437dd5){const _0xa7776f=new CSSStyleSheet();return await _0xa7776f['replace'](_0x437dd5),S(Array['from'](_0xa7776f['cssRules'])['filter'](_0x34895d=>_0x34895d instanceof CSSStyleRule))['flatMap'](({selectorText:_0x7a4323,contentCssText:_0x50bbd7})=>{const _0x2f5589=f(_0x7a4323),_0xbaaab0=new _0x26fc74(_0x16f38c)['setTo'](_0x50bbd7);return _0x2f5589['map'](_0x5912ce=>{const _0x1839f0=function(_0x55214c){const _0x2c73db=':where(';let _0x33f47f=_0x55214c,_0x301bb0=0x0;for(let _0x198e94=0x0;_0x198e94<0x64;_0x198e94++){const _0x13c840=_0x33f47f['indexOf'](_0x2c73db,_0x301bb0);if(-0x1===_0x13c840)break;let _0xc0459d=0x0;for(let _0x342af2=0x0;_0x342af2<_0x13c840;_0x342af2++)'('===_0x33f47f[_0x342af2]?_0xc0459d++:')'===_0x33f47f[_0x342af2]&&_0xc0459d--;if(_0xc0459d>0x0){_0x301bb0=_0x13c840+0x7;continue;}let _0x483551=-0x1;for(let _0x21d917=_0x13c840+0x7,_0x36b234=0x1;_0x21d917<_0x33f47f['length'];_0x21d917++)if('('===_0x33f47f[_0x21d917]?_0x36b234++:')'===_0x33f47f[_0x21d917]&&_0x36b234--,!_0x36b234){_0x483551=_0x21d917;break;}-0x1!==_0x483551?(_0x33f47f=_0x33f47f['slice'](0x0,_0x13c840)+_0x33f47f['slice'](_0x483551+0x1),_0x301bb0=_0x13c840):_0x301bb0=_0x13c840+0x7;}return _0x33f47f['replace'](/\s+/g,'\x20')['trim']();}(_0x5912ce),_0x29c4fc=_0x1839f0?_0x4a62f7(_0x1839f0)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0xbaaab0,'flatSelector':_0x5912ce,'specificity':_0x29c4fc};});})['sort']((_0x1afa4d,_0x1be3be)=>_0x5c9a02(_0x1afa4d['specificity'],_0x1be3be['specificity']));}(_0x585076['stylesProcessor'],_0x20099a);return{'parsedCssRules':_0x555cbb,'rootCssVariables':w(_0x555cbb)};}function S(_0x36bf4c,_0x90b193=''){return _0x36bf4c['flatMap'](_0x5df13=>{const {selectorText:_0x334340,cssText:_0x53a91b,cssRules:_0x18958f}=_0x5df13;if(!_0x334340)return[];const _0xafa49c=_0x334340['replace'](/&/g,_0x90b193);let _0x22eec5=_0x53a91b['replace'](_0x334340,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x18958f||!_0x18958f['length'])return[{'selectorText':_0xafa49c,'contentCssText':_0x22eec5}];for(const _0x53172c of _0x18958f)_0x22eec5=_0x22eec5['replace'](_0x53172c['cssText'],'')['trim']();return[{'selectorText':_0xafa49c,'contentCssText':_0x22eec5},...S(Array['from'](_0x18958f),_0xafa49c)];});}function L(_0x45223b,_0x52acb7){const _0x21c521=new _0x26fc74(_0x45223b);for(const _0x4b5b4e of _0x52acb7){let _0x353bf0;if(_0x353bf0='string'==typeof _0x4b5b4e?new _0x26fc74(_0x45223b)['setTo'](_0x4b5b4e):_0x4b5b4e,_0x353bf0){for(const [_0x562f55,_0x425ebf]of _0x353bf0['getStylesEntries']())_0x21c521['set'](_0x562f55,_0x425ebf);}}return _0x21c521;}var g=class extends _0x30ccec{_stylesProcessor;constructor(_0x333fbe){super(_0x333fbe),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x409c98(this['_stylesProcessor']),_0x3a1328(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x267987){const _0x4c03d2=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x16701d}=this['editor']['locale'],{rootName:_0x52ee78='main',dataControllerDowncastOptions:_0x19244f={},transformations:_0xc591a3=_0x4c03d2['transformations']||[]}=_0x267987||{};this['isBusy']=!0x0,this['refresh']();const _0xce567b=this['_getRootDataHTMLFragment'](_0x52ee78,_0x19244f),_0x43e0ae=_0x512d74(_0xce567b['ownerDocument'],'div',{'dir':_0x16701d,'class':'ck-content'},[_0xce567b]);return this['_collectAndApplyStyles'](_0xc591a3,_0x43e0ae)['then'](()=>{const _0x5c9a00=function(_0x428eee){const _0x2b7398=_0x428eee['ownerDocument']['createDocumentFragment']();for(;_0x428eee['firstChild'];)_0x2b7398['appendChild'](_0x428eee['firstChild']);return _0x2b7398;}(_0x43e0ae),_0x20ebe2=_0x43e0ae['getAttribute']('style');if(_0x20ebe2)for(const _0xe98775 of _0x5c9a00['children']){const _0x277bce=_0xe98775['getAttribute']('style'),_0x5ed1a3=L(this['_stylesProcessor'],[_0x20ebe2,_0x277bce]);_0xe98775['setAttribute']('style',x(_0x5ed1a3));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x5c9a00);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0xc3eb51,_0x1b87a0){const {data:_0x2f095e,model:_0x3f5ad7}=this['editor'],_0x13d2c3=_0x3f5ad7['document']['getRoot'](_0xc3eb51),_0x336d48=_0x2f095e['toView'](_0x13d2c3,_0x1b87a0);return _0x2f095e['htmlProcessor']['domConverter']['viewToDom'](_0x336d48);}async _collectAndApplyStyles(_0x4d505d,_0x389e6f){const {stylesheets:_0x1057c3,inlineCss:_0x5706ea,stripCssClasses:_0x4aec6c}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x107b56,rootCssVariables:_0x2c2543}=await h({'stylesheets':_0x1057c3||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x5706ea}),_0x1da267=[];this['_processElementTree']({'transformations':_0x4d505d,'parsedCssRules':_0x107b56,'element':_0x389e6f,'stripCssClasses':_0x4aec6c,'parentCSSVariablesLookup':_0x2c2543['get']['bind'](_0x2c2543),'runAfterDocumentTransformation':_0x5d2a8e=>{_0x1da267['unshift'](_0x5d2a8e);}});for(const _0x55d3a4 of _0x1da267)_0x55d3a4();}_processElementTree({element:_0x324f5a,parsedCssRules:_0x298917,parentCSSVariablesLookup:_0x2c2f19,runAfterDocumentTransformation:_0x5d3d52,stripCssClasses:_0x4bcd53,transformations:_0x47927f}){const {stylesMap:_0x2f3004,localCSSVariables:_0xa97a1e}=function(_0x1eb109){const _0x5b4814=_0x1eb109['element']['getAttribute']('style')||'',_0x3cea0e=_0x1eb109['parsedCssRules']['filter'](_0x41a9a7=>_0x1eb109['element']['matches'](_0x41a9a7['flatSelector']))['map'](_0x2d3df7=>_0x2d3df7['stylesMap']),_0x1ad11d=L(_0x1eb109['stylesProcessor'],[..._0x3cea0e,_0x5b4814]);return{'localCSSVariables':p(_0x1eb109['fallbackCSSVariablesLookup'],_0x1ad11d),'stylesMap':_0x1ad11d};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x2c2f19,'parsedCssRules':_0x298917,'element':_0x324f5a}),_0x549130=[];for(const _0x4eaa28 of _0x47927f){const _0x4d4dbe=_0x4eaa28(_0x324f5a,_0x2f3004,{'runAfterDocumentTransformation':_0x5d3d52,'runAfterChildrenTransformation':_0x2fa499=>{_0x549130['unshift'](_0x2fa499);}});_0x4d4dbe&&_0x4d4dbe instanceof HTMLElement&&(_0x324f5a=_0x4d4dbe);}_0x2f3004['size']?_0x324f5a['setAttribute']('style',x(_0x2f3004)):_0x324f5a['removeAttribute']('style');const _0x5826ec=_0x3a6cf1=>_0xa97a1e['has'](_0x3a6cf1)?_0xa97a1e['get'](_0x3a6cf1):_0x2c2f19(_0x3a6cf1);for(const _0x2d97ce of _0x324f5a['children'])_0x2d97ce instanceof HTMLElement&&this['_processElementTree']({'element':_0x2d97ce,'parsedCssRules':_0x298917,'stripCssClasses':_0x4bcd53,'transformations':_0x47927f,'parentCSSVariablesLookup':_0x5826ec,'runAfterDocumentTransformation':_0x5d3d52});_0x4bcd53&&_0x324f5a['removeAttribute']('class');for(const _0x1d2c8f of _0x549130)_0x1d2c8f();}};function x(_0x1391d7){return _0x1391d7['getStylesEntries']()['map'](_0x59e4e9=>_0x59e4e9['join'](':'))['join'](';')+';';}var C=class extends _0x5cb465{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(_0x2f4abc){const _0x10518b='QiLRCSOsZ8pAvDdaPJUE3oxjKlzM2uXgrtGfeyh5cNFkmBw9I6WH0qnb4T17YV',_0x58ce94=0x79428,_0x1f142f={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x432ff4(_0x4b5cfe){const _0x44f85d=new window['Promise'](_0x34117f=>{_0x4b5cfe['once']('ready',_0x34117f);}),_0x364c2f=window['Date']['now'](),_0x2f76f9=_0x4b5cfe['config']['get']('licenseKey');async function _0x99d4f9(){let _0x28a98a,_0x2ce2c5=null,_0x4b65f5=null;try{return'GPL'==_0x2f76f9?'NotAllowed':(_0x28a98a=_0x4be536(),_0x28a98a?(_0x28a98a['usageEndpoint']&&(_0x4b65f5=_0x2b0727(_0x28a98a['usageEndpoint'],_0x28a98a['jti'])),await _0x1a1679()?_0x1089d2()?_0xd75957()?'Expired':_0x4bac2c()?('evaluation'==_0x28a98a['licenseType']&&(_0x2ce2c5=_0x305981('EvaluationLimit')),await _0x55d336()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0xd75957(){const _0x1ff4a4=['evaluation','trial']['includes'](_0x28a98a['licenseType'])?_0x364c2f/0x3e8:0xe10*_0x58ce94;return _0x28a98a['exp']<_0x1ff4a4;}function _0x1089d2(){const _0x373ba1=_0x28a98a['features'];return!!_0x373ba1&&(!!_0x373ba1['includes']('*')||!!_0x373ba1['includes']('EIS'));}function _0x4bac2c(){const _0x5e6d19=_0x28a98a['licensedHosts'];if(!_0x5e6d19||0x0==_0x5e6d19['length'])return!0x0;const {hostname:_0x2bff74}=new URL(window['location']['href']);if(_0x5e6d19['includes'](_0x2bff74))return!0x0;const _0x5c46af=_0x2bff74['split']('.');return _0x5e6d19['filter'](_0x2105ce=>_0x2105ce['includes']('*'))['map'](_0x26ee00=>_0x26ee00['split']('.'))['filter'](_0x520a31=>_0x520a31['length']<=_0x5c46af['length'])['map'](_0x58c403=>Array(_0x5c46af['length']-_0x58c403['length'])['fill']('*'===_0x58c403[0x0]?'*':'')['concat'](_0x58c403))['some'](_0x6b546f=>_0x5c46af['every']((_0x1a89f4,_0x35249f)=>_0x6b546f[_0x35249f]===_0x1a89f4||'*'===_0x6b546f[_0x35249f]));}function _0x55d336(){return _0x2ce2c5&&_0x4b65f5?new window['Promise']((_0x22a035,_0x530fa7)=>{_0x2ce2c5['then'](_0x22a035,_0x530fa7),_0x4b65f5['then'](_0x18e377=>{'Valid'!=_0x18e377&&_0x22a035(_0x18e377);},_0x530fa7);}):_0x2ce2c5||_0x4b65f5||'Valid';}}function _0x2b0727(_0x2bb5f9,_0x44d8c6){return new window['Promise'](_0x39c138=>{if(_0xa8af45())return _0x39c138('Valid');_0x3db32a(),_0x4b5cfe['decorate']('_sendUsageRequest');let _0x104ac9=!0x1;const _0x4e395b=_0x4bb466();function _0x183c8c(_0x1c7b13){return!!_0x1c7b13&&('object'==typeof _0x1c7b13||'function'==typeof _0x1c7b13)&&'function'==typeof _0x1c7b13['then']&&'function'==typeof _0x1c7b13['catch'];}function _0x66b3c4(_0x53cffb){_0x109c7c(_0x53cffb)['then'](_0x279862=>_0x279862&&'ok'==_0x279862['status']?_0x3d43e4(_0x48e856(_0x4e395b+_0x44d8c6))!=_0x279862['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x58c14c=>(_0x31c40a(),_0x58c14c),()=>{const _0x25ddf3=_0x1c5327();return null==_0x25ddf3?(_0x31c40a(),'Valid'):_0x364c2f-_0x25ddf3>0x240c8400?'UsageLimit':'Valid';})['then'](_0x39c138)['catch'](()=>{_0x39c138('UsageLimit');});const _0x1938c4=0x36ee80;function _0x31c40a(){const _0xaaac0d='llct-'+_0x3d43e4(_0x48e856(_0x2bb5f9)),_0x3a9509=_0x13cbeb(_0x3d43e4(window['Math']['ceil'](_0x364c2f/_0x1938c4)));window['localStorage']['setItem'](_0xaaac0d,_0x3a9509);}function _0x1c5327(){const _0x2a1f4d='llct-'+_0x3d43e4(_0x48e856(_0x2bb5f9)),_0x143676=window['localStorage']['getItem'](_0x2a1f4d);return _0x143676?window['parseInt'](_0x13cbeb(_0x143676),0x10)*_0x1938c4:null;}function _0x109c7c(_0x16359d){return new window['Promise']((_0x51dcc4,_0x84318a)=>{_0x16359d['then'](_0x51dcc4,_0x84318a),window['setTimeout'](_0x84318a,0x1d4c0);});}}_0x4b5cfe['on']('_sendUsageRequest',(_0x175f3c,_0x11ea36)=>{if(_0x11ea36[0x0]!=_0x2bb5f9)return _0x39c138('UsageLimit');_0x11ea36[0x1]={..._0x11ea36[0x1],'requestId':_0x4e395b};},{'priority':'high'}),_0x4b5cfe['on']('_sendUsageRequest',_0x45867a=>{_0x183c8c(_0x45867a['return'])&&(_0x104ac9=!0x0,_0x66b3c4(_0x45867a['return']));},{'priority':'low'}),_0x44f85d['then'](()=>{_0x104ac9||_0x39c138('UsageLimit');});});function _0xa8af45(){return'auto'==_0x4b5cfe['editing']['view']['_overlayModeHint'];}function _0x3db32a(){_0x4b5cfe['editing']['view']['_overlayModeHint']='auto';}}function _0x305981(_0x2a0e72){const _0x704d7b=[new window['Promise'](_0x1dccf2=>setTimeout(_0x1dccf2,0x93ecc)),_0x44f85d['then'](()=>new window['Promise'](_0x57ef41=>{let _0x487c02=0x0;_0x4b5cfe['model']['on']('applyOperation',(_0x46282b,_0xa8375b)=>{_0xa8375b[0x0]['isDocumentOperation']&&_0x487c02++,0x5e8==_0x487c02&&(_0x57ef41(),_0x46282b['off']());});}))];return window['Promise']['race'](_0x704d7b)['then'](()=>_0x2a0e72);}async function _0x59986a(){await _0x44f85d;const _0x4e67f3=_0x4b5cfe['commands']['get']('exportInlineStyles');_0x4e67f3&&_0x4e67f3['on']('execute',_0x3ffe16=>{_0x3ffe16['stop']();},{'priority':'highest'}),_0x4b5cfe['model']['change']=_0x1ea779,_0x4b5cfe['model']['enqueueChange']=_0x1ea779,_0x4b5cfe['enableReadOnlyMode']('model');}function _0x43ab55(_0x16a9c1){const _0x59ae1f=_0x5e4cb5();_0x4b5cfe[_0x59ae1f]='exportInlineStylesLicenseKey'+_0x16a9c1,'Valid'!=_0x16a9c1&&_0x59986a();}function _0x5e4cb5(){const _0x281412=window['String'](window['performance']['now']())['replace']('.','');let _0x25178b='Q';for(let _0x2ca1d8=0x0;_0x2ca1d8<_0x281412['length'];_0x2ca1d8+=0x2){let _0x53de0f=window['parseInt'](_0x281412['substring'](_0x2ca1d8,_0x2ca1d8+0x2));_0x53de0f>=0x3e&&(_0x53de0f-=0x3e),_0x25178b+=_0x10518b[_0x53de0f];}return _0x25178b;}function _0x4be536(){const _0x136db7=_0x2f76f9['split']('.');if(0x3!=_0x136db7['length'])return null;return _0x6635b6(_0x136db7[0x1]);function _0x6635b6(_0x2458ed){const _0x3c0c1e=_0x43c270(_0x2458ed);return _0x3c0c1e&&_0x2d19c4()?_0x3c0c1e:null;function _0x2d19c4(){const _0x3f18f1=_0x3c0c1e['jti'],_0x5d6d76=window['parseInt'](_0x3f18f1['substring'](_0x3f18f1['length']-0x8),0x10),_0x2cc8ce={..._0x3c0c1e,'jti':_0x3f18f1['substring'](0x0,_0x3f18f1['length']-0x8)};return delete _0x2cc8ce['vc'],_0x48e856(_0x2cc8ce)==_0x5d6d76;}}}async function _0x1a1679(){let _0x4bb267=!0x0;try{const [_0x2d6b79,_0x1a4b31,_0x539d33]=_0x2f76f9['split']('.');return _0x17ebb2(_0x2d6b79),await _0x15e24f(_0x2d6b79,_0x1a4b31,_0x539d33),_0x4bb267;}catch{return!0x1;}function _0x17ebb2(_0x5a1a51){const _0x4eb1c2=_0x43c270(_0x5a1a51);_0x4eb1c2&&'ES256'==_0x4eb1c2['alg']||(_0x4bb267=!0x1);}async function _0x15e24f(_0x2e98c4,_0x2e6282,_0x120bd8){const _0x509eee=window['Uint8Array']['from'](_0x2ada6c(_0x120bd8),_0x162d71=>_0x162d71['charCodeAt'](0x0)),_0x1054a1=new window['TextEncoder']()['encode'](_0x2e98c4+'.'+_0x2e6282),_0x591f06=window['crypto']['subtle'];if(!_0x591f06)return;const _0x591143=await _0x591f06['importKey']('jwk',_0x1f142f,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x591f06['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x591143,_0x509eee,_0x1054a1)||(_0x4bb267=!0x1);}}function _0x43c270(_0x561e86){return _0x561e86['startsWith']('ey')?JSON['parse'](_0x2ada6c(_0x561e86)):null;}function _0x2ada6c(_0xb6674){return window['atob'](_0xb6674['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x48e856(_0x5ce801){let _0x2a27b5=0x1505;function _0x2962b2(_0x160c95){for(let _0x252d17=0x0;_0x252d17<_0x160c95['length'];_0x252d17++){const _0x3378db=_0x160c95['charCodeAt'](_0x252d17);_0x2a27b5=(_0x2a27b5<<0x5)+_0x2a27b5+_0x3378db,_0x2a27b5&=_0x2a27b5;}}function _0x13a95d(_0x33f820){Array['isArray'](_0x33f820)?_0x33f820['forEach'](_0x13a95d):_0x33f820&&'object'==typeof _0x33f820?Object['entries'](_0x33f820)['sort']()['forEach'](([_0x40d2d8,_0x1248cf])=>{_0x2962b2(_0x40d2d8),_0x13a95d(_0x1248cf);}):_0x2962b2(window['String'](_0x33f820));}return _0x13a95d(_0x5ce801),_0x2a27b5>>>0x0;}function _0x3d43e4(_0x5c6378){return _0x5c6378['toString'](0x10)['padStart'](0x8,'0');}function _0x13cbeb(_0x368a92){return _0x368a92['split']('')['reverse']()['join']('');}function _0x1ea779(){}_0x43ab55(await _0x99d4f9());}_0x432ff4(_0x2f4abc['editor']);}(this);}},I=class extends _0x5cb465{['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'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x414cf2=[this['editor']];for(const _0x1b4649 of _0x414cf2){let _0x1cf015;for(const _0x5227ab in _0x1b4649){const _0x5a5f36=_0x5227ab,_0x2b1995=_0x1b4649[_0x5a5f36];if('exportInlineStylesLicenseKeyValid'==_0x2b1995||'exportInlineStylesLicenseKeyInvalid'==_0x2b1995||'exportInlineStylesLicenseKeyExpired'==_0x2b1995||'exportInlineStylesLicenseKeyDomainLimit'==_0x2b1995||'exportInlineStylesLicenseKeyNotAllowed'==_0x2b1995||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x2b1995||'exportInlineStylesLicenseKeyUsageLimit'==_0x2b1995){delete _0x1b4649[_0x5a5f36],_0x1cf015=_0x2b1995,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x1cf015&&_0x1b4649['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x1cf015&&_0x1b4649['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x1cf015&&_0x1b4649['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x1cf015&&_0x1b4649['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x1cf015&&_0x1b4649['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x1cf015&&_0x1b4649['_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.5.0-alpha.
|
|
3
|
+
"version": "48.5.0-alpha.4",
|
|
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.5.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-core": "48.5.0-alpha.4",
|
|
38
|
+
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.4",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.4",
|
|
40
40
|
"specificity": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|