UNPKG

@ckeditor/ckeditor5-case-change

Version:

Case change feature for CKEditor 5.

23 lines 6.22 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x230faf=_0x2820;(function(_0x57ab23,_0x413d58){const _0x2f7c29=_0x2820,_0x31c1a0=_0x57ab23();while(!![]){try{const _0x3dedd7=-parseInt(_0x2f7c29(0x1d3))/0x1+-parseInt(_0x2f7c29(0x1dc))/0x2*(-parseInt(_0x2f7c29(0x1d2))/0x3)+parseInt(_0x2f7c29(0x1ca))/0x4+parseInt(_0x2f7c29(0x1db))/0x5*(-parseInt(_0x2f7c29(0x1f0))/0x6)+-parseInt(_0x2f7c29(0x1e6))/0x7+-parseInt(_0x2f7c29(0x1b9))/0x8+-parseInt(_0x2f7c29(0x1c7))/0x9*(-parseInt(_0x2f7c29(0x1e5))/0xa);if(_0x3dedd7===_0x413d58)break;else _0x31c1a0['push'](_0x31c1a0['shift']());}catch(_0x2d4a50){_0x31c1a0['push'](_0x31c1a0['shift']());}}}(_0x154c,0x68ca3));import{Command as _0x688ba2}from'ckeditor5/src/core.js';function _0x2820(_0x1f6db6,_0x50ae60){const _0x154c4d=_0x154c();return _0x2820=function(_0x28209a,_0x4a233b){_0x28209a=_0x28209a-0x1b9;let _0x34e278=_0x154c4d[_0x28209a];return _0x34e278;},_0x2820(_0x1f6db6,_0x50ae60);}function _0x154c(){const _0x15332b=['getItems','isEnabled','createRangeOn','selection','21931150LRKtev','3511144PAgXKO','add','$textProxy','setSelection','createSelection','editor','change','_replaceTextNodeData','has','_getElementTextContent','6eeYEoK','5614784DKTJoq','_findAncestorTextBlock','_getElementsAllowingText','endOffset','schema','from','startOffset','refresh','document','getFirstPosition','_getTextNodesRangeLimited','isCollapsed','getChildren','getRanges','9Axhjtg','model','parent','700900MJpWVc','item','element','_transformCallback','getAttributes','getIntersection','insertContent','execute','213qBUHyp','404409GoaggH','getWalker','substring','createText','$text','_modifyContent','isLimit','reduce','3433135qDgDSY','10010RcMPBZ','_getAffectedRanges','createRangeIn','checkChild','data'];_0x154c=function(){return _0x15332b;};return _0x154c();}export class CaseChangeCommand extends _0x688ba2{[_0x230faf(0x1cd)];constructor(_0x91a9ba,_0x55f163){const _0x28a499=_0x230faf;super(_0x91a9ba),this[_0x28a499(0x1cd)]=_0x55f163;}[_0x230faf(0x1d1)](){const _0x5b7434=_0x230faf,_0x58f0c9=this[_0x5b7434(0x1eb)][_0x5b7434(0x1c8)],_0x10c635=Array[_0x5b7434(0x1be)](this[_0x5b7434(0x1dd)]()),_0x294252=Array[_0x5b7434(0x1be)](_0x58f0c9[_0x5b7434(0x1c1)][_0x5b7434(0x1e4)][_0x5b7434(0x1c6)]());_0x58f0c9[_0x5b7434(0x1ec)](_0x103644=>{const _0x2bf40b=_0x5b7434;for(const _0x583f2e of _0x10c635)this[_0x2bf40b(0x1d8)](_0x583f2e,_0x103644);_0x103644[_0x2bf40b(0x1e9)](_0x294252);});}[_0x230faf(0x1c0)](){const _0x264e18=_0x230faf;for(const _0x1d27e8 of this[_0x264e18(0x1dd)]())for(const _0x8d67ef of _0x1d27e8)if(_0x8d67ef[_0x264e18(0x1cb)]['is'](_0x264e18(0x1e8)))return void(this[_0x264e18(0x1e2)]=!0x0);this[_0x264e18(0x1e2)]=!0x1;}[_0x230faf(0x1dd)](){const _0x538b6a=_0x230faf,_0x22fecc=this[_0x538b6a(0x1eb)][_0x538b6a(0x1c8)],_0x360835=_0x22fecc[_0x538b6a(0x1c1)][_0x538b6a(0x1e4)];if(_0x360835[_0x538b6a(0x1c4)]){const _0xfa8d71=this[_0x538b6a(0x1ba)](_0x360835[_0x538b6a(0x1c2)]()[_0x538b6a(0x1c9)]);return _0xfa8d71?[_0x22fecc[_0x538b6a(0x1de)](_0xfa8d71)]:[];}return _0x360835[_0x538b6a(0x1c6)]();}[_0x230faf(0x1d8)](_0x5ed1c1,_0x1897ff){const _0x5af6ee=_0x230faf;for(const _0x30f9ab of this[_0x5af6ee(0x1bb)](_0x5ed1c1)){const _0x3c7357=this[_0x5af6ee(0x1ef)](_0x30f9ab),_0x28b8df=this[_0x5af6ee(0x1cd)](_0x3c7357);for(const _0x3e4b83 of this[_0x5af6ee(0x1c3)](_0x30f9ab,_0x5ed1c1))this[_0x5af6ee(0x1ed)](_0x3e4b83,_0x28b8df,_0x1897ff);}}[_0x230faf(0x1ba)](_0x225136){const _0x11d5bc=_0x230faf,_0x65c22c=this[_0x11d5bc(0x1eb)][_0x11d5bc(0x1c8)][_0x11d5bc(0x1bd)];if(_0x225136['is'](_0x11d5bc(0x1cc))&&_0x65c22c[_0x11d5bc(0x1df)](_0x225136,_0x11d5bc(0x1d7)))return _0x225136;const _0x4c2b25=_0x225136[_0x11d5bc(0x1c9)];return!_0x4c2b25||_0x65c22c[_0x11d5bc(0x1d9)](_0x225136)?null:this[_0x11d5bc(0x1ba)](_0x4c2b25);}*[_0x230faf(0x1bb)](_0x24ae26){const _0x3a17bf=_0x230faf,_0x200150=new Set();for(const {item:_0x1fe61f}of _0x24ae26[_0x3a17bf(0x1d4)]()){const _0xdd3670=this[_0x3a17bf(0x1ba)](_0x1fe61f);_0xdd3670&&!_0x200150[_0x3a17bf(0x1ee)](_0xdd3670)&&(_0x200150[_0x3a17bf(0x1e7)](_0xdd3670),yield _0xdd3670);}}[_0x230faf(0x1ef)](_0x228a97){const _0x5a89a1=_0x230faf;return Array[_0x5a89a1(0x1be)](_0x228a97[_0x5a89a1(0x1c5)]())[_0x5a89a1(0x1da)]((_0x2036fa,_0x225c45)=>_0x2036fa+(_0x225c45['is'](_0x5a89a1(0x1d7))?_0x225c45[_0x5a89a1(0x1e0)]:'\x20'),'');}*[_0x230faf(0x1c3)](_0x4d2e18,_0x28851e){const _0x238b25=_0x230faf,_0x49d506=_0x28851e[_0x238b25(0x1cf)](this[_0x238b25(0x1eb)][_0x238b25(0x1c8)][_0x238b25(0x1de)](_0x4d2e18));if(_0x49d506){for(const _0x5d6b5d of _0x49d506[_0x238b25(0x1e1)]())_0x5d6b5d['is'](_0x238b25(0x1e8))&&_0x5d6b5d[_0x238b25(0x1c9)]==_0x4d2e18&&(yield _0x5d6b5d);}}[_0x230faf(0x1ed)](_0x5c832f,_0x400d27,_0x27a4ee){const _0x42477b=_0x230faf,_0x596236=_0x400d27[_0x42477b(0x1d5)](_0x5c832f[_0x42477b(0x1bf)],_0x5c832f[_0x42477b(0x1bc)]);if(_0x596236===_0x5c832f[_0x42477b(0x1e0)])return;const _0x308ae8=_0x5c832f[_0x42477b(0x1ce)]();this[_0x42477b(0x1eb)][_0x42477b(0x1c8)][_0x42477b(0x1d0)](_0x27a4ee[_0x42477b(0x1d6)](_0x596236,_0x308ae8),_0x27a4ee[_0x42477b(0x1ea)](_0x27a4ee[_0x42477b(0x1e3)](_0x5c832f)));}}