@ckeditor/ckeditor5-line-height 48.3.1-alpha.0 → 48.3.1-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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x3bf5bf,Plugin as _0xbaf299}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x222bea,Collection as _0xfc589a,first as _0x3646ee,uid as _0x1e32e0}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x41f493,isPercentageStyleValue as _0x37905d}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x75623a,MenuBarMenuListItemView as _0xd7c32e,MenuBarMenuListView as _0x37387c,MenuBarMenuView as _0x186ae5,UIModel as _0x6b9796,addListToDropdown as _0x35a00e,createDropdown as _0x3baacd}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x3e8ee4}from'@ckeditor/ckeditor5-icons';var p=class extends _0x3bf5bf{['refresh'](){const _0x36ea35=this['editor']['model']['document'],_0x42f4cc=_0x3646ee(_0x36ea35['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x42f4cc)&&this['_canHaveLineHeight'](_0x42f4cc),this['value']=this['isEnabled']&&_0x42f4cc['getAttribute']('lineHeight');}['execute'](_0x196027={}){const _0x32acd8=this['editor']['model'],_0x21c2c2=_0x32acd8['document']['selection'],_0xa5fd9a=_0x196027['value'];_0x32acd8['change'](_0x589911=>{const _0x4b0c09=Array['from'](_0x21c2c2['getSelectedBlocks']())['filter'](_0x5c735e=>this['_canHaveLineHeight'](_0x5c735e));for(const _0x31c02d of _0x4b0c09)_0xa5fd9a?_0x589911['setAttribute']('lineHeight',_0xa5fd9a,_0x31c02d):_0x589911['removeAttribute']('lineHeight',_0x31c02d);});}['_canHaveLineHeight'](_0x4d14bc){return this['editor']['model']['schema']['checkAttribute'](_0x4d14bc,'lineHeight');}};const y={get 'single'(){return{'title':'Single','model':'single','view':{'key':'class','value':'line-height-single'}};},get 'double'(){return{'title':'Double','model':'double','view':{'key':'class','value':'line-height-double'}};}};function H(_0x5e5a44){return'string'==typeof _0x5e5a44&&'default'===_0x5e5a44['toLowerCase']();}function L(_0x5151fd){return _0x5151fd['options']['map'](_0x297940=>{return H(_0x297940)?{'title':String(_0x5151fd['defaultValue']),'model':'default'}:('number'==typeof _0x297940&&(_0x297940=String(_0x297940)),'string'!=typeof _0x297940?_0x297940:parseFloat(_0x297940)?{'title':_0x297940,'model':_0x297940,'view':{'name':'span','styles':{'line-height':_0x297940}}}:'string'==typeof(_0x5c20ef=_0x297940)?y[_0x5c20ef]:y[_0x5c20ef['model']]);var _0x5c20ef;})['filter'](_0x2e25dd=>void 0x0!==_0x2e25dd);}var v=class extends _0xbaf299{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {plugins:_0x3b45b7,conversion:_0x30bbc9}=this['editor'];_0x3b45b7['has']('ListEditing')&&_0x3b45b7['has']('TodoListEditing')&&(_0x3b45b7['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x35253a,_0x4dacd0,_0x3bf9c7,_0x47afad,_0x30e474){'todo'==_0x30e474['getAttribute']('listType')&&_0x4dacd0&&(_0x35253a['addClass']('ck-list-marker-line-height',_0x3bf9c7),_0x35253a['setStyle']('--ck-content-list-marker-line-height',_0x4dacd0,_0x3bf9c7));}}),_0x30bbc9['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x30bbc9['for']('upcast')['add'](_0x2fa2a3=>{_0x2fa2a3['on']('element:li',function(_0x189026){const _0x3a6c78=new _0x41f493(_0x189026);return(_0x189eab,_0x20aa43,_0x47dad2)=>{const _0x1afd71=_0x3a6c78['match'](_0x20aa43['viewItem']);if(!_0x1afd71)return;const _0x1d5847=_0x1afd71['match'];_0x1d5847['name']=!0x1,_0x47dad2['consumable']['consume'](_0x20aa43['viewItem'],_0x1d5847);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0xbaf299{static get['pluginName'](){return'LineHeightEditing';}static get['requires'](){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x25c4d1){super(_0x25c4d1),_0x25c4d1['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}['init'](){const _0x21a15c=this['editor'];this['_validateConfig'](),_0x21a15c['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x21a15c['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x21a15c['commands']['add']('lineHeight',new p(_0x21a15c)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}['afterInit'](){!async function(_0x4dc002){const _0x50fbea='PHQ3YUIBrl0XdnwG9kez8sfpMv1ytWFRNZOV5jJaq7Tc2ogub64xCKDEALSihm',_0x22bb39=0x78fa8,_0xdc23ac=window['Date']['now'](),_0x64de3=_0x4dc002['editor'],_0x4ab4f3=new window['Promise'](_0x1a10be=>{_0x64de3['once']('ready',_0x1a10be);}),_0x587ead={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x947a77=_0x64de3['config']['get']('licenseKey');async function _0x4f2ac9(){let _0x93eda7,_0x5a532a=null,_0x57fc62=null;try{return'GPL'==_0x947a77?'NotAllowed':(_0x93eda7=_0xc8b5d2(),_0x93eda7?(_0x93eda7['usageEndpoint']&&(_0x57fc62=_0x4e728b(_0x93eda7['usageEndpoint'],_0x93eda7['jti'])),await _0x2085ca()?_0x9e05b9()?_0x184dec()?'Expired':_0x397dc9()?('evaluation'==_0x93eda7['licenseType']&&(_0x5a532a=_0x47031f('EvaluationLimit')),await _0x55b375()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x184dec(){const _0x530ccd=['evaluation','trial']['includes'](_0x93eda7['licenseType'])?_0xdc23ac/0x3e8:0xe10*_0x22bb39;return _0x93eda7['exp']<_0x530ccd;}function _0x9e05b9(){const _0x5b1062=_0x93eda7['features'];return!!_0x5b1062&&(!!_0x5b1062['includes']('*')||!!_0x5b1062['includes']('LH'));}function _0x397dc9(){const _0x5aa4f7=_0x93eda7['licensedHosts'];if(!_0x5aa4f7||0x0==_0x5aa4f7['length'])return!0x0;const {hostname:_0x10b230}=new URL(window['location']['href']);if(_0x5aa4f7['includes'](_0x10b230))return!0x0;const _0x348ed2=_0x10b230['split']('.');return _0x5aa4f7['filter'](_0x4a6ab2=>_0x4a6ab2['includes']('*'))['map'](_0x4ca13=>_0x4ca13['split']('.'))['filter'](_0x222594=>_0x222594['length']<=_0x348ed2['length'])['map'](_0x74a376=>Array(_0x348ed2['length']-_0x74a376['length'])['fill']('*'===_0x74a376[0x0]?'*':'')['concat'](_0x74a376))['some'](_0x35cd34=>_0x348ed2['every']((_0x3ec545,_0x52d35b)=>_0x35cd34[_0x52d35b]===_0x3ec545||'*'===_0x35cd34[_0x52d35b]));}function _0x55b375(){return _0x5a532a&&_0x57fc62?new window['Promise']((_0x4bf6ed,_0x39288b)=>{_0x5a532a['then'](_0x4bf6ed,_0x39288b),_0x57fc62['then'](_0x5af689=>{'Valid'!=_0x5af689&&_0x4bf6ed(_0x5af689);},_0x39288b);}):_0x5a532a||_0x57fc62||'Valid';}}function _0x4e728b(_0x238268,_0x37e710){return new window['Promise'](_0x5f4d5d=>{if(_0x572a84())return _0x5f4d5d('Valid');_0x2c3cb3(),_0x64de3['decorate']('_sendUsageRequest');let _0x19528f=!0x1;const _0x353d5a=_0x1e32e0();function _0x2c617d(_0x65224b){return!!_0x65224b&&('object'==typeof _0x65224b||'function'==typeof _0x65224b)&&'function'==typeof _0x65224b['then']&&'function'==typeof _0x65224b['catch'];}function _0x50cb16(_0x244677){_0x342127(_0x244677)['then'](_0x30557e=>_0x30557e&&'ok'==_0x30557e['status']?_0x201c53(_0x311136(_0x353d5a+_0x37e710))!=_0x30557e['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x57c769=>(_0x10b9ec(),_0x57c769),()=>{const _0x4dba53=_0x39901e();return null==_0x4dba53?(_0x10b9ec(),'Valid'):_0xdc23ac-_0x4dba53>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5f4d5d)['catch'](()=>{_0x5f4d5d('UsageLimit');});const _0x33fc77=0x36ee80;function _0x10b9ec(){const _0x3fd7c5='llct-'+_0x201c53(_0x311136(_0x238268)),_0x39266=_0x3a4cc8(_0x201c53(window['Math']['ceil'](_0xdc23ac/_0x33fc77)));window['localStorage']['setItem'](_0x3fd7c5,_0x39266);}function _0x39901e(){const _0x209d97='llct-'+_0x201c53(_0x311136(_0x238268)),_0x536462=window['localStorage']['getItem'](_0x209d97);return _0x536462?window['parseInt'](_0x3a4cc8(_0x536462),0x10)*_0x33fc77:null;}function _0x342127(_0xcaf778){return new window['Promise']((_0x4c0cad,_0x250466)=>{_0xcaf778['then'](_0x4c0cad,_0x250466),window['setTimeout'](_0x250466,0x1d4c0);});}}_0x64de3['on']('_sendUsageRequest',(_0x2c342f,_0x46d878)=>{if(_0x46d878[0x0]!=_0x238268)return _0x5f4d5d('UsageLimit');_0x46d878[0x1]={..._0x46d878[0x1],'requestId':_0x353d5a};},{'priority':'high'}),_0x64de3['on']('_sendUsageRequest',_0x3540b7=>{_0x2c617d(_0x3540b7['return'])&&(_0x19528f=!0x0,_0x50cb16(_0x3540b7['return']));},{'priority':'low'}),_0x4ab4f3['then'](()=>{_0x19528f||_0x5f4d5d('UsageLimit');});});function _0x572a84(){return'auto'==_0x64de3['editing']['view']['_overlayModeHint'];}function _0x2c3cb3(){_0x64de3['editing']['view']['_overlayModeHint']='auto';}}function _0x47031f(_0x7f6f51){const _0x2c9398=[new window['Promise'](_0x53c6a3=>setTimeout(_0x53c6a3,0x93ecc)),_0x4ab4f3['then'](()=>new window['Promise'](_0x1f1f7b=>{let _0x2f8497=0x0;_0x64de3['model']['on']('applyOperation',(_0x1843a,_0x48c91c)=>{_0x48c91c[0x0]['isDocumentOperation']&&_0x2f8497++,0x5e8==_0x2f8497&&(_0x1f1f7b(),_0x1843a['off']());});}))];return window['Promise']['race'](_0x2c9398)['then'](()=>_0x7f6f51);}async function _0x270a79(){await _0x4ab4f3,_0x64de3['model']['change']=_0xb2110,_0x64de3['model']['enqueueChange']=_0xb2110,_0x64de3['enableReadOnlyMode']('model');}function _0x2c5aba(_0x405238){const _0x370b1a=_0x1b09df();_0x64de3[_0x370b1a]='lineHeightLicenseKey'+_0x405238,'Valid'!=_0x405238&&_0x270a79();}function _0x1b09df(){const _0x2d8b06=window['String'](window['performance']['now']())['replace']('.','');let _0x123388='P';for(let _0x23b1c9=0x0;_0x23b1c9<_0x2d8b06['length'];_0x23b1c9+=0x2){let _0x391e5e=window['parseInt'](_0x2d8b06['substring'](_0x23b1c9,_0x23b1c9+0x2));_0x391e5e>=0x3e&&(_0x391e5e-=0x3e),_0x123388+=_0x50fbea[_0x391e5e];}return _0x123388;}function _0xc8b5d2(){const _0x4afaa6=_0x947a77['split']('.');if(0x3!=_0x4afaa6['length'])return null;return _0x29360d(_0x4afaa6[0x1]);function _0x29360d(_0x3a8134){const _0x4d8be1=_0x1e4137(_0x3a8134);return _0x4d8be1&&_0x39507f()?_0x4d8be1:null;function _0x39507f(){const _0x8cfbe9=_0x4d8be1['jti'],_0x396c72=window['parseInt'](_0x8cfbe9['substring'](_0x8cfbe9['length']-0x8),0x10),_0x56bd90={..._0x4d8be1,'jti':_0x8cfbe9['substring'](0x0,_0x8cfbe9['length']-0x8)};return delete _0x56bd90['vc'],_0x311136(_0x56bd90)==_0x396c72;}}}async function _0x2085ca(){let _0x133037=!0x0;try{const [_0x413e5a,_0x226ba4,_0x4ad378]=_0x947a77['split']('.');return _0x586d95(_0x413e5a),await _0x1d7dd9(_0x413e5a,_0x226ba4,_0x4ad378),_0x133037;}catch{return!0x1;}function _0x586d95(_0x480c32){const _0x5d4462=_0x1e4137(_0x480c32);_0x5d4462&&'ES256'==_0x5d4462['alg']||(_0x133037=!0x1);}async function _0x1d7dd9(_0x2bdff7,_0x1686d9,_0x4213a7){const _0x528257=window['Uint8Array']['from'](_0x2eb255(_0x4213a7),_0x3dfeb7=>_0x3dfeb7['charCodeAt'](0x0)),_0x299dde=new window['TextEncoder']()['encode'](_0x2bdff7+'.'+_0x1686d9),_0x3105a8=window['crypto']['subtle'];if(!_0x3105a8)return;const _0xbec5a1=await _0x3105a8['importKey']('jwk',_0x587ead,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3105a8['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xbec5a1,_0x528257,_0x299dde)||(_0x133037=!0x1);}}function _0x1e4137(_0x246c74){return _0x246c74['startsWith']('ey')?JSON['parse'](_0x2eb255(_0x246c74)):null;}function _0x2eb255(_0x2d0184){return window['atob'](_0x2d0184['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x311136(_0x471a94){let _0x37d2e8=0x1505;function _0x5b9ce7(_0xe6af32){for(let _0x2c7ffe=0x0;_0x2c7ffe<_0xe6af32['length'];_0x2c7ffe++){const _0x11ea39=_0xe6af32['charCodeAt'](_0x2c7ffe);_0x37d2e8=(_0x37d2e8<<0x5)+_0x37d2e8+_0x11ea39,_0x37d2e8&=_0x37d2e8;}}function _0x23287f(_0x3ad7c9){Array['isArray'](_0x3ad7c9)?_0x3ad7c9['forEach'](_0x23287f):_0x3ad7c9&&'object'==typeof _0x3ad7c9?Object['entries'](_0x3ad7c9)['sort']()['forEach'](([_0x487d85,_0x3bfd31])=>{_0x5b9ce7(_0x487d85),_0x23287f(_0x3bfd31);}):_0x5b9ce7(window['String'](_0x3ad7c9));}return _0x23287f(_0x471a94),_0x37d2e8>>>0x0;}function _0x201c53(_0x10e692){return _0x10e692['toString'](0x10)['padStart'](0x8,'0');}function _0x3a4cc8(_0x79a1bd){return _0x79a1bd['split']('')['reverse']()['join']('');}function _0xb2110(){}_0x2c5aba(await _0x4f2ac9());}(this);}['_validateConfig'](){const _0x33a947=this['editor'];if(!_0x33a947['config']['get']('lineHeight.supportAllValues'))return;const _0x1f2f5a=_0x33a947['config']['get']('lineHeight.options')['filter'](_0x2f737c=>'string'==typeof _0x2f737c&&(!H(_0x2f737c)&&isNaN(Number(_0x2f737c))));if(_0x1f2f5a['length'])throw new _0x222bea('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x1f2f5a});}['_prepareAnyValueConverters'](){const _0x58deea=this['editor'],_0x3799f6=this['editor']['config']['get']('lineHeight.defaultValue');_0x58deea['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x5825eb=>String(_0x5825eb)===String(_0x3799f6)?null:{'key':'style','value':{'line-height':_0x5825eb}}}),_0x58deea['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x427521=>{let _0x42f9da=_0x427521['getStyle']('line-height');return _0x37905d(_0x42f9da)&&(_0x42f9da=String(Number(_0x42f9da['slice'](0x0,-0x1))/0x64)),String(_0x42f9da)===String(_0x3799f6)?null:_0x42f9da;}},'view':{'styles':{'line-height':/.*/}}});}['_preparePredefinedConverters'](){const _0xf72811=this['editor'],_0x40ea99=this['editor']['config']['get']('lineHeight.defaultValue'),_0x30ce94=function(_0x5c16b2,_0x19394a){const _0x555ff2={'model':{'key':_0x5c16b2,'values':[]},'view':{}};for(const _0x26de21 of _0x19394a)'class'===_0x26de21['view']?.['key']?(_0x555ff2['model']['values']['push'](_0x26de21['model']),_0x555ff2['view'][_0x26de21['model']]={'key':'class','value':_0x26de21['view']['value']}):(_0x555ff2['model']['values']['push'](_0x26de21['model']),_0x555ff2['view'][_0x26de21['model']]={'key':'style','value':'line-height:'+_0x26de21['model']+';'});return _0x555ff2;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x3d14a0=>_0x3d14a0['model']));_0xf72811['conversion']['attributeToAttribute'](_0x30ce94),_0xf72811['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x2bf0ca=>{let _0x5a5300=_0x2bf0ca['getStyle']('line-height');return _0x37905d(_0x5a5300)&&(_0x5a5300=String(Number(_0x5a5300['slice'](0x0,-0x1))/0x64)),_0x5a5300===String(_0x40ea99)?null:_0x30ce94['model']['values']['includes'](_0x5a5300)?_0x5a5300:null;}}});}},k=class extends _0xbaf299{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x56b550={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x56b550),this['_registerMenuBarComponent'](_0x56b550),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5d01a0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5842d1;for(const _0x4daab2 in _0x5d01a0){const _0x3d968b=_0x4daab2,_0x2dd5c5=_0x5d01a0[_0x3d968b];if('lineHeightLicenseKeyValid'==_0x2dd5c5||'lineHeightLicenseKeyInvalid'==_0x2dd5c5||'lineHeightLicenseKeyExpired'==_0x2dd5c5||'lineHeightLicenseKeyDomainLimit'==_0x2dd5c5||'lineHeightLicenseKeyNotAllowed'==_0x2dd5c5||'lineHeightLicenseKeyEvaluationLimit'==_0x2dd5c5||'lineHeightLicenseKeyUsageLimit'==_0x2dd5c5){delete _0x5d01a0[_0x3d968b],_0x5842d1=_0x2dd5c5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x5842d1&&_0x5d01a0['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x5842d1&&_0x5d01a0['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x5842d1&&_0x5d01a0['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x5842d1&&_0x5d01a0['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x5842d1&&_0x5d01a0['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x5842d1&&_0x5d01a0['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_shouldRenderCustomValueOption'](){return this['editor']['config']['get']('lineHeight.supportAllValues');}['_getLocalizedLineHeightOptions'](){const _0x3480d3=this['editor'],t=_0x3480d3['t'],_0xed494d=_0x3480d3['config']['get']('lineHeight'),_0x380f40={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0xed494d)['map'](_0x2a23ac=>{const _0x205349=_0x380f40[_0x2a23ac['title']];return _0x205349&&_0x205349!=_0x2a23ac['title']&&(_0x2a23ac=Object['assign']({},_0x2a23ac,{'title':_0x205349})),_0x2a23ac;});}['_prepareListOptions'](){const _0x5b0ee7=this['editor']['commands']['get']('lineHeight'),_0x51b23e=this['editor']['config']['get']('lineHeight.defaultValue'),_0x491969=this['_getLocalizedLineHeightOptions'](),_0x32472a=new _0xfc589a(),_0x5b3491=_0x5684be=>'default'===_0x5684be||String(_0x51b23e)===_0x5684be;for(const _0x2a5444 of _0x491969){const _0x4d07b0={'type':'button','model':new _0x6b9796({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x2a5444['title'],'withText':!0x0})};_0x5b3491(_0x2a5444['model'])?(_0x4d07b0['model']['bind']('isOn')['to'](_0x5b0ee7,'value',_0x5b6633=>!_0x5b6633),_0x4d07b0['model']['commandParam']=void 0x0):(_0x4d07b0['model']['bind']('isOn')['to'](_0x5b0ee7,'value',_0xe79388=>_0xe79388===_0x2a5444['model']),_0x4d07b0['model']['commandParam']=_0x2a5444['model']),_0x32472a['add'](_0x4d07b0);}if(this['_shouldRenderCustomValueOption']()){const _0x5036e0=this['_getCustomValueOptionDefinition'](_0x491969);_0x32472a['add'](_0x5036e0);}return _0x32472a;}['_getCustomValueOptionDefinition'](_0x3ad9bf){const _0x533662=this['editor'],t=_0x533662['t'],_0x2e215c=_0x533662['commands']['get']('lineHeight'),_0x5ae880=_0x3ad9bf['map'](_0x3fa69a=>_0x3fa69a['model']),_0x1fc48c={'type':'button','model':new _0x6b9796({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x1fc48c['model']['bind']('commandParam')['to'](_0x2e215c,'value'),_0x1fc48c['model']['bind']('isOn')['to'](_0x2e215c,'value',_0x1f5988=>!!_0x1f5988&&!_0x5ae880['includes'](String(_0x1f5988))),_0x1fc48c['model']['bind']('label')['to'](_0x2e215c,'value',_0x2738c8=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x2738c8))),_0x1fc48c;}['_registerToolbarComponent']({accessibleLabel:_0x5130fa,options:_0x3ba931}){const _0x50a9b1=this['editor'],_0x51d62f=_0x50a9b1['commands']['get']('lineHeight');_0x50a9b1['ui']['componentFactory']['add']('lineHeight',_0x345cc0=>{const _0x32cab2=_0x3baacd(_0x345cc0);return _0x35a00e(_0x32cab2,_0x3ba931,{'role':'menu','ariaLabel':_0x5130fa}),_0x32cab2['buttonView']['set']({'label':_0x5130fa,'tooltip':!0x0,'icon':_0x3e8ee4}),_0x32cab2['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x32cab2['bind']('isEnabled')['to'](_0x51d62f),this['listenTo'](_0x32cab2,'execute',_0x28b4c4=>{_0x50a9b1['execute'](_0x28b4c4['source']['commandName'],{'value':_0x28b4c4['source']['commandParam']}),_0x50a9b1['editing']['view']['focus']();}),_0x32cab2['once']('change:isOpen',()=>{const _0x3289d6=_0x32cab2['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x32cab2,_0x3ba931,_0x3289d6);}),_0x32cab2;});}['_registerMenuBarComponent']({accessibleLabel:_0x1504ba,options:_0x2a1f90}){const _0x4cd4ee=this['editor'],_0x3b02ab=_0x4cd4ee['commands']['get']('lineHeight');_0x4cd4ee['ui']['componentFactory']['add']('menuBar:lineHeight',_0x17393c=>{const _0x818dc4=new _0x186ae5(_0x17393c);_0x818dc4['buttonView']['set']({'label':_0x1504ba,'icon':_0x3e8ee4}),_0x818dc4['bind']('isEnabled')['to'](_0x3b02ab);const _0x130f8c=new _0x37387c(_0x17393c);for(const _0x27645a of _0x2a1f90){const _0x45db27=new _0xd7c32e(_0x17393c,_0x818dc4),_0x13b5f4=new _0x75623a(_0x17393c);_0x13b5f4['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x13b5f4['bind'](...Object['keys'](_0x27645a['model']))['to'](_0x27645a['model']),_0x13b5f4['delegate']('execute')['to'](_0x818dc4),_0x13b5f4['on']('execute',()=>{_0x4cd4ee['execute'](_0x27645a['model']['commandName'],{'value':_0x27645a['model']['commandParam']}),_0x4cd4ee['editing']['view']['focus']();}),_0x45db27['children']['add'](_0x13b5f4),_0x130f8c['items']['add'](_0x45db27);}return _0x818dc4['panelView']['children']['add'](_0x130f8c),this['_attachCustomOptionVisibilityHandler'](_0x818dc4,_0x2a1f90,_0x130f8c),_0x818dc4;});}['_attachCustomOptionVisibilityHandler'](_0x25251e,_0x4c8a7b,_0x1b5ae0){if(!this['_shouldRenderCustomValueOption']())return;const _0x5c57ba=()=>{if(!_0x25251e['isOpen'])return;_0x1b5ae0['items']['last']['isVisible']=Boolean(_0x4c8a7b['last']['model']['isOn']);};_0x5c57ba(),_0x25251e['on']('change:isOpen',()=>{_0x5c57ba();});}},_=class extends _0xbaf299{static get['requires'](){return[b,k];}static get['pluginName'](){return'LineHeight';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{_ as LineHeight,p as LineHeightCommand,b as LineHeightEditing,v as LineHeightTodoListIntegration,k as LineHeightUI};
23
+ import{Command as _0x3f41d7,Plugin as _0x254401}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x2d126b,Collection as _0x30afa2,first as _0x1e529c,uid as _0x5ad9f1}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x3503cd,isPercentageStyleValue as _0x1917da}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x6a93db,MenuBarMenuListItemView as _0x478de1,MenuBarMenuListView as _0x4a69a6,MenuBarMenuView as _0x55ead9,UIModel as _0x248896,addListToDropdown as _0x8136bb,createDropdown as _0x435914}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x3cfd09}from'@ckeditor/ckeditor5-icons';var p=class extends _0x3f41d7{['refresh'](){const _0x1dfdee=this['editor']['model']['document'],_0x594855=_0x1e529c(_0x1dfdee['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x594855)&&this['_canHaveLineHeight'](_0x594855),this['value']=this['isEnabled']&&_0x594855['getAttribute']('lineHeight');}['execute'](_0x34c17f={}){const _0xcb98d2=this['editor']['model'],_0x2ba12b=_0xcb98d2['document']['selection'],_0x842a18=_0x34c17f['value'];_0xcb98d2['change'](_0x14d9bf=>{const _0x4866f6=Array['from'](_0x2ba12b['getSelectedBlocks']())['filter'](_0x225520=>this['_canHaveLineHeight'](_0x225520));for(const _0x2eef39 of _0x4866f6)_0x842a18?_0x14d9bf['setAttribute']('lineHeight',_0x842a18,_0x2eef39):_0x14d9bf['removeAttribute']('lineHeight',_0x2eef39);});}['_canHaveLineHeight'](_0x538b55){return this['editor']['model']['schema']['checkAttribute'](_0x538b55,'lineHeight');}};const y={get 'single'(){return{'title':'Single','model':'single','view':{'key':'class','value':'line-height-single'}};},get 'double'(){return{'title':'Double','model':'double','view':{'key':'class','value':'line-height-double'}};}};function H(_0x3787b9){return'string'==typeof _0x3787b9&&'default'===_0x3787b9['toLowerCase']();}function L(_0x4f35b6){return _0x4f35b6['options']['map'](_0x217086=>{return H(_0x217086)?{'title':String(_0x4f35b6['defaultValue']),'model':'default'}:('number'==typeof _0x217086&&(_0x217086=String(_0x217086)),'string'!=typeof _0x217086?_0x217086:parseFloat(_0x217086)?{'title':_0x217086,'model':_0x217086,'view':{'name':'span','styles':{'line-height':_0x217086}}}:'string'==typeof(_0x29c98c=_0x217086)?y[_0x29c98c]:y[_0x29c98c['model']]);var _0x29c98c;})['filter'](_0x46d823=>void 0x0!==_0x46d823);}var v=class extends _0x254401{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {plugins:_0x443a2f,conversion:_0x3f15fb}=this['editor'];_0x443a2f['has']('ListEditing')&&_0x443a2f['has']('TodoListEditing')&&(_0x443a2f['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x30acda,_0x3ea216,_0x2678a3,_0x19d799,_0x17e5db){'todo'==_0x17e5db['getAttribute']('listType')&&_0x3ea216&&(_0x30acda['addClass']('ck-list-marker-line-height',_0x2678a3),_0x30acda['setStyle']('--ck-content-list-marker-line-height',_0x3ea216,_0x2678a3));}}),_0x3f15fb['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x3f15fb['for']('upcast')['add'](_0x1ed6da=>{_0x1ed6da['on']('element:li',function(_0x5b1407){const _0x49e369=new _0x3503cd(_0x5b1407);return(_0x53b411,_0x2b3039,_0x197703)=>{const _0x4f181b=_0x49e369['match'](_0x2b3039['viewItem']);if(!_0x4f181b)return;const _0x168c60=_0x4f181b['match'];_0x168c60['name']=!0x1,_0x197703['consumable']['consume'](_0x2b3039['viewItem'],_0x168c60);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x254401{static get['pluginName'](){return'LineHeightEditing';}static get['requires'](){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2585b8){super(_0x2585b8),_0x2585b8['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}['init'](){const _0x3d6229=this['editor'];this['_validateConfig'](),_0x3d6229['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x3d6229['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x3d6229['commands']['add']('lineHeight',new p(_0x3d6229)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}['afterInit'](){!async function(_0x403667){const _0x546091='PHQ3YUIBrl0XdnwG9kez8sfpMv1ytWFRNZOV5jJaq7Tc2ogub64xCKDEALSihm',_0x352d32=0x78fc0,_0x4f8e57=window['Date']['now'](),_0x3f0099=_0x403667['editor'],_0x22a51a=new window['Promise'](_0x323a68=>{_0x3f0099['once']('ready',_0x323a68);}),_0x4b0a52={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x4d6968=_0x3f0099['config']['get']('licenseKey');async function _0x139f7(){let _0x1b95b7,_0xc67abf=null,_0x4b4cb7=null;try{return'GPL'==_0x4d6968?'NotAllowed':(_0x1b95b7=_0x181d17(),_0x1b95b7?(_0x1b95b7['usageEndpoint']&&(_0x4b4cb7=_0x458fbb(_0x1b95b7['usageEndpoint'],_0x1b95b7['jti'])),await _0x3c17c4()?_0x4453fe()?_0x193e1a()?'Expired':_0x73d12c()?('evaluation'==_0x1b95b7['licenseType']&&(_0xc67abf=_0x65b872('EvaluationLimit')),await _0x17091d()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x193e1a(){const _0x2b0a54=['evaluation','trial']['includes'](_0x1b95b7['licenseType'])?_0x4f8e57/0x3e8:0xe10*_0x352d32;return _0x1b95b7['exp']<_0x2b0a54;}function _0x4453fe(){const _0x1f9095=_0x1b95b7['features'];return!!_0x1f9095&&(!!_0x1f9095['includes']('*')||!!_0x1f9095['includes']('LH'));}function _0x73d12c(){const _0x552291=_0x1b95b7['licensedHosts'];if(!_0x552291||0x0==_0x552291['length'])return!0x0;const {hostname:_0x5c16a9}=new URL(window['location']['href']);if(_0x552291['includes'](_0x5c16a9))return!0x0;const _0x5bf730=_0x5c16a9['split']('.');return _0x552291['filter'](_0x7359ef=>_0x7359ef['includes']('*'))['map'](_0x54a3eb=>_0x54a3eb['split']('.'))['filter'](_0x1ae5be=>_0x1ae5be['length']<=_0x5bf730['length'])['map'](_0x485772=>Array(_0x5bf730['length']-_0x485772['length'])['fill']('*'===_0x485772[0x0]?'*':'')['concat'](_0x485772))['some'](_0x38736c=>_0x5bf730['every']((_0x483458,_0x5d244c)=>_0x38736c[_0x5d244c]===_0x483458||'*'===_0x38736c[_0x5d244c]));}function _0x17091d(){return _0xc67abf&&_0x4b4cb7?new window['Promise']((_0x13afa9,_0x47090d)=>{_0xc67abf['then'](_0x13afa9,_0x47090d),_0x4b4cb7['then'](_0x5cdf4d=>{'Valid'!=_0x5cdf4d&&_0x13afa9(_0x5cdf4d);},_0x47090d);}):_0xc67abf||_0x4b4cb7||'Valid';}}function _0x458fbb(_0x24b86a,_0x574761){return new window['Promise'](_0xc1d785=>{if(_0x437906())return _0xc1d785('Valid');_0x1d5d1a(),_0x3f0099['decorate']('_sendUsageRequest');let _0x304384=!0x1;const _0x1ed8e5=_0x5ad9f1();function _0x1f60fe(_0x46e0b6){return!!_0x46e0b6&&('object'==typeof _0x46e0b6||'function'==typeof _0x46e0b6)&&'function'==typeof _0x46e0b6['then']&&'function'==typeof _0x46e0b6['catch'];}function _0xe5bd03(_0x32beb9){_0x51e713(_0x32beb9)['then'](_0x390d35=>_0x390d35&&'ok'==_0x390d35['status']?_0x5c9ab3(_0x222c8a(_0x1ed8e5+_0x574761))!=_0x390d35['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x531063=>(_0x5e33a1(),_0x531063),()=>{const _0x41cdf5=_0x115030();return null==_0x41cdf5?(_0x5e33a1(),'Valid'):_0x4f8e57-_0x41cdf5>0x240c8400?'UsageLimit':'Valid';})['then'](_0xc1d785)['catch'](()=>{_0xc1d785('UsageLimit');});const _0x354584=0x36ee80;function _0x5e33a1(){const _0x4e1f58='llct-'+_0x5c9ab3(_0x222c8a(_0x24b86a)),_0x5ef27f=_0x58106f(_0x5c9ab3(window['Math']['ceil'](_0x4f8e57/_0x354584)));window['localStorage']['setItem'](_0x4e1f58,_0x5ef27f);}function _0x115030(){const _0x3f67cc='llct-'+_0x5c9ab3(_0x222c8a(_0x24b86a)),_0x498ac9=window['localStorage']['getItem'](_0x3f67cc);return _0x498ac9?window['parseInt'](_0x58106f(_0x498ac9),0x10)*_0x354584:null;}function _0x51e713(_0x2ff492){return new window['Promise']((_0xd9b8a1,_0x2a4a7a)=>{_0x2ff492['then'](_0xd9b8a1,_0x2a4a7a),window['setTimeout'](_0x2a4a7a,0x1d4c0);});}}_0x3f0099['on']('_sendUsageRequest',(_0x52d388,_0x32953e)=>{if(_0x32953e[0x0]!=_0x24b86a)return _0xc1d785('UsageLimit');_0x32953e[0x1]={..._0x32953e[0x1],'requestId':_0x1ed8e5};},{'priority':'high'}),_0x3f0099['on']('_sendUsageRequest',_0x22460e=>{_0x1f60fe(_0x22460e['return'])&&(_0x304384=!0x0,_0xe5bd03(_0x22460e['return']));},{'priority':'low'}),_0x22a51a['then'](()=>{_0x304384||_0xc1d785('UsageLimit');});});function _0x437906(){return'auto'==_0x3f0099['editing']['view']['_overlayModeHint'];}function _0x1d5d1a(){_0x3f0099['editing']['view']['_overlayModeHint']='auto';}}function _0x65b872(_0x3b8d58){const _0x59a337=[new window['Promise'](_0x51b8c8=>setTimeout(_0x51b8c8,0x93ecc)),_0x22a51a['then'](()=>new window['Promise'](_0x31014a=>{let _0xf570e1=0x0;_0x3f0099['model']['on']('applyOperation',(_0x432227,_0x161003)=>{_0x161003[0x0]['isDocumentOperation']&&_0xf570e1++,0x5e8==_0xf570e1&&(_0x31014a(),_0x432227['off']());});}))];return window['Promise']['race'](_0x59a337)['then'](()=>_0x3b8d58);}async function _0x18b9e0(){await _0x22a51a,_0x3f0099['model']['change']=_0x3c3a43,_0x3f0099['model']['enqueueChange']=_0x3c3a43,_0x3f0099['enableReadOnlyMode']('model');}function _0xeee83f(_0x4881f8){const _0x369fb4=_0xcc49c3();_0x3f0099[_0x369fb4]='lineHeightLicenseKey'+_0x4881f8,'Valid'!=_0x4881f8&&_0x18b9e0();}function _0xcc49c3(){const _0x31efde=window['String'](window['performance']['now']())['replace']('.','');let _0xcc68fb='P';for(let _0x4d1a7f=0x0;_0x4d1a7f<_0x31efde['length'];_0x4d1a7f+=0x2){let _0x22069d=window['parseInt'](_0x31efde['substring'](_0x4d1a7f,_0x4d1a7f+0x2));_0x22069d>=0x3e&&(_0x22069d-=0x3e),_0xcc68fb+=_0x546091[_0x22069d];}return _0xcc68fb;}function _0x181d17(){const _0x484536=_0x4d6968['split']('.');if(0x3!=_0x484536['length'])return null;return _0x480388(_0x484536[0x1]);function _0x480388(_0x44e074){const _0x49ab84=_0x16867c(_0x44e074);return _0x49ab84&&_0x4b5f6c()?_0x49ab84:null;function _0x4b5f6c(){const _0x476973=_0x49ab84['jti'],_0x16ac21=window['parseInt'](_0x476973['substring'](_0x476973['length']-0x8),0x10),_0x368185={..._0x49ab84,'jti':_0x476973['substring'](0x0,_0x476973['length']-0x8)};return delete _0x368185['vc'],_0x222c8a(_0x368185)==_0x16ac21;}}}async function _0x3c17c4(){let _0x574e79=!0x0;try{const [_0x40a725,_0xdd1ce8,_0x574008]=_0x4d6968['split']('.');return _0x36b079(_0x40a725),await _0x1b442d(_0x40a725,_0xdd1ce8,_0x574008),_0x574e79;}catch{return!0x1;}function _0x36b079(_0x363840){const _0x1898ba=_0x16867c(_0x363840);_0x1898ba&&'ES256'==_0x1898ba['alg']||(_0x574e79=!0x1);}async function _0x1b442d(_0x474e9e,_0x51fe5d,_0x2df77d){const _0x118d2e=window['Uint8Array']['from'](_0x3c644a(_0x2df77d),_0x1600c1=>_0x1600c1['charCodeAt'](0x0)),_0x176e58=new window['TextEncoder']()['encode'](_0x474e9e+'.'+_0x51fe5d),_0x5ed0d4=window['crypto']['subtle'];if(!_0x5ed0d4)return;const _0x20a1ff=await _0x5ed0d4['importKey']('jwk',_0x4b0a52,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5ed0d4['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x20a1ff,_0x118d2e,_0x176e58)||(_0x574e79=!0x1);}}function _0x16867c(_0x428536){return _0x428536['startsWith']('ey')?JSON['parse'](_0x3c644a(_0x428536)):null;}function _0x3c644a(_0x19b4ec){return window['atob'](_0x19b4ec['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x222c8a(_0x21953c){let _0x2f1a44=0x1505;function _0x4fabd5(_0x3fbf65){for(let _0x469060=0x0;_0x469060<_0x3fbf65['length'];_0x469060++){const _0x14af2a=_0x3fbf65['charCodeAt'](_0x469060);_0x2f1a44=(_0x2f1a44<<0x5)+_0x2f1a44+_0x14af2a,_0x2f1a44&=_0x2f1a44;}}function _0x3722d9(_0xaa6272){Array['isArray'](_0xaa6272)?_0xaa6272['forEach'](_0x3722d9):_0xaa6272&&'object'==typeof _0xaa6272?Object['entries'](_0xaa6272)['sort']()['forEach'](([_0x4e8d5f,_0x4288e7])=>{_0x4fabd5(_0x4e8d5f),_0x3722d9(_0x4288e7);}):_0x4fabd5(window['String'](_0xaa6272));}return _0x3722d9(_0x21953c),_0x2f1a44>>>0x0;}function _0x5c9ab3(_0x4b06cb){return _0x4b06cb['toString'](0x10)['padStart'](0x8,'0');}function _0x58106f(_0x10d062){return _0x10d062['split']('')['reverse']()['join']('');}function _0x3c3a43(){}_0xeee83f(await _0x139f7());}(this);}['_validateConfig'](){const _0x4a3e54=this['editor'];if(!_0x4a3e54['config']['get']('lineHeight.supportAllValues'))return;const _0x5c7ad8=_0x4a3e54['config']['get']('lineHeight.options')['filter'](_0x38f024=>'string'==typeof _0x38f024&&(!H(_0x38f024)&&isNaN(Number(_0x38f024))));if(_0x5c7ad8['length'])throw new _0x2d126b('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x5c7ad8});}['_prepareAnyValueConverters'](){const _0x186cdd=this['editor'],_0xda60df=this['editor']['config']['get']('lineHeight.defaultValue');_0x186cdd['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0xf7bbfb=>String(_0xf7bbfb)===String(_0xda60df)?null:{'key':'style','value':{'line-height':_0xf7bbfb}}}),_0x186cdd['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x533de9=>{let _0x437b9a=_0x533de9['getStyle']('line-height');return _0x1917da(_0x437b9a)&&(_0x437b9a=String(Number(_0x437b9a['slice'](0x0,-0x1))/0x64)),String(_0x437b9a)===String(_0xda60df)?null:_0x437b9a;}},'view':{'styles':{'line-height':/.*/}}});}['_preparePredefinedConverters'](){const _0xcda21d=this['editor'],_0x5e0552=this['editor']['config']['get']('lineHeight.defaultValue'),_0x2f88ef=function(_0x392038,_0x3cb92d){const _0x4e8db7={'model':{'key':_0x392038,'values':[]},'view':{}};for(const _0x24dfe2 of _0x3cb92d)'class'===_0x24dfe2['view']?.['key']?(_0x4e8db7['model']['values']['push'](_0x24dfe2['model']),_0x4e8db7['view'][_0x24dfe2['model']]={'key':'class','value':_0x24dfe2['view']['value']}):(_0x4e8db7['model']['values']['push'](_0x24dfe2['model']),_0x4e8db7['view'][_0x24dfe2['model']]={'key':'style','value':'line-height:'+_0x24dfe2['model']+';'});return _0x4e8db7;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x382265=>_0x382265['model']));_0xcda21d['conversion']['attributeToAttribute'](_0x2f88ef),_0xcda21d['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x4cb0cb=>{let _0x229c68=_0x4cb0cb['getStyle']('line-height');return _0x1917da(_0x229c68)&&(_0x229c68=String(Number(_0x229c68['slice'](0x0,-0x1))/0x64)),_0x229c68===String(_0x5e0552)?null:_0x2f88ef['model']['values']['includes'](_0x229c68)?_0x229c68:null;}}});}},k=class extends _0x254401{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x2a87e9={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x2a87e9),this['_registerMenuBarComponent'](_0x2a87e9),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x20c0d2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1bf1ac;for(const _0x23615a in _0x20c0d2){const _0x5aa2a1=_0x23615a,_0x5bc042=_0x20c0d2[_0x5aa2a1];if('lineHeightLicenseKeyValid'==_0x5bc042||'lineHeightLicenseKeyInvalid'==_0x5bc042||'lineHeightLicenseKeyExpired'==_0x5bc042||'lineHeightLicenseKeyDomainLimit'==_0x5bc042||'lineHeightLicenseKeyNotAllowed'==_0x5bc042||'lineHeightLicenseKeyEvaluationLimit'==_0x5bc042||'lineHeightLicenseKeyUsageLimit'==_0x5bc042){delete _0x20c0d2[_0x5aa2a1],_0x1bf1ac=_0x5bc042,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x1bf1ac&&_0x20c0d2['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x1bf1ac&&_0x20c0d2['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x1bf1ac&&_0x20c0d2['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x1bf1ac&&_0x20c0d2['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x1bf1ac&&_0x20c0d2['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x1bf1ac&&_0x20c0d2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_shouldRenderCustomValueOption'](){return this['editor']['config']['get']('lineHeight.supportAllValues');}['_getLocalizedLineHeightOptions'](){const _0x1ba481=this['editor'],t=_0x1ba481['t'],_0x51e005=_0x1ba481['config']['get']('lineHeight'),_0x36554e={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x51e005)['map'](_0x391e45=>{const _0x3f0465=_0x36554e[_0x391e45['title']];return _0x3f0465&&_0x3f0465!=_0x391e45['title']&&(_0x391e45=Object['assign']({},_0x391e45,{'title':_0x3f0465})),_0x391e45;});}['_prepareListOptions'](){const _0x3b5c69=this['editor']['commands']['get']('lineHeight'),_0x121741=this['editor']['config']['get']('lineHeight.defaultValue'),_0x423c40=this['_getLocalizedLineHeightOptions'](),_0xfebc48=new _0x30afa2(),_0x445287=_0x62e045=>'default'===_0x62e045||String(_0x121741)===_0x62e045;for(const _0x5c6e0e of _0x423c40){const _0xaa65e6={'type':'button','model':new _0x248896({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x5c6e0e['title'],'withText':!0x0})};_0x445287(_0x5c6e0e['model'])?(_0xaa65e6['model']['bind']('isOn')['to'](_0x3b5c69,'value',_0x314859=>!_0x314859),_0xaa65e6['model']['commandParam']=void 0x0):(_0xaa65e6['model']['bind']('isOn')['to'](_0x3b5c69,'value',_0x36e0e0=>_0x36e0e0===_0x5c6e0e['model']),_0xaa65e6['model']['commandParam']=_0x5c6e0e['model']),_0xfebc48['add'](_0xaa65e6);}if(this['_shouldRenderCustomValueOption']()){const _0x3676e9=this['_getCustomValueOptionDefinition'](_0x423c40);_0xfebc48['add'](_0x3676e9);}return _0xfebc48;}['_getCustomValueOptionDefinition'](_0x2e3eb8){const _0x570553=this['editor'],t=_0x570553['t'],_0x116036=_0x570553['commands']['get']('lineHeight'),_0x30c95b=_0x2e3eb8['map'](_0x61476d=>_0x61476d['model']),_0x2b382f={'type':'button','model':new _0x248896({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x2b382f['model']['bind']('commandParam')['to'](_0x116036,'value'),_0x2b382f['model']['bind']('isOn')['to'](_0x116036,'value',_0x566506=>!!_0x566506&&!_0x30c95b['includes'](String(_0x566506))),_0x2b382f['model']['bind']('label')['to'](_0x116036,'value',_0x53aa64=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x53aa64))),_0x2b382f;}['_registerToolbarComponent']({accessibleLabel:_0x599cc4,options:_0x2e996c}){const _0x46773=this['editor'],_0xf10125=_0x46773['commands']['get']('lineHeight');_0x46773['ui']['componentFactory']['add']('lineHeight',_0x2d9fb2=>{const _0x282340=_0x435914(_0x2d9fb2);return _0x8136bb(_0x282340,_0x2e996c,{'role':'menu','ariaLabel':_0x599cc4}),_0x282340['buttonView']['set']({'label':_0x599cc4,'tooltip':!0x0,'icon':_0x3cfd09}),_0x282340['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x282340['bind']('isEnabled')['to'](_0xf10125),this['listenTo'](_0x282340,'execute',_0x44ce5d=>{_0x46773['execute'](_0x44ce5d['source']['commandName'],{'value':_0x44ce5d['source']['commandParam']}),_0x46773['editing']['view']['focus']();}),_0x282340['once']('change:isOpen',()=>{const _0x2bd1f6=_0x282340['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x282340,_0x2e996c,_0x2bd1f6);}),_0x282340;});}['_registerMenuBarComponent']({accessibleLabel:_0x18517a,options:_0x53863f}){const _0x3faa31=this['editor'],_0x881624=_0x3faa31['commands']['get']('lineHeight');_0x3faa31['ui']['componentFactory']['add']('menuBar:lineHeight',_0x4238ba=>{const _0x3f137c=new _0x55ead9(_0x4238ba);_0x3f137c['buttonView']['set']({'label':_0x18517a,'icon':_0x3cfd09}),_0x3f137c['bind']('isEnabled')['to'](_0x881624);const _0x3e9d81=new _0x4a69a6(_0x4238ba);for(const _0xc19eb4 of _0x53863f){const _0x4cc60f=new _0x478de1(_0x4238ba,_0x3f137c),_0x17eeab=new _0x6a93db(_0x4238ba);_0x17eeab['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x17eeab['bind'](...Object['keys'](_0xc19eb4['model']))['to'](_0xc19eb4['model']),_0x17eeab['delegate']('execute')['to'](_0x3f137c),_0x17eeab['on']('execute',()=>{_0x3faa31['execute'](_0xc19eb4['model']['commandName'],{'value':_0xc19eb4['model']['commandParam']}),_0x3faa31['editing']['view']['focus']();}),_0x4cc60f['children']['add'](_0x17eeab),_0x3e9d81['items']['add'](_0x4cc60f);}return _0x3f137c['panelView']['children']['add'](_0x3e9d81),this['_attachCustomOptionVisibilityHandler'](_0x3f137c,_0x53863f,_0x3e9d81),_0x3f137c;});}['_attachCustomOptionVisibilityHandler'](_0x3bb700,_0x586530,_0x2b211b){if(!this['_shouldRenderCustomValueOption']())return;const _0x1f4332=()=>{if(!_0x3bb700['isOpen'])return;_0x2b211b['items']['last']['isVisible']=Boolean(_0x586530['last']['model']['isOn']);};_0x1f4332(),_0x3bb700['on']('change:isOpen',()=>{_0x1f4332();});}},_=class extends _0x254401{static get['requires'](){return[b,k];}static get['pluginName'](){return'LineHeight';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{_ as LineHeight,p as LineHeightCommand,b as LineHeightEditing,v as LineHeightTodoListIntegration,k as LineHeightUI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-line-height",
3
- "version": "48.3.1-alpha.0",
3
+ "version": "48.3.1-alpha.1",
4
4
  "description": "Line height feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (https://cksource.com/)",
@@ -25,12 +25,12 @@
25
25
  "dist/translations/*.umd.js"
26
26
  ],
27
27
  "dependencies": {
28
- "@ckeditor/ckeditor5-core": "48.3.1-alpha.0",
29
- "@ckeditor/ckeditor5-engine": "48.3.1-alpha.0",
30
- "@ckeditor/ckeditor5-icons": "48.3.1-alpha.0",
31
- "@ckeditor/ckeditor5-list": "48.3.1-alpha.0",
32
- "@ckeditor/ckeditor5-ui": "48.3.1-alpha.0",
33
- "@ckeditor/ckeditor5-utils": "48.3.1-alpha.0"
28
+ "@ckeditor/ckeditor5-core": "48.3.1-alpha.1",
29
+ "@ckeditor/ckeditor5-engine": "48.3.1-alpha.1",
30
+ "@ckeditor/ckeditor5-icons": "48.3.1-alpha.1",
31
+ "@ckeditor/ckeditor5-list": "48.3.1-alpha.1",
32
+ "@ckeditor/ckeditor5-ui": "48.3.1-alpha.1",
33
+ "@ckeditor/ckeditor5-utils": "48.3.1-alpha.1"
34
34
  },
35
35
  "files": [
36
36
  "dist",