From a19efafa81daf75f320cd4003d0c1651dad843c3 Mon Sep 17 00:00:00 2001 From: tams sokari Date: Wed, 18 Oct 2023 11:36:31 +0100 Subject: [PATCH] fix: use single smart-camera-web file without build --- packages/components/smart-camera-web.js | 2795 +++++++++++++++-------- 1 file changed, 1798 insertions(+), 997 deletions(-) diff --git a/packages/components/smart-camera-web.js b/packages/components/smart-camera-web.js index f99f19ea..4522809a 100644 --- a/packages/components/smart-camera-web.js +++ b/packages/components/smart-camera-web.js @@ -1,654 +1,654 @@ -(()=>{var u=class extends HTMLElement{constructor(){super();let e=document.createElement("template");e.innerHTML=` -

- - - - - - - - - - - - - - - - - - - -

- `,this.attachShadow({mode:"open"}).appendChild(e.content.cloneNode(!0))}},f=u;var v=class s{static memoryLimit=1024e4;static supportedTypes=["image/jpeg","image/png"];static getHumanSize(e){let t=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1),a=e/1024**i;return i===0?`${e} bytes`:`${a.toFixed(0)} ${t[i]}`}static getData(e){return new Promise((t,i)=>{let a=new FileReader;a.onload=c=>{t(c.target.result)},a.onerror=()=>{i(new Error("An error occurred reading the file. Please check the file, and try again"))},a.readAsDataURL(e)})}static async retrieve(e){if(e.length>1)throw new Error("Only one file upload is permitted at a time");let t=e[0];if(!s.supportedTypes.includes(t.type))throw new Error("Unsupported file format. Please ensure that you are providing a JPG or PNG image");if(t.size>s.memoryLimit)throw new Error(`${t.name} is too large. Please ensure that the file is less than ${s.getHumanSize(s.memoryLimit)}.`);return await s.getData(t)}},w=v;var b="1.0.0";var I=8,M=396,x=527;function Z(){return` - - - - - - - - - - - - - - - -
-

-

-
- -
- ${this.showNavigation?` - - `:""} -
-

- We need access to your camera so that we can take selfie and proof-of-life images. -

- - - - ${this.hideAttribution?"":` - - `} -
-
- -