imageFunction-54701b90.js 603 B

1
  1. const r=""+new URL("logoWatermark-270788fc.png",import.meta.url).href,s=async e=>{try{const t=e.getContext("2d"),o=document.createElement("img");o.setAttribute("crossOrigin","anonymous"),r&&typeof r=="string"&&r.includes("data:image"),o.src=r,await new Promise(i=>o.onload=i);const a=document.createElement("canvas");a.width=280,a.height=220;const n=a.getContext("2d");n.clearRect(0,0,a.width,a.height),n.drawImage(o,80,80);const c=t.createPattern(a,"repeat");return t.fillStyle=c,t.fillRect(0,0,e.width,e.height),e}catch(t){console.log(t)}},g=(e,t=1)=>e.toDataURL("image/png",t);export{s as a,g as c};