@ckeditor/ckeditor5-export-inline-styles 48.3.0-alpha.0 → 48.3.0-alpha.1
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 _0xeb3b0a,Plugin as _0x3d74fb}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x5e851e,createElement as _0x3d5dc5,uid as _0x4d225e}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x1adb3b,addMarginStylesRules as _0x2951f9,addPaddingStylesRules as _0x2dc553}from'@ckeditor/ckeditor5-engine';import{calculate as _0x326add,compare as _0x338c48}from'specificity';function f(_0x25cc32){const _0x19c55a=[];let _0x73178='',_0x735772=0x0;for(;_0x735772<_0x25cc32['length'];){const _0x596d7d=_0x25cc32[_0x735772];if('('===_0x596d7d){const _0x7e4fb6=y(_0x25cc32,_0x735772+0x1);if(-0x1===_0x7e4fb6)return[];_0x73178+=_0x25cc32['slice'](_0x735772,_0x7e4fb6+0x1),_0x735772=_0x7e4fb6+0x1;}else','!==_0x596d7d||_0x73178['endsWith']('\x5c')?(_0x73178+=_0x596d7d,_0x735772++):(_0x19c55a['push'](_0x73178['trim']()),_0x73178='',_0x735772++);}return _0x73178['trim']()&&_0x19c55a['push'](_0x73178['trim']()),_0x19c55a['filter'](Boolean);}function y(_0x20a2fc,_0x49ad51){let _0x29ef50=0x1;for(let _0xad2a3b=_0x49ad51;_0xad2a3b<_0x20a2fc['length'];_0xad2a3b++){const _0x2bf57b=_0x20a2fc[_0xad2a3b];if('('===_0x2bf57b)_0x29ef50++;else{if(')'===_0x2bf57b&&(_0x29ef50--,0x0===_0x29ef50))return _0xad2a3b;}}return-0x1;}function d(_0x3f9053){return _0x3f9053['replace'](/!\s*important/i,'')['trim']();}function w(_0xf72493){const _0x57d987=new Map();for(const {stylesMap:_0xa45705,flatSelector:_0x3de423}of _0xf72493){if(':root'!==_0x3de423)continue;const _0x6bc719=p(_0x57d987['get']['bind'](_0x57d987),_0xa45705);for(const [_0x87bd77,_0x490653]of _0x6bc719)_0x57d987['set'](_0x87bd77,_0x490653);}return _0x57d987;}function p(_0x48ac9a,_0x531f56){const _0x57b57a=new Map(),_0x1829bf=_0x1142e1=>_0x57b57a['has'](_0x1142e1)?_0x57b57a['get'](_0x1142e1):_0x48ac9a(_0x1142e1);for(const [_0x6faab2,_0x1c319e]of _0x531f56['getStylesEntries']())if(_0x1c319e&&_0x6faab2['startsWith']('--')){const _0x22aa53=m(_0x1829bf,_0x1c319e);_0x57b57a['set'](_0x6faab2,_0x22aa53),_0x531f56['remove'](_0x6faab2);}for(const [_0x26db21,_0xbfff21]of _0x531f56['getStylesEntries']())if(_0xbfff21){const _0x1e9135=m(_0x1829bf,_0xbfff21);_0x531f56['set'](_0x26db21,_0x1e9135);}return _0x57b57a;}function m(_0x37680a,_0x36cae5){return function(_0x6aecb9,_0x211472){let _0x15117a='',_0x47a3ed=0x0;for(;_0x47a3ed<_0x6aecb9['length'];){const _0x503f38=_0x6aecb9['indexOf']('var(',_0x47a3ed);if(-0x1===_0x503f38){_0x15117a+=_0x6aecb9['slice'](_0x47a3ed);break;}_0x15117a+=_0x6aecb9['slice'](_0x47a3ed,_0x503f38);const _0x481e97=_0x503f38+0x4,_0x1f8cb5=y(_0x6aecb9,_0x481e97);_0x15117a+=_0x211472(_0x6aecb9['substring'](_0x481e97,_0x1f8cb5)),_0x47a3ed=_0x1f8cb5+0x1;}return _0x15117a;}(_0x36cae5,_0x2384b0=>{const [_0x5f6492,_0x277047]=f(_0x2384b0),_0x629589=_0x37680a(_0x5f6492);return void 0x0!==_0x629589?_0x629589:_0x277047?m(_0x37680a,_0x277047):'var('+_0x5f6492+')';});}async function h(_0x2932b9){const _0x58ff73=[await _0x5e851e(_0x2932b9['stylesheets']),_0x2932b9['inlineCss']]['filter'](_0x542960=>_0x542960&&_0x542960['length'])['join']('\x0a'),_0x57ee81=await async function(_0x1b532f,_0x58f3b8){const _0x294681=new CSSStyleSheet();return await _0x294681['replace'](_0x58f3b8),S(Array['from'](_0x294681['cssRules'])['filter'](_0x5c23d6=>_0x5c23d6 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x514021,contentCssText:_0x498e0a})=>{const _0x415fd2=f(_0x514021),_0xe8aaf9=new _0x1adb3b(_0x1b532f)['setTo'](_0x498e0a);return _0x415fd2['map'](_0x1d93de=>{const _0x101397=function(_0x9a8e67){const _0x4192e7=':where(';let _0x381192=_0x9a8e67,_0x2b5451=0x0;for(let _0x51790a=0x0;_0x51790a<0x64;_0x51790a++){const _0x33a36c=_0x381192['indexOf'](_0x4192e7,_0x2b5451);if(-0x1===_0x33a36c)break;let _0x416050=0x0;for(let _0x233de7=0x0;_0x233de7<_0x33a36c;_0x233de7++)'('===_0x381192[_0x233de7]?_0x416050++:')'===_0x381192[_0x233de7]&&_0x416050--;if(_0x416050>0x0){_0x2b5451=_0x33a36c+0x7;continue;}let _0x7add4d=-0x1;for(let _0x531380=_0x33a36c+0x7,_0x59747e=0x1;_0x531380<_0x381192['length'];_0x531380++)if('('===_0x381192[_0x531380]?_0x59747e++:')'===_0x381192[_0x531380]&&_0x59747e--,!_0x59747e){_0x7add4d=_0x531380;break;}-0x1!==_0x7add4d?(_0x381192=_0x381192['slice'](0x0,_0x33a36c)+_0x381192['slice'](_0x7add4d+0x1),_0x2b5451=_0x33a36c):_0x2b5451=_0x33a36c+0x7;}return _0x381192['replace'](/\s+/g,'\x20')['trim']();}(_0x1d93de);return{'stylesMap':_0xe8aaf9,'flatSelector':_0x1d93de,'specificity':_0x101397?_0x326add(_0x101397)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0]};});})['sort']((_0x68c2f6,_0x429543)=>_0x338c48(_0x68c2f6['specificity'],_0x429543['specificity']));}(_0x2932b9['stylesProcessor'],_0x58ff73);return{'parsedCssRules':_0x57ee81,'rootCssVariables':w(_0x57ee81)};}function S(_0x336d37,_0x39d916=''){return _0x336d37['flatMap'](_0x528126=>{const {selectorText:_0x54d4bd,cssText:_0x13b45e,cssRules:_0x30b6af}=_0x528126;if(!_0x54d4bd)return[];const _0x457dfe=_0x54d4bd['replace'](/&/g,_0x39d916);let _0x5645ec=_0x13b45e['replace'](_0x54d4bd,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x30b6af||!_0x30b6af['length'])return[{'selectorText':_0x457dfe,'contentCssText':_0x5645ec}];for(const _0x48fca5 of _0x30b6af)_0x5645ec=_0x5645ec['replace'](_0x48fca5['cssText'],'')['trim']();return[{'selectorText':_0x457dfe,'contentCssText':_0x5645ec},...S(Array['from'](_0x30b6af),_0x457dfe)];});}function L(_0x2a6a18,_0xe49bb7){const _0x595b47=new _0x1adb3b(_0x2a6a18);for(const _0x44509e of _0xe49bb7){let _0xb19e91=null;if(_0xb19e91='string'==typeof _0x44509e?new _0x1adb3b(_0x2a6a18)['setTo'](_0x44509e):_0x44509e,_0xb19e91){for(const [_0x325e34,_0x4933f9]of _0xb19e91['getStylesEntries']())_0x595b47['set'](_0x325e34,_0x4933f9);}}return _0x595b47;}var g=class extends _0xeb3b0a{['_stylesProcessor'];constructor(_0x2fe210){super(_0x2fe210),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x2951f9(this['_stylesProcessor']),_0x2dc553(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async['execute'](_0x40e36c){const _0xd68a3a=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x10ee0c}=this['editor']['locale'],{rootName:_0x1f44a4='main',dataControllerDowncastOptions:_0x3ba199={},transformations:_0x5eb3e5=_0xd68a3a['transformations']||[]}=_0x40e36c||{};this['isBusy']=!0x0,this['refresh']();const _0x202df3=this['_getRootDataHTMLFragment'](_0x1f44a4,_0x3ba199),_0x3f2d24=_0x3d5dc5(_0x202df3['ownerDocument'],'div',{'dir':_0x10ee0c,'class':'ck-content'},[_0x202df3]);return this['_collectAndApplyStyles'](_0x5eb3e5,_0x3f2d24)['then'](()=>{const _0x436f14=function(_0x18cd6d){const _0x788906=_0x18cd6d['ownerDocument']['createDocumentFragment']();for(;_0x18cd6d['firstChild'];)_0x788906['appendChild'](_0x18cd6d['firstChild']);return _0x788906;}(_0x3f2d24),_0x3c5317=_0x3f2d24['getAttribute']('style');if(_0x3c5317)for(const _0x57ff6f of _0x436f14['children']){const _0x4e7b4f=_0x57ff6f['getAttribute']('style'),_0x462ffa=L(this['_stylesProcessor'],[_0x3c5317,_0x4e7b4f]);_0x57ff6f['setAttribute']('style',x(_0x462ffa));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x436f14);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_getRootDataHTMLFragment'](_0x4eca30,_0x4bf6fc){const {data:_0x2b48a4,model:_0x333be3}=this['editor'],_0x3f1908=_0x333be3['document']['getRoot'](_0x4eca30),_0x3a96e2=_0x2b48a4['toView'](_0x3f1908,_0x4bf6fc);return _0x2b48a4['htmlProcessor']['domConverter']['viewToDom'](_0x3a96e2);}async['_collectAndApplyStyles'](_0x276b70,_0x227644){const {stylesheets:_0x25595c,inlineCss:_0x10a7e2,stripCssClasses:_0x59baac}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x49c3e6,rootCssVariables:_0x29c5f6}=await h({'stylesheets':_0x25595c||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x10a7e2}),_0x5e0628=[];this['_processElementTree']({'transformations':_0x276b70,'parsedCssRules':_0x49c3e6,'element':_0x227644,'stripCssClasses':_0x59baac,'parentCSSVariablesLookup':_0x29c5f6['get']['bind'](_0x29c5f6),'runAfterDocumentTransformation':_0x5598ec=>{_0x5e0628['unshift'](_0x5598ec);}});for(const _0x22c1fa of _0x5e0628)_0x22c1fa();}['_processElementTree']({element:_0x76bedb,parsedCssRules:_0x1ec525,parentCSSVariablesLookup:_0x4e38a9,runAfterDocumentTransformation:_0x20028a,stripCssClasses:_0x82393d,transformations:_0x42be7f}){const {stylesMap:_0x5b3c53,localCSSVariables:_0x85a014}=function(_0x35d9dc){const _0x1537d8=_0x35d9dc['element']['getAttribute']('style')||'',_0x3c57bc=_0x35d9dc['parsedCssRules']['filter'](_0x105d86=>_0x35d9dc['element']['matches'](_0x105d86['flatSelector']))['map'](_0x3837d5=>_0x3837d5['stylesMap']),_0x5b4e17=L(_0x35d9dc['stylesProcessor'],[..._0x3c57bc,_0x1537d8]);return{'localCSSVariables':p(_0x35d9dc['fallbackCSSVariablesLookup'],_0x5b4e17),'stylesMap':_0x5b4e17};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x4e38a9,'parsedCssRules':_0x1ec525,'element':_0x76bedb}),_0x2e46d6=[];for(const _0x72ef81 of _0x42be7f){const _0x1fbfb7=_0x72ef81(_0x76bedb,_0x5b3c53,{'runAfterDocumentTransformation':_0x20028a,'runAfterChildrenTransformation':_0x1a698d=>{_0x2e46d6['unshift'](_0x1a698d);}});_0x1fbfb7&&_0x1fbfb7 instanceof HTMLElement&&(_0x76bedb=_0x1fbfb7);}_0x5b3c53['size']?_0x76bedb['setAttribute']('style',x(_0x5b3c53)):_0x76bedb['removeAttribute']('style');const _0x3c854e=_0x6144b7=>_0x85a014['has'](_0x6144b7)?_0x85a014['get'](_0x6144b7):_0x4e38a9(_0x6144b7);for(const _0x3739b2 of _0x76bedb['children'])_0x3739b2 instanceof HTMLElement&&this['_processElementTree']({'element':_0x3739b2,'parsedCssRules':_0x1ec525,'stripCssClasses':_0x82393d,'transformations':_0x42be7f,'parentCSSVariablesLookup':_0x3c854e,'runAfterDocumentTransformation':_0x20028a});_0x82393d&&_0x76bedb['removeAttribute']('class');for(const _0x213ce6 of _0x2e46d6)_0x213ce6();}};function x(_0x5f2312){return _0x5f2312['getStylesEntries']()['map'](_0x4c0914=>_0x4c0914['join'](':'))['join'](';')+';';}var C=class extends _0x3d74fb{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(_0x3dae28){const _0x4f9e33='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x4f36b4=0x78de0,_0x4df54c=window['Date']['now'](),_0x30b7bf=_0x3dae28['editor'],_0xbda69e=new window['Promise'](_0x205eb3=>{_0x30b7bf['once']('ready',_0x205eb3);}),_0x590c92={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x3b81ab=_0x30b7bf['config']['get']('licenseKey');async function _0x5c30f4(){let _0xbf5485,_0x2efbab=null,_0x1a74e1=null;try{return'GPL'==_0x3b81ab?'NotAllowed':(_0xbf5485=_0x336a28(),_0xbf5485?(_0xbf5485['usageEndpoint']&&(_0x1a74e1=_0x10fb76(_0xbf5485['usageEndpoint'],_0xbf5485['jti'])),await _0x2ab41a()?_0xfd78e0()?_0x55e6d0()?'Expired':_0x2d289a()?('evaluation'==_0xbf5485['licenseType']&&(_0x2efbab=_0xca3fdf('EvaluationLimit')),await _0xe1224()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x55e6d0(){const _0x1097d9=['evaluation','trial']['includes'](_0xbf5485['licenseType'])?_0x4df54c/0x3e8:0xe10*_0x4f36b4;return _0xbf5485['exp']<_0x1097d9;}function _0xfd78e0(){const _0x2dc88f=_0xbf5485['features'];return!!_0x2dc88f&&(!!_0x2dc88f['includes']('*')||!!_0x2dc88f['includes']('EIS'));}function _0x2d289a(){const _0x1e1f8a=_0xbf5485['licensedHosts'];if(!_0x1e1f8a||0x0==_0x1e1f8a['length'])return!0x0;const {hostname:_0x219f33}=new URL(window['location']['href']);if(_0x1e1f8a['includes'](_0x219f33))return!0x0;const _0x1e7334=_0x219f33['split']('.');return _0x1e1f8a['filter'](_0x251ff5=>_0x251ff5['includes']('*'))['map'](_0x453ede=>_0x453ede['split']('.'))['filter'](_0x5e62ff=>_0x5e62ff['length']<=_0x1e7334['length'])['map'](_0x4842aa=>Array(_0x1e7334['length']-_0x4842aa['length'])['fill']('*'===_0x4842aa[0x0]?'*':'')['concat'](_0x4842aa))['some'](_0x553a2d=>_0x1e7334['every']((_0x548cf2,_0x3c5976)=>_0x553a2d[_0x3c5976]===_0x548cf2||'*'===_0x553a2d[_0x3c5976]));}function _0xe1224(){return _0x2efbab&&_0x1a74e1?new window['Promise']((_0x4dbe6c,_0x100c0d)=>{_0x2efbab['then'](_0x4dbe6c,_0x100c0d),_0x1a74e1['then'](_0x2ccdef=>{'Valid'!=_0x2ccdef&&_0x4dbe6c(_0x2ccdef);},_0x100c0d);}):_0x2efbab||_0x1a74e1||'Valid';}}function _0x10fb76(_0x55b8aa,_0x22582b){return new window['Promise'](_0x538008=>{if(_0x4c26fd())return _0x538008('Valid');_0x2abbc1(),_0x30b7bf['decorate']('_sendUsageRequest');let _0x6e02d=!0x1;const _0x1d4f5c=_0x4d225e();function _0xbb2a73(_0x281f23){return!!_0x281f23&&('object'==typeof _0x281f23||'function'==typeof _0x281f23)&&'function'==typeof _0x281f23['then']&&'function'==typeof _0x281f23['catch'];}function _0x18f69b(_0x31434d){_0x44b156(_0x31434d)['then'](_0x43af10=>_0x43af10&&'ok'==_0x43af10['status']?_0x544535(_0x5017d4(_0x1d4f5c+_0x22582b))!=_0x43af10['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x32bb1d=>(_0x321e54(),_0x32bb1d),()=>{const _0x28df32=_0x2dc1ce();return null==_0x28df32?(_0x321e54(),'Valid'):_0x4df54c-_0x28df32>0x240c8400?'UsageLimit':'Valid';})['then'](_0x538008)['catch'](()=>{_0x538008('UsageLimit');});const _0xa06a90=0x36ee80;function _0x321e54(){const _0x2a09cd='llct-'+_0x544535(_0x5017d4(_0x55b8aa)),_0x40fdf8=_0x293b6c(_0x544535(window['Math']['ceil'](_0x4df54c/_0xa06a90)));window['localStorage']['setItem'](_0x2a09cd,_0x40fdf8);}function _0x2dc1ce(){const _0x48da99='llct-'+_0x544535(_0x5017d4(_0x55b8aa)),_0x471198=window['localStorage']['getItem'](_0x48da99);return _0x471198?window['parseInt'](_0x293b6c(_0x471198),0x10)*_0xa06a90:null;}function _0x44b156(_0x2e95d0){return new window['Promise']((_0x94875c,_0x2b4882)=>{_0x2e95d0['then'](_0x94875c,_0x2b4882),window['setTimeout'](_0x2b4882,0x1d4c0);});}}_0x30b7bf['on']('_sendUsageRequest',(_0x41a547,_0x41e3e2)=>{if(_0x41e3e2[0x0]!=_0x55b8aa)return _0x538008('UsageLimit');_0x41e3e2[0x1]={..._0x41e3e2[0x1],'requestId':_0x1d4f5c};},{'priority':'high'}),_0x30b7bf['on']('_sendUsageRequest',_0x2a089e=>{_0xbb2a73(_0x2a089e['return'])&&(_0x6e02d=!0x0,_0x18f69b(_0x2a089e['return']));},{'priority':'low'}),_0xbda69e['then'](()=>{_0x6e02d||_0x538008('UsageLimit');});});function _0x4c26fd(){return'auto'==_0x30b7bf['editing']['view']['_overlayModeHint'];}function _0x2abbc1(){_0x30b7bf['editing']['view']['_overlayModeHint']='auto';}}function _0xca3fdf(_0x54c5f4){const _0x2e7726=[new window['Promise'](_0x260559=>setTimeout(_0x260559,0x93ecc)),_0xbda69e['then'](()=>new window['Promise'](_0x253fd2=>{let _0x242d82=0x0;_0x30b7bf['model']['on']('applyOperation',(_0x1e58d2,_0x212945)=>{_0x212945[0x0]['isDocumentOperation']&&_0x242d82++,0x5e8==_0x242d82&&(_0x253fd2(),_0x1e58d2['off']());});}))];return window['Promise']['race'](_0x2e7726)['then'](()=>_0x54c5f4);}async function _0x4046da(){await _0xbda69e;const _0xeb882c=_0x30b7bf['commands']['get']('exportInlineStyles');_0xeb882c&&_0xeb882c['on']('execute',_0x59ea91=>{_0x59ea91['stop']();},{'priority':'highest'}),_0x30b7bf['model']['change']=_0x373b1f,_0x30b7bf['model']['enqueueChange']=_0x373b1f,_0x30b7bf['enableReadOnlyMode']('model');}function _0x54a37d(_0x39e4cd){const _0x365da2=_0x432ed6();_0x30b7bf[_0x365da2]='exportInlineStylesLicenseKey'+_0x39e4cd,'Valid'!=_0x39e4cd&&_0x4046da();}function _0x432ed6(){const _0x3b8844=window['String'](window['performance']['now']())['replace']('.','');let _0x26d051='D';for(let _0x3e9725=0x0;_0x3e9725<_0x3b8844['length'];_0x3e9725+=0x2){let _0x56f769=window['parseInt'](_0x3b8844['substring'](_0x3e9725,_0x3e9725+0x2));_0x56f769>=0x3e&&(_0x56f769-=0x3e),_0x26d051+=_0x4f9e33[_0x56f769];}return _0x26d051;}function _0x336a28(){const _0x44a51b=_0x3b81ab['split']('.');if(0x3!=_0x44a51b['length'])return null;return _0x232e1d(_0x44a51b[0x1]);function _0x232e1d(_0x2ce93c){const _0x5be603=_0x3f0c16(_0x2ce93c);return _0x5be603&&_0x3e0f18()?_0x5be603:null;function _0x3e0f18(){const _0x378285=_0x5be603['jti'],_0x581837=window['parseInt'](_0x378285['substring'](_0x378285['length']-0x8),0x10),_0x4b1d5a={..._0x5be603,'jti':_0x378285['substring'](0x0,_0x378285['length']-0x8)};return delete _0x4b1d5a['vc'],_0x5017d4(_0x4b1d5a)==_0x581837;}}}async function _0x2ab41a(){let _0x482015=!0x0;try{const [_0x30b3f3,_0x208b0e,_0x45b075]=_0x3b81ab['split']('.');return _0x538784(_0x30b3f3),await _0xa15c07(_0x30b3f3,_0x208b0e,_0x45b075),_0x482015;}catch{return!0x1;}function _0x538784(_0x48cb66){const _0x54553e=_0x3f0c16(_0x48cb66);_0x54553e&&'ES256'==_0x54553e['alg']||(_0x482015=!0x1);}async function _0xa15c07(_0x4c0cd6,_0x235609,_0x12d968){const _0xc8926=window['Uint8Array']['from'](_0x39b727(_0x12d968),_0x1a9048=>_0x1a9048['charCodeAt'](0x0)),_0x1d317b=new window['TextEncoder']()['encode'](_0x4c0cd6+'.'+_0x235609),_0x60c81=window['crypto']['subtle'];if(!_0x60c81)return;const _0xf6dd9=await _0x60c81['importKey']('jwk',_0x590c92,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x60c81['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xf6dd9,_0xc8926,_0x1d317b)||(_0x482015=!0x1);}}function _0x3f0c16(_0x229749){return _0x229749['startsWith']('ey')?JSON['parse'](_0x39b727(_0x229749)):null;}function _0x39b727(_0x3630eb){return window['atob'](_0x3630eb['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5017d4(_0x3824c6){let _0x382eec=0x1505;function _0x30c908(_0x54bd35){for(let _0xaf8df8=0x0;_0xaf8df8<_0x54bd35['length'];_0xaf8df8++){const _0x1db26f=_0x54bd35['charCodeAt'](_0xaf8df8);_0x382eec=(_0x382eec<<0x5)+_0x382eec+_0x1db26f,_0x382eec&=_0x382eec;}}function _0x5740ed(_0x23733f){Array['isArray'](_0x23733f)?_0x23733f['forEach'](_0x5740ed):_0x23733f&&'object'==typeof _0x23733f?Object['entries'](_0x23733f)['sort']()['forEach'](([_0x3b2ae9,_0x443ac6])=>{_0x30c908(_0x3b2ae9),_0x5740ed(_0x443ac6);}):_0x30c908(window['String'](_0x23733f));}return _0x5740ed(_0x3824c6),_0x382eec>>>0x0;}function _0x544535(_0x3f2654){return _0x3f2654['toString'](0x10)['padStart'](0x8,'0');}function _0x293b6c(_0x496042){return _0x496042['split']('')['reverse']()['join']('');}function _0x373b1f(){}_0x54a37d(await _0x5c30f4());}(this);}},I=class extends _0x3d74fb{['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 _0xdd3159=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x43d0f0;for(const _0x4f68f1 in _0xdd3159){const _0x596f0e=_0x4f68f1,_0x22c204=_0xdd3159[_0x596f0e];if('exportInlineStylesLicenseKeyValid'==_0x22c204||'exportInlineStylesLicenseKeyInvalid'==_0x22c204||'exportInlineStylesLicenseKeyExpired'==_0x22c204||'exportInlineStylesLicenseKeyDomainLimit'==_0x22c204||'exportInlineStylesLicenseKeyNotAllowed'==_0x22c204||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x22c204||'exportInlineStylesLicenseKeyUsageLimit'==_0x22c204){delete _0xdd3159[_0x596f0e],_0x43d0f0=_0x22c204,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x43d0f0&&_0xdd3159['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x43d0f0&&_0xdd3159['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x43d0f0&&_0xdd3159['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x43d0f0&&_0xdd3159['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x43d0f0&&_0xdd3159['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x43d0f0&&_0xdd3159['_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 _0x228200,Plugin as _0x3d6192}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x402498,createElement as _0x48bc95,uid as _0x40ef7c}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x448ee0,addMarginStylesRules as _0x55810e,addPaddingStylesRules as _0x55017a}from'@ckeditor/ckeditor5-engine';import{calculate as _0x4e4c52,compare as _0x37c5bc}from'specificity';function f(_0x157fcf){const _0x1f0da5=[];let _0x424cee='',_0x5dbe4f=0x0;for(;_0x5dbe4f<_0x157fcf['length'];){const _0x2742ce=_0x157fcf[_0x5dbe4f];if('('===_0x2742ce){const _0x40a55d=y(_0x157fcf,_0x5dbe4f+0x1);if(-0x1===_0x40a55d)return[];_0x424cee+=_0x157fcf['slice'](_0x5dbe4f,_0x40a55d+0x1),_0x5dbe4f=_0x40a55d+0x1;}else','!==_0x2742ce||_0x424cee['endsWith']('\x5c')?(_0x424cee+=_0x2742ce,_0x5dbe4f++):(_0x1f0da5['push'](_0x424cee['trim']()),_0x424cee='',_0x5dbe4f++);}return _0x424cee['trim']()&&_0x1f0da5['push'](_0x424cee['trim']()),_0x1f0da5['filter'](Boolean);}function y(_0x5a43ab,_0x505b1f){let _0x180783=0x1;for(let _0x2bfe8c=_0x505b1f;_0x2bfe8c<_0x5a43ab['length'];_0x2bfe8c++){const _0x3b911f=_0x5a43ab[_0x2bfe8c];if('('===_0x3b911f)_0x180783++;else{if(')'===_0x3b911f&&(_0x180783--,0x0===_0x180783))return _0x2bfe8c;}}return-0x1;}function d(_0x1f7e0e){return _0x1f7e0e['replace'](/!\s*important/i,'')['trim']();}function w(_0x447ad4){const _0xa6a36f=new Map();for(const {stylesMap:_0x2272fc,flatSelector:_0x476153}of _0x447ad4){if(':root'!==_0x476153)continue;const _0x2f6bf6=p(_0xa6a36f['get']['bind'](_0xa6a36f),_0x2272fc);for(const [_0x334b94,_0x43bd23]of _0x2f6bf6)_0xa6a36f['set'](_0x334b94,_0x43bd23);}return _0xa6a36f;}function p(_0x157df6,_0x2acef6){const _0x130f27=new Map(),_0x2d74dd=_0x28c0f6=>_0x130f27['has'](_0x28c0f6)?_0x130f27['get'](_0x28c0f6):_0x157df6(_0x28c0f6);for(const [_0x1dcc69,_0x2ee148]of _0x2acef6['getStylesEntries']())if(_0x2ee148&&_0x1dcc69['startsWith']('--')){const _0x4a90f9=m(_0x2d74dd,_0x2ee148);_0x130f27['set'](_0x1dcc69,_0x4a90f9),_0x2acef6['remove'](_0x1dcc69);}for(const [_0xf913fc,_0x5ad1d8]of _0x2acef6['getStylesEntries']())if(_0x5ad1d8){const _0x247a53=m(_0x2d74dd,_0x5ad1d8);_0x2acef6['set'](_0xf913fc,_0x247a53);}return _0x130f27;}function m(_0x192885,_0x1dc2f2){return function(_0x3feadc,_0x24f8ce){let _0x129301='',_0x49f075=0x0;for(;_0x49f075<_0x3feadc['length'];){const _0x4d66db=_0x3feadc['indexOf']('var(',_0x49f075);if(-0x1===_0x4d66db){_0x129301+=_0x3feadc['slice'](_0x49f075);break;}_0x129301+=_0x3feadc['slice'](_0x49f075,_0x4d66db);const _0x139c07=_0x4d66db+0x4,_0x544be8=y(_0x3feadc,_0x139c07);_0x129301+=_0x24f8ce(_0x3feadc['substring'](_0x139c07,_0x544be8)),_0x49f075=_0x544be8+0x1;}return _0x129301;}(_0x1dc2f2,_0x316ac8=>{const [_0x85b41c,_0x403722]=f(_0x316ac8),_0x9704dd=_0x192885(_0x85b41c);return void 0x0!==_0x9704dd?_0x9704dd:_0x403722?m(_0x192885,_0x403722):'var('+_0x85b41c+')';});}async function h(_0x279602){const _0xc8fd9e=[await _0x402498(_0x279602['stylesheets']),_0x279602['inlineCss']]['filter'](_0x2edb5e=>_0x2edb5e&&_0x2edb5e['length'])['join']('\x0a'),_0x16a420=await async function(_0xe5194b,_0x5603a7){const _0x270268=new CSSStyleSheet();return await _0x270268['replace'](_0x5603a7),S(Array['from'](_0x270268['cssRules'])['filter'](_0x402419=>_0x402419 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x13c3fc,contentCssText:_0x116d24})=>{const _0x319dd=f(_0x13c3fc),_0x10b752=new _0x448ee0(_0xe5194b)['setTo'](_0x116d24);return _0x319dd['map'](_0x264143=>{const _0x42021a=function(_0x1d9768){const _0x4dd618=':where(';let _0x32ec75=_0x1d9768,_0x59b05e=0x0;for(let _0xf75e63=0x0;_0xf75e63<0x64;_0xf75e63++){const _0x12bb89=_0x32ec75['indexOf'](_0x4dd618,_0x59b05e);if(-0x1===_0x12bb89)break;let _0x48d574=0x0;for(let _0x47bb6d=0x0;_0x47bb6d<_0x12bb89;_0x47bb6d++)'('===_0x32ec75[_0x47bb6d]?_0x48d574++:')'===_0x32ec75[_0x47bb6d]&&_0x48d574--;if(_0x48d574>0x0){_0x59b05e=_0x12bb89+0x7;continue;}let _0x487903=-0x1;for(let _0xbd0797=_0x12bb89+0x7,_0xd19609=0x1;_0xbd0797<_0x32ec75['length'];_0xbd0797++)if('('===_0x32ec75[_0xbd0797]?_0xd19609++:')'===_0x32ec75[_0xbd0797]&&_0xd19609--,!_0xd19609){_0x487903=_0xbd0797;break;}-0x1!==_0x487903?(_0x32ec75=_0x32ec75['slice'](0x0,_0x12bb89)+_0x32ec75['slice'](_0x487903+0x1),_0x59b05e=_0x12bb89):_0x59b05e=_0x12bb89+0x7;}return _0x32ec75['replace'](/\s+/g,'\x20')['trim']();}(_0x264143);return{'stylesMap':_0x10b752,'flatSelector':_0x264143,'specificity':_0x42021a?_0x4e4c52(_0x42021a)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0]};});})['sort']((_0x441d15,_0x2a4507)=>_0x37c5bc(_0x441d15['specificity'],_0x2a4507['specificity']));}(_0x279602['stylesProcessor'],_0xc8fd9e);return{'parsedCssRules':_0x16a420,'rootCssVariables':w(_0x16a420)};}function S(_0x11af87,_0x32693d=''){return _0x11af87['flatMap'](_0x13e1d0=>{const {selectorText:_0x47dba3,cssText:_0x15162f,cssRules:_0x32bccb}=_0x13e1d0;if(!_0x47dba3)return[];const _0x2a7618=_0x47dba3['replace'](/&/g,_0x32693d);let _0x4a386e=_0x15162f['replace'](_0x47dba3,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x32bccb||!_0x32bccb['length'])return[{'selectorText':_0x2a7618,'contentCssText':_0x4a386e}];for(const _0x38449c of _0x32bccb)_0x4a386e=_0x4a386e['replace'](_0x38449c['cssText'],'')['trim']();return[{'selectorText':_0x2a7618,'contentCssText':_0x4a386e},...S(Array['from'](_0x32bccb),_0x2a7618)];});}function L(_0x167324,_0x146ec1){const _0x8521f4=new _0x448ee0(_0x167324);for(const _0x13681c of _0x146ec1){let _0x522353=null;if(_0x522353='string'==typeof _0x13681c?new _0x448ee0(_0x167324)['setTo'](_0x13681c):_0x13681c,_0x522353){for(const [_0x3034ef,_0xaf640b]of _0x522353['getStylesEntries']())_0x8521f4['set'](_0x3034ef,_0xaf640b);}}return _0x8521f4;}var g=class extends _0x228200{['_stylesProcessor'];constructor(_0x3434ac){super(_0x3434ac),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x55810e(this['_stylesProcessor']),_0x55017a(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async['execute'](_0x5dea2a){const _0x32a91a=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x5b7612}=this['editor']['locale'],{rootName:_0x1f6860='main',dataControllerDowncastOptions:_0x29e30f={},transformations:_0x1420b4=_0x32a91a['transformations']||[]}=_0x5dea2a||{};this['isBusy']=!0x0,this['refresh']();const _0x4dfbeb=this['_getRootDataHTMLFragment'](_0x1f6860,_0x29e30f),_0x2e5bcb=_0x48bc95(_0x4dfbeb['ownerDocument'],'div',{'dir':_0x5b7612,'class':'ck-content'},[_0x4dfbeb]);return this['_collectAndApplyStyles'](_0x1420b4,_0x2e5bcb)['then'](()=>{const _0xf2669f=function(_0x5676a8){const _0x15f3f8=_0x5676a8['ownerDocument']['createDocumentFragment']();for(;_0x5676a8['firstChild'];)_0x15f3f8['appendChild'](_0x5676a8['firstChild']);return _0x15f3f8;}(_0x2e5bcb),_0x2124c2=_0x2e5bcb['getAttribute']('style');if(_0x2124c2)for(const _0x3809af of _0xf2669f['children']){const _0x40d730=_0x3809af['getAttribute']('style'),_0x1c0ae6=L(this['_stylesProcessor'],[_0x2124c2,_0x40d730]);_0x3809af['setAttribute']('style',x(_0x1c0ae6));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0xf2669f);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_getRootDataHTMLFragment'](_0x259702,_0x3d8b3b){const {data:_0x325160,model:_0x1c493d}=this['editor'],_0x4da645=_0x1c493d['document']['getRoot'](_0x259702),_0x2b3687=_0x325160['toView'](_0x4da645,_0x3d8b3b);return _0x325160['htmlProcessor']['domConverter']['viewToDom'](_0x2b3687);}async['_collectAndApplyStyles'](_0x4e0475,_0x1fbf6a){const {stylesheets:_0x37daca,inlineCss:_0x409011,stripCssClasses:_0x5cc9cc}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x57529a,rootCssVariables:_0x577539}=await h({'stylesheets':_0x37daca||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x409011}),_0x17e197=[];this['_processElementTree']({'transformations':_0x4e0475,'parsedCssRules':_0x57529a,'element':_0x1fbf6a,'stripCssClasses':_0x5cc9cc,'parentCSSVariablesLookup':_0x577539['get']['bind'](_0x577539),'runAfterDocumentTransformation':_0x2c7d5e=>{_0x17e197['unshift'](_0x2c7d5e);}});for(const _0x29fe83 of _0x17e197)_0x29fe83();}['_processElementTree']({element:_0x20a14c,parsedCssRules:_0x474e6e,parentCSSVariablesLookup:_0x23f13d,runAfterDocumentTransformation:_0x1d53bd,stripCssClasses:_0x34627c,transformations:_0x35fad0}){const {stylesMap:_0x1e0f44,localCSSVariables:_0x2acfee}=function(_0x9b9b2c){const _0x4f404e=_0x9b9b2c['element']['getAttribute']('style')||'',_0x39dd91=_0x9b9b2c['parsedCssRules']['filter'](_0x588f0d=>_0x9b9b2c['element']['matches'](_0x588f0d['flatSelector']))['map'](_0x177a04=>_0x177a04['stylesMap']),_0x2f6744=L(_0x9b9b2c['stylesProcessor'],[..._0x39dd91,_0x4f404e]);return{'localCSSVariables':p(_0x9b9b2c['fallbackCSSVariablesLookup'],_0x2f6744),'stylesMap':_0x2f6744};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x23f13d,'parsedCssRules':_0x474e6e,'element':_0x20a14c}),_0x2bbf71=[];for(const _0x1ee93c of _0x35fad0){const _0x5a8eb6=_0x1ee93c(_0x20a14c,_0x1e0f44,{'runAfterDocumentTransformation':_0x1d53bd,'runAfterChildrenTransformation':_0x8d8078=>{_0x2bbf71['unshift'](_0x8d8078);}});_0x5a8eb6&&_0x5a8eb6 instanceof HTMLElement&&(_0x20a14c=_0x5a8eb6);}_0x1e0f44['size']?_0x20a14c['setAttribute']('style',x(_0x1e0f44)):_0x20a14c['removeAttribute']('style');const _0x4c4209=_0x197dfc=>_0x2acfee['has'](_0x197dfc)?_0x2acfee['get'](_0x197dfc):_0x23f13d(_0x197dfc);for(const _0x3aa4c3 of _0x20a14c['children'])_0x3aa4c3 instanceof HTMLElement&&this['_processElementTree']({'element':_0x3aa4c3,'parsedCssRules':_0x474e6e,'stripCssClasses':_0x34627c,'transformations':_0x35fad0,'parentCSSVariablesLookup':_0x4c4209,'runAfterDocumentTransformation':_0x1d53bd});_0x34627c&&_0x20a14c['removeAttribute']('class');for(const _0x299412 of _0x2bbf71)_0x299412();}};function x(_0x1368ad){return _0x1368ad['getStylesEntries']()['map'](_0x45152c=>_0x45152c['join'](':'))['join'](';')+';';}var C=class extends _0x3d6192{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(_0x2c5b57){const _0x496caf='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x3d7dcd=0x78df8,_0x34372d=window['Date']['now'](),_0x86fa4e=_0x2c5b57['editor'],_0x9ccb9c=new window['Promise'](_0x5d2296=>{_0x86fa4e['once']('ready',_0x5d2296);}),_0x2f5824={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x16a134=_0x86fa4e['config']['get']('licenseKey');async function _0x5dbc4e(){let _0x201ba4,_0x4b7009=null,_0x32711=null;try{return'GPL'==_0x16a134?'NotAllowed':(_0x201ba4=_0x16db85(),_0x201ba4?(_0x201ba4['usageEndpoint']&&(_0x32711=_0x4a10ae(_0x201ba4['usageEndpoint'],_0x201ba4['jti'])),await _0x2d8c2e()?_0x587d10()?_0x5822a3()?'Expired':_0x559f04()?('evaluation'==_0x201ba4['licenseType']&&(_0x4b7009=_0x5124e6('EvaluationLimit')),await _0x4d2c84()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5822a3(){const _0x4a82ac=['evaluation','trial']['includes'](_0x201ba4['licenseType'])?_0x34372d/0x3e8:0xe10*_0x3d7dcd;return _0x201ba4['exp']<_0x4a82ac;}function _0x587d10(){const _0x434279=_0x201ba4['features'];return!!_0x434279&&(!!_0x434279['includes']('*')||!!_0x434279['includes']('EIS'));}function _0x559f04(){const _0x5f483b=_0x201ba4['licensedHosts'];if(!_0x5f483b||0x0==_0x5f483b['length'])return!0x0;const {hostname:_0x273e7d}=new URL(window['location']['href']);if(_0x5f483b['includes'](_0x273e7d))return!0x0;const _0x12fe0f=_0x273e7d['split']('.');return _0x5f483b['filter'](_0x82c2fb=>_0x82c2fb['includes']('*'))['map'](_0x25dd3c=>_0x25dd3c['split']('.'))['filter'](_0x3ed619=>_0x3ed619['length']<=_0x12fe0f['length'])['map'](_0x445f37=>Array(_0x12fe0f['length']-_0x445f37['length'])['fill']('*'===_0x445f37[0x0]?'*':'')['concat'](_0x445f37))['some'](_0x34ff76=>_0x12fe0f['every']((_0x425ea4,_0x7c4d82)=>_0x34ff76[_0x7c4d82]===_0x425ea4||'*'===_0x34ff76[_0x7c4d82]));}function _0x4d2c84(){return _0x4b7009&&_0x32711?new window['Promise']((_0x454340,_0x4a0fd9)=>{_0x4b7009['then'](_0x454340,_0x4a0fd9),_0x32711['then'](_0x198a17=>{'Valid'!=_0x198a17&&_0x454340(_0x198a17);},_0x4a0fd9);}):_0x4b7009||_0x32711||'Valid';}}function _0x4a10ae(_0xb9ac16,_0x2d09f5){return new window['Promise'](_0x7f1fd9=>{if(_0x3606ff())return _0x7f1fd9('Valid');_0x2a62fb(),_0x86fa4e['decorate']('_sendUsageRequest');let _0x3d3d44=!0x1;const _0x4dd1a5=_0x40ef7c();function _0x42b720(_0x1837e7){return!!_0x1837e7&&('object'==typeof _0x1837e7||'function'==typeof _0x1837e7)&&'function'==typeof _0x1837e7['then']&&'function'==typeof _0x1837e7['catch'];}function _0x408252(_0x8eceb4){_0x1aa376(_0x8eceb4)['then'](_0x45197b=>_0x45197b&&'ok'==_0x45197b['status']?_0x4f58fb(_0xde5551(_0x4dd1a5+_0x2d09f5))!=_0x45197b['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x486770=>(_0x339339(),_0x486770),()=>{const _0x2808f9=_0x542c51();return null==_0x2808f9?(_0x339339(),'Valid'):_0x34372d-_0x2808f9>0x240c8400?'UsageLimit':'Valid';})['then'](_0x7f1fd9)['catch'](()=>{_0x7f1fd9('UsageLimit');});const _0x2f2982=0x36ee80;function _0x339339(){const _0x137f71='llct-'+_0x4f58fb(_0xde5551(_0xb9ac16)),_0x3a8da2=_0x2a3b25(_0x4f58fb(window['Math']['ceil'](_0x34372d/_0x2f2982)));window['localStorage']['setItem'](_0x137f71,_0x3a8da2);}function _0x542c51(){const _0x1d9fc2='llct-'+_0x4f58fb(_0xde5551(_0xb9ac16)),_0x59cf29=window['localStorage']['getItem'](_0x1d9fc2);return _0x59cf29?window['parseInt'](_0x2a3b25(_0x59cf29),0x10)*_0x2f2982:null;}function _0x1aa376(_0x1294f3){return new window['Promise']((_0x7bdec6,_0xfd14fd)=>{_0x1294f3['then'](_0x7bdec6,_0xfd14fd),window['setTimeout'](_0xfd14fd,0x1d4c0);});}}_0x86fa4e['on']('_sendUsageRequest',(_0x1be4c1,_0x4e6d35)=>{if(_0x4e6d35[0x0]!=_0xb9ac16)return _0x7f1fd9('UsageLimit');_0x4e6d35[0x1]={..._0x4e6d35[0x1],'requestId':_0x4dd1a5};},{'priority':'high'}),_0x86fa4e['on']('_sendUsageRequest',_0x5f399e=>{_0x42b720(_0x5f399e['return'])&&(_0x3d3d44=!0x0,_0x408252(_0x5f399e['return']));},{'priority':'low'}),_0x9ccb9c['then'](()=>{_0x3d3d44||_0x7f1fd9('UsageLimit');});});function _0x3606ff(){return'auto'==_0x86fa4e['editing']['view']['_overlayModeHint'];}function _0x2a62fb(){_0x86fa4e['editing']['view']['_overlayModeHint']='auto';}}function _0x5124e6(_0x1256c5){const _0x194e55=[new window['Promise'](_0x4b0c76=>setTimeout(_0x4b0c76,0x93ecc)),_0x9ccb9c['then'](()=>new window['Promise'](_0xd27441=>{let _0x95464c=0x0;_0x86fa4e['model']['on']('applyOperation',(_0x168035,_0x4d34fb)=>{_0x4d34fb[0x0]['isDocumentOperation']&&_0x95464c++,0x5e8==_0x95464c&&(_0xd27441(),_0x168035['off']());});}))];return window['Promise']['race'](_0x194e55)['then'](()=>_0x1256c5);}async function _0x2814ad(){await _0x9ccb9c;const _0x4f359f=_0x86fa4e['commands']['get']('exportInlineStyles');_0x4f359f&&_0x4f359f['on']('execute',_0x4bc173=>{_0x4bc173['stop']();},{'priority':'highest'}),_0x86fa4e['model']['change']=_0x4500d3,_0x86fa4e['model']['enqueueChange']=_0x4500d3,_0x86fa4e['enableReadOnlyMode']('model');}function _0x4ef10c(_0x362172){const _0x3d952e=_0x376d4f();_0x86fa4e[_0x3d952e]='exportInlineStylesLicenseKey'+_0x362172,'Valid'!=_0x362172&&_0x2814ad();}function _0x376d4f(){const _0x48683e=window['String'](window['performance']['now']())['replace']('.','');let _0x2e025e='D';for(let _0x1c908d=0x0;_0x1c908d<_0x48683e['length'];_0x1c908d+=0x2){let _0x1e8719=window['parseInt'](_0x48683e['substring'](_0x1c908d,_0x1c908d+0x2));_0x1e8719>=0x3e&&(_0x1e8719-=0x3e),_0x2e025e+=_0x496caf[_0x1e8719];}return _0x2e025e;}function _0x16db85(){const _0xf87826=_0x16a134['split']('.');if(0x3!=_0xf87826['length'])return null;return _0x2b8227(_0xf87826[0x1]);function _0x2b8227(_0x584763){const _0x2b0847=_0x1a17b9(_0x584763);return _0x2b0847&&_0x53c998()?_0x2b0847:null;function _0x53c998(){const _0x267711=_0x2b0847['jti'],_0x545892=window['parseInt'](_0x267711['substring'](_0x267711['length']-0x8),0x10),_0x5a6c7a={..._0x2b0847,'jti':_0x267711['substring'](0x0,_0x267711['length']-0x8)};return delete _0x5a6c7a['vc'],_0xde5551(_0x5a6c7a)==_0x545892;}}}async function _0x2d8c2e(){let _0x280824=!0x0;try{const [_0x2755a2,_0x55115e,_0x236fcb]=_0x16a134['split']('.');return _0x5d6d58(_0x2755a2),await _0x36c7b0(_0x2755a2,_0x55115e,_0x236fcb),_0x280824;}catch{return!0x1;}function _0x5d6d58(_0x5233f6){const _0x2476e9=_0x1a17b9(_0x5233f6);_0x2476e9&&'ES256'==_0x2476e9['alg']||(_0x280824=!0x1);}async function _0x36c7b0(_0x4af35f,_0x3738df,_0x12d535){const _0x258be1=window['Uint8Array']['from'](_0x98ac8c(_0x12d535),_0x3f02d0=>_0x3f02d0['charCodeAt'](0x0)),_0x7bc427=new window['TextEncoder']()['encode'](_0x4af35f+'.'+_0x3738df),_0x18c3f0=window['crypto']['subtle'];if(!_0x18c3f0)return;const _0x307f4b=await _0x18c3f0['importKey']('jwk',_0x2f5824,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x18c3f0['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x307f4b,_0x258be1,_0x7bc427)||(_0x280824=!0x1);}}function _0x1a17b9(_0x5be523){return _0x5be523['startsWith']('ey')?JSON['parse'](_0x98ac8c(_0x5be523)):null;}function _0x98ac8c(_0x10b607){return window['atob'](_0x10b607['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xde5551(_0x198bb3){let _0x1552df=0x1505;function _0x10d1de(_0x43bc7c){for(let _0x5cd6de=0x0;_0x5cd6de<_0x43bc7c['length'];_0x5cd6de++){const _0x43c152=_0x43bc7c['charCodeAt'](_0x5cd6de);_0x1552df=(_0x1552df<<0x5)+_0x1552df+_0x43c152,_0x1552df&=_0x1552df;}}function _0x4d3274(_0x44ade3){Array['isArray'](_0x44ade3)?_0x44ade3['forEach'](_0x4d3274):_0x44ade3&&'object'==typeof _0x44ade3?Object['entries'](_0x44ade3)['sort']()['forEach'](([_0x27a96a,_0x246df3])=>{_0x10d1de(_0x27a96a),_0x4d3274(_0x246df3);}):_0x10d1de(window['String'](_0x44ade3));}return _0x4d3274(_0x198bb3),_0x1552df>>>0x0;}function _0x4f58fb(_0x212cc4){return _0x212cc4['toString'](0x10)['padStart'](0x8,'0');}function _0x2a3b25(_0x537f50){return _0x537f50['split']('')['reverse']()['join']('');}function _0x4500d3(){}_0x4ef10c(await _0x5dbc4e());}(this);}},I=class extends _0x3d6192{['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 _0x3bbb79=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5dc058;for(const _0x4a1051 in _0x3bbb79){const _0x5dfcde=_0x4a1051,_0x4dc611=_0x3bbb79[_0x5dfcde];if('exportInlineStylesLicenseKeyValid'==_0x4dc611||'exportInlineStylesLicenseKeyInvalid'==_0x4dc611||'exportInlineStylesLicenseKeyExpired'==_0x4dc611||'exportInlineStylesLicenseKeyDomainLimit'==_0x4dc611||'exportInlineStylesLicenseKeyNotAllowed'==_0x4dc611||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x4dc611||'exportInlineStylesLicenseKeyUsageLimit'==_0x4dc611){delete _0x3bbb79[_0x5dfcde],_0x5dc058=_0x4dc611,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x5dc058&&_0x3bbb79['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x5dc058&&_0x3bbb79['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x5dc058&&_0x3bbb79['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x5dc058&&_0x3bbb79['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x5dc058&&_0x3bbb79['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x5dc058&&_0x3bbb79['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}};export{I as ExportInlineStyles,g as ExportInlineStylesCommand,C as ExportInlineStylesEditing,d as dropImportantStyleSuffix};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-export-inline-styles",
|
|
3
|
-
"version": "48.3.0-alpha.
|
|
3
|
+
"version": "48.3.0-alpha.1",
|
|
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.3.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.1",
|
|
38
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.1",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.1",
|
|
40
40
|
"specificity": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|