@ckeditor/ckeditor5-export-inline-styles 48.4.0-alpha.1 → 48.4.0-alpha.2
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 _0x245b93,Plugin as _0x162ef7}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x3db165,createElement as _0x1b8660,uid as _0x38d3e7}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x30c216,addMarginStylesRules as _0x4fc1af,addPaddingStylesRules as _0x2d70e2}from'@ckeditor/ckeditor5-engine';import{calculate as _0x520ad4,compare as _0x508dc5}from'specificity';function f(_0x273a44){const _0x1b67d7=[];let _0x2f36ab='',_0x744691=0x0;for(;_0x744691<_0x273a44['length'];){const _0x1a0780=_0x273a44[_0x744691];if('('===_0x1a0780){const _0x6bd2d3=y(_0x273a44,_0x744691+0x1);if(-0x1===_0x6bd2d3)return[];_0x2f36ab+=_0x273a44['slice'](_0x744691,_0x6bd2d3+0x1),_0x744691=_0x6bd2d3+0x1;}else','!==_0x1a0780||_0x2f36ab['endsWith']('\x5c')?(_0x2f36ab+=_0x1a0780,_0x744691++):(_0x1b67d7['push'](_0x2f36ab['trim']()),_0x2f36ab='',_0x744691++);}return _0x2f36ab['trim']()&&_0x1b67d7['push'](_0x2f36ab['trim']()),_0x1b67d7['filter'](Boolean);}function y(_0x461f95,_0x286e5a){let _0x3c79e0=0x1;for(let _0x376317=_0x286e5a;_0x376317<_0x461f95['length'];_0x376317++){const _0x51a30d=_0x461f95[_0x376317];if('('===_0x51a30d)_0x3c79e0++;else{if(')'===_0x51a30d&&(_0x3c79e0--,0x0===_0x3c79e0))return _0x376317;}}return-0x1;}function d(_0x17d94c){return _0x17d94c['replace'](/!\s*important/i,'')['trim']();}function w(_0x3e7906){const _0x15d0b4=new Map();for(const {stylesMap:_0xb1ff77,flatSelector:_0x57429a}of _0x3e7906){if(':root'!==_0x57429a)continue;const _0x3f3e8b=p(_0x15d0b4['get']['bind'](_0x15d0b4),_0xb1ff77);for(const [_0x254da7,_0xdea6d7]of _0x3f3e8b)_0x15d0b4['set'](_0x254da7,_0xdea6d7);}return _0x15d0b4;}function p(_0x34d10c,_0x15b1b4){const _0x268bd0=new Map(),_0x2e4a4f=_0x37a540=>_0x268bd0['has'](_0x37a540)?_0x268bd0['get'](_0x37a540):_0x34d10c(_0x37a540);for(const [_0x5499b8,_0x475267]of _0x15b1b4['getStylesEntries']())if(_0x475267&&_0x5499b8['startsWith']('--')){const _0x332c79=m(_0x2e4a4f,_0x475267);_0x268bd0['set'](_0x5499b8,_0x332c79),_0x15b1b4['remove'](_0x5499b8);}for(const [_0x395d97,_0x10f4da]of _0x15b1b4['getStylesEntries']())if(_0x10f4da){const _0x4c0418=m(_0x2e4a4f,_0x10f4da);_0x15b1b4['set'](_0x395d97,_0x4c0418);}return _0x268bd0;}function m(_0x4c42cc,_0x564e09){return function(_0x4154c1,_0x4eb888){let _0x273747='',_0x256487=0x0;for(;_0x256487<_0x4154c1['length'];){const _0x215067=_0x4154c1['indexOf']('var(',_0x256487);if(-0x1===_0x215067){_0x273747+=_0x4154c1['slice'](_0x256487);break;}_0x273747+=_0x4154c1['slice'](_0x256487,_0x215067);const _0x1b1845=_0x215067+0x4,_0x37a3a8=y(_0x4154c1,_0x1b1845);_0x273747+=_0x4eb888(_0x4154c1['substring'](_0x1b1845,_0x37a3a8)),_0x256487=_0x37a3a8+0x1;}return _0x273747;}(_0x564e09,_0x8bdc1e=>{const [_0x5b5cbc,_0x25f10a]=f(_0x8bdc1e),_0x59029a=_0x4c42cc(_0x5b5cbc);return void 0x0!==_0x59029a?_0x59029a:_0x25f10a?m(_0x4c42cc,_0x25f10a):'var('+_0x5b5cbc+')';});}async function h(_0x19c7f9){const _0x1e4230=[await _0x3db165(_0x19c7f9['stylesheets']),_0x19c7f9['inlineCss']]['filter'](_0xa26994=>_0xa26994&&_0xa26994['length'])['join']('\x0a'),_0x271c5e=await async function(_0x10af69,_0x480110){const _0x3fc1fc=new CSSStyleSheet();return await _0x3fc1fc['replace'](_0x480110),S(Array['from'](_0x3fc1fc['cssRules'])['filter'](_0x21e31c=>_0x21e31c instanceof CSSStyleRule))['flatMap'](({selectorText:_0x457fe9,contentCssText:_0xf8fbce})=>{const _0x8e6bc1=f(_0x457fe9),_0x376619=new _0x30c216(_0x10af69)['setTo'](_0xf8fbce);return _0x8e6bc1['map'](_0x235f52=>{const _0x38db89=function(_0x376d88){const _0x532ce7=':where(';let _0x156c9f=_0x376d88,_0x521788=0x0;for(let _0x45af8c=0x0;_0x45af8c<0x64;_0x45af8c++){const _0x31f8a7=_0x156c9f['indexOf'](_0x532ce7,_0x521788);if(-0x1===_0x31f8a7)break;let _0x54cd19=0x0;for(let _0x112485=0x0;_0x112485<_0x31f8a7;_0x112485++)'('===_0x156c9f[_0x112485]?_0x54cd19++:')'===_0x156c9f[_0x112485]&&_0x54cd19--;if(_0x54cd19>0x0){_0x521788=_0x31f8a7+0x7;continue;}let _0x3b963c=-0x1;for(let _0x19615c=_0x31f8a7+0x7,_0x56aadb=0x1;_0x19615c<_0x156c9f['length'];_0x19615c++)if('('===_0x156c9f[_0x19615c]?_0x56aadb++:')'===_0x156c9f[_0x19615c]&&_0x56aadb--,!_0x56aadb){_0x3b963c=_0x19615c;break;}-0x1!==_0x3b963c?(_0x156c9f=_0x156c9f['slice'](0x0,_0x31f8a7)+_0x156c9f['slice'](_0x3b963c+0x1),_0x521788=_0x31f8a7):_0x521788=_0x31f8a7+0x7;}return _0x156c9f['replace'](/\s+/g,'\x20')['trim']();}(_0x235f52),_0x36cc8a=_0x38db89?_0x520ad4(_0x38db89)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x376619,'flatSelector':_0x235f52,'specificity':_0x36cc8a};});})['sort']((_0x5bf897,_0x16d5da)=>_0x508dc5(_0x5bf897['specificity'],_0x16d5da['specificity']));}(_0x19c7f9['stylesProcessor'],_0x1e4230);return{'parsedCssRules':_0x271c5e,'rootCssVariables':w(_0x271c5e)};}function S(_0x3dc0d2,_0xb90b99=''){return _0x3dc0d2['flatMap'](_0x4ca92f=>{const {selectorText:_0x3bcc9d,cssText:_0x1ab426,cssRules:_0x268138}=_0x4ca92f;if(!_0x3bcc9d)return[];const _0x57a20d=_0x3bcc9d['replace'](/&/g,_0xb90b99);let _0xe2af52=_0x1ab426['replace'](_0x3bcc9d,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x268138||!_0x268138['length'])return[{'selectorText':_0x57a20d,'contentCssText':_0xe2af52}];for(const _0x20902f of _0x268138)_0xe2af52=_0xe2af52['replace'](_0x20902f['cssText'],'')['trim']();return[{'selectorText':_0x57a20d,'contentCssText':_0xe2af52},...S(Array['from'](_0x268138),_0x57a20d)];});}function L(_0x39e5b7,_0x59a720){const _0x2c5175=new _0x30c216(_0x39e5b7);for(const _0x235270 of _0x59a720){let _0x42b066;if(_0x42b066='string'==typeof _0x235270?new _0x30c216(_0x39e5b7)['setTo'](_0x235270):_0x235270,_0x42b066){for(const [_0x453649,_0x2d6596]of _0x42b066['getStylesEntries']())_0x2c5175['set'](_0x453649,_0x2d6596);}}return _0x2c5175;}var g=class extends _0x245b93{_stylesProcessor;constructor(_0xd2184e){super(_0xd2184e),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x4fc1af(this['_stylesProcessor']),_0x2d70e2(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x555d36){const _0x3667b0=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x4f5446}=this['editor']['locale'],{rootName:_0x4ef452='main',dataControllerDowncastOptions:_0x3c91ad={},transformations:_0x276126=_0x3667b0['transformations']||[]}=_0x555d36||{};this['isBusy']=!0x0,this['refresh']();const _0x290bc0=this['_getRootDataHTMLFragment'](_0x4ef452,_0x3c91ad),_0xdc750e=_0x1b8660(_0x290bc0['ownerDocument'],'div',{'dir':_0x4f5446,'class':'ck-content'},[_0x290bc0]);return this['_collectAndApplyStyles'](_0x276126,_0xdc750e)['then'](()=>{const _0x17a242=function(_0x4589d8){const _0x597a8a=_0x4589d8['ownerDocument']['createDocumentFragment']();for(;_0x4589d8['firstChild'];)_0x597a8a['appendChild'](_0x4589d8['firstChild']);return _0x597a8a;}(_0xdc750e),_0x3d3121=_0xdc750e['getAttribute']('style');if(_0x3d3121)for(const _0x5a2f8f of _0x17a242['children']){const _0x1f4be4=_0x5a2f8f['getAttribute']('style'),_0x3a0131=L(this['_stylesProcessor'],[_0x3d3121,_0x1f4be4]);_0x5a2f8f['setAttribute']('style',x(_0x3a0131));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x17a242);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x530ea2,_0x3e27b9){const {data:_0x368cc4,model:_0x5289f1}=this['editor'],_0x24c0e4=_0x5289f1['document']['getRoot'](_0x530ea2),_0x87e2c6=_0x368cc4['toView'](_0x24c0e4,_0x3e27b9);return _0x368cc4['htmlProcessor']['domConverter']['viewToDom'](_0x87e2c6);}async _collectAndApplyStyles(_0x40c4cb,_0x40ab5a){const {stylesheets:_0x5ea670,inlineCss:_0x4571fd,stripCssClasses:_0x7320a0}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x441cd5,rootCssVariables:_0x120ccc}=await h({'stylesheets':_0x5ea670||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x4571fd}),_0x39bf46=[];this['_processElementTree']({'transformations':_0x40c4cb,'parsedCssRules':_0x441cd5,'element':_0x40ab5a,'stripCssClasses':_0x7320a0,'parentCSSVariablesLookup':_0x120ccc['get']['bind'](_0x120ccc),'runAfterDocumentTransformation':_0x135388=>{_0x39bf46['unshift'](_0x135388);}});for(const _0x29e407 of _0x39bf46)_0x29e407();}_processElementTree({element:_0x3be597,parsedCssRules:_0x300184,parentCSSVariablesLookup:_0x45256a,runAfterDocumentTransformation:_0x3277ea,stripCssClasses:_0x39a2fd,transformations:_0x2e0713}){const {stylesMap:_0x207b86,localCSSVariables:_0x5e33e9}=function(_0x24a969){const _0x53fb61=_0x24a969['element']['getAttribute']('style')||'',_0x31a717=_0x24a969['parsedCssRules']['filter'](_0x1a3c4d=>_0x24a969['element']['matches'](_0x1a3c4d['flatSelector']))['map'](_0x32f472=>_0x32f472['stylesMap']),_0x2b137b=L(_0x24a969['stylesProcessor'],[..._0x31a717,_0x53fb61]);return{'localCSSVariables':p(_0x24a969['fallbackCSSVariablesLookup'],_0x2b137b),'stylesMap':_0x2b137b};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x45256a,'parsedCssRules':_0x300184,'element':_0x3be597}),_0x5ea8de=[];for(const _0x56fffe of _0x2e0713){const _0x1e835a=_0x56fffe(_0x3be597,_0x207b86,{'runAfterDocumentTransformation':_0x3277ea,'runAfterChildrenTransformation':_0x5d3b96=>{_0x5ea8de['unshift'](_0x5d3b96);}});_0x1e835a&&_0x1e835a instanceof HTMLElement&&(_0x3be597=_0x1e835a);}_0x207b86['size']?_0x3be597['setAttribute']('style',x(_0x207b86)):_0x3be597['removeAttribute']('style');const _0x4188e0=_0x4df688=>_0x5e33e9['has'](_0x4df688)?_0x5e33e9['get'](_0x4df688):_0x45256a(_0x4df688);for(const _0x25bec0 of _0x3be597['children'])_0x25bec0 instanceof HTMLElement&&this['_processElementTree']({'element':_0x25bec0,'parsedCssRules':_0x300184,'stripCssClasses':_0x39a2fd,'transformations':_0x2e0713,'parentCSSVariablesLookup':_0x4188e0,'runAfterDocumentTransformation':_0x3277ea});_0x39a2fd&&_0x3be597['removeAttribute']('class');for(const _0x57483c of _0x5ea8de)_0x57483c();}};function x(_0x71bf89){return _0x71bf89['getStylesEntries']()['map'](_0xd52191=>_0xd52191['join'](':'))['join'](';')+';';}var C=class extends _0x162ef7{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(_0x2c93ea){const _0x2d731c='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0xdd03cf=0x79158,_0x2b685a=window['Date']['now'](),_0x33e486=_0x2c93ea['editor'],_0x197828=new window['Promise'](_0x170b16=>{_0x33e486['once']('ready',_0x170b16);}),_0xbcbc41={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x11efd1=_0x33e486['config']['get']('licenseKey');async function _0x8897c1(){let _0x30b212,_0xf208bc=null,_0x2fb191=null;try{return'GPL'==_0x11efd1?'NotAllowed':(_0x30b212=_0x3de604(),_0x30b212?(_0x30b212['usageEndpoint']&&(_0x2fb191=_0x26fd07(_0x30b212['usageEndpoint'],_0x30b212['jti'])),await _0x4cb324()?_0x11e6c9()?_0x2a9fd4()?'Expired':_0x64207d()?('evaluation'==_0x30b212['licenseType']&&(_0xf208bc=_0x593c05('EvaluationLimit')),await _0xa6ef65()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2a9fd4(){const _0x45ba7d=['evaluation','trial']['includes'](_0x30b212['licenseType'])?_0x2b685a/0x3e8:0xe10*_0xdd03cf;return _0x30b212['exp']<_0x45ba7d;}function _0x11e6c9(){const _0x3f6757=_0x30b212['features'];return!!_0x3f6757&&(!!_0x3f6757['includes']('*')||!!_0x3f6757['includes']('EIS'));}function _0x64207d(){const _0x450d9e=_0x30b212['licensedHosts'];if(!_0x450d9e||0x0==_0x450d9e['length'])return!0x0;const {hostname:_0x217c8c}=new URL(window['location']['href']);if(_0x450d9e['includes'](_0x217c8c))return!0x0;const _0x12b774=_0x217c8c['split']('.');return _0x450d9e['filter'](_0x11e766=>_0x11e766['includes']('*'))['map'](_0xcc5679=>_0xcc5679['split']('.'))['filter'](_0x4d6ef1=>_0x4d6ef1['length']<=_0x12b774['length'])['map'](_0x540381=>Array(_0x12b774['length']-_0x540381['length'])['fill']('*'===_0x540381[0x0]?'*':'')['concat'](_0x540381))['some'](_0x4e88dd=>_0x12b774['every']((_0x15cd0f,_0x4c7e78)=>_0x4e88dd[_0x4c7e78]===_0x15cd0f||'*'===_0x4e88dd[_0x4c7e78]));}function _0xa6ef65(){return _0xf208bc&&_0x2fb191?new window['Promise']((_0x441b88,_0x16330a)=>{_0xf208bc['then'](_0x441b88,_0x16330a),_0x2fb191['then'](_0xd7d9c8=>{'Valid'!=_0xd7d9c8&&_0x441b88(_0xd7d9c8);},_0x16330a);}):_0xf208bc||_0x2fb191||'Valid';}}function _0x26fd07(_0x3de483,_0x26b5f7){return new window['Promise'](_0x420371=>{if(_0x5b8c97())return _0x420371('Valid');_0x1a62d6(),_0x33e486['decorate']('_sendUsageRequest');let _0x166646=!0x1;const _0x3388df=_0x38d3e7();function _0x1ebab4(_0x14cd79){return!!_0x14cd79&&('object'==typeof _0x14cd79||'function'==typeof _0x14cd79)&&'function'==typeof _0x14cd79['then']&&'function'==typeof _0x14cd79['catch'];}function _0x5c3ba6(_0x519fe8){_0xcc2eb9(_0x519fe8)['then'](_0x22e24e=>_0x22e24e&&'ok'==_0x22e24e['status']?_0x20f1ec(_0x17b7e9(_0x3388df+_0x26b5f7))!=_0x22e24e['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5c7094=>(_0x1e710b(),_0x5c7094),()=>{const _0x464b48=_0x5b2f58();return null==_0x464b48?(_0x1e710b(),'Valid'):_0x2b685a-_0x464b48>0x240c8400?'UsageLimit':'Valid';})['then'](_0x420371)['catch'](()=>{_0x420371('UsageLimit');});const _0x18ebe8=0x36ee80;function _0x1e710b(){const _0x2bd3d4='llct-'+_0x20f1ec(_0x17b7e9(_0x3de483)),_0x54db17=_0x425f14(_0x20f1ec(window['Math']['ceil'](_0x2b685a/_0x18ebe8)));window['localStorage']['setItem'](_0x2bd3d4,_0x54db17);}function _0x5b2f58(){const _0x5c7bdc='llct-'+_0x20f1ec(_0x17b7e9(_0x3de483)),_0xe24c43=window['localStorage']['getItem'](_0x5c7bdc);return _0xe24c43?window['parseInt'](_0x425f14(_0xe24c43),0x10)*_0x18ebe8:null;}function _0xcc2eb9(_0x548dea){return new window['Promise']((_0x2966b9,_0x39046d)=>{_0x548dea['then'](_0x2966b9,_0x39046d),window['setTimeout'](_0x39046d,0x1d4c0);});}}_0x33e486['on']('_sendUsageRequest',(_0x1aca1a,_0x388cbd)=>{if(_0x388cbd[0x0]!=_0x3de483)return _0x420371('UsageLimit');_0x388cbd[0x1]={..._0x388cbd[0x1],'requestId':_0x3388df};},{'priority':'high'}),_0x33e486['on']('_sendUsageRequest',_0x53d722=>{_0x1ebab4(_0x53d722['return'])&&(_0x166646=!0x0,_0x5c3ba6(_0x53d722['return']));},{'priority':'low'}),_0x197828['then'](()=>{_0x166646||_0x420371('UsageLimit');});});function _0x5b8c97(){return'auto'==_0x33e486['editing']['view']['_overlayModeHint'];}function _0x1a62d6(){_0x33e486['editing']['view']['_overlayModeHint']='auto';}}function _0x593c05(_0x549738){const _0x2631c2=[new window['Promise'](_0x962579=>setTimeout(_0x962579,0x93ecc)),_0x197828['then'](()=>new window['Promise'](_0x4ab8cf=>{let _0x37e6e3=0x0;_0x33e486['model']['on']('applyOperation',(_0x39eae3,_0x1d3b29)=>{_0x1d3b29[0x0]['isDocumentOperation']&&_0x37e6e3++,0x5e8==_0x37e6e3&&(_0x4ab8cf(),_0x39eae3['off']());});}))];return window['Promise']['race'](_0x2631c2)['then'](()=>_0x549738);}async function _0x5f3c56(){await _0x197828;const _0x57825=_0x33e486['commands']['get']('exportInlineStyles');_0x57825&&_0x57825['on']('execute',_0x2a4be2=>{_0x2a4be2['stop']();},{'priority':'highest'}),_0x33e486['model']['change']=_0x4dd674,_0x33e486['model']['enqueueChange']=_0x4dd674,_0x33e486['enableReadOnlyMode']('model');}function _0x2ff591(_0x1fc35a){const _0x3cc942=_0x38d9fd();_0x33e486[_0x3cc942]='exportInlineStylesLicenseKey'+_0x1fc35a,'Valid'!=_0x1fc35a&&_0x5f3c56();}function _0x38d9fd(){const _0x2efe37=window['String'](window['performance']['now']())['replace']('.','');let _0x522edd='D';for(let _0x4aab24=0x0;_0x4aab24<_0x2efe37['length'];_0x4aab24+=0x2){let _0x1e8887=window['parseInt'](_0x2efe37['substring'](_0x4aab24,_0x4aab24+0x2));_0x1e8887>=0x3e&&(_0x1e8887-=0x3e),_0x522edd+=_0x2d731c[_0x1e8887];}return _0x522edd;}function _0x3de604(){const _0x265310=_0x11efd1['split']('.');if(0x3!=_0x265310['length'])return null;return _0x19540a(_0x265310[0x1]);function _0x19540a(_0x1bfb5e){const _0x5a86b8=_0x39df7d(_0x1bfb5e);return _0x5a86b8&&_0x21b154()?_0x5a86b8:null;function _0x21b154(){const _0x4abc44=_0x5a86b8['jti'],_0x4a3ff6=window['parseInt'](_0x4abc44['substring'](_0x4abc44['length']-0x8),0x10),_0x4a5e67={..._0x5a86b8,'jti':_0x4abc44['substring'](0x0,_0x4abc44['length']-0x8)};return delete _0x4a5e67['vc'],_0x17b7e9(_0x4a5e67)==_0x4a3ff6;}}}async function _0x4cb324(){let _0x15b550=!0x0;try{const [_0x2959fb,_0x318567,_0x2e897c]=_0x11efd1['split']('.');return _0xff41f2(_0x2959fb),await _0x13ba7d(_0x2959fb,_0x318567,_0x2e897c),_0x15b550;}catch{return!0x1;}function _0xff41f2(_0x238cbd){const _0xd92f78=_0x39df7d(_0x238cbd);_0xd92f78&&'ES256'==_0xd92f78['alg']||(_0x15b550=!0x1);}async function _0x13ba7d(_0x43f17a,_0x3fb5c0,_0x2a49d9){const _0x29b5f8=window['Uint8Array']['from'](_0x6d740(_0x2a49d9),_0x292f94=>_0x292f94['charCodeAt'](0x0)),_0x848d21=new window['TextEncoder']()['encode'](_0x43f17a+'.'+_0x3fb5c0),_0x43bddc=window['crypto']['subtle'];if(!_0x43bddc)return;const _0x31b369=await _0x43bddc['importKey']('jwk',_0xbcbc41,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x43bddc['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x31b369,_0x29b5f8,_0x848d21)||(_0x15b550=!0x1);}}function _0x39df7d(_0x10e453){return _0x10e453['startsWith']('ey')?JSON['parse'](_0x6d740(_0x10e453)):null;}function _0x6d740(_0x4de4a2){return window['atob'](_0x4de4a2['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x17b7e9(_0x4fa712){let _0x5f1b12=0x1505;function _0xf0095e(_0x27585e){for(let _0x2823d6=0x0;_0x2823d6<_0x27585e['length'];_0x2823d6++){const _0x357b7b=_0x27585e['charCodeAt'](_0x2823d6);_0x5f1b12=(_0x5f1b12<<0x5)+_0x5f1b12+_0x357b7b,_0x5f1b12&=_0x5f1b12;}}function _0x503ed2(_0x35dfe4){Array['isArray'](_0x35dfe4)?_0x35dfe4['forEach'](_0x503ed2):_0x35dfe4&&'object'==typeof _0x35dfe4?Object['entries'](_0x35dfe4)['sort']()['forEach'](([_0x19c1c3,_0x50541d])=>{_0xf0095e(_0x19c1c3),_0x503ed2(_0x50541d);}):_0xf0095e(window['String'](_0x35dfe4));}return _0x503ed2(_0x4fa712),_0x5f1b12>>>0x0;}function _0x20f1ec(_0x36d5ce){return _0x36d5ce['toString'](0x10)['padStart'](0x8,'0');}function _0x425f14(_0x146c3c){return _0x146c3c['split']('')['reverse']()['join']('');}function _0x4dd674(){}_0x2ff591(await _0x8897c1());}(this);}},I=class extends _0x162ef7{['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 _0x1fcf61=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3b342c;for(const _0x181a8a in _0x1fcf61){const _0xcb099c=_0x181a8a,_0x5bbd4c=_0x1fcf61[_0xcb099c];if('exportInlineStylesLicenseKeyValid'==_0x5bbd4c||'exportInlineStylesLicenseKeyInvalid'==_0x5bbd4c||'exportInlineStylesLicenseKeyExpired'==_0x5bbd4c||'exportInlineStylesLicenseKeyDomainLimit'==_0x5bbd4c||'exportInlineStylesLicenseKeyNotAllowed'==_0x5bbd4c||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x5bbd4c||'exportInlineStylesLicenseKeyUsageLimit'==_0x5bbd4c){delete _0x1fcf61[_0xcb099c],_0x3b342c=_0x5bbd4c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x3b342c&&_0x1fcf61['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x3b342c&&_0x1fcf61['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x3b342c&&_0x1fcf61['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x3b342c&&_0x1fcf61['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x3b342c&&_0x1fcf61['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x3b342c&&_0x1fcf61['_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.2",
|
|
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.2",
|
|
38
|
+
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.2",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.2",
|
|
40
40
|
"specificity": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|