@ckeditor/ckeditor5-export-inline-styles 48.4.0-alpha.1 → 48.4.0-alpha.3
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 _0x105db4,Plugin as _0x57fc27}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x5e3616,createElement as _0x2815ca,uid as _0x5d2155}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x57ba7b,addMarginStylesRules as _0x523e4b,addPaddingStylesRules as _0x232b1f}from'@ckeditor/ckeditor5-engine';import{calculate as _0x128971,compare as _0x4144f5}from'specificity';function f(_0x5d8321){const _0x39da1e=[];let _0x15ecbf='',_0x4b7aa1=0x0;for(;_0x4b7aa1<_0x5d8321['length'];){const _0x2d18f9=_0x5d8321[_0x4b7aa1];if('('===_0x2d18f9){const _0x262631=y(_0x5d8321,_0x4b7aa1+0x1);if(-0x1===_0x262631)return[];_0x15ecbf+=_0x5d8321['slice'](_0x4b7aa1,_0x262631+0x1),_0x4b7aa1=_0x262631+0x1;}else','!==_0x2d18f9||_0x15ecbf['endsWith']('\x5c')?(_0x15ecbf+=_0x2d18f9,_0x4b7aa1++):(_0x39da1e['push'](_0x15ecbf['trim']()),_0x15ecbf='',_0x4b7aa1++);}return _0x15ecbf['trim']()&&_0x39da1e['push'](_0x15ecbf['trim']()),_0x39da1e['filter'](Boolean);}function y(_0x3b24f8,_0x31b487){let _0xb265ff=0x1;for(let _0x148f68=_0x31b487;_0x148f68<_0x3b24f8['length'];_0x148f68++){const _0x24c10f=_0x3b24f8[_0x148f68];if('('===_0x24c10f)_0xb265ff++;else{if(')'===_0x24c10f&&(_0xb265ff--,0x0===_0xb265ff))return _0x148f68;}}return-0x1;}function d(_0x23c83f){return _0x23c83f['replace'](/!\s*important/i,'')['trim']();}function w(_0x2aac89){const _0x22dba2=new Map();for(const {stylesMap:_0x187311,flatSelector:_0x5102c9}of _0x2aac89){if(':root'!==_0x5102c9)continue;const _0x1c8b8d=p(_0x22dba2['get']['bind'](_0x22dba2),_0x187311);for(const [_0x1cc500,_0x352701]of _0x1c8b8d)_0x22dba2['set'](_0x1cc500,_0x352701);}return _0x22dba2;}function p(_0x420b91,_0x5a1ac0){const _0x12578f=new Map(),_0x3adacf=_0x301ac1=>_0x12578f['has'](_0x301ac1)?_0x12578f['get'](_0x301ac1):_0x420b91(_0x301ac1);for(const [_0x565249,_0x2e431c]of _0x5a1ac0['getStylesEntries']())if(_0x2e431c&&_0x565249['startsWith']('--')){const _0x279828=m(_0x3adacf,_0x2e431c);_0x12578f['set'](_0x565249,_0x279828),_0x5a1ac0['remove'](_0x565249);}for(const [_0x17c58a,_0x22925f]of _0x5a1ac0['getStylesEntries']())if(_0x22925f){const _0x322c8e=m(_0x3adacf,_0x22925f);_0x5a1ac0['set'](_0x17c58a,_0x322c8e);}return _0x12578f;}function m(_0x9d0bc0,_0x58a489){return function(_0x11a795,_0x116ad7){let _0x413101='',_0x4833e6=0x0;for(;_0x4833e6<_0x11a795['length'];){const _0x3411fb=_0x11a795['indexOf']('var(',_0x4833e6);if(-0x1===_0x3411fb){_0x413101+=_0x11a795['slice'](_0x4833e6);break;}_0x413101+=_0x11a795['slice'](_0x4833e6,_0x3411fb);const _0x4053a9=_0x3411fb+0x4,_0x4c6d28=y(_0x11a795,_0x4053a9);_0x413101+=_0x116ad7(_0x11a795['substring'](_0x4053a9,_0x4c6d28)),_0x4833e6=_0x4c6d28+0x1;}return _0x413101;}(_0x58a489,_0x5ca719=>{const [_0x5a0aaf,_0x7c81d]=f(_0x5ca719),_0x38f413=_0x9d0bc0(_0x5a0aaf);return void 0x0!==_0x38f413?_0x38f413:_0x7c81d?m(_0x9d0bc0,_0x7c81d):'var('+_0x5a0aaf+')';});}async function h(_0x4a0751){const _0x3762e3=[await _0x5e3616(_0x4a0751['stylesheets']),_0x4a0751['inlineCss']]['filter'](_0x379d0f=>_0x379d0f&&_0x379d0f['length'])['join']('\x0a'),_0x11ab2b=await async function(_0x4ed6af,_0x4be2d6){const _0x340768=new CSSStyleSheet();return await _0x340768['replace'](_0x4be2d6),S(Array['from'](_0x340768['cssRules'])['filter'](_0x53661f=>_0x53661f instanceof CSSStyleRule))['flatMap'](({selectorText:_0x11f821,contentCssText:_0x90e9b6})=>{const _0x5b602f=f(_0x11f821),_0x4a630a=new _0x57ba7b(_0x4ed6af)['setTo'](_0x90e9b6);return _0x5b602f['map'](_0x1fc0ec=>{const _0x2b76eb=function(_0x169c44){const _0x2ba93a=':where(';let _0x39db42=_0x169c44,_0x29fc3e=0x0;for(let _0x5c4f53=0x0;_0x5c4f53<0x64;_0x5c4f53++){const _0x248849=_0x39db42['indexOf'](_0x2ba93a,_0x29fc3e);if(-0x1===_0x248849)break;let _0x1402c3=0x0;for(let _0x3143ae=0x0;_0x3143ae<_0x248849;_0x3143ae++)'('===_0x39db42[_0x3143ae]?_0x1402c3++:')'===_0x39db42[_0x3143ae]&&_0x1402c3--;if(_0x1402c3>0x0){_0x29fc3e=_0x248849+0x7;continue;}let _0x31d6f7=-0x1;for(let _0x1db471=_0x248849+0x7,_0x5c239b=0x1;_0x1db471<_0x39db42['length'];_0x1db471++)if('('===_0x39db42[_0x1db471]?_0x5c239b++:')'===_0x39db42[_0x1db471]&&_0x5c239b--,!_0x5c239b){_0x31d6f7=_0x1db471;break;}-0x1!==_0x31d6f7?(_0x39db42=_0x39db42['slice'](0x0,_0x248849)+_0x39db42['slice'](_0x31d6f7+0x1),_0x29fc3e=_0x248849):_0x29fc3e=_0x248849+0x7;}return _0x39db42['replace'](/\s+/g,'\x20')['trim']();}(_0x1fc0ec),_0x153a41=_0x2b76eb?_0x128971(_0x2b76eb)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x4a630a,'flatSelector':_0x1fc0ec,'specificity':_0x153a41};});})['sort']((_0x1bbddf,_0x49bea9)=>_0x4144f5(_0x1bbddf['specificity'],_0x49bea9['specificity']));}(_0x4a0751['stylesProcessor'],_0x3762e3);return{'parsedCssRules':_0x11ab2b,'rootCssVariables':w(_0x11ab2b)};}function S(_0x3b9525,_0x2e2253=''){return _0x3b9525['flatMap'](_0x581441=>{const {selectorText:_0x17890e,cssText:_0x31a993,cssRules:_0x308185}=_0x581441;if(!_0x17890e)return[];const _0x3cf8c1=_0x17890e['replace'](/&/g,_0x2e2253);let _0x1d295b=_0x31a993['replace'](_0x17890e,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x308185||!_0x308185['length'])return[{'selectorText':_0x3cf8c1,'contentCssText':_0x1d295b}];for(const _0x1a4d83 of _0x308185)_0x1d295b=_0x1d295b['replace'](_0x1a4d83['cssText'],'')['trim']();return[{'selectorText':_0x3cf8c1,'contentCssText':_0x1d295b},...S(Array['from'](_0x308185),_0x3cf8c1)];});}function L(_0x30f177,_0x368feb){const _0x38ea8a=new _0x57ba7b(_0x30f177);for(const _0x2272e0 of _0x368feb){let _0x3487e3;if(_0x3487e3='string'==typeof _0x2272e0?new _0x57ba7b(_0x30f177)['setTo'](_0x2272e0):_0x2272e0,_0x3487e3){for(const [_0x534362,_0x28b079]of _0x3487e3['getStylesEntries']())_0x38ea8a['set'](_0x534362,_0x28b079);}}return _0x38ea8a;}var g=class extends _0x105db4{_stylesProcessor;constructor(_0x36f312){super(_0x36f312),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x523e4b(this['_stylesProcessor']),_0x232b1f(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x1b9f93){const _0x1feb26=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x549a7f}=this['editor']['locale'],{rootName:_0x13d02f='main',dataControllerDowncastOptions:_0x384348={},transformations:_0x378f9b=_0x1feb26['transformations']||[]}=_0x1b9f93||{};this['isBusy']=!0x0,this['refresh']();const _0x37f7cd=this['_getRootDataHTMLFragment'](_0x13d02f,_0x384348),_0x4bfbd4=_0x2815ca(_0x37f7cd['ownerDocument'],'div',{'dir':_0x549a7f,'class':'ck-content'},[_0x37f7cd]);return this['_collectAndApplyStyles'](_0x378f9b,_0x4bfbd4)['then'](()=>{const _0x2f3249=function(_0x2cec76){const _0x1d3d1e=_0x2cec76['ownerDocument']['createDocumentFragment']();for(;_0x2cec76['firstChild'];)_0x1d3d1e['appendChild'](_0x2cec76['firstChild']);return _0x1d3d1e;}(_0x4bfbd4),_0x1e3806=_0x4bfbd4['getAttribute']('style');if(_0x1e3806)for(const _0x247fbc of _0x2f3249['children']){const _0x184cdd=_0x247fbc['getAttribute']('style'),_0x50c8eb=L(this['_stylesProcessor'],[_0x1e3806,_0x184cdd]);_0x247fbc['setAttribute']('style',x(_0x50c8eb));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x2f3249);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x47dce2,_0x274aeb){const {data:_0x4411e9,model:_0x426c09}=this['editor'],_0x35d3e6=_0x426c09['document']['getRoot'](_0x47dce2),_0x421479=_0x4411e9['toView'](_0x35d3e6,_0x274aeb);return _0x4411e9['htmlProcessor']['domConverter']['viewToDom'](_0x421479);}async _collectAndApplyStyles(_0x55260c,_0x1d3015){const {stylesheets:_0x330cb9,inlineCss:_0xaf4a66,stripCssClasses:_0x5346c6}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x1f338b,rootCssVariables:_0x624d72}=await h({'stylesheets':_0x330cb9||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0xaf4a66}),_0xa3558e=[];this['_processElementTree']({'transformations':_0x55260c,'parsedCssRules':_0x1f338b,'element':_0x1d3015,'stripCssClasses':_0x5346c6,'parentCSSVariablesLookup':_0x624d72['get']['bind'](_0x624d72),'runAfterDocumentTransformation':_0x576fe1=>{_0xa3558e['unshift'](_0x576fe1);}});for(const _0x49661b of _0xa3558e)_0x49661b();}_processElementTree({element:_0x50d447,parsedCssRules:_0x4fa8a7,parentCSSVariablesLookup:_0xa13fe,runAfterDocumentTransformation:_0x30b961,stripCssClasses:_0x45a362,transformations:_0x12cdde}){const {stylesMap:_0x3bc282,localCSSVariables:_0x40c213}=function(_0x1c9257){const _0x5420fc=_0x1c9257['element']['getAttribute']('style')||'',_0x5e55ec=_0x1c9257['parsedCssRules']['filter'](_0x347d9b=>_0x1c9257['element']['matches'](_0x347d9b['flatSelector']))['map'](_0x3d256b=>_0x3d256b['stylesMap']),_0x442bf5=L(_0x1c9257['stylesProcessor'],[..._0x5e55ec,_0x5420fc]);return{'localCSSVariables':p(_0x1c9257['fallbackCSSVariablesLookup'],_0x442bf5),'stylesMap':_0x442bf5};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0xa13fe,'parsedCssRules':_0x4fa8a7,'element':_0x50d447}),_0x34fd43=[];for(const _0x338d7c of _0x12cdde){const _0x3e84ee=_0x338d7c(_0x50d447,_0x3bc282,{'runAfterDocumentTransformation':_0x30b961,'runAfterChildrenTransformation':_0x51cd92=>{_0x34fd43['unshift'](_0x51cd92);}});_0x3e84ee&&_0x3e84ee instanceof HTMLElement&&(_0x50d447=_0x3e84ee);}_0x3bc282['size']?_0x50d447['setAttribute']('style',x(_0x3bc282)):_0x50d447['removeAttribute']('style');const _0x28c4d7=_0x7be454=>_0x40c213['has'](_0x7be454)?_0x40c213['get'](_0x7be454):_0xa13fe(_0x7be454);for(const _0x38e0fd of _0x50d447['children'])_0x38e0fd instanceof HTMLElement&&this['_processElementTree']({'element':_0x38e0fd,'parsedCssRules':_0x4fa8a7,'stripCssClasses':_0x45a362,'transformations':_0x12cdde,'parentCSSVariablesLookup':_0x28c4d7,'runAfterDocumentTransformation':_0x30b961});_0x45a362&&_0x50d447['removeAttribute']('class');for(const _0x2b49ac of _0x34fd43)_0x2b49ac();}};function x(_0xe82948){return _0xe82948['getStylesEntries']()['map'](_0x4713ab=>_0x4713ab['join'](':'))['join'](';')+';';}var C=class extends _0x57fc27{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(_0x5518bf){const _0x1d893f='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x2fa502=0x79140,_0x3172a5=window['Date']['now'](),_0xec9179=_0x5518bf['editor'],_0x3458bd=new window['Promise'](_0x9d04f8=>{_0xec9179['once']('ready',_0x9d04f8);}),_0x104e15={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x3ca0e9=_0xec9179['config']['get']('licenseKey');async function _0x36c673(){let _0x1fd516,_0x4691ea=null,_0x369d1a=null;try{return'GPL'==_0x3ca0e9?'NotAllowed':(_0x1fd516=_0x221436(),_0x1fd516?(_0x1fd516['usageEndpoint']&&(_0x369d1a=_0x233879(_0x1fd516['usageEndpoint'],_0x1fd516['jti'])),await _0x28e3a8()?_0x300038()?_0x474cd0()?'Expired':_0x3fedee()?('evaluation'==_0x1fd516['licenseType']&&(_0x4691ea=_0x1d6821('EvaluationLimit')),await _0x485fce()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x474cd0(){const _0x5616a3=['evaluation','trial']['includes'](_0x1fd516['licenseType'])?_0x3172a5/0x3e8:0xe10*_0x2fa502;return _0x1fd516['exp']<_0x5616a3;}function _0x300038(){const _0x28ae83=_0x1fd516['features'];return!!_0x28ae83&&(!!_0x28ae83['includes']('*')||!!_0x28ae83['includes']('EIS'));}function _0x3fedee(){const _0x1fd3c6=_0x1fd516['licensedHosts'];if(!_0x1fd3c6||0x0==_0x1fd3c6['length'])return!0x0;const {hostname:_0x239ce5}=new URL(window['location']['href']);if(_0x1fd3c6['includes'](_0x239ce5))return!0x0;const _0x485fa5=_0x239ce5['split']('.');return _0x1fd3c6['filter'](_0x5375b1=>_0x5375b1['includes']('*'))['map'](_0x4cf967=>_0x4cf967['split']('.'))['filter'](_0x31962b=>_0x31962b['length']<=_0x485fa5['length'])['map'](_0x3ac8d0=>Array(_0x485fa5['length']-_0x3ac8d0['length'])['fill']('*'===_0x3ac8d0[0x0]?'*':'')['concat'](_0x3ac8d0))['some'](_0x4f5c12=>_0x485fa5['every']((_0x5d9234,_0x4efce7)=>_0x4f5c12[_0x4efce7]===_0x5d9234||'*'===_0x4f5c12[_0x4efce7]));}function _0x485fce(){return _0x4691ea&&_0x369d1a?new window['Promise']((_0x78e7c4,_0x5dc9ae)=>{_0x4691ea['then'](_0x78e7c4,_0x5dc9ae),_0x369d1a['then'](_0xb96d31=>{'Valid'!=_0xb96d31&&_0x78e7c4(_0xb96d31);},_0x5dc9ae);}):_0x4691ea||_0x369d1a||'Valid';}}function _0x233879(_0x402c70,_0x3e0ead){return new window['Promise'](_0x73596f=>{if(_0x3a472a())return _0x73596f('Valid');_0x3c2e61(),_0xec9179['decorate']('_sendUsageRequest');let _0x4123f0=!0x1;const _0x1ddb5f=_0x5d2155();function _0x23504a(_0x37ae5d){return!!_0x37ae5d&&('object'==typeof _0x37ae5d||'function'==typeof _0x37ae5d)&&'function'==typeof _0x37ae5d['then']&&'function'==typeof _0x37ae5d['catch'];}function _0x2cde3a(_0x14a0ce){_0x4f8b10(_0x14a0ce)['then'](_0x39ade8=>_0x39ade8&&'ok'==_0x39ade8['status']?_0xacb626(_0x172eb4(_0x1ddb5f+_0x3e0ead))!=_0x39ade8['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5e5602=>(_0x397bce(),_0x5e5602),()=>{const _0x43dc7c=_0x35c66e();return null==_0x43dc7c?(_0x397bce(),'Valid'):_0x3172a5-_0x43dc7c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x73596f)['catch'](()=>{_0x73596f('UsageLimit');});const _0x29f74b=0x36ee80;function _0x397bce(){const _0x346833='llct-'+_0xacb626(_0x172eb4(_0x402c70)),_0x53380a=_0x400e93(_0xacb626(window['Math']['ceil'](_0x3172a5/_0x29f74b)));window['localStorage']['setItem'](_0x346833,_0x53380a);}function _0x35c66e(){const _0xb09acf='llct-'+_0xacb626(_0x172eb4(_0x402c70)),_0x37b57a=window['localStorage']['getItem'](_0xb09acf);return _0x37b57a?window['parseInt'](_0x400e93(_0x37b57a),0x10)*_0x29f74b:null;}function _0x4f8b10(_0x1a2a06){return new window['Promise']((_0x579161,_0x334853)=>{_0x1a2a06['then'](_0x579161,_0x334853),window['setTimeout'](_0x334853,0x1d4c0);});}}_0xec9179['on']('_sendUsageRequest',(_0x1a0022,_0x1badc9)=>{if(_0x1badc9[0x0]!=_0x402c70)return _0x73596f('UsageLimit');_0x1badc9[0x1]={..._0x1badc9[0x1],'requestId':_0x1ddb5f};},{'priority':'high'}),_0xec9179['on']('_sendUsageRequest',_0x34caa1=>{_0x23504a(_0x34caa1['return'])&&(_0x4123f0=!0x0,_0x2cde3a(_0x34caa1['return']));},{'priority':'low'}),_0x3458bd['then'](()=>{_0x4123f0||_0x73596f('UsageLimit');});});function _0x3a472a(){return'auto'==_0xec9179['editing']['view']['_overlayModeHint'];}function _0x3c2e61(){_0xec9179['editing']['view']['_overlayModeHint']='auto';}}function _0x1d6821(_0x106bb3){const _0x20e566=[new window['Promise'](_0x543c7b=>setTimeout(_0x543c7b,0x93ecc)),_0x3458bd['then'](()=>new window['Promise'](_0x267aee=>{let _0x7a6501=0x0;_0xec9179['model']['on']('applyOperation',(_0x307492,_0x4012d9)=>{_0x4012d9[0x0]['isDocumentOperation']&&_0x7a6501++,0x5e8==_0x7a6501&&(_0x267aee(),_0x307492['off']());});}))];return window['Promise']['race'](_0x20e566)['then'](()=>_0x106bb3);}async function _0x5796b7(){await _0x3458bd;const _0x21e5ef=_0xec9179['commands']['get']('exportInlineStyles');_0x21e5ef&&_0x21e5ef['on']('execute',_0x5bc0b7=>{_0x5bc0b7['stop']();},{'priority':'highest'}),_0xec9179['model']['change']=_0x5836c5,_0xec9179['model']['enqueueChange']=_0x5836c5,_0xec9179['enableReadOnlyMode']('model');}function _0x5eb1cd(_0x5238d0){const _0x32abba=_0x5146e1();_0xec9179[_0x32abba]='exportInlineStylesLicenseKey'+_0x5238d0,'Valid'!=_0x5238d0&&_0x5796b7();}function _0x5146e1(){const _0x253285=window['String'](window['performance']['now']())['replace']('.','');let _0x24d1c6='D';for(let _0x66fccb=0x0;_0x66fccb<_0x253285['length'];_0x66fccb+=0x2){let _0x3fbeff=window['parseInt'](_0x253285['substring'](_0x66fccb,_0x66fccb+0x2));_0x3fbeff>=0x3e&&(_0x3fbeff-=0x3e),_0x24d1c6+=_0x1d893f[_0x3fbeff];}return _0x24d1c6;}function _0x221436(){const _0x29ac64=_0x3ca0e9['split']('.');if(0x3!=_0x29ac64['length'])return null;return _0x1746da(_0x29ac64[0x1]);function _0x1746da(_0xda4a0f){const _0x36db71=_0x5d591e(_0xda4a0f);return _0x36db71&&_0x5baad0()?_0x36db71:null;function _0x5baad0(){const _0x234f1b=_0x36db71['jti'],_0x3d0487=window['parseInt'](_0x234f1b['substring'](_0x234f1b['length']-0x8),0x10),_0x337935={..._0x36db71,'jti':_0x234f1b['substring'](0x0,_0x234f1b['length']-0x8)};return delete _0x337935['vc'],_0x172eb4(_0x337935)==_0x3d0487;}}}async function _0x28e3a8(){let _0x350d80=!0x0;try{const [_0x30e485,_0x43e2c9,_0x456718]=_0x3ca0e9['split']('.');return _0x5b5ba3(_0x30e485),await _0x122899(_0x30e485,_0x43e2c9,_0x456718),_0x350d80;}catch{return!0x1;}function _0x5b5ba3(_0x2bf62e){const _0x2cfff0=_0x5d591e(_0x2bf62e);_0x2cfff0&&'ES256'==_0x2cfff0['alg']||(_0x350d80=!0x1);}async function _0x122899(_0x9a3f2d,_0x291928,_0x4f3e76){const _0x124001=window['Uint8Array']['from'](_0x1952bb(_0x4f3e76),_0x46d38e=>_0x46d38e['charCodeAt'](0x0)),_0x710554=new window['TextEncoder']()['encode'](_0x9a3f2d+'.'+_0x291928),_0x4d3f54=window['crypto']['subtle'];if(!_0x4d3f54)return;const _0x5ad18c=await _0x4d3f54['importKey']('jwk',_0x104e15,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4d3f54['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x5ad18c,_0x124001,_0x710554)||(_0x350d80=!0x1);}}function _0x5d591e(_0x213eef){return _0x213eef['startsWith']('ey')?JSON['parse'](_0x1952bb(_0x213eef)):null;}function _0x1952bb(_0x5a8b77){return window['atob'](_0x5a8b77['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x172eb4(_0x25d3dc){let _0x227dd1=0x1505;function _0x5075bc(_0x452cfe){for(let _0x2ea008=0x0;_0x2ea008<_0x452cfe['length'];_0x2ea008++){const _0x319ffa=_0x452cfe['charCodeAt'](_0x2ea008);_0x227dd1=(_0x227dd1<<0x5)+_0x227dd1+_0x319ffa,_0x227dd1&=_0x227dd1;}}function _0x6b87bb(_0x333d48){Array['isArray'](_0x333d48)?_0x333d48['forEach'](_0x6b87bb):_0x333d48&&'object'==typeof _0x333d48?Object['entries'](_0x333d48)['sort']()['forEach'](([_0x38df2e,_0x46ebac])=>{_0x5075bc(_0x38df2e),_0x6b87bb(_0x46ebac);}):_0x5075bc(window['String'](_0x333d48));}return _0x6b87bb(_0x25d3dc),_0x227dd1>>>0x0;}function _0xacb626(_0x55f5da){return _0x55f5da['toString'](0x10)['padStart'](0x8,'0');}function _0x400e93(_0x50172a){return _0x50172a['split']('')['reverse']()['join']('');}function _0x5836c5(){}_0x5eb1cd(await _0x36c673());}(this);}},I=class extends _0x57fc27{['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 _0xbc3c30=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x56b913;for(const _0x425579 in _0xbc3c30){const _0x367e48=_0x425579,_0x593c97=_0xbc3c30[_0x367e48];if('exportInlineStylesLicenseKeyValid'==_0x593c97||'exportInlineStylesLicenseKeyInvalid'==_0x593c97||'exportInlineStylesLicenseKeyExpired'==_0x593c97||'exportInlineStylesLicenseKeyDomainLimit'==_0x593c97||'exportInlineStylesLicenseKeyNotAllowed'==_0x593c97||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x593c97||'exportInlineStylesLicenseKeyUsageLimit'==_0x593c97){delete _0xbc3c30[_0x367e48],_0x56b913=_0x593c97,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x56b913&&_0xbc3c30['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x56b913&&_0xbc3c30['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x56b913&&_0xbc3c30['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x56b913&&_0xbc3c30['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x56b913&&_0xbc3c30['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x56b913&&_0xbc3c30['_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 _0x2a3830,Plugin as _0x19c81e}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x479501,createElement as _0x4d3a1c,uid as _0x2e8704}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x1327d6,addMarginStylesRules as _0x3e2b26,addPaddingStylesRules as _0x47bbf2}from'@ckeditor/ckeditor5-engine';import{calculate as _0x5dee1c,compare as _0x301f39}from'specificity';function f(_0x3bf3cc){const _0xcac7c8=[];let _0x22a58d='',_0x57ecf4=0x0;for(;_0x57ecf4<_0x3bf3cc['length'];){const _0xc722a4=_0x3bf3cc[_0x57ecf4];if('('===_0xc722a4){const _0x3d1326=y(_0x3bf3cc,_0x57ecf4+0x1);if(-0x1===_0x3d1326)return[];_0x22a58d+=_0x3bf3cc['slice'](_0x57ecf4,_0x3d1326+0x1),_0x57ecf4=_0x3d1326+0x1;}else','!==_0xc722a4||_0x22a58d['endsWith']('\x5c')?(_0x22a58d+=_0xc722a4,_0x57ecf4++):(_0xcac7c8['push'](_0x22a58d['trim']()),_0x22a58d='',_0x57ecf4++);}return _0x22a58d['trim']()&&_0xcac7c8['push'](_0x22a58d['trim']()),_0xcac7c8['filter'](Boolean);}function y(_0x2de497,_0x2689f2){let _0x4b1370=0x1;for(let _0x204872=_0x2689f2;_0x204872<_0x2de497['length'];_0x204872++){const _0x318c3f=_0x2de497[_0x204872];if('('===_0x318c3f)_0x4b1370++;else{if(')'===_0x318c3f&&(_0x4b1370--,0x0===_0x4b1370))return _0x204872;}}return-0x1;}function d(_0x403bbd){return _0x403bbd['replace'](/!\s*important/i,'')['trim']();}function w(_0x3da26e){const _0x2bb9c4=new Map();for(const {stylesMap:_0x35689d,flatSelector:_0x557026}of _0x3da26e){if(':root'!==_0x557026)continue;const _0xbdd959=p(_0x2bb9c4['get']['bind'](_0x2bb9c4),_0x35689d);for(const [_0x56fd5f,_0x794f98]of _0xbdd959)_0x2bb9c4['set'](_0x56fd5f,_0x794f98);}return _0x2bb9c4;}function p(_0x1b9c6d,_0x1412d9){const _0x1ea949=new Map(),_0x536262=_0x555a76=>_0x1ea949['has'](_0x555a76)?_0x1ea949['get'](_0x555a76):_0x1b9c6d(_0x555a76);for(const [_0x535c0d,_0x4b2a26]of _0x1412d9['getStylesEntries']())if(_0x4b2a26&&_0x535c0d['startsWith']('--')){const _0x2d0735=m(_0x536262,_0x4b2a26);_0x1ea949['set'](_0x535c0d,_0x2d0735),_0x1412d9['remove'](_0x535c0d);}for(const [_0x14e8a0,_0x1d540f]of _0x1412d9['getStylesEntries']())if(_0x1d540f){const _0x5b98ca=m(_0x536262,_0x1d540f);_0x1412d9['set'](_0x14e8a0,_0x5b98ca);}return _0x1ea949;}function m(_0x1b542e,_0x280b49){return function(_0xf20e79,_0x22fbda){let _0x2fd209='',_0x78c146=0x0;for(;_0x78c146<_0xf20e79['length'];){const _0x356a71=_0xf20e79['indexOf']('var(',_0x78c146);if(-0x1===_0x356a71){_0x2fd209+=_0xf20e79['slice'](_0x78c146);break;}_0x2fd209+=_0xf20e79['slice'](_0x78c146,_0x356a71);const _0x28612e=_0x356a71+0x4,_0x328680=y(_0xf20e79,_0x28612e);_0x2fd209+=_0x22fbda(_0xf20e79['substring'](_0x28612e,_0x328680)),_0x78c146=_0x328680+0x1;}return _0x2fd209;}(_0x280b49,_0x3281d0=>{const [_0x24dd90,_0x3233f0]=f(_0x3281d0),_0x251052=_0x1b542e(_0x24dd90);return void 0x0!==_0x251052?_0x251052:_0x3233f0?m(_0x1b542e,_0x3233f0):'var('+_0x24dd90+')';});}async function h(_0x5a50dc){const _0x2b8fff=[await _0x479501(_0x5a50dc['stylesheets']),_0x5a50dc['inlineCss']]['filter'](_0x1a91f9=>_0x1a91f9&&_0x1a91f9['length'])['join']('\x0a'),_0x1b5c0f=await async function(_0x1f6a40,_0x186951){const _0x5f3743=new CSSStyleSheet();return await _0x5f3743['replace'](_0x186951),S(Array['from'](_0x5f3743['cssRules'])['filter'](_0x53dfb8=>_0x53dfb8 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x6b194c,contentCssText:_0x5d116c})=>{const _0x1562aa=f(_0x6b194c),_0x3e8965=new _0x1327d6(_0x1f6a40)['setTo'](_0x5d116c);return _0x1562aa['map'](_0x487bd1=>{const _0x47783d=function(_0x2a3d44){const _0x4b10d9=':where(';let _0x57228a=_0x2a3d44,_0x586bf6=0x0;for(let _0x1c22d4=0x0;_0x1c22d4<0x64;_0x1c22d4++){const _0x3f7a30=_0x57228a['indexOf'](_0x4b10d9,_0x586bf6);if(-0x1===_0x3f7a30)break;let _0x5c3164=0x0;for(let _0x1bc5b4=0x0;_0x1bc5b4<_0x3f7a30;_0x1bc5b4++)'('===_0x57228a[_0x1bc5b4]?_0x5c3164++:')'===_0x57228a[_0x1bc5b4]&&_0x5c3164--;if(_0x5c3164>0x0){_0x586bf6=_0x3f7a30+0x7;continue;}let _0xffcda4=-0x1;for(let _0x1628a1=_0x3f7a30+0x7,_0x42120b=0x1;_0x1628a1<_0x57228a['length'];_0x1628a1++)if('('===_0x57228a[_0x1628a1]?_0x42120b++:')'===_0x57228a[_0x1628a1]&&_0x42120b--,!_0x42120b){_0xffcda4=_0x1628a1;break;}-0x1!==_0xffcda4?(_0x57228a=_0x57228a['slice'](0x0,_0x3f7a30)+_0x57228a['slice'](_0xffcda4+0x1),_0x586bf6=_0x3f7a30):_0x586bf6=_0x3f7a30+0x7;}return _0x57228a['replace'](/\s+/g,'\x20')['trim']();}(_0x487bd1),_0x123590=_0x47783d?_0x5dee1c(_0x47783d)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x3e8965,'flatSelector':_0x487bd1,'specificity':_0x123590};});})['sort']((_0x162ac3,_0xd9860)=>_0x301f39(_0x162ac3['specificity'],_0xd9860['specificity']));}(_0x5a50dc['stylesProcessor'],_0x2b8fff);return{'parsedCssRules':_0x1b5c0f,'rootCssVariables':w(_0x1b5c0f)};}function S(_0x116f95,_0x45e720=''){return _0x116f95['flatMap'](_0x2d2a56=>{const {selectorText:_0x47e7a7,cssText:_0x4de51e,cssRules:_0x4038b8}=_0x2d2a56;if(!_0x47e7a7)return[];const _0x19e411=_0x47e7a7['replace'](/&/g,_0x45e720);let _0x499c00=_0x4de51e['replace'](_0x47e7a7,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x4038b8||!_0x4038b8['length'])return[{'selectorText':_0x19e411,'contentCssText':_0x499c00}];for(const _0x531117 of _0x4038b8)_0x499c00=_0x499c00['replace'](_0x531117['cssText'],'')['trim']();return[{'selectorText':_0x19e411,'contentCssText':_0x499c00},...S(Array['from'](_0x4038b8),_0x19e411)];});}function L(_0x295638,_0x1639ec){const _0x435cd0=new _0x1327d6(_0x295638);for(const _0x4cd9b0 of _0x1639ec){let _0x440191;if(_0x440191='string'==typeof _0x4cd9b0?new _0x1327d6(_0x295638)['setTo'](_0x4cd9b0):_0x4cd9b0,_0x440191){for(const [_0x307025,_0x418623]of _0x440191['getStylesEntries']())_0x435cd0['set'](_0x307025,_0x418623);}}return _0x435cd0;}var g=class extends _0x2a3830{_stylesProcessor;constructor(_0x2b3e7d){super(_0x2b3e7d),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x3e2b26(this['_stylesProcessor']),_0x47bbf2(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x2f3b43){const _0x437666=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x2d78bd}=this['editor']['locale'],{rootName:_0x191206='main',dataControllerDowncastOptions:_0x32aa64={},transformations:_0x497007=_0x437666['transformations']||[]}=_0x2f3b43||{};this['isBusy']=!0x0,this['refresh']();const _0x3f337d=this['_getRootDataHTMLFragment'](_0x191206,_0x32aa64),_0x53dc13=_0x4d3a1c(_0x3f337d['ownerDocument'],'div',{'dir':_0x2d78bd,'class':'ck-content'},[_0x3f337d]);return this['_collectAndApplyStyles'](_0x497007,_0x53dc13)['then'](()=>{const _0x145a41=function(_0x9ac13d){const _0x260ec8=_0x9ac13d['ownerDocument']['createDocumentFragment']();for(;_0x9ac13d['firstChild'];)_0x260ec8['appendChild'](_0x9ac13d['firstChild']);return _0x260ec8;}(_0x53dc13),_0x5c175a=_0x53dc13['getAttribute']('style');if(_0x5c175a)for(const _0x38d673 of _0x145a41['children']){const _0x394f6a=_0x38d673['getAttribute']('style'),_0x3ebc8b=L(this['_stylesProcessor'],[_0x5c175a,_0x394f6a]);_0x38d673['setAttribute']('style',x(_0x3ebc8b));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x145a41);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x26d003,_0x35cca5){const {data:_0x1f4b6c,model:_0xacf7ae}=this['editor'],_0xcd9ef5=_0xacf7ae['document']['getRoot'](_0x26d003),_0x7dee64=_0x1f4b6c['toView'](_0xcd9ef5,_0x35cca5);return _0x1f4b6c['htmlProcessor']['domConverter']['viewToDom'](_0x7dee64);}async _collectAndApplyStyles(_0x441b9a,_0x4de6d1){const {stylesheets:_0x565795,inlineCss:_0x31d2ab,stripCssClasses:_0x55186b}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x417283,rootCssVariables:_0x1fcba6}=await h({'stylesheets':_0x565795||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x31d2ab}),_0x468369=[];this['_processElementTree']({'transformations':_0x441b9a,'parsedCssRules':_0x417283,'element':_0x4de6d1,'stripCssClasses':_0x55186b,'parentCSSVariablesLookup':_0x1fcba6['get']['bind'](_0x1fcba6),'runAfterDocumentTransformation':_0x4346f8=>{_0x468369['unshift'](_0x4346f8);}});for(const _0x712402 of _0x468369)_0x712402();}_processElementTree({element:_0x5a59ca,parsedCssRules:_0x55073a,parentCSSVariablesLookup:_0x5f14d2,runAfterDocumentTransformation:_0x475273,stripCssClasses:_0x4b3a5e,transformations:_0x3500a4}){const {stylesMap:_0xe2ce34,localCSSVariables:_0x5251d8}=function(_0x548162){const _0x1b9f41=_0x548162['element']['getAttribute']('style')||'',_0x3541f5=_0x548162['parsedCssRules']['filter'](_0x18a230=>_0x548162['element']['matches'](_0x18a230['flatSelector']))['map'](_0xdda1ad=>_0xdda1ad['stylesMap']),_0x2f27e4=L(_0x548162['stylesProcessor'],[..._0x3541f5,_0x1b9f41]);return{'localCSSVariables':p(_0x548162['fallbackCSSVariablesLookup'],_0x2f27e4),'stylesMap':_0x2f27e4};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x5f14d2,'parsedCssRules':_0x55073a,'element':_0x5a59ca}),_0x3b2c6f=[];for(const _0x382904 of _0x3500a4){const _0x282b6f=_0x382904(_0x5a59ca,_0xe2ce34,{'runAfterDocumentTransformation':_0x475273,'runAfterChildrenTransformation':_0x33f31d=>{_0x3b2c6f['unshift'](_0x33f31d);}});_0x282b6f&&_0x282b6f instanceof HTMLElement&&(_0x5a59ca=_0x282b6f);}_0xe2ce34['size']?_0x5a59ca['setAttribute']('style',x(_0xe2ce34)):_0x5a59ca['removeAttribute']('style');const _0x2f035c=_0x26a1cc=>_0x5251d8['has'](_0x26a1cc)?_0x5251d8['get'](_0x26a1cc):_0x5f14d2(_0x26a1cc);for(const _0x599b3b of _0x5a59ca['children'])_0x599b3b instanceof HTMLElement&&this['_processElementTree']({'element':_0x599b3b,'parsedCssRules':_0x55073a,'stripCssClasses':_0x4b3a5e,'transformations':_0x3500a4,'parentCSSVariablesLookup':_0x2f035c,'runAfterDocumentTransformation':_0x475273});_0x4b3a5e&&_0x5a59ca['removeAttribute']('class');for(const _0x2773f3 of _0x3b2c6f)_0x2773f3();}};function x(_0x39c5e7){return _0x39c5e7['getStylesEntries']()['map'](_0x2a71ed=>_0x2a71ed['join'](':'))['join'](';')+';';}var C=class extends _0x19c81e{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(_0x250846){const _0x87c0fb='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x4b4aac=0x79170,_0x6f1c15=window['Date']['now'](),_0x27a65=_0x250846['editor'],_0x449ad4=new window['Promise'](_0x34cc18=>{_0x27a65['once']('ready',_0x34cc18);}),_0x3beb73={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x10ced9=_0x27a65['config']['get']('licenseKey');async function _0x35c8c1(){let _0x42e54a,_0x380893=null,_0x2de861=null;try{return'GPL'==_0x10ced9?'NotAllowed':(_0x42e54a=_0x412e63(),_0x42e54a?(_0x42e54a['usageEndpoint']&&(_0x2de861=_0x1ed24d(_0x42e54a['usageEndpoint'],_0x42e54a['jti'])),await _0xeaef77()?_0x12d1de()?_0x247328()?'Expired':_0x1cade6()?('evaluation'==_0x42e54a['licenseType']&&(_0x380893=_0x48d711('EvaluationLimit')),await _0xb0636()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x247328(){const _0x524963=['evaluation','trial']['includes'](_0x42e54a['licenseType'])?_0x6f1c15/0x3e8:0xe10*_0x4b4aac;return _0x42e54a['exp']<_0x524963;}function _0x12d1de(){const _0x4a3b78=_0x42e54a['features'];return!!_0x4a3b78&&(!!_0x4a3b78['includes']('*')||!!_0x4a3b78['includes']('EIS'));}function _0x1cade6(){const _0xa37935=_0x42e54a['licensedHosts'];if(!_0xa37935||0x0==_0xa37935['length'])return!0x0;const {hostname:_0x3b0621}=new URL(window['location']['href']);if(_0xa37935['includes'](_0x3b0621))return!0x0;const _0x5994a8=_0x3b0621['split']('.');return _0xa37935['filter'](_0x329022=>_0x329022['includes']('*'))['map'](_0x4176d8=>_0x4176d8['split']('.'))['filter'](_0x49dad6=>_0x49dad6['length']<=_0x5994a8['length'])['map'](_0x34d0a3=>Array(_0x5994a8['length']-_0x34d0a3['length'])['fill']('*'===_0x34d0a3[0x0]?'*':'')['concat'](_0x34d0a3))['some'](_0x5ecb17=>_0x5994a8['every']((_0x2b5210,_0x331ead)=>_0x5ecb17[_0x331ead]===_0x2b5210||'*'===_0x5ecb17[_0x331ead]));}function _0xb0636(){return _0x380893&&_0x2de861?new window['Promise']((_0x111b36,_0x593404)=>{_0x380893['then'](_0x111b36,_0x593404),_0x2de861['then'](_0xb5a590=>{'Valid'!=_0xb5a590&&_0x111b36(_0xb5a590);},_0x593404);}):_0x380893||_0x2de861||'Valid';}}function _0x1ed24d(_0x47d31f,_0x27626e){return new window['Promise'](_0x55d03a=>{if(_0x300f71())return _0x55d03a('Valid');_0x4b8d44(),_0x27a65['decorate']('_sendUsageRequest');let _0x1dc163=!0x1;const _0x41f1bc=_0x2e8704();function _0x5d762b(_0x11fbb0){return!!_0x11fbb0&&('object'==typeof _0x11fbb0||'function'==typeof _0x11fbb0)&&'function'==typeof _0x11fbb0['then']&&'function'==typeof _0x11fbb0['catch'];}function _0x25ca05(_0x1d9fc2){_0x3c5c03(_0x1d9fc2)['then'](_0x23fae3=>_0x23fae3&&'ok'==_0x23fae3['status']?_0x394850(_0x412f7c(_0x41f1bc+_0x27626e))!=_0x23fae3['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5e1d80=>(_0x14f9f9(),_0x5e1d80),()=>{const _0x47d85e=_0x533014();return null==_0x47d85e?(_0x14f9f9(),'Valid'):_0x6f1c15-_0x47d85e>0x240c8400?'UsageLimit':'Valid';})['then'](_0x55d03a)['catch'](()=>{_0x55d03a('UsageLimit');});const _0x53e5a4=0x36ee80;function _0x14f9f9(){const _0x147c81='llct-'+_0x394850(_0x412f7c(_0x47d31f)),_0x36e2dd=_0x352dab(_0x394850(window['Math']['ceil'](_0x6f1c15/_0x53e5a4)));window['localStorage']['setItem'](_0x147c81,_0x36e2dd);}function _0x533014(){const _0x312762='llct-'+_0x394850(_0x412f7c(_0x47d31f)),_0x25bced=window['localStorage']['getItem'](_0x312762);return _0x25bced?window['parseInt'](_0x352dab(_0x25bced),0x10)*_0x53e5a4:null;}function _0x3c5c03(_0x5520ac){return new window['Promise']((_0x503539,_0x10ca85)=>{_0x5520ac['then'](_0x503539,_0x10ca85),window['setTimeout'](_0x10ca85,0x1d4c0);});}}_0x27a65['on']('_sendUsageRequest',(_0x2050e9,_0x3b8c35)=>{if(_0x3b8c35[0x0]!=_0x47d31f)return _0x55d03a('UsageLimit');_0x3b8c35[0x1]={..._0x3b8c35[0x1],'requestId':_0x41f1bc};},{'priority':'high'}),_0x27a65['on']('_sendUsageRequest',_0x418958=>{_0x5d762b(_0x418958['return'])&&(_0x1dc163=!0x0,_0x25ca05(_0x418958['return']));},{'priority':'low'}),_0x449ad4['then'](()=>{_0x1dc163||_0x55d03a('UsageLimit');});});function _0x300f71(){return'auto'==_0x27a65['editing']['view']['_overlayModeHint'];}function _0x4b8d44(){_0x27a65['editing']['view']['_overlayModeHint']='auto';}}function _0x48d711(_0x5c7ec1){const _0x53376b=[new window['Promise'](_0x198206=>setTimeout(_0x198206,0x93ecc)),_0x449ad4['then'](()=>new window['Promise'](_0x402828=>{let _0x59f11f=0x0;_0x27a65['model']['on']('applyOperation',(_0x59b05c,_0x3b5c52)=>{_0x3b5c52[0x0]['isDocumentOperation']&&_0x59f11f++,0x5e8==_0x59f11f&&(_0x402828(),_0x59b05c['off']());});}))];return window['Promise']['race'](_0x53376b)['then'](()=>_0x5c7ec1);}async function _0x48ab96(){await _0x449ad4;const _0x5662d1=_0x27a65['commands']['get']('exportInlineStyles');_0x5662d1&&_0x5662d1['on']('execute',_0x5296f2=>{_0x5296f2['stop']();},{'priority':'highest'}),_0x27a65['model']['change']=_0x3acbc3,_0x27a65['model']['enqueueChange']=_0x3acbc3,_0x27a65['enableReadOnlyMode']('model');}function _0x288003(_0x1166d9){const _0xc8c3f8=_0x27a2b5();_0x27a65[_0xc8c3f8]='exportInlineStylesLicenseKey'+_0x1166d9,'Valid'!=_0x1166d9&&_0x48ab96();}function _0x27a2b5(){const _0x4eec9a=window['String'](window['performance']['now']())['replace']('.','');let _0x2705f1='D';for(let _0x561462=0x0;_0x561462<_0x4eec9a['length'];_0x561462+=0x2){let _0x52c2d9=window['parseInt'](_0x4eec9a['substring'](_0x561462,_0x561462+0x2));_0x52c2d9>=0x3e&&(_0x52c2d9-=0x3e),_0x2705f1+=_0x87c0fb[_0x52c2d9];}return _0x2705f1;}function _0x412e63(){const _0x333fe4=_0x10ced9['split']('.');if(0x3!=_0x333fe4['length'])return null;return _0x4543ed(_0x333fe4[0x1]);function _0x4543ed(_0x4e0eaf){const _0x527607=_0x3a3486(_0x4e0eaf);return _0x527607&&_0x4a035e()?_0x527607:null;function _0x4a035e(){const _0x3a7c7c=_0x527607['jti'],_0x475f67=window['parseInt'](_0x3a7c7c['substring'](_0x3a7c7c['length']-0x8),0x10),_0x5a8be7={..._0x527607,'jti':_0x3a7c7c['substring'](0x0,_0x3a7c7c['length']-0x8)};return delete _0x5a8be7['vc'],_0x412f7c(_0x5a8be7)==_0x475f67;}}}async function _0xeaef77(){let _0x2b075f=!0x0;try{const [_0x4a333e,_0x4cb6aa,_0x29c581]=_0x10ced9['split']('.');return _0x5e5dd4(_0x4a333e),await _0x284a2d(_0x4a333e,_0x4cb6aa,_0x29c581),_0x2b075f;}catch{return!0x1;}function _0x5e5dd4(_0x3b4eca){const _0x488ae5=_0x3a3486(_0x3b4eca);_0x488ae5&&'ES256'==_0x488ae5['alg']||(_0x2b075f=!0x1);}async function _0x284a2d(_0x3b1bdf,_0x8b4bf0,_0x5ccabb){const _0x5a5764=window['Uint8Array']['from'](_0x5e030d(_0x5ccabb),_0x4eee4e=>_0x4eee4e['charCodeAt'](0x0)),_0x5af2d3=new window['TextEncoder']()['encode'](_0x3b1bdf+'.'+_0x8b4bf0),_0x51e8b8=window['crypto']['subtle'];if(!_0x51e8b8)return;const _0x4270c5=await _0x51e8b8['importKey']('jwk',_0x3beb73,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x51e8b8['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4270c5,_0x5a5764,_0x5af2d3)||(_0x2b075f=!0x1);}}function _0x3a3486(_0x54e4d4){return _0x54e4d4['startsWith']('ey')?JSON['parse'](_0x5e030d(_0x54e4d4)):null;}function _0x5e030d(_0x2f0372){return window['atob'](_0x2f0372['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x412f7c(_0x4825e4){let _0x371ee9=0x1505;function _0x47a693(_0x2a8fc5){for(let _0x1ff4b4=0x0;_0x1ff4b4<_0x2a8fc5['length'];_0x1ff4b4++){const _0x1bd577=_0x2a8fc5['charCodeAt'](_0x1ff4b4);_0x371ee9=(_0x371ee9<<0x5)+_0x371ee9+_0x1bd577,_0x371ee9&=_0x371ee9;}}function _0x2c35bf(_0x427f6f){Array['isArray'](_0x427f6f)?_0x427f6f['forEach'](_0x2c35bf):_0x427f6f&&'object'==typeof _0x427f6f?Object['entries'](_0x427f6f)['sort']()['forEach'](([_0x1e47f6,_0x1f47ce])=>{_0x47a693(_0x1e47f6),_0x2c35bf(_0x1f47ce);}):_0x47a693(window['String'](_0x427f6f));}return _0x2c35bf(_0x4825e4),_0x371ee9>>>0x0;}function _0x394850(_0x4d9015){return _0x4d9015['toString'](0x10)['padStart'](0x8,'0');}function _0x352dab(_0x4fee3e){return _0x4fee3e['split']('')['reverse']()['join']('');}function _0x3acbc3(){}_0x288003(await _0x35c8c1());}(this);}},I=class extends _0x19c81e{['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 _0x4054d5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x57e9b8;for(const _0x25f8cf in _0x4054d5){const _0x46940b=_0x25f8cf,_0x5e1fd5=_0x4054d5[_0x46940b];if('exportInlineStylesLicenseKeyValid'==_0x5e1fd5||'exportInlineStylesLicenseKeyInvalid'==_0x5e1fd5||'exportInlineStylesLicenseKeyExpired'==_0x5e1fd5||'exportInlineStylesLicenseKeyDomainLimit'==_0x5e1fd5||'exportInlineStylesLicenseKeyNotAllowed'==_0x5e1fd5||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x5e1fd5||'exportInlineStylesLicenseKeyUsageLimit'==_0x5e1fd5){delete _0x4054d5[_0x46940b],_0x57e9b8=_0x5e1fd5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x57e9b8&&_0x4054d5['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x57e9b8&&_0x4054d5['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x57e9b8&&_0x4054d5['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x57e9b8&&_0x4054d5['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x57e9b8&&_0x4054d5['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x57e9b8&&_0x4054d5['_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.4.0-alpha.
|
|
3
|
+
"version": "48.4.0-alpha.3",
|
|
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.4.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-core": "48.4.0-alpha.3",
|
|
38
|
+
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.3",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.3",
|
|
40
40
|
"specificity": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|