UNPKG

@ckeditor/ckeditor5-case-change

Version:

Case change feature for CKEditor 5.

23 lines • 29.5 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ import{Command as _0x540eff,Plugin as _0x16c23b}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0xb3aa82,Collection as _0x175cc5}from'@ckeditor/ckeditor5-utils/dist/index.js';import{MenuBarMenuView as _0x1b37fe,MenuBarMenuListView as _0x1712a5,MenuBarMenuListItemView as _0x5babad,MenuBarMenuListItemButtonView as _0x7b8943,createDropdown as _0x5d2a74,addListToDropdown as _0x38d9b5,UIModel as _0xf43029}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconCaseChange as _0x1c08fe}from'@ckeditor/ckeditor5-icons/dist/index.js';class c extends _0x540eff{['_transformCallback'];constructor(_0xa48d3b,_0x2be1dd){super(_0xa48d3b),this['_transformCallback']=_0x2be1dd;}['execute'](){const _0x35fa64=this['editor']['model'],_0x4dd64f=Array['from'](this['_getAffectedRanges']()),_0x464e48=Array['from'](_0x35fa64['document']['selection']['getRanges']());_0x35fa64['change'](_0x1a949d=>{for(const _0x4d5f9b of _0x4dd64f)this['_modifyContent'](_0x4d5f9b,_0x1a949d);_0x1a949d['setSelection'](_0x464e48);});}['refresh'](){for(const _0x230bc7 of this['_getAffectedRanges']())for(const _0x2c4137 of _0x230bc7)if(_0x2c4137['item']['is']('$textProxy'))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['_getAffectedRanges'](){const _0x388448=this['editor']['model'],_0x19e28b=_0x388448['document']['selection'];if(_0x19e28b['isCollapsed']){const _0x292fe9=this['_findAncestorTextBlock'](_0x19e28b['getFirstPosition']()['parent']);return _0x292fe9?[_0x388448['createRangeIn'](_0x292fe9)]:[];}return _0x19e28b['getRanges']();}['_modifyContent'](_0x22beaf,_0x4dbe31){for(const _0x475464 of this['_getElementsAllowingText'](_0x22beaf)){const _0x3d0ca7=this['_getElementTextContent'](_0x475464),_0x4a63bb=this['_transformCallback'](_0x3d0ca7);for(const _0x13a1c7 of this['_getTextNodesRangeLimited'](_0x475464,_0x22beaf))this['_replaceTextNodeData'](_0x13a1c7,_0x4a63bb,_0x4dbe31);}}['_findAncestorTextBlock'](_0xfed5f9){const _0x2a9dee=this['editor']['model']['schema'];if(_0xfed5f9['is']('element')&&_0x2a9dee['checkChild'](_0xfed5f9,'$text'))return _0xfed5f9;const _0x506856=_0xfed5f9['parent'];return!_0x506856||_0x2a9dee['isLimit'](_0xfed5f9)?null:this['_findAncestorTextBlock'](_0x506856);}*['_getElementsAllowingText'](_0x3e8988){const _0x29f00e=new Set();for(const {item:_0x97f77e}of _0x3e8988['getWalker']()){const _0x2cdaa3=this['_findAncestorTextBlock'](_0x97f77e);_0x2cdaa3&&!_0x29f00e['has'](_0x2cdaa3)&&(_0x29f00e['add'](_0x2cdaa3),yield _0x2cdaa3);}}['_getElementTextContent'](_0x2ddaef){return Array['from'](_0x2ddaef['getChildren']())['reduce']((_0x3f9b41,_0x8e5963)=>_0x3f9b41+(_0x8e5963['is']('$text')?_0x8e5963['data']:'\x20'),'');}*['_getTextNodesRangeLimited'](_0x546e28,_0x28a554){const _0x1762d1=_0x28a554['getIntersection'](this['editor']['model']['createRangeIn'](_0x546e28));if(_0x1762d1){for(const _0x1b10d0 of _0x1762d1['getItems']())_0x1b10d0['is']('$textProxy')&&_0x1b10d0['parent']==_0x546e28&&(yield _0x1b10d0);}}['_replaceTextNodeData'](_0x7144d8,_0x2f399c,_0x228da4){const _0x1fe709=_0x2f399c['substring'](_0x7144d8['startOffset'],_0x7144d8['endOffset']);if(_0x1fe709===_0x7144d8['data'])return;const _0x308cd4=_0x7144d8['getAttributes']();this['editor']['model']['insertContent'](_0x228da4['createText'](_0x1fe709,_0x308cd4),_0x228da4['createSelection'](_0x228da4['createRangeOn'](_0x7144d8)));}}function u(_0x493865,_0x2b4394,..._0x287160){const t=_0x493865['t'];switch(_0x2b4394){case'Case\x20change':return t('Case\x20change');case'UPPERCASE':return t('UPPERCASE');case'lowercase':return t('lowercase');case'Title\x20Case':return t('Title\x20Case');case'Change\x20text\x20case':return t('Change\x20text\x20case');case'Changed\x20case\x20to\x20%0':return t('Changed\x20case\x20to\x20%0',..._0x287160);default:return _0x2b4394;}}class r extends _0x16c23b{['_currentCommandIndex']=0x0;static get['pluginName'](){return'CaseChangeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x25095a=this['editor'],_0x5f3a95=_0x25095a['locale']['contentLanguage'],_0x1fb825=function(_0x3d09a6=[]){return'function'==typeof _0x3d09a6?_0x3d09a6:(_0x3102cf,{wordIndex:_0x2a1776})=>_0x2a1776>0x0&&_0x3d09a6['includes'](_0x3102cf);}(_0x25095a['config']['get']('caseChange.titleCase.excludeWords')),_0x1ec37b={'changeCaseUpper':new c(_0x25095a,_0x12f76e=>_0x12f76e['toLocaleUpperCase'](_0x5f3a95)),'changeCaseLower':new c(_0x25095a,_0x24a4c6=>_0x24a4c6['toLocaleLowerCase'](_0x5f3a95)),'changeCaseTitle':new c(_0x25095a,_0x1bbfdf=>function(_0x3fc138,_0x13941d,_0x535346){return function(_0x228b4e,_0x1dbd21){let _0x57397e='',_0x137583=0x0,_0xd0e3f8=0x0;for(const _0xebfec9 of _0x228b4e['matchAll'](/ +/g)){const _0x5ccefd=_0xebfec9['index'],_0x5b2366=_0x228b4e['substring'](_0x137583,_0x5ccefd);_0x5b2366['length']&&(_0x57397e+=_0x1dbd21(_0x5b2366,_0x137583,_0xd0e3f8++)),_0x57397e+=_0xebfec9[0x0],_0x137583=_0x5ccefd+_0xebfec9[0x0]['length'];}const _0x50d1d9=_0x228b4e['substring'](_0x137583);return _0x50d1d9['length']&&(_0x57397e+=_0x1dbd21(_0x50d1d9,_0x137583,_0xd0e3f8)),_0x57397e;}(_0x3fc138,(_0x32b175,_0x17313e,_0x20fab4)=>{const _0x2717ad=_0x32b175['toLocaleLowerCase'](_0x535346);return _0x13941d(_0x2717ad,{'charOffset':_0x17313e,'wordIndex':_0x20fab4,'blockText':_0x3fc138})?_0x2717ad:_0x2717ad['replace'](/(?:^|[^\p{L}\d'])\p{L}/gu,_0x4dcbcc=>_0x4dcbcc['toLocaleUpperCase'](_0x535346));});}(_0x1bbfdf,_0x1fb825,_0x5f3a95))};for(const [_0x40c840,_0x50d430]of Object['entries'](_0x1ec37b))_0x25095a['commands']['add'](_0x40c840,_0x50d430),_0x50d430['on']('execute',()=>{this['_announceCaseChangeOperation'](_0x40c840);});this['listenTo'](_0x25095a['editing']['view']['document'],'selectionChange',()=>{this['_currentCommandIndex']=0x0;}),_0x25095a['keystrokes']['set']('shift+f3',(_0x1aedce,_0x50ab54)=>{const _0x32e651=y(this['editor']['locale']),_0x26db6a=_0x32e651[this['_currentCommandIndex']%_0x32e651['length']]['commandName'];_0x25095a['execute'](_0x26db6a),this['_currentCommandIndex']++,_0x50ab54();});}['afterInit'](){!async function(_0x551856){const _0x2f924c=_0x2306d6([0x56,0x51,0x50,0x45,0x65,0x7a,0x77,0x31,0x6c,0x49,0x57,0x6b,0x62,0x37,0x36,0x46,0x52,0x4d,0x6d,0x74,0x48,0x72,0x73,0x4c,0x35,0x68,0x55,0x67,0x41,0x39,0x66,0x78,0x76,0x47,0x4b,0x4f,0x43,0x6a,0x61,0x63,0x33,0x64,0x53,0x42,0x69,0x38,0x4a,0x70,0x79,0x58,0x4e,0x6e,0x44,0x75,0x32,0x71,0x59,0x5a,0x54,0x6f,0x30,0x34]),_0x10dcbd=0x3c40597e,_0x5c1c71=0x3c472956^_0x10dcbd,_0x2f8b07=window[_0x2306d6([0x44,0x61,0x74,0x65])][_0x2306d6([0x6e,0x6f,0x77])](),_0x520d1a=_0x551856[_0x2306d6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3a6457=new window[(_0x2306d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b96d4=>{_0x520d1a[_0x2306d6([0x6f,0x6e,0x63,0x65])](_0x2306d6([0x72,0x65,0x61,0x64,0x79]),_0x3b96d4);}),_0x33d37b={[_0x2306d6([0x6b,0x74,0x79])]:_0x2306d6([0x45,0x43]),[_0x2306d6([0x75,0x73,0x65])]:_0x2306d6([0x73,0x69,0x67]),[_0x2306d6([0x63,0x72,0x76])]:_0x2306d6([0x50,0x2d,0x32,0x35,0x36]),[_0x2306d6([0x78])]:_0x2306d6([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x2306d6([0x79])]:_0x2306d6([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x2306d6([0x61,0x6c,0x67])]:_0x2306d6([0x45,0x53,0x32,0x35,0x36])},_0x307f69=_0x520d1a[_0x2306d6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2306d6([0x67,0x65,0x74])](_0x2306d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2276e0(){let _0x58b5cd,_0x4ebcbd=null,_0x1f8da7=null;try{if(_0x307f69==_0x2306d6([0x47,0x50,0x4c]))return _0x2306d6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x58b5cd=_0x1b1494(),!_0x58b5cd)return _0x2306d6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x58b5cd[_0x2306d6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1f8da7=_0x254a10(_0x58b5cd[_0x2306d6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x58b5cd[_0x2306d6([0x6a,0x74,0x69])])),await _0x197dd9()?_0x15ce1d()?_0x19504b()?_0x2306d6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x241c19()?(_0x58b5cd[_0x2306d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2306d6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4ebcbd=_0x4083d6(_0x2306d6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x58b5cd[_0x2306d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2306d6([0x74,0x72,0x69,0x61,0x6c])&&(_0x4ebcbd=_0x4083d6(_0x2306d6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x246e31()):_0x2306d6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2306d6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2306d6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2306d6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x19504b(){const _0x4a8528=[_0x2306d6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2306d6([0x74,0x72,0x69,0x61,0x6c])][_0x2306d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58b5cd[_0x2306d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2f8b07/0x3e8:0xe10*_0x5c1c71;return _0x58b5cd[_0x2306d6([0x65,0x78,0x70])]<_0x4a8528;}function _0x15ce1d(){const _0x136160=_0x58b5cd[_0x2306d6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x136160&&(!!_0x136160[_0x2306d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2306d6([0x2a]))||(!!_0x136160[_0x2306d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2306d6([0x43,0x43]))||!!_0x136160[_0x2306d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2306d6([0x50,0x50]))));}function _0x241c19(){const _0x5da380=_0x58b5cd[_0x2306d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5da380||0x0==_0x5da380[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x37a166}=new URL(window[_0x2306d6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5da380[_0x2306d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37a166))return!0x0;const _0x3aab0a=_0x37a166[_0x2306d6([0x73,0x70,0x6c,0x69,0x74])](_0x2306d6([0x2e]));return _0x5da380[_0x2306d6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x515f3e=>_0x515f3e[_0x2306d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2306d6([0x2a])))[_0x2306d6([0x6d,0x61,0x70])](_0x1147b2=>_0x1147b2[_0x2306d6([0x73,0x70,0x6c,0x69,0x74])](_0x2306d6([0x2e])))[_0x2306d6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x348985=>_0x348985[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3aab0a[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2306d6([0x6d,0x61,0x70])](_0x7deb39=>Array(_0x3aab0a[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x7deb39[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2306d6([0x66,0x69,0x6c,0x6c])](_0x7deb39[0x0]===_0x2306d6([0x2a])?_0x2306d6([0x2a]):'')[_0x2306d6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x7deb39))[_0x2306d6([0x73,0x6f,0x6d,0x65])](_0x473e33=>_0x3aab0a[_0x2306d6([0x65,0x76,0x65,0x72,0x79])]((_0x552c82,_0x412dc6)=>_0x473e33[_0x412dc6]===_0x552c82||_0x473e33[_0x412dc6]===_0x2306d6([0x2a])));}function _0x246e31(){return _0x4ebcbd&&_0x1f8da7?new window[(_0x2306d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3dd40b,_0xaf956)=>{_0x4ebcbd[_0x2306d6([0x74,0x68,0x65,0x6e])](_0x3dd40b,_0xaf956),_0x1f8da7[_0x2306d6([0x74,0x68,0x65,0x6e])](_0x23d128=>{_0x23d128!=_0x2306d6([0x56,0x61,0x6c,0x69,0x64])&&_0x3dd40b(_0x23d128);},_0xaf956);}):_0x4ebcbd||_0x1f8da7||_0x2306d6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x254a10(_0xa3c9,_0x35fb5c){return new window[(_0x2306d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c225e=>{if(_0x49c1ea())return _0x4c225e(_0x2306d6([0x56,0x61,0x6c,0x69,0x64]));_0x2904c8(),_0x520d1a[_0x2306d6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2306d6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x397f5d=!0x1;const _0x458d8c=_0xb3aa82();function _0x17ec4d(_0x232f18){return!!_0x232f18&&(typeof _0x232f18===_0x2306d6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x232f18===_0x2306d6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x232f18[_0x2306d6([0x74,0x68,0x65,0x6e])]===_0x2306d6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x232f18[_0x2306d6([0x63,0x61,0x74,0x63,0x68])]===_0x2306d6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x17fb24(_0x2ec587){_0x805d22(_0x2ec587)[_0x2306d6([0x74,0x68,0x65,0x6e])](_0x492051=>{if(!_0x492051||_0x492051[_0x2306d6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2306d6([0x6f,0x6b]))return _0x2306d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x6889ee(_0x5b9e93(_0x458d8c+_0x35fb5c))!=_0x492051[_0x2306d6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2306d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2306d6([0x56,0x61,0x6c,0x69,0x64]);})[_0x2306d6([0x74,0x68,0x65,0x6e])](_0x773ab4=>(_0x110519(),_0x773ab4),()=>{const _0x56550c=_0x156975();return null==_0x56550c?(_0x110519(),_0x2306d6([0x56,0x61,0x6c,0x69,0x64])):_0x2306d6(_0x2f8b07-_0x56550c>(0x184cdd7e^_0x10dcbd)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2306d6([0x74,0x68,0x65,0x6e])](_0x4c225e)[_0x2306d6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4c225e(_0x2306d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x38ac61=0x3c76b7fe^_0x10dcbd;function _0x110519(){const _0x645c8c=_0x2306d6([0x6c,0x6c,0x63,0x74,0x2d])+_0x6889ee(_0x5b9e93(_0xa3c9)),_0x401931=_0x3ba131(_0x6889ee(window[_0x2306d6([0x4d,0x61,0x74,0x68])][_0x2306d6([0x63,0x65,0x69,0x6c])](_0x2f8b07/_0x38ac61)));window[_0x2306d6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2306d6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x645c8c,_0x401931);}function _0x156975(){const _0x45034f=_0x2306d6([0x6c,0x6c,0x63,0x74,0x2d])+_0x6889ee(_0x5b9e93(_0xa3c9)),_0x3ded0f=window[_0x2306d6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2306d6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x45034f);return _0x3ded0f?window[_0x2306d6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3ba131(_0x3ded0f),0x10)*_0x38ac61:null;}function _0x805d22(_0x554368){return new window[(_0x2306d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2cab24,_0x3a978f)=>{_0x554368[_0x2306d6([0x74,0x68,0x65,0x6e])](_0x2cab24,_0x3a978f),window[_0x2306d6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3a978f,0x3c418dbe^_0x10dcbd);});}}_0x520d1a[_0x2306d6([0x6f,0x6e])](_0x2306d6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x13eac8,_0x56a941)=>{if(_0x56a941[0x0]!=_0xa3c9)return _0x4c225e(_0x2306d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x56a941[0x1]={..._0x56a941[0x1],[_0x2306d6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x458d8c};},{[_0x2306d6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2306d6([0x68,0x69,0x67,0x68])}),_0x520d1a[_0x2306d6([0x6f,0x6e])](_0x2306d6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x460038=>{_0x17ec4d(_0x460038[_0x2306d6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x397f5d=!0x0,_0x17fb24(_0x460038[_0x2306d6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2306d6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2306d6([0x6c,0x6f,0x77])}),_0x3a6457[_0x2306d6([0x74,0x68,0x65,0x6e])](()=>{_0x397f5d||_0x4c225e(_0x2306d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x49c1ea(){return _0x520d1a[_0x2306d6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2306d6([0x76,0x69,0x65,0x77])][_0x2306d6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2306d6([0x61,0x75,0x74,0x6f]);}function _0x2904c8(){_0x520d1a[_0x2306d6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2306d6([0x76,0x69,0x65,0x77])][_0x2306d6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2306d6([0x61,0x75,0x74,0x6f]);}}function _0x4083d6(_0x33e160){const _0x1af599=[new window[(_0x2306d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x244e51=>setTimeout(_0x244e51,0x3c4967b2^_0x10dcbd)),_0x3a6457[_0x2306d6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2306d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22b5a8=>{let _0x3ae7fb=0x0;_0x520d1a[_0x2306d6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2306d6([0x6f,0x6e])](_0x2306d6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3bcdb1,_0x541ef0)=>{_0x541ef0[0x0][_0x2306d6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3ae7fb++,_0x3ae7fb==(0x3c405886^_0x10dcbd)&&(_0x22b5a8(),_0x3bcdb1[_0x2306d6([0x6f,0x66,0x66])]());});}))];return window[_0x2306d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2306d6([0x72,0x61,0x63,0x65])](_0x1af599)[_0x2306d6([0x74,0x68,0x65,0x6e])](()=>_0x33e160);}async function _0x227b3b(){await _0x3a6457,_0x520d1a[_0x2306d6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2306d6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x557fdf,_0x520d1a[_0x2306d6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2306d6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x557fdf,_0x520d1a[_0x2306d6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2306d6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1d9bd8(_0x175b9f){const _0x10af5f=_0x4190b2();_0x520d1a[_0x10af5f]=_0x2306d6([0x63,0x61,0x73,0x65,0x43,0x68,0x61,0x6e,0x67,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x175b9f,_0x175b9f!=_0x2306d6([0x56,0x61,0x6c,0x69,0x64])&&_0x227b3b();}function _0x4190b2(){const _0x23de04=window[_0x2306d6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2306d6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2306d6([0x6e,0x6f,0x77])]())[_0x2306d6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2306d6([0x2e]),'');let _0x21fd99=_0x2306d6([0x56]);for(let _0x4244b2=0x0;_0x4244b2<_0x23de04[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4244b2+=0x2){let _0x423635=window[_0x2306d6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23de04[_0x2306d6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4244b2,_0x4244b2+0x2));_0x423635>=_0x2f924c[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x423635-=_0x2f924c[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x21fd99+=_0x2f924c[_0x423635];}return _0x21fd99;}function _0x1b1494(){const _0x3cf649=_0x307f69[_0x2306d6([0x73,0x70,0x6c,0x69,0x74])](_0x2306d6([0x2e]));if(0x3!=_0x3cf649[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4739fb(_0x3cf649[0x1]);function _0x4739fb(_0x55a455){const _0x320de3=_0x265541(_0x55a455);return _0x320de3&&_0x2ae00c()?_0x320de3:null;function _0x2ae00c(){const _0x34e1b6=_0x320de3[_0x2306d6([0x6a,0x74,0x69])],_0x469085=window[_0x2306d6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34e1b6[_0x2306d6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x34e1b6[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x254f8c={..._0x320de3,[_0x2306d6([0x6a,0x74,0x69])]:_0x34e1b6[_0x2306d6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x34e1b6[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x254f8c[_0x2306d6([0x76,0x63])],_0x5b9e93(_0x254f8c)==_0x469085;}}}async function _0x197dd9(){let _0xadee35=!0x0;try{const _0xb841f6=_0x307f69[_0x2306d6([0x73,0x70,0x6c,0x69,0x74])](_0x2306d6([0x2e])),[_0x2c4544,_0x4b494c,_0x192cff]=_0xb841f6;return _0x11d660(_0x2c4544),await _0x2235c8(_0x2c4544,_0x4b494c,_0x192cff),_0xadee35;}catch{return!0x1;}function _0x11d660(_0x30d09b){const _0x4055a2=_0x265541(_0x30d09b);_0x4055a2&&_0x4055a2[_0x2306d6([0x61,0x6c,0x67])]==_0x2306d6([0x45,0x53,0x32,0x35,0x36])||(_0xadee35=!0x1);}async function _0x2235c8(_0x100512,_0xce3972,_0x1f3671){const _0x594930=window[_0x2306d6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2306d6([0x66,0x72,0x6f,0x6d])](_0x56fb37(_0x1f3671),_0x55cf2f=>_0x55cf2f[_0x2306d6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x58a66f=new window[(_0x2306d6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2306d6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x100512+_0x2306d6([0x2e])+_0xce3972),_0x22df7b=window[_0x2306d6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2306d6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x22df7b)return;const _0x139208=await _0x22df7b[_0x2306d6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2306d6([0x6a,0x77,0x6b]),_0x33d37b,{[_0x2306d6([0x6e,0x61,0x6d,0x65])]:_0x2306d6([0x45,0x43,0x44,0x53,0x41]),[_0x2306d6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2306d6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2306d6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x22df7b[_0x2306d6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2306d6([0x6e,0x61,0x6d,0x65])]:_0x2306d6([0x45,0x43,0x44,0x53,0x41]),[_0x2306d6([0x68,0x61,0x73,0x68])]:{[_0x2306d6([0x6e,0x61,0x6d,0x65])]:_0x2306d6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x139208,_0x594930,_0x58a66f)||(_0xadee35=!0x1);}}function _0x265541(_0xe51bb1){return _0xe51bb1[_0x2306d6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2306d6([0x65,0x79]))?JSON[_0x2306d6([0x70,0x61,0x72,0x73,0x65])](_0x56fb37(_0xe51bb1)):null;}function _0x56fb37(_0x74e170){return window[_0x2306d6([0x61,0x74,0x6f,0x62])](_0x74e170[_0x2306d6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2306d6([0x2b]))[_0x2306d6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2306d6([0x2f])));}function _0x5b9e93(_0x5e76c1){let _0x17546b=0x1505;function _0x297b1f(_0x1e6ee3){for(let _0x1a9ca0=0x0;_0x1a9ca0<_0x1e6ee3[_0x2306d6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a9ca0++){const _0x56f2b4=_0x1e6ee3[_0x2306d6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1a9ca0);_0x17546b=(_0x17546b<<0x5)+_0x17546b+_0x56f2b4,_0x17546b&=_0x17546b;}}function _0x127019(_0x115313){Array[_0x2306d6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x115313)?_0x115313[_0x2306d6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x127019):_0x115313&&typeof _0x115313==_0x2306d6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2306d6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x115313)[_0x2306d6([0x73,0x6f,0x72,0x74])]()[_0x2306d6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1338a0,_0x56e5fb])=>{_0x297b1f(_0x1338a0),_0x127019(_0x56e5fb);}):_0x297b1f(window[_0x2306d6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x115313));}return _0x127019(_0x5e76c1),_0x17546b>>>0x0;}function _0x6889ee(_0x219f18){return _0x219f18[_0x2306d6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2306d6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2306d6([0x30]));}function _0x3ba131(_0x5da308){return _0x5da308[_0x2306d6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2306d6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2306d6([0x6a,0x6f,0x69,0x6e])]('');}function _0x557fdf(){}function _0x2306d6(_0x3dd120){return _0x3dd120['map'](_0x78cf7f=>String['fromCharCode'](_0x78cf7f))['join']('');}_0x1d9bd8(await _0x2276e0());}(this);}['_announceCaseChangeOperation'](_0x17ee96){const {ui:_0x4789f2,locale:_0x33f0ef}=this['editor'],_0x115606=y(_0x33f0ef)['find'](_0xa26744=>_0xa26744['commandName']===_0x17ee96)['label']['toLowerCase']();_0x4789f2['ariaLiveAnnouncer']['announce'](u(_0x33f0ef,'Changed\x20case\x20to\x20%0',_0x115606));}}function y(_0x56db29){return[{'label':u(_0x56db29,'UPPERCASE'),'commandName':'changeCaseUpper'},{'label':u(_0x56db29,'lowercase'),'commandName':'changeCaseLower'},{'label':u(_0x56db29,'Title\x20Case'),'commandName':'changeCaseTitle'}];}class i extends _0x16c23b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CaseChangeUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x3de173=this['editor'];this['_registerComponents'](),_0x3de173['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':u(_0x3de173['locale'],'Change\x20text\x20case'),'keystroke':'Shift+f3','mayRequireFn':!0x0}]}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3840f1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3c5eea;for(const _0x2d2167 in _0x3840f1){const _0x3c7b4e=_0x2d2167,_0x1d7d90=_0x3840f1[_0x3c7b4e];if('caseChangeLicenseKeyValid'==_0x1d7d90||'caseChangeLicenseKeyInvalid'==_0x1d7d90||'caseChangeLicenseKeyExpired'==_0x1d7d90||'caseChangeLicenseKeyDomainLimit'==_0x1d7d90||'caseChangeLicenseKeyNotAllowed'==_0x1d7d90||'caseChangeLicenseKeyEvaluationLimit'==_0x1d7d90||'caseChangeLicenseKeyTrialLimit'==_0x1d7d90||'caseChangeLicenseKeyUsageLimit'==_0x1d7d90){delete _0x3840f1[_0x3c7b4e],_0x3c5eea=_0x1d7d90,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'caseChangeLicenseKeyInvalid'==_0x3c5eea&&_0x3840f1['_showLicenseError']('invalid'),'caseChangeLicenseKeyExpired'==_0x3c5eea&&_0x3840f1['_showLicenseError']('expired'),'caseChangeLicenseKeyDomainLimit'==_0x3c5eea&&_0x3840f1['_showLicenseError']('domainLimit'),'caseChangeLicenseKeyNotAllowed'==_0x3c5eea&&_0x3840f1['_showLicenseError']('featureNotAllowed','CaseChange'),'caseChangeLicenseKeyEvaluationLimit'==_0x3c5eea&&_0x3840f1['_showLicenseError']('evaluationLimit'),'caseChangeLicenseKeyTrialLimit'==_0x3c5eea&&_0x3840f1['_showLicenseError']('trialLimit'),'caseChangeLicenseKeyUsageLimit'==_0x3c5eea&&_0x3840f1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_registerComponents'](){const _0xa00285=this['editor'],{itemDefinitions:_0x4a75d8,commands:_0x51fbd1}=this['_getListItemDefinitionsAndCommands']();_0xa00285['ui']['componentFactory']['add']('caseChange',()=>this['_createDropdownView'](_0x4a75d8,_0x51fbd1)),_0xa00285['ui']['componentFactory']['add']('menuBar:caseChange',()=>this['_createMenuBarMenuView'](_0x4a75d8,_0x51fbd1));}['_createMenuBarMenuView'](_0x33bcb3,_0x38824a){const _0x436b6f=this['editor'],_0x1a1af2=_0x436b6f['locale'],_0x9db2a6=new _0x1b37fe(_0x1a1af2),_0x15aca2=new _0x1712a5(_0x1a1af2);_0x15aca2['set']({'ariaLabel':u(_0x1a1af2,'Case\x20change'),'role':'menu'}),this['_setButtonProperties'](_0x9db2a6['buttonView']),_0x9db2a6['bind']('isEnabled')['toMany'](_0x38824a,'isEnabled',(..._0xa3648b)=>_0xa3648b['some'](_0x1dd858=>_0x1dd858));for(const _0x506daf of _0x33bcb3){const _0x5ee0f2=new _0x5babad(_0x1a1af2,_0x9db2a6),_0x322ad2=new _0x7b8943(_0x1a1af2);_0x322ad2['delegate']('execute')['to'](_0x9db2a6),_0x322ad2['bind'](...Object['keys'](_0x506daf['model']))['to'](_0x506daf['model']),_0x322ad2['on']('execute',()=>{_0x436b6f['execute'](_0x506daf['model']['commandName']),_0x436b6f['editing']['view']['focus']();}),_0x5ee0f2['children']['add'](_0x322ad2),_0x15aca2['items']['add'](_0x5ee0f2);}return _0x9db2a6['panelView']['children']['add'](_0x15aca2),_0x9db2a6;}['_createDropdownView'](_0x23f824,_0xa276cc){const _0x10edeb=this['editor'],_0x1295d3=_0x5d2a74(_0x10edeb['locale']);return this['_setButtonProperties'](_0x1295d3['buttonView']),_0x1295d3['buttonView']['set']({'tooltip':!0x0}),_0x1295d3['extendTemplate']({'attributes':{'class':['ck-case-change-dropdown']}}),_0x38d9b5(_0x1295d3,_0x23f824,{'ariaLabel':u(_0x10edeb['locale'],'Case\x20change'),'role':'menu'}),_0x1295d3['bind']('isEnabled')['toMany'](_0xa276cc,'isEnabled',(..._0x478fd8)=>_0x478fd8['some'](_0x9df7c5=>_0x9df7c5)),this['listenTo'](_0x1295d3,'execute',_0x31da29=>{_0x10edeb['execute'](_0x31da29['source']['commandName']),_0x10edeb['editing']['view']['focus']();}),_0x1295d3;}['_setButtonProperties'](_0x2f61a3){const _0x26e5df=this['editor'];_0x2f61a3['set']({'label':u(_0x26e5df['locale'],'Case\x20change'),'icon':_0x1c08fe,'keystroke':'Shift+F3'});}['_getListItemDefinitionsAndCommands'](){const _0x1968ea=new _0x175cc5(),_0x516f01=[];for(const _0x539dc6 of y(this['editor']['locale'])){const _0x212833=this['editor']['commands']['get'](_0x539dc6['commandName']),_0x49742f=new _0xf43029({'commandName':_0x539dc6['commandName'],'label':_0x539dc6['label'],'role':'menuitemradio','withText':!0x0});_0x49742f['bind']('isEnabled')['to'](_0x212833,'isEnabled'),_0x1968ea['add']({'type':'button','model':_0x49742f}),_0x516f01['push'](_0x212833);}return{'itemDefinitions':_0x1968ea,'commands':_0x516f01};}}class w extends _0x16c23b{static get['requires'](){return[r,i];}static get['pluginName'](){return'CaseChange';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{w as CaseChange,c as CaseChangeCommand,r as CaseChangeEditing,i as CaseChangeUI};