@ckeditor/ckeditor5-line-height 48.4.0-alpha.3 → 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.
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 _0xa55bf,Plugin as _0x379618}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x45c777,Collection as _0x346707,first as _0xaf045f,uid as _0x6fddc5}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x589718,isPercentageStyleValue as _0x3da07c}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x558bac,MenuBarMenuListItemView as _0x519a60,MenuBarMenuListView as _0x1bb80c,MenuBarMenuView as _0x375d10,UIModel as _0x16f46b,addListToDropdown as _0x263501,createDropdown as _0x4d8efe}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x2ec5f1}from'@ckeditor/ckeditor5-icons';var p=class extends _0xa55bf{['refresh'](){const _0x352054=this['editor']['model']['document'],_0xbbd173=_0xaf045f(_0x352054['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0xbbd173)&&this['_canHaveLineHeight'](_0xbbd173),this['value']=this['isEnabled']&&_0xbbd173['getAttribute']('lineHeight');}execute(_0x251532={}){const _0x30b0e6=this['editor']['model'],_0xdadc39=_0x30b0e6['document']['selection'],_0x22e7e9=_0x251532['value'];_0x30b0e6['change'](_0xd0f887=>{const _0x48daf7=Array['from'](_0xdadc39['getSelectedBlocks']())['filter'](_0x35aba2=>this['_canHaveLineHeight'](_0x35aba2));for(const _0x17a69c of _0x48daf7)_0x22e7e9?_0xd0f887['setAttribute']('lineHeight',_0x22e7e9,_0x17a69c):_0xd0f887['removeAttribute']('lineHeight',_0x17a69c);});}_canHaveLineHeight(_0x35cd16){return this['editor']['model']['schema']['checkAttribute'](_0x35cd16,'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(_0x4f2852){return'string'==typeof _0x4f2852&&'default'===_0x4f2852['toLowerCase']();}function L(_0x3f5d77){return _0x3f5d77['options']['map'](_0x481911=>{return H(_0x481911)?{'title':String(_0x3f5d77['defaultValue']),'model':'default'}:('number'==typeof _0x481911&&(_0x481911=String(_0x481911)),'string'!=typeof _0x481911?_0x481911:parseFloat(_0x481911)?{'title':_0x481911,'model':_0x481911,'view':{'name':'span','styles':{'line-height':_0x481911}}}:'string'==typeof(_0x5c83b9=_0x481911)?y[_0x5c83b9]:y[_0x5c83b9['model']]);var _0x5c83b9;})['filter'](_0xc217f6=>void 0x0!==_0xc217f6);}var v=class extends _0x379618{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {plugins:_0x48d060,conversion:_0x8bfe9c}=this['editor'];_0x48d060['has']('ListEditing')&&_0x48d060['has']('TodoListEditing')&&(_0x48d060['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x24cec3,_0x5be213,_0x5d186a,_0x35c809,_0x62553c){'todo'==_0x62553c['getAttribute']('listType')&&_0x5be213&&(_0x24cec3['addClass']('ck-list-marker-line-height',_0x5d186a),_0x24cec3['setStyle']('--ck-content-list-marker-line-height',_0x5be213,_0x5d186a));}}),_0x8bfe9c['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x8bfe9c['for']('upcast')['add'](_0x5ef202=>{_0x5ef202['on']('element:li',function(_0x52eb43){const _0x48ef4d=new _0x589718(_0x52eb43);return(_0x6c7994,_0x36f57c,_0x52c61c)=>{const _0x3ecd53=_0x48ef4d['match'](_0x36f57c['viewItem']);if(!_0x3ecd53)return;const _0x30ba00=_0x3ecd53['match'];_0x30ba00['name']=!0x1,_0x52c61c['consumable']['consume'](_0x36f57c['viewItem'],_0x30ba00);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x379618{static get['pluginName'](){return'LineHeightEditing';}static get requires(){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11b9d2){super(_0x11b9d2),_0x11b9d2['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}init(){const _0x6cb9a5=this['editor'];this['_validateConfig'](),_0x6cb9a5['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x6cb9a5['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x6cb9a5['commands']['add']('lineHeight',new p(_0x6cb9a5)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}afterInit(){!async function(_0x42f686){const _0x27497a='PHQ3YUIBrl0XdnwG9kez8sfpMv1ytWFRNZOV5jJaq7Tc2ogub64xCKDEALSihm',_0x36989a=0x79170,_0x289639=window['Date']['now'](),_0x3d0e07=_0x42f686['editor'],_0x225ecb=new window['Promise'](_0x2cf373=>{_0x3d0e07['once']('ready',_0x2cf373);}),_0x289b2d={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x2e4193=_0x3d0e07['config']['get']('licenseKey');async function _0x18656c(){let _0x1bafd4,_0x488e2a=null,_0x1bda2c=null;try{return'GPL'==_0x2e4193?'NotAllowed':(_0x1bafd4=_0x1a9c2d(),_0x1bafd4?(_0x1bafd4['usageEndpoint']&&(_0x1bda2c=_0x232b83(_0x1bafd4['usageEndpoint'],_0x1bafd4['jti'])),await _0x10e74a()?_0xf3bdec()?_0x3e3984()?'Expired':_0x188fd4()?('evaluation'==_0x1bafd4['licenseType']&&(_0x488e2a=_0x2796b5('EvaluationLimit')),await _0xa957d()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x3e3984(){const _0x24ec76=['evaluation','trial']['includes'](_0x1bafd4['licenseType'])?_0x289639/0x3e8:0xe10*_0x36989a;return _0x1bafd4['exp']<_0x24ec76;}function _0xf3bdec(){const _0x402940=_0x1bafd4['features'];return!!_0x402940&&(!!_0x402940['includes']('*')||!!_0x402940['includes']('LH'));}function _0x188fd4(){const _0x546acf=_0x1bafd4['licensedHosts'];if(!_0x546acf||0x0==_0x546acf['length'])return!0x0;const {hostname:_0x170495}=new URL(window['location']['href']);if(_0x546acf['includes'](_0x170495))return!0x0;const _0x436790=_0x170495['split']('.');return _0x546acf['filter'](_0x29e0e2=>_0x29e0e2['includes']('*'))['map'](_0x149e21=>_0x149e21['split']('.'))['filter'](_0x1c183d=>_0x1c183d['length']<=_0x436790['length'])['map'](_0x43ba61=>Array(_0x436790['length']-_0x43ba61['length'])['fill']('*'===_0x43ba61[0x0]?'*':'')['concat'](_0x43ba61))['some'](_0x45699f=>_0x436790['every']((_0xba5d21,_0x442770)=>_0x45699f[_0x442770]===_0xba5d21||'*'===_0x45699f[_0x442770]));}function _0xa957d(){return _0x488e2a&&_0x1bda2c?new window['Promise']((_0x59fdfb,_0x4090f2)=>{_0x488e2a['then'](_0x59fdfb,_0x4090f2),_0x1bda2c['then'](_0x520c7f=>{'Valid'!=_0x520c7f&&_0x59fdfb(_0x520c7f);},_0x4090f2);}):_0x488e2a||_0x1bda2c||'Valid';}}function _0x232b83(_0x2866c3,_0x1ac503){return new window['Promise'](_0x5fd845=>{if(_0x107dae())return _0x5fd845('Valid');_0x5204ba(),_0x3d0e07['decorate']('_sendUsageRequest');let _0x2fd37c=!0x1;const _0x129e15=_0x6fddc5();function _0xafa136(_0x4b6842){return!!_0x4b6842&&('object'==typeof _0x4b6842||'function'==typeof _0x4b6842)&&'function'==typeof _0x4b6842['then']&&'function'==typeof _0x4b6842['catch'];}function _0x21ab1b(_0x227e24){_0x5bbd6d(_0x227e24)['then'](_0x108c98=>_0x108c98&&'ok'==_0x108c98['status']?_0xe42478(_0x5928d1(_0x129e15+_0x1ac503))!=_0x108c98['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x295745=>(_0x5a65a2(),_0x295745),()=>{const _0x3013e6=_0x236699();return null==_0x3013e6?(_0x5a65a2(),'Valid'):_0x289639-_0x3013e6>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5fd845)['catch'](()=>{_0x5fd845('UsageLimit');});const _0x2886e8=0x36ee80;function _0x5a65a2(){const _0x3cd340='llct-'+_0xe42478(_0x5928d1(_0x2866c3)),_0x2f2303=_0x7034c3(_0xe42478(window['Math']['ceil'](_0x289639/_0x2886e8)));window['localStorage']['setItem'](_0x3cd340,_0x2f2303);}function _0x236699(){const _0x262111='llct-'+_0xe42478(_0x5928d1(_0x2866c3)),_0x1008bd=window['localStorage']['getItem'](_0x262111);return _0x1008bd?window['parseInt'](_0x7034c3(_0x1008bd),0x10)*_0x2886e8:null;}function _0x5bbd6d(_0x17c989){return new window['Promise']((_0x4f7a6c,_0x1b6477)=>{_0x17c989['then'](_0x4f7a6c,_0x1b6477),window['setTimeout'](_0x1b6477,0x1d4c0);});}}_0x3d0e07['on']('_sendUsageRequest',(_0x248089,_0x5121c2)=>{if(_0x5121c2[0x0]!=_0x2866c3)return _0x5fd845('UsageLimit');_0x5121c2[0x1]={..._0x5121c2[0x1],'requestId':_0x129e15};},{'priority':'high'}),_0x3d0e07['on']('_sendUsageRequest',_0x4c6618=>{_0xafa136(_0x4c6618['return'])&&(_0x2fd37c=!0x0,_0x21ab1b(_0x4c6618['return']));},{'priority':'low'}),_0x225ecb['then'](()=>{_0x2fd37c||_0x5fd845('UsageLimit');});});function _0x107dae(){return'auto'==_0x3d0e07['editing']['view']['_overlayModeHint'];}function _0x5204ba(){_0x3d0e07['editing']['view']['_overlayModeHint']='auto';}}function _0x2796b5(_0x50e5ee){const _0x2b9eef=[new window['Promise'](_0x5d1f23=>setTimeout(_0x5d1f23,0x93ecc)),_0x225ecb['then'](()=>new window['Promise'](_0x650b79=>{let _0x25f732=0x0;_0x3d0e07['model']['on']('applyOperation',(_0x2c0150,_0x5593ab)=>{_0x5593ab[0x0]['isDocumentOperation']&&_0x25f732++,0x5e8==_0x25f732&&(_0x650b79(),_0x2c0150['off']());});}))];return window['Promise']['race'](_0x2b9eef)['then'](()=>_0x50e5ee);}async function _0x50335e(){await _0x225ecb,_0x3d0e07['model']['change']=_0x996b34,_0x3d0e07['model']['enqueueChange']=_0x996b34,_0x3d0e07['enableReadOnlyMode']('model');}function _0x41aea6(_0x244e0a){const _0x55decd=_0x34d3d0();_0x3d0e07[_0x55decd]='lineHeightLicenseKey'+_0x244e0a,'Valid'!=_0x244e0a&&_0x50335e();}function _0x34d3d0(){const _0x5c88ff=window['String'](window['performance']['now']())['replace']('.','');let _0x411895='P';for(let _0x53cadd=0x0;_0x53cadd<_0x5c88ff['length'];_0x53cadd+=0x2){let _0x33d1cc=window['parseInt'](_0x5c88ff['substring'](_0x53cadd,_0x53cadd+0x2));_0x33d1cc>=0x3e&&(_0x33d1cc-=0x3e),_0x411895+=_0x27497a[_0x33d1cc];}return _0x411895;}function _0x1a9c2d(){const _0x531b84=_0x2e4193['split']('.');if(0x3!=_0x531b84['length'])return null;return _0x4c545e(_0x531b84[0x1]);function _0x4c545e(_0x3cc260){const _0x540379=_0x2c4c68(_0x3cc260);return _0x540379&&_0x4818d4()?_0x540379:null;function _0x4818d4(){const _0x8ae454=_0x540379['jti'],_0x2e3875=window['parseInt'](_0x8ae454['substring'](_0x8ae454['length']-0x8),0x10),_0x57fbdb={..._0x540379,'jti':_0x8ae454['substring'](0x0,_0x8ae454['length']-0x8)};return delete _0x57fbdb['vc'],_0x5928d1(_0x57fbdb)==_0x2e3875;}}}async function _0x10e74a(){let _0x37ea8d=!0x0;try{const [_0x5800a1,_0x49ee1f,_0x2c5abd]=_0x2e4193['split']('.');return _0x22e41e(_0x5800a1),await _0x1cd3da(_0x5800a1,_0x49ee1f,_0x2c5abd),_0x37ea8d;}catch{return!0x1;}function _0x22e41e(_0x5eff04){const _0x441587=_0x2c4c68(_0x5eff04);_0x441587&&'ES256'==_0x441587['alg']||(_0x37ea8d=!0x1);}async function _0x1cd3da(_0x45dbec,_0x3cc86e,_0x261471){const _0x44060a=window['Uint8Array']['from'](_0x6b085e(_0x261471),_0x6a95b3=>_0x6a95b3['charCodeAt'](0x0)),_0x3a1163=new window['TextEncoder']()['encode'](_0x45dbec+'.'+_0x3cc86e),_0x3b8a65=window['crypto']['subtle'];if(!_0x3b8a65)return;const _0x25533a=await _0x3b8a65['importKey']('jwk',_0x289b2d,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3b8a65['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x25533a,_0x44060a,_0x3a1163)||(_0x37ea8d=!0x1);}}function _0x2c4c68(_0xd9e8e1){return _0xd9e8e1['startsWith']('ey')?JSON['parse'](_0x6b085e(_0xd9e8e1)):null;}function _0x6b085e(_0x500a71){return window['atob'](_0x500a71['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5928d1(_0x253861){let _0x4220b8=0x1505;function _0x2eeca8(_0x248318){for(let _0x4ea6d3=0x0;_0x4ea6d3<_0x248318['length'];_0x4ea6d3++){const _0x1c3b3b=_0x248318['charCodeAt'](_0x4ea6d3);_0x4220b8=(_0x4220b8<<0x5)+_0x4220b8+_0x1c3b3b,_0x4220b8&=_0x4220b8;}}function _0x3e4398(_0x2d140b){Array['isArray'](_0x2d140b)?_0x2d140b['forEach'](_0x3e4398):_0x2d140b&&'object'==typeof _0x2d140b?Object['entries'](_0x2d140b)['sort']()['forEach'](([_0x15750f,_0x5106c7])=>{_0x2eeca8(_0x15750f),_0x3e4398(_0x5106c7);}):_0x2eeca8(window['String'](_0x2d140b));}return _0x3e4398(_0x253861),_0x4220b8>>>0x0;}function _0xe42478(_0xaf4bc0){return _0xaf4bc0['toString'](0x10)['padStart'](0x8,'0');}function _0x7034c3(_0x28e1be){return _0x28e1be['split']('')['reverse']()['join']('');}function _0x996b34(){}_0x41aea6(await _0x18656c());}(this);}_validateConfig(){const _0x5e5554=this['editor'];if(!_0x5e5554['config']['get']('lineHeight.supportAllValues'))return;const _0x1f485e=_0x5e5554['config']['get']('lineHeight.options')['filter'](_0x55782b=>'string'==typeof _0x55782b&&(!H(_0x55782b)&&isNaN(Number(_0x55782b))));if(_0x1f485e['length'])throw new _0x45c777('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x1f485e});}_prepareAnyValueConverters(){const _0x1cc0a2=this['editor'],_0x20e9e8=this['editor']['config']['get']('lineHeight.defaultValue');_0x1cc0a2['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x33d9c3=>String(_0x33d9c3)===String(_0x20e9e8)?null:{'key':'style','value':{'line-height':_0x33d9c3}}}),_0x1cc0a2['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x16caf4=>{let _0x4ed320=_0x16caf4['getStyle']('line-height');return _0x3da07c(_0x4ed320)&&(_0x4ed320=String(Number(_0x4ed320['slice'](0x0,-0x1))/0x64)),String(_0x4ed320)===String(_0x20e9e8)?null:_0x4ed320;}},'view':{'styles':{'line-height':/.*/}}});}_preparePredefinedConverters(){const _0xb88d58=this['editor'],_0x1724cb=this['editor']['config']['get']('lineHeight.defaultValue'),_0x2e0f9d=function(_0x3235d3,_0x2d6207){const _0x4af39b={'model':{'key':_0x3235d3,'values':[]},'view':{}};for(const _0x146db6 of _0x2d6207)'class'===_0x146db6['view']?.['key']?(_0x4af39b['model']['values']['push'](_0x146db6['model']),_0x4af39b['view'][_0x146db6['model']]={'key':'class','value':_0x146db6['view']['value']}):(_0x4af39b['model']['values']['push'](_0x146db6['model']),_0x4af39b['view'][_0x146db6['model']]={'key':'style','value':'line-height:'+_0x146db6['model']+';'});return _0x4af39b;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x4250ff=>_0x4250ff['model']));_0xb88d58['conversion']['attributeToAttribute'](_0x2e0f9d),_0xb88d58['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x38dda7=>{let _0x1994b2=_0x38dda7['getStyle']('line-height');return _0x3da07c(_0x1994b2)&&(_0x1994b2=String(Number(_0x1994b2['slice'](0x0,-0x1))/0x64)),_0x1994b2===String(_0x1724cb)?null:_0x2e0f9d['model']['values']['includes'](_0x1994b2)?_0x1994b2:null;}}});}},k=class extends _0x379618{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x6985f0={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x6985f0),this['_registerMenuBarComponent'](_0x6985f0),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x24412c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x40611b;for(const _0x4d1557 in _0x24412c){const _0x3e90e2=_0x4d1557,_0x25815c=_0x24412c[_0x3e90e2];if('lineHeightLicenseKeyValid'==_0x25815c||'lineHeightLicenseKeyInvalid'==_0x25815c||'lineHeightLicenseKeyExpired'==_0x25815c||'lineHeightLicenseKeyDomainLimit'==_0x25815c||'lineHeightLicenseKeyNotAllowed'==_0x25815c||'lineHeightLicenseKeyEvaluationLimit'==_0x25815c||'lineHeightLicenseKeyUsageLimit'==_0x25815c){delete _0x24412c[_0x3e90e2],_0x40611b=_0x25815c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x40611b&&_0x24412c['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x40611b&&_0x24412c['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x40611b&&_0x24412c['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x40611b&&_0x24412c['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x40611b&&_0x24412c['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x40611b&&_0x24412c['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_shouldRenderCustomValueOption(){return this['editor']['config']['get']('lineHeight.supportAllValues');}_getLocalizedLineHeightOptions(){const _0x3292cd=this['editor'],t=_0x3292cd['t'],_0x3ee0bd=_0x3292cd['config']['get']('lineHeight'),_0x826016={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x3ee0bd)['map'](_0x2a8f51=>{const _0x52585e=_0x826016[_0x2a8f51['title']];return _0x52585e&&_0x52585e!=_0x2a8f51['title']&&(_0x2a8f51=Object['assign']({},_0x2a8f51,{'title':_0x52585e})),_0x2a8f51;});}_prepareListOptions(){const _0x20e143=this['editor']['commands']['get']('lineHeight'),_0x6fa6b8=this['editor']['config']['get']('lineHeight.defaultValue'),_0x210ab6=this['_getLocalizedLineHeightOptions'](),_0x3679c7=new _0x346707(),_0x4c37ac=_0x395d18=>'default'===_0x395d18||String(_0x6fa6b8)===_0x395d18;for(const _0x3eb9c2 of _0x210ab6){const _0x464cbb={'type':'button','model':new _0x16f46b({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x3eb9c2['title'],'withText':!0x0})};_0x4c37ac(_0x3eb9c2['model'])?(_0x464cbb['model']['bind']('isOn')['to'](_0x20e143,'value',_0x129e2d=>!_0x129e2d),_0x464cbb['model']['commandParam']=void 0x0):(_0x464cbb['model']['bind']('isOn')['to'](_0x20e143,'value',_0x1564f1=>_0x1564f1===_0x3eb9c2['model']),_0x464cbb['model']['commandParam']=_0x3eb9c2['model']),_0x3679c7['add'](_0x464cbb);}if(this['_shouldRenderCustomValueOption']()){const _0x278980=this['_getCustomValueOptionDefinition'](_0x210ab6);_0x3679c7['add'](_0x278980);}return _0x3679c7;}_getCustomValueOptionDefinition(_0x37671f){const _0x987653=this['editor'],t=_0x987653['t'],_0x3c4f39=_0x987653['commands']['get']('lineHeight'),_0x5be41c=_0x37671f['map'](_0x34e605=>_0x34e605['model']),_0x483328={'type':'button','model':new _0x16f46b({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x483328['model']['bind']('commandParam')['to'](_0x3c4f39,'value'),_0x483328['model']['bind']('isOn')['to'](_0x3c4f39,'value',_0x3ab459=>!!_0x3ab459&&!_0x5be41c['includes'](String(_0x3ab459))),_0x483328['model']['bind']('label')['to'](_0x3c4f39,'value',_0x1b0132=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x1b0132))),_0x483328;}_registerToolbarComponent({accessibleLabel:_0x55118e,options:_0xcdf672}){const _0x58db53=this['editor'],_0x3334ec=_0x58db53['commands']['get']('lineHeight');_0x58db53['ui']['componentFactory']['add']('lineHeight',_0xc281b8=>{const _0x1a1aea=_0x4d8efe(_0xc281b8);return _0x263501(_0x1a1aea,_0xcdf672,{'role':'menu','ariaLabel':_0x55118e}),_0x1a1aea['buttonView']['set']({'label':_0x55118e,'tooltip':!0x0,'icon':_0x2ec5f1}),_0x1a1aea['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x1a1aea['bind']('isEnabled')['to'](_0x3334ec),this['listenTo'](_0x1a1aea,'execute',_0x5454b4=>{_0x58db53['execute'](_0x5454b4['source']['commandName'],{'value':_0x5454b4['source']['commandParam']}),_0x58db53['editing']['view']['focus']();}),_0x1a1aea['once']('change:isOpen',()=>{const _0x593a01=_0x1a1aea['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x1a1aea,_0xcdf672,_0x593a01);}),_0x1a1aea;});}_registerMenuBarComponent({accessibleLabel:_0x5bc73a,options:_0x2d471b}){const _0x301085=this['editor'],_0x4509b9=_0x301085['commands']['get']('lineHeight');_0x301085['ui']['componentFactory']['add']('menuBar:lineHeight',_0xe1779a=>{const _0x40b134=new _0x375d10(_0xe1779a);_0x40b134['buttonView']['set']({'label':_0x5bc73a,'icon':_0x2ec5f1}),_0x40b134['bind']('isEnabled')['to'](_0x4509b9);const _0x10c11e=new _0x1bb80c(_0xe1779a);for(const _0x88c5b of _0x2d471b){const _0x1c12b3=new _0x519a60(_0xe1779a,_0x40b134),_0x3f9394=new _0x558bac(_0xe1779a);_0x3f9394['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x3f9394['bind'](...Object['keys'](_0x88c5b['model']))['to'](_0x88c5b['model']),_0x3f9394['delegate']('execute')['to'](_0x40b134),_0x3f9394['on']('execute',()=>{_0x301085['execute'](_0x88c5b['model']['commandName'],{'value':_0x88c5b['model']['commandParam']}),_0x301085['editing']['view']['focus']();}),_0x1c12b3['children']['add'](_0x3f9394),_0x10c11e['items']['add'](_0x1c12b3);}return _0x40b134['panelView']['children']['add'](_0x10c11e),this['_attachCustomOptionVisibilityHandler'](_0x40b134,_0x2d471b,_0x10c11e),_0x40b134;});}_attachCustomOptionVisibilityHandler(_0x19d4af,_0x303be0,_0x216a73){if(!this['_shouldRenderCustomValueOption']())return;const _0x3916dd=()=>{if(!_0x19d4af['isOpen'])return;_0x216a73['items']['last']['isVisible']=Boolean(_0x303be0['last']['model']['isOn']);};_0x3916dd(),_0x19d4af['on']('change:isOpen',()=>{_0x3916dd();});}},_=class extends _0x379618{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 _0x36089f,Plugin as _0x3289f4}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x8e2518,Collection as _0x29f1d8,first as _0x4f419c,uid as _0x1bc464}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x36d70b,isPercentageStyleValue as _0x3dbc1d}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0xc93881,MenuBarMenuListItemView as _0x10ce97,MenuBarMenuListView as _0x4c4396,MenuBarMenuView as _0x4f8831,UIModel as _0x4cb159,addListToDropdown as _0x3ffe32,createDropdown as _0x53dabc}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x189a01}from'@ckeditor/ckeditor5-icons';var p=class extends _0x36089f{['refresh'](){const _0x204faa=this['editor']['model']['document'],_0x384399=_0x4f419c(_0x204faa['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x384399)&&this['_canHaveLineHeight'](_0x384399),this['value']=this['isEnabled']&&_0x384399['getAttribute']('lineHeight');}execute(_0x3f1520={}){const _0x30c126=this['editor']['model'],_0x47c394=_0x30c126['document']['selection'],_0x457838=_0x3f1520['value'];_0x30c126['change'](_0x2bf57b=>{const _0x576c9f=Array['from'](_0x47c394['getSelectedBlocks']())['filter'](_0x4c2726=>this['_canHaveLineHeight'](_0x4c2726));for(const _0x372da8 of _0x576c9f)_0x457838?_0x2bf57b['setAttribute']('lineHeight',_0x457838,_0x372da8):_0x2bf57b['removeAttribute']('lineHeight',_0x372da8);});}_canHaveLineHeight(_0x2d72f7){return this['editor']['model']['schema']['checkAttribute'](_0x2d72f7,'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(_0x5b911d){return'string'==typeof _0x5b911d&&'default'===_0x5b911d['toLowerCase']();}function L(_0x360ea9){return _0x360ea9['options']['map'](_0x18a8ef=>{return H(_0x18a8ef)?{'title':String(_0x360ea9['defaultValue']),'model':'default'}:('number'==typeof _0x18a8ef&&(_0x18a8ef=String(_0x18a8ef)),'string'!=typeof _0x18a8ef?_0x18a8ef:parseFloat(_0x18a8ef)?{'title':_0x18a8ef,'model':_0x18a8ef,'view':{'name':'span','styles':{'line-height':_0x18a8ef}}}:'string'==typeof(_0x3901a9=_0x18a8ef)?y[_0x3901a9]:y[_0x3901a9['model']]);var _0x3901a9;})['filter'](_0x42730a=>void 0x0!==_0x42730a);}var v=class extends _0x3289f4{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {plugins:_0x3b96d0,conversion:_0x3a2035}=this['editor'];_0x3b96d0['has']('ListEditing')&&_0x3b96d0['has']('TodoListEditing')&&(_0x3b96d0['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x3afabf,_0x5d65b5,_0x33b8fa,_0x2a019f,_0x577caf){'todo'==_0x577caf['getAttribute']('listType')&&_0x5d65b5&&(_0x3afabf['addClass']('ck-list-marker-line-height',_0x33b8fa),_0x3afabf['setStyle']('--ck-content-list-marker-line-height',_0x5d65b5,_0x33b8fa));}}),_0x3a2035['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x3a2035['for']('upcast')['add'](_0x592a1b=>{_0x592a1b['on']('element:li',function(_0x7ae085){const _0x1df42b=new _0x36d70b(_0x7ae085);return(_0x5c29c2,_0x229d2f,_0x2f3593)=>{const _0x154a38=_0x1df42b['match'](_0x229d2f['viewItem']);if(!_0x154a38)return;const _0x421df8=_0x154a38['match'];_0x421df8['name']=!0x1,_0x2f3593['consumable']['consume'](_0x229d2f['viewItem'],_0x421df8);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x3289f4{static get['pluginName'](){return'LineHeightEditing';}static get requires(){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22b868){super(_0x22b868),_0x22b868['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}init(){const _0x1b3ab7=this['editor'];this['_validateConfig'](),_0x1b3ab7['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x1b3ab7['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x1b3ab7['commands']['add']('lineHeight',new p(_0x1b3ab7)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}afterInit(){!async function(_0x515fb2){const _0x1c8290='PHQ3YUIBrl0XdnwG9kez8sfpMv1ytWFRNZOV5jJaq7Tc2ogub64xCKDEALSihm',_0x4ef69a=0x79188,_0x2847ea=window['Date']['now'](),_0x415b5d=_0x515fb2['editor'],_0x37cfc9=new window['Promise'](_0xf0ae1f=>{_0x415b5d['once']('ready',_0xf0ae1f);}),_0x566aca={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x30f984=_0x415b5d['config']['get']('licenseKey');async function _0x54141f(){let _0x2f1b6f,_0x20683e=null,_0x4e386d=null;try{return'GPL'==_0x30f984?'NotAllowed':(_0x2f1b6f=_0xd1bcbd(),_0x2f1b6f?(_0x2f1b6f['usageEndpoint']&&(_0x4e386d=_0x3dc70d(_0x2f1b6f['usageEndpoint'],_0x2f1b6f['jti'])),await _0x247da3()?_0x2279ef()?_0x51f885()?'Expired':_0x13ceb8()?('evaluation'==_0x2f1b6f['licenseType']&&(_0x20683e=_0x58fe7c('EvaluationLimit')),await _0x538197()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x51f885(){const _0x3dcb2b=['evaluation','trial']['includes'](_0x2f1b6f['licenseType'])?_0x2847ea/0x3e8:0xe10*_0x4ef69a;return _0x2f1b6f['exp']<_0x3dcb2b;}function _0x2279ef(){const _0x38295f=_0x2f1b6f['features'];return!!_0x38295f&&(!!_0x38295f['includes']('*')||!!_0x38295f['includes']('LH'));}function _0x13ceb8(){const _0x4701c7=_0x2f1b6f['licensedHosts'];if(!_0x4701c7||0x0==_0x4701c7['length'])return!0x0;const {hostname:_0x2bbe12}=new URL(window['location']['href']);if(_0x4701c7['includes'](_0x2bbe12))return!0x0;const _0x4c6ee6=_0x2bbe12['split']('.');return _0x4701c7['filter'](_0xcc4a45=>_0xcc4a45['includes']('*'))['map'](_0x49b98a=>_0x49b98a['split']('.'))['filter'](_0x55abcd=>_0x55abcd['length']<=_0x4c6ee6['length'])['map'](_0x1bf343=>Array(_0x4c6ee6['length']-_0x1bf343['length'])['fill']('*'===_0x1bf343[0x0]?'*':'')['concat'](_0x1bf343))['some'](_0x35c717=>_0x4c6ee6['every']((_0x32419e,_0x3d2a30)=>_0x35c717[_0x3d2a30]===_0x32419e||'*'===_0x35c717[_0x3d2a30]));}function _0x538197(){return _0x20683e&&_0x4e386d?new window['Promise']((_0x4ac419,_0x33d581)=>{_0x20683e['then'](_0x4ac419,_0x33d581),_0x4e386d['then'](_0x222b11=>{'Valid'!=_0x222b11&&_0x4ac419(_0x222b11);},_0x33d581);}):_0x20683e||_0x4e386d||'Valid';}}function _0x3dc70d(_0x2900b0,_0x5cd183){return new window['Promise'](_0x2e05b8=>{if(_0x1798ce())return _0x2e05b8('Valid');_0x4c9443(),_0x415b5d['decorate']('_sendUsageRequest');let _0x37372c=!0x1;const _0x22f852=_0x1bc464();function _0x1ede53(_0x3b26f0){return!!_0x3b26f0&&('object'==typeof _0x3b26f0||'function'==typeof _0x3b26f0)&&'function'==typeof _0x3b26f0['then']&&'function'==typeof _0x3b26f0['catch'];}function _0x4bb109(_0x102b9f){_0x43488d(_0x102b9f)['then'](_0x3f88ad=>_0x3f88ad&&'ok'==_0x3f88ad['status']?_0x599556(_0x378086(_0x22f852+_0x5cd183))!=_0x3f88ad['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x3b3f4d=>(_0xb9c1e9(),_0x3b3f4d),()=>{const _0x33bad6=_0x2fdb4e();return null==_0x33bad6?(_0xb9c1e9(),'Valid'):_0x2847ea-_0x33bad6>0x240c8400?'UsageLimit':'Valid';})['then'](_0x2e05b8)['catch'](()=>{_0x2e05b8('UsageLimit');});const _0x190b71=0x36ee80;function _0xb9c1e9(){const _0x43b4c7='llct-'+_0x599556(_0x378086(_0x2900b0)),_0x40a534=_0x23448b(_0x599556(window['Math']['ceil'](_0x2847ea/_0x190b71)));window['localStorage']['setItem'](_0x43b4c7,_0x40a534);}function _0x2fdb4e(){const _0x2a6802='llct-'+_0x599556(_0x378086(_0x2900b0)),_0x3b7ac9=window['localStorage']['getItem'](_0x2a6802);return _0x3b7ac9?window['parseInt'](_0x23448b(_0x3b7ac9),0x10)*_0x190b71:null;}function _0x43488d(_0x3689bc){return new window['Promise']((_0xf7f64b,_0x142e23)=>{_0x3689bc['then'](_0xf7f64b,_0x142e23),window['setTimeout'](_0x142e23,0x1d4c0);});}}_0x415b5d['on']('_sendUsageRequest',(_0x289bce,_0x8df45c)=>{if(_0x8df45c[0x0]!=_0x2900b0)return _0x2e05b8('UsageLimit');_0x8df45c[0x1]={..._0x8df45c[0x1],'requestId':_0x22f852};},{'priority':'high'}),_0x415b5d['on']('_sendUsageRequest',_0x45974e=>{_0x1ede53(_0x45974e['return'])&&(_0x37372c=!0x0,_0x4bb109(_0x45974e['return']));},{'priority':'low'}),_0x37cfc9['then'](()=>{_0x37372c||_0x2e05b8('UsageLimit');});});function _0x1798ce(){return'auto'==_0x415b5d['editing']['view']['_overlayModeHint'];}function _0x4c9443(){_0x415b5d['editing']['view']['_overlayModeHint']='auto';}}function _0x58fe7c(_0x619ae8){const _0x296d68=[new window['Promise'](_0x31dd69=>setTimeout(_0x31dd69,0x93ecc)),_0x37cfc9['then'](()=>new window['Promise'](_0x1775f8=>{let _0x79801=0x0;_0x415b5d['model']['on']('applyOperation',(_0x4a5966,_0x26de3c)=>{_0x26de3c[0x0]['isDocumentOperation']&&_0x79801++,0x5e8==_0x79801&&(_0x1775f8(),_0x4a5966['off']());});}))];return window['Promise']['race'](_0x296d68)['then'](()=>_0x619ae8);}async function _0x45e317(){await _0x37cfc9,_0x415b5d['model']['change']=_0x36827b,_0x415b5d['model']['enqueueChange']=_0x36827b,_0x415b5d['enableReadOnlyMode']('model');}function _0x3d6a2e(_0x3907b){const _0x2875f4=_0x4810ba();_0x415b5d[_0x2875f4]='lineHeightLicenseKey'+_0x3907b,'Valid'!=_0x3907b&&_0x45e317();}function _0x4810ba(){const _0x228d02=window['String'](window['performance']['now']())['replace']('.','');let _0xba0b1d='P';for(let _0x540575=0x0;_0x540575<_0x228d02['length'];_0x540575+=0x2){let _0x42eb2b=window['parseInt'](_0x228d02['substring'](_0x540575,_0x540575+0x2));_0x42eb2b>=0x3e&&(_0x42eb2b-=0x3e),_0xba0b1d+=_0x1c8290[_0x42eb2b];}return _0xba0b1d;}function _0xd1bcbd(){const _0xb9ca82=_0x30f984['split']('.');if(0x3!=_0xb9ca82['length'])return null;return _0x3be2ee(_0xb9ca82[0x1]);function _0x3be2ee(_0x559770){const _0x4db621=_0x461e30(_0x559770);return _0x4db621&&_0x46029a()?_0x4db621:null;function _0x46029a(){const _0x512726=_0x4db621['jti'],_0x27a541=window['parseInt'](_0x512726['substring'](_0x512726['length']-0x8),0x10),_0x2e8f7d={..._0x4db621,'jti':_0x512726['substring'](0x0,_0x512726['length']-0x8)};return delete _0x2e8f7d['vc'],_0x378086(_0x2e8f7d)==_0x27a541;}}}async function _0x247da3(){let _0xc17f63=!0x0;try{const [_0x50af14,_0x38fbb5,_0x5dcbfc]=_0x30f984['split']('.');return _0x51280c(_0x50af14),await _0x3b0160(_0x50af14,_0x38fbb5,_0x5dcbfc),_0xc17f63;}catch{return!0x1;}function _0x51280c(_0x1c1905){const _0xe8f306=_0x461e30(_0x1c1905);_0xe8f306&&'ES256'==_0xe8f306['alg']||(_0xc17f63=!0x1);}async function _0x3b0160(_0x2112ac,_0x12d349,_0x514fd2){const _0x13396=window['Uint8Array']['from'](_0x5e55e0(_0x514fd2),_0x9003a3=>_0x9003a3['charCodeAt'](0x0)),_0x6e9a79=new window['TextEncoder']()['encode'](_0x2112ac+'.'+_0x12d349),_0x46a350=window['crypto']['subtle'];if(!_0x46a350)return;const _0xe2998e=await _0x46a350['importKey']('jwk',_0x566aca,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x46a350['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xe2998e,_0x13396,_0x6e9a79)||(_0xc17f63=!0x1);}}function _0x461e30(_0x3c02c9){return _0x3c02c9['startsWith']('ey')?JSON['parse'](_0x5e55e0(_0x3c02c9)):null;}function _0x5e55e0(_0xec8c4f){return window['atob'](_0xec8c4f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x378086(_0x288c39){let _0x5ad22e=0x1505;function _0x15b83c(_0x472a92){for(let _0x408522=0x0;_0x408522<_0x472a92['length'];_0x408522++){const _0x3fc54e=_0x472a92['charCodeAt'](_0x408522);_0x5ad22e=(_0x5ad22e<<0x5)+_0x5ad22e+_0x3fc54e,_0x5ad22e&=_0x5ad22e;}}function _0xd6e3c1(_0x158321){Array['isArray'](_0x158321)?_0x158321['forEach'](_0xd6e3c1):_0x158321&&'object'==typeof _0x158321?Object['entries'](_0x158321)['sort']()['forEach'](([_0x5870f,_0x2cb595])=>{_0x15b83c(_0x5870f),_0xd6e3c1(_0x2cb595);}):_0x15b83c(window['String'](_0x158321));}return _0xd6e3c1(_0x288c39),_0x5ad22e>>>0x0;}function _0x599556(_0x13e380){return _0x13e380['toString'](0x10)['padStart'](0x8,'0');}function _0x23448b(_0x50f593){return _0x50f593['split']('')['reverse']()['join']('');}function _0x36827b(){}_0x3d6a2e(await _0x54141f());}(this);}_validateConfig(){const _0x181f3d=this['editor'];if(!_0x181f3d['config']['get']('lineHeight.supportAllValues'))return;const _0xbc3793=_0x181f3d['config']['get']('lineHeight.options')['filter'](_0x2b7a25=>'string'==typeof _0x2b7a25&&(!H(_0x2b7a25)&&isNaN(Number(_0x2b7a25))));if(_0xbc3793['length'])throw new _0x8e2518('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0xbc3793});}_prepareAnyValueConverters(){const _0x516728=this['editor'],_0x21e225=this['editor']['config']['get']('lineHeight.defaultValue');_0x516728['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x198d10=>String(_0x198d10)===String(_0x21e225)?null:{'key':'style','value':{'line-height':_0x198d10}}}),_0x516728['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x50409f=>{let _0x57fb4d=_0x50409f['getStyle']('line-height');return _0x3dbc1d(_0x57fb4d)&&(_0x57fb4d=String(Number(_0x57fb4d['slice'](0x0,-0x1))/0x64)),String(_0x57fb4d)===String(_0x21e225)?null:_0x57fb4d;}},'view':{'styles':{'line-height':/.*/}}});}_preparePredefinedConverters(){const _0x502bbd=this['editor'],_0x21dc0b=this['editor']['config']['get']('lineHeight.defaultValue'),_0x40d1a9=function(_0x3e80c0,_0x4ae137){const _0x57a0ab={'model':{'key':_0x3e80c0,'values':[]},'view':{}};for(const _0x21251e of _0x4ae137)'class'===_0x21251e['view']?.['key']?(_0x57a0ab['model']['values']['push'](_0x21251e['model']),_0x57a0ab['view'][_0x21251e['model']]={'key':'class','value':_0x21251e['view']['value']}):(_0x57a0ab['model']['values']['push'](_0x21251e['model']),_0x57a0ab['view'][_0x21251e['model']]={'key':'style','value':'line-height:'+_0x21251e['model']+';'});return _0x57a0ab;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x309829=>_0x309829['model']));_0x502bbd['conversion']['attributeToAttribute'](_0x40d1a9),_0x502bbd['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x2b10f8=>{let _0x5b59e1=_0x2b10f8['getStyle']('line-height');return _0x3dbc1d(_0x5b59e1)&&(_0x5b59e1=String(Number(_0x5b59e1['slice'](0x0,-0x1))/0x64)),_0x5b59e1===String(_0x21dc0b)?null:_0x40d1a9['model']['values']['includes'](_0x5b59e1)?_0x5b59e1:null;}}});}},k=class extends _0x3289f4{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x37b048={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x37b048),this['_registerMenuBarComponent'](_0x37b048),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3e4729=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x31f760;for(const _0x12e177 in _0x3e4729){const _0x41f133=_0x12e177,_0x235ca1=_0x3e4729[_0x41f133];if('lineHeightLicenseKeyValid'==_0x235ca1||'lineHeightLicenseKeyInvalid'==_0x235ca1||'lineHeightLicenseKeyExpired'==_0x235ca1||'lineHeightLicenseKeyDomainLimit'==_0x235ca1||'lineHeightLicenseKeyNotAllowed'==_0x235ca1||'lineHeightLicenseKeyEvaluationLimit'==_0x235ca1||'lineHeightLicenseKeyUsageLimit'==_0x235ca1){delete _0x3e4729[_0x41f133],_0x31f760=_0x235ca1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x31f760&&_0x3e4729['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x31f760&&_0x3e4729['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x31f760&&_0x3e4729['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x31f760&&_0x3e4729['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x31f760&&_0x3e4729['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x31f760&&_0x3e4729['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_shouldRenderCustomValueOption(){return this['editor']['config']['get']('lineHeight.supportAllValues');}_getLocalizedLineHeightOptions(){const _0x294584=this['editor'],t=_0x294584['t'],_0x5ba025=_0x294584['config']['get']('lineHeight'),_0x548e2a={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x5ba025)['map'](_0x41ca4c=>{const _0xf5933f=_0x548e2a[_0x41ca4c['title']];return _0xf5933f&&_0xf5933f!=_0x41ca4c['title']&&(_0x41ca4c=Object['assign']({},_0x41ca4c,{'title':_0xf5933f})),_0x41ca4c;});}_prepareListOptions(){const _0x5a10e5=this['editor']['commands']['get']('lineHeight'),_0x430813=this['editor']['config']['get']('lineHeight.defaultValue'),_0x1e5089=this['_getLocalizedLineHeightOptions'](),_0x92989e=new _0x29f1d8(),_0x1d65ff=_0x39dc36=>'default'===_0x39dc36||String(_0x430813)===_0x39dc36;for(const _0x485f4a of _0x1e5089){const _0x155679={'type':'button','model':new _0x4cb159({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x485f4a['title'],'withText':!0x0})};_0x1d65ff(_0x485f4a['model'])?(_0x155679['model']['bind']('isOn')['to'](_0x5a10e5,'value',_0x4516c6=>!_0x4516c6),_0x155679['model']['commandParam']=void 0x0):(_0x155679['model']['bind']('isOn')['to'](_0x5a10e5,'value',_0x40fbec=>_0x40fbec===_0x485f4a['model']),_0x155679['model']['commandParam']=_0x485f4a['model']),_0x92989e['add'](_0x155679);}if(this['_shouldRenderCustomValueOption']()){const _0x334ffc=this['_getCustomValueOptionDefinition'](_0x1e5089);_0x92989e['add'](_0x334ffc);}return _0x92989e;}_getCustomValueOptionDefinition(_0x3d742e){const _0x5cee2c=this['editor'],t=_0x5cee2c['t'],_0x32151a=_0x5cee2c['commands']['get']('lineHeight'),_0x322cfd=_0x3d742e['map'](_0x14f819=>_0x14f819['model']),_0x16a01e={'type':'button','model':new _0x4cb159({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x16a01e['model']['bind']('commandParam')['to'](_0x32151a,'value'),_0x16a01e['model']['bind']('isOn')['to'](_0x32151a,'value',_0x1dcb6a=>!!_0x1dcb6a&&!_0x322cfd['includes'](String(_0x1dcb6a))),_0x16a01e['model']['bind']('label')['to'](_0x32151a,'value',_0x108c3e=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x108c3e))),_0x16a01e;}_registerToolbarComponent({accessibleLabel:_0x102a13,options:_0x4cc61f}){const _0x599764=this['editor'],_0x268097=_0x599764['commands']['get']('lineHeight');_0x599764['ui']['componentFactory']['add']('lineHeight',_0xb1aad9=>{const _0x3dc077=_0x53dabc(_0xb1aad9);return _0x3ffe32(_0x3dc077,_0x4cc61f,{'role':'menu','ariaLabel':_0x102a13}),_0x3dc077['buttonView']['set']({'label':_0x102a13,'tooltip':!0x0,'icon':_0x189a01}),_0x3dc077['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x3dc077['bind']('isEnabled')['to'](_0x268097),this['listenTo'](_0x3dc077,'execute',_0x5ea2f3=>{_0x599764['execute'](_0x5ea2f3['source']['commandName'],{'value':_0x5ea2f3['source']['commandParam']}),_0x599764['editing']['view']['focus']();}),_0x3dc077['once']('change:isOpen',()=>{const _0x1bffcb=_0x3dc077['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x3dc077,_0x4cc61f,_0x1bffcb);}),_0x3dc077;});}_registerMenuBarComponent({accessibleLabel:_0x43512e,options:_0x304eaf}){const _0x432081=this['editor'],_0xd5dca5=_0x432081['commands']['get']('lineHeight');_0x432081['ui']['componentFactory']['add']('menuBar:lineHeight',_0x55315b=>{const _0xe5ee2e=new _0x4f8831(_0x55315b);_0xe5ee2e['buttonView']['set']({'label':_0x43512e,'icon':_0x189a01}),_0xe5ee2e['bind']('isEnabled')['to'](_0xd5dca5);const _0x56abc9=new _0x4c4396(_0x55315b);for(const _0x593646 of _0x304eaf){const _0x5578cc=new _0x10ce97(_0x55315b,_0xe5ee2e),_0x121bf5=new _0xc93881(_0x55315b);_0x121bf5['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x121bf5['bind'](...Object['keys'](_0x593646['model']))['to'](_0x593646['model']),_0x121bf5['delegate']('execute')['to'](_0xe5ee2e),_0x121bf5['on']('execute',()=>{_0x432081['execute'](_0x593646['model']['commandName'],{'value':_0x593646['model']['commandParam']}),_0x432081['editing']['view']['focus']();}),_0x5578cc['children']['add'](_0x121bf5),_0x56abc9['items']['add'](_0x5578cc);}return _0xe5ee2e['panelView']['children']['add'](_0x56abc9),this['_attachCustomOptionVisibilityHandler'](_0xe5ee2e,_0x304eaf,_0x56abc9),_0xe5ee2e;});}_attachCustomOptionVisibilityHandler(_0x384170,_0x8c8c4e,_0x2e41c8){if(!this['_shouldRenderCustomValueOption']())return;const _0x31381b=()=>{if(!_0x384170['isOpen'])return;_0x2e41c8['items']['last']['isVisible']=Boolean(_0x8c8c4e['last']['model']['isOn']);};_0x31381b(),_0x384170['on']('change:isOpen',()=>{_0x31381b();});}},_=class extends _0x3289f4{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.4.0-alpha.3",
3
+ "version": "48.4.0-alpha.4",
4
4
  "description": "Line height feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (https://cksource.com/)",
@@ -26,12 +26,12 @@
26
26
  "dist/translations/*.umd.js"
27
27
  ],
28
28
  "dependencies": {
29
- "@ckeditor/ckeditor5-core": "48.4.0-alpha.3",
30
- "@ckeditor/ckeditor5-engine": "48.4.0-alpha.3",
31
- "@ckeditor/ckeditor5-icons": "48.4.0-alpha.3",
32
- "@ckeditor/ckeditor5-list": "48.4.0-alpha.3",
33
- "@ckeditor/ckeditor5-ui": "48.4.0-alpha.3",
34
- "@ckeditor/ckeditor5-utils": "48.4.0-alpha.3"
29
+ "@ckeditor/ckeditor5-core": "48.4.0-alpha.4",
30
+ "@ckeditor/ckeditor5-engine": "48.4.0-alpha.4",
31
+ "@ckeditor/ckeditor5-icons": "48.4.0-alpha.4",
32
+ "@ckeditor/ckeditor5-list": "48.4.0-alpha.4",
33
+ "@ckeditor/ckeditor5-ui": "48.4.0-alpha.4",
34
+ "@ckeditor/ckeditor5-utils": "48.4.0-alpha.4"
35
35
  },
36
36
  "files": [
37
37
  "dist",