from pathlib import Path p=Path(r'G:\项目\NumberSwipe-Variants\tools\generate.mjs');s=p.read_text(encoding='utf-8-sig');a=s.index('function hex(index){');b=s.index('function blocks(',a) s=s[:a]+'''function hex(index){const count=[6,8,11,12,14,16,18,19][index];let cells=[];const rows=index>=4?3:2;for(let q=0;cells.length