@ckeditor/ckeditor5-export-inline-styles 48.4.0-alpha.0 → 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 _0x872d68,Plugin as _0x5c523e}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x38373d,createElement as _0x35896d,uid as _0x27d62b}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x2b7b1f,addMarginStylesRules as _0x4cea01,addPaddingStylesRules as _0x2fa5cf}from'@ckeditor/ckeditor5-engine';import{calculate as _0x53a1c3,compare as _0x33cee1}from'specificity';function f(_0x3cc888){const _0x351e24=[];let _0x343d1d='',_0xe46f99=0x0;for(;_0xe46f99<_0x3cc888['length'];){const _0x53f464=_0x3cc888[_0xe46f99];if('('===_0x53f464){const _0x29def8=y(_0x3cc888,_0xe46f99+0x1);if(-0x1===_0x29def8)return[];_0x343d1d+=_0x3cc888['slice'](_0xe46f99,_0x29def8+0x1),_0xe46f99=_0x29def8+0x1;}else','!==_0x53f464||_0x343d1d['endsWith']('\x5c')?(_0x343d1d+=_0x53f464,_0xe46f99++):(_0x351e24['push'](_0x343d1d['trim']()),_0x343d1d='',_0xe46f99++);}return _0x343d1d['trim']()&&_0x351e24['push'](_0x343d1d['trim']()),_0x351e24['filter'](Boolean);}function y(_0x25ed13,_0x26aa5f){let _0x1a389d=0x1;for(let _0x1f53d7=_0x26aa5f;_0x1f53d7<_0x25ed13['length'];_0x1f53d7++){const _0x3e9e87=_0x25ed13[_0x1f53d7];if('('===_0x3e9e87)_0x1a389d++;else{if(')'===_0x3e9e87&&(_0x1a389d--,0x0===_0x1a389d))return _0x1f53d7;}}return-0x1;}function d(_0x1ac667){return _0x1ac667['replace'](/!\s*important/i,'')['trim']();}function w(_0x181291){const _0x5f46c9=new Map();for(const {stylesMap:_0x40b3a0,flatSelector:_0x320a33}of _0x181291){if(':root'!==_0x320a33)continue;const _0x283065=p(_0x5f46c9['get']['bind'](_0x5f46c9),_0x40b3a0);for(const [_0x1cfef3,_0x2ad4d4]of _0x283065)_0x5f46c9['set'](_0x1cfef3,_0x2ad4d4);}return _0x5f46c9;}function p(_0x2a4d60,_0x481c33){const _0x473650=new Map(),_0x308ca7=_0x36e507=>_0x473650['has'](_0x36e507)?_0x473650['get'](_0x36e507):_0x2a4d60(_0x36e507);for(const [_0x148cdb,_0x27b976]of _0x481c33['getStylesEntries']())if(_0x27b976&&_0x148cdb['startsWith']('--')){const _0x1b2c1c=m(_0x308ca7,_0x27b976);_0x473650['set'](_0x148cdb,_0x1b2c1c),_0x481c33['remove'](_0x148cdb);}for(const [_0x2faca0,_0x5b4b40]of _0x481c33['getStylesEntries']())if(_0x5b4b40){const _0x1aab54=m(_0x308ca7,_0x5b4b40);_0x481c33['set'](_0x2faca0,_0x1aab54);}return _0x473650;}function m(_0x3dc824,_0x4ed2ec){return function(_0x359f31,_0x36a75c){let _0x20ab76='',_0x15968e=0x0;for(;_0x15968e<_0x359f31['length'];){const _0x26cc46=_0x359f31['indexOf']('var(',_0x15968e);if(-0x1===_0x26cc46){_0x20ab76+=_0x359f31['slice'](_0x15968e);break;}_0x20ab76+=_0x359f31['slice'](_0x15968e,_0x26cc46);const _0x394dd5=_0x26cc46+0x4,_0x3af241=y(_0x359f31,_0x394dd5);_0x20ab76+=_0x36a75c(_0x359f31['substring'](_0x394dd5,_0x3af241)),_0x15968e=_0x3af241+0x1;}return _0x20ab76;}(_0x4ed2ec,_0x6c1ae2=>{const [_0x333729,_0x13a4d2]=f(_0x6c1ae2),_0x1d71e1=_0x3dc824(_0x333729);return void 0x0!==_0x1d71e1?_0x1d71e1:_0x13a4d2?m(_0x3dc824,_0x13a4d2):'var('+_0x333729+')';});}async function h(_0x30c0e4){const _0x587e93=[await _0x38373d(_0x30c0e4['stylesheets']),_0x30c0e4['inlineCss']]['filter'](_0x533b83=>_0x533b83&&_0x533b83['length'])['join']('\x0a'),_0x2bc8b7=await async function(_0x1302a8,_0x5db12d){const _0x31d74f=new CSSStyleSheet();return await _0x31d74f['replace'](_0x5db12d),S(Array['from'](_0x31d74f['cssRules'])['filter'](_0x18091e=>_0x18091e instanceof CSSStyleRule))['flatMap'](({selectorText:_0xc39850,contentCssText:_0x508cfd})=>{const _0x2d8ae9=f(_0xc39850),_0x216940=new _0x2b7b1f(_0x1302a8)['setTo'](_0x508cfd);return _0x2d8ae9['map'](_0x21f68f=>{const _0x2a5f63=function(_0x85b5cb){const _0x35a4d6=':where(';let _0x3e7158=_0x85b5cb,_0x537b8d=0x0;for(let _0x2908c1=0x0;_0x2908c1<0x64;_0x2908c1++){const _0x8bb2b2=_0x3e7158['indexOf'](_0x35a4d6,_0x537b8d);if(-0x1===_0x8bb2b2)break;let _0x671b2e=0x0;for(let _0x1225c5=0x0;_0x1225c5<_0x8bb2b2;_0x1225c5++)'('===_0x3e7158[_0x1225c5]?_0x671b2e++:')'===_0x3e7158[_0x1225c5]&&_0x671b2e--;if(_0x671b2e>0x0){_0x537b8d=_0x8bb2b2+0x7;continue;}let _0x1be582=-0x1;for(let _0x54d330=_0x8bb2b2+0x7,_0x1e449a=0x1;_0x54d330<_0x3e7158['length'];_0x54d330++)if('('===_0x3e7158[_0x54d330]?_0x1e449a++:')'===_0x3e7158[_0x54d330]&&_0x1e449a--,!_0x1e449a){_0x1be582=_0x54d330;break;}-0x1!==_0x1be582?(_0x3e7158=_0x3e7158['slice'](0x0,_0x8bb2b2)+_0x3e7158['slice'](_0x1be582+0x1),_0x537b8d=_0x8bb2b2):_0x537b8d=_0x8bb2b2+0x7;}return _0x3e7158['replace'](/\s+/g,'\x20')['trim']();}(_0x21f68f),_0x4fe5d7=_0x2a5f63?_0x53a1c3(_0x2a5f63)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x216940,'flatSelector':_0x21f68f,'specificity':_0x4fe5d7};});})['sort']((_0x42562c,_0x2f3e99)=>_0x33cee1(_0x42562c['specificity'],_0x2f3e99['specificity']));}(_0x30c0e4['stylesProcessor'],_0x587e93);return{'parsedCssRules':_0x2bc8b7,'rootCssVariables':w(_0x2bc8b7)};}function S(_0x36b264,_0x5339cf=''){return _0x36b264['flatMap'](_0x5e26f6=>{const {selectorText:_0x2c514c,cssText:_0x1793f0,cssRules:_0x369f4d}=_0x5e26f6;if(!_0x2c514c)return[];const _0x3efbee=_0x2c514c['replace'](/&/g,_0x5339cf);let _0x5c8273=_0x1793f0['replace'](_0x2c514c,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x369f4d||!_0x369f4d['length'])return[{'selectorText':_0x3efbee,'contentCssText':_0x5c8273}];for(const _0x52d18c of _0x369f4d)_0x5c8273=_0x5c8273['replace'](_0x52d18c['cssText'],'')['trim']();return[{'selectorText':_0x3efbee,'contentCssText':_0x5c8273},...S(Array['from'](_0x369f4d),_0x3efbee)];});}function L(_0x44cf91,_0x1d0b5d){const _0x364595=new _0x2b7b1f(_0x44cf91);for(const _0x593ae6 of _0x1d0b5d){let _0x13c3f2;if(_0x13c3f2='string'==typeof _0x593ae6?new _0x2b7b1f(_0x44cf91)['setTo'](_0x593ae6):_0x593ae6,_0x13c3f2){for(const [_0xa2ea1f,_0xf7204f]of _0x13c3f2['getStylesEntries']())_0x364595['set'](_0xa2ea1f,_0xf7204f);}}return _0x364595;}var g=class extends _0x872d68{_stylesProcessor;constructor(_0x54de2d){super(_0x54de2d),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x4cea01(this['_stylesProcessor']),_0x2fa5cf(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x8c88f4){const _0x2cceca=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0xce706b}=this['editor']['locale'],{rootName:_0x2eb2e0='main',dataControllerDowncastOptions:_0x44850f={},transformations:_0xcb66a6=_0x2cceca['transformations']||[]}=_0x8c88f4||{};this['isBusy']=!0x0,this['refresh']();const _0x432661=this['_getRootDataHTMLFragment'](_0x2eb2e0,_0x44850f),_0x587494=_0x35896d(_0x432661['ownerDocument'],'div',{'dir':_0xce706b,'class':'ck-content'},[_0x432661]);return this['_collectAndApplyStyles'](_0xcb66a6,_0x587494)['then'](()=>{const _0x397192=function(_0xff3288){const _0x1f035a=_0xff3288['ownerDocument']['createDocumentFragment']();for(;_0xff3288['firstChild'];)_0x1f035a['appendChild'](_0xff3288['firstChild']);return _0x1f035a;}(_0x587494),_0x322b4d=_0x587494['getAttribute']('style');if(_0x322b4d)for(const _0x37631c of _0x397192['children']){const _0x5f4982=_0x37631c['getAttribute']('style'),_0xe6dfd5=L(this['_stylesProcessor'],[_0x322b4d,_0x5f4982]);_0x37631c['setAttribute']('style',x(_0xe6dfd5));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x397192);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0xe1a7a0,_0x298601){const {data:_0x4e87a1,model:_0x460a46}=this['editor'],_0xef60b6=_0x460a46['document']['getRoot'](_0xe1a7a0),_0x9ed1e6=_0x4e87a1['toView'](_0xef60b6,_0x298601);return _0x4e87a1['htmlProcessor']['domConverter']['viewToDom'](_0x9ed1e6);}async _collectAndApplyStyles(_0x383e7e,_0x16ffe1){const {stylesheets:_0x414a39,inlineCss:_0xa99edf,stripCssClasses:_0x482f5d}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x2b1eab,rootCssVariables:_0x3f3a85}=await h({'stylesheets':_0x414a39||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0xa99edf}),_0x5ae504=[];this['_processElementTree']({'transformations':_0x383e7e,'parsedCssRules':_0x2b1eab,'element':_0x16ffe1,'stripCssClasses':_0x482f5d,'parentCSSVariablesLookup':_0x3f3a85['get']['bind'](_0x3f3a85),'runAfterDocumentTransformation':_0x1cd485=>{_0x5ae504['unshift'](_0x1cd485);}});for(const _0x464210 of _0x5ae504)_0x464210();}_processElementTree({element:_0x5208bc,parsedCssRules:_0x432f86,parentCSSVariablesLookup:_0x3cda91,runAfterDocumentTransformation:_0x3ca15e,stripCssClasses:_0x31873e,transformations:_0x5a4e52}){const {stylesMap:_0x594bfb,localCSSVariables:_0x124278}=function(_0x26f583){const _0x2fc2e1=_0x26f583['element']['getAttribute']('style')||'',_0x51524b=_0x26f583['parsedCssRules']['filter'](_0x5d7d73=>_0x26f583['element']['matches'](_0x5d7d73['flatSelector']))['map'](_0x3a1811=>_0x3a1811['stylesMap']),_0x3c11de=L(_0x26f583['stylesProcessor'],[..._0x51524b,_0x2fc2e1]);return{'localCSSVariables':p(_0x26f583['fallbackCSSVariablesLookup'],_0x3c11de),'stylesMap':_0x3c11de};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x3cda91,'parsedCssRules':_0x432f86,'element':_0x5208bc}),_0x1c41a8=[];for(const _0x10fdc5 of _0x5a4e52){const _0x88edbc=_0x10fdc5(_0x5208bc,_0x594bfb,{'runAfterDocumentTransformation':_0x3ca15e,'runAfterChildrenTransformation':_0x85c0fd=>{_0x1c41a8['unshift'](_0x85c0fd);}});_0x88edbc&&_0x88edbc instanceof HTMLElement&&(_0x5208bc=_0x88edbc);}_0x594bfb['size']?_0x5208bc['setAttribute']('style',x(_0x594bfb)):_0x5208bc['removeAttribute']('style');const _0x4db15c=_0x33192f=>_0x124278['has'](_0x33192f)?_0x124278['get'](_0x33192f):_0x3cda91(_0x33192f);for(const _0x13ff84 of _0x5208bc['children'])_0x13ff84 instanceof HTMLElement&&this['_processElementTree']({'element':_0x13ff84,'parsedCssRules':_0x432f86,'stripCssClasses':_0x31873e,'transformations':_0x5a4e52,'parentCSSVariablesLookup':_0x4db15c,'runAfterDocumentTransformation':_0x3ca15e});_0x31873e&&_0x5208bc['removeAttribute']('class');for(const _0x49ce27 of _0x1c41a8)_0x49ce27();}};function x(_0x5c4252){return _0x5c4252['getStylesEntries']()['map'](_0x38e1c6=>_0x38e1c6['join'](':'))['join'](';')+';';}var C=class extends _0x5c523e{static get['pluginName'](){return'ExportInlineStylesEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){this['editor']['config']['define']('exportInlineStyles',{}),this['editor']['commands']['add']('exportInlineStyles',new g(this['editor']));}afterInit(){!async function(_0x1fb043){const _0x470b77='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x283c4e=0x79128,_0x4efdf8=window['Date']['now'](),_0x420cfd=_0x1fb043['editor'],_0x137f52=new window['Promise'](_0x5bf578=>{_0x420cfd['once']('ready',_0x5bf578);}),_0xf4628={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x21c615=_0x420cfd['config']['get']('licenseKey');async function _0x37bca9(){let _0x415ca5,_0x1a93dd=null,_0x3ed600=null;try{return'GPL'==_0x21c615?'NotAllowed':(_0x415ca5=_0x3602cb(),_0x415ca5?(_0x415ca5['usageEndpoint']&&(_0x3ed600=_0xd17c42(_0x415ca5['usageEndpoint'],_0x415ca5['jti'])),await _0xa569f9()?_0x3c0468()?_0x9f0d1e()?'Expired':_0xf3244d()?('evaluation'==_0x415ca5['licenseType']&&(_0x1a93dd=_0x4c440f('EvaluationLimit')),await _0x4f918a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x9f0d1e(){const _0x1ece7a=['evaluation','trial']['includes'](_0x415ca5['licenseType'])?_0x4efdf8/0x3e8:0xe10*_0x283c4e;return _0x415ca5['exp']<_0x1ece7a;}function _0x3c0468(){const _0x567b93=_0x415ca5['features'];return!!_0x567b93&&(!!_0x567b93['includes']('*')||!!_0x567b93['includes']('EIS'));}function _0xf3244d(){const _0xacf89=_0x415ca5['licensedHosts'];if(!_0xacf89||0x0==_0xacf89['length'])return!0x0;const {hostname:_0x2ef543}=new URL(window['location']['href']);if(_0xacf89['includes'](_0x2ef543))return!0x0;const _0x9ed802=_0x2ef543['split']('.');return _0xacf89['filter'](_0x308762=>_0x308762['includes']('*'))['map'](_0x3d1ac0=>_0x3d1ac0['split']('.'))['filter'](_0x4313cc=>_0x4313cc['length']<=_0x9ed802['length'])['map'](_0x5ec0bb=>Array(_0x9ed802['length']-_0x5ec0bb['length'])['fill']('*'===_0x5ec0bb[0x0]?'*':'')['concat'](_0x5ec0bb))['some'](_0x3141c3=>_0x9ed802['every']((_0x59a281,_0x4b1c2f)=>_0x3141c3[_0x4b1c2f]===_0x59a281||'*'===_0x3141c3[_0x4b1c2f]));}function _0x4f918a(){return _0x1a93dd&&_0x3ed600?new window['Promise']((_0x2b750a,_0x2b4aab)=>{_0x1a93dd['then'](_0x2b750a,_0x2b4aab),_0x3ed600['then'](_0x312713=>{'Valid'!=_0x312713&&_0x2b750a(_0x312713);},_0x2b4aab);}):_0x1a93dd||_0x3ed600||'Valid';}}function _0xd17c42(_0x5c43ae,_0xd3c4f7){return new window['Promise'](_0x160707=>{if(_0x2fea8f())return _0x160707('Valid');_0x143ab5(),_0x420cfd['decorate']('_sendUsageRequest');let _0x3f9fc3=!0x1;const _0x2e6d26=_0x27d62b();function _0x416cf0(_0x1c0f4d){return!!_0x1c0f4d&&('object'==typeof _0x1c0f4d||'function'==typeof _0x1c0f4d)&&'function'==typeof _0x1c0f4d['then']&&'function'==typeof _0x1c0f4d['catch'];}function _0x19c974(_0x26e2bb){_0x171c25(_0x26e2bb)['then'](_0x459292=>_0x459292&&'ok'==_0x459292['status']?_0x127838(_0x32fec2(_0x2e6d26+_0xd3c4f7))!=_0x459292['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x451257=>(_0x9bb9f0(),_0x451257),()=>{const _0x28ddc9=_0x15b650();return null==_0x28ddc9?(_0x9bb9f0(),'Valid'):_0x4efdf8-_0x28ddc9>0x240c8400?'UsageLimit':'Valid';})['then'](_0x160707)['catch'](()=>{_0x160707('UsageLimit');});const _0x213030=0x36ee80;function _0x9bb9f0(){const _0x39a858='llct-'+_0x127838(_0x32fec2(_0x5c43ae)),_0xfb02ae=_0x79e69a(_0x127838(window['Math']['ceil'](_0x4efdf8/_0x213030)));window['localStorage']['setItem'](_0x39a858,_0xfb02ae);}function _0x15b650(){const _0x3966e7='llct-'+_0x127838(_0x32fec2(_0x5c43ae)),_0x3e6963=window['localStorage']['getItem'](_0x3966e7);return _0x3e6963?window['parseInt'](_0x79e69a(_0x3e6963),0x10)*_0x213030:null;}function _0x171c25(_0x280892){return new window['Promise']((_0x2ea573,_0x51e59f)=>{_0x280892['then'](_0x2ea573,_0x51e59f),window['setTimeout'](_0x51e59f,0x1d4c0);});}}_0x420cfd['on']('_sendUsageRequest',(_0x2cb96b,_0xf34cd5)=>{if(_0xf34cd5[0x0]!=_0x5c43ae)return _0x160707('UsageLimit');_0xf34cd5[0x1]={..._0xf34cd5[0x1],'requestId':_0x2e6d26};},{'priority':'high'}),_0x420cfd['on']('_sendUsageRequest',_0x309195=>{_0x416cf0(_0x309195['return'])&&(_0x3f9fc3=!0x0,_0x19c974(_0x309195['return']));},{'priority':'low'}),_0x137f52['then'](()=>{_0x3f9fc3||_0x160707('UsageLimit');});});function _0x2fea8f(){return'auto'==_0x420cfd['editing']['view']['_overlayModeHint'];}function _0x143ab5(){_0x420cfd['editing']['view']['_overlayModeHint']='auto';}}function _0x4c440f(_0x513320){const _0x4c559c=[new window['Promise'](_0x1f2a6d=>setTimeout(_0x1f2a6d,0x93ecc)),_0x137f52['then'](()=>new window['Promise'](_0x5776c2=>{let _0x276297=0x0;_0x420cfd['model']['on']('applyOperation',(_0x321e96,_0x29e8c3)=>{_0x29e8c3[0x0]['isDocumentOperation']&&_0x276297++,0x5e8==_0x276297&&(_0x5776c2(),_0x321e96['off']());});}))];return window['Promise']['race'](_0x4c559c)['then'](()=>_0x513320);}async function _0x567d85(){await _0x137f52;const _0x1efd31=_0x420cfd['commands']['get']('exportInlineStyles');_0x1efd31&&_0x1efd31['on']('execute',_0x25ce0f=>{_0x25ce0f['stop']();},{'priority':'highest'}),_0x420cfd['model']['change']=_0x4f8041,_0x420cfd['model']['enqueueChange']=_0x4f8041,_0x420cfd['enableReadOnlyMode']('model');}function _0x175f64(_0x2a7765){const _0x29c662=_0x2d6c55();_0x420cfd[_0x29c662]='exportInlineStylesLicenseKey'+_0x2a7765,'Valid'!=_0x2a7765&&_0x567d85();}function _0x2d6c55(){const _0x4d4da8=window['String'](window['performance']['now']())['replace']('.','');let _0x111434='D';for(let _0x272821=0x0;_0x272821<_0x4d4da8['length'];_0x272821+=0x2){let _0x479cdb=window['parseInt'](_0x4d4da8['substring'](_0x272821,_0x272821+0x2));_0x479cdb>=0x3e&&(_0x479cdb-=0x3e),_0x111434+=_0x470b77[_0x479cdb];}return _0x111434;}function _0x3602cb(){const _0x3ab281=_0x21c615['split']('.');if(0x3!=_0x3ab281['length'])return null;return _0x4d284b(_0x3ab281[0x1]);function _0x4d284b(_0x45e02a){const _0x4ea08a=_0x7fb1f1(_0x45e02a);return _0x4ea08a&&_0x2509d2()?_0x4ea08a:null;function _0x2509d2(){const _0x2699ec=_0x4ea08a['jti'],_0x5d6a67=window['parseInt'](_0x2699ec['substring'](_0x2699ec['length']-0x8),0x10),_0x235aa1={..._0x4ea08a,'jti':_0x2699ec['substring'](0x0,_0x2699ec['length']-0x8)};return delete _0x235aa1['vc'],_0x32fec2(_0x235aa1)==_0x5d6a67;}}}async function _0xa569f9(){let _0x21563d=!0x0;try{const [_0x14e038,_0x489a50,_0x33e3be]=_0x21c615['split']('.');return _0x253d45(_0x14e038),await _0x192559(_0x14e038,_0x489a50,_0x33e3be),_0x21563d;}catch{return!0x1;}function _0x253d45(_0x31f9fd){const _0x54ee57=_0x7fb1f1(_0x31f9fd);_0x54ee57&&'ES256'==_0x54ee57['alg']||(_0x21563d=!0x1);}async function _0x192559(_0x23694a,_0x3b35e3,_0x2c50ff){const _0x544a84=window['Uint8Array']['from'](_0x11a4c5(_0x2c50ff),_0x1846e8=>_0x1846e8['charCodeAt'](0x0)),_0x5dab44=new window['TextEncoder']()['encode'](_0x23694a+'.'+_0x3b35e3),_0x20b1a3=window['crypto']['subtle'];if(!_0x20b1a3)return;const _0x12adf5=await _0x20b1a3['importKey']('jwk',_0xf4628,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x20b1a3['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x12adf5,_0x544a84,_0x5dab44)||(_0x21563d=!0x1);}}function _0x7fb1f1(_0x1f5c4d){return _0x1f5c4d['startsWith']('ey')?JSON['parse'](_0x11a4c5(_0x1f5c4d)):null;}function _0x11a4c5(_0x16dcd3){return window['atob'](_0x16dcd3['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x32fec2(_0x4894c0){let _0x55c3b3=0x1505;function _0x277607(_0x56f1b5){for(let _0x30669d=0x0;_0x30669d<_0x56f1b5['length'];_0x30669d++){const _0x325546=_0x56f1b5['charCodeAt'](_0x30669d);_0x55c3b3=(_0x55c3b3<<0x5)+_0x55c3b3+_0x325546,_0x55c3b3&=_0x55c3b3;}}function _0xa65a29(_0x3ba8ca){Array['isArray'](_0x3ba8ca)?_0x3ba8ca['forEach'](_0xa65a29):_0x3ba8ca&&'object'==typeof _0x3ba8ca?Object['entries'](_0x3ba8ca)['sort']()['forEach'](([_0x251e00,_0x2978e4])=>{_0x277607(_0x251e00),_0xa65a29(_0x2978e4);}):_0x277607(window['String'](_0x3ba8ca));}return _0xa65a29(_0x4894c0),_0x55c3b3>>>0x0;}function _0x127838(_0x310b91){return _0x310b91['toString'](0x10)['padStart'](0x8,'0');}function _0x79e69a(_0x5a6594){return _0x5a6594['split']('')['reverse']()['join']('');}function _0x4f8041(){}_0x175f64(await _0x37bca9());}(this);}},I=class extends _0x5c523e{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'ExportInlineStyles';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[C];}init(){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x51ffce=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5d1e12;for(const _0x3b5f9b in _0x51ffce){const _0x54cfca=_0x3b5f9b,_0x4d66b0=_0x51ffce[_0x54cfca];if('exportInlineStylesLicenseKeyValid'==_0x4d66b0||'exportInlineStylesLicenseKeyInvalid'==_0x4d66b0||'exportInlineStylesLicenseKeyExpired'==_0x4d66b0||'exportInlineStylesLicenseKeyDomainLimit'==_0x4d66b0||'exportInlineStylesLicenseKeyNotAllowed'==_0x4d66b0||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x4d66b0||'exportInlineStylesLicenseKeyUsageLimit'==_0x4d66b0){delete _0x51ffce[_0x54cfca],_0x5d1e12=_0x4d66b0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x5d1e12&&_0x51ffce['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x5d1e12&&_0x51ffce['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x5d1e12&&_0x51ffce['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x5d1e12&&_0x51ffce['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x5d1e12&&_0x51ffce['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x5d1e12&&_0x51ffce['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}};export{I as ExportInlineStyles,g as ExportInlineStylesCommand,C as ExportInlineStylesEditing,d as dropImportantStyleSuffix};
|
|
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": [
|