@ckeditor/ckeditor5-line-height 48.3.0-alpha.4 → 48.3.0-alpha.5

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 _0x14906a,Plugin as _0x23a6b4}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x56a905,Collection as _0x2d2011,first as _0x50a65a,uid as _0x6fe0b8}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x3c118b,isPercentageStyleValue as _0xfee8b2}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x2c65f8,MenuBarMenuListItemView as _0x134ec1,MenuBarMenuListView as _0x4394ce,MenuBarMenuView as _0x4c3c41,UIModel as _0x3ca30d,addListToDropdown as _0x92fc69,createDropdown as _0x42478e}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x510d48}from'@ckeditor/ckeditor5-icons';var p=class extends _0x14906a{['refresh'](){const _0xcf9bf9=this['editor']['model']['document'],_0x2f9ba4=_0x50a65a(_0xcf9bf9['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x2f9ba4)&&this['_canHaveLineHeight'](_0x2f9ba4),this['value']=this['isEnabled']&&_0x2f9ba4['getAttribute']('lineHeight');}['execute'](_0x34621b={}){const _0xa7378f=this['editor']['model'],_0x5392c5=_0xa7378f['document']['selection'],_0x194737=_0x34621b['value'];_0xa7378f['change'](_0x3fa935=>{const _0x1fe913=Array['from'](_0x5392c5['getSelectedBlocks']())['filter'](_0x57248c=>this['_canHaveLineHeight'](_0x57248c));for(const _0x206a21 of _0x1fe913)_0x194737?_0x3fa935['setAttribute']('lineHeight',_0x194737,_0x206a21):_0x3fa935['removeAttribute']('lineHeight',_0x206a21);});}['_canHaveLineHeight'](_0x33c513){return this['editor']['model']['schema']['checkAttribute'](_0x33c513,'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(_0xc81c6c){return'string'==typeof _0xc81c6c&&'default'===_0xc81c6c['toLowerCase']();}function L(_0x6e14cd){return _0x6e14cd['options']['map'](_0x2f02df=>{return H(_0x2f02df)?{'title':String(_0x6e14cd['defaultValue']),'model':'default'}:('number'==typeof _0x2f02df&&(_0x2f02df=String(_0x2f02df)),'string'!=typeof _0x2f02df?_0x2f02df:parseFloat(_0x2f02df)?{'title':_0x2f02df,'model':_0x2f02df,'view':{'name':'span','styles':{'line-height':_0x2f02df}}}:'string'==typeof(_0x453770=_0x2f02df)?y[_0x453770]:y[_0x453770['model']]);var _0x453770;})['filter'](_0x1a92c8=>void 0x0!==_0x1a92c8);}var v=class extends _0x23a6b4{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {plugins:_0x581951,conversion:_0x434df2}=this['editor'];_0x581951['has']('ListEditing')&&_0x581951['has']('TodoListEditing')&&(_0x581951['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x3794a9,_0x417eba,_0x6f5419,_0x585987,_0x7a6ab3){'todo'==_0x7a6ab3['getAttribute']('listType')&&_0x417eba&&(_0x3794a9['addClass']('ck-list-marker-line-height',_0x6f5419),_0x3794a9['setStyle']('--ck-content-list-marker-line-height',_0x417eba,_0x6f5419));}}),_0x434df2['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x434df2['for']('upcast')['add'](_0x3b1681=>{_0x3b1681['on']('element:li',function(_0x4fe1a6){const _0x402e56=new _0x3c118b(_0x4fe1a6);return(_0x349a8d,_0x11d60d,_0x2548d4)=>{const _0x1bde6c=_0x402e56['match'](_0x11d60d['viewItem']);if(!_0x1bde6c)return;const _0x19c21a=_0x1bde6c['match'];_0x19c21a['name']=!0x1,_0x2548d4['consumable']['consume'](_0x11d60d['viewItem'],_0x19c21a);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x23a6b4{static get['pluginName'](){return'LineHeightEditing';}static get['requires'](){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x13d166){super(_0x13d166),_0x13d166['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}['init'](){const _0x25f8a1=this['editor'];this['_validateConfig'](),_0x25f8a1['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x25f8a1['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x25f8a1['commands']['add']('lineHeight',new p(_0x25f8a1)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}['afterInit'](){!async function(_0x224d2a){const _0x52775d='PHQ3YUIBrl0XdnwG9kez8sfpMv1ytWFRNZOV5jJaq7Tc2ogub64xCKDEALSihm',_0x2c4f4b=0x78e28,_0x2f8c20=window['Date']['now'](),_0x5c721f=_0x224d2a['editor'],_0x1a56c4=new window['Promise'](_0x5857f3=>{_0x5c721f['once']('ready',_0x5857f3);}),_0x4f8488={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x210377=_0x5c721f['config']['get']('licenseKey');async function _0x4a4f6d(){let _0x263323,_0x401b34=null,_0x45355a=null;try{return'GPL'==_0x210377?'NotAllowed':(_0x263323=_0x3a97e5(),_0x263323?(_0x263323['usageEndpoint']&&(_0x45355a=_0x280fe3(_0x263323['usageEndpoint'],_0x263323['jti'])),await _0x6c7834()?_0x4326f8()?_0x26f18a()?'Expired':_0x9f39b7()?('evaluation'==_0x263323['licenseType']&&(_0x401b34=_0x55d363('EvaluationLimit')),await _0x1f41a5()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x26f18a(){const _0x4b4a7d=['evaluation','trial']['includes'](_0x263323['licenseType'])?_0x2f8c20/0x3e8:0xe10*_0x2c4f4b;return _0x263323['exp']<_0x4b4a7d;}function _0x4326f8(){const _0x52e6d7=_0x263323['features'];return!!_0x52e6d7&&(!!_0x52e6d7['includes']('*')||!!_0x52e6d7['includes']('LH'));}function _0x9f39b7(){const _0x4343a1=_0x263323['licensedHosts'];if(!_0x4343a1||0x0==_0x4343a1['length'])return!0x0;const {hostname:_0x1e2fe6}=new URL(window['location']['href']);if(_0x4343a1['includes'](_0x1e2fe6))return!0x0;const _0x1e937d=_0x1e2fe6['split']('.');return _0x4343a1['filter'](_0x1f643b=>_0x1f643b['includes']('*'))['map'](_0x208d08=>_0x208d08['split']('.'))['filter'](_0x3540a4=>_0x3540a4['length']<=_0x1e937d['length'])['map'](_0x2e4c78=>Array(_0x1e937d['length']-_0x2e4c78['length'])['fill']('*'===_0x2e4c78[0x0]?'*':'')['concat'](_0x2e4c78))['some'](_0x26bb5a=>_0x1e937d['every']((_0x29f7d5,_0x3c3913)=>_0x26bb5a[_0x3c3913]===_0x29f7d5||'*'===_0x26bb5a[_0x3c3913]));}function _0x1f41a5(){return _0x401b34&&_0x45355a?new window['Promise']((_0x154150,_0x1c331a)=>{_0x401b34['then'](_0x154150,_0x1c331a),_0x45355a['then'](_0x55d672=>{'Valid'!=_0x55d672&&_0x154150(_0x55d672);},_0x1c331a);}):_0x401b34||_0x45355a||'Valid';}}function _0x280fe3(_0x1c47ac,_0x120a32){return new window['Promise'](_0x3919a8=>{if(_0x404ffc())return _0x3919a8('Valid');_0x3278ab(),_0x5c721f['decorate']('_sendUsageRequest');let _0x285192=!0x1;const _0x35e94f=_0x6fe0b8();function _0x446198(_0x1aec9e){return!!_0x1aec9e&&('object'==typeof _0x1aec9e||'function'==typeof _0x1aec9e)&&'function'==typeof _0x1aec9e['then']&&'function'==typeof _0x1aec9e['catch'];}function _0x5c1a8f(_0x27a3df){_0xc88841(_0x27a3df)['then'](_0x3fa908=>_0x3fa908&&'ok'==_0x3fa908['status']?_0x1274ad(_0x5e379c(_0x35e94f+_0x120a32))!=_0x3fa908['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x41b70a=>(_0x5de1c2(),_0x41b70a),()=>{const _0x1e0873=_0x5f43d8();return null==_0x1e0873?(_0x5de1c2(),'Valid'):_0x2f8c20-_0x1e0873>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3919a8)['catch'](()=>{_0x3919a8('UsageLimit');});const _0x2bf789=0x36ee80;function _0x5de1c2(){const _0x1235cb='llct-'+_0x1274ad(_0x5e379c(_0x1c47ac)),_0x3688c1=_0xba88ce(_0x1274ad(window['Math']['ceil'](_0x2f8c20/_0x2bf789)));window['localStorage']['setItem'](_0x1235cb,_0x3688c1);}function _0x5f43d8(){const _0x581bce='llct-'+_0x1274ad(_0x5e379c(_0x1c47ac)),_0x2d406f=window['localStorage']['getItem'](_0x581bce);return _0x2d406f?window['parseInt'](_0xba88ce(_0x2d406f),0x10)*_0x2bf789:null;}function _0xc88841(_0x47aa07){return new window['Promise']((_0x4e0dee,_0x2642c7)=>{_0x47aa07['then'](_0x4e0dee,_0x2642c7),window['setTimeout'](_0x2642c7,0x1d4c0);});}}_0x5c721f['on']('_sendUsageRequest',(_0x325723,_0x207ca7)=>{if(_0x207ca7[0x0]!=_0x1c47ac)return _0x3919a8('UsageLimit');_0x207ca7[0x1]={..._0x207ca7[0x1],'requestId':_0x35e94f};},{'priority':'high'}),_0x5c721f['on']('_sendUsageRequest',_0x32671d=>{_0x446198(_0x32671d['return'])&&(_0x285192=!0x0,_0x5c1a8f(_0x32671d['return']));},{'priority':'low'}),_0x1a56c4['then'](()=>{_0x285192||_0x3919a8('UsageLimit');});});function _0x404ffc(){return'auto'==_0x5c721f['editing']['view']['_overlayModeHint'];}function _0x3278ab(){_0x5c721f['editing']['view']['_overlayModeHint']='auto';}}function _0x55d363(_0x92f35){const _0xd32153=[new window['Promise'](_0x9ed398=>setTimeout(_0x9ed398,0x93ecc)),_0x1a56c4['then'](()=>new window['Promise'](_0x492524=>{let _0x4d5934=0x0;_0x5c721f['model']['on']('applyOperation',(_0x218f66,_0x4726d8)=>{_0x4726d8[0x0]['isDocumentOperation']&&_0x4d5934++,0x5e8==_0x4d5934&&(_0x492524(),_0x218f66['off']());});}))];return window['Promise']['race'](_0xd32153)['then'](()=>_0x92f35);}async function _0x81167(){await _0x1a56c4,_0x5c721f['model']['change']=_0x3d8911,_0x5c721f['model']['enqueueChange']=_0x3d8911,_0x5c721f['enableReadOnlyMode']('model');}function _0x364232(_0x27745a){const _0x3ecd83=_0x33271b();_0x5c721f[_0x3ecd83]='lineHeightLicenseKey'+_0x27745a,'Valid'!=_0x27745a&&_0x81167();}function _0x33271b(){const _0x3d9f96=window['String'](window['performance']['now']())['replace']('.','');let _0x427453='P';for(let _0x327ef2=0x0;_0x327ef2<_0x3d9f96['length'];_0x327ef2+=0x2){let _0x49600f=window['parseInt'](_0x3d9f96['substring'](_0x327ef2,_0x327ef2+0x2));_0x49600f>=0x3e&&(_0x49600f-=0x3e),_0x427453+=_0x52775d[_0x49600f];}return _0x427453;}function _0x3a97e5(){const _0x4c7006=_0x210377['split']('.');if(0x3!=_0x4c7006['length'])return null;return _0x52ab7d(_0x4c7006[0x1]);function _0x52ab7d(_0x5f58d1){const _0x43ecff=_0x51f61d(_0x5f58d1);return _0x43ecff&&_0x564ffc()?_0x43ecff:null;function _0x564ffc(){const _0x470f17=_0x43ecff['jti'],_0x527b7b=window['parseInt'](_0x470f17['substring'](_0x470f17['length']-0x8),0x10),_0x23f6f3={..._0x43ecff,'jti':_0x470f17['substring'](0x0,_0x470f17['length']-0x8)};return delete _0x23f6f3['vc'],_0x5e379c(_0x23f6f3)==_0x527b7b;}}}async function _0x6c7834(){let _0x3a4afb=!0x0;try{const [_0x515983,_0x1dcd5e,_0x4b27d3]=_0x210377['split']('.');return _0x4faafb(_0x515983),await _0x4744aa(_0x515983,_0x1dcd5e,_0x4b27d3),_0x3a4afb;}catch{return!0x1;}function _0x4faafb(_0x55019b){const _0x5e506c=_0x51f61d(_0x55019b);_0x5e506c&&'ES256'==_0x5e506c['alg']||(_0x3a4afb=!0x1);}async function _0x4744aa(_0x11dcac,_0x150eb8,_0x354510){const _0x5cb141=window['Uint8Array']['from'](_0x984201(_0x354510),_0x104816=>_0x104816['charCodeAt'](0x0)),_0x4b01e4=new window['TextEncoder']()['encode'](_0x11dcac+'.'+_0x150eb8),_0x2cedad=window['crypto']['subtle'];if(!_0x2cedad)return;const _0x59782c=await _0x2cedad['importKey']('jwk',_0x4f8488,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2cedad['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x59782c,_0x5cb141,_0x4b01e4)||(_0x3a4afb=!0x1);}}function _0x51f61d(_0xb8559d){return _0xb8559d['startsWith']('ey')?JSON['parse'](_0x984201(_0xb8559d)):null;}function _0x984201(_0x997827){return window['atob'](_0x997827['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5e379c(_0x4b87a0){let _0x5199d6=0x1505;function _0x11a57f(_0x2ed11d){for(let _0x4b9014=0x0;_0x4b9014<_0x2ed11d['length'];_0x4b9014++){const _0x2e329c=_0x2ed11d['charCodeAt'](_0x4b9014);_0x5199d6=(_0x5199d6<<0x5)+_0x5199d6+_0x2e329c,_0x5199d6&=_0x5199d6;}}function _0x33514f(_0x3db0d9){Array['isArray'](_0x3db0d9)?_0x3db0d9['forEach'](_0x33514f):_0x3db0d9&&'object'==typeof _0x3db0d9?Object['entries'](_0x3db0d9)['sort']()['forEach'](([_0xd8fb59,_0x38a432])=>{_0x11a57f(_0xd8fb59),_0x33514f(_0x38a432);}):_0x11a57f(window['String'](_0x3db0d9));}return _0x33514f(_0x4b87a0),_0x5199d6>>>0x0;}function _0x1274ad(_0x4a10d8){return _0x4a10d8['toString'](0x10)['padStart'](0x8,'0');}function _0xba88ce(_0x3e3e87){return _0x3e3e87['split']('')['reverse']()['join']('');}function _0x3d8911(){}_0x364232(await _0x4a4f6d());}(this);}['_validateConfig'](){const _0x27de53=this['editor'];if(!_0x27de53['config']['get']('lineHeight.supportAllValues'))return;const _0x41be96=_0x27de53['config']['get']('lineHeight.options')['filter'](_0xe64fe0=>'string'==typeof _0xe64fe0&&(!H(_0xe64fe0)&&isNaN(Number(_0xe64fe0))));if(_0x41be96['length'])throw new _0x56a905('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x41be96});}['_prepareAnyValueConverters'](){const _0x289d68=this['editor'],_0x246837=this['editor']['config']['get']('lineHeight.defaultValue');_0x289d68['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x17223e=>String(_0x17223e)===String(_0x246837)?null:{'key':'style','value':{'line-height':_0x17223e}}}),_0x289d68['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x5914b0=>{let _0x414a90=_0x5914b0['getStyle']('line-height');return _0xfee8b2(_0x414a90)&&(_0x414a90=String(Number(_0x414a90['slice'](0x0,-0x1))/0x64)),String(_0x414a90)===String(_0x246837)?null:_0x414a90;}},'view':{'styles':{'line-height':/.*/}}});}['_preparePredefinedConverters'](){const _0x5c591a=this['editor'],_0x1b6a9d=this['editor']['config']['get']('lineHeight.defaultValue'),_0x47adc3=function(_0x260d34,_0x431e59){const _0x13ab48={'model':{'key':_0x260d34,'values':[]},'view':{}};for(const _0x29721c of _0x431e59)'class'===_0x29721c['view']?.['key']?(_0x13ab48['model']['values']['push'](_0x29721c['model']),_0x13ab48['view'][_0x29721c['model']]={'key':'class','value':_0x29721c['view']['value']}):(_0x13ab48['model']['values']['push'](_0x29721c['model']),_0x13ab48['view'][_0x29721c['model']]={'key':'style','value':'line-height:'+_0x29721c['model']+';'});return _0x13ab48;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x440992=>_0x440992['model']));_0x5c591a['conversion']['attributeToAttribute'](_0x47adc3),_0x5c591a['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x19c61c=>{let _0x4fb4e7=_0x19c61c['getStyle']('line-height');return _0xfee8b2(_0x4fb4e7)&&(_0x4fb4e7=String(Number(_0x4fb4e7['slice'](0x0,-0x1))/0x64)),_0x4fb4e7===String(_0x1b6a9d)?null:_0x47adc3['model']['values']['includes'](_0x4fb4e7)?_0x4fb4e7:null;}}});}},k=class extends _0x23a6b4{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x301b0d={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x301b0d),this['_registerMenuBarComponent'](_0x301b0d),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xddb612=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xa77895;for(const _0x4e72bc in _0xddb612){const _0x152930=_0x4e72bc,_0x5b66a0=_0xddb612[_0x152930];if('lineHeightLicenseKeyValid'==_0x5b66a0||'lineHeightLicenseKeyInvalid'==_0x5b66a0||'lineHeightLicenseKeyExpired'==_0x5b66a0||'lineHeightLicenseKeyDomainLimit'==_0x5b66a0||'lineHeightLicenseKeyNotAllowed'==_0x5b66a0||'lineHeightLicenseKeyEvaluationLimit'==_0x5b66a0||'lineHeightLicenseKeyUsageLimit'==_0x5b66a0){delete _0xddb612[_0x152930],_0xa77895=_0x5b66a0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0xa77895&&_0xddb612['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0xa77895&&_0xddb612['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0xa77895&&_0xddb612['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0xa77895&&_0xddb612['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0xa77895&&_0xddb612['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0xa77895&&_0xddb612['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_shouldRenderCustomValueOption'](){return this['editor']['config']['get']('lineHeight.supportAllValues');}['_getLocalizedLineHeightOptions'](){const _0x1741b6=this['editor'],t=_0x1741b6['t'],_0x5d6d52=_0x1741b6['config']['get']('lineHeight'),_0xd08cc7={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x5d6d52)['map'](_0x1add54=>{const _0x4a7eaf=_0xd08cc7[_0x1add54['title']];return _0x4a7eaf&&_0x4a7eaf!=_0x1add54['title']&&(_0x1add54=Object['assign']({},_0x1add54,{'title':_0x4a7eaf})),_0x1add54;});}['_prepareListOptions'](){const _0x2b438c=this['editor']['commands']['get']('lineHeight'),_0x25ec04=this['editor']['config']['get']('lineHeight.defaultValue'),_0x422780=this['_getLocalizedLineHeightOptions'](),_0x2f0026=new _0x2d2011(),_0x22be5b=_0x273c25=>'default'===_0x273c25||String(_0x25ec04)===_0x273c25;for(const _0x3a0530 of _0x422780){const _0x52a8b5={'type':'button','model':new _0x3ca30d({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x3a0530['title'],'withText':!0x0})};_0x22be5b(_0x3a0530['model'])?(_0x52a8b5['model']['bind']('isOn')['to'](_0x2b438c,'value',_0xf848be=>!_0xf848be),_0x52a8b5['model']['commandParam']=void 0x0):(_0x52a8b5['model']['bind']('isOn')['to'](_0x2b438c,'value',_0x5b6b3d=>_0x5b6b3d===_0x3a0530['model']),_0x52a8b5['model']['commandParam']=_0x3a0530['model']),_0x2f0026['add'](_0x52a8b5);}if(this['_shouldRenderCustomValueOption']()){const _0x3a4691=this['_getCustomValueOptionDefinition'](_0x422780);_0x2f0026['add'](_0x3a4691);}return _0x2f0026;}['_getCustomValueOptionDefinition'](_0x1ee455){const _0x35eb7f=this['editor'],t=_0x35eb7f['t'],_0x3ec425=_0x35eb7f['commands']['get']('lineHeight'),_0x349cb3=_0x1ee455['map'](_0x4006ff=>_0x4006ff['model']),_0x287e94={'type':'button','model':new _0x3ca30d({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x287e94['model']['bind']('commandParam')['to'](_0x3ec425,'value'),_0x287e94['model']['bind']('isOn')['to'](_0x3ec425,'value',_0x3cbfbe=>!!_0x3cbfbe&&!_0x349cb3['includes'](String(_0x3cbfbe))),_0x287e94['model']['bind']('label')['to'](_0x3ec425,'value',_0x14caa7=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x14caa7))),_0x287e94;}['_registerToolbarComponent']({accessibleLabel:_0x3eb68f,options:_0x46a095}){const _0x4d914d=this['editor'],_0x456f06=_0x4d914d['commands']['get']('lineHeight');_0x4d914d['ui']['componentFactory']['add']('lineHeight',_0x2c10f3=>{const _0x37f095=_0x42478e(_0x2c10f3);return _0x92fc69(_0x37f095,_0x46a095,{'role':'menu','ariaLabel':_0x3eb68f}),_0x37f095['buttonView']['set']({'label':_0x3eb68f,'tooltip':!0x0,'icon':_0x510d48}),_0x37f095['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x37f095['bind']('isEnabled')['to'](_0x456f06),this['listenTo'](_0x37f095,'execute',_0x1875e4=>{_0x4d914d['execute'](_0x1875e4['source']['commandName'],{'value':_0x1875e4['source']['commandParam']}),_0x4d914d['editing']['view']['focus']();}),_0x37f095['once']('change:isOpen',()=>{const _0x2a7a03=_0x37f095['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x37f095,_0x46a095,_0x2a7a03);}),_0x37f095;});}['_registerMenuBarComponent']({accessibleLabel:_0x3acb12,options:_0x40e379}){const _0x3494f0=this['editor'],_0x527a7b=_0x3494f0['commands']['get']('lineHeight');_0x3494f0['ui']['componentFactory']['add']('menuBar:lineHeight',_0x5be42b=>{const _0x4a9bfc=new _0x4c3c41(_0x5be42b);_0x4a9bfc['buttonView']['set']({'label':_0x3acb12,'icon':_0x510d48}),_0x4a9bfc['bind']('isEnabled')['to'](_0x527a7b);const _0x2d6749=new _0x4394ce(_0x5be42b);for(const _0x3a4027 of _0x40e379){const _0x2a8104=new _0x134ec1(_0x5be42b,_0x4a9bfc),_0x569b8e=new _0x2c65f8(_0x5be42b);_0x569b8e['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x569b8e['bind'](...Object['keys'](_0x3a4027['model']))['to'](_0x3a4027['model']),_0x569b8e['delegate']('execute')['to'](_0x4a9bfc),_0x569b8e['on']('execute',()=>{_0x3494f0['execute'](_0x3a4027['model']['commandName'],{'value':_0x3a4027['model']['commandParam']}),_0x3494f0['editing']['view']['focus']();}),_0x2a8104['children']['add'](_0x569b8e),_0x2d6749['items']['add'](_0x2a8104);}return _0x4a9bfc['panelView']['children']['add'](_0x2d6749),this['_attachCustomOptionVisibilityHandler'](_0x4a9bfc,_0x40e379,_0x2d6749),_0x4a9bfc;});}['_attachCustomOptionVisibilityHandler'](_0x83d71d,_0x44fc57,_0x543bc6){if(!this['_shouldRenderCustomValueOption']())return;const _0x411e48=()=>{if(!_0x83d71d['isOpen'])return;_0x543bc6['items']['last']['isVisible']=Boolean(_0x44fc57['last']['model']['isOn']);};_0x411e48(),_0x83d71d['on']('change:isOpen',()=>{_0x411e48();});}},_=class extends _0x23a6b4{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 _0x44d9fe,Plugin as _0x5d59cc}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x397821,Collection as _0x510678,first as _0xd641d,uid as _0x3e54ef}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x41e888,isPercentageStyleValue as _0x383fc2}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x2c5941,MenuBarMenuListItemView as _0x371ed5,MenuBarMenuListView as _0x537356,MenuBarMenuView as _0x48a510,UIModel as _0x3d00b8,addListToDropdown as _0x1eb78b,createDropdown as _0x2dbad8}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x155a22}from'@ckeditor/ckeditor5-icons';var p=class extends _0x44d9fe{['refresh'](){const _0x58172f=this['editor']['model']['document'],_0x2e320b=_0xd641d(_0x58172f['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x2e320b)&&this['_canHaveLineHeight'](_0x2e320b),this['value']=this['isEnabled']&&_0x2e320b['getAttribute']('lineHeight');}['execute'](_0x8a6fc7={}){const _0x2ba824=this['editor']['model'],_0x586125=_0x2ba824['document']['selection'],_0x3f5964=_0x8a6fc7['value'];_0x2ba824['change'](_0x1bbb3b=>{const _0x34e838=Array['from'](_0x586125['getSelectedBlocks']())['filter'](_0x4e6dbb=>this['_canHaveLineHeight'](_0x4e6dbb));for(const _0x31c2e8 of _0x34e838)_0x3f5964?_0x1bbb3b['setAttribute']('lineHeight',_0x3f5964,_0x31c2e8):_0x1bbb3b['removeAttribute']('lineHeight',_0x31c2e8);});}['_canHaveLineHeight'](_0x4039d3){return this['editor']['model']['schema']['checkAttribute'](_0x4039d3,'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(_0x1dfd53){return'string'==typeof _0x1dfd53&&'default'===_0x1dfd53['toLowerCase']();}function L(_0x365fc6){return _0x365fc6['options']['map'](_0x406fee=>{return H(_0x406fee)?{'title':String(_0x365fc6['defaultValue']),'model':'default'}:('number'==typeof _0x406fee&&(_0x406fee=String(_0x406fee)),'string'!=typeof _0x406fee?_0x406fee:parseFloat(_0x406fee)?{'title':_0x406fee,'model':_0x406fee,'view':{'name':'span','styles':{'line-height':_0x406fee}}}:'string'==typeof(_0x5b1420=_0x406fee)?y[_0x5b1420]:y[_0x5b1420['model']]);var _0x5b1420;})['filter'](_0x377635=>void 0x0!==_0x377635);}var v=class extends _0x5d59cc{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {plugins:_0x287c0a,conversion:_0x4ee4da}=this['editor'];_0x287c0a['has']('ListEditing')&&_0x287c0a['has']('TodoListEditing')&&(_0x287c0a['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x27e856,_0x5ec063,_0x2613a0,_0x587ee8,_0x3d5d5f){'todo'==_0x3d5d5f['getAttribute']('listType')&&_0x5ec063&&(_0x27e856['addClass']('ck-list-marker-line-height',_0x2613a0),_0x27e856['setStyle']('--ck-content-list-marker-line-height',_0x5ec063,_0x2613a0));}}),_0x4ee4da['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x4ee4da['for']('upcast')['add'](_0x504162=>{_0x504162['on']('element:li',function(_0x565d4e){const _0x387d5c=new _0x41e888(_0x565d4e);return(_0x3e7ca9,_0x45cd0b,_0x21a0c2)=>{const _0x538c4a=_0x387d5c['match'](_0x45cd0b['viewItem']);if(!_0x538c4a)return;const _0x4f2741=_0x538c4a['match'];_0x4f2741['name']=!0x1,_0x21a0c2['consumable']['consume'](_0x45cd0b['viewItem'],_0x4f2741);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x5d59cc{static get['pluginName'](){return'LineHeightEditing';}static get['requires'](){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4702dd){super(_0x4702dd),_0x4702dd['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}['init'](){const _0x38e05b=this['editor'];this['_validateConfig'](),_0x38e05b['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x38e05b['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x38e05b['commands']['add']('lineHeight',new p(_0x38e05b)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}['afterInit'](){!async function(_0x4c2ec2){const _0x14f7e3='PHQ3YUIBrl0XdnwG9kez8sfpMv1ytWFRNZOV5jJaq7Tc2ogub64xCKDEALSihm',_0x141fd3=0x78e40,_0x5db99a=window['Date']['now'](),_0x28b308=_0x4c2ec2['editor'],_0x51a11e=new window['Promise'](_0x485466=>{_0x28b308['once']('ready',_0x485466);}),_0x2390de={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x125ee8=_0x28b308['config']['get']('licenseKey');async function _0x9e51ed(){let _0x4c60da,_0x4d5bea=null,_0x25d038=null;try{return'GPL'==_0x125ee8?'NotAllowed':(_0x4c60da=_0x47ab6c(),_0x4c60da?(_0x4c60da['usageEndpoint']&&(_0x25d038=_0x13e7e9(_0x4c60da['usageEndpoint'],_0x4c60da['jti'])),await _0x151962()?_0x4eb08f()?_0x5b3987()?'Expired':_0x289d4e()?('evaluation'==_0x4c60da['licenseType']&&(_0x4d5bea=_0x4b69dc('EvaluationLimit')),await _0x458a27()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5b3987(){const _0x334ba5=['evaluation','trial']['includes'](_0x4c60da['licenseType'])?_0x5db99a/0x3e8:0xe10*_0x141fd3;return _0x4c60da['exp']<_0x334ba5;}function _0x4eb08f(){const _0x76cd43=_0x4c60da['features'];return!!_0x76cd43&&(!!_0x76cd43['includes']('*')||!!_0x76cd43['includes']('LH'));}function _0x289d4e(){const _0x1b3246=_0x4c60da['licensedHosts'];if(!_0x1b3246||0x0==_0x1b3246['length'])return!0x0;const {hostname:_0x53066b}=new URL(window['location']['href']);if(_0x1b3246['includes'](_0x53066b))return!0x0;const _0x3e4f39=_0x53066b['split']('.');return _0x1b3246['filter'](_0x3a7267=>_0x3a7267['includes']('*'))['map'](_0x4a4102=>_0x4a4102['split']('.'))['filter'](_0x10d00b=>_0x10d00b['length']<=_0x3e4f39['length'])['map'](_0x4e6dab=>Array(_0x3e4f39['length']-_0x4e6dab['length'])['fill']('*'===_0x4e6dab[0x0]?'*':'')['concat'](_0x4e6dab))['some'](_0x3d681b=>_0x3e4f39['every']((_0x36c1ea,_0xaf3030)=>_0x3d681b[_0xaf3030]===_0x36c1ea||'*'===_0x3d681b[_0xaf3030]));}function _0x458a27(){return _0x4d5bea&&_0x25d038?new window['Promise']((_0x3fcdd9,_0x58f67a)=>{_0x4d5bea['then'](_0x3fcdd9,_0x58f67a),_0x25d038['then'](_0x54ab3e=>{'Valid'!=_0x54ab3e&&_0x3fcdd9(_0x54ab3e);},_0x58f67a);}):_0x4d5bea||_0x25d038||'Valid';}}function _0x13e7e9(_0x2d0082,_0x3b972e){return new window['Promise'](_0x1a40ed=>{if(_0x34d3e2())return _0x1a40ed('Valid');_0x44e189(),_0x28b308['decorate']('_sendUsageRequest');let _0x43d9d5=!0x1;const _0x36eb2d=_0x3e54ef();function _0x30f6c2(_0x24fdff){return!!_0x24fdff&&('object'==typeof _0x24fdff||'function'==typeof _0x24fdff)&&'function'==typeof _0x24fdff['then']&&'function'==typeof _0x24fdff['catch'];}function _0x5a12fb(_0x4ee04f){_0x8314ed(_0x4ee04f)['then'](_0x3f0504=>_0x3f0504&&'ok'==_0x3f0504['status']?_0x10eca5(_0x543749(_0x36eb2d+_0x3b972e))!=_0x3f0504['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x203a8d=>(_0x56a2c3(),_0x203a8d),()=>{const _0x216e79=_0x538c14();return null==_0x216e79?(_0x56a2c3(),'Valid'):_0x5db99a-_0x216e79>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1a40ed)['catch'](()=>{_0x1a40ed('UsageLimit');});const _0x525989=0x36ee80;function _0x56a2c3(){const _0x28657f='llct-'+_0x10eca5(_0x543749(_0x2d0082)),_0x36ed28=_0x16e3ea(_0x10eca5(window['Math']['ceil'](_0x5db99a/_0x525989)));window['localStorage']['setItem'](_0x28657f,_0x36ed28);}function _0x538c14(){const _0x43c6db='llct-'+_0x10eca5(_0x543749(_0x2d0082)),_0x172e5b=window['localStorage']['getItem'](_0x43c6db);return _0x172e5b?window['parseInt'](_0x16e3ea(_0x172e5b),0x10)*_0x525989:null;}function _0x8314ed(_0x480b76){return new window['Promise']((_0x56f0a0,_0x41e487)=>{_0x480b76['then'](_0x56f0a0,_0x41e487),window['setTimeout'](_0x41e487,0x1d4c0);});}}_0x28b308['on']('_sendUsageRequest',(_0x2f1025,_0x3e83ce)=>{if(_0x3e83ce[0x0]!=_0x2d0082)return _0x1a40ed('UsageLimit');_0x3e83ce[0x1]={..._0x3e83ce[0x1],'requestId':_0x36eb2d};},{'priority':'high'}),_0x28b308['on']('_sendUsageRequest',_0x1689d8=>{_0x30f6c2(_0x1689d8['return'])&&(_0x43d9d5=!0x0,_0x5a12fb(_0x1689d8['return']));},{'priority':'low'}),_0x51a11e['then'](()=>{_0x43d9d5||_0x1a40ed('UsageLimit');});});function _0x34d3e2(){return'auto'==_0x28b308['editing']['view']['_overlayModeHint'];}function _0x44e189(){_0x28b308['editing']['view']['_overlayModeHint']='auto';}}function _0x4b69dc(_0x5ab518){const _0x55b211=[new window['Promise'](_0x5d66c6=>setTimeout(_0x5d66c6,0x93ecc)),_0x51a11e['then'](()=>new window['Promise'](_0x2a96f3=>{let _0x284603=0x0;_0x28b308['model']['on']('applyOperation',(_0x10f8eb,_0x45e8f9)=>{_0x45e8f9[0x0]['isDocumentOperation']&&_0x284603++,0x5e8==_0x284603&&(_0x2a96f3(),_0x10f8eb['off']());});}))];return window['Promise']['race'](_0x55b211)['then'](()=>_0x5ab518);}async function _0x9f2aa1(){await _0x51a11e,_0x28b308['model']['change']=_0x2d01bf,_0x28b308['model']['enqueueChange']=_0x2d01bf,_0x28b308['enableReadOnlyMode']('model');}function _0x5d004a(_0x26e91c){const _0x2abe45=_0x3f6588();_0x28b308[_0x2abe45]='lineHeightLicenseKey'+_0x26e91c,'Valid'!=_0x26e91c&&_0x9f2aa1();}function _0x3f6588(){const _0x1cc43d=window['String'](window['performance']['now']())['replace']('.','');let _0x1007fb='P';for(let _0x5d204a=0x0;_0x5d204a<_0x1cc43d['length'];_0x5d204a+=0x2){let _0x1e9147=window['parseInt'](_0x1cc43d['substring'](_0x5d204a,_0x5d204a+0x2));_0x1e9147>=0x3e&&(_0x1e9147-=0x3e),_0x1007fb+=_0x14f7e3[_0x1e9147];}return _0x1007fb;}function _0x47ab6c(){const _0x3956c8=_0x125ee8['split']('.');if(0x3!=_0x3956c8['length'])return null;return _0x4cfbea(_0x3956c8[0x1]);function _0x4cfbea(_0x1ce998){const _0x51085f=_0x5ca533(_0x1ce998);return _0x51085f&&_0x17e1f8()?_0x51085f:null;function _0x17e1f8(){const _0x26a1e7=_0x51085f['jti'],_0x581038=window['parseInt'](_0x26a1e7['substring'](_0x26a1e7['length']-0x8),0x10),_0x49f4ea={..._0x51085f,'jti':_0x26a1e7['substring'](0x0,_0x26a1e7['length']-0x8)};return delete _0x49f4ea['vc'],_0x543749(_0x49f4ea)==_0x581038;}}}async function _0x151962(){let _0x1a29b9=!0x0;try{const [_0x32f695,_0x3485c2,_0x3861e9]=_0x125ee8['split']('.');return _0x7c01ed(_0x32f695),await _0x2a2c71(_0x32f695,_0x3485c2,_0x3861e9),_0x1a29b9;}catch{return!0x1;}function _0x7c01ed(_0x31a8ba){const _0x471105=_0x5ca533(_0x31a8ba);_0x471105&&'ES256'==_0x471105['alg']||(_0x1a29b9=!0x1);}async function _0x2a2c71(_0x599d42,_0x5838c8,_0x55813b){const _0x5f2c40=window['Uint8Array']['from'](_0x29d03f(_0x55813b),_0x1a2556=>_0x1a2556['charCodeAt'](0x0)),_0x209a80=new window['TextEncoder']()['encode'](_0x599d42+'.'+_0x5838c8),_0x5528e8=window['crypto']['subtle'];if(!_0x5528e8)return;const _0x25483b=await _0x5528e8['importKey']('jwk',_0x2390de,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5528e8['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x25483b,_0x5f2c40,_0x209a80)||(_0x1a29b9=!0x1);}}function _0x5ca533(_0x4ce555){return _0x4ce555['startsWith']('ey')?JSON['parse'](_0x29d03f(_0x4ce555)):null;}function _0x29d03f(_0x4ae488){return window['atob'](_0x4ae488['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x543749(_0x38c978){let _0x47572d=0x1505;function _0x3f88c7(_0x5334ef){for(let _0x36f1e5=0x0;_0x36f1e5<_0x5334ef['length'];_0x36f1e5++){const _0x3cd635=_0x5334ef['charCodeAt'](_0x36f1e5);_0x47572d=(_0x47572d<<0x5)+_0x47572d+_0x3cd635,_0x47572d&=_0x47572d;}}function _0x245eb7(_0x5557da){Array['isArray'](_0x5557da)?_0x5557da['forEach'](_0x245eb7):_0x5557da&&'object'==typeof _0x5557da?Object['entries'](_0x5557da)['sort']()['forEach'](([_0xe2c346,_0x2cf723])=>{_0x3f88c7(_0xe2c346),_0x245eb7(_0x2cf723);}):_0x3f88c7(window['String'](_0x5557da));}return _0x245eb7(_0x38c978),_0x47572d>>>0x0;}function _0x10eca5(_0x34c970){return _0x34c970['toString'](0x10)['padStart'](0x8,'0');}function _0x16e3ea(_0x5513d5){return _0x5513d5['split']('')['reverse']()['join']('');}function _0x2d01bf(){}_0x5d004a(await _0x9e51ed());}(this);}['_validateConfig'](){const _0x93c186=this['editor'];if(!_0x93c186['config']['get']('lineHeight.supportAllValues'))return;const _0x1e4ef9=_0x93c186['config']['get']('lineHeight.options')['filter'](_0x2eeb8f=>'string'==typeof _0x2eeb8f&&(!H(_0x2eeb8f)&&isNaN(Number(_0x2eeb8f))));if(_0x1e4ef9['length'])throw new _0x397821('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x1e4ef9});}['_prepareAnyValueConverters'](){const _0x43421b=this['editor'],_0x4ba7a8=this['editor']['config']['get']('lineHeight.defaultValue');_0x43421b['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0xd2e4e1=>String(_0xd2e4e1)===String(_0x4ba7a8)?null:{'key':'style','value':{'line-height':_0xd2e4e1}}}),_0x43421b['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x3695f8=>{let _0x34e2c2=_0x3695f8['getStyle']('line-height');return _0x383fc2(_0x34e2c2)&&(_0x34e2c2=String(Number(_0x34e2c2['slice'](0x0,-0x1))/0x64)),String(_0x34e2c2)===String(_0x4ba7a8)?null:_0x34e2c2;}},'view':{'styles':{'line-height':/.*/}}});}['_preparePredefinedConverters'](){const _0x50b0cb=this['editor'],_0x579c3e=this['editor']['config']['get']('lineHeight.defaultValue'),_0x28d378=function(_0x101ecc,_0x46a04b){const _0x46214a={'model':{'key':_0x101ecc,'values':[]},'view':{}};for(const _0x186cad of _0x46a04b)'class'===_0x186cad['view']?.['key']?(_0x46214a['model']['values']['push'](_0x186cad['model']),_0x46214a['view'][_0x186cad['model']]={'key':'class','value':_0x186cad['view']['value']}):(_0x46214a['model']['values']['push'](_0x186cad['model']),_0x46214a['view'][_0x186cad['model']]={'key':'style','value':'line-height:'+_0x186cad['model']+';'});return _0x46214a;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x36076a=>_0x36076a['model']));_0x50b0cb['conversion']['attributeToAttribute'](_0x28d378),_0x50b0cb['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x562b36=>{let _0x26e5a0=_0x562b36['getStyle']('line-height');return _0x383fc2(_0x26e5a0)&&(_0x26e5a0=String(Number(_0x26e5a0['slice'](0x0,-0x1))/0x64)),_0x26e5a0===String(_0x579c3e)?null:_0x28d378['model']['values']['includes'](_0x26e5a0)?_0x26e5a0:null;}}});}},k=class extends _0x5d59cc{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x379c02={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x379c02),this['_registerMenuBarComponent'](_0x379c02),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3724bc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x349f64;for(const _0x501d8b in _0x3724bc){const _0x233f21=_0x501d8b,_0x5461d4=_0x3724bc[_0x233f21];if('lineHeightLicenseKeyValid'==_0x5461d4||'lineHeightLicenseKeyInvalid'==_0x5461d4||'lineHeightLicenseKeyExpired'==_0x5461d4||'lineHeightLicenseKeyDomainLimit'==_0x5461d4||'lineHeightLicenseKeyNotAllowed'==_0x5461d4||'lineHeightLicenseKeyEvaluationLimit'==_0x5461d4||'lineHeightLicenseKeyUsageLimit'==_0x5461d4){delete _0x3724bc[_0x233f21],_0x349f64=_0x5461d4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x349f64&&_0x3724bc['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x349f64&&_0x3724bc['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x349f64&&_0x3724bc['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x349f64&&_0x3724bc['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x349f64&&_0x3724bc['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x349f64&&_0x3724bc['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_shouldRenderCustomValueOption'](){return this['editor']['config']['get']('lineHeight.supportAllValues');}['_getLocalizedLineHeightOptions'](){const _0x216b1f=this['editor'],t=_0x216b1f['t'],_0x1fa7e5=_0x216b1f['config']['get']('lineHeight'),_0x511996={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x1fa7e5)['map'](_0xe71bc1=>{const _0x487a49=_0x511996[_0xe71bc1['title']];return _0x487a49&&_0x487a49!=_0xe71bc1['title']&&(_0xe71bc1=Object['assign']({},_0xe71bc1,{'title':_0x487a49})),_0xe71bc1;});}['_prepareListOptions'](){const _0x19d8ab=this['editor']['commands']['get']('lineHeight'),_0xc2829e=this['editor']['config']['get']('lineHeight.defaultValue'),_0x36123d=this['_getLocalizedLineHeightOptions'](),_0x2f767d=new _0x510678(),_0x118f69=_0x1f47ff=>'default'===_0x1f47ff||String(_0xc2829e)===_0x1f47ff;for(const _0x125942 of _0x36123d){const _0x56a91f={'type':'button','model':new _0x3d00b8({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x125942['title'],'withText':!0x0})};_0x118f69(_0x125942['model'])?(_0x56a91f['model']['bind']('isOn')['to'](_0x19d8ab,'value',_0x10ffc4=>!_0x10ffc4),_0x56a91f['model']['commandParam']=void 0x0):(_0x56a91f['model']['bind']('isOn')['to'](_0x19d8ab,'value',_0x5c159f=>_0x5c159f===_0x125942['model']),_0x56a91f['model']['commandParam']=_0x125942['model']),_0x2f767d['add'](_0x56a91f);}if(this['_shouldRenderCustomValueOption']()){const _0x1bb218=this['_getCustomValueOptionDefinition'](_0x36123d);_0x2f767d['add'](_0x1bb218);}return _0x2f767d;}['_getCustomValueOptionDefinition'](_0x4678d9){const _0x38d601=this['editor'],t=_0x38d601['t'],_0x3f08f8=_0x38d601['commands']['get']('lineHeight'),_0x117cf8=_0x4678d9['map'](_0xeb7f48=>_0xeb7f48['model']),_0x825796={'type':'button','model':new _0x3d00b8({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x825796['model']['bind']('commandParam')['to'](_0x3f08f8,'value'),_0x825796['model']['bind']('isOn')['to'](_0x3f08f8,'value',_0xeb8262=>!!_0xeb8262&&!_0x117cf8['includes'](String(_0xeb8262))),_0x825796['model']['bind']('label')['to'](_0x3f08f8,'value',_0x398030=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x398030))),_0x825796;}['_registerToolbarComponent']({accessibleLabel:_0x121300,options:_0x1ee24e}){const _0xac0dae=this['editor'],_0x10148c=_0xac0dae['commands']['get']('lineHeight');_0xac0dae['ui']['componentFactory']['add']('lineHeight',_0x3c5cb7=>{const _0x4091d0=_0x2dbad8(_0x3c5cb7);return _0x1eb78b(_0x4091d0,_0x1ee24e,{'role':'menu','ariaLabel':_0x121300}),_0x4091d0['buttonView']['set']({'label':_0x121300,'tooltip':!0x0,'icon':_0x155a22}),_0x4091d0['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x4091d0['bind']('isEnabled')['to'](_0x10148c),this['listenTo'](_0x4091d0,'execute',_0x219dcf=>{_0xac0dae['execute'](_0x219dcf['source']['commandName'],{'value':_0x219dcf['source']['commandParam']}),_0xac0dae['editing']['view']['focus']();}),_0x4091d0['once']('change:isOpen',()=>{const _0x546ba1=_0x4091d0['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x4091d0,_0x1ee24e,_0x546ba1);}),_0x4091d0;});}['_registerMenuBarComponent']({accessibleLabel:_0x3541c3,options:_0x4a2430}){const _0x2b568b=this['editor'],_0x4849a2=_0x2b568b['commands']['get']('lineHeight');_0x2b568b['ui']['componentFactory']['add']('menuBar:lineHeight',_0x1b24be=>{const _0x8d5126=new _0x48a510(_0x1b24be);_0x8d5126['buttonView']['set']({'label':_0x3541c3,'icon':_0x155a22}),_0x8d5126['bind']('isEnabled')['to'](_0x4849a2);const _0x2a80c2=new _0x537356(_0x1b24be);for(const _0x503e75 of _0x4a2430){const _0x51833d=new _0x371ed5(_0x1b24be,_0x8d5126),_0x8d9772=new _0x2c5941(_0x1b24be);_0x8d9772['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x8d9772['bind'](...Object['keys'](_0x503e75['model']))['to'](_0x503e75['model']),_0x8d9772['delegate']('execute')['to'](_0x8d5126),_0x8d9772['on']('execute',()=>{_0x2b568b['execute'](_0x503e75['model']['commandName'],{'value':_0x503e75['model']['commandParam']}),_0x2b568b['editing']['view']['focus']();}),_0x51833d['children']['add'](_0x8d9772),_0x2a80c2['items']['add'](_0x51833d);}return _0x8d5126['panelView']['children']['add'](_0x2a80c2),this['_attachCustomOptionVisibilityHandler'](_0x8d5126,_0x4a2430,_0x2a80c2),_0x8d5126;});}['_attachCustomOptionVisibilityHandler'](_0x2120c9,_0x6d2d88,_0x17ee8d){if(!this['_shouldRenderCustomValueOption']())return;const _0x4e9e89=()=>{if(!_0x2120c9['isOpen'])return;_0x17ee8d['items']['last']['isVisible']=Boolean(_0x6d2d88['last']['model']['isOn']);};_0x4e9e89(),_0x2120c9['on']('change:isOpen',()=>{_0x4e9e89();});}},_=class extends _0x5d59cc{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.0-alpha.4",
3
+ "version": "48.3.0-alpha.5",
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.0-alpha.4",
29
- "@ckeditor/ckeditor5-engine": "48.3.0-alpha.4",
30
- "@ckeditor/ckeditor5-icons": "48.3.0-alpha.4",
31
- "@ckeditor/ckeditor5-list": "48.3.0-alpha.4",
32
- "@ckeditor/ckeditor5-ui": "48.3.0-alpha.4",
33
- "@ckeditor/ckeditor5-utils": "48.3.0-alpha.4"
28
+ "@ckeditor/ckeditor5-core": "48.3.0-alpha.5",
29
+ "@ckeditor/ckeditor5-engine": "48.3.0-alpha.5",
30
+ "@ckeditor/ckeditor5-icons": "48.3.0-alpha.5",
31
+ "@ckeditor/ckeditor5-list": "48.3.0-alpha.5",
32
+ "@ckeditor/ckeditor5-ui": "48.3.0-alpha.5",
33
+ "@ckeditor/ckeditor5-utils": "48.3.0-alpha.5"
34
34
  },
35
35
  "files": [
36
36
  "dist",