import{b9 as e,ba as n}from"./index-90c12cc1.js";function o(){return{preview:function(n){return new Promise(((o,t)=>{e({indicator:"default",loop:!0,...n,success:()=>o(!0),fail:e=>t(e)})}))},getImageInfo:function(e){return new Promise(((o,t)=>{n({src:e,success:e=>{o(e)},fail:e=>{t(e)}})}))},base64ToUrl:function(e){return new Promise(((n,o)=>{const t=e.indexOf("base64,");e=e.slice(t+7);const r=atob(e),c=new Array(r.length);for(let e=0;e<r.length;e++)c[e]=r.charCodeAt(e);const i=new Uint8Array(c),s=new Blob([i],{type:"image/png"});n(URL.createObjectURL(s))}))},saveImageToPhotosAlbum:function(e,n=""){return new Promise(((o,t)=>{const r=document.createElement("a");r.href=e,r.download=n,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(e),o(!0)}))}}}export{o as u};
