.getElementById('clearMask');
const downloadMaskBtn=document.getElementById('downloadMask');
const status=document.getElementById('status');
let isDrawing=false;
let currentTool='pen';
let scale=1;
let offsetX=0,offsetY=0;
let image=new Image();
let maskCanvas=document.createElement('canvas');
let maskCtx=maskCanvas.getContext('2d');
let lastX=0,lastY=0;
let currentSelection=[];
let isSelecting=false;
function setStatus(message){
status.textContent=message;
setTimeout(()=>status.textContent='',3000);
}
imag