From c4f4d613c4af8478e0cb5042a1a3190f2dca5bd8 Mon Sep 17 00:00:00 2001 From: gruhn Date: Mon, 2 Sep 2024 11:32:24 +0000 Subject: [PATCH] =?UTF-8?q?Deploy=20preview=20for=20PR=20449=20?= =?UTF-8?q?=F0=9F=9B=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pr-preview/pr-449/404.html | 2 +- pr-preview/pr-449/api/QrcodeCapture.html | 2 +- pr-preview/pr-449/api/QrcodeDropZone.html | 2 +- pr-preview/pr-449/api/QrcodeStream.html | 2 +- ...e_type_script_setup_true_lang.GbEf4hK0.js} | 2 +- ...{camera.BJQyjlnn.js => camera.DhcMeik-.js} | 6 +- ...-B_I3.js => demos_DragDrop.md.cTRAHQaD.js} | 2 +- ....js => demos_DragDrop.md.cTRAHQaD.lean.js} | 2 +- ...azuP_.js => demos_FullDemo.md.CRrzANCR.js} | 2 +- ....js => demos_FullDemo.md.CRrzANCR.lean.js} | 2 +- ...2Ip.js => demos_Fullscreen.md.h2cqoaSc.js} | 2 +- ...s => demos_Fullscreen.md.h2cqoaSc.lean.js} | 2 +- ... => demos_LoadingIndicator.md.CPwUJoov.js} | 2 +- ...emos_LoadingIndicator.md.CPwUJoov.lean.js} | 2 +- ...ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.js} | 2 +- ...ameQrcodeMoreThanOnce.md.kZa9Btsu.lean.js} | 2 +- ...B.js => demos_SwitchCamera.md.CydEbheE.js} | 2 +- ...=> demos_SwitchCamera.md.CydEbheE.lean.js} | 2 +- ...AnpZuZA8.js => demos_Torch.md.bksnySAD.js} | 2 +- ...ean.js => demos_Torch.md.bksnySAD.lean.js} | 2 +- ...s3GTY8o.js => demos_Upload.md.CnQDh4cA.js} | 2 +- ...an.js => demos_Upload.md.CnQDh4cA.lean.js} | 2 +- ...B0yOc.js => demos_Validate.md.DtHqSbkl.js} | 2 +- ....js => demos_Validate.md.DtHqSbkl.lean.js} | 2 +- pr-preview/pr-449/demos/DragDrop.html | 6 +- pr-preview/pr-449/demos/FullDemo.html | 8 +-- pr-preview/pr-449/demos/Fullscreen.html | 8 +-- pr-preview/pr-449/demos/LoadingIndicator.html | 8 +-- .../demos/ScanSameQrcodeMoreThanOnce.html | 8 +-- pr-preview/pr-449/demos/Simple.html | 2 +- pr-preview/pr-449/demos/SwitchCamera.html | 8 +-- pr-preview/pr-449/demos/Torch.html | 8 +-- pr-preview/pr-449/demos/Upload.html | 6 +- pr-preview/pr-449/demos/Validate.html | 8 +-- pr-preview/pr-449/hashmap.json | 2 +- pr-preview/pr-449/index.html | 2 +- pr-preview/pr-449/sw.js | 70 +++++++++---------- 37 files changed, 98 insertions(+), 98 deletions(-) rename pr-preview/pr-449/assets/chunks/{QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js => QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js} (98%) rename pr-preview/pr-449/assets/chunks/{camera.BJQyjlnn.js => camera.DhcMeik-.js} (61%) rename pr-preview/pr-449/assets/{demos_DragDrop.md.12E-B_I3.js => demos_DragDrop.md.cTRAHQaD.js} (99%) rename pr-preview/pr-449/assets/{demos_DragDrop.md.12E-B_I3.lean.js => demos_DragDrop.md.cTRAHQaD.lean.js} (99%) rename pr-preview/pr-449/assets/{demos_FullDemo.md.EA-azuP_.js => demos_FullDemo.md.CRrzANCR.js} (99%) rename pr-preview/pr-449/assets/{demos_FullDemo.md.EA-azuP_.lean.js => demos_FullDemo.md.CRrzANCR.lean.js} (99%) rename pr-preview/pr-449/assets/{demos_Fullscreen.md.CMW7y2Ip.js => demos_Fullscreen.md.h2cqoaSc.js} (99%) rename pr-preview/pr-449/assets/{demos_Fullscreen.md.CMW7y2Ip.lean.js => demos_Fullscreen.md.h2cqoaSc.lean.js} (99%) rename pr-preview/pr-449/assets/{demos_LoadingIndicator.md.BVZFqNj1.js => demos_LoadingIndicator.md.CPwUJoov.js} (98%) rename pr-preview/pr-449/assets/{demos_LoadingIndicator.md.BVZFqNj1.lean.js => demos_LoadingIndicator.md.CPwUJoov.lean.js} (98%) rename pr-preview/pr-449/assets/{demos_ScanSameQrcodeMoreThanOnce.md.M3YU2Vzr.js => demos_ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.js} (99%) rename pr-preview/pr-449/assets/{demos_ScanSameQrcodeMoreThanOnce.md.M3YU2Vzr.lean.js => demos_ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.lean.js} (99%) rename pr-preview/pr-449/assets/{demos_SwitchCamera.md.B-obcuEB.js => demos_SwitchCamera.md.CydEbheE.js} (99%) rename pr-preview/pr-449/assets/{demos_SwitchCamera.md.B-obcuEB.lean.js => demos_SwitchCamera.md.CydEbheE.lean.js} (99%) rename pr-preview/pr-449/assets/{demos_Torch.md.AnpZuZA8.js => demos_Torch.md.bksnySAD.js} (99%) rename pr-preview/pr-449/assets/{demos_Torch.md.AnpZuZA8.lean.js => demos_Torch.md.bksnySAD.lean.js} (99%) rename pr-preview/pr-449/assets/{demos_Upload.md.Ds3GTY8o.js => demos_Upload.md.CnQDh4cA.js} (99%) rename pr-preview/pr-449/assets/{demos_Upload.md.Ds3GTY8o.lean.js => demos_Upload.md.CnQDh4cA.lean.js} (99%) rename pr-preview/pr-449/assets/{demos_Validate.md.Ba0B0yOc.js => demos_Validate.md.DtHqSbkl.js} (99%) rename pr-preview/pr-449/assets/{demos_Validate.md.Ba0B0yOc.lean.js => demos_Validate.md.DtHqSbkl.lean.js} (99%) diff --git a/pr-preview/pr-449/404.html b/pr-preview/pr-449/404.html index d0bc4d13..6d73d480 100644 --- a/pr-preview/pr-449/404.html +++ b/pr-preview/pr-449/404.html @@ -17,7 +17,7 @@
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/api/QrcodeCapture.html b/pr-preview/pr-449/api/QrcodeCapture.html index 3ad979cd..8a4ed04c 100644 --- a/pr-preview/pr-449/api/QrcodeCapture.html +++ b/pr-preview/pr-449/api/QrcodeCapture.html @@ -30,7 +30,7 @@ multiple /> </template>

Because the input element is the root element of the component and because Vue components accept fallthrough attributes you can make use of any valid input attribute:

html
<qrcode-capture disabled />

You can also override attributes. To remove attributes, set them to null:

html
<qrcode-capture :capture="null" />

Slots

no slots

- + \ No newline at end of file diff --git a/pr-preview/pr-449/api/QrcodeDropZone.html b/pr-preview/pr-449/api/QrcodeDropZone.html index da7ee9e8..ca07ace8 100644 --- a/pr-preview/pr-449/api/QrcodeDropZone.html +++ b/pr-preview/pr-449/api/QrcodeDropZone.html @@ -50,7 +50,7 @@ }

WARNING

This is a custom event not to be confused with native dragover. If you really need to listen for the DOM event instead, use Vues native event modifier.

decode removed in v5.0.0

Use detect instead.

docs for v4.0.0

Props

no props

Slots

default

This component merely renders a wrapper div. Its height is defined by the content inside so it will have zero height if you don't provide any content.

html
<qrcode-drop-zone>
   <b>put anything here</b>
 </qrcode-drop-zone>
- + \ No newline at end of file diff --git a/pr-preview/pr-449/api/QrcodeStream.html b/pr-preview/pr-449/api/QrcodeStream.html index 59704b44..c8bfd18f 100644 --- a/pr-preview/pr-449/api/QrcodeStream.html +++ b/pr-preview/pr-449/api/QrcodeStream.html @@ -120,7 +120,7 @@ }

Slots

default

Any distributed content overlays the camera stream, wrapped in a position: absolute container.

html
<qrcode-stream>
   <b>stuff here overlays the camera stream</b>
 </qrcode-stream>
