You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

5 lines
125 KiB

var xa=Object.defineProperty;var _a=(r,a,i)=>a in r?xa(r,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[a]=i;var ot=(r,a,i)=>_a(r,typeof a!="symbol"?a+"":a,i);import{S as Sa,B as Pa,U as Oa,r as dt,W as Dt,Y as Ta,Z as Ma,$ as or,x as vt,h as yt,j as Ie,a0 as Da,m as $a,v as ka,a1 as Ea,V as Ra,f as Aa,e as ht,M as Br,C as Ia,_ as ja,g as pt,i as gt,k as qt,l as Ba,w as Fa,F as qa}from"./index-BLqts8WY.js";import{u as Fr}from"./index-CsfPLOYu.js";import{Q as La}from"./QuickNav-DgCyvgDx.js";import{U as Na}from"./UserNameDialog-B8a82q1n.js";import{aa as za,r as Ua,ab as Wa,ac as Ha,ad as Va,K as Ga,ae as Qa}from"./index-MyY_xqVN.js";var ar={exports:{}},qr;function Ya(){return qr||(qr=1,function(r,a){(function(i,h){r.exports=h(Sa())})(self,function(i){return(()=>{var h={192:(F,P)=>{var B,V,W=function(){var ae=function(R,k){var E=R,T=$e[k],w=null,d=0,n=null,u=[],c={},l=function(p,M){w=function(b){for(var m=new Array(b),O=0;O<b;O+=1){m[O]=new Array(b);for(var H=0;H<b;H+=1)m[O][H]=null}return m}(d=4*E+17),v(0,0),v(d-7,0),v(0,d-7),L(),_(),q(p,M),E>=7&&I(p),n==null&&(n=ee(E,T,u)),D(n,M)},v=function(p,M){for(var b=-1;b<=7;b+=1)if(!(p+b<=-1||d<=p+b))for(var m=-1;m<=7;m+=1)M+m<=-1||d<=M+m||(w[p+b][M+m]=0<=b&&b<=6&&(m==0||m==6)||0<=m&&m<=6&&(b==0||b==6)||2<=b&&b<=4&&2<=m&&m<=4)},_=function(){for(var p=8;p<d-8;p+=1)w[p][6]==null&&(w[p][6]=p%2==0);for(var M=8;M<d-8;M+=1)w[6][M]==null&&(w[6][M]=M%2==0)},L=function(){for(var p=he.getPatternPosition(E),M=0;M<p.length;M+=1)for(var b=0;b<p.length;b+=1){var m=p[M],O=p[b];if(w[m][O]==null)for(var H=-2;H<=2;H+=1)for(var G=-2;G<=2;G+=1)w[m+H][O+G]=H==-2||H==2||G==-2||G==2||H==0&&G==0}},I=function(p){for(var M=he.getBCHTypeNumber(E),b=0;b<18;b+=1){var m=!p&&(M>>b&1)==1;w[Math.floor(b/3)][b%3+d-8-3]=m}for(b=0;b<18;b+=1)m=!p&&(M>>b&1)==1,w[b%3+d-8-3][Math.floor(b/3)]=m},q=function(p,M){for(var b=T<<3|M,m=he.getBCHTypeInfo(b),O=0;O<15;O+=1){var H=!p&&(m>>O&1)==1;O<6?w[O][8]=H:O<8?w[O+1][8]=H:w[d-15+O][8]=H}for(O=0;O<15;O+=1)H=!p&&(m>>O&1)==1,O<8?w[8][d-O-1]=H:O<9?w[8][15-O-1+1]=H:w[8][15-O-1]=H;w[d-8][8]=!p},D=function(p,M){for(var b=-1,m=d-1,O=7,H=0,G=he.getMaskFunction(M),U=d-1;U>0;U-=2)for(U==6&&(U-=1);;){for(var ne=0;ne<2;ne+=1)if(w[m][U-ne]==null){var te=!1;H<p.length&&(te=(p[H]>>>O&1)==1),G(m,U-ne)&&(te=!te),w[m][U-ne]=te,(O-=1)==-1&&(H+=1,O=7)}if((m+=b)<0||d<=m){m-=b,b=-b;break}}},ee=function(p,M,b){for(var m=We.getRSBlocks(p,M),O=Le(),H=0;H<b.length;H+=1){var G=b[H];O.put(G.getMode(),4),O.put(G.getLength(),he.getLengthInBits(G.getMode(),p)),G.write(O)}var U=0;for(H=0;H<m.length;H+=1)U+=m[H].dataCount;if(O.getLengthInBits()>8*U)throw"code length overflow. ("+O.getLengthInBits()+">"+8*U+")";for(O.getLengthInBits()+4<=8*U&&O.put(0,4);O.getLengthInBits()%8!=0;)O.putBit(!1);for(;!(O.getLengthInBits()>=8*U||(O.put(236,8),O.getLengthInBits()>=8*U));)O.put(17,8);return function(ne,te){for(var Y=0,ye=0,we=0,J=new Array(te.length),ge=new Array(te.length),ue=0;ue<te.length;ue+=1){var je=te[ue].dataCount,Ne=te[ue].totalCount-je;ye=Math.max(ye,je),we=Math.max(we,Ne),J[ue]=new Array(je);for(var ce=0;ce<J[ue].length;ce+=1)J[ue][ce]=255&ne.getBuffer()[ce+Y];Y+=je;var Ee=he.getErrorCorrectPolynomial(Ne),Re=oe(J[ue],Ee.getLength()-1).mod(Ee);for(ge[ue]=new Array(Ee.getLength()-1),ce=0;ce<ge[ue].length;ce+=1){var Be=ce+Re.getLength()-ge[ue].length;ge[ue][ce]=Be>=0?Re.getAt(Be):0}}var at=0;for(ce=0;ce<te.length;ce+=1)at+=te[ce].totalCount;var Xe=new Array(at),be=0;for(ce=0;ce<ye;ce+=1)for(ue=0;ue<te.length;ue+=1)ce<J[ue].length&&(Xe[be]=J[ue][ce],be+=1);for(ce=0;ce<we;ce+=1)for(ue=0;ue<te.length;ue+=1)ce<ge[ue].length&&(Xe[be]=ge[ue][ce],be+=1);return Xe}(O,m)};c.addData=function(p,M){var b=null;switch(M=M||"Byte"){case"Numeric":b=He(p);break;case"Alphanumeric":b=Qe(p);break;case"Byte":b=ke(p);break;case"Kanji":b=Ve(p);break;default:throw"mode:"+M}u.push(b),n=null},c.isDark=function(p,M){if(p<0||d<=p||M<0||d<=M)throw p+","+M;return w[p][M]},c.getModuleCount=function(){return d},c.make=function(){if(E<1){for(var p=1;p<40;p++){for(var M=We.getRSBlocks(p,T),b=Le(),m=0;m<u.length;m++){var O=u[m];b.put(O.getMode(),4),b.put(O.getLength(),he.getLengthInBits(O.getMode(),p)),O.write(b)}var H=0;for(m=0;m<M.length;m++)H+=M[m].dataCount;if(b.getLengthInBits()<=8*H)break}E=p}l(!1,function(){for(var G=0,U=0,ne=0;ne<8;ne+=1){l(!0,ne);var te=he.getLostPoint(c);(ne==0||G>te)&&(G=te,U=ne)}return U}())},c.createTableTag=function(p,M){p=p||2;var b="";b+='<table style="',b+=" border-width: 0px; border-style: none;",b+=" border-collapse: collapse;",b+=" padding: 0px; margin: "+(M=M===void 0?4*p:M)+"px;",b+='">',b+="<tbody>";for(var m=0;m<c.getModuleCount();m+=1){b+="<tr>";for(var O=0;O<c.getModuleCount();O+=1)b+='<td style="',b+=" border-width: 0px; border-style: none;",b+=" border-collapse: collapse;",b+=" padding: 0px; margin: 0px;",b+=" width: "+p+"px;",b+=" height: "+p+"px;",b+=" background-color: ",b+=c.isDark(m,O)?"#000000":"#ffffff",b+=";",b+='"/>';b+="</tr>"}return(b+="</tbody>")+"</table>"},c.createSvgTag=function(p,M,b,m){var O={};typeof arguments[0]=="object"&&(p=(O=arguments[0]).cellSize,M=O.margin,b=O.alt,m=O.title),p=p||2,M=M===void 0?4*p:M,(b=typeof b=="string"?{text:b}:b||{}).text=b.text||null,b.id=b.text?b.id||"qrcode-description":null,(m=typeof m=="string"?{text:m}:m||{}).text=m.text||null,m.id=m.text?m.id||"qrcode-title":null;var H,G,U,ne,te=c.getModuleCount()*p+2*M,Y="";for(ne="l"+p+",0 0,"+p+" -"+p+",0 0,-"+p+"z ",Y+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',Y+=O.scalable?"":' width="'+te+'px" height="'+te+'px"',Y+=' viewBox="0 0 '+te+" "+te+'" ',Y+=' preserveAspectRatio="xMinYMin meet"',Y+=m.text||b.text?' role="img" aria-labelledby="'+j([m.id,b.id].join(" ").trim())+'"':"",Y+=">",Y+=m.text?'<title id="'+j(m.id)+'">'+j(m.text)+"</title>":"",Y+=b.text?'<description id="'+j(b.id)+'">'+j(b.text)+"</description>":"",Y+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',Y+='<path d="',G=0;G<c.getModuleCount();G+=1)for(U=G*p+M,H=0;H<c.getModuleCount();H+=1)c.isDark(G,H)&&(Y+="M"+(H*p+M)+","+U+ne);return(Y+='" stroke="transparent" fill="black"/>')+"</svg>"},c.createDataURL=function(p,M){p=p||2,M=M===void 0?4*p:M;var b=c.getModuleCount()*p+2*M,m=M,O=b-M;return lt(b,b,function(H,G){if(m<=H&&H<O&&m<=G&&G<O){var U=Math.floor((H-m)/p),ne=Math.floor((G-m)/p);return c.isDark(ne,U)?0:1}return 1})},c.createImgTag=function(p,M,b){p=p||2,M=M===void 0?4*p:M;var m=c.getModuleCount()*p+2*M,O="";return O+="<img",O+=' src="',O+=c.createDataURL(p,M),O+='"',O+=' width="',O+=m,O+='"',O+=' height="',O+=m,O+='"',b&&(O+=' alt="',O+=j(b),O+='"'),O+"/>"};var j=function(p){for(var M="",b=0;b<p.length;b+=1){var m=p.charAt(b);switch(m){case"<":M+="&lt;";break;case">":M+="&gt;";break;case"&":M+="&amp;";break;case'"':M+="&quot;";break;default:M+=m}}return M};return c.createASCII=function(p,M){if((p=p||1)<2)return function(J){J=J===void 0?2:J;var ge,ue,je,Ne,ce,Ee=1*c.getModuleCount()+2*J,Re=J,Be=Ee-J,at={"██":"█","█ ":"▀"," █":"▄"," ":" "},Xe={"██":"▀","█ ":"▀"," █":" "," ":" "},be="";for(ge=0;ge<Ee;ge+=2){for(je=Math.floor((ge-Re)/1),Ne=Math.floor((ge+1-Re)/1),ue=0;ue<Ee;ue+=1)ce="█",Re<=ue&&ue<Be&&Re<=ge&&ge<Be&&c.isDark(je,Math.floor((ue-Re)/1))&&(ce=" "),Re<=ue&&ue<Be&&Re<=ge+1&&ge+1<Be&&c.isDark(Ne,Math.floor((ue-Re)/1))?ce+=" ":ce+="█",be+=J<1&&ge+1>=Be?Xe[ce]:at[ce];be+=`
`}return Ee%2&&J>0?be.substring(0,be.length-Ee-1)+Array(Ee+1).join("▀"):be.substring(0,be.length-1)}(M);p-=1,M=M===void 0?2*p:M;var b,m,O,H,G=c.getModuleCount()*p+2*M,U=M,ne=G-M,te=Array(p+1).join("██"),Y=Array(p+1).join(" "),ye="",we="";for(b=0;b<G;b+=1){for(O=Math.floor((b-U)/p),we="",m=0;m<G;m+=1)H=1,U<=m&&m<ne&&U<=b&&b<ne&&c.isDark(O,Math.floor((m-U)/p))&&(H=0),we+=H?te:Y;for(O=0;O<p;O+=1)ye+=we+`
`}return ye.substring(0,ye.length-1)},c.renderTo2dContext=function(p,M){M=M||2;for(var b=c.getModuleCount(),m=0;m<b;m++)for(var O=0;O<b;O++)p.fillStyle=c.isDark(m,O)?"black":"white",p.fillRect(m*M,O*M,M,M)},c};ae.stringToBytes=(ae.stringToBytesFuncs={default:function(R){for(var k=[],E=0;E<R.length;E+=1){var T=R.charCodeAt(E);k.push(255&T)}return k}}).default,ae.createStringToBytes=function(R,k){var E=function(){for(var w=ct(R),d=function(){var _=w.read();if(_==-1)throw"eof";return _},n=0,u={};;){var c=w.read();if(c==-1)break;var l=d(),v=d()<<8|d();u[String.fromCharCode(c<<8|l)]=v,n+=1}if(n!=k)throw n+" != "+k;return u}(),T=63;return function(w){for(var d=[],n=0;n<w.length;n+=1){var u=w.charCodeAt(n);if(u<128)d.push(u);else{var c=E[w.charAt(n)];typeof c=="number"?(255&c)==c?d.push(c):(d.push(c>>>8),d.push(255&c)):d.push(T)}}return d}};var fe,K,de,re,ve,$e={L:1,M:0,Q:3,H:2},he=(fe=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],K=1335,de=7973,ve=function(R){for(var k=0;R!=0;)k+=1,R>>>=1;return k},(re={}).getBCHTypeInfo=function(R){for(var k=R<<10;ve(k)-ve(K)>=0;)k^=K<<ve(k)-ve(K);return 21522^(R<<10|k)},re.getBCHTypeNumber=function(R){for(var k=R<<12;ve(k)-ve(de)>=0;)k^=de<<ve(k)-ve(de);return R<<12|k},re.getPatternPosition=function(R){return fe[R-1]},re.getMaskFunction=function(R){switch(R){case 0:return function(k,E){return(k+E)%2==0};case 1:return function(k,E){return k%2==0};case 2:return function(k,E){return E%3==0};case 3:return function(k,E){return(k+E)%3==0};case 4:return function(k,E){return(Math.floor(k/2)+Math.floor(E/3))%2==0};case 5:return function(k,E){return k*E%2+k*E%3==0};case 6:return function(k,E){return(k*E%2+k*E%3)%2==0};case 7:return function(k,E){return(k*E%3+(k+E)%2)%2==0};default:throw"bad maskPattern:"+R}},re.getErrorCorrectPolynomial=function(R){for(var k=oe([1],0),E=0;E<R;E+=1)k=k.multiply(oe([1,Z.gexp(E)],0));return k},re.getLengthInBits=function(R,k){if(1<=k&&k<10)switch(R){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+R}else if(k<27)switch(R){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+R}else{if(!(k<41))throw"type:"+k;switch(R){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+R}}},re.getLostPoint=function(R){for(var k=R.getModuleCount(),E=0,T=0;T<k;T+=1)for(var w=0;w<k;w+=1){for(var d=0,n=R.isDark(T,w),u=-1;u<=1;u+=1)if(!(T+u<0||k<=T+u))for(var c=-1;c<=1;c+=1)w+c<0||k<=w+c||u==0&&c==0||n==R.isDark(T+u,w+c)&&(d+=1);d>5&&(E+=3+d-5)}for(T=0;T<k-1;T+=1)for(w=0;w<k-1;w+=1){var l=0;R.isDark(T,w)&&(l+=1),R.isDark(T+1,w)&&(l+=1),R.isDark(T,w+1)&&(l+=1),R.isDark(T+1,w+1)&&(l+=1),l!=0&&l!=4||(E+=3)}for(T=0;T<k;T+=1)for(w=0;w<k-6;w+=1)R.isDark(T,w)&&!R.isDark(T,w+1)&&R.isDark(T,w+2)&&R.isDark(T,w+3)&&R.isDark(T,w+4)&&!R.isDark(T,w+5)&&R.isDark(T,w+6)&&(E+=40);for(w=0;w<k;w+=1)for(T=0;T<k-6;T+=1)R.isDark(T,w)&&!R.isDark(T+1,w)&&R.isDark(T+2,w)&&R.isDark(T+3,w)&&R.isDark(T+4,w)&&!R.isDark(T+5,w)&&R.isDark(T+6,w)&&(E+=40);var v=0;for(w=0;w<k;w+=1)for(T=0;T<k;T+=1)R.isDark(T,w)&&(v+=1);return E+Math.abs(100*v/k/k-50)/5*10},re),Z=function(){for(var R=new Array(256),k=new Array(256),E=0;E<8;E+=1)R[E]=1<<E;for(E=8;E<256;E+=1)R[E]=R[E-4]^R[E-5]^R[E-6]^R[E-8];for(E=0;E<255;E+=1)k[R[E]]=E;return{glog:function(T){if(T<1)throw"glog("+T+")";return k[T]},gexp:function(T){for(;T<0;)T+=255;for(;T>=256;)T-=255;return R[T]}}}();function oe(R,k){if(R.length===void 0)throw R.length+"/"+k;var E=function(){for(var w=0;w<R.length&&R[w]==0;)w+=1;for(var d=new Array(R.length-w+k),n=0;n<R.length-w;n+=1)d[n]=R[n+w];return d}(),T={getAt:function(w){return E[w]},getLength:function(){return E.length},multiply:function(w){for(var d=new Array(T.getLength()+w.getLength()-1),n=0;n<T.getLength();n+=1)for(var u=0;u<w.getLength();u+=1)d[n+u]^=Z.gexp(Z.glog(T.getAt(n))+Z.glog(w.getAt(u)));return oe(d,0)},mod:function(w){if(T.getLength()-w.getLength()<0)return T;for(var d=Z.glog(T.getAt(0))-Z.glog(w.getAt(0)),n=new Array(T.getLength()),u=0;u<T.getLength();u+=1)n[u]=T.getAt(u);for(u=0;u<w.getLength();u+=1)n[u]^=Z.gexp(Z.glog(w.getAt(u))+d);return oe(n,0).mod(w)}};return T}var We=function(){var R=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],k=function(T,w){var d={};return d.totalCount=T,d.dataCount=w,d},E={getRSBlocks:function(T,w){var d=function(I,q){switch(q){case $e.L:return R[4*(I-1)+0];case $e.M:return R[4*(I-1)+1];case $e.Q:return R[4*(I-1)+2];case $e.H:return R[4*(I-1)+3];default:return}}(T,w);if(d===void 0)throw"bad rs block @ typeNumber:"+T+"/errorCorrectionLevel:"+w;for(var n=d.length/3,u=[],c=0;c<n;c+=1)for(var l=d[3*c+0],v=d[3*c+1],_=d[3*c+2],L=0;L<l;L+=1)u.push(k(v,_));return u}};return E}(),Le=function(){var R=[],k=0,E={getBuffer:function(){return R},getAt:function(T){var w=Math.floor(T/8);return(R[w]>>>7-T%8&1)==1},put:function(T,w){for(var d=0;d<w;d+=1)E.putBit((T>>>w-d-1&1)==1)},getLengthInBits:function(){return k},putBit:function(T){var w=Math.floor(k/8);R.length<=w&&R.push(0),T&&(R[w]|=128>>>k%8),k+=1}};return E},He=function(R){var k=R,E={getMode:function(){return 1},getLength:function(d){return k.length},write:function(d){for(var n=k,u=0;u+2<n.length;)d.put(T(n.substring(u,u+3)),10),u+=3;u<n.length&&(n.length-u==1?d.put(T(n.substring(u,u+1)),4):n.length-u==2&&d.put(T(n.substring(u,u+2)),7))}},T=function(d){for(var n=0,u=0;u<d.length;u+=1)n=10*n+w(d.charAt(u));return n},w=function(d){if("0"<=d&&d<="9")return d.charCodeAt(0)-48;throw"illegal char :"+d};return E},Qe=function(R){var k=R,E={getMode:function(){return 2},getLength:function(w){return k.length},write:function(w){for(var d=k,n=0;n+1<d.length;)w.put(45*T(d.charAt(n))+T(d.charAt(n+1)),11),n+=2;n<d.length&&w.put(T(d.charAt(n)),6)}},T=function(w){if("0"<=w&&w<="9")return w.charCodeAt(0)-48;if("A"<=w&&w<="Z")return w.charCodeAt(0)-65+10;switch(w){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+w}};return E},ke=function(R){var k=ae.stringToBytes(R);return{getMode:function(){return 4},getLength:function(E){return k.length},write:function(E){for(var T=0;T<k.length;T+=1)E.put(k[T],8)}}},Ve=function(R){var k=ae.stringToBytesFuncs.SJIS;if(!k)throw"sjis not supported.";(function(T,w){var d=k("友");if(d.length!=2||(d[0]<<8|d[1])!=38726)throw"sjis not supported."})();var E=k(R);return{getMode:function(){return 8},getLength:function(T){return~~(E.length/2)},write:function(T){for(var w=E,d=0;d+1<w.length;){var n=(255&w[d])<<8|255&w[d+1];if(33088<=n&&n<=40956)n-=33088;else{if(!(57408<=n&&n<=60351))throw"illegal char at "+(d+1)+"/"+n;n-=49472}n=192*(n>>>8&255)+(255&n),T.put(n,13),d+=2}if(d<w.length)throw"illegal char at "+(d+1)}}},Je=function(){var R=[],k={writeByte:function(E){R.push(255&E)},writeShort:function(E){k.writeByte(E),k.writeByte(E>>>8)},writeBytes:function(E,T,w){T=T||0,w=w||E.length;for(var d=0;d<w;d+=1)k.writeByte(E[d+T])},writeString:function(E){for(var T=0;T<E.length;T+=1)k.writeByte(E.charCodeAt(T))},toByteArray:function(){return R},toString:function(){var E="";E+="[";for(var T=0;T<R.length;T+=1)T>0&&(E+=","),E+=R[T];return E+"]"}};return k},ct=function(R){var k=R,E=0,T=0,w=0,d={read:function(){for(;w<8;){if(E>=k.length){if(w==0)return-1;throw"unexpected end of file./"+w}var u=k.charAt(E);if(E+=1,u=="=")return w=0,-1;u.match(/^\s$/)||(T=T<<6|n(u.charCodeAt(0)),w+=6)}var c=T>>>w-8&255;return w-=8,c}},n=function(u){if(65<=u&&u<=90)return u-65;if(97<=u&&u<=122)return u-97+26;if(48<=u&&u<=57)return u-48+52;if(u==43)return 62;if(u==47)return 63;throw"c:"+u};return d},lt=function(R,k,E){for(var T=function(v,_){var L=v,I=_,q=new Array(v*_),D={setPixel:function(p,M,b){q[M*L+p]=b},write:function(p){p.writeString("GIF87a"),p.writeShort(L),p.writeShort(I),p.writeByte(128),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(255),p.writeByte(255),p.writeByte(255),p.writeString(","),p.writeShort(0),p.writeShort(0),p.writeShort(L),p.writeShort(I),p.writeByte(0);var M=ee(2);p.writeByte(2);for(var b=0;M.length-b>255;)p.writeByte(255),p.writeBytes(M,b,255),b+=255;p.writeByte(M.length-b),p.writeBytes(M,b,M.length-b),p.writeByte(0),p.writeString(";")}},ee=function(p){for(var M=1<<p,b=1+(1<<p),m=p+1,O=j(),H=0;H<M;H+=1)O.add(String.fromCharCode(H));O.add(String.fromCharCode(M)),O.add(String.fromCharCode(b));var G,U,ne,te=Je(),Y=(G=te,U=0,ne=0,{write:function(ge,ue){if(ge>>>ue)throw"length over";for(;U+ue>=8;)G.writeByte(255&(ge<<U|ne)),ue-=8-U,ge>>>=8-U,ne=0,U=0;ne|=ge<<U,U+=ue},flush:function(){U>0&&G.writeByte(ne)}});Y.write(M,m);var ye=0,we=String.fromCharCode(q[ye]);for(ye+=1;ye<q.length;){var J=String.fromCharCode(q[ye]);ye+=1,O.contains(we+J)?we+=J:(Y.write(O.indexOf(we),m),O.size()<4095&&(O.size()==1<<m&&(m+=1),O.add(we+J)),we=J)}return Y.write(O.indexOf(we),m),Y.write(b,m),Y.flush(),te.toByteArray()},j=function(){var p={},M=0,b={add:function(m){if(b.contains(m))throw"dup key:"+m;p[m]=M,M+=1},size:function(){return M},indexOf:function(m){return p[m]},contains:function(m){return p[m]!==void 0}};return b};return D}(R,k),w=0;w<k;w+=1)for(var d=0;d<R;d+=1)T.setPixel(d,w,E(d,w));var n=Je();T.write(n);for(var u=function(){var v=0,_=0,L=0,I="",q={},D=function(j){I+=String.fromCharCode(ee(63&j))},ee=function(j){if(!(j<0)){if(j<26)return 65+j;if(j<52)return j-26+97;if(j<62)return j-52+48;if(j==62)return 43;if(j==63)return 47}throw"n:"+j};return q.writeByte=function(j){for(v=v<<8|255&j,_+=8,L+=1;_>=6;)D(v>>>_-6),_-=6},q.flush=function(){if(_>0&&(D(v<<6-_),v=0,_=0),L%3!=0)for(var j=3-L%3,p=0;p<j;p+=1)I+="="},q.toString=function(){return I},q}(),c=n.toByteArray(),l=0;l<c.length;l+=1)u.writeByte(c[l]);return u.flush(),"data:image/gif;base64,"+u};return ae}();W.stringToBytesFuncs["UTF-8"]=function(ae){return function(fe){for(var K=[],de=0;de<fe.length;de++){var re=fe.charCodeAt(de);re<128?K.push(re):re<2048?K.push(192|re>>6,128|63&re):re<55296||re>=57344?K.push(224|re>>12,128|re>>6&63,128|63&re):(de++,re=65536+((1023&re)<<10|1023&fe.charCodeAt(de)),K.push(240|re>>18,128|re>>12&63,128|re>>6&63,128|63&re))}return K}(ae)},(V=typeof(B=function(){return W})=="function"?B.apply(P,[]):B)===void 0||(F.exports=V)},103:F=>{F.exports=i}},y={};function x(F){var P=y[F];if(P!==void 0)return P.exports;var B=y[F]={exports:{}};return h[F](B,B.exports,x),B.exports}x.n=F=>{var P=F&&F.__esModule?()=>F.default:()=>F;return x.d(P,{a:P}),P},x.d=(F,P)=>{for(var B in P)x.o(P,B)&&!x.o(F,B)&&Object.defineProperty(F,B,{enumerable:!0,get:P[B]})},x.o=(F,P)=>Object.prototype.hasOwnProperty.call(F,P);var $={};return(()=>{x.d($,{default:()=>w});var F=x(103);const P={key:1};var B=function(){return(B=Object.assign||function(d){for(var n,u=1,c=arguments.length;u<c;u++)for(var l in n=arguments[u])Object.prototype.hasOwnProperty.call(n,l)&&(d[l]=n[l]);return d}).apply(this,arguments)},V=function(d,n){for(var u=0,c=n.length,l=d.length;u<c;u++,l++)d[l]=n[u];return d},W=function(d){return!!d&&typeof d=="object"&&!Array.isArray(d)};function ae(d){for(var n=[],u=1;u<arguments.length;u++)n[u-1]=arguments[u];if(!n.length)return d;var c=n.shift();return c!==void 0&&W(d)&&W(c)?(d=B({},d),Object.keys(c).forEach(function(l){var v=d[l],_=c[l];Array.isArray(v)&&Array.isArray(_)?d[l]=_:W(v)&&W(_)?d[l]=ae(Object.assign({},v),_):d[l]=_}),ae.apply(void 0,V([d],n))):d}const fe={L:.07,M:.15,Q:.25,H:.3};var K=function(){return(K=Object.assign||function(d){for(var n,u=1,c=arguments.length;u<c;u++)for(var l in n=arguments[u])Object.prototype.hasOwnProperty.call(n,l)&&(d[l]=n[l]);return d}).apply(this,arguments)};const de=function(){function d(n){var u=n.context,c=n.type;this._context=u,this._type=c}return d.prototype.draw=function(n,u,c,l){var v,_=this._context;switch(this._type){case"dots":v=this._drawDot;break;case"classy":v=this._drawClassy;break;case"classy-rounded":v=this._drawClassyRounded;break;case"rounded":v=this._drawRounded;break;case"extra-rounded":v=this._drawExtraRounded;break;case"square":default:v=this._drawSquare}v.call(this,{x:n,y:u,size:c,context:_,getNeighbor:l})},d.prototype._rotateFigure=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.rotation,L=n.draw,I=u+l/2,q=c+l/2;v.translate(I,q),_&&v.rotate(_),L(),v.closePath(),_&&v.rotate(-_),v.translate(-I,-q)},d.prototype._basicDot=function(n){var u=n.size,c=n.context;this._rotateFigure(K(K({},n),{draw:function(){c.arc(0,0,u/2,0,2*Math.PI)}}))},d.prototype._basicSquare=function(n){var u=n.size,c=n.context;this._rotateFigure(K(K({},n),{draw:function(){c.rect(-u/2,-u/2,u,u)}}))},d.prototype._basicSideRounded=function(n){var u=n.size,c=n.context;this._rotateFigure(K(K({},n),{draw:function(){c.arc(0,0,u/2,-Math.PI/2,Math.PI/2),c.lineTo(-u/2,u/2),c.lineTo(-u/2,-u/2),c.lineTo(0,-u/2)}}))},d.prototype._basicCornerRounded=function(n){var u=n.size,c=n.context;this._rotateFigure(K(K({},n),{draw:function(){c.arc(0,0,u/2,-Math.PI/2,0),c.lineTo(u/2,u/2),c.lineTo(-u/2,u/2),c.lineTo(-u/2,-u/2),c.lineTo(0,-u/2)}}))},d.prototype._basicCornerExtraRounded=function(n){var u=n.size,c=n.context;this._rotateFigure(K(K({},n),{draw:function(){c.arc(-u/2,u/2,u,-Math.PI/2,0),c.lineTo(-u/2,u/2),c.lineTo(-u/2,-u/2)}}))},d.prototype._basicCornersRounded=function(n){var u=n.size,c=n.context;this._rotateFigure(K(K({},n),{draw:function(){c.arc(0,0,u/2,-Math.PI/2,0),c.lineTo(u/2,u/2),c.lineTo(0,u/2),c.arc(0,0,u/2,Math.PI/2,Math.PI),c.lineTo(-u/2,-u/2),c.lineTo(0,-u/2)}}))},d.prototype._basicCornersExtraRounded=function(n){var u=n.size,c=n.context;this._rotateFigure(K(K({},n),{draw:function(){c.arc(-u/2,u/2,u,-Math.PI/2,0),c.arc(u/2,-u/2,u,Math.PI/2,Math.PI)}}))},d.prototype._drawDot=function(n){var u=n.x,c=n.y,l=n.size,v=n.context;this._basicDot({x:u,y:c,size:l,context:v,rotation:0})},d.prototype._drawSquare=function(n){var u=n.x,c=n.y,l=n.size,v=n.context;this._basicSquare({x:u,y:c,size:l,context:v,rotation:0})},d.prototype._drawRounded=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.getNeighbor,L=+_(-1,0),I=+_(1,0),q=+_(0,-1),D=+_(0,1),ee=L+I+q+D;if(ee!==0)if(ee>2||L&&I||q&&D)this._basicSquare({x:u,y:c,size:l,context:v,rotation:0});else{if(ee===2){var j=0;return L&&q?j=Math.PI/2:q&&I?j=Math.PI:I&&D&&(j=-Math.PI/2),void this._basicCornerRounded({x:u,y:c,size:l,context:v,rotation:j})}ee===1&&(j=0,q?j=Math.PI/2:I?j=Math.PI:D&&(j=-Math.PI/2),this._basicSideRounded({x:u,y:c,size:l,context:v,rotation:j}))}else this._basicDot({x:u,y:c,size:l,context:v,rotation:0})},d.prototype._drawExtraRounded=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.getNeighbor,L=+_(-1,0),I=+_(1,0),q=+_(0,-1),D=+_(0,1),ee=L+I+q+D;if(ee!==0)if(ee>2||L&&I||q&&D)this._basicSquare({x:u,y:c,size:l,context:v,rotation:0});else{if(ee===2){var j=0;return L&&q?j=Math.PI/2:q&&I?j=Math.PI:I&&D&&(j=-Math.PI/2),void this._basicCornerExtraRounded({x:u,y:c,size:l,context:v,rotation:j})}ee===1&&(j=0,q?j=Math.PI/2:I?j=Math.PI:D&&(j=-Math.PI/2),this._basicSideRounded({x:u,y:c,size:l,context:v,rotation:j}))}else this._basicDot({x:u,y:c,size:l,context:v,rotation:0})},d.prototype._drawClassy=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.getNeighbor,L=+_(-1,0),I=+_(1,0),q=+_(0,-1),D=+_(0,1);L+I+q+D!==0?L||q?I||D?this._basicSquare({x:u,y:c,size:l,context:v,rotation:0}):this._basicCornerRounded({x:u,y:c,size:l,context:v,rotation:Math.PI/2}):this._basicCornerRounded({x:u,y:c,size:l,context:v,rotation:-Math.PI/2}):this._basicCornersRounded({x:u,y:c,size:l,context:v,rotation:Math.PI/2})},d.prototype._drawClassyRounded=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.getNeighbor,L=+_(-1,0),I=+_(1,0),q=+_(0,-1),D=+_(0,1);L+I+q+D!==0?L||q?I||D?this._basicSquare({x:u,y:c,size:l,context:v,rotation:0}):this._basicCornerExtraRounded({x:u,y:c,size:l,context:v,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:u,y:c,size:l,context:v,rotation:-Math.PI/2}):this._basicCornersRounded({x:u,y:c,size:l,context:v,rotation:Math.PI/2})},d}();var re=function(){return(re=Object.assign||function(d){for(var n,u=1,c=arguments.length;u<c;u++)for(var l in n=arguments[u])Object.prototype.hasOwnProperty.call(n,l)&&(d[l]=n[l]);return d}).apply(this,arguments)};const ve=function(){function d(n){var u=n.context,c=n.type;this._context=u,this._type=c}return d.prototype.draw=function(n,u,c,l){var v,_=this._context;switch(this._type){case"square":v=this._drawSquare;break;case"extra-rounded":v=this._drawExtraRounded;break;case"dot":default:v=this._drawDot}v.call(this,{x:n,y:u,size:c,context:_,rotation:l})},d.prototype._rotateFigure=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.rotation,L=n.draw,I=u+l/2,q=c+l/2;v.translate(I,q),_&&v.rotate(_),L(),v.closePath(),_&&v.rotate(-_),v.translate(-I,-q)},d.prototype._basicDot=function(n){var u=n.size,c=n.context,l=u/7;this._rotateFigure(re(re({},n),{draw:function(){c.arc(0,0,u/2,0,2*Math.PI),c.arc(0,0,u/2-l,0,2*Math.PI)}}))},d.prototype._basicSquare=function(n){var u=n.size,c=n.context,l=u/7;this._rotateFigure(re(re({},n),{draw:function(){c.rect(-u/2,-u/2,u,u),c.rect(-u/2+l,-u/2+l,u-2*l,u-2*l)}}))},d.prototype._basicExtraRounded=function(n){var u=n.size,c=n.context,l=u/7;this._rotateFigure(re(re({},n),{draw:function(){c.arc(-l,-l,2.5*l,Math.PI,-Math.PI/2),c.lineTo(l,-3.5*l),c.arc(l,-l,2.5*l,-Math.PI/2,0),c.lineTo(3.5*l,-l),c.arc(l,l,2.5*l,0,Math.PI/2),c.lineTo(-l,3.5*l),c.arc(-l,l,2.5*l,Math.PI/2,Math.PI),c.lineTo(-3.5*l,-l),c.arc(-l,-l,1.5*l,Math.PI,-Math.PI/2),c.lineTo(l,-2.5*l),c.arc(l,-l,1.5*l,-Math.PI/2,0),c.lineTo(2.5*l,-l),c.arc(l,l,1.5*l,0,Math.PI/2),c.lineTo(-l,2.5*l),c.arc(-l,l,1.5*l,Math.PI/2,Math.PI),c.lineTo(-2.5*l,-l)}}))},d.prototype._drawDot=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.rotation;this._basicDot({x:u,y:c,size:l,context:v,rotation:_})},d.prototype._drawSquare=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.rotation;this._basicSquare({x:u,y:c,size:l,context:v,rotation:_})},d.prototype._drawExtraRounded=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.rotation;this._basicExtraRounded({x:u,y:c,size:l,context:v,rotation:_})},d}();var $e=function(){return($e=Object.assign||function(d){for(var n,u=1,c=arguments.length;u<c;u++)for(var l in n=arguments[u])Object.prototype.hasOwnProperty.call(n,l)&&(d[l]=n[l]);return d}).apply(this,arguments)};const he=function(){function d(n){var u=n.context,c=n.type;this._context=u,this._type=c}return d.prototype.draw=function(n,u,c,l){var v,_=this._context;switch(this._type){case"square":v=this._drawSquare;break;case"dot":default:v=this._drawDot}v.call(this,{x:n,y:u,size:c,context:_,rotation:l})},d.prototype._rotateFigure=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.rotation,L=n.draw,I=u+l/2,q=c+l/2;v.translate(I,q),_&&v.rotate(_),L(),v.closePath(),_&&v.rotate(-_),v.translate(-I,-q)},d.prototype._basicDot=function(n){var u=n.size,c=n.context;this._rotateFigure($e($e({},n),{draw:function(){c.arc(0,0,u/2,0,2*Math.PI)}}))},d.prototype._basicSquare=function(n){var u=n.size,c=n.context;this._rotateFigure($e($e({},n),{draw:function(){c.rect(-u/2,-u/2,u,u)}}))},d.prototype._drawDot=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.rotation;this._basicDot({x:u,y:c,size:l,context:v,rotation:_})},d.prototype._drawSquare=function(n){var u=n.x,c=n.y,l=n.size,v=n.context,_=n.rotation;this._basicSquare({x:u,y:c,size:l,context:v,rotation:_})},d}();var Z=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],oe=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const We=function(){function d(n){this._canvas=document.createElement("canvas"),this._canvas.width=n.width,this._canvas.height=n.height,this._options=n}return Object.defineProperty(d.prototype,"context",{get:function(){return this._canvas.getContext("2d")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"width",{get:function(){return this._canvas.width},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"height",{get:function(){return this._canvas.height},enumerable:!1,configurable:!0}),d.prototype.getCanvas=function(){return this._canvas},d.prototype.clear=function(){var n=this.context;n&&n.clearRect(0,0,this._canvas.width,this._canvas.height)},d.prototype.drawQR=function(n){return u=this,c=void 0,v=function(){var _,L,I,q,D,ee,j,p,M,b=this;return function(m,O){var H,G,U,ne,te={label:0,sent:function(){if(1&U[0])throw U[1];return U[1]},trys:[],ops:[]};return ne={next:Y(0),throw:Y(1),return:Y(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Y(ye){return function(we){return function(J){if(H)throw new TypeError("Generator is already executing.");for(;te;)try{if(H=1,G&&(U=2&J[0]?G.return:J[0]?G.throw||((U=G.return)&&U.call(G),0):G.next)&&!(U=U.call(G,J[1])).done)return U;switch(G=0,U&&(J=[2&J[0],U.value]),J[0]){case 0:case 1:U=J;break;case 4:return te.label++,{value:J[1],done:!1};case 5:te.label++,G=J[1],J=[0];continue;case 7:J=te.ops.pop(),te.trys.pop();continue;default:if(!((U=(U=te.trys).length>0&&U[U.length-1])||J[0]!==6&&J[0]!==2)){te=0;continue}if(J[0]===3&&(!U||J[1]>U[0]&&J[1]<U[3])){te.label=J[1];break}if(J[0]===6&&te.label<U[1]){te.label=U[1],U=J;break}if(U&&te.label<U[2]){te.label=U[2],te.ops.push(J);break}U[2]&&te.ops.pop(),te.trys.pop();continue}J=O.call(m,te)}catch(ge){J=[6,ge],G=0}finally{H=U=0}if(5&J[0])throw J[1];return{value:J[0]?J[1]:void 0,done:!0}}([ye,we])}}}(this,function(m){switch(m.label){case 0:return _=n.getModuleCount(),L=Math.min(this._options.width,this._options.height)-2*this._options.margin,I=Math.floor(L/_),q={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=n,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(m.sent(),!this._image)return[2];D=this._options,ee=D.imageOptions,j=D.qrOptions,p=ee.imageSize*fe[j.errorCorrectionLevel],M=Math.floor(p*_*_),q=function(O){var H=O.originalHeight,G=O.originalWidth,U=O.maxHiddenDots,ne=O.maxHiddenAxisDots,te=O.dotSize,Y={x:0,y:0},ye={x:0,y:0};if(H<=0||G<=0||U<=0||te<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var we=H/G;return Y.x=Math.floor(Math.sqrt(U/we)),Y.x<=0&&(Y.x=1),ne&&ne<Y.x&&(Y.x=ne),Y.x%2==0&&Y.x--,ye.x=Y.x*te,Y.y=1+2*Math.ceil((Y.x*we-1)/2),ye.y=Math.round(ye.x*we),(Y.y*Y.x>U||ne&&ne<Y.y)&&(ne&&ne<Y.y?(Y.y=ne,Y.y%2==0&&Y.x--):Y.y-=2,ye.y=Y.y*te,Y.x=1+2*Math.ceil((Y.y/we-1)/2),ye.x=Math.round(ye.y/we)),{height:ye.y,width:ye.x,hideYDots:Y.y,hideXDots:Y.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:M,maxHiddenAxisDots:_-14,dotSize:I}),m.label=2;case 2:return this.clear(),this.drawBackground(),this.drawDots(function(O,H){var G,U,ne,te,Y,ye;return!(b._options.imageOptions.hideBackgroundDots&&O>=(_-q.hideXDots)/2&&O<(_+q.hideXDots)/2&&H>=(_-q.hideYDots)/2&&H<(_+q.hideYDots)/2||!((G=Z[O])===null||G===void 0)&&G[H]||!((U=Z[O-_+7])===null||U===void 0)&&U[H]||!((ne=Z[O])===null||ne===void 0)&&ne[H-_+7]||!((te=oe[O])===null||te===void 0)&&te[H]||!((Y=oe[O-_+7])===null||Y===void 0)&&Y[H]||!((ye=oe[O])===null||ye===void 0)&&ye[H-_+7])}),this.drawCorners(),this._options.image&&this.drawImage({width:q.width,height:q.height,count:_,dotSize:I}),[2]}})},new((l=void 0)||(l=Promise))(function(_,L){function I(ee){try{D(v.next(ee))}catch(j){L(j)}}function q(ee){try{D(v.throw(ee))}catch(j){L(j)}}function D(ee){var j;ee.done?_(ee.value):(j=ee.value,j instanceof l?j:new l(function(p){p(j)})).then(I,q)}D((v=v.apply(u,c||[])).next())});var u,c,l,v},d.prototype.drawBackground=function(){var n=this.context,u=this._options;if(n){if(u.backgroundOptions.gradient){var c=u.backgroundOptions.gradient,l=this._createGradient({context:n,options:c,additionalRotation:0,x:0,y:0,size:this._canvas.width>this._canvas.height?this._canvas.width:this._canvas.height});c.colorStops.forEach(function(v){var _=v.offset,L=v.color;l.addColorStop(_,L)}),n.fillStyle=l}else u.backgroundOptions.color&&(n.fillStyle=u.backgroundOptions.color);n.fillRect(0,0,this._canvas.width,this._canvas.height)}},d.prototype.drawDots=function(n){var u=this;if(!this._qr)throw"QR code is not defined";var c=this.context;if(!c)throw"QR code is not defined";var l=this._options,v=this._qr.getModuleCount();if(v>l.width||v>l.height)throw"The canvas is too small.";var _=Math.min(l.width,l.height)-2*l.margin,L=Math.floor(_/v),I=Math.floor((l.width-v*L)/2),q=Math.floor((l.height-v*L)/2),D=new de({context:c,type:l.dotsOptions.type});c.beginPath();for(var ee=function(m){for(var O=function(G){return n&&!n(m,G)?"continue":j._qr.isDark(m,G)?void D.draw(I+m*L,q+G*L,L,function(U,ne){return!(m+U<0||G+ne<0||m+U>=v||G+ne>=v)&&!(n&&!n(m+U,G+ne))&&!!u._qr&&u._qr.isDark(m+U,G+ne)}):"continue"},H=0;H<v;H++)O(H)},j=this,p=0;p<v;p++)ee(p);if(l.dotsOptions.gradient){var M=l.dotsOptions.gradient,b=this._createGradient({context:c,options:M,additionalRotation:0,x:I,y:q,size:v*L});M.colorStops.forEach(function(m){var O=m.offset,H=m.color;b.addColorStop(O,H)}),c.fillStyle=c.strokeStyle=b}else l.dotsOptions.color&&(c.fillStyle=c.strokeStyle=l.dotsOptions.color);c.fill("evenodd")},d.prototype.drawCorners=function(n){var u=this;if(!this._qr)throw"QR code is not defined";var c=this.context;if(!c)throw"QR code is not defined";var l=this._options,v=this._qr.getModuleCount(),_=Math.min(l.width,l.height)-2*l.margin,L=Math.floor(_/v),I=7*L,q=3*L,D=Math.floor((l.width-v*L)/2),ee=Math.floor((l.height-v*L)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(function(j){var p,M,b,m,O,H,G,U,ne,te,Y=j[0],ye=j[1],we=j[2];if(!n||n(Y,ye)){var J=D+Y*L*(v-7),ge=ee+ye*L*(v-7);if(!((p=l.cornersSquareOptions)===null||p===void 0)&&p.type){var ue=new ve({context:c,type:(M=l.cornersSquareOptions)===null||M===void 0?void 0:M.type});c.beginPath(),ue.draw(J,ge,I,we)}else{var je=new de({context:c,type:l.dotsOptions.type});c.beginPath();for(var Ne=function(be){for(var Ke=function(ze){if(!(!((b=Z[be])===null||b===void 0)&&b[ze]))return"continue";je.draw(J+be*L,ge+ze*L,L,function(pe,Ct){var Fe;return!!(!((Fe=Z[be+pe])===null||Fe===void 0)&&Fe[ze+Ct])})},me=0;me<Z[be].length;me++)Ke(me)},ce=0;ce<Z.length;ce++)Ne(ce)}if(!((m=l.cornersSquareOptions)===null||m===void 0)&&m.gradient){var Ee=l.cornersSquareOptions.gradient,Re=u._createGradient({context:c,options:Ee,additionalRotation:we,x:J,y:ge,size:I});Ee.colorStops.forEach(function(be){var Ke=be.offset,me=be.color;Re.addColorStop(Ke,me)}),c.fillStyle=c.strokeStyle=Re}else!((O=l.cornersSquareOptions)===null||O===void 0)&&O.color&&(c.fillStyle=c.strokeStyle=l.cornersSquareOptions.color);if(c.fill("evenodd"),(H=l.cornersDotOptions)===null||H===void 0?void 0:H.type){var Be=new he({context:c,type:(G=l.cornersDotOptions)===null||G===void 0?void 0:G.type});c.beginPath(),Be.draw(J+2*L,ge+2*L,q,we)}else{je=new de({context:c,type:l.dotsOptions.type}),c.beginPath();var at=function(be){for(var Ke=function(ze){if(!(!((U=oe[be])===null||U===void 0)&&U[ze]))return"continue";je.draw(J+be*L,ge+ze*L,L,function(pe,Ct){var Fe;return!!(!((Fe=oe[be+pe])===null||Fe===void 0)&&Fe[ze+Ct])})},me=0;me<oe[be].length;me++)Ke(me)};for(ce=0;ce<oe.length;ce++)at(ce)}if(!((ne=l.cornersDotOptions)===null||ne===void 0)&&ne.gradient){Ee=l.cornersDotOptions.gradient;var Xe=u._createGradient({context:c,options:Ee,additionalRotation:we,x:J+2*L,y:ge+2*L,size:q});Ee.colorStops.forEach(function(be){var Ke=be.offset,me=be.color;Xe.addColorStop(Ke,me)}),c.fillStyle=c.strokeStyle=Xe}else!((te=l.cornersDotOptions)===null||te===void 0)&&te.color&&(c.fillStyle=c.strokeStyle=l.cornersDotOptions.color);c.fill("evenodd")}})},d.prototype.loadImage=function(){var n=this;return new Promise(function(u,c){var l=n._options,v=new Image;if(!l.image)return c("Image is not defined");typeof l.imageOptions.crossOrigin=="string"&&(v.crossOrigin=l.imageOptions.crossOrigin),n._image=v,v.onload=function(){u()},v.src=l.image})},d.prototype.drawImage=function(n){var u=n.width,c=n.height,l=n.count,v=n.dotSize,_=this.context;if(!_)throw"canvasContext is not defined";if(!this._image)throw"image is not defined";var L=this._options,I=Math.floor((L.width-l*v)/2),q=Math.floor((L.height-l*v)/2),D=I+L.imageOptions.margin+(l*v-u)/2,ee=q+L.imageOptions.margin+(l*v-c)/2,j=u-2*L.imageOptions.margin,p=c-2*L.imageOptions.margin;_.drawImage(this._image,D,ee,j<0?0:j,p<0?0:p)},d.prototype._createGradient=function(n){var u,c=n.context,l=n.options,v=n.additionalRotation,_=n.x,L=n.y,I=n.size;if(l.type==="radial")u=c.createRadialGradient(_+I/2,L+I/2,0,_+I/2,L+I/2,I/2);else{var q=((l.rotation||0)+v)%(2*Math.PI),D=(q+2*Math.PI)%(2*Math.PI),ee=_+I/2,j=L+I/2,p=_+I/2,M=L+I/2;D>=0&&D<=.25*Math.PI||D>1.75*Math.PI&&D<=2*Math.PI?(ee-=I/2,j-=I/2*Math.tan(q),p+=I/2,M+=I/2*Math.tan(q)):D>.25*Math.PI&&D<=.75*Math.PI?(j-=I/2,ee-=I/2/Math.tan(q),M+=I/2,p+=I/2/Math.tan(q)):D>.75*Math.PI&&D<=1.25*Math.PI?(ee+=I/2,j+=I/2*Math.tan(q),p-=I/2,M-=I/2*Math.tan(q)):D>1.25*Math.PI&&D<=1.75*Math.PI&&(j+=I/2,ee+=I/2/Math.tan(q),M-=I/2,p-=I/2/Math.tan(q)),u=c.createLinearGradient(Math.round(ee),Math.round(j),Math.round(p),Math.round(M))}return u},d}();for(var Le={},He=0;He<=40;He++)Le[He]=He;const Qe={width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:Le[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{color:"#fff"}};var ke=function(){return(ke=Object.assign||function(d){for(var n,u=1,c=arguments.length;u<c;u++)for(var l in n=arguments[u])Object.prototype.hasOwnProperty.call(n,l)&&(d[l]=n[l]);return d}).apply(this,arguments)};function Ve(d){var n=ke({},d);if(!n.colorStops||!n.colorStops.length)throw"Field 'colorStops' is required in gradient";return n.rotation?n.rotation=Number(n.rotation):n.rotation=0,n.colorStops=n.colorStops.map(function(u){return ke(ke({},u),{offset:Number(u.offset)})}),n}function Je(d){var n=ke({},d);return n.width=Number(n.width),n.height=Number(n.height),n.margin=Number(n.margin),n.imageOptions=ke(ke({},n.imageOptions),{hideBackgroundDots:!!n.imageOptions.hideBackgroundDots,imageSize:Number(n.imageOptions.imageSize),margin:Number(n.imageOptions.margin)}),n.margin>Math.min(n.width,n.height)&&(n.margin=Math.min(n.width,n.height)),n.dotsOptions=ke({},n.dotsOptions),n.dotsOptions.gradient&&(n.dotsOptions.gradient=Ve(n.dotsOptions.gradient)),n.cornersSquareOptions&&(n.cornersSquareOptions=ke({},n.cornersSquareOptions),n.cornersSquareOptions.gradient&&(n.cornersSquareOptions.gradient=Ve(n.cornersSquareOptions.gradient))),n.cornersDotOptions&&(n.cornersDotOptions=ke({},n.cornersDotOptions),n.cornersDotOptions.gradient&&(n.cornersDotOptions.gradient=Ve(n.cornersDotOptions.gradient))),n.backgroundOptions&&(n.backgroundOptions=ke({},n.backgroundOptions),n.backgroundOptions.gradient&&(n.backgroundOptions.gradient=Ve(n.backgroundOptions.gradient))),n}var ct=x(192),lt=x.n(ct);const R=function(){function d(n){this._options=n?Je(ae(Qe,n)):Qe,this.update()}return d._clearContainer=function(n){n&&(n.innerHTML="")},d.prototype.update=function(n){d._clearContainer(this._container),this._options=n?Je(ae(this._options,n)):this._options,this._options.data&&(this._qr=lt()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(u){switch(!0){case/^[0-9]*$/.test(u):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(u):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._canvas=new We(this._options),this._drawingPromise=this._canvas.drawQR(this._qr),this.append(this._container))},d.prototype.append=function(n){if(n){if(typeof n.appendChild!="function")throw"Container should be a single DOM node";this._canvas&&n.appendChild(this._canvas.getCanvas()),this._container=n}},d.prototype.getImageUrl=function(n){return u=this,c=void 0,v=function(){return function(_,L){var I,q,D,ee,j={label:0,sent:function(){if(1&D[0])throw D[1];return D[1]},trys:[],ops:[]};return ee={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function p(M){return function(b){return function(m){if(I)throw new TypeError("Generator is already executing.");for(;j;)try{if(I=1,q&&(D=2&m[0]?q.return:m[0]?q.throw||((D=q.return)&&D.call(q),0):q.next)&&!(D=D.call(q,m[1])).done)return D;switch(q=0,D&&(m=[2&m[0],D.value]),m[0]){case 0:case 1:D=m;break;case 4:return j.label++,{value:m[1],done:!1};case 5:j.label++,q=m[1],m=[0];continue;case 7:m=j.ops.pop(),j.trys.pop();continue;default:if(!((D=(D=j.trys).length>0&&D[D.length-1])||m[0]!==6&&m[0]!==2)){j=0;continue}if(m[0]===3&&(!D||m[1]>D[0]&&m[1]<D[3])){j.label=m[1];break}if(m[0]===6&&j.label<D[1]){j.label=D[1],D=m;break}if(D&&j.label<D[2]){j.label=D[2],j.ops.push(m);break}D[2]&&j.ops.pop(),j.trys.pop();continue}m=L.call(_,j)}catch(O){m=[6,O],q=0}finally{I=D=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}([M,b])}}}(this,function(_){switch(_.label){case 0:return this._drawingPromise?[4,this._drawingPromise]:[2,""];case 1:return _.sent()===void 0&&this._canvas?[2,this._canvas.getCanvas().toDataURL("image/"+n)]:[2,""]}})},new((l=void 0)||(l=Promise))(function(_,L){function I(ee){try{D(v.next(ee))}catch(j){L(j)}}function q(ee){try{D(v.throw(ee))}catch(j){L(j)}}function D(ee){var j;ee.done?_(ee.value):(j=ee.value,j instanceof l?j:new l(function(p){p(j)})).then(I,q)}D((v=v.apply(u,c||[])).next())});var u,c,l,v},d.prototype.download=function(n){var u=this;this._drawingPromise&&this._drawingPromise.then(function(){if(u._canvas){var c=n,l=c.extension||"png",v=c.name||"qr";(function(_,L){var I=document.createElement("a");I.download=L,I.href=_,document.body.appendChild(I),I.click(),document.body.removeChild(I)})(u._canvas.getCanvas().toDataURL("image/"+l),v+"."+l)}})},d}();var k=function(d,n,u,c){return new(u||(u=Promise))(function(l,v){function _(q){try{I(c.next(q))}catch(D){v(D)}}function L(q){try{I(c.throw(q))}catch(D){v(D)}}function I(q){var D;q.done?l(q.value):(D=q.value,D instanceof u?D:new u(function(ee){ee(D)})).then(_,L)}I((c=c.apply(d,[])).next())})},E=function(d,n){var u,c,l,v,_={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return v={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function L(I){return function(q){return function(D){if(u)throw new TypeError("Generator is already executing.");for(;_;)try{if(u=1,c&&(l=2&D[0]?c.return:D[0]?c.throw||((l=c.return)&&l.call(c),0):c.next)&&!(l=l.call(c,D[1])).done)return l;switch(c=0,l&&(D=[2&D[0],l.value]),D[0]){case 0:case 1:l=D;break;case 4:return _.label++,{value:D[1],done:!1};case 5:_.label++,c=D[1],D=[0];continue;case 7:D=_.ops.pop(),_.trys.pop();continue;default:if(!((l=(l=_.trys).length>0&&l[l.length-1])||D[0]!==6&&D[0]!==2)){_=0;continue}if(D[0]===3&&(!l||D[1]>l[0]&&D[1]<l[3])){_.label=D[1];break}if(D[0]===6&&_.label<l[1]){_.label=l[1],l=D;break}if(l&&_.label<l[2]){_.label=l[2],_.ops.push(D);break}l[2]&&_.ops.pop(),_.trys.pop();continue}D=n.call(d,_)}catch(ee){D=[6,ee],c=0}finally{u=l=0}if(5&D[0])throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}([I,q])}}};const T=(0,F.defineComponent)({name:"QRCodeVue3",props:{width:{type:Number,default:300},imgclass:{type:String,default:""},myclass:{type:String,default:""},downloadButton:{type:String,default:""},buttonName:{type:String,default:"Download3"},height:{type:Number,default:300},margin:{type:Number,default:0},value:{type:String,required:!0},image:{type:String,default:""},qrOptions:{type:Object,default:function(){return{typeNumber:0,mode:"Byte",errorCorrectionLevel:"Q"}}},imageOptions:{type:Object,default:function(){return{hideBackgroundDots:!0,imageSize:.4,margin:0}}},dotsOptions:{type:Object,default:function(){return{type:"dots",color:"#6a1a4c",gradient:{type:"linear",rotation:0,colorStops:[{offset:0,color:"#6a1a4c"},{offset:1,color:"#6a1a4c"}]}}}},backgroundOptions:{type:Object,default:function(){return{color:"#ffffff"}}},cornersSquareOptions:{type:Object,default:function(){return{type:"dot",color:"#000000"}}},cornersDotOptions:{type:Object,default:function(){return{type:void 0,color:"#000000"}}},fileExt:{type:String,default:"png"},download:{type:Boolean,default:!1},downloadOptions:{type:Object,default:function(){return{name:"vqr",extension:"png"}}}},data:function(){return{imageUrl:"",qrCode:new R({data:this.value,width:this.width,height:this.height,margin:this.margin,qrOptions:this.qrOptions,imageOptions:this.imageOptions,dotsOptions:this.dotsOptions,backgroundOptions:this.backgroundOptions,image:this.image,cornersSquareOptions:this.cornersSquareOptions,cornersDotOptions:this.cornersDotOptions})}},watch:{value:function(){return k(this,void 0,void 0,function(){var d;return E(this,function(n){switch(n.label){case 0:return this.qrCode=new R({data:this.value,width:this.width,height:this.height,margin:this.margin,qrOptions:this.qrOptions,imageOptions:this.imageOptions,dotsOptions:this.dotsOptions,backgroundOptions:this.backgroundOptions,image:this.image,cornersSquareOptions:this.cornersSquareOptions,cornersDotOptions:this.cornersDotOptions}),d=this,[4,this.qrCode.getImageUrl(this.fileExt)];case 1:return d.imageUrl=n.sent(),[2]}})})}},methods:{onDownloadClick:function(){this.qrCode.download(this.downloadOptions)}},mounted:function(){return k(this,void 0,void 0,function(){var d;return E(this,function(n){switch(n.label){case 0:return d=this,[4,this.qrCode.getImageUrl(this.fileExt)];case 1:return d.imageUrl=n.sent(),[2]}})})}});T.render=function(d,n,u,c,l,v){return(0,F.openBlock)(),(0,F.createBlock)("div",null,[d.imageUrl?((0,F.openBlock)(),(0,F.createBlock)("div",{key:0,class:d.myclass},[(0,F.createVNode)("img",{src:d.imageUrl,class:d.imgclass,crossorigin:"anonymous"},null,10,["src"])],2)):(0,F.createCommentVNode)("v-if",!0),d.download?((0,F.openBlock)(),(0,F.createBlock)("div",P,[(0,F.createVNode)("button",{class:d.downloadButton,onClick:n[1]||(n[1]=(..._)=>d.onDownloadClick&&d.onDownloadClick(..._))},(0,F.toDisplayString)(d.buttonName),3)])):(0,F.createCommentVNode)("v-if",!0)])};const w=T})(),$.default})()})}(ar)),ar.exports}var Ja=Ya();const Xa=Pa(Ja);var Xr=(r,a,i)=>{if(!a.has(r))throw TypeError("Cannot "+i)},Lr=(r,a,i)=>(Xr(r,a,"read from private field"),i?i.call(r):a.get(r)),Ka=(r,a,i)=>{if(a.has(r))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(r):a.set(r,i)},Za=(r,a,i,h)=>(Xr(r,a,"write to private field"),a.set(r,i),i);const Kr=[["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"]],ei=[...Kr,["unknown"]].map(r=>r[0]),Nt=new Map(Kr);function ti(r){for(const[a,i]of Nt)if(r===i)return a;return"unknown"}function ri(r){if(Zr(r))return{width:r.naturalWidth,height:r.naturalHeight};if(en(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(tn(r))return{width:r.videoWidth,height:r.videoHeight};if(nn(r))return{width:r.width,height:r.height};if(an(r))return{width:r.displayWidth,height:r.displayHeight};if(rn(r))return{width:r.width,height:r.height};if(on(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 Zr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function en(r){try{return r instanceof SVGImageElement}catch{return!1}}function tn(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function rn(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function nn(r){try{return r instanceof ImageBitmap}catch{return!1}}function on(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function an(r){try{return r instanceof VideoFrame}catch{return!1}}function sn(r){try{return r instanceof Blob}catch{return!1}}function ni(r){try{return r instanceof ImageData}catch{return!1}}function oi(r,a){try{const i=new OffscreenCanvas(r,a);if(i.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return i;throw void 0}catch{const h=document.createElement("canvas");return h.width=r,h.height=a,h}}async function un(r){if(Zr(r)&&!await ui(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(en(r)&&!await ci(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(an(r)&&li(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(tn(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(nn(r)&&fi(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:a,height:i}=ri(r);if(a===0||i===0)return null;const h=oi(a,i).getContext("2d");h.drawImage(r,0,0);try{return h.getImageData(0,0,a,i)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function ai(r){let a;try{if(globalThis.createImageBitmap)a=await createImageBitmap(r);else if(globalThis.Image){a=new Image;let i="";try{i=URL.createObjectURL(r),a.src=i,await a.decode()}finally{URL.revokeObjectURL(i)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await un(a)}function ii(r){const{width:a,height:i}=r;if(a===0||i===0)return null;const h=r.getContext("2d");try{return h.getImageData(0,0,a,i)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function si(r){if(sn(r))return await ai(r);if(ni(r)){if(di(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return rn(r)||on(r)?ii(r):await un(r)}async function ui(r){try{return await r.decode(),!0}catch{return!1}}async function ci(r){var a;try{return await((a=r.decode)==null?void 0:a.call(r)),!0}catch{return!1}}function li(r){return r.format===null}function di(r){return r.data.buffer.byteLength===0}function fi(r){return r.width===0&&r.height===0}function Nr(r,a){return r instanceof DOMException?new DOMException(`${a}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${a}: ${r.message}`):new Error(`${a}: ${r}`)}const zr=["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 hi(r){return r.join("|")}function pi(r){const a=Ur(r);let i=0,h=zr.length-1;for(;i<=h;){const y=Math.floor((i+h)/2),x=zr[y],$=Ur(x);if($===a)return x;$<a?i=y+1:h=y-1}return"None"}function Ur(r){return r.toLowerCase().replace(/_-\[\]/g,"")}function gi(r,a){return r.Binarizer[a]}function vi(r,a){return r.CharacterSet[a]}const yi=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function mi(r){return yi[r.value]}function wi(r,a){return r.EanAddOnSymbol[a]}function bi(r,a){return r.TextMode[a]}const bt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function cn(r,a){return{...a,formats:hi(a.formats),binarizer:gi(r,a.binarizer),eanAddOnSymbol:wi(r,a.eanAddOnSymbol),textMode:bi(r,a.textMode),characterSet:vi(r,a.characterSet)}}function ln(r){return{...r,format:pi(r.format),eccLevel:r.eccLevel,contentType:mi(r.contentType)}}const Ci={locateFile:(r,a)=>{const i=r.match(/_(.+?)\.wasm$/);return i?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${i[1]}/${r}`:a+r}};let Wr=new WeakMap;function sr(r,a){var i;const h=Wr.get(r);if(h!=null&&h.modulePromise&&a===void 0)return h.modulePromise;const y=(i=h==null?void 0:h.moduleOverrides)!=null?i:Ci,x=r({...y});return Wr.set(r,{moduleOverrides:y,modulePromise:x}),x}async function xi(r,a,i=bt){const h={...bt,...i},y=await sr(r),{size:x}=a,$=new Uint8Array(await a.arrayBuffer()),F=y._malloc(x);y.HEAPU8.set($,F);const P=y.readBarcodesFromImage(F,x,cn(y,h));y._free(F);const B=[];for(let V=0;V<P.size();++V)B.push(ln(P.get(V)));return B}async function _i(r,a,i=bt){const h={...bt,...i},y=await sr(r),{data:x,width:$,height:F,data:{byteLength:P}}=a,B=y._malloc(P);y.HEAPU8.set(x,B);const V=y.readBarcodesFromPixmap(B,$,F,cn(y,h));y._free(B);const W=[];for(let ae=0;ae<V.size();++ae)W.push(ln(V.get(ae)));return W}({...bt,formats:[...bt.formats]});var ur=(()=>{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(a={}){var i=a,h,y;i.ready=new Promise((e,t)=>{h=e,y=t});var x=Object.assign({},i),$="./this.program",F=typeof window=="object",P=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var B="";function V(e){return i.locateFile?i.locateFile(e,B):B+e}var W;(F||P)&&(P?B=self.location.href:typeof document<"u"&&document.currentScript&&(B=document.currentScript.src),r&&(B=r),B.indexOf("blob:")!==0?B=B.substr(0,B.replace(/[?#].*/,"").lastIndexOf("/")+1):B="",P&&(W=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),i.print||console.log.bind(console);var ae=i.printErr||console.error.bind(console);Object.assign(i,x),x=null,i.arguments&&i.arguments,i.thisProgram&&($=i.thisProgram),i.quit&&i.quit;var fe;i.wasmBinary&&(fe=i.wasmBinary),typeof WebAssembly!="object"&&u("no native wasm support detected");var K,de=!1,re,ve,$e,he,Z,oe,We,Le;function He(){var e=K.buffer;i.HEAP8=re=new Int8Array(e),i.HEAP16=$e=new Int16Array(e),i.HEAPU8=ve=new Uint8Array(e),i.HEAPU16=he=new Uint16Array(e),i.HEAP32=Z=new Int32Array(e),i.HEAPU32=oe=new Uint32Array(e),i.HEAPF32=We=new Float32Array(e),i.HEAPF64=Le=new Float64Array(e)}var Qe=[],ke=[],Ve=[];function Je(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)R(i.preRun.shift());ee(Qe)}function ct(){ee(ke)}function lt(){if(i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)E(i.postRun.shift());ee(Ve)}function R(e){Qe.unshift(e)}function k(e){ke.unshift(e)}function E(e){Ve.unshift(e)}var T=0,w=null;function d(e){var t;T++,(t=i.monitorRunDependencies)===null||t===void 0||t.call(i,T)}function n(e){var t;if(T--,(t=i.monitorRunDependencies)===null||t===void 0||t.call(i,T),T==0&&w){var o=w;w=null,o()}}function u(e){var t;(t=i.onAbort)===null||t===void 0||t.call(i,e),e="Aborted("+e+")",ae(e),de=!0,e+=". Build with -sASSERTIONS for more info.";var o=new WebAssembly.RuntimeError(e);throw y(o),o}var c="data:application/octet-stream;base64,",l=e=>e.startsWith(c),v;v="zxing_reader.wasm",l(v)||(v=V(v));function _(e){if(e==v&&fe)return new Uint8Array(fe);if(W)return W(e);throw"both async and sync fetching of the wasm failed"}function L(e){return!fe&&(F||P)&&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(()=>_(e)):Promise.resolve().then(()=>_(e))}function I(e,t,o){return L(e).then(s=>WebAssembly.instantiate(s,t)).then(s=>s).then(o,s=>{ae(`failed to asynchronously prepare wasm: ${s}`),u(s)})}function q(e,t,o,s){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!l(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(f=>{var g=WebAssembly.instantiateStreaming(f,o);return g.then(s,function(C){return ae(`wasm streaming compile failed: ${C}`),ae("falling back to ArrayBuffer instantiation"),I(t,o,s)})}):I(t,o,s)}function D(){var e={a:ea};function t(s,f){return De=s.exports,K=De.ia,He(),vr=De.ma,k(De.ja),n(),De}d();function o(s){t(s.instance)}if(i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(s){ae(`Module.instantiateWasm callback failed with error: ${s}`),y(s)}return q(fe,v,e,o).catch(y),{}}var ee=e=>{for(;e.length>0;)e.shift()(i)};i.noExitRuntime;var j=[],p=0,M=e=>{var t=new O(e);return t.get_caught()||(t.set_caught(!0),p--),t.set_rethrown(!1),j.push(t),$r(t.excPtr),t.get_exception_ptr()},b=0,m=()=>{xe(0,0);var e=j.pop();Dr(e.excPtr),b=0};function O(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){oe[this.ptr+4>>2]=t},this.get_type=function(){return oe[this.ptr+4>>2]},this.set_destructor=function(t){oe[this.ptr+8>>2]=t},this.get_destructor=function(){return oe[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,re[this.ptr+12>>0]=t},this.get_caught=function(){return re[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,re[this.ptr+13>>0]=t},this.get_rethrown=function(){return re[this.ptr+13>>0]!=0},this.init=function(t,o){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(o)},this.set_adjusted_ptr=function(t){oe[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return oe[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=Er(this.get_type());if(t)return oe[this.excPtr>>2];var o=this.get_adjusted_ptr();return o!==0?o:this.excPtr}}var H=e=>{throw b||(b=e),b},G=e=>{var t=b;if(!t)return Mt(0),0;var o=new O(t);o.set_adjusted_ptr(t);var s=o.get_type();if(!s)return Mt(0),t;for(var f in e){var g=e[f];if(g===0||g===s)break;var C=o.ptr+16;if(kr(g,s,C))return Mt(g),t}return Mt(s),t},U=()=>G([]),ne=e=>G([e]),te=(e,t)=>G([e,t]),Y=()=>{var e=j.pop();e||u("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(j.push(e),e.set_rethrown(!0),e.set_caught(!1),p++),b=t,b},ye=(e,t,o)=>{var s=new O(e);throw s.init(t,o),b=e,p++,b},we=()=>p,J={},ge=e=>{for(;e.length;){var t=e.pop(),o=e.pop();o(t)}};function ue(e){return this.fromWireType(Z[e>>2])}var je={},Ne={},ce={},Ee,Re=e=>{throw new Ee(e)},Be=(e,t,o)=>{e.forEach(function(S){ce[S]=t});function s(S){var A=o(S);A.length!==e.length&&Re("Mismatched type converter count");for(var z=0;z<e.length;++z)Fe(e[z],A[z])}var f=new Array(t.length),g=[],C=0;t.forEach((S,A)=>{Ne.hasOwnProperty(S)?f[A]=Ne[S]:(g.push(S),je.hasOwnProperty(S)||(je[S]=[]),je[S].push(()=>{f[A]=Ne[S],++C,C===g.length&&s(f)}))}),g.length===0&&s(f)},at=e=>{var t=J[e];delete J[e];var o=t.rawConstructor,s=t.rawDestructor,f=t.fields,g=f.map(C=>C.getterReturnType).concat(f.map(C=>C.setterArgumentType));Be([e],g,C=>{var S={};return f.forEach((A,z)=>{var Q=A.fieldName,ie=C[z],se=A.getter,le=A.getterContext,_e=C[z+f.length],Te=A.setter,Ce=A.setterContext;S[Q]={read:qe=>ie.fromWireType(se(le,qe)),write:(qe,N)=>{var X=[];Te(Ce,qe,_e.toWireType(X,N)),ge(X)}}}),[{name:t.name,fromWireType:A=>{var z={};for(var Q in S)z[Q]=S[Q].read(A);return s(A),z},toWireType:(A,z)=>{for(var Q in S)if(!(Q in z))throw new TypeError(`Missing field: "${Q}"`);var ie=o();for(Q in S)S[Q].write(ie,z[Q]);return A!==null&&A.push(s,ie),ie},argPackAdvance:Ze,readValueFromPointer:ue,destructorFunction:s}]})},Xe=(e,t,o,s,f)=>{},be=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ke=e},Ke,me=e=>{for(var t="",o=e;ve[o];)t+=Ke[ve[o++]];return t},ze,pe=e=>{throw new ze(e)};function Ct(e,t){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var s=t.name;if(e||pe(`type "${s}" must have a positive integer typeid pointer`),Ne.hasOwnProperty(e)){if(o.ignoreDuplicateRegistrations)return;pe(`Cannot register type '${s}' twice`)}if(Ne[e]=t,delete ce[e],je.hasOwnProperty(e)){var f=je[e];delete je[e],f.forEach(g=>g())}}function Fe(e,t){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ct(e,t,o)}var Ze=8,On=(e,t,o,s)=>{t=me(t),Fe(e,{name:t,fromWireType:function(f){return!!f},toWireType:function(f,g){return g?o:s},argPackAdvance:Ze,readValueFromPointer:function(f){return this.fromWireType(ve[f])},destructorFunction:null})},Tn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Wt=e=>{function t(o){return o.$$.ptrType.registeredClass.name}pe(t(e)+" instance already deleted")},Ht=!1,cr=e=>{},Mn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},lr=e=>{e.count.value-=1;var t=e.count.value===0;t&&Mn(e)},dr=(e,t,o)=>{if(t===o)return e;if(o.baseClass===void 0)return null;var s=dr(e,t,o.baseClass);return s===null?null:o.downcast(s)},fr={},Dn=()=>Object.keys(St).length,$n=()=>{var e=[];for(var t in St)St.hasOwnProperty(t)&&e.push(St[t]);return e},xt=[],Vt=()=>{for(;xt.length;){var e=xt.pop();e.$$.deleteScheduled=!1,e.delete()}},_t,kn=e=>{_t=e,xt.length&&_t&&_t(Vt)},En=()=>{i.getInheritedInstanceCount=Dn,i.getLiveInheritedInstances=$n,i.flushPendingDeletes=Vt,i.setDelayFunction=kn},St={},Rn=(e,t)=>{for(t===void 0&&pe("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},An=(e,t)=>(t=Rn(e,t),St[t]),kt=(e,t)=>{(!t.ptrType||!t.ptr)&&Re("makeClassHandle requires ptr and ptrType");var o=!!t.smartPtrType,s=!!t.smartPtr;return o!==s&&Re("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pt(Object.create(e,{$$:{value:t,writable:!0}}))};function In(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var o=An(this.registeredClass,t);if(o!==void 0){if(o.$$.count.value===0)return o.$$.ptr=t,o.$$.smartPtr=e,o.clone();var s=o.clone();return this.destructor(e),s}function f(){return this.isSmartPointer?kt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):kt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var g=this.registeredClass.getActualType(t),C=fr[g];if(!C)return f.call(this);var S;this.isConst?S=C.constPointerType:S=C.pointerType;var A=dr(t,this.registeredClass,S.registeredClass);return A===null?f.call(this):this.isSmartPointer?kt(S.registeredClass.instancePrototype,{ptrType:S,ptr:A,smartPtrType:this,smartPtr:e}):kt(S.registeredClass.instancePrototype,{ptrType:S,ptr:A})}var Pt=e=>typeof FinalizationRegistry>"u"?(Pt=t=>t,e):(Ht=new FinalizationRegistry(t=>{lr(t.$$)}),Pt=t=>{var o=t.$$,s=!!o.smartPtr;if(s){var f={$$:o};Ht.register(t,f,t)}return t},cr=t=>Ht.unregister(t),Pt(e)),jn=()=>{Object.assign(Et.prototype,{isAliasOf(e){if(!(this instanceof Et)||!(e instanceof Et))return!1;var t=this.$$.ptrType.registeredClass,o=this.$$.ptr;e.$$=e.$$;for(var s=e.$$.ptrType.registeredClass,f=e.$$.ptr;t.baseClass;)o=t.upcast(o),t=t.baseClass;for(;s.baseClass;)f=s.upcast(f),s=s.baseClass;return t===s&&o===f},clone(){if(this.$$.ptr||Wt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Pt(Object.create(Object.getPrototypeOf(this),{$$:{value:Tn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Wt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pe("Object already scheduled for deletion"),cr(this),lr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Wt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pe("Object already scheduled for deletion"),xt.push(this),xt.length===1&&_t&&_t(Vt),this.$$.deleteScheduled=!0,this}})};function Et(){}var Ot=(e,t)=>Object.defineProperty(t,"name",{value:e}),hr=(e,t,o)=>{if(e[t].overloadTable===void 0){var s=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||pe(`Function '${o}' 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[s.argCount]=s}},Gt=(e,t,o)=>{i.hasOwnProperty(e)?((o===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[o]!==void 0)&&pe(`Cannot register public name '${e}' twice`),hr(i,e,e),i.hasOwnProperty(o)&&pe(`Cannot register multiple overloads of a function with the same number of arguments (${o})!`),i[e].overloadTable[o]=t):(i[e]=t,o!==void 0&&(i[e].numArguments=o))},Bn=48,Fn=57,qn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Bn&&t<=Fn?`_${e}`:e};function Ln(e,t,o,s,f,g,C,S){this.name=e,this.constructor=t,this.instancePrototype=o,this.rawDestructor=s,this.baseClass=f,this.getActualType=g,this.upcast=C,this.downcast=S,this.pureVirtualFunctions=[]}var Qt=(e,t,o)=>{for(;t!==o;)t.upcast||pe(`Expected null or instance of ${o.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Nn(e,t){if(t===null)return this.isReference&&pe(`null is not a valid ${this.name}`),0;t.$$||pe(`Cannot pass "${Zt(t)}" as a ${this.name}`),t.$$.ptr||pe(`Cannot pass deleted object as a pointer of type ${this.name}`);var o=t.$$.ptrType.registeredClass,s=Qt(t.$$.ptr,o,this.registeredClass);return s}function zn(e,t){var o;if(t===null)return this.isReference&&pe(`null is not a valid ${this.name}`),this.isSmartPointer?(o=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,o),o):0;(!t||!t.$$)&&pe(`Cannot pass "${Zt(t)}" as a ${this.name}`),t.$$.ptr||pe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&pe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var s=t.$$.ptrType.registeredClass;if(o=Qt(t.$$.ptr,s,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&pe("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?o=t.$$.smartPtr:pe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:o=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)o=t.$$.smartPtr;else{var f=t.clone();o=this.rawShare(o,rt.toHandle(()=>f.delete())),e!==null&&e.push(this.rawDestructor,o)}break;default:pe("Unsupporting sharing policy")}return o}function Un(e,t){if(t===null)return this.isReference&&pe(`null is not a valid ${this.name}`),0;t.$$||pe(`Cannot pass "${Zt(t)}" as a ${this.name}`),t.$$.ptr||pe(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&pe(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass,s=Qt(t.$$.ptr,o,this.registeredClass);return s}function pr(e){return this.fromWireType(oe[e>>2])}var Wn=()=>{Object.assign(Rt.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:Ze,readValueFromPointer:pr,deleteObject(e){e!==null&&e.delete()},fromWireType:In})};function Rt(e,t,o,s,f,g,C,S,A,z,Q){this.name=e,this.registeredClass=t,this.isReference=o,this.isConst=s,this.isSmartPointer=f,this.pointeeType=g,this.sharingPolicy=C,this.rawGetPointee=S,this.rawConstructor=A,this.rawShare=z,this.rawDestructor=Q,!f&&t.baseClass===void 0?s?(this.toWireType=Nn,this.destructorFunction=null):(this.toWireType=Un,this.destructorFunction=null):this.toWireType=zn}var gr=(e,t,o)=>{i.hasOwnProperty(e)||Re("Replacing nonexistant public symbol"),i[e].overloadTable!==void 0&&o!==void 0?i[e].overloadTable[o]=t:(i[e]=t,i[e].argCount=o)},Hn=(e,t,o)=>{var s=i["dynCall_"+e];return o&&o.length?s.apply(null,[t].concat(o)):s.call(null,t)},At=[],vr,Se=e=>{var t=At[e];return t||(e>=At.length&&(At.length=e+1),At[e]=t=vr.get(e)),t},Vn=(e,t,o)=>{if(e.includes("j"))return Hn(e,t,o);var s=Se(t).apply(null,o);return s},Gn=(e,t)=>{var o=[];return function(){return o.length=0,Object.assign(o,arguments),Vn(e,t,o)}},Ye=(e,t)=>{e=me(e);function o(){return e.includes("j")?Gn(e,t):Se(t)}var s=o();return typeof s!="function"&&pe(`unknown function pointer with signature ${e}: ${t}`),s},Qn=(e,t)=>{var o=Ot(t,function(s){this.name=t,this.message=s;var f=new Error(s).stack;f!==void 0&&(this.stack=this.toString()+`
`+f.replace(/^Error(:[^\n]*)?\n/,""))});return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,o.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},o},yr,mr=e=>{var t=Mr(e),o=me(t);return nt(t),o},It=(e,t)=>{var o=[],s={};function f(g){if(!s[g]&&!Ne[g]){if(ce[g]){ce[g].forEach(f);return}o.push(g),s[g]=!0}}throw t.forEach(f),new yr(`${e}: `+o.map(mr).join([", "]))},Yn=(e,t,o,s,f,g,C,S,A,z,Q,ie,se)=>{Q=me(Q),g=Ye(f,g),S&&(S=Ye(C,S)),z&&(z=Ye(A,z)),se=Ye(ie,se);var le=qn(Q);Gt(le,function(){It(`Cannot construct ${Q} due to unbound types`,[s])}),Be([e,t,o],s?[s]:[],function(_e){_e=_e[0];var Te,Ce;s?(Te=_e.registeredClass,Ce=Te.instancePrototype):Ce=Et.prototype;var qe=Ot(Q,function(){if(Object.getPrototypeOf(this)!==N)throw new ze("Use 'new' to construct "+Q);if(X.constructor_body===void 0)throw new ze(Q+" has no accessible constructor");var jr=X.constructor_body[arguments.length];if(jr===void 0)throw new ze(`Tried to invoke ctor of ${Q} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(X.constructor_body).toString()}) parameters instead!`);return jr.apply(this,arguments)}),N=Object.create(Ce,{constructor:{value:qe}});qe.prototype=N;var X=new Ln(Q,qe,N,se,Te,g,S,z);if(X.baseClass){var Me,Ae;(Ae=(Me=X.baseClass).__derivedClasses)!==null&&Ae!==void 0||(Me.__derivedClasses=[]),X.baseClass.__derivedClasses.push(X)}var ft=new Rt(Q,X,!0,!1,!1),Ft=new Rt(Q+"*",X,!1,!1,!1),Ir=new Rt(Q+" const*",X,!1,!0,!1);return fr[e]={pointerType:Ft,constPointerType:Ir},gr(le,qe),[ft,Ft,Ir]})},Yt=(e,t)=>{for(var o=[],s=0;s<e;s++)o.push(oe[t+s*4>>2]);return o};function Jn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Jt(e,t,o,s,f,g){var C=t.length;C<2&&pe("argTypes array size mismatch! Must at least get return value and 'this' types!");var S=t[1]!==null&&o!==null,A=Jn(t),z=t[0].name!=="void",Q=C-2,ie=new Array(Q),se=[],le=[],_e=function(){arguments.length!==Q&&pe(`function ${e} called with ${arguments.length} arguments, expected ${Q}`),le.length=0;var Te;se.length=S?2:1,se[0]=f,S&&(Te=t[1].toWireType(le,this),se[1]=Te);for(var Ce=0;Ce<Q;++Ce)ie[Ce]=t[Ce+2].toWireType(le,arguments[Ce]),se.push(ie[Ce]);var qe=s.apply(null,se);function N(X){if(A)ge(le);else for(var Me=S?1:2;Me<t.length;Me++){var Ae=Me===1?Te:ie[Me-2];t[Me].destructorFunction!==null&&t[Me].destructorFunction(Ae)}if(z)return t[0].fromWireType(X)}return N(qe)};return Ot(e,_e)}var Xn=(e,t,o,s,f,g)=>{var C=Yt(t,o);f=Ye(s,f),Be([],[e],function(S){S=S[0];var A=`constructor ${S.name}`;if(S.registeredClass.constructor_body===void 0&&(S.registeredClass.constructor_body=[]),S.registeredClass.constructor_body[t-1]!==void 0)throw new ze(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${S.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return S.registeredClass.constructor_body[t-1]=()=>{It(`Cannot construct ${S.name} due to unbound types`,C)},Be([],C,z=>(z.splice(1,0,null),S.registeredClass.constructor_body[t-1]=Jt(A,z,null,f,g),[])),[]})},wr=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},Kn=(e,t,o,s,f,g,C,S,A)=>{var z=Yt(o,s);t=me(t),t=wr(t),g=Ye(f,g),Be([],[e],function(Q){Q=Q[0];var ie=`${Q.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),S&&Q.registeredClass.pureVirtualFunctions.push(t);function se(){It(`Cannot call ${ie} due to unbound types`,z)}var le=Q.registeredClass.instancePrototype,_e=le[t];return _e===void 0||_e.overloadTable===void 0&&_e.className!==Q.name&&_e.argCount===o-2?(se.argCount=o-2,se.className=Q.name,le[t]=se):(hr(le,t,ie),le[t].overloadTable[o-2]=se),Be([],z,function(Te){var Ce=Jt(ie,Te,Q,g,C);return le[t].overloadTable===void 0?(Ce.argCount=o-2,le[t]=Ce):le[t].overloadTable[o-2]=Ce,[]}),[]})};function Zn(){Object.assign(br.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 br(){this.allocated=[void 0],this.freelist=[]}var Ge=new br,Xt=e=>{e>=Ge.reserved&&--Ge.get(e).refcount===0&&Ge.free(e)},eo=()=>{for(var e=0,t=Ge.reserved;t<Ge.allocated.length;++t)Ge.allocated[t]!==void 0&&++e;return e},to=()=>{Ge.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Ge.reserved=Ge.allocated.length,i.count_emval_handles=eo},rt={toValue:e=>(e||pe("Cannot use deleted val. handle = "+e),Ge.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 Ge.allocate({refcount:1,value:e})}}},ro=(e,t)=>{t=me(t),Fe(e,{name:t,fromWireType:o=>{var s=rt.toValue(o);return Xt(o),s},toWireType:(o,s)=>rt.toHandle(s),argPackAdvance:Ze,readValueFromPointer:ue,destructorFunction:null})},no=(e,t,o)=>{switch(t){case 1:return o?function(s){return this.fromWireType(re[s>>0])}:function(s){return this.fromWireType(ve[s>>0])};case 2:return o?function(s){return this.fromWireType($e[s>>1])}:function(s){return this.fromWireType(he[s>>1])};case 4:return o?function(s){return this.fromWireType(Z[s>>2])}:function(s){return this.fromWireType(oe[s>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},oo=(e,t,o,s)=>{t=me(t);function f(){}f.values={},Fe(e,{name:t,constructor:f,fromWireType:function(g){return this.constructor.values[g]},toWireType:(g,C)=>C.value,argPackAdvance:Ze,readValueFromPointer:no(t,o,s),destructorFunction:null}),Gt(t,f)},Kt=(e,t)=>{var o=Ne[e];return o===void 0&&pe(t+" has unknown type "+mr(e)),o},ao=(e,t,o)=>{var s=Kt(e,"enum");t=me(t);var f=s.constructor,g=Object.create(s.constructor.prototype,{value:{value:o},constructor:{value:Ot(`${s.name}_${t}`,function(){})}});f.values[o]=g,f[t]=g},Zt=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},io=(e,t)=>{switch(t){case 4:return function(o){return this.fromWireType(We[o>>2])};case 8:return function(o){return this.fromWireType(Le[o>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},so=(e,t,o)=>{t=me(t),Fe(e,{name:t,fromWireType:s=>s,toWireType:(s,f)=>f,argPackAdvance:Ze,readValueFromPointer:io(t,o),destructorFunction:null})},uo=(e,t,o,s,f,g,C)=>{var S=Yt(t,o);e=me(e),e=wr(e),f=Ye(s,f),Gt(e,function(){It(`Cannot call ${e} due to unbound types`,S)},t-1),Be([],S,function(A){var z=[A[0],null].concat(A.slice(1));return gr(e,Jt(e,z,null,f,g),t-1),[]})},co=(e,t,o)=>{switch(t){case 1:return o?s=>re[s>>0]:s=>ve[s>>0];case 2:return o?s=>$e[s>>1]:s=>he[s>>1];case 4:return o?s=>Z[s>>2]:s=>oe[s>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},lo=(e,t,o,s,f)=>{t=me(t);var g=Q=>Q;if(s===0){var C=32-8*o;g=Q=>Q<<C>>>C}var S=t.includes("unsigned"),A=(Q,ie)=>{},z;S?z=function(Q,ie){return A(ie,this.name),ie>>>0}:z=function(Q,ie){return A(ie,this.name),ie},Fe(e,{name:t,fromWireType:g,toWireType:z,argPackAdvance:Ze,readValueFromPointer:co(t,o,s!==0),destructorFunction:null})},fo=(e,t,o)=>{var s=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],f=s[t];function g(C){var S=oe[C>>2],A=oe[C+4>>2];return new f(re.buffer,A,S)}o=me(o),Fe(e,{name:o,fromWireType:g,argPackAdvance:Ze,readValueFromPointer:g},{ignoreDuplicateRegistrations:!0})},Cr=(e,t,o,s)=>{if(!(s>0))return 0;for(var f=o,g=o+s-1,C=0;C<e.length;++C){var S=e.charCodeAt(C);if(S>=55296&&S<=57343){var A=e.charCodeAt(++C);S=65536+((S&1023)<<10)|A&1023}if(S<=127){if(o>=g)break;t[o++]=S}else if(S<=2047){if(o+1>=g)break;t[o++]=192|S>>6,t[o++]=128|S&63}else if(S<=65535){if(o+2>=g)break;t[o++]=224|S>>12,t[o++]=128|S>>6&63,t[o++]=128|S&63}else{if(o+3>=g)break;t[o++]=240|S>>18,t[o++]=128|S>>12&63,t[o++]=128|S>>6&63,t[o++]=128|S&63}}return t[o]=0,o-f},ho=(e,t,o)=>Cr(e,ve,t,o),xr=e=>{for(var t=0,o=0;o<e.length;++o){var s=e.charCodeAt(o);s<=127?t++:s<=2047?t+=2:s>=55296&&s<=57343?(t+=4,++o):t+=3}return t},_r=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,po=(e,t,o)=>{for(var s=t+o,f=t;e[f]&&!(f>=s);)++f;if(f-t>16&&e.buffer&&_r)return _r.decode(e.subarray(t,f));for(var g="";t<f;){var C=e[t++];if(!(C&128)){g+=String.fromCharCode(C);continue}var S=e[t++]&63;if((C&224)==192){g+=String.fromCharCode((C&31)<<6|S);continue}var A=e[t++]&63;if((C&240)==224?C=(C&15)<<12|S<<6|A:C=(C&7)<<18|S<<12|A<<6|e[t++]&63,C<65536)g+=String.fromCharCode(C);else{var z=C-65536;g+=String.fromCharCode(55296|z>>10,56320|z&1023)}}return g},er=(e,t)=>e?po(ve,e,t):"",go=(e,t)=>{t=me(t);var o=t==="std::string";Fe(e,{name:t,fromWireType(s){var f=oe[s>>2],g=s+4,C;if(o)for(var S=g,A=0;A<=f;++A){var z=g+A;if(A==f||ve[z]==0){var Q=z-S,ie=er(S,Q);C===void 0?C=ie:(C+="\0",C+=ie),S=z+1}}else{for(var se=new Array(f),A=0;A<f;++A)se[A]=String.fromCharCode(ve[g+A]);C=se.join("")}return nt(s),C},toWireType(s,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var g,C=typeof f=="string";C||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array||pe("Cannot pass non-string to std::string"),o&&C?g=xr(f):g=f.length;var S=nr(4+g+1),A=S+4;if(oe[S>>2]=g,o&&C)ho(f,A,g+1);else if(C)for(var z=0;z<g;++z){var Q=f.charCodeAt(z);Q>255&&(nt(A),pe("String has UTF-16 code units that do not fit in 8 bits")),ve[A+z]=Q}else for(var z=0;z<g;++z)ve[A+z]=f[z];return s!==null&&s.push(nt,S),S},argPackAdvance:Ze,readValueFromPointer:pr,destructorFunction(s){nt(s)}})},Sr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,vo=(e,t)=>{for(var o=e,s=o>>1,f=s+t/2;!(s>=f)&&he[s];)++s;if(o=s<<1,o-e>32&&Sr)return Sr.decode(ve.subarray(e,o));for(var g="",C=0;!(C>=t/2);++C){var S=$e[e+C*2>>1];if(S==0)break;g+=String.fromCharCode(S)}return g},yo=(e,t,o)=>{var s;if((s=o)!==null&&s!==void 0||(o=2147483647),o<2)return 0;o-=2;for(var f=t,g=o<e.length*2?o/2:e.length,C=0;C<g;++C){var S=e.charCodeAt(C);$e[t>>1]=S,t+=2}return $e[t>>1]=0,t-f},mo=e=>e.length*2,wo=(e,t)=>{for(var o=0,s="";!(o>=t/4);){var f=Z[e+o*4>>2];if(f==0)break;if(++o,f>=65536){var g=f-65536;s+=String.fromCharCode(55296|g>>10,56320|g&1023)}else s+=String.fromCharCode(f)}return s},bo=(e,t,o)=>{var s;if((s=o)!==null&&s!==void 0||(o=2147483647),o<4)return 0;for(var f=t,g=f+o-4,C=0;C<e.length;++C){var S=e.charCodeAt(C);if(S>=55296&&S<=57343){var A=e.charCodeAt(++C);S=65536+((S&1023)<<10)|A&1023}if(Z[t>>2]=S,t+=4,t+4>g)break}return Z[t>>2]=0,t-f},Co=e=>{for(var t=0,o=0;o<e.length;++o){var s=e.charCodeAt(o);s>=55296&&s<=57343&&++o,t+=4}return t},xo=(e,t,o)=>{o=me(o);var s,f,g,C,S;t===2?(s=vo,f=yo,C=mo,g=()=>he,S=1):t===4&&(s=wo,f=bo,C=Co,g=()=>oe,S=2),Fe(e,{name:o,fromWireType:A=>{for(var z=oe[A>>2],Q=g(),ie,se=A+4,le=0;le<=z;++le){var _e=A+4+le*t;if(le==z||Q[_e>>S]==0){var Te=_e-se,Ce=s(se,Te);ie===void 0?ie=Ce:(ie+="\0",ie+=Ce),se=_e+t}}return nt(A),ie},toWireType:(A,z)=>{typeof z!="string"&&pe(`Cannot pass non-string to C++ string type ${o}`);var Q=C(z),ie=nr(4+Q+t);return oe[ie>>2]=Q>>S,f(z,ie+4,Q+t),A!==null&&A.push(nt,ie),ie},argPackAdvance:Ze,readValueFromPointer:ue,destructorFunction(A){nt(A)}})},_o=(e,t,o,s,f,g)=>{J[e]={name:me(t),rawConstructor:Ye(o,s),rawDestructor:Ye(f,g),fields:[]}},So=(e,t,o,s,f,g,C,S,A,z)=>{J[e].fields.push({fieldName:me(t),getterReturnType:o,getter:Ye(s,f),getterContext:g,setterArgumentType:C,setter:Ye(S,A),setterContext:z})},Po=(e,t)=>{t=me(t),Fe(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(o,s)=>{}})},tr=[],Oo=(e,t,o,s)=>(e=tr[e],t=rt.toValue(t),e(null,t,o,s)),To={},Mo=e=>{var t=To[e];return t===void 0?me(e):t},Pr=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var o=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return o||delete t.$$$embind_global$$$,o}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.")},Do=e=>e===0?rt.toHandle(Pr()):(e=Mo(e),rt.toHandle(Pr()[e])),$o=e=>{var t=tr.length;return tr.push(e),t},ko=(e,t)=>{for(var o=new Array(e),s=0;s<e;++s)o[s]=Kt(oe[t+s*4>>2],"parameter "+s);return o},Eo=Reflect.construct,Ro=(e,t,o)=>{var s=[],f=e.toWireType(s,o);return s.length&&(oe[t>>2]=rt.toHandle(s)),f},Ao=(e,t,o)=>{var s=ko(e,t),f=s.shift();e--;var g=new Array(e),C=(A,z,Q,ie)=>{for(var se=0,le=0;le<e;++le)g[le]=s[le].readValueFromPointer(ie+se),se+=s[le].argPackAdvance;for(var _e=o===1?Eo(z,g):z.apply(A,g),le=0;le<e;++le){var Te,Ce;(Te=(Ce=s[le]).deleteObject)===null||Te===void 0||Te.call(Ce,g[le])}return Ro(f,Q,_e)},S=`methodCaller<(${s.map(A=>A.name).join(", ")}) => ${f.name}>`;return $o(Ot(S,C))},Io=e=>{e>4&&(Ge.get(e).refcount+=1)},jo=e=>{var t=rt.toValue(e);ge(t),Xt(e)},Bo=(e,t)=>{e=Kt(e,"_emval_take_value");var o=e.readValueFromPointer(t);return rt.toHandle(o)},Fo=()=>{u("")},qo=(e,t,o)=>ve.copyWithin(e,t,t+o),Lo=()=>2147483648,No=e=>{var t=K.buffer,o=(e-t.byteLength+65535)/65536;try{return K.grow(o),He(),1}catch{}},zo=e=>{var t=ve.length;e>>>=0;var o=Lo();if(e>o)return!1;for(var s=(A,z)=>A+(z-A%z)%z,f=1;f<=4;f*=2){var g=t*(1+.2/f);g=Math.min(g,e+100663296);var C=Math.min(o,s(Math.max(e,g),65536)),S=No(C);if(S)return!0}return!1},rr={},Uo=()=>$||"./this.program",Tt=()=>{if(!Tt.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,_:Uo()};for(var o in rr)rr[o]===void 0?delete t[o]:t[o]=rr[o];var s=[];for(var o in t)s.push(`${o}=${t[o]}`);Tt.strings=s}return Tt.strings},Wo=(e,t)=>{for(var o=0;o<e.length;++o)re[t++>>0]=e.charCodeAt(o);re[t>>0]=0},Ho=(e,t)=>{var o=0;return Tt().forEach((s,f)=>{var g=t+o;oe[e+f*4>>2]=g,Wo(s,g),o+=s.length+1}),0},Vo=(e,t)=>{var o=Tt();oe[e>>2]=o.length;var s=0;return o.forEach(f=>s+=f.length+1),oe[t>>2]=s,0},Go=e=>e,jt=e=>e%4===0&&(e%100!==0||e%400===0),Qo=(e,t)=>{for(var o=0,s=0;s<=t;o+=e[s++]);return o},Or=[31,29,31,30,31,30,31,31,30,31,30,31],Tr=[31,28,31,30,31,30,31,31,30,31,30,31],Yo=(e,t)=>{for(var o=new Date(e.getTime());t>0;){var s=jt(o.getFullYear()),f=o.getMonth(),g=(s?Or:Tr)[f];if(t>g-o.getDate())t-=g-o.getDate()+1,o.setDate(1),f<11?o.setMonth(f+1):(o.setMonth(0),o.setFullYear(o.getFullYear()+1));else return o.setDate(o.getDate()+t),o}return o};function Jo(e,t,o){var s=xr(e)+1,f=new Array(s);return Cr(e,f,0,f.length),f}var Xo=(e,t)=>{re.set(e,t)},Ko=(e,t,o,s)=>{var f=oe[s+40>>2],g={tm_sec:Z[s>>2],tm_min:Z[s+4>>2],tm_hour:Z[s+8>>2],tm_mday:Z[s+12>>2],tm_mon:Z[s+16>>2],tm_year:Z[s+20>>2],tm_wday:Z[s+24>>2],tm_yday:Z[s+28>>2],tm_isdst:Z[s+32>>2],tm_gmtoff:Z[s+36>>2],tm_zone:f?er(f):""},C=er(o),S={"%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 A in S)C=C.replace(new RegExp(A,"g"),S[A]);var z=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Q=["January","February","March","April","May","June","July","August","September","October","November","December"];function ie(N,X,Me){for(var Ae=typeof N=="number"?N.toString():N||"";Ae.length<X;)Ae=Me[0]+Ae;return Ae}function se(N,X){return ie(N,X,"0")}function le(N,X){function Me(ft){return ft<0?-1:ft>0?1:0}var Ae;return(Ae=Me(N.getFullYear()-X.getFullYear()))===0&&(Ae=Me(N.getMonth()-X.getMonth()))===0&&(Ae=Me(N.getDate()-X.getDate())),Ae}function _e(N){switch(N.getDay()){case 0:return new Date(N.getFullYear()-1,11,29);case 1:return N;case 2:return new Date(N.getFullYear(),0,3);case 3:return new Date(N.getFullYear(),0,2);case 4:return new Date(N.getFullYear(),0,1);case 5:return new Date(N.getFullYear()-1,11,31);case 6:return new Date(N.getFullYear()-1,11,30)}}function Te(N){var X=Yo(new Date(N.tm_year+1900,0,1),N.tm_yday),Me=new Date(X.getFullYear(),0,4),Ae=new Date(X.getFullYear()+1,0,4),ft=_e(Me),Ft=_e(Ae);return le(ft,X)<=0?le(Ft,X)<=0?X.getFullYear()+1:X.getFullYear():X.getFullYear()-1}var Ce={"%a":N=>z[N.tm_wday].substring(0,3),"%A":N=>z[N.tm_wday],"%b":N=>Q[N.tm_mon].substring(0,3),"%B":N=>Q[N.tm_mon],"%C":N=>{var X=N.tm_year+1900;return se(X/100|0,2)},"%d":N=>se(N.tm_mday,2),"%e":N=>ie(N.tm_mday,2," "),"%g":N=>Te(N).toString().substring(2),"%G":N=>Te(N),"%H":N=>se(N.tm_hour,2),"%I":N=>{var X=N.tm_hour;return X==0?X=12:X>12&&(X-=12),se(X,2)},"%j":N=>se(N.tm_mday+Qo(jt(N.tm_year+1900)?Or:Tr,N.tm_mon-1),3),"%m":N=>se(N.tm_mon+1,2),"%M":N=>se(N.tm_min,2),"%n":()=>`
`,"%p":N=>N.tm_hour>=0&&N.tm_hour<12?"AM":"PM","%S":N=>se(N.tm_sec,2),"%t":()=>" ","%u":N=>N.tm_wday||7,"%U":N=>{var X=N.tm_yday+7-N.tm_wday;return se(Math.floor(X/7),2)},"%V":N=>{var X=Math.floor((N.tm_yday+7-(N.tm_wday+6)%7)/7);if((N.tm_wday+371-N.tm_yday-2)%7<=2&&X++,X){if(X==53){var Me=(N.tm_wday+371-N.tm_yday)%7;Me!=4&&(Me!=3||!jt(N.tm_year))&&(X=1)}}else{X=52;var Ae=(N.tm_wday+7-N.tm_yday-1)%7;(Ae==4||Ae==5&&jt(N.tm_year%400-1))&&X++}return se(X,2)},"%w":N=>N.tm_wday,"%W":N=>{var X=N.tm_yday+7-(N.tm_wday+6)%7;return se(Math.floor(X/7),2)},"%y":N=>(N.tm_year+1900).toString().substring(2),"%Y":N=>N.tm_year+1900,"%z":N=>{var X=N.tm_gmtoff,Me=X>=0;return X=Math.abs(X)/60,X=X/60*100+X%60,(Me?"+":"-")+("0000"+X).slice(-4)},"%Z":N=>N.tm_zone,"%%":()=>"%"};C=C.replace(/%%/g,"\0\0");for(var A in Ce)C.includes(A)&&(C=C.replace(new RegExp(A,"g"),Ce[A](g)));C=C.replace(/\0\0/g,"%");var qe=Jo(C);return qe.length>t?0:(Xo(qe,e),qe.length-1)},Zo=(e,t,o,s,f)=>Ko(e,t,o,s);Ee=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},be(),ze=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},jn(),En(),Wn(),yr=i.UnboundTypeError=Qn(Error,"UnboundTypeError"),Zn(),to();var ea={s:M,u:m,b:U,g:ne,q:te,J:Y,f:ye,V:we,d:H,da:at,Q:Xe,_:On,ca:Yn,ba:Xn,w:Kn,Y:ro,x:oo,h:ao,L:so,M:uo,t:lo,o:fo,K:go,C:xo,A:_o,ea:So,$:Po,R:Oo,ha:Xt,fa:Do,Z:Ao,N:Io,O:jo,aa:Bo,B:Fo,X:qo,W:zo,T:Ho,U:Vo,E:va,D:aa,F:ga,n:ya,a:ta,e:sa,m:oa,k:ca,H:ha,v:da,G:pa,z:wa,P:Ca,l:ua,j:ia,c:na,p:ra,I:fa,r:ma,i:la,y:ba,ga:Go,S:Zo},De=D(),nt=i._free=e=>(nt=i._free=De.ka)(e),nr=i._malloc=e=>(nr=i._malloc=De.la)(e),Mr=e=>(Mr=De.na)(e),xe=(e,t)=>(xe=De.oa)(e,t),Mt=e=>(Mt=De.pa)(e),Pe=()=>(Pe=De.qa)(),Oe=e=>(Oe=De.ra)(e),Dr=e=>(Dr=De.sa)(e),$r=e=>($r=De.ta)(e),kr=(e,t,o)=>(kr=De.ua)(e,t,o),Er=e=>(Er=De.va)(e);i.dynCall_viijii=(e,t,o,s,f,g,C)=>(i.dynCall_viijii=De.wa)(e,t,o,s,f,g,C);var Rr=i.dynCall_jiiii=(e,t,o,s,f)=>(Rr=i.dynCall_jiiii=De.xa)(e,t,o,s,f);i.dynCall_iiiiij=(e,t,o,s,f,g,C)=>(i.dynCall_iiiiij=De.ya)(e,t,o,s,f,g,C),i.dynCall_iiiiijj=(e,t,o,s,f,g,C,S,A)=>(i.dynCall_iiiiijj=De.za)(e,t,o,s,f,g,C,S,A),i.dynCall_iiiiiijj=(e,t,o,s,f,g,C,S,A,z)=>(i.dynCall_iiiiiijj=De.Aa)(e,t,o,s,f,g,C,S,A,z);function ta(e,t){var o=Pe();try{return Se(e)(t)}catch(s){if(Oe(o),s!==s+0)throw s;xe(1,0)}}function ra(e,t,o,s){var f=Pe();try{Se(e)(t,o,s)}catch(g){if(Oe(f),g!==g+0)throw g;xe(1,0)}}function na(e,t,o){var s=Pe();try{Se(e)(t,o)}catch(f){if(Oe(s),f!==f+0)throw f;xe(1,0)}}function oa(e,t,o,s){var f=Pe();try{return Se(e)(t,o,s)}catch(g){if(Oe(f),g!==g+0)throw g;xe(1,0)}}function aa(e,t,o,s,f){var g=Pe();try{return Se(e)(t,o,s,f)}catch(C){if(Oe(g),C!==C+0)throw C;xe(1,0)}}function ia(e,t){var o=Pe();try{Se(e)(t)}catch(s){if(Oe(o),s!==s+0)throw s;xe(1,0)}}function sa(e,t,o){var s=Pe();try{return Se(e)(t,o)}catch(f){if(Oe(s),f!==f+0)throw f;xe(1,0)}}function ua(e){var t=Pe();try{Se(e)()}catch(o){if(Oe(t),o!==o+0)throw o;xe(1,0)}}function ca(e,t,o,s,f){var g=Pe();try{return Se(e)(t,o,s,f)}catch(C){if(Oe(g),C!==C+0)throw C;xe(1,0)}}function la(e,t,o,s,f,g,C,S,A,z,Q){var ie=Pe();try{Se(e)(t,o,s,f,g,C,S,A,z,Q)}catch(se){if(Oe(ie),se!==se+0)throw se;xe(1,0)}}function da(e,t,o,s,f,g,C){var S=Pe();try{return Se(e)(t,o,s,f,g,C)}catch(A){if(Oe(S),A!==A+0)throw A;xe(1,0)}}function fa(e,t,o,s,f){var g=Pe();try{Se(e)(t,o,s,f)}catch(C){if(Oe(g),C!==C+0)throw C;xe(1,0)}}function ha(e,t,o,s,f,g){var C=Pe();try{return Se(e)(t,o,s,f,g)}catch(S){if(Oe(C),S!==S+0)throw S;xe(1,0)}}function pa(e,t,o,s,f,g,C,S){var A=Pe();try{return Se(e)(t,o,s,f,g,C,S)}catch(z){if(Oe(A),z!==z+0)throw z;xe(1,0)}}function ga(e,t,o,s){var f=Pe();try{return Se(e)(t,o,s)}catch(g){if(Oe(f),g!==g+0)throw g;xe(1,0)}}function va(e,t,o,s){var f=Pe();try{return Se(e)(t,o,s)}catch(g){if(Oe(f),g!==g+0)throw g;xe(1,0)}}function ya(e){var t=Pe();try{return Se(e)()}catch(o){if(Oe(t),o!==o+0)throw o;xe(1,0)}}function ma(e,t,o,s,f,g,C,S){var A=Pe();try{Se(e)(t,o,s,f,g,C,S)}catch(z){if(Oe(A),z!==z+0)throw z;xe(1,0)}}function wa(e,t,o,s,f,g,C,S,A,z,Q,ie){var se=Pe();try{return Se(e)(t,o,s,f,g,C,S,A,z,Q,ie)}catch(le){if(Oe(se),le!==le+0)throw le;xe(1,0)}}function ba(e,t,o,s,f,g,C,S,A,z,Q,ie,se,le,_e,Te){var Ce=Pe();try{Se(e)(t,o,s,f,g,C,S,A,z,Q,ie,se,le,_e,Te)}catch(qe){if(Oe(Ce),qe!==qe+0)throw qe;xe(1,0)}}function Ca(e,t,o,s,f){var g=Pe();try{return Rr(e,t,o,s,f)}catch(C){if(Oe(g),C!==C+0)throw C;xe(1,0)}}var Bt;w=function e(){Bt||Ar(),Bt||(w=e)};function Ar(){if(T>0||(Je(),T>0))return;function e(){Bt||(Bt=!0,i.calledRun=!0,!de&&(ct(),h(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),lt()))}i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),e()},1)):e()}if(i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ar(),a.ready}})();function Si(r){return sr(ur,r)}async function Pi(r,a){return xi(ur,r,a)}async function Oi(r,a){return _i(ur,r,a)}var $t;class Hr extends EventTarget{constructor(a={}){var i;super(),Ka(this,$t,void 0);try{const h=(i=a==null?void 0:a.formats)==null?void 0:i.filter(y=>y!=="unknown");if((h==null?void 0:h.length)===0)throw new TypeError("Hint option provided, but is empty.");h==null||h.forEach(y=>{if(!Nt.has(y))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${y}' is not a valid enum value of type BarcodeFormat.`)}),Za(this,$t,h??[]),Si().then(y=>{this.dispatchEvent(new CustomEvent("load",{detail:y}))}).catch(y=>{this.dispatchEvent(new CustomEvent("error",{detail:y}))})}catch(h){throw Nr(h,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return ei.filter(a=>a!=="unknown")}async detect(a){try{const i=await si(a);if(i===null)return[];let h;try{sn(i)?h=await Pi(i,{tryHarder:!0,formats:Lr(this,$t).map(y=>Nt.get(y))}):h=await Oi(i,{tryHarder:!0,formats:Lr(this,$t).map(y=>Nt.get(y))})}catch(y){throw console.error(y),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return h.map(y=>{const{topLeft:{x,y:$},topRight:{x:F,y:P},bottomLeft:{x:B,y:V},bottomRight:{x:W,y:ae}}=y.position,fe=Math.min(x,F,B,W),K=Math.min($,P,V,ae),de=Math.max(x,F,B,W),re=Math.max($,P,V,ae);return{boundingBox:new DOMRectReadOnly(fe,K,de-fe,re-K),rawValue:y.text,format:ti(y.format),cornerPoints:[{x,y:$},{x:F,y:P},{x:W,y:ae},{x:B,y:V}]}})}catch(i){throw Nr(i,"Failed to execute 'detect' on 'BarcodeDetector'")}}}$t=new WeakMap;const dn=(r,a,i="error")=>{let h,y;const x=new Promise(($,F)=>{h=$,y=F,r.addEventListener(a,h),r.addEventListener(i,y)});return x.finally(()=>{r.removeEventListener(a,h),r.removeEventListener(i,y)}),x},Vr=r=>new Promise(a=>setTimeout(a,r));class fn extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class Ti extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class Mi 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 hn;async function Di(r){if(window.BarcodeDetector===void 0)return console.debug("[vue-qrcode-reader] Native BarcodeDetector not supported. Will use polyfill."),new Hr({formats:r});const a=await window.BarcodeDetector.getSupportedFormats(),i=r.filter(h=>!a.includes(h));return i.length>0?(console.debug(`[vue-qrcode-reader] Native BarcodeDetector does not support formats ${JSON.stringify(i)}. Will use polyfill.`),new Hr({formats:r})):(console.debug("[vue-qrcode-reader] Will use native BarcodeDetector."),new window.BarcodeDetector({formats:r}))}async function pn(r){hn=await Di(r)}const $i=async(r,{detectHandler:a,locateHandler:i,minDelay:h,formats:y})=>{console.debug("[vue-qrcode-reader] start scanning"),await pn(y);const x=$=>async F=>{if(r.readyState===0)console.debug("[vue-qrcode-reader] stop scanning: video element readyState is 0");else{const{lastScanned:P,contentBefore:B,lastScanHadContent:V}=$;if(F-P<h)window.requestAnimationFrame(x($));else{const W=await hn.detect(r),ae=W.some(de=>!B.includes(de.rawValue));ae&&a(W);const fe=W.length>0;fe&&i(W),!fe&&V&&i(W);const K={lastScanned:F,lastScanHadContent:fe,contentBefore:ae?W.map(de=>de.rawValue):B};window.requestAnimationFrame(x(K))}}};x({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var gn={},Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.compactObject=mn;Ue.deprecated=qi;var ki=Ue.detectBrowser=Li;Ue.disableLog=ji;Ue.disableWarnings=Bi;Ue.extractVersion=zt;Ue.filterStats=Ni;Ue.log=Fi;Ue.walkStats=Ut;Ue.wrapPeerConnectionEvent=Ii;function Ei(r,a,i){return a=Ri(a),a in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}function Ri(r){var a=Ai(r,"string");return st(a)==="symbol"?a:String(a)}function Ai(r,a){if(st(r)!=="object"||r===null)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var h=i.call(r,a||"default");if(st(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}function st(r){"@babel/helpers - typeof";return st=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},st(r)}var vn=!0,yn=!0;function zt(r,a,i){var h=r.match(a);return h&&h.length>=i&&parseInt(h[i],10)}function Ii(r,a,i){if(r.RTCPeerConnection){var h=r.RTCPeerConnection.prototype,y=h.addEventListener;h.addEventListener=function($,F){if($!==a)return y.apply(this,arguments);var P=function(B){var V=i(B);V&&(F.handleEvent?F.handleEvent(V):F(V))};return this._eventMap=this._eventMap||{},this._eventMap[a]||(this._eventMap[a]=new Map),this._eventMap[a].set(F,P),y.apply(this,[$,P])};var x=h.removeEventListener;h.removeEventListener=function($,F){if($!==a||!this._eventMap||!this._eventMap[a])return x.apply(this,arguments);if(!this._eventMap[a].has(F))return x.apply(this,arguments);var P=this._eventMap[a].get(F);return this._eventMap[a].delete(F),this._eventMap[a].size===0&&delete this._eventMap[a],Object.keys(this._eventMap).length===0&&delete this._eventMap,x.apply(this,[$,P])},Object.defineProperty(h,"on"+a,{get:function(){return this["_on"+a]},set:function($){this["_on"+a]&&(this.removeEventListener(a,this["_on"+a]),delete this["_on"+a]),$&&this.addEventListener(a,this["_on"+a]=$)},enumerable:!0,configurable:!0})}}function ji(r){return typeof r!="boolean"?new Error("Argument type: "+st(r)+". Please use a boolean."):(vn=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function Bi(r){return typeof r!="boolean"?new Error("Argument type: "+st(r)+". Please use a boolean."):(yn=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function Fi(){if((typeof window>"u"?"undefined":st(window))==="object"){if(vn)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function qi(r,a){yn&&console.warn(r+" is deprecated, please use "+a+" instead.")}function Li(r){var a={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return a.browser="Not a browser.",a;var i=r.navigator;if(i.mozGetUserMedia)a.browser="firefox",a.version=zt(i.userAgent,/Firefox\/(\d+)\./,1);else if(i.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)a.browser="chrome",a.version=zt(i.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&i.userAgent.match(/AppleWebKit\/(\d+)\./))a.browser="safari",a.version=zt(i.userAgent,/AppleWebKit\/(\d+)\./,1),a.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return a.browser="Not a supported browser.",a;return a}function Gr(r){return Object.prototype.toString.call(r)==="[object Object]"}function mn(r){return Gr(r)?Object.keys(r).reduce(function(a,i){var h=Gr(r[i]),y=h?mn(r[i]):r[i],x=h&&!Object.keys(y).length;return y===void 0||x?a:Object.assign(a,Ei({},i,y))},{}):r}function Ut(r,a,i){!a||i.has(a.id)||(i.set(a.id,a),Object.keys(a).forEach(function(h){h.endsWith("Id")?Ut(r,r.get(a[h]),i):h.endsWith("Ids")&&a[h].forEach(function(y){Ut(r,r.get(y),i)})}))}function Ni(r,a,i){var h=i?"outbound-rtp":"inbound-rtp",y=new Map;if(a===null)return y;var x=[];return r.forEach(function($){$.type==="track"&&$.trackIdentifier===a.id&&x.push($)}),x.forEach(function($){r.forEach(function(F){F.type===h&&F.trackId===$.id&&Ut(r,F,y)})}),y}Object.defineProperty(gn,"__esModule",{value:!0});var zi=gn.shimGetUserMedia=Hi,Ui=Wi(Ue);function wn(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,i=new WeakMap;return(wn=function(h){return h?i:a})(r)}function Wi(r,a){if(r.__esModule)return r;if(r===null||it(r)!=="object"&&typeof r!="function")return{default:r};var i=wn(a);if(i&&i.has(r))return i.get(r);var h={},y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in r)if(x!=="default"&&Object.prototype.hasOwnProperty.call(r,x)){var $=y?Object.getOwnPropertyDescriptor(r,x):null;$&&($.get||$.set)?Object.defineProperty(h,x,$):h[x]=r[x]}return h.default=r,i&&i.set(r,h),h}function it(r){"@babel/helpers - typeof";return it=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},it(r)}var Qr=Ui.log;function Hi(r,a){var i=r&&r.navigator;if(i.mediaDevices){var h=function(P){if(it(P)!=="object"||P.mandatory||P.optional)return P;var B={};return Object.keys(P).forEach(function(V){if(!(V==="require"||V==="advanced"||V==="mediaSource")){var W=it(P[V])==="object"?P[V]:{ideal:P[V]};W.exact!==void 0&&typeof W.exact=="number"&&(W.min=W.max=W.exact);var ae=function(K,de){return K?K+de.charAt(0).toUpperCase()+de.slice(1):de==="deviceId"?"sourceId":de};if(W.ideal!==void 0){B.optional=B.optional||[];var fe={};typeof W.ideal=="number"?(fe[ae("min",V)]=W.ideal,B.optional.push(fe),fe={},fe[ae("max",V)]=W.ideal,B.optional.push(fe)):(fe[ae("",V)]=W.ideal,B.optional.push(fe))}W.exact!==void 0&&typeof W.exact!="number"?(B.mandatory=B.mandatory||{},B.mandatory[ae("",V)]=W.exact):["min","max"].forEach(function(K){W[K]!==void 0&&(B.mandatory=B.mandatory||{},B.mandatory[ae(K,V)]=W[K])})}}),P.advanced&&(B.optional=(B.optional||[]).concat(P.advanced)),B},y=function(P,B){if(a.version>=61)return B(P);if(P=JSON.parse(JSON.stringify(P)),P&&it(P.audio)==="object"){var V=function(K,de,re){de in K&&!(re in K)&&(K[re]=K[de],delete K[de])};P=JSON.parse(JSON.stringify(P)),V(P.audio,"autoGainControl","googAutoGainControl"),V(P.audio,"noiseSuppression","googNoiseSuppression"),P.audio=h(P.audio)}if(P&&it(P.video)==="object"){var W=P.video.facingMode;W=W&&(it(W)==="object"?W:{ideal:W});var ae=a.version<66;if(W&&(W.exact==="user"||W.exact==="environment"||W.ideal==="user"||W.ideal==="environment")&&!(i.mediaDevices.getSupportedConstraints&&i.mediaDevices.getSupportedConstraints().facingMode&&!ae)){delete P.video.facingMode;var fe;if(W.exact==="environment"||W.ideal==="environment"?fe=["back","rear"]:(W.exact==="user"||W.ideal==="user")&&(fe=["front"]),fe)return i.mediaDevices.enumerateDevices().then(function(K){K=K.filter(function(re){return re.kind==="videoinput"});var de=K.find(function(re){return fe.some(function(ve){return re.label.toLowerCase().includes(ve)})});return!de&&K.length&&fe.includes("back")&&(de=K[K.length-1]),de&&(P.video.deviceId=W.exact?{exact:de.deviceId}:{ideal:de.deviceId}),P.video=h(P.video),Qr("chrome: "+JSON.stringify(P)),B(P)})}P.video=h(P.video)}return Qr("chrome: "+JSON.stringify(P)),B(P)},x=function(P){return a.version>=64?P:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[P.name]||P.name,message:P.message,constraint:P.constraint||P.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},$=function(P,B,V){y(P,function(W){i.webkitGetUserMedia(W,B,function(ae){V&&V(x(ae))})})};if(i.getUserMedia=$.bind(i),i.mediaDevices.getUserMedia){var F=i.mediaDevices.getUserMedia.bind(i.mediaDevices);i.mediaDevices.getUserMedia=function(P){return y(P,function(B){return F(B).then(function(V){if(B.audio&&!V.getAudioTracks().length||B.video&&!V.getVideoTracks().length)throw V.getTracks().forEach(function(W){W.stop()}),new DOMException("","NotFoundError");return V},function(V){return Promise.reject(x(V))})})}}}}var bn={};Object.defineProperty(bn,"__esModule",{value:!0});var Vi=bn.shimGetUserMedia=Yi,Gi=Qi(Ue);function Cn(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,i=new WeakMap;return(Cn=function(h){return h?i:a})(r)}function Qi(r,a){if(r.__esModule)return r;if(r===null||mt(r)!=="object"&&typeof r!="function")return{default:r};var i=Cn(a);if(i&&i.has(r))return i.get(r);var h={},y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in r)if(x!=="default"&&Object.prototype.hasOwnProperty.call(r,x)){var $=y?Object.getOwnPropertyDescriptor(r,x):null;$&&($.get||$.set)?Object.defineProperty(h,x,$):h[x]=r[x]}return h.default=r,i&&i.set(r,h),h}function mt(r){"@babel/helpers - typeof";return mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},mt(r)}function Yi(r,a){var i=r&&r.navigator,h=r&&r.MediaStreamTrack;if(i.getUserMedia=function(P,B,V){Gi.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),i.mediaDevices.getUserMedia(P).then(B,V)},!(a.version>55&&"autoGainControl"in i.mediaDevices.getSupportedConstraints())){var y=function(P,B,V){B in P&&!(V in P)&&(P[V]=P[B],delete P[B])},x=i.mediaDevices.getUserMedia.bind(i.mediaDevices);if(i.mediaDevices.getUserMedia=function(P){return mt(P)==="object"&&mt(P.audio)==="object"&&(P=JSON.parse(JSON.stringify(P)),y(P.audio,"autoGainControl","mozAutoGainControl"),y(P.audio,"noiseSuppression","mozNoiseSuppression")),x(P)},h&&h.prototype.getSettings){var $=h.prototype.getSettings;h.prototype.getSettings=function(){var P=$.apply(this,arguments);return y(P,"mozAutoGainControl","autoGainControl"),y(P,"mozNoiseSuppression","noiseSuppression"),P}}if(h&&h.prototype.applyConstraints){var F=h.prototype.applyConstraints;h.prototype.applyConstraints=function(P){return this.kind==="audio"&&mt(P)==="object"&&(P=JSON.parse(JSON.stringify(P)),y(P,"autoGainControl","mozAutoGainControl"),y(P,"noiseSuppression","mozNoiseSuppression")),F.apply(this,[P])}}}}var tt={};Object.defineProperty(tt,"__esModule",{value:!0});tt.shimAudioContext=as;tt.shimCallbacksAPI=es;tt.shimConstraints=Sn;tt.shimCreateOfferLegacy=os;var Ji=tt.shimGetUserMedia=ts;tt.shimLocalStreamsAPI=Ki;tt.shimRTCIceServerUrls=rs;tt.shimRemoteStreamsAPI=Zi;tt.shimTrackEventTransceiver=ns;var xn=Xi(Ue);function _n(r){if(typeof WeakMap!="function")return null;var a=new WeakMap,i=new WeakMap;return(_n=function(h){return h?i:a})(r)}function Xi(r,a){if(r.__esModule)return r;if(r===null||ut(r)!=="object"&&typeof r!="function")return{default:r};var i=_n(a);if(i&&i.has(r))return i.get(r);var h={},y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in r)if(x!=="default"&&Object.prototype.hasOwnProperty.call(r,x)){var $=y?Object.getOwnPropertyDescriptor(r,x):null;$&&($.get||$.set)?Object.defineProperty(h,x,$):h[x]=r[x]}return h.default=r,i&&i.set(r,h),h}function ut(r){"@babel/helpers - typeof";return ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},ut(r)}function Ki(r){if(!(ut(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 a=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(i){var h=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(i)||this._localStreams.push(i),i.getAudioTracks().forEach(function(y){return a.call(h,y,i)}),i.getVideoTracks().forEach(function(y){return a.call(h,y,i)})},r.RTCPeerConnection.prototype.addTrack=function(i){for(var h=this,y=arguments.length,x=new Array(y>1?y-1:0),$=1;$<y;$++)x[$-1]=arguments[$];return x&&x.forEach(function(F){h._localStreams?h._localStreams.includes(F)||h._localStreams.push(F):h._localStreams=[F]}),a.apply(this,arguments)}}"removeStream"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.removeStream=function(i){var h=this;this._localStreams||(this._localStreams=[]);var y=this._localStreams.indexOf(i);if(y!==-1){this._localStreams.splice(y,1);var x=i.getTracks();this.getSenders().forEach(function($){x.includes($.track)&&h.removeTrack($)})}})}}function Zi(r){if(!(ut(r)!=="object"||!r.RTCPeerConnection)&&("getRemoteStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in r.RTCPeerConnection.prototype))){Object.defineProperty(r.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(i){var h=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=i),this.addEventListener("track",this._onaddstreampoly=function(y){y.streams.forEach(function(x){if(h._remoteStreams||(h._remoteStreams=[]),!h._remoteStreams.includes(x)){h._remoteStreams.push(x);var $=new Event("addstream");$.stream=x,h.dispatchEvent($)}})})}});var a=r.RTCPeerConnection.prototype.setRemoteDescription;r.RTCPeerConnection.prototype.setRemoteDescription=function(){var i=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(h){h.streams.forEach(function(y){if(i._remoteStreams||(i._remoteStreams=[]),!(i._remoteStreams.indexOf(y)>=0)){i._remoteStreams.push(y);var x=new Event("addstream");x.stream=y,i.dispatchEvent(x)}})}),a.apply(i,arguments)}}}function es(r){if(!(ut(r)!=="object"||!r.RTCPeerConnection)){var a=r.RTCPeerConnection.prototype,i=a.createOffer,h=a.createAnswer,y=a.setLocalDescription,x=a.setRemoteDescription,$=a.addIceCandidate;a.createOffer=function(P,B){var V=arguments.length>=2?arguments[2]:arguments[0],W=i.apply(this,[V]);return B?(W.then(P,B),Promise.resolve()):W},a.createAnswer=function(P,B){var V=arguments.length>=2?arguments[2]:arguments[0],W=h.apply(this,[V]);return B?(W.then(P,B),Promise.resolve()):W};var F=function(P,B,V){var W=y.apply(this,[P]);return V?(W.then(B,V),Promise.resolve()):W};a.setLocalDescription=F,F=function(P,B,V){var W=x.apply(this,[P]);return V?(W.then(B,V),Promise.resolve()):W},a.setRemoteDescription=F,F=function(P,B,V){var W=$.apply(this,[P]);return V?(W.then(B,V),Promise.resolve()):W},a.addIceCandidate=F}}function ts(r){var a=r&&r.navigator;if(a.mediaDevices&&a.mediaDevices.getUserMedia){var i=a.mediaDevices,h=i.getUserMedia.bind(i);a.mediaDevices.getUserMedia=function(y){return h(Sn(y))}}!a.getUserMedia&&a.mediaDevices&&a.mediaDevices.getUserMedia&&(a.getUserMedia=(function(y,x,$){a.mediaDevices.getUserMedia(y).then(x,$)}).bind(a))}function Sn(r){return r&&r.video!==void 0?Object.assign({},r,{video:xn.compactObject(r.video)}):r}function rs(r){if(r.RTCPeerConnection){var a=r.RTCPeerConnection;r.RTCPeerConnection=function(i,h){if(i&&i.iceServers){for(var y=[],x=0;x<i.iceServers.length;x++){var $=i.iceServers[x];$.urls===void 0&&$.url?(xn.deprecated("RTCIceServer.url","RTCIceServer.urls"),$=JSON.parse(JSON.stringify($)),$.urls=$.url,delete $.url,y.push($)):y.push(i.iceServers[x])}i.iceServers=y}return new a(i,h)},r.RTCPeerConnection.prototype=a.prototype,"generateCertificate"in a&&Object.defineProperty(r.RTCPeerConnection,"generateCertificate",{get:function(){return a.generateCertificate}})}}function ns(r){ut(r)==="object"&&r.RTCTrackEvent&&"receiver"in r.RTCTrackEvent.prototype&&!("transceiver"in r.RTCTrackEvent.prototype)&&Object.defineProperty(r.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function os(r){var a=r.RTCPeerConnection.prototype.createOffer;r.RTCPeerConnection.prototype.createOffer=function(i){if(i){typeof i.offerToReceiveAudio<"u"&&(i.offerToReceiveAudio=!!i.offerToReceiveAudio);var h=this.getTransceivers().find(function(x){return x.receiver.track.kind==="audio"});i.offerToReceiveAudio===!1&&h?h.direction==="sendrecv"?h.setDirection?h.setDirection("sendonly"):h.direction="sendonly":h.direction==="recvonly"&&(h.setDirection?h.setDirection("inactive"):h.direction="inactive"):i.offerToReceiveAudio===!0&&!h&&this.addTransceiver("audio",{direction:"recvonly"}),typeof i.offerToReceiveVideo<"u"&&(i.offerToReceiveVideo=!!i.offerToReceiveVideo);var y=this.getTransceivers().find(function(x){return x.receiver.track.kind==="video"});i.offerToReceiveVideo===!1&&y?y.direction==="sendrecv"?y.setDirection?y.setDirection("sendonly"):y.direction="sendonly":y.direction==="recvonly"&&(y.setDirection?y.setDirection("inactive"):y.direction="inactive"):i.offerToReceiveVideo===!0&&!y&&this.addTransceiver("video",{direction:"recvonly"})}return a.apply(this,arguments)}}function as(r){ut(r)!=="object"||r.AudioContext||(r.AudioContext=r.webkitAudioContext)}const is=r=>{let a=!1,i;return(...h)=>(a||(i=r(h),a=!0),i)};function et(r,a){if(r===!1)throw new Error(a??"assertion failure")}function Yr(r){throw new Error("this code should be unreachable")}const ss=is(()=>{const r=ki(window);switch(r.browser){case"chrome":zi(window,r);break;case"firefox":Vi(window,r);break;case"safari":Ji(window,r);break;default:throw new fn}});let wt=Promise.resolve({type:"stop",data:{}});async function Jr(r,a,i){var h,y,x;if(console.debug("[vue-qrcode-reader] starting camera with constraints: ",JSON.stringify(a)),window.isSecureContext!==!0)throw new Ti;if(((h=navigator==null?void 0:navigator.mediaDevices)==null?void 0:h.getUserMedia)===void 0)throw new fn;ss(),console.debug("[vue-qrcode-reader] calling getUserMedia");const $=await navigator.mediaDevices.getUserMedia({audio:!1,video:a});r.srcObject!==void 0?r.srcObject=$:r.mozSrcObject!==void 0?r.mozSrcObject=$:window.URL.createObjectURL?r.src=window.URL.createObjectURL($):window.webkitURL?r.src=window.webkitURL.createObjectURL($):r.src=$.id,r.play(),console.debug("[vue-qrcode-reader] waiting for video element to load"),await Promise.race([dn(r,"loadeddata"),Vr(6e3).then(()=>{throw new Mi})]),console.debug("[vue-qrcode-reader] video element loaded"),await Vr(500);const[F]=$.getVideoTracks(),P=(x=(y=F==null?void 0:F.getCapabilities)==null?void 0:y.call(F))!=null?x:{};let B=!1;return i&&P.torch&&(await F.applyConstraints({advanced:[{torch:!0}]}),B=!0),console.debug("[vue-qrcode-reader] camera ready"),{type:"start",data:{videoEl:r,stream:$,capabilities:P,constraints:a,isTorchOn:B}}}async function us(r,{constraints:a,torch:i,restart:h=!1}){wt=wt.then(x=>{if(x.type==="start"){const{data:{videoEl:$,stream:F,constraints:P,isTorchOn:B}}=x;return!h&&r===$&&a===P&&i===B?x:Pn($,F,B).then(()=>Jr(r,a,i))}else if(x.type==="stop"||x.type==="failed")return Jr(r,a,i);Yr()}).catch(x=>(console.debug(`[vue-qrcode-reader] starting camera failed with "${x}"`),{type:"failed",error:x}));const y=await wt;if(y.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");if(y.type==="failed")throw y.error;if(y.type==="start")return y.data.capabilities;Yr()}async function Pn(r,a,i){console.debug("[vue-qrcode-reader] stopping camera"),r.src="",r.srcObject=null,r.load(),await dn(r,"error");for(const h of a.getTracks())i!=null||await h.applyConstraints({advanced:[{torch:!1}]}),a.removeTrack(h),h.stop();return{type:"stop",data:{}}}async function Lt(){if(wt=wt.then(r=>{if(r.type==="stop"||r.type==="failed")return r;const{data:{videoEl:a,stream:i,isTorchOn:h}}=r;return Pn(a,i,h)}),(await wt).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const cs=Oa({__name:"QrcodeStream",props:{constraints:{default:()=>({facingMode:"environment"})},formats:{default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function,default:void 0}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:a}){const i=r,h=a,y=dt(i.constraints),x=dt(i.formats);Dt(()=>i.constraints,(he,Z)=>{JSON.stringify(he)!==JSON.stringify(Z)&&(y.value=he)},{deep:!0}),Dt(()=>i.formats,(he,Z)=>{JSON.stringify(he)!==JSON.stringify(Z)&&(x.value=he)},{deep:!0});const $=dt(),F=dt(),P=dt(),B=dt(!1),V=dt(!1);Ta(()=>{V.value=!0}),Ma(()=>{Lt()});const W=or(()=>({torch:i.torch,constraints:y.value,shouldStream:V.value&&!i.paused}));Dt(W,async he=>{const Z=P.value;et(Z!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const oe=$.value;et(oe!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const We=oe.getContext("2d");if(et(We!==null,"if cavnas is defined, canvas 2d context should also be non-null"),he.shouldStream){Lt(),B.value=!1;try{const Le=await us(Z,he);V.value?(B.value=!0,h("camera-on",Le)):await Lt()}catch(Le){h("error",Le)}}else oe.width=Z.videoWidth,oe.height=Z.videoHeight,We.drawImage(Z,0,0,Z.videoWidth,Z.videoHeight),Lt(),B.value=!1,h("camera-off")},{deep:!0}),Dt(x,async he=>{V.value&&await pn(he)});const ae=or(()=>W.value.shouldStream&&B.value);Dt(ae,he=>{if(he){et($.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),fe($.value),et(F.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),fe(F.value);const Z=()=>i.track===void 0?500:40;et(P.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),$i(P.value,{detectHandler:oe=>h("detect",oe),formats:x.value,locateHandler:K,minDelay:Z()})}});const fe=he=>{const Z=he.getContext("2d");et(Z!==null,"canvas 2d context should always be non-null"),Z.clearRect(0,0,he.width,he.height)},K=he=>{const Z=F.value;et(Z!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const oe=P.value;if(et(oe!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),he.length===0||i.track===void 0)fe(Z);else{const We=oe.offsetWidth,Le=oe.offsetHeight,He=oe.videoWidth,Qe=oe.videoHeight,ke=Math.max(We/He,Le/Qe),Ve=He*ke,Je=Qe*ke,ct=Ve/He,lt=Je/Qe,R=(We-Ve)/2,k=(Le-Je)/2,E=({x:n,y:u})=>({x:Math.floor(n*ct),y:Math.floor(u*lt)}),T=({x:n,y:u})=>({x:Math.floor(n+R),y:Math.floor(u+k)}),w=he.map(n=>{const{boundingBox:u,cornerPoints:c}=n,{x:l,y:v}=T(E({x:u.x,y:u.y})),{x:_,y:L}=E({x:u.width,y:u.height});return{...n,cornerPoints:c.map(I=>T(E(I))),boundingBox:DOMRectReadOnly.fromRect({x:l,y:v,width:_,height:L})}});Z.width=oe.offsetWidth,Z.height=oe.offsetHeight;const d=Z.getContext("2d");et(d!==null,"canvas 2d context should always be non-null"),i.track(w,d)}},de={width:"100%",height:"100%",position:"relative","z-index":"0"},re={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},ve={width:"100%",height:"100%","object-fit":"cover"},$e=or(()=>ae.value?ve:{...ve,visibility:"hidden",position:"absolute"});return(he,Z)=>(vt(),yt("div",{style:de},[Ie("video",{ref_key:"videoRef",ref:P,style:Da($e.value),autoplay:"",muted:"",playsinline:""},null,4),$a(Ie("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:$,style:ve},null,512),[[ka,!ae.value]]),Ie("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:F,style:re},null,512),Ie("div",{style:re},[Ea(he.$slots,"default")])]))}});var ls=Object.defineProperty,ds=Object.getOwnPropertyDescriptor,fs=(r,a,i,h)=>{for(var y=h>1?void 0:h?ds(a,i):a,x=r.length-1,$;x>=0;x--)($=r[x])&&(y=(h?$(a,i,y):$(y))||y);return h&&y&&ls(a,i,y),y};let ir=class extends Ra{constructor(){super(...arguments);ot(this,"$notify");ot(this,"activeDid","");ot(this,"apiServer","");ot(this,"givenName","");ot(this,"hideRegisterPromptOnNewContact",!1);ot(this,"isRegistered",!1);ot(this,"qrValue","");ot(this,"ETHR_DID_PREFIX",za)}async created(){const a=await Aa();this.activeDid=a.activeDid||"",this.apiServer=a.apiServer||"",this.givenName=a.firstName||"",this.hideRegisterPromptOnNewContact=!!a.hideRegisterPromptOnNewContact,this.isRegistered=!!a.isRegistered;const i=await Ua(this.activeDid);if(i){const h=(a.firstName||"")+(a.lastName?` ${a.lastName}`:"");this.qrValue=await Wa(i,!!a.isRegistered,h,a.profileImageUrl,!1)}}danger(a,i="Error",h=5e3){this.$notify({group:"alert",type:"danger",title:i,text:a},h)}async onScanDetect(a){var h;const i=(h=a[0])==null?void 0:h.rawValue;if(i){let y;try{const x=Ha(i);if(!x){this.$notify({group:"alert",type:"danger",title:"No Contact Info",text:"The contact info could not be parsed."},3e3);return}if(y={did:x.iss,name:x.own.name,nextPubKeyHashB64:x.own.nextPublicEncKeyHash,profileImageUrl:x.own.profileImageUrl,publicKeyBase64:x.own.publicEncKey,registered:x.own.registered},!y.did){this.danger("There is no DID.","Incomplete Contact");return}if(!Va(y.did)){this.danger("The DID must begin with 'did:'","Invalid DID");return}}catch(x){console.error("Error parsing QR info:",x),this.danger("Could not parse the QR info.","Read Error");return}try{await ht.open(),await ht.contacts.add(y);let x;this.activeDid?(await this.setVisibility(y,!0),y.seesMe=!0,x="They were added, and your activity is visible to them."):x="They were added.",this.$notify({group:"alert",type:"success",title:"Contact Added",text:x},3e3),this.isRegistered&&!this.hideRegisterPromptOnNewContact&&!y.registered&&setTimeout(()=>{this.$notify({group:"modal",type:"confirm",title:"Register",text:"Do you want to register them?",onCancel:async $=>{$&&(await ht.settings.update(Br,{hideRegisterPromptOnNewContact:$}),this.hideRegisterPromptOnNewContact=$)},onNo:async $=>{$&&(await ht.settings.update(Br,{hideRegisterPromptOnNewContact:$}),this.hideRegisterPromptOnNewContact=$)},onYes:async()=>{await this.register(y)},promptToStopAsking:!0},-1)},500)}catch(x){console.error("Error saving contact info:",x),this.$notify({group:"alert",type:"danger",title:"Contact Error",text:"Could not save contact info. Check if it already exists."},5e3)}}else this.$notify({group:"alert",type:"danger",title:"Invalid Contact QR Code",text:"No QR code detected with contact information."},5e3)}async setVisibility(a,i){const h=await Ga(this.activeDid,this.apiServer,this.axios,ht,a,i);h.error?this.danger(h.error,"Error Setting Visibility"):h.success||console.error("Got strange result from setting visibility:",h)}async register(a){var i,h,y;this.$notify({group:"alert",type:"toast",text:"",title:"Registration submitted..."},1e3);try{const x=await Qa(this.activeDid,this.apiServer,this.axios,a);x.success?(a.registered=!0,ht.contacts.update(a.did,{registered:!0}),this.$notify({group:"alert",type:"success",title:"Registration Success",text:(a.name||"That unnamed person")+" has been registered."},5e3)):this.$notify({group:"alert",type:"danger",title:"Registration Error",text:x.error||"Something went wrong during registration."},5e3)}catch(x){console.error("Error when registering:",x);let $="There was an error.";const F=x;F?(y=(h=(i=F.response)==null?void 0:i.data)==null?void 0:h.error)!=null&&y.message?$=F.response.data.error.message:F.message?$=F.message:$=JSON.stringify(F.toJSON()):$=x,this.$notify({group:"alert",type:"danger",title:"Registration Error",text:$},5e3)}}onScanError(a){console.error("Scan was invalid:",a),this.$notify({group:"alert",type:"danger",title:"Invalid Scan",text:"The scan was invalid."},5e3)}onCopyUrlToClipboard(){Fr().copy(this.qrValue).then(()=>{console.log("Contact URL:",this.qrValue),this.$notify({group:"alert",type:"toast",title:"Copied",text:"Contact URL was copied to clipboard."},2e3)})}onCopyDidToClipboard(){Fr().copy(this.activeDid).then(()=>{this.$notify({group:"alert",type:"info",title:"Copied",text:"Your DID was copied to the clipboard. Have them paste it in the box on their 'People' screen to add you."},5e3)})}};ir=fs([Ia({components:{QrcodeStream:cs,QRCodeVue3:Xa,QuickNav:La,UserNameDialog:Na}})],ir);const hs={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},ps={class:"mb-8"},gs={class:"text-lg text-center font-light relative px-7"},vs={key:0,class:"bg-amber-200 rounded-md overflow-hidden text-center px-4 py-3 mb-4"},ys={key:1,class:"text-center"},ms={key:2,class:"text-center"},ws={class:"text-center"};function bs(r,a,i,h,y,x){const $=pt("QuickNav"),F=pt("fa"),P=pt("UserNameDialog"),B=pt("QRCodeVue3"),V=pt("router-link"),W=pt("qrcode-stream");return vt(),yt(qa,null,[gt($,{selected:"Profile"}),Ie("section",hs,[Ie("div",ps,[Ie("div",gs,[Ie("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:a[0]||(a[0]=ae=>r.$router.back())},[gt(F,{icon:"chevron-left",class:"fa-fw"})])]),a[7]||(a[7]=Ie("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4"}," Your Contact Info ",-1)),r.givenName?Ba("",!0):(vt(),yt("p",vs,[a[4]||(a[4]=Ie("span",{class:"text-red"},"Beware!",-1)),a[5]||(a[5]=qt(" You aren't sharing your name, so quickly ")),a[6]||(a[6]=Ie("br",null,null,-1)),Ie("span",{onClick:a[1]||(a[1]=()=>r.$refs.userNameDialog.open(ae=>this.givenName=ae)),class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md"}," click here to set it for them. ")]))]),gt(P,{ref:"userNameDialog"},null,512),r.activeDid&&r.activeDid.startsWith(r.ETHR_DID_PREFIX)?(vt(),yt("div",{key:0,onClick:a[2]||(a[2]=ae=>r.onCopyUrlToClipboard()),class:"text-center"},[gt(B,{value:this.qrValue,cornersSquareOptions:{type:"extra-rounded"},dotsOptions:{type:"square"},class:"flex justify-center"},null,8,["value"]),a[8]||(a[8]=Ie("span",null," Click the QR code to copy your contact info to your clipboard. ",-1))])):r.activeDid?(vt(),yt("div",ys,[Ie("span",{onClick:a[3]||(a[3]=ae=>r.onCopyDidToClipboard()),class:"text-blue-500"}," Click here to copy your DID to your clipboard. "),a[9]||(a[9]=Ie("span",null," Then give it to them so they can paste it in their list of People. ",-1))])):(vt(),yt("div",ms,[a[11]||(a[11]=qt(" You have no identitifiers yet, so ")),gt(V,{to:{name:"start"},class:"bg-blue-500 text-white px-1.5 py-1 rounded-md"},{default:Fa(()=>a[10]||(a[10]=[qt(" create your identifier. ")])),_:1}),a[12]||(a[12]=Ie("br",null,null,-1)),a[13]||(a[13]=qt(" If you don't that first, these contacts won't see your activity. "))])),Ie("div",ws,[a[14]||(a[14]=Ie("h1",{class:"text-4xl text-center font-light pt-6"},"Scan Contact Info",-1)),gt(W,{onDetect:r.onScanDetect,onError:r.onScanError},null,8,["onDetect","onError"]),a[15]||(a[15]=Ie("span",null," If you do not see a scanning camera window here, check your camera permissions. ",-1))])])],64)}const Ts=ja(ir,[["render",bs]]);export{Ts as default};