@ckeditor/ckeditor5-export-inline-styles 48.4.0-alpha.2 → 48.4.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _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};
|
|
23
|
+
import{Command as _0x1ed04d,Plugin as _0x4f3b6b}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x3f3a9d,createElement as _0xe58db1,uid as _0x1ad714}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x152db4,addMarginStylesRules as _0x58b228,addPaddingStylesRules as _0x175289}from'@ckeditor/ckeditor5-engine';import{calculate as _0x30ffe3,compare as _0x9a90}from'specificity';function f(_0x4d308d){const _0x5d9653=[];let _0x34a366='',_0x238772=0x0;for(;_0x238772<_0x4d308d['length'];){const _0xc5bc82=_0x4d308d[_0x238772];if('('===_0xc5bc82){const _0x252475=y(_0x4d308d,_0x238772+0x1);if(-0x1===_0x252475)return[];_0x34a366+=_0x4d308d['slice'](_0x238772,_0x252475+0x1),_0x238772=_0x252475+0x1;}else','!==_0xc5bc82||_0x34a366['endsWith']('\x5c')?(_0x34a366+=_0xc5bc82,_0x238772++):(_0x5d9653['push'](_0x34a366['trim']()),_0x34a366='',_0x238772++);}return _0x34a366['trim']()&&_0x5d9653['push'](_0x34a366['trim']()),_0x5d9653['filter'](Boolean);}function y(_0x5d9b41,_0x4951ca){let _0x7b7a75=0x1;for(let _0x50810f=_0x4951ca;_0x50810f<_0x5d9b41['length'];_0x50810f++){const _0x256e91=_0x5d9b41[_0x50810f];if('('===_0x256e91)_0x7b7a75++;else{if(')'===_0x256e91&&(_0x7b7a75--,0x0===_0x7b7a75))return _0x50810f;}}return-0x1;}function d(_0x2435b6){return _0x2435b6['replace'](/!\s*important/i,'')['trim']();}function w(_0x194d59){const _0x5aa62d=new Map();for(const {stylesMap:_0x4a3ab1,flatSelector:_0x3c477f}of _0x194d59){if(':root'!==_0x3c477f)continue;const _0x2925d2=p(_0x5aa62d['get']['bind'](_0x5aa62d),_0x4a3ab1);for(const [_0x46b44e,_0x19db59]of _0x2925d2)_0x5aa62d['set'](_0x46b44e,_0x19db59);}return _0x5aa62d;}function p(_0xc2e370,_0x1e2b19){const _0x1bbe12=new Map(),_0x56e1de=_0x9c309d=>_0x1bbe12['has'](_0x9c309d)?_0x1bbe12['get'](_0x9c309d):_0xc2e370(_0x9c309d);for(const [_0x174546,_0x49fedd]of _0x1e2b19['getStylesEntries']())if(_0x49fedd&&_0x174546['startsWith']('--')){const _0x3bc7c7=m(_0x56e1de,_0x49fedd);_0x1bbe12['set'](_0x174546,_0x3bc7c7),_0x1e2b19['remove'](_0x174546);}for(const [_0x26e7d5,_0x4d1eb2]of _0x1e2b19['getStylesEntries']())if(_0x4d1eb2){const _0x23b0e8=m(_0x56e1de,_0x4d1eb2);_0x1e2b19['set'](_0x26e7d5,_0x23b0e8);}return _0x1bbe12;}function m(_0x5ed1df,_0x3a0c7c){return function(_0x288d11,_0x55bb2a){let _0x125791='',_0xb0f80d=0x0;for(;_0xb0f80d<_0x288d11['length'];){const _0x1bc6d4=_0x288d11['indexOf']('var(',_0xb0f80d);if(-0x1===_0x1bc6d4){_0x125791+=_0x288d11['slice'](_0xb0f80d);break;}_0x125791+=_0x288d11['slice'](_0xb0f80d,_0x1bc6d4);const _0x3bb06d=_0x1bc6d4+0x4,_0x94fdee=y(_0x288d11,_0x3bb06d);_0x125791+=_0x55bb2a(_0x288d11['substring'](_0x3bb06d,_0x94fdee)),_0xb0f80d=_0x94fdee+0x1;}return _0x125791;}(_0x3a0c7c,_0x21409a=>{const [_0x476442,_0x27d995]=f(_0x21409a),_0x2af2de=_0x5ed1df(_0x476442);return void 0x0!==_0x2af2de?_0x2af2de:_0x27d995?m(_0x5ed1df,_0x27d995):'var('+_0x476442+')';});}async function h(_0x2e19d0){const _0x49e61c=[await _0x3f3a9d(_0x2e19d0['stylesheets']),_0x2e19d0['inlineCss']]['filter'](_0x542996=>_0x542996&&_0x542996['length'])['join']('\x0a'),_0x7589d0=await async function(_0x21cfb5,_0x106b7f){const _0x3ad175=new CSSStyleSheet();return await _0x3ad175['replace'](_0x106b7f),S(Array['from'](_0x3ad175['cssRules'])['filter'](_0x50c5b5=>_0x50c5b5 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x48248d,contentCssText:_0x33ba44})=>{const _0x18d879=f(_0x48248d),_0x3ded60=new _0x152db4(_0x21cfb5)['setTo'](_0x33ba44);return _0x18d879['map'](_0x124521=>{const _0x25aeea=function(_0x419d7f){const _0x49da3a=':where(';let _0x33bf06=_0x419d7f,_0x332420=0x0;for(let _0x1d01a9=0x0;_0x1d01a9<0x64;_0x1d01a9++){const _0x4d359b=_0x33bf06['indexOf'](_0x49da3a,_0x332420);if(-0x1===_0x4d359b)break;let _0x19a30b=0x0;for(let _0x35b6e7=0x0;_0x35b6e7<_0x4d359b;_0x35b6e7++)'('===_0x33bf06[_0x35b6e7]?_0x19a30b++:')'===_0x33bf06[_0x35b6e7]&&_0x19a30b--;if(_0x19a30b>0x0){_0x332420=_0x4d359b+0x7;continue;}let _0x2c7c9f=-0x1;for(let _0x510ec0=_0x4d359b+0x7,_0x86a265=0x1;_0x510ec0<_0x33bf06['length'];_0x510ec0++)if('('===_0x33bf06[_0x510ec0]?_0x86a265++:')'===_0x33bf06[_0x510ec0]&&_0x86a265--,!_0x86a265){_0x2c7c9f=_0x510ec0;break;}-0x1!==_0x2c7c9f?(_0x33bf06=_0x33bf06['slice'](0x0,_0x4d359b)+_0x33bf06['slice'](_0x2c7c9f+0x1),_0x332420=_0x4d359b):_0x332420=_0x4d359b+0x7;}return _0x33bf06['replace'](/\s+/g,'\x20')['trim']();}(_0x124521),_0x267296=_0x25aeea?_0x30ffe3(_0x25aeea)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x3ded60,'flatSelector':_0x124521,'specificity':_0x267296};});})['sort']((_0x54d55b,_0x1b3111)=>_0x9a90(_0x54d55b['specificity'],_0x1b3111['specificity']));}(_0x2e19d0['stylesProcessor'],_0x49e61c);return{'parsedCssRules':_0x7589d0,'rootCssVariables':w(_0x7589d0)};}function S(_0x4aecaa,_0x4f024e=''){return _0x4aecaa['flatMap'](_0x4a0ab6=>{const {selectorText:_0x5684c2,cssText:_0x32aaee,cssRules:_0x38b81a}=_0x4a0ab6;if(!_0x5684c2)return[];const _0x79e178=_0x5684c2['replace'](/&/g,_0x4f024e);let _0x4a111b=_0x32aaee['replace'](_0x5684c2,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x38b81a||!_0x38b81a['length'])return[{'selectorText':_0x79e178,'contentCssText':_0x4a111b}];for(const _0x38ae0e of _0x38b81a)_0x4a111b=_0x4a111b['replace'](_0x38ae0e['cssText'],'')['trim']();return[{'selectorText':_0x79e178,'contentCssText':_0x4a111b},...S(Array['from'](_0x38b81a),_0x79e178)];});}function L(_0x27d0f7,_0x5d9c52){const _0x186d3d=new _0x152db4(_0x27d0f7);for(const _0x4d7bbe of _0x5d9c52){let _0xb78465;if(_0xb78465='string'==typeof _0x4d7bbe?new _0x152db4(_0x27d0f7)['setTo'](_0x4d7bbe):_0x4d7bbe,_0xb78465){for(const [_0x141686,_0x167efe]of _0xb78465['getStylesEntries']())_0x186d3d['set'](_0x141686,_0x167efe);}}return _0x186d3d;}var g=class extends _0x1ed04d{_stylesProcessor;constructor(_0x3e1170){super(_0x3e1170),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x58b228(this['_stylesProcessor']),_0x175289(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x3543b8){const _0x9433d6=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x44cc54}=this['editor']['locale'],{rootName:_0x4067f4='main',dataControllerDowncastOptions:_0x54429b={},transformations:_0x1623d9=_0x9433d6['transformations']||[]}=_0x3543b8||{};this['isBusy']=!0x0,this['refresh']();const _0x247b95=this['_getRootDataHTMLFragment'](_0x4067f4,_0x54429b),_0x481ed2=_0xe58db1(_0x247b95['ownerDocument'],'div',{'dir':_0x44cc54,'class':'ck-content'},[_0x247b95]);return this['_collectAndApplyStyles'](_0x1623d9,_0x481ed2)['then'](()=>{const _0x732327=function(_0x17c81d){const _0x23c5d4=_0x17c81d['ownerDocument']['createDocumentFragment']();for(;_0x17c81d['firstChild'];)_0x23c5d4['appendChild'](_0x17c81d['firstChild']);return _0x23c5d4;}(_0x481ed2),_0xad8390=_0x481ed2['getAttribute']('style');if(_0xad8390)for(const _0x561e66 of _0x732327['children']){const _0x2f79e8=_0x561e66['getAttribute']('style'),_0x493f41=L(this['_stylesProcessor'],[_0xad8390,_0x2f79e8]);_0x561e66['setAttribute']('style',x(_0x493f41));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x732327);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x5b40eb,_0x211bf9){const {data:_0x3b1b56,model:_0x48a77f}=this['editor'],_0x5a1e6b=_0x48a77f['document']['getRoot'](_0x5b40eb),_0x2d5060=_0x3b1b56['toView'](_0x5a1e6b,_0x211bf9);return _0x3b1b56['htmlProcessor']['domConverter']['viewToDom'](_0x2d5060);}async _collectAndApplyStyles(_0x25af14,_0x466e5b){const {stylesheets:_0xa66535,inlineCss:_0x328906,stripCssClasses:_0x2313bd}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x53e811,rootCssVariables:_0x10bd45}=await h({'stylesheets':_0xa66535||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x328906}),_0xda787=[];this['_processElementTree']({'transformations':_0x25af14,'parsedCssRules':_0x53e811,'element':_0x466e5b,'stripCssClasses':_0x2313bd,'parentCSSVariablesLookup':_0x10bd45['get']['bind'](_0x10bd45),'runAfterDocumentTransformation':_0x4cc1ee=>{_0xda787['unshift'](_0x4cc1ee);}});for(const _0x6c7428 of _0xda787)_0x6c7428();}_processElementTree({element:_0x1b85b6,parsedCssRules:_0x6e3c41,parentCSSVariablesLookup:_0x38cf45,runAfterDocumentTransformation:_0x35add9,stripCssClasses:_0x1d7d7b,transformations:_0x85ddd3}){const {stylesMap:_0x242df6,localCSSVariables:_0x155a3d}=function(_0x36b01b){const _0x213e37=_0x36b01b['element']['getAttribute']('style')||'',_0x3137c4=_0x36b01b['parsedCssRules']['filter'](_0x296eaf=>_0x36b01b['element']['matches'](_0x296eaf['flatSelector']))['map'](_0x2d5897=>_0x2d5897['stylesMap']),_0x519aba=L(_0x36b01b['stylesProcessor'],[..._0x3137c4,_0x213e37]);return{'localCSSVariables':p(_0x36b01b['fallbackCSSVariablesLookup'],_0x519aba),'stylesMap':_0x519aba};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x38cf45,'parsedCssRules':_0x6e3c41,'element':_0x1b85b6}),_0x570dc8=[];for(const _0x24e496 of _0x85ddd3){const _0x360e07=_0x24e496(_0x1b85b6,_0x242df6,{'runAfterDocumentTransformation':_0x35add9,'runAfterChildrenTransformation':_0xd14b=>{_0x570dc8['unshift'](_0xd14b);}});_0x360e07&&_0x360e07 instanceof HTMLElement&&(_0x1b85b6=_0x360e07);}_0x242df6['size']?_0x1b85b6['setAttribute']('style',x(_0x242df6)):_0x1b85b6['removeAttribute']('style');const _0x5813be=_0x24b57f=>_0x155a3d['has'](_0x24b57f)?_0x155a3d['get'](_0x24b57f):_0x38cf45(_0x24b57f);for(const _0x2f853d of _0x1b85b6['children'])_0x2f853d instanceof HTMLElement&&this['_processElementTree']({'element':_0x2f853d,'parsedCssRules':_0x6e3c41,'stripCssClasses':_0x1d7d7b,'transformations':_0x85ddd3,'parentCSSVariablesLookup':_0x5813be,'runAfterDocumentTransformation':_0x35add9});_0x1d7d7b&&_0x1b85b6['removeAttribute']('class');for(const _0x59d9b9 of _0x570dc8)_0x59d9b9();}};function x(_0x5c2c28){return _0x5c2c28['getStylesEntries']()['map'](_0x11c533=>_0x11c533['join'](':'))['join'](';')+';';}var C=class extends _0x4f3b6b{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(_0x131d4c){const _0x1b015f='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x430333=0x79188,_0x3e7255=window['Date']['now'](),_0x399931=_0x131d4c['editor'],_0x513983=new window['Promise'](_0x4e0c20=>{_0x399931['once']('ready',_0x4e0c20);}),_0x4f1087={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x86e657=_0x399931['config']['get']('licenseKey');async function _0x25c003(){let _0x54b38a,_0x4cc4c4=null,_0x11cc80=null;try{return'GPL'==_0x86e657?'NotAllowed':(_0x54b38a=_0x824345(),_0x54b38a?(_0x54b38a['usageEndpoint']&&(_0x11cc80=_0x2b656e(_0x54b38a['usageEndpoint'],_0x54b38a['jti'])),await _0x321641()?_0x579839()?_0x23ef30()?'Expired':_0x5e071c()?('evaluation'==_0x54b38a['licenseType']&&(_0x4cc4c4=_0x56a085('EvaluationLimit')),await _0x41405a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x23ef30(){const _0xc6e520=['evaluation','trial']['includes'](_0x54b38a['licenseType'])?_0x3e7255/0x3e8:0xe10*_0x430333;return _0x54b38a['exp']<_0xc6e520;}function _0x579839(){const _0x233ff8=_0x54b38a['features'];return!!_0x233ff8&&(!!_0x233ff8['includes']('*')||!!_0x233ff8['includes']('EIS'));}function _0x5e071c(){const _0x29e2f6=_0x54b38a['licensedHosts'];if(!_0x29e2f6||0x0==_0x29e2f6['length'])return!0x0;const {hostname:_0x1073a2}=new URL(window['location']['href']);if(_0x29e2f6['includes'](_0x1073a2))return!0x0;const _0x460d14=_0x1073a2['split']('.');return _0x29e2f6['filter'](_0x398776=>_0x398776['includes']('*'))['map'](_0x2de6c7=>_0x2de6c7['split']('.'))['filter'](_0x5ebc59=>_0x5ebc59['length']<=_0x460d14['length'])['map'](_0x2396d7=>Array(_0x460d14['length']-_0x2396d7['length'])['fill']('*'===_0x2396d7[0x0]?'*':'')['concat'](_0x2396d7))['some'](_0x22c3ba=>_0x460d14['every']((_0x4303c2,_0x3fc5ee)=>_0x22c3ba[_0x3fc5ee]===_0x4303c2||'*'===_0x22c3ba[_0x3fc5ee]));}function _0x41405a(){return _0x4cc4c4&&_0x11cc80?new window['Promise']((_0x1b2cf1,_0xffc80d)=>{_0x4cc4c4['then'](_0x1b2cf1,_0xffc80d),_0x11cc80['then'](_0x32659f=>{'Valid'!=_0x32659f&&_0x1b2cf1(_0x32659f);},_0xffc80d);}):_0x4cc4c4||_0x11cc80||'Valid';}}function _0x2b656e(_0x2fa04b,_0x35d631){return new window['Promise'](_0x10fda3=>{if(_0x116e49())return _0x10fda3('Valid');_0x15a2b6(),_0x399931['decorate']('_sendUsageRequest');let _0x3e9ece=!0x1;const _0x23bdb2=_0x1ad714();function _0x5482fd(_0x2d5e00){return!!_0x2d5e00&&('object'==typeof _0x2d5e00||'function'==typeof _0x2d5e00)&&'function'==typeof _0x2d5e00['then']&&'function'==typeof _0x2d5e00['catch'];}function _0x364c00(_0x503d69){_0x2c8cff(_0x503d69)['then'](_0xdd2b=>_0xdd2b&&'ok'==_0xdd2b['status']?_0x4d8e50(_0x3f6a2b(_0x23bdb2+_0x35d631))!=_0xdd2b['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x9271a8=>(_0x340227(),_0x9271a8),()=>{const _0x38a9f6=_0x72e225();return null==_0x38a9f6?(_0x340227(),'Valid'):_0x3e7255-_0x38a9f6>0x240c8400?'UsageLimit':'Valid';})['then'](_0x10fda3)['catch'](()=>{_0x10fda3('UsageLimit');});const _0x565d50=0x36ee80;function _0x340227(){const _0x2968c8='llct-'+_0x4d8e50(_0x3f6a2b(_0x2fa04b)),_0x13eb13=_0x6b283e(_0x4d8e50(window['Math']['ceil'](_0x3e7255/_0x565d50)));window['localStorage']['setItem'](_0x2968c8,_0x13eb13);}function _0x72e225(){const _0x3e6f62='llct-'+_0x4d8e50(_0x3f6a2b(_0x2fa04b)),_0x45e87e=window['localStorage']['getItem'](_0x3e6f62);return _0x45e87e?window['parseInt'](_0x6b283e(_0x45e87e),0x10)*_0x565d50:null;}function _0x2c8cff(_0x3be94d){return new window['Promise']((_0x2a6adc,_0x39b9ef)=>{_0x3be94d['then'](_0x2a6adc,_0x39b9ef),window['setTimeout'](_0x39b9ef,0x1d4c0);});}}_0x399931['on']('_sendUsageRequest',(_0x59a988,_0x1148ea)=>{if(_0x1148ea[0x0]!=_0x2fa04b)return _0x10fda3('UsageLimit');_0x1148ea[0x1]={..._0x1148ea[0x1],'requestId':_0x23bdb2};},{'priority':'high'}),_0x399931['on']('_sendUsageRequest',_0x46487b=>{_0x5482fd(_0x46487b['return'])&&(_0x3e9ece=!0x0,_0x364c00(_0x46487b['return']));},{'priority':'low'}),_0x513983['then'](()=>{_0x3e9ece||_0x10fda3('UsageLimit');});});function _0x116e49(){return'auto'==_0x399931['editing']['view']['_overlayModeHint'];}function _0x15a2b6(){_0x399931['editing']['view']['_overlayModeHint']='auto';}}function _0x56a085(_0x48b02b){const _0x3e4898=[new window['Promise'](_0x18ef52=>setTimeout(_0x18ef52,0x93ecc)),_0x513983['then'](()=>new window['Promise'](_0x3e75e8=>{let _0x231cc7=0x0;_0x399931['model']['on']('applyOperation',(_0x1f857b,_0x27972e)=>{_0x27972e[0x0]['isDocumentOperation']&&_0x231cc7++,0x5e8==_0x231cc7&&(_0x3e75e8(),_0x1f857b['off']());});}))];return window['Promise']['race'](_0x3e4898)['then'](()=>_0x48b02b);}async function _0x4de93d(){await _0x513983;const _0x6b1b74=_0x399931['commands']['get']('exportInlineStyles');_0x6b1b74&&_0x6b1b74['on']('execute',_0x415dcb=>{_0x415dcb['stop']();},{'priority':'highest'}),_0x399931['model']['change']=_0x2887f7,_0x399931['model']['enqueueChange']=_0x2887f7,_0x399931['enableReadOnlyMode']('model');}function _0x4435e2(_0x5b1340){const _0x1b47d5=_0x484231();_0x399931[_0x1b47d5]='exportInlineStylesLicenseKey'+_0x5b1340,'Valid'!=_0x5b1340&&_0x4de93d();}function _0x484231(){const _0x100c59=window['String'](window['performance']['now']())['replace']('.','');let _0x3a6758='D';for(let _0x2c7d55=0x0;_0x2c7d55<_0x100c59['length'];_0x2c7d55+=0x2){let _0x2765f5=window['parseInt'](_0x100c59['substring'](_0x2c7d55,_0x2c7d55+0x2));_0x2765f5>=0x3e&&(_0x2765f5-=0x3e),_0x3a6758+=_0x1b015f[_0x2765f5];}return _0x3a6758;}function _0x824345(){const _0x381a94=_0x86e657['split']('.');if(0x3!=_0x381a94['length'])return null;return _0x2d42b3(_0x381a94[0x1]);function _0x2d42b3(_0xc73e11){const _0x5d7286=_0x4bee77(_0xc73e11);return _0x5d7286&&_0x44a002()?_0x5d7286:null;function _0x44a002(){const _0x32bd11=_0x5d7286['jti'],_0x16cc0a=window['parseInt'](_0x32bd11['substring'](_0x32bd11['length']-0x8),0x10),_0x564845={..._0x5d7286,'jti':_0x32bd11['substring'](0x0,_0x32bd11['length']-0x8)};return delete _0x564845['vc'],_0x3f6a2b(_0x564845)==_0x16cc0a;}}}async function _0x321641(){let _0x342bed=!0x0;try{const [_0x3975fe,_0x4aa38a,_0xdc21f4]=_0x86e657['split']('.');return _0x2c2932(_0x3975fe),await _0x50b3c7(_0x3975fe,_0x4aa38a,_0xdc21f4),_0x342bed;}catch{return!0x1;}function _0x2c2932(_0x3e9487){const _0x4a8081=_0x4bee77(_0x3e9487);_0x4a8081&&'ES256'==_0x4a8081['alg']||(_0x342bed=!0x1);}async function _0x50b3c7(_0x5ce558,_0x42be26,_0x2ffbed){const _0x5bf98b=window['Uint8Array']['from'](_0x3c2bfc(_0x2ffbed),_0x3e2071=>_0x3e2071['charCodeAt'](0x0)),_0x29cd4b=new window['TextEncoder']()['encode'](_0x5ce558+'.'+_0x42be26),_0x2e5552=window['crypto']['subtle'];if(!_0x2e5552)return;const _0x24c77f=await _0x2e5552['importKey']('jwk',_0x4f1087,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2e5552['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x24c77f,_0x5bf98b,_0x29cd4b)||(_0x342bed=!0x1);}}function _0x4bee77(_0x15a82e){return _0x15a82e['startsWith']('ey')?JSON['parse'](_0x3c2bfc(_0x15a82e)):null;}function _0x3c2bfc(_0x50dfa7){return window['atob'](_0x50dfa7['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3f6a2b(_0x568c40){let _0x39119c=0x1505;function _0x33246e(_0x3dd6a2){for(let _0x2900d0=0x0;_0x2900d0<_0x3dd6a2['length'];_0x2900d0++){const _0x357906=_0x3dd6a2['charCodeAt'](_0x2900d0);_0x39119c=(_0x39119c<<0x5)+_0x39119c+_0x357906,_0x39119c&=_0x39119c;}}function _0x38a694(_0x1c390c){Array['isArray'](_0x1c390c)?_0x1c390c['forEach'](_0x38a694):_0x1c390c&&'object'==typeof _0x1c390c?Object['entries'](_0x1c390c)['sort']()['forEach'](([_0x294b87,_0x1ba0d4])=>{_0x33246e(_0x294b87),_0x38a694(_0x1ba0d4);}):_0x33246e(window['String'](_0x1c390c));}return _0x38a694(_0x568c40),_0x39119c>>>0x0;}function _0x4d8e50(_0x2b9845){return _0x2b9845['toString'](0x10)['padStart'](0x8,'0');}function _0x6b283e(_0x82244e){return _0x82244e['split']('')['reverse']()['join']('');}function _0x2887f7(){}_0x4435e2(await _0x25c003());}(this);}},I=class extends _0x4f3b6b{['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 _0x174ac4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x169754;for(const _0x4446bc in _0x174ac4){const _0x2fb1b5=_0x4446bc,_0x4c2c25=_0x174ac4[_0x2fb1b5];if('exportInlineStylesLicenseKeyValid'==_0x4c2c25||'exportInlineStylesLicenseKeyInvalid'==_0x4c2c25||'exportInlineStylesLicenseKeyExpired'==_0x4c2c25||'exportInlineStylesLicenseKeyDomainLimit'==_0x4c2c25||'exportInlineStylesLicenseKeyNotAllowed'==_0x4c2c25||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x4c2c25||'exportInlineStylesLicenseKeyUsageLimit'==_0x4c2c25){delete _0x174ac4[_0x2fb1b5],_0x169754=_0x4c2c25,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x169754&&_0x174ac4['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x169754&&_0x174ac4['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x169754&&_0x174ac4['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x169754&&_0x174ac4['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x169754&&_0x174ac4['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x169754&&_0x174ac4['_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.4",
|
|
4
4
|
"description": "The export with inline styles feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ckeditor/ckeditor5-core": "48.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.4",
|
|
38
|
+
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.4",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.4",
|
|
40
40
|
"specificity": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|