- + \ No newline at end of file diff --git a/pr-preview/pr-449/assets/chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js b/pr-preview/pr-449/assets/chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js similarity index 98% rename from pr-preview/pr-449/assets/chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js rename to pr-preview/pr-449/assets/chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js index 3b8aca1c..5b9b7fc7 100644 --- a/pr-preview/pr-449/assets/chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js +++ b/pr-preview/pr-449/assets/chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js @@ -1 +1 @@ -import{d as X,h as i,y as u,j as Y,A as Z,g as O,o as ee,c as te,k as g,O as ae,a4 as oe,a7 as ne,r as se}from"./framework.BtL3uYYi.js";import{s as p,b as n,c as ie,d as re,k as ce}from"./camera.BJQyjlnn.js";const ue=X({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(N,{emit:j}){const o=N,h=j,_=i(o.constraints),w=i(o.formats);u(()=>o.constraints,(t,e)=>{JSON.stringify(t)!==JSON.stringify(e)&&(_.value=t)},{deep:!0}),u(()=>o.formats,(t,e)=>{JSON.stringify(t)!==JSON.stringify(e)&&(w.value=t)},{deep:!0});const f=i(),v=i(),l=i(),m=i(!1),y=i(!1);Y(()=>{y.value=!0}),Z(()=>{p()});const M=O(()=>({torch:o.torch,constraints:_.value,shouldStream:y.value&&!o.paused}));u(M,async t=>{const e=l.value;n(e!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const a=f.value;n(a!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const d=a.getContext("2d");if(n(d!==null,"if cavnas is defined, canvas 2d context should also be non-null"),t.shouldStream){p(),m.value=!1;try{const r=await ie(e,t);y.value?(m.value=!0,h("camera-on",r)):await p()}catch(r){h("error",r)}}else a.width=e.videoWidth,a.height=e.videoHeight,d.drawImage(e,0,0,e.videoWidth,e.videoHeight),p(),m.value=!1,h("camera-off")},{deep:!0}),u(w,t=>{y.value&&re(t)});const S=O(()=>M.value.shouldStream&&m.value);u(S,t=>{if(t){n(f.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),x(f.value),n(v.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),x(v.value);const e=()=>o.track===void 0?500:40;n(l.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),ce(l.value,{detectHandler:a=>h("detect",a),formats:w.value,locateHandler:J,minDelay:e()})}});const x=t=>{const e=t.getContext("2d");n(e!==null,"canvas 2d context should always be non-null"),e.clearRect(0,0,t.width,t.height)},J=t=>{const e=v.value;n(e!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const a=l.value;if(n(a!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),t.length===0||o.track===void 0)x(e);else{const d=a.offsetWidth,r=a.offsetHeight,k=a.videoWidth,R=a.videoHeight,B=Math.max(d/k,r/R),T=k*B,C=R*B,D=T/k,E=C/R,F=(d-T)/2,z=(r-C)/2,H=({x:c,y:s})=>({x:Math.floor(c*D),y:Math.floor(s*E)}),L=({x:c,y:s})=>({x:Math.floor(c+F),y:Math.floor(s+z)}),I=t.map(c=>{const{boundingBox:s,cornerPoints:Q}=c,{x:U,y:V}=L(H({x:s.x,y:s.y})),{x:$,y:G}=H({x:s.width,y:s.height});return{...c,cornerPoints:Q.map(K=>L(H(K))),boundingBox:DOMRectReadOnly.fromRect({x:U,y:V,width:$,height:G})}});e.width=a.offsetWidth,e.height=a.offsetHeight;const P=e.getContext("2d");o.track(I,P)}},q={width:"100%",height:"100%",position:"relative","z-index":"0"},W={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},b={width:"100%",height:"100%","object-fit":"cover"},A=O(()=>S.value?b:{...b,visibility:"hidden",position:"absolute"});return(t,e)=>(ee(),te("div",{style:q},[g("video",{ref_key:"videoRef",ref:l,style:ae(A.value),autoplay:"",muted:"",playsinline:""},null,4),oe(g("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:f,style:b},null,512),[[ne,!S.value]]),g("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:v,style:W},null,512),g("div",{style:W},[se(t.$slots,"default")])]))}});export{ue as _}; +import{d as X,h as i,y as u,j as Y,A as Z,g as O,o as ee,c as te,k as g,O as ae,a4 as oe,a7 as ne,r as se}from"./framework.BtL3uYYi.js";import{s as p,b as n,c as ie,d as re,k as ce}from"./camera.DhcMeik-.js";const ue=X({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(N,{emit:j}){const o=N,h=j,_=i(o.constraints),w=i(o.formats);u(()=>o.constraints,(t,e)=>{JSON.stringify(t)!==JSON.stringify(e)&&(_.value=t)},{deep:!0}),u(()=>o.formats,(t,e)=>{JSON.stringify(t)!==JSON.stringify(e)&&(w.value=t)},{deep:!0});const f=i(),v=i(),l=i(),m=i(!1),y=i(!1);Y(()=>{y.value=!0}),Z(()=>{p()});const M=O(()=>({torch:o.torch,constraints:_.value,shouldStream:y.value&&!o.paused}));u(M,async t=>{const e=l.value;n(e!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const a=f.value;n(a!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const d=a.getContext("2d");if(n(d!==null,"if cavnas is defined, canvas 2d context should also be non-null"),t.shouldStream){p(),m.value=!1;try{const r=await ie(e,t);y.value?(m.value=!0,h("camera-on",r)):await p()}catch(r){h("error",r)}}else a.width=e.videoWidth,a.height=e.videoHeight,d.drawImage(e,0,0,e.videoWidth,e.videoHeight),p(),m.value=!1,h("camera-off")},{deep:!0}),u(w,t=>{y.value&&re(t)});const S=O(()=>M.value.shouldStream&&m.value);u(S,t=>{if(t){n(f.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),x(f.value),n(v.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),x(v.value);const e=()=>o.track===void 0?500:40;n(l.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),ce(l.value,{detectHandler:a=>h("detect",a),formats:w.value,locateHandler:J,minDelay:e()})}});const x=t=>{const e=t.getContext("2d");n(e!==null,"canvas 2d context should always be non-null"),e.clearRect(0,0,t.width,t.height)},J=t=>{const e=v.value;n(e!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const a=l.value;if(n(a!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),t.length===0||o.track===void 0)x(e);else{const d=a.offsetWidth,r=a.offsetHeight,k=a.videoWidth,R=a.videoHeight,B=Math.max(d/k,r/R),T=k*B,C=R*B,D=T/k,E=C/R,F=(d-T)/2,z=(r-C)/2,H=({x:c,y:s})=>({x:Math.floor(c*D),y:Math.floor(s*E)}),L=({x:c,y:s})=>({x:Math.floor(c+F),y:Math.floor(s+z)}),I=t.map(c=>{const{boundingBox:s,cornerPoints:Q}=c,{x:U,y:V}=L(H({x:s.x,y:s.y})),{x:$,y:G}=H({x:s.width,y:s.height});return{...c,cornerPoints:Q.map(K=>L(H(K))),boundingBox:DOMRectReadOnly.fromRect({x:U,y:V,width:$,height:G})}});e.width=a.offsetWidth,e.height=a.offsetHeight;const P=e.getContext("2d");o.track(I,P)}},q={width:"100%",height:"100%",position:"relative","z-index":"0"},W={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},b={width:"100%",height:"100%","object-fit":"cover"},A=O(()=>S.value?b:{...b,visibility:"hidden",position:"absolute"});return(t,e)=>(ee(),te("div",{style:q},[g("video",{ref_key:"videoRef",ref:l,style:ae(A.value),autoplay:"",muted:"",playsinline:""},null,4),oe(g("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:f,style:b},null,512),[[ne,!S.value]]),g("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:v,style:W},null,512),g("div",{style:W},[se(t.$slots,"default")])]))}});export{ue as _}; diff --git a/pr-preview/pr-449/assets/chunks/camera.BJQyjlnn.js b/pr-preview/pr-449/assets/chunks/camera.DhcMeik-.js similarity index 61% rename from pr-preview/pr-449/assets/chunks/camera.BJQyjlnn.js rename to pr-preview/pr-449/assets/chunks/camera.DhcMeik-.js index 16f26317..a41fd98b 100644 --- a/pr-preview/pr-449/assets/chunks/camera.BJQyjlnn.js +++ b/pr-preview/pr-449/assets/chunks/camera.DhcMeik-.js @@ -1,3 +1,3 @@ -import{d as ri,h as ni,j as ai,a9 as ii,o as oi,b as si,J as ui}from"./framework.BtL3uYYi.js";const Co=ri({__name:"DemoWrapper",props:{component:Object},setup(r){const i=r,o=ni();return ai(()=>{i.component&&(o.value=ii(i.component))}),(u,d)=>(oi(),si(ui(o.value)))}});var lr=(r,i,o)=>{if(!i.has(r))throw TypeError("Cannot "+o)},er=(r,i,o)=>(lr(r,i,"read from private field"),o?o.call(r):i.get(r)),ci=(r,i,o)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,o)},li=(r,i,o,u)=>(lr(r,i,"write to private field"),i.set(r,o),o);const dr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],di=[...dr,["unknown"]].map(r=>r[0]),Ve=new Map(dr);function fi(r){for(const[i,o]of Ve)if(r===o)return i;return"unknown"}function pi(r){if(fr(r))return{width:r.naturalWidth,height:r.naturalHeight};if(pr(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(hr(r))return{width:r.videoWidth,height:r.videoHeight};if(vr(r))return{width:r.width,height:r.height};if(gr(r))return{width:r.displayWidth,height:r.displayHeight};if(mr(r))return{width:r.width,height:r.height};if(yr(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function fr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function pr(r){try{return r instanceof SVGImageElement}catch{return!1}}function hr(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function mr(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function vr(r){try{return r instanceof ImageBitmap}catch{return!1}}function yr(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function gr(r){try{return r instanceof VideoFrame}catch{return!1}}function wr(r){try{return r instanceof Blob}catch{return!1}}function hi(r){try{return r instanceof ImageData}catch{return!1}}function mi(r,i){try{const o=new OffscreenCanvas(r,i);if(o.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return o;throw void 0}catch{const o=document.createElement("canvas");return o.width=r,o.height=i,o}}async function br(r){if(fr(r)&&!await wi(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(pr(r)&&!await bi(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(gr(r)&&Ci(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(hr(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(vr(r)&&_i(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:o}=pi(r);if(i===0||o===0)return null;const u=mi(i,o).getContext("2d");u.drawImage(r,0,0);try{return u.getImageData(0,0,i,o)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function vi(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let o="";try{o=URL.createObjectURL(r),i.src=o,await i.decode()}finally{URL.revokeObjectURL(o)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await br(i)}function yi(r){const{width:i,height:o}=r;if(i===0||o===0)return null;const u=r.getContext("2d");try{return u.getImageData(0,0,i,o)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function gi(r){if(wr(r))return await vi(r);if(hi(r)){if($i(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return mr(r)||yr(r)?yi(r):await br(r)}async function wi(r){try{return await r.decode(),!0}catch{return!1}}async function bi(r){var i;try{return await((i=r.decode)==null?void 0:i.call(r)),!0}catch{return!1}}function Ci(r){return r.format===null}function $i(r){return r.data.buffer.byteLength===0}function _i(r){return r.width===0&&r.height===0}function tr(r,i){return r instanceof DOMException?new DOMException(`${i}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${i}: ${r.message}`):new Error(`${i}: ${r}`)}const rr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Si(r){return r.join("|")}function Pi(r){const i=nr(r);let o=0,u=rr.length-1;for(;o<=u;){const d=Math.floor((o+u)/2),p=rr[d],g=nr(p);if(g===i)return p;g{const o=r.match(/_(.+?)\.wasm$/);return o?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${o[1]}/${r}`:i+r}};let ar=new WeakMap;function ft(r,i){var o;const u=ar.get(r);if(u!=null&&u.modulePromise&&i===void 0)return u.modulePromise;const d=(o=u==null?void 0:u.moduleOverrides)!=null?o:Ri,p=r({...d});return ar.set(r,{moduleOverrides:d,modulePromise:p}),p}async function xi(r,i,o=ye){const u={...ye,...o},d=await ft(r),{size:p}=i,g=new Uint8Array(await i.arrayBuffer()),w=d._malloc(p);d.HEAPU8.set(g,w);const _=d.readBarcodesFromImage(w,p,Cr(d,u));d._free(w);const m=[];for(let $=0;$<_.size();++$)m.push($r(_.get($)));return m}async function Ii(r,i,o=ye){const u={...ye,...o},d=await ft(r),{data:p,width:g,height:w,data:{byteLength:_}}=i,m=d._malloc(_);d.HEAPU8.set(p,m);const $=d.readBarcodesFromPixmap(m,g,w,Cr(d,u));d._free(m);const P=[];for(let C=0;C<$.size();++C)P.push($r($.get(C)));return P}({...ye,formats:[...ye.formats]});var pt=(()=>{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(i={}){var o=i,u,d;o.ready=new Promise((e,t)=>{u=e,d=t});var p=Object.assign({},o),g="./this.program",w=typeof window=="object",_=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var m="";function $(e){return o.locateFile?o.locateFile(e,m):m+e}var P;(w||_)&&(_?m=self.location.href:typeof document<"u"&&document.currentScript&&(m=document.currentScript.src),r&&(m=r),m.indexOf("blob:")!==0?m=m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):m="",_&&(P=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),o.print||console.log.bind(console);var C=o.printErr||console.error.bind(console);Object.assign(o,p),p=null,o.arguments&&o.arguments,o.thisProgram&&(g=o.thisProgram),o.quit&&o.quit;var U;o.wasmBinary&&(U=o.wasmBinary),typeof WebAssembly!="object"&&Me("no native wasm support detected");var I,V=!1,A,D,X,ge,Y,x,mt,vt;function yt(){var e=I.buffer;o.HEAP8=A=new Int8Array(e),o.HEAP16=X=new Int16Array(e),o.HEAPU8=D=new Uint8Array(e),o.HEAPU16=ge=new Uint16Array(e),o.HEAP32=Y=new Int32Array(e),o.HEAPU32=x=new Uint32Array(e),o.HEAPF32=mt=new Float32Array(e),o.HEAPF64=vt=new Float64Array(e)}var gt=[],wt=[],bt=[];function Fr(){if(o.preRun)for(typeof o.preRun=="function"&&(o.preRun=[o.preRun]);o.preRun.length;)jr(o.preRun.shift());Ne(gt)}function kr(){Ne(wt)}function Ur(){if(o.postRun)for(typeof o.postRun=="function"&&(o.postRun=[o.postRun]);o.postRun.length;)Lr(o.postRun.shift());Ne(bt)}function jr(e){gt.unshift(e)}function Wr(e){wt.unshift(e)}function Lr(e){bt.unshift(e)}var ue=0,we=null;function Hr(e){var t;ue++,(t=o.monitorRunDependencies)===null||t===void 0||t.call(o,ue)}function Br(e){var t;if(ue--,(t=o.monitorRunDependencies)===null||t===void 0||t.call(o,ue),ue==0&&we){var n=we;we=null,n()}}function Me(e){var t;(t=o.onAbort)===null||t===void 0||t.call(o,e),e="Aborted("+e+")",C(e),V=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw d(n),n}var Vr="data:application/octet-stream;base64,",Ct=e=>e.startsWith(Vr),de;de="zxing_reader.wasm",Ct(de)||(de=$(de));function $t(e){if(e==de&&U)return new Uint8Array(U);if(P)return P(e);throw"both async and sync fetching of the wasm failed"}function qr(e){return!U&&(w||_)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>$t(e)):Promise.resolve().then(()=>$t(e))}function _t(e,t,n){return qr(e).then(a=>WebAssembly.instantiate(a,t)).then(a=>a).then(n,a=>{C(`failed to asynchronously prepare wasm: ${a}`),Me(a)})}function Gr(e,t,n,a){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Ct(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var c=WebAssembly.instantiateStreaming(s,n);return c.then(a,function(l){return C(`wasm streaming compile failed: ${l}`),C("falling back to ArrayBuffer instantiation"),_t(t,n,a)})}):_t(t,n,a)}function Nr(){var e={a:Ia};function t(a,s){return q=a.exports,I=q.ia,yt(),xt=q.ma,Wr(q.ja),Br(),q}Hr();function n(a){t(a.instance)}if(o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(a){C(`Module.instantiateWasm callback failed with error: ${a}`),d(a)}return Gr(U,de,e,n).catch(d),{}}var Ne=e=>{for(;e.length>0;)e.shift()(o)};o.noExitRuntime;var Ae=[],De=0,zr=e=>{var t=new ze(e);return t.get_caught()||(t.set_caught(!0),De--),t.set_rethrown(!1),Ae.push(t),zt(t.excPtr),t.get_exception_ptr()},re=0,Yr=()=>{F(0,0);var e=Ae.pop();Nt(e.excPtr),re=0};function ze(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){x[this.ptr+4>>2]=t},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(t){x[this.ptr+8>>2]=t},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,A[this.ptr+12>>0]=t},this.get_caught=function(){return A[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,A[this.ptr+13>>0]=t},this.get_rethrown=function(){return A[this.ptr+13>>0]!=0},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n)},this.set_adjusted_ptr=function(t){x[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=Jt(this.get_type());if(t)return x[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}var Jr=e=>{throw re||(re=e),re},Ye=e=>{var t=re;if(!t)return Te(0),0;var n=new ze(t);n.set_adjusted_ptr(t);var a=n.get_type();if(!a)return Te(0),t;for(var s in e){var c=e[s];if(c===0||c===a)break;var l=n.ptr+16;if(Yt(c,a,l))return Te(c),t}return Te(a),t},Qr=()=>Ye([]),Xr=e=>Ye([e]),Kr=(e,t)=>Ye([e,t]),Zr=()=>{var e=Ae.pop();e||Me("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Ae.push(e),e.set_rethrown(!0),e.set_caught(!1),De++),re=t,re},en=(e,t,n)=>{var a=new ze(e);throw a.init(t,n),re=e,De++,re},tn=()=>De,Re={},Je=e=>{for(;e.length;){var t=e.pop(),n=e.pop();n(t)}};function Qe(e){return this.fromWireType(Y[e>>2])}var fe={},ce={},xe={},St,Ie=e=>{throw new St(e)},le=(e,t,n)=>{e.forEach(function(f){xe[f]=t});function a(f){var h=n(f);h.length!==e.length&&Ie("Mismatched type converter count");for(var y=0;y{ce.hasOwnProperty(f)?s[h]=ce[f]:(c.push(f),fe.hasOwnProperty(f)||(fe[f]=[]),fe[f].push(()=>{s[h]=ce[f],++l,l===c.length&&a(s)}))}),c.length===0&&a(s)},rn=e=>{var t=Re[e];delete Re[e];var n=t.rawConstructor,a=t.rawDestructor,s=t.fields,c=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));le([e],c,l=>{var f={};return s.forEach((h,y)=>{var b=h.fieldName,T=l[y],E=h.getter,O=h.getterContext,k=l[y+s.length],H=h.setter,R=h.setterContext;f[b]={read:z=>T.fromWireType(E(O,z)),write:(z,v)=>{var S=[];H(R,z,k.toWireType(S,v)),Je(S)}}}),[{name:t.name,fromWireType:h=>{var y={};for(var b in f)y[b]=f[b].read(h);return a(h),y},toWireType:(h,y)=>{for(var b in f)if(!(b in y))throw new TypeError(`Missing field: "${b}"`);var T=n();for(b in f)f[b].write(T,y[b]);return h!==null&&h.push(a,T),T},argPackAdvance:ee,readValueFromPointer:Qe,destructorFunction:a}]})},nn=(e,t,n,a,s)=>{},an=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Pt=e},Pt,N=e=>{for(var t="",n=e;D[n];)t+=Pt[D[n++]];return t},pe,M=e=>{throw new pe(e)};function on(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var a=t.name;if(e||M(`type "${a}" must have a positive integer typeid pointer`),ce.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;M(`Cannot register type '${a}' twice`)}if(ce[e]=t,delete xe[e],fe.hasOwnProperty(e)){var s=fe[e];delete fe[e],s.forEach(c=>c())}}function Z(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return on(e,t,n)}var ee=8,sn=(e,t,n,a)=>{t=N(t),Z(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,c){return c?n:a},argPackAdvance:ee,readValueFromPointer:function(s){return this.fromWireType(D[s])},destructorFunction:null})},un=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Xe=e=>{function t(n){return n.$$.ptrType.registeredClass.name}M(t(e)+" instance already deleted")},Ke=!1,Tt=e=>{},cn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Et=e=>{e.count.value-=1;var t=e.count.value===0;t&&cn(e)},Ot=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var a=Ot(e,t,n.baseClass);return a===null?null:n.downcast(a)},Mt={},ln=()=>Object.keys($e).length,dn=()=>{var e=[];for(var t in $e)$e.hasOwnProperty(t)&&e.push($e[t]);return e},be=[],Ze=()=>{for(;be.length;){var e=be.pop();e.$$.deleteScheduled=!1,e.delete()}},Ce,fn=e=>{Ce=e,be.length&&Ce&&Ce(Ze)},pn=()=>{o.getInheritedInstanceCount=ln,o.getLiveInheritedInstances=dn,o.flushPendingDeletes=Ze,o.setDelayFunction=fn},$e={},hn=(e,t)=>{for(t===void 0&&M("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},mn=(e,t)=>(t=hn(e,t),$e[t]),Fe=(e,t)=>{(!t.ptrType||!t.ptr)&&Ie("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,a=!!t.smartPtr;return n!==a&&Ie("Both smartPtrType and smartPtr must be specified"),t.count={value:1},_e(Object.create(e,{$$:{value:t,writable:!0}}))};function vn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=mn(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var a=n.clone();return this.destructor(e),a}function s(){return this.isSmartPointer?Fe(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Fe(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var c=this.registeredClass.getActualType(t),l=Mt[c];if(!l)return s.call(this);var f;this.isConst?f=l.constPointerType:f=l.pointerType;var h=Ot(t,this.registeredClass,f.registeredClass);return h===null?s.call(this):this.isSmartPointer?Fe(f.registeredClass.instancePrototype,{ptrType:f,ptr:h,smartPtrType:this,smartPtr:e}):Fe(f.registeredClass.instancePrototype,{ptrType:f,ptr:h})}var _e=e=>typeof FinalizationRegistry>"u"?(_e=t=>t,e):(Ke=new FinalizationRegistry(t=>{Et(t.$$)}),_e=t=>{var n=t.$$,a=!!n.smartPtr;if(a){var s={$$:n};Ke.register(t,s,t)}return t},Tt=t=>Ke.unregister(t),_e(e)),yn=()=>{Object.assign(ke.prototype,{isAliasOf(e){if(!(this instanceof ke)||!(e instanceof ke))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var a=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;a.baseClass;)s=a.upcast(s),a=a.baseClass;return t===a&&n===s},clone(){if(this.$$.ptr||Xe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=_e(Object.create(Object.getPrototypeOf(this),{$$:{value:un(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Xe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&M("Object already scheduled for deletion"),Tt(this),Et(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Xe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&M("Object already scheduled for deletion"),be.push(this),be.length===1&&Ce&&Ce(Ze),this.$$.deleteScheduled=!0,this}})};function ke(){}var Se=(e,t)=>Object.defineProperty(t,"name",{value:e}),At=(e,t,n)=>{if(e[t].overloadTable===void 0){var a=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||M(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[a.argCount]=a}},et=(e,t,n)=>{o.hasOwnProperty(e)?((n===void 0||o[e].overloadTable!==void 0&&o[e].overloadTable[n]!==void 0)&&M(`Cannot register public name '${e}' twice`),At(o,e,e),o.hasOwnProperty(n)&&M(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),o[e].overloadTable[n]=t):(o[e]=t,n!==void 0&&(o[e].numArguments=n))},gn=48,wn=57,bn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=gn&&t<=wn?`_${e}`:e};function Cn(e,t,n,a,s,c,l,f){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=a,this.baseClass=s,this.getActualType=c,this.upcast=l,this.downcast=f,this.pureVirtualFunctions=[]}var tt=(e,t,n)=>{for(;t!==n;)t.upcast||M(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function $n(e,t){if(t===null)return this.isReference&&M(`null is not a valid ${this.name}`),0;t.$$||M(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||M(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass,a=tt(t.$$.ptr,n,this.registeredClass);return a}function _n(e,t){var n;if(t===null)return this.isReference&&M(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&M(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||M(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&M(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var a=t.$$.ptrType.registeredClass;if(n=tt(t.$$.ptr,a,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&M("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:M(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var s=t.clone();n=this.rawShare(n,ne.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:M("Unsupporting sharing policy")}return n}function Sn(e,t){if(t===null)return this.isReference&&M(`null is not a valid ${this.name}`),0;t.$$||M(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||M(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&M(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass,a=tt(t.$$.ptr,n,this.registeredClass);return a}function Dt(e){return this.fromWireType(x[e>>2])}var Pn=()=>{Object.assign(Ue.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:ee,readValueFromPointer:Dt,deleteObject(e){e!==null&&e.delete()},fromWireType:vn})};function Ue(e,t,n,a,s,c,l,f,h,y,b){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=a,this.isSmartPointer=s,this.pointeeType=c,this.sharingPolicy=l,this.rawGetPointee=f,this.rawConstructor=h,this.rawShare=y,this.rawDestructor=b,!s&&t.baseClass===void 0?a?(this.toWireType=$n,this.destructorFunction=null):(this.toWireType=Sn,this.destructorFunction=null):this.toWireType=_n}var Rt=(e,t,n)=>{o.hasOwnProperty(e)||Ie("Replacing nonexistant public symbol"),o[e].overloadTable!==void 0&&n!==void 0?o[e].overloadTable[n]=t:(o[e]=t,o[e].argCount=n)},Tn=(e,t,n)=>{var a=o["dynCall_"+e];return n&&n.length?a.apply(null,[t].concat(n)):a.call(null,t)},je=[],xt,j=e=>{var t=je[e];return t||(e>=je.length&&(je.length=e+1),je[e]=t=xt.get(e)),t},En=(e,t,n)=>{if(e.includes("j"))return Tn(e,t,n);var a=j(t).apply(null,n);return a},On=(e,t)=>{var n=[];return function(){return n.length=0,Object.assign(n,arguments),En(e,t,n)}},K=(e,t)=>{e=N(e);function n(){return e.includes("j")?On(e,t):j(t)}var a=n();return typeof a!="function"&&M(`unknown function pointer with signature ${e}: ${t}`),a},Mn=(e,t)=>{var n=Se(t,function(a){this.name=t,this.message=a;var s=new Error(a).stack;s!==void 0&&(this.stack=this.toString()+` -`+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},It,Ft=e=>{var t=Gt(e),n=N(t);return ae(t),n},We=(e,t)=>{var n=[],a={};function s(c){if(!a[c]&&!ce[c]){if(xe[c]){xe[c].forEach(s);return}n.push(c),a[c]=!0}}throw t.forEach(s),new It(`${e}: `+n.map(Ft).join([", "]))},An=(e,t,n,a,s,c,l,f,h,y,b,T,E)=>{b=N(b),c=K(s,c),f&&(f=K(l,f)),y&&(y=K(h,y)),E=K(T,E);var O=bn(b);et(O,function(){We(`Cannot construct ${b} due to unbound types`,[a])}),le([e,t,n],a?[a]:[],function(k){k=k[0];var H,R;a?(H=k.registeredClass,R=H.instancePrototype):R=ke.prototype;var z=Se(b,function(){if(Object.getPrototypeOf(this)!==v)throw new pe("Use 'new' to construct "+b);if(S.constructor_body===void 0)throw new pe(b+" has no accessible constructor");var Zt=S.constructor_body[arguments.length];if(Zt===void 0)throw new pe(`Tried to invoke ctor of ${b} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(S.constructor_body).toString()}) parameters instead!`);return Zt.apply(this,arguments)}),v=Object.create(R,{constructor:{value:z}});z.prototype=v;var S=new Cn(b,z,v,E,H,c,f,y);if(S.baseClass){var B,G;(G=(B=S.baseClass).__derivedClasses)!==null&&G!==void 0||(B.__derivedClasses=[]),S.baseClass.__derivedClasses.push(S)}var he=new Ue(b,S,!0,!1,!1),Be=new Ue(b+"*",S,!1,!1,!1),Kt=new Ue(b+" const*",S,!1,!0,!1);return Mt[e]={pointerType:Be,constPointerType:Kt},Rt(O,z),[he,Be,Kt]})},rt=(e,t)=>{for(var n=[],a=0;a>2]);return n};function Dn(e){for(var t=1;t{var l=rt(t,n);s=K(a,s),le([],[e],function(f){f=f[0];var h=`constructor ${f.name}`;if(f.registeredClass.constructor_body===void 0&&(f.registeredClass.constructor_body=[]),f.registeredClass.constructor_body[t-1]!==void 0)throw new pe(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${f.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return f.registeredClass.constructor_body[t-1]=()=>{We(`Cannot construct ${f.name} due to unbound types`,l)},le([],l,y=>(y.splice(1,0,null),f.registeredClass.constructor_body[t-1]=nt(h,y,null,s,c),[])),[]})},kt=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},xn=(e,t,n,a,s,c,l,f,h)=>{var y=rt(n,a);t=N(t),t=kt(t),c=K(s,c),le([],[e],function(b){b=b[0];var T=`${b.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),f&&b.registeredClass.pureVirtualFunctions.push(t);function E(){We(`Cannot call ${T} due to unbound types`,y)}var O=b.registeredClass.instancePrototype,k=O[t];return k===void 0||k.overloadTable===void 0&&k.className!==b.name&&k.argCount===n-2?(E.argCount=n-2,E.className=b.name,O[t]=E):(At(O,t,T),O[t].overloadTable[n-2]=E),le([],y,function(H){var R=nt(T,H,b,c,l);return O[t].overloadTable===void 0?(R.argCount=n-2,O[t]=R):O[t].overloadTable[n-2]=R,[]}),[]})};function In(){Object.assign(Ut.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Ut(){this.allocated=[void 0],this.freelist=[]}var Q=new Ut,at=e=>{e>=Q.reserved&&--Q.get(e).refcount===0&&Q.free(e)},Fn=()=>{for(var e=0,t=Q.reserved;t{Q.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Q.reserved=Q.allocated.length,o.count_emval_handles=Fn},ne={toValue:e=>(e||M("Cannot use deleted val. handle = "+e),Q.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Q.allocate({refcount:1,value:e})}}},Un=(e,t)=>{t=N(t),Z(e,{name:t,fromWireType:n=>{var a=ne.toValue(n);return at(n),a},toWireType:(n,a)=>ne.toHandle(a),argPackAdvance:ee,readValueFromPointer:Qe,destructorFunction:null})},jn=(e,t,n)=>{switch(t){case 1:return n?function(a){return this.fromWireType(A[a>>0])}:function(a){return this.fromWireType(D[a>>0])};case 2:return n?function(a){return this.fromWireType(X[a>>1])}:function(a){return this.fromWireType(ge[a>>1])};case 4:return n?function(a){return this.fromWireType(Y[a>>2])}:function(a){return this.fromWireType(x[a>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Wn=(e,t,n,a)=>{t=N(t);function s(){}s.values={},Z(e,{name:t,constructor:s,fromWireType:function(c){return this.constructor.values[c]},toWireType:(c,l)=>l.value,argPackAdvance:ee,readValueFromPointer:jn(t,n,a),destructorFunction:null}),et(t,s)},it=(e,t)=>{var n=ce[e];return n===void 0&&M(t+" has unknown type "+Ft(e)),n},Ln=(e,t,n)=>{var a=it(e,"enum");t=N(t);var s=a.constructor,c=Object.create(a.constructor.prototype,{value:{value:n},constructor:{value:Se(`${a.name}_${t}`,function(){})}});s.values[n]=c,s[t]=c},ot=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},Hn=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(mt[n>>2])};case 8:return function(n){return this.fromWireType(vt[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Bn=(e,t,n)=>{t=N(t),Z(e,{name:t,fromWireType:a=>a,toWireType:(a,s)=>s,argPackAdvance:ee,readValueFromPointer:Hn(t,n),destructorFunction:null})},Vn=(e,t,n,a,s,c,l)=>{var f=rt(t,n);e=N(e),e=kt(e),s=K(a,s),et(e,function(){We(`Cannot call ${e} due to unbound types`,f)},t-1),le([],f,function(h){var y=[h[0],null].concat(h.slice(1));return Rt(e,nt(e,y,null,s,c),t-1),[]})},qn=(e,t,n)=>{switch(t){case 1:return n?a=>A[a>>0]:a=>D[a>>0];case 2:return n?a=>X[a>>1]:a=>ge[a>>1];case 4:return n?a=>Y[a>>2]:a=>x[a>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Gn=(e,t,n,a,s)=>{t=N(t);var c=b=>b;if(a===0){var l=32-8*n;c=b=>b<>>l}var f=t.includes("unsigned"),h=(b,T)=>{},y;f?y=function(b,T){return h(T,this.name),T>>>0}:y=function(b,T){return h(T,this.name),T},Z(e,{name:t,fromWireType:c,toWireType:y,argPackAdvance:ee,readValueFromPointer:qn(t,n,a!==0),destructorFunction:null})},Nn=(e,t,n)=>{var a=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=a[t];function c(l){var f=x[l>>2],h=x[l+4>>2];return new s(A.buffer,h,f)}n=N(n),Z(e,{name:n,fromWireType:c,argPackAdvance:ee,readValueFromPointer:c},{ignoreDuplicateRegistrations:!0})},jt=(e,t,n,a)=>{if(!(a>0))return 0;for(var s=n,c=n+a-1,l=0;l=55296&&f<=57343){var h=e.charCodeAt(++l);f=65536+((f&1023)<<10)|h&1023}if(f<=127){if(n>=c)break;t[n++]=f}else if(f<=2047){if(n+1>=c)break;t[n++]=192|f>>6,t[n++]=128|f&63}else if(f<=65535){if(n+2>=c)break;t[n++]=224|f>>12,t[n++]=128|f>>6&63,t[n++]=128|f&63}else{if(n+3>=c)break;t[n++]=240|f>>18,t[n++]=128|f>>12&63,t[n++]=128|f>>6&63,t[n++]=128|f&63}}return t[n]=0,n-s},zn=(e,t,n)=>jt(e,D,t,n),Wt=e=>{for(var t=0,n=0;n=55296&&a<=57343?(t+=4,++n):t+=3}return t},Lt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Yn=(e,t,n)=>{for(var a=t+n,s=t;e[s]&&!(s>=a);)++s;if(s-t>16&&e.buffer&&Lt)return Lt.decode(e.subarray(t,s));for(var c="";t>10,56320|y&1023)}}return c},st=(e,t)=>e?Yn(D,e,t):"",Jn=(e,t)=>{t=N(t);var n=t==="std::string";Z(e,{name:t,fromWireType(a){var s=x[a>>2],c=a+4,l;if(n)for(var f=c,h=0;h<=s;++h){var y=c+h;if(h==s||D[y]==0){var b=y-f,T=st(f,b);l===void 0?l=T:(l+="\0",l+=T),f=y+1}}else{for(var E=new Array(s),h=0;h>2]=c,n&&l)zn(s,h,c+1);else if(l)for(var y=0;y255&&(ae(h),M("String has UTF-16 code units that do not fit in 8 bits")),D[h+y]=b}else for(var y=0;y{for(var n=e,a=n>>1,s=a+t/2;!(a>=s)&&ge[a];)++a;if(n=a<<1,n-e>32&&Ht)return Ht.decode(D.subarray(e,n));for(var c="",l=0;!(l>=t/2);++l){var f=X[e+l*2>>1];if(f==0)break;c+=String.fromCharCode(f)}return c},Xn=(e,t,n)=>{var a;if((a=n)!==null&&a!==void 0||(n=2147483647),n<2)return 0;n-=2;for(var s=t,c=n>1]=f,t+=2}return X[t>>1]=0,t-s},Kn=e=>e.length*2,Zn=(e,t)=>{for(var n=0,a="";!(n>=t/4);){var s=Y[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|c&1023)}else a+=String.fromCharCode(s)}return a},ea=(e,t,n)=>{var a;if((a=n)!==null&&a!==void 0||(n=2147483647),n<4)return 0;for(var s=t,c=s+n-4,l=0;l=55296&&f<=57343){var h=e.charCodeAt(++l);f=65536+((f&1023)<<10)|h&1023}if(Y[t>>2]=f,t+=4,t+4>c)break}return Y[t>>2]=0,t-s},ta=e=>{for(var t=0,n=0;n=55296&&a<=57343&&++n,t+=4}return t},ra=(e,t,n)=>{n=N(n);var a,s,c,l,f;t===2?(a=Qn,s=Xn,l=Kn,c=()=>ge,f=1):t===4&&(a=Zn,s=ea,l=ta,c=()=>x,f=2),Z(e,{name:n,fromWireType:h=>{for(var y=x[h>>2],b=c(),T,E=h+4,O=0;O<=y;++O){var k=h+4+O*t;if(O==y||b[k>>f]==0){var H=k-E,R=a(E,H);T===void 0?T=R:(T+="\0",T+=R),E=k+t}}return ae(h),T},toWireType:(h,y)=>{typeof y!="string"&&M(`Cannot pass non-string to C++ string type ${n}`);var b=l(y),T=lt(4+b+t);return x[T>>2]=b>>f,s(y,T+4,b+t),h!==null&&h.push(ae,T),T},argPackAdvance:ee,readValueFromPointer:Qe,destructorFunction(h){ae(h)}})},na=(e,t,n,a,s,c)=>{Re[e]={name:N(t),rawConstructor:K(n,a),rawDestructor:K(s,c),fields:[]}},aa=(e,t,n,a,s,c,l,f,h,y)=>{Re[e].fields.push({fieldName:N(t),getterReturnType:n,getter:K(a,s),getterContext:c,setterArgumentType:l,setter:K(f,h),setterContext:y})},ia=(e,t)=>{t=N(t),Z(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,a)=>{}})},ut=[],oa=(e,t,n,a)=>(e=ut[e],t=ne.toValue(t),e(null,t,n,a)),sa={},ua=e=>{var t=sa[e];return t===void 0?N(e):t},Bt=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},ca=e=>e===0?ne.toHandle(Bt()):(e=ua(e),ne.toHandle(Bt()[e])),la=e=>{var t=ut.length;return ut.push(e),t},da=(e,t)=>{for(var n=new Array(e),a=0;a>2],"parameter "+a);return n},fa=Reflect.construct,pa=(e,t,n)=>{var a=[],s=e.toWireType(a,n);return a.length&&(x[t>>2]=ne.toHandle(a)),s},ha=(e,t,n)=>{var a=da(e,t),s=a.shift();e--;var c=new Array(e),l=(h,y,b,T)=>{for(var E=0,O=0;Oh.name).join(", ")}) => ${s.name}>`;return la(Se(f,l))},ma=e=>{e>4&&(Q.get(e).refcount+=1)},va=e=>{var t=ne.toValue(e);Je(t),at(e)},ya=(e,t)=>{e=it(e,"_emval_take_value");var n=e.readValueFromPointer(t);return ne.toHandle(n)},ga=()=>{Me("")},wa=(e,t,n)=>D.copyWithin(e,t,t+n),ba=()=>2147483648,Ca=e=>{var t=I.buffer,n=(e-t.byteLength+65535)/65536;try{return I.grow(n),yt(),1}catch{}},$a=e=>{var t=D.length;e>>>=0;var n=ba();if(e>n)return!1;for(var a=(h,y)=>h+(y-h%y)%y,s=1;s<=4;s*=2){var c=t*(1+.2/s);c=Math.min(c,e+100663296);var l=Math.min(n,a(Math.max(e,c),65536)),f=Ca(l);if(f)return!0}return!1},ct={},_a=()=>g||"./this.program",Pe=()=>{if(!Pe.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:_a()};for(var n in ct)ct[n]===void 0?delete t[n]:t[n]=ct[n];var a=[];for(var n in t)a.push(`${n}=${t[n]}`);Pe.strings=a}return Pe.strings},Sa=(e,t)=>{for(var n=0;n>0]=e.charCodeAt(n);A[t>>0]=0},Pa=(e,t)=>{var n=0;return Pe().forEach((a,s)=>{var c=t+n;x[e+s*4>>2]=c,Sa(a,c),n+=a.length+1}),0},Ta=(e,t)=>{var n=Pe();x[e>>2]=n.length;var a=0;return n.forEach(s=>a+=s.length+1),x[t>>2]=a,0},Ea=e=>e,Le=e=>e%4===0&&(e%100!==0||e%400===0),Oa=(e,t)=>{for(var n=0,a=0;a<=t;n+=e[a++]);return n},Vt=[31,29,31,30,31,30,31,31,30,31,30,31],qt=[31,28,31,30,31,30,31,31,30,31,30,31],Ma=(e,t)=>{for(var n=new Date(e.getTime());t>0;){var a=Le(n.getFullYear()),s=n.getMonth(),c=(a?Vt:qt)[s];if(t>c-n.getDate())t-=c-n.getDate()+1,n.setDate(1),s<11?n.setMonth(s+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+t),n}return n};function Aa(e,t,n){var a=Wt(e)+1,s=new Array(a);return jt(e,s,0,s.length),s}var Da=(e,t)=>{A.set(e,t)},Ra=(e,t,n,a)=>{var s=x[a+40>>2],c={tm_sec:Y[a>>2],tm_min:Y[a+4>>2],tm_hour:Y[a+8>>2],tm_mday:Y[a+12>>2],tm_mon:Y[a+16>>2],tm_year:Y[a+20>>2],tm_wday:Y[a+24>>2],tm_yday:Y[a+28>>2],tm_isdst:Y[a+32>>2],tm_gmtoff:Y[a+36>>2],tm_zone:s?st(s):""},l=st(n),f={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var h in f)l=l.replace(new RegExp(h,"g"),f[h]);var y=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b=["January","February","March","April","May","June","July","August","September","October","November","December"];function T(v,S,B){for(var G=typeof v=="number"?v.toString():v||"";G.length0?1:0}var G;return(G=B(v.getFullYear()-S.getFullYear()))===0&&(G=B(v.getMonth()-S.getMonth()))===0&&(G=B(v.getDate()-S.getDate())),G}function k(v){switch(v.getDay()){case 0:return new Date(v.getFullYear()-1,11,29);case 1:return v;case 2:return new Date(v.getFullYear(),0,3);case 3:return new Date(v.getFullYear(),0,2);case 4:return new Date(v.getFullYear(),0,1);case 5:return new Date(v.getFullYear()-1,11,31);case 6:return new Date(v.getFullYear()-1,11,30)}}function H(v){var S=Ma(new Date(v.tm_year+1900,0,1),v.tm_yday),B=new Date(S.getFullYear(),0,4),G=new Date(S.getFullYear()+1,0,4),he=k(B),Be=k(G);return O(he,S)<=0?O(Be,S)<=0?S.getFullYear()+1:S.getFullYear():S.getFullYear()-1}var R={"%a":v=>y[v.tm_wday].substring(0,3),"%A":v=>y[v.tm_wday],"%b":v=>b[v.tm_mon].substring(0,3),"%B":v=>b[v.tm_mon],"%C":v=>{var S=v.tm_year+1900;return E(S/100|0,2)},"%d":v=>E(v.tm_mday,2),"%e":v=>T(v.tm_mday,2," "),"%g":v=>H(v).toString().substring(2),"%G":v=>H(v),"%H":v=>E(v.tm_hour,2),"%I":v=>{var S=v.tm_hour;return S==0?S=12:S>12&&(S-=12),E(S,2)},"%j":v=>E(v.tm_mday+Oa(Le(v.tm_year+1900)?Vt:qt,v.tm_mon-1),3),"%m":v=>E(v.tm_mon+1,2),"%M":v=>E(v.tm_min,2),"%n":()=>` -`,"%p":v=>v.tm_hour>=0&&v.tm_hour<12?"AM":"PM","%S":v=>E(v.tm_sec,2),"%t":()=>" ","%u":v=>v.tm_wday||7,"%U":v=>{var S=v.tm_yday+7-v.tm_wday;return E(Math.floor(S/7),2)},"%V":v=>{var S=Math.floor((v.tm_yday+7-(v.tm_wday+6)%7)/7);if((v.tm_wday+371-v.tm_yday-2)%7<=2&&S++,S){if(S==53){var B=(v.tm_wday+371-v.tm_yday)%7;B!=4&&(B!=3||!Le(v.tm_year))&&(S=1)}}else{S=52;var G=(v.tm_wday+7-v.tm_yday-1)%7;(G==4||G==5&&Le(v.tm_year%400-1))&&S++}return E(S,2)},"%w":v=>v.tm_wday,"%W":v=>{var S=v.tm_yday+7-(v.tm_wday+6)%7;return E(Math.floor(S/7),2)},"%y":v=>(v.tm_year+1900).toString().substring(2),"%Y":v=>v.tm_year+1900,"%z":v=>{var S=v.tm_gmtoff,B=S>=0;return S=Math.abs(S)/60,S=S/60*100+S%60,(B?"+":"-")+("0000"+S).slice(-4)},"%Z":v=>v.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var h in R)l.includes(h)&&(l=l.replace(new RegExp(h,"g"),R[h](c)));l=l.replace(/\0\0/g,"%");var z=Aa(l);return z.length>t?0:(Da(z,e),z.length-1)},xa=(e,t,n,a,s)=>Ra(e,t,n,a);St=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},an(),pe=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},yn(),pn(),Pn(),It=o.UnboundTypeError=Mn(Error,"UnboundTypeError"),In(),kn();var Ia={s:zr,u:Yr,b:Qr,g:Xr,q:Kr,J:Zr,f:en,V:tn,d:Jr,da:rn,Q:nn,_:sn,ca:An,ba:Rn,w:xn,Y:Un,x:Wn,h:Ln,L:Bn,M:Vn,t:Gn,o:Nn,K:Jn,C:ra,A:na,ea:aa,$:ia,R:oa,ha:at,fa:ca,Z:ha,N:ma,O:va,aa:ya,B:ga,X:wa,W:$a,T:Pa,U:Ta,E:Qa,D:Wa,F:Ja,n:Xa,a:Fa,e:Ha,m:ja,k:Va,H:za,v:Ga,G:Ya,z:Za,P:ti,l:Ba,j:La,c:Ua,p:ka,I:Na,r:Ka,i:qa,y:ei,ga:Ea,S:xa},q=Nr(),ae=o._free=e=>(ae=o._free=q.ka)(e),lt=o._malloc=e=>(lt=o._malloc=q.la)(e),Gt=e=>(Gt=q.na)(e),F=(e,t)=>(F=q.oa)(e,t),Te=e=>(Te=q.pa)(e),W=()=>(W=q.qa)(),L=e=>(L=q.ra)(e),Nt=e=>(Nt=q.sa)(e),zt=e=>(zt=q.ta)(e),Yt=(e,t,n)=>(Yt=q.ua)(e,t,n),Jt=e=>(Jt=q.va)(e);o.dynCall_viijii=(e,t,n,a,s,c,l)=>(o.dynCall_viijii=q.wa)(e,t,n,a,s,c,l);var Qt=o.dynCall_jiiii=(e,t,n,a,s)=>(Qt=o.dynCall_jiiii=q.xa)(e,t,n,a,s);o.dynCall_iiiiij=(e,t,n,a,s,c,l)=>(o.dynCall_iiiiij=q.ya)(e,t,n,a,s,c,l),o.dynCall_iiiiijj=(e,t,n,a,s,c,l,f,h)=>(o.dynCall_iiiiijj=q.za)(e,t,n,a,s,c,l,f,h),o.dynCall_iiiiiijj=(e,t,n,a,s,c,l,f,h,y)=>(o.dynCall_iiiiiijj=q.Aa)(e,t,n,a,s,c,l,f,h,y);function Fa(e,t){var n=W();try{return j(e)(t)}catch(a){if(L(n),a!==a+0)throw a;F(1,0)}}function ka(e,t,n,a){var s=W();try{j(e)(t,n,a)}catch(c){if(L(s),c!==c+0)throw c;F(1,0)}}function Ua(e,t,n){var a=W();try{j(e)(t,n)}catch(s){if(L(a),s!==s+0)throw s;F(1,0)}}function ja(e,t,n,a){var s=W();try{return j(e)(t,n,a)}catch(c){if(L(s),c!==c+0)throw c;F(1,0)}}function Wa(e,t,n,a,s){var c=W();try{return j(e)(t,n,a,s)}catch(l){if(L(c),l!==l+0)throw l;F(1,0)}}function La(e,t){var n=W();try{j(e)(t)}catch(a){if(L(n),a!==a+0)throw a;F(1,0)}}function Ha(e,t,n){var a=W();try{return j(e)(t,n)}catch(s){if(L(a),s!==s+0)throw s;F(1,0)}}function Ba(e){var t=W();try{j(e)()}catch(n){if(L(t),n!==n+0)throw n;F(1,0)}}function Va(e,t,n,a,s){var c=W();try{return j(e)(t,n,a,s)}catch(l){if(L(c),l!==l+0)throw l;F(1,0)}}function qa(e,t,n,a,s,c,l,f,h,y,b){var T=W();try{j(e)(t,n,a,s,c,l,f,h,y,b)}catch(E){if(L(T),E!==E+0)throw E;F(1,0)}}function Ga(e,t,n,a,s,c,l){var f=W();try{return j(e)(t,n,a,s,c,l)}catch(h){if(L(f),h!==h+0)throw h;F(1,0)}}function Na(e,t,n,a,s){var c=W();try{j(e)(t,n,a,s)}catch(l){if(L(c),l!==l+0)throw l;F(1,0)}}function za(e,t,n,a,s,c){var l=W();try{return j(e)(t,n,a,s,c)}catch(f){if(L(l),f!==f+0)throw f;F(1,0)}}function Ya(e,t,n,a,s,c,l,f){var h=W();try{return j(e)(t,n,a,s,c,l,f)}catch(y){if(L(h),y!==y+0)throw y;F(1,0)}}function Ja(e,t,n,a){var s=W();try{return j(e)(t,n,a)}catch(c){if(L(s),c!==c+0)throw c;F(1,0)}}function Qa(e,t,n,a){var s=W();try{return j(e)(t,n,a)}catch(c){if(L(s),c!==c+0)throw c;F(1,0)}}function Xa(e){var t=W();try{return j(e)()}catch(n){if(L(t),n!==n+0)throw n;F(1,0)}}function Ka(e,t,n,a,s,c,l,f){var h=W();try{j(e)(t,n,a,s,c,l,f)}catch(y){if(L(h),y!==y+0)throw y;F(1,0)}}function Za(e,t,n,a,s,c,l,f,h,y,b,T){var E=W();try{return j(e)(t,n,a,s,c,l,f,h,y,b,T)}catch(O){if(L(E),O!==O+0)throw O;F(1,0)}}function ei(e,t,n,a,s,c,l,f,h,y,b,T,E,O,k,H){var R=W();try{j(e)(t,n,a,s,c,l,f,h,y,b,T,E,O,k,H)}catch(z){if(L(R),z!==z+0)throw z;F(1,0)}}function ti(e,t,n,a,s){var c=W();try{return Qt(e,t,n,a,s)}catch(l){if(L(c),l!==l+0)throw l;F(1,0)}}var He;we=function e(){He||Xt(),He||(we=e)};function Xt(){if(ue>0||(Fr(),ue>0))return;function e(){He||(He=!0,o.calledRun=!0,!V&&(kr(),u(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),Ur()))}o.setStatus?(o.setStatus("Running..."),setTimeout(function(){setTimeout(function(){o.setStatus("")},1),e()},1)):e()}if(o.preInit)for(typeof o.preInit=="function"&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Xt(),i.ready}})();function Fi(r){return ft(pt,r)}async function ki(r,i){return xi(pt,r,i)}async function Ui(r,i){return Ii(pt,r,i)}var Ee;class Oe extends EventTarget{constructor(i={}){var o;super(),ci(this,Ee,void 0);try{const u=(o=i==null?void 0:i.formats)==null?void 0:o.filter(d=>d!=="unknown");if((u==null?void 0:u.length)===0)throw new TypeError("Hint option provided, but is empty.");u==null||u.forEach(d=>{if(!Ve.has(d))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${d}' is not a valid enum value of type BarcodeFormat.`)}),li(this,Ee,u??[]),Fi().then(d=>{this.dispatchEvent(new CustomEvent("load",{detail:d}))}).catch(d=>{this.dispatchEvent(new CustomEvent("error",{detail:d}))})}catch(u){throw tr(u,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return di.filter(i=>i!=="unknown")}async detect(i){try{const o=await gi(i);if(o===null)return[];let u;try{wr(o)?u=await ki(o,{tryHarder:!0,formats:er(this,Ee).map(d=>Ve.get(d))}):u=await Ui(o,{tryHarder:!0,formats:er(this,Ee).map(d=>Ve.get(d))})}catch(d){throw console.error(d),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return u.map(d=>{const{topLeft:{x:p,y:g},topRight:{x:w,y:_},bottomLeft:{x:m,y:$},bottomRight:{x:P,y:C}}=d.position,U=Math.min(p,w,m,P),I=Math.min(g,_,$,C),V=Math.max(p,w,m,P),A=Math.max(g,_,$,C);return{boundingBox:new DOMRectReadOnly(U,I,V-U,A-I),rawValue:d.text,format:fi(d.format),cornerPoints:[{x:p,y:g},{x:w,y:_},{x:P,y:C},{x:m,y:$}]}})}catch(o){throw tr(o,"Failed to execute 'detect' on 'BarcodeDetector'")}}}Ee=new WeakMap;globalThis.BarcodeDetector!=null||(globalThis.BarcodeDetector=Oe);const ht=(r,i,o="error")=>{let u,d;const p=new Promise((g,w)=>{u=g,d=w,r.addEventListener(i,u),r.addEventListener(o,d)});return p.finally(()=>{r.removeEventListener(i,u),r.removeEventListener(o,d)}),p},ir=r=>new Promise(i=>setTimeout(i,r));class ji extends Error{constructor(){super("can't process cross-origin image"),this.name="DropImageFetchError"}}class _r extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class Wi extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class Li extends Error{constructor(){super("Loading camera stream timed out after 6 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}let dt;const $o=r=>{dt=new Oe({formats:r})},_o=async(r,{detectHandler:i,locateHandler:o,minDelay:u,formats:d})=>{console.debug("[vue-qrcode-reader] start scanning"),dt=new Oe({formats:d});const p=g=>async w=>{if(r.readyState===0)console.debug("[vue-qrcode-reader] stop scanning: video element readyState is 0");else{const{lastScanned:_,contentBefore:m,lastScanHadContent:$}=g;if(w-_!m.includes(V.rawValue));C&&i(P);const U=P.length>0;U&&o(P),!U&&$&&o(P);const I={lastScanned:w,lastScanHadContent:U,contentBefore:C?P.map(V=>V.rawValue):m};window.requestAnimationFrame(p(I))}}};p({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())},Hi=async r=>{if(r.startsWith("http")&&r.includes(location.host)===!1)throw new ji;const i=document.createElement("img");return i.src=r,await ht(i,"load"),i},So=async(r,i=["qr_code"])=>await new Oe({formats:i}).detect(r),Po=async(r,i=["qr_code"])=>{const o=new Oe({formats:i}),u=await Hi(r);return await o.detect(u)};var Sr={},J={};Object.defineProperty(J,"__esModule",{value:!0});J.compactObject=Er;J.deprecated=Qi;var Bi=J.detectBrowser=Xi;J.disableLog=zi;J.disableWarnings=Yi;J.extractVersion=qe;J.filterStats=Ki;J.log=Ji;J.walkStats=Ge;J.wrapPeerConnectionEvent=Ni;function Vi(r,i,o){return i=qi(i),i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r}function qi(r){var i=Gi(r,"string");return oe(i)==="symbol"?i:String(i)}function Gi(r,i){if(oe(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var u=o.call(r,i||"default");if(oe(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function oe(r){"@babel/helpers - typeof";return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},oe(r)}var Pr=!0,Tr=!0;function qe(r,i,o){var u=r.match(i);return u&&u.length>=o&&parseInt(u[o],10)}function Ni(r,i,o){if(r.RTCPeerConnection){var u=r.RTCPeerConnection.prototype,d=u.addEventListener;u.addEventListener=function(g,w){if(g!==i)return d.apply(this,arguments);var _=function($){var P=o($);P&&(w.handleEvent?w.handleEvent(P):w(P))};return this._eventMap=this._eventMap||{},this._eventMap[i]||(this._eventMap[i]=new Map),this._eventMap[i].set(w,_),d.apply(this,[g,_])};var p=u.removeEventListener;u.removeEventListener=function(g,w){if(g!==i||!this._eventMap||!this._eventMap[i])return p.apply(this,arguments);if(!this._eventMap[i].has(w))return p.apply(this,arguments);var _=this._eventMap[i].get(w);return this._eventMap[i].delete(w),this._eventMap[i].size===0&&delete this._eventMap[i],Object.keys(this._eventMap).length===0&&delete this._eventMap,p.apply(this,[g,_])},Object.defineProperty(u,"on"+i,{get:function(){return this["_on"+i]},set:function(w){this["_on"+i]&&(this.removeEventListener(i,this["_on"+i]),delete this["_on"+i]),w&&this.addEventListener(i,this["_on"+i]=w)},enumerable:!0,configurable:!0})}}function zi(r){return typeof r!="boolean"?new Error("Argument type: "+oe(r)+". Please use a boolean."):(Pr=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function Yi(r){return typeof r!="boolean"?new Error("Argument type: "+oe(r)+". Please use a boolean."):(Tr=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function Ji(){if((typeof window>"u"?"undefined":oe(window))==="object"){if(Pr)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Qi(r,i){Tr&&console.warn(r+" is deprecated, please use "+i+" instead.")}function Xi(r){var i={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return i.browser="Not a browser.",i;var o=r.navigator;if(o.mozGetUserMedia)i.browser="firefox",i.version=qe(o.userAgent,/Firefox\/(\d+)\./,1);else if(o.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)i.browser="chrome",i.version=qe(o.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&o.userAgent.match(/AppleWebKit\/(\d+)\./))i.browser="safari",i.version=qe(o.userAgent,/AppleWebKit\/(\d+)\./,1),i.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return i.browser="Not a supported browser.",i;return i}function or(r){return Object.prototype.toString.call(r)==="[object Object]"}function Er(r){return or(r)?Object.keys(r).reduce(function(i,o){var u=or(r[o]),d=u?Er(r[o]):r[o],p=u&&!Object.keys(d).length;return d===void 0||p?i:Object.assign(i,Vi({},o,d))},{}):r}function Ge(r,i,o){!i||o.has(i.id)||(o.set(i.id,i),Object.keys(i).forEach(function(u){u.endsWith("Id")?Ge(r,r.get(i[u]),o):u.endsWith("Ids")&&i[u].forEach(function(d){Ge(r,r.get(d),o)})}))}function Ki(r,i,o){var u=o?"outbound-rtp":"inbound-rtp",d=new Map;if(i===null)return d;var p=[];return r.forEach(function(g){g.type==="track"&&g.trackIdentifier===i.id&&p.push(g)}),p.forEach(function(g){r.forEach(function(w){w.type===u&&w.trackId===g.id&&Ge(r,w,d)})}),d}Object.defineProperty(Sr,"__esModule",{value:!0});var Zi=Sr.shimGetUserMedia=ro,eo=to(J);function Or(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,o=new WeakMap;return(Or=function(d){return d?o:i})(r)}function to(r,i){if(r&&r.__esModule)return r;if(r===null||ie(r)!=="object"&&typeof r!="function")return{default:r};var o=Or(i);if(o&&o.has(r))return o.get(r);var u={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var g=d?Object.getOwnPropertyDescriptor(r,p):null;g&&(g.get||g.set)?Object.defineProperty(u,p,g):u[p]=r[p]}return u.default=r,o&&o.set(r,u),u}function ie(r){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ie(r)}var sr=eo.log;function ro(r,i){var o=r&&r.navigator;if(o.mediaDevices){var u=function(m){if(ie(m)!=="object"||m.mandatory||m.optional)return m;var $={};return Object.keys(m).forEach(function(P){if(!(P==="require"||P==="advanced"||P==="mediaSource")){var C=ie(m[P])==="object"?m[P]:{ideal:m[P]};C.exact!==void 0&&typeof C.exact=="number"&&(C.min=C.max=C.exact);var U=function(A,D){return A?A+D.charAt(0).toUpperCase()+D.slice(1):D==="deviceId"?"sourceId":D};if(C.ideal!==void 0){$.optional=$.optional||[];var I={};typeof C.ideal=="number"?(I[U("min",P)]=C.ideal,$.optional.push(I),I={},I[U("max",P)]=C.ideal,$.optional.push(I)):(I[U("",P)]=C.ideal,$.optional.push(I))}C.exact!==void 0&&typeof C.exact!="number"?($.mandatory=$.mandatory||{},$.mandatory[U("",P)]=C.exact):["min","max"].forEach(function(V){C[V]!==void 0&&($.mandatory=$.mandatory||{},$.mandatory[U(V,P)]=C[V])})}}),m.advanced&&($.optional=($.optional||[]).concat(m.advanced)),$},d=function(m,$){if(i.version>=61)return $(m);if(m=JSON.parse(JSON.stringify(m)),m&&ie(m.audio)==="object"){var P=function(A,D,X){D in A&&!(X in A)&&(A[X]=A[D],delete A[D])};m=JSON.parse(JSON.stringify(m)),P(m.audio,"autoGainControl","googAutoGainControl"),P(m.audio,"noiseSuppression","googNoiseSuppression"),m.audio=u(m.audio)}if(m&&ie(m.video)==="object"){var C=m.video.facingMode;C=C&&(ie(C)==="object"?C:{ideal:C});var U=i.version<66;if(C&&(C.exact==="user"||C.exact==="environment"||C.ideal==="user"||C.ideal==="environment")&&!(o.mediaDevices.getSupportedConstraints&&o.mediaDevices.getSupportedConstraints().facingMode&&!U)){delete m.video.facingMode;var I;if(C.exact==="environment"||C.ideal==="environment"?I=["back","rear"]:(C.exact==="user"||C.ideal==="user")&&(I=["front"]),I)return o.mediaDevices.enumerateDevices().then(function(V){V=V.filter(function(D){return D.kind==="videoinput"});var A=V.find(function(D){return I.some(function(X){return D.label.toLowerCase().includes(X)})});return!A&&V.length&&I.includes("back")&&(A=V[V.length-1]),A&&(m.video.deviceId=C.exact?{exact:A.deviceId}:{ideal:A.deviceId}),m.video=u(m.video),sr("chrome: "+JSON.stringify(m)),$(m)})}m.video=u(m.video)}return sr("chrome: "+JSON.stringify(m)),$(m)},p=function(m){return i.version>=64?m:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[m.name]||m.name,message:m.message,constraint:m.constraint||m.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},g=function(m,$,P){d(m,function(C){o.webkitGetUserMedia(C,$,function(U){P&&P(p(U))})})};if(o.getUserMedia=g.bind(o),o.mediaDevices.getUserMedia){var w=o.mediaDevices.getUserMedia.bind(o.mediaDevices);o.mediaDevices.getUserMedia=function(_){return d(_,function(m){return w(m).then(function($){if(m.audio&&!$.getAudioTracks().length||m.video&&!$.getVideoTracks().length)throw $.getTracks().forEach(function(P){P.stop()}),new DOMException("","NotFoundError");return $},function($){return Promise.reject(p($))})})}}}}var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});var no=Mr.shimGetUserMedia=oo,ao=io(J);function Ar(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,o=new WeakMap;return(Ar=function(d){return d?o:i})(r)}function io(r,i){if(r&&r.__esModule)return r;if(r===null||me(r)!=="object"&&typeof r!="function")return{default:r};var o=Ar(i);if(o&&o.has(r))return o.get(r);var u={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var g=d?Object.getOwnPropertyDescriptor(r,p):null;g&&(g.get||g.set)?Object.defineProperty(u,p,g):u[p]=r[p]}return u.default=r,o&&o.set(r,u),u}function me(r){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},me(r)}function oo(r,i){var o=r&&r.navigator,u=r&&r.MediaStreamTrack;if(o.getUserMedia=function(_,m,$){ao.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),o.mediaDevices.getUserMedia(_).then(m,$)},!(i.version>55&&"autoGainControl"in o.mediaDevices.getSupportedConstraints())){var d=function(m,$,P){$ in m&&!(P in m)&&(m[P]=m[$],delete m[$])},p=o.mediaDevices.getUserMedia.bind(o.mediaDevices);if(o.mediaDevices.getUserMedia=function(_){return me(_)==="object"&&me(_.audio)==="object"&&(_=JSON.parse(JSON.stringify(_)),d(_.audio,"autoGainControl","mozAutoGainControl"),d(_.audio,"noiseSuppression","mozNoiseSuppression")),p(_)},u&&u.prototype.getSettings){var g=u.prototype.getSettings;u.prototype.getSettings=function(){var _=g.apply(this,arguments);return d(_,"mozAutoGainControl","autoGainControl"),d(_,"mozNoiseSuppression","noiseSuppression"),_}}if(u&&u.prototype.applyConstraints){var w=u.prototype.applyConstraints;u.prototype.applyConstraints=function(_){return this.kind==="audio"&&me(_)==="object"&&(_=JSON.parse(JSON.stringify(_)),d(_,"autoGainControl","mozAutoGainControl"),d(_,"noiseSuppression","mozNoiseSuppression")),w.apply(this,[_])}}}}var te={};Object.defineProperty(te,"__esModule",{value:!0});te.shimAudioContext=yo;te.shimCallbacksAPI=fo;te.shimConstraints=xr;te.shimCreateOfferLegacy=vo;var so=te.shimGetUserMedia=po;te.shimLocalStreamsAPI=co;te.shimRTCIceServerUrls=ho;te.shimRemoteStreamsAPI=lo;te.shimTrackEventTransceiver=mo;var Dr=uo(J);function Rr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,o=new WeakMap;return(Rr=function(d){return d?o:i})(r)}function uo(r,i){if(r&&r.__esModule)return r;if(r===null||se(r)!=="object"&&typeof r!="function")return{default:r};var o=Rr(i);if(o&&o.has(r))return o.get(r);var u={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var g=d?Object.getOwnPropertyDescriptor(r,p):null;g&&(g.get||g.set)?Object.defineProperty(u,p,g):u[p]=r[p]}return u.default=r,o&&o.set(r,u),u}function se(r){"@babel/helpers - typeof";return se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},se(r)}function co(r){if(!(se(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var i=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(u){var d=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(u)||this._localStreams.push(u),u.getAudioTracks().forEach(function(p){return i.call(d,p,u)}),u.getVideoTracks().forEach(function(p){return i.call(d,p,u)})},r.RTCPeerConnection.prototype.addTrack=function(u){for(var d=this,p=arguments.length,g=new Array(p>1?p-1:0),w=1;w=0)){u._remoteStreams.push(p);var g=new Event("addstream");g.stream=p,u.dispatchEvent(g)}})}),i.apply(u,arguments)}}}function fo(r){if(!(se(r)!=="object"||!r.RTCPeerConnection)){var i=r.RTCPeerConnection.prototype,o=i.createOffer,u=i.createAnswer,d=i.setLocalDescription,p=i.setRemoteDescription,g=i.addIceCandidate;i.createOffer=function(m,$){var P=arguments.length>=2?arguments[2]:arguments[0],C=o.apply(this,[P]);return $?(C.then(m,$),Promise.resolve()):C},i.createAnswer=function(m,$){var P=arguments.length>=2?arguments[2]:arguments[0],C=u.apply(this,[P]);return $?(C.then(m,$),Promise.resolve()):C};var w=function(m,$,P){var C=d.apply(this,[m]);return P?(C.then($,P),Promise.resolve()):C};i.setLocalDescription=w,w=function(m,$,P){var C=p.apply(this,[m]);return P?(C.then($,P),Promise.resolve()):C},i.setRemoteDescription=w,w=function(m,$,P){var C=g.apply(this,[m]);return P?(C.then($,P),Promise.resolve()):C},i.addIceCandidate=w}}function po(r){var i=r&&r.navigator;if(i.mediaDevices&&i.mediaDevices.getUserMedia){var o=i.mediaDevices,u=o.getUserMedia.bind(o);i.mediaDevices.getUserMedia=function(d){return u(xr(d))}}!i.getUserMedia&&i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=(function(p,g,w){i.mediaDevices.getUserMedia(p).then(g,w)}).bind(i))}function xr(r){return r&&r.video!==void 0?Object.assign({},r,{video:Dr.compactObject(r.video)}):r}function ho(r){if(r.RTCPeerConnection){var i=r.RTCPeerConnection;r.RTCPeerConnection=function(u,d){if(u&&u.iceServers){for(var p=[],g=0;g{let i=!1,o;return(...u)=>(i||(o=r(u),i=!0),o)};function To(r,i){if(r===!1)throw new Error(i??"assertion failure")}function ur(r){throw new Error("this code should be unreachable")}const wo=go(()=>{const r=Bi(window);switch(r.browser){case"chrome":Zi(window,r);break;case"firefox":no(window,r);break;case"safari":so(window,r);break;default:throw new _r}});let ve=Promise.resolve({type:"stop",data:{}});async function cr(r,i,o){var w,_;if(console.debug("[vue-qrcode-reader] starting camera with constraints: ",JSON.stringify(i)),window.isSecureContext!==!0)throw new Wi;if(((w=navigator==null?void 0:navigator.mediaDevices)==null?void 0:w.getUserMedia)===void 0)throw new _r;wo(),console.debug("[vue-qrcode-reader] calling getUserMedia");const u=await navigator.mediaDevices.getUserMedia({audio:!1,video:i});r.srcObject!==void 0?r.srcObject=u:r.mozSrcObject!==void 0?r.mozSrcObject=u:window.URL.createObjectURL?r.src=window.URL.createObjectURL(u):window.webkitURL?r.src=window.webkitURL.createObjectURL(u):r.src=u.id,r.play(),console.debug("[vue-qrcode-reader] waiting for video element to load"),await Promise.race([ht(r,"loadeddata"),ir(6e3).then(()=>{throw new Li})]),console.debug("[vue-qrcode-reader] video element loaded"),await ir(500);const[d]=u.getVideoTracks(),p=((_=d==null?void 0:d.getCapabilities)==null?void 0:_.call(d))??{};let g=!1;return o&&p.torch&&(await d.applyConstraints({advanced:[{torch:!0}]}),g=!0),console.debug("[vue-qrcode-reader] camera ready"),{type:"start",data:{videoEl:r,stream:u,capabilities:p,constraints:i,isTorchOn:g}}}async function Eo(r,{constraints:i,torch:o,restart:u=!1}){ve=ve.then(p=>{if(p.type==="start"){const{data:{videoEl:g,stream:w,constraints:_,isTorchOn:m}}=p;return!u&&r===g&&i===_&&o===m?p:Ir(g,w,m).then(()=>cr(r,i,o))}else if(p.type==="stop"||p.type==="failed")return cr(r,i,o);ur()}).catch(p=>(console.debug(`[vue-qrcode-reader] starting camera failed with "${p}"`),{type:"failed",error:p}));const d=await ve;if(d.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");if(d.type==="failed")throw d.error;if(d.type==="start")return d.data.capabilities;ur()}async function Ir(r,i,o){console.debug("[vue-qrcode-reader] stopping camera"),r.src="",r.srcObject=null,r.load(),await ht(r,"error");for(const u of i.getTracks())o??await u.applyConstraints({advanced:[{torch:!1}]}),i.removeTrack(u),u.stop();return{type:"stop",data:{}}}async function Oo(){if(ve=ve.then(i=>{if(i.type==="stop"||i.type==="failed")return i;const{data:{videoEl:o,stream:u,isTorchOn:d}}=i;return Ir(o,u,d)}),(await ve).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}export{Co as _,Po as a,To as b,Eo as c,$o as d,_o as k,So as p,Oo as s}; +import{d as ri,h as ni,j as ai,a9 as ii,o as oi,b as si,J as ui}from"./framework.BtL3uYYi.js";const $o=ri({__name:"DemoWrapper",props:{component:Object},setup(r){const i=r,o=ni();return ai(()=>{i.component&&(o.value=ii(i.component))}),(u,d)=>(oi(),si(ui(o.value)))}});var lr=(r,i,o)=>{if(!i.has(r))throw TypeError("Cannot "+o)},er=(r,i,o)=>(lr(r,i,"read from private field"),o?o.call(r):i.get(r)),ci=(r,i,o)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,o)},li=(r,i,o,u)=>(lr(r,i,"write to private field"),i.set(r,o),o);const dr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],di=[...dr,["unknown"]].map(r=>r[0]),Be=new Map(dr);function fi(r){for(const[i,o]of Be)if(r===o)return i;return"unknown"}function pi(r){if(fr(r))return{width:r.naturalWidth,height:r.naturalHeight};if(pr(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(hr(r))return{width:r.videoWidth,height:r.videoHeight};if(vr(r))return{width:r.width,height:r.height};if(gr(r))return{width:r.displayWidth,height:r.displayHeight};if(mr(r))return{width:r.width,height:r.height};if(yr(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function fr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function pr(r){try{return r instanceof SVGImageElement}catch{return!1}}function hr(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function mr(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function vr(r){try{return r instanceof ImageBitmap}catch{return!1}}function yr(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function gr(r){try{return r instanceof VideoFrame}catch{return!1}}function wr(r){try{return r instanceof Blob}catch{return!1}}function hi(r){try{return r instanceof ImageData}catch{return!1}}function mi(r,i){try{const o=new OffscreenCanvas(r,i);if(o.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return o;throw void 0}catch{const o=document.createElement("canvas");return o.width=r,o.height=i,o}}async function br(r){if(fr(r)&&!await wi(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(pr(r)&&!await bi(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(gr(r)&&Ci(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(hr(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(vr(r)&&_i(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:o}=pi(r);if(i===0||o===0)return null;const u=mi(i,o).getContext("2d");u.drawImage(r,0,0);try{return u.getImageData(0,0,i,o)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function vi(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let o="";try{o=URL.createObjectURL(r),i.src=o,await i.decode()}finally{URL.revokeObjectURL(o)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await br(i)}function yi(r){const{width:i,height:o}=r;if(i===0||o===0)return null;const u=r.getContext("2d");try{return u.getImageData(0,0,i,o)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function gi(r){if(wr(r))return await vi(r);if(hi(r)){if($i(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return mr(r)||yr(r)?yi(r):await br(r)}async function wi(r){try{return await r.decode(),!0}catch{return!1}}async function bi(r){var i;try{return await((i=r.decode)==null?void 0:i.call(r)),!0}catch{return!1}}function Ci(r){return r.format===null}function $i(r){return r.data.buffer.byteLength===0}function _i(r){return r.width===0&&r.height===0}function tr(r,i){return r instanceof DOMException?new DOMException(`${i}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${i}: ${r.message}`):new Error(`${i}: ${r}`)}const rr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Si(r){return r.join("|")}function Pi(r){const i=nr(r);let o=0,u=rr.length-1;for(;o<=u;){const d=Math.floor((o+u)/2),p=rr[d],g=nr(p);if(g===i)return p;g{const o=r.match(/_(.+?)\.wasm$/);return o?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${o[1]}/${r}`:i+r}};let ar=new WeakMap;function ft(r,i){var o;const u=ar.get(r);if(u!=null&&u.modulePromise&&i===void 0)return u.modulePromise;const d=(o=u==null?void 0:u.moduleOverrides)!=null?o:Ri,p=r({...d});return ar.set(r,{moduleOverrides:d,modulePromise:p}),p}async function xi(r,i,o=ye){const u={...ye,...o},d=await ft(r),{size:p}=i,g=new Uint8Array(await i.arrayBuffer()),w=d._malloc(p);d.HEAPU8.set(g,w);const _=d.readBarcodesFromImage(w,p,Cr(d,u));d._free(w);const m=[];for(let $=0;$<_.size();++$)m.push($r(_.get($)));return m}async function Ii(r,i,o=ye){const u={...ye,...o},d=await ft(r),{data:p,width:g,height:w,data:{byteLength:_}}=i,m=d._malloc(_);d.HEAPU8.set(p,m);const $=d.readBarcodesFromPixmap(m,g,w,Cr(d,u));d._free(m);const P=[];for(let C=0;C<$.size();++C)P.push($r($.get(C)));return P}({...ye,formats:[...ye.formats]});var pt=(()=>{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(i={}){var o=i,u,d;o.ready=new Promise((e,t)=>{u=e,d=t});var p=Object.assign({},o),g="./this.program",w=typeof window=="object",_=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var m="";function $(e){return o.locateFile?o.locateFile(e,m):m+e}var P;(w||_)&&(_?m=self.location.href:typeof document<"u"&&document.currentScript&&(m=document.currentScript.src),r&&(m=r),m.indexOf("blob:")!==0?m=m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):m="",_&&(P=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),o.print||console.log.bind(console);var C=o.printErr||console.error.bind(console);Object.assign(o,p),p=null,o.arguments&&o.arguments,o.thisProgram&&(g=o.thisProgram),o.quit&&o.quit;var U;o.wasmBinary&&(U=o.wasmBinary),typeof WebAssembly!="object"&&Oe("no native wasm support detected");var I,V=!1,A,D,X,ge,Y,x,mt,vt;function yt(){var e=I.buffer;o.HEAP8=A=new Int8Array(e),o.HEAP16=X=new Int16Array(e),o.HEAPU8=D=new Uint8Array(e),o.HEAPU16=ge=new Uint16Array(e),o.HEAP32=Y=new Int32Array(e),o.HEAPU32=x=new Uint32Array(e),o.HEAPF32=mt=new Float32Array(e),o.HEAPF64=vt=new Float64Array(e)}var gt=[],wt=[],bt=[];function Fr(){if(o.preRun)for(typeof o.preRun=="function"&&(o.preRun=[o.preRun]);o.preRun.length;)jr(o.preRun.shift());Ne(gt)}function kr(){Ne(wt)}function Ur(){if(o.postRun)for(typeof o.postRun=="function"&&(o.postRun=[o.postRun]);o.postRun.length;)Lr(o.postRun.shift());Ne(bt)}function jr(e){gt.unshift(e)}function Wr(e){wt.unshift(e)}function Lr(e){bt.unshift(e)}var ue=0,we=null;function Hr(e){var t;ue++,(t=o.monitorRunDependencies)===null||t===void 0||t.call(o,ue)}function Br(e){var t;if(ue--,(t=o.monitorRunDependencies)===null||t===void 0||t.call(o,ue),ue==0&&we){var n=we;we=null,n()}}function Oe(e){var t;(t=o.onAbort)===null||t===void 0||t.call(o,e),e="Aborted("+e+")",C(e),V=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw d(n),n}var Vr="data:application/octet-stream;base64,",Ct=e=>e.startsWith(Vr),de;de="zxing_reader.wasm",Ct(de)||(de=$(de));function $t(e){if(e==de&&U)return new Uint8Array(U);if(P)return P(e);throw"both async and sync fetching of the wasm failed"}function qr(e){return!U&&(w||_)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>$t(e)):Promise.resolve().then(()=>$t(e))}function _t(e,t,n){return qr(e).then(a=>WebAssembly.instantiate(a,t)).then(a=>a).then(n,a=>{C(`failed to asynchronously prepare wasm: ${a}`),Oe(a)})}function Gr(e,t,n,a){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Ct(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var c=WebAssembly.instantiateStreaming(s,n);return c.then(a,function(l){return C(`wasm streaming compile failed: ${l}`),C("falling back to ArrayBuffer instantiation"),_t(t,n,a)})}):_t(t,n,a)}function Nr(){var e={a:Ia};function t(a,s){return q=a.exports,I=q.ia,yt(),xt=q.ma,Wr(q.ja),Br(),q}Hr();function n(a){t(a.instance)}if(o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(a){C(`Module.instantiateWasm callback failed with error: ${a}`),d(a)}return Gr(U,de,e,n).catch(d),{}}var Ne=e=>{for(;e.length>0;)e.shift()(o)};o.noExitRuntime;var Me=[],Ae=0,zr=e=>{var t=new ze(e);return t.get_caught()||(t.set_caught(!0),Ae--),t.set_rethrown(!1),Me.push(t),zt(t.excPtr),t.get_exception_ptr()},re=0,Yr=()=>{F(0,0);var e=Me.pop();Nt(e.excPtr),re=0};function ze(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){x[this.ptr+4>>2]=t},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(t){x[this.ptr+8>>2]=t},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,A[this.ptr+12>>0]=t},this.get_caught=function(){return A[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,A[this.ptr+13>>0]=t},this.get_rethrown=function(){return A[this.ptr+13>>0]!=0},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n)},this.set_adjusted_ptr=function(t){x[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=Jt(this.get_type());if(t)return x[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}var Jr=e=>{throw re||(re=e),re},Ye=e=>{var t=re;if(!t)return Te(0),0;var n=new ze(t);n.set_adjusted_ptr(t);var a=n.get_type();if(!a)return Te(0),t;for(var s in e){var c=e[s];if(c===0||c===a)break;var l=n.ptr+16;if(Yt(c,a,l))return Te(c),t}return Te(a),t},Qr=()=>Ye([]),Xr=e=>Ye([e]),Kr=(e,t)=>Ye([e,t]),Zr=()=>{var e=Me.pop();e||Oe("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Me.push(e),e.set_rethrown(!0),e.set_caught(!1),Ae++),re=t,re},en=(e,t,n)=>{var a=new ze(e);throw a.init(t,n),re=e,Ae++,re},tn=()=>Ae,De={},Je=e=>{for(;e.length;){var t=e.pop(),n=e.pop();n(t)}};function Qe(e){return this.fromWireType(Y[e>>2])}var fe={},ce={},Re={},St,xe=e=>{throw new St(e)},le=(e,t,n)=>{e.forEach(function(f){Re[f]=t});function a(f){var h=n(f);h.length!==e.length&&xe("Mismatched type converter count");for(var y=0;y{ce.hasOwnProperty(f)?s[h]=ce[f]:(c.push(f),fe.hasOwnProperty(f)||(fe[f]=[]),fe[f].push(()=>{s[h]=ce[f],++l,l===c.length&&a(s)}))}),c.length===0&&a(s)},rn=e=>{var t=De[e];delete De[e];var n=t.rawConstructor,a=t.rawDestructor,s=t.fields,c=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));le([e],c,l=>{var f={};return s.forEach((h,y)=>{var b=h.fieldName,T=l[y],E=h.getter,O=h.getterContext,k=l[y+s.length],H=h.setter,R=h.setterContext;f[b]={read:z=>T.fromWireType(E(O,z)),write:(z,v)=>{var S=[];H(R,z,k.toWireType(S,v)),Je(S)}}}),[{name:t.name,fromWireType:h=>{var y={};for(var b in f)y[b]=f[b].read(h);return a(h),y},toWireType:(h,y)=>{for(var b in f)if(!(b in y))throw new TypeError(`Missing field: "${b}"`);var T=n();for(b in f)f[b].write(T,y[b]);return h!==null&&h.push(a,T),T},argPackAdvance:ee,readValueFromPointer:Qe,destructorFunction:a}]})},nn=(e,t,n,a,s)=>{},an=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Pt=e},Pt,N=e=>{for(var t="",n=e;D[n];)t+=Pt[D[n++]];return t},pe,M=e=>{throw new pe(e)};function on(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var a=t.name;if(e||M(`type "${a}" must have a positive integer typeid pointer`),ce.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;M(`Cannot register type '${a}' twice`)}if(ce[e]=t,delete Re[e],fe.hasOwnProperty(e)){var s=fe[e];delete fe[e],s.forEach(c=>c())}}function Z(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return on(e,t,n)}var ee=8,sn=(e,t,n,a)=>{t=N(t),Z(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,c){return c?n:a},argPackAdvance:ee,readValueFromPointer:function(s){return this.fromWireType(D[s])},destructorFunction:null})},un=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Xe=e=>{function t(n){return n.$$.ptrType.registeredClass.name}M(t(e)+" instance already deleted")},Ke=!1,Tt=e=>{},cn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Et=e=>{e.count.value-=1;var t=e.count.value===0;t&&cn(e)},Ot=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var a=Ot(e,t,n.baseClass);return a===null?null:n.downcast(a)},Mt={},ln=()=>Object.keys($e).length,dn=()=>{var e=[];for(var t in $e)$e.hasOwnProperty(t)&&e.push($e[t]);return e},be=[],Ze=()=>{for(;be.length;){var e=be.pop();e.$$.deleteScheduled=!1,e.delete()}},Ce,fn=e=>{Ce=e,be.length&&Ce&&Ce(Ze)},pn=()=>{o.getInheritedInstanceCount=ln,o.getLiveInheritedInstances=dn,o.flushPendingDeletes=Ze,o.setDelayFunction=fn},$e={},hn=(e,t)=>{for(t===void 0&&M("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},mn=(e,t)=>(t=hn(e,t),$e[t]),Ie=(e,t)=>{(!t.ptrType||!t.ptr)&&xe("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,a=!!t.smartPtr;return n!==a&&xe("Both smartPtrType and smartPtr must be specified"),t.count={value:1},_e(Object.create(e,{$$:{value:t,writable:!0}}))};function vn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=mn(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var a=n.clone();return this.destructor(e),a}function s(){return this.isSmartPointer?Ie(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ie(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var c=this.registeredClass.getActualType(t),l=Mt[c];if(!l)return s.call(this);var f;this.isConst?f=l.constPointerType:f=l.pointerType;var h=Ot(t,this.registeredClass,f.registeredClass);return h===null?s.call(this):this.isSmartPointer?Ie(f.registeredClass.instancePrototype,{ptrType:f,ptr:h,smartPtrType:this,smartPtr:e}):Ie(f.registeredClass.instancePrototype,{ptrType:f,ptr:h})}var _e=e=>typeof FinalizationRegistry>"u"?(_e=t=>t,e):(Ke=new FinalizationRegistry(t=>{Et(t.$$)}),_e=t=>{var n=t.$$,a=!!n.smartPtr;if(a){var s={$$:n};Ke.register(t,s,t)}return t},Tt=t=>Ke.unregister(t),_e(e)),yn=()=>{Object.assign(Fe.prototype,{isAliasOf(e){if(!(this instanceof Fe)||!(e instanceof Fe))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var a=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;a.baseClass;)s=a.upcast(s),a=a.baseClass;return t===a&&n===s},clone(){if(this.$$.ptr||Xe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=_e(Object.create(Object.getPrototypeOf(this),{$$:{value:un(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Xe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&M("Object already scheduled for deletion"),Tt(this),Et(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Xe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&M("Object already scheduled for deletion"),be.push(this),be.length===1&&Ce&&Ce(Ze),this.$$.deleteScheduled=!0,this}})};function Fe(){}var Se=(e,t)=>Object.defineProperty(t,"name",{value:e}),At=(e,t,n)=>{if(e[t].overloadTable===void 0){var a=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||M(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[a.argCount]=a}},et=(e,t,n)=>{o.hasOwnProperty(e)?((n===void 0||o[e].overloadTable!==void 0&&o[e].overloadTable[n]!==void 0)&&M(`Cannot register public name '${e}' twice`),At(o,e,e),o.hasOwnProperty(n)&&M(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),o[e].overloadTable[n]=t):(o[e]=t,n!==void 0&&(o[e].numArguments=n))},gn=48,wn=57,bn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=gn&&t<=wn?`_${e}`:e};function Cn(e,t,n,a,s,c,l,f){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=a,this.baseClass=s,this.getActualType=c,this.upcast=l,this.downcast=f,this.pureVirtualFunctions=[]}var tt=(e,t,n)=>{for(;t!==n;)t.upcast||M(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function $n(e,t){if(t===null)return this.isReference&&M(`null is not a valid ${this.name}`),0;t.$$||M(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||M(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass,a=tt(t.$$.ptr,n,this.registeredClass);return a}function _n(e,t){var n;if(t===null)return this.isReference&&M(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&M(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||M(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&M(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var a=t.$$.ptrType.registeredClass;if(n=tt(t.$$.ptr,a,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&M("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:M(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var s=t.clone();n=this.rawShare(n,ne.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:M("Unsupporting sharing policy")}return n}function Sn(e,t){if(t===null)return this.isReference&&M(`null is not a valid ${this.name}`),0;t.$$||M(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||M(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&M(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass,a=tt(t.$$.ptr,n,this.registeredClass);return a}function Dt(e){return this.fromWireType(x[e>>2])}var Pn=()=>{Object.assign(ke.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:ee,readValueFromPointer:Dt,deleteObject(e){e!==null&&e.delete()},fromWireType:vn})};function ke(e,t,n,a,s,c,l,f,h,y,b){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=a,this.isSmartPointer=s,this.pointeeType=c,this.sharingPolicy=l,this.rawGetPointee=f,this.rawConstructor=h,this.rawShare=y,this.rawDestructor=b,!s&&t.baseClass===void 0?a?(this.toWireType=$n,this.destructorFunction=null):(this.toWireType=Sn,this.destructorFunction=null):this.toWireType=_n}var Rt=(e,t,n)=>{o.hasOwnProperty(e)||xe("Replacing nonexistant public symbol"),o[e].overloadTable!==void 0&&n!==void 0?o[e].overloadTable[n]=t:(o[e]=t,o[e].argCount=n)},Tn=(e,t,n)=>{var a=o["dynCall_"+e];return n&&n.length?a.apply(null,[t].concat(n)):a.call(null,t)},Ue=[],xt,j=e=>{var t=Ue[e];return t||(e>=Ue.length&&(Ue.length=e+1),Ue[e]=t=xt.get(e)),t},En=(e,t,n)=>{if(e.includes("j"))return Tn(e,t,n);var a=j(t).apply(null,n);return a},On=(e,t)=>{var n=[];return function(){return n.length=0,Object.assign(n,arguments),En(e,t,n)}},K=(e,t)=>{e=N(e);function n(){return e.includes("j")?On(e,t):j(t)}var a=n();return typeof a!="function"&&M(`unknown function pointer with signature ${e}: ${t}`),a},Mn=(e,t)=>{var n=Se(t,function(a){this.name=t,this.message=a;var s=new Error(a).stack;s!==void 0&&(this.stack=this.toString()+` +`+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},It,Ft=e=>{var t=Gt(e),n=N(t);return ae(t),n},je=(e,t)=>{var n=[],a={};function s(c){if(!a[c]&&!ce[c]){if(Re[c]){Re[c].forEach(s);return}n.push(c),a[c]=!0}}throw t.forEach(s),new It(`${e}: `+n.map(Ft).join([", "]))},An=(e,t,n,a,s,c,l,f,h,y,b,T,E)=>{b=N(b),c=K(s,c),f&&(f=K(l,f)),y&&(y=K(h,y)),E=K(T,E);var O=bn(b);et(O,function(){je(`Cannot construct ${b} due to unbound types`,[a])}),le([e,t,n],a?[a]:[],function(k){k=k[0];var H,R;a?(H=k.registeredClass,R=H.instancePrototype):R=Fe.prototype;var z=Se(b,function(){if(Object.getPrototypeOf(this)!==v)throw new pe("Use 'new' to construct "+b);if(S.constructor_body===void 0)throw new pe(b+" has no accessible constructor");var Zt=S.constructor_body[arguments.length];if(Zt===void 0)throw new pe(`Tried to invoke ctor of ${b} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(S.constructor_body).toString()}) parameters instead!`);return Zt.apply(this,arguments)}),v=Object.create(R,{constructor:{value:z}});z.prototype=v;var S=new Cn(b,z,v,E,H,c,f,y);if(S.baseClass){var B,G;(G=(B=S.baseClass).__derivedClasses)!==null&&G!==void 0||(B.__derivedClasses=[]),S.baseClass.__derivedClasses.push(S)}var he=new ke(b,S,!0,!1,!1),He=new ke(b+"*",S,!1,!1,!1),Kt=new ke(b+" const*",S,!1,!0,!1);return Mt[e]={pointerType:He,constPointerType:Kt},Rt(O,z),[he,He,Kt]})},rt=(e,t)=>{for(var n=[],a=0;a>2]);return n};function Dn(e){for(var t=1;t{var l=rt(t,n);s=K(a,s),le([],[e],function(f){f=f[0];var h=`constructor ${f.name}`;if(f.registeredClass.constructor_body===void 0&&(f.registeredClass.constructor_body=[]),f.registeredClass.constructor_body[t-1]!==void 0)throw new pe(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${f.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return f.registeredClass.constructor_body[t-1]=()=>{je(`Cannot construct ${f.name} due to unbound types`,l)},le([],l,y=>(y.splice(1,0,null),f.registeredClass.constructor_body[t-1]=nt(h,y,null,s,c),[])),[]})},kt=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},xn=(e,t,n,a,s,c,l,f,h)=>{var y=rt(n,a);t=N(t),t=kt(t),c=K(s,c),le([],[e],function(b){b=b[0];var T=`${b.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),f&&b.registeredClass.pureVirtualFunctions.push(t);function E(){je(`Cannot call ${T} due to unbound types`,y)}var O=b.registeredClass.instancePrototype,k=O[t];return k===void 0||k.overloadTable===void 0&&k.className!==b.name&&k.argCount===n-2?(E.argCount=n-2,E.className=b.name,O[t]=E):(At(O,t,T),O[t].overloadTable[n-2]=E),le([],y,function(H){var R=nt(T,H,b,c,l);return O[t].overloadTable===void 0?(R.argCount=n-2,O[t]=R):O[t].overloadTable[n-2]=R,[]}),[]})};function In(){Object.assign(Ut.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Ut(){this.allocated=[void 0],this.freelist=[]}var Q=new Ut,at=e=>{e>=Q.reserved&&--Q.get(e).refcount===0&&Q.free(e)},Fn=()=>{for(var e=0,t=Q.reserved;t{Q.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Q.reserved=Q.allocated.length,o.count_emval_handles=Fn},ne={toValue:e=>(e||M("Cannot use deleted val. handle = "+e),Q.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Q.allocate({refcount:1,value:e})}}},Un=(e,t)=>{t=N(t),Z(e,{name:t,fromWireType:n=>{var a=ne.toValue(n);return at(n),a},toWireType:(n,a)=>ne.toHandle(a),argPackAdvance:ee,readValueFromPointer:Qe,destructorFunction:null})},jn=(e,t,n)=>{switch(t){case 1:return n?function(a){return this.fromWireType(A[a>>0])}:function(a){return this.fromWireType(D[a>>0])};case 2:return n?function(a){return this.fromWireType(X[a>>1])}:function(a){return this.fromWireType(ge[a>>1])};case 4:return n?function(a){return this.fromWireType(Y[a>>2])}:function(a){return this.fromWireType(x[a>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Wn=(e,t,n,a)=>{t=N(t);function s(){}s.values={},Z(e,{name:t,constructor:s,fromWireType:function(c){return this.constructor.values[c]},toWireType:(c,l)=>l.value,argPackAdvance:ee,readValueFromPointer:jn(t,n,a),destructorFunction:null}),et(t,s)},it=(e,t)=>{var n=ce[e];return n===void 0&&M(t+" has unknown type "+Ft(e)),n},Ln=(e,t,n)=>{var a=it(e,"enum");t=N(t);var s=a.constructor,c=Object.create(a.constructor.prototype,{value:{value:n},constructor:{value:Se(`${a.name}_${t}`,function(){})}});s.values[n]=c,s[t]=c},ot=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},Hn=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(mt[n>>2])};case 8:return function(n){return this.fromWireType(vt[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Bn=(e,t,n)=>{t=N(t),Z(e,{name:t,fromWireType:a=>a,toWireType:(a,s)=>s,argPackAdvance:ee,readValueFromPointer:Hn(t,n),destructorFunction:null})},Vn=(e,t,n,a,s,c,l)=>{var f=rt(t,n);e=N(e),e=kt(e),s=K(a,s),et(e,function(){je(`Cannot call ${e} due to unbound types`,f)},t-1),le([],f,function(h){var y=[h[0],null].concat(h.slice(1));return Rt(e,nt(e,y,null,s,c),t-1),[]})},qn=(e,t,n)=>{switch(t){case 1:return n?a=>A[a>>0]:a=>D[a>>0];case 2:return n?a=>X[a>>1]:a=>ge[a>>1];case 4:return n?a=>Y[a>>2]:a=>x[a>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Gn=(e,t,n,a,s)=>{t=N(t);var c=b=>b;if(a===0){var l=32-8*n;c=b=>b<>>l}var f=t.includes("unsigned"),h=(b,T)=>{},y;f?y=function(b,T){return h(T,this.name),T>>>0}:y=function(b,T){return h(T,this.name),T},Z(e,{name:t,fromWireType:c,toWireType:y,argPackAdvance:ee,readValueFromPointer:qn(t,n,a!==0),destructorFunction:null})},Nn=(e,t,n)=>{var a=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=a[t];function c(l){var f=x[l>>2],h=x[l+4>>2];return new s(A.buffer,h,f)}n=N(n),Z(e,{name:n,fromWireType:c,argPackAdvance:ee,readValueFromPointer:c},{ignoreDuplicateRegistrations:!0})},jt=(e,t,n,a)=>{if(!(a>0))return 0;for(var s=n,c=n+a-1,l=0;l=55296&&f<=57343){var h=e.charCodeAt(++l);f=65536+((f&1023)<<10)|h&1023}if(f<=127){if(n>=c)break;t[n++]=f}else if(f<=2047){if(n+1>=c)break;t[n++]=192|f>>6,t[n++]=128|f&63}else if(f<=65535){if(n+2>=c)break;t[n++]=224|f>>12,t[n++]=128|f>>6&63,t[n++]=128|f&63}else{if(n+3>=c)break;t[n++]=240|f>>18,t[n++]=128|f>>12&63,t[n++]=128|f>>6&63,t[n++]=128|f&63}}return t[n]=0,n-s},zn=(e,t,n)=>jt(e,D,t,n),Wt=e=>{for(var t=0,n=0;n=55296&&a<=57343?(t+=4,++n):t+=3}return t},Lt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Yn=(e,t,n)=>{for(var a=t+n,s=t;e[s]&&!(s>=a);)++s;if(s-t>16&&e.buffer&&Lt)return Lt.decode(e.subarray(t,s));for(var c="";t>10,56320|y&1023)}}return c},st=(e,t)=>e?Yn(D,e,t):"",Jn=(e,t)=>{t=N(t);var n=t==="std::string";Z(e,{name:t,fromWireType(a){var s=x[a>>2],c=a+4,l;if(n)for(var f=c,h=0;h<=s;++h){var y=c+h;if(h==s||D[y]==0){var b=y-f,T=st(f,b);l===void 0?l=T:(l+="\0",l+=T),f=y+1}}else{for(var E=new Array(s),h=0;h>2]=c,n&&l)zn(s,h,c+1);else if(l)for(var y=0;y255&&(ae(h),M("String has UTF-16 code units that do not fit in 8 bits")),D[h+y]=b}else for(var y=0;y{for(var n=e,a=n>>1,s=a+t/2;!(a>=s)&&ge[a];)++a;if(n=a<<1,n-e>32&&Ht)return Ht.decode(D.subarray(e,n));for(var c="",l=0;!(l>=t/2);++l){var f=X[e+l*2>>1];if(f==0)break;c+=String.fromCharCode(f)}return c},Xn=(e,t,n)=>{var a;if((a=n)!==null&&a!==void 0||(n=2147483647),n<2)return 0;n-=2;for(var s=t,c=n>1]=f,t+=2}return X[t>>1]=0,t-s},Kn=e=>e.length*2,Zn=(e,t)=>{for(var n=0,a="";!(n>=t/4);){var s=Y[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|c&1023)}else a+=String.fromCharCode(s)}return a},ea=(e,t,n)=>{var a;if((a=n)!==null&&a!==void 0||(n=2147483647),n<4)return 0;for(var s=t,c=s+n-4,l=0;l=55296&&f<=57343){var h=e.charCodeAt(++l);f=65536+((f&1023)<<10)|h&1023}if(Y[t>>2]=f,t+=4,t+4>c)break}return Y[t>>2]=0,t-s},ta=e=>{for(var t=0,n=0;n=55296&&a<=57343&&++n,t+=4}return t},ra=(e,t,n)=>{n=N(n);var a,s,c,l,f;t===2?(a=Qn,s=Xn,l=Kn,c=()=>ge,f=1):t===4&&(a=Zn,s=ea,l=ta,c=()=>x,f=2),Z(e,{name:n,fromWireType:h=>{for(var y=x[h>>2],b=c(),T,E=h+4,O=0;O<=y;++O){var k=h+4+O*t;if(O==y||b[k>>f]==0){var H=k-E,R=a(E,H);T===void 0?T=R:(T+="\0",T+=R),E=k+t}}return ae(h),T},toWireType:(h,y)=>{typeof y!="string"&&M(`Cannot pass non-string to C++ string type ${n}`);var b=l(y),T=lt(4+b+t);return x[T>>2]=b>>f,s(y,T+4,b+t),h!==null&&h.push(ae,T),T},argPackAdvance:ee,readValueFromPointer:Qe,destructorFunction(h){ae(h)}})},na=(e,t,n,a,s,c)=>{De[e]={name:N(t),rawConstructor:K(n,a),rawDestructor:K(s,c),fields:[]}},aa=(e,t,n,a,s,c,l,f,h,y)=>{De[e].fields.push({fieldName:N(t),getterReturnType:n,getter:K(a,s),getterContext:c,setterArgumentType:l,setter:K(f,h),setterContext:y})},ia=(e,t)=>{t=N(t),Z(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,a)=>{}})},ut=[],oa=(e,t,n,a)=>(e=ut[e],t=ne.toValue(t),e(null,t,n,a)),sa={},ua=e=>{var t=sa[e];return t===void 0?N(e):t},Bt=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},ca=e=>e===0?ne.toHandle(Bt()):(e=ua(e),ne.toHandle(Bt()[e])),la=e=>{var t=ut.length;return ut.push(e),t},da=(e,t)=>{for(var n=new Array(e),a=0;a>2],"parameter "+a);return n},fa=Reflect.construct,pa=(e,t,n)=>{var a=[],s=e.toWireType(a,n);return a.length&&(x[t>>2]=ne.toHandle(a)),s},ha=(e,t,n)=>{var a=da(e,t),s=a.shift();e--;var c=new Array(e),l=(h,y,b,T)=>{for(var E=0,O=0;Oh.name).join(", ")}) => ${s.name}>`;return la(Se(f,l))},ma=e=>{e>4&&(Q.get(e).refcount+=1)},va=e=>{var t=ne.toValue(e);Je(t),at(e)},ya=(e,t)=>{e=it(e,"_emval_take_value");var n=e.readValueFromPointer(t);return ne.toHandle(n)},ga=()=>{Oe("")},wa=(e,t,n)=>D.copyWithin(e,t,t+n),ba=()=>2147483648,Ca=e=>{var t=I.buffer,n=(e-t.byteLength+65535)/65536;try{return I.grow(n),yt(),1}catch{}},$a=e=>{var t=D.length;e>>>=0;var n=ba();if(e>n)return!1;for(var a=(h,y)=>h+(y-h%y)%y,s=1;s<=4;s*=2){var c=t*(1+.2/s);c=Math.min(c,e+100663296);var l=Math.min(n,a(Math.max(e,c),65536)),f=Ca(l);if(f)return!0}return!1},ct={},_a=()=>g||"./this.program",Pe=()=>{if(!Pe.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:_a()};for(var n in ct)ct[n]===void 0?delete t[n]:t[n]=ct[n];var a=[];for(var n in t)a.push(`${n}=${t[n]}`);Pe.strings=a}return Pe.strings},Sa=(e,t)=>{for(var n=0;n>0]=e.charCodeAt(n);A[t>>0]=0},Pa=(e,t)=>{var n=0;return Pe().forEach((a,s)=>{var c=t+n;x[e+s*4>>2]=c,Sa(a,c),n+=a.length+1}),0},Ta=(e,t)=>{var n=Pe();x[e>>2]=n.length;var a=0;return n.forEach(s=>a+=s.length+1),x[t>>2]=a,0},Ea=e=>e,We=e=>e%4===0&&(e%100!==0||e%400===0),Oa=(e,t)=>{for(var n=0,a=0;a<=t;n+=e[a++]);return n},Vt=[31,29,31,30,31,30,31,31,30,31,30,31],qt=[31,28,31,30,31,30,31,31,30,31,30,31],Ma=(e,t)=>{for(var n=new Date(e.getTime());t>0;){var a=We(n.getFullYear()),s=n.getMonth(),c=(a?Vt:qt)[s];if(t>c-n.getDate())t-=c-n.getDate()+1,n.setDate(1),s<11?n.setMonth(s+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+t),n}return n};function Aa(e,t,n){var a=Wt(e)+1,s=new Array(a);return jt(e,s,0,s.length),s}var Da=(e,t)=>{A.set(e,t)},Ra=(e,t,n,a)=>{var s=x[a+40>>2],c={tm_sec:Y[a>>2],tm_min:Y[a+4>>2],tm_hour:Y[a+8>>2],tm_mday:Y[a+12>>2],tm_mon:Y[a+16>>2],tm_year:Y[a+20>>2],tm_wday:Y[a+24>>2],tm_yday:Y[a+28>>2],tm_isdst:Y[a+32>>2],tm_gmtoff:Y[a+36>>2],tm_zone:s?st(s):""},l=st(n),f={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var h in f)l=l.replace(new RegExp(h,"g"),f[h]);var y=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b=["January","February","March","April","May","June","July","August","September","October","November","December"];function T(v,S,B){for(var G=typeof v=="number"?v.toString():v||"";G.length0?1:0}var G;return(G=B(v.getFullYear()-S.getFullYear()))===0&&(G=B(v.getMonth()-S.getMonth()))===0&&(G=B(v.getDate()-S.getDate())),G}function k(v){switch(v.getDay()){case 0:return new Date(v.getFullYear()-1,11,29);case 1:return v;case 2:return new Date(v.getFullYear(),0,3);case 3:return new Date(v.getFullYear(),0,2);case 4:return new Date(v.getFullYear(),0,1);case 5:return new Date(v.getFullYear()-1,11,31);case 6:return new Date(v.getFullYear()-1,11,30)}}function H(v){var S=Ma(new Date(v.tm_year+1900,0,1),v.tm_yday),B=new Date(S.getFullYear(),0,4),G=new Date(S.getFullYear()+1,0,4),he=k(B),He=k(G);return O(he,S)<=0?O(He,S)<=0?S.getFullYear()+1:S.getFullYear():S.getFullYear()-1}var R={"%a":v=>y[v.tm_wday].substring(0,3),"%A":v=>y[v.tm_wday],"%b":v=>b[v.tm_mon].substring(0,3),"%B":v=>b[v.tm_mon],"%C":v=>{var S=v.tm_year+1900;return E(S/100|0,2)},"%d":v=>E(v.tm_mday,2),"%e":v=>T(v.tm_mday,2," "),"%g":v=>H(v).toString().substring(2),"%G":v=>H(v),"%H":v=>E(v.tm_hour,2),"%I":v=>{var S=v.tm_hour;return S==0?S=12:S>12&&(S-=12),E(S,2)},"%j":v=>E(v.tm_mday+Oa(We(v.tm_year+1900)?Vt:qt,v.tm_mon-1),3),"%m":v=>E(v.tm_mon+1,2),"%M":v=>E(v.tm_min,2),"%n":()=>` +`,"%p":v=>v.tm_hour>=0&&v.tm_hour<12?"AM":"PM","%S":v=>E(v.tm_sec,2),"%t":()=>" ","%u":v=>v.tm_wday||7,"%U":v=>{var S=v.tm_yday+7-v.tm_wday;return E(Math.floor(S/7),2)},"%V":v=>{var S=Math.floor((v.tm_yday+7-(v.tm_wday+6)%7)/7);if((v.tm_wday+371-v.tm_yday-2)%7<=2&&S++,S){if(S==53){var B=(v.tm_wday+371-v.tm_yday)%7;B!=4&&(B!=3||!We(v.tm_year))&&(S=1)}}else{S=52;var G=(v.tm_wday+7-v.tm_yday-1)%7;(G==4||G==5&&We(v.tm_year%400-1))&&S++}return E(S,2)},"%w":v=>v.tm_wday,"%W":v=>{var S=v.tm_yday+7-(v.tm_wday+6)%7;return E(Math.floor(S/7),2)},"%y":v=>(v.tm_year+1900).toString().substring(2),"%Y":v=>v.tm_year+1900,"%z":v=>{var S=v.tm_gmtoff,B=S>=0;return S=Math.abs(S)/60,S=S/60*100+S%60,(B?"+":"-")+("0000"+S).slice(-4)},"%Z":v=>v.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var h in R)l.includes(h)&&(l=l.replace(new RegExp(h,"g"),R[h](c)));l=l.replace(/\0\0/g,"%");var z=Aa(l);return z.length>t?0:(Da(z,e),z.length-1)},xa=(e,t,n,a,s)=>Ra(e,t,n,a);St=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},an(),pe=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},yn(),pn(),Pn(),It=o.UnboundTypeError=Mn(Error,"UnboundTypeError"),In(),kn();var Ia={s:zr,u:Yr,b:Qr,g:Xr,q:Kr,J:Zr,f:en,V:tn,d:Jr,da:rn,Q:nn,_:sn,ca:An,ba:Rn,w:xn,Y:Un,x:Wn,h:Ln,L:Bn,M:Vn,t:Gn,o:Nn,K:Jn,C:ra,A:na,ea:aa,$:ia,R:oa,ha:at,fa:ca,Z:ha,N:ma,O:va,aa:ya,B:ga,X:wa,W:$a,T:Pa,U:Ta,E:Qa,D:Wa,F:Ja,n:Xa,a:Fa,e:Ha,m:ja,k:Va,H:za,v:Ga,G:Ya,z:Za,P:ti,l:Ba,j:La,c:Ua,p:ka,I:Na,r:Ka,i:qa,y:ei,ga:Ea,S:xa},q=Nr(),ae=o._free=e=>(ae=o._free=q.ka)(e),lt=o._malloc=e=>(lt=o._malloc=q.la)(e),Gt=e=>(Gt=q.na)(e),F=(e,t)=>(F=q.oa)(e,t),Te=e=>(Te=q.pa)(e),W=()=>(W=q.qa)(),L=e=>(L=q.ra)(e),Nt=e=>(Nt=q.sa)(e),zt=e=>(zt=q.ta)(e),Yt=(e,t,n)=>(Yt=q.ua)(e,t,n),Jt=e=>(Jt=q.va)(e);o.dynCall_viijii=(e,t,n,a,s,c,l)=>(o.dynCall_viijii=q.wa)(e,t,n,a,s,c,l);var Qt=o.dynCall_jiiii=(e,t,n,a,s)=>(Qt=o.dynCall_jiiii=q.xa)(e,t,n,a,s);o.dynCall_iiiiij=(e,t,n,a,s,c,l)=>(o.dynCall_iiiiij=q.ya)(e,t,n,a,s,c,l),o.dynCall_iiiiijj=(e,t,n,a,s,c,l,f,h)=>(o.dynCall_iiiiijj=q.za)(e,t,n,a,s,c,l,f,h),o.dynCall_iiiiiijj=(e,t,n,a,s,c,l,f,h,y)=>(o.dynCall_iiiiiijj=q.Aa)(e,t,n,a,s,c,l,f,h,y);function Fa(e,t){var n=W();try{return j(e)(t)}catch(a){if(L(n),a!==a+0)throw a;F(1,0)}}function ka(e,t,n,a){var s=W();try{j(e)(t,n,a)}catch(c){if(L(s),c!==c+0)throw c;F(1,0)}}function Ua(e,t,n){var a=W();try{j(e)(t,n)}catch(s){if(L(a),s!==s+0)throw s;F(1,0)}}function ja(e,t,n,a){var s=W();try{return j(e)(t,n,a)}catch(c){if(L(s),c!==c+0)throw c;F(1,0)}}function Wa(e,t,n,a,s){var c=W();try{return j(e)(t,n,a,s)}catch(l){if(L(c),l!==l+0)throw l;F(1,0)}}function La(e,t){var n=W();try{j(e)(t)}catch(a){if(L(n),a!==a+0)throw a;F(1,0)}}function Ha(e,t,n){var a=W();try{return j(e)(t,n)}catch(s){if(L(a),s!==s+0)throw s;F(1,0)}}function Ba(e){var t=W();try{j(e)()}catch(n){if(L(t),n!==n+0)throw n;F(1,0)}}function Va(e,t,n,a,s){var c=W();try{return j(e)(t,n,a,s)}catch(l){if(L(c),l!==l+0)throw l;F(1,0)}}function qa(e,t,n,a,s,c,l,f,h,y,b){var T=W();try{j(e)(t,n,a,s,c,l,f,h,y,b)}catch(E){if(L(T),E!==E+0)throw E;F(1,0)}}function Ga(e,t,n,a,s,c,l){var f=W();try{return j(e)(t,n,a,s,c,l)}catch(h){if(L(f),h!==h+0)throw h;F(1,0)}}function Na(e,t,n,a,s){var c=W();try{j(e)(t,n,a,s)}catch(l){if(L(c),l!==l+0)throw l;F(1,0)}}function za(e,t,n,a,s,c){var l=W();try{return j(e)(t,n,a,s,c)}catch(f){if(L(l),f!==f+0)throw f;F(1,0)}}function Ya(e,t,n,a,s,c,l,f){var h=W();try{return j(e)(t,n,a,s,c,l,f)}catch(y){if(L(h),y!==y+0)throw y;F(1,0)}}function Ja(e,t,n,a){var s=W();try{return j(e)(t,n,a)}catch(c){if(L(s),c!==c+0)throw c;F(1,0)}}function Qa(e,t,n,a){var s=W();try{return j(e)(t,n,a)}catch(c){if(L(s),c!==c+0)throw c;F(1,0)}}function Xa(e){var t=W();try{return j(e)()}catch(n){if(L(t),n!==n+0)throw n;F(1,0)}}function Ka(e,t,n,a,s,c,l,f){var h=W();try{j(e)(t,n,a,s,c,l,f)}catch(y){if(L(h),y!==y+0)throw y;F(1,0)}}function Za(e,t,n,a,s,c,l,f,h,y,b,T){var E=W();try{return j(e)(t,n,a,s,c,l,f,h,y,b,T)}catch(O){if(L(E),O!==O+0)throw O;F(1,0)}}function ei(e,t,n,a,s,c,l,f,h,y,b,T,E,O,k,H){var R=W();try{j(e)(t,n,a,s,c,l,f,h,y,b,T,E,O,k,H)}catch(z){if(L(R),z!==z+0)throw z;F(1,0)}}function ti(e,t,n,a,s){var c=W();try{return Qt(e,t,n,a,s)}catch(l){if(L(c),l!==l+0)throw l;F(1,0)}}var Le;we=function e(){Le||Xt(),Le||(we=e)};function Xt(){if(ue>0||(Fr(),ue>0))return;function e(){Le||(Le=!0,o.calledRun=!0,!V&&(kr(),u(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),Ur()))}o.setStatus?(o.setStatus("Running..."),setTimeout(function(){setTimeout(function(){o.setStatus("")},1),e()},1)):e()}if(o.preInit)for(typeof o.preInit=="function"&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Xt(),i.ready}})();function Fi(r){return ft(pt,r)}async function ki(r,i){return xi(pt,r,i)}async function Ui(r,i){return Ii(pt,r,i)}var Ee;class ji extends EventTarget{constructor(i={}){var o;super(),ci(this,Ee,void 0);try{const u=(o=i==null?void 0:i.formats)==null?void 0:o.filter(d=>d!=="unknown");if((u==null?void 0:u.length)===0)throw new TypeError("Hint option provided, but is empty.");u==null||u.forEach(d=>{if(!Be.has(d))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${d}' is not a valid enum value of type BarcodeFormat.`)}),li(this,Ee,u??[]),Fi().then(d=>{this.dispatchEvent(new CustomEvent("load",{detail:d}))}).catch(d=>{this.dispatchEvent(new CustomEvent("error",{detail:d}))})}catch(u){throw tr(u,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return di.filter(i=>i!=="unknown")}async detect(i){try{const o=await gi(i);if(o===null)return[];let u;try{wr(o)?u=await ki(o,{tryHarder:!0,formats:er(this,Ee).map(d=>Be.get(d))}):u=await Ui(o,{tryHarder:!0,formats:er(this,Ee).map(d=>Be.get(d))})}catch(d){throw console.error(d),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return u.map(d=>{const{topLeft:{x:p,y:g},topRight:{x:w,y:_},bottomLeft:{x:m,y:$},bottomRight:{x:P,y:C}}=d.position,U=Math.min(p,w,m,P),I=Math.min(g,_,$,C),V=Math.max(p,w,m,P),A=Math.max(g,_,$,C);return{boundingBox:new DOMRectReadOnly(U,I,V-U,A-I),rawValue:d.text,format:fi(d.format),cornerPoints:[{x:p,y:g},{x:w,y:_},{x:P,y:C},{x:m,y:$}]}})}catch(o){throw tr(o,"Failed to execute 'detect' on 'BarcodeDetector'")}}}Ee=new WeakMap;const ht=(r,i,o="error")=>{let u,d;const p=new Promise((g,w)=>{u=g,d=w,r.addEventListener(i,u),r.addEventListener(o,d)});return p.finally(()=>{r.removeEventListener(i,u),r.removeEventListener(o,d)}),p},ir=r=>new Promise(i=>setTimeout(i,r));class Wi extends Error{constructor(){super("can't process cross-origin image"),this.name="DropImageFetchError"}}class _r extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class Li extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class Hi extends Error{constructor(){super("Loading camera stream timed out after 6 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}function Ge(r){return window.BarcodeDetector===void 0?new ji(r):new window.BarcodeDetector(r)}let dt;const _o=r=>{dt=Ge({formats:r})},So=async(r,{detectHandler:i,locateHandler:o,minDelay:u,formats:d})=>{console.debug("[vue-qrcode-reader] start scanning"),dt=Ge({formats:d});const p=g=>async w=>{if(r.readyState===0)console.debug("[vue-qrcode-reader] stop scanning: video element readyState is 0");else{const{lastScanned:_,contentBefore:m,lastScanHadContent:$}=g;if(w-_!m.includes(V.rawValue));C&&i(P);const U=P.length>0;U&&o(P),!U&&$&&o(P);const I={lastScanned:w,lastScanHadContent:U,contentBefore:C?P.map(V=>V.rawValue):m};window.requestAnimationFrame(p(I))}}};p({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())},Bi=async r=>{if(r.startsWith("http")&&r.includes(location.host)===!1)throw new Wi;const i=document.createElement("img");return i.src=r,await ht(i,"load"),i},Po=async(r,i=["qr_code"])=>await Ge({formats:i}).detect(r),To=async(r,i=["qr_code"])=>{const o=Ge({formats:i}),u=await Bi(r);return await o.detect(u)};var Sr={},J={};Object.defineProperty(J,"__esModule",{value:!0});J.compactObject=Er;J.deprecated=Xi;var Vi=J.detectBrowser=Ki;J.disableLog=Yi;J.disableWarnings=Ji;J.extractVersion=Ve;J.filterStats=Zi;J.log=Qi;J.walkStats=qe;J.wrapPeerConnectionEvent=zi;function qi(r,i,o){return i=Gi(i),i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r}function Gi(r){var i=Ni(r,"string");return oe(i)==="symbol"?i:String(i)}function Ni(r,i){if(oe(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var u=o.call(r,i||"default");if(oe(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function oe(r){"@babel/helpers - typeof";return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},oe(r)}var Pr=!0,Tr=!0;function Ve(r,i,o){var u=r.match(i);return u&&u.length>=o&&parseInt(u[o],10)}function zi(r,i,o){if(r.RTCPeerConnection){var u=r.RTCPeerConnection.prototype,d=u.addEventListener;u.addEventListener=function(g,w){if(g!==i)return d.apply(this,arguments);var _=function($){var P=o($);P&&(w.handleEvent?w.handleEvent(P):w(P))};return this._eventMap=this._eventMap||{},this._eventMap[i]||(this._eventMap[i]=new Map),this._eventMap[i].set(w,_),d.apply(this,[g,_])};var p=u.removeEventListener;u.removeEventListener=function(g,w){if(g!==i||!this._eventMap||!this._eventMap[i])return p.apply(this,arguments);if(!this._eventMap[i].has(w))return p.apply(this,arguments);var _=this._eventMap[i].get(w);return this._eventMap[i].delete(w),this._eventMap[i].size===0&&delete this._eventMap[i],Object.keys(this._eventMap).length===0&&delete this._eventMap,p.apply(this,[g,_])},Object.defineProperty(u,"on"+i,{get:function(){return this["_on"+i]},set:function(w){this["_on"+i]&&(this.removeEventListener(i,this["_on"+i]),delete this["_on"+i]),w&&this.addEventListener(i,this["_on"+i]=w)},enumerable:!0,configurable:!0})}}function Yi(r){return typeof r!="boolean"?new Error("Argument type: "+oe(r)+". Please use a boolean."):(Pr=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function Ji(r){return typeof r!="boolean"?new Error("Argument type: "+oe(r)+". Please use a boolean."):(Tr=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function Qi(){if((typeof window>"u"?"undefined":oe(window))==="object"){if(Pr)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Xi(r,i){Tr&&console.warn(r+" is deprecated, please use "+i+" instead.")}function Ki(r){var i={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return i.browser="Not a browser.",i;var o=r.navigator;if(o.mozGetUserMedia)i.browser="firefox",i.version=Ve(o.userAgent,/Firefox\/(\d+)\./,1);else if(o.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)i.browser="chrome",i.version=Ve(o.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&o.userAgent.match(/AppleWebKit\/(\d+)\./))i.browser="safari",i.version=Ve(o.userAgent,/AppleWebKit\/(\d+)\./,1),i.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return i.browser="Not a supported browser.",i;return i}function or(r){return Object.prototype.toString.call(r)==="[object Object]"}function Er(r){return or(r)?Object.keys(r).reduce(function(i,o){var u=or(r[o]),d=u?Er(r[o]):r[o],p=u&&!Object.keys(d).length;return d===void 0||p?i:Object.assign(i,qi({},o,d))},{}):r}function qe(r,i,o){!i||o.has(i.id)||(o.set(i.id,i),Object.keys(i).forEach(function(u){u.endsWith("Id")?qe(r,r.get(i[u]),o):u.endsWith("Ids")&&i[u].forEach(function(d){qe(r,r.get(d),o)})}))}function Zi(r,i,o){var u=o?"outbound-rtp":"inbound-rtp",d=new Map;if(i===null)return d;var p=[];return r.forEach(function(g){g.type==="track"&&g.trackIdentifier===i.id&&p.push(g)}),p.forEach(function(g){r.forEach(function(w){w.type===u&&w.trackId===g.id&&qe(r,w,d)})}),d}Object.defineProperty(Sr,"__esModule",{value:!0});var eo=Sr.shimGetUserMedia=no,to=ro(J);function Or(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,o=new WeakMap;return(Or=function(d){return d?o:i})(r)}function ro(r,i){if(r&&r.__esModule)return r;if(r===null||ie(r)!=="object"&&typeof r!="function")return{default:r};var o=Or(i);if(o&&o.has(r))return o.get(r);var u={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var g=d?Object.getOwnPropertyDescriptor(r,p):null;g&&(g.get||g.set)?Object.defineProperty(u,p,g):u[p]=r[p]}return u.default=r,o&&o.set(r,u),u}function ie(r){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ie(r)}var sr=to.log;function no(r,i){var o=r&&r.navigator;if(o.mediaDevices){var u=function(m){if(ie(m)!=="object"||m.mandatory||m.optional)return m;var $={};return Object.keys(m).forEach(function(P){if(!(P==="require"||P==="advanced"||P==="mediaSource")){var C=ie(m[P])==="object"?m[P]:{ideal:m[P]};C.exact!==void 0&&typeof C.exact=="number"&&(C.min=C.max=C.exact);var U=function(A,D){return A?A+D.charAt(0).toUpperCase()+D.slice(1):D==="deviceId"?"sourceId":D};if(C.ideal!==void 0){$.optional=$.optional||[];var I={};typeof C.ideal=="number"?(I[U("min",P)]=C.ideal,$.optional.push(I),I={},I[U("max",P)]=C.ideal,$.optional.push(I)):(I[U("",P)]=C.ideal,$.optional.push(I))}C.exact!==void 0&&typeof C.exact!="number"?($.mandatory=$.mandatory||{},$.mandatory[U("",P)]=C.exact):["min","max"].forEach(function(V){C[V]!==void 0&&($.mandatory=$.mandatory||{},$.mandatory[U(V,P)]=C[V])})}}),m.advanced&&($.optional=($.optional||[]).concat(m.advanced)),$},d=function(m,$){if(i.version>=61)return $(m);if(m=JSON.parse(JSON.stringify(m)),m&&ie(m.audio)==="object"){var P=function(A,D,X){D in A&&!(X in A)&&(A[X]=A[D],delete A[D])};m=JSON.parse(JSON.stringify(m)),P(m.audio,"autoGainControl","googAutoGainControl"),P(m.audio,"noiseSuppression","googNoiseSuppression"),m.audio=u(m.audio)}if(m&&ie(m.video)==="object"){var C=m.video.facingMode;C=C&&(ie(C)==="object"?C:{ideal:C});var U=i.version<66;if(C&&(C.exact==="user"||C.exact==="environment"||C.ideal==="user"||C.ideal==="environment")&&!(o.mediaDevices.getSupportedConstraints&&o.mediaDevices.getSupportedConstraints().facingMode&&!U)){delete m.video.facingMode;var I;if(C.exact==="environment"||C.ideal==="environment"?I=["back","rear"]:(C.exact==="user"||C.ideal==="user")&&(I=["front"]),I)return o.mediaDevices.enumerateDevices().then(function(V){V=V.filter(function(D){return D.kind==="videoinput"});var A=V.find(function(D){return I.some(function(X){return D.label.toLowerCase().includes(X)})});return!A&&V.length&&I.includes("back")&&(A=V[V.length-1]),A&&(m.video.deviceId=C.exact?{exact:A.deviceId}:{ideal:A.deviceId}),m.video=u(m.video),sr("chrome: "+JSON.stringify(m)),$(m)})}m.video=u(m.video)}return sr("chrome: "+JSON.stringify(m)),$(m)},p=function(m){return i.version>=64?m:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[m.name]||m.name,message:m.message,constraint:m.constraint||m.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},g=function(m,$,P){d(m,function(C){o.webkitGetUserMedia(C,$,function(U){P&&P(p(U))})})};if(o.getUserMedia=g.bind(o),o.mediaDevices.getUserMedia){var w=o.mediaDevices.getUserMedia.bind(o.mediaDevices);o.mediaDevices.getUserMedia=function(_){return d(_,function(m){return w(m).then(function($){if(m.audio&&!$.getAudioTracks().length||m.video&&!$.getVideoTracks().length)throw $.getTracks().forEach(function(P){P.stop()}),new DOMException("","NotFoundError");return $},function($){return Promise.reject(p($))})})}}}}var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});var ao=Mr.shimGetUserMedia=so,io=oo(J);function Ar(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,o=new WeakMap;return(Ar=function(d){return d?o:i})(r)}function oo(r,i){if(r&&r.__esModule)return r;if(r===null||me(r)!=="object"&&typeof r!="function")return{default:r};var o=Ar(i);if(o&&o.has(r))return o.get(r);var u={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var g=d?Object.getOwnPropertyDescriptor(r,p):null;g&&(g.get||g.set)?Object.defineProperty(u,p,g):u[p]=r[p]}return u.default=r,o&&o.set(r,u),u}function me(r){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},me(r)}function so(r,i){var o=r&&r.navigator,u=r&&r.MediaStreamTrack;if(o.getUserMedia=function(_,m,$){io.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),o.mediaDevices.getUserMedia(_).then(m,$)},!(i.version>55&&"autoGainControl"in o.mediaDevices.getSupportedConstraints())){var d=function(m,$,P){$ in m&&!(P in m)&&(m[P]=m[$],delete m[$])},p=o.mediaDevices.getUserMedia.bind(o.mediaDevices);if(o.mediaDevices.getUserMedia=function(_){return me(_)==="object"&&me(_.audio)==="object"&&(_=JSON.parse(JSON.stringify(_)),d(_.audio,"autoGainControl","mozAutoGainControl"),d(_.audio,"noiseSuppression","mozNoiseSuppression")),p(_)},u&&u.prototype.getSettings){var g=u.prototype.getSettings;u.prototype.getSettings=function(){var _=g.apply(this,arguments);return d(_,"mozAutoGainControl","autoGainControl"),d(_,"mozNoiseSuppression","noiseSuppression"),_}}if(u&&u.prototype.applyConstraints){var w=u.prototype.applyConstraints;u.prototype.applyConstraints=function(_){return this.kind==="audio"&&me(_)==="object"&&(_=JSON.parse(JSON.stringify(_)),d(_,"autoGainControl","mozAutoGainControl"),d(_,"noiseSuppression","mozNoiseSuppression")),w.apply(this,[_])}}}}var te={};Object.defineProperty(te,"__esModule",{value:!0});te.shimAudioContext=go;te.shimCallbacksAPI=po;te.shimConstraints=xr;te.shimCreateOfferLegacy=yo;var uo=te.shimGetUserMedia=ho;te.shimLocalStreamsAPI=lo;te.shimRTCIceServerUrls=mo;te.shimRemoteStreamsAPI=fo;te.shimTrackEventTransceiver=vo;var Dr=co(J);function Rr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,o=new WeakMap;return(Rr=function(d){return d?o:i})(r)}function co(r,i){if(r&&r.__esModule)return r;if(r===null||se(r)!=="object"&&typeof r!="function")return{default:r};var o=Rr(i);if(o&&o.has(r))return o.get(r);var u={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var g=d?Object.getOwnPropertyDescriptor(r,p):null;g&&(g.get||g.set)?Object.defineProperty(u,p,g):u[p]=r[p]}return u.default=r,o&&o.set(r,u),u}function se(r){"@babel/helpers - typeof";return se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},se(r)}function lo(r){if(!(se(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var i=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(u){var d=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(u)||this._localStreams.push(u),u.getAudioTracks().forEach(function(p){return i.call(d,p,u)}),u.getVideoTracks().forEach(function(p){return i.call(d,p,u)})},r.RTCPeerConnection.prototype.addTrack=function(u){for(var d=this,p=arguments.length,g=new Array(p>1?p-1:0),w=1;w=0)){u._remoteStreams.push(p);var g=new Event("addstream");g.stream=p,u.dispatchEvent(g)}})}),i.apply(u,arguments)}}}function po(r){if(!(se(r)!=="object"||!r.RTCPeerConnection)){var i=r.RTCPeerConnection.prototype,o=i.createOffer,u=i.createAnswer,d=i.setLocalDescription,p=i.setRemoteDescription,g=i.addIceCandidate;i.createOffer=function(m,$){var P=arguments.length>=2?arguments[2]:arguments[0],C=o.apply(this,[P]);return $?(C.then(m,$),Promise.resolve()):C},i.createAnswer=function(m,$){var P=arguments.length>=2?arguments[2]:arguments[0],C=u.apply(this,[P]);return $?(C.then(m,$),Promise.resolve()):C};var w=function(m,$,P){var C=d.apply(this,[m]);return P?(C.then($,P),Promise.resolve()):C};i.setLocalDescription=w,w=function(m,$,P){var C=p.apply(this,[m]);return P?(C.then($,P),Promise.resolve()):C},i.setRemoteDescription=w,w=function(m,$,P){var C=g.apply(this,[m]);return P?(C.then($,P),Promise.resolve()):C},i.addIceCandidate=w}}function ho(r){var i=r&&r.navigator;if(i.mediaDevices&&i.mediaDevices.getUserMedia){var o=i.mediaDevices,u=o.getUserMedia.bind(o);i.mediaDevices.getUserMedia=function(d){return u(xr(d))}}!i.getUserMedia&&i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=(function(p,g,w){i.mediaDevices.getUserMedia(p).then(g,w)}).bind(i))}function xr(r){return r&&r.video!==void 0?Object.assign({},r,{video:Dr.compactObject(r.video)}):r}function mo(r){if(r.RTCPeerConnection){var i=r.RTCPeerConnection;r.RTCPeerConnection=function(u,d){if(u&&u.iceServers){for(var p=[],g=0;g{let i=!1,o;return(...u)=>(i||(o=r(u),i=!0),o)};function Eo(r,i){if(r===!1)throw new Error(i??"assertion failure")}function ur(r){throw new Error("this code should be unreachable")}const bo=wo(()=>{const r=Vi(window);switch(r.browser){case"chrome":eo(window,r);break;case"firefox":ao(window,r);break;case"safari":uo(window,r);break;default:throw new _r}});let ve=Promise.resolve({type:"stop",data:{}});async function cr(r,i,o){var w,_;if(console.debug("[vue-qrcode-reader] starting camera with constraints: ",JSON.stringify(i)),window.isSecureContext!==!0)throw new Li;if(((w=navigator==null?void 0:navigator.mediaDevices)==null?void 0:w.getUserMedia)===void 0)throw new _r;bo(),console.debug("[vue-qrcode-reader] calling getUserMedia");const u=await navigator.mediaDevices.getUserMedia({audio:!1,video:i});r.srcObject!==void 0?r.srcObject=u:r.mozSrcObject!==void 0?r.mozSrcObject=u:window.URL.createObjectURL?r.src=window.URL.createObjectURL(u):window.webkitURL?r.src=window.webkitURL.createObjectURL(u):r.src=u.id,r.play(),console.debug("[vue-qrcode-reader] waiting for video element to load"),await Promise.race([ht(r,"loadeddata"),ir(6e3).then(()=>{throw new Hi})]),console.debug("[vue-qrcode-reader] video element loaded"),await ir(500);const[d]=u.getVideoTracks(),p=((_=d==null?void 0:d.getCapabilities)==null?void 0:_.call(d))??{};let g=!1;return o&&p.torch&&(await d.applyConstraints({advanced:[{torch:!0}]}),g=!0),console.debug("[vue-qrcode-reader] camera ready"),{type:"start",data:{videoEl:r,stream:u,capabilities:p,constraints:i,isTorchOn:g}}}async function Oo(r,{constraints:i,torch:o,restart:u=!1}){ve=ve.then(p=>{if(p.type==="start"){const{data:{videoEl:g,stream:w,constraints:_,isTorchOn:m}}=p;return!u&&r===g&&i===_&&o===m?p:Ir(g,w,m).then(()=>cr(r,i,o))}else if(p.type==="stop"||p.type==="failed")return cr(r,i,o);ur()}).catch(p=>(console.debug(`[vue-qrcode-reader] starting camera failed with "${p}"`),{type:"failed",error:p}));const d=await ve;if(d.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");if(d.type==="failed")throw d.error;if(d.type==="start")return d.data.capabilities;ur()}async function Ir(r,i,o){console.debug("[vue-qrcode-reader] stopping camera"),r.src="",r.srcObject=null,r.load(),await ht(r,"error");for(const u of i.getTracks())o??await u.applyConstraints({advanced:[{torch:!1}]}),i.removeTrack(u),u.stop();return{type:"stop",data:{}}}async function Mo(){if(ve=ve.then(i=>{if(i.type==="stop"||i.type==="failed")return i;const{data:{videoEl:o,stream:u,isTorchOn:d}}=i;return Ir(o,u,d)}),(await ve).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}export{$o as _,To as a,Eo as b,Oo as c,_o as d,So as k,Po as p,Mo as s}; diff --git a/pr-preview/pr-449/assets/demos_DragDrop.md.12E-B_I3.js b/pr-preview/pr-449/assets/demos_DragDrop.md.cTRAHQaD.js similarity index 99% rename from pr-preview/pr-449/assets/demos_DragDrop.md.12E-B_I3.js rename to pr-preview/pr-449/assets/demos_DragDrop.md.cTRAHQaD.js index d3acecba..54c78f39 100644 --- a/pr-preview/pr-449/assets/demos_DragDrop.md.12E-B_I3.js +++ b/pr-preview/pr-449/assets/demos_DragDrop.md.cTRAHQaD.js @@ -1,4 +1,4 @@ -import{p as B,a as m,_ as f}from"./chunks/camera.BJQyjlnn.js";import{d as F,o as r,c as E,r as v,a2 as e,_ as A,D as C,k as t,a as d,t as c,e as _,I as y,w as D,n as q,R as b}from"./chunks/framework.BtL3uYYi.js";const O=F({__name:"QrcodeDropZone",props:{formats:{type:Array,default:()=>["qr_code"]}},emits:["detect","dragover","error"],setup(s,{emit:h}){const g=s,p=h,n=async a=>{try{const i=await a;p("detect",i)}catch(i){p("error",i)}},l=a=>{p("dragover",a)},o=({dataTransfer:a})=>{if(!a)return;l(!1);const i=[...Array.from(a.files)],k=a.getData("text/uri-list");i.forEach(u=>{n(B(u))}),k!==""&&n(m(k,g.formats))};return(a,i)=>(r(),E("div",{onDrop:e(o,["prevent","stop"]),onDragenter:i[0]||(i[0]=e(k=>l(!0),["prevent","stop"])),onDragleave:i[1]||(i[1]=e(k=>l(!1),["prevent","stop"])),onDragover:i[2]||(i[2]=e(()=>{},["prevent","stop"]))},[v(a.$slots,"default")],32))}}),S={components:{QrcodeDropZone:O},data(){return{result:null,error:null,dragover:!1}},methods:{onDetect(s){console.log(s),this.result=JSON.stringify(s.map(h=>h.rawValue))},logErrors(s){s.name==="DropImageFetchError"?this.error="Sorry, you can't load cross-origin images :/":s.name==="DropImageDecodeError"?this.error="Ok, that's not an image. That can't be decoded.":this.error="Ups, what kind of error is this?! "+s.message},onDragOver(s){this.dragover=s}}},x={class:"decode-result"},w={key:0,class:"drop-error"};function N(s,h,g,p,n,l){const o=C("qrcode-drop-zone");return r(),E("div",null,[t("p",x,[d(" Last result: "),t("b",null,c(n.result),1)]),n.error!==null?(r(),E("p",w,c(n.error),1)):_("",!0),y(o,{onDetect:l.onDetect,onDragover:l.onDragOver,onError:l.logErrors},{default:D(()=>[t("div",{class:q(["drop-area",{dragover:n.dragover}])}," DROP SOME IMAGES HERE ",2)]),_:1},8,["onDetect","onDragover","onError"])])}const I=A(S,[["render",N]]),V=t("h1",{id:"decode-by-drag-drop",tabindex:"-1"},[d("Decode by Drag&Drop "),t("a",{class:"header-anchor",href:"#decode-by-drag-drop","aria-label":'Permalink to "Decode by Drag&Drop"'},"​")],-1),P=t("p",null,[d("With the "),t("code",null,"QrcodeDropZone"),d(" component you can also drag-and-drop images that should be scanned. Use it as a standalone feature or as a fallback for desktop users.")],-1),U=b(`

Source

vue
<template>
+import{p as B,a as m,_ as f}from"./chunks/camera.DhcMeik-.js";import{d as F,o as r,c as E,r as v,a2 as e,_ as A,D as C,k as t,a as d,t as c,e as _,I as y,w as D,n as q,R as b}from"./chunks/framework.BtL3uYYi.js";const O=F({__name:"QrcodeDropZone",props:{formats:{type:Array,default:()=>["qr_code"]}},emits:["detect","dragover","error"],setup(s,{emit:h}){const g=s,p=h,n=async a=>{try{const i=await a;p("detect",i)}catch(i){p("error",i)}},l=a=>{p("dragover",a)},o=({dataTransfer:a})=>{if(!a)return;l(!1);const i=[...Array.from(a.files)],k=a.getData("text/uri-list");i.forEach(u=>{n(B(u))}),k!==""&&n(m(k,g.formats))};return(a,i)=>(r(),E("div",{onDrop:e(o,["prevent","stop"]),onDragenter:i[0]||(i[0]=e(k=>l(!0),["prevent","stop"])),onDragleave:i[1]||(i[1]=e(k=>l(!1),["prevent","stop"])),onDragover:i[2]||(i[2]=e(()=>{},["prevent","stop"]))},[v(a.$slots,"default")],32))}}),S={components:{QrcodeDropZone:O},data(){return{result:null,error:null,dragover:!1}},methods:{onDetect(s){console.log(s),this.result=JSON.stringify(s.map(h=>h.rawValue))},logErrors(s){s.name==="DropImageFetchError"?this.error="Sorry, you can't load cross-origin images :/":s.name==="DropImageDecodeError"?this.error="Ok, that's not an image. That can't be decoded.":this.error="Ups, what kind of error is this?! "+s.message},onDragOver(s){this.dragover=s}}},x={class:"decode-result"},w={key:0,class:"drop-error"};function N(s,h,g,p,n,l){const o=C("qrcode-drop-zone");return r(),E("div",null,[t("p",x,[d(" Last result: "),t("b",null,c(n.result),1)]),n.error!==null?(r(),E("p",w,c(n.error),1)):_("",!0),y(o,{onDetect:l.onDetect,onDragover:l.onDragOver,onError:l.logErrors},{default:D(()=>[t("div",{class:q(["drop-area",{dragover:n.dragover}])}," DROP SOME IMAGES HERE ",2)]),_:1},8,["onDetect","onDragover","onError"])])}const I=A(S,[["render",N]]),V=t("h1",{id:"decode-by-drag-drop",tabindex:"-1"},[d("Decode by Drag&Drop "),t("a",{class:"header-anchor",href:"#decode-by-drag-drop","aria-label":'Permalink to "Decode by Drag&Drop"'},"​")],-1),P=t("p",null,[d("With the "),t("code",null,"QrcodeDropZone"),d(" component you can also drag-and-drop images that should be scanned. Use it as a standalone feature or as a fallback for desktop users.")],-1),U=b(`

Source

vue
<template>
   <div>
     <p class="decode-result">
       Last result: <b>{{ result }}</b>
diff --git a/pr-preview/pr-449/assets/demos_DragDrop.md.12E-B_I3.lean.js b/pr-preview/pr-449/assets/demos_DragDrop.md.cTRAHQaD.lean.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_DragDrop.md.12E-B_I3.lean.js
rename to pr-preview/pr-449/assets/demos_DragDrop.md.cTRAHQaD.lean.js
index d3acecba..54c78f39 100644
--- a/pr-preview/pr-449/assets/demos_DragDrop.md.12E-B_I3.lean.js
+++ b/pr-preview/pr-449/assets/demos_DragDrop.md.cTRAHQaD.lean.js
@@ -1,4 +1,4 @@
-import{p as B,a as m,_ as f}from"./chunks/camera.BJQyjlnn.js";import{d as F,o as r,c as E,r as v,a2 as e,_ as A,D as C,k as t,a as d,t as c,e as _,I as y,w as D,n as q,R as b}from"./chunks/framework.BtL3uYYi.js";const O=F({__name:"QrcodeDropZone",props:{formats:{type:Array,default:()=>["qr_code"]}},emits:["detect","dragover","error"],setup(s,{emit:h}){const g=s,p=h,n=async a=>{try{const i=await a;p("detect",i)}catch(i){p("error",i)}},l=a=>{p("dragover",a)},o=({dataTransfer:a})=>{if(!a)return;l(!1);const i=[...Array.from(a.files)],k=a.getData("text/uri-list");i.forEach(u=>{n(B(u))}),k!==""&&n(m(k,g.formats))};return(a,i)=>(r(),E("div",{onDrop:e(o,["prevent","stop"]),onDragenter:i[0]||(i[0]=e(k=>l(!0),["prevent","stop"])),onDragleave:i[1]||(i[1]=e(k=>l(!1),["prevent","stop"])),onDragover:i[2]||(i[2]=e(()=>{},["prevent","stop"]))},[v(a.$slots,"default")],32))}}),S={components:{QrcodeDropZone:O},data(){return{result:null,error:null,dragover:!1}},methods:{onDetect(s){console.log(s),this.result=JSON.stringify(s.map(h=>h.rawValue))},logErrors(s){s.name==="DropImageFetchError"?this.error="Sorry, you can't load cross-origin images :/":s.name==="DropImageDecodeError"?this.error="Ok, that's not an image. That can't be decoded.":this.error="Ups, what kind of error is this?! "+s.message},onDragOver(s){this.dragover=s}}},x={class:"decode-result"},w={key:0,class:"drop-error"};function N(s,h,g,p,n,l){const o=C("qrcode-drop-zone");return r(),E("div",null,[t("p",x,[d(" Last result: "),t("b",null,c(n.result),1)]),n.error!==null?(r(),E("p",w,c(n.error),1)):_("",!0),y(o,{onDetect:l.onDetect,onDragover:l.onDragOver,onError:l.logErrors},{default:D(()=>[t("div",{class:q(["drop-area",{dragover:n.dragover}])}," DROP SOME IMAGES HERE ",2)]),_:1},8,["onDetect","onDragover","onError"])])}const I=A(S,[["render",N]]),V=t("h1",{id:"decode-by-drag-drop",tabindex:"-1"},[d("Decode by Drag&Drop "),t("a",{class:"header-anchor",href:"#decode-by-drag-drop","aria-label":'Permalink to "Decode by Drag&Drop"'},"​")],-1),P=t("p",null,[d("With the "),t("code",null,"QrcodeDropZone"),d(" component you can also drag-and-drop images that should be scanned. Use it as a standalone feature or as a fallback for desktop users.")],-1),U=b(`

Source

vue
<template>
+import{p as B,a as m,_ as f}from"./chunks/camera.DhcMeik-.js";import{d as F,o as r,c as E,r as v,a2 as e,_ as A,D as C,k as t,a as d,t as c,e as _,I as y,w as D,n as q,R as b}from"./chunks/framework.BtL3uYYi.js";const O=F({__name:"QrcodeDropZone",props:{formats:{type:Array,default:()=>["qr_code"]}},emits:["detect","dragover","error"],setup(s,{emit:h}){const g=s,p=h,n=async a=>{try{const i=await a;p("detect",i)}catch(i){p("error",i)}},l=a=>{p("dragover",a)},o=({dataTransfer:a})=>{if(!a)return;l(!1);const i=[...Array.from(a.files)],k=a.getData("text/uri-list");i.forEach(u=>{n(B(u))}),k!==""&&n(m(k,g.formats))};return(a,i)=>(r(),E("div",{onDrop:e(o,["prevent","stop"]),onDragenter:i[0]||(i[0]=e(k=>l(!0),["prevent","stop"])),onDragleave:i[1]||(i[1]=e(k=>l(!1),["prevent","stop"])),onDragover:i[2]||(i[2]=e(()=>{},["prevent","stop"]))},[v(a.$slots,"default")],32))}}),S={components:{QrcodeDropZone:O},data(){return{result:null,error:null,dragover:!1}},methods:{onDetect(s){console.log(s),this.result=JSON.stringify(s.map(h=>h.rawValue))},logErrors(s){s.name==="DropImageFetchError"?this.error="Sorry, you can't load cross-origin images :/":s.name==="DropImageDecodeError"?this.error="Ok, that's not an image. That can't be decoded.":this.error="Ups, what kind of error is this?! "+s.message},onDragOver(s){this.dragover=s}}},x={class:"decode-result"},w={key:0,class:"drop-error"};function N(s,h,g,p,n,l){const o=C("qrcode-drop-zone");return r(),E("div",null,[t("p",x,[d(" Last result: "),t("b",null,c(n.result),1)]),n.error!==null?(r(),E("p",w,c(n.error),1)):_("",!0),y(o,{onDetect:l.onDetect,onDragover:l.onDragOver,onError:l.logErrors},{default:D(()=>[t("div",{class:q(["drop-area",{dragover:n.dragover}])}," DROP SOME IMAGES HERE ",2)]),_:1},8,["onDetect","onDragover","onError"])])}const I=A(S,[["render",N]]),V=t("h1",{id:"decode-by-drag-drop",tabindex:"-1"},[d("Decode by Drag&Drop "),t("a",{class:"header-anchor",href:"#decode-by-drag-drop","aria-label":'Permalink to "Decode by Drag&Drop"'},"​")],-1),P=t("p",null,[d("With the "),t("code",null,"QrcodeDropZone"),d(" component you can also drag-and-drop images that should be scanned. Use it as a standalone feature or as a fallback for desktop users.")],-1),U=b(`

Source

vue
<template>
   <div>
     <p class="decode-result">
       Last result: <b>{{ result }}</b>
diff --git a/pr-preview/pr-449/assets/demos_FullDemo.md.EA-azuP_.js b/pr-preview/pr-449/assets/demos_FullDemo.md.CRrzANCR.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_FullDemo.md.EA-azuP_.js
rename to pr-preview/pr-449/assets/demos_FullDemo.md.CRrzANCR.js
index 736c9802..4d2e5cf0 100644
--- a/pr-preview/pr-449/assets/demos_FullDemo.md.EA-azuP_.js
+++ b/pr-preview/pr-449/assets/demos_FullDemo.md.CRrzANCR.js
@@ -1,4 +1,4 @@
-import{_ as I}from"./chunks/camera.BJQyjlnn.js";import{d as _,h as E,g as V,o as t,c as k,k as l,a as c,a4 as u,a5 as x,F as B,E as f,t as o,I as D,m as $,a6 as M,p as R,q as U,_ as H,D as Y,w as z,R as j}from"./chunks/framework.BtL3uYYi.js";import{_ as Q}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";const W=r=>(R("data-v-df3f27d7"),r=r(),U(),r),X=["value"],J=["value"],L=W(()=>l("br",null,null,-1)),G=["onUpdate:modelValue","id"],K=["for"],Z={class:"error"},ss={class:"decode-result"},is=_({__name:"FullDemo",setup(r){const F=E("");function A(a){console.log(a),F.value=JSON.stringify(a.map(i=>i.rawValue))}const d=E({facingMode:"environment"}),m=[{label:"rear camera",constraints:{facingMode:"environment"}},{label:"front camera",constraints:{facingMode:"user"}}],v=E(m);async function q(){const i=(await navigator.mediaDevices.enumerateDevices()).filter(({kind:s})=>s==="videoinput");v.value=[...m,...i.map(({deviceId:s,label:n})=>({label:`${n} (ID: ${s})`,constraints:{deviceId:s}}))],h.value=""}function S(a,i){for(const s of a){const[n,...y]=s.cornerPoints;i.strokeStyle="red",i.beginPath(),i.moveTo(n.x,n.y);for(const{x:p,y:e}of y)i.lineTo(p,e);i.lineTo(n.x,n.y),i.closePath(),i.stroke()}}function w(a,i){for(const s of a){const{boundingBox:{x:n,y,width:p,height:e}}=s;i.lineWidth=2,i.strokeStyle="#007bff",i.strokeRect(n,y,p,e)}}function T(a,i){for(const s of a){const{boundingBox:n,rawValue:y}=s,p=n.x+n.width/2,e=n.y+n.height/2,N=Math.max(12,50*n.width/i.canvas.width);i.font=`bold ${N}px sans-serif`,i.textAlign="center",i.lineWidth=3,i.strokeStyle="#35495e",i.strokeText(s.rawValue,p,e),i.fillStyle="#5cb984",i.fillText(y,p,e)}}const b=[{text:"nothing (default)",value:void 0},{text:"outline",value:S},{text:"centered text",value:T},{text:"bounding box",value:w}],C=E(b[1]),g=E({aztec:!1,code_128:!1,code_39:!1,code_93:!1,codabar:!1,databar:!1,databar_expanded:!1,data_matrix:!1,dx_film_edge:!1,ean_13:!1,ean_8:!1,itf:!1,maxi_code:!1,micro_qr_code:!1,pdf417:!1,qr_code:!0,rm_qr_code:!1,upc_a:!1,upc_e:!1,linear_codes:!1,matrix_codes:!1}),O=V(()=>Object.keys(g.value).filter(a=>g.value[a])),h=E("");function P(a){h.value=`[${a.name}]: `,a.name==="NotAllowedError"?h.value+="you need to grant camera access permission":a.name==="NotFoundError"?h.value+="no camera on this device":a.name==="NotSupportedError"?h.value+="secure context required (HTTPS, localhost)":a.name==="NotReadableError"?h.value+="is the camera already in use?":a.name==="OverconstrainedError"?h.value+="installed cameras are not suitable":a.name==="StreamApiNotSupportedError"?h.value+="Stream API is not supported in this browser":a.name==="InsecureContextError"?h.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":h.value+=a.message}return(a,i)=>(t(),k("div",null,[l("p",null,[c(" Modern mobile phones often have a variety of different cameras installed (e.g. front, rear, wide-angle, infrared, desk-view). The one picked by default is sometimes not the best choice. For more fine-grained control, you can select a camera by device constraints or by the device ID: "),u(l("select",{"onUpdate:modelValue":i[0]||(i[0]=s=>d.value=s)},[(t(!0),k(B,null,f(v.value,s=>(t(),k("option",{key:s.label,value:s.constraints},o(s.label),9,X))),128))],512),[[x,d.value]])]),l("p",null,[c(" Detected codes are visually highlighted in real-time. Use the following dropdown to change the flavor: "),u(l("select",{"onUpdate:modelValue":i[1]||(i[1]=s=>C.value=s)},[(t(),k(B,null,f(b,s=>l("option",{key:s.text,value:s},o(s.text),9,J)),64))],512),[[x,C.value]])]),l("p",null,[c(" By default only QR-codes are detected but a variety of other barcode formats are also supported. You can select one or multiple but the more you select the more expensive scanning becomes: "),L,(t(!0),k(B,null,f(Object.keys(g.value),s=>(t(),k("span",{key:s,class:"barcode-format-checkbox"},[u(l("input",{type:"checkbox","onUpdate:modelValue":n=>g.value[s]=n,id:s},null,8,G),[[M,g.value[s]]]),l("label",{for:s},o(s),9,K)]))),128))]),l("p",Z,o(h.value),1),l("p",ss,[c(" Last result: "),l("b",null,o(F.value),1)]),l("div",null,[D($(Q),{constraints:d.value,track:C.value.value,formats:O.value,onError:P,onDetect:A,onCameraOn:q},null,8,["constraints","track","formats"])])]))}}),as=H(is,[["__scopeId","data-v-df3f27d7"]]),ns=l("h1",{id:"full-demo",tabindex:"-1"},[c("Full Demo "),l("a",{class:"header-anchor",href:"#full-demo","aria-label":'Permalink to "Full Demo"'},"​")],-1),ls=j(`

Source

vue
<template>
+import{_ as I}from"./chunks/camera.DhcMeik-.js";import{d as _,h as E,g as V,o as t,c as k,k as l,a as c,a4 as u,a5 as x,F as B,E as f,t as o,I as D,m as $,a6 as M,p as R,q as U,_ as H,D as Y,w as z,R as j}from"./chunks/framework.BtL3uYYi.js";import{_ as Q}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";const W=r=>(R("data-v-df3f27d7"),r=r(),U(),r),X=["value"],J=["value"],L=W(()=>l("br",null,null,-1)),G=["onUpdate:modelValue","id"],K=["for"],Z={class:"error"},ss={class:"decode-result"},is=_({__name:"FullDemo",setup(r){const F=E("");function A(a){console.log(a),F.value=JSON.stringify(a.map(i=>i.rawValue))}const d=E({facingMode:"environment"}),m=[{label:"rear camera",constraints:{facingMode:"environment"}},{label:"front camera",constraints:{facingMode:"user"}}],v=E(m);async function q(){const i=(await navigator.mediaDevices.enumerateDevices()).filter(({kind:s})=>s==="videoinput");v.value=[...m,...i.map(({deviceId:s,label:n})=>({label:`${n} (ID: ${s})`,constraints:{deviceId:s}}))],h.value=""}function S(a,i){for(const s of a){const[n,...y]=s.cornerPoints;i.strokeStyle="red",i.beginPath(),i.moveTo(n.x,n.y);for(const{x:p,y:e}of y)i.lineTo(p,e);i.lineTo(n.x,n.y),i.closePath(),i.stroke()}}function w(a,i){for(const s of a){const{boundingBox:{x:n,y,width:p,height:e}}=s;i.lineWidth=2,i.strokeStyle="#007bff",i.strokeRect(n,y,p,e)}}function T(a,i){for(const s of a){const{boundingBox:n,rawValue:y}=s,p=n.x+n.width/2,e=n.y+n.height/2,N=Math.max(12,50*n.width/i.canvas.width);i.font=`bold ${N}px sans-serif`,i.textAlign="center",i.lineWidth=3,i.strokeStyle="#35495e",i.strokeText(s.rawValue,p,e),i.fillStyle="#5cb984",i.fillText(y,p,e)}}const b=[{text:"nothing (default)",value:void 0},{text:"outline",value:S},{text:"centered text",value:T},{text:"bounding box",value:w}],C=E(b[1]),g=E({aztec:!1,code_128:!1,code_39:!1,code_93:!1,codabar:!1,databar:!1,databar_expanded:!1,data_matrix:!1,dx_film_edge:!1,ean_13:!1,ean_8:!1,itf:!1,maxi_code:!1,micro_qr_code:!1,pdf417:!1,qr_code:!0,rm_qr_code:!1,upc_a:!1,upc_e:!1,linear_codes:!1,matrix_codes:!1}),O=V(()=>Object.keys(g.value).filter(a=>g.value[a])),h=E("");function P(a){h.value=`[${a.name}]: `,a.name==="NotAllowedError"?h.value+="you need to grant camera access permission":a.name==="NotFoundError"?h.value+="no camera on this device":a.name==="NotSupportedError"?h.value+="secure context required (HTTPS, localhost)":a.name==="NotReadableError"?h.value+="is the camera already in use?":a.name==="OverconstrainedError"?h.value+="installed cameras are not suitable":a.name==="StreamApiNotSupportedError"?h.value+="Stream API is not supported in this browser":a.name==="InsecureContextError"?h.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":h.value+=a.message}return(a,i)=>(t(),k("div",null,[l("p",null,[c(" Modern mobile phones often have a variety of different cameras installed (e.g. front, rear, wide-angle, infrared, desk-view). The one picked by default is sometimes not the best choice. For more fine-grained control, you can select a camera by device constraints or by the device ID: "),u(l("select",{"onUpdate:modelValue":i[0]||(i[0]=s=>d.value=s)},[(t(!0),k(B,null,f(v.value,s=>(t(),k("option",{key:s.label,value:s.constraints},o(s.label),9,X))),128))],512),[[x,d.value]])]),l("p",null,[c(" Detected codes are visually highlighted in real-time. Use the following dropdown to change the flavor: "),u(l("select",{"onUpdate:modelValue":i[1]||(i[1]=s=>C.value=s)},[(t(),k(B,null,f(b,s=>l("option",{key:s.text,value:s},o(s.text),9,J)),64))],512),[[x,C.value]])]),l("p",null,[c(" By default only QR-codes are detected but a variety of other barcode formats are also supported. You can select one or multiple but the more you select the more expensive scanning becomes: "),L,(t(!0),k(B,null,f(Object.keys(g.value),s=>(t(),k("span",{key:s,class:"barcode-format-checkbox"},[u(l("input",{type:"checkbox","onUpdate:modelValue":n=>g.value[s]=n,id:s},null,8,G),[[M,g.value[s]]]),l("label",{for:s},o(s),9,K)]))),128))]),l("p",Z,o(h.value),1),l("p",ss,[c(" Last result: "),l("b",null,o(F.value),1)]),l("div",null,[D($(Q),{constraints:d.value,track:C.value.value,formats:O.value,onError:P,onDetect:A,onCameraOn:q},null,8,["constraints","track","formats"])])]))}}),as=H(is,[["__scopeId","data-v-df3f27d7"]]),ns=l("h1",{id:"full-demo",tabindex:"-1"},[c("Full Demo "),l("a",{class:"header-anchor",href:"#full-demo","aria-label":'Permalink to "Full Demo"'},"​")],-1),ls=j(`

Source

vue
<template>
   <div>
     <p>
       Modern mobile phones often have a variety of different cameras installed (e.g. front, rear,
diff --git a/pr-preview/pr-449/assets/demos_FullDemo.md.EA-azuP_.lean.js b/pr-preview/pr-449/assets/demos_FullDemo.md.CRrzANCR.lean.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_FullDemo.md.EA-azuP_.lean.js
rename to pr-preview/pr-449/assets/demos_FullDemo.md.CRrzANCR.lean.js
index 736c9802..4d2e5cf0 100644
--- a/pr-preview/pr-449/assets/demos_FullDemo.md.EA-azuP_.lean.js
+++ b/pr-preview/pr-449/assets/demos_FullDemo.md.CRrzANCR.lean.js
@@ -1,4 +1,4 @@
-import{_ as I}from"./chunks/camera.BJQyjlnn.js";import{d as _,h as E,g as V,o as t,c as k,k as l,a as c,a4 as u,a5 as x,F as B,E as f,t as o,I as D,m as $,a6 as M,p as R,q as U,_ as H,D as Y,w as z,R as j}from"./chunks/framework.BtL3uYYi.js";import{_ as Q}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";const W=r=>(R("data-v-df3f27d7"),r=r(),U(),r),X=["value"],J=["value"],L=W(()=>l("br",null,null,-1)),G=["onUpdate:modelValue","id"],K=["for"],Z={class:"error"},ss={class:"decode-result"},is=_({__name:"FullDemo",setup(r){const F=E("");function A(a){console.log(a),F.value=JSON.stringify(a.map(i=>i.rawValue))}const d=E({facingMode:"environment"}),m=[{label:"rear camera",constraints:{facingMode:"environment"}},{label:"front camera",constraints:{facingMode:"user"}}],v=E(m);async function q(){const i=(await navigator.mediaDevices.enumerateDevices()).filter(({kind:s})=>s==="videoinput");v.value=[...m,...i.map(({deviceId:s,label:n})=>({label:`${n} (ID: ${s})`,constraints:{deviceId:s}}))],h.value=""}function S(a,i){for(const s of a){const[n,...y]=s.cornerPoints;i.strokeStyle="red",i.beginPath(),i.moveTo(n.x,n.y);for(const{x:p,y:e}of y)i.lineTo(p,e);i.lineTo(n.x,n.y),i.closePath(),i.stroke()}}function w(a,i){for(const s of a){const{boundingBox:{x:n,y,width:p,height:e}}=s;i.lineWidth=2,i.strokeStyle="#007bff",i.strokeRect(n,y,p,e)}}function T(a,i){for(const s of a){const{boundingBox:n,rawValue:y}=s,p=n.x+n.width/2,e=n.y+n.height/2,N=Math.max(12,50*n.width/i.canvas.width);i.font=`bold ${N}px sans-serif`,i.textAlign="center",i.lineWidth=3,i.strokeStyle="#35495e",i.strokeText(s.rawValue,p,e),i.fillStyle="#5cb984",i.fillText(y,p,e)}}const b=[{text:"nothing (default)",value:void 0},{text:"outline",value:S},{text:"centered text",value:T},{text:"bounding box",value:w}],C=E(b[1]),g=E({aztec:!1,code_128:!1,code_39:!1,code_93:!1,codabar:!1,databar:!1,databar_expanded:!1,data_matrix:!1,dx_film_edge:!1,ean_13:!1,ean_8:!1,itf:!1,maxi_code:!1,micro_qr_code:!1,pdf417:!1,qr_code:!0,rm_qr_code:!1,upc_a:!1,upc_e:!1,linear_codes:!1,matrix_codes:!1}),O=V(()=>Object.keys(g.value).filter(a=>g.value[a])),h=E("");function P(a){h.value=`[${a.name}]: `,a.name==="NotAllowedError"?h.value+="you need to grant camera access permission":a.name==="NotFoundError"?h.value+="no camera on this device":a.name==="NotSupportedError"?h.value+="secure context required (HTTPS, localhost)":a.name==="NotReadableError"?h.value+="is the camera already in use?":a.name==="OverconstrainedError"?h.value+="installed cameras are not suitable":a.name==="StreamApiNotSupportedError"?h.value+="Stream API is not supported in this browser":a.name==="InsecureContextError"?h.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":h.value+=a.message}return(a,i)=>(t(),k("div",null,[l("p",null,[c(" Modern mobile phones often have a variety of different cameras installed (e.g. front, rear, wide-angle, infrared, desk-view). The one picked by default is sometimes not the best choice. For more fine-grained control, you can select a camera by device constraints or by the device ID: "),u(l("select",{"onUpdate:modelValue":i[0]||(i[0]=s=>d.value=s)},[(t(!0),k(B,null,f(v.value,s=>(t(),k("option",{key:s.label,value:s.constraints},o(s.label),9,X))),128))],512),[[x,d.value]])]),l("p",null,[c(" Detected codes are visually highlighted in real-time. Use the following dropdown to change the flavor: "),u(l("select",{"onUpdate:modelValue":i[1]||(i[1]=s=>C.value=s)},[(t(),k(B,null,f(b,s=>l("option",{key:s.text,value:s},o(s.text),9,J)),64))],512),[[x,C.value]])]),l("p",null,[c(" By default only QR-codes are detected but a variety of other barcode formats are also supported. You can select one or multiple but the more you select the more expensive scanning becomes: "),L,(t(!0),k(B,null,f(Object.keys(g.value),s=>(t(),k("span",{key:s,class:"barcode-format-checkbox"},[u(l("input",{type:"checkbox","onUpdate:modelValue":n=>g.value[s]=n,id:s},null,8,G),[[M,g.value[s]]]),l("label",{for:s},o(s),9,K)]))),128))]),l("p",Z,o(h.value),1),l("p",ss,[c(" Last result: "),l("b",null,o(F.value),1)]),l("div",null,[D($(Q),{constraints:d.value,track:C.value.value,formats:O.value,onError:P,onDetect:A,onCameraOn:q},null,8,["constraints","track","formats"])])]))}}),as=H(is,[["__scopeId","data-v-df3f27d7"]]),ns=l("h1",{id:"full-demo",tabindex:"-1"},[c("Full Demo "),l("a",{class:"header-anchor",href:"#full-demo","aria-label":'Permalink to "Full Demo"'},"​")],-1),ls=j(`

Source

vue
<template>
+import{_ as I}from"./chunks/camera.DhcMeik-.js";import{d as _,h as E,g as V,o as t,c as k,k as l,a as c,a4 as u,a5 as x,F as B,E as f,t as o,I as D,m as $,a6 as M,p as R,q as U,_ as H,D as Y,w as z,R as j}from"./chunks/framework.BtL3uYYi.js";import{_ as Q}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";const W=r=>(R("data-v-df3f27d7"),r=r(),U(),r),X=["value"],J=["value"],L=W(()=>l("br",null,null,-1)),G=["onUpdate:modelValue","id"],K=["for"],Z={class:"error"},ss={class:"decode-result"},is=_({__name:"FullDemo",setup(r){const F=E("");function A(a){console.log(a),F.value=JSON.stringify(a.map(i=>i.rawValue))}const d=E({facingMode:"environment"}),m=[{label:"rear camera",constraints:{facingMode:"environment"}},{label:"front camera",constraints:{facingMode:"user"}}],v=E(m);async function q(){const i=(await navigator.mediaDevices.enumerateDevices()).filter(({kind:s})=>s==="videoinput");v.value=[...m,...i.map(({deviceId:s,label:n})=>({label:`${n} (ID: ${s})`,constraints:{deviceId:s}}))],h.value=""}function S(a,i){for(const s of a){const[n,...y]=s.cornerPoints;i.strokeStyle="red",i.beginPath(),i.moveTo(n.x,n.y);for(const{x:p,y:e}of y)i.lineTo(p,e);i.lineTo(n.x,n.y),i.closePath(),i.stroke()}}function w(a,i){for(const s of a){const{boundingBox:{x:n,y,width:p,height:e}}=s;i.lineWidth=2,i.strokeStyle="#007bff",i.strokeRect(n,y,p,e)}}function T(a,i){for(const s of a){const{boundingBox:n,rawValue:y}=s,p=n.x+n.width/2,e=n.y+n.height/2,N=Math.max(12,50*n.width/i.canvas.width);i.font=`bold ${N}px sans-serif`,i.textAlign="center",i.lineWidth=3,i.strokeStyle="#35495e",i.strokeText(s.rawValue,p,e),i.fillStyle="#5cb984",i.fillText(y,p,e)}}const b=[{text:"nothing (default)",value:void 0},{text:"outline",value:S},{text:"centered text",value:T},{text:"bounding box",value:w}],C=E(b[1]),g=E({aztec:!1,code_128:!1,code_39:!1,code_93:!1,codabar:!1,databar:!1,databar_expanded:!1,data_matrix:!1,dx_film_edge:!1,ean_13:!1,ean_8:!1,itf:!1,maxi_code:!1,micro_qr_code:!1,pdf417:!1,qr_code:!0,rm_qr_code:!1,upc_a:!1,upc_e:!1,linear_codes:!1,matrix_codes:!1}),O=V(()=>Object.keys(g.value).filter(a=>g.value[a])),h=E("");function P(a){h.value=`[${a.name}]: `,a.name==="NotAllowedError"?h.value+="you need to grant camera access permission":a.name==="NotFoundError"?h.value+="no camera on this device":a.name==="NotSupportedError"?h.value+="secure context required (HTTPS, localhost)":a.name==="NotReadableError"?h.value+="is the camera already in use?":a.name==="OverconstrainedError"?h.value+="installed cameras are not suitable":a.name==="StreamApiNotSupportedError"?h.value+="Stream API is not supported in this browser":a.name==="InsecureContextError"?h.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":h.value+=a.message}return(a,i)=>(t(),k("div",null,[l("p",null,[c(" Modern mobile phones often have a variety of different cameras installed (e.g. front, rear, wide-angle, infrared, desk-view). The one picked by default is sometimes not the best choice. For more fine-grained control, you can select a camera by device constraints or by the device ID: "),u(l("select",{"onUpdate:modelValue":i[0]||(i[0]=s=>d.value=s)},[(t(!0),k(B,null,f(v.value,s=>(t(),k("option",{key:s.label,value:s.constraints},o(s.label),9,X))),128))],512),[[x,d.value]])]),l("p",null,[c(" Detected codes are visually highlighted in real-time. Use the following dropdown to change the flavor: "),u(l("select",{"onUpdate:modelValue":i[1]||(i[1]=s=>C.value=s)},[(t(),k(B,null,f(b,s=>l("option",{key:s.text,value:s},o(s.text),9,J)),64))],512),[[x,C.value]])]),l("p",null,[c(" By default only QR-codes are detected but a variety of other barcode formats are also supported. You can select one or multiple but the more you select the more expensive scanning becomes: "),L,(t(!0),k(B,null,f(Object.keys(g.value),s=>(t(),k("span",{key:s,class:"barcode-format-checkbox"},[u(l("input",{type:"checkbox","onUpdate:modelValue":n=>g.value[s]=n,id:s},null,8,G),[[M,g.value[s]]]),l("label",{for:s},o(s),9,K)]))),128))]),l("p",Z,o(h.value),1),l("p",ss,[c(" Last result: "),l("b",null,o(F.value),1)]),l("div",null,[D($(Q),{constraints:d.value,track:C.value.value,formats:O.value,onError:P,onDetect:A,onCameraOn:q},null,8,["constraints","track","formats"])])]))}}),as=H(is,[["__scopeId","data-v-df3f27d7"]]),ns=l("h1",{id:"full-demo",tabindex:"-1"},[c("Full Demo "),l("a",{class:"header-anchor",href:"#full-demo","aria-label":'Permalink to "Full Demo"'},"​")],-1),ls=j(`

Source

vue
<template>
   <div>
     <p>
       Modern mobile phones often have a variety of different cameras installed (e.g. front, rear,
diff --git a/pr-preview/pr-449/assets/demos_Fullscreen.md.CMW7y2Ip.js b/pr-preview/pr-449/assets/demos_Fullscreen.md.h2cqoaSc.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_Fullscreen.md.CMW7y2Ip.js
rename to pr-preview/pr-449/assets/demos_Fullscreen.md.h2cqoaSc.js
index 81112329..daba49aa 100644
--- a/pr-preview/pr-449/assets/demos_Fullscreen.md.CMW7y2Ip.js
+++ b/pr-preview/pr-449/assets/demos_Fullscreen.md.h2cqoaSc.js
@@ -1,4 +1,4 @@
-import{_ as y}from"./chunks/camera.BJQyjlnn.js";import{_ as F,f as o,D as t,o as k,c as E,I as e,w as r,k as i,n as u,d as C,a as d,R as m}from"./chunks/framework.BtL3uYYi.js";import{_ as f}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";const B={components:{QrcodeStream:f},data(){return{fullscreen:!1}},computed:{fullscreenIcon(){return this.fullscreen?"/fullscreen-exit.svg":"/fullscreen.svg"}},watch:{fullscreen(s){s?this.requestFullscreen():this.exitFullscreen()}},methods:{onFullscreenChange(s){this.fullscreen=document.fullscreenElement!==null},requestFullscreen(){const s=this.$refs.wrapper;s.requestFullscreen?s.requestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.webkitRequestFullscreen?s.webkitRequestFullscreen():s.msRequestFullscreen&&s.msRequestFullscreen()},exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},logErrors:console.error,withBase:o}},A=["src"];function D(s,a,c,h,l,n){const g=t("qrcode-stream");return k(),E("div",{class:u({fullscreen:l.fullscreen}),ref:"wrapper",onFullscreenchange:a[1]||(a[1]=(...p)=>n.onFullscreenChange&&n.onFullscreenChange(...p))},[e(g,{onError:n.logErrors},{default:r(()=>[i("button",{onClick:a[0]||(a[0]=p=>l.fullscreen=!l.fullscreen),class:"fullscreen-button"},[i("img",{src:n.withBase(n.fullscreenIcon),alt:"toggle fullscreen"},null,8,A)])]),_:1},8,["onError"])],34)}const q=F(B,[["render",D],["__scopeId","data-v-39d64d0c"]]),_=i("h1",{id:"fullscreen",tabindex:"-1"},[d("Fullscreen "),i("a",{class:"header-anchor",href:"#fullscreen","aria-label":'Permalink to "Fullscreen"'},"​")],-1),b=i("p",null,[i("code",null,"QrcodeStream"),d(" always covers the entire space available. Not more, not less. So to go fullscreen, simply put the component in a wrapper element that occupies the entire screen.")],-1),x=m(`

Source

vue
<template>
+import{_ as y}from"./chunks/camera.DhcMeik-.js";import{_ as F,f as o,D as t,o as k,c as E,I as e,w as r,k as i,n as u,d as C,a as d,R as m}from"./chunks/framework.BtL3uYYi.js";import{_ as f}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";const B={components:{QrcodeStream:f},data(){return{fullscreen:!1}},computed:{fullscreenIcon(){return this.fullscreen?"/fullscreen-exit.svg":"/fullscreen.svg"}},watch:{fullscreen(s){s?this.requestFullscreen():this.exitFullscreen()}},methods:{onFullscreenChange(s){this.fullscreen=document.fullscreenElement!==null},requestFullscreen(){const s=this.$refs.wrapper;s.requestFullscreen?s.requestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.webkitRequestFullscreen?s.webkitRequestFullscreen():s.msRequestFullscreen&&s.msRequestFullscreen()},exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},logErrors:console.error,withBase:o}},A=["src"];function D(s,a,c,h,l,n){const g=t("qrcode-stream");return k(),E("div",{class:u({fullscreen:l.fullscreen}),ref:"wrapper",onFullscreenchange:a[1]||(a[1]=(...p)=>n.onFullscreenChange&&n.onFullscreenChange(...p))},[e(g,{onError:n.logErrors},{default:r(()=>[i("button",{onClick:a[0]||(a[0]=p=>l.fullscreen=!l.fullscreen),class:"fullscreen-button"},[i("img",{src:n.withBase(n.fullscreenIcon),alt:"toggle fullscreen"},null,8,A)])]),_:1},8,["onError"])],34)}const q=F(B,[["render",D],["__scopeId","data-v-39d64d0c"]]),_=i("h1",{id:"fullscreen",tabindex:"-1"},[d("Fullscreen "),i("a",{class:"header-anchor",href:"#fullscreen","aria-label":'Permalink to "Fullscreen"'},"​")],-1),b=i("p",null,[i("code",null,"QrcodeStream"),d(" always covers the entire space available. Not more, not less. So to go fullscreen, simply put the component in a wrapper element that occupies the entire screen.")],-1),x=m(`

Source

vue
<template>
   <div
     :class="{ fullscreen: fullscreen }"
     ref="wrapper"
diff --git a/pr-preview/pr-449/assets/demos_Fullscreen.md.CMW7y2Ip.lean.js b/pr-preview/pr-449/assets/demos_Fullscreen.md.h2cqoaSc.lean.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_Fullscreen.md.CMW7y2Ip.lean.js
rename to pr-preview/pr-449/assets/demos_Fullscreen.md.h2cqoaSc.lean.js
index 81112329..daba49aa 100644
--- a/pr-preview/pr-449/assets/demos_Fullscreen.md.CMW7y2Ip.lean.js
+++ b/pr-preview/pr-449/assets/demos_Fullscreen.md.h2cqoaSc.lean.js
@@ -1,4 +1,4 @@
-import{_ as y}from"./chunks/camera.BJQyjlnn.js";import{_ as F,f as o,D as t,o as k,c as E,I as e,w as r,k as i,n as u,d as C,a as d,R as m}from"./chunks/framework.BtL3uYYi.js";import{_ as f}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";const B={components:{QrcodeStream:f},data(){return{fullscreen:!1}},computed:{fullscreenIcon(){return this.fullscreen?"/fullscreen-exit.svg":"/fullscreen.svg"}},watch:{fullscreen(s){s?this.requestFullscreen():this.exitFullscreen()}},methods:{onFullscreenChange(s){this.fullscreen=document.fullscreenElement!==null},requestFullscreen(){const s=this.$refs.wrapper;s.requestFullscreen?s.requestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.webkitRequestFullscreen?s.webkitRequestFullscreen():s.msRequestFullscreen&&s.msRequestFullscreen()},exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},logErrors:console.error,withBase:o}},A=["src"];function D(s,a,c,h,l,n){const g=t("qrcode-stream");return k(),E("div",{class:u({fullscreen:l.fullscreen}),ref:"wrapper",onFullscreenchange:a[1]||(a[1]=(...p)=>n.onFullscreenChange&&n.onFullscreenChange(...p))},[e(g,{onError:n.logErrors},{default:r(()=>[i("button",{onClick:a[0]||(a[0]=p=>l.fullscreen=!l.fullscreen),class:"fullscreen-button"},[i("img",{src:n.withBase(n.fullscreenIcon),alt:"toggle fullscreen"},null,8,A)])]),_:1},8,["onError"])],34)}const q=F(B,[["render",D],["__scopeId","data-v-39d64d0c"]]),_=i("h1",{id:"fullscreen",tabindex:"-1"},[d("Fullscreen "),i("a",{class:"header-anchor",href:"#fullscreen","aria-label":'Permalink to "Fullscreen"'},"​")],-1),b=i("p",null,[i("code",null,"QrcodeStream"),d(" always covers the entire space available. Not more, not less. So to go fullscreen, simply put the component in a wrapper element that occupies the entire screen.")],-1),x=m(`

Source

vue
<template>
+import{_ as y}from"./chunks/camera.DhcMeik-.js";import{_ as F,f as o,D as t,o as k,c as E,I as e,w as r,k as i,n as u,d as C,a as d,R as m}from"./chunks/framework.BtL3uYYi.js";import{_ as f}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";const B={components:{QrcodeStream:f},data(){return{fullscreen:!1}},computed:{fullscreenIcon(){return this.fullscreen?"/fullscreen-exit.svg":"/fullscreen.svg"}},watch:{fullscreen(s){s?this.requestFullscreen():this.exitFullscreen()}},methods:{onFullscreenChange(s){this.fullscreen=document.fullscreenElement!==null},requestFullscreen(){const s=this.$refs.wrapper;s.requestFullscreen?s.requestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.webkitRequestFullscreen?s.webkitRequestFullscreen():s.msRequestFullscreen&&s.msRequestFullscreen()},exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},logErrors:console.error,withBase:o}},A=["src"];function D(s,a,c,h,l,n){const g=t("qrcode-stream");return k(),E("div",{class:u({fullscreen:l.fullscreen}),ref:"wrapper",onFullscreenchange:a[1]||(a[1]=(...p)=>n.onFullscreenChange&&n.onFullscreenChange(...p))},[e(g,{onError:n.logErrors},{default:r(()=>[i("button",{onClick:a[0]||(a[0]=p=>l.fullscreen=!l.fullscreen),class:"fullscreen-button"},[i("img",{src:n.withBase(n.fullscreenIcon),alt:"toggle fullscreen"},null,8,A)])]),_:1},8,["onError"])],34)}const q=F(B,[["render",D],["__scopeId","data-v-39d64d0c"]]),_=i("h1",{id:"fullscreen",tabindex:"-1"},[d("Fullscreen "),i("a",{class:"header-anchor",href:"#fullscreen","aria-label":'Permalink to "Fullscreen"'},"​")],-1),b=i("p",null,[i("code",null,"QrcodeStream"),d(" always covers the entire space available. Not more, not less. So to go fullscreen, simply put the component in a wrapper element that occupies the entire screen.")],-1),x=m(`

Source

vue
<template>
   <div
     :class="{ fullscreen: fullscreen }"
     ref="wrapper"
diff --git a/pr-preview/pr-449/assets/demos_LoadingIndicator.md.BVZFqNj1.js b/pr-preview/pr-449/assets/demos_LoadingIndicator.md.CPwUJoov.js
similarity index 98%
rename from pr-preview/pr-449/assets/demos_LoadingIndicator.md.BVZFqNj1.js
rename to pr-preview/pr-449/assets/demos_LoadingIndicator.md.CPwUJoov.js
index bdde5763..7703dfd3 100644
--- a/pr-preview/pr-449/assets/demos_LoadingIndicator.md.BVZFqNj1.js
+++ b/pr-preview/pr-449/assets/demos_LoadingIndicator.md.CPwUJoov.js
@@ -1,4 +1,4 @@
-import{_ as y}from"./chunks/camera.BJQyjlnn.js";import{_ as F}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";import{_ as C,D as E,o as i,c as t,k as s,b as m,w as r,e,d as u,I as k,a as l,R as _}from"./chunks/framework.BtL3uYYi.js";const B={components:{QrcodeStream:F},data(){return{loading:!0,destroyed:!1}},methods:{onCameraOn(){this.loading=!1},async reload(){this.destroyed=!0,await this.$nextTick(),this.destroyed=!1,this.loading=!0}}},f={key:0,class:"loading-indicator"};function D(d,a,o,h,p,n){const g=E("qrcode-stream");return i(),t("div",null,[s("button",{onClick:a[0]||(a[0]=(...c)=>n.reload&&n.reload(...c))},"Destroy And Re-Create Component"),p.destroyed?e("",!0):(i(),m(g,{key:0,onCameraOn:n.onCameraOn},{default:r(()=>[p.loading?(i(),t("div",f," Loading... ")):e("",!0)]),_:1},8,["onCameraOn"]))])}const A=C(B,[["render",D],["__scopeId","data-v-3ae3ffac"]]),v=s("h1",{id:"show-loading-indicator",tabindex:"-1"},[l("Show Loading Indicator "),s("a",{class:"header-anchor",href:"#show-loading-indicator","aria-label":'Permalink to "Show Loading Indicator"'},"​")],-1),b=s("p",null,[l("There is some delay between mounting the component and the camera stream becoming visible. Listen for the "),s("code",null,"camera-on"),l(" event to show a loading indicator.")],-1),q=s("p",null,"Push the button below to force destroy and re-create the component.",-1),w=_(`

Source

vue
<template>
+import{_ as y}from"./chunks/camera.DhcMeik-.js";import{_ as F}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";import{_ as C,D as E,o as i,c as t,k as s,b as m,w as r,e,d as u,I as k,a as l,R as _}from"./chunks/framework.BtL3uYYi.js";const B={components:{QrcodeStream:F},data(){return{loading:!0,destroyed:!1}},methods:{onCameraOn(){this.loading=!1},async reload(){this.destroyed=!0,await this.$nextTick(),this.destroyed=!1,this.loading=!0}}},f={key:0,class:"loading-indicator"};function D(d,a,o,h,p,n){const g=E("qrcode-stream");return i(),t("div",null,[s("button",{onClick:a[0]||(a[0]=(...c)=>n.reload&&n.reload(...c))},"Destroy And Re-Create Component"),p.destroyed?e("",!0):(i(),m(g,{key:0,onCameraOn:n.onCameraOn},{default:r(()=>[p.loading?(i(),t("div",f," Loading... ")):e("",!0)]),_:1},8,["onCameraOn"]))])}const A=C(B,[["render",D],["__scopeId","data-v-3ae3ffac"]]),v=s("h1",{id:"show-loading-indicator",tabindex:"-1"},[l("Show Loading Indicator "),s("a",{class:"header-anchor",href:"#show-loading-indicator","aria-label":'Permalink to "Show Loading Indicator"'},"​")],-1),b=s("p",null,[l("There is some delay between mounting the component and the camera stream becoming visible. Listen for the "),s("code",null,"camera-on"),l(" event to show a loading indicator.")],-1),q=s("p",null,"Push the button below to force destroy and re-create the component.",-1),w=_(`

Source

vue
<template>
   <div>
     <button @click="reload">Destroy And Re-Create Component</button>
 
diff --git a/pr-preview/pr-449/assets/demos_LoadingIndicator.md.BVZFqNj1.lean.js b/pr-preview/pr-449/assets/demos_LoadingIndicator.md.CPwUJoov.lean.js
similarity index 98%
rename from pr-preview/pr-449/assets/demos_LoadingIndicator.md.BVZFqNj1.lean.js
rename to pr-preview/pr-449/assets/demos_LoadingIndicator.md.CPwUJoov.lean.js
index bdde5763..7703dfd3 100644
--- a/pr-preview/pr-449/assets/demos_LoadingIndicator.md.BVZFqNj1.lean.js
+++ b/pr-preview/pr-449/assets/demos_LoadingIndicator.md.CPwUJoov.lean.js
@@ -1,4 +1,4 @@
-import{_ as y}from"./chunks/camera.BJQyjlnn.js";import{_ as F}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";import{_ as C,D as E,o as i,c as t,k as s,b as m,w as r,e,d as u,I as k,a as l,R as _}from"./chunks/framework.BtL3uYYi.js";const B={components:{QrcodeStream:F},data(){return{loading:!0,destroyed:!1}},methods:{onCameraOn(){this.loading=!1},async reload(){this.destroyed=!0,await this.$nextTick(),this.destroyed=!1,this.loading=!0}}},f={key:0,class:"loading-indicator"};function D(d,a,o,h,p,n){const g=E("qrcode-stream");return i(),t("div",null,[s("button",{onClick:a[0]||(a[0]=(...c)=>n.reload&&n.reload(...c))},"Destroy And Re-Create Component"),p.destroyed?e("",!0):(i(),m(g,{key:0,onCameraOn:n.onCameraOn},{default:r(()=>[p.loading?(i(),t("div",f," Loading... ")):e("",!0)]),_:1},8,["onCameraOn"]))])}const A=C(B,[["render",D],["__scopeId","data-v-3ae3ffac"]]),v=s("h1",{id:"show-loading-indicator",tabindex:"-1"},[l("Show Loading Indicator "),s("a",{class:"header-anchor",href:"#show-loading-indicator","aria-label":'Permalink to "Show Loading Indicator"'},"​")],-1),b=s("p",null,[l("There is some delay between mounting the component and the camera stream becoming visible. Listen for the "),s("code",null,"camera-on"),l(" event to show a loading indicator.")],-1),q=s("p",null,"Push the button below to force destroy and re-create the component.",-1),w=_(`

Source

vue
<template>
+import{_ as y}from"./chunks/camera.DhcMeik-.js";import{_ as F}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";import{_ as C,D as E,o as i,c as t,k as s,b as m,w as r,e,d as u,I as k,a as l,R as _}from"./chunks/framework.BtL3uYYi.js";const B={components:{QrcodeStream:F},data(){return{loading:!0,destroyed:!1}},methods:{onCameraOn(){this.loading=!1},async reload(){this.destroyed=!0,await this.$nextTick(),this.destroyed=!1,this.loading=!0}}},f={key:0,class:"loading-indicator"};function D(d,a,o,h,p,n){const g=E("qrcode-stream");return i(),t("div",null,[s("button",{onClick:a[0]||(a[0]=(...c)=>n.reload&&n.reload(...c))},"Destroy And Re-Create Component"),p.destroyed?e("",!0):(i(),m(g,{key:0,onCameraOn:n.onCameraOn},{default:r(()=>[p.loading?(i(),t("div",f," Loading... ")):e("",!0)]),_:1},8,["onCameraOn"]))])}const A=C(B,[["render",D],["__scopeId","data-v-3ae3ffac"]]),v=s("h1",{id:"show-loading-indicator",tabindex:"-1"},[l("Show Loading Indicator "),s("a",{class:"header-anchor",href:"#show-loading-indicator","aria-label":'Permalink to "Show Loading Indicator"'},"​")],-1),b=s("p",null,[l("There is some delay between mounting the component and the camera stream becoming visible. Listen for the "),s("code",null,"camera-on"),l(" event to show a loading indicator.")],-1),q=s("p",null,"Push the button below to force destroy and re-create the component.",-1),w=_(`

Source

vue
<template>
   <div>
     <button @click="reload">Destroy And Re-Create Component</button>
 
diff --git a/pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.M3YU2Vzr.js b/pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.M3YU2Vzr.js
rename to pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.js
index 2edec72f..319b73e0 100644
--- a/pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.M3YU2Vzr.js
+++ b/pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.js
@@ -1,4 +1,4 @@
-import{_ as o}from"./chunks/camera.BJQyjlnn.js";import{_ as c,f as y,D as p,o as e,c as E,k as s,a as i,t as F,I as l,w as r,a4 as C,a7 as m,d as u,R as B}from"./chunks/framework.BtL3uYYi.js";import{_ as f}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";const _={components:{QrcodeStream:f},data(){return{paused:!1,result:"",showScanConfirmation:!1}},methods:{onCameraOn(){this.showScanConfirmation=!1},onCameraOff(){this.showScanConfirmation=!0},onError:console.error,async onDetect(a){this.result=JSON.stringify(a.map(n=>n.rawValue)),this.paused=!0,await this.timeout(500),this.paused=!1},timeout(a){return new Promise(n=>{window.setTimeout(n,a)})},withBase:y}},D={class:"decode-result"},w={class:"scan-confirmation"},A=["src"];function S(a,n,d,k,t,h){const g=p("qrcode-stream");return e(),E("div",null,[s("p",D,[i(" Last result: "),s("b",null,F(t.result),1)]),l(g,{paused:t.paused,onDetect:h.onDetect,onCameraOn:h.onCameraOn,onCameraOff:h.onCameraOff,onError:h.onError},{default:r(()=>[C(s("div",w,[s("img",{src:h.withBase("/checkmark.svg"),alt:"Checkmark",width:"128"},null,8,A)],512),[[m,t.showScanConfirmation]])]),_:1},8,["paused","onDetect","onCameraOn","onCameraOff","onError"])])}const q=c(_,[["render",S],["__scopeId","data-v-2c48d920"]]),v=s("h1",{id:"scan-same-qr-code-more-than-once",tabindex:"-1"},[i("Scan Same QR Code More Than Once "),s("a",{class:"header-anchor",href:"#scan-same-qr-code-more-than-once","aria-label":'Permalink to "Scan Same QR Code More Than Once"'},"​")],-1),O=s("p",null,[i("You might have noticed that scanning the same QR code again doesn't work. The thing is when a QR code is in the view of your the camera it's decoded multiple times a second. You don't want to be flooded with "),s("code",null,"detect"),i(` events that often though. That's why the last decoded QR code is "cached" and an event is only emitted, when the decoded content changes.`)],-1),b=s("p",null,[i("However this cache is reset when you change the "),s("code",null,"paused"),i(" prop. We can exploit that to scan same QR codes multiple times in a row.")],-1),Q=B(`

Source

vue
<template>
+import{_ as o}from"./chunks/camera.DhcMeik-.js";import{_ as c,f as y,D as p,o as e,c as E,k as s,a as i,t as F,I as l,w as r,a4 as C,a7 as m,d as u,R as B}from"./chunks/framework.BtL3uYYi.js";import{_ as f}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";const _={components:{QrcodeStream:f},data(){return{paused:!1,result:"",showScanConfirmation:!1}},methods:{onCameraOn(){this.showScanConfirmation=!1},onCameraOff(){this.showScanConfirmation=!0},onError:console.error,async onDetect(a){this.result=JSON.stringify(a.map(n=>n.rawValue)),this.paused=!0,await this.timeout(500),this.paused=!1},timeout(a){return new Promise(n=>{window.setTimeout(n,a)})},withBase:y}},D={class:"decode-result"},w={class:"scan-confirmation"},A=["src"];function S(a,n,d,k,t,h){const g=p("qrcode-stream");return e(),E("div",null,[s("p",D,[i(" Last result: "),s("b",null,F(t.result),1)]),l(g,{paused:t.paused,onDetect:h.onDetect,onCameraOn:h.onCameraOn,onCameraOff:h.onCameraOff,onError:h.onError},{default:r(()=>[C(s("div",w,[s("img",{src:h.withBase("/checkmark.svg"),alt:"Checkmark",width:"128"},null,8,A)],512),[[m,t.showScanConfirmation]])]),_:1},8,["paused","onDetect","onCameraOn","onCameraOff","onError"])])}const q=c(_,[["render",S],["__scopeId","data-v-2c48d920"]]),v=s("h1",{id:"scan-same-qr-code-more-than-once",tabindex:"-1"},[i("Scan Same QR Code More Than Once "),s("a",{class:"header-anchor",href:"#scan-same-qr-code-more-than-once","aria-label":'Permalink to "Scan Same QR Code More Than Once"'},"​")],-1),O=s("p",null,[i("You might have noticed that scanning the same QR code again doesn't work. The thing is when a QR code is in the view of your the camera it's decoded multiple times a second. You don't want to be flooded with "),s("code",null,"detect"),i(` events that often though. That's why the last decoded QR code is "cached" and an event is only emitted, when the decoded content changes.`)],-1),b=s("p",null,[i("However this cache is reset when you change the "),s("code",null,"paused"),i(" prop. We can exploit that to scan same QR codes multiple times in a row.")],-1),Q=B(`

Source

vue
<template>
   <div>
     <p class="decode-result">
       Last result: <b>{{ result }}</b>
diff --git a/pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.M3YU2Vzr.lean.js b/pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.lean.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.M3YU2Vzr.lean.js
rename to pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.lean.js
index 2edec72f..319b73e0 100644
--- a/pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.M3YU2Vzr.lean.js
+++ b/pr-preview/pr-449/assets/demos_ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.lean.js
@@ -1,4 +1,4 @@
-import{_ as o}from"./chunks/camera.BJQyjlnn.js";import{_ as c,f as y,D as p,o as e,c as E,k as s,a as i,t as F,I as l,w as r,a4 as C,a7 as m,d as u,R as B}from"./chunks/framework.BtL3uYYi.js";import{_ as f}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";const _={components:{QrcodeStream:f},data(){return{paused:!1,result:"",showScanConfirmation:!1}},methods:{onCameraOn(){this.showScanConfirmation=!1},onCameraOff(){this.showScanConfirmation=!0},onError:console.error,async onDetect(a){this.result=JSON.stringify(a.map(n=>n.rawValue)),this.paused=!0,await this.timeout(500),this.paused=!1},timeout(a){return new Promise(n=>{window.setTimeout(n,a)})},withBase:y}},D={class:"decode-result"},w={class:"scan-confirmation"},A=["src"];function S(a,n,d,k,t,h){const g=p("qrcode-stream");return e(),E("div",null,[s("p",D,[i(" Last result: "),s("b",null,F(t.result),1)]),l(g,{paused:t.paused,onDetect:h.onDetect,onCameraOn:h.onCameraOn,onCameraOff:h.onCameraOff,onError:h.onError},{default:r(()=>[C(s("div",w,[s("img",{src:h.withBase("/checkmark.svg"),alt:"Checkmark",width:"128"},null,8,A)],512),[[m,t.showScanConfirmation]])]),_:1},8,["paused","onDetect","onCameraOn","onCameraOff","onError"])])}const q=c(_,[["render",S],["__scopeId","data-v-2c48d920"]]),v=s("h1",{id:"scan-same-qr-code-more-than-once",tabindex:"-1"},[i("Scan Same QR Code More Than Once "),s("a",{class:"header-anchor",href:"#scan-same-qr-code-more-than-once","aria-label":'Permalink to "Scan Same QR Code More Than Once"'},"​")],-1),O=s("p",null,[i("You might have noticed that scanning the same QR code again doesn't work. The thing is when a QR code is in the view of your the camera it's decoded multiple times a second. You don't want to be flooded with "),s("code",null,"detect"),i(` events that often though. That's why the last decoded QR code is "cached" and an event is only emitted, when the decoded content changes.`)],-1),b=s("p",null,[i("However this cache is reset when you change the "),s("code",null,"paused"),i(" prop. We can exploit that to scan same QR codes multiple times in a row.")],-1),Q=B(`

Source

vue
<template>
+import{_ as o}from"./chunks/camera.DhcMeik-.js";import{_ as c,f as y,D as p,o as e,c as E,k as s,a as i,t as F,I as l,w as r,a4 as C,a7 as m,d as u,R as B}from"./chunks/framework.BtL3uYYi.js";import{_ as f}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";const _={components:{QrcodeStream:f},data(){return{paused:!1,result:"",showScanConfirmation:!1}},methods:{onCameraOn(){this.showScanConfirmation=!1},onCameraOff(){this.showScanConfirmation=!0},onError:console.error,async onDetect(a){this.result=JSON.stringify(a.map(n=>n.rawValue)),this.paused=!0,await this.timeout(500),this.paused=!1},timeout(a){return new Promise(n=>{window.setTimeout(n,a)})},withBase:y}},D={class:"decode-result"},w={class:"scan-confirmation"},A=["src"];function S(a,n,d,k,t,h){const g=p("qrcode-stream");return e(),E("div",null,[s("p",D,[i(" Last result: "),s("b",null,F(t.result),1)]),l(g,{paused:t.paused,onDetect:h.onDetect,onCameraOn:h.onCameraOn,onCameraOff:h.onCameraOff,onError:h.onError},{default:r(()=>[C(s("div",w,[s("img",{src:h.withBase("/checkmark.svg"),alt:"Checkmark",width:"128"},null,8,A)],512),[[m,t.showScanConfirmation]])]),_:1},8,["paused","onDetect","onCameraOn","onCameraOff","onError"])])}const q=c(_,[["render",S],["__scopeId","data-v-2c48d920"]]),v=s("h1",{id:"scan-same-qr-code-more-than-once",tabindex:"-1"},[i("Scan Same QR Code More Than Once "),s("a",{class:"header-anchor",href:"#scan-same-qr-code-more-than-once","aria-label":'Permalink to "Scan Same QR Code More Than Once"'},"​")],-1),O=s("p",null,[i("You might have noticed that scanning the same QR code again doesn't work. The thing is when a QR code is in the view of your the camera it's decoded multiple times a second. You don't want to be flooded with "),s("code",null,"detect"),i(` events that often though. That's why the last decoded QR code is "cached" and an event is only emitted, when the decoded content changes.`)],-1),b=s("p",null,[i("However this cache is reset when you change the "),s("code",null,"paused"),i(" prop. We can exploit that to scan same QR codes multiple times in a row.")],-1),Q=B(`

Source

vue
<template>
   <div>
     <p class="decode-result">
       Last result: <b>{{ result }}</b>
diff --git a/pr-preview/pr-449/assets/demos_SwitchCamera.md.B-obcuEB.js b/pr-preview/pr-449/assets/demos_SwitchCamera.md.CydEbheE.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_SwitchCamera.md.B-obcuEB.js
rename to pr-preview/pr-449/assets/demos_SwitchCamera.md.CydEbheE.js
index 18b367d0..a8d3b320 100644
--- a/pr-preview/pr-449/assets/demos_SwitchCamera.md.B-obcuEB.js
+++ b/pr-preview/pr-449/assets/demos_SwitchCamera.md.CydEbheE.js
@@ -1,4 +1,4 @@
-import{_ as c}from"./chunks/camera.BJQyjlnn.js";import{_ as y,f as F,D as E,o as t,c as l,e as r,I as e,w as d,k as a,d as C,a as m,R as u}from"./chunks/framework.BtL3uYYi.js";import{_ as B}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";const f={components:{QrcodeStream:B},data(){return{facingMode:"environment",noRearCamera:!1,noFrontCamera:!1}},methods:{switchCamera(){switch(this.facingMode){case"environment":this.facingMode="user";break;case"user":this.facingMode="environment";break}},onError(n){const s=this.facingMode==="user",p=this.facingMode==="environment",i=n.name==="OverconstrainedError";p&&i&&(this.noRearCamera=!0),s&&i&&(this.noFrontCamera=!0),console.error(n)},withBase:F}},D={key:0,class:"error"},A={key:1,class:"error"},_=["src"];function v(n,s,p,i,k,h){const g=E("qrcode-stream");return t(),l("div",null,[k.noFrontCamera?(t(),l("p",D," You don't seem to have a front camera on your device ")):r("",!0),k.noRearCamera?(t(),l("p",A," You don't seem to have a rear camera on your device ")):r("",!0),e(g,{constraints:{facingMode:k.facingMode},onError:h.onError},{default:d(()=>[a("button",{onClick:s[0]||(s[0]=(...o)=>h.switchCamera&&h.switchCamera(...o))},[a("img",{src:h.withBase("/camera-switch.svg"),alt:"switch camera"},null,8,_)])]),_:1},8,["constraints","onError"])])}const w=y(f,[["render",v],["__scopeId","data-v-6622b1c4"]]),q=a("h1",{id:"switch-to-front-camera",tabindex:"-1"},[m("Switch to Front Camera "),a("a",{class:"header-anchor",href:"#switch-to-front-camera","aria-label":'Permalink to "Switch to Front Camera"'},"​")],-1),b=a("p",null,"You can also allow users to choose the front or rear camera on their device.",-1),M=u(`

Source

vue
<template>
+import{_ as c}from"./chunks/camera.DhcMeik-.js";import{_ as y,f as F,D as E,o as t,c as l,e as r,I as e,w as d,k as a,d as C,a as m,R as u}from"./chunks/framework.BtL3uYYi.js";import{_ as B}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";const f={components:{QrcodeStream:B},data(){return{facingMode:"environment",noRearCamera:!1,noFrontCamera:!1}},methods:{switchCamera(){switch(this.facingMode){case"environment":this.facingMode="user";break;case"user":this.facingMode="environment";break}},onError(n){const s=this.facingMode==="user",p=this.facingMode==="environment",i=n.name==="OverconstrainedError";p&&i&&(this.noRearCamera=!0),s&&i&&(this.noFrontCamera=!0),console.error(n)},withBase:F}},D={key:0,class:"error"},A={key:1,class:"error"},_=["src"];function v(n,s,p,i,k,h){const g=E("qrcode-stream");return t(),l("div",null,[k.noFrontCamera?(t(),l("p",D," You don't seem to have a front camera on your device ")):r("",!0),k.noRearCamera?(t(),l("p",A," You don't seem to have a rear camera on your device ")):r("",!0),e(g,{constraints:{facingMode:k.facingMode},onError:h.onError},{default:d(()=>[a("button",{onClick:s[0]||(s[0]=(...o)=>h.switchCamera&&h.switchCamera(...o))},[a("img",{src:h.withBase("/camera-switch.svg"),alt:"switch camera"},null,8,_)])]),_:1},8,["constraints","onError"])])}const w=y(f,[["render",v],["__scopeId","data-v-6622b1c4"]]),q=a("h1",{id:"switch-to-front-camera",tabindex:"-1"},[m("Switch to Front Camera "),a("a",{class:"header-anchor",href:"#switch-to-front-camera","aria-label":'Permalink to "Switch to Front Camera"'},"​")],-1),b=a("p",null,"You can also allow users to choose the front or rear camera on their device.",-1),M=u(`

Source

vue
<template>
   <div>
     <p
       class="error"
diff --git a/pr-preview/pr-449/assets/demos_SwitchCamera.md.B-obcuEB.lean.js b/pr-preview/pr-449/assets/demos_SwitchCamera.md.CydEbheE.lean.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_SwitchCamera.md.B-obcuEB.lean.js
rename to pr-preview/pr-449/assets/demos_SwitchCamera.md.CydEbheE.lean.js
index 18b367d0..a8d3b320 100644
--- a/pr-preview/pr-449/assets/demos_SwitchCamera.md.B-obcuEB.lean.js
+++ b/pr-preview/pr-449/assets/demos_SwitchCamera.md.CydEbheE.lean.js
@@ -1,4 +1,4 @@
-import{_ as c}from"./chunks/camera.BJQyjlnn.js";import{_ as y,f as F,D as E,o as t,c as l,e as r,I as e,w as d,k as a,d as C,a as m,R as u}from"./chunks/framework.BtL3uYYi.js";import{_ as B}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";const f={components:{QrcodeStream:B},data(){return{facingMode:"environment",noRearCamera:!1,noFrontCamera:!1}},methods:{switchCamera(){switch(this.facingMode){case"environment":this.facingMode="user";break;case"user":this.facingMode="environment";break}},onError(n){const s=this.facingMode==="user",p=this.facingMode==="environment",i=n.name==="OverconstrainedError";p&&i&&(this.noRearCamera=!0),s&&i&&(this.noFrontCamera=!0),console.error(n)},withBase:F}},D={key:0,class:"error"},A={key:1,class:"error"},_=["src"];function v(n,s,p,i,k,h){const g=E("qrcode-stream");return t(),l("div",null,[k.noFrontCamera?(t(),l("p",D," You don't seem to have a front camera on your device ")):r("",!0),k.noRearCamera?(t(),l("p",A," You don't seem to have a rear camera on your device ")):r("",!0),e(g,{constraints:{facingMode:k.facingMode},onError:h.onError},{default:d(()=>[a("button",{onClick:s[0]||(s[0]=(...o)=>h.switchCamera&&h.switchCamera(...o))},[a("img",{src:h.withBase("/camera-switch.svg"),alt:"switch camera"},null,8,_)])]),_:1},8,["constraints","onError"])])}const w=y(f,[["render",v],["__scopeId","data-v-6622b1c4"]]),q=a("h1",{id:"switch-to-front-camera",tabindex:"-1"},[m("Switch to Front Camera "),a("a",{class:"header-anchor",href:"#switch-to-front-camera","aria-label":'Permalink to "Switch to Front Camera"'},"​")],-1),b=a("p",null,"You can also allow users to choose the front or rear camera on their device.",-1),M=u(`

Source

vue
<template>
+import{_ as c}from"./chunks/camera.DhcMeik-.js";import{_ as y,f as F,D as E,o as t,c as l,e as r,I as e,w as d,k as a,d as C,a as m,R as u}from"./chunks/framework.BtL3uYYi.js";import{_ as B}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";const f={components:{QrcodeStream:B},data(){return{facingMode:"environment",noRearCamera:!1,noFrontCamera:!1}},methods:{switchCamera(){switch(this.facingMode){case"environment":this.facingMode="user";break;case"user":this.facingMode="environment";break}},onError(n){const s=this.facingMode==="user",p=this.facingMode==="environment",i=n.name==="OverconstrainedError";p&&i&&(this.noRearCamera=!0),s&&i&&(this.noFrontCamera=!0),console.error(n)},withBase:F}},D={key:0,class:"error"},A={key:1,class:"error"},_=["src"];function v(n,s,p,i,k,h){const g=E("qrcode-stream");return t(),l("div",null,[k.noFrontCamera?(t(),l("p",D," You don't seem to have a front camera on your device ")):r("",!0),k.noRearCamera?(t(),l("p",A," You don't seem to have a rear camera on your device ")):r("",!0),e(g,{constraints:{facingMode:k.facingMode},onError:h.onError},{default:d(()=>[a("button",{onClick:s[0]||(s[0]=(...o)=>h.switchCamera&&h.switchCamera(...o))},[a("img",{src:h.withBase("/camera-switch.svg"),alt:"switch camera"},null,8,_)])]),_:1},8,["constraints","onError"])])}const w=y(f,[["render",v],["__scopeId","data-v-6622b1c4"]]),q=a("h1",{id:"switch-to-front-camera",tabindex:"-1"},[m("Switch to Front Camera "),a("a",{class:"header-anchor",href:"#switch-to-front-camera","aria-label":'Permalink to "Switch to Front Camera"'},"​")],-1),b=a("p",null,"You can also allow users to choose the front or rear camera on their device.",-1),M=u(`

Source

vue
<template>
   <div>
     <p
       class="error"
diff --git a/pr-preview/pr-449/assets/demos_Torch.md.AnpZuZA8.js b/pr-preview/pr-449/assets/demos_Torch.md.bksnySAD.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_Torch.md.AnpZuZA8.js
rename to pr-preview/pr-449/assets/demos_Torch.md.bksnySAD.js
index 351c1129..9d056346 100644
--- a/pr-preview/pr-449/assets/demos_Torch.md.AnpZuZA8.js
+++ b/pr-preview/pr-449/assets/demos_Torch.md.bksnySAD.js
@@ -1,4 +1,4 @@
-import{_ as B}from"./chunks/camera.BJQyjlnn.js";import{d as c,h as E,j as v,g as A,o as l,c as p,k as s,a as e,a4 as D,a5 as m,F as f,E as _,e as d,a8 as q,t as b,b as w,w as o,m as g,f as x,_ as N,D as S,I as y,R as I}from"./chunks/framework.BtL3uYYi.js";import{_ as T}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";const $=["value"],M={key:0,class:"error"},O=["disabled"],P=["src"],V=c({__name:"Torch",setup(F){const i=E(null),h=E([]);v(async()=>{h.value=(await navigator.mediaDevices.enumerateDevices()).filter(({kind:t})=>t==="videoinput"),h.value.length>0&&(i.value=h.value[0])});const a=E(!1),r=E(!1),u=A(()=>a.value?"/flash-off.svg":"/flash-on.svg");function C(t){console.log(t),r.value=!t.torch}return(t,k)=>(l(),p("div",null,[s("p",null,[e(" Pick camera: "),D(s("select",{"onUpdate:modelValue":k[0]||(k[0]=n=>i.value=n)},[(l(!0),p(f,null,_(h.value,n=>(l(),p("option",{key:n.label,value:n},b(n.label),9,$))),128))],512),[[m,i.value]])]),r.value?(l(),p("p",M," Torch not supported for active camera ")):d("",!0),i.value!==null?q([a.value,i.value.deviceId],()=>(l(),w(g(T),{key:1,torch:a.value,constraints:{deviceId:i.value.deviceId},onError:console.error,onCameraOn:C},{default:o(()=>[s("button",{onClick:k[1]||(k[1]=n=>a.value=!a.value),disabled:r.value},[s("img",{src:g(x)(u.value),alt:"toggle torch"},null,8,P)],8,O)]),_:1},8,["torch","constraints","onError"])),k,2):d("",!0)]))}}),U=N(V,[["__scopeId","data-v-cf37801d"]]),j=s("h1",{id:"torch-flashlight",tabindex:"-1"},[e("Torch (Flashlight) "),s("a",{class:"header-anchor",href:"#torch-flashlight","aria-label":'Permalink to "Torch (Flashlight)"'},"​")],-1),J=s("p",null,[e("In low-light conditions you might want to make use of the cameras flashlight. Using the "),s("code",null,"torch"),e(" prop, you can turn the flashlight on/off. Note that support is inconsistent across devices and browsers and can only be detected after already starting the camera.")],-1),L=s("p",null,[e("Feature sponsored by "),s("a",{href:"https://aeschbacher.ch",target:"_blank",rel:"noreferrer"},"aeschbacher.ch")],-1),Q=I(`

Source

vue
<template>
+import{_ as B}from"./chunks/camera.DhcMeik-.js";import{d as c,h as E,j as v,g as A,o as l,c as p,k as s,a as e,a4 as D,a5 as m,F as f,E as _,e as d,a8 as q,t as b,b as w,w as o,m as g,f as x,_ as N,D as S,I as y,R as I}from"./chunks/framework.BtL3uYYi.js";import{_ as T}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";const $=["value"],M={key:0,class:"error"},O=["disabled"],P=["src"],V=c({__name:"Torch",setup(F){const i=E(null),h=E([]);v(async()=>{h.value=(await navigator.mediaDevices.enumerateDevices()).filter(({kind:t})=>t==="videoinput"),h.value.length>0&&(i.value=h.value[0])});const a=E(!1),r=E(!1),u=A(()=>a.value?"/flash-off.svg":"/flash-on.svg");function C(t){console.log(t),r.value=!t.torch}return(t,k)=>(l(),p("div",null,[s("p",null,[e(" Pick camera: "),D(s("select",{"onUpdate:modelValue":k[0]||(k[0]=n=>i.value=n)},[(l(!0),p(f,null,_(h.value,n=>(l(),p("option",{key:n.label,value:n},b(n.label),9,$))),128))],512),[[m,i.value]])]),r.value?(l(),p("p",M," Torch not supported for active camera ")):d("",!0),i.value!==null?q([a.value,i.value.deviceId],()=>(l(),w(g(T),{key:1,torch:a.value,constraints:{deviceId:i.value.deviceId},onError:console.error,onCameraOn:C},{default:o(()=>[s("button",{onClick:k[1]||(k[1]=n=>a.value=!a.value),disabled:r.value},[s("img",{src:g(x)(u.value),alt:"toggle torch"},null,8,P)],8,O)]),_:1},8,["torch","constraints","onError"])),k,2):d("",!0)]))}}),U=N(V,[["__scopeId","data-v-cf37801d"]]),j=s("h1",{id:"torch-flashlight",tabindex:"-1"},[e("Torch (Flashlight) "),s("a",{class:"header-anchor",href:"#torch-flashlight","aria-label":'Permalink to "Torch (Flashlight)"'},"​")],-1),J=s("p",null,[e("In low-light conditions you might want to make use of the cameras flashlight. Using the "),s("code",null,"torch"),e(" prop, you can turn the flashlight on/off. Note that support is inconsistent across devices and browsers and can only be detected after already starting the camera.")],-1),L=s("p",null,[e("Feature sponsored by "),s("a",{href:"https://aeschbacher.ch",target:"_blank",rel:"noreferrer"},"aeschbacher.ch")],-1),Q=I(`

Source

vue
<template>
   <div>
     <p>
       Pick camera:
diff --git a/pr-preview/pr-449/assets/demos_Torch.md.AnpZuZA8.lean.js b/pr-preview/pr-449/assets/demos_Torch.md.bksnySAD.lean.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_Torch.md.AnpZuZA8.lean.js
rename to pr-preview/pr-449/assets/demos_Torch.md.bksnySAD.lean.js
index 351c1129..9d056346 100644
--- a/pr-preview/pr-449/assets/demos_Torch.md.AnpZuZA8.lean.js
+++ b/pr-preview/pr-449/assets/demos_Torch.md.bksnySAD.lean.js
@@ -1,4 +1,4 @@
-import{_ as B}from"./chunks/camera.BJQyjlnn.js";import{d as c,h as E,j as v,g as A,o as l,c as p,k as s,a as e,a4 as D,a5 as m,F as f,E as _,e as d,a8 as q,t as b,b as w,w as o,m as g,f as x,_ as N,D as S,I as y,R as I}from"./chunks/framework.BtL3uYYi.js";import{_ as T}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";const $=["value"],M={key:0,class:"error"},O=["disabled"],P=["src"],V=c({__name:"Torch",setup(F){const i=E(null),h=E([]);v(async()=>{h.value=(await navigator.mediaDevices.enumerateDevices()).filter(({kind:t})=>t==="videoinput"),h.value.length>0&&(i.value=h.value[0])});const a=E(!1),r=E(!1),u=A(()=>a.value?"/flash-off.svg":"/flash-on.svg");function C(t){console.log(t),r.value=!t.torch}return(t,k)=>(l(),p("div",null,[s("p",null,[e(" Pick camera: "),D(s("select",{"onUpdate:modelValue":k[0]||(k[0]=n=>i.value=n)},[(l(!0),p(f,null,_(h.value,n=>(l(),p("option",{key:n.label,value:n},b(n.label),9,$))),128))],512),[[m,i.value]])]),r.value?(l(),p("p",M," Torch not supported for active camera ")):d("",!0),i.value!==null?q([a.value,i.value.deviceId],()=>(l(),w(g(T),{key:1,torch:a.value,constraints:{deviceId:i.value.deviceId},onError:console.error,onCameraOn:C},{default:o(()=>[s("button",{onClick:k[1]||(k[1]=n=>a.value=!a.value),disabled:r.value},[s("img",{src:g(x)(u.value),alt:"toggle torch"},null,8,P)],8,O)]),_:1},8,["torch","constraints","onError"])),k,2):d("",!0)]))}}),U=N(V,[["__scopeId","data-v-cf37801d"]]),j=s("h1",{id:"torch-flashlight",tabindex:"-1"},[e("Torch (Flashlight) "),s("a",{class:"header-anchor",href:"#torch-flashlight","aria-label":'Permalink to "Torch (Flashlight)"'},"​")],-1),J=s("p",null,[e("In low-light conditions you might want to make use of the cameras flashlight. Using the "),s("code",null,"torch"),e(" prop, you can turn the flashlight on/off. Note that support is inconsistent across devices and browsers and can only be detected after already starting the camera.")],-1),L=s("p",null,[e("Feature sponsored by "),s("a",{href:"https://aeschbacher.ch",target:"_blank",rel:"noreferrer"},"aeschbacher.ch")],-1),Q=I(`

Source

vue
<template>
+import{_ as B}from"./chunks/camera.DhcMeik-.js";import{d as c,h as E,j as v,g as A,o as l,c as p,k as s,a as e,a4 as D,a5 as m,F as f,E as _,e as d,a8 as q,t as b,b as w,w as o,m as g,f as x,_ as N,D as S,I as y,R as I}from"./chunks/framework.BtL3uYYi.js";import{_ as T}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";const $=["value"],M={key:0,class:"error"},O=["disabled"],P=["src"],V=c({__name:"Torch",setup(F){const i=E(null),h=E([]);v(async()=>{h.value=(await navigator.mediaDevices.enumerateDevices()).filter(({kind:t})=>t==="videoinput"),h.value.length>0&&(i.value=h.value[0])});const a=E(!1),r=E(!1),u=A(()=>a.value?"/flash-off.svg":"/flash-on.svg");function C(t){console.log(t),r.value=!t.torch}return(t,k)=>(l(),p("div",null,[s("p",null,[e(" Pick camera: "),D(s("select",{"onUpdate:modelValue":k[0]||(k[0]=n=>i.value=n)},[(l(!0),p(f,null,_(h.value,n=>(l(),p("option",{key:n.label,value:n},b(n.label),9,$))),128))],512),[[m,i.value]])]),r.value?(l(),p("p",M," Torch not supported for active camera ")):d("",!0),i.value!==null?q([a.value,i.value.deviceId],()=>(l(),w(g(T),{key:1,torch:a.value,constraints:{deviceId:i.value.deviceId},onError:console.error,onCameraOn:C},{default:o(()=>[s("button",{onClick:k[1]||(k[1]=n=>a.value=!a.value),disabled:r.value},[s("img",{src:g(x)(u.value),alt:"toggle torch"},null,8,P)],8,O)]),_:1},8,["torch","constraints","onError"])),k,2):d("",!0)]))}}),U=N(V,[["__scopeId","data-v-cf37801d"]]),j=s("h1",{id:"torch-flashlight",tabindex:"-1"},[e("Torch (Flashlight) "),s("a",{class:"header-anchor",href:"#torch-flashlight","aria-label":'Permalink to "Torch (Flashlight)"'},"​")],-1),J=s("p",null,[e("In low-light conditions you might want to make use of the cameras flashlight. Using the "),s("code",null,"torch"),e(" prop, you can turn the flashlight on/off. Note that support is inconsistent across devices and browsers and can only be detected after already starting the camera.")],-1),L=s("p",null,[e("Feature sponsored by "),s("a",{href:"https://aeschbacher.ch",target:"_blank",rel:"noreferrer"},"aeschbacher.ch")],-1),Q=I(`

Source

vue
<template>
   <div>
     <p>
       Pick camera:
diff --git a/pr-preview/pr-449/assets/demos_Upload.md.Ds3GTY8o.js b/pr-preview/pr-449/assets/demos_Upload.md.CnQDh4cA.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_Upload.md.Ds3GTY8o.js
rename to pr-preview/pr-449/assets/demos_Upload.md.CnQDh4cA.js
index 3f7af43f..3a067c1a 100644
--- a/pr-preview/pr-449/assets/demos_Upload.md.Ds3GTY8o.js
+++ b/pr-preview/pr-449/assets/demos_Upload.md.CnQDh4cA.js
@@ -1,4 +1,4 @@
-import{p as y,_ as u}from"./chunks/camera.BJQyjlnn.js";import{d as c,o as e,c as p,_ as F,D as g,k as s,a as h,a4 as m,a5 as C,F as _,E as f,t as o,I as d,w as D,R as B}from"./chunks/framework.BtL3uYYi.js";const v=c({__name:"QrcodeCapture",props:{formats:{type:Array,default:()=>["qr_code"]}},emits:["detect"],setup(i,{emit:a}){const r=i,k=a,n=l=>{if(!(!(l.target instanceof HTMLInputElement)||!l.target.files))for(const E of Array.from(l.target.files))y(E,r.formats).then(t=>{k("detect",t)})};return(l,E)=>(e(),p("input",{onChange:n,type:"file",name:"image",accept:"image/*",capture:"environment",multiple:""},null,32))}}),A={components:{QrcodeCapture:v},data(){const i=[{text:"rear camera (default)",value:"environment"},{text:"front camera",value:"user"},{text:"force file dialog",value:null}];return{result:"",options:i,selected:i[0]}},methods:{onDetect(i){console.log(i),this.result=JSON.stringify(i.map(a=>a.rawValue))}}},b=["value"],q=s("hr",null,null,-1),x={class:"decode-result"};function w(i,a,r,k,n,l){const E=g("qrcode-capture");return e(),p("div",null,[s("p",null,[h(" Capture: "),m(s("select",{"onUpdate:modelValue":a[0]||(a[0]=t=>n.selected=t)},[(e(!0),p(_,null,f(n.options,t=>(e(),p("option",{key:t.text,value:t},o(t.text),9,b))),128))],512),[[C,n.selected]])]),q,s("p",x,[h(" Last result: "),s("b",null,o(n.result),1)]),d(E,{onDetect:l.onDetect,capture:n.selected.value},null,8,["onDetect","capture"])])}const S=F(A,[["render",w]]),U=s("h1",{id:"decode-by-upload",tabindex:"-1"},[h("Decode by Upload "),s("a",{class:"header-anchor",href:"#decode-by-upload","aria-label":'Permalink to "Decode by Upload"'},"​")],-1),N=s("p",null,[h("Finally, with "),s("code",null,"QrcodeCapture"),h(" comes another component which allows image scanning via classic file upload. Nothing is actually uploaded. Everything is happening client-side.")],-1),V=s("p",null,"If you are on mobile and your browser supports it, you are not prompted with a file dialog but with your camera. So you can directly take the picture to be uploaded. Adjust this behavior with the following dropdown:",-1),O=B(`

Source

vue
<template>
+import{p as y,_ as u}from"./chunks/camera.DhcMeik-.js";import{d as c,o as e,c as p,_ as F,D as g,k as s,a as h,a4 as m,a5 as C,F as _,E as f,t as o,I as d,w as D,R as B}from"./chunks/framework.BtL3uYYi.js";const v=c({__name:"QrcodeCapture",props:{formats:{type:Array,default:()=>["qr_code"]}},emits:["detect"],setup(i,{emit:a}){const r=i,k=a,n=l=>{if(!(!(l.target instanceof HTMLInputElement)||!l.target.files))for(const E of Array.from(l.target.files))y(E,r.formats).then(t=>{k("detect",t)})};return(l,E)=>(e(),p("input",{onChange:n,type:"file",name:"image",accept:"image/*",capture:"environment",multiple:""},null,32))}}),A={components:{QrcodeCapture:v},data(){const i=[{text:"rear camera (default)",value:"environment"},{text:"front camera",value:"user"},{text:"force file dialog",value:null}];return{result:"",options:i,selected:i[0]}},methods:{onDetect(i){console.log(i),this.result=JSON.stringify(i.map(a=>a.rawValue))}}},b=["value"],q=s("hr",null,null,-1),x={class:"decode-result"};function w(i,a,r,k,n,l){const E=g("qrcode-capture");return e(),p("div",null,[s("p",null,[h(" Capture: "),m(s("select",{"onUpdate:modelValue":a[0]||(a[0]=t=>n.selected=t)},[(e(!0),p(_,null,f(n.options,t=>(e(),p("option",{key:t.text,value:t},o(t.text),9,b))),128))],512),[[C,n.selected]])]),q,s("p",x,[h(" Last result: "),s("b",null,o(n.result),1)]),d(E,{onDetect:l.onDetect,capture:n.selected.value},null,8,["onDetect","capture"])])}const S=F(A,[["render",w]]),U=s("h1",{id:"decode-by-upload",tabindex:"-1"},[h("Decode by Upload "),s("a",{class:"header-anchor",href:"#decode-by-upload","aria-label":'Permalink to "Decode by Upload"'},"​")],-1),N=s("p",null,[h("Finally, with "),s("code",null,"QrcodeCapture"),h(" comes another component which allows image scanning via classic file upload. Nothing is actually uploaded. Everything is happening client-side.")],-1),V=s("p",null,"If you are on mobile and your browser supports it, you are not prompted with a file dialog but with your camera. So you can directly take the picture to be uploaded. Adjust this behavior with the following dropdown:",-1),O=B(`

Source

vue
<template>
   <div>
     <p>
       Capture:
diff --git a/pr-preview/pr-449/assets/demos_Upload.md.Ds3GTY8o.lean.js b/pr-preview/pr-449/assets/demos_Upload.md.CnQDh4cA.lean.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_Upload.md.Ds3GTY8o.lean.js
rename to pr-preview/pr-449/assets/demos_Upload.md.CnQDh4cA.lean.js
index 3f7af43f..3a067c1a 100644
--- a/pr-preview/pr-449/assets/demos_Upload.md.Ds3GTY8o.lean.js
+++ b/pr-preview/pr-449/assets/demos_Upload.md.CnQDh4cA.lean.js
@@ -1,4 +1,4 @@
-import{p as y,_ as u}from"./chunks/camera.BJQyjlnn.js";import{d as c,o as e,c as p,_ as F,D as g,k as s,a as h,a4 as m,a5 as C,F as _,E as f,t as o,I as d,w as D,R as B}from"./chunks/framework.BtL3uYYi.js";const v=c({__name:"QrcodeCapture",props:{formats:{type:Array,default:()=>["qr_code"]}},emits:["detect"],setup(i,{emit:a}){const r=i,k=a,n=l=>{if(!(!(l.target instanceof HTMLInputElement)||!l.target.files))for(const E of Array.from(l.target.files))y(E,r.formats).then(t=>{k("detect",t)})};return(l,E)=>(e(),p("input",{onChange:n,type:"file",name:"image",accept:"image/*",capture:"environment",multiple:""},null,32))}}),A={components:{QrcodeCapture:v},data(){const i=[{text:"rear camera (default)",value:"environment"},{text:"front camera",value:"user"},{text:"force file dialog",value:null}];return{result:"",options:i,selected:i[0]}},methods:{onDetect(i){console.log(i),this.result=JSON.stringify(i.map(a=>a.rawValue))}}},b=["value"],q=s("hr",null,null,-1),x={class:"decode-result"};function w(i,a,r,k,n,l){const E=g("qrcode-capture");return e(),p("div",null,[s("p",null,[h(" Capture: "),m(s("select",{"onUpdate:modelValue":a[0]||(a[0]=t=>n.selected=t)},[(e(!0),p(_,null,f(n.options,t=>(e(),p("option",{key:t.text,value:t},o(t.text),9,b))),128))],512),[[C,n.selected]])]),q,s("p",x,[h(" Last result: "),s("b",null,o(n.result),1)]),d(E,{onDetect:l.onDetect,capture:n.selected.value},null,8,["onDetect","capture"])])}const S=F(A,[["render",w]]),U=s("h1",{id:"decode-by-upload",tabindex:"-1"},[h("Decode by Upload "),s("a",{class:"header-anchor",href:"#decode-by-upload","aria-label":'Permalink to "Decode by Upload"'},"​")],-1),N=s("p",null,[h("Finally, with "),s("code",null,"QrcodeCapture"),h(" comes another component which allows image scanning via classic file upload. Nothing is actually uploaded. Everything is happening client-side.")],-1),V=s("p",null,"If you are on mobile and your browser supports it, you are not prompted with a file dialog but with your camera. So you can directly take the picture to be uploaded. Adjust this behavior with the following dropdown:",-1),O=B(`

Source

vue
<template>
+import{p as y,_ as u}from"./chunks/camera.DhcMeik-.js";import{d as c,o as e,c as p,_ as F,D as g,k as s,a as h,a4 as m,a5 as C,F as _,E as f,t as o,I as d,w as D,R as B}from"./chunks/framework.BtL3uYYi.js";const v=c({__name:"QrcodeCapture",props:{formats:{type:Array,default:()=>["qr_code"]}},emits:["detect"],setup(i,{emit:a}){const r=i,k=a,n=l=>{if(!(!(l.target instanceof HTMLInputElement)||!l.target.files))for(const E of Array.from(l.target.files))y(E,r.formats).then(t=>{k("detect",t)})};return(l,E)=>(e(),p("input",{onChange:n,type:"file",name:"image",accept:"image/*",capture:"environment",multiple:""},null,32))}}),A={components:{QrcodeCapture:v},data(){const i=[{text:"rear camera (default)",value:"environment"},{text:"front camera",value:"user"},{text:"force file dialog",value:null}];return{result:"",options:i,selected:i[0]}},methods:{onDetect(i){console.log(i),this.result=JSON.stringify(i.map(a=>a.rawValue))}}},b=["value"],q=s("hr",null,null,-1),x={class:"decode-result"};function w(i,a,r,k,n,l){const E=g("qrcode-capture");return e(),p("div",null,[s("p",null,[h(" Capture: "),m(s("select",{"onUpdate:modelValue":a[0]||(a[0]=t=>n.selected=t)},[(e(!0),p(_,null,f(n.options,t=>(e(),p("option",{key:t.text,value:t},o(t.text),9,b))),128))],512),[[C,n.selected]])]),q,s("p",x,[h(" Last result: "),s("b",null,o(n.result),1)]),d(E,{onDetect:l.onDetect,capture:n.selected.value},null,8,["onDetect","capture"])])}const S=F(A,[["render",w]]),U=s("h1",{id:"decode-by-upload",tabindex:"-1"},[h("Decode by Upload "),s("a",{class:"header-anchor",href:"#decode-by-upload","aria-label":'Permalink to "Decode by Upload"'},"​")],-1),N=s("p",null,[h("Finally, with "),s("code",null,"QrcodeCapture"),h(" comes another component which allows image scanning via classic file upload. Nothing is actually uploaded. Everything is happening client-side.")],-1),V=s("p",null,"If you are on mobile and your browser supports it, you are not prompted with a file dialog but with your camera. So you can directly take the picture to be uploaded. Adjust this behavior with the following dropdown:",-1),O=B(`

Source

vue
<template>
   <div>
     <p>
       Capture:
diff --git a/pr-preview/pr-449/assets/demos_Validate.md.Ba0B0yOc.js b/pr-preview/pr-449/assets/demos_Validate.md.DtHqSbkl.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_Validate.md.Ba0B0yOc.js
rename to pr-preview/pr-449/assets/demos_Validate.md.DtHqSbkl.js
index e68002cf..0933f2db 100644
--- a/pr-preview/pr-449/assets/demos_Validate.md.Ba0B0yOc.js
+++ b/pr-preview/pr-449/assets/demos_Validate.md.DtHqSbkl.js
@@ -1,4 +1,4 @@
-import{_ as c}from"./chunks/camera.BJQyjlnn.js";import{_ as F}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";import{_ as o,D as E,o as a,c as n,k as l,a as r,t as C,I as k,w as d,e as t,d as u,R as B}from"./chunks/framework.BtL3uYYi.js";const m={components:{QrcodeStream:F},data(){return{isValid:void 0,paused:!1,result:null}},computed:{validationPending(){return this.isValid===void 0&&this.paused},validationSuccess(){return this.isValid===!0},validationFailure(){return this.isValid===!1}},methods:{onError:console.error,resetValidationState(){this.isValid=void 0},async onDetect([i]){this.result=i.rawValue,this.paused=!0,await this.timeout(3e3),this.isValid=this.result.startsWith("http"),await this.timeout(2e3),this.paused=!1},timeout(i){return new Promise(h=>{window.setTimeout(h,i)})}}},D={class:"decode-result"},v={key:0,class:"validation-success"},A={key:1,class:"validation-failure"},_={key:2,class:"validation-pending"};function f(i,h,g,p,e,s){const y=E("qrcode-stream");return a(),n("div",null,[l("p",D,[r(" Last result: "),l("b",null,C(e.result),1)]),k(y,{paused:e.paused,onDetect:s.onDetect,onError:s.onError,onCameraOn:s.resetValidationState},{default:d(()=>[s.validationSuccess?(a(),n("div",v," This is a URL ")):t("",!0),s.validationFailure?(a(),n("div",A," This is NOT a URL! ")):t("",!0),s.validationPending?(a(),n("div",_," Long validation in progress... ")):t("",!0)]),_:1},8,["paused","onDetect","onError","onCameraOn"])])}const V=o(m,[["render",f],["__scopeId","data-v-2a6ebd39"]]),q=l("h1",{id:"pause-validate",tabindex:"-1"},[r("Pause & Validate "),l("a",{class:"header-anchor",href:"#pause-validate","aria-label":'Permalink to "Pause & Validate"'},"​")],-1),w=l("p",null,"By pausing you can process each scanned QR-code one at a time. The last received frame is still displayed so it just looks like the stream is paused.",-1),b=B(`

Source

vue
<template>
+import{_ as c}from"./chunks/camera.DhcMeik-.js";import{_ as F}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";import{_ as o,D as E,o as a,c as n,k as l,a as r,t as C,I as k,w as d,e as t,d as u,R as B}from"./chunks/framework.BtL3uYYi.js";const m={components:{QrcodeStream:F},data(){return{isValid:void 0,paused:!1,result:null}},computed:{validationPending(){return this.isValid===void 0&&this.paused},validationSuccess(){return this.isValid===!0},validationFailure(){return this.isValid===!1}},methods:{onError:console.error,resetValidationState(){this.isValid=void 0},async onDetect([i]){this.result=i.rawValue,this.paused=!0,await this.timeout(3e3),this.isValid=this.result.startsWith("http"),await this.timeout(2e3),this.paused=!1},timeout(i){return new Promise(h=>{window.setTimeout(h,i)})}}},D={class:"decode-result"},v={key:0,class:"validation-success"},A={key:1,class:"validation-failure"},_={key:2,class:"validation-pending"};function f(i,h,g,p,e,s){const y=E("qrcode-stream");return a(),n("div",null,[l("p",D,[r(" Last result: "),l("b",null,C(e.result),1)]),k(y,{paused:e.paused,onDetect:s.onDetect,onError:s.onError,onCameraOn:s.resetValidationState},{default:d(()=>[s.validationSuccess?(a(),n("div",v," This is a URL ")):t("",!0),s.validationFailure?(a(),n("div",A," This is NOT a URL! ")):t("",!0),s.validationPending?(a(),n("div",_," Long validation in progress... ")):t("",!0)]),_:1},8,["paused","onDetect","onError","onCameraOn"])])}const V=o(m,[["render",f],["__scopeId","data-v-2a6ebd39"]]),q=l("h1",{id:"pause-validate",tabindex:"-1"},[r("Pause & Validate "),l("a",{class:"header-anchor",href:"#pause-validate","aria-label":'Permalink to "Pause & Validate"'},"​")],-1),w=l("p",null,"By pausing you can process each scanned QR-code one at a time. The last received frame is still displayed so it just looks like the stream is paused.",-1),b=B(`

Source

vue
<template>
   <div>
     <p class="decode-result">
       Last result: <b>{{ result }}</b>
diff --git a/pr-preview/pr-449/assets/demos_Validate.md.Ba0B0yOc.lean.js b/pr-preview/pr-449/assets/demos_Validate.md.DtHqSbkl.lean.js
similarity index 99%
rename from pr-preview/pr-449/assets/demos_Validate.md.Ba0B0yOc.lean.js
rename to pr-preview/pr-449/assets/demos_Validate.md.DtHqSbkl.lean.js
index e68002cf..0933f2db 100644
--- a/pr-preview/pr-449/assets/demos_Validate.md.Ba0B0yOc.lean.js
+++ b/pr-preview/pr-449/assets/demos_Validate.md.DtHqSbkl.lean.js
@@ -1,4 +1,4 @@
-import{_ as c}from"./chunks/camera.BJQyjlnn.js";import{_ as F}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js";import{_ as o,D as E,o as a,c as n,k as l,a as r,t as C,I as k,w as d,e as t,d as u,R as B}from"./chunks/framework.BtL3uYYi.js";const m={components:{QrcodeStream:F},data(){return{isValid:void 0,paused:!1,result:null}},computed:{validationPending(){return this.isValid===void 0&&this.paused},validationSuccess(){return this.isValid===!0},validationFailure(){return this.isValid===!1}},methods:{onError:console.error,resetValidationState(){this.isValid=void 0},async onDetect([i]){this.result=i.rawValue,this.paused=!0,await this.timeout(3e3),this.isValid=this.result.startsWith("http"),await this.timeout(2e3),this.paused=!1},timeout(i){return new Promise(h=>{window.setTimeout(h,i)})}}},D={class:"decode-result"},v={key:0,class:"validation-success"},A={key:1,class:"validation-failure"},_={key:2,class:"validation-pending"};function f(i,h,g,p,e,s){const y=E("qrcode-stream");return a(),n("div",null,[l("p",D,[r(" Last result: "),l("b",null,C(e.result),1)]),k(y,{paused:e.paused,onDetect:s.onDetect,onError:s.onError,onCameraOn:s.resetValidationState},{default:d(()=>[s.validationSuccess?(a(),n("div",v," This is a URL ")):t("",!0),s.validationFailure?(a(),n("div",A," This is NOT a URL! ")):t("",!0),s.validationPending?(a(),n("div",_," Long validation in progress... ")):t("",!0)]),_:1},8,["paused","onDetect","onError","onCameraOn"])])}const V=o(m,[["render",f],["__scopeId","data-v-2a6ebd39"]]),q=l("h1",{id:"pause-validate",tabindex:"-1"},[r("Pause & Validate "),l("a",{class:"header-anchor",href:"#pause-validate","aria-label":'Permalink to "Pause & Validate"'},"​")],-1),w=l("p",null,"By pausing you can process each scanned QR-code one at a time. The last received frame is still displayed so it just looks like the stream is paused.",-1),b=B(`

Source

vue
<template>
+import{_ as c}from"./chunks/camera.DhcMeik-.js";import{_ as F}from"./chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js";import{_ as o,D as E,o as a,c as n,k as l,a as r,t as C,I as k,w as d,e as t,d as u,R as B}from"./chunks/framework.BtL3uYYi.js";const m={components:{QrcodeStream:F},data(){return{isValid:void 0,paused:!1,result:null}},computed:{validationPending(){return this.isValid===void 0&&this.paused},validationSuccess(){return this.isValid===!0},validationFailure(){return this.isValid===!1}},methods:{onError:console.error,resetValidationState(){this.isValid=void 0},async onDetect([i]){this.result=i.rawValue,this.paused=!0,await this.timeout(3e3),this.isValid=this.result.startsWith("http"),await this.timeout(2e3),this.paused=!1},timeout(i){return new Promise(h=>{window.setTimeout(h,i)})}}},D={class:"decode-result"},v={key:0,class:"validation-success"},A={key:1,class:"validation-failure"},_={key:2,class:"validation-pending"};function f(i,h,g,p,e,s){const y=E("qrcode-stream");return a(),n("div",null,[l("p",D,[r(" Last result: "),l("b",null,C(e.result),1)]),k(y,{paused:e.paused,onDetect:s.onDetect,onError:s.onError,onCameraOn:s.resetValidationState},{default:d(()=>[s.validationSuccess?(a(),n("div",v," This is a URL ")):t("",!0),s.validationFailure?(a(),n("div",A," This is NOT a URL! ")):t("",!0),s.validationPending?(a(),n("div",_," Long validation in progress... ")):t("",!0)]),_:1},8,["paused","onDetect","onError","onCameraOn"])])}const V=o(m,[["render",f],["__scopeId","data-v-2a6ebd39"]]),q=l("h1",{id:"pause-validate",tabindex:"-1"},[r("Pause & Validate "),l("a",{class:"header-anchor",href:"#pause-validate","aria-label":'Permalink to "Pause & Validate"'},"​")],-1),w=l("p",null,"By pausing you can process each scanned QR-code one at a time. The last received frame is still displayed so it just looks like the stream is paused.",-1),b=B(`

Source

vue
<template>
   <div>
     <p class="decode-result">
       Last result: <b>{{ result }}</b>
diff --git a/pr-preview/pr-449/demos/DragDrop.html b/pr-preview/pr-449/demos/DragDrop.html
index 2cd033e4..5bf46c3c 100644
--- a/pr-preview/pr-449/demos/DragDrop.html
+++ b/pr-preview/pr-449/demos/DragDrop.html
@@ -12,8 +12,8 @@
     
     
     
-    
-    
+    
+    
     
     
     
@@ -106,7 +106,7 @@
   font-weight: bold;
 }
 </style>

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/demos/FullDemo.html b/pr-preview/pr-449/demos/FullDemo.html index df92c871..4faef2ac 100644 --- a/pr-preview/pr-449/demos/FullDemo.html +++ b/pr-preview/pr-449/demos/FullDemo.html @@ -12,9 +12,9 @@ - - - + + + @@ -259,7 +259,7 @@ display: inline-block; } </style>

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/demos/Fullscreen.html b/pr-preview/pr-449/demos/Fullscreen.html index 8c23ba1e..ec9bb6cf 100644 --- a/pr-preview/pr-449/demos/Fullscreen.html +++ b/pr-preview/pr-449/demos/Fullscreen.html @@ -12,9 +12,9 @@ - - - + + + @@ -151,7 +151,7 @@ width: 2rem; } </style>

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/demos/LoadingIndicator.html b/pr-preview/pr-449/demos/LoadingIndicator.html index fa6d71bd..3668efb3 100644 --- a/pr-preview/pr-449/demos/LoadingIndicator.html +++ b/pr-preview/pr-449/demos/LoadingIndicator.html @@ -12,9 +12,9 @@ - - - + + + @@ -78,7 +78,7 @@ text-align: center; } </style>

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/demos/ScanSameQrcodeMoreThanOnce.html b/pr-preview/pr-449/demos/ScanSameQrcodeMoreThanOnce.html index 35a79a95..44bd5a63 100644 --- a/pr-preview/pr-449/demos/ScanSameQrcodeMoreThanOnce.html +++ b/pr-preview/pr-449/demos/ScanSameQrcodeMoreThanOnce.html @@ -12,9 +12,9 @@ - - - + + + @@ -107,7 +107,7 @@ justify-content: center; } </style>

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/demos/Simple.html b/pr-preview/pr-449/demos/Simple.html index 803646aa..04a7ab6c 100644 --- a/pr-preview/pr-449/demos/Simple.html +++ b/pr-preview/pr-449/demos/Simple.html @@ -98,7 +98,7 @@ app.mount('#app') </script> </html>

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/demos/SwitchCamera.html b/pr-preview/pr-449/demos/SwitchCamera.html index f3f5321f..207d1462 100644 --- a/pr-preview/pr-449/demos/SwitchCamera.html +++ b/pr-preview/pr-449/demos/SwitchCamera.html @@ -12,9 +12,9 @@ - - - + + + @@ -116,7 +116,7 @@ font-weight: bold; } </style>

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/demos/Torch.html b/pr-preview/pr-449/demos/Torch.html index 28424726..23b06078 100644 --- a/pr-preview/pr-449/demos/Torch.html +++ b/pr-preview/pr-449/demos/Torch.html @@ -12,9 +12,9 @@ - - - + + + @@ -118,7 +118,7 @@ font-weight: bold; } </style>

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/demos/Upload.html b/pr-preview/pr-449/demos/Upload.html index b5f5cb66..09b5d58b 100644 --- a/pr-preview/pr-449/demos/Upload.html +++ b/pr-preview/pr-449/demos/Upload.html @@ -12,8 +12,8 @@ - - + + @@ -77,7 +77,7 @@ } } </script>

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/demos/Validate.html b/pr-preview/pr-449/demos/Validate.html index 899ec437..4de8fe38 100644 --- a/pr-preview/pr-449/demos/Validate.html +++ b/pr-preview/pr-449/demos/Validate.html @@ -12,9 +12,9 @@ - - - + + + @@ -140,7 +140,7 @@ color: red; } </style>

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/hashmap.json b/pr-preview/pr-449/hashmap.json index 8d7d097f..b86cb8d0 100644 --- a/pr-preview/pr-449/hashmap.json +++ b/pr-preview/pr-449/hashmap.json @@ -1 +1 @@ -{"api_qrcodestream.md":"CGQgF4oK","demos_simple.md":"CWiqK3J_","demos_switchcamera.md":"B-obcuEB","demos_upload.md":"Ds3GTY8o","api_qrcodedropzone.md":"CqxuZhVd","api_qrcodecapture.md":"BVomH-fp","demos_loadingindicator.md":"BVZFqNj1","index.md":"DnOK2cmZ","demos_fulldemo.md":"EA-azuP_","demos_dragdrop.md":"12E-B_I3","demos_fullscreen.md":"CMW7y2Ip","demos_torch.md":"AnpZuZA8","demos_validate.md":"Ba0B0yOc","demos_scansameqrcodemorethanonce.md":"M3YU2Vzr"} +{"demos_scansameqrcodemorethanonce.md":"kZa9Btsu","demos_switchcamera.md":"CydEbheE","api_qrcodedropzone.md":"CqxuZhVd","demos_dragdrop.md":"cTRAHQaD","demos_upload.md":"CnQDh4cA","demos_validate.md":"DtHqSbkl","demos_fullscreen.md":"h2cqoaSc","demos_loadingindicator.md":"CPwUJoov","api_qrcodecapture.md":"BVomH-fp","demos_torch.md":"bksnySAD","demos_fulldemo.md":"CRrzANCR","api_qrcodestream.md":"CGQgF4oK","index.md":"DnOK2cmZ","demos_simple.md":"CWiqK3J_"} diff --git a/pr-preview/pr-449/index.html b/pr-preview/pr-449/index.html index eccda190..014bed9a 100644 --- a/pr-preview/pr-449/index.html +++ b/pr-preview/pr-449/index.html @@ -20,7 +20,7 @@
Skip to content

Vue Qrcode Reader

A set of Vue.js components for detecting and decoding QR codes.

VueQrcodeReader

Released under the MIT License.

- + \ No newline at end of file diff --git a/pr-preview/pr-449/sw.js b/pr-preview/pr-449/sw.js index 56ff70e9..407483dc 100644 --- a/pr-preview/pr-449/sw.js +++ b/pr-preview/pr-449/sw.js @@ -79,16 +79,16 @@ define(['./workbox-5199072c'], (function (workbox) { 'use strict'; */ workbox.precacheAndRoute([{ "url": "404.html", - "revision": "0d85dd8b0275491d1b4fb89a04cc8892" + "revision": "43008b4425f7e92bd26876d63ba6c2b8" }, { "url": "api/QrcodeCapture.html", - "revision": "b027b9f377de6add75aab32f2a0fdb2f" + "revision": "86fcc28ed937dbf17c402d9f0ab54c5e" }, { "url": "api/QrcodeDropZone.html", - "revision": "6ca17feae2a2b2dc578190e304ad5580" + "revision": "9062e80175cddeabc3be1b298b6d2af3" }, { "url": "api/QrcodeStream.html", - "revision": "bd5d8ba757fcf7d26ba3d08cd8d52493" + "revision": "8448e204e55143f16ff5f5e5cad9c0be" }, { "url": "assets/api_QrcodeCapture.md.BVomH-fp.js", "revision": null @@ -114,13 +114,13 @@ define(['./workbox-5199072c'], (function (workbox) { 'use strict'; "url": "assets/chunks/@localSearchIndexroot.BQqEPrZR.js", "revision": null }, { - "url": "assets/chunks/camera.BJQyjlnn.js", + "url": "assets/chunks/camera.DhcMeik-.js", "revision": null }, { "url": "assets/chunks/framework.BtL3uYYi.js", "revision": null }, { - "url": "assets/chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.CUHYp3xr.js", + "url": "assets/chunks/QrcodeStream.vue_vue_type_script_setup_true_lang.GbEf4hK0.js", "revision": null }, { "url": "assets/chunks/safari_32x32.Bkuv9jEj.js", @@ -132,34 +132,34 @@ define(['./workbox-5199072c'], (function (workbox) { 'use strict'; "url": "assets/chunks/VPLocalSearchBox.BPLfKR6Q.js", "revision": null }, { - "url": "assets/demos_DragDrop.md.12E-B_I3.js", + "url": "assets/demos_DragDrop.md.cTRAHQaD.js", "revision": null }, { - "url": "assets/demos_DragDrop.md.12E-B_I3.lean.js", + "url": "assets/demos_DragDrop.md.cTRAHQaD.lean.js", "revision": null }, { - "url": "assets/demos_FullDemo.md.EA-azuP_.js", + "url": "assets/demos_FullDemo.md.CRrzANCR.js", "revision": null }, { - "url": "assets/demos_FullDemo.md.EA-azuP_.lean.js", + "url": "assets/demos_FullDemo.md.CRrzANCR.lean.js", "revision": null }, { - "url": "assets/demos_Fullscreen.md.CMW7y2Ip.js", + "url": "assets/demos_Fullscreen.md.h2cqoaSc.js", "revision": null }, { - "url": "assets/demos_Fullscreen.md.CMW7y2Ip.lean.js", + "url": "assets/demos_Fullscreen.md.h2cqoaSc.lean.js", "revision": null }, { - "url": "assets/demos_LoadingIndicator.md.BVZFqNj1.js", + "url": "assets/demos_LoadingIndicator.md.CPwUJoov.js", "revision": null }, { - "url": "assets/demos_LoadingIndicator.md.BVZFqNj1.lean.js", + "url": "assets/demos_LoadingIndicator.md.CPwUJoov.lean.js", "revision": null }, { - "url": "assets/demos_ScanSameQrcodeMoreThanOnce.md.M3YU2Vzr.js", + "url": "assets/demos_ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.js", "revision": null }, { - "url": "assets/demos_ScanSameQrcodeMoreThanOnce.md.M3YU2Vzr.lean.js", + "url": "assets/demos_ScanSameQrcodeMoreThanOnce.md.kZa9Btsu.lean.js", "revision": null }, { "url": "assets/demos_Simple.md.CWiqK3J_.js", @@ -168,28 +168,28 @@ define(['./workbox-5199072c'], (function (workbox) { 'use strict'; "url": "assets/demos_Simple.md.CWiqK3J_.lean.js", "revision": null }, { - "url": "assets/demos_SwitchCamera.md.B-obcuEB.js", + "url": "assets/demos_SwitchCamera.md.CydEbheE.js", "revision": null }, { - "url": "assets/demos_SwitchCamera.md.B-obcuEB.lean.js", + "url": "assets/demos_SwitchCamera.md.CydEbheE.lean.js", "revision": null }, { - "url": "assets/demos_Torch.md.AnpZuZA8.js", + "url": "assets/demos_Torch.md.bksnySAD.js", "revision": null }, { - "url": "assets/demos_Torch.md.AnpZuZA8.lean.js", + "url": "assets/demos_Torch.md.bksnySAD.lean.js", "revision": null }, { - "url": "assets/demos_Upload.md.Ds3GTY8o.js", + "url": "assets/demos_Upload.md.CnQDh4cA.js", "revision": null }, { - "url": "assets/demos_Upload.md.Ds3GTY8o.lean.js", + "url": "assets/demos_Upload.md.CnQDh4cA.lean.js", "revision": null }, { - "url": "assets/demos_Validate.md.Ba0B0yOc.js", + "url": "assets/demos_Validate.md.DtHqSbkl.js", "revision": null }, { - "url": "assets/demos_Validate.md.Ba0B0yOc.lean.js", + "url": "assets/demos_Validate.md.DtHqSbkl.lean.js", "revision": null }, { "url": "assets/index.md.DnOK2cmZ.js", @@ -253,34 +253,34 @@ define(['./workbox-5199072c'], (function (workbox) { 'use strict'; "revision": "baffbefe1bde1d10f0c089b20f0cb9ed" }, { "url": "demos/DragDrop.html", - "revision": "54ad4ea7a7bcba4538fdd84736ff761e" + "revision": "576a8c1bbc084eaa0bd917b48e60f312" }, { "url": "demos/FullDemo.html", - "revision": "22ad2d394e5e6001bf69f80d7c9a35db" + "revision": "d6a512f5351f0bb18dd19e2d37696abf" }, { "url": "demos/Fullscreen.html", - "revision": "b610a549bbe27efdadb7fd854166412b" + "revision": "0bbc5a1f60ce010203544e0dfcb7abea" }, { "url": "demos/LoadingIndicator.html", - "revision": "316dcf6ef232d95a7ca0903c04f23da6" + "revision": "d784e0f71eabb6e1a892226b1bc6f9ca" }, { "url": "demos/ScanSameQrcodeMoreThanOnce.html", - "revision": "c18dcc31f749e2032301386eed108466" + "revision": "072016fe3316b06cab2c2cd887d2afb0" }, { "url": "demos/Simple.html", - "revision": "3067aea3c4f4f4fc4c3d297e770ecd51" + "revision": "791e0184990b76ae88ce936f50d452db" }, { "url": "demos/SwitchCamera.html", - "revision": "83295d03a34eb3e87620e83c35ea6aa8" + "revision": "3d5b75e4d96a874a7c2d53e23066fcfe" }, { "url": "demos/Torch.html", - "revision": "01564732ec52b81e5a37612c6b3bdc49" + "revision": "5697401390a683ef670d63a7df7cc073" }, { "url": "demos/Upload.html", - "revision": "65baf704deb5f4f21ffa72b30b6a9e05" + "revision": "c90cd27826a9a841e71f633ca5f69bf6" }, { "url": "demos/Validate.html", - "revision": "b09f32e3eb9fbb66ac485c3d530dd8dd" + "revision": "f2be4195a70db767586110d3024e8b32" }, { "url": "flash-off.svg", "revision": "8b05f5dcd6712992a544b34520ec7262" @@ -295,7 +295,7 @@ define(['./workbox-5199072c'], (function (workbox) { 'use strict'; "revision": "432c44f09de0b4e0f9e236fad9b8c7f9" }, { "url": "index.html", - "revision": "adbc629e07dea3bff557278f49f78ddb" + "revision": "4e42fd44c6bf24e28d24b06d6d9419d9" }, { "url": "logo.png", "revision": "5f0c1d6358641bc48207acb9fa0b6182